/* BOMBZONE design system — one stylesheet, no inline styles.
   Order: fonts · tokens · base · layout · components · navigation · pages.
   Selectors stay single-class where possible so nothing cancels anything. */

/* ── fonts ─────────────────────────────────────────────────────────────── */
@font-face { font-family: 'Unbounded'; src: url('/static/fonts/unbounded.ttf') format('truetype'); font-weight: 200 900; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/static/fonts/manrope.ttf') format('truetype'); font-weight: 200 800; font-display: swap; }

/* ── tokens ────────────────────────────────────────────────────────────── */
:root {
  color-scheme: dark;
  --void: #07090E;
  --obsidian: #0D111A;
  --slab: #121827;
  --slab-2: #19213A;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .15);
  --ink: #EEF1F7;
  --ink-2: #BAC2D2;
  --mute: #7F889C;
  --lime: #D4FF3F;
  --lime-ink: #0A0F00;
  --lime-soft: rgba(212, 255, 63, .12);
  --gold: #F5B700;
  --gold-soft: rgba(245, 183, 0, .14);
  --emerald: #10B981;
  --emerald-soft: rgba(16, 185, 129, .14);
  --danger: #FF5C5C;
  --common: #8E97A8;
  --rare: #5AA9FF;
  --epic: #B57BFF;
  --legendary: #F5B700;

  --display: 'Unbounded', 'Arial Black', system-ui, sans-serif;
  --ui: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* Modular scale 1.25 from a 16px body. */
  --t-xs: .75rem; --t-sm: .875rem; --t-md: 1rem; --t-lg: 1.25rem; --t-xl: 1.5625rem;
  --t-2xl: 1.953rem; --t-3xl: 2.441rem; --t-4xl: 3.052rem; --t-5xl: 3.815rem;

  --r-xl: 28px; --r-lg: 20px; --r-md: 14px; --r-sm: 10px; --r-pill: 999px;
  --gap: 16px;
  --wrap: 1280px;
  --nav-h: 68px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow-lift: 0 24px 60px -24px rgba(0, 0, 0, .7);
}

/* ── base ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0; min-height: 100vh; background-color: var(--void); color: var(--ink);
  font: 500 var(--t-md)/1.55 var(--ui); font-feature-settings: 'tnum' 0;
  background-image:
    radial-gradient(1100px 620px at 12% -8%, rgba(212, 255, 63, .075), transparent 60%),
    radial-gradient(900px 700px at 100% 18%, rgba(16, 185, 129, .07), transparent 62%),
    radial-gradient(800px 600px at 50% 110%, rgba(245, 183, 0, .05), transparent 60%),
    linear-gradient(180deg, var(--void) 0%, var(--obsidian) 55%, var(--void) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(var(--t-2xl), 5vw, var(--t-5xl)); }
h2 { font-size: clamp(var(--t-xl), 2.6vw, var(--t-2xl)); }
h3 { font-size: var(--t-lg); letter-spacing: -.01em; }
p { margin: 0; text-wrap: pretty; }
::selection { background: var(--lime); color: var(--lime-ink); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }
.muted { color: var(--mute); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.is-locked, .is-locked body { overflow: hidden; }

/* ── layout ────────────────────────────────────────────────────────────── */
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.page { display: grid; gap: 56px; padding-block: calc(var(--nav-h) + 32px) 80px; }
.section { display: grid; gap: 22px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-head p { color: var(--mute); max-width: 62ch; margin-top: 8px; }
.lede { color: var(--ink-2); font-size: var(--t-lg); max-width: 58ch; }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; }
.span-12 { grid-column: 1 / -1; }
.stack { display: grid; gap: 12px; align-content: start; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ── tile: the bento surface ──────────────────────────────────────────── */
.tile {
  position: relative; isolation: isolate; border-radius: var(--r-lg); padding: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012)), var(--obsidian);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.tile--xl { border-radius: var(--r-xl); padding: clamp(24px, 4vw, 44px); }
.tile--flush { padding: 0; }
.tile-title { font-family: var(--display); font-size: var(--t-lg); font-weight: 700; letter-spacing: -.01em; }
.tile-note { color: var(--mute); font-size: var(--t-sm); }
/* Pointer-following glow (JS writes --mx/--my); purely decorative. */
.glow::after {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s var(--ease);
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(212, 255, 63, .10), transparent 45%);
}
.glow:hover::after { opacity: 1; }
.glow:hover { border-color: var(--line-strong); }

/* ── buttons ──────────────────────────────────────────────────────────── */
.btn {
  --bg: rgba(255, 255, 255, .06); --fg: var(--ink); --bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 20px;
  border-radius: var(--r-md); border: 1px solid var(--bd); background: var(--bg); color: var(--fg);
  font-weight: 700; font-size: var(--t-md); letter-spacing: -.005em; white-space: nowrap;
  transition: transform .18s var(--ease), background-color .18s, border-color .18s, box-shadow .25s;
}
.btn:hover { background: rgba(255, 255, 255, .1); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn--primary { --bg: var(--lime); --fg: var(--lime-ink); --bd: transparent; box-shadow: 0 10px 30px -12px rgba(212, 255, 63, .6); }
.btn--primary:hover { background: #E1FF73; box-shadow: 0 14px 38px -12px rgba(212, 255, 63, .75); }
.btn--gold { --bg: var(--gold); --fg: #1A1200; --bd: transparent; box-shadow: 0 10px 30px -12px rgba(245, 183, 0, .55); }
.btn--gold:hover { background: #FFC933; }
.btn--ghost { --bg: transparent; --bd: transparent; color: var(--ink-2); padding: 0 12px; }
.btn--ghost:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: var(--t-sm); border-radius: var(--r-sm); }
.btn--lg { min-height: 56px; padding: 0 28px; font-size: var(--t-lg); border-radius: var(--r-lg); }
.btn--wide { width: 100%; }
.btn .coin { width: 20px; height: 20px; }
.link { color: var(--lime); font-weight: 700; border-bottom: 1px solid transparent; transition: border-color .2s; }
.link:hover { border-color: currentColor; }

/* ── chips, pills, badges ─────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 12px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line); font-size: var(--t-sm); font-weight: 700; color: var(--ink-2);
  transition: background-color .18s, color .18s, border-color .18s;
}
a.chip:hover, button.chip:hover { background: var(--lime-soft); color: var(--lime); border-color: rgba(212, 255, 63, .35); }
.chip img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; background: var(--slab); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-pill); font-size: var(--t-xs); font-weight: 800; letter-spacing: .02em; background: rgba(255, 255, 255, .07); color: var(--ink-2); }
.pill--lime { background: var(--lime-soft); color: var(--lime); }
.pill--gold { background: var(--gold-soft); color: var(--gold); }
.pill--emerald { background: var(--emerald-soft); color: var(--emerald); }
.pill--epic { background: rgba(181, 123, 255, .15); color: var(--epic); }
.pill--rare { background: rgba(90, 169, 255, .15); color: var(--rare); }
.pill--common { background: rgba(142, 151, 168, .14); color: var(--common); }
.pill--legendary { background: var(--gold-soft); color: var(--legendary); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mute); flex: none; }
.dot--on { background: var(--emerald); box-shadow: 0 0 0 4px rgba(16, 185, 129, .16); }
.dot--live { background: var(--lime); box-shadow: 0 0 0 4px rgba(212, 255, 63, .15); }

/* Currency: gold coin + tabular number, always together. */
.bz { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bz .coin { width: 18px; height: 18px; flex: none; }
.coin { object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .4)); }
.rub { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── form controls (no native look anywhere) ──────────────────────────── */
.field { display: grid; gap: 8px; }
.field-label { font-size: var(--t-sm); font-weight: 700; color: var(--ink-2); }
.field-hint { font-size: var(--t-xs); color: var(--mute); }
.input {
  width: 100%; min-height: 48px; padding: 0 16px; border-radius: var(--r-md); border: 1px solid var(--line-strong);
  background: rgba(7, 9, 14, .6); color: var(--ink); font-weight: 600; outline: none; appearance: none;
  transition: border-color .18s, box-shadow .18s, background-color .18s;
}
.input::placeholder { color: #5B6478; }
.input:hover { border-color: rgba(255, 255, 255, .22); }
.input:focus { border-color: var(--lime); box-shadow: 0 0 0 4px rgba(212, 255, 63, .12); background: rgba(7, 9, 14, .85); }
.input--code { font-family: var(--display); font-size: var(--t-xl); letter-spacing: .12em; text-align: center; text-transform: uppercase; }
.input[type=search]::-webkit-search-cancel-button { appearance: none; }
.form-error { color: var(--danger); font-size: var(--t-sm); font-weight: 700; min-height: 1.2em; }
.form-grid { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }

/* Custom select (listbox) */
.select { position: relative; }
.select-trigger {
  width: 100%; min-height: 48px; padding: 0 44px 0 16px; border-radius: var(--r-md); border: 1px solid var(--line-strong);
  background: rgba(7, 9, 14, .6); text-align: left; font-weight: 700; display: flex; align-items: center; gap: 10px;
  transition: border-color .18s, box-shadow .18s;
}
.select-trigger::after {
  content: ''; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); transition: transform .2s var(--ease);
}
.select[data-open] .select-trigger { border-color: var(--lime); box-shadow: 0 0 0 4px rgba(212, 255, 63, .12); }
.select[data-open] .select-trigger::after { transform: translateY(4px) rotate(225deg); }
.select-trigger:disabled { opacity: .5; cursor: not-allowed; }
.select-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-value.is-placeholder { color: #5B6478; }
.select-list {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px); max-height: 300px; overflow: auto; margin: 0; padding: 6px;
  list-style: none; border-radius: var(--r-md); border: 1px solid var(--line-strong);
  background: rgba(18, 24, 39, .96); backdrop-filter: blur(16px); box-shadow: var(--shadow-lift);
  transform-origin: top; animation: pop .16s var(--ease);
}
.select-option { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); font-weight: 600; cursor: pointer; }
.select-option[aria-selected=true] { color: var(--lime); }
.select-option[aria-selected=true]::after { content: ''; width: 6px; height: 11px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-right: 4px; }
.select-option.is-active { background: rgba(255, 255, 255, .07); }
.select-option[aria-disabled=true] { opacity: .4; cursor: not-allowed; }
.select-option small { color: var(--mute); font-weight: 600; }

/* Switch (role=switch button) */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: rgba(255, 255, 255, .03); text-align: left; transition: border-color .2s, background-color .2s; }
.switch:hover { border-color: var(--line-strong); }
.switch-copy { display: grid; gap: 2px; }
.switch-copy strong { font-weight: 700; }
.switch-copy small { color: var(--mute); font-size: var(--t-xs); }
.switch-track { position: relative; flex: none; width: 48px; height: 28px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .12); transition: background-color .25s var(--ease); }
.switch-track::after { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); box-shadow: 0 2px 6px rgba(0, 0, 0, .4); transition: transform .25s var(--ease), background-color .25s; }
.switch[aria-checked=true] { border-color: rgba(212, 255, 63, .35); background: var(--lime-soft); }
.switch[aria-checked=true] .switch-track { background: var(--lime); }
.switch[aria-checked=true] .switch-track::after { transform: translateX(20px); background: var(--lime-ink); }

/* Segmented control / tabs */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--r-md); background: rgba(255, 255, 255, .045); border: 1px solid var(--line); }
.seg-item { position: relative; min-height: 38px; padding: 0 16px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-2); font-weight: 700; font-size: var(--t-sm); white-space: nowrap; transition: color .18s, background-color .18s; }
.seg-item:hover { color: var(--ink); }
.seg-item[aria-selected=true], .seg-item[aria-pressed=true] { background: var(--ink); color: var(--void); }
.seg-item:disabled { opacity: .4; cursor: not-allowed; }
.seg-item .count { margin-left: 6px; font-variant-numeric: tabular-nums; opacity: .6; }
.seg--scroll { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.seg--scroll::-webkit-scrollbar { display: none; }

/* Swatches for colors */
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; background: var(--c); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .35); transition: transform .15s var(--ease), border-color .15s; }
.swatch:hover { transform: scale(1.08); }
.swatch[aria-pressed=true] { border-color: var(--ink); }

/* ── progress bars ────────────────────────────────────────────────────── */
.bars { display: grid; gap: 14px; }
.bar-row { display: grid; gap: 6px; }
.bar-head { display: flex; justify-content: space-between; gap: 12px; font-size: var(--t-sm); font-weight: 700; }
.bar-head span:last-child { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.bar { height: 8px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .07); overflow: hidden; }
.bar-fill { height: 100%; width: var(--w, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--emerald), var(--lime)); transform-origin: left; animation: grow .9s var(--ease) both; }
.bar-fill--danger { background: linear-gradient(90deg, #FF8A5C, var(--danger)); }
.bar-fill--gold { background: linear-gradient(90deg, #FF9F1A, var(--gold)); }

/* ── table ────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--obsidian); }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th { padding: 14px 16px; text-align: left; font-size: var(--t-xs); font-weight: 800; color: var(--mute); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, .05); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .15s; }
.table tbody tr:hover { background: rgba(255, 255, 255, .03); }
.table .is-me { background: var(--lime-soft); }
.table td.right, .table th.right { text-align: right; }
.table-empty { padding: 32px 16px; text-align: center; color: var(--mute); }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who img { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; background: var(--slab); flex: none; }
.who strong { display: block; font-weight: 800; }
.who small { color: var(--mute); }
.place { font-family: var(--display); font-weight: 700; color: var(--mute); }
.outcome { font-weight: 800; }
.outcome--win { color: var(--emerald); } .outcome--loss { color: var(--danger); }

/* ── item art and cards ───────────────────────────────────────────────── */
.art { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: var(--r-md); background: radial-gradient(circle at 50% 60%, var(--halo, rgba(255, 255, 255, .06)), transparent 68%); }
.art img { width: 82%; height: 82%; object-fit: contain; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .55)); transition: transform .4s var(--ease); }
.art[data-rarity=rare] { --halo: rgba(90, 169, 255, .22); }
.art[data-rarity=epic] { --halo: rgba(181, 123, 255, .24); }
.art[data-rarity=legendary] { --halo: rgba(245, 183, 0, .26); }

.card {
  position: relative; isolation: isolate; display: grid; gap: 12px; align-content: start; padding: 16px; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .01)), var(--obsidian);
  text-align: left; transition: border-color .25s, box-shadow .3s var(--ease), transform .3s var(--ease);
}
button.card { width: 100%; }
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-lift); }
.card:hover .art img { transform: translateY(-4px) scale(1.04); }
.card[aria-current=true], .card.is-selected { border-color: var(--lime); box-shadow: 0 0 0 1px var(--lime), 0 20px 50px -24px rgba(212, 255, 63, .45); }
.card-name { font-weight: 800; font-size: var(--t-md); line-height: 1.25; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.card-desc { color: var(--mute); font-size: var(--t-sm); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card[data-rarity=rare] { --edge: var(--rare); }
.card[data-rarity=epic] { --edge: var(--epic); }
.card[data-rarity=legendary] { --edge: var(--legendary); }
.card[data-rarity]::before { content: ''; position: absolute; left: 16px; right: 16px; top: 0; height: 2px; border-radius: 0 0 2px 2px; background: var(--edge, transparent); opacity: .9; }
.card-badge { position: absolute; top: 14px; left: 14px; z-index: 2; }
.card-owned { position: absolute; top: 14px; right: 14px; z-index: 2; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--gap); }
.grid-cards--sm { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* 3D tilt (JS writes --rx/--ry) */
.tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d; will-change: transform; }
.tilt .art { transform: translateZ(30px); }

/* ── modal, drawer, toast ─────────────────────────────────────────────── */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(4, 6, 10, .58); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); animation: fade .2s var(--ease); }
.modal {
  position: fixed; z-index: 81; left: 50%; top: 50%; width: min(100% - 32px, 480px); max-height: calc(100vh - 48px); overflow: auto;
  transform: translate(-50%, -50%); padding: 28px; border-radius: var(--r-xl); border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015)), var(--slab); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .9);
  animation: rise .28s var(--ease);
}
.modal--wide { width: min(100% - 32px, 620px); }
.modal h2 { font-size: var(--t-xl); }
.modal-body { display: grid; gap: 16px; margin-top: 12px; color: var(--ink-2); }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.modal-actions .btn { flex: 1 1 160px; }
.modal-close, .drawer-close { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); display: grid; place-items: center; }
.modal-close::before, .modal-close::after, .drawer-close::before, .drawer-close::after { content: ''; position: absolute; width: 14px; height: 2px; background: var(--ink-2); border-radius: 2px; transform: rotate(45deg); }
.modal-close::after, .drawer-close::after { transform: rotate(-45deg); }
.drawer {
  position: fixed; z-index: 81; top: 0; right: 0; bottom: 0; width: min(100%, 460px); display: grid; grid-template-rows: auto 1fr auto; overflow: hidden;
  border-left: 1px solid var(--line-strong); background: linear-gradient(180deg, rgba(255, 255, 255, .04), transparent 30%), var(--slab);
  box-shadow: -40px 0 100px -40px rgba(0, 0, 0, .9); animation: slide-in .32s var(--ease);
}
.drawer-head { padding: 24px 24px 0; position: relative; }
.drawer-body { overflow: auto; padding: 20px 24px; display: grid; gap: 18px; align-content: start; }
.drawer-foot { padding: 18px 24px 24px; border-top: 1px solid var(--line); background: rgba(7, 9, 14, .35); display: grid; gap: 12px; }
.drawer-art { width: 180px; margin: 4px auto 0; }
.summary { display: grid; gap: 8px; font-size: var(--t-sm); }
.summary div { display: flex; justify-content: space-between; gap: 12px; }
.summary dt, .summary span:first-child { color: var(--mute); }
.summary strong { font-variant-numeric: tabular-nums; }
.summary .total { font-size: var(--t-lg); color: var(--ink); padding-top: 8px; border-top: 1px dashed var(--line-strong); }

.toasts { position: fixed; z-index: 100; right: 16px; bottom: 16px; display: grid; gap: 10px; width: min(100% - 32px, 380px); pointer-events: none; }
.toast {
  pointer-events: auto; display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 14px 16px; border-radius: var(--r-md);
  border: 1px solid var(--line-strong); background: rgba(18, 24, 39, .94); backdrop-filter: blur(16px); box-shadow: var(--shadow-lift);
  font-weight: 600; font-size: var(--t-sm); animation: toast-in .3s var(--ease);
}
.toast::before { content: ''; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 4px rgba(16, 185, 129, .18); }
.toast--error::before { background: var(--danger); box-shadow: 0 0 0 4px rgba(255, 92, 92, .18); }
.toast--leaving { animation: toast-out .25s var(--ease) forwards; }

.skeleton { border-radius: var(--r-lg); background: linear-gradient(90deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .07), rgba(255, 255, 255, .03)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; min-height: 120px; }
.empty { display: grid; gap: 10px; justify-items: start; padding: 28px; border-radius: var(--r-lg); border: 1px dashed var(--line-strong); color: var(--ink-2); }
.empty strong { font-family: var(--display); font-size: var(--t-lg); color: var(--ink); }

/* Scroll reveal: only blocks that start below the fold wait (no flash). */
.reveal { transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: var(--delay, 0s); }
.reveal.is-pending { opacity: 0; transform: translateY(18px); }

/* ── navigation ───────────────────────────────────────────────────────── */
.nav { position: fixed; z-index: 60; inset: 0 0 auto; height: var(--nav-h); border-bottom: 1px solid transparent; transition: background-color .3s, border-color .3s, backdrop-filter .3s; }
.nav.is-scrolled { background: rgba(7, 9, 14, .9); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); border-color: var(--line); }
.nav-inner { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 6px; flex: none; }
.brand-logo { display: block; width: 54px; height: 54px; object-fit: contain; transition: filter .28s var(--ease), transform .28s var(--ease); }
.brand:is(:hover, :focus-visible) .brand-logo { transform: scale(1.06); filter: drop-shadow(0 0 7px rgba(212, 255, 63, .56)); }
.brand-word { font-family: var(--display); font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; }
.brand-word b { color: var(--lime); font-weight: 800; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link { position: relative; padding: 10px 14px; border-radius: var(--r-sm); font-weight: 700; font-size: var(--t-sm); color: var(--ink-2); transition: color .18s, background-color .18s; }
.nav-link:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
.nav-link[aria-current=page] { color: var(--ink); }
.nav-link[aria-current=page]::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--lime); box-shadow: 0 0 12px rgba(212, 255, 63, .8); }
.nav-search { position: relative; flex: 1 1 auto; max-width: 340px; margin-left: auto; }
.nav-search .input { min-height: 42px; padding-left: 40px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .05); border-color: var(--line); font-size: var(--t-sm); }
.nav-search::before { content: ''; position: absolute; left: 16px; top: 50%; width: 11px; height: 11px; margin-top: -8px; border: 2px solid var(--mute); border-radius: 50%; pointer-events: none; }
.nav-search::after { content: ''; position: absolute; left: 27px; top: 50%; width: 6px; height: 2px; margin-top: 3px; background: var(--mute); transform: rotate(45deg); pointer-events: none; }
.search-results { position: absolute; z-index: 70; top: calc(100% + 8px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: rgba(18, 24, 39, .97); backdrop-filter: blur(16px); box-shadow: var(--shadow-lift); animation: pop .16s var(--ease); }
.search-option { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; }
.search-option.is-active { background: rgba(255, 255, 255, .07); }
.search-option img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; background: var(--slab); }
.search-option strong { display: block; font-weight: 800; font-size: var(--t-sm); }
.search-option small { color: var(--mute); font-size: var(--t-xs); font-variant-numeric: tabular-nums; }
.search-empty { padding: 12px; color: var(--mute); font-size: var(--t-sm); }
.nav-account { display: flex; align-items: center; gap: 8px; flex: none; }
.balance { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px 0 8px; border-radius: var(--r-pill); background: var(--gold-soft); border: 1px solid rgba(245, 183, 0, .25); color: var(--gold); font-weight: 800; font-variant-numeric: tabular-nums; transition: background-color .2s; }
.balance:hover { background: rgba(245, 183, 0, .22); }
.balance .coin { width: 26px; height: 26px; }
.balance.is-bumped { animation: bump .6s var(--ease); }
.avatar { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; border: 2px solid var(--line-strong); background: var(--slab); display: grid; place-items: center; transition: border-color .2s; }
.avatar:hover { border-color: var(--lime); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.menu-btn { display: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); position: relative; }
.menu-btn span, .menu-btn::before, .menu-btn::after { content: ''; position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .25s var(--ease), opacity .2s; }
.menu-btn::before { top: 14px; } .menu-btn span { top: 20px; } .menu-btn::after { top: 26px; }
.menu-btn[aria-expanded=true]::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded=true] span { opacity: 0; }
.menu-btn[aria-expanded=true]::after { transform: translateY(-6px) rotate(-45deg); }

.footer { border-top: 1px solid var(--line); padding-block: 36px 44px; color: var(--mute); font-size: var(--t-sm); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--ink); }

/* ── home ─────────────────────────────────────────────────────────────── */
.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.hero-title { font-size: clamp(2.2rem, 4.6vw, 4.4rem); font-weight: 800; letter-spacing: -.035em; line-height: .98; }
.hero-title span { display: block; color: var(--ink-2); font-weight: 600; }
.hero-copy { display: grid; gap: 22px; align-content: start; }
.connect { display: grid; gap: 14px; padding: 18px; border-radius: var(--r-lg); background: rgba(7, 9, 14, .55); border: 1px solid var(--line); }
.connect-address { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.connect-host { font-family: var(--display); font-weight: 700; font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -.02em; }
.connect-port { font-family: var(--display); font-weight: 600; font-size: clamp(1.1rem, 2.2vw, 1.4rem); color: var(--lime); font-variant-numeric: tabular-nums; }
.copy-btn.is-done { --bg: var(--emerald); --fg: #02140D; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; display: grid; gap: 4px; padding: 12px; border-radius: var(--r-md); background: rgba(255, 255, 255, .03); font-size: var(--t-sm); color: var(--ink-2); }
.steps li::before { content: counter(step); font-family: var(--display); font-weight: 700; color: var(--lime); font-size: var(--t-sm); }
.steps b { color: var(--ink); font-weight: 800; }

.hero-copy { min-height: 460px; overflow: hidden; }
.hero-copy > :not(.hero-art) { position: relative; z-index: 1; }
.hero-copy .hero-title, .hero-copy .lede { max-width: 62%; }
.hero-art {
  position: absolute; z-index: 0; right: -4%; top: 6%; width: min(46%, 420px); height: auto; pointer-events: none;
  filter: drop-shadow(0 40px 50px rgba(0, 0, 0, .65)) drop-shadow(0 0 60px rgba(212, 255, 63, .18));
  transform: rotate(6deg); animation: hover-float 7s ease-in-out infinite;
}
.hero-copy::before { content: ''; position: absolute; z-index: 0; right: -10%; top: -10%; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(212, 255, 63, .16), transparent 62%); pointer-events: none; }
@keyframes hover-float { 50% { transform: rotate(4deg) translateY(-12px); } }
.online { display: grid; gap: 18px; align-content: space-between; min-height: 100%; }
.online-count { font-family: var(--display); font-size: clamp(3.5rem, 8vw, 6rem); font-weight: 800; line-height: .9; letter-spacing: -.05em; font-variant-numeric: tabular-nums; color: var(--ink); }
.online-label { color: var(--ink-2); font-weight: 700; }
.online-roles { display: grid; gap: 10px; }
.online-role { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; font-size: var(--t-sm); font-weight: 700; }
.online-role .bar { grid-column: 1 / -1; height: 6px; }

/* The fuse: season time as a burning cord. */
.fuse { position: relative; display: grid; gap: 14px; }
.fuse-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.fuse-season { font-family: var(--display); font-weight: 700; font-size: var(--t-lg); }
.fuse-clock { display: flex; gap: 14px; font-variant-numeric: tabular-nums; }
.fuse-clock div { display: grid; justify-items: center; min-width: 52px; }
.fuse-clock b { font-family: var(--ui); font-weight: 800; font-size: var(--t-2xl); line-height: 1; letter-spacing: -.02em; }
.fuse-clock small { color: var(--mute); font-size: var(--t-xs); font-weight: 700; }
.fuse-line {
  --bomb-size: 116px; --cord-width: 11px; --fuse-clearance: 20px; --fuse-floor: 18px;
  position: relative; height: calc(var(--bomb-size) + var(--fuse-clearance) + var(--fuse-floor));
}
.fuse-track { position: absolute; inset: var(--fuse-clearance) calc(var(--bomb-size) * .56) var(--fuse-floor) 14px; }
.fuse-track svg { display: block; width: 100%; height: 100%; overflow: visible; }
.fuse-track svg > use, .fuse-track g { fill: none; stroke-linecap: round; }
.fuse-ash-base { stroke: #242731; stroke-width: calc(var(--cord-width) - 3px); }
.fuse-ash-fiber { stroke: #333844; stroke-width: 4px; stroke-dasharray: 8 3 2 4; }
.fuse-ash-glints { stroke: #686877; stroke-width: 1.3px; stroke-dasharray: 2 14 1 12; }
.fuse-rope-edge { stroke: #463121; stroke-width: calc(var(--cord-width) + 2px); }
.fuse-rope-body { stroke: #b68f58; stroke-width: var(--cord-width); }
.fuse-rope-light { stroke: #dec191; stroke-width: calc(var(--cord-width) * .55); }
.fuse-wrap-shadow { stroke: #493222; stroke-width: 1.45px; opacity: .84; }
.fuse-wrap-light { stroke: #f0d6a7; stroke-width: .94px; opacity: .68; }
.fuse-track svg > .fuse-heat { stroke: #a3e635; stroke-width: 2.4px; stroke-linecap: butt; opacity: .72; visibility: hidden; }
.fuse-bomb {
  position: absolute; top: var(--fuse-clearance); right: 0; width: var(--bomb-size); height: var(--bomb-size); object-fit: contain;
  filter: drop-shadow(0 6px 7px rgba(0, 0, 0, .9)) drop-shadow(0 0 7px rgba(222, 245, 68, .5)) drop-shadow(0 0 16px rgba(245, 184, 62, .26));
}
.fuse-spark {
  position: absolute; top: -42px; left: -42px; z-index: 1; width: 84px; height: 84px;
  clip-path: circle(50%); pointer-events: none; visibility: hidden;
}
.fuse-track[data-ready] .fuse-spark, .fuse-track[data-ready] svg > .fuse-heat { visibility: visible; }
.fuse-caption { display: flex; justify-content: space-between; color: var(--mute); font-size: var(--t-xs); font-weight: 700; font-variant-numeric: tabular-nums; }

.servers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.server { display: grid; gap: 14px; align-content: start; }
.server-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.server-state { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-sm); font-weight: 700; color: var(--ink-2); }
.server-name { font-family: var(--display); font-size: var(--t-xl); font-weight: 700; letter-spacing: -.02em; }
.server-mode { color: var(--mute); font-size: var(--t-sm); }
.server-now { display: grid; gap: 2px; padding: 12px; border-radius: var(--r-md); background: rgba(255, 255, 255, .03); }
.server-now strong { font-weight: 800; }
.server-now small { color: var(--mute); font-size: var(--t-xs); }
.server-players { font-variant-numeric: tabular-nums; font-weight: 800; }
.roster { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; }
.server-copy { justify-content: space-between; }
.server.is-offline .server-name { color: var(--ink-2); }

.drops { display: grid; gap: 8px; }
.drop { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 8px 10px 8px 8px; border-radius: var(--r-md); background: rgba(255, 255, 255, .025); border: 1px solid transparent; }
.drop.is-new { animation: drop-in .6s var(--ease); border-color: rgba(212, 255, 63, .3); }
.drop .art { width: 52px; border-radius: 12px; }
.drop strong { display: block; font-weight: 800; font-size: var(--t-sm); line-height: 1.25; }
.drop small { color: var(--mute); font-size: var(--t-xs); }
.drop time { color: var(--mute); font-size: var(--t-xs); font-variant-numeric: tabular-nums; }
.drop[data-rarity=legendary] { border-color: rgba(245, 183, 0, .25); background: linear-gradient(90deg, rgba(245, 183, 0, .08), transparent 70%); }
.drop[data-rarity=epic] { background: linear-gradient(90deg, rgba(181, 123, 255, .08), transparent 70%); }

.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 12px; align-items: end; }
.podium-step { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 16px 10px; border-radius: var(--r-lg); background: rgba(255, 255, 255, .03); border: 1px solid var(--line); transition: border-color .2s, transform .3s var(--ease); }
.podium-step:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.podium-step .art { width: 100%; max-width: 120px; }
.podium-step strong { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.podium-step small { color: var(--mute); font-size: var(--t-xs); font-variant-numeric: tabular-nums; }
.podium-place { font-family: var(--display); font-weight: 800; font-size: var(--t-lg); color: var(--mute); }
.podium-step--1 { order: 2; padding-block: 24px; border-color: rgba(245, 183, 0, .35); background: linear-gradient(180deg, rgba(245, 183, 0, .12), rgba(245, 183, 0, .02)); }
.podium-step--1 .podium-place { color: var(--gold); font-size: var(--t-2xl); }
.podium-step--2 { order: 1; } .podium-step--3 { order: 3; }
.podium-step--2 .podium-place { color: #D5DBE6; } .podium-step--3 .podium-place { color: #E0A470; }
.podium--big .art { max-width: 180px; }

.quick { display: grid; grid-template-rows: 1fr 1fr; gap: var(--gap); }
.quick-tile { display: grid; grid-template-columns: 1fr 96px; align-items: center; gap: 12px; }
.quick-tile img { width: 96px; height: 96px; object-fit: contain; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .55)); transition: transform .4s var(--ease); }
.quick-tile:hover img { transform: rotate(-6deg) scale(1.06); }
.quick-tile p { color: var(--mute); font-size: var(--t-sm); margin-top: 6px; }

.bonus { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.timer { font-family: var(--ui); font-weight: 800; font-size: var(--t-2xl); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.quests { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.quest { display: grid; gap: 6px; padding: 12px; border-radius: var(--r-md); background: rgba(255, 255, 255, .03); font-size: var(--t-sm); }
.quest.is-done { background: var(--emerald-soft); color: var(--emerald); }
.quest b { font-variant-numeric: tabular-nums; }

/* ── shop ─────────────────────────────────────────────────────────────── */
.shop-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; position: sticky; top: calc(var(--nav-h) + 8px); z-index: 20; padding: 8px; margin: -8px; border-radius: var(--r-lg); }
.shop-bar.is-stuck { background: rgba(7, 9, 14, .8); backdrop-filter: blur(16px); }
.product-price { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.product-price .rub { color: var(--ink); }
.product-price .or { color: var(--mute); font-size: var(--t-xs); }
.group-title { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; margin-top: 12px; font-family: var(--display); font-size: var(--t-lg); }
.group-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.recipient { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid rgba(212, 255, 63, .35); background: var(--lime-soft); }
.recipient img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
.recipient strong { display: block; }
.recipient small { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.recipient .btn { margin-left: auto; }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pay-method { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .03); text-align: left; transition: border-color .2s, background-color .2s; }
.pay-method strong { font-weight: 800; }
.pay-method small { color: var(--mute); font-size: var(--t-xs); }
.pay-method[aria-pressed=true] { border-color: var(--lime); background: var(--lime-soft); }
.pay-method:disabled { opacity: .4; cursor: not-allowed; }
.notice { padding: 12px 14px; border-radius: var(--r-md); background: rgba(255, 255, 255, .04); color: var(--ink-2); font-size: var(--t-sm); }
.notice--warn { background: var(--gold-soft); color: #FFD466; }
.notice--ok { background: var(--emerald-soft); color: #5EE0B0; }

/* ── cases ────────────────────────────────────────────────────────────── */
.case-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.case-card { display: grid; gap: 10px; padding: 18px; }
.case-card .art { max-width: 220px; width: 100%; margin-inline: auto; }
.case-card .card-name { font-family: var(--display); font-size: var(--t-lg); }
.case-stock { font-size: var(--t-sm); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.reel { position: relative; overflow: hidden; border-radius: var(--r-xl); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent), var(--obsidian); padding: 26px 0; }
.reel::before, .reel::after { content: ''; position: absolute; top: 0; bottom: 0; width: 18%; z-index: 2; pointer-events: none; }
.reel::before { left: 0; background: linear-gradient(90deg, var(--obsidian), transparent); }
.reel::after { right: 0; background: linear-gradient(-90deg, var(--obsidian), transparent); }
.reel-marker { position: absolute; z-index: 3; left: 50%; top: 10px; bottom: 10px; width: 3px; margin-left: -1.5px; border-radius: 3px; background: var(--lime); box-shadow: 0 0 18px rgba(212, 255, 63, .9); }
.reel-marker::before, .reel-marker::after { content: ''; position: absolute; left: 50%; margin-left: -8px; border: 8px solid transparent; }
.reel-marker::before { top: -6px; border-top-color: var(--lime); }
.reel-marker::after { bottom: -6px; border-bottom-color: var(--lime); }
.reel-track { display: flex; gap: 12px; width: max-content; will-change: transform; }
.reel-item { flex: none; width: 148px; display: grid; gap: 8px; justify-items: center; padding: 12px; border-radius: var(--r-md); background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-bottom: 3px solid var(--edge, var(--common)); text-align: center; }
.reel-item .art { width: 100px; }
.reel-item strong { font-size: var(--t-xs); font-weight: 800; line-height: 1.2; min-height: 2.4em; }
.reel-item[data-rarity=rare] { --edge: var(--rare); }
.reel-item[data-rarity=epic] { --edge: var(--epic); }
.reel-item[data-rarity=legendary] { --edge: var(--legendary); }
.reel-item.is-winner { border-color: var(--edge); box-shadow: 0 0 0 1px var(--edge), 0 0 40px -6px var(--edge); animation: winner 1.2s var(--ease) 2; }
.reel-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.reel-actions .switch { width: auto; padding: 8px 12px; }
.odds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.odd { display: grid; gap: 6px; padding: 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.odd b { font-family: var(--display); font-size: var(--t-xl); font-variant-numeric: tabular-nums; }
.odd[data-rarity=rare] b { color: var(--rare); } .odd[data-rarity=epic] b { color: var(--epic); } .odd[data-rarity=legendary] b { color: var(--legendary); }
.prize { display: grid; gap: 14px; justify-items: center; text-align: center; }
.prize .art { width: 220px; }
.prize h2 { font-size: var(--t-2xl); }
.prize-burst { position: absolute; inset: -40% -20% auto; height: 120%; z-index: -1; background: radial-gradient(circle at 50% 50%, var(--halo, rgba(212, 255, 63, .25)), transparent 60%); animation: burst 1.4s var(--ease) both; pointer-events: none; }
.prize[data-rarity=rare] { --halo: rgba(90, 169, 255, .35); }
.prize[data-rarity=epic] { --halo: rgba(181, 123, 255, .38); }
.prize[data-rarity=legendary] { --halo: rgba(245, 183, 0, .42); }

/* ── leaders ──────────────────────────────────────────────────────────── */
.board-controls { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.archive { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap); }
.archive-season { display: grid; gap: 14px; }
.archive-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; }
.archive-row .place { font-size: var(--t-lg); }
.archive-row:nth-child(1) .place { color: var(--gold); }

/* ── player & account ─────────────────────────────────────────────────── */
.profile { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: center; }
.profile-art { border-radius: var(--r-xl); background: radial-gradient(circle at 50% 65%, rgba(212, 255, 63, .16), transparent 66%), rgba(255, 255, 255, .025); border: 1px solid var(--line); }
.profile-art img { width: 86%; height: 86%; }
.profile-name { font-size: clamp(var(--t-2xl), 5vw, var(--t-4xl)); word-break: break-word; }
.profile-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--ink-2); font-weight: 700; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.kpi { display: grid; gap: 2px; padding: 14px; border-radius: var(--r-md); background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.kpi b { font-weight: 800; font-size: var(--t-2xl); line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--mute); font-size: var(--t-xs); font-weight: 700; }
.kpi--lime b { color: var(--lime); } .kpi--gold b { color: var(--gold); }
.medals { display: flex; gap: 10px; flex-wrap: wrap; }
.medal { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); font-size: var(--t-sm); font-weight: 700; }
.medal i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-family: var(--display); font-weight: 800; color: #1A1200; background: radial-gradient(circle at 35% 30%, #FFF2B8, var(--gold) 55%, #A87A00); }
.medal--2 i { background: radial-gradient(circle at 35% 30%, #FFFFFF, #C9D1DE 55%, #7E8796); }
.medal--3 i { background: radial-gradient(circle at 35% 30%, #FFE1C4, #D08A4E 55%, #7A4A22); }
.stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.wardrobe { display: grid; gap: 18px; }
.owned { position: relative; }
.owned .card { padding: 12px; gap: 8px; }
.owned .card-name { font-size: var(--t-sm); }
.equipped-mark { position: absolute; top: 10px; right: 10px; z-index: 2; }
.tag-preview { display: inline-flex; padding: 6px 12px; border-radius: var(--r-sm); background: rgba(0, 0, 0, .4); font-family: var(--display); font-weight: 700; color: var(--c, #fff); text-shadow: 0 0 10px var(--c, transparent); }
.link-code { display: grid; gap: 16px; justify-items: start; }
.big-code { font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 7vw, 3.4rem); letter-spacing: .08em; color: var(--lime); font-variant-numeric: tabular-nums; }
.command { display: inline-flex; padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, .08); font-weight: 800; color: var(--ink); }
.waiting { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); font-weight: 700; font-size: var(--t-sm); }
.waiting .dot { animation: pulse 1.4s ease-in-out infinite; }

/* ── auth ─────────────────────────────────────────────────────────────── */
.auth { display: grid; grid-template-columns: 1fr minmax(0, 480px); gap: 40px; align-items: start; }
.auth-side { display: grid; gap: 20px; align-content: start; padding-top: 12px; }
.auth-side img { width: 180px; filter: drop-shadow(0 30px 30px rgba(0, 0, 0, .6)); }
.auth-card { display: grid; gap: 20px; }

/* ── checkout / admin / error ─────────────────────────────────────────── */
.order { max-width: 640px; display: grid; gap: 18px; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.image-preview { width: 160px; aspect-ratio: 1; border-radius: var(--r-md); background: rgba(255, 255, 255, .04); display: grid; place-items: center; }
.image-preview img { width: 86%; height: 86%; object-fit: contain; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.error-page { display: grid; gap: 20px; justify-items: start; max-width: 620px; }
.error-code { font-family: var(--display); font-weight: 800; font-size: clamp(5rem, 16vw, 9rem); line-height: .9; color: var(--lime); letter-spacing: -.05em; }

/* Mobile search trigger (shown under 900px). */
.search-btn { display: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); position: relative; }
.search-btn::before { content: ''; position: absolute; left: 13px; top: 12px; width: 11px; height: 11px; border: 2px solid var(--ink); border-radius: 50%; }
.search-btn::after { content: ''; position: absolute; left: 24px; top: 26px; width: 6px; height: 2px; background: var(--ink); transform: rotate(45deg); }

/* ── motion ───────────────────────────────────────────────────────────── */
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@keyframes rise { from { opacity: 0; transform: translate(-50%, -46%) scale(.97); } }
@keyframes slide-in { from { transform: translateX(100%); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes bump { 30% { transform: scale(1.08); background: rgba(245, 183, 0, .32); } }
@keyframes drop-in { from { opacity: 0; transform: translateX(-14px); } }
@keyframes winner { 50% { transform: scale(1.05); } }
@keyframes burst { from { opacity: 0; transform: scale(.4); } 40% { opacity: 1; } }
@keyframes pulse { 50% { opacity: .35; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal.is-pending { opacity: 1; transform: none; }
  .tilt { transform: none !important; }
}

/* ── responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .servers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-3, .span-4, .span-5 { grid-column: span 6; }
  .span-7, .span-8 { grid-column: 1 / -1; }
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav-search { max-width: 260px; }
}
@media (max-width: 1000px) {
  :root { --nav-h: 62px; }
  .menu-btn { display: block; }
  .nav-links { position: fixed; top: var(--nav-h); left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 16px 20px; background: rgba(7, 9, 14, .97); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
  .nav.is-open .nav-links { display: flex; }
  .nav.is-open { background: rgba(7, 9, 14, .97); }
  .nav-link { padding: 14px 12px; font-size: var(--t-md); }
  .nav-link[aria-current=page]::after { left: 0; right: auto; top: 12px; bottom: 12px; width: 3px; height: auto; }
  .nav-search { order: 5; position: fixed; top: calc(var(--nav-h) + 8px); left: 16px; right: 16px; max-width: none; display: none; }
  .nav.is-searching .nav-search { display: block; }
  .search-btn { display: grid; }
  .nav-account { margin-left: auto; }
}
@media (max-width: 900px) {
  .hero, .auth, .profile { grid-template-columns: 1fr; }
  .profile-art { max-width: 220px; }
  .case-picker { grid-template-columns: 1fr; }
  .case-card { grid-template-columns: 120px 1fr; align-items: center; }
  .case-card .art { grid-row: span 4; }
  .admin-grid { grid-template-columns: 1fr; }
  .bento > * { grid-column: 1 / -1; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .page { gap: 40px; padding-top: calc(var(--nav-h) + 20px); }
  .tile { padding: 18px; }
  .servers { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .odds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quests { grid-template-columns: 1fr; }
  .nav-inner { gap: 8px; }
  .brand-logo { width: 50px; height: 50px; }
  .brand .brand-word { font-size: .76rem; }
  .nav-inner:has(.balance) .brand-word { display: none; }
  .fuse-line { --bomb-size: 88px; --cord-width: 8px; }
  .fuse-caption { gap: 12px; }
  .fuse-caption span:last-child { text-align: right; }
  .balance { padding-right: 10px; }
  .fuse-clock b { font-size: var(--t-xl); }
  .fuse-clock div { min-width: 40px; }
  .drawer { top: auto; height: min(92vh, 760px); width: 100%; border-left: 0; border-top: 1px solid var(--line-strong); border-radius: var(--r-xl) var(--r-xl) 0 0; animation-name: sheet-in; }
  .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { padding: 12px; }
  .reel-item { width: 120px; }
  .reel-item .art { width: 80px; }
  .podium { gap: 8px; }
  .table th, .table td { padding: 10px 12px; }
  .bonus { grid-template-columns: 1fr; }
  .modal { padding: 22px; }
}
@media (max-width: 360px) {
  .brand .brand-word { display: none; }
  .nav-account { flex: 0 1 auto; min-width: 0; gap: 5px; }
  .nav-account :is(.avatar, .search-btn, .menu-btn) { flex: none; }
  .nav-account .balance { min-width: 0; gap: 5px; padding-inline: 6px; }
  .balance .coin { flex: none; }
  .balance .num { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@keyframes sheet-in { from { transform: translateY(100%); } }

/* Hero art yields to the copy on narrow screens. */
@media (max-width: 900px) {
  .hero-copy { min-height: 0; }
  .hero-copy .hero-title, .hero-copy .lede { max-width: 72%; }
  .hero-art { width: 34%; top: 18px; right: -2%; }
}
@media (max-width: 640px) {
  .hero-copy .hero-title, .hero-copy .lede { max-width: none; }
  .hero-art { width: 120px; top: -8px; right: -18px; opacity: .45; }
}

/* Compositions used by several pages. */
.summary dd { margin: 0; text-align: right; }
.card.who { display: flex; align-items: center; gap: 12px; padding: 12px; }
.card.who img { width: 52px; height: 52px; border-radius: 14px; object-fit: contain; background: rgba(255, 255, 255, .04); }
.fuse-mini { padding: 16px 20px; display: grid; gap: 2px; }
.fuse-mini .timer { font-size: var(--t-xl); }
.board-controls + #board { margin-top: 4px; }
#board { display: grid; gap: 18px; }
.drawer-head .tile-title { margin-top: 8px; padding-right: 48px; }
.drawer-head .pill:empty { display: none; }
.card-badge:empty { display: none; }
.modal { overflow-x: hidden; }
.prize { position: relative; isolation: isolate; }
.drawer-body ul { margin: 0; padding: 0; list-style: none; }
.quests-note { grid-column: 1 / -1; }
.connect-target { white-space: nowrap; }


/* ── announcement banner (admin → portal_settings) ───────────────────── */
.banner { position: fixed; z-index: 55; top: var(--nav-h); left: 0; right: 0; border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); animation: fade .25s var(--ease); }
.banner--info { background: rgba(16, 185, 129, .16); color: #b9f5dd; }
.banner--warning { background: rgba(245, 183, 0, .18); color: #ffe08a; }
.banner-inner { display: flex; align-items: center; gap: 10px; min-height: 40px; font-weight: 700; font-size: var(--t-sm); }
.banner-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
body:has(.banner:not([hidden])) .page { padding-top: calc(var(--nav-h) + 72px); }

/* ── season fuse states ─────────────────────────────────────────────── */
.fuse-subtitle { margin-top: 4px; max-width: 60ch; }
.fuse-season { color: var(--season-accent, var(--ink)); }
.fuse.is-offseason .fuse-spark { display: none; }
.fuse.is-offseason .fuse-line { opacity: .55; }

/* ── maintenance and admin sign-in ──────────────────────────────────── */
.maintenance { display: grid; gap: 18px; justify-items: start; max-width: 640px; padding-block: 40px; }
.maintenance .error-code { font-size: clamp(3rem, 10vw, 5.5rem); }
.admin-login { max-width: 460px; display: grid; gap: 18px; }
.telegram-slot { min-height: 44px; }

/* ── admin panel ────────────────────────────────────────────────────── */
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
/* Tabs stay in the normal flow (no sticky layer): text below can never slide under them. */
.admin-tabs { position: relative; z-index: 1; margin-bottom: 16px; background: var(--obsidian); }
.admin-hint { margin: 0 0 16px; max-width: 86ch; }
.round-row { display: grid; gap: 12px; padding: 16px; }
.round-row .row { gap: 6px; }
.admin-panel > [data-panel] { min-width: 0; }
.admin-panel { display: grid; gap: var(--gap); }
.admin-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.season-row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: rgba(255, 255, 255, .025); }
.season-row.is-selected { border-color: var(--lime); box-shadow: 0 0 0 1px var(--lime); }
.season-swatch { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, var(--core, #fff) 0 22%, var(--spark, #ccff00) 45%, transparent 72%); box-shadow: 0 0 18px -2px var(--spark, #ccff00); }
.season-row strong { display: block; font-weight: 800; }
.season-row small { color: var(--mute); font-variant-numeric: tabular-nums; }
.status-pill--active { background: var(--emerald-soft); color: var(--emerald); }
.status-pill--scheduled { background: rgba(90, 169, 255, .15); color: var(--rare); }
.status-pill--archived { background: rgba(142, 151, 168, .14); color: var(--common); }
.wick-preview { position: relative; display: grid; place-items: center; height: 150px; border-radius: var(--r-lg); background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .04), transparent 70%), #05070b; border: 1px solid var(--line); overflow: hidden; }
.wick-preview canvas { width: 84px; height: 84px; }
.wick-preview .preview-cord { position: absolute; left: 8%; right: 50%; top: 50%; height: 7px; margin-top: -3px; border-radius: 4px; background: linear-gradient(90deg, #2a2f3a, #8e7a55); }
.color-field { display: grid; grid-template-columns: 40px 1fr; gap: 8px; align-items: center; }
.color-chip { width: 40px; height: 40px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--c, #fff); }
.range { display: grid; gap: 6px; }
.range-track { position: relative; height: 34px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .06); border: 1px solid var(--line); cursor: pointer; touch-action: none; }
.range-fill { position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); border-radius: inherit; background: linear-gradient(90deg, rgba(212, 255, 63, .15), rgba(212, 255, 63, .45)); }
.range-knob { position: absolute; top: 50%; left: var(--w, 0%); width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.range-track:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.utc-hint { font-size: var(--t-xs); color: var(--mute); font-variant-numeric: tabular-nums; }
.date-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; }
.node-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.node-card { display: grid; gap: 14px; }
.node-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.node-head h3 { font-size: var(--t-xl); }
.node-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--mute); font-size: var(--t-sm); }
.stepper { display: grid; grid-template-columns: 40px 1fr 40px; gap: 6px; align-items: center; }
.stepper .input { text-align: center; font-variant-numeric: tabular-nums; }
.archive-board { display: grid; gap: var(--gap); }
.archive-board details { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--obsidian); }
.archive-board summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; padding: 16px 18px; font-weight: 800; }
.archive-board summary::-webkit-details-marker { display: none; }
.archive-board details[open] summary { border-bottom: 1px solid var(--line); }
@media (max-width: 900px) {
  .admin-cols, .node-grid { grid-template-columns: 1fr; }
}
