/* ========== Thème ========== */
:root {
  --bg: #0b0e1a;
  --bg-2: #10142a;
  --surface: #151a2b;
  --surface-2: #1b2136;
  --surface-3: #232a42;
  --line: #262d47;
  --line-2: #323a5a;
  --text: #eef0fa;
  --text-2: #b4b9d0;
  --muted: #7d84a3;
  --brand: #8b7cf6;
  --brand-2: #6d5cf0;
  --brand-soft: rgba(139, 124, 246, .14);
  --accent: #22d3ee;
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, .14);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, .14);
  --err: #f87171;
  --err-soft: rgba(248, 113, 113, .14);
  --chart: #9085e9;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar: 248px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f5fb;
  --bg-2: #eceef8;
  --surface: #ffffff;
  --surface-2: #f6f7fc;
  --surface-3: #eceef7;
  --line: #e3e6f1;
  --line-2: #d3d7e8;
  --text: #141729;
  --text-2: #464b66;
  --muted: #737995;
  --brand: #6250d6;
  --brand-2: #5240c8;
  --brand-soft: rgba(98, 80, 214, .10);
  --accent: #0891b2;
  --ok: #059669;
  --ok-soft: rgba(5, 150, 105, .10);
  --warn: #b45309;
  --warn-soft: rgba(217, 119, 6, .12);
  --err: #dc2626;
  --err-soft: rgba(220, 38, 38, .10);
  --chart: #6250d6;
  --shadow: 0 10px 30px rgba(20, 23, 41, .08);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
::selection { background: var(--brand); color: #fff; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 750; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 650; }
code, pre, .mono { font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; overflow-x: auto; margin: 0; color: var(--text-2); }
.muted { color: var(--muted); } .small { font-size: 13px; } .xs { font-size: 12px; }
.ok { color: var(--ok); } .err { color: var(--err); } .warn { color: var(--warn); }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

/* ========== Layout ========== */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px;
  padding: 20px 14px; background: var(--bg-2); border-right: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: var(--text); font-weight: 800; font-size: 17px; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent)); box-shadow: 0 6px 18px rgba(139, 124, 246, .35);
}
.nav-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 14px 12px 6px; }
.nav-link {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-weight: 550;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--brand-soft); color: var(--brand); }
.nav-link .count { margin-left: auto; font-size: 11px; background: var(--warn-soft); color: var(--warn); padding: 1px 7px; border-radius: 99px; font-weight: 700; }
.sidebar .spacer { flex: 1; }
.wallet-card {
  padding: 14px; border-radius: var(--radius); color: #fff;
  background: linear-gradient(135deg, var(--brand-2), #4338ca 60%, #0e7490);
  box-shadow: var(--shadow);
}
.wallet-card .lbl { font-size: 12px; opacity: .85; }
.wallet-card .amt { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.wallet-card a { color: #fff; font-size: 12px; opacity: .9; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; margin-top: 8px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text); font-weight: 700; font-size: 13px; flex: none; }
.user-chip .em { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.icon-btn { background: transparent; border: 0; color: var(--muted); padding: 6px; border-radius: 8px; cursor: pointer; display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: none; position: sticky; top: 0; z-index: 20; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.topbar .bal { font-weight: 750; color: var(--ok); font-size: 14px; }
.content { width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 28px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.bottom-nav { display: none; }

.announce {
  display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 20px;
  background: var(--brand-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
}

/* ========== Composants ========== */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head p { margin: 4px 0 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }

.btn {
  font: inherit; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  background: var(--brand); color: #fff; transition: background .15s, transform .05s, border-color .15s;
}
.btn:hover { background: var(--brand-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.soft { background: var(--brand-soft); color: var(--brand); }
.btn.soft:hover { background: color-mix(in srgb, var(--brand) 22%, transparent); }
.btn.danger { background: var(--err-soft); color: var(--err); }
.btn.danger:hover { background: color-mix(in srgb, var(--err) 22%, transparent); }
.btn.success { background: var(--ok); color: #04241a; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.lg { padding: 13px 22px; font-size: 15px; }
.btn.block { width: 100%; }
.spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--muted); }
input, select, textarea {
  font: inherit; width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
input[type=checkbox] { width: auto; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon input { padding-left: 38px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 40px; height: 22px; border-radius: 99px; background: var(--surface-3); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch input:checked + .track { background: var(--ok); }
.switch input:checked + .track::after { left: 21px; }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--brand-soft); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 650; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.completed, .badge.on { background: var(--ok-soft); color: var(--ok); }
.badge.pending, .badge.submitting { background: var(--warn-soft); color: var(--warn); }
.badge.partial { background: var(--warn-soft); color: var(--warn); }
.badge.refunded, .badge.failed, .badge.off { background: var(--err-soft); color: var(--err); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); cursor: pointer; }
.tab:hover { background: var(--surface-2); color: var(--text); }
.tab.on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover td { background: var(--surface-2); }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty svg.i { width: 36px; height: 36px; margin-bottom: 8px; opacity: .6; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 14px; color: var(--muted); font-size: 13px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: relative; overflow: hidden; }
.stat .k { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.stat .k .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.stat .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-top: 10px; }
.stat .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.stat.hero { background: linear-gradient(135deg, var(--brand-2), #4338ca 60%, #0e7490); border: 0; color: #fff; }
.stat.hero .k, .stat.hero .sub { color: rgba(255, 255, 255, .8); }
.stat.hero .k .ic { background: rgba(255, 255, 255, .16); color: #fff; }

/* Chart */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: 220px; overflow: visible; }
.chart .gridline { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .bar { fill: var(--chart); }
.chart .bar-hit { fill: transparent; cursor: pointer; }
.chart .bar-hit:hover + .bar, .chart .bar.hl { opacity: .75; }
.chart-tip {
  position: absolute; pointer-events: none; background: var(--surface-3); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 8px 11px; font-size: 12.5px; box-shadow: var(--shadow); white-space: nowrap; transform: translate(-50%, -100%); z-index: 3;
}
.chart-tip b { display: block; font-size: 14px; }
.list-rank { display: flex; flex-direction: column; gap: 12px; }
.list-rank .it { display: flex; align-items: center; gap: 12px; }
.list-rank .n { width: 24px; height: 24px; border-radius: 7px; background: var(--surface-3); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--text-2); flex: none; }
.list-rank .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }

/* Catalogue */
.hero-shop {
  border-radius: 18px; padding: 26px; margin-bottom: 22px; position: relative; overflow: hidden;
  background: radial-gradient(120% 140% at 0% 0%, rgba(139, 124, 246, .35), transparent 55%), radial-gradient(120% 140% at 100% 100%, rgba(34, 211, 238, .25), transparent 55%), var(--surface);
  border: 1px solid var(--line);
}
.hero-shop h1 { font-size: 28px; }
.hero-shop p { color: var(--text-2); margin: 8px 0 18px; max-width: 520px; }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.game {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 12px; text-align: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .15s, border-color .15s, box-shadow .15s;
  color: var(--text);
}
.game:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: 0 10px 26px rgba(139, 124, 246, .18); text-decoration: none; }
.game img, .game .ph { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; }
.ph { display: grid; place-items: center; font-weight: 800; font-size: 22px; color: #fff; }
.game .nm { font-weight: 650; font-size: 14px; line-height: 1.3; }
.game .cat { font-size: 12px; color: var(--muted); }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.product {
  display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s, transform .15s;
}
.product:hover { border-color: var(--line-2); transform: translateY(-2px); }
.product .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.product .nm { font-weight: 700; font-size: 15px; }
.product .price { font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -.02em; }
.product .price small { font-size: 13px; color: var(--muted); font-weight: 600; }
.product.oos { opacity: .55; }
.game-head { display: flex; align-items: center; gap: 16px; }
.game-head img, .game-head .ph { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(5, 7, 15, .6); backdrop-filter: blur(4px); animation: fade .15s; }
.modal-box { width: 100%; max-width: 500px; max-height: 92vh; overflow: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); animation: pop .18s; }
.modal-box.wide { max-width: 760px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.summary { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; margin: 6px 0 16px; }
.summary .ln { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.summary .ln.total { border-top: 1px dashed var(--line-2); padding-top: 10px; font-weight: 800; font-size: 17px; }
.player-box { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 14px; margin-top: 8px; }
.player-box.ok { background: var(--ok-soft); color: var(--ok); }
.player-box.err { background: var(--err-soft); color: var(--err); }
.qty { display: flex; align-items: center; gap: 0; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; width: max-content; }
.qty button { background: var(--surface-2); color: var(--text); border: 0; width: 40px; height: 42px; font-size: 18px; cursor: pointer; }
.qty input { width: 64px; text-align: center; border: 0; border-radius: 0; background: var(--bg-2); }

/* Toast */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: pop .2s; font-size: 14px; }
.toast.ok svg { color: var(--ok); } .toast.err svg { color: var(--err); }

/* Détails */
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 10px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.voucher { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--bg-2); border: 1px dashed var(--line-2); margin-top: 8px; }
.voucher code { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: .04em; }
.timeline { display: flex; gap: 0; margin: 4px 0 4px; }
.timeline .st { flex: 1; text-align: center; font-size: 12px; color: var(--muted); position: relative; padding-top: 22px; }
.timeline .st::before { content: ""; position: absolute; top: 4px; left: 50%; transform: translateX(-50%); width: 12px; height: 12px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--line-2); z-index: 1; }
.timeline .st::after { content: ""; position: absolute; top: 10px; left: -50%; width: 100%; height: 2px; background: var(--line-2); }
.timeline .st:first-child::after { display: none; }
.timeline .st.done { color: var(--text); }
.timeline .st.done::before { background: var(--ok); border-color: var(--ok); }
.timeline .st.done::after { background: var(--ok); }
.timeline .st.bad::before { background: var(--err); border-color: var(--err); }
.settings-nav { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.key-display { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.key-display code { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.status-dot { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; }
.status-dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 20%, transparent); }
.method { display: inline-block; min-width: 46px; text-align: center; font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 6px; }
.method.get { background: var(--ok-soft); color: var(--ok); }
.method.post { background: var(--brand-soft); color: var(--brand); }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); }
@keyframes sk { to { background-position: -200% 0; } }

/* ========== Landing / auth ========== */
.landing { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.landing .pitch {
  padding: 48px 56px; display: flex; flex-direction: column; justify-content: center; gap: 26px; position: relative; overflow: hidden;
  background: radial-gradient(90% 80% at 0% 0%, rgba(139, 124, 246, .35), transparent 60%), radial-gradient(80% 70% at 100% 100%, rgba(34, 211, 238, .22), transparent 60%), var(--bg-2);
  border-right: 1px solid var(--line);
}
.pitch h1 { font-size: 42px; line-height: 1.1; font-weight: 850; letter-spacing: -.03em; }
.pitch h1 span { background: linear-gradient(90deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pitch .lead { font-size: 17px; color: var(--text-2); max-width: 520px; margin: 0; }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 560px; }
.feature { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--line); }
.feature .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.feature b { display: block; font-size: 14px; }
.feature span { font-size: 13px; color: var(--muted); }
.auth-side { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 24px; margin-bottom: 6px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 12px; background: var(--surface-2); margin: 22px 0; }
.seg button { font: inherit; font-weight: 650; padding: 9px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }

/* ========== Responsive ========== */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .landing { grid-template-columns: 1fr; }
  .landing .pitch { padding: 32px 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .pitch h1 { font-size: 32px; }
  .features { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 40; transform: translateX(-100%); transition: transform .2s; overflow-y: auto;
  }
  .shell.menu-open .sidebar { transform: none; box-shadow: var(--shadow); }
  .shell.menu-open::after { content: ""; position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 30; }
  .topbar { display: flex; }
  .content { padding: 20px 16px 96px; }
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 25; justify-content: space-around;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg-2) 92%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 10px; border-radius: 10px; }
  .bottom-nav a.active { color: var(--brand); }
  .bottom-nav a:hover { text-decoration: none; }
  .grid-2 { grid-template-columns: 1fr; }
  h1 { font-size: 22px; }
  .hero-shop { padding: 20px; }
  .hero-shop h1 { font-size: 22px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 10px; }
  .toasts { right: 16px; left: 16px; bottom: 84px; max-width: none; }
  th, td { padding: 10px 12px; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat .v { font-size: 20px; }
  .games { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
  .products { grid-template-columns: 1fr; }
  .modal { align-items: flex-end; padding: 0; }
  .modal-box { border-radius: 18px 18px 0 0; max-height: 94vh; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
