/* SPPickEmLeague, "Broadcast" look: navy and red like TV sports graphics. Light by default, dark when the device asks.
   --brand: navy (bars, strips)  --brand-2: links and selections  --accent: red (main buttons, active tab, save bar) */
:root {
  --bg: #E3E8F0;   /* a hair darker than the cards so they stand out */
  --card: #FFFFFF;
  --card-2: #F3F6FB;
  --ink: #0B1730;
  --muted: #56647D;
  --line: #DCE2EC;
  --choice-line: #A9B4C6;
  --brand: #0A1A3A;
  --brand-2: #0A3D91;
  --accent: #D7263D;
  --on-brand: #FFFFFF;
  --on-brand-muted: #A9B6CE;
  --gold: #FFB020;
  --win: #1B7A45;
  --win-bg: #E2F4EA;
  --loss: #C02134;
  --loss-bg: #FCE7EA;
  --push: #8A5A00;
  --push-bg: #FFF1D6;
  --sel: #EAF1FF;
  --pick: #CFE0FF;   /* your picked team: a clearly darker blue than plain highlights */
  --radius: 12px;
  --shadow: 0 1px 2px rgba(10, 26, 58, .08), 0 6px 18px rgba(10, 26, 58, .06);
  --display: "Saira Condensed", "Barlow Condensed", "Arial Narrow", Inter, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #080F1F;
    --card: #101A30;
    --card-2: #15213B;
    --ink: #E6ECF7;
    --muted: #9AA8C2;
    --line: #23314F;
    --choice-line: #4A5B80;
    --brand: #050B18;
    --brand-2: #7EB0FF;
    --accent: #FF4D5E;
    --win: #4FD08A;
    --win-bg: #12301F;
    --loss: #FF7A86;
    --loss-bg: #3A1820;
    --push: #FFC861;
    --push-bg: #3A2C10;
    --sel: #17284A;
    --pick: #22417A;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--brand-2); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: .2px; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: 30px; }
h2 { font-size: 24px; }
h3 { font-size: 19px; }
code { background: var(--sel); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.mt { margin-top: 16px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.content { padding-top: 20px; padding-bottom: 40px; min-height: 60vh; }

/* Top bar */
.topbar { background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 20; }
.topbar-inner { display: flex; align-items: center; gap: 18px; height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-name { font-family: var(--display); font-size: 22px; font-weight: 800; line-height: 1; display: flex; align-items: baseline; gap: 2px; white-space: nowrap; }
.brand-name b { color: var(--gold); }
.brand-name small { font-size: 13px; font-weight: 600; opacity: .75; margin-left: 5px; text-transform: uppercase; letter-spacing: 1px; }
.topnav { display: flex; gap: 4px; flex: 1; }
.topnav a { color: #D6E6DE; text-decoration: none; padding: 7px 12px; border-radius: 8px; font-weight: 500; font-size: 14px; }
.topnav a:hover, .topnav a.on { background: rgba(255, 255, 255, .12); color: #fff; }
.topnav a.dev { color: var(--gold); }
.usermenu { position: relative; }
.usermenu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.usermenu summary::-webkit-details-marker { display: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: var(--brand); display: grid; place-items: center; font-weight: 700; }
.uname { font-size: 14px; }
.usermenu-pop { position: absolute; right: 0; top: 42px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 190px; padding: 6px; }
.usermenu-pop a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.usermenu-pop a:hover { background: var(--sel); }

/* League bar + tabs */
.leaguebar { background: var(--card); border-bottom: 1px solid var(--line); }
.leaguebar-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 16px; }
.leaguebar-title h1 { margin: 0; font-size: 28px; }
.tabs { display: flex; gap: 2px; overflow-x: auto; margin-top: 10px; scrollbar-width: none; }
.tabs a { padding: 10px 14px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-color: var(--brand-2); }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; }
.subtabs a { padding: 7px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; }
.subtabs a.on { background: var(--brand); color: #fff; border-color: var(--brand); }

.sport-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--sel); color: var(--brand-2); }
.sport-nba, .sport-ncaab { background: #FFF0E0; color: #B4530A; }
@media (prefers-color-scheme: dark) { .sport-nba, .sport-ncaab { background: #3A2614; color: #F3A35C; } }
.sport-epl, .sport-laliga, .sport-bund, .sport-seriea, .sport-ligue1 { background: #E3F5E8; color: #1B7A3A; }
@media (prefers-color-scheme: dark) { .sport-epl, .sport-laliga, .sport-bund, .sport-seriea, .sport-ligue1 { background: #15301E; color: #6FD08F; } }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--sel); color: var(--brand-2); font-style: normal; vertical-align: middle; }
.badge-gold { background: #FFF1C2; color: #7A5A00; }
@media (prefers-color-scheme: dark) { .badge-gold { background: #3D3314; color: #F5CF55; } }

/* Cards, buttons, forms */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; min-width: 0; }
.card.narrow { max-width: 680px; margin-left: auto; margin-right: auto; }
.card.empty { text-align: center; padding: 36px 20px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.page-head h1, .page-head h2 { margin: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.two-col > .card { margin-bottom: 0; }
.overview { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.overview .card { margin: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--brand-2); color: #fff; border: 0; border-radius: 10px; padding: 10px 18px; font: 600 15px Inter, sans-serif; text-decoration: none; cursor: pointer; margin: 2px 0; }
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-danger { background: var(--loss); }
.btn-link { background: none; border: 0; color: var(--brand-2); cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }
.btn-link.danger { color: var(--loss); }
.field { margin: 0 0 14px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: 15px Inter, sans-serif; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-2); outline-offset: 0; border-color: transparent; }
input[type=checkbox], input[type=radio] { width: auto; }
input.num { width: 72px; padding: 6px 8px; }
select { width: auto; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 0 0 10px; }
.check input { margin-top: 3px; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; }
form.inline { display: inline; margin-left: 8px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.choice { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--choice-line); border-radius: 12px; padding: 12px; cursor: pointer; margin-bottom: 8px; position: relative; }
.choice:hover { border-color: var(--muted); }
.choice-grid .choice { margin: 0; }
.choice:has(input:checked) { border-color: var(--brand-2); background: var(--sel); }
.choice input { margin-top: 4px; }
/* One-tap options: the whole box is the button, so the radio dot is hidden (still there for keyboards and screen readers) */
.choice input[type=radio] { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.choice:has(input[type=radio]:focus-visible) { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.choice span { display: flex; flex-direction: column; }
.choice small { color: var(--muted); font-size: 13px; }
.choice.disabled { opacity: .55; cursor: not-allowed; }
/* Inside a .field group the generic "label { display: block }" rule must not stack the box above its text */
.field label.choice, .field label.check { display: flex; }

.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; border: 1px solid transparent; }
.alert-success { background: var(--win-bg); color: var(--win); border-color: color-mix(in srgb, var(--win) 25%, transparent); }
.alert-error { background: var(--loss-bg); color: var(--loss); border-color: color-mix(in srgb, var(--loss) 25%, transparent); }
.alert-info { background: var(--sel); color: var(--ink); border-color: var(--line); }

/* Dashboard */
.league-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: stretch; }
/* Each card shares 5 row heights with the cards beside it (subgrid): badges, name, details (may wrap), stats, picks bar, so stats and the bottom bar line up across a row. */
.league-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); display: grid; grid-template-rows: subgrid; grid-row: span 5; row-gap: 6px; transition: transform .12s; min-width: 0; }
.league-card:hover { transform: translateY(-2px); border-color: var(--brand-2); }
.league-card h3 { margin: 4px 0 0; font-size: 22px; }
.league-card p { margin: 0; }
.lc-top { display: flex; gap: 6px; }
.lc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 4px; align-self: end; border-top: 1px solid var(--line); padding-top: 10px; }
.lc-stats div, .pick-summary div, .team-stats div { display: flex; flex-direction: column; }
.lc-stats b, .pick-summary b, .team-stats b { font-family: var(--display); font-size: 22px; line-height: 1.1; }
.lc-stats span, .pick-summary span, .team-stats span { font-size: 12px; color: var(--muted); }
.lc-due { display: flex; align-items: center; min-height: 38px; font-size: 13px; font-weight: 600; padding: 8px 10px; border-radius: 8px; align-self: stretch; }
.lc-due.due, .big.due { background: var(--push-bg); color: var(--push); }
.lc-due.done, .big.done { background: var(--win-bg); color: var(--win); }
.big { font-size: 18px; font-weight: 600; padding: 8px 12px; border-radius: 10px; display: inline-block; margin: 0 0 8px; }

/* Picks */
.week-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.week-pick select { font-weight: 600; }
.pick-summary { display: flex; flex-wrap: wrap; gap: 26px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px; }
.pick-summary p { flex: 1 1 260px; margin: 0; }
/* Game tiles: every card in a row shares the same three row heights (subgrid), and every team tile has the
   same fixed lines, so times, teams, records and the bottom bar line up straight across. */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; align-items: stretch; }
.game { display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); min-width: 0; }
.game.locked { background: color-mix(in srgb, var(--card) 90%, var(--line)); }
.game.res-win { border-color: var(--win); }
.game.res-loss, .game.res-none { border-color: color-mix(in srgb, var(--loss) 60%, var(--line)); }
.game.joker { box-shadow: 0 0 0 2px var(--gold), var(--shadow); }
.game-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; height: 24px; font-size: 12px; color: var(--muted); white-space: nowrap; min-width: 0; }
.gm-time { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.gm-status { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.mini-sport { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .5px; background: var(--sel); color: var(--brand-2); border-radius: 4px; padding: 0 5px; margin-right: 6px; }
.game-meta .lock.soon { color: var(--push); font-weight: 700; }
.game-meta .lock.is-locked { font-weight: 600; }
.live { color: var(--loss); font-weight: 700; }
.final { font-weight: 700; color: var(--ink); }
.worth { background: var(--brand); color: #fff; border-radius: 6px; padding: 1px 7px; font-weight: 700; }
.matchup { display: grid; grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr); align-items: stretch; }
.at { align-self: center; text-align: center; color: var(--muted); font-weight: 700; }
/* Soccer: a narrow Draw tile between the two teams */
.matchup.has-draw { grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr); column-gap: 6px; }
.team.draw { --team: var(--muted); grid-template-columns: 1fr; grid-template-rows: 1fr auto; grid-template-areas: none; place-items: center; padding: 6px 2px; border-left-width: 2px; text-align: center; }
.team.draw .draw-txt { font-family: var(--display); font-size: 17px; font-weight: 800; letter-spacing: .5px; }
.team.draw .draw-pct { font-size: 11px; color: var(--muted); min-height: 14px; }
.team { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 30px 18px 16px 16px; grid-template-areas: "abbr score" "name name" "rec rec" "pct pct"; column-gap: 6px; border: 2px solid var(--line); border-left: 6px solid var(--team); border-radius: 12px; padding: 8px 10px 6px; cursor: pointer; min-width: 0; background: var(--card); transition: border-color .12s, background .12s; }
.team input { position: absolute; opacity: 0; pointer-events: none; }
.team > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; align-self: center; }
.team-abbr { grid-area: abbr; font-family: var(--display); font-size: 24px; font-weight: 800; line-height: 30px; }
.team-score { grid-area: score; font-family: var(--display); font-size: 24px; font-weight: 700; line-height: 30px; text-align: right; }
.team-name { grid-area: name; font-size: 13px; line-height: 18px; }
.team-name small { color: var(--muted); }
.team-rec { grid-area: rec; font-size: 12px; line-height: 16px; color: var(--muted); }
.team-pct { grid-area: pct; position: relative; font-size: 11px; line-height: 16px; height: 16px; align-self: stretch !important; }
.team-pct i { position: absolute; left: 0; top: 6px; height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--team) 70%, transparent); max-width: 50%; }
.team-pct em { position: absolute; right: 0; font-style: normal; color: var(--muted); }
.game.open .team:hover { border-color: color-mix(in srgb, var(--brand-2) 50%, var(--line)); border-left-color: var(--team); }
.team.sel, .team:has(input:checked) { border-color: var(--brand-2); border-left-color: var(--team); background: var(--sel); box-shadow: inset 0 0 0 1px var(--brand-2); }
.team.sel::after, .team:has(input:checked)::after { content: "✓"; position: absolute; top: -9px; right: -7px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-2); color: #fff; font-size: 13px; font-weight: 800; }
.game.locked .team { cursor: default; }
.game.locked .team:not(.sel) { opacity: .7; }
.game-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 36px; }
.result-slot { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.result { font-weight: 700; font-size: 14px; padding: 2px 10px; border-radius: 8px; }
.result.win { color: var(--win); background: var(--win-bg); }
.result.loss { color: var(--loss); background: var(--loss-bg); }
.result.push { color: var(--push); background: var(--push-bg); }
.auto-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); border: 1px dashed var(--line); border-radius: 6px; padding: 0 6px; }
.info-link { color: var(--muted); }
.line-txt { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Confidence picker */
.conf-pick { position: relative; }
.conf-btn, .conf-static { display: inline-flex; align-items: baseline; gap: 4px; height: 34px; padding: 0 12px 0 14px; border-radius: 999px; font: 800 18px var(--display); }
.conf-btn { cursor: pointer; border: 0; color: #fff; background: linear-gradient(135deg, var(--brand-2), var(--brand)); box-shadow: 0 2px 8px rgba(14, 59, 46, .3); align-items: center; }
.conf-btn small, .conf-static small { font: 600 11px Inter, sans-serif; opacity: .8; text-transform: uppercase; }
.conf-btn .chev { width: 8px; height: 8px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg) translate(-2px, -2px); margin-left: 4px; }
.conf-btn.empty { background: var(--card); color: var(--loss); border: 2px dashed color-mix(in srgb, var(--loss) 60%, var(--line)); box-shadow: none; }
.conf-btn.empty .chev { border-color: var(--loss); }
.conf-static { align-items: center; background: var(--line); color: var(--ink); }
.conf-pop { position: absolute; z-index: 50; width: 260px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 40px rgba(0, 0, 0, .22); padding: 12px; }
.conf-pop header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.conf-pop .chips { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.conf-pop .chips button { height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 800 16px var(--display); cursor: pointer; }
.conf-pop .chips button:hover, .conf-pop .chips button:focus-visible { background: var(--brand-2); color: #fff; border-color: var(--brand-2); outline: none; }
.conf-pop .chips button.cur { background: var(--gold); color: var(--brand); border-color: var(--gold); }
.conf-pop .none { font-size: 13px; color: var(--muted); grid-column: 1 / -1; }
.joker-tag { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap; }
.joker-tag input { position: absolute; opacity: 0; pointer-events: none; }
.joker-tag:has(input:checked), .joker-tag.on { background: var(--gold); border-color: var(--gold); color: var(--brand); }

/* Nicer native selects */
select { appearance: none; -webkit-appearance: none; padding: 9px 38px 9px 16px; border-radius: 999px; font-weight: 600; cursor: pointer; background-color: var(--card);
  background-image: linear-gradient(45deg, transparent 50%, var(--brand-2) 50%), linear-gradient(135deg, var(--brand-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; box-shadow: var(--shadow); }
select:hover { border-color: var(--brand-2); }
.savebar { position: sticky; bottom: 0; z-index: 10; display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-top: 16px; box-shadow: 0 -4px 18px rgba(0, 0, 0, .08); }
.savebar #saveStatus { margin-right: auto; }

/* Tables */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); max-width: 100%; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 600; background: var(--card); }
tr:last-child td { border-bottom: 0; }
tr.me td { background: var(--sel); }
.sticky { position: sticky; left: 0; background: var(--card); z-index: 1; }
tr.me .sticky { background: var(--sel); }
.grid th.gcol { text-align: center; line-height: 1.15; font-size: 11px; }
.grid th.gcol span, .grid th.gcol small { display: block; }
.grid th.gcol.open { color: var(--muted); opacity: .7; }
.pick-cell { text-align: center; font-weight: 600; font-size: 13px; }
.pick-cell small { display: block; font-size: 10px; color: var(--muted); font-weight: 500; }
.r-win { background: var(--win-bg); color: var(--win); }
.r-loss, .r-none { background: var(--loss-bg); color: var(--loss); }
.r-push { background: var(--push-bg); color: var(--push); }
.standings td.wk, .standings th.wk { text-align: center; color: var(--muted); font-size: 13px; }
.list { width: 100%; }
.list td, .list th { white-space: normal; }
.slate-table tr.out td { opacity: .55; }
.mini-standings { list-style: none; padding: 0; margin: 0 0 12px; }
.mini-standings li { display: flex; justify-content: space-between; padding: 6px 8px; border-radius: 8px; }
.mini-standings li.me { background: var(--sel); }
.champion { background: linear-gradient(90deg, #FFF1C2, transparent); color: #7A5A00; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; }
@media (prefers-color-scheme: dark) { .champion { background: linear-gradient(90deg, #3D3314, transparent); color: #F5CF55; } }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { margin: 0; font-weight: 500; }
.plain { list-style: none; padding: 0; }
.plain li { padding: 6px 0; border-bottom: 1px solid var(--line); }

.qr-row { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.share { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.code-big { font-size: 20px; font-weight: 700; letter-spacing: 2px; padding: 6px 12px; }
.share-link { flex: 1 1 220px; font-size: 13px; }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 22px; cursor: pointer; transition: .15s; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + span { background: var(--win); }
.switch input:checked + span::before { transform: translateX(18px); }
.danger-zone { border-color: color-mix(in srgb, var(--loss) 40%, var(--line)); }

/* Plans */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.plan-premium { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 7%, var(--card)); }
.plan.current { outline: 2px solid var(--brand-2); }
.price { font-family: var(--display); font-size: 30px; font-weight: 700; margin: 0; }
.price small { font-family: Inter, sans-serif; font-size: 13px; color: var(--muted); font-weight: 500; }
.plan ul { padding-left: 18px; margin: 10px 0; font-size: 14px; }

/* Injuries & stats */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.team-grid .card, .two-col .team-card { margin: 0; }
.team-card { border-top: 5px solid var(--team); }
.team-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--team); margin-right: 8px; }
.team-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 8px 0 14px; }
.inj td { padding: 6px 4px; font-size: 14px; }
.inj-status { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 6px; background: var(--push-bg); color: var(--push); }
.inj-status.s-out, .inj-status.s-injuredreserve, .inj-status.s-outforseason { background: var(--loss-bg); color: var(--loss); }

/* Ads + footer */
.ad-slot { margin-top: 26px; border: 1px dashed var(--line); border-radius: var(--radius); padding: 14px; display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: 13px; background: var(--card); }
.ad-tag { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.site-foot { border-top: 1px solid var(--line); padding: 18px 0 30px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-size: 13px; margin: 14px 0 6px; }
.legal-links a { color: var(--muted); }
.site-credit { color: var(--muted); align-items: baseline; gap: 4px 8px; }
.site-credit .dot { opacity: .6; }
.site-foot .muted { text-align: center; margin: 0; }

/* Mail outbox (test tools) */
.mail { border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; padding: 8px 12px; }
.mail summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.mail pre { white-space: pre-wrap; word-break: break-word; font-size: 13px; margin: 10px 0 0; }

/* Signed-out pages */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 30px 16px; background: radial-gradient(circle at 20% 0%, #17694F 0%, #0E3B2E 45%, #08231B 100%); }
.auth-card { width: 100%; max-width: 440px; background: var(--card); border-radius: 18px; padding: 28px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.auth-card .brand { justify-content: center; color: var(--ink); }
.brand-lg .brand-name { font-size: 30px; }
.auth-card .sub { text-align: center; color: var(--muted); margin: 8px 0 18px; }
.forgot-link { text-align: right; margin: -6px 0 14px; font-size: 13px; }
.legal-body .legal-top { background: var(--brand); color: #fff; }
.legal-wrap { padding-top: 20px; padding-bottom: 40px; max-width: 860px; }
.legal-doc h3 { margin-top: 1.4em; }
.legal-doc .missing { background: var(--push-bg); color: var(--push); padding: 0 4px; border-radius: 4px; }

/* Stats, pills */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.stat b { font-family: var(--display); font-size: 28px; line-height: 1.1; }
.stat span { font-size: 12px; color: var(--muted); }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--sel); color: var(--muted); white-space: nowrap; }
.pill-win { background: var(--win-bg); color: var(--win); }
.pill-due { background: var(--push-bg); color: var(--push); }
.num-cell { text-align: right; white-space: nowrap; }
.table-scroll.flat { border: 0; border-radius: 0; }

/* Head-to-head */
.h2h-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: start; }
.h2h-layout > .card { margin: 0; }
.hh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.hh-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
.hh-card.mine { border-color: var(--brand-2); box-shadow: 0 0 0 1px var(--brand-2); }
.hh-card.tbd { opacity: .6; }
.hh-side { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.hh-side.won { background: var(--win-bg); }
.hh-side.won .hh-name { font-weight: 700; color: var(--win); }
.hh-side.bye .hh-name { color: var(--muted); font-style: italic; }
.hh-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hh-rec { font-size: 12px; color: var(--muted); }
.hh-pts { font-family: var(--display); font-size: 22px; min-width: 32px; text-align: right; }
.hh-foot { font-size: 11px; color: var(--muted); padding: 4px 12px; text-transform: uppercase; letter-spacing: .4px; }
.bracket { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; align-items: center; }
.bracket-round { display: grid; gap: 10px; }
.bracket-round h3 { margin: 0; }
tr.cutline td { border-bottom: 3px solid var(--gold); }

/* Trash talk + reactions */
.chat { display: flex; flex-direction: column; gap: 14px; }
.chat-empty { text-align: center; padding: 20px 0; }
.msg { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; }
.msg-body { background: var(--bg); border-radius: 4px 14px 14px 14px; padding: 8px 12px; }
.msg.mine .msg-body { background: var(--sel); }
.msg-head { display: flex; align-items: baseline; gap: 8px; }
.msg-head { flex-wrap: wrap; }
.msg-more { margin-left: auto; }
.msg-more summary { cursor: pointer; list-style: none; padding: 0 6px; font-size: 18px; line-height: 1; }
.msg-more summary::-webkit-details-marker { display: none; }
.msg-more[open] { flex-basis: 100%; margin-left: 0; }
.msg-more[open] summary { text-align: right; }
.msg-menu { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 2px; }
.msg-menu select { width: auto; padding: 4px 8px; }
.msg-body p.danger { color: var(--loss); }
.msg-body p { margin: 2px 0 6px; overflow-wrap: anywhere; }
.avatar.sm { width: 36px; height: 36px; background: hsl(var(--h, 140) 55% 42%); color: #fff; font-size: 15px; }
.chat-form { display: flex; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.chat-form input { flex: 1; }
.reacts { display: flex; flex-wrap: wrap; gap: 4px; }
.react { display: inline-flex; align-items: center; gap: 3px; height: 26px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 14px; }
.react span { font-size: 12px; font-weight: 700; color: var(--muted); }
.react.on { border-color: var(--brand-2); background: var(--sel); }
.react.on span { color: var(--brand-2); }
.reacts.compact .react.zero { display: none; }
.reacts.compact.open .react.zero { display: inline-flex; }
.reacts.compact.open .react.add { display: none; }
.react.add { color: var(--muted); font-weight: 700; }

/* Badges */
.badge-list { display: flex; flex-wrap: wrap; gap: 4px; }
.bdg { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #FFF1C2; color: #6B4F00; white-space: nowrap; }
@media (prefers-color-scheme: dark) { .bdg { background: #3D3314; color: #F5CF55; } }
.highlights { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.highlights li { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.highlights .hi-icon { font-size: 20px; width: 28px; text-align: center; }
.grid th.consensus { font-size: 10px; font-weight: 600; color: var(--muted); text-transform: none; letter-spacing: 0; }
.pick-cell .jk { color: #B88600; font-size: 11px; }
.pick-cell .au { color: var(--muted); font-size: 9px; display: block; }
.week-react { min-width: 150px; }
.overview .wide { grid-column: 1 / -1; }

/* Phones */
@media (max-width: 760px) {
  h1 { font-size: 26px; }
  .topnav { display: none; }
  .topbar-inner { justify-content: space-between; }
  .uname { display: none; }
  .two-col, .overview, .plans, .field-row, .choice-grid { grid-template-columns: 1fr; }
  .games { grid-template-columns: 1fr; }
  .leaguebar-title h1 { font-size: 24px; }
  .card { padding: 16px; }
  .pick-summary { gap: 16px; }
  .inline-form { flex-direction: column; }
  .team-grid { grid-template-columns: 1fr; }
  .savebar .btn { flex: 1 1 auto; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .h2h-layout { grid-template-columns: 1fr; }
  .game { grid-row: auto; display: block; }
  .game > * + * { margin-top: 10px; }
}
.mobile-nav { display: none; }
.mix-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.mix-grid .choice { margin: 0; }
.mix-grid input.num { margin-top: 4px; }
.split-row { display: flex; flex-wrap: wrap; gap: 14px; }
.split-row label { display: flex; align-items: center; gap: 6px; font-weight: 600; }
fieldset[disabled] { opacity: .6; }
@media (max-width: 760px) { .mix-grid { grid-template-columns: 1fr; } }
.choice-span { grid-column: 1 / -1; }
.vs { display: flex; align-items: center; justify-content: space-around; gap: 10px; margin: 6px 0 8px; text-align: center; }
.vs div { display: flex; flex-direction: column; min-width: 0; }
.vs span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs b { font-family: var(--display); font-size: 34px; line-height: 1.1; }
.vs em { font-style: normal; font-weight: 700; color: var(--muted); }
.chat-peek { margin: 0 0 8px; font-size: 14px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 10px; font-weight: 600; font-size: 14px; text-decoration: none; padding: 6px 12px 6px 8px; border-radius: 999px; background: var(--sel); color: var(--brand-2); }
.back-link:hover { background: var(--brand-2); color: #fff; }
.game { scroll-margin-top: 80px; }

/* Injuries & stats over the picks page */
.info-dialog { width: min(820px, calc(100vw - 24px)); max-height: calc(100vh - 40px); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.info-dialog::backdrop { background: rgba(0,0,0,.45); }
.info-dialog[open] { display: flex; flex-direction: column; }
.info-body { overflow-y: auto; padding: 16px 18px 6px; }
.info-body .ov-title { margin: 0 0 2px; }
.info-body .two-col { margin-top: 12px; }
.info-body .card { margin: 0; }
.info-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 18px; border-top: 1px solid var(--line); background: var(--card); }
@media (max-width: 700px) { .info-body .two-col { grid-template-columns: 1fr; } }

/* "How it works" button and the rules window */
.info-btn { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--card); color: var(--brand-2); border-radius: 999px; padding: 2px 10px 2px 3px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; vertical-align: middle; white-space: nowrap; }
.info-btn:hover { border-color: var(--brand-2); }
.info-btn .i { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-2); color: #fff; font-family: Georgia, serif; font-style: italic; font-size: 12px; font-weight: 700; }
.rules-h { margin: 16px 0 6px; font-size: 16px; }
.rules-list { margin: 0; padding-left: 20px; }
.rules-list li { margin: 0 0 7px; line-height: 1.45; }

/* =====================================================================
   Broadcast look: TV-graphics styling on top of the base rules above
   ===================================================================== */
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: .3px; }
h1 { font-weight: 900; text-transform: uppercase; }
.card > h2, .card > h3:first-child, .page-head h2 { text-transform: uppercase; font-weight: 900; }

/* Top bar: navy with a red base line; the wordmark is two slanted blocks */
.topbar { background: var(--brand); border-bottom: 3px solid var(--accent); }
.topbar-inner { height: 62px; align-items: stretch; }
.brand { align-items: center; }
.brand-mark { display: inline-flex; align-items: center; font-family: var(--display); font-weight: 900; font-size: 22px; letter-spacing: .5px; line-height: 1; white-space: nowrap; }
.bm-a { background: var(--accent); color: #FFFFFF; padding: 7px 18px 7px 12px; clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%); }
.bm-b { background: #FFFFFF; color: #0A1A3A; margin-left: -8px; padding: 7px 14px 7px 18px; clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%); }
.brand-lg .brand-mark { font-size: 30px; }
.topnav { align-items: stretch; }
.topnav a { display: flex; align-items: center; border-radius: 0; padding: 0 14px; color: var(--on-brand-muted); font-weight: 700; }
.topnav a:hover, .topnav a.on { background: rgba(255, 255, 255, .06); color: #FFFFFF; box-shadow: inset 0 -4px 0 var(--accent); }
.usermenu { display: flex; align-items: center; }
.usermenu summary { color: #FFFFFF; }
.avatar { background: #1C2F5C; color: #FFFFFF; border: 2px solid #33497A; font-family: var(--display); font-weight: 900; }

/* League bar: big uppercase name, slanted sport tag, red underline on the open tab */
.leaguebar-title h1 { font-size: 36px; line-height: 1; }
.sport-chip, .sport-chip[class*="sport-"] { border-radius: 0; transform: skewX(-12deg); background: var(--brand); color: #FFFFFF; font-family: var(--display); font-size: 15px; font-weight: 800; letter-spacing: .5px; padding: 3px 12px; }
@media (prefers-color-scheme: dark) { .sport-chip, .sport-chip[class*="sport-"] { background: var(--accent); } }
.badge-gold { background: transparent; color: #9A6A00; border: 1px solid #E8C26A; }
@media (prefers-color-scheme: dark) { .badge-gold { color: #FFC861; border-color: #6B5320; } }
.tabs a { font-weight: 700; border-bottom-width: 4px; }
.tabs a.on { border-color: var(--accent); font-weight: 800; }
.mini-sport { background: var(--brand); color: #FFFFFF; border-radius: 0; transform: skewX(-10deg); }

/* Buttons: red for the main action, outlined for the rest */
/* Tags (sport, Owner, Premium, Free): text centered both ways */
.badge, .sport-chip, .sport-chip[class*="sport-"] { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 24px; line-height: 1; vertical-align: middle; box-sizing: border-box; }
.badge { padding: 0 10px; font-size: 11px; }
.badge-free { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.lc-top { align-items: center; flex-wrap: wrap; }
.big { display: block; width: fit-content; }
.card-actions { margin-top: 12px; }

.btn { background: var(--accent); border: 2px solid transparent; border-radius: 8px; font-weight: 800; }   /* same border width as outlined buttons, so side-by-side buttons match */
.btn-ghost { background: transparent; color: var(--ink); border: 2px solid currentColor; }
.btn-danger { background: var(--loss); }

/* Cards and dashboard tiles */
.league-card { border-top: 4px solid var(--brand); }
@media (prefers-color-scheme: dark) { .league-card { border-top-color: var(--accent); } }
.league-card:hover { border-color: var(--accent); }
.league-card h3 { text-transform: uppercase; font-weight: 900; }
.stat b, .lc-stats b { font-weight: 900; }

/* Picks: navy stats strip, like a score ticker */
.pick-summary { background: var(--brand); border: 0; color: var(--on-brand); }
.pick-summary b { color: #FFFFFF; font-size: 32px; font-weight: 900; }
.pick-summary span { color: var(--on-brand-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; font-size: 11px; }
.pick-summary p, .pick-summary p.muted { color: var(--on-brand-muted); }
.pick-summary .info-btn { background: transparent; color: #FFFFFF; border-color: rgba(255, 255, 255, .35); }
.pick-summary .info-btn .i { background: var(--accent); }
.week-pick select { background-color: var(--brand); color: #FFFFFF; border: 0; font-family: var(--display); font-size: 18px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  background-image: linear-gradient(45deg, transparent 50%, #FFFFFF 50%), linear-gradient(135deg, #FFFFFF 50%, transparent 50%); }
@media (prefers-color-scheme: dark) { .week-pick select { background-color: var(--card-2); } }

/* Each game is a score bug: a header strip, then one row per team */
.game { padding: 0; row-gap: 0; overflow: hidden; }
.game.res-win { border-color: var(--win); box-shadow: 0 0 0 1px var(--win); }
.game.res-loss, .game.res-none { border-color: var(--loss); }
.game-meta { height: 36px; padding: 0 12px; background: var(--card-2); border-bottom: 1px solid var(--line); font-weight: 700; }
.game-meta .lock, .game-meta .final, .game-meta .live { display: inline-block; transform: skewX(-12deg); padding: 2px 10px; font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.game-meta .lock { background: var(--line); color: var(--muted); }
.game-meta .lock.soon { background: var(--gold); color: #2A1A00; }
.game-meta .final { background: var(--brand); color: #FFFFFF; }
@media (prefers-color-scheme: dark) { .game-meta .final { background: #2C3B5E; } }
.game-meta .live { background: var(--accent); color: #FFFFFF; }
.worth { border-radius: 0; transform: skewX(-12deg); }
.matchup, .matchup.has-draw { display: flex; flex-direction: column; gap: 0; }
.at { display: none; }
.team { grid-template-columns: 54px minmax(0, 1fr) auto 24px; grid-template-rows: auto; grid-template-areas: "abbr info score tick"; align-items: center; column-gap: 10px;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 8px 12px; background: var(--card); }
.team-abbr { grid-area: abbr; background: var(--team); color: #FFFFFF; text-align: center; font-size: 20px; font-weight: 900; line-height: 1; padding: 7px 0;
  clip-path: polygon(0 0, 100% 0, 90% 100%, 0 100%); text-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
.team-abbr.a4 { font-size: 18px; padding: 8px 0; }
.team-abbr.a5 { font-size: 15px; padding: 9px 0; letter-spacing: 0; }
.team > .team-abbr { text-overflow: clip; padding-right: 3px; }
.team-info { grid-area: info; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.team-info > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-name { font-size: 14px; font-weight: 700; line-height: 18px; }
.team-rec { font-size: 12px; line-height: 16px; color: var(--muted); }
.team-rec em { font-style: normal; font-weight: 700; }
.team-score { grid-area: score; font-size: 28px; font-weight: 900; line-height: 1; }
.team-tick { grid-area: tick; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); color: transparent; font-size: 13px; font-weight: 800; }
.team.sel, .team:has(input:checked) { background: var(--pick); border-color: var(--line); box-shadow: inset 5px 0 0 var(--brand-2); }
.team.sel .team-name, .team:has(input:checked) .team-name { font-weight: 800; }
.team.sel .team-tick, .team:has(input:checked) .team-tick { background: var(--brand-2); border-color: var(--brand-2); color: var(--card); }
.team.sel::after, .team:has(input:checked)::after { display: none; }
.game.open .team:hover { background: var(--card-2); border-color: var(--line); }
.game.open .team.sel:hover, .game.open .team:has(input:checked):hover { background: var(--pick); }
.game.locked .team:not(.sel) { opacity: .65; }
.team.draw { grid-template-columns: 54px minmax(0, 1fr) 24px; grid-template-rows: auto; grid-template-areas: "dl dp tick"; place-items: center stretch; padding: 6px 12px; text-align: left; background: var(--card); }
.team.draw .draw-txt { grid-area: dl; text-align: center; font-family: var(--display); font-size: 15px; font-weight: 900; color: var(--muted); border: 2px dashed var(--line); padding: 3px 0; }
.team.draw .draw-pct { grid-area: dp; font-size: 12px; min-height: 0; }
.game-foot { padding: 10px 12px; }
.conf-btn { background: var(--brand); border-radius: 8px; box-shadow: none; }
@media (prefers-color-scheme: dark) { .conf-btn { background: var(--brand-2); color: #080F1F; } .conf-btn .chev { border-color: #080F1F; } }
.conf-static { border-radius: 8px; }
.joker-tag { border-radius: 8px; font-weight: 800; }
.joker-tag:has(input:checked), .joker-tag.on { background: var(--gold); border-color: var(--gold); color: #2A1A00; }
.savebar { border-top: 3px solid var(--accent); }
/* The how-to text gets its own line; every button below it is the same height */
.savebar #saveStatus { flex: 1 0 100%; margin: 0; }
.savebar #saveStatus:empty { display: none; }
.savebar .btn { height: 44px; padding: 0 18px; font-size: 15px; margin: 0; box-sizing: border-box; }

/* Tables */
th { font-weight: 800; }
.table-scroll thead th, .table-scroll thead .sticky { background: var(--card-2); }

/* Signed-out pages: navy with a slanted second panel */
.auth-body { background: linear-gradient(115deg, #0A1A3A 0 58%, #102552 58% 100%); }
.auth-card { border-top: 5px solid var(--accent); border-radius: 12px; }
@media (max-width: 760px) {
  .leaguebar-title h1 { font-size: 28px; }
  .brand-mark { font-size: 19px; }
  .team { column-gap: 8px; padding: 8px 10px; }
  .game > * + * { margin-top: 0; }
  .week-nav { gap: 6px; }
  .week-nav .btn { white-space: nowrap; padding: 6px 10px; }
  .week-pick { flex: 1; min-width: 0; }
  .week-pick select { width: 100%; font-size: 15px; padding-left: 12px; }
}

/* ---------- Discover, public leagues, franchises (Update 10) ---------- */
.badge-franchise { background: #E4ECFF; color: var(--brand-2); text-decoration: none; }
.leaguebar-title .badge-franchise { font-size: 14px; padding: 6px 14px; line-height: 1.3; }
a.badge-franchise:hover { filter: brightness(.95); text-decoration: underline; }
@media (prefers-color-scheme: dark) { .badge-franchise { background: #1C2E55; color: #A9C4FF; } }
.disc-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.disc-search input[type=search] { flex: 1 1 240px; min-width: 0; }
.disc-search select { flex: 0 1 auto; width: auto; min-width: 0; max-width: 100%; }
.disc-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.disc-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); text-decoration: none; }
.disc-row:hover { border-color: var(--brand-2); background: var(--card-2); }
.disc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.disc-main b { font-family: var(--display); font-size: 19px; letter-spacing: .01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.disc-tags { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.top-list { list-style: none; margin: 0 0 8px; padding: 0; }
.top-list li { display: flex; align-items: center; gap: 12px; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.top-list li.me { background: var(--sel); border-radius: 8px; }
.top-rank { width: 30px; height: 30px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--brand); color: #fff; font-family: var(--display); font-weight: 800; font-size: 17px; }
.top-list li:nth-child(1) .top-rank { background: var(--gold); color: var(--brand); }
.top-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top-who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-pct { display: flex; flex-direction: column; align-items: flex-end; }
.top-pct b { font-family: var(--display); font-size: 20px; }
.franchise-strip { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.franchise-pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: var(--brand); color: #fff; text-decoration: none; }
.franchise-pill .muted { color: var(--on-brand-muted); }
.tier-list { display: flex; flex-direction: column; gap: 16px; }
.tier-num { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 800; margin-right: 4px; transform: skewX(-8deg); }
.tier h2 a { color: inherit; text-decoration: none; }
/* Promotion places light blue (the picked-team blue), relegation places light red; your own row stays bold */
.tier-table tr.zone-up td, .tier-table tr.zone-up .sticky { background: var(--pick); }
.tier-table tr.zone-down td, .tier-table tr.zone-down .sticky { background: var(--loss-bg); }
.tier-table tr.me td { font-weight: 700; }
.zone-key { display: inline-flex; align-items: center; gap: 6px; margin-right: 14px; font-weight: 600; }
.zone-key::before { content: ""; width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--line); }
.zone-key.up::before { background: var(--pick); }
.zone-key.down::before { background: var(--loss-bg); }
.zone-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--card-2); color: var(--muted); }
.zone-tag.up { background: var(--win-bg); color: var(--win); }
.zone-tag.down { background: var(--loss-bg); color: var(--loss); }
.move-list li, .request-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.split-name { min-width: 150px; }
td.num, th.num { text-align: right; white-space: nowrap; }
@media (max-width: 640px) {
  .disc-search select, .disc-search .btn { flex: 1 1 45%; }
  .disc-row { flex-wrap: wrap; }
  .disc-tags { flex-direction: row; }
  .split-name { min-width: 100%; }
}
/* Franchise leagues on My leagues: a red label on top (same navy top edge as other leagues) */
.lc-top { flex-wrap: wrap; }
.lc-franchise { flex: 1 0 100%; color: var(--accent); font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Franchise Premium upgrade */
.btn-lg { height: 52px; padding: 0 26px; font-size: 17px; }
.upgrade-card { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 2px solid var(--gold); background: linear-gradient(135deg, var(--card) 60%, #FFF6DD); }
@media (prefers-color-scheme: dark) { .upgrade-card { background: linear-gradient(135deg, var(--card) 60%, #2E2712); } }
.upgrade-card h2 { margin: 0 0 6px; }
.upgrade-card p { margin: 0; }
.upgrade-cta { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.upgrade-cta b { font-family: var(--display); font-size: 34px; line-height: 1; }
.upgrade-cta small { color: var(--muted); margin-bottom: 6px; }
.total-row td { border-top: 2px solid var(--ink); }
.plain-list { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; }
a.badge-free { text-decoration: none; }
/* Weekly results and standings: one heading per franchise league */
.week-league { display: flex; align-items: center; gap: 8px; margin: 22px 0 8px; font-family: var(--display); font-size: 22px; text-transform: uppercase; }
.week-league:first-of-type { margin-top: 8px; }
.badge-due { background: var(--push-bg); color: var(--push); }
/* Member fees and League Pass */
.pay-due { border: 2px solid var(--gold); }
.pay-due-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pay-due-row:first-of-type { border-top: 0; }
.fee-box { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 18px; margin: 12px 0; border-radius: var(--radius); background: var(--card-2); border: 1px solid var(--line); text-align: center; }
.fee-box b { font-family: var(--display); font-size: 44px; line-height: 1; }
.fee-box span { color: var(--muted); }
.pass-pitch { margin-top: 16px; padding: 12px 14px; border-radius: var(--radius); border: 2px dashed var(--gold); }
.pass-pitch p { margin: 4px 0 0; }
.fee-alert .btn { margin-left: 8px; }

/* League Pass banner for members without a pass */
.pass-banner { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 8px 14px; margin: 0 0 14px; border-radius: var(--radius); background: linear-gradient(90deg, #FFF4D6, var(--card)); border: 1px solid #F2D58A; font-size: 14px; }
.pass-banner span { flex: 1 1 260px; }
.pass-banner .btn-link { color: var(--muted); font-size: 13px; }
@media (prefers-color-scheme: dark) { .pass-banner { background: linear-gradient(90deg, #2E2712, var(--card)); border-color: #5A4A1C; } }

/* Sport groups in the Create a league cards */
.choice-group { grid-column: 1 / -1; margin: 10px 0 0; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.choice-group:first-child { margin-top: 0; }
/* MLB and the soccer leagues added in Update 14 */
.sport-mlb { background: #E6EEFB; color: #0A3D91; }
.sport-mls, .sport-ligamx, .sport-crc, .sport-hon, .sport-gua, .sport-bra, .sport-arg, .sport-uru, .sport-ecu, .sport-chile, .sport-ksa, .sport-jpn, .sport-chn, .sport-ind, .sport-rsa, .sport-aleague { background: #E3F5E8; color: #1B7A3A; }
@media (prefers-color-scheme: dark) {
  .sport-mlb { background: #17284A; color: #9EC0FF; }
  .sport-mls, .sport-ligamx, .sport-crc, .sport-hon, .sport-gua, .sport-bra, .sport-arg, .sport-uru, .sport-ecu, .sport-chile, .sport-ksa, .sport-jpn, .sport-chn, .sport-ind, .sport-rsa, .sport-aleague { background: #15301E; color: #6FD08F; }
}
/* Create a league and mixed-sports settings: each group of sports opens and closes (Update 19) */
.sport-sec { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: var(--card-2); }
.sport-sec > summary { display: flex; align-items: center; gap: 8px; padding: 11px 14px; cursor: pointer; list-style: none; font-weight: 700; font-size: 14px; }
.sport-sec > summary::-webkit-details-marker { display: none; }
.sport-sec > summary::before { content: '▸'; color: var(--muted); transition: transform .15s; }
.sport-sec[open] > summary::before { transform: rotate(90deg); }
.sport-sec > summary small { font-weight: 600; }
.sport-sec-pick { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--brand-2); text-align: right; }
.sport-sec[open] > summary { border-bottom: 1px solid var(--line); }
.sport-sec > .choice-grid, .sport-sec > .mix-grid { padding: 10px; background: var(--card); border-radius: 0 0 12px 12px; }
/* Owner track record, suspension, join requests */
.owner-record { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.badge-freeleague { background: #E3F5E8; color: #1B7A3A; }
@media (prefers-color-scheme: dark) { .badge-freeleague { background: #15301E; color: #6FD08F; } }

/* Owner ratings */
.rating { white-space: nowrap; font-size: 13px; }
.rating .stars, .review .stars { color: #E8A317; letter-spacing: 1px; }
.rating .stars .off, .review .stars .off { color: var(--line); }
.rating.none { color: var(--muted); font-size: 12px; }
a.rating-link { text-decoration: none; color: inherit; }
.rating-big .rating { font-size: 22px; }
.rating-bars div { display: grid; grid-template-columns: 34px 1fr 28px; gap: 8px; align-items: center; margin: 3px 0; font-size: 13px; }
.rating-bars .bar { height: 8px; border-radius: 999px; background: var(--card-2); overflow: hidden; }
.rating-bars .bar span { display: block; height: 100%; background: #E8A317; }
.review { padding: 12px 0; border-top: 1px solid var(--line); }
.review:first-of-type { border-top: 0; }
.review p { margin: 6px 0 0; }
.review-reply { padding: 8px 10px; border-left: 3px solid var(--brand-2); background: var(--card-2); border-radius: 6px; font-size: 14px; }
.review-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; font-size: 13px; }
.review-actions summary { cursor: pointer; color: var(--brand-2); }
.review-actions form { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.hidden-review { opacity: .55; }
.star-pick { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; border: 0; padding: 0; }
.star-pick legend { width: 100%; }
.star-pick input { position: absolute; opacity: 0; }
.star-pick label { font-size: 36px; line-height: 1; color: var(--line); cursor: pointer; }
.star-pick input:checked ~ label, .star-pick label:hover, .star-pick label:hover ~ label { color: #E8A317; }
.star-pick input:focus-visible + label { outline: 2px solid var(--brand-2); border-radius: 4px; }
.rate-prompt .btn { margin-left: 8px; }

/* Golf, racing and tennis leagues (event.php): pick players from the field, then everyone's teams */
.field-search { margin-bottom: 10px; }
.field-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; max-height: 420px; overflow-y: auto; padding: 2px; }
.field-player { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; font-size: 14px; min-width: 0; }
.field-player input { width: auto; margin: 0; }
.field-player span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-player.on { background: var(--pick); border-color: var(--brand-2); font-weight: 600; }
.field-player[hidden] { display: none; }
.field-chip { display: inline-block; margin: 2px 6px 2px 0; padding: 3px 8px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); font-size: 13px; white-space: nowrap; }
.field-teams tr.won td { background: var(--pick); }
.standings td.wk-won { background: var(--pick); font-weight: 700; }
[data-field-note][hidden], [data-game-opts][hidden] { display: none; }

/* Two-step sign-in (Update 20) */
.code-input { font-size: 22px; letter-spacing: 4px; text-align: center; font-variant-numeric: tabular-nums; }
.code-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.code-actions form { margin: 0; }
.backup-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; list-style: none; padding: 0; margin: 12px 0; }
.backup-codes code { font-size: 16px; letter-spacing: 1px; }
.mfa-qr { display: flex; justify-content: center; margin: 12px 0; }
.mfa-qr svg { border-radius: 8px; max-width: 100%; height: auto; }
.mfa-key code { font-size: 16px; letter-spacing: 1px; word-break: break-all; }
.badge-win { background: var(--win-bg); color: var(--win); }
.mfa-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media print { .topbar, .tabs, .leaguebar, .site-foot, form, .code-actions, [data-copy], [onclick] { display: none !important; } }
.waiting-card .pay-due-row { flex-wrap: wrap; gap: 8px; }
.waiting-card .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Update 27: Survivor picks */
.team.used { opacity: .45; }
.team.used .team-tick { display: none; }
.used-tag { color: var(--loss, #C0392B); font-weight: 700; font-style: normal; }
.surv-summary b { letter-spacing: 1px; }
.standings tr.surv-out td { opacity: .6; }
.standings td.wk-lost { background: rgba(192, 57, 43, .14); }

/* Update 27: profile, trophies, history, Wrapped */
.profile-top { display: grid; grid-template-columns: minmax(240px, 1fr) 2fr; gap: 18px; margin-bottom: 18px; }
.profile-top .card { margin: 0; }
.profile-stats { grid-template-columns: repeat(3, 1fr); margin: 0; }
.rating-card { background: var(--brand); color: var(--on-brand); border: 0; display: flex; flex-direction: column; }
.rating-card a { color: #fff; }
.rating-card .muted { color: var(--on-brand-muted); }
.rating-label { text-transform: uppercase; letter-spacing: 1px; font-weight: 800; font-size: 12px; color: var(--on-brand-muted); }
.rating-num { font-family: var(--display); font-size: 64px; font-weight: 900; line-height: 1; }
.rating-tier { color: var(--gold); font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.trophy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 10px; }
.trophy { border: 1.5px solid var(--choice-line); border-radius: 12px; padding: 10px 12px; }
.trophy summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.trophy summary::-webkit-details-marker { display: none; }
.trophy .t-icon { font-size: 30px; line-height: 1; }
.trophy .t-name { font-weight: 800; flex: 1; }
.trophy .t-count { font-family: var(--display); font-weight: 900; font-size: 22px; color: var(--brand-2); }
.trophy.got { border-color: var(--gold); background: linear-gradient(135deg, rgba(255, 176, 32, .14), transparent 60%); }
.trophy.locked { opacity: .5; }
.trophy.locked .t-icon { filter: grayscale(1); }
.trophy p { margin: 8px 0 4px; }
.t-list li { margin: 3px 0; }
.hof li { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.hof li:last-child { border: 0; }
.records li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.records li:last-child { border: 0; }
.records .rec-label { color: var(--muted); font-size: 13px; }
.records .rec-val { font-family: var(--display); font-size: 22px; grid-row: span 2; align-self: center; }
.podium-pos { white-space: nowrap; margin-right: 8px; }
.wrapped { display: grid; grid-template-columns: minmax(0, 420px) 1fr; gap: 24px; align-items: start; }
.wrapped-card img { width: 100%; height: auto; display: block; border-radius: 18px; box-shadow: var(--shadow); background: #08090D; aspect-ratio: 1080 / 1350; }
.wrapped-public { padding: 24px 16px; }
.ladder li { display: flex; gap: 10px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--line); }
.ladder li:last-child { border: 0; }
.ladder .l-rank { width: 2.2em; font-weight: 800; color: var(--muted); }
.ladder .l-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ladder .l-rating { font-family: var(--display); font-weight: 900; font-size: 18px; }
@media (max-width: 760px) {
  .profile-top, .wrapped { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
}
.two-col-list { columns: 2 280px; column-gap: 28px; } .two-col-list li { break-inside: avoid; }

/* Language picker (includes/i18n.php lang_switch): the user menu, the top of signed-out pages, My account */
.lang-switch { margin: 0; }
.lang-switch label { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.lang-switch select { width: auto; padding: 5px 8px; font-size: 14px; border-radius: 8px; }
.menu-lang { border-top: 1px solid var(--line); margin-top: 6px; padding: 8px 12px 4px; }
.menu-lang select { flex: 1; }
.auth-lang { position: absolute; top: 12px; right: 16px; z-index: 2; }
.auth-lang .lang-switch label { color: inherit; }
#language .inline-form select { width: auto; min-width: 160px; }
.auth-body .auth-lang label { color: #fff; }
.legal-body .auth-lang { position: static; display: flex; justify-content: flex-end; padding: 8px 16px 0; }

/* Admin page (admin.php, site admins only) */
.admin-stats { grid-template-columns: repeat(4, 1fr); }
.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.admin-dl { margin: 0; display: grid; gap: 8px; }
.admin-dl div { display: grid; grid-template-columns: 150px 1fr; gap: 10px; }
.admin-dl dt { color: var(--muted); font-size: 13px; }
.admin-dl dd { margin: 0; overflow-wrap: anywhere; }
.admin-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.admin-counts div { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; }
.admin-counts b { font-family: var(--display); font-size: 22px; line-height: 1.1; }
.admin-counts small { color: var(--muted); font-size: 12px; }
.admin-h3 { margin: 18px 0 8px; font-size: 15px; text-transform: uppercase; }
.admin-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.admin-action { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.admin-action p { margin: 0; }
.admin-action .field { width: 100%; margin: 0; }
.admin-gold { border-color: #E8C26A; background: color-mix(in srgb, #FFF1C2 45%, var(--card)); }
.admin-danger { border-color: color-mix(in srgb, var(--loss) 40%, transparent); }
.admin-search { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-search input { flex: 1; min-width: 200px; }
.admin-picked { background: var(--sel); }
.admin-report { border-top: 1px solid var(--line); padding: 10px 0; }
.admin-report p { margin: 0 0 6px; }
.admin-report blockquote { margin: 0 0 8px; padding: 8px 12px; background: var(--card-2); border-radius: 8px; overflow-wrap: anywhere; }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.admin-log { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 13px; }
.badge-danger { background: var(--loss-bg); color: var(--loss); }
@media (max-width: 760px) { .admin-stats { grid-template-columns: repeat(2, 1fr); } .admin-cols { grid-template-columns: 1fr; } .admin-dl div { grid-template-columns: 120px 1fr; } }
