/* Family Pickem — Under the lights. Original artwork, abbreviation-only teams. */
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/barlow-condensed-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/source-sans-3-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/source-sans-3-latin-600-normal.woff2') format('woff2'); }

:root {
  color-scheme: dark;
  --bg: #070d16; --surface: #101923; --surface-2: #162230; --surface-3: #223143;
  --line: #344352; --line-soft: #263342;
  --text: #f5efe2; --muted: #bdc8d4; --muted-dim: #aab9c9;
  --brand: #f5efe2; --brand-ink: #101923; --good: #85d5a5; --bad: #ffabab; --push: #bdc8d4; --late: #f5efe2;
  --font: 'Source Sans 3', system-ui, sans-serif; --display: 'Barlow Condensed', Impact, sans-serif;
  --pad: 16px; --dock-h: 78px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; background-image: radial-gradient(ellipse at 50% 0, #14202e 0, transparent 800px); }
body.dialog-open { overflow: hidden; }
h1,h2,h3,p { margin: 0; }
button,input,select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
button,select,input { -webkit-tap-highlight-color: transparent; }
button:focus-visible,select:focus-visible,input:focus-visible,a:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .19em; text-transform: uppercase; color: var(--text); }

/* Shell */
.topbar { max-width: 1200px; margin: auto; padding: 15px 24px 0; display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--line); }
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; grid-column: 1 / -1; }
.wordmark { display: flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 600; letter-spacing: -.7px; }
.wordmark img { border-radius: 8px; }
.wordmark-note { border-left: 1px solid var(--line); padding-left: 16px; margin-left: 8px; font-size: 10px; font-weight: 400; letter-spacing: .14em; color: var(--muted); }
.refresh { min-height: 44px; padding: 0 13px; display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; color: var(--muted); }
.refresh-icon { display: block; width: 13px; height: 13px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; }
.refresh:disabled { color: var(--muted-dim); }
.sync-line { grid-column: 2; grid-row: 2; align-self: center; color: var(--muted-dim); font-size: 11px; }
.tabs { grid-column: 1; grid-row: 2; display: flex; gap: 28px; margin-top: 6px; }
.tab { min-height: 46px; min-width: 80px; border: 0; border-bottom: 2px solid transparent; background: transparent; font-weight: 600; font-size: 14px; color: var(--muted); padding: 0 4px; }
.tab[aria-current='page'] { color: var(--text); border-bottom-color: var(--text); }
.view { max-width: 1200px; padding: 24px 24px calc(var(--dock-h) + 32px + env(safe-area-inset-bottom,0px)); margin: auto; }

/* The artwork gets its own fixed geometry and a scrim; type remains native. */
.page-hero { position: relative; isolation: isolate; overflow: hidden; height: 266px; border: 1px solid var(--line); border-radius: 16px; margin-bottom: 24px; background: var(--bg); }
.page-hero picture,.page-hero picture img,.login-scene picture,.login-scene picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.page-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,rgba(7,13,22,.8),rgba(7,13,22,.55) 45%,rgba(7,13,22,.12) 75%),linear-gradient(0deg,rgba(7,13,22,.45),transparent 60%); }
.hero-content { padding: 24px 30px; position: relative; max-width: 74%; height: 100%; }
.hero-title { display: flex; flex-direction: column; font: 700 60px/.88 var(--display); letter-spacing: -.8px; margin: 10px 0; }
.hero-title span { width: fit-content; }
.hero-desc { font-size: 14px; color: var(--muted); width: fit-content; }
.hero-meta { font-size: 10px; letter-spacing: .16em; color: var(--text); border-top: 1px solid #63707c; width: fit-content; padding-top: 8px; margin-top: 13px; }
.hero-members { height: 240px; }

/* Controls and game plan */
.control-row { display: flex; align-items: end; gap: 14px; margin: 20px 0; }
.control { display: block; flex: 1; min-width: 0; }
.control-label,.field-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 7px; }
select,input[type='text'],input[type='email'],input[type='password'] { min-height: 48px; width: 100%; padding: 0 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: 16px; appearance: none; }
select { padding-right: 30px; background-image: linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%); background-position: calc(100% - 17px) 52%,calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
input::placeholder { color: var(--muted-dim); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; min-width: 44px; padding: 0 20px; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; font-size: 16px; font-weight: 600; transition: transform 140ms ease,background-color 180ms ease; }
.btn:active { transform: scale(.98); }
.btn:disabled { background: #202a36; color: #8c9ba9; border-color: #344352; }
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn-danger { color: var(--bad); border-color: #805252; }
.btn-block { width: 100%; }
.btn-sm { padding: 0 13px; font-size: 14px; min-height: 44px; }
.btn-icon { padding: 0; }
.progress { padding: 15px 18px 17px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; margin: 0 0 22px; }
.progress-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 9px; font-size: 13px; color: var(--muted); }
.progress-count { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.progress-track { height: 4px; border-radius: 4px; overflow: hidden; background: #334352; }
.progress-fill { height: 100%; width: 0; background: var(--text); border-radius: inherit; box-shadow: 0 0 12px #f5efe270; transition: width 180ms ease; }
#game-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.game { padding: 16px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface); min-width: 0; }
.game-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 13px; font-size: 12px; color: var(--muted); min-height: 20px; }
/* Small team chips inside full 44px tap targets; the negative margins keep the header's height. */
.fill-picks { display: inline-flex; flex: none; margin: -12px 0; }
.fill-btn { --team: #48576a; --team-ink: #ffffff; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; }
.fill-chip { min-width: 32px; padding: 3px 5px; border: 1px solid color-mix(in srgb,var(--team) 70%,#96a6b6); border-radius: 4px; background: var(--team); color: var(--team-ink); font: 700 10px/1.2 var(--font); letter-spacing: .04em; text-align: center; }
.game-matchup { font-weight: 600; font-size: 11px; letter-spacing: .04em; }
.badge { padding: 2px 7px; border: 1px solid var(--line); border-radius: 4px; font-size: 10px; line-height: 1.4; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.badge.is-live { color: var(--text); border-color: var(--muted); }
.badge.is-live::before { content: '•'; padding-right: 5px; }
.badge.is-off { color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.tile { --team: #48576a; --team-alt: #8797a8; position: relative; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; min-height: 118px; padding: 17px; border: 1px solid color-mix(in srgb,var(--team) 75%,#96a6b6); border-radius: 8px; background-color: #101923; color: var(--text); text-align: left; box-shadow: inset 0 -24px 35px -20px var(--team),0 0 0 1px color-mix(in srgb,var(--team-alt) 24%,transparent),0 8px 26px -14px var(--team); transition: transform 140ms ease,box-shadow 180ms ease,background-color 180ms ease; }
.tile-abbr { font: 700 43px/.98 var(--display); letter-spacing: .3px; }
.tile-name { margin-top: 8px; font-size: 10px; letter-spacing: .1em; color: #d3dce5; }
.tile-check { position: absolute; right: 11px; top: 10px; width: 20px; height: 20px; border: 1px solid #738496; border-radius: 50%; text-align: center; line-height: 17px; font-size: 13px; color: var(--text); }
.tile[aria-pressed='true'] { background-color: color-mix(in srgb,var(--team) 34%,#070d16); border-color: var(--team-alt); box-shadow: inset 0 0 40px -15px var(--team),inset 0 -3px 0 var(--team),0 0 0 1px color-mix(in srgb,var(--team-alt) 65%,transparent),0 7px 26px -10px var(--team); }
.tile[aria-pressed='true'] .tile-check { background: var(--text); color: var(--bg); border-color: var(--text); }
.tile:active { transform: scale(.965); }
.tile-mark { display: flex; gap: 4px; position: absolute; right: 8px; bottom: 7px; }
.tile-win,.dot-late { display: inline-flex; align-items: center; padding: 2px 4px; border-radius: 3px; background: #0b1420; color: var(--text); border: 1px solid #7b8a9a; font: 600 9px/1.2 var(--font); letter-spacing: .04em; }
.tile-win.correct,.tile-win { color: var(--good); border-color: #568c6d; }
.tile-win.incorrect { color: var(--bad); border-color: #a86969; }
.tile-win.push { color: var(--push); border-color: #7b8a9a; }
.game-live .tile { animation: live-glow 300ms ease-in-out infinite alternate; }
.game-final .tile { animation: none; }
.game-score { display: flex; gap: 8px; align-items: center; margin-top: 13px; color: var(--muted); font-size: 12px; }
.game-score b { color: var(--text); font: 700 22px/1 var(--display); }
.game-status { margin-left: auto; font-size: 11px; }
.picks-footnote { color: var(--muted-dim); text-align: center; font-size: 12px; margin: 24px 0 0; }
.dock { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 40; display: flex; gap: 12px; width: min(100%,1200px); padding: 14px 24px calc(14px + env(safe-area-inset-bottom,0px)); background: #0c141ff5; backdrop-filter: blur(18px); border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; }
.dock .btn:first-child { flex: 0 0 25%; }
.dock .btn-primary { flex: 1; }
.dock #save-btn::after { content: '↗'; margin-left: auto; font-size: 20px; }
.dock #save-btn { justify-content: flex-start; }

/* Standings */
.section { min-width: 0; }
.section + .section,.section .section { margin-top: 28px; }
.section-title { font-size: 12px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.season-section { margin-bottom: 36px; }
.season-section > .section-title { font: 700 32px/1 var(--display); color: var(--text); letter-spacing: .01em; text-transform: uppercase; }
.table-wrap,.grid-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); scrollbar-color: #657586 #14202e; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th,td { padding: 13px 14px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
thead th { font-size: 10px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 600; background: #162230; border-bottom: 1px solid var(--line); }
th:first-child,td:first-child,td.name { text-align: left; }
.season-section th:nth-child(2) { text-align: left; }
tbody tr + tr td { border-top: 1px solid var(--line-soft); }
td.name { font-weight: 600; }
td.rank { color: var(--muted); width: 1%; }
.season-section td.rank { font: 700 32px/1 var(--display); }
.season-section td { padding-top: 18px; padding-bottom: 18px; }
.season-section td.num-good { font: 700 30px/1 var(--display); }
.leader-row { background: #1b2833; animation: winner-reveal 260ms ease-out; }
.leader-row td.rank { color: var(--text); }
.num-good { color: var(--good); }.num-bad { color: var(--bad); }.num-zero { color: var(--muted-dim); }
tr.is-inactive td.name::after { content: ' · inactive'; font-size: 11px; color: var(--muted); font-weight: 400; }
.winner-line { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 12px 16px; margin-top: 12px; min-height: 54px; font-size: 16px; }
.winner-line img { width: 48px; height: 48px; border-radius: 6px; }
.winner-line.is-open { color: var(--muted); }
table.combined { table-layout: fixed; font-size: 13px; }
table.combined th,table.combined td { padding: 10px 6px; }
table.combined th:first-child,table.combined td:first-child { padding-left: 12px; }
table.combined th:last-child,table.combined td:last-child { padding-right: 12px; }
table.combined .col-rank { width: 40px; }
table.combined th.col-name { text-align: left; }
table.combined .col-week { width: 70px; }
table.combined .col-season { width: 84px; }
table.combined .col-won { width: 66px; }
table.combined td.name { overflow: hidden; }
.combined-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.combined-member { overflow: hidden; text-overflow: ellipsis; }
.combined-badge { flex: none; width: 22px; height: 22px; border-radius: 4px; }
.combined-note { display: block; white-space: normal; overflow-wrap: anywhere; font-size: 11px; font-weight: 400; color: var(--muted); }
.standings-detail { margin-top: 28px; }
.standings-detail > summary { display: flex; align-items: center; min-height: 48px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; }
.standings-detail[open] > summary { margin-bottom: 24px; }
.standings-detail > summary::after { content: '▸'; margin-left: auto; }
.standings-detail[open] > summary::after { content: '▾'; }
.grid-legend { font-size: 12px; color: var(--muted); margin: -6px 0 14px; }
table.grid { border-collapse: separate; border-spacing: 0; font-size: 12px; }
table.grid td,table.grid th { padding: 10px 8px; text-align: center; }
table.grid th { font-size: 10px; }
table.grid .sticky { position: sticky; left: 0; z-index: 1; text-align: left; background: #162230; border-right: 1px solid var(--line); font-weight: 600; }
.cell { display: inline-flex; justify-content: center; align-items: center; gap: 3px; min-width: 42px; min-height: 30px; border: 1px solid #465361; border-radius: 5px; padding: 4px 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.cell.correct { background: #173629; color: var(--good); border-color: #3c6b51; }
.cell.incorrect { background: #402628; color: var(--bad); border-color: #885353; }
.cell.pending,.cell.push { background: #25303d; color: var(--push); }
.cell[aria-label='No pick'] { border-color: transparent; background: transparent; color: var(--muted); }
.cell .dot-late { padding: 0; border: 0; background: transparent; font-size: 12px; }
.chips { display: grid; grid-template-columns: repeat(18,minmax(0,1fr)); gap: 7px; }
.chip { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 4px; min-width: 0; padding: 8px 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.chip-week { font-size: 10px; color: var(--muted); letter-spacing: .06em; }
.chip img { height: 36px; width: 36px; border-radius: 4px; object-fit: contain; }
.chip-placeholder { height: 36px; display: grid; align-items: center; color: #91a0af; font-size: 20px; }
.chip-win { min-height: 17px; font-size: 12px; font-weight: 600; }
.chip.is-open,.chip.is-none { border-color: var(--line-soft); color: var(--muted); }

/* Roster and empty states */
.member { display: flex; gap: 16px; align-items: center; padding: 16px 20px; margin-bottom: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.member-main { flex: 1; min-width: 0; }
.member-name { font-size: 19px; font-weight: 600; overflow-wrap: anywhere; }
.member-meta { font-size: 12px; color: var(--muted); }
.member.is-inactive { background: #0d151f; border-style: dashed; }
.member.is-inactive .member-name { color: var(--muted); }
.member-actions { display: flex; gap: 8px; }
.order-btns { display: flex; gap: 4px; }
.order-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); color: var(--muted); font-size: 10px; }
.order-btn:disabled { color: #647282; background: #0d151e; }
.empty { padding: 32px 24px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: var(--surface); }
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 24px; margin-bottom: 16px; }
.empty-state img { width: 180px; height: 135px; border-radius: 10px; margin-bottom: 16px; }
.empty-state h3 { font: 700 28px/1.1 var(--display); }
.empty-state p { margin-top: 8px; font-size: 14px; color: var(--muted); }
.empty-state.is-compact { flex-direction: row; text-align: left; gap: 18px; padding: 14px 20px; }
.empty-state.is-compact img { flex: 0 0 96px; width: 96px; height: 72px; margin: 0; }
.empty-state.is-compact h3 { font-size: 23px; }

/* Viewport portals */
.scrim { position: fixed; inset: 0; z-index: 80; padding: 16px; background: #02060cbd; backdrop-filter: blur(12px); display: flex; align-items: center; justify-content: center; }
.dialog { width: min(100%,440px); max-height: calc(100dvh - 32px); overflow: hidden; display: flex; flex-direction: column; background: #111d29; border: 1px solid #536372; border-radius: 16px; box-shadow: 0 30px 100px #000a; animation: dialog-in 180ms ease-out; }
.dialog-head { padding: 24px 24px 0; flex-shrink: 0; }
.dialog-title { font: 700 29px/1.08 var(--display); letter-spacing: .1px; }
.dialog-sub { margin-top: 8px; font-size: 14px; color: var(--muted); }
.dialog-body { min-height: 0; padding: 20px 24px; overflow-y: auto; }
.dialog-foot { display: flex; gap: 12px; padding: 18px 24px; border-top: 1px solid var(--line); flex-shrink: 0; }
.dialog-foot .btn { flex: 1; }
.field { display: block; }.field + .field { margin-top: 16px; }
.field-hint { color: var(--muted); font-size: 15px; line-height: 1.6; }
.field-warn { margin-top: 13px; padding: 10px 12px; border: 1px solid #697481; border-radius: 8px; background: #26313a; font-size: 13px; color: var(--text); }
.divider { display: flex; gap: 12px; align-items: center; font-size: 11px; letter-spacing: .1em; color: var(--muted); margin: 15px 0; }
.divider::before,.divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }

/* The entrance */
.login { min-height: 100dvh; display: grid; grid-template-columns: minmax(0,1.6fr) minmax(370px,1fr); align-items: center; }
.login-scene { position: relative; isolation: isolate; align-self: stretch; min-height: 100dvh; overflow: hidden; }
.login-scene picture img { object-position: 62% center; }
.login-scene::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,#070d1655,#070d161a 65%,#070d16),linear-gradient(0deg,#070d1699,transparent 45%,#070d1666); }
.login-story { padding: 46px 48px; position: relative; max-width: 760px; }
.login-wordmark { margin-top: 9px; font-size: 27px; line-height: 1.1; font-weight: 600; letter-spacing: -.8px; width: fit-content; }
.login-headline { font: 700 clamp(52px,5.8vw,94px)/.93 var(--display); letter-spacing: -1px; margin-top: 82px; }
.login-headline span { display: block; width: fit-content; }
.login-tagline { margin-top: 23px; color: var(--text); font-size: 16px; max-width: 310px; }
.scene-footer { position: absolute; bottom: 35px; left: 48px; font-size: 10px; letter-spacing: .15em; color: var(--text); }
.login-card { padding: 36px; max-width: 420px; width: 100%; justify-self: center; }
.login-form-title { font: 700 60px/1 var(--display); margin: 12px 0 10px; }
.login-sub { color: var(--muted); margin-bottom: 30px; font-size: 15px; }
.login-card .btn { margin-top: 24px; justify-content: space-between; }
.login-footnote { color: var(--muted-dim); font-size: 12px; margin-top: 20px; }
.login-error { margin-top: 18px; padding: 11px 13px; border: 1px solid #805252; border-radius: 8px; background: #302126; color: var(--bad); font-size: 14px; }

/* Feedback */
.boot { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: var(--bg); }
.spinner { display: block; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--text); animation: spin 300ms linear infinite; }
.refresh.is-busy .refresh-icon { animation: spin 300ms linear infinite; }
.toasts { position: fixed; z-index: 90; bottom: calc(22px + env(safe-area-inset-bottom,0px)); left: 50%; transform: translateX(-50%); width: min(92vw,430px); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
body.has-dock .toasts { bottom: calc(var(--dock-h) + 18px + env(safe-area-inset-bottom,0px)); }
.toast { padding: 14px 18px; border: 1px solid #8291a0; border-radius: 10px; background: #172534; box-shadow: 0 12px 35px #0009; font-size: 15px; animation: dialog-in 180ms ease-out; }
.toast.is-error { border-color: #c08282; color: var(--bad); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes winner-reveal { from { box-shadow: inset 0 0 0 1px #f5efe200; } to { box-shadow: inset 0 0 0 1px #f5efe235; } }
@keyframes live-glow { from { filter: brightness(1); } to { filter: brightness(1.06); } }
@media (hover:hover) { .tile:hover { box-shadow: inset 0 -22px 35px -20px var(--team),0 0 0 1px var(--team-alt),0 6px 24px -12px var(--team); }.btn:not(:disabled):hover { filter: brightness(1.09); } }

@media (max-width: 900px) {
  .wordmark-note { display: none; }.chips { grid-template-columns: repeat(9,minmax(0,1fr)); }
  .login { grid-template-columns: minmax(0,1.2fr) minmax(330px,1fr); }
  .login-story { padding: 36px 28px; }.login-headline { font-size: 56px; }.scene-footer { left: 28px; }
  .member { gap: 12px; }.order-btns { flex-direction: column; }
}
@media (max-width: 640px) {
  .topbar { padding: calc(10px + env(safe-area-inset-top,0px)) 16px 0; display: flex; flex-direction: column; }
  .wordmark { font-size: 21px; }.wordmark img { width: 28px; height: 28px; }
  .refresh { min-height: 44px; padding: 0 10px; font-size: 12px; }
  .sync-line { font-size: 10px; align-self: flex-start; margin-top: 3px; }
  .tabs { margin-top: 5px; gap: 0; }.tab { flex: 1; min-height: 44px; font-size: 14px; }
  .view { padding: 16px 16px calc(var(--dock-h) + 26px + env(safe-area-inset-bottom,0px)); }
  .page-hero { height: 206px; margin-bottom: 18px; border-radius: 12px; }
  .page-hero picture img { object-position: 66% center; }
  .page-hero::after { background: linear-gradient(90deg,#070d16e8,#070d16b8 54%,#070d1622),linear-gradient(0deg,#070d16c9,transparent 75%); }
  .hero-content { padding: 20px; max-width: 94%; }.eyebrow { font-size: 9px; letter-spacing: .14em; }
  .hero-title { font-size: 44px; margin: 9px 0; }.hero-desc { font-size: 12px; }.hero-meta { font-size: 9px; margin-top: 10px; padding-top: 7px; }
  .control-row { gap: 10px; margin: 15px 0; }.control:first-child { flex: .9; }.control-label { font-size: 10px; margin-bottom: 5px; }
  select { font-size: 14px; min-height: 46px; padding-left: 10px; }.progress { padding: 12px 13px; margin-bottom: 16px; }.progress-head { font-size: 12px; margin-bottom: 8px; }
  #game-list { grid-template-columns: minmax(0,1fr); gap: 14px; }.game { padding: 13px; }.game-head { margin-bottom: 11px; font-size: 11px; }.game-matchup { font-size: 10px; }
  .tiles { gap: 12px; }.tile { min-height: 108px; padding: 16px 13px; }.tile-abbr { font-size: 39px; }.tile-name { font-size: 9px; }.tile-check { width: 17px; height: 17px; line-height: 14px; font-size: 11px; }
  .tile-mark { bottom: 5px; right: 5px; }.tile-win,.dot-late { font-size: 8px; padding: 1px 3px; }
  .dock { padding: 12px 16px calc(12px + env(safe-area-inset-bottom,0px)); border-radius: 12px 12px 0 0; }.dock .btn { min-height: 48px; }
  .season-section { margin-bottom: 26px; }.season-section > .section-title { font-size: 26px; }
  th,td { padding: 12px 9px; font-size: 12px; }thead th { font-size: 9px; letter-spacing: .02em; }
  .season-section th,.season-section td { padding-left: 7px; padding-right: 7px; }.season-section td.rank { font-size: 24px; }.season-section td.num-good { font-size: 24px; }.season-section td { padding-top: 16px; padding-bottom: 16px; }
  .chips { gap: 5px; grid-template-columns: repeat(6,minmax(0,1fr)); }.chip img,.chip-placeholder { width: 32px; height: 32px; }
  .member { display: grid; grid-template-columns: 1fr auto; padding: 14px; gap: 10px; }.order-btns { flex-direction: row; grid-column: 2; grid-row: 1; }.member-main { grid-column: 1; grid-row: 1; }.member-actions { grid-column: 1/-1; border-top: 1px solid var(--line-soft); padding-top: 10px; }.member-actions .btn { flex: 1; }.member-actions .btn-icon { flex: 0 0 44px; }
  .empty-state.is-compact { padding: 12px; gap: 12px; }.empty-state.is-compact img { width: 72px; height: 54px; flex-basis: 72px; }.empty-state.is-compact p { font-size: 12px; }
  .dialog-head { padding: 22px 20px 0; }.dialog-body { padding: 18px 20px; }.dialog-foot { padding: 16px 20px; }.dialog-title { font-size: 27px; }
  .login { display: flex; flex-direction: column; min-height: 100dvh; }.login-scene { min-height: 330px; height: 330px; flex: 0 0 330px; width: 100%; }.login-scene picture img { object-position: 60% center; }
  .login-scene::after { background: linear-gradient(0deg,#070d16,transparent 65%),linear-gradient(90deg,#070d16ad,#070d1640); }
  .login-story { padding: 25px 24px; }.login-wordmark { font-size: 23px; margin-top: 6px; }.login-headline { font-size: 43px; margin-top: 39px; }.login-tagline { font-size: 13px; margin-top: 16px; max-width: 260px; }
  .scene-footer { display: none; }.login-card { padding: 8px 24px 30px; max-width: 430px; }.login-card > .eyebrow { display: none; }.login-form-title { font-size: 42px; margin-top: 0; }.login-sub { margin-bottom: 20px; font-size: 14px; }.login-footnote { margin-top: 16px; }.login-card .btn { margin-top: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .tile:active,.btn:active { transform: none; }
}

/* ---------- recap ---------- */
/* Four tabs have to sit inside a 390px phone. The fixed gap gives way to an even
   split on narrow screens, which keeps every tap target well past 44px wide. */
@media (max-width: 620px) {
  .tabs { gap: 0; justify-content: space-between; }
  .tab { min-width: 0; flex: 1 1 0; padding: 0 2px; }
}
.recap-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.recap-status { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; }
.pill { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.pill.is-final { color: var(--good); border-color: #2f5c45; }
.pill.is-working { color: var(--late); }
.recap-headline { font: 700 clamp(26px,6vw,40px)/1.06 var(--display); text-transform: uppercase; letter-spacing: -.4px; margin: 0 0 12px; }
.recap-prose { font-size: 17px; line-height: 1.7; color: var(--text); margin: 0 0 8px; white-space: pre-wrap; }
.recap-note { font-size: 13px; font-style: italic; color: var(--muted-dim); margin: 0 0 14px; }
.recap-figure { margin: 0 0 16px; }
.recap-figure img { width: 100%; max-width: 520px; height: auto; display: block; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.recap-figure figcaption { font-size: 13px; color: var(--muted-dim); margin-top: 8px; }
.recap-placeholder { display: flex; align-items: center; gap: 12px; padding: 22px 20px; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); margin: 0 0 16px; }
.recap-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.recap-share-url { flex: 1 1 260px; min-width: 0; font-size: 13px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 8px; padding: 11px 12px; overflow-x: auto; white-space: nowrap; }
.recap-hint { font-size: 13px; color: var(--muted-dim); margin: 10px 0 0; }
.version-list { display: grid; gap: 8px; }
.version { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px 14px; color: var(--text); font-size: 15px; min-height: 48px; }
.version[aria-current='true'] { border-color: var(--line); background: var(--surface-2); }
.version-no { font-family: var(--display); font-weight: 700; font-size: 18px; min-width: 34px; }
.version-meta { margin-left: auto; font-size: 12px; color: var(--muted-dim); text-align: right; }
.archive { display: flex; flex-wrap: wrap; gap: 8px; }
.archive-week { min-height: 44px; min-width: 60px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-soft); background: var(--surface); color: var(--muted); font-size: 14px; font-weight: 600; }
.archive-week[aria-current='true'] { color: var(--text); border-color: var(--line); background: var(--surface-2); }
.archive-week .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--good); margin-left: 6px; vertical-align: middle; }
