/* ==========================================================================
   NEXTBALL — Cases: home banner, Case Arena, case page, reels, reveal. Markup: cases.js
   Flat and quiet: dark panels, 1 px borders, rarity shown by a bottom line and a soft tint.
   ========================================================================== */
.cx-new { padding: 2px 6px; border-radius: 3px; background: var(--orange, #FF6A13); color: #1A0900; font: 800 9px/1.2 var(--f-display, inherit); letter-spacing: .1em; text-transform: uppercase; }
.cx-eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 700 11px/1 var(--f-display, inherit); letter-spacing: .16em; text-transform: uppercase; color: var(--fg-2, #8D929C); }

/* ---------------- home banner ---------------- */
.main-actions.has-cx::before { display: none; }
.cx-hero-wrap { grid-column: 1 / -1; margin-top: 4px; }
.cx-hero-wrap::after { content: 'Game modes'; display: block; margin-top: 22px; font: 700 11px/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--fg-2); }
.cx-hero { display: grid; grid-template-columns: minmax(250px, 0.75fr) 1.6fr; align-items: center; gap: 20px; padding: 22px 24px; border-radius: 10px; cursor: pointer;
    background: #14161B; border: 1px solid #262A33; transition: border-color .15s; }
.cx-hero:hover { border-color: #3A3F4B; }
.cx-hero-title { margin: 10px 0 6px; font: 800 26px/1.1 var(--f-display, inherit); color: #fff; text-transform: uppercase; letter-spacing: .01em; }
.cx-hero-copy p { margin: 0 0 16px; max-width: 340px; color: var(--fg-1, #C9CCD3); font-size: 13px; line-height: 1.5; }
.cx-hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cx-chip-free, .cx-chip-mine { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border-radius: 6px; border: 1px solid #2B2F39; background: #1A1D24; color: var(--fg-1, #C9CCD3); font: 700 11px/1 var(--f-display, inherit); letter-spacing: .04em; }
.cx-chip-free { cursor: pointer; }
.cx-chip-free b { color: #fff; font-variant-numeric: tabular-nums; }
.cx-chip-free.is-ready { border-color: rgba(46,196,182,.55); color: #7DEBDF; }
.cx-chip-free.is-ready::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #2EC4B6; }
.cx-hero-cases { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.cx-hc { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px 12px; border-radius: 8px; border: 1px solid #23262E; color: #fff; cursor: pointer;
    background: linear-gradient(to top, color-mix(in srgb, var(--cc) 14%, #16181E), #16181E 60%); transition: border-color .15s, transform .15s; }
.cx-hc::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--cc); opacity: .8; }
.cx-hc:hover { border-color: color-mix(in srgb, var(--cc) 55%, #23262E); transform: translateY(-2px); }
.cx-hc img { width: 100%; max-width: 120px; aspect-ratio: 1; object-fit: contain; transition: transform .2s; }
.cx-hc:hover img { transform: scale(1.05); }
.cx-hc-name { font: 700 11px/1 var(--f-display, inherit); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.cx-hc-price { display: inline-flex; align-items: center; gap: 4px; color: #FFD25A; font: 700 12px/1 var(--f-display, inherit); font-variant-numeric: tabular-nums; }
.cx-hc-price .nbc { width: 11px; height: 11px; }
@media (max-width: 900px) {
    .cx-hero { grid-template-columns: 1fr; padding: 16px; }
    .cx-hero-title { font-size: 21px; }
    .cx-hero-cases { display: flex; overflow-x: auto; scrollbar-width: none; }
    .cx-hc { flex: 0 0 104px; }
}

/* ---------------- buttons ---------------- */
.cx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 6px; border: 1px solid #2E323C; background: #1C1F26; color: #fff;
    font: 700 12px/1 var(--f-display, inherit); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: background .12s, border-color .12s; white-space: nowrap; }
.cx-btn:hover:not(:disabled) { background: #252932; border-color: #3A3F4B; }
.cx-btn:disabled { opacity: .45; cursor: not-allowed; }
.cx-btn--hot { border-color: transparent; color: #1A0900; background: var(--orange, #FF6A13); }
.cx-btn--hot:hover:not(:disabled) { background: #FF7D30; border-color: transparent; }
.cx-btn--xl { height: 50px; padding: 0 26px; font-size: 14px; }
.cx-btn--sm { height: 30px; padding: 0 12px; font-size: 11px; }
.cx-sub { display: inline-flex; align-items: center; gap: 4px; padding-left: 10px; margin-left: 2px; border-left: 1px solid currentColor; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.cx-sub .nbc, .cx-bal .nbc, .cx-stage-price .nbc { width: 13px; height: 13px; }
.cx-link { border: 0; background: none; padding: 4px 0; color: var(--fg-2, #8D929C); font: 600 12px/1 var(--f-body, inherit); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.cx-link:hover:not(:disabled) { color: #fff; }
.cx-link:disabled { opacity: .4; cursor: not-allowed; }

/* ---------------- arena ---------------- */
html.cx-lock, html.cx-lock body { overflow: hidden; }
.cx-ov { position: fixed; inset: 0; z-index: 9500; display: none; background: #0E0F13; color: #fff; font-family: var(--f-body, system-ui); }
.cx-ov.open { display: block; }
.cx-fx { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.cx-fx-css { position: absolute; inset: 0; background: linear-gradient(rgba(14,15,19,.25), rgba(14,15,19,.55)), url('/img/cases/arena-bg.webp?v=1') center / cover no-repeat #0E0F13; }
.cfx-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.cx-ov:not([data-view="opening"]) .cfx-canvas { display: none; }
.cx-ui { position: absolute; inset: 0; display: flex; flex-direction: column; }
.cx-top { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-bottom: 1px solid #1F2229; background: rgba(17,18,23,.92); }
.cx-top-title h3 { margin: 3px 0 0; font: 800 18px/1 var(--f-display, inherit); text-transform: uppercase; letter-spacing: .02em; }
.cx-kicker { font: 700 10px/1 var(--f-display, inherit); letter-spacing: .18em; text-transform: uppercase; color: var(--fg-2, #8D929C); }
.cx-top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.cx-bal { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 6px; background: #181A20; border: 1px solid #2A2E37; color: #FFD25A; font: 700 13px/1 var(--f-display, inherit); font-variant-numeric: tabular-nums; }
.cx-x, .cx-back { width: 34px; height: 34px; border-radius: 6px; border: 1px solid #2A2E37; background: #181A20; color: #fff; font-size: 15px; cursor: pointer; }
.cx-back { font-size: 22px; line-height: 1; }
.cx-x:hover, .cx-back:hover { background: #22252D; }
.cx-scroll { position: relative; flex: 1; overflow: auto; overscroll-behavior: contain; }
.cx-loading { margin: auto; display: flex; align-items: center; gap: 10px; color: var(--fg-2, #8D929C); }
.cx-loading span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #2A2E37; border-top-color: var(--orange, #FF6A13); animation: cx-spin .8s linear infinite; }
@keyframes cx-spin { to { transform: rotate(360deg); } }

.cx-list { max-width: 1180px; margin: 0 auto; padding: 8px 22px 40px; }
.cx-sec { margin-top: 20px; }
.cx-sec h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font: 700 12px/1 var(--f-display, inherit); letter-spacing: .16em; text-transform: uppercase; color: var(--fg-1, #C9CCD3); }
.cx-sec h4 span { padding: 2px 7px; border-radius: 4px; background: #23262E; color: #fff; letter-spacing: 0; }
.cx-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.cx-row--paid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.cx-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px 16px; border-radius: 8px; color: #fff; cursor: pointer;
    border: 1px solid #23262E; background: linear-gradient(to top, color-mix(in srgb, var(--cc) 13%, #16181E), #16181E 55%); transition: border-color .15s, transform .15s; }
.cx-card::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; background: var(--cc); opacity: .85; }
.cx-card:hover { border-color: color-mix(in srgb, var(--cc) 55%, #23262E); transform: translateY(-2px); }
.cx-card img { width: 78%; aspect-ratio: 1; object-fit: contain; transition: transform .2s; }
.cx-card:hover img { transform: scale(1.04); }
.cx-card-name { font: 700 13px/1 var(--f-display, inherit); letter-spacing: .06em; text-transform: uppercase; }
.cx-price, .cx-free, .cx-wait { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 4px; font: 700 12px/1 var(--f-display, inherit); font-variant-numeric: tabular-nums; }
.cx-price { background: #0F1014; color: #FFD25A; } .cx-price .nbc { width: 12px; height: 12px; }
.cx-free { background: rgba(46,196,182,.14); color: #7DEBDF; letter-spacing: .1em; }
.cx-wait { background: #0F1014; color: var(--fg-2, #8D929C); }
.cx-card.is-done { opacity: .5; }
.cx-own { position: absolute; top: 8px; right: 8px; padding: 3px 6px; border-radius: 4px; background: var(--orange, #FF6A13); color: #1A0900; font: 800 11px/1 var(--f-display, inherit); }
.cx-guest { margin-top: 18px; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 8px; background: #16181E; border: 1px solid #262A33; }
.cx-fine { margin: 22px 0 0; font-size: 11.5px; color: var(--fg-2, #8D929C); max-width: 720px; }

/* ---------------- case page ---------------- */
.cx-case { max-width: 1180px; margin: 0 auto; padding: 18px 22px 50px; }
.cx-stage { position: relative; display: flex; flex-direction: column; align-items: center; padding: 22px 20px 26px; border-radius: 10px; border: 1px solid #23262E;
    background: radial-gradient(50% 70% at 50% 40%, color-mix(in srgb, var(--cc) 14%, #15171C), #121318 70%); overflow: hidden; }
.cx-stage::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--cc); opacity: .7; }
.cx-stage-head { display: flex; align-items: center; gap: 12px; }
.cx-stage-head h2 { margin: 0; font: 800 24px/1 var(--f-display, inherit); text-transform: uppercase; letter-spacing: .02em; }
.cx-stage-price, .cx-stage-free { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 4px; background: #0F1014; border: 1px solid #262A33; color: #FFD25A; font: 700 13px/1 var(--f-display, inherit); }
.cx-stage-free { color: #7DEBDF; }
.cx-stage-img { width: min(300px, 70vw); aspect-ratio: 1; object-fit: contain; margin: 6px 0 2px; }
.cx-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; max-width: 640px; }
.cx-actions-sec { flex-basis: 100%; display: flex; justify-content: center; gap: 18px; }
.cx-qty { display: inline-flex; padding: 3px; border-radius: 7px; background: #0F1014; border: 1px solid #262A33; }
.cx-qty button { min-width: 44px; height: 42px; border: 0; border-radius: 5px; background: none; color: var(--fg-1, #C9CCD3); font: 700 13px/1 var(--f-display, inherit); cursor: pointer; }
.cx-qty button.on { background: #262A33; color: #fff; }
.cx-qty button:disabled { opacity: .35; cursor: not-allowed; }
.cx-note { flex-basis: 100%; margin: 0; text-align: center; font-size: 12.5px; color: var(--fg-2, #8D929C); }
.cx-note .nbc { width: 12px; height: 12px; vertical-align: -1px; }
.cx-gift { flex-basis: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 10px; border-radius: 8px; background: #0F1014; border: 1px solid #262A33; }
.cx-inp { height: 38px; padding: 0 12px; border-radius: 6px; border: 1px solid #2E323C; background: #16181E; color: #fff; font: inherit; }
#cx-gift-to { flex: 1; min-width: 160px; }
.cx-contents { margin-top: 22px; }
.cx-contents-hd { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.cx-contents-hd h4 { margin: 0; font: 700 12px/1 var(--f-display, inherit); letter-spacing: .16em; text-transform: uppercase; }
.cx-odds { display: flex; flex-wrap: wrap; gap: 6px; }
.cx-odd { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 4px; background: #16181E; border-bottom: 2px solid var(--rc); font: 700 10px/1 var(--f-display, inherit); text-transform: uppercase; letter-spacing: .08em; color: var(--rc); }
.cx-odd b { color: #fff; letter-spacing: 0; }
.cx-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 8px; }
.cx-item { position: relative; border-radius: 6px; overflow: hidden; border: 1px solid #22252D; content-visibility: auto; contain-intrinsic-size: 156px 150px;
    background: linear-gradient(to top, color-mix(in srgb, var(--rc) 16%, #16181E), #16181E 60%); }
.cx-item::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--rc); }
.cx-item-p { position: absolute; top: 6px; right: 6px; z-index: 1; padding: 3px 5px; border-radius: 3px; background: rgba(10,11,14,.82); font: 700 10px/1 var(--f-display, inherit); color: var(--fg-1, #C9CCD3); font-variant-numeric: tabular-nums; }
.cx-item-art { position: relative; height: 84px; display: grid; place-items: center; overflow: hidden; }
.cx-item-txt { display: flex; flex-direction: column; gap: 3px; padding: 4px 9px 10px; }
.cx-item-txt span { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-2, #8D929C); }
.cx-item-txt b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* animated previews stay still in lists (smooth scrolling); they move on the reveal */
.cx-items .cos-anim, .cx-items .cos-anim *, .cx-items .cos-anim::before, .cx-items .cos-anim::after, .cx-track .cos-anim, .cx-track .cos-anim * { animation-play-state: paused !important; }

/* shared art */
.cx-poster, .cx-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cx-bg { position: absolute; inset: 0; } .cx-bg .cos-bg { width: 100%; height: 100%; }
.cx-fr .cos-av-wrap { position: relative; display: block; width: 46px; height: 46px; }
.cx-fr .cos-av { width: 100%; height: 100%; }
.cx-av { display: block; width: 52px; height: 52px; } .cx-av .cos-av { width: 100%; height: 100%; }
.cx-nc { font: 800 16px/1 var(--f-display, inherit); }
.cx-banner { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.62); }
.cx-banner .banner-preview { min-width: 180px; justify-content: center; white-space: nowrap; }
.cx-coins { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #FFD25A; font: 800 15px/1 var(--f-display, inherit); }
.cx-coinstack { display: inline-flex; }
.cx-coinstack .nbc { width: 24px; height: 24px; margin-left: -9px; } .cx-coinstack .nbc:first-child { margin-left: 0; }

/* ---------------- opening ---------------- */
.cx-open { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.cx-open-case img { width: min(340px, 70vw); aspect-ratio: 1; object-fit: contain; animation: cx-charge 2.7s cubic-bezier(.5,0,1,.5) forwards; }
.cx-open.has-fx .cx-open-case { visibility: hidden; }
.cx-open.is-burst .cx-open-case img { animation: cx-pop .45s ease-out forwards; }
.cx-open-hint { font: 700 12px/1 var(--f-display, inherit); letter-spacing: .24em; text-transform: uppercase; color: var(--fg-1, #C9CCD3); }
@keyframes cx-charge { 0% { transform: none; } 20% { transform: rotate(-2deg); } 35% { transform: rotate(2deg); } 50% { transform: scale(1.03) rotate(-3deg); } 65% { transform: scale(1.04) rotate(4deg); } 80% { transform: scale(1.06) rotate(-5deg); } 100% { transform: scale(1.1); } }
@keyframes cx-pop { to { transform: scale(1.6); opacity: 0; } }

/* reels: one row per case, Key-Drop style frame */
.cx-reel-wrap { margin: auto 0; display: flex; flex-direction: column; gap: 12px; padding: 0 0; }
.cx-reel-title { text-align: center; font: 700 12px/1 var(--f-display, inherit); letter-spacing: .2em; text-transform: uppercase; color: var(--fg-1, #C9CCD3); margin-bottom: 4px; }
.cx-reel { position: relative; height: 196px; margin: 0 max(16px, calc(50% - 760px)); overflow: hidden; border-radius: 10px; border: 1px solid #2A2E37; background: #121318; }
.cx-reel-wrap.n2 .cx-reel, .cx-reel-wrap.n3 .cx-reel { height: 164px; }
.cx-track { position: absolute; left: 0; top: 12px; display: flex; gap: 8px; will-change: transform; }
.cx-rc { position: relative; flex: none; width: 172px; height: 172px; border-radius: 8px; overflow: hidden; display: flex; flex-direction: column;
    background: linear-gradient(to top, color-mix(in srgb, var(--rc) 22%, #181A20), #181A20 65%); border: 1px solid #23262E; }
.cx-reel-wrap.n2 .cx-rc, .cx-reel-wrap.n3 .cx-rc { width: 140px; height: 140px; }
.cx-rc::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--rc); }
.cx-rc-art { position: relative; flex: 1; display: grid; place-items: center; overflow: hidden; }
.cx-rc-name { padding: 6px 10px 10px; font: 700 12px/1.1 var(--f-display, inherit); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-marker { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--orange, #FF6A13); z-index: 2; }
.cx-marker::before, .cx-marker::after { content: ''; position: absolute; left: 50%; margin-left: -7px; border: 7px solid transparent; }
.cx-marker::before { top: 0; border-top-color: var(--orange, #FF6A13); } .cx-marker::after { bottom: 0; border-bottom-color: var(--orange, #FF6A13); }
.cx-reel::before, .cx-reel::after { content: ''; position: absolute; top: 0; bottom: 0; width: 12%; z-index: 1; pointer-events: none; }
.cx-reel::before { left: 0; background: linear-gradient(90deg, #121318, transparent); } .cx-reel::after { right: 0; background: linear-gradient(-90deg, #121318, transparent); }
.cx-reel.is-landed .cx-rc:not(.is-win) { opacity: .3; transition: opacity .4s; }
.cx-rc.is-win { border-color: var(--rc); box-shadow: 0 0 0 1px var(--rc), 0 0 24px color-mix(in srgb, var(--rc) 45%, transparent); }

/* ---------------- reveal ---------------- */
.cx-reveal { position: relative; margin: auto; display: flex; flex-direction: column; align-items: center; padding: 20px; max-width: 100%; }
.cx-reveal::before { content: ''; position: absolute; left: 50%; top: 50%; width: 1100px; height: 800px; margin: -400px 0 0 -550px; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(10,11,14,.85), rgba(10,11,14,.5) 60%, transparent); }
.cx-rv-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.cx-rv-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; animation: cx-rv-in .6s cubic-bezier(.2,1.3,.4,1) both; }
.cx-rv-item:nth-child(2) { animation-delay: .12s; } .cx-rv-item:nth-child(3) { animation-delay: .24s; }
.cx-rv-rarity { padding: 4px 10px; border-radius: 4px; background: color-mix(in srgb, var(--rc) 18%, #121318); color: var(--rc2); font: 800 11px/1 var(--f-display, inherit); letter-spacing: .3em; text-transform: uppercase; border-bottom: 2px solid var(--rc); }
.cx-rv-card { position: relative; width: min(420px, 82vw); aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; display: grid; place-items: center;
    background: linear-gradient(to top, color-mix(in srgb, var(--rc) 28%, #15171C), #15171C 70%); border: 1px solid var(--rc); box-shadow: 0 0 40px color-mix(in srgb, var(--rc) 35%, transparent); }
.cx-reveal.n2 .cx-rv-card, .cx-reveal.n3 .cx-rv-card { width: min(280px, 82vw); }
.cx-rv-art { position: absolute; inset: 0; display: grid; place-items: center; }
.cx-rv-art .cx-banner { transform: translate(-50%, -50%) scale(1.1); }
.cx-reveal.n2 .cx-rv-art .cx-banner, .cx-reveal.n3 .cx-rv-art .cx-banner { transform: translate(-50%, -50%) scale(.8); }
.cx-rv-art .cx-fr .cos-av-wrap { width: 96px; height: 96px; }
.cx-rv-art .cx-av { width: 110px; height: 110px; }
.cx-rv-art .cx-nc { font-size: 30px; }
.cx-rv-art .cx-coins { font-size: 34px; } .cx-rv-art .cx-coinstack .nbc { width: 48px; height: 48px; margin-left: -18px; } .cx-rv-art .cx-coinstack .nbc:first-child { margin-left: 0; }
.cx-rv-shine { position: absolute; inset: -50%; background: linear-gradient(115deg, transparent 44%, rgba(255,255,255,.18) 50%, transparent 56%); animation: cx-shine 3s ease-in-out .8s infinite; pointer-events: none; }
@keyframes cx-shine { 0% { transform: translateX(-60%); } 40%, 100% { transform: translateX(60%); } }
.cx-rv-name { margin: 4px 0 0; font: 800 26px/1.05 var(--f-display, inherit); text-transform: uppercase; }
.cx-reveal.n2 .cx-rv-name, .cx-reveal.n3 .cx-rv-name { font-size: 18px; }
.cx-rv-sub { color: var(--fg-2, #8D929C); font-size: 12.5px; }
.cx-rv-dup { padding: 6px 10px; border-radius: 5px; background: #16181E; border: 1px solid #2A2E37; color: #FFE6A6; font-size: 12.5px; }
.cx-rv-dup .nbc { width: 12px; height: 12px; vertical-align: -2px; }
.cx-rv-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; animation: cx-rv-in .5s both .4s; }
@keyframes cx-rv-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.cx-reveal.t5 .cx-rv-card { animation: cx-mythic-glow 2.2s ease-in-out infinite 1s; }
@keyframes cx-mythic-glow { 50% { box-shadow: 0 0 70px color-mix(in srgb, var(--rc) 60%, transparent); } }

/* inventory tab */
.cx-inv { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.cx-inv-grid { width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.cx-inv-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px; border-radius: 8px; border: 1px solid #23262E; background: linear-gradient(to top, color-mix(in srgb, var(--cc) 13%, #16181E), #16181E 60%); }
.cx-inv-card img { width: 110px; aspect-ratio: 1; object-fit: contain; }
.cx-inv-card b { font: 700 13px/1 var(--f-display, inherit); text-transform: uppercase; letter-spacing: .05em; }
.cx-inv-from { font-size: 11px; color: var(--fg-2, #8D929C); }

.cx-toast { position: fixed; left: 50%; bottom: 28px; z-index: 9900; transform: translate(-50%, 20px); padding: 11px 16px; border-radius: 7px; background: #181A20; border: 1px solid #2A2E37; color: #fff; font-size: 13.5px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s; }
.cx-toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
    .cx-top { padding: 10px 12px; }
    .cx-list, .cx-case { padding-left: 12px; padding-right: 12px; }
    .cx-row, .cx-row--paid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .cx-btn--xl { width: 100%; }
    .cx-reel { height: 146px; margin: 0 8px; } .cx-track { top: 10px; } .cx-rc, .cx-reel-wrap.n2 .cx-rc, .cx-reel-wrap.n3 .cx-rc { width: 118px; height: 124px; } .cx-reel-wrap.n2 .cx-reel, .cx-reel-wrap.n3 .cx-reel { height: 146px; } .cx-rc-name { font-size: 10px; }
    .cx-items { grid-template-columns: repeat(2, 1fr); }
    .cx-reveal.n2 .cx-rv-card, .cx-reveal.n3 .cx-rv-card { width: 42vw; }
    .cx-reveal.n3 .cx-rv-grid { gap: 10px; }
}

/* ---------------- level rewards (levelrewards.js) ---------------- */
.lr-ov { position: fixed; inset: 0; z-index: 9600; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(5,6,9,.72); }
.lr-ov.open { display: flex; }
.lr { width: min(680px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 10px; background: #14161B; border: 1px solid #262A33; color: #fff; font-family: var(--f-body, system-ui); }
.lr-hd { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; background: #14161B; border-bottom: 1px solid #22252D; }
.lr-hd h3 { margin: 4px 0 0; font: 800 18px/1 var(--f-display, inherit); text-transform: uppercase; }
.lr-list { padding: 10px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.lr-row { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 12px; padding: 10px; border-radius: 8px; background: #181A20; border: 1px solid #23262E; }
.lr-row.is-ready { border-color: rgba(255,106,19,.6); }
.lr-row.is-claimed { opacity: .55; }
.lr-lv { display: flex; flex-direction: column; align-items: center; }
.lr-lv small { font: 700 9px/1 var(--f-display, inherit); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2, #8D929C); }
.lr-lv b { font: 800 24px/1.1 var(--f-display, inherit); }
.lr-items { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.lr-it { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 6px; background: #0F1014; font-size: 12.5px; max-width: 100%; }
.lr-it span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-it--coins { padding: 8px 12px; color: #FFD25A; font: 700 14px/1 var(--f-display, inherit); }
.lr-it--coins .nbc { width: 14px; height: 14px; }
.lr-art { position: relative; flex: none; width: 54px; height: 40px; border-radius: 4px; overflow: hidden; display: grid; place-items: center; background: #1C1F26; }
.lr-art img { width: 100%; height: 100%; object-fit: contain; } .lr-art img.lr-cover { object-fit: cover; }
.lr-art .cos-art, .lr-art .cos-bg { width: 100%; height: 100%; display: block; }
.lr-banner { transform: scale(.32); } .lr-title { font-size: 9px; padding: 2px; text-align: center; }
.lr-done { font: 700 11px/1 var(--f-display, inherit); color: #6BEA97; text-transform: uppercase; letter-spacing: .1em; }
.lr-lock { font: 700 11px/1 var(--f-display, inherit); color: var(--fg-2, #8D929C); text-transform: uppercase; letter-spacing: .08em; }
.lr-empty { padding: 20px; color: var(--fg-2, #8D929C); text-align: center; }
@media (max-width: 560px) { .lr-row { grid-template-columns: 48px 1fr; } .lr-st { grid-column: 1 / -1; } }

/* case challenges on the Cases page */
.cx-chal { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.cx-ch { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; padding: 12px; border-radius: 8px; border: 1px solid #262A33; background: rgba(22,24,30,.92); }
.cx-ch img { width: 64px; height: 64px; object-fit: contain; }
.cx-ch b { display: block; font: 700 13px/1.2 var(--f-display, inherit); text-transform: uppercase; }
.cx-ch p { margin: 4px 0 8px; font-size: 12px; color: var(--fg-2, #8D929C); }
.cx-ch-bar { position: relative; height: 6px; border-radius: 3px; background: #0F1014; overflow: hidden; }
.cx-ch-bar i { position: absolute; inset: 0 auto 0 0; background: var(--orange, #FF6A13); border-radius: 3px; }
.cx-ch small { display: block; margin-top: 5px; font-size: 11px; color: var(--fg-1, #C9CCD3); font-variant-numeric: tabular-nums; }
