/* =====================================================================
   Road to Victory — World Cup 2026
   v3 layout: left sidebar app shell · Space Grotesk / Manrope
   ===================================================================== */

:root {
  --ink-900: #05070a;
  --ink-850: #080b0f;
  --ink-800: #0b0f14;
  --ink-700: #11161d;
  --ink-600: #182029;
  --ink-500: #222c37;
  --line:    #2b3742;
  --line-soft: rgba(255,255,255,.06);

  --text:    #f2f6f8;
  --muted:   #8b9aa6;
  --faint:   #586772;

  --primary:  #2be57a;   /* electric pitch green */
  --primary-d:#16b85e;
  --azure:    #4d8dff;
  --gold:     #ffc94d;
  --att:      #ff7a4d;
  --def:      #4d8dff;
  --accent:   #4d8dff;   /* compat */
  --accent-2: #2f6fe0;

  --good:    #2be57a;
  --warn:    #ffb020;
  --bad:     #ff5d63;

  --radius:    18px;
  --radius-sm: 12px;
  --shadow:    0 18px 44px -22px rgba(0,0,0,.7);
  --shadow-lg: 0 30px 70px -26px rgba(0,0,0,.78);

  --side: 252px;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--text);
  background: var(--ink-850);
  -webkit-font-smoothing: antialiased; line-height: 1.5;
}
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.05; margin: 0; letter-spacing: -.01em; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .center { text-align: center; }

/* =====================================================================
   APP SHELL — top bar + main
   ===================================================================== */
.layout { min-height: 100vh; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 11px clamp(16px, 3vw, 32px);
  background: linear-gradient(180deg, rgba(8,11,15,.96), rgba(8,11,15,.84));
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft);
}
.brand { justify-self: start; display: flex; align-items: center; gap: 11px; font-family: var(--font-display); }
.brand-mark {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; flex: 0 0 auto;
  background: linear-gradient(150deg, var(--primary), var(--primary-d)); color: #042512; font-size: 16px; font-weight: 700;
}
.brand-text { font-size: 15px; font-weight: 700; letter-spacing: .1em; color: var(--muted); white-space: nowrap; }
.brand-text strong { color: var(--text); }

.mainnav { justify-self: center; display: flex; gap: 4px; }
.mainnav a {
  display: inline-flex; align-items: center; padding: 9px 16px; border-radius: 10px;
  color: var(--muted); font-weight: 600; font-size: 14.5px; transition: .14s; white-space: nowrap;
}
.mainnav a:hover { color: var(--text); background: var(--ink-700); }
.mainnav a.active { color: #042512; background: var(--primary); font-weight: 700; }

.topbar-actions { justify-self: end; display: flex; align-items: center; gap: 10px; }

.coinpill {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 10px; font-weight: 700; font-size: 14px;
  background: var(--ink-700); border: 1px solid var(--line-soft); color: var(--gold); transition: .15s; white-space: nowrap;
}
.coinpill:hover { border-color: rgba(255,201,77,.5); }
.coinpill b { color: var(--text); font-weight: 700; }
.coinpill.flash { animation: coinflash .6s ease; }
@keyframes coinflash { 0%,100%{transform:scale(1)} 40%{transform:scale(1.08)} }
.coin-ic { width: 18px; height: 18px; display: inline-block; vertical-align: middle; }
.coin-ic-sm { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }
.coin-ic-xs { width: 12px; height: 12px; display: inline-block; vertical-align: -1px; }
.store-bal .coin-ic { width: 26px; height: 26px; }

.iconbtn {
  width: 40px; height: 40px; border-radius: 10px; cursor: pointer; flex: 0 0 auto;
  background: var(--ink-700); border: 1px solid var(--line); color: var(--text); font-size: 17px;
  display: inline-grid; place-items: center; transition: .15s;
}
.iconbtn:hover { border-color: var(--primary); }
.iconbtn.muted { opacity: .55; }
.acctchip {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 10px; font-weight: 700; font-size: 14px;
  background: var(--ink-700); border: 1px solid var(--line); color: var(--text); transition: .15s; white-space: nowrap;
}
.acctchip:hover { border-color: var(--primary); }

/* sign-in gate: hide nav + actions until the player has an account */
body.gated .mainnav, body.gated .topbar-actions { display: none; }

.app { width: 100%; max-width: 1240px; margin: 0 auto; padding: clamp(22px, 3.4vw, 46px); min-width: 0; }

/* music popover — anchored top-right under the music button */
.music-panel {
  position: fixed; top: 64px; right: clamp(12px, 3vw, 32px); z-index: 120; width: 270px;
  background: var(--ink-700); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg);
  padding: 16px; opacity: 0; transform: translateY(-8px); transition: opacity .18s, transform .18s;
}
.music-panel.open { opacity: 1; transform: translateY(0); }
.music-panel[hidden] { display: none; }
.mp-label { font-size: 10px; font-weight: 700; letter-spacing: .18em; color: var(--primary); }
.mp-title { font-weight: 700; font-size: 15px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-artist { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.mp-btn { flex: 0 0 auto; border: 0; background: var(--ink-600); color: var(--text); width: 36px; height: 36px; border-radius: 10px; cursor: pointer; font-size: 15px; transition: .12s; }
.mp-btn:hover { background: var(--ink-500); }
.mp-row input[type="range"] { flex: 1; height: 6px; cursor: pointer; accent-color: var(--primary); -webkit-appearance: none; appearance: none; background: var(--ink-500); border-radius: 999px; }
.mp-row input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--primary); border: 2px solid var(--ink-800); cursor: pointer; }
.mp-row input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--primary); border: 2px solid var(--ink-800); cursor: pointer; }

/* =====================================================================
   PRIMITIVES
   ===================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 22px; border-radius: 12px; border: 1px solid var(--line);
  font-weight: 700; font-size: 15px; cursor: pointer; transition: .15s; background: var(--ink-600); color: var(--text);
}
.btn:hover { transform: translateY(-1px); background: var(--ink-500); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); color: #042512; border-color: transparent; box-shadow: 0 10px 26px -12px rgba(43,229,122,.7); }
.btn-primary:hover { background: #3df089; }
.btn-accent { background: var(--azure); color: #fff; border-color: transparent; }
.btn-accent:hover { background: #639dff; }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--ink-700); }
.btn-lg { padding: 15px 28px; font-size: 16px; border-radius: 14px; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }

.card { background: var(--ink-700); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: clamp(18px, 2.6vw, 26px); }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--ink-600); border: 1px solid var(--line-soft); color: var(--muted); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.section-title { font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 36px 0 16px; }

/* =====================================================================
   HOME
   ===================================================================== */
.hero {
  position: relative; overflow: hidden; border-radius: 24px; border: 1px solid var(--line-soft);
  padding: clamp(28px, 5vw, 64px); margin-bottom: 8px; box-shadow: var(--shadow-lg);
  background: var(--ink-700);
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(80% 120% at 90% -15%, rgba(43,229,122,.15), transparent 55%),
    linear-gradient(180deg, var(--ink-700), var(--ink-800));
}
.hero-inner { position: relative; z-index: 1; max-width: 640px; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 12px; letter-spacing: .16em; color: var(--primary); text-transform: uppercase; margin-bottom: 16px; }
.hero h1 { font-size: clamp(40px, 6vw, 74px); font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.hero h1 .grad { color: var(--primary); }
.hero p.lead { color: var(--text); opacity: .85; font-size: 18px; max-width: 46ch; margin: 18px 0 26px; }
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

.stat-strip { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.stat-strip .s { background: rgba(5,7,10,.5); border: 1px solid var(--line-soft); border-radius: 14px; padding: 12px 18px; backdrop-filter: blur(4px); }
.stat-strip .s b { font-family: var(--font-display); font-weight: 700; font-size: 24px; display: block; color: var(--text); }
.stat-strip .s span { color: var(--muted); font-size: 12px; }

.mode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.mode-card {
  position: relative; padding: 22px; border-radius: var(--radius);
  background: var(--ink-700); border: 1px solid var(--line-soft); transition: .18s; overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column;
}
.mode-card:hover { transform: translateY(-3px); border-color: var(--primary); }
.mode-card .ic { font-size: 28px; margin-bottom: 14px; }
.mode-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.mode-card p { color: var(--muted); font-size: 13.5px; margin: 0; }
.mode-card .soon { position: absolute; top: 14px; right: 14px; font-size: 10px; font-weight: 700; letter-spacing: .1em; color: var(--gold); border: 1px solid rgba(255,201,77,.4); padding: 3px 7px; border-radius: 999px; }
.mode-card .go { margin-top: 16px; color: var(--primary); font-weight: 700; font-size: 13px; }

.step-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 14px; }
.step { padding: 22px; border-radius: var(--radius); background: var(--ink-700); border: 1px solid var(--line-soft); }
.step .n { font-family: var(--font-display); font-weight: 700; font-size: 30px; color: var(--primary); }
.step h3 { font-size: 16px; margin: 8px 0 6px; }
.step p { color: var(--muted); font-size: 13.5px; margin: 0; }

/* =====================================================================
   PAGE HEADER (generic)
   ===================================================================== */
.build-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.build-head h1 { font-size: 30px; font-weight: 700; letter-spacing: -.01em; }

.formation-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--ink-700); border: 1px solid var(--line-soft); border-radius: 12px; padding: 4px; gap: 2px; }
.seg button { border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; padding: 7px 13px; border-radius: 8px; cursor: pointer; transition: .15s; }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--primary); color: #042512; }

/* =====================================================================
   BUILD VIEW
   ===================================================================== */
.build-layout { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(300px,1fr); gap: 22px; align-items: start; }
.pitch-wrap { background: var(--ink-700); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; justify-content: center; position: sticky; top: 22px; }
.pitch {
  position: relative; width: min(100%, 460px); aspect-ratio: 68/100; border-radius: 14px; overflow: hidden;
  background: radial-gradient(120% 60% at 50% 0%, rgba(255,255,255,.05), transparent 40%), repeating-linear-gradient(180deg, #15814b 0 10%, #117141 10% 20%);
  border: 2px solid rgba(255,255,255,.14);
}
.pitch .markings { position: absolute; inset: 10px; border: 2px solid rgba(255,255,255,.26); border-radius: 6px; }
.pitch .center-line { position: absolute; left: 10px; right: 10px; top: 50%; height: 2px; background: rgba(255,255,255,.26); }
.pitch .center-circle { position: absolute; left: 50%; top: 50%; width: 26%; aspect-ratio: 1; transform: translate(-50%,-50%); border: 2px solid rgba(255,255,255,.26); border-radius: 50%; }
.pitch .box { position: absolute; left: 50%; transform: translateX(-50%); width: 52%; height: 13%; border: 2px solid rgba(255,255,255,.24); }
.pitch .box.top { top: 10px; border-top: 0; }
.pitch .box.bottom { bottom: 10px; border-bottom: 0; }

.slot { position: absolute; transform: translate(-50%, -50%); width: 16%; min-width: 78px; cursor: pointer; user-select: none; display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; }
.slot .jersey { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: rgba(6,9,12,.6); backdrop-filter: blur(2px); border: 2px dashed rgba(255,255,255,.4); color: rgba(255,255,255,.8); font-size: 22px; transition: .15s; }
.slot.filled .jersey { border-style: solid; border-color: rgba(255,255,255,.85); background: linear-gradient(180deg, #ffffff, #e7edf0); color: var(--ink-900); }
.slot:hover .jersey { transform: scale(1.07); border-color: var(--primary); }
.slot .pos-tag { font-size: 10px; font-weight: 700; letter-spacing: .06em; color: #042512; background: var(--primary); padding: 1px 7px; border-radius: 999px; }
.slot.filled .pos-tag { background: var(--gold); color: #1a1404; }
.slot .nm { font-size: 11px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 4px rgba(0,0,0,.85); }
.slot .ov { font-size: 11px; font-weight: 800; color: var(--gold); }
.slot .flag { width: 18px; height: 12px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.3); }
.slot .jersey-img { position: relative; }
.slot .ovbadge { position: absolute; top: -7px; right: -7px; background: var(--ink-900); color: var(--gold); font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 6px; border: 1px solid var(--line); font-family: var(--font-display); }

.ratings { display: grid; gap: 15px; }
.bigov { display: flex; align-items: center; gap: 18px; }
.bigov .num { font-family: var(--font-display); font-size: 62px; font-weight: 700; line-height: .9; }
.bigov .num small { font-size: 13px; color: var(--muted); font-weight: 600; display: block; letter-spacing: .18em; }
.meter .lab { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.meter .lab b { font-weight: 800; font-family: var(--font-display); }
.meter .bar { height: 8px; border-radius: 999px; background: var(--ink-600); overflow: hidden; }
.meter .bar > i { display: block; height: 100%; border-radius: 999px; background: var(--primary); transition: width .4s; }
.meter.att .bar > i { background: var(--att); }
.meter.def .bar > i { background: var(--def); }
.meter.chem .bar > i { background: var(--primary); }
.meter.exp .bar > i { background: var(--gold); }
.squad-meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.squad-meta b { color: var(--text); }

/* picker drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(2,4,6,.66); backdrop-filter: blur(3px); z-index: 80; display: none; }
.drawer-backdrop.open { display: block; }
.drawer { position: fixed; top: 0; right: 0; height: 100%; width: min(470px, 94vw); z-index: 90; background: var(--ink-800); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column; }
.drawer.open { transform: translateX(0); }
.drawer header { padding: 18px 20px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; }
.drawer header h3 { font-size: 17px; font-weight: 700; }
.drawer .search { padding: 14px 20px 6px; }
.drawer .search input { width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--ink-700); color: var(--text); font-size: 14px; }
.drawer .list { overflow-y: auto; padding: 8px 12px 20px; display: grid; gap: 8px; }
.x-btn { border: 0; background: var(--ink-600); color: var(--text); width: 34px; height: 34px; border-radius: 9px; cursor: pointer; font-size: 16px; }

.prow { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--ink-700); border: 1px solid var(--line-soft); cursor: pointer; transition: .12s; }
.prow:hover { border-color: var(--primary); transform: translateX(-2px); }
.prow.picked { opacity: .42; }
.prow.unafford { opacity: .5; cursor: not-allowed; }
.prow.unafford:hover { transform: none; border-color: var(--line-soft); }
.prow.locked { background: var(--ink-900); border-color: var(--line-soft); }
.prow.locked .av, .prow.locked .info, .prow.locked .ovn { opacity: .35; filter: grayscale(.6); }
.prow.locked:hover { border-color: rgba(255,201,77,.45); }
.prow.locked .lockbadge { opacity: 1; }
.prow .lockbadge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--gold); background: rgba(255,201,77,.1); border: 1px solid rgba(255,201,77,.3); padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.prow .av { width: 42px; height: 42px; border-radius: 10px; background: var(--ink-500); display: grid; place-items: center; font-weight: 800; }
.prow .av img { width: 24px; height: 16px; border-radius: 2px; }
.prow .info { min-width: 0; }
.prow .info .nm { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 7px; }
.prow .info .nm img { width: 18px; height: 12px; border-radius: 2px; }
.prow .info .sub { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .rt { text-align: right; }
.prow .rt .ovn { font-family: var(--font-display); font-weight: 700; font-size: 21px; color: var(--gold); }
.prow .rt .fit { font-size: 11px; font-weight: 700; }
.fit-good { color: var(--good); } .fit-ok { color: var(--warn); } .fit-bad { color: var(--bad); }
.prow .cost { font-size: 12px; color: var(--primary); font-weight: 700; }

/* =====================================================================
   RESULTS
   ===================================================================== */
.result-head { text-align: center; margin-bottom: 26px; }
.result-head .headline { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 5vw, 52px); letter-spacing: -.01em; }
.result-head .headline .pct { color: var(--gold); }
.result-head .sub { color: var(--muted); margin-top: 8px; }
.record { display: flex; justify-content: center; gap: 12px; margin: 20px 0 4px; flex-wrap: wrap; }
.rec { min-width: 100px; padding: 14px 20px; border-radius: 14px; background: var(--ink-700); border: 1px solid var(--line-soft); }
.rec b { font-family: var(--font-display); font-weight: 700; font-size: 36px; display: block; line-height: 1; }
.rec span { font-size: 11px; letter-spacing: .14em; color: var(--muted); }
.rec.win b { color: var(--primary); }
.rec.draw b { color: var(--text); }
.rec.loss b { color: var(--bad); }
.rec.loss.zero b { color: var(--primary); }
.rec.loss.zero { border-color: rgba(43,229,122,.4); }
.unbeaten { display: inline-block; margin-top: 14px; padding: 9px 18px; border-radius: 999px; background: rgba(43,229,122,.12); border: 1px solid rgba(43,229,122,.4); color: var(--primary); font-weight: 700; font-size: 13px; letter-spacing: .04em; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 14px; margin: 22px 0; }
.kpi { padding: 20px; border-radius: var(--radius); background: var(--ink-700); border: 1px solid var(--line-soft); text-align: center; }
.kpi b { font-family: var(--font-display); font-weight: 700; font-size: 32px; display: block; }
.kpi span { color: var(--muted); font-size: 13px; }
.kpi.win { border-color: rgba(255,201,77,.35); }
.kpi.win b { color: var(--gold); }
.progress { height: 30px; border-radius: 999px; background: var(--ink-700); border: 1px solid var(--line-soft); overflow: hidden; position: relative; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary-d), var(--primary)); transition: width .6s; }
.progress .ptxt { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.dist { display: grid; gap: 8px; margin-top: 8px; }
.dist .row { display: grid; grid-template-columns: 130px 1fr 56px; gap: 10px; align-items: center; font-size: 13px; }
.dist .row .bar { height: 14px; background: var(--ink-600); border-radius: 999px; overflow: hidden; }
.dist .row .bar > i { display: block; height: 100%; background: var(--primary); }
.dist .row.champ .bar > i { background: var(--gold); }
.dist .row b { text-align: right; font-weight: 700; }
.rounds { display: grid; gap: 18px; }
.round h4 { font-family: var(--font-display); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.match { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; padding: 11px 14px; border-radius: 12px; background: var(--ink-700); border: 1px solid var(--line-soft); margin-bottom: 8px; }
.match .team { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.match .team.right { justify-content: flex-end; }
.match .team img { width: 22px; height: 15px; border-radius: 2px; }
.match .team.win { color: var(--text); font-weight: 800; }
.match .team.lose { color: var(--faint); }
.match .you { box-shadow: inset 0 0 0 1px var(--primary); }
.match .score { font-family: var(--font-display); font-weight: 700; font-size: 19px; min-width: 64px; text-align: center; }
.match .score small { display: block; font-size: 10px; color: var(--muted); font-weight: 700; }
.match.is-you { border-color: rgba(43,229,122,.5); background: linear-gradient(180deg, rgba(43,229,122,.07), var(--ink-700)); }
.groups-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 12px; }
.gtable { background: var(--ink-700); border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px; }
.gtable h5 { font-family: var(--font-display); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.gtable .gr { display: grid; grid-template-columns: 18px 1fr 28px 28px; gap: 6px; font-size: 12px; padding: 3px 0; }
.gtable .gr.head { color: var(--faint); font-weight: 700; }
.gtable .gr.qual { color: var(--good); font-weight: 700; }
.gtable .gr.you { color: var(--primary); font-weight: 800; }
.gtable .gr img { width: 16px; height: 11px; border-radius: 2px; }

/* =====================================================================
   STORE · COINS · SIGN-IN · BADGES
   ===================================================================== */
.store-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.store-bal { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 30px; color: var(--gold); }
.tier-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.scard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--ink-700); border: 1px solid var(--line-soft); }
.scard.owned { border-color: rgba(43,229,122,.4); }
.scard .ov { font-family: var(--font-display); font-weight: 700; font-size: 26px; min-width: 38px; text-align: center; }
.scard .ov.hi { color: var(--gold); }
.scard .meta { flex: 1; min-width: 0; }
.scard .meta .nm { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.scard .meta .nm img { width: 18px; height: 12px; border-radius: 2px; }
.scard .meta .sub { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scard .buy { font-size: 13px; font-weight: 700; padding: 8px 12px; border-radius: 10px; border: 0; cursor: pointer; white-space: nowrap; }
.scard .buy.can { background: var(--primary); color: #042512; }
.scard .buy.cant { background: var(--ink-600); color: var(--faint); cursor: not-allowed; }
.scard .buy.have { background: transparent; color: var(--good); border: 1px solid rgba(43,229,122,.4); cursor: default; }

.coinpack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px,1fr)); gap: 14px; }
.packcard { position: relative; padding: 24px 18px 18px; border-radius: 16px; text-align: center; background: var(--ink-700); border: 1px solid var(--line-soft); display: flex; flex-direction: column; align-items: center; gap: 3px; transition: .18s; }
.packcard:hover { transform: translateY(-3px); border-color: var(--line); }
.packcard.feature { border-color: rgba(255,201,77,.5); box-shadow: inset 0 0 0 1px rgba(255,201,77,.18); }
.packtag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 11px; font-weight: 700; letter-spacing: .05em; padding: 4px 10px; border-radius: 999px; background: var(--gold); color: #1a1404; }
.packcoin { width: 52px; height: 52px; filter: drop-shadow(0 6px 12px rgba(0,0,0,.4)); margin-bottom: 4px; }
.packamt { font-family: var(--font-display); font-weight: 700; font-size: 28px; color: var(--text); }
.packsub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.packbuy { margin-top: auto; }

.signin-wrap { max-width: 440px; margin: 40px auto; }
.signin-card { padding: 34px 30px; text-align: center; }
.signin-card .crest { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; margin: 0 auto; background: linear-gradient(150deg, var(--primary), var(--primary-d)); color: #042512; font-size: 30px; }
.signin-card h1 { font-size: 28px; font-weight: 700; margin: 10px 0 6px; }
.signin-card p.sub { color: var(--muted); margin: 0 0 24px; }
.prov-list { display: grid; gap: 12px; }
.prov-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 13px 18px; border-radius: 12px; font-weight: 700; font-size: 15px; cursor: pointer; border: 1px solid var(--line); background: #fff; color: #1f1f1f; transition: .15s; }
.prov-btn:hover { transform: translateY(-1px); filter: brightness(.97); }
.prov-btn .ic { width: 20px; height: 20px; display: inline-grid; place-items: center; font-weight: 900; }
.prov-btn.facebook { background: #1877f2; color: #fff; border-color: transparent; }
.prov-btn.guest { background: var(--ink-600); color: var(--text); border-color: var(--line); }
.prov-btn.disabled { opacity: .55; cursor: not-allowed; }
.prov-note { font-size: 11px; color: var(--faint); margin-top: 3px; }
#googleBtn { display: flex; justify-content: center; min-height: 44px; }
.or-div { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; margin: 20px 0; }
.or-div::before, .or-div::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.guest-row { display: flex; gap: 8px; }
.guest-row input { all: unset; flex: 1; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--ink-800); font-size: 14px; }
.signin-foot { color: var(--faint); font-size: 12px; margin-top: 22px; line-height: 1.6; }

.badge-row { display: flex; gap: 10px; flex-wrap: wrap; }
.badge { display: flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 12px; background: var(--ink-700); border: 1px solid var(--line-soft); font-weight: 600; font-size: 13px; }
.badge.locked { opacity: .4; }
.badge .ic { font-size: 18px; }

/* =====================================================================
   MISC
   ===================================================================== */
.loading { display: grid; place-items: center; gap: 16px; padding: 60px 0; text-align: center; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--ink-600); border-top-color: var(--primary); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { padding: 14px 16px; border-radius: 12px; background: rgba(255,176,32,.09); border: 1px solid rgba(255,176,32,.28); color: #ffd98a; font-size: 14px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--ink-500); border: 1px solid var(--line); padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 200; transition: .25s; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.footer { display: none; }

/* =====================================================================
   LAUNCH SPLASH
   ===================================================================== */
.splash {
  position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center;
  background: radial-gradient(58% 55% at 50% 42%, #0e1d15, var(--ink-900) 72%);
  transition: opacity .5s ease, transform .5s ease;
  animation: splashSafety 1ms linear 6s forwards; /* safety net if JS never hides it */
}
.splash.hide { opacity: 0; transform: scale(1.06); pointer-events: none; }
@keyframes splashSafety { to { opacity: 0; visibility: hidden; pointer-events: none; } }
.splash-inner { display: grid; justify-items: center; gap: 16px; }
.splash-badge { position: relative; width: 112px; height: 112px; display: grid; place-items: center; }
.splash-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(43,229,122,.2); border-top-color: var(--primary); animation: splashSpin 1.1s linear infinite; }
.splash-crest {
  width: 70px; height: 70px; border-radius: 20px; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--primary), var(--primary-d)); color: #042512; font-size: 32px;
  box-shadow: 0 16px 44px -12px rgba(43,229,122,.65); animation: splashPop .7s cubic-bezier(.2,1.35,.4,1) both;
}
.splash-word { font-family: var(--font-display); font-weight: 700; font-size: clamp(24px,5vw,40px); letter-spacing: .12em; color: var(--text); opacity: 0; animation: splashUp .55s ease .35s both; }
.splash-sub { font-family: var(--font-display); font-weight: 600; font-size: 12px; letter-spacing: .4em; text-indent: .4em; color: var(--primary); opacity: 0; animation: splashUp .55s ease .55s both; }
.splash-bar { width: 190px; height: 3px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; opacity: 0; animation: splashUp .5s ease .7s both; }
.splash-bar > i { display: block; height: 100%; width: 0; background: var(--primary); border-radius: 999px; animation: splashLoad 1.6s ease .8s forwards; }
@keyframes splashSpin { to { transform: rotate(360deg); } }
@keyframes splashPop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes splashUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes splashLoad { to { width: 100%; } }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 820px) {
  .topbar { display: flex; flex-wrap: wrap; gap: 10px 12px; padding: 10px 14px; }
  .brand { order: 1; }
  .topbar-actions { order: 2; margin-left: auto; }
  .mainnav { order: 3; flex-basis: 100%; justify-content: center; overflow-x: auto; }
  .mainnav a { padding: 8px 13px; font-size: 13.5px; }
  .build-layout { grid-template-columns: 1fr; }
  .pitch-wrap { position: static; }
}
@media (max-width: 480px) {
  .brand-text { display: none; }
  .slot { width: 20%; min-width: 64px; }
  .slot .jersey { width: 46px; height: 46px; }
}
