/* ==================================================================
   PICK'EM — arcade energy, premium surface.
   Type follows Oura: PP Editorial New and Akkurat are licensed, so
   this ships their closest free equivalents — Instrument Serif for
   display, Instrument Sans for everything operational.
   Near-black ground, scarlet as the only loud colour, hairline
   edges, soft elevation, big serif numerals. Mobile first: this is
   played with a thumb on a Sunday.
   ================================================================== */
:root {
  --bg: #08080A;
  --bg-2: #0C0C11;
  --surface: #121217;
  --surface-2: #17171E;
  --surface-3: #1F1F28;
  --line: rgba(255,255,255,.07);
  --line-2: rgba(255,255,255,.14);
  --ink: #F5F5F3;
  --ink-soft: #B9B9C1;
  --ink-mute: #7C7C88;
  --ink-dim: #4C4C58;
  --accent: #E4222B;            /* Buckeye scarlet */
  --accent-lift: #FF4A43;       /* scarlet that still reads as text on black */
  --accent-soft: rgba(228,34,43,.13);
  --accent-line: rgba(228,34,43,.42);
  --grey: #A7A9AC;              /* Buckeye grey */
  --turf: #0C3D24;
  --win: #35D07F;
  --win-soft: rgba(53,208,127,.12);
  --loss: #FF7A45;
  --loss-soft: rgba(255,122,69,.12);
  --push: #9A9AA5;
  --push-soft: rgba(154,154,165,.12);
  --live: #FF4A43;

  --display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --ui: "Instrument Sans", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --r: 14px;
  --r-sm: 10px;
  --r-xs: 7px;
  --pill: 999px;
  --e1: 0 1px 2px rgba(0,0,0,.5);
  --e2: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.8);
  --e3: 0 2px 4px rgba(0,0,0,.4), 0 24px 60px -20px rgba(0,0,0,.9);
  --glow: 0 0 24px -4px rgba(228,34,43,.5);
  --nav-h: 60px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--ui); font-size: 15px; line-height: 1.5; letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 90% 50% at 50% -12%, rgba(228,34,43,.20), transparent 68%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 44%);
}
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
input, select, textarea { font: inherit; color: var(--ink); }
img { display: block; }
:focus-visible { outline: 2px solid var(--accent-lift); outline-offset: 2px; border-radius: 4px; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.serif { font-family: var(--display); font-weight: 400; }
.hide { display: none !important; }
.mute { color: var(--ink-mute); }
.eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-mute);
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  padding: 0 clamp(14px, 3vw, 32px); height: 58px;
  background: rgba(8,8,10,.72); backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.wordmark { display: flex; align-items: baseline; gap: 8px; text-decoration: none; }
.wordmark__mark {
  width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
  box-shadow: var(--glow); align-self: center;
}
.wordmark__text { font-family: var(--display); font-size: 21px; letter-spacing: -.01em; }
.wordmark__season { font-size: 12px; color: var(--ink-mute); font-variant-numeric: tabular-nums; }

.tabs { display: flex; gap: 1px; margin-left: 10px; }
.tab {
  padding: 8px 13px; border-radius: var(--pill); font-size: 14px; font-weight: 500; color: var(--ink-mute);
  transition: color .18s ease, background .18s ease;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); background: var(--surface-2); }

.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sync { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-mute); }
.sync__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-dim); }
.sync--live .sync__dot { background: var(--win); box-shadow: 0 0 12px -1px var(--win); }
.sync--connecting .sync__dot { background: var(--grey); }
.sync--error .sync__dot { background: var(--loss); }

.me {
  display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: var(--pill);
  border: 1px solid var(--line-2); background: var(--surface); font-weight: 500; font-size: 13px;
  transition: border-color .18s ease, background .18s ease;
}
.me:hover { border-color: rgba(255,255,255,.26); background: var(--surface-2); }
.me__label { color: var(--ink-mute); }

.avatar {
  --c: var(--ink-soft);
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c);
  font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 42%, transparent);
}
.avatar--lg { width: 40px; height: 40px; font-size: 12px; }
.avatar--xl { width: 60px; height: 60px; font-size: 16px; }

/* ---------- bottom nav (mobile) ---------- */
.bottomnav {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: rgba(8,8,10,.86); backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottomnav__inner { display: grid; grid-template-columns: repeat(5, 1fr); height: var(--nav-h); }
.bottomnav .tab {
  border-radius: 0; display: grid; place-items: center; align-content: center; gap: 5px;
  font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 6px 0;
}
.bottomnav .tab svg { width: 21px; height: 21px; }
.bottomnav .tab[aria-selected="true"] { background: none; color: var(--ink); }
.bottomnav .tab[aria-selected="true"] svg { color: var(--accent-lift); }

/* ---------- page ---------- */
.page { max-width: 1200px; margin: 0 auto; padding: 18px clamp(14px, 3vw, 32px) 80px; }
.section { margin-top: 34px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section__title { font-family: var(--display); font-size: 26px; font-weight: 400; letter-spacing: -.015em; margin: 0; }
.section__sub { color: var(--ink-mute); font-size: 13px; }
.rules { color: var(--ink-soft); font-size: 14px; max-width: 70ch; }
.rules p { margin: 0 0 12px; }
.rules b { color: var(--ink); font-weight: 600; }

/* ---------- week strip ---------- */
.weekstrip { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 12px; scroll-snap-type: x proximity; }
.weekstrip::-webkit-scrollbar { display: none; }
.wk {
  flex: none; min-width: 44px; height: 40px; border-radius: var(--r-sm); display: grid; place-items: center;
  font-size: 14px; font-variant-numeric: tabular-nums; color: var(--ink-mute);
  border: 1px solid transparent; position: relative; scroll-snap-align: center;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.wk:hover { background: var(--surface); color: var(--ink); }
.wk--done { color: var(--ink-soft); }
.wk--done::after { content: ""; position: absolute; bottom: 6px; width: 3px; height: 3px; border-radius: 50%; background: var(--ink-dim); }
.wk--live::after { content: ""; position: absolute; bottom: 6px; width: 4px; height: 4px; border-radius: 50%; background: var(--live); box-shadow: 0 0 8px var(--live); }
.wk--now { border-color: var(--line-2); color: var(--ink); }
.wk[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }
.wk[aria-selected="true"]::after { background: var(--bg); box-shadow: none; }

/* ---------- week hero ---------- */
.field {
  position: relative; overflow: hidden; border-radius: var(--r); border: 1px solid var(--line);
  box-shadow: var(--e2); padding: 26px 24px 22px;
  background:
    radial-gradient(ellipse 60% 100% at 8% 110%, rgba(12,61,36,.55), transparent 62%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 22px 32px; align-items: end;
}
.field::before { /* yard lines, whispered */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.055) 0 1px, transparent 1px 9%);
  mask-image: linear-gradient(180deg, transparent, #000 70%);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 70%);
}
.field > * { position: relative; z-index: 1; }
.hero__title {
  font-family: var(--display); font-weight: 400; font-size: clamp(46px, 9vw, 78px); line-height: .95;
  letter-spacing: -.03em; margin: 0; text-wrap: balance;
}
.hero__title small {
  display: block; font-family: var(--ui); font-size: 11px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-mute); margin-bottom: 12px;
}
.hero__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; color: var(--ink-soft); font-size: 13px; }
.hero__meta > span { display: inline-flex; align-items: center; gap: 6px; }
.hero__meta > span + span::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--ink-dim); margin-right: 8px; }
.hero__meta .num { color: var(--ink); font-weight: 600; }
.livepill { color: var(--live); font-weight: 600; }
.livepill::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--live); box-shadow: 0 0 10px var(--live); animation: breathe 1.8s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tile {
  --c: var(--ink-soft);
  position: relative; padding: 13px 14px 12px; border-radius: var(--r-sm); background: rgba(8,8,10,.5);
  border: 1px solid var(--line); min-width: 0; backdrop-filter: blur(8px);
}
.tile--lead { border-color: var(--accent-line); background: linear-gradient(180deg, var(--accent-soft), rgba(8,8,10,.5)); }
.tile__name { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.tile__pos { margin-left: auto; font-size: 11px; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.tile--lead .tile__pos { color: var(--accent-lift); }
.tile__big { font-family: var(--display); font-size: 34px; line-height: 1; margin-top: 10px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile__big small { font-family: var(--ui); font-size: 12px; color: var(--ink-mute); margin-left: 7px; letter-spacing: 0; }
.tile__sub { font-size: 12px; color: var(--ink-mute); margin-top: 7px; display: flex; gap: 10px; flex-wrap: wrap; }
.tile__sub b { color: var(--ink-soft); font-weight: 600; }

/* ---------- pots ---------- */
.pots { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; margin-top: 8px; }
.pot { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.pot__amt { font-family: var(--display); font-size: 30px; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pot__amt small { display: block; font-family: var(--ui); font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); margin-top: 6px; white-space: nowrap; }
.pot__txt { font-size: 13px; color: var(--ink-soft); line-height: 1.4; }
.pot__txt b { color: var(--ink); font-weight: 600; }
.pot__k { display: block; font-size: 10px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 3px; }

/* ---------- toolbar / buttons ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px; border-radius: var(--pill); min-height: 40px;
  border: 1px solid var(--line-2); background: var(--surface); font-weight: 500; font-size: 13px; line-height: 1;
  white-space: nowrap; transition: border-color .18s ease, background .18s ease, transform .1s ease;
}
.btn:hover { border-color: rgba(255,255,255,.28); background: var(--surface-2); }
.btn:active { transform: scale(.975); }
.btn:disabled { opacity: .45; }
.btn--primary { background: var(--accent); color: #fff; border-color: transparent; box-shadow: var(--glow); font-weight: 600; }
.btn--primary:hover { background: var(--accent-lift); border-color: transparent; }
.btn--blue { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }
.btn--ghost { border-color: transparent; background: transparent; color: var(--ink-soft); }
.btn--ghost:hover { background: var(--surface); color: var(--ink); }
.btn--danger { color: var(--loss); }
.btn--sm { padding: 7px 11px; font-size: 12px; min-height: 32px; }
.btn--px { letter-spacing: 0; }
.btn svg { width: 15px; height: 15px; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- slate ---------- */
.slate { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.slate__day {
  margin: 18px 0 4px; display: flex; align-items: center; gap: 14px;
  font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute);
}
.slate__day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.slate__day:first-child { margin-top: 0; }
.game {
  display: grid; grid-template-columns: minmax(0, 1fr) 128px auto; align-items: center; gap: 14px;
  padding: 8px 14px 8px 8px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  transition: border-color .18s ease;
}
.game--live { border-color: var(--accent-line); box-shadow: inset 0 0 40px -24px var(--accent-lift); }
.game--final { background: var(--bg-2); }
.game--dup { border-color: rgba(255,255,255,.2); }
.matchup { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 4px; min-width: 0; }
.side {
  --c: var(--ink-soft);
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: var(--r-sm); min-width: 0;
  text-align: left; min-height: 56px; border: 1px solid transparent; position: relative;
  transition: background .18s ease, border-color .18s ease, opacity .18s ease;
}
.side--home { flex-direction: row-reverse; text-align: right; }
.side:not(:disabled):hover { background: var(--surface-2); }
.side:disabled { cursor: default; }
.side--mine {
  border-color: color-mix(in srgb, var(--me-c, var(--accent)) 55%, transparent);
  background: color-mix(in srgb, var(--me-c, var(--accent)) 11%, transparent);
}
.side--loser { opacity: .4; }
.side--covered .side__abbr { color: var(--win); }
.side--dup .side__abbr::after {
  content: "DUP"; margin-left: 7px; font-family: var(--ui); font-size: 9px; font-weight: 700; letter-spacing: .08em;
  color: var(--ink-mute); vertical-align: 2px;
}
.side__logo { width: 32px; height: 32px; flex: none; }
.side__txt { min-width: 0; }
.side__abbr { font-size: 15px; font-weight: 600; letter-spacing: -.01em; line-height: 1.1; }
.side__meta { font-size: 12px; color: var(--ink-mute); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.side__meta b { color: var(--ink); font-weight: 600; }
.side__score { font-family: var(--display); font-size: 27px; line-height: 1; min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; }
.side__score--w { color: var(--ink); }
.side__score--l { color: var(--ink-dim); }
.at { font-size: 11px; color: var(--ink-dim); text-align: center; }

.gstatus { text-align: center; font-size: 12px; color: var(--ink-mute); line-height: 1.5; }
.gstatus b { display: block; color: var(--ink-soft); font-weight: 600; }
.gstatus--live b { color: var(--live); }
.gstatus--final b { color: var(--ink-mute); font-weight: 500; }
.gstatus .line {
  display: inline-block; margin-top: 5px; padding: 3px 9px; border-radius: var(--pill);
  background: var(--surface-3); color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums;
}
.gstatus .line--pk { color: var(--ink-soft); font-weight: 500; }

.picks { display: grid; grid-template-columns: repeat(4, 50px); gap: 5px; }
.chip {
  --c: var(--ink-soft);
  height: 50px; border-radius: var(--r-xs); display: grid; place-items: center; align-content: center; gap: 3px;
  background: var(--bg-2); border: 1px solid var(--line); position: relative; overflow: hidden;
}
.chip__who { font-size: 9px; font-weight: 700; letter-spacing: .07em; color: var(--c); text-transform: uppercase; }
.chip__pick { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1; }
.chip--empty .chip__pick { color: var(--ink-dim); }
.chip--win { border-color: rgba(53,208,127,.4); background: var(--win-soft); }
.chip--win .chip__pick { color: var(--win); }
.chip--loss { background: var(--loss-soft); border-color: rgba(255,122,69,.28); }
.chip--loss .chip__pick { color: var(--loss); text-decoration: line-through; text-decoration-thickness: 1px; }
.chip--push .chip__pick { color: var(--push); }
.chip--me { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 60%, transparent); }
.chip--dup::after {
  content: ""; position: absolute; top: 4px; right: 4px; width: 4px; height: 4px; border-radius: 50%;
  background: var(--ink-soft);
}

.game__tools { grid-column: 1 / -1; display: flex; gap: 4px; justify-content: flex-end; padding-top: 6px; border-top: 1px solid var(--line); flex-wrap: wrap; }

.empty {
  padding: 44px 24px; text-align: center; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--ink-soft);
  display: grid; gap: 14px; justify-items: center;
}
.empty h3 { font-family: var(--display); font-weight: 400; font-size: 24px; margin: 0; letter-spacing: -.02em; }
.empty p { margin: 0; max-width: 48ch; color: var(--ink-mute); font-size: 14px; }

/* ---------- dups ---------- */
.draft { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.draft__slot {
  --c: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 13px 5px 5px; border-radius: var(--pill);
  background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 500;
}
.draft__slot i { font-style: normal; font-size: 11px; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.duplist { display: grid; gap: 6px; margin-top: 14px; }
.dup {
  --c: var(--ink-soft);
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px; padding: 10px 12px;
  border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); min-height: 60px;
}
.dup--taken { border-color: color-mix(in srgb, var(--c) 40%, transparent); }
.dup--started { opacity: .5; }
.dup img { width: 32px; height: 32px; }
.dup__team { font-size: 15px; font-weight: 600; }
.dup__team small { display: block; font-size: 12px; font-weight: 400; color: var(--ink-mute); margin-top: 3px; }
.dup__pts { font-family: var(--display); font-size: 24px; letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dup__owner { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.rank {
  min-width: 60px; height: 38px; padding: 0 12px; border-radius: var(--pill); border: 1px solid var(--line-2);
  background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--ink-soft);
  display: inline-grid; place-items: center; transition: border-color .18s ease, background .18s ease;
}
.rank:hover:not(:disabled) { border-color: rgba(255,255,255,.3); color: var(--ink); }
.rank--on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.rank:disabled { opacity: .4; }

/* ---------- LMS ---------- */
.lms { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 8px; }
.lmsrow {
  --c: var(--ink-soft);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); min-height: 64px;
}
.lmsrow--out { opacity: .45; }
.lmsrow__pick {
  display: flex; align-items: center; gap: 11px; min-width: 0; text-align: left; padding: 5px 7px;
  border-radius: var(--r-sm); border: 1px solid transparent; min-height: 44px; transition: background .18s ease, border-color .18s ease;
}
.lmsrow__pick:not(:disabled):hover { background: var(--surface-2); border-color: var(--line); }
.lmsrow__pick img { width: 30px; height: 30px; }
.lmsrow__team { font-size: 15px; font-weight: 600; }
.lmsrow__team span { font-weight: 400; color: var(--ink-mute); font-size: 12px; }
.lmsrow__sub { font-size: 12px; color: var(--ink-mute); margin-top: 3px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--pill);
  font-size: 11px; font-weight: 600; letter-spacing: .04em; background: var(--surface-3); color: var(--ink-soft); white-space: nowrap;
}
.badge--win { background: var(--win-soft); color: var(--win); box-shadow: inset 0 0 0 1px rgba(53,208,127,.28); }
.badge--loss { background: var(--loss-soft); color: var(--loss); box-shadow: inset 0 0 0 1px rgba(255,122,69,.24); }
.badge--push { background: var(--push-soft); color: var(--push); }
.badge--accent { background: var(--accent-soft); color: var(--accent-lift); box-shadow: inset 0 0 0 1px var(--accent-line); }
.badge--money { background: var(--ink); color: var(--bg); font-variant-numeric: tabular-nums; }

/* ---------- standings ---------- */
.board { display: grid; gap: 6px; }
.row {
  --c: var(--ink-soft);
  display: grid; grid-template-columns: 30px auto 1fr repeat(4, minmax(70px, auto)) 170px; align-items: center; gap: 16px;
  padding: 14px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.row--lead { border-color: var(--accent-line); background: linear-gradient(100deg, var(--accent-soft), var(--surface) 42%); }
.row__rank { font-family: var(--display); font-size: 22px; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.row--lead .row__rank { color: var(--accent-lift); }
.row__name { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.row__name small { display: block; font-size: 12px; color: var(--ink-mute); font-weight: 400; margin-top: 3px; font-variant-numeric: tabular-nums; }
.stat { text-align: right; }
.stat__v { font-family: var(--display); font-size: 24px; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat__v.money { color: var(--ink); }
.stat__k { font-size: 10px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: var(--ink-mute); margin-top: 6px; }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 32px; }
.spark i { flex: 1; min-width: 3px; border-radius: 1px; background: color-mix(in srgb, var(--c) 70%, transparent); }
.spark i.spark--none { background: var(--surface-3); height: 2px !important; }
.spark i.spark--best { background: var(--c); box-shadow: 0 0 8px -1px var(--c); }

.grid { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.sheet { border-collapse: collapse; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
.sheet th, .sheet td { padding: 10px 13px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.sheet th { font-size: 10px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: var(--ink-mute); background: var(--bg-2); }
.sheet th:first-child, .sheet td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); color: var(--ink-mute); }
.sheet th:first-child { background: var(--bg-2); }
.sheet tr:last-child td { border-bottom: 0; }
.sheet td.win { color: var(--win); font-weight: 600; }
.sheet td.out { color: var(--ink-dim); }
.sheet td.money { color: var(--bg); background: var(--ink); font-weight: 700; }
.sheet td.roll { color: var(--ink-soft); }
.sheet td.best { color: var(--ink); font-weight: 700; background: rgba(255,255,255,.045); }
.sheet td.dim { color: var(--ink-dim); }
.sheet tfoot td { border-top: 1px solid var(--line-2); font-weight: 700; color: var(--ink); background: var(--bg-2); }
.sheet tfoot td:first-child { background: var(--bg-2); font-weight: 600; }
.sheet .pname { color: var(--c); }
.sheet tr.round td { background: var(--bg); color: var(--ink-mute); font-size: 10px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; text-align: left; }
.sheet tr.round td:first-child { background: var(--bg); }

/* ---------- money ---------- */
.moneytiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mt {
  --c: var(--ink-soft);
  padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); min-width: 0; position: relative; overflow: hidden;
}
.mt::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--c); opacity: .8; }
.mt__name { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.mt__big { font-family: var(--display); font-size: 32px; margin-top: 10px; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.mt__sub { font-size: 12px; color: var(--ink-mute); margin-top: 8px; font-variant-numeric: tabular-nums; }
.mt__sub .neg { color: var(--loss); }
.mt__sub .pos { color: var(--win); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 8px; }
.card { padding: 16px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.card h4 { margin: 0 0 12px; font-size: 10px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: var(--ink-mute); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; font-size: 13px; margin: 0; }
.kv dt { color: var(--ink-mute); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.pred {
  --c: var(--ink-soft);
  display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; padding: 11px 13px;
  border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); min-height: 62px;
}
.pred__big { font-family: var(--display); font-size: 24px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pred__big small { display: block; font-family: var(--ui); font-size: 12px; color: var(--ink-mute); margin-top: 4px; letter-spacing: 0; }

/* ---------- forms ---------- */
.field-row { display: grid; gap: 7px; font-size: 13px; }
.field-row > span { color: var(--ink-mute); font-weight: 500; font-size: 12px; }
.input, select.input {
  width: 100%; padding: 11px 13px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--bg-2);
  color: var(--ink); font-size: 15px; min-height: 44px; font-variant-numeric: tabular-nums;
  transition: border-color .18s ease;
}
.input:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { font-size: 12px; min-height: 130px; font-family: ui-monospace, Menlo, monospace; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.form__actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.form__actions .btn--danger { margin-right: auto; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: end center; background: rgba(4,4,6,.7); backdrop-filter: blur(8px); }
.modal__box {
  width: 100%; max-height: 92dvh; overflow: auto; background: var(--surface); border: 1px solid var(--line-2);
  border-bottom: 0; border-radius: 20px 20px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom, 0));
  box-shadow: var(--e3); animation: sheet .28s cubic-bezier(.32,.72,0,1);
}
@keyframes sheet { from { transform: translateY(14px); opacity: 0; } }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.modal__title { font-family: var(--display); font-weight: 400; font-size: 24px; margin: 0; letter-spacing: -.02em; }
.modal__close { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-mute); background: var(--surface-2); }
.modal__close:hover { background: var(--surface-3); color: var(--ink); }
.modal__close svg { width: 17px; height: 17px; }
@media (min-width: 700px) {
  .modal { place-items: center; padding: 16px; }
  .modal__box { width: min(560px, 100%); border-bottom: 1px solid var(--line-2); border-radius: var(--r); padding: 22px; }
  .modal__box--wide { width: min(780px, 100%); }
}

.teamgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 7px; }
.teamtile {
  --c: var(--ink-soft);
  display: grid; justify-items: center; gap: 7px; padding: 11px 5px 9px; border-radius: var(--r-sm);
  background: var(--bg-2); border: 1px solid var(--line); min-height: 86px;
  transition: border-color .18s ease, background .18s ease;
}
.teamtile:hover:not(:disabled) { border-color: color-mix(in srgb, var(--c) 55%, transparent); background: var(--surface-2); }
.teamtile:disabled { opacity: .3; }
.teamtile--on { border-color: var(--ink); background: var(--surface-3); }
.teamtile img { width: 32px; height: 32px; }
.teamtile b { font-size: 13px; font-weight: 600; }
.teamtile small { font-size: 10px; color: var(--ink-mute); }

/* ---------- identity gate ---------- */
.gate { position: fixed; inset: 0; z-index: 90; background: var(--bg); display: grid; place-items: center; padding: 24px; overflow: auto; }
.gate::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 50% at 50% -8%, rgba(228,34,43,.3), transparent 66%); }
.gate__box { position: relative; width: min(660px, 100%); display: grid; gap: 30px; justify-items: center; text-align: center; }
.gate__title {
  font-family: var(--display); font-weight: 400; font-size: clamp(56px, 15vw, 104px); line-height: .92;
  letter-spacing: -.04em; margin: 0;
}
.gate__title small {
  display: block; font-family: var(--ui); font-size: 11px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-mute); margin-bottom: 18px;
}
.gate__prompt { font-size: 13px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); }
.gate__who { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; }
.who {
  --c: var(--ink-soft);
  display: grid; justify-items: center; gap: 14px; padding: 24px 10px 20px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .2s cubic-bezier(.32,.72,0,1), border-color .18s ease, background .18s ease;
}
.who:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 50%, transparent); background: var(--surface-2); }
.who b { font-size: 15px; font-weight: 600; }
.who small { font-size: 11px; color: var(--ink-mute); letter-spacing: .06em; }

/* ---------- toast ---------- */
.toasts { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom, 0)); transform: translateX(-50%); z-index: 120; display: grid; gap: 8px; pointer-events: none; width: max-content; max-width: 92vw; }
.toast {
  padding: 11px 16px; border-radius: var(--pill); background: var(--ink); color: var(--bg); font-weight: 600; font-size: 13px;
  box-shadow: var(--e3); animation: toast .26s cubic-bezier(.32,.72,0,1); text-align: center;
}
.toast--bad { background: var(--loss); color: #21100A; }
@keyframes toast { from { opacity: 0; transform: translateY(10px) scale(.96); } }

/* ---------- responsive ---------- */
@media (min-width: 861px) { .toasts { bottom: 26px; } }
@media (max-width: 1000px) {
  .row { grid-template-columns: 28px auto 1fr repeat(3, minmax(58px, auto)); gap: 13px; padding: 12px 14px; }
  .row .spark, .row .stat--wide { display: none; }
}
@media (max-width: 860px) {
  .topbar { height: 54px; }
  .topbar .tabs { display: none; }
  .bottomnav { display: block; }
  .page { padding-bottom: calc(var(--nav-h) + 40px); padding-top: 14px; }
  .field { grid-template-columns: 1fr; padding: 20px 16px 16px; gap: 18px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game { grid-template-columns: 1fr; gap: 8px; padding: 8px; }
  .gstatus { display: flex; justify-content: center; gap: 10px; align-items: center; flex-wrap: wrap; }
  .gstatus b { display: inline; }
  .gstatus .line { margin: 0; }
  .picks { grid-template-columns: repeat(4, 1fr); }
  .chip { height: 46px; }
  .side { min-height: 58px; }
  .me__label { display: none; }
  .gate__who { grid-template-columns: repeat(2, 1fr); }
  .moneytiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dup { grid-template-columns: auto 1fr auto; }
  .dup__owner { grid-column: 2 / -1; justify-self: start; }
  .lms { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .row { grid-template-columns: 24px auto 1fr auto; }
  .row .stat:not(.stat--money) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
