/* ============================================================
   Tuna League design system — v3 "Game Day"
   College football through and through: the warm cream of a
   printed Saturday program, varsity block letters, letterman
   stripes, and pennant gold — with the tuna still the mascot.
   Light = tailgate afternoon; dark = night game under the lights.
   Phone-first. Token-driven.
   ============================================================ */

@font-face {
  font-family: "Graduate";
  src: url("../fonts/graduate.2334b56c84e6.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* brand — The Swamp edition: Gator royal + orange trim */
  --accent: #1d3fb5;          /* deep Gator royal */
  --accent-strong: #15309a;
  --accent-soft: #e4e9fb;
  --gold: #f4581c;            /* Gator orange takes the second letterman slot */
  --gold-soft: #fde3d6;
  --win: #1f9d5b;
  --loss: #d64545;
  --pending: #c08a12;

  /* light surfaces — stadium steel: cool quiet blue-grey that lets the
     royal + orange do the talking; warm paper cards float on it */
  --bg: #edf0f5;
  --bg-accent: linear-gradient(180deg, #e2e8f2 0%, #edf0f5 240px);
  --card: #fffefb;
  --card-soft: #f3f5f9;
  --line: #e1e6ee;
  --ink: #212a3a;
  --ink-2: #565f6f;
  --ink-3: #8b93a0;
  --on-bg: #212a3a;
  --on-bg-soft: #74869c;
  --pigskin: #8a5a28;        /* football leather — the ball stays, forever */
  --on-gold: #fffdf8;        /* text on the orange trim color */
  --on-accent: #f4f8ff;
  --shadow: 0 1px 2px rgba(30, 48, 82, .06), 0 8px 24px rgba(30, 48, 82, .09);
  --shadow-raised: 0 2px 4px rgba(30, 48, 82, .09), 0 12px 32px rgba(30, 48, 82, .15);

  --radius: 14px;
  --radius-sm: 9px;
  --display: "Graduate", "Arial Black", system-ui, sans-serif;
}

/* Dark ("night game") tokens. Theme is a per-member choice (default
   light): data-theme=dark forces it; data-theme=system follows the OS.
   The two blocks below must stay identical — edit both. */
:root[data-theme="dark"] {
    --accent: #5c9bff;
    --accent-strong: #7cb0ff;
    --accent-soft: #182b47;
    --gold: #e0b345;
    --gold-soft: #2c2410;
    --win: #34c178;
    --loss: #ef6b6b;
    --pending: #d9a52e;

    /* night game: deep stadium navy, warm floodlight highlights */
    --bg: #0c1322;
    --bg-accent: linear-gradient(180deg, #111c31 0%, #0c1322 240px);
    --card: #16203a;
    --card-soft: #1b2946;
    --line: #263756;
    --ink: #e9eef7;
    --ink-2: #a8b4c6;
    --ink-3: #6e7c92;
    --on-bg: #e9eef7;        /* night game: on-bg text = regular ink */
    --on-bg-soft: #a8b4c6;
    --pigskin: #b07b3f;
    --on-gold: #241a05;      /* dark-mode gold is light — dark text on it */
    --on-accent: #0b1523;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-raised: 0 2px 4px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .5);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --accent: #5c9bff;
    --accent-strong: #7cb0ff;
    --accent-soft: #182b47;
    --gold: #e0b345;
    --gold-soft: #2c2410;
    --win: #34c178;
    --loss: #ef6b6b;
    --pending: #d9a52e;

    /* night game: deep stadium navy, warm floodlight highlights */
    --bg: #0c1322;
    --bg-accent: linear-gradient(180deg, #111c31 0%, #0c1322 240px);
    --card: #16203a;
    --card-soft: #1b2946;
    --line: #263756;
    --ink: #e9eef7;
    --ink-2: #a8b4c6;
    --ink-3: #6e7c92;
    --on-bg: #e9eef7;        /* night game: on-bg text = regular ink */
    --on-bg-soft: #a8b4c6;
    --pigskin: #b07b3f;
    --on-gold: #241a05;      /* dark-mode gold is light — dark text on it */
    --on-accent: #0b1523;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-raised: 0 2px 4px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .5);
  }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-image: var(--bg-accent);
  background-repeat: no-repeat;
  color: var(--on-bg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* varsity block letters for headings — Graduate has one weight, and
   letterman letters were never bold-er anyway */
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: .015em; margin: 0; }
h1 { font-size: clamp(19px, 4.4vw, 25px); }
h2 { font-size: 16.5px; }

.container { max-width: 980px; margin: 0 auto; padding: 12px 14px 32px; }
/* paper surfaces carry ink; anything directly on the turf reads in chalk */
.card, .msg, header.site, .menu-panel, .room-pop { color: var(--ink); }
.muted { color: var(--on-bg-soft); font-size: 13px; font-weight: 600; }
.card .muted, .msg .muted, header.site .muted, .menu-panel .muted, .room-pop .muted { color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- splash (once per session) ---------- */
#splash {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg); background-image: var(--bg-accent);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .4s ease;
}
#splash.splash-out { opacity: 0; pointer-events: none; }
/* letterman trim along both edges, gold band toward the middle */
#splash::before, #splash::after {
  content: ""; position: absolute; left: 0; right: 0; height: 7px;
  background: linear-gradient(180deg,
    var(--accent) 0, var(--accent) 3px,
    transparent 3px, transparent 4.5px,
    var(--gold) 4.5px, var(--gold) 7px);
}
#splash::before { top: 0; }
#splash::after { bottom: 0; transform: scaleY(-1); }
#splash img {
  width: min(160px, 40vw);
  border-radius: 22%; box-shadow: var(--shadow-raised);
  animation: splash-pop .55s cubic-bezier(.2, .9, .3, 1.25) both;
}
.splash-foot {
  position: absolute; left: 0; right: 0;
  bottom: calc(28px + env(safe-area-inset-bottom));
  text-align: center;
  animation: splash-rise .5s ease .25s both;
}
.splash-word {
  font-family: var(--display); font-size: 19px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--on-bg);
}
.splash-tag { margin-top: 5px; font-size: 12.5px; font-weight: 700; font-style: italic; color: var(--on-bg-soft); }
@keyframes splash-pop { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: scale(1); } }
@keyframes splash-rise { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  #splash img, .splash-foot { animation: none; }
}

/* ---------- header ---------- */
header.site {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
/* letterman-jacket trim: blue band, breath, gold band */
header.site::after {
  content: ""; display: block; height: 7px;
  background:
    linear-gradient(180deg,
      var(--accent) 0, var(--accent) 3px,
      transparent 3px, transparent 4.5px,
      var(--gold) 4.5px, var(--gold) 7px);
}
/* three-column lockup: ☰ and 🔔 pinned to 42px rails, brand dead-center
   in the middle track; one shared vertical center line for everything */
header.site .bar {
  display: grid; grid-template-columns: 42px 1fr 42px; align-items: center;
  max-width: 980px; margin: 0 auto; padding: 7px 14px; min-height: 56px;
}
.brand { justify-self: center; align-self: center; display: inline-flex; align-items: center; gap: 8px; }
.brand img { display: block; height: 38px; }
.brand .brand-word {
  font-family: var(--display); font-size: 15px; letter-spacing: .09em;
  text-transform: uppercase; color: var(--ink); white-space: nowrap;
  line-height: 1; padding-top: 3px; /* optical: caps-only face rides high */
}
.brand:hover { text-decoration: none; }
@media (max-width: 350px) { .brand .brand-word { display: none; } }
.bar-balance { width: 42px; }
.spacer { flex: 1; }
.whoami { color: var(--ink-2); font-weight: 700; font-size: 13px; }

/* ---------- header menu (single ☰ dropdown) ---------- */
details.menu { position: relative; justify-self: start; }
details.menu summary {
  display: grid; place-items: center; width: 42px; height: 42px;
  border-radius: 12px; cursor: pointer; list-style: none;
  color: var(--ink-2); font-size: 20px; font-weight: 900;
  -webkit-tap-highlight-color: transparent;
  transition: background .1s;
}
details.menu summary::-webkit-details-marker { display: none; }
details.menu summary:hover, details.menu[open] summary { background: var(--accent-soft); color: var(--accent); }
.menu-panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 40;
  min-width: 220px; padding: 8px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-raised);
  display: flex; flex-direction: column; gap: 2px;
  /* never taller than the viewport below the sticky header — scroll inside */
  max-height: calc(100dvh - 68px - env(safe-area-inset-bottom));
  overflow-y: auto; overscroll-behavior: contain;
}
.menu-panel a, .menu-panel button {
  display: block; width: 100%; text-align: left;
  padding: 11px 14px; border-radius: var(--radius-sm);
  font-weight: 800; font-size: 15px; color: var(--ink);
  background: none; border: 0; cursor: pointer; font-family: inherit;
}
.menu-panel a:hover, .menu-panel button:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.menu-panel a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.menu-panel .menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.menu-panel .menu-user { display: block; padding: 4px 14px 6px; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }


@media (min-width: 760px) {
  body { padding-bottom: 0; }
  .container { padding-top: 20px; }
}

/* ---------- cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin: 14px 0;
}
.card.tight { padding: 12px 14px; }
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; margin: 14px 2px 4px; }

/* ---------- chips & badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 800; letter-spacing: .02em;
  padding: 3px 10px; border-radius: 999px;
  background: var(--card-soft); color: var(--ink-2); border: 1px solid var(--line);
}
.chip.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.chip.warn { background: color-mix(in srgb, var(--pending) 14%, transparent); color: var(--pending); border-color: transparent; }
.chip.closed { background: color-mix(in srgb, var(--loss) 12%, transparent); color: var(--loss); border-color: transparent; }
.chip.win { background: color-mix(in srgb, var(--win) 12%, transparent); color: var(--win); border-color: transparent; }

/* week labels fly as little pennants */
.chip.pennant {
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 0 100%);
  border-radius: 4px 0 0 4px; border: 0; padding: 4px 17px 4px 10px;
  background: var(--gold); color: var(--on-gold);
  font-family: var(--display); font-weight: 400; letter-spacing: .05em;
}

/* who-reacted rows */
.who-row { display: flex; gap: 10px; margin: 7px 0; font-size: 14px; font-weight: 650; }
.who-row .who-emoji { flex-shrink: 0; font-size: 17px; }

/* trophy wizard standings peek — dense on purpose */
.wiz-standings th, .wiz-standings td { padding: 4px 10px; font-size: 12.5px; }
.wiz-standings th { user-select: none; }

/* the results week picker IS a pennant — native select underneath */
.pennant-picker { position: relative; margin-left: auto; }
.pennant-picker .week-select {
  border: 0; background: var(--gold); color: var(--on-gold); background-image: none;
  font-family: var(--display); font-weight: 400; font-size: 13px; letter-spacing: .04em;
  padding: 9px 34px 9px 13px; border-radius: 7px 0 0 7px;
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 50%, calc(100% - 13px) 100%, 0 100%);
}
.pennant-picker::after {
  content: "▾"; position: absolute; right: 24px; top: 50%; transform: translateY(-52%);
  color: var(--on-gold); pointer-events: none; font-size: 12px;
}

.rank-chip {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 999px;
  font-family: var(--display); font-size: 12px; font-weight: 400;
  background: var(--card-soft); color: var(--ink-2);
}

/* ---------- tables ---------- */
table.list { width: 100%; border-collapse: collapse; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.list th {
  text-align: left; font-size: 11px; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink-3); padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
table.list td { padding: 11px 10px; border-bottom: 1px solid var(--line); font-weight: 650; }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr { transition: background .08s; }
table.list tbody tr:hover { background: var(--card-soft); }
table.list tr.me td { background: var(--accent-soft); }
table.list tr.me td:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
table.list tr.me td:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.ok { color: var(--win); font-weight: 900; }
.bad { color: var(--loss); font-weight: 900; }
.pend { color: var(--pending); font-weight: 900; }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--on-accent);
  border: 0; border-radius: 999px; padding: 12px 26px;
  font-weight: 400; font-size: 14px; font-family: var(--display);
  text-transform: uppercase; letter-spacing: .05em; cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .06s, box-shadow .06s, background .1s;
}
.btn:hover { background: var(--accent-strong); text-decoration: none; box-shadow: var(--shadow-raised); }
.btn:active { transform: scale(.98); }
.btn.small { padding: 7px 14px; font-size: 11.5px; }
.btn.ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); box-shadow: none; }
.btn[disabled] { background: var(--ink-3); cursor: not-allowed; }

input[type="text"], input[type="password"], input[type="email"], input[type="number"], textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--card); color: var(--ink);
  font-size: 16px; font-family: inherit;
  transition: border-color .1s;
}
input:focus { border-color: var(--accent); outline: none; }
label { font-weight: 800; font-size: 14px; }
.field { margin: 14px 0; }
.errors { color: var(--loss); font-size: 14px; font-weight: 700; }

/* ---------- messages ---------- */
.msg {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-left: 4px solid var(--accent);
  padding: 12px 14px; margin: 10px 0;
  background: var(--card); border-radius: var(--radius-sm);
  font-weight: 700; box-shadow: var(--shadow);
}
.msg.error { border-left-color: var(--loss); }
.msg.success { border-left-color: var(--win); }

/* ---------- picks / matchups ---------- */
.matchup-card { padding: 14px; margin: 12px 0; }
.matchup-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.matchup { display: grid; grid-template-columns: 1fr 30px 1fr; gap: 8px; align-items: stretch; }
/* the ball on the tee between the two sides */
.matchup .at {
  align-self: center; justify-self: center;
  display: grid; place-items: center;
  width: 30px; height: 21px; border-radius: 50%;
  background: radial-gradient(ellipse at 35% 30%, #a06c33, var(--pigskin) 70%);
  color: #f7f2e7; font-weight: 900; font-size: 11px; line-height: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

.side {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 2px solid var(--line); border-radius: var(--radius);
  padding: 14px 8px 12px; text-align: center; cursor: pointer;
  background: var(--card); font-weight: 800; font-size: 15px;
  transition: border-color .1s, background .1s, transform .06s;
  -webkit-tap-highlight-color: transparent;
}
.side:active { transform: scale(.985); }
.side input { position: absolute; opacity: 0; pointer-events: none; }
/* Every team mark on a pick tile sits on the same white chip — helmet art
   needs it (baked-in light-mode shadows) and plain logos match it so a
   helmetless team doesn't look naked next to a chipped one. */
.side img.teamlogo {
  width: 90px; height: 64px; object-fit: contain; box-sizing: border-box;
  background: #fff; border-radius: 10px; padding: 3px 7px;
}
/* logos are square-ish; extra padding keeps them off the chip edges */
.side img.teamlogo:not(.helmet) { padding: 10px; }
/* schools without any art still get the chip, with a football on it */
.side .teamlogo-blank {
  width: 90px; height: 64px; border-radius: 10px; background: #fff;
  display: grid; place-items: center; font-size: 30px;
}
.side .odds { color: var(--ink-3); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.side:hover { border-color: var(--accent); }
.side:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
/* scoreboard numerals */
.side .side-score { font-family: var(--display); font-size: 18px; font-weight: 400; line-height: 1; }
.side .side-score.muted { opacity: .55; }
.side:has(input:disabled) { cursor: default; opacity: .75; }
.side:has(input:disabled):hover { border-color: var(--line); }
.side:has(input:disabled):active { transform: none; }

/* final-score verdict on the picked side: green frame ✓ / red frame ✗ */
.side.correct:has(input:checked) {
  border-color: var(--win);
  background: color-mix(in srgb, var(--win) 10%, var(--card));
}
.side.wrong:has(input:checked) {
  border-color: var(--loss);
  background: color-mix(in srgb, var(--loss) 10%, var(--card));
}
.side.correct:has(input:disabled),
.side.wrong:has(input:disabled) { opacity: 1; }  /* verdict stays vivid; unpicked side dims */
.side.correct::after, .side.wrong::after {
  position: absolute; top: -9px; right: -7px;
  width: 24px; height: 24px; border-radius: 999px;
  color: #fff; font-size: 14px; font-weight: 900; line-height: 24px;
  box-shadow: var(--shadow);
}
.side.correct::after { content: "✓"; background: var(--win); }
.side.wrong::after { content: "✗"; background: var(--loss); }

.free-item {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 2px dashed var(--accent); border-radius: var(--radius);
  padding: 14px; margin: 12px 0; font-weight: 800; text-align: center;
  background: var(--accent-soft); color: var(--ink);
}

.submit-bar {
  position: sticky; bottom: calc(env(safe-area-inset-bottom) + 10px);
  display: flex; justify-content: center; margin: 18px 0;
}
@media (min-width: 760px) { .submit-bar { bottom: 16px; } }
.submit-bar .btn { min-width: 240px; }

/* ---------- results: expandable player rows ---------- */
.week-select {
  padding: 8px 32px 8px 14px; border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--ink);
  font-weight: 800; font-size: 14px; font-family: inherit;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a97a5' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  cursor: pointer;
}
.page-head form { margin-left: auto; }

details.player-row {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  margin: 8px 0; overflow: hidden;
}
details.player-row.me { border-color: var(--accent); }
details.player-row summary {
  display: flex; align-items: center; gap: 11px;
  padding: 14px; cursor: pointer; list-style: none;
  -webkit-tap-highlight-color: transparent;
}
details.player-row summary::-webkit-details-marker { display: none; }
.player-name {
  font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; display: flex; flex-direction: column; gap: 1px;
}
.player-realname { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.name-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.fav-mini { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }
/* record on top, tiebreaker tucked beneath — keeps narrow phones honest */
.player-agg {
  margin-left: auto; display: flex; flex-direction: column;
  align-items: flex-end; gap: 2px; font-size: 13px; flex-shrink: 0;
}
.player-agg .agg-line { display: flex; gap: 8px; }
.player-pts { font-size: 19px; font-weight: 900; min-width: 34px; text-align: right; flex-shrink: 0; }
.chev { color: var(--ink-3); font-size: 18px; font-weight: 900; transition: transform .15s; flex-shrink: 0; }
details.player-row[open] .chev { transform: rotate(90deg); }

.player-detail { border-top: 1px solid var(--line); background: var(--card-soft); padding: 6px 14px; }
.detail-line {
  display: flex; align-items: baseline; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.detail-line:last-child { border-bottom: 0; }
.detail-line .mark { width: 18px; text-align: center; flex-shrink: 0; }
.detail-game { color: var(--ink-2); font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-pick { margin-left: auto; font-weight: 800; text-align: right; flex-shrink: 0; }
.detail-pts { width: 30px; text-align: right; flex-shrink: 0; }

/* ---------- leaderboard list ---------- */
.lb { margin: 14px 0; }
.lb-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 16px; margin: 8px 0;
}
.lb-row.me { border-color: var(--accent); background: var(--accent-soft); }
/* the current leader carries the orange rule — no medals, just the record */
.lb-row.lead { border-left: 4px solid var(--gold); }
.lb-name { font-weight: 800; font-size: 16px; display: flex; flex-direction: column; min-width: 0; }
.lb-name .chip { vertical-align: middle; }
.lb-sub { font-size: 12.5px; font-weight: 600; }
.lb-pts {
  margin-left: auto; font-family: var(--display); font-size: 21px;
  font-weight: 400; line-height: 1;
  display: flex; align-items: baseline; gap: 4px; flex-shrink: 0;
}
.lb-pts-label { font-size: 11px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; }

/* ---------- feed ---------- */
.post-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.post-head .muted { font-size: 13px; line-height: 1; }
.post-author { display: flex; align-items: center; gap: 6px; margin: 2px 0; }
.post-body { margin-top: 8px; overflow-wrap: break-word; }
/* AP/CFP poll rank next to a team name (#4 Georgia) */
/* AP rank in the second team color — little pops of orange on the slate */
.poll-rank { font-size: 0.82em; font-weight: 900; color: var(--gold); }
.post-body img { max-width: 100%; border-radius: var(--radius-sm); }
.post-body p:first-child { margin-top: 0; }
.post-body p:last-child { margin-bottom: 0; }
/* desktop: cap photo height — a portrait phone shot at full column width
   (980px) towers past the viewport; [width] imgs are inline team logos */
@media (min-width: 760px) {
  .post-body img:not([width]), .popup-img { max-height: 420px; }
}
/* YouTube embeds (posts + editor preview) */
.post-body iframe, .ql-editor iframe.ql-video {
  width: 100%; aspect-ratio: 16 / 9; border: 0; display: block;
  margin: 8px 0; border-radius: var(--radius-sm); background: #000;
}
@media (min-width: 760px) {
  .post-body iframe, .ql-editor iframe.ql-video { max-width: 640px; }
}

/* ---------- auth ---------- */
.auth-card { max-width: 420px; margin: 8vh auto; text-align: center; }
.auth-card .logo-big { height: 92px; }

/* ---------- footer ---------- */
/* the fine print — every good league has some */
footer.site {
  color: var(--on-bg-soft); font-size: 12px; text-align: center;
  padding: 22px 0 8px; font-weight: 600;
}
footer.site .seal {
  font-family: var(--display); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--on-bg);
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
footer.site .seal::before, footer.site .seal::after {
  content: ""; height: 2px; width: 34px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
footer.site .seal::after { background: linear-gradient(90deg, var(--gold), transparent); }
footer.site .seal-sub { margin-top: 7px; font-size: 9px; letter-spacing: .14em; color: var(--on-bg-soft); }
footer.site .seal-sub::before, footer.site .seal-sub::after { width: 20px; opacity: .7; }

/* ---------- console lab ---------- */
.lab-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0; }
.lab-row input[type="datetime-local"] {
  padding: 9px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--card); color: var(--ink); font-family: inherit; font-size: 14px;
}

/* ---------- console dashboard ---------- */
.console-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 14px 0; }
.console-tile { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0 9px; color: var(--ink); }
.console-tile:hover { text-decoration: none; border-color: var(--accent); box-shadow: var(--shadow-raised); }
.console-tile .tile-ico { font-size: 22px; line-height: 1; }
.console-tile h2 { margin: 0; }
.console-tile .muted { flex-basis: 100%; margin-top: 6px; }

/* ---------- game picker rows ---------- */
.picker-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.picker-row:last-child { border-bottom: 0; }
.picker-main { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; min-width: 0; }
.picker-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.picker-actions input[type="number"] { width: 60px; padding: 7px 8px; }
.mini-logo { height: 22px; width: 22px; object-fit: contain; vertical-align: middle; }
.btn.danger { color: var(--loss); border-color: var(--loss); }

/* ---------- game cards (picker) ---------- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; margin-top: 12px; }
.game-card {
  border: 1.5px solid var(--line); border-radius: var(--radius);
  background: var(--card-soft); padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.game-card.added { border-color: var(--win); opacity: .85; }
.game-team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.game-team img, .logo-blank { height: 26px; width: 26px; object-fit: contain; flex-shrink: 0; }
.logo-blank { display: inline-grid; place-items: center; font-size: 16px; }
.team-name { font-weight: 800; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-conf { margin-left: auto; font-size: 11.5px; flex-shrink: 0; }
.game-meta { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 8px; }
.game-add { display: flex; justify-content: flex-end; }

/* ---------- week lifecycle tracker (console) ---------- */
.stage-track { display: flex; align-items: flex-start; gap: 0; padding: 6px 2px 2px; }
.stage { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 52px; }
.stage-dot {
  width: 38px; height: 38px; border-radius: 999px;
  display: grid; place-items: center; font-size: 17px;
  background: var(--card-soft); border: 2px solid var(--line);
  filter: grayscale(1); opacity: .55;
}
.stage-label {
  font-family: var(--display); font-size: 9px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-3);
}
.stage.done .stage-dot { background: var(--accent-soft); border-color: var(--accent); filter: none; opacity: 1; }
.stage.done .stage-label { color: var(--accent); }
.stage.current .stage-dot {
  background: var(--card); border-color: var(--gold); filter: none; opacity: 1;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 22%, transparent);
}
.stage.current .stage-label { color: var(--gold); }
.stage-bar { flex: 1; height: 3px; margin-top: 18px; background: var(--line); border-radius: 2px; min-width: 8px; }
.stage-bar.done { background: var(--accent); }
.stage-info {
  align-self: flex-start; margin: 8px 0 0 4px;
  border: 0; background: none; cursor: pointer;
  color: var(--ink-3); font-size: 15px; font-weight: 700; line-height: 1;
}
.stage-info:hover { color: var(--accent); }

/* ---------- collapsible sections & modal ---------- */
details.section { padding: 0; overflow: hidden; }
details.section summary {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; cursor: pointer; list-style: none;
  -webkit-tap-highlight-color: transparent;
}
details.section summary::-webkit-details-marker { display: none; }
details.section summary .chev { margin-left: auto; color: var(--ink-3); font-size: 18px; font-weight: 900; transition: transform .15s; }
details.section[open] summary .chev { transform: rotate(90deg); }
details.section .section-body { padding: 0 18px 16px; border-top: 1px solid var(--line); }

dialog.modal {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--ink);
  box-shadow: var(--shadow-raised); padding: 20px;
  width: min(440px, calc(100vw - 32px));
}
dialog.modal::backdrop { background: rgba(10, 20, 32, .55); backdrop-filter: blur(2px); }

/* ---------- league popups (notices & fake ads) ---------- */
#league-popup { width: min(520px, calc(100vw - 28px)); }
.popup-tag {
  font-family: var(--display); font-size: 9.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold);
}
.popup-x {
  position: absolute; top: 8px; right: 8px; z-index: 1;
  width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink-2); font-size: 15px; font-weight: 800;
  cursor: pointer; display: grid; place-items: center;
}
.popup-x:hover { color: var(--loss); border-color: var(--loss); }
.popup-img { max-width: 100%; border-radius: 10px; margin: 10px 0 4px; display: block; }
.popup-scroll {
  max-height: 46vh; overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; margin: 10px 0;
  font-family: Georgia, "Times New Roman", serif; font-size: 14.5px; line-height: 1.6;
}
.popup-ack-row {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-weight: 700; font-size: 14px;
}

/* the Commission's proprietary humanity check (signup) */
.captcha-box {
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--card-soft); padding: 12px 14px; margin-top: 14px;
}
.captcha-logo { width: 40px; height: 40px; object-fit: contain; }

details.player-row.inactive { opacity: .6; }

/* ---------- rich text editor (Quill themed to our tokens) ---------- */
.editor .ql-toolbar {
  border: 1.5px solid var(--line); border-bottom: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--card-soft);
}
.editor .ql-container {
  border: 1.5px solid var(--line);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--card); color: var(--ink);
  font-family: inherit; font-size: 16px; min-height: 90px;
}
.editor .ql-editor.ql-blank::before { color: var(--ink-3); font-style: normal; }
.editor .ql-snow .ql-stroke { stroke: var(--ink-2); }
.editor .ql-snow .ql-fill { fill: var(--ink-2); }
.editor .ql-snow .ql-picker { color: var(--ink-2); }
@media (prefers-color-scheme: dark) {
  .editor .ql-snow .ql-picker-options { background: var(--card); border-color: var(--line); }
  .editor .ql-snow .ql-tooltip { background: var(--card); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-raised); }
}


/* ---------- emoji reactions (compact, Slack-style) ---------- */
.reactions { display: inline-flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.react-chip, .react-add summary {
  display: inline-flex; align-items: center; gap: 3px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--card-soft); color: var(--ink-2);
  padding: 1px 8px; font-size: 12.5px; font-weight: 800; line-height: 1.6;
  cursor: pointer; font-family: inherit; list-style: none;
  transition: transform .06s, border-color .1s;
  -webkit-tap-highlight-color: transparent;
}
.react-chip:active { transform: scale(1.15); }
.react-chip:hover, .react-add summary:hover { border-color: var(--accent); }
.react-chip.mine { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.react-add { position: relative; }
.react-add summary::-webkit-details-marker { display: none; }
.react-add summary { opacity: .6; }
.react-menu {
  position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 30;
  display: flex; gap: 2px; padding: 5px 7px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; box-shadow: var(--shadow-raised); white-space: nowrap;
}
.react-pick {
  border: 0; background: none; font-size: 18px; cursor: pointer;
  padding: 3px 5px; border-radius: 8px; line-height: 1;
}
.react-pick:hover, .react-pick.mine { background: var(--accent-soft); }

/* ---------- compact comments ---------- */
.c-item { padding: 8px 0; border-bottom: 1px solid var(--line); }
.c-item:last-of-type { border-bottom: 0; }
.c-line { display: flex; align-items: center; gap: 8px; }
.c-line .muted { font-size: 12.5px; line-height: 1; }
.c-body { font-size: 14.5px; }
.c-body p { margin: 2px 0; }
.c-meta { display: flex; align-items: center; gap: 10px; margin-top: 3px; flex-wrap: wrap; }
.c-reply { margin: 8px 0 0 14px; padding-left: 10px; border-left: 2px solid var(--line); }
.reply-toggle { min-width: 0; max-width: 100%; }
.reply-toggle[open] { flex-basis: 100%; }  /* open form gets its own full-width row */
.c-replyform { margin-top: 8px; width: 100%; }
.c-replyform .editor { max-width: 100%; }
.c-replyform .ql-toolbar { flex-wrap: wrap; }
.reply-toggle summary {
  list-style: none; cursor: pointer; color: var(--ink-3);
  font-size: 12px; font-weight: 800;
}
.reply-toggle summary::-webkit-details-marker { display: none; }
.reply-toggle summary:hover { color: var(--accent); }

.card.repealed { opacity: .6; }
.card.repealed h2 { text-decoration: line-through; }

/* ---------- profile ---------- */
/* the player card: profile header dressed like the program's roster page —
   crest first (avatar with the member-since arc), name and fandom beneath */
.profile-head {
  display: flex; flex-direction: column; gap: 10px; align-items: center;
  text-align: center;
  background: linear-gradient(140deg, var(--accent-strong), var(--accent) 75%);
  border: 0; border-bottom: 3px solid var(--gold);
  box-shadow: var(--shadow-raised);
  color: var(--on-accent);
}
.profile-crest { position: relative; width: 164px; height: 164px; flex-shrink: 0; }
.profile-crest svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.profile-crest svg text {
  font-family: var(--display); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase;
  fill: color-mix(in srgb, var(--on-accent) 80%, transparent);
}
.profile-crest .avatar {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.profile-head { position: relative; }
/* favorite-team mark rides the card's upper-right corner, wordless */
.profile-fav-logo {
  position: absolute; top: 12px; right: 12px;
  width: 40px; height: 40px; object-fit: contain;
  background: #fff; border-radius: 10px; padding: 4px; box-sizing: border-box;
  box-shadow: var(--shadow);
}
.profile-id { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.profile-id h1 { justify-content: center; }
.real-name {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  font-size: 15px; font-weight: 700;
  color: color-mix(in srgb, var(--on-accent) 78%, transparent);
}
.profile-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
/* centered card masthead: punched-up title over a letterman rule */
.card-title { text-align: center; font-size: 17px; letter-spacing: .04em; }
.card-rule {
  width: 64px; height: 3px; margin: 9px auto 13px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}
.stats-season { position: absolute; top: 10px; right: 10px; }

.fandom-body { display: flex; flex-direction: column; gap: 13px; margin-top: 10px; }
.fandom-body .fav-team { margin-top: 0; }
.fandom-body p, .fandom-body .bio { margin: 0; }
.fandom-row { display: flex; flex-direction: column; gap: 3px; }
.fandom-label {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .07em; color: var(--ink-3);
}
.profile-head .muted { color: color-mix(in srgb, var(--on-accent) 72%, transparent); }
.profile-head .muted a { color: inherit; }
.profile-id h1 { color: var(--on-accent); }
.avatar { width: 116px; height: 116px; border-radius: 999px; object-fit: cover;
          border: 2px solid var(--line); flex-shrink: 0; }
.avatar-blank { display: inline-grid; place-items: center; font-size: 52px; background: var(--card-soft); }
.profile-head .avatar { border: 2.5px solid var(--gold); }
.profile-id h1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fav-team { display: flex; align-items: center; gap: 7px; margin-top: 6px; font-weight: 800; }
.fav-team img {
  height: 28px; width: 28px; object-fit: contain;
  background: #fff; border-radius: 7px; padding: 2px; box-sizing: border-box;
}
.bio { margin: 8px 0 0; font-size: 14.5px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stat-row-2 { grid-template-columns: repeat(2, 1fr); }
.stat { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 4px; text-align: center; }
.stat-n { font-family: var(--display); font-size: 19px; font-weight: 400; text-align: center; }
.stat-l { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); text-align: center; }
textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line);
           border-radius: var(--radius-sm); background: var(--card); color: var(--ink);
           font-size: 16px; font-family: inherit; }

/* ---------- bylaws: the League Charter, in full legal dress ---------- */
.bylaws-masthead { text-align: center; margin: 20px 4px 10px; }
.bylaws-masthead h1 { font-size: clamp(20px, 5vw, 27px); letter-spacing: .05em; }
.bylaws-masthead .rule-double {
  border-top: 5px double var(--on-bg-soft);
  width: min(430px, 82%); margin: 10px auto;
}
.bylaws-sub {
  font-family: Georgia, "Times New Roman", serif; font-style: italic;
  font-size: 13.5px; color: var(--on-bg-soft);
  max-width: 58ch; margin: 4px auto;
}
.bylaw-desig { font-family: var(--display); color: var(--gold); font-size: 13px; letter-spacing: .07em; }
.bylaw-card .post-head .muted { font-style: italic; }
.bylaw-card .post-body {
  font-family: Georgia, "Times New Roman", serif; font-size: 15.5px; line-height: 1.65;
}
.card.repealed { position: relative; opacity: .85; }
.card.repealed::after {
  content: "REPEALED"; position: absolute; inset: 0;
  display: grid; place-items: center; pointer-events: none;
  font-family: var(--display); font-size: clamp(34px, 9vw, 56px);
  letter-spacing: .12em; color: var(--loss); opacity: .18;
  transform: rotate(-14deg);
}
.bylaws-seal { display: flex; justify-content: center; margin: 26px 0 2px; }
.seal-ring {
  width: 122px; height: 122px; border-radius: 999px;
  border: 2px solid var(--gold); outline: 2px solid var(--gold); outline-offset: 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; text-align: center; color: var(--gold);
  font-family: var(--display); transform: rotate(-8deg);
}
.seal-ring .seal-fish { font-size: 28px; line-height: 1; }
.seal-ring .seal-line { font-size: 9.5px; letter-spacing: .15em; }

/* ---------- drag reorder (console bylaws) ---------- */
.sort-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 6px; border-bottom: 1px solid var(--line);
  background: var(--card); touch-action: none;
}
.sort-row:last-child { border-bottom: 0; }
.sort-grip { color: var(--ink-3); font-size: 17px; padding: 0 4px; }
/* whole row drags — the grip is now just a visual hint */
.sort-row { cursor: grab; touch-action: manipulation; }
.sort-row:active { cursor: grabbing; }
.sort-title { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sort-ghost { opacity: .4; background: var(--accent-soft); }

/* ---------- floating pick progress (corner ring) ---------- */
.progress-ring, .progress-check {
  position: fixed; z-index: 24; left: 16px;
  bottom: calc(env(safe-area-inset-bottom) + 16px);
  width: 54px; height: 54px; border-radius: 999px;
  display: grid; place-items: center; box-shadow: var(--shadow-raised);
  transform: translateZ(0); will-change: transform;  /* see .chat-fab */
}
@media (min-width: 760px) { .progress-ring, .progress-check { bottom: 20px; } }
.progress-ring {
  background: conic-gradient(var(--accent) calc(var(--pct) * 1%), var(--card-soft) 0);
  transition: background .3s ease;
}
.ring-inner {
  width: 42px; height: 42px; border-radius: 999px; background: var(--card);
  display: grid; place-items: center;
}
.ring-inner .num { font-size: 12.5px; font-weight: 900; }
.progress-check {
  background: var(--win); color: #fff; font-size: 24px; font-weight: 900;
  animation: pop .25s ease-out;
}
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
/* deadline-passed error, small centered pill */
.pick-error {
  position: fixed; z-index: 25; left: 0; right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 14px);
  display: flex; justify-content: center; pointer-events: none;
}
@media (min-width: 760px) { .pick-error { bottom: 18px; } }
.progress-bar.error {
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--loss); color: var(--loss);
  border-radius: 999px; box-shadow: var(--shadow-raised);
  padding: 9px 16px; font-size: 13.5px; font-weight: 800;
}

/* ---------- author chip (name + favorite-team logo) ---------- */
.author { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; font-size: 13px; line-height: 1; }
.author a { color: var(--ink); line-height: 1; }
.author-logo { height: 15px; width: 15px; object-fit: contain; display: block; }

/* ---------- title badge (league honorifics) ---------- */
.title-badge {
  display: inline-flex; align-items: center;
  padding: 1px 8px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--accent) 22%, var(--accent-soft)));
  color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  font-size: 11px; font-weight: 800; letter-spacing: .02em;
  line-height: 1.6; white-space: nowrap;
}

/* ---------- feed pager ---------- */
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; margin: 18px 0 6px; }
.pager .chip { text-decoration: none; padding: 5px 12px; font-size: 13px; }

/* ---------- league status banner ---------- */
/* the scoreboard: deep royal masthead with an orange base trim */
.league-banner {
  display: flex; flex-direction: column; gap: 4px;
  margin: 14px 0 4px; padding: 13px 16px;
  background: linear-gradient(140deg, var(--accent-strong), var(--accent) 75%);
  border: 0; border-bottom: 3px solid var(--gold);
  border-radius: var(--radius); box-shadow: var(--shadow-raised);
  color: var(--on-accent);
}
.league-banner .muted { color: color-mix(in srgb, var(--on-accent) 72%, transparent); }
.banner-season { font-family: var(--display); font-weight: 400; font-size: 14px; letter-spacing: .04em; }
.banner-head { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.banner-top { display: flex; gap: 8px 16px; flex-wrap: wrap; margin-top: 4px; }
/* the current-week strip: the week's state, loud, right under the scoreboard */
.week-strip {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  margin: 10px 0 4px; padding: 13px 16px; text-align: center;
  background: var(--card); border: 1.5px solid var(--line);
  border-left: 6px solid var(--accent);
  border-radius: var(--radius); box-shadow: var(--shadow);
  color: var(--ink);
}
.week-strip:hover { text-decoration: none; box-shadow: var(--shadow-raised); }
.week-strip .ws-main {
  font-family: var(--display); font-size: 17px; letter-spacing: .05em;
  text-transform: uppercase;
}
.week-strip .ws-sub { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.week-strip.open { border-left-color: var(--win); }
.week-strip.open .ws-main { color: var(--win); }
.week-strip.locked { border-left-color: var(--pending); }
.week-strip.locked .ws-main { color: var(--pending); }
.week-strip.final .ws-main { color: var(--accent); }

.banner-rank { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; color: var(--on-accent); }
.banner-rank:hover { text-decoration: none; }
.banner-rank .rank-chip {
  width: 22px; height: 22px; font-size: 11px;
  background: color-mix(in srgb, var(--on-accent) 18%, transparent);
  color: var(--on-accent);
}
.banner-rank .rank-chip.lead { background: var(--gold); color: var(--on-gold); }
.banner-rank-name { color: var(--on-accent); }
.banner-rank:hover .banner-rank-name { color: var(--gold); }

/* ---------- mini avatars (results/leaderboard) ---------- */
.mini-avatar {
  width: 30px; height: 30px; border-radius: 999px; object-fit: cover;
  border: 1.5px solid var(--line); flex-shrink: 0;
}
.mini-avatar.blank { display: inline-grid; place-items: center; font-size: 15px; background: var(--card-soft); }

/* names in ranking rows link to profiles, without dressing up as links */
.member-link { color: inherit; }
.member-link:hover { color: var(--accent); text-decoration: none; }

/* avatar-first ranking rows: the photo is the element, the rank rides it
   as a badge in the upper-left quadrant */
.rank-avatar { position: relative; flex-shrink: 0; }
.rank-avatar .mini-avatar { width: 56px; height: 56px; display: block; }
.rank-avatar .mini-avatar.blank { display: grid; font-size: 26px; }
.rank-bubble {
  position: absolute; top: -5px; left: -7px; z-index: 1;
  min-width: 21px; height: 21px; padding: 0 5px; border-radius: 999px;
  display: inline-grid; place-items: center;
  background: var(--card); border: 1.5px solid var(--line);
  font-family: var(--display); font-size: 10.5px; color: var(--ink-2);
  box-shadow: var(--shadow);
}

/* 🐔 Clucko's card in a feed post */
.clucko-picks { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.clucko-picks li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.clucko-picks img { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; }

.player-tb { color: var(--ink-2); font-size: 12.5px; font-weight: 800; }

/* ---------- bell + notifications ---------- */
.bell {
  position: relative; justify-self: end;
  display: grid; place-items: center; width: 42px; height: 42px;
  border-radius: 12px; font-size: 19px; text-decoration: none;
}
.bell:hover { background: var(--accent-soft); text-decoration: none; }
.bell-badge {
  position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px;
  border-radius: 999px; background: var(--loss); color: #fff;
  font-size: 10.5px; font-weight: 900; line-height: 17px; text-align: center;
  padding: 0 4px;
}
.notif-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 4px; border-bottom: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
}
.notif-row:hover { background: var(--card-soft); text-decoration: none; }
.notif-row:last-of-type { border-bottom: 0; }
.notif-dot { width: 8px; height: 8px; border-radius: 999px; background: transparent; flex-shrink: 0; }
.notif-row.unread .notif-dot { background: var(--accent); }
.notif-row.unread .notif-title { font-weight: 900; }
.notif-main { display: flex; flex-direction: column; min-width: 0; }
.notif-title { font-weight: 700; }
.notif-body { font-size: 12.5px; }
.notif-row > .muted { margin-left: auto; flex-shrink: 0; font-size: 11.5px; }

/* ---------- segmented mode control (notification settings) ---------- */
.mode-block { margin: 10px 0 14px; }
.mode-label { display: block; font-weight: 800; font-size: 14px; margin-bottom: 6px; }
/* compact settings grid: channel mode selects live in the table header */
.notif-grid th, .notif-grid td { padding: 7px 8px; }
.notif-grid th[data-col], .notif-grid td[data-col] { text-align: center; }
.notif-grid .mode-row th { border-bottom: 1px solid var(--line); padding-top: 0; }
.mode-mini {
  font-size: 11.5px; font-weight: 700; font-family: inherit;
  padding: 3px 7px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card-soft); color: var(--ink-2);
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }

.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card-soft); }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: inline-block; padding: 7px 18px;
  font-size: 13.5px; font-weight: 800; color: var(--ink-2);
  transition: background .1s, color .1s;
}
.seg input:checked + span { background: var(--accent); color: var(--on-accent); }
.seg label:not(:last-child) span { border-right: 1px solid var(--line); }
.mode-note { margin: 6px 2px 0; min-height: 1em; }

/* ---------- honor badges: gold accolades, silver trophies ---------- */
.badge-gold, .badge-silver {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: .02em;
  line-height: 1.6; white-space: nowrap;
}
.badge-gold {
  background: linear-gradient(135deg, #fdf3d8, #f7e2a5);
  color: #7a5c0e; border: 1px solid #e4c86a;
}
.badge-silver {
  background: linear-gradient(135deg, #eef2f6, #d9e0e8);
  color: #4a5866; border: 1px solid #b9c4d0;
}
@media (prefers-color-scheme: dark) {
  .badge-gold { background: linear-gradient(135deg, #3a2f10, #4d3d12); color: #ecc94b; border-color: #6b5717; }
  .badge-silver { background: linear-gradient(135deg, #232d38, #2e3a47); color: #b8c4d1; border-color: #46586a; }
}
.badges-line { display: flex; flex-wrap: wrap; gap: 4px; margin: 3px 0 0; }
.acc-item { padding: 7px 0; border-bottom: 1px solid var(--line); }
.acc-item:last-child { border-bottom: none; }
.acc-sub { margin: 3px 0 0 24px; font-size: 13.5px; font-weight: 700; }

/* ---------- compact profile popover (pcard) ---------- */
details.pcard { display: inline; position: relative; }
details.pcard summary {
  list-style: none; cursor: pointer; display: inline;
  color: var(--ink); font-weight: inherit;
}
details.pcard summary::-webkit-details-marker { display: none; }
details.pcard summary:hover { color: var(--accent); text-decoration: underline; }
.pcard-pop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 35;
  width: 240px; padding: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-raised);
  display: flex; flex-direction: column; gap: 8px;
  font-size: 13px; white-space: normal;
}
/* JS flips these on when the default down/left placement would leave the view */
.pcard-pop.pop-up { top: auto; bottom: calc(100% + 6px); }
.pcard-pop.pop-right { left: auto; right: 0; }
.pcard-head { display: flex; align-items: center; gap: 8px; }
.pcard-head .pcard-sub { display: block; font-size: 12px; }
.pcard-row { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.pcard-badges { gap: 4px; }

/* ---------- trophy room ---------- */
.trophy-card { text-decoration: none; color: var(--ink); }
.trophy-card:hover { border-color: var(--accent); text-decoration: none; }
.trophy-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 12px; }
.trophy-hero { width: 100%; aspect-ratio: 1 / 1; height: auto; object-fit: cover; border-radius: var(--radius-sm); }
.trophy-hero.blank { display: grid; place-items: center; font-size: 48px; background: var(--card-soft); }
.trophy-name { font-size: 16px; }
.holder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.holder { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px;
          background: var(--card-soft); border-radius: var(--radius-sm); }
.holder-label { font-size: 11px; font-weight: 800; text-transform: uppercase;
                letter-spacing: .06em; color: var(--ink-3); }
.holder-name { font-size: 17px; font-weight: 900; color: var(--ink); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: 120px; object-fit: cover; border-radius: var(--radius-sm); }
.gallery figcaption { font-size: 11px; margin-top: 2px; }

/* ---------- trophy carousel photo + lore ---------- */
.trophy-featured {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; cursor: pointer;
  background: var(--card-soft); border-radius: var(--radius-sm); display: block;
}
.trophy-featured.blank { display: grid; place-items: center; font-size: 72px; cursor: default; }
.trophy-lore { margin-top: 12px; }
.carousel { position: relative; max-width: 420px; margin: 0 auto; }
.car-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 999px; border: none; cursor: pointer;
  background: rgba(20, 28, 38, .55); color: #fff; font-size: 22px; font-weight: 900;
  line-height: 1; display: grid; place-items: center;
}
.car-prev { left: 8px; }
.car-next { right: 8px; }
.car-count {
  position: absolute; right: 10px; bottom: 10px; padding: 2px 8px;
  border-radius: 999px; background: rgba(20, 28, 38, .55); color: #fff;
  font-size: 11.5px; font-weight: 800;
}
.car-caption { text-align: center; margin: 6px 0 0; min-height: 1em; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8, 14, 22, .9); backdrop-filter: blur(3px);
}
.lightbox[hidden] { display: none; }
.lb-figure { margin: 0; max-width: 92vw; max-height: 88vh; text-align: center; }
.lb-figure img { max-width: 92vw; max-height: 80vh; object-fit: contain; border-radius: 8px; }
.lb-figure figcaption { color: #dfe9ff; font-size: 13px; font-weight: 600; margin-top: 8px; }
.lb-nav, .lb-close {
  position: absolute; background: rgba(255,255,255,.12); color: #fff;
  border: 0; border-radius: 999px; cursor: pointer;
  width: 44px; height: 44px; font-size: 24px; font-weight: 900;
}
.lb-nav:hover, .lb-close:hover { background: rgba(255,255,255,.25); }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-close { top: 14px; right: 14px; width: 38px; height: 38px; font-size: 18px; }

/* ---------- chat ---------- */
.chat-topbar { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin: 14px 2px 8px; }
.chat-topbar h1 { font-size: 22px; }
/* room picker: one pill that opens the room list (▾ marks it a selector) */
.room-picker { position: relative; }
.room-picker summary { list-style: none; cursor: pointer; padding: 6px 12px; font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px; user-select: none; }
.room-picker summary::-webkit-details-marker { display: none; }
.room-picker .chev { font-size: 10px; opacity: .65; transition: transform .15s ease; }
.room-picker[open] .chev { transform: rotate(180deg); }
.room-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 35;
  min-width: 230px; max-width: 78vw; max-height: 55vh; overflow-y: auto; padding: 6px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-raised);
  display: flex; flex-direction: column; gap: 2px; }
.room-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border-radius: var(--radius-sm); text-decoration: none; color: var(--ink);
  font-size: 13px; font-weight: 650; }
.room-item:hover { background: var(--card-soft); }
.room-item.current { background: var(--accent-soft); color: var(--accent); }
.room-item .room-name { flex: 1; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.chat-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.chat-log { max-height: 58vh; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 82%; }
.chat-msg.mine { align-self: flex-end; text-align: right; }
.chat-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-bottom: 2px; }
.chat-msg.mine .chat-meta { justify-content: flex-end; }
.chat-body {
  display: inline-block; padding: 8px 12px; border-radius: 14px;
  background: var(--card-soft); font-size: 14.5px; text-align: left;
}
.chat-msg.mine .chat-body { background: var(--accent-soft); }
.chat-body p { margin: 0; }
.chat-body .your-pick {
  margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line);
  font-size: 12.5px; font-weight: 700; color: var(--ink-2);
}
.chat-body .your-pick.correct { color: var(--win); }
.chat-body .your-pick.wrong { color: var(--loss); }
.chat-day {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 2px 10px; color: var(--ink-3);
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.chat-day::before, .chat-day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.chat-compose { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-compose input { flex: 1; }

/* ---------- divisions ---------- */
.div-card { display: flex; align-items: center; gap: 12px; }
.div-logo { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--line); }
.div-logo.blank { display: grid; place-items: center; font-size: 22px; background: var(--card-soft); }
.div-logo.big { width: 72px; height: 72px; font-size: 32px; }
/* division detail: the emblem is the hero */
.div-logo.hero {
  width: min(200px, 56vw); height: min(200px, 56vw);
  font-size: 84px; border-radius: 30px;
  box-shadow: var(--shadow-raised);
}
.div-head { flex-direction: column; text-align: center; gap: 10px; }
.div-head .div-main { align-items: center; }
.div-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.div-name { font-size: 17px; font-weight: 900; color: var(--ink); }
.div-action { flex-shrink: 0; }
.div-head { display: flex; align-items: center; gap: 14px; }

/* ---------- chat: full-height layout ----------
   The chat page is the one screen that owns the whole viewport: the page
   itself never scrolls, the log scrolls inside the card, and the compose
   row docks flush against the bottom of the screen (safe-area padded). */
body:has(.chat-card) {
  /* --vvh tracks the visual viewport (league.js) so the keyboard shrinks
     the card; 100dvh is the no-JS / pre-load fallback */
  height: var(--vvh, 100dvh); overflow: hidden; padding-bottom: 0;
  display: flex; flex-direction: column;
}
/* keyboard covers the home indicator — drop the safe-area pad meanwhile */
body.kb-open .chat-compose { padding-bottom: 10px; }
body:has(.chat-card) .container {
  flex: 1; min-height: 0; width: 100%;
  display: flex; flex-direction: column;
  padding-bottom: 0;
}
.chat-topbar { flex-shrink: 0; }
.chat-card { display: flex; flex-direction: column; padding: 0; overflow: hidden;
  flex: 1; min-height: 0; margin-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0; border-bottom: 0; }
.chat-compose { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
/* desktop keeps a floating card with breathing room below */
@media (min-width: 760px) {
  .chat-card { margin-bottom: 16px; border-radius: var(--radius); border-bottom: 1px solid var(--line); }
  .chat-compose { padding-bottom: 10px; }
}
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
/* the pre-full-height 58vh cap would strand a dead zone under the compose
   row on tall desktop screens — the card owns the height now */
.chat-card .chat-log { max-height: none; }
.chat-log > #chat-items { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }

/* themed scrollbar on inner scroll regions (chat log, header menu) */
.chat-log, .menu-panel {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--ink-3) 55%, transparent) transparent;
}
.chat-log::-webkit-scrollbar, .menu-panel::-webkit-scrollbar { width: 8px; }
.chat-log::-webkit-scrollbar-track, .menu-panel::-webkit-scrollbar-track { background: transparent; }
.chat-log::-webkit-scrollbar-thumb, .menu-panel::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--ink-3) 45%, transparent);
  border-radius: 999px;
}
.chat-log::-webkit-scrollbar-thumb:hover, .menu-panel::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--ink-3) 75%, transparent);
}
.room-unread { display: inline-grid; place-items: center; min-width: 17px; height: 17px;
  border-radius: 999px; background: var(--loss); color: #fff; font-size: 10.5px;
  font-weight: 900; padding: 0 4px; margin-left: 3px; }

/* ---------- floating chat bubble (feed & elsewhere) ---------- */
.chat-fab {
  position: fixed; z-index: 24; right: 16px;
  bottom: calc(env(safe-area-inset-bottom) + 16px);
  width: 54px; height: 54px; border-radius: 999px;
  display: grid; place-items: center; font-size: 24px;
  background: var(--accent); color: #fff; text-decoration: none;
  box-shadow: var(--shadow-raised);
  /* own compositing layer — iOS lets fixed elements visually lag/stick
     during momentum scroll on long pages without this */
  transform: translateZ(0); will-change: transform;
}
.chat-fab:hover { text-decoration: none; filter: brightness(1.08); }
@media (min-width: 760px) { .chat-fab { bottom: 20px; } }
.chat-fab-badge {
  position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px;
  border-radius: 999px; background: var(--loss); color: #fff;
  font-size: 11px; font-weight: 900; line-height: 20px; text-align: center;
  padding: 0 5px; border: 2px solid var(--bg);
}
/* hide the FAB while already on a chat page */
body:has(.chat-card) .chat-fab { display: none; }

/* ---------- inline images in comments & chat ---------- */
.c-body img, .chat-body img { max-width: 100%; max-height: 320px; border-radius: 10px; margin-top: 4px; }
/* tiny inline team logos (Tuna Bot / Clucko cards) carry width attrs and
   are square art — exempt them from the photo rounding that crops them */
.post-body img[width], .chat-body img[width], .c-body img[width] {
  border-radius: 0; margin-top: 0; vertical-align: middle;
}
.chat-attach { display: inline-grid; place-items: center; width: 38px; height: 38px;
  border-radius: 10px; cursor: pointer; font-size: 18px; color: var(--ink-2); flex-shrink: 0; }
.chat-attach:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- console breadcrumb ---------- */
.breadcrumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 13px; font-weight: 700; margin: 12px 2px 2px; }
.breadcrumb a { color: var(--accent); }
.breadcrumb span { color: var(--ink-3); }
.crumb-sep { color: var(--ink-3); }

/* ---------- playoff bracket cards ---------- */
.bracket-card { padding: 12px 14px; }
.bracket-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.bracket-card.locked { opacity: .7; }
.bracket-card .matchup .at { font-size: 9.5px; }
.bracket-wait { margin: 4px 0; font-size: 13px; }

/* ---------- bracket seed grid (console) ---------- */
.seed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.seed-cell { display: flex; align-items: center; gap: 6px; }
.seed-cell .seed-n { font-weight: 900; color: var(--ink-3); width: 30px; }
.seed-cell input { flex: 1; }
