/* PWHL Fantasy — "center ice, broadcast night"
 *
 * Two visual sources: the rink (cool white ice, red and blue lines, faceoff circles, rounded boards)
 * and the TV broadcast package (dark score bugs, scoreboard numerals, the goal light).
 *  - Pages sit on ice; live/important moments (scores, matchups, draft clock, league banner)
 *    are dark broadcast panels in both themes, so they read as "on air".
 *  - Colour roles: violet = brand/action, goal red = live/urgent/danger, blue line = links/info,
 *    gold = trophies/winners/your pick, green = positive actions. Positions: F green, D blue, G gold.
 *  - Lilita One for headings and every score/clock digit; Nunito for reading; small caps for labels.
 *  - Corners echo the boards: 18px cards, pill buttons, chips and tabs.
 * Fonts are shared with alanpep.com. Light is the default; dark follows the OS ("arena at night").
 */

:root {
  /* Ice */
  --bg: #EEF3F8;
  --bg-2: #E4EBF3;
  --surface: #FFFFFF;
  --surface-2: #F5F8FB;
  --surface-3: #EAF0F6;
  --line: #DAE2EC;
  --line-strong: #C6D1DE;
  --ink: #101A33;
  --ink-2: #2B3652;
  --muted: #5A6681;

  /* Brand and signals */
  --violet: #3A1C85;
  --violet-2: #5631C4;
  --violet-ink: #FFFFFF;
  --violet-soft: #ECE6FB;
  --violet-line: #CDBFF3;
  --goal: #C22B20;
  --goal-soft: #FCE7E5;
  --blueline: #1F5CC4;
  --blueline-soft: #E3EDFC;
  --gold: #8A5A06;
  --gold-bright: #F2C25B;
  --gold-soft: #FCF1D6;
  --green: #11795A;
  --green-soft: #DDF2E9;

  /* Positions */
  --pos-F: #13866A;
  --pos-D: #2462CF;
  --pos-G: #A9640A;

  /* Broadcast panels (dark in both themes) */
  --bug-1: #1E1150;
  --bug-2: #2E1B78;
  --bug-ink: #FFFFFF;
  --bug-muted: #B9B0E6;
  --bug-line: rgb(255 255 255 / 14%);
  --bug-tile: rgb(255 255 255 / 7%);

  --shadow-sm: 0 1px 2px rgb(16 26 51 / 6%);
  --shadow: 0 1px 2px rgb(16 26 51 / 5%), 0 6px 22px rgb(16 26 51 / 7%);
  --shadow-lg: 0 18px 50px rgb(16 26 51 / 22%);

  --font-display: 'Lilita One', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 18px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0A17;
    --bg-2: #100E21;
    --surface: #16142B;
    --surface-2: #1C1936;
    --surface-3: #232042;
    --line: #2C2851;
    --line-strong: #3A3566;
    --ink: #EEECF8;
    --ink-2: #D2CEEA;
    --muted: #A29DC2;
    --violet: #A58BFF;
    --violet-2: #BBA7FF;
    --violet-ink: #120D2A;
    --violet-soft: #251D4E;
    --violet-line: #4B3D8F;
    --goal: #FF5D51;
    --goal-soft: #3A1C22;
    --blueline: #79A8FF;
    --blueline-soft: #172744;
    --gold: #F2C25B;
    --gold-soft: #33290F;
    --green: #4CC99C;
    --green-soft: #12302A;
    --pos-F: #3FC19A;
    --pos-D: #6EA0FF;
    --pos-G: #F0B24D;
    --bug-1: #17113D;
    --bug-2: #241760;
    --shadow-sm: none;
    --shadow: 0 1px 0 rgb(255 255 255 / 3%) inset, 0 8px 24px rgb(0 0 0 / 30%);
    --shadow-lg: 0 20px 60px rgb(0 0 0 / 55%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] { color-scheme: dark; }

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 500 16px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
a { color: var(--blueline); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--violet-2); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; margin: 0 0 .55rem; letter-spacing: .005em; color: var(--ink); }
h1 { font-size: clamp(1.75rem, 4.6vw, 2.5rem); }
h2 { font-size: 1.32rem; }
h3 { font-size: 1.06rem; }
p { margin: 0 0 .75rem; }
b, strong { font-weight: 800; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--violet-2); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--violet-soft); }
[hidden] { display: none !important; }

/* Small caps labels: table headers, eyebrows, chips */
.eyebrow, .table th, .stats dt, .sb-status, .badge, .tag, .status-chip, .section-title::before {
  font-family: var(--font-body);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.eyebrow { font-size: .74rem; color: var(--muted); margin: 0 0 .25rem; }

/* ── Shell: top bar with a jersey-hem stripe ── */
.topbar {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem max(16px, calc((100vw - 1200px) / 2));
  background: linear-gradient(100deg, var(--bug-1), var(--bug-2));
  color: var(--bug-ink);
}
.topbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 6px;
  background: linear-gradient(var(--gold-bright) 0 2px, transparent 2px 4px, #FFFFFF 4px 6px);
  opacity: .9;
}
.brand { display: flex; align-items: center; gap: .6rem; color: inherit; text-decoration: none; }
.brand:hover { color: inherit; }
.brand-mark { width: 42px; height: 26px; flex: none; transition: transform .25s var(--ease); }
.brand:hover .brand-mark { transform: translateX(3px); }
.brand-word { font-family: var(--font-display); font-size: 1.42rem; letter-spacing: .01em; line-height: 1; }
.brand-pwhl { color: var(--gold-bright); }
.userbar { display: flex; align-items: center; gap: .75rem; }
.userbar-name { font-weight: 800; color: var(--bug-muted); }
.userbar .btn--ghost { color: var(--bug-ink); border-color: rgb(255 255 255 / 35%); background: transparent; box-shadow: none; }
.userbar .btn--ghost:hover { background: rgb(255 255 255 / 10%); border-color: rgb(255 255 255 / 60%); }

main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 1.6rem 16px 3.5rem; }
.footer { text-align: center; color: var(--muted); font-size: .84rem; padding: 1.4rem 16px 1.8rem; border-top: 1px solid var(--line); background: var(--bg-2); }
.footer p { margin: 0 0 .25rem; }

/* ── Layout and cards (rounded like the boards) ── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.card.compact { padding: .95rem 1.05rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.card-head h2 { margin: 0; }
.card-head select { width: auto; max-width: 100%; font-weight: 800; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 0 1rem; }
.row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.stack { display: grid; gap: .85rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; }
.page-title { margin-bottom: .2rem; }
.section-title { display: flex; align-items: center; gap: .6rem; margin: 1.5rem 0 .7rem; font-size: 1.15rem; }
.section-title::before { content: ''; width: 18px; height: 4px; border-radius: 2px; background: var(--goal); }
.link { font-weight: 800; text-decoration: none; }
.link:hover { text-decoration: underline; }
.sticky-actions { position: sticky; bottom: 0; z-index: 5; padding: .8rem 0; background: linear-gradient(transparent, var(--bg) 35%); }
blockquote { margin: .6rem 0; padding: .55rem .85rem; border-left: 3px solid var(--violet-line); background: var(--surface-2); border-radius: 0 var(--radius-xs) var(--radius-xs) 0; color: var(--ink-2); font-style: italic; }

/* Empty states: a puck on clean ice */
.empty {
  text-align: center; padding: 2.6rem 1.25rem 2.2rem; margin-bottom: 1rem;
  color: var(--muted); background: var(--surface-2);
  border: 2px dashed var(--line-strong); border-radius: var(--radius);
}
.empty::before { content: ''; display: block; width: 56px; height: 35px; margin: 0 auto .9rem; background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2064%2040%27%3E%20%3Cpath%20d%3D%27M6%2014v10c0%206%2011.6%2011%2026%2011s26-5%2026-11V14%27%20fill%3D%27%23A9B4CC%27%2F%3E%20%3Cellipse%20cx%3D%2732%27%20cy%3D%2714%27%20rx%3D%2726%27%20ry%3D%2711%27%20fill%3D%27%23C9D2E3%27%2F%3E%20%3Cellipse%20cx%3D%2732%27%20cy%3D%2714%27%20rx%3D%2717%27%20ry%3D%276.5%27%20fill%3D%27none%27%20stroke%3D%27%23A9B4CC%27%20stroke-width%3D%272%27%2F%3E%20%3C%2Fsvg%3E") center / contain no-repeat; opacity: .9; }
.empty p { max-width: 34rem; margin: 0 auto .75rem; font-weight: 600; }
.loading { padding: 2.5rem; text-align: center; color: var(--muted); font-weight: 700; }
.loading::before { content: ''; display: inline-block; width: 14px; height: 14px; margin-right: .5rem; vertical-align: -1px; border-radius: 50%; border: 3px solid var(--line-strong); border-top-color: var(--violet-2); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Forms ── */
label { display: grid; gap: .32rem; font-weight: 800; font-size: .9rem; color: var(--ink-2); }
input, select, textarea {
  width: 100%; min-height: 2.6rem; padding: .55rem .75rem;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--ink);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet-2); background: var(--surface); box-shadow: 0 0 0 4px var(--violet-soft); }
input:disabled, select:disabled { opacity: .65; cursor: not-allowed; }
.form-error { color: var(--goal); font-weight: 800; margin: 0; min-height: 1em; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .85rem; }
.filters input[type="search"] { flex: 1 1 220px; width: auto; }
.filters select { width: auto; flex: 0 1 auto; }
.settings label { margin-bottom: .8rem; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .5rem 1rem; }
.num-input { max-width: 10rem; }
.deadline-field .muted { margin-top: -.3rem; }
.radio, .check { display: flex; align-items: center; gap: .55rem; font-weight: 700; padding: .45rem .25rem; border-radius: var(--radius-xs); cursor: pointer; }
.radio:hover, .check:hover { background: var(--surface-2); }
.radio input, .check input { width: 1.05rem; height: 1.05rem; min-height: 0; accent-color: var(--violet-2); flex: none; }
.drop-list, .pick-list { max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .3rem .5rem; margin-bottom: .8rem; background: var(--surface); }
.switch { display: flex; align-items: center; gap: .45rem; font-weight: 800; color: var(--bug-ink); cursor: pointer; }
.switch input { width: 1.1rem; height: 1.1rem; min-height: 0; accent-color: var(--gold-bright); }

/* ── Buttons: chunky like the alanpep.com homepage cards ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 2.55rem; padding: .55rem 1.05rem;
  border: 1.5px solid var(--violet-line); border-radius: 999px;
  background: var(--surface); color: var(--violet);
  font-weight: 800; text-decoration: none; white-space: nowrap; cursor: pointer;
  box-shadow: 0 2px 0 var(--violet-line);
  transition: transform .12s var(--ease), background .15s, box-shadow .12s, border-color .15s;
}
.btn:hover:not(:disabled) { background: var(--violet-soft); color: var(--violet); border-color: var(--violet-2); }
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 0 0 var(--violet-line); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn--primary { background: var(--violet); border-color: var(--violet); color: var(--violet-ink); box-shadow: 0 3px 0 color-mix(in srgb, var(--violet) 60%, #000); }
.btn--primary:hover:not(:disabled) { background: var(--violet-2); border-color: var(--violet-2); color: var(--violet-ink); }
.btn--primary:active:not(:disabled) { box-shadow: 0 0 0 transparent; }
.btn--danger { border-color: color-mix(in srgb, var(--goal) 45%, transparent); color: var(--goal); box-shadow: 0 2px 0 color-mix(in srgb, var(--goal) 30%, transparent); }
.btn--danger:hover:not(:disabled) { background: var(--goal-soft); border-color: var(--goal); color: var(--goal); }
.btn--warn { border-color: var(--gold); color: var(--gold); box-shadow: 0 2px 0 color-mix(in srgb, var(--gold) 40%, transparent); }
.btn--warn:hover:not(:disabled) { background: var(--gold-soft); border-color: var(--gold); color: var(--gold); }
.btn--sm.btn--warn { background: var(--gold); border-color: var(--gold); color: #fff; box-shadow: 0 2px 0 color-mix(in srgb, var(--gold) 55%, #000); }
.btn--sm.btn--warn:hover:not(:disabled) { filter: brightness(1.08); background: var(--gold); color: #fff; }
.btn--ghost { border-color: var(--line-strong); color: var(--ink-2); background: transparent; box-shadow: none; }
.btn--ghost:hover:not(:disabled) { background: var(--surface-2); border-color: var(--muted); color: var(--ink); }
.btn--sm { min-height: 2.05rem; padding: .28rem .8rem; font-size: .84rem; }
.queue-btn.is-queued { background: var(--violet-soft); border-color: var(--violet-2); }
.icon-btn { border: 0; background: none; cursor: pointer; padding: .2rem .45rem; border-radius: var(--radius-xs); color: var(--muted); font-weight: 800; line-height: 1.2; }
.icon-btn:hover:not(:disabled) { background: var(--surface-3); color: var(--ink); }
.icon-btn:disabled { opacity: .3; cursor: default; }

/* ── Chips, badges, tags ── */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); font-size: .7rem; white-space: nowrap; }
.badge--drafting, .badge--pending, .badge--review { background: var(--gold-soft); color: var(--gold); }
.badge--season, .badge--playoffs, .badge--completed { background: var(--green-soft); color: var(--green); }
.badge--complete { background: var(--violet-soft); color: var(--violet); }
.badge--rejected, .badge--vetoed, .badge--failed { background: var(--goal-soft); color: var(--goal); }
.badge--cancelled { background: var(--surface-3); color: var(--muted); }
.tag { display: inline-block; margin-left: .45rem; padding: .05rem .45rem; border-radius: 999px; font-size: .62rem; background: var(--violet-soft); color: var(--violet); vertical-align: 2px; }
.pos { display: inline-grid; place-items: center; min-width: 1.55rem; height: 1.15rem; padding: 0 .3rem; border-radius: 5px; font-size: .68rem; font-weight: 900; letter-spacing: .03em; color: #fff; background: var(--pos-F); }
.pos--D { background: var(--pos-D); }
.pos--G { background: var(--pos-G); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pos { color: #0B0A17; } }
.live { color: var(--goal); font-weight: 800; }
.live-dot, .dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--goal); box-shadow: 0 0 0 0 color-mix(in srgb, var(--goal) 60%, transparent); animation: goal-light 1.6s infinite; }
.dot { margin-left: .4rem; vertical-align: 1px; }
@keyframes goal-light {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--goal) 55%, transparent); }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.est { margin-left: .25rem; padding: 0 .28rem; border-radius: 4px; font-size: .6rem; font-style: normal; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; background: var(--blueline-soft); color: var(--blueline); vertical-align: 1px; }
.proj-est { font-style: italic; color: var(--muted); cursor: help; white-space: nowrap; }

/* ── Sign-in ── */
.auth { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; padding-top: 1.5rem; }
.auth-hero { position: relative; padding: 2rem 0; }
.rink-art {
  position: absolute; inset: -6% -4% auto -4%; aspect-ratio: 1000 / 440; z-index: -1;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%201000%20440%27%3E%20%3Crect%20x%3D%276%27%20y%3D%276%27%20width%3D%27988%27%20height%3D%27428%27%20rx%3D%27150%27%20fill%3D%27none%27%20stroke%3D%27%237C8FB8%27%20stroke-opacity%3D%27.45%27%20stroke-width%3D%275%27%2F%3E%20%3Crect%20x%3D%27497%27%20y%3D%276%27%20width%3D%276%27%20height%3D%27428%27%20fill%3D%27%23E8453A%27%20fill-opacity%3D%27.42%27%2F%3E%20%3Crect%20x%3D%27330%27%20y%3D%276%27%20width%3D%2712%27%20height%3D%27428%27%20fill%3D%27%232F6BD6%27%20fill-opacity%3D%27.32%27%2F%3E%20%3Crect%20x%3D%27658%27%20y%3D%276%27%20width%3D%2712%27%20height%3D%27428%27%20fill%3D%27%232F6BD6%27%20fill-opacity%3D%27.32%27%2F%3E%20%3Crect%20x%3D%2786%27%20y%3D%2720%27%20width%3D%273%27%20height%3D%27400%27%20fill%3D%27%23E8453A%27%20fill-opacity%3D%27.35%27%2F%3E%20%3Crect%20x%3D%27911%27%20y%3D%2720%27%20width%3D%273%27%20height%3D%27400%27%20fill%3D%27%23E8453A%27%20fill-opacity%3D%27.35%27%2F%3E%20%3Cg%20fill%3D%27none%27%20stroke-width%3D%273.5%27%3E%20%3Ccircle%20cx%3D%27500%27%20cy%3D%27220%27%20r%3D%2774%27%20stroke%3D%27%232F6BD6%27%20stroke-opacity%3D%27.38%27%2F%3E%20%3Ccircle%20cx%3D%27190%27%20cy%3D%27110%27%20r%3D%2758%27%20stroke%3D%27%23E8453A%27%20stroke-opacity%3D%27.3%27%2F%3E%20%3Ccircle%20cx%3D%27190%27%20cy%3D%27330%27%20r%3D%2758%27%20stroke%3D%27%23E8453A%27%20stroke-opacity%3D%27.3%27%2F%3E%20%3Ccircle%20cx%3D%27810%27%20cy%3D%27110%27%20r%3D%2758%27%20stroke%3D%27%23E8453A%27%20stroke-opacity%3D%27.3%27%2F%3E%20%3Ccircle%20cx%3D%27810%27%20cy%3D%27330%27%20r%3D%2758%27%20stroke%3D%27%23E8453A%27%20stroke-opacity%3D%27.3%27%2F%3E%20%3C%2Fg%3E%20%3Cpath%20d%3D%27M89%20196a26%2026%200%200%201%200%2048z%27%20fill%3D%27%232F6BD6%27%20fill-opacity%3D%27.22%27%2F%3E%20%3Cpath%20d%3D%27M911%20196a26%2026%200%200%200%200%2048z%27%20fill%3D%27%232F6BD6%27%20fill-opacity%3D%27.22%27%2F%3E%20%3Cg%20fill%3D%27%23E8453A%27%20fill-opacity%3D%27.45%27%3E%20%3Ccircle%20cx%3D%27500%27%20cy%3D%27220%27%20r%3D%276%27%2F%3E%3Ccircle%20cx%3D%27190%27%20cy%3D%27110%27%20r%3D%276%27%2F%3E%3Ccircle%20cx%3D%27190%27%20cy%3D%27330%27%20r%3D%276%27%2F%3E%20%3Ccircle%20cx%3D%27810%27%20cy%3D%27110%27%20r%3D%276%27%2F%3E%3Ccircle%20cx%3D%27810%27%20cy%3D%27330%27%20r%3D%276%27%2F%3E%20%3Ccircle%20cx%3D%27392%27%20cy%3D%27110%27%20r%3D%275%27%2F%3E%3Ccircle%20cx%3D%27392%27%20cy%3D%27330%27%20r%3D%275%27%2F%3E%3Ccircle%20cx%3D%27608%27%20cy%3D%27110%27%20r%3D%275%27%2F%3E%3Ccircle%20cx%3D%27608%27%20cy%3D%27330%27%20r%3D%275%27%2F%3E%20%3C%2Fg%3E%20%3C%2Fsvg%3E") center / contain no-repeat;
  opacity: .38;
  mask-image: radial-gradient(ellipse at 40% 50%, #000 40%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 40% 50%, #000 40%, transparent 75%);
}
.hero-title { font-size: clamp(2.3rem, 6.4vw, 3.9rem); color: var(--violet); line-height: 1; margin-bottom: .9rem; }
.hero-text { font-size: 1.15rem; color: var(--ink-2); max-width: 32rem; font-weight: 600; }
.hero-points { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .55rem; color: var(--ink-2); }
.hero-points li { position: relative; padding-left: 1.6rem; }
.hero-points li::before { content: ''; position: absolute; left: 0; top: .45em; width: .8rem; height: .8rem; border-radius: 50%; border: 3px solid var(--goal); }
.auth-card { padding: 1.4rem; box-shadow: var(--shadow-lg); border-color: transparent; }
.segmented { display: flex; background: var(--surface-3); border-radius: 999px; padding: 4px; margin-bottom: 1.1rem; }
.segmented button { flex: 1; border: 0; background: none; padding: .55rem; border-radius: 999px; font-weight: 800; cursor: pointer; color: var(--muted); transition: background .15s, color .15s; }
.segmented button[aria-selected="true"] { background: var(--surface); color: var(--violet); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }

/* ── Home ── */
.league-list { display: grid; gap: .7rem; margin: 1.1rem 0 1.6rem; }
.league-card {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin: 0; padding-left: 1.5rem; color: inherit; text-decoration: none; overflow: hidden;
  transition: transform .15s var(--ease), border-color .15s, box-shadow .15s;
}
.league-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: linear-gradient(var(--violet), var(--blueline)); }
.league-card:hover { color: inherit; border-color: var(--violet-line); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.league-card h2 { margin: 0 0 .15rem; }
.league-card p { margin: 0; }

/* ── League banner: a broadcast panel over centre ice ── */
.league-head {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1.35rem 1.4rem 1.25rem;
  border-radius: var(--radius);
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%201200%20240%27%20preserveAspectRatio%3D%27xMidYMid%20slice%27%3E%20%3Cg%20fill%3D%27none%27%20stroke-width%3D%274%27%3E%20%3Ccircle%20cx%3D%27600%27%20cy%3D%27120%27%20r%3D%2792%27%20stroke%3D%27%238FB4FF%27%20stroke-opacity%3D%27.32%27%2F%3E%20%3Ccircle%20cx%3D%27120%27%20cy%3D%2758%27%20r%3D%2750%27%20stroke%3D%27%23FF6B5E%27%20stroke-opacity%3D%27.22%27%2F%3E%20%3Ccircle%20cx%3D%27120%27%20cy%3D%27182%27%20r%3D%2750%27%20stroke%3D%27%23FF6B5E%27%20stroke-opacity%3D%27.22%27%2F%3E%20%3Ccircle%20cx%3D%271080%27%20cy%3D%2758%27%20r%3D%2750%27%20stroke%3D%27%23FF6B5E%27%20stroke-opacity%3D%27.22%27%2F%3E%20%3Ccircle%20cx%3D%271080%27%20cy%3D%27182%27%20r%3D%2750%27%20stroke%3D%27%23FF6B5E%27%20stroke-opacity%3D%27.22%27%2F%3E%20%3C%2Fg%3E%20%3Crect%20x%3D%27330%27%20y%3D%270%27%20width%3D%2714%27%20height%3D%27240%27%20fill%3D%27%238FB4FF%27%20fill-opacity%3D%27.26%27%2F%3E%20%3Crect%20x%3D%27856%27%20y%3D%270%27%20width%3D%2714%27%20height%3D%27240%27%20fill%3D%27%238FB4FF%27%20fill-opacity%3D%27.26%27%2F%3E%20%3Crect%20x%3D%27596%27%20y%3D%270%27%20width%3D%278%27%20height%3D%27240%27%20fill%3D%27%23FF6B5E%27%20fill-opacity%3D%27.34%27%2F%3E%20%3Ccircle%20cx%3D%27600%27%20cy%3D%27120%27%20r%3D%277%27%20fill%3D%27%238FB4FF%27%20fill-opacity%3D%27.5%27%2F%3E%20%3C%2Fsvg%3E") center / cover no-repeat, linear-gradient(110deg, var(--bug-1), var(--bug-2));
  color: var(--bug-ink);
  box-shadow: var(--shadow);
}
.league-head .eyebrow { color: var(--bug-muted); }
.league-title { margin: 0; color: var(--bug-ink); text-shadow: 0 2px 0 rgb(0 0 0 / 25%); }
.status-chip {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .35rem .8rem; border-radius: 999px; font-size: .72rem;
  background: rgb(255 255 255 / 12%); color: var(--bug-ink); border: 1px solid var(--bug-line);
  backdrop-filter: blur(4px);
}
.status--drafting { background: rgb(215 54 43 / 25%); border-color: rgb(255 120 110 / 50%); }
.status--season, .status--playoffs { background: rgb(17 121 90 / 30%); border-color: rgb(110 220 180 / 40%); }
.status--complete { background: rgb(242 194 91 / 22%); border-color: rgb(242 194 91 / 55%); }

.tabs {
  display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none;
  margin: .9rem 0 1.2rem; padding: .3rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-sm);
}
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; display: inline-flex; align-items: center; padding: .48rem .95rem; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 800; white-space: nowrap; transition: background .15s, color .15s; }
.tab:hover { color: var(--ink); background: var(--surface-2); }
.tab[aria-current="page"] { color: var(--violet-ink); background: var(--violet); }

/* Overview pieces */
.callout { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--violet-soft), var(--blueline-soft)); border-color: var(--violet-line); }
.invite { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: .8rem; }
.invite-code {
  font: 400 1.9rem/1 var(--font-display); letter-spacing: .22em; padding: .55rem .5rem .55rem .9rem;
  background: var(--surface); color: var(--violet); border-radius: var(--radius-sm);
  border: 2px dashed var(--violet-line); user-select: all;
}
.banner { display: flex; align-items: center; gap: 1rem; background: linear-gradient(120deg, var(--gold-soft), var(--surface) 70%); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.banner h2 { margin: 0; }
.banner p { margin: 0; }
.trophy { font-size: 2.6rem; filter: drop-shadow(0 4px 6px rgb(185 123 14 / 35%)); }

/* ── Tables ── */
.table-wrap { overflow-x: auto; margin: 0 -.25rem; }
.table-wrap.tall { max-height: 62vh; overflow-y: auto; border-radius: var(--radius-sm); }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .92rem; }
.table th {
  position: sticky; top: 0; z-index: 1;
  text-align: left; font-size: .68rem; color: var(--muted);
  padding: .55rem .55rem; background: var(--surface); border-bottom: 2px solid var(--line);
}
.table td { padding: .55rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover td { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table td.num b { font-weight: 900; }
.table tr.is-mine td { background: var(--violet-soft); }
.table tr.is-mine td:first-child { box-shadow: inset 4px 0 0 var(--violet-2); }
.table tr.is-bench td { background: var(--surface-2); color: var(--ink-2); }
.table tr.is-bench .avatar { filter: saturate(.6); }
.table td.actions { white-space: nowrap; text-align: right; }
/* A table placed straight on the page (roster, player search) gets its own card */
.league-content > .table-wrap, .league-content > div > .table-wrap {
  margin: 0 0 1rem; padding: .35rem .65rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
/* Links inside tables are names, not prose: bold ink, underline on hover */
.table td a:not(.btn) { color: var(--ink); font-weight: 800; text-decoration: none; }
.table td a:not(.btn):hover { color: var(--violet-2); text-decoration: underline; }
@media (min-width: 761px) { .table td.actions .btn + .btn { margin-left: .35rem; } }

/* Player identity: position-ringed photo, name, position + team */
.player-row { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.player { display: grid; line-height: 1.22; min-width: 0; }
.player-name { font-weight: 800; color: var(--ink); text-decoration: none; }
.player-name:hover { color: var(--violet-2); text-decoration: underline; }
.player-meta { display: inline-flex; align-items: center; gap: .32rem; flex-wrap: wrap; font-size: .78rem; color: var(--muted); font-weight: 700; margin-top: .1rem; }
.player-inline { display: inline-flex; align-items: center; gap: .38rem; min-width: 0; }
.player-inline a { font-weight: 800; }
.avatar { flex: none; border-radius: 50%; object-fit: cover; background: var(--surface-3); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--line-strong); }
.avatar--md { width: 36px; height: 36px; margin: 4px; }
.avatar--sm { width: 22px; height: 22px; margin: 2px; box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 3px var(--line-strong); }
.ring--F { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--pos-F); }
.ring--D { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--pos-D); }
.ring--G { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--pos-G); }
.avatar--sm.ring--F { box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 3px var(--pos-F); }
.avatar--sm.ring--D { box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 3px var(--pos-D); }
.avatar--sm.ring--G { box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 3px var(--pos-G); }
.avatar--initials { display: inline-grid; place-items: center; font-weight: 900; color: var(--ink-2); }
.avatar--md.avatar--initials { font-size: .72rem; }
.avatar--sm.avatar--initials { font-size: .55rem; }
.team-tag { display: inline-flex; align-items: center; gap: .25rem; vertical-align: middle; }
.team-logo { width: 16px; height: 16px; object-fit: contain; flex: none; }
.lock { filter: grayscale(.2); }
.slot { display: inline-grid; place-items: center; min-width: 3.1rem; height: 1.65rem; padding: 0 .4rem; border-radius: var(--radius-xs); font-weight: 900; font-size: .74rem; letter-spacing: .04em; background: var(--surface-3); color: var(--ink-2); }
.slot-select { width: 5.3rem; min-height: 2.1rem; padding: .2rem .45rem; font-weight: 900; font-size: .85rem; }
.slot-select.is-changed { border-color: var(--gold); background: var(--gold-soft); }

/* ── Score bugs (overview + matchups): broadcast panels ── */
.scoreboard { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .7rem; }
.sb-game, .mu {
  position: relative; display: grid; gap: .3rem; padding: .8rem .95rem .75rem; margin: 0;
  border-radius: 14px; text-decoration: none; color: var(--bug-ink);
  background: linear-gradient(150deg, var(--bug-2), var(--bug-1));
  border: 1px solid var(--bug-line); box-shadow: var(--shadow);
  transition: transform .15s var(--ease), box-shadow .15s;
}
.sb-game:hover, .mu:hover { color: var(--bug-ink); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.sb-game.is-mine, .mu.is-mine { box-shadow: 0 0 0 2px var(--gold-bright), var(--shadow); }
.sb-team, .mu-side { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; font-weight: 800; }
.sb-name, .mu-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--bug-muted); }
.sb-score, .mu-score { font-family: var(--font-display); font-size: 1.45rem; line-height: 1; color: var(--bug-ink); }
.sb-team.is-winner .sb-name, .mu-side.is-winner .mu-name { color: var(--bug-ink); }
.sb-team.is-winner .sb-score, .mu-side.is-winner .mu-score { color: var(--gold-bright); }
.sb-team.is-winner .sb-name::after, .mu-side.is-winner .mu-name::after { content: ' ◂'; color: var(--gold-bright); }
.mu-vs { display: none; }
.sb-game .badge, .mu .badge { justify-self: start; background: rgb(242 194 91 / 20%); color: var(--gold-bright); }
.sb-status { justify-self: start; display: inline-flex; align-items: center; gap: .35rem; margin-top: .15rem; padding: .12rem .5rem; border-radius: 999px; font-size: .62rem; background: var(--bug-tile); color: var(--bug-muted); }
.sb-status.is-live { background: rgb(215 54 43 / 28%); color: #FFD9D5; }
.sb-status.is-live::before { content: ''; width: .42rem; height: .42rem; border-radius: 50%; background: #FF5D51; animation: goal-light 1.6s infinite; }
.sb-status.is-final { background: rgb(255 255 255 / 10%); color: var(--bug-ink); }
.games { list-style: none; margin: 0; padding: 0; }
.game { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .55rem .2rem; border-bottom: 1px solid var(--line); }
.game:last-child { border-bottom: 0; }
.game-teams { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: .02em; }
.week-nav { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.week-nav select { flex: 1; font-weight: 800; }
.matchups { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .8rem; }

/* Matchup jumbotron */
.mu-head {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; text-align: center;
  margin-top: .8rem; padding: 1.4rem 1.2rem; color: var(--bug-ink);
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%201200%20240%27%20preserveAspectRatio%3D%27xMidYMid%20slice%27%3E%20%3Cg%20fill%3D%27none%27%20stroke-width%3D%274%27%3E%20%3Ccircle%20cx%3D%27600%27%20cy%3D%27120%27%20r%3D%2792%27%20stroke%3D%27%238FB4FF%27%20stroke-opacity%3D%27.32%27%2F%3E%20%3Ccircle%20cx%3D%27120%27%20cy%3D%2758%27%20r%3D%2750%27%20stroke%3D%27%23FF6B5E%27%20stroke-opacity%3D%27.22%27%2F%3E%20%3Ccircle%20cx%3D%27120%27%20cy%3D%27182%27%20r%3D%2750%27%20stroke%3D%27%23FF6B5E%27%20stroke-opacity%3D%27.22%27%2F%3E%20%3Ccircle%20cx%3D%271080%27%20cy%3D%2758%27%20r%3D%2750%27%20stroke%3D%27%23FF6B5E%27%20stroke-opacity%3D%27.22%27%2F%3E%20%3Ccircle%20cx%3D%271080%27%20cy%3D%27182%27%20r%3D%2750%27%20stroke%3D%27%23FF6B5E%27%20stroke-opacity%3D%27.22%27%2F%3E%20%3C%2Fg%3E%20%3Crect%20x%3D%27330%27%20y%3D%270%27%20width%3D%2714%27%20height%3D%27240%27%20fill%3D%27%238FB4FF%27%20fill-opacity%3D%27.26%27%2F%3E%20%3Crect%20x%3D%27856%27%20y%3D%270%27%20width%3D%2714%27%20height%3D%27240%27%20fill%3D%27%238FB4FF%27%20fill-opacity%3D%27.26%27%2F%3E%20%3Crect%20x%3D%27596%27%20y%3D%270%27%20width%3D%278%27%20height%3D%27240%27%20fill%3D%27%23FF6B5E%27%20fill-opacity%3D%27.34%27%2F%3E%20%3Ccircle%20cx%3D%27600%27%20cy%3D%27120%27%20r%3D%277%27%20fill%3D%27%238FB4FF%27%20fill-opacity%3D%27.5%27%2F%3E%20%3C%2Fsvg%3E") center / cover no-repeat, radial-gradient(ellipse at 50% 0%, var(--bug-2), var(--bug-1) 70%);
  border: 1px solid var(--bug-line);
}
.mu-team-name { font-weight: 800; color: var(--bug-muted); margin-bottom: .2rem; }
.mu-big { font-family: var(--font-display); font-size: clamp(2.4rem, 8vw, 3.6rem); line-height: 1; color: var(--bug-ink); text-shadow: 0 3px 0 rgb(0 0 0 / 30%); }
.mu-team.is-winner .mu-big { color: var(--gold-bright); }
.mu-team.is-winner .mu-team-name { color: var(--bug-ink); }
.mu-mid { display: grid; gap: .45rem; justify-items: center; font-size: .82rem; }
.mu-mid .muted { color: var(--bug-muted); }

/* ── Draft room ── */
.card:has(> .draft-head) {
  color: var(--bug-ink); border-color: var(--bug-line);
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%201200%20240%27%20preserveAspectRatio%3D%27xMidYMid%20slice%27%3E%20%3Cg%20fill%3D%27none%27%20stroke-width%3D%274%27%3E%20%3Ccircle%20cx%3D%27600%27%20cy%3D%27120%27%20r%3D%2792%27%20stroke%3D%27%238FB4FF%27%20stroke-opacity%3D%27.32%27%2F%3E%20%3Ccircle%20cx%3D%27120%27%20cy%3D%2758%27%20r%3D%2750%27%20stroke%3D%27%23FF6B5E%27%20stroke-opacity%3D%27.22%27%2F%3E%20%3Ccircle%20cx%3D%27120%27%20cy%3D%27182%27%20r%3D%2750%27%20stroke%3D%27%23FF6B5E%27%20stroke-opacity%3D%27.22%27%2F%3E%20%3Ccircle%20cx%3D%271080%27%20cy%3D%2758%27%20r%3D%2750%27%20stroke%3D%27%23FF6B5E%27%20stroke-opacity%3D%27.22%27%2F%3E%20%3Ccircle%20cx%3D%271080%27%20cy%3D%27182%27%20r%3D%2750%27%20stroke%3D%27%23FF6B5E%27%20stroke-opacity%3D%27.22%27%2F%3E%20%3C%2Fg%3E%20%3Crect%20x%3D%27330%27%20y%3D%270%27%20width%3D%2714%27%20height%3D%27240%27%20fill%3D%27%238FB4FF%27%20fill-opacity%3D%27.26%27%2F%3E%20%3Crect%20x%3D%27856%27%20y%3D%270%27%20width%3D%2714%27%20height%3D%27240%27%20fill%3D%27%238FB4FF%27%20fill-opacity%3D%27.26%27%2F%3E%20%3Crect%20x%3D%27596%27%20y%3D%270%27%20width%3D%278%27%20height%3D%27240%27%20fill%3D%27%23FF6B5E%27%20fill-opacity%3D%27.34%27%2F%3E%20%3Ccircle%20cx%3D%27600%27%20cy%3D%27120%27%20r%3D%277%27%20fill%3D%27%238FB4FF%27%20fill-opacity%3D%27.5%27%2F%3E%20%3C%2Fsvg%3E") center / cover no-repeat, linear-gradient(110deg, var(--bug-1), var(--bug-2));
}
.card:has(> .draft-head) h2, .card:has(> .draft-head) .muted, .card:has(> .draft-head) p { color: inherit; }
.card:has(> .draft-head) .muted { color: var(--bug-muted); }
.card:has(> .draft-head) .btn:not(.btn--primary):not(.btn--warn) { background: rgb(255 255 255 / 8%); color: var(--bug-ink); border-color: rgb(255 255 255 / 30%); box-shadow: none; }
.card:has(> .draft-head) .btn:not(.btn--primary):not(.btn--warn):hover { background: rgb(255 255 255 / 16%); }
.card:has(> .draft-head) .btn--warn { background: transparent; color: var(--gold-bright); border-color: var(--gold-bright); box-shadow: none; }
.card:has(> .draft-head) .btn--warn:hover { background: rgb(242 194 91 / 14%); color: var(--gold-bright); }
.card:has(> .draft-head) .btn--primary { background: var(--gold-bright); border-color: var(--gold-bright); color: #1E1150; box-shadow: 0 3px 0 #A57A1C; }
.draft-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.on-clock h2 { margin: .1rem 0 0; font-size: 1.55rem; }
.on-clock p { margin: 0; }
.on-clock.is-me h2 { color: var(--gold-bright); }
.draft-controls { display: flex; align-items: center; gap: .8rem 1rem; flex-wrap: wrap; }
.clock-time {
  display: inline-block; margin-top: .35rem; padding: .1rem .7rem;
  font-family: var(--font-display); font-size: 3rem; line-height: 1.1; letter-spacing: .03em;
  background: rgb(0 0 0 / 28%); border: 1px solid var(--bug-line); border-radius: 12px;
  color: #fff; text-shadow: 0 0 18px rgb(255 255 255 / 25%);
}
.on-clock.is-me .clock-time { color: var(--gold-bright); text-shadow: 0 0 18px rgb(242 194 91 / 40%); }
.clock-time.is-urgent { color: #FF6B5E !important; border-color: rgb(255 93 81 / 60%); text-shadow: 0 0 20px rgb(255 93 81 / 55%); animation: urgent 1s steps(2) infinite; }
@keyframes urgent { 50% { background: rgb(215 54 43 / 25%); } }
.clock-time.is-paused { color: var(--bug-muted); }
.commish-banner { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: .75rem 0 0; padding: .55rem .8rem; border-radius: var(--radius-sm); background: rgb(242 194 91 / 16%); border: 1px solid rgb(242 194 91 / 45%); color: var(--bug-ink); }
.commish-banner b { color: var(--gold-bright); }
.order-list { margin: .3rem 0 1rem; padding-left: 1.6rem; columns: 2 12rem; font-weight: 700; }
.order-list li { padding: .1rem 0; }
.order-list li::marker { font-family: var(--font-display); color: var(--bug-muted); }
.order-list li.is-mine { color: var(--gold-bright); }
.draft-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(250px, 1fr); gap: 1rem; align-items: start; margin-bottom: 1rem; }
.draft-grid > .card { margin: 0; }
.draft-side { display: grid; gap: 1rem; position: sticky; top: 1rem; }
.draft-side .card { margin: 0; }
.queue { margin: 0; padding-left: 1.5rem; }
.queue li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .3rem 0; border-bottom: 1px dashed var(--line); }
.queue li:last-child { border-bottom: 0; }
.queue li::marker { font-weight: 900; color: var(--muted); }
.queue-btns { white-space: nowrap; }

.board-wrap { overflow-x: auto; }
.board { border-collapse: separate; border-spacing: 4px; min-width: 100%; font-size: .78rem; }
.board th { font-weight: 800; padding: .3rem .4rem; text-align: left; white-space: nowrap; max-width: 9rem; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.board th.is-mine { color: var(--violet); }
.board-round { font-family: var(--font-display); color: var(--muted); text-align: center !important; font-size: .95rem; }
.board-cell { min-width: 7.6rem; height: 3.1rem; padding: .35rem .5rem; border-radius: 8px; background: var(--surface-2); vertical-align: top; border-left: 4px solid var(--line); }
.board-cell.is-mine { background: var(--violet-soft); }
.board-cell.is-now { background: var(--gold-soft); border-left-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); animation: on-clock 1.8s ease-in-out infinite; }
@keyframes on-clock { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 35%, transparent); } }
.board-name { font-weight: 800; line-height: 1.2; color: var(--ink); }
.board-meta { color: var(--muted); font-weight: 700; }
.pos-bg--F { border-left-color: var(--pos-F); }
.pos-bg--D { border-left-color: var(--pos-D); }
.pos-bg--G { border-left-color: var(--pos-G); }

/* ── Lists, trades, activity ── */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .48rem 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list li > .muted:first-child { flex: none; width: 2.2rem; font-weight: 800; }
.queue li > .player-inline, .list li > .player-inline { flex: 1; }
.trade .list li { justify-content: flex-start; }
.trade .card-head b { font-family: var(--font-display); font-weight: 400; font-size: 1.1rem; }
.trade .grid-2 > div { padding: .7rem .85rem; border-radius: var(--radius-sm); background: var(--surface-2); margin-bottom: .6rem; }

.activity { list-style: none; margin: 0; padding: 0; position: relative; }
.activity::before { content: ''; position: absolute; left: .95rem; top: .6rem; bottom: .6rem; width: 2px; background: var(--line); }
.activity li { position: relative; display: grid; grid-template-columns: 2rem 1fr auto; gap: .65rem; align-items: center; padding: .55rem 0; }
.act-icon { position: relative; z-index: 1; display: grid; place-items: center; width: 1.95rem; height: 1.95rem; border-radius: 50%; background: var(--surface-3); color: var(--ink-2); font-weight: 900; box-shadow: 0 0 0 4px var(--surface); }
.act-text { font-weight: 600; }
.act--trade .act-icon { background: var(--violet-soft); color: var(--violet); }
.act--add .act-icon, .act--claim .act-icon { background: var(--green-soft); color: var(--green); }
.act--drop .act-icon { background: var(--goal-soft); color: var(--goal); }
.act--draft .act-icon { background: var(--gold-soft); color: var(--gold); }

/* Player page */
.player-head { display: flex; gap: 1.3rem; align-items: center; background: linear-gradient(120deg, var(--surface) 55%, var(--violet-soft)); }
.player-head h2 { font-size: 1.7rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.player-head p { margin: 0 0 .25rem; }
.headshot { width: 104px; height: 104px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-3); box-shadow: 0 0 0 4px var(--surface), 0 0 0 7px var(--violet-line), var(--shadow); }
.stat-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.stats { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }
.stats div { display: grid; min-width: 3.6rem; padding: .45rem .6rem; border-radius: var(--radius-sm); background: var(--surface-2); text-align: center; }
.stats dt { font-size: .62rem; color: var(--muted); }
.stats dd { margin: 0; font-family: var(--font-display); font-size: 1.35rem; line-height: 1.15; }
.stats .is-total { background: var(--violet); }
.stats .is-total dt { color: var(--violet-ink); opacity: .8; }
.stats .is-total dd { color: var(--violet-ink); }
.danger-zone { border-color: color-mix(in srgb, var(--goal) 40%, transparent); background: linear-gradient(var(--surface), var(--surface)) padding-box; }
.danger-zone h2 { color: var(--goal); }

/* ── Modal and toasts ── */
.modal { border: 0; border-radius: var(--radius); padding: 1.35rem; width: min(520px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
.modal::backdrop { background: rgb(11 10 23 / 55%); backdrop-filter: blur(3px); }
.modal[open] { animation: pop .18s var(--ease); }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.modal h2 { margin-bottom: .8rem; }
.modal-actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1.1rem; flex-wrap: wrap; }
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: grid; gap: .5rem; z-index: 100; width: min(440px, calc(100vw - 32px)); }
.toast {
  display: flex; align-items: center; gap: .6rem;
  padding: .75rem 1rem; border-radius: 14px; font-weight: 800;
  background: linear-gradient(110deg, var(--bug-1), var(--bug-2)); color: #fff;
  border: 1px solid var(--bug-line); box-shadow: var(--shadow-lg);
  animation: pop .2s var(--ease); transition: opacity .4s, transform .4s;
}
.toast::before { content: ''; flex: none; width: .6rem; height: .6rem; border-radius: 50%; background: #4CC99C; }
.toast--err::before { background: #FF5D51; }
.toast--err { border-color: rgb(255 93 81 / 50%); }
.toast--out { opacity: 0; transform: translateY(8px); }

/* ── Small screens ── */
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; gap: 1.2rem; padding-top: .5rem; }
  .auth-hero { padding: 1rem 0 0; }
}
@media (max-width: 760px) {
  .hide-sm { display: none; }
  main { padding-top: 1.1rem; }
  .draft-grid { grid-template-columns: minmax(0, 1fr); }
  .draft-side { position: static; }
  .clock-time { font-size: 2.3rem; }
  .mu-head { grid-template-columns: 1fr 1fr; }
  .mu-mid { grid-column: 1 / -1; order: -1; }
  .userbar-name { display: none; }
  .brand-word { font-size: 1.2rem; }
  .brand-mark { width: 36px; height: 22px; }
  .league-head { padding: 1.1rem 1.05rem 1rem; }
  .card { padding: 1rem; }
  .table th, .table td { padding: .5rem .3rem; }
  .slot-select { width: 4.4rem; }
  .league-content > .table-wrap, .league-content > div > .table-wrap { padding: .2rem .15rem; }
  /* Queue + Draft side by side is too wide for a phone: stack them */
  .table td.actions .btn { display: flex; width: 100%; }
  .table td.actions .btn + .btn { margin: .3rem 0 0; }
  .avatar--md { width: 30px; height: 30px; margin: 3px; }
  .player-head { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Player availability ── */
.out-chip {
  display: inline-flex; align-items: center; padding: .02rem .4rem; border-radius: 999px;
  font-size: .62rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase;
  background: var(--goal); color: #fff; cursor: help; vertical-align: 1px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .out-chip { color: #0B0A17; } }
.player-head h2 .out-chip { font-size: .75rem; padding: .15rem .55rem; }
.out-notice { border-color: color-mix(in srgb, var(--goal) 45%, transparent); background: var(--goal-soft); }
.out-notice strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; color: var(--goal); margin-bottom: .25rem; }
.out-notice p { margin: 0 0 .35rem; }
.admin-panel { border-style: dashed; }
.admin-panel h2 { display: flex; align-items: center; gap: .3rem; }

/* ── Charts (player trends) ──
   Series colours validated with the dataviz palette checker against our card surfaces:
   violet columns + orange average line pass lightness, chroma, colour-blind separation
   (deltaE 26-29) and 3:1 contrast in both modes. Text never uses the series colours. */
:root { --series-1: #6250D6; --series-2: #EB6834; --chart-grid: #E6ECF2; --chart-axis: #C6D1DE; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --series-1: #9085E9; --series-2: #D95926; --chart-grid: #26223F; --chart-axis: #3A3566; }
}
:root[data-theme="dark"] { --series-1: #9085E9; --series-2: #D95926; --chart-grid: #26223F; --chart-axis: #3A3566; }

.chart { position: relative; margin: .4rem 0 1rem; }
.chart svg { display: block; overflow: visible; }
.chart-gridline { stroke: var(--chart-grid); stroke-width: 1; }
.chart-baseline { stroke: var(--chart-axis); stroke-width: 1; }
.chart-tick, .chart-xsub { fill: var(--muted); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chart-xlabel { fill: var(--ink-2); font-size: 12px; font-weight: 800; }
.chart-cap, .chart-endlabel { fill: var(--ink); font-size: 12px; font-weight: 900; }
.chart-bar--season, .chart-bar--game { fill: var(--series-1); transition: opacity .12s; }
.chart-bar--game.is-active { opacity: .7; }
.chart-mark { cursor: default; outline: none; }
.chart-mark:hover .chart-bar, .chart-mark:focus-visible .chart-bar { opacity: .75; }
.chart-mark:focus-visible .chart-hit { stroke: var(--violet-2); stroke-width: 2; }
.chart-hit { fill: transparent; }
.chart-line { fill: none; stroke: var(--series-2); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { fill: var(--series-2); stroke: var(--surface); stroke-width: 2; }
.chart-crosshair { stroke: var(--muted); stroke-width: 1; }
.chart-focusable { outline: none; border-radius: 8px; }
.chart-focusable:focus-visible { box-shadow: 0 0 0 3px var(--violet-soft); }

.chart-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin: .2rem 0 .1rem; font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.chart-legend > span { display: inline-flex; align-items: center; gap: .4rem; }
.chart-key { display: inline-block; flex: none; }
.chart-key--bar { width: 10px; height: 12px; border-radius: 3px 3px 0 0; background: var(--series-1); }
.chart-key--line { width: 16px; height: 2px; border-radius: 2px; background: var(--series-2); }

.chart-tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 9rem; max-width: 16rem;
  padding: .5rem .65rem; border-radius: 10px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: .82rem;
}
.chart-tip-title { font-weight: 800; color: var(--muted); margin-bottom: .25rem; font-size: .76rem; }
.chart-tip-row { display: flex; align-items: center; gap: .4rem; line-height: 1.45; }
.chart-tip-row strong { font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.chart-tip-row span:last-child { color: var(--muted); }

.trend-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 900; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.trend-chip.is-up { background: var(--green-soft); color: var(--green); }
.trend-chip.is-down { background: var(--goal-soft); color: var(--goal); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.chart--season { max-width: 560px; }

/* ── Trend arrow (players list) ── */
.trend { display: inline-flex; align-items: center; gap: .2rem; font-weight: 900; font-size: .82rem; white-space: nowrap; cursor: help; }
.trend-arrow { width: 16px; height: 16px; flex: none; overflow: visible; }
.trend-arrow path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.trend-chip .trend-arrow { width: 15px; height: 15px; }
.trend--up { color: var(--green); }
.trend--down { color: var(--goal); }
.trend--flat { color: var(--muted); }
/* Phones: arrow only (the percent is in the tooltip and on the player page) */
@media (max-width: 760px) { .trend { font-size: .8rem; } .trend-pct { display: none; } }
.th-short { display: none; }
@media (max-width: 760px) {
  .th-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .th-short { display: inline; font-size: .8rem; }
}

/* ── News ── */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-item { display: grid; gap: .25rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.news-item:last-child { border-bottom: 0; }
.news-meta { font-size: .76rem; color: var(--muted); font-weight: 700; }
.news-source { color: var(--ink-2); font-weight: 900; text-transform: uppercase; letter-spacing: .06em; font-size: .68rem; }
.news-title { font-weight: 800; color: var(--ink); text-decoration: none; line-height: 1.3; }
.news-title:hover { color: var(--violet-2); text-decoration: underline; }
.news-title .ext { color: var(--muted); font-weight: 700; }
.news-players { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin-top: .15rem; font-size: .88rem; }
.news-player { display: inline-flex; align-items: center; }
.news-toggle { margin: 0; width: auto; }
.news-toggle button { padding: .4rem .9rem; }
.news-chip {
  display: inline-flex; align-items: center; padding: .02rem .4rem; border-radius: 999px;
  font-size: .6rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase;
  background: var(--blueline-soft); color: var(--blueline); cursor: help; vertical-align: 1px;
}
.news-chip.is-injury { background: var(--gold-soft); color: var(--gold); }

/* ── Lineup check and IR ── */
.lineup-warn { border-color: color-mix(in srgb, var(--gold) 50%, transparent); background: var(--gold-soft); }
.lineup-warn h2 { font-size: 1.1rem; }
.warn-list { margin: 0; padding-left: 1.2rem; display: grid; gap: .3rem; font-weight: 700; color: var(--ink-2); }
.table tr.is-ir td { background: var(--goal-soft); }
/* News list polish: names stay on one line, bold ink like other lists; no NEWS chip inside the news feed */
.news-player { flex-wrap: wrap; row-gap: .1rem; }
.news-players .player-inline { flex-wrap: nowrap; }
.news-players .player-inline a { color: var(--ink); font-weight: 800; text-decoration: none; white-space: nowrap; }
.news-players .player-inline a:hover { color: var(--violet-2); text-decoration: underline; }
.news-players .news-chip { display: none; }
.news-player > .muted { white-space: nowrap; }
.news-toggle button { white-space: nowrap; }
.tag { white-space: nowrap; }
.news-player > .muted { margin-left: .3rem; }

/* ── UX pass: phone lineups, compact tables, tabs ── */
.show-sm { display: none; }
.nowrap, .game-time { white-space: nowrap; }
.player-next { font-size: .78rem; font-weight: 700; color: var(--ink-2); margin-top: .1rem; }
.player-status { font-size: .76rem; font-weight: 700; color: var(--muted); margin-top: .1rem; }
.player-status.is-waivers { color: var(--violet-2); }

/* Roster sections instead of row tints */
.table tr.group-row th {
  position: static; padding: .85rem .55rem .35rem; background: transparent;
  font-size: .7rem; letter-spacing: .08em; color: var(--ink-2); border-bottom: 1px solid var(--line-strong);
}
.table tbody tr.group-row:first-child th { padding-top: .45rem; }
.table tbody tr.group-row:hover th { background: transparent; }
.table tr.is-ir td { background: var(--surface-2); }
.team-switcher { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--muted); }
.team-switcher select { width: auto; }

/* Save bar: quiet when there's nothing to save, a raised bar while changes are pending */
.sticky-actions.is-pending {
  margin: 0 -.5rem; padding: .7rem .75rem; border-radius: var(--radius);
  background: var(--surface); border: 1.5px solid var(--violet-line); box-shadow: var(--shadow);
}

/* Tabs: fade the edge that has more tabs past it */
.tabs-wrap { position: relative; margin: .9rem 0 1.2rem; }
.tabs-wrap .tabs { margin: 0; position: relative; }
.tabs-wrap::before, .tabs-wrap::after {
  content: ''; position: absolute; top: 1px; bottom: 1px; width: 2.6rem; pointer-events: none; opacity: 0; transition: opacity .15s; z-index: 1;
}
.tabs-wrap::before { left: 1px; border-radius: 999px 0 0 999px; background: linear-gradient(90deg, var(--surface) 30%, transparent); }
.tabs-wrap::after { right: 1px; border-radius: 0 999px 999px 0; background: linear-gradient(270deg, var(--surface) 30%, transparent); }
.tabs-wrap.more-left::before, .tabs-wrap.more-right::after { opacity: 1; }

/* Slim banner on every tab except Overview and Draft */
.league-head--compact { padding: .75rem 1.2rem; align-items: center; }
.league-head--compact .eyebrow { display: none; }
.league-head--compact .league-title { font-size: 1.45rem; }

/* News review buttons stay together */
.flag-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; }
.btn-pair { display: inline-flex; gap: .4rem; flex-wrap: nowrap; }
.news-owner::before { content: '·'; margin: 0 .3rem 0 .1rem; }
.news-player > .news-owner { margin-left: .2rem; }

/* Collapsed admin availability panel */
details.admin-panel > summary { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; cursor: pointer; list-style: none; }
details.admin-panel > summary::-webkit-details-marker { display: none; }
details.admin-panel > summary::before { content: '▸'; color: var(--muted); transition: transform .15s; }
details.admin-panel[open] > summary::before { transform: rotate(90deg); }
details.admin-panel[open] > summary { margin-bottom: .6rem; }
.h2-like { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); }
.summary-status { flex-basis: 100%; padding-left: 1.1rem; }

@media (max-width: 760px) {
  .show-sm { display: block; }
  .league-head--compact { padding: .6rem .95rem; }
  .league-head--compact .league-title { font-size: 1.2rem; }
  .league-head--compact .status-chip { display: none; }
  .tabs-wrap { margin: .7rem 0 1rem; }
  /* Filters: search on its own row, then an even 2-up grid */
  .filters { display: grid; grid-template-columns: 1fr 1fr; }
  .filters input[type="search"] { grid-column: 1 / -1; width: 100%; }
  .filters select { width: 100%; }
  .team-switcher { width: 100%; }
  .team-switcher select { flex: 1; }
  .sticky-actions.is-pending { margin: 0 -.25rem; }
}
/* The game line under a name may wrap; only the desktop column keeps it on one line */
.player-next .game-time { white-space: normal; }

/* ── Landing page (signed out) ── */
.landing { display: grid; gap: 0; }
.landing-hero { padding-top: 1rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.btn--lg { min-height: 3rem; padding: .7rem 1.5rem; font-size: 1.05rem; }
.hero-proof { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; padding: 0; margin: 1.1rem 0 0; color: var(--ink-2); font-weight: 700; font-size: .92rem; }
.hero-proof li { display: inline-flex; align-items: center; gap: .4rem; }
.hero-proof li::before, .check-list li::before {
  content: ''; flex: none; width: 1.05rem; height: 1.05rem; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.6 2.5L12 5.5' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 78% no-repeat;
}
.auth-note { margin: -.2rem 0 0; }

/* Screenshot frames */
.shot { display: block; }
.shot img { display: block; width: 100%; height: auto; }
.shot--crop img { aspect-ratio: 16 / 10.5; object-fit: cover; object-position: top; }
.browser {
  border-radius: 14px; overflow: hidden; background: var(--surface);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg);
}
.browser-bar { display: flex; gap: 6px; padding: 9px 12px; background: var(--surface-3); border-bottom: 1px solid var(--line); }
.browser-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.browser-bar span:first-child { background: #FF6B5E; }
.browser-bar span:nth-child(2) { background: #F2C25B; }
.browser-bar span:nth-child(3) { background: #4CC99C; }
.phone {
  width: 100%; max-width: 280px; padding: 9px; border-radius: 38px;
  background: #0E0B22; box-shadow: var(--shadow-lg), inset 0 0 0 2px #2A2456;
}
.phone .shot { border-radius: 30px; overflow: hidden; }
.phone .shot img { aspect-ratio: 780 / 1560; object-fit: cover; object-position: top; }

.showcase { position: relative; margin: 2.2rem 0 0; padding: 0 6% 2.5rem 0; }
.showcase-phone { position: absolute; right: 0; bottom: 0; width: 24%; max-width: 250px; }

/* Facts */
.fact-strip {
  list-style: none; margin: 2.2rem 0 0; padding: 1.2rem 1rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem;
  border-radius: var(--radius); text-align: center;
  background: linear-gradient(110deg, var(--bug-1), var(--bug-2)); color: var(--bug-ink); box-shadow: var(--shadow);
}
.fact-strip li { display: grid; gap: .1rem; }
.fact-strip b { font: 400 2rem/1.05 var(--font-display); color: var(--gold-bright); }
.fact-strip span { color: var(--bug-muted); font-weight: 700; font-size: .88rem; }

/* Feature rows */
.features { display: grid; gap: 4.5rem; margin: 4.5rem 0 0; }
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem; align-items: center; }
.feature--flip .feature-copy { order: 2; }
.feature-title { font-size: clamp(1.6rem, 3.2vw, 2.25rem); color: var(--violet); line-height: 1.05; margin-bottom: .7rem; }
.feature-text { font-size: 1.06rem; color: var(--ink-2); font-weight: 600; margin: 0 0 1rem; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; color: var(--ink-2); font-weight: 700; }
.check-list li { display: flex; gap: .6rem; align-items: flex-start; }
.check-list li::before { margin-top: .2em; }

/* Phone band */
.phone-band {
  margin: 5rem 0 0; padding: 2.6rem; border-radius: var(--radius);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: center;
  background: linear-gradient(135deg, var(--violet-soft), var(--blueline-soft)); border: 1px solid var(--violet-line);
}
.phone-band-copy .btn { margin-top: .6rem; }
.phone-band-shots { display: flex; justify-content: center; gap: 1.2rem; }
.phone-band-shots .phone { max-width: 230px; }
.phone-band-shots .phone:first-child { transform: translateY(1.6rem); }

/* Steps */
.section-heading { text-align: center; font-size: clamp(1.6rem, 3.2vw, 2.25rem); color: var(--violet); margin-bottom: 1.4rem; }
.steps-section { margin: 4.5rem 0 0; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.steps li { position: relative; padding: 1.4rem 1.3rem 1.2rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.steps h3 { font-size: 1.25rem; margin: .7rem 0 .35rem; }
.steps p { margin: 0; color: var(--ink-2); }
.step-num {
  display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  font: 400 1.3rem/1 var(--font-display); color: var(--bug-ink); background: linear-gradient(135deg, var(--bug-1), var(--bug-2));
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--goal);
}

/* FAQ */
.faq { margin: 4.5rem auto 0; width: 100%; max-width: 760px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; padding: 1rem .2rem; font-weight: 800; font-size: 1.05rem; color: var(--ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font: 400 1.4rem/1 var(--font-display); color: var(--violet-2); transition: transform .15s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 0 .2rem 1rem; color: var(--ink-2); }

/* Closing call to action */
.closer {
  margin: 4.5rem 0 0; padding: 2.2rem 2.4rem; border-radius: var(--radius);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 240' preserveAspectRatio='xMidYMid slice'%3E%3Ccircle cx='600' cy='120' r='92' fill='none' stroke-width='4' stroke='%238FB4FF' stroke-opacity='.3'/%3E%3Crect x='596' y='0' width='8' height='240' fill='%23FF6B5E' fill-opacity='.3'/%3E%3Crect x='330' y='0' width='14' height='240' fill='%238FB4FF' fill-opacity='.22'/%3E%3Crect x='856' y='0' width='14' height='240' fill='%238FB4FF' fill-opacity='.22'/%3E%3C/svg%3E") center / cover no-repeat, linear-gradient(110deg, var(--bug-1), var(--bug-2));
  color: var(--bug-ink); box-shadow: var(--shadow-lg);
}
.closer h2 { color: var(--bug-ink); font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin-bottom: .3rem; }
.closer p { margin: 0; color: var(--bug-muted); font-weight: 700; }
.closer-cta { display: flex; flex-wrap: wrap; gap: .6rem; }
.closer .btn--primary { background: var(--gold-bright); border-color: var(--gold-bright); color: #1E1150; box-shadow: 0 3px 0 #B98A1F; }
.closer .btn--primary:hover:not(:disabled) { background: #FFD47A; border-color: #FFD47A; color: #1E1150; }
.btn--on-dark { background: transparent; color: var(--bug-ink); border-color: rgb(255 255 255 / 40%); box-shadow: none; }
.btn--on-dark:hover:not(:disabled) { background: rgb(255 255 255 / 10%); color: var(--bug-ink); border-color: rgb(255 255 255 / 70%); }

@media (max-width: 860px) {
  .feature, .phone-band { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
  .feature--flip .feature-copy { order: 0; }
  .features { gap: 3.2rem; margin-top: 3.2rem; }
  .steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .showcase { padding: 0 14% 2rem 0; margin-top: 1.6rem; }
  .showcase-phone { width: 34%; }
  .phone { padding: 6px; border-radius: 26px; }
  .phone .shot { border-radius: 21px; }
  .phone-band { padding: 1.4rem; margin-top: 3.2rem; }
  .phone-band-shots { gap: .7rem; }
  .phone-band-shots .phone:first-child { transform: translateY(1rem); }
  .fact-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact-strip b { font-size: 1.6rem; }
  .closer { padding: 1.6rem 1.3rem; }
  .hero-cta .btn { flex: 1 1 auto; }
  .steps-section, .faq, .closer { margin-top: 3.2rem; }
}
.feature--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
@media (max-width: 860px) { .feature--flip { grid-template-columns: minmax(0, 1fr); } }
/* Phones: show the left part of desktop screenshots at a readable size */
@media (max-width: 760px) {
  .browser .shot { aspect-ratio: 4 / 3; overflow: hidden; }
  .browser .shot img { width: 165%; max-width: none; height: auto; aspect-ratio: auto; }
  .browser .shot--crop img { width: 150%; }
}

/* ── Site admin dashboard ── */
.admin-head { margin-bottom: 1rem; }
.admin-head .page-title { margin: 0; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.stat-tile {
  display: grid; gap: .15rem; align-content: start; padding: 1rem 1.1rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.stat-tile-label { font-size: .72rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stat-tile-value { font: 400 2.3rem/1.05 var(--font-display); color: var(--ink); }
.stat-tile-detail { font-size: .84rem; font-weight: 700; color: var(--ink-2); }
.admin-sub { font-family: var(--font-body); font-weight: 900; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 1rem 0 .4rem; }
.admin-sub:first-of-type { margin-top: .2rem; }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem 1rem; margin: 0; }
.kv dt { color: var(--ink-2); font-weight: 700; }
.kv dd { margin: 0; text-align: right; font-weight: 800; }
.kv dd.is-good { color: var(--green); }
.kv dd.is-bad { color: var(--goal); }
.rank-list { margin: 0; padding-left: 1.4rem; display: grid; gap: .35rem; }
.rank-list li { padding-left: .2rem; }
.rank-list li > span:first-child { margin-right: .4rem; }
.rank-list li { display: list-item; }
.rank-list li > span:last-child { float: right; font-size: .86rem; }
.table td.is-short { color: var(--gold); font-weight: 800; }
.admin-details { margin-top: .6rem; }
.admin-details summary { cursor: pointer; font-weight: 800; color: var(--violet-2); }
.admin-sys { gap: 1.5rem; }
.admin-sys .kv dd { word-break: break-word; }
@media (max-width: 760px) {
  .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .stat-tile { padding: .8rem .85rem; }
  .stat-tile-value { font-size: 1.9rem; }
  .stat-tile-detail { font-size: .78rem; }
}

/* ── Questionable (unreviewed injury headline) ── */
:root .out-chip.is-questionable { background: var(--gold-bright); color: #1E1150; } /* beats the dark-mode .out-chip ink */
.out-notice.is-questionable { border-color: color-mix(in srgb, var(--gold) 50%, transparent); background: var(--gold-soft); }
.out-notice.is-questionable strong { color: var(--gold); }

/* ── Admin: injuries ── */
.inj-list { list-style: none; margin: 0; padding: 0; }
.inj-row { padding: .7rem 0; border-top: 1px solid var(--line); }
.inj-row:first-child { border-top: 0; padding-top: .2rem; }
.inj-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .8rem; }
.inj-headlines { list-style: none; margin: .35rem 0 0; padding: 0; display: grid; gap: .2rem; }
.inj-headlines a { font-weight: 700; }
.inj-detail { margin: .3rem 0 0; }
.inj-form { margin-top: .7rem; padding: .9rem 1rem; border-radius: var(--radius); background: var(--surface-3); border: 1px solid var(--line); }
.inj-search { display: block; max-width: 360px; }
.inj-search input { width: 100%; }
.injuries .admin-sub:first-of-type { margin-top: .6rem; }

/* Collapsible injuries card */
details.injuries > summary { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; cursor: pointer; list-style: none; }
details.injuries > summary::-webkit-details-marker { display: none; }
details.injuries > summary::before { content: '▸'; color: var(--muted); transition: transform .15s; }
details.injuries[open] > summary::before { transform: rotate(90deg); }
details.injuries[open] > summary { margin-bottom: .4rem; }
details.injuries > summary .h2-like { font-size: 1.3rem; }

/* ── League chat ── */
.tab-badge {
  display: inline-grid; place-items: center; min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem; margin-left: .35rem;
  border-radius: 999px; background: var(--goal); color: #fff; font-size: .68rem; font-weight: 900; line-height: 1;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tab-badge { color: #0B0A17; } }
:root[data-theme="dark"] .tab-badge { color: #0B0A17; }
.league-unread { margin: .3rem 0 0; font-weight: 800; color: var(--ink-2); font-size: .9rem; }
.league-unread .tab-badge { margin: 0 .3rem 0 0; }

.chat { display: grid; gap: .6rem; }
.chat-frame { position: relative; }
.chat-scroll {
  height: min(62vh, 640px); overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-3); padding: .4rem .8rem;
}
.chat--compact .chat-scroll { height: 300px; }
.chat-earlier { display: flex; justify-content: center; }
.chat-earlier:not(:empty) { padding: .4rem 0; }
.chat-list { list-style: none; margin: 0; padding: 0; display: grid; }
.chat-empty { padding: 2rem .5rem; text-align: center; }
.chat-day { display: flex; justify-content: center; margin: .8rem 0 .3rem; }
.chat-day span { font-size: .7rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .1rem .6rem; }

.chat-msg { padding: .45rem .6rem; margin-top: .35rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); max-width: 88%; justify-self: start; }
.chat-msg.is-mine { justify-self: end; background: var(--violet-soft); border-color: var(--violet-line); }
.chat-msg.is-grouped { margin-top: .15rem; }
.chat-msg.is-pinned { border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
.chat-msg.is-deleted { background: transparent; }
.chat-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .45rem; margin-bottom: .15rem; }
.chat-author { color: var(--ink); }
.chat-body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.chat-quote { margin: .1rem 0 .3rem; padding: .25rem .5rem; border-left: 3px solid var(--violet-2); background: color-mix(in srgb, var(--violet-soft) 60%, transparent); border-radius: 0 6px 6px 0; font-size: .86rem; color: var(--ink-2); }
.chat-actions { display: flex; gap: .7rem; margin-top: .2rem; }
/* With a mouse, Pin/Delete appear on hover or focus; touch screens always show them */
@media (hover: hover) {
  .chat-msg { position: relative; }
  .chat-msg .chat-actions {
    position: absolute; top: -.75rem; right: .5rem; margin: 0; padding: .05rem .55rem; gap: .6rem;
    background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow);
    opacity: 0; pointer-events: none; transition: opacity .12s;
  }
  .chat-msg:hover .chat-actions, .chat-msg:focus-within .chat-actions { opacity: 1; pointer-events: auto; }
}
.chat-link { background: none; border: 0; padding: .1rem 0; font: inherit; font-size: .78rem; font-weight: 800; color: var(--violet-2); cursor: pointer; }
.chat-link:hover { text-decoration: underline; }
.tag--pin { background: var(--gold-soft); color: var(--gold); }

.chat-event { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto auto; align-items: center; gap: .5rem; padding: .35rem 0; margin-top: .25rem; font-size: .9rem; color: var(--ink-2); }
.chat-event .act-icon { width: 1.6rem; height: 1.6rem; font-size: .85rem; box-shadow: none; }
.chat-event-text { font-weight: 700; }

.chat-jump { position: absolute; left: 50%; bottom: .8rem; transform: translateX(-50%); box-shadow: var(--shadow-lg); }
.chat-compose { display: grid; gap: .3rem; }
.chat-compose-row { display: flex; gap: .5rem; align-items: flex-end; }
.chat-compose textarea { flex: 1; width: auto; min-height: 2.8rem; max-height: 10rem; resize: vertical; line-height: 1.4; }
.chat-reply { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .3rem .6rem; border-radius: 8px; background: var(--violet-soft); }
.chat-reply[hidden] { display: none; }
.chat-count { justify-self: end; }
.chat-count:empty { display: none; }

.chat-pinned { display: grid; gap: .25rem; padding: .7rem .9rem; border-radius: var(--radius); background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); }
.chat-pinned-label { font-size: .72rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.overview-pin { margin-bottom: 1rem; box-shadow: var(--shadow); }
.draft-side-dyn { display: contents; }
.draft-chat h3 { margin-bottom: .5rem; }

@media (max-width: 760px) {
  .chat-scroll { height: 58vh; padding: .3rem .5rem; }
  .chat-msg { max-width: 94%; }
  .chat-event { grid-template-columns: 1.6rem minmax(0, 1fr) auto; }
  .chat-event time { display: none; }
}
