/* Gaming Impact prototype – design system
   Dark (default) and light themes via [data-theme] on <html>. */

:root,
[data-theme='dark'] {
  --bg: #0a0c11;
  --bg-grad: radial-gradient(1200px 600px at 10% -10%, rgba(229, 38, 47, 0.12), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(56, 189, 248, 0.07), transparent 60%);
  --surface: #11141b;
  --surface-2: #171b24;
  --surface-3: #1e2330;
  --border: #252b3a;
  --border-strong: #343c50;
  --text: #e8eaf0;
  --text-muted: #8c95a8;
  --text-faint: #5d667a;
  --accent: #e5262f;
  --accent-hover: #ff3b44;
  --accent-soft: rgba(229, 38, 47, 0.14);
  --success: #22c55e;
  --success-soft: rgba(34, 197, 94, 0.14);
  --info: #38bdf8;
  --info-soft: rgba(56, 189, 248, 0.14);
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, 0.14);
  --gold: #fbbf24;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  --line: #3a4256;
  --line-won: #e5262f;
}

[data-theme='light'] {
  --bg: #f4f5f8;
  --bg-grad: none;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #eef0f4;
  --border: #e2e5eb;
  --border-strong: #cfd4dd;
  --text: #171a21;
  --text-muted: #5b6474;
  --text-faint: #8f97a6;
  --accent: #d81f28;
  --accent-hover: #b9151d;
  --accent-soft: rgba(216, 31, 40, 0.08);
  --success: #16a34a;
  --success-soft: rgba(22, 163, 74, 0.1);
  --info: #0284c7;
  --info-soft: rgba(2, 132, 199, 0.1);
  --warn: #d97706;
  --warn-soft: rgba(217, 119, 6, 0.1);
  --gold: #d97706;
  --shadow: 0 6px 20px rgba(20, 24, 33, 0.08);
  --line: #c3c9d4;
  --line-won: #d81f28;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-grad), var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: 'Rajdhani', 'Inter', sans-serif; letter-spacing: 0.01em; }
p { margin: 0; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 13px;
  cursor: pointer; transition: background 0.15s, border-color 0.15s, transform 0.05s; white-space: nowrap;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(1.08); background: var(--success); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 6px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn-icon { width: 38px; padding: 0; }
.btn-sm.btn-icon { width: 30px; }

/* ---------- Pills / badges ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px;
  border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--surface-3); color: var(--text-muted);
}
.pill-live { background: var(--accent-soft); color: var(--accent); }
.pill-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
.pill-open { background: var(--info-soft); color: var(--info); }
.pill-done { background: var(--success-soft); color: var(--success); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted);
}
.tag i { color: var(--text-faint); font-size: 11px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; gap: 24px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 19px; letter-spacing: 0.06em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), #8f0f15);
  color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 800;
  box-shadow: 0 4px 14px rgba(229, 38, 47, 0.35);
}
.brand small { display: block; font-family: 'Inter', sans-serif; font-size: 10px; letter-spacing: 0.08em; color: var(--text-faint); font-weight: 600; margin-top: -3px; }
.main-nav { display: flex; gap: 4px; }
.main-nav a { padding: 8px 12px; border-radius: 8px; color: var(--text-muted); font-weight: 600; font-size: 13px; }
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.main-nav a.active { color: var(--text); background: var(--surface-3); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.role-switch {
  display: flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 3px;
}
.role-switch button {
  border: 0; background: transparent; padding: 5px 10px; border-radius: 6px; font-size: 12px; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
}
.role-switch button.active { background: var(--surface-3); color: var(--text); }
.wallet-chip {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 8px;
  background: var(--success-soft); color: var(--success); font-weight: 700; font-size: 12px;
}

/* ---------- Page ---------- */
main { flex: 1; padding: 28px 0 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-head h1 { font-size: 30px; }
.section { margin-top: 40px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-head h2 { font-size: 22px; }
.section-head a { color: var(--accent); font-weight: 600; font-size: 13px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
}
.card-pad { padding: 20px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: 56px 48px;
  background:
    linear-gradient(110deg, rgba(10, 12, 17, 0.96) 35%, rgba(10, 12, 17, 0.55)),
    repeating-linear-gradient(135deg, rgba(229, 38, 47, 0.08) 0 2px, transparent 2px 22px),
    linear-gradient(135deg, #1a0b0e, #0d1520);
  border: 1px solid var(--border); color: #fff;
}
.hero::after {
  content: ''; position: absolute; right: -80px; top: -80px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 38, 47, 0.35), transparent 65%);
}
.hero-kicker { color: #ff6b72; font-weight: 700; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; }
.hero h1 { font-size: 52px; line-height: 1.02; margin: 12px 0 14px; max-width: 640px; }
.hero p { color: #b7bfcf; font-size: 16px; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; margin-top: 26px; position: relative; z-index: 1; }
.hero-stats { display: flex; gap: 36px; margin-top: 36px; position: relative; z-index: 1; }
.hero-stats strong { display: block; font-family: 'Rajdhani', sans-serif; font-size: 30px; color: #fff; }
.hero-stats span { color: #8c95a8; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.hero .btn:not(.btn-primary) { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.16); color: #fff; }

/* ---------- Tournament cards ---------- */
.t-card { overflow: hidden; display: flex; flex-direction: column; transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; }
.t-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.t-banner {
  height: 96px; position: relative; padding: 12px 14px; display: flex; align-items: flex-start; justify-content: space-between;
  color: #fff;
}
.t-banner .game { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; background: rgba(0, 0, 0, 0.35); padding: 4px 8px; border-radius: 6px; }
.t-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.t-body h3 { font-size: 19px; line-height: 1.15; }
.t-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.t-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--border); }
.prize small { display: block; font-size: 10px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.prize strong { font-family: 'Rajdhani', sans-serif; font-size: 20px; color: var(--gold); }
.slots { font-size: 12px; color: var(--text-muted); text-align: right; }
.slots-bar { width: 90px; height: 5px; background: var(--surface-3); border-radius: 3px; margin-top: 5px; overflow: hidden; }
.slots-bar span { display: block; height: 100%; background: var(--accent); }

.game-fc { background: linear-gradient(135deg, #0f5132, #0b2a1d 70%); }
.game-efootball { background: linear-gradient(135deg, #1d4ed8, #0b1d4a 70%); }
.game-tekken { background: linear-gradient(135deg, #b91c1c, #3b0a0a 70%); }
.game-mk { background: linear-gradient(135deg, #a16207, #2e1a04 70%); }
.game-sf { background: linear-gradient(135deg, #7c3aed, #23104a 70%); }
.game-codm { background: linear-gradient(135deg, #374151, #0f141c 70%); }
.game-pubg { background: linear-gradient(135deg, #c2410c, #3a1405 70%); }

/* ---------- Hub & player cards ---------- */
.hub-card { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.hub-top { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0;
  font-weight: 800; font-size: 14px; color: #fff; font-family: 'Rajdhani', sans-serif; letter-spacing: 0.04em;
}
.avatar-sm { width: 28px; height: 28px; border-radius: 7px; font-size: 11px; }
.verified { color: var(--info); font-size: 12px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 11px; padding: 3px 8px; border-radius: 6px; background: var(--surface-3); color: var(--text-muted); }

.rank-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.rank-row:last-child { border-bottom: 0; }
.rank-num { width: 26px; font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 18px; color: var(--text-faint); }
.rank-row:nth-child(1) .rank-num { color: var(--gold); }
.elo { margin-left: auto; font-family: 'JetBrains Mono', monospace; font-weight: 700; color: var(--accent); }

.coming-soon {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 14px;
  border: 1px dashed var(--border-strong); color: var(--text-muted);
}
.coming-soon i { font-size: 20px; color: var(--text-faint); }

/* ---------- Filters ---------- */
.filters { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.input, .select, textarea.input {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; font-size: 13px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea.input { height: auto; min-height: 76px; padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-icon { position: relative; }
.input-icon i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 13px; }
.input-icon .input { padding-left: 34px; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.field-hint { font-weight: 400; color: var(--text-faint); font-size: 11px; }
.empty {
  text-align: center; padding: 56px 20px; color: var(--text-muted);
}
.empty i { font-size: 32px; color: var(--text-faint); margin-bottom: 12px; display: block; }

/* ---------- Tournament page (Challonge-style) ---------- */
.t-header { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.t-header-banner { height: 120px; position: relative; }
.t-header-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, var(--surface)); }
.t-header-body { padding: 0 24px 0; margin-top: -46px; position: relative; z-index: 1; display: flex; gap: 20px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.t-header-title { display: flex; gap: 16px; align-items: flex-end; }
.t-logo { width: 84px; height: 84px; border-radius: 16px; border: 4px solid var(--surface); display: grid; place-items: center; color: #fff; font-size: 30px; }
.t-header h1 { font-size: 32px; line-height: 1.05; }
.t-header .t-meta { margin-top: 8px; }
.t-header-side { display: flex; align-items: center; gap: 12px; padding-bottom: 6px; }
.prize-box { text-align: right; padding: 8px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.prize-box small { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); font-weight: 700; }
.prize-box strong { font-family: 'Rajdhani', sans-serif; font-size: 24px; color: var(--gold); line-height: 1.1; }
.tabs { display: flex; gap: 2px; padding: 0 16px; margin-top: 18px; border-top: 1px solid var(--border); overflow-x: auto; }
.tabs a {
  padding: 13px 14px; font-weight: 600; font-size: 13px; color: var(--text-muted); border-bottom: 2px solid transparent;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); }
.tabs .count { font-size: 11px; background: var(--surface-3); padding: 1px 7px; border-radius: 10px; color: var(--text-muted); }
.tab-body { margin-top: 20px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-muted); }
.legend span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--c); }
.progress { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-muted); }
.progress-bar { width: 140px; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: var(--success); }

/* ---------- Bracket ---------- */
.bracket-scroll { overflow: auto; padding: 24px; }
.bracket { position: relative; }
.bracket svg { position: absolute; inset: 0; overflow: visible; pointer-events: none; }
.bracket path { fill: none; stroke: var(--line); stroke-width: 1.5; }
.bracket path.won { stroke: var(--line-won); stroke-width: 2; }
.round-label {
  position: absolute; top: 0; text-align: center; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-faint);
}
.match {
  position: absolute; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border-strong);
  overflow: hidden; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.match:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.match.ready { border-color: var(--info); box-shadow: 0 0 0 1px var(--info) inset; }
.match.walkover { opacity: 0.45; cursor: default; }
.match.walkover:hover { border-color: var(--border-strong); box-shadow: none; }
.match.pending { cursor: default; }
.match.pending:hover { border-color: var(--border-strong); box-shadow: none; }
.match-label { position: absolute; font-size: 10px; color: var(--text-faint); font-weight: 600; font-family: 'JetBrains Mono', monospace; }
.slot { display: flex; align-items: center; height: 30px; font-size: 13px; }
.slot + .slot { border-top: 1px solid var(--border); }
.slot .seed { width: 26px; text-align: center; font-size: 11px; color: var(--text-faint); font-weight: 600; flex-shrink: 0; }
.slot .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 6px; }
.slot .score {
  width: 32px; height: 100%; display: grid; place-items: center; font-weight: 700; font-family: 'JetBrains Mono', monospace;
  background: var(--surface-3); color: var(--text-muted); font-size: 12px;
}
.slot.win { font-weight: 700; }
.slot.win .score { background: var(--accent); color: #fff; }
.slot.lose .name { color: var(--text-faint); }
.slot.tbd .name, .slot.bye .name { color: var(--text-faint); font-style: italic; }

.champion {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px; margin-bottom: 16px; border-radius: 14px;
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.16), transparent); border: 1px solid rgba(251, 191, 36, 0.35);
}
.champion i { font-size: 28px; color: var(--gold); }
.champion strong { font-family: 'Rajdhani', sans-serif; font-size: 24px; }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); font-weight: 700; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.table td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.player-cell { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.num { font-family: 'JetBrains Mono', monospace; }
.right { text-align: right; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }

.match-list-round { padding: 10px 16px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.match-row { display: grid; grid-template-columns: 60px 1fr 90px 1fr 110px; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; }
.match-row:hover { background: var(--surface-2); }
.match-row .vs-score { text-align: center; font-family: 'JetBrains Mono', monospace; font-weight: 700; }
.match-row .p-right { text-align: right; }
.match-row .won { font-weight: 700; color: var(--text); }
.match-row .lost { color: var(--text-faint); }

/* ---------- Detail lists ---------- */
.dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.dl div { padding: 12px 0; border-bottom: 1px solid var(--border); }
.dl dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); font-weight: 700; }
.dl dd { margin: 3px 0 0; font-weight: 600; }
.rule h4 { font-size: 15px; margin-bottom: 4px; }
.rule + .rule { margin-top: 14px; }

.money-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.money-row.total { border-bottom: 0; font-weight: 800; font-size: 16px; }
.money-row .minus { color: var(--text-muted); }
.note {
  display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; font-size: 12px;
  background: var(--warn-soft); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
}
.note-info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.place-badge { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font-weight: 800; font-family: 'Rajdhani', sans-serif; background: var(--surface-3); }
.place-1 { background: rgba(251, 191, 36, 0.2); color: var(--gold); }
.place-2 { background: rgba(203, 213, 225, 0.18); color: #cbd5e1; }
.place-3 { background: rgba(217, 119, 6, 0.18); color: #d97706; }

/* ---------- Wizard ---------- */
.wizard { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.wizard-nav { position: sticky; top: 82px; display: flex; flex-direction: column; gap: 2px; }
.wizard-nav a { padding: 9px 12px; border-radius: 8px; color: var(--text-muted); font-weight: 600; font-size: 13px; display: flex; gap: 10px; align-items: center; }
.wizard-nav a:hover { background: var(--surface-2); color: var(--text); }
.wizard-nav a span { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; background: var(--surface-3); }
.form-section { padding: 22px; scroll-margin-top: 82px; }
.form-section + .form-section { margin-top: 16px; }
.form-section h2 { font-size: 20px; margin-bottom: 4px; }
.form-section > p { color: var(--text-muted); font-size: 13px; margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.choice {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: var(--surface-2); cursor: pointer; font-size: 13px;
}
.choice input { position: absolute; opacity: 0; }
.choice strong { font-size: 14px; }
.choice small { color: var(--text-faint); font-size: 11px; }
.choice:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.choice.disabled { opacity: 0.5; cursor: not-allowed; }
.choice .soon { position: absolute; top: 10px; right: 10px; font-size: 9px; font-weight: 800; letter-spacing: 0.06em; color: var(--warn); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.split-total { font-weight: 700; }
.split-total.bad { color: var(--accent); }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 60; background: rgba(5, 6, 10, 0.72); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 20px; animation: fade 0.15s ease;
}
.modal { width: 100%; max-width: 480px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: var(--shadow); animation: rise 0.18s ease; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 20px 0; }
.modal-head small { color: var(--accent); font-weight: 700; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.modal-head h3 { font-size: 21px; }
.modal-body { padding: 16px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 18px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.versus { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.versus-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.versus-row + .versus-row { border-top: 1px solid var(--border); }
.versus-row .who { flex: 1; min-width: 0; }
.versus-row .who strong { display: block; }
.versus-row .who small { color: var(--text-faint); font-size: 12px; }
.score-input { width: 64px; height: 44px; text-align: center; font-size: 20px; font-weight: 800; font-family: 'JetBrains Mono', monospace; }

.stk { text-align: center; padding: 8px 0; }
.stk-icon { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px; display: grid; place-items: center; font-size: 24px; background: var(--success-soft); color: var(--success); }
.stk-summary { margin: 14px 0; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); text-align: left; font-size: 13px; }
.stk-summary div { display: flex; justify-content: space-between; padding: 3px 0; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Toast ---------- */
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.toast {
  min-width: 260px; max-width: 380px; padding: 12px 14px; border-radius: 10px; background: var(--surface-3);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow); font-size: 13px; display: flex; gap: 10px; align-items: flex-start;
  animation: rise 0.2s ease;
}
.toast i { margin-top: 2px; }
.toast-success i { color: var(--success); }
.toast-error i { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 18px 0; color: var(--text-faint); font-size: 12px; }
.site-footer .container { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .input-icon { grid-column: 1 / -1; }
  .wizard { grid-template-columns: 1fr; }
  .wizard-nav { display: none; }
}
@media (max-width: 760px) {
  .main-nav { display: none; }
  .wallet-chip { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero { padding: 36px 24px; }
  .hero h1 { font-size: 36px; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
  .form-grid, .dl { grid-template-columns: 1fr; }
  .match-row { grid-template-columns: 1fr 70px 1fr; }
  .match-row > :first-child, .match-row > :last-child { display: none; }
  .t-header h1 { font-size: 24px; }
  .container { padding: 0 16px; }
}
