.loot-shell,
.loot-tooltip,
.loot-chooser {
    --q0: #8b93a7;
    --q1: #c9ced8;
    --q2: #58be60;
    --q3: #3ba9ff;
    --q4: #ac6aff;
    --q5: #fbbf24;
    --q6: #ef4444;
    --gold: #ffcf6b;
}

.loot-shell {
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.loot-shell .q-0, .loot-tooltip .q-0, .loot-chooser .q-0 { --qc: var(--q0); }
.loot-shell .q-1, .loot-tooltip .q-1, .loot-chooser .q-1 { --qc: var(--q1); }
.loot-shell .q-2, .loot-tooltip .q-2, .loot-chooser .q-2 { --qc: var(--q2); }
.loot-shell .q-3, .loot-tooltip .q-3, .loot-chooser .q-3 { --qc: var(--q3); }
.loot-shell .q-4, .loot-tooltip .q-4, .loot-chooser .q-4 { --qc: var(--q4); }
.loot-shell .q-5, .loot-tooltip .q-5, .loot-chooser .q-5 { --qc: var(--q5); }
.loot-shell .q-6, .loot-tooltip .q-6, .loot-chooser .q-6 { --qc: var(--q6); }

.loot-topbar {
    position: relative;
    z-index: 6;
    align-self: stretch;
    display: flex;
    align-items: center;
    margin-bottom: -4px;
}

.loot-sticky-selection {
    position: fixed;
    top: calc(var(--sticky-header-height, 0px) + 12px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 950;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(340px, calc(100vw - 36px));
    min-height: 52px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 214, 140, 0.35);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

.loot-sticky-selection[hidden] {
    display: none;
}

.loot-sticky-selection-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.loot-sticky-selection:focus-visible {
    outline: 2px solid var(--gold, #ffcf6b);
    outline-offset: 3px;
}

@media (max-width: 900px) {
    .loot-sticky-selection {
        display: none;
    }
}

.loot-layout {
    width: 100%;
}

.loot-icon {
    display: block;
    object-fit: contain;
    width: 40px;
    height: 40px;
    flex: none;
}

.loot-icon.is-xs { width: 22px; height: 22px; }
.loot-icon.is-sm { width: 38px; height: 38px; }
.loot-icon.is-md { width: 56px; height: 56px; }
.loot-icon.is-lg { width: 72px; height: 72px; }
.loot-icon.is-xl { width: 96px; height: 96px; }

.loot-noicon {
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: color-mix(in srgb, var(--qc, #8b93a7) 30%, rgba(0, 0, 0, 0.35));
    color: #fff;
    font-weight: 700;
    font-size: 0.85em;
}

.loot-icon.is-md.loot-noicon { font-size: 1.4rem; }
.loot-icon.is-lg.loot-noicon, .loot-icon.is-xl.loot-noicon { font-size: 2rem; }

.loot-main {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.loot-stage {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    padding: 16px;
    border: 1px solid var(--border-color);
    background:
        radial-gradient(ellipse 60% 45% at 50% 22%, rgba(255, 196, 92, 0.16), transparent 70%),
        radial-gradient(ellipse 80% 60% at 50% 110%, rgba(120, 90, 255, 0.12), transparent 70%),
        linear-gradient(180deg, #27242c 0%, #1c1d22 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.loot-stage[data-kind="pool"] {
    background:
        radial-gradient(ellipse 60% 45% at 50% 22%, rgba(255, 105, 140, 0.17), transparent 70%),
        radial-gradient(ellipse 80% 60% at 50% 110%, rgba(80, 140, 255, 0.14), transparent 70%),
        linear-gradient(180deg, #2a2330 0%, #1c1d22 100%);
}

.loot-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.9), rgba(255, 220, 150, 0.4) 30%, transparent 65%);
    opacity: 0;
}

.loot-stage.is-flash::after {
    animation: loot-flash 0.7s ease-out;
}

.loot-stage.is-jackpot {
    border-color: rgba(255, 207, 107, 0.6);
    box-shadow: 0 0 0 1px rgba(255, 207, 107, 0.35), 0 0 60px rgba(255, 186, 73, 0.25);
}

.loot-head {
    position: relative;
    z-index: 6;
    width: 100%;
    display: flex;
    justify-content: center;
    text-align: center;
}

.loot-head-title h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    background: linear-gradient(180deg, #fff6dc, #ffcf6b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.loot-head-sub {
    display: block;
    margin-top: 2px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.loot-head-sub b {
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.loot-probability-basis {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--text-secondary);
    text-align: center;
}

.loot-selected-name {
    position: relative;
}

.loot-rare-guarantee {
    position: absolute;
    right: calc(100% + 4px);
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    flex-shrink: 0;
}

.loot-rare-guarantee[hidden] {
    display: none;
}

.loot-rare-guarantee-btn.ro-info-trigger {
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    justify-content: center;
}

.loot-rare-guarantee-btn .ro-info-trigger-label {
    display: none;
}

.loot-rare-guarantee-tip {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    width: min(300px, calc(100vw - 48px));
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
    .loot-rare-guarantee:hover .loot-rare-guarantee-tip,
    .loot-rare-guarantee:focus-within .loot-rare-guarantee-tip {
        display: block;
    }
}

.loot-altar {
    position: relative;
    width: 180px;
    height: 148px;
    display: grid;
    place-items: center;
}

.loot-rays {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: repeating-conic-gradient(from 0deg, rgba(255, 214, 140, 0.16) 0deg 8deg, transparent 8deg 22deg);
    -webkit-mask-image: radial-gradient(circle, #000 18%, transparent 68%);
    mask-image: radial-gradient(circle, #000 18%, transparent 68%);
    animation: loot-spin 26s linear infinite;
    opacity: 0.7;
    pointer-events: none;
}

.loot-stage[data-kind="pool"] .loot-rays {
    background: repeating-conic-gradient(from 0deg, rgba(255, 140, 180, 0.15) 0deg 8deg, transparent 8deg 22deg);
}

.loot-stage.is-opening .loot-rays {
    animation-duration: 3s;
    opacity: 1;
}

.loot-orb {
    position: relative;
    z-index: 1;
    width: 132px;
    height: 132px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 2px solid color-mix(in srgb, var(--qc, #ffcf6b) 70%, #fff 10%);
    background:
        radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--qc, #ffcf6b) 40%, transparent), transparent 62%),
        radial-gradient(circle at 50% 50%, #34313b, #1d1c22 72%);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.03), 0 0 38px color-mix(in srgb, var(--qc, #ffcf6b) 45%, transparent), inset 0 -10px 24px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    animation: loot-float 3.2s ease-in-out infinite;
    transition: transform 0.12s ease;
}

.loot-orb.is-empty {
    border: 2px dashed rgba(255, 214, 140, 0.55);
    background: rgba(0, 0, 0, 0.28);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.03);
}

.loot-orb-add {
    font-size: 3.2rem;
    font-weight: 300;
    line-height: 1;
    color: rgba(255, 214, 140, 0.85);
}

.loot-orb[aria-expanded="true"] {
    border-color: #ffcf6b;
    box-shadow: 0 0 0 4px rgba(255, 207, 107, 0.25), 0 0 38px rgba(255, 207, 107, 0.35);
}

.loot-btn:disabled {
    filter: grayscale(0.8) brightness(0.7);
    cursor: default;
    transform: none;
}

.loot-reset:disabled {
    opacity: 0.4;
    cursor: default;
}

.loot-chooser {
    position: fixed;
    z-index: 1100;
    width: 440px;
    max-height: min(640px, 82vh);
    display: flex;
    flex-direction: column;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg, 12px);
    background: var(--bg-secondary);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

.loot-chooser[hidden] {
    display: none;
}

.loot-chooser header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.loot-chooser header button {
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--bg-primary);
    font: inherit;
    font-size: 1rem;
    cursor: pointer;
}

.loot-chooser-search {
    padding: 10px 12px 0;
}

.loot-chooser-search input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: var(--bg-primary);
    color: var(--text-primary);
    font: inherit;
    font-size: 0.88rem;
}

.loot-chooser-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
    overflow-y: auto;
}

.loot-chooser-group {
    grid-column: 1 / -1;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 4px;
}

.loot-chooser-item {
    position: relative;
    display: grid;
    grid-template-rows: 48px minmax(2.2em, auto) auto auto;
    justify-items: center;
    gap: 5px;
    min-width: 0;
    padding: 10px 6px 8px;
    color: var(--text-secondary);
    border: 1px solid color-mix(in srgb, var(--qc) 28%, var(--border-color));
    border-radius: 10px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--qc) 7%, var(--bg-tertiary)), var(--bg-primary));
    font: inherit;
    text-align: center;
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.loot-chooser-item:hover {
    transform: translateY(-2px);
    color: var(--text-primary);
    border-color: color-mix(in srgb, var(--qc) 80%, transparent);
    background: linear-gradient(180deg, color-mix(in srgb, var(--qc) 18%, var(--bg-tertiary)), color-mix(in srgb, var(--qc) 6%, var(--bg-primary)));
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), 0 0 0 1px color-mix(in srgb, var(--qc) 35%, transparent);
}

.loot-chooser-item:active {
    transform: translateY(0) scale(0.98);
}

.loot-chooser-item:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.loot-chooser-item.is-selected {
    color: var(--text-primary);
    border-color: var(--gold);
    background: linear-gradient(180deg, rgba(255, 207, 107, 0.16), color-mix(in srgb, var(--qc) 6%, var(--bg-primary)));
    box-shadow: 0 0 0 1px rgba(255, 207, 107, 0.45), 0 0 18px rgba(255, 207, 107, 0.18);
}

.loot-chooser-item.is-selected::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%232a1d00' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat,
        var(--gold);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.loot-chooser-art {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--qc) 16%, rgba(0, 0, 0, 0.25));
    border: 1px solid color-mix(in srgb, var(--qc) 40%, transparent);
    transition: transform 0.15s ease;
}

.loot-chooser-item:hover .loot-chooser-art {
    transform: scale(1.06);
}

.loot-chooser-item strong {
    align-self: center;
    font-size: 0.76rem;
    line-height: 1.2;
    color: var(--text-primary);
}

.loot-chooser-item > .loot-basis,
.loot-info-basis > .loot-basis {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    padding: 1px 7px;
    border-radius: 999px;
    white-space: nowrap;
    color: #9ff0b8;
    background: rgba(87, 242, 135, 0.1);
    border: 1px solid rgba(87, 242, 135, 0.4);
}

.loot-chooser-item > .loot-basis.is-text,
.loot-info-basis > .loot-basis.is-text {
    color: #ffd59a;
    background: rgba(250, 166, 26, 0.1);
    border-color: rgba(250, 166, 26, 0.45);
}

.loot-chooser-none {
    grid-column: 1 / -1;
    text-align: center;
    padding: 16px;
}

@media (max-width: 900px) {
    .loot-chooser {
        inset: 10vh 14px auto;
        width: auto;
        max-height: 80vh;
    }
}

@media (max-width: 560px) {
    .loot-chooser-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.loot-orb:hover {
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.05), 0 0 54px color-mix(in srgb, var(--qc, #ffcf6b) 65%, transparent), inset 0 -10px 24px rgba(0, 0, 0, 0.45);
}

.loot-orb:active {
    transform: scale(0.94);
}

.loot-orb .loot-icon {
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55));
}

.loot-stage.is-opening .loot-orb {
    animation: loot-shake 0.32s ease-in-out, loot-pop 0.36s 0.3s cubic-bezier(0.2, 1.6, 0.4, 1);
}

.loot-burst {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 2;
}

.loot-spark {
    position: absolute;
    left: -5px;
    top: -5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff, #ffd98a 45%, rgba(255, 170, 60, 0) 70%);
    opacity: 0;
    animation: loot-spark 0.8s var(--delay, 0ms) cubic-bezier(0.15, 0.7, 0.3, 1) forwards;
}

.loot-spark.is-rare {
    background: radial-gradient(circle, #fff, #d8b4ff 45%, rgba(172, 106, 255, 0) 70%);
    width: 12px;
    height: 12px;
}

.loot-spark.is-jackpot {
    background: radial-gradient(circle, #fff, #ffcf6b 40%, rgba(239, 68, 68, 0) 72%);
    width: 14px;
    height: 14px;
}

.loot-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 4;
}

.loot-confetti-piece {
    position: absolute;
    top: -14px;
    width: 8px;
    height: 13px;
    border-radius: 2px;
    opacity: 0.95;
    animation: loot-fall var(--fall, 1.4s) cubic-bezier(0.25, 0.6, 0.45, 1) forwards;
}

.loot-banner {
    position: absolute;
    left: 50%;
    top: 134px;
    transform: translateX(-50%);
    z-index: 5;
    pointer-events: none;
    opacity: 0;
}

.loot-banner.is-shown {
    animation: loot-banner 2.4s ease forwards;
}

.loot-banner-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 26px 16px;
    border-radius: 18px;
    background: radial-gradient(ellipse at 50% 0%, rgba(255, 207, 107, 0.3), transparent 70%), #1e1a24;
    border: 1px solid rgba(255, 207, 107, 0.65);
    box-shadow: 0 0 40px rgba(255, 186, 73, 0.4), 0 12px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
    min-width: 220px;
}

.loot-banner-inner.is-milestone {
    background: radial-gradient(ellipse at 50% 0%, rgba(76, 201, 240, 0.28), transparent 70%), #1a1e26;
    border-color: rgba(76, 201, 240, 0.6);
    box-shadow: 0 0 36px rgba(76, 201, 240, 0.3), 0 12px 30px rgba(0, 0, 0, 0.5);
}

.loot-banner-label {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    background: linear-gradient(180deg, #fff, #ffcf6b 60%, #ff9f43);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-transform: uppercase;
}

.loot-banner-inner.is-milestone .loot-banner-label {
    background: linear-gradient(180deg, #fff, #8ee3ff);
    -webkit-background-clip: text;
    background-clip: text;
    font-size: 1rem;
}

.loot-banner-name {
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.loot-slots {
    width: 100%;
    max-width: 720px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    perspective: 900px;
}

.loot-slot {
    position: relative;
    aspect-ratio: 1 / 1.1;
    min-width: 0;
}

.loot-slot.is-empty {
    border-radius: 14px;
    border: 1px dashed rgba(255, 255, 255, 0.09);
    background: rgba(0, 0, 0, 0.16);
    display: grid;
    place-items: center;
}

.loot-empty-mark {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.14);
    font-weight: 700;
}

.loot-card {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    transition: transform 0.55s cubic-bezier(0.3, 1.35, 0.5, 1);
}

.loot-slot.is-revealed .loot-card {
    transform: rotateY(180deg);
}

.loot-slot.is-instant .loot-card {
    transition: none;
}

.loot-face {
    position: absolute;
    inset: 0;
    border-radius: 14px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.loot-back {
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 214, 140, 0.35);
    background:
        repeating-linear-gradient(45deg, rgba(255, 214, 140, 0.07) 0 8px, transparent 8px 16px),
        linear-gradient(160deg, #3a3240, #241f2b);
    box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.25);
}

.loot-back-mark {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid rgba(255, 214, 140, 0.55);
    box-shadow: 0 0 14px rgba(255, 214, 140, 0.3);
    background: radial-gradient(circle, rgba(255, 214, 140, 0.4), transparent 70%);
}

.loot-front {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 6px;
    border: 1px solid color-mix(in srgb, var(--qc, #8b93a7) 65%, transparent);
    background: linear-gradient(180deg, color-mix(in srgb, var(--qc, #8b93a7) 14%, #2c2b33), #1f1f25);
    overflow: hidden;
}

.loot-slot.is-rare .loot-front {
    box-shadow: inset 0 0 22px color-mix(in srgb, var(--qc) 35%, transparent), 0 0 18px color-mix(in srgb, var(--qc) 45%, transparent);
}

.loot-slot.is-jackpot .loot-front {
    border: 2px solid transparent;
    background:
        linear-gradient(180deg, #3a2f22, #22201f) padding-box,
        conic-gradient(#ffcf6b, #ef4444, #c77dff, #4cc9f0, #ffcf6b) border-box;
    box-shadow: 0 0 26px rgba(255, 186, 73, 0.55);
}

.loot-slot.is-nothing .loot-front {
    --qc: #555b66;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: center;
}

.loot-slot-art {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
}

.loot-slot-art .loot-icon {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.loot-slot.is-revealed:not(.is-instant) .loot-slot-art {
    animation: loot-pop 0.45s 0.12s cubic-bezier(0.2, 1.6, 0.4, 1) backwards;
}

.loot-count {
    position: absolute;
    right: -10px;
    bottom: -4px;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-variant-numeric: tabular-nums;
}

.loot-slot-name {
    position: relative;
    z-index: 1;
    font-size: 0.74rem;
    line-height: 1.2;
    font-weight: 600;
    text-align: center;
    color: #f2f4f8;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
}

.loot-slot-odds {
    position: relative;
    z-index: 1;
    font-size: 0.68rem;
    color: color-mix(in srgb, var(--qc, #8b93a7) 70%, #fff);
    font-variant-numeric: tabular-nums;
}

.loot-slot-tier {
    position: absolute;
    top: 5px;
    left: 5px;
    z-index: 1;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: color-mix(in srgb, var(--qc, #8b93a7) 60%, #fff);
    border: 1px solid color-mix(in srgb, var(--qc, #8b93a7) 50%, transparent);
}

.loot-slot.is-jackpot .loot-slot-tier {
    color: #ffe1a1;
    border-color: rgba(255, 207, 107, 0.7);
}

.loot-extra {
    position: absolute;
    top: 5px;
    right: 6px;
    font-size: 0.68rem;
    font-weight: 800;
    color: #fff;
}

.loot-actions {
    display: flex;
    gap: 18px;
    justify-content: center;
    flex-wrap: wrap;
}

.loot-btn {
    position: relative;
    min-width: 190px;
    padding: 12px 22px 12px;
    border-radius: 16px;
    border: 0;
    font: inherit;
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.loot-btn-one {
    background: linear-gradient(180deg, #6f9bff, #3d63dd);
    box-shadow: 0 6px 0 #26419a, 0 10px 22px rgba(61, 99, 221, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.loot-btn-ten {
    color: #3b2200;
    background: linear-gradient(180deg, #ffe08a, #f5a623);
    box-shadow: 0 6px 0 #a8650c, 0 10px 26px rgba(245, 166, 35, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.loot-btn:hover {
    filter: brightness(1.08);
}

.loot-btn:active,
.loot-btn.is-pressed {
    transform: translateY(5px);
}

.loot-btn-one:active,
.loot-btn-one.is-pressed {
    box-shadow: 0 1px 0 #26419a, 0 4px 12px rgba(61, 99, 221, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.loot-btn-ten:active,
.loot-btn-ten.is-pressed {
    box-shadow: 0 1px 0 #a8650c, 0 4px 12px rgba(245, 166, 35, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.loot-btn-ten::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.45) 45%, transparent 60%);
    background-size: 250% 100%;
    animation: loot-shine 3.2s ease-in-out infinite;
    pointer-events: none;
}

.loot-btn-label {
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.loot-btn-ten .loot-btn-label {
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.loot-cost {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.loot-toolbar {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.loot-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.loot-toggle input {
    accent-color: #f5a623;
    cursor: pointer;
}

.loot-reset {
    font: inherit;
    font-size: 0.8rem;
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    cursor: pointer;
}

.loot-reset:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.25);
}

.loot-message {
    font-size: 0.88rem;
    color: #ffe1a1;
    background: rgba(255, 207, 107, 0.08);
    border: 1px solid rgba(255, 207, 107, 0.25);
    border-radius: 10px;
    padding: 6px 14px;
    text-align: center;
}

.loot-stats {
    width: 100%;
    max-width: 860px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.loot-stat {
    border-radius: 12px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.loot-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.loot-stat-value {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    font-size: 1.05rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.loot-stat-sub {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.loot-best {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: color-mix(in srgb, var(--qc) 70%, #fff);
    cursor: default;
}

.loot-milestones {
    width: 100%;
    max-width: 860px;
    padding: 4px 4px 0;
}

.loot-ms-open {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(76, 201, 240, 0.07);
    border: 1px solid rgba(76, 201, 240, 0.3);
}

.loot-choose {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 520px;
}

.loot-choose-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #8ee3ff;
}

.loot-choose-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.loot-choose-pick {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.1s ease, filter 0.15s ease;
}

.loot-choose-pick:hover {
    transform: translateY(-2px);
    filter: brightness(1.2) drop-shadow(0 0 8px rgba(142, 227, 255, 0.55));
}

.loot-choose-pick .loot-chip,
.loot-choose-pick .loot-choose-item {
    cursor: pointer;
}

.loot-choose-item {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--qc) 14%, rgba(0, 0, 0, 0.3));
    border: 1px solid color-mix(in srgb, var(--qc) 50%, transparent);
    cursor: default;
}

.loot-ms-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.loot-ms-head b {
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.loot-ms-track {
    position: relative;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    margin: 0 22px 62px;
}

.loot-ms-fill {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #4cc9f0, #ffcf6b);
    box-shadow: 0 0 12px rgba(76, 201, 240, 0.45);
    transition: width 0.5s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.loot-ms-mark {
    position: absolute;
    top: -6px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: default;
}

.loot-ms-icon {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    margin-top: 16px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    filter: grayscale(0.85) brightness(0.7);
    transition: filter 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.loot-ms-mark::before {
    content: "";
    position: absolute;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2b2c33;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.loot-ms-mark.is-hit::before {
    background: #ffcf6b;
    border-color: #fff3cf;
    box-shadow: 0 0 12px rgba(255, 207, 107, 0.8);
}

.loot-ms-mark.is-hit .loot-ms-icon {
    filter: none;
    border-color: rgba(255, 207, 107, 0.6);
    box-shadow: 0 0 14px rgba(255, 207, 107, 0.35);
}

.loot-ms-n {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.loot-panels {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
}

.loot-panel {
    border-radius: var(--radius-lg);
    padding: 14px 16px 16px;
    background: var(--bg-card, rgba(41, 43, 47, 0.92));
    border: 1px solid var(--border-color, rgba(64, 68, 75, 0.6));
    min-width: 0;
}

.loot-panels {
    align-items: start;
}

.loot-fold > summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    cursor: pointer;
    user-select: none;
}

.loot-fold > summary::-webkit-details-marker {
    display: none;
}

.loot-fold > summary::before {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--text-secondary);
    border-bottom: 2px solid var(--text-secondary);
    transform: rotate(-45deg);
    transition: transform 0.15s ease;
}

.loot-fold[open] > summary::before {
    transform: rotate(45deg);
}

.loot-fold[open] > summary {
    margin-bottom: 10px;
}

.loot-panel-wide {
    grid-column: 1 / -1;
}

.loot-panel-title {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.loot-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.loot-panel-head .loot-panel-title {
    margin-bottom: 0;
}

.loot-muted {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.loot-error {
    padding: 40px;
}

.loot-id-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.loot-id {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.loot-id b {
    color: var(--gold);
    font-variant-numeric: tabular-nums;
}

.loot-src-block {
    margin-top: 12px;
}

.loot-src-block h3 {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.loot-shop-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.loot-shop {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 2px 12px;
    padding: 7px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(0, 0, 0, 0.18);
    color: var(--text-primary);
    font: inherit;
    text-align: left;
}

button.loot-shop {
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

button.loot-shop:hover {
    border-color: rgba(255, 207, 107, 0.35);
}

.loot-shop.is-selected {
    border-color: rgba(255, 207, 107, 0.7);
    background: rgba(255, 207, 107, 0.08);
    box-shadow: 0 0 0 1px rgba(255, 207, 107, 0.2);
}

.loot-shop-name {
    font-size: 0.86rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.loot-shop-tab {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-secondary);
}

.loot-shop-price {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    justify-self: end;
}

.loot-shop-limit {
    grid-column: 1 / -1;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.loot-hint {
    margin-top: 6px;
    font-size: 0.75rem;
}

.loot-convert {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.loot-inline {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 800;
}

.loot-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.loot-tag {
    font-size: 0.8rem;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.loot-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px 3px 4px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--qc) 14%, rgba(0, 0, 0, 0.25));
    border: 1px solid color-mix(in srgb, var(--qc) 40%, transparent);
    font-size: 0.82rem;
    cursor: default;
}

.loot-chip-name {
    font-weight: 600;
}

.loot-chip-id {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.loot-haul-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
    gap: 8px;
    max-height: 340px;
    overflow: auto;
    padding: 2px;
}

.loot-haul-cell {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--qc) 14%, rgba(0, 0, 0, 0.25));
    border: 1px solid color-mix(in srgb, var(--qc) 45%, transparent);
    cursor: default;
}

.loot-haul-cell.is-jackpot {
    box-shadow: 0 0 14px rgba(255, 186, 73, 0.55);
    border-color: rgba(255, 207, 107, 0.8);
}

.loot-haul-cell.is-rare {
    box-shadow: 0 0 10px color-mix(in srgb, var(--qc) 40%, transparent);
}

.loot-haul-cell.is-bonus {
    border-style: dashed;
    border-color: rgba(76, 201, 240, 0.7);
}

.loot-haul-amount {
    position: absolute;
    right: 3px;
    bottom: 2px;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0 4px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.7);
    font-variant-numeric: tabular-nums;
}

.loot-rates-scroll {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.loot-bucket {
    --bucket: #ffcf6b;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--bucket) 35%, transparent);
    background: rgba(0, 0, 0, 0.16);
    overflow: hidden;
}

.loot-bucket.is-rank-1 { --bucket: #ef4444; }
.loot-bucket.is-rank-2 { --bucket: #fbbf24; }
.loot-bucket.is-rank-3 { --bucket: #ac6aff; }

.loot-bucket-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 14px;
    background: color-mix(in srgb, var(--bucket) 12%, #25262b);
    border-bottom: 1px solid color-mix(in srgb, var(--bucket) 30%, transparent);
}

.loot-bucket-name {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}

.loot-bucket-name strong {
    font-size: 0.95rem;
    font-weight: 800;
    color: color-mix(in srgb, var(--bucket) 55%, #fff);
}

.loot-bucket-name span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.loot-bucket-name .loot-bucket-you {
    color: var(--text-secondary);
}

.loot-bucket-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex: none;
    line-height: 1.1;
}

.loot-bucket-total b {
    font-size: 1.25rem;
    font-weight: 900;
    color: color-mix(in srgb, var(--bucket) 55%, #fff);
    font-variant-numeric: tabular-nums;
}

.loot-bucket-total span {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.loot-bucket-scroll {
    max-height: 460px;
    overflow: auto;
    scrollbar-gutter: stable;
}

.loot-table {
    width: 100%;
    min-width: 560px;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.loot-col-qty {
    width: 64px;
}

.loot-col-num {
    width: 104px;
}

.loot-col-pulled {
    width: 88px;
}

.loot-table td:first-child {
    overflow: hidden;
}

.loot-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #25262b;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
}

.loot-table td {
    padding: 5px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

.loot-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.loot-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.loot-table tr.is-pulled td:first-child {
    box-shadow: inset 3px 0 0 rgba(255, 207, 107, 0.6);
}

.loot-row-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    min-width: 0;
    cursor: default;
}

.loot-row-item .loot-icon {
    flex: none;
}

.loot-row-pets {
    display: inline-flex;
    gap: 2px;
    flex: none;
}

.loot-row-pet {
    display: inline-grid;
    cursor: default;
}

.loot-row-badge {
    flex: none;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 999px;
    color: #ffe1a1;
    background: rgba(255, 207, 107, 0.1);
    border: 1px solid rgba(255, 207, 107, 0.35);
    white-space: nowrap;
}

.loot-cluster {
    --cs: 40px;
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px;
    width: var(--cs);
    height: var(--cs);
    flex: none;
}

.loot-cluster.is-sm { --cs: 38px; }
.loot-cluster.is-md { --cs: 56px; }
.loot-cluster.is-lg { --cs: 72px; }

.loot-cluster .loot-icon {
    width: 100%;
    height: 100%;
}

.loot-cluster-more {
    position: absolute;
    right: -6px;
    bottom: -6px;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 0 4px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
}

.loot-pity-track {
    margin-bottom: 6px;
}

.loot-tip-pets {
    margin-top: 6px;
    color: var(--text-secondary);
    line-height: 1.45;
}

.loot-row-name {
    min-width: 0;
    overflow: hidden;
    font-weight: 600;
    color: color-mix(in srgb, var(--qc) 45%, #fff);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.loot-chance {
    font-weight: 800;
    color: #fff;
}

.loot-table tr.is-jackpot .loot-chance {
    color: #ffcf6b;
}

.loot-table .is-up {
    color: #57f287;
}

.loot-table .is-down {
    color: #ff8a8a;
}

.loot-tooltip {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    max-width: 320px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(24, 25, 30, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    font-size: 0.82rem;
}

.loot-tooltip.is-tip {
    max-width: min(300px, calc(100vw - 48px));
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    box-shadow: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.5;
    text-transform: none;
}

.loot-tip-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.loot-tip-name {
    font-weight: 800;
    color: color-mix(in srgb, var(--qc) 55%, #fff);
}

.loot-tip-odds {
    margin-top: 6px;
    color: var(--text-secondary);
}

.loot-tip-odds b {
    color: #fff;
}

.loot-info-p {
    line-height: 1.6;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

@keyframes loot-spin {
    to { transform: rotate(360deg); }
}

@keyframes loot-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes loot-shake {
    0%, 100% { transform: rotate(0) scale(1); }
    20% { transform: rotate(-9deg) scale(1.04); }
    40% { transform: rotate(8deg) scale(1.06); }
    60% { transform: rotate(-6deg) scale(1.08); }
    80% { transform: rotate(4deg) scale(1.1); }
}

@keyframes loot-pop {
    0% { transform: scale(0.6); }
    60% { transform: scale(1.18); }
    100% { transform: scale(1); }
}

@keyframes loot-spark {
    0% { opacity: 1; transform: translate(0, 0) scale(1.2); }
    100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.2); }
}

@keyframes loot-fall {
    0% { transform: translate(0, 0) rotate(0); opacity: 1; }
    100% { transform: translate(var(--drift), 520px) rotate(var(--spin)); opacity: 0; }
}

@keyframes loot-flash {
    0% { opacity: 0; }
    25% { opacity: 0.85; }
    100% { opacity: 0; }
}

@keyframes loot-banner {
    0% { opacity: 0; transform: translateX(-50%) scale(0.6); }
    12% { opacity: 1; transform: translateX(-50%) scale(1.08); }
    20% { transform: translateX(-50%) scale(1); }
    82% { opacity: 1; transform: translateX(-50%) scale(1); }
    100% { opacity: 0; transform: translateX(-50%) scale(0.96) translateY(-10px); }
}

@keyframes loot-shine {
    0%, 55% { background-position: 150% 0; }
    100% { background-position: -100% 0; }
}

@media (max-width: 1000px) {
    .loot-panels {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .ro-info-modal {
        align-items: center;
        padding: 20px;
    }

    .ro-info-dialog {
        max-height: 85vh;
        max-height: 85dvh;
        border-radius: 16px;
        transform: translateY(10px) scale(0.985);
    }

    .loot-slots {
        gap: 7px;
    }

    .loot-slot-name {
        display: none;
    }

    .loot-slot.is-nothing .loot-slot-name {
        display: block;
        font-size: 0.6rem;
    }

    .loot-front {
        padding: 6px 3px;
    }

    .loot-count {
        right: -4px;
        font-size: 0.6rem;
        padding: 0 3px;
    }

    .loot-slot-odds,
    .loot-slot-tier {
        display: none;
    }

    .loot-icon.is-md {
        width: clamp(24px, 8vw, 40px);
        height: clamp(24px, 8vw, 40px);
    }

    .loot-cluster.is-md {
        --cs: clamp(30px, 10vw, 48px);
    }

    .loot-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .loot-stat:last-child {
        grid-column: 1 / -1;
    }

    .loot-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 12px;
    }

    .loot-btn {
        min-width: 0;
        min-height: 44px;
        justify-content: center;
        padding: 10px 8px;
    }

    .loot-btn-label {
        font-size: 0.9rem;
        line-height: 1.25;
        letter-spacing: 0;
        text-align: center;
    }

    .loot-btn .loot-cost {
        display: none;
    }

}

@media (prefers-reduced-motion: reduce) {
    .loot-chooser-item,
    .loot-chooser-item:hover,
    .loot-chooser-item:hover .loot-chooser-art {
        transform: none;
    }

    .loot-rays,
    .loot-orb,
    .loot-btn-ten::after {
        animation: none;
    }

    .loot-card {
        transition: none;
    }
}
.loot-forge-controls {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    width: 100%;
    max-width: 920px;
    margin: 18px auto 24px;
    text-align: left;
}
.loot-forge-controls[hidden] { display: none; }
.loot-forge-controls label { display: grid; gap: 7px; min-width: 0; }
.loot-forge-controls label > span { font-size: 12px; font-weight: 700; }
.loot-forge-controls small { font-size: 11px; opacity: .65; }
.loot-forge-spent { display: inline-flex; align-items: center; gap: 3px; }
.loot-slot-level { display: none; }
[data-kind="forge"] .loot-stat-value,
[data-kind="relic"] .loot-stat-value { flex-wrap: wrap; gap: 6px; }
@media (max-width: 640px) {
    .loot-forge-controls { grid-template-columns: 1fr; margin: 12px 0 18px; gap: 10px; }
    .loot-slot-level { display: block; font-size: 10px; line-height: 1.2; }
}

.loot-fc { display: grid; gap: 7px; min-width: 0; }
.loot-fc-label { font-size: 12px; font-weight: 700; }
.loot-fc-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.loot-fc-btn:hover,
.loot-fc-btn[aria-expanded="true"] {
    border-color: rgba(255, 207, 107, 0.6);
    background: color-mix(in srgb, #ffcf6b 6%, var(--bg-secondary));
}
.loot-fc-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.loot-fc-caret {
    width: 7px;
    height: 7px;
    flex: none;
    border-right: 2px solid var(--text-secondary);
    border-bottom: 2px solid var(--text-secondary);
    transform: rotate(45deg) translateY(-2px);
}
.loot-fc-menu {
    position: absolute;
    z-index: 60;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.loot-fc-menu[hidden] { display: none; }
.loot-fc-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 10px;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--text-secondary);
    font: inherit;
    font-size: 13px;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
}
.loot-fc-option:hover { background: rgba(255, 255, 255, 0.06); color: var(--text-primary); }
.loot-fc-option.is-active { background: rgba(255, 207, 107, 0.12); color: #ffe1a1; }
.loot-bucket.is-q6 { --bucket: #ef4444; }
.loot-bucket.is-q5 { --bucket: #fbbf24; }
.loot-bucket.is-q4 { --bucket: #ac6aff; }
.loot-bucket.is-q3 { --bucket: #3ba9ff; }
.loot-bucket.is-q2 { --bucket: #58be60; }
.loot-fc { flex: 1 1 150px; }
.loot-fc.is-icon-only { flex: 0 0 auto; }
.loot-forge-controls[data-kind="relic"] .loot-fc { flex: 0 0 auto; }
.loot-forge-controls[data-kind="relic"] .loot-fc:not(.is-icon-only) .loot-fc-btn { min-width: 120px; }
.loot-fc.is-icon-only .loot-fc-btn { width: auto; justify-self: start; gap: 10px; }
.loot-fc-menu.is-icon-only .loot-fc-option .loot-icon { width: 28px; height: 28px; }
.loot-fc-menu.is-icon-only { display: grid; grid-template-columns: repeat(var(--fc-cols, 1), auto); gap: 2px; }
.loot-fc-menu.is-icon-only[hidden] { display: none; }
.loot-fc-menu.is-icon-only .loot-fc-option { justify-content: center; padding: 6px; }
@media (max-width: 640px) {
    .loot-forge-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
    .loot-fc-label { display: none; }
    .loot-fc { flex: 0 0 auto; }
    .loot-fc-btn { width: auto; gap: 5px; padding: 8px 7px; }
    .loot-fc:not(.is-level) .loot-fc-name { display: none; }
}
@media (max-width: 640px) {
    .loot-table { min-width: 356px; font-size: 0.8rem; }
    .loot-table.has-qty { min-width: 400px; }
    .loot-table.is-weighted { min-width: 434px; }
    .loot-table.has-qty.is-weighted { min-width: 478px; }
    .loot-col-item { width: 138px; }
    .loot-col-qty { width: 44px; }
    .loot-col-num { width: 78px; }
    .loot-col-pulled { width: 62px; }
    .loot-table th, .loot-table td { padding-left: 7px; padding-right: 7px; }
    .loot-table td:first-child,
    .loot-table thead th:first-child { position: sticky; left: 0; background: #202126; }
    .loot-table td:first-child { z-index: 1; box-shadow: 1px 0 0 rgba(255, 255, 255, 0.06); }
    .loot-table thead th:first-child { z-index: 2; background: #25262b; }
    .loot-table tr.is-pulled td:first-child { box-shadow: inset 3px 0 0 rgba(255, 207, 107, 0.6), 1px 0 0 rgba(255, 255, 255, 0.06); }
    .loot-row-item { flex-wrap: wrap; gap: 3px 6px; }
    .loot-row-name { flex: 1 1 0; white-space: normal; line-height: 1.2; overflow-wrap: anywhere; }
    .loot-row-level { display: block; font-size: 0.7rem; font-weight: 500; opacity: 0.75; }
    .loot-row-sep { display: none; }
    .loot-row-badge { margin-left: 28px; }
}
.loot-info-basis {
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(87, 242, 135, 0.25);
    border-left: 3px solid #57f287;
    background: rgba(87, 242, 135, 0.06);
}
.loot-info-basis.is-text {
    border-color: rgba(250, 166, 26, 0.3);
    border-left-color: #faa61a;
    background: rgba(250, 166, 26, 0.06);
}
.loot-info-basis > .loot-basis {
    display: inline-block;
    font-size: 0.78rem;
    padding: 2px 10px;
}
.loot-info-basis > p {
    margin: 8px 0 0;
    line-height: 1.6;
    color: var(--text-secondary);
}
.loot-info-note {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.loot-star-badge {
    position: absolute;
    right: -6px;
    bottom: -4px;
    padding: 0 5px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.4;
    color: #ffe1a1;
    background: rgba(0, 0, 0, 0.78);
    border: 1px solid rgba(255, 207, 107, 0.45);
}
.loot-haul-cell .loot-star-badge { right: 2px; bottom: auto; top: 2px; }
.loot-slot-jobs {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 3px;
    max-width: 100%;
}
.loot-slot-jobs-name {
    width: 100%;
    font-size: 0.66rem;
    line-height: 1.2;
    color: var(--text-secondary);
    text-align: center;
    overflow-wrap: anywhere;
}
.loot-row-jobs .loot-icon + .loot-icon { margin-left: -4px; }
.loot-compare-table td.is-best { color: #57f287; font-weight: 800; }
.loot-compare-table .loot-col-num { width: 140px; }
.loot-nowrap { white-space: nowrap; }
.loot-th-currency .loot-icon { display: inline-block; vertical-align: -5px; margin-right: 4px; }
.loot-compare-table tbody td { font-variant-numeric: tabular-nums; }
.loot-compare-table thead th,
.loot-compare-table thead th.num { white-space: normal; vertical-align: bottom; line-height: 1.3; }
.loot-table td > .loot-row-item { display: flex; }
.loot-slot.is-relic .loot-front { gap: 3px; }
.loot-slot.is-relic .loot-front > * { flex: none; }
.loot-slot.is-relic .loot-icon.is-md { width: 46px; height: 46px; }
.loot-slot.is-relic .loot-slot-name { font-size: 0.8rem; font-weight: 800; color: #ffe1a1; }
@media (max-width: 640px) {
    .loot-slot.is-relic .loot-slot-name { display: block; font-size: 0.62rem; }
    .loot-slot.is-relic .loot-icon.is-md { width: clamp(22px, 7vw, 36px); height: clamp(22px, 7vw, 36px); }
    .loot-slot-jobs .loot-icon.is-xs { width: 14px; height: 14px; }
    .loot-slot-jobs { gap: 1px; }
    .loot-slot-jobs-name { display: none; }
    .loot-compare-table { min-width: 560px; }
}
.loot-cost-sub { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; opacity: 0.8; }
