/* Lumo Fit concept demo. Portal shell (aubergine sidebar, inset cream canvas)
   with an athlete-centred dashboard. Tokens follow Lumo-Portal's theme:
   the portal ground is #FFFEF9 (see Lumo-Portal/DESIGN.md "Surface ladder"). */
@font-face { font-family: 'Season Sans TRIAL'; src: url('/fonts/SeasonSans-TRIAL-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Season Sans TRIAL'; src: url('/fonts/SeasonSans-TRIAL-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Season Sans TRIAL'; src: url('/fonts/SeasonSans-TRIAL-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Season Sans TRIAL'; src: url('/fonts/SeasonSans-TRIAL-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  --aubergine: #310A1E;
  --shell: #310A1E;
  --shell-raised: #4A1A33;
  --shell-hover: rgba(254, 148, 232, 0.08);
  --cream: #FFFEF9;
  --surface: #FFFDF7;
  --raised: #FFFFFC;
  --warm: #FFF4D6;
  --magenta: #DE55C1;
  --amber: #FBB622;
  --pink: #FE94E8;
  --ink: #310A1E;
  --ink-2: #7A2B4A;
  --ink-3: rgba(49, 10, 30, 0.62);
  --ink-4: rgba(49, 10, 30, 0.32);
  --line: rgba(49, 10, 30, 0.09);
  --line-2: rgba(49, 10, 30, 0.16);
  --wash: rgba(49, 10, 30, 0.045);
  --wash-2: rgba(49, 10, 30, 0.08);
  /* Chart marks: darker steps of the brand hues so thin marks hold contrast. */
  --carb: #D69212;
  --carb-soft: rgba(214, 146, 18, 0.2);
  --protein: #C8459F;
  --fat: #E879D2;
  --fluid: #7A2B4A;
  --success-ink: #254F2C;
  --success-surface: #D5F6E4;
  --success-base: #438D5A;
  --warning-ink: #712B10;
  --warning-surface: #F4E8C1;
  --warning-base: #BA732A;
  --danger-ink: #7D1D1F;
  --danger-surface: #F9E3E0;
  --danger-base: #D33E40;
  --sans: 'Season Sans TRIAL', system-ui, sans-serif;
  --display: 'Erica One', 'Season Sans TRIAL', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius-card: 20px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: var(--sans); background: var(--shell); color: var(--ink); -webkit-font-smoothing: antialiased; overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
svg { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
:focus-visible { outline: 2px solid var(--magenta); outline-offset: 2px; border-radius: 10px; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 999; padding: 10px 14px; border-radius: 999px; background: var(--cream); font-weight: 600; transform: translateY(-160%); transition: transform 0.2s; }
.skip-link:focus-visible { transform: none; }

/* ============================================================ SHELL */
.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); height: 100vh; height: 100dvh; }
.sidebar { display: flex; flex-direction: column; gap: 14px; min-height: 0; padding: 22px 14px 18px; color: rgba(255, 254, 249, 0.86); overflow-y: auto; scrollbar-width: none; }
.brand { display: flex; align-items: center; gap: 9px; padding: 2px 8px 6px; }
.brand img { filter: brightness(0) invert(94%) sepia(12%) saturate(300%) hue-rotate(330deg); }
.brand-word { font-family: var(--display); font-size: 25px; line-height: 1; color: var(--cream); }
.brand-tag { padding: 3px 8px; border-radius: 999px; background: var(--pink); color: var(--aubergine); font-size: 12px; font-weight: 700; line-height: 1.2; }
.team-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 254, 249, 0.06); }
.team-card b { display: block; font-size: 13.5px; font-weight: 600; color: var(--cream); }
.team-card span { display: block; font-size: 12px; color: rgba(255, 254, 249, 0.6); }
.team-card .team-mark { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--cream); color: var(--aubergine); font-size: 10.5px; font-weight: 700; }
.team-card .team-mark--color { box-shadow: inset 0 0 0 1px rgba(255, 254, 249, 0.18); }
.team-card .team-mark--long { font-size: 8.5px; letter-spacing: -0.02em; }
/* Athletic department: one select across the school's sports. */
.dept { display: grid; gap: 4px; margin-top: -4px; }
.dept[hidden] { display: none; }
.dept-label { padding: 0 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 254, 249, 0.45); }
.dept-select { position: relative; }
.dept-select select { width: 100%; height: 40px; padding: 0 30px 0 12px; border: 0; border-radius: 12px; background: rgba(255, 254, 249, 0.1); color: var(--cream); font: 500 14px var(--sans); appearance: none; -webkit-appearance: none; cursor: pointer; }
.dept-select select:hover { background: rgba(255, 254, 249, 0.14); }
.dept-select select option { color: var(--ink); background: var(--raised); }
.dept-select svg { position: absolute; right: 12px; top: 14px; width: 12px; height: 12px; fill: none; stroke: rgba(255, 254, 249, 0.7); stroke-width: 1.8; pointer-events: none; }
.dept-count { padding: 0 4px; font-size: 11.5px; color: rgba(255, 254, 249, 0.5); }
.search { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 10px 0 12px; border-radius: 12px; background: rgba(255, 254, 249, 0.08); color: rgba(255, 254, 249, 0.66); font-size: 14px; text-align: left; transition: background 0.2s; }
.search:hover { background: rgba(255, 254, 249, 0.12); }
.search svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.search span { flex: 1; }
.search kbd { padding: 2px 7px; border-radius: 6px; background: rgba(255, 254, 249, 0.1); font: 600 11px var(--sans); }
.side-nav { display: grid; gap: 2px; }
.side-nav a, .side-nav button { position: relative; display: flex; align-items: center; gap: 11px; height: 42px; padding: 0 12px; border-radius: 12px; font-size: 14.5px; font-weight: 500; color: rgba(255, 254, 249, 0.8); text-align: left; transition: background 0.2s, color 0.2s; }
.side-nav a:hover, .side-nav button:hover { background: var(--shell-hover); color: var(--cream); }
.side-nav a[aria-current="page"] { background: var(--shell-raised); color: var(--cream); }
.side-nav a[aria-current="page"]::before { content: ''; position: absolute; left: -8px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--pink); }
.side-nav svg { flex: none; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.side-nav .nav-showcase[hidden] { display: none; }
/* The sport's showcase: a small amber spark marks it in the sidebar until it is open. */
.side-nav .nav-showcase:not([aria-current])::after { content: ''; position: absolute; left: 25px; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 2px var(--shell); }
.side-label { margin: 8px 12px -6px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 254, 249, 0.45); }
.side-foot { margin-top: auto; padding: 12px; border-radius: 14px; background: rgba(255, 254, 249, 0.05); font-size: 11.5px; line-height: 1.45; color: rgba(255, 254, 249, 0.62); }
.side-foot b { color: rgba(255, 254, 249, 0.86); font-weight: 600; }
.side-foot a { display: inline-block; margin-top: 8px; color: var(--pink); font-weight: 600; }

.canvas { position: relative; margin: 10px 10px 10px 0; border-radius: 24px; background: var(--cream); overflow-y: auto; overflow-x: hidden; outline: none; scrollbar-width: thin; scrollbar-color: rgba(49,10,30,0.18) transparent; }
.view { min-height: 100%; padding: 24px 30px 30px; }

/* ============================================================ COMMON */
.topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.page-title { min-width: 0; }
.page-title h1 { font-family: var(--display); font-weight: 400; font-size: 38px; line-height: 1.05; color: var(--ink); }
.page-title p { margin-top: 8px; font-size: 15px; color: var(--ink-2); }
.page-title p b { color: var(--ink); font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 10px; flex: none; padding-top: 2px; }
.top-actions .date { margin-right: 4px; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: var(--wash); color: var(--ink); transition: background 0.2s; }
.icon-btn:hover { background: var(--wash-2); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.game-chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px 0 10px; border-radius: 999px; background: var(--warm); font-size: 13px; font-weight: 600; white-space: nowrap; }
.game-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--magenta); box-shadow: 0 0 0 3px rgba(222, 85, 193, 0.18); }
.role-switch { position: relative; }
.role-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--raised); font-size: 13px; white-space: nowrap; }
.role-btn span { color: var(--ink-3); }
.role-btn b { font-weight: 600; }
.role-btn svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.role-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 270px; padding: 6px; border-radius: 16px; background: var(--raised); box-shadow: 0 0 0 1px var(--line), 0 18px 40px rgba(49, 10, 30, 0.14); }
.role-menu button { display: grid; width: 100%; gap: 2px; padding: 9px 10px; border-radius: 10px; text-align: left; }
.role-menu button:hover, .role-menu button[aria-checked="true"] { background: var(--wash); }
.role-menu b { font-size: 13.5px; font-weight: 600; }
.role-menu span { font-size: 12px; color: var(--ink-2); }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--pink); color: var(--aubergine); font-size: 12px; font-weight: 700; }

.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--wash); }
.tabs button { height: 34px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap; transition: background 0.2s, color 0.2s; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--aubergine); color: var(--cream); }
.tabs .tab-dot { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 3px rgba(251, 182, 34, 0.22); vertical-align: 2px; }
.tabs .lock { display: inline-block; width: 11px; height: 11px; margin-left: 5px; vertical-align: -1px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.card { position: relative; min-width: 0; padding: 14px 16px; border-radius: var(--radius-card); background: var(--raised); border: 1px solid var(--line); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; }
.card-head h2, .card-head h3 { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; line-height: 1.3; }
.card-head .src { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-head--stack { flex-direction: column; align-items: flex-start; gap: 1px; }
.card-link { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); color: var(--ink-2); transition: background 0.2s; }
.card-link:hover { background: var(--wash); }
.card-link svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.info { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: var(--ink-3); }
.info:hover, .info:focus-visible { color: var(--ink); }
.info svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill--good { background: var(--success-surface); color: var(--success-ink); }
.pill--watch { background: var(--warning-surface); color: var(--warning-ink); }
.pill--risk { background: var(--danger-surface); color: var(--danger-ink); }
.pill--soft { background: var(--wash); color: var(--ink-2); }
.pill--outline { box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); }
.pill--brand { background: rgba(254, 148, 232, 0.3); color: var(--aubergine); }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.fine { margin-top: 10px; font-size: 12px; line-height: 1.4; color: var(--ink-3); }
.risk-text { color: var(--danger-ink); font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.sw.logged { background: var(--carb); }
.sw.planned { background: var(--raised); box-shadow: inset 0 0 0 1.5px var(--carb); }
.sw.now { width: 2px; height: 12px; border-radius: 1px; background: var(--aubergine); }
.sw.puck { width: 2px; height: 12px; border-radius: 1px; background: var(--magenta); }

/* ============================================================ PLAYER VIEW */
.player-view { display: grid; grid-template-columns: 440px minmax(0, 1fr); grid-template-areas: "top top" "stage tabs" "stage panel"; grid-template-rows: auto auto 1fr; column-gap: 26px; }
.player-view > .topline { grid-area: top; }
.player-view .tabs-row { grid-area: tabs; display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.player-view .stage { grid-area: stage; position: sticky; top: 8px; align-self: start; }
.player-view .panel { grid-area: panel; margin-top: 14px; min-width: 0; }
.page-title .player-name { font-family: var(--sans); font-weight: 600; font-size: 36px; line-height: 1.1; }
.figure-wrap:has(.figure-img:not([data-missing])) .figure-fallback, .pc-photo:has(img) .pc-ini, .head:has(img) .ini { display: none; }
.player-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.player-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-4); }

/* Stage: the player with his readings around him. */
.stage { position: relative; display: flex; flex-direction: column; }
.stage-figure { position: relative; width: 100%; aspect-ratio: 10 / 11; margin-top: 6px; }
.stage-aura { position: absolute; left: 0; width: 82%; top: 0; height: 84%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 244, 214, 0.95), rgba(255, 244, 214, 0.45) 60%, rgba(255, 244, 214, 0) 100%); pointer-events: none; }
/* The bust sits left so the readings get a clean column beside the face. */
.figure-wrap { position: absolute; left: -8%; top: 1%; width: 86%; aspect-ratio: 4 / 5; }
.figure-fallback { position: absolute; left: 50%; top: 38%; display: grid; place-items: center; width: 150px; height: 150px; border-radius: 50%; background: var(--warm); color: var(--ink-3); font-size: 44px; font-weight: 600; transform: translate(-50%, -50%); }
.figure-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center top;
  /* Fade the chest out at the bottom and the near shoulder out at the left edge. */
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 72%, rgba(0,0,0,0.6) 87%, rgba(0,0,0,0) 99%), linear-gradient(90deg, rgba(0,0,0,0) 6%, #000 24%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(180deg, #000 0%, #000 72%, rgba(0,0,0,0.6) 87%, rgba(0,0,0,0) 99%), linear-gradient(90deg, rgba(0,0,0,0) 6%, #000 24%);
  mask-composite: intersect;
  transition: opacity 0.2s var(--ease), transform 0.4s var(--ease); }
.figure-img[data-missing] { visibility: hidden; }

.focal { position: absolute; width: 0; height: 0; pointer-events: none; }
.focal i { position: absolute; left: 50%; top: 50%; border-radius: 50%; transform: translate(-50%, -50%); }
.focal .glow { width: 84px; height: 84px; background: radial-gradient(circle, rgba(251, 182, 34, 0.28), rgba(222, 85, 193, 0.1) 50%, rgba(222, 85, 193, 0) 72%); }
.focal .ring { border: 1px solid rgba(255, 253, 247, 0.85); }
.focal .r1 { width: 48px; height: 48px; }
.focal .core { display: grid; place-items: center; width: 26px; height: 26px; background: radial-gradient(circle at 35% 30%, #FFE3A3, var(--amber) 60%, #E98A0C); box-shadow: 0 0 16px rgba(251, 182, 34, 0.55); }
.focal .core svg { width: 13px; height: 13px; fill: var(--cream); }

.leaders { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; transition: opacity 0.3s; }
.leaders path { fill: none; stroke: rgba(49, 10, 30, 0.2); stroke-width: 1; }
.leaders circle.dot { fill: var(--amber); stroke: var(--cream); stroke-width: 2; }
.leaders circle.halo { fill: rgba(255, 253, 247, 0.4); stroke: rgba(251, 182, 34, 0.55); stroke-width: 1; }
.is-swapping .leaders, .is-swapping .callout { opacity: 0; }

.callout { position: absolute; width: 136px; transition: opacity 0.25s var(--ease); text-shadow: 0 0 10px var(--cream), 0 0 3px var(--cream); }
.callout--left { left: 0; }
.callout--right { right: 0; }
.callout .co-label { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.callout .co-value { display: block; margin-top: 2px; font-size: 25px; font-weight: 600; line-height: 1.1; color: var(--ink); white-space: nowrap; }
.callout .co-value small { margin-left: 3px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.co-state { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12.5px; line-height: 1.3; color: var(--ink-2); }
.co-state i { flex: none; width: 6px; height: 6px; border-radius: 50%; }
.co-state.good i { background: var(--success-base); }
.co-state.watch i { background: var(--warning-base); }
.co-state.risk i { background: var(--danger-base); }
.co-state.risk { color: var(--danger-ink); font-weight: 600; }
.co-state.brand i { background: var(--magenta); }
.stage-readings { display: none; }
.next-strip { display: none; }

.stage-foot { position: relative; display: grid; gap: 10px; margin-top: 8px; }
.roster-switch { display: flex; align-items: center; gap: 4px; width: fit-content; padding: 4px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); }
.roster-switch .icon-btn { width: 40px; height: 40px; }
.roster-current { display: flex; align-items: center; gap: 10px; min-width: 210px; padding: 0 10px 0 4px; height: 40px; border-radius: 999px; text-align: left; transition: background 0.2s; }
.roster-current:hover { background: var(--wash); }
.roster-current .head { width: 32px; height: 32px; }
.roster-current b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.2; }
.roster-current span span { display: block; font-size: 12px; color: var(--ink-2); line-height: 1.2; }
.roster-current .chev { width: 12px; height: 12px; margin-left: auto; fill: none; stroke: var(--ink-2); stroke-width: 1.8; }
.head { position: relative; flex: none; display: block; border-radius: 50%; background: var(--warm); overflow: hidden; }
/* Bust portraits: frame the face (centre ≈ 55% across, 32% down) inside the circle. */
.head img { position: absolute; left: -43%; top: -18%; width: 168%; max-width: none; }
.head .ini { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--ink-2); }
.stage-caption { font-size: 12.5px; color: var(--ink-2); }
/* Showcase card under the portrait: the sport's signature view, one click from its tab. */
.stage-show { display: grid; gap: 8px; margin-top: 12px; padding: 12px 14px 13px; border-radius: 18px; background: var(--raised); border: 1px solid var(--line); transition: border-color 0.2s, box-shadow 0.3s var(--ease), transform 0.3s var(--ease); }
.stage-show:hover { border-color: rgba(222, 85, 193, 0.4); box-shadow: 0 12px 28px rgba(49, 10, 30, 0.07); transform: translateY(-1px); }
.stage-show__head { display: flex; align-items: center; gap: 9px; }
.stage-show__head b { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; }
.stage-show__ic { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(251, 182, 34, 0.24); }
.stage-show__ic svg { width: 15px; height: 15px; fill: none; stroke: var(--aubergine); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.stage-show__go { width: 12px; height: 12px; fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linecap: round; }
.stage-show__text { display: grid; gap: 1px; font-size: 12.5px; line-height: 1.35; color: var(--ink-2); }
.stage-show__text b { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.mini-segs { display: flex; align-items: flex-end; gap: 3px; height: 34px; }
.mini-seg { position: relative; flex: 1; height: 100%; border-radius: 6px; background: var(--wash); overflow: hidden; }
.mini-seg i { position: absolute; left: 0; right: 0; bottom: 0; height: var(--h); border-radius: 6px 6px 0 0; background: linear-gradient(180deg, var(--ink-2), var(--aubergine)); opacity: 0.85; }
.mini-brk { flex: none; display: grid; place-items: center; width: 18px; height: 100%; }
.mini-brk i { width: calc(16px * var(--s)); height: calc(16px * var(--s)); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFE3A3, var(--amber) 60%, #E98A0C); box-shadow: 0 0 0 3px rgba(251, 182, 34, 0.18); }
.mini-segs--holes .mini-seg, .mini-segs--innings .mini-seg { border-radius: 4px; }
.mini-segs--holes { gap: 2px; }
.mini-segs--holes .mini-brk { width: 12px; }
.stage-caption a { font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.kbd-hint { display: inline-flex; gap: 3px; align-items: center; }
.kbd-hint kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 6px; background: var(--wash); font: 600 11px var(--sans); color: var(--ink-2); }

/* Overview */
.overview-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; }
.ov-score { grid-column: span 5; }
.ov-carbs { grid-column: span 7; }
.ov-spot { grid-column: span 7; }
.ov-next { grid-column: span 5; }
.ov-day { grid-column: span 12; }

.score-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.score-value { font-size: 42px; font-weight: 600; line-height: 1; }
.score-value small { margin-left: 2px; font-size: 16px; font-weight: 500; color: var(--ink-3); }
.score-scale { position: relative; margin-top: 14px; }
.score-track { position: relative; height: 10px; border-radius: 999px; background: linear-gradient(90deg, #F7D6EF 0%, var(--pink) 30%, var(--magenta) 62%, var(--amber) 100%); }
.score-track::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: var(--fill); border-radius: 0 999px 999px 0; background: rgba(240, 232, 226, 0.95); }
.score-thumb { position: absolute; top: 5px; left: var(--fill); width: 20px; height: 20px; border-radius: 50%; background: var(--amber); border: 3px solid var(--raised); box-shadow: 0 2px 8px rgba(49, 10, 30, 0.25); transform: translate(-50%, -50%); }
.score-ticks { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11.5px; color: var(--ink-3); }
.score-note { margin-top: 10px; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }

.carbs-top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 14px; margin-top: 2px; }
.big-stat { display: flex; align-items: baseline; gap: 6px; }
.big-stat b { font-size: 34px; font-weight: 600; line-height: 1; }
.big-stat span { font-size: 14px; color: var(--ink-2); }
.carbs-sub { font-size: 13px; color: var(--ink-2); }
.carb-chart { width: 100%; height: auto; margin-top: 4px; }
.carb-chart .bar { fill: var(--carb); }
.carb-chart .bar.plan { fill: var(--raised); stroke: var(--carb); stroke-width: 1.5; }
.carb-chart .now { stroke: var(--aubergine); stroke-width: 1.5; }
.carb-chart .base { stroke: var(--line-2); }
.carb-chart .grid, .scatter .grid, .trend .grid { stroke: var(--line); stroke-width: 1; }
.carb-chart text, .day-lanes text, .trend text { font: 500 10.5px var(--sans); fill: var(--ink-3); }
.ov-carbs .legend { margin-top: 2px; }
.legend-unit { margin-left: auto; color: var(--ink-3); }

.action-list { display: grid; gap: 2px; margin: 6px -6px 0; list-style: none; }
.action { display: grid; grid-template-columns: 34px minmax(0, 1fr) 12px; align-items: center; gap: 10px; padding: 6px 6px; border-radius: 14px; font-size: 13px; line-height: 1.32; transition: background 0.2s; }
.action[href]:hover { background: var(--wash); }
.action b { display: block; font-weight: 600; }
.action small { display: block; font-size: 13px; color: var(--ink-2); }
.action .ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; }
.action .ic svg { width: 17px; height: 17px; fill: none; stroke: var(--aubergine); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ic.amber { background: rgba(251, 182, 34, 0.24); }
.ic.pink { background: rgba(254, 148, 232, 0.3); }
.ic.magenta { background: rgba(222, 85, 193, 0.18); }
.ic.warm { background: var(--warm); }
.action .chev { width: 12px; height: 12px; fill: none; stroke: var(--ink-3); stroke-width: 1.8; }
.action.locked { color: var(--ink-2); }

.spot-stats { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 6px; }
.spot-n { font-size: 12px; color: var(--ink-2); }
.mini-scatter { width: 100%; height: auto; margin-top: 4px; }
.spot-text { margin-top: 2px; font-size: 13px; line-height: 1.4; }
.spot-text span { color: var(--ink-3); }
.scatter .dot { fill: var(--protein); fill-opacity: 0.72; stroke: var(--raised); stroke-width: 1.5; }
.scatter .fit { stroke: var(--aubergine); stroke-width: 2; stroke-linecap: round; }
.scatter .plan-line { stroke: var(--carb); stroke-width: 1.5; }
.scatter .plan-label { font: 600 10.5px var(--sans); fill: var(--ink); }
.scatter text { font: 500 10.5px var(--sans); fill: var(--ink-3); }
.scatter .axis-unit, .scatter .axis-title { fill: var(--ink-2); }

.day-lanes { width: 100%; height: auto; margin-top: 2px; }
.day-lanes .lane-label { font: 500 12px var(--sans); fill: var(--ink-2); }
.day-lanes .lane-track { fill: var(--wash); }
.day-lanes .sched.session { fill: rgba(49, 10, 30, 0.24); }
.day-lanes .sched.rest { fill: rgba(254, 148, 232, 0.45); }
.day-lanes .sched.game { fill: var(--aubergine); }
.day-lanes .dose { fill: var(--c); }
.day-lanes .dose.plan { fill: var(--raised); stroke: var(--c); stroke-width: 1.5; }
.day-lanes .now { stroke: var(--aubergine); stroke-width: 1.5; }
.day-lanes .puck { stroke: var(--magenta); stroke-width: 1.5; }
.day-foot { display: grid; grid-template-columns: repeat(5, minmax(0, auto)) 1fr; align-items: end; gap: 8px 22px; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
.day-foot > div { display: grid; gap: 1px; }
.day-foot .k { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.day-foot .k i { width: 8px; height: 8px; border-radius: 50%; }
.day-foot b { font-size: 16px; font-weight: 600; white-space: nowrap; }
.day-foot b small { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.day-legend { gap: 14px; }
.day-foot .src { justify-self: end; align-self: end; max-width: 210px; font-size: 11.5px; line-height: 1.35; text-align: right; color: var(--ink-3); }
.more-link { margin-left: 4px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }

/* Fueling tab */
.fuel-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 12px; }
.meal-list { display: grid; gap: 8px; list-style: none; }
.meal { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 8px 14px 8px 8px; border-radius: 16px; background: var(--raised); border: 1px solid var(--line); }
.meal.next { border-color: rgba(222, 85, 193, 0.5); box-shadow: 0 0 0 3px rgba(222, 85, 193, 0.08); }
.meal.planned { background: transparent; border-style: dashed; }
.meal-photo { width: 76px; height: 58px; border-radius: 11px; overflow: hidden; background: var(--warm); }
.meal-photo img { width: 100%; height: 100%; object-fit: cover; }
.meal-photo.bottle { display: grid; place-items: center; }
.meal-photo.bottle svg { width: 26px; height: 26px; fill: none; stroke: var(--fluid); stroke-width: 1.6; }
.meal .when { font-size: 12px; color: var(--ink-2); }
.meal .when b { color: var(--ink); font-weight: 600; }
.meal h3 { margin-top: 1px; font-size: 14.5px; font-weight: 600; }
.meal h3 .muted { font-weight: 500; }
.meal .macros { margin-top: 3px; font-size: 12.5px; color: var(--ink-2); }
.side-stack { display: grid; gap: 12px; align-content: start; }
.kv { display: grid; gap: 9px; margin-top: 10px; }
.kv div { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ink-2); }
.kv b { color: var(--ink); font-weight: 600; text-align: right; }
.supp { display: grid; gap: 8px; margin-top: 10px; list-style: none; }
.supp li { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.supp li span { color: var(--ink-2); }

/* Correlations tab */
.corr-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px; }
.corr-list { display: grid; gap: 6px; align-content: start; }
.corr-item { display: grid; gap: 3px; padding: 11px 13px; border-radius: 16px; border: 1px solid var(--line); background: var(--raised); text-align: left; transition: border-color 0.2s, background 0.2s; }
.corr-item:hover { border-color: var(--line-2); }
.corr-item[aria-pressed="true"] { border-color: var(--aubergine); box-shadow: inset 0 0 0 1px var(--aubergine); }
.corr-item b { font-size: 13px; font-weight: 600; }
.corr-item span { font-size: 12px; color: var(--ink-2); }
.corr-item .r { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.corr-item .r i { position: relative; flex: 1; height: 4px; border-radius: 4px; background: var(--wash); }
.corr-item .r i::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); border-radius: 4px; background: var(--protein); }
.corr-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.scatter-lg { width: 100%; height: auto; margin-top: 6px; }
.takeaway { display: flex; gap: 12px; align-items: flex-start; margin-top: 10px; padding: 13px 15px; border-radius: 16px; background: var(--warm); font-size: 14px; line-height: 1.45; }
.takeaway svg { flex: none; width: 20px; height: 20px; margin-top: 1px; fill: none; stroke: var(--aubergine); stroke-width: 1.6; }
.corr-note { margin-top: 10px; font-size: 12.5px; color: var(--ink-2); }
.chart-tip { position: fixed; z-index: 90; max-width: 320px; padding: 8px 10px; border-radius: 10px; background: var(--aubergine); color: var(--cream); font-size: 12px; line-height: 1.35; pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity 0.15s, transform 0.15s; }
.chart-tip.on { opacity: 1; transform: none; }

/* Body & labs tab */
.labs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.labs-grid .body-card { grid-column: span 2; }
.labs-grid--status .labs-status { grid-column: span 3; }
.lab-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.lab-value b { font-size: 30px; font-weight: 600; }
.lab-value span { font-size: 13px; color: var(--ink-2); }
.range { position: relative; height: 8px; margin-top: 14px; border-radius: 999px; background: var(--wash); }
.range .ok { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--success-surface); }
.range .mark { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--raised); transform: translate(-50%, -50%); box-shadow: 0 1px 4px rgba(49,10,30,0.25); }
.range .mark.in { background: var(--success-base); }
.range .mark.out { background: var(--warning-base); }
.range-labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11.5px; color: var(--ink-3); }
.trend { width: 100%; height: auto; margin-top: 4px; }
.trend polyline { fill: none; stroke: var(--protein); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trend circle { fill: var(--protein); stroke: var(--raised); stroke-width: 2; }
.lab-status-line { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.lab-status-line svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--ink-3); stroke-width: 1.6; }
.roles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.locked-panel { display: grid; place-items: center; gap: 10px; min-height: 320px; padding: 40px; border-radius: var(--radius-card); border: 1px dashed var(--line-2); text-align: center; color: var(--ink-2); }
.locked-panel svg { width: 28px; height: 28px; fill: none; stroke: var(--ink-3); stroke-width: 1.6; }
.locked-panel b { color: var(--ink); font-size: 16px; }

/* ============================================================ SHOWCASE */
/* Showcase tab: the signature view full width, its supporting cards side by side beneath. */
.sc-layout { display: grid; gap: 12px; align-items: start; }
.sc-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.sc-side > .card { height: 100%; }
.sc-lead { margin-top: 4px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.sc-legend { margin-top: 10px; }
.sw.sc-load { background: var(--aubergine); }
.sw.sc-bottle { border-radius: 50%; background: var(--amber); }
.sc-cols { display: flex; align-items: stretch; gap: 6px; margin-top: 14px; overflow-x: auto; scrollbar-width: thin; }
.sc-seg { flex: 1 1 0; min-width: 64px; display: grid; grid-template-rows: 118px auto auto auto; justify-items: center; gap: 2px; text-align: center; }
.sc-seg__bar { position: relative; width: 100%; height: 118px; border-radius: 12px; background: var(--wash); overflow: hidden; }
.sc-seg__bar i { position: absolute; left: 0; right: 0; bottom: 0; height: var(--h); border-radius: 12px 12px 0 0; background: linear-gradient(180deg, var(--ink-2), var(--aubergine)); transform-origin: bottom; animation: sc-grow 0.6s var(--ease) both; }
.sc-seg__bar em { position: absolute; left: 6px; right: 6px; bottom: 6px; height: calc(var(--h) - 12px); background: repeating-linear-gradient(180deg, rgba(255, 254, 249, 0.55) 0 2px, transparent 2px calc(100% / var(--n))); opacity: 0.5; }
.sc-seg--idle .sc-seg__bar i { background: var(--line-2); }
.sc-seg__label { margin-top: 6px; font-size: 13px; font-weight: 600; }
.sc-seg__load { font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; }
.sc-seg__note { font-size: 11.5px; line-height: 1.3; color: var(--ink-3); }
.sc-brk { flex: 0 0 78px; display: grid; grid-template-rows: 118px auto auto auto; justify-items: center; align-content: start; gap: 1px; text-align: center; }
.sc-brk__dot { align-self: center; display: grid; place-items: center; width: calc(52px * var(--s)); height: calc(52px * var(--s)); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFE3A3, var(--amber) 60%, #E98A0C); box-shadow: 0 0 0 6px rgba(251, 182, 34, 0.16), 0 6px 16px rgba(233, 138, 12, 0.3); }
.sc-brk__dot svg { width: 20px; height: 20px; fill: none; stroke: var(--aubergine); stroke-width: 1.6; }
.sc-brk b { margin-top: 6px; font-size: 15px; font-weight: 600; }
.sc-brk span { font-size: 12.5px; color: var(--ink-2); }
.sc-brk small { font-size: 11.5px; color: var(--ink-3); }
.sc-brk--off .sc-brk__dot { background: var(--wash-2); box-shadow: none; }
.sc-brk--off .sc-brk__dot svg { stroke: var(--ink-3); }
/* Baseball: nine innings and three dugout blocks in one row. */
.sc-cols--innings { gap: 4px; }
.sc-cols--innings .sc-seg { min-width: 0; }
.sc-cols--innings .sc-seg__note { display: none; }
.sc-cols--innings .sc-brk { flex-basis: 64px; }
.sc-cols--innings .sc-brk__dot { width: calc(44px * var(--s)); height: calc(44px * var(--s)); }
@keyframes sc-grow { from { transform: scaleY(0); } to { transform: none; } }
.sc-brk-list { display: grid; gap: 8px; margin-top: 10px; list-style: none; }
.sc-brk-list li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: center; font-size: 13px; line-height: 1.32; }
.sc-brk-list b { display: block; font-weight: 600; }
.sc-brk-list small { display: block; font-size: 12.5px; color: var(--ink-2); }
.sc-brk-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(251, 182, 34, 0.24); }
.sc-brk-ic svg { width: 15px; height: 15px; fill: none; stroke: var(--aubergine); stroke-width: 1.6; }
.inline-link { font-weight: 600; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
/* Golf: the round as two rows of nine holes. */
.holes { margin-top: 12px; }
.holes__nine { margin: 8px 0 6px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.holes__row { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; list-style: none; }
.hole { position: relative; display: grid; align-content: start; gap: 2px; min-height: 92px; padding: 8px 6px; border-radius: 12px; background: var(--wash); text-align: center; }
.hole__no { font-size: 13px; font-weight: 600; }
.hole__min { font-size: 11.5px; color: var(--ink-3); }
.hole--stop { background: var(--warm); box-shadow: inset 0 0 0 1px rgba(251, 182, 34, 0.5); }
.hole__stop { display: grid; justify-items: center; gap: 0; margin-top: 4px; }
.hole__stop svg { width: 16px; height: 16px; fill: none; stroke: var(--aubergine); stroke-width: 1.6; }
.hole__stop b { font-size: 12.5px; font-weight: 600; }
.hole__stop small { font-size: 11px; color: var(--ink-2); }
/* Team views of a showcase. */
.team-summary.sc-tiles { margin-top: 22px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.sc-tiles:empty { display: none; }
.sc-table-card { margin-top: 12px; }
.sc-table-scroll { overflow-x: auto; scrollbar-width: thin; }
.sc-table { min-width: 560px; }
.sc-table th { white-space: nowrap; }
/* Tabular figures widen the space glyph; keep value and unit together in table cells. */
.sc-table td.tnum, .sc-table td .tnum { word-spacing: -0.22em; }
.sc-table .who { color: inherit; }
.sc-table .who:hover span { text-decoration: underline; text-underline-offset: 3px; }
.sc-table .sc-th-brk { color: var(--warning-ink); }
.sc-load-cell { background: linear-gradient(90deg, transparent calc(100% - var(--w) * 0.9), rgba(49, 10, 30, 0.07) calc(100% - var(--w) * 0.9)); }
.sc-brk-cell { white-space: nowrap; }
.sc-brk-cell small { display: block; font-size: 11.5px; color: var(--ink-2); }
/* Groups: position or event groups side by side. */
.mini-grps { display: flex; align-items: flex-end; gap: 4px; height: 40px; }
.mini-grp { position: relative; flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.mini-grp i { width: 100%; height: calc(var(--h) - 14px); border-radius: 5px 5px 2px 2px; background: var(--line-2); }
.mini-grp small { font-size: 10px; font-weight: 600; color: var(--ink-3); line-height: 1; }
.mini-grp.is-me i { background: var(--carb); }
.mini-grp.is-me small { color: var(--ink); }
.grp-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 14px; }
.grp-col { position: relative; display: grid; align-content: start; gap: 8px; padding: 12px 12px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.grp-col::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--carb) var(--fill), var(--wash-2) var(--fill)); }
.grp-col.is-me { background: var(--warm); border-color: rgba(251, 182, 34, 0.55); box-shadow: 0 0 0 3px rgba(251, 182, 34, 0.14); }
.grp-col__head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.grp-col__head b { font-size: 14px; font-weight: 600; line-height: 1.25; }
.grp-col__head span { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.grp-col__focus { min-height: 34px; font-size: 12px; line-height: 1.4; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.grp-col dl { display: grid; gap: 6px; }
.grp-col dl div { display: grid; gap: 0; }
.grp-col dt { font-size: 11.5px; color: var(--ink-3); }
.grp-col dd { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.grp-col dd small { margin-left: 3px; font-size: 12px; font-weight: 500; color: var(--ink-2); }
.grp-col__heads { display: flex; align-items: center; margin-top: 2px; }
.grp-col__heads a { margin-right: -6px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface); }
.grp-col.is-me .grp-col__heads a { box-shadow: 0 0 0 2px var(--warm); }
.grp-col__heads .head { width: 26px; height: 26px; }
.grp-col__heads span { margin-left: 10px; font-size: 12px; color: var(--ink-3); }
.wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.wk-day { display: grid; justify-items: center; gap: 1px; text-align: center; }
.wk-bar { position: relative; width: 100%; height: 70px; border-radius: 8px; background: var(--wash); overflow: hidden; }
.wk-bar i { position: absolute; left: 0; right: 0; bottom: 0; height: var(--h); border-radius: 8px 8px 0 0; background: var(--carb-soft); box-shadow: inset 0 2px 0 var(--carb); }
.wk-day.is-today .wk-bar i { background: var(--carb); }
.wk-day b { margin-top: 4px; font-size: 13px; font-weight: 600; }
.wk-day small { font-size: 11.5px; color: var(--ink-2); }
.wk-day em { font-style: normal; font-size: 10.5px; line-height: 1.2; color: var(--ink-3); }
.wi-range .ok { background: var(--success-surface); }
.meet { position: relative; margin-top: 12px; padding-bottom: 20px; }
.meet-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 10px; height: 30px; }
.meet-row b { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.meet-track { position: relative; height: 16px; border-radius: 6px; background: var(--wash); }
.meet-blk { position: absolute; top: 2px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--aubergine); }
.meet-blk--round { background: var(--raised); box-shadow: inset 0 0 0 2px var(--aubergine); }
.meet-gap { position: absolute; top: 6px; height: 4px; border-radius: 2px; background: var(--carb); opacity: 0.55; }
.meet-ticks { position: absolute; left: 160px; right: 0; bottom: 0; height: 14px; }
.meet-ticks span { position: absolute; transform: translateX(-50%); font-size: 10.5px; color: var(--ink-3); }
.sw.meet-sw-round { border-radius: 50%; box-shadow: inset 0 0 0 2px var(--aubergine); }
.sw.meet-sw-gap { height: 4px; background: var(--carb); }
.sw.meet-sw-final { border-radius: 50%; background: var(--aubergine); }
/* Congestion: a run of fixtures, or a back-to-back across time zones. */
.mini-fxs { display: flex; align-items: flex-end; gap: 4px; height: 40px; }
.mini-fx { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.mini-fx i { width: 100%; height: max(3px, calc(var(--h) - 14px)); border-radius: 5px 5px 2px 2px; background: var(--line-2); }
.mini-fx.is-today i { background: var(--carb); }
.mini-fx.is-travel i { background: transparent; border-top: 2px dashed var(--line-2); border-radius: 0; height: 2px; }
.mini-fx small { font-size: 10px; font-weight: 600; color: var(--ink-3); line-height: 1; }
.fx-strip { display: grid; grid-template-columns: repeat(8, minmax(64px, 1fr)); gap: 6px; margin-top: 14px; overflow-x: auto; scrollbar-width: thin; }
.fx-day { display: grid; grid-template-rows: auto 96px auto auto auto; justify-items: center; gap: 2px; padding: 8px 4px 10px; border-radius: 14px; text-align: center; }
.fx-day.is-today { background: var(--warm); box-shadow: inset 0 0 0 1px rgba(251, 182, 34, 0.5); }
.fx-day__date { font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.fx-day__bar { position: relative; width: 70%; height: 96px; border-radius: 10px; background: var(--wash); overflow: hidden; }
.fx-day__bar i { position: absolute; left: 0; right: 0; bottom: 0; height: var(--h); border-radius: 10px 10px 0 0; background: var(--carb-soft); box-shadow: inset 0 2px 0 var(--carb); transform-origin: bottom; animation: sc-grow 0.6s var(--ease) both; }
.fx-day.has-match .fx-day__bar i { background: var(--carb); }
.fx-day b { margin-top: 4px; font-size: 14px; font-weight: 600; }
.fx-day__unit { font-size: 11px; color: var(--ink-3); }
.fx-match { display: grid; gap: 1px; margin-top: 4px; padding: 4px 6px; border-radius: 9px; background: var(--aubergine); color: var(--cream); font-size: 11.5px; font-weight: 600; line-height: 1.25; }
.fx-match em { font-style: normal; font-weight: 500; opacity: 0.8; }
.fx-kind { margin-top: 4px; font-size: 11.5px; color: var(--ink-3); }
.sw.fx-sw-match { background: var(--aubergine); }
.b2b { margin-top: 18px; }
.b2b-track { position: relative; height: 54px; border-radius: 12px; background: var(--wash); }
.b2b-blk { position: absolute; top: 6px; bottom: 6px; display: grid; align-content: center; padding: 0 8px; border-radius: 8px; overflow: hidden; white-space: nowrap; }
.b2b-blk b { font-size: 12px; font-weight: 600; text-overflow: ellipsis; overflow: hidden; }
.b2b-blk em { font-style: normal; font-size: 11px; opacity: 0.8; }
.b2b-blk--game { background: var(--aubergine); color: var(--cream); }
.b2b-blk--travel { background: repeating-linear-gradient(135deg, rgba(49, 10, 30, 0.16) 0 6px, rgba(49, 10, 30, 0.08) 6px 12px); color: var(--ink); }
.b2b-blk--sleep { background: rgba(254, 148, 232, 0.4); color: var(--ink); }
.b2b-blk--session { background: rgba(49, 10, 30, 0.24); color: var(--ink); }
.b2b-tz { position: absolute; top: -12px; bottom: -6px; width: 0; border-left: 1.5px dashed var(--magenta); }
.b2b-tz small { position: absolute; left: 4px; top: -4px; font-size: 10.5px; font-weight: 600; color: var(--magenta); white-space: nowrap; }
.b2b-meals { position: relative; height: 36px; }
.b2b-meal { position: absolute; top: 6px; display: grid; justify-items: center; transform: translateX(-50%); }
.b2b-meal i { width: calc(16px * var(--s)); height: calc(16px * var(--s)); border-radius: 50%; background: var(--raised); box-shadow: inset 0 0 0 2px var(--carb); }
.b2b-meal.is-logged i { background: var(--carb); }
.b2b-meal small { font-size: 10.5px; color: var(--ink-2); white-space: nowrap; }
.b2b-ticks { position: relative; height: 14px; border-top: 1px solid var(--line); }
.b2b-ticks span { position: absolute; top: 2px; transform: translateX(-50%); font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }
.sw.b2b-sw-game { background: var(--aubergine); }
.sw.b2b-sw-travel { background: repeating-linear-gradient(135deg, rgba(49, 10, 30, 0.3) 0 3px, rgba(49, 10, 30, 0.1) 3px 6px); }
.sw.b2b-sw-sleep { background: rgba(254, 148, 232, 0.6); }
/* Event day: games, matches or sessions with the windows between. */
.mini-evs { display: flex; align-items: flex-end; gap: 3px; height: 34px; }
.mini-ev { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.mini-ev i { width: 100%; height: calc(var(--h) - 13px); border-radius: 5px 5px 2px 2px; background: var(--raised); box-shadow: inset 0 0 0 1.5px var(--aubergine); }
.mini-ev.is-done i { background: var(--aubergine); box-shadow: none; }
.mini-ev.is-off i { background: var(--wash); box-shadow: none; }
.mini-ev small { font-size: 10px; font-weight: 600; color: var(--ink-3); line-height: 1; }
.ev-track { margin-top: 18px; }
.ev-lane { position: relative; height: 70px; border-radius: 12px; background: var(--wash); }
.ev-blk { position: absolute; top: 6px; bottom: 6px; display: grid; align-content: center; padding: 0 8px; border-radius: 9px; background: var(--raised); box-shadow: inset 0 0 0 1.5px var(--aubergine); overflow: hidden; white-space: nowrap; }
.ev-blk.is-done { background: var(--aubergine); color: var(--cream); box-shadow: none; }
.ev-blk.is-off { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--ink-3); }
.ev-blk b { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.ev-blk em { font-style: normal; font-size: 11px; opacity: 0.85; overflow: hidden; text-overflow: ellipsis; }
.ev-gap { position: absolute; top: 22px; bottom: 22px; display: grid; place-items: center; align-content: center; border-radius: 8px; background: rgba(251, 182, 34, 0.18); }
.ev-gap.is-key { background: rgba(251, 182, 34, 0.42); box-shadow: inset 0 0 0 1px rgba(233, 138, 12, 0.5); }
.ev-gap b { font-size: 11px; font-weight: 700; color: var(--warning-ink); white-space: nowrap; }
.ev-gap em { font-style: normal; font-size: 10px; color: var(--warning-ink); white-space: nowrap; }
.ev-now { position: absolute; top: -6px; bottom: -6px; width: 0; border-left: 1.5px solid var(--aubergine); }
.ev-now small { position: absolute; left: 4px; top: -12px; font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.ev-days { position: relative; height: 16px; margin-top: 4px; }
.ev-day { position: absolute; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.sw.ev-sw-gap { background: rgba(251, 182, 34, 0.5); }
/* Weight: a safe descent to a class or a lightweight limit. */
.mini-desc { width: 100%; height: 40px; }
.mini-desc line { stroke: var(--magenta); stroke-width: 1.5; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.mini-desc polyline { fill: none; stroke: var(--aubergine); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.desc-chart, .ea-chart, .heat-chart { width: 100%; height: auto; margin-top: 10px; }
.desc-chart text, .ea-chart text, .heat-chart text { font: 500 10.5px var(--sans); fill: var(--ink-3); }
.desc-chart .grid, .ea-chart .grid, .heat-chart .grid { stroke: var(--line); }
.desc-line { fill: none; stroke: var(--aubergine); stroke-width: 2.2; stroke-linejoin: round; }
.desc-cap { fill: none; stroke: var(--warning-base); stroke-width: 1.5; stroke-dasharray: 4 4; }
.desc-limit { stroke: var(--magenta); stroke-width: 1.5; }
.desc-limit-label { font-weight: 600 !important; fill: var(--magenta) !important; }
.desc-dot { fill: var(--raised); stroke: var(--aubergine); stroke-width: 2; }
.desc-dot.is-today { fill: var(--amber); stroke: var(--raised); stroke-width: 2.5; }
.sw.desc-sw-line { height: 3px; background: var(--aubergine); }
.sw.desc-sw-cap { height: 0; border-top: 2px dashed var(--warning-base); border-radius: 0; }
.sw.desc-sw-limit { height: 3px; background: var(--magenta); }
.wt-none { display: grid; gap: 6px; margin-top: 14px; padding: 18px; border-radius: 16px; background: var(--warm); }
.wt-none b { font-size: 16px; }
.wt-none p { font-size: 13px; line-height: 1.45; color: var(--ink-2); }
/* Energy availability and the iron screen. */
.ea-meter { position: relative; display: block; height: 14px; margin: 6px 0 2px; }
.ea-meter__bands { position: absolute; inset: 3px 0; border-radius: 999px; background: linear-gradient(90deg, var(--danger-surface) var(--a), var(--warning-surface) var(--a) var(--b), var(--success-surface) var(--b)); }
.ea-meter__mark { position: absolute; top: 0; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; border: 3px solid var(--raised); box-shadow: 0 1px 4px rgba(49, 10, 30, 0.25); }
.ea--low { background: var(--danger-base); fill: var(--danger-base); }
.ea--reduced { background: var(--warning-base); fill: var(--warning-base); }
.ea--optimal { background: var(--success-base); fill: var(--success-base); }
.ea-band--low { fill: rgba(211, 62, 64, 0.08); }
.ea-band--reduced { fill: rgba(186, 115, 42, 0.08); }
.ea-chart .ea-val { font-weight: 600; fill: var(--ink-2); }
.ea-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; }
.sw.ea-sw-low { background: var(--danger-base); }
.sw.ea-sw-reduced { background: var(--warning-base); }
.sw.ea-sw-ok { background: var(--success-base); }
.screen-list { display: grid; gap: 8px; margin-top: 10px; list-style: none; }
.screen-list li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.screen-list li i { width: 8px; height: 8px; border-radius: 50%; background: var(--success-base); }
.screen-list li.is-flag i { background: var(--danger-base); }
.screen-list li.is-flag b { color: var(--danger-ink); }
.screen-list b { font-weight: 600; color: var(--ink); text-align: right; }
.rot-list { display: grid; gap: 6px; margin-top: 10px; list-style: none; }
.rot-list li { display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: center; column-gap: 8px; row-gap: 1px; padding: 7px 10px; border-radius: 12px; background: var(--wash); font-size: 13px; color: var(--ink-3); }
.rot-list li.is-in { background: var(--warm); color: var(--ink); }
.rot-list .rot-time { grid-row: span 2; font-weight: 600; font-variant-numeric: tabular-nums; }
.rot-list li > span:last-child { grid-column: 2; font-size: 12px; color: var(--ink-3); }
/* Heat: the body-mass deficit against the 2% line. */
.mini-heat { width: 100%; height: 40px; }
.mini-heat line { stroke: var(--danger-base); stroke-width: 1.5; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.mini-heat polyline { fill: none; stroke: var(--fluid); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.mini-heat polyline.none { stroke: var(--line-2); stroke-dasharray: 3 3; }
.heat-limit { stroke: var(--danger-base); stroke-width: 1.5; stroke-dasharray: 5 4; }
.heat-limit-label { font-weight: 600 !important; fill: var(--danger-ink) !important; }
.heat-plan { fill: none; stroke: var(--fluid); stroke-width: 2.4; stroke-linejoin: round; }
.heat-none { fill: none; stroke: var(--ink-4); stroke-width: 1.5; stroke-dasharray: 4 4; }
.heat-drink circle { fill: var(--amber); fill-opacity: 0.9; stroke: var(--raised); stroke-width: 2; }
.heat-drink text { font-weight: 600 !important; fill: var(--ink) !important; }
.heat-unit { fill: var(--wash-2); }
.heat-chart .heat-unit-label { font-size: 10px; font-weight: 600; fill: var(--ink-2); }
.sw.heat-sw-plan { height: 3px; background: var(--fluid); }
.sw.heat-sw-none { height: 0; border-top: 2px dashed var(--ink-4); border-radius: 0; }
.hist { display: grid; gap: 6px; margin-top: 10px; }
.hist-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) 40px; align-items: center; gap: 8px; font-size: 12px; }
.hist-row small { color: var(--ink-2); }
.hist-row b { text-align: right; font-weight: 600; }
.hist-bar { position: relative; height: 12px; border-radius: 6px; background: var(--wash); }
.hist-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; }
.hist-bar .lost { background: rgba(122, 43, 74, 0.28); }
.hist-bar .drank { background: var(--fluid); }
.sw.hist-sw-lost { background: rgba(122, 43, 74, 0.28); }
.sw.hist-sw-drank { background: var(--fluid); }
.pair-row td { padding-top: 12px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.sc-load-cell small { margin-left: 2px; font-size: 11px; color: var(--ink-3); }
/* A preview whose portraits are not ready yet. */
.empty-state { display: grid; justify-items: center; gap: 10px; max-width: 560px; margin: 60px auto 0; padding: 40px 32px; border-radius: var(--radius-card); border: 1px dashed var(--line-2); text-align: center; color: var(--ink-2); }
.empty-state__ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--warm); }
.empty-state__ic svg { width: 24px; height: 24px; fill: none; stroke: var(--aubergine); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.empty-state b { font-size: 18px; color: var(--ink); }
.empty-state p { font-size: 14px; line-height: 1.5; }
.empty-state__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 9px 16px; border-radius: 999px; background: var(--aubergine); color: var(--cream); font-size: 14px; font-weight: 600; }
.empty-state__link svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* ============================================================ TEAM VIEW */
.team-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.team-summary h3 { font-size: 14px; font-weight: 600; }
.team-summary .big { display: block; margin-top: 8px; font-size: 34px; font-weight: 600; line-height: 1; }
.team-summary .big small { font-size: 16px; font-weight: 500; color: var(--ink-3); }
.team-summary span { display: block; margin-top: 6px; font-size: 13px; line-height: 1.35; color: var(--ink-2); }
.team-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { height: 34px; padding: 0 13px; border-radius: 999px; background: var(--wash); font-size: 13px; font-weight: 500; color: var(--ink-2); }
.chips button span { margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: var(--danger-surface); color: var(--danger-ink); font-size: 11px; font-weight: 700; }
.chips button[aria-pressed="true"] { background: var(--aubergine); color: var(--cream); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; margin-top: 14px; list-style: none; }
.player-card { position: relative; display: block; height: 100%; border-radius: 20px; background: var(--raised); border: 1px solid var(--line); overflow: hidden; transition: border-color 0.2s, transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.player-card:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(49, 10, 30, 0.08); }
.player-card .pc-photo { position: relative; height: 150px; background: radial-gradient(closest-side at 50% 72%, var(--warm), rgba(255, 244, 214, 0) 100%); overflow: hidden; }
.player-card .pc-photo img { position: absolute; left: 50%; top: 4px; width: 118%; max-width: none; transform: translateX(-48%); -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%); mask-image: linear-gradient(180deg, #000 62%, transparent 100%); }
.player-card .pc-ini { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--warm); color: var(--ink-3); font-size: 22px; font-weight: 600; transform: translate(-50%, -50%); }
.player-card .pc-no { position: absolute; left: 12px; top: 10px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.player-card .pc-score { position: absolute; right: 10px; top: 10px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--raised); font-size: 14px; font-weight: 700; }
.player-card .pc-score svg { position: absolute; inset: 0; width: 40px; height: 40px; transform: rotate(-90deg); }
.player-card .pc-score circle { fill: none; stroke-width: 3; }
.player-card .pc-body { padding: 10px 12px 12px; }
.player-card b { display: block; font-size: 14px; font-weight: 600; }
.player-card .pc-pos { display: block; font-size: 12px; color: var(--ink-2); }
.pc-action { display: block; margin-top: 8px; padding: 5px 9px; border-radius: 10px; font-size: 12px; font-weight: 600; line-height: 1.3; }
.pc-action--risk { background: var(--danger-surface); color: var(--danger-ink); }
.pc-action--watch { background: var(--warning-surface); color: var(--warning-ink); }
.pc-action--soft { background: var(--wash); color: var(--ink-2); font-weight: 500; }

/* ============================================================ KITCHEN */
.kitchen-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 12px; margin-top: 22px; align-items: start; }
.station-list { display: grid; gap: 12px; margin-top: 12px; }
.station { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 14px; align-items: center; }
.station img { width: 132px; height: 98px; border-radius: 14px; object-fit: cover; }
.station b { font-size: 14.5px; font-weight: 600; }
.station p { margin-top: 3px; font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.station .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.portion-table { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: 13px; }
.portion-table th { padding: 6px 4px; text-align: left; font-size: 11.5px; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.portion-table td { padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.portion-table .r { text-align: right; }
.portion-table .who { display: flex; align-items: center; gap: 8px; }
.portion-table .who .head { width: 28px; height: 28px; }
.portion-table .who small { display: block; font-size: 11.5px; color: var(--ink-2); }
.road-steps { display: grid; gap: 10px; margin-top: 12px; list-style: none; }
.road-steps li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; font-size: 13px; line-height: 1.4; }
.road-steps li i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--success-surface); color: var(--success-ink); font-style: normal; font-size: 11px; font-weight: 700; }
.road-steps li i.pending { background: var(--warm); color: var(--warning-ink); }
.road-steps--labels li { grid-template-columns: 96px minmax(0, 1fr); }
.road-steps--labels li i { justify-self: start; width: auto; padding: 0 9px; border-radius: 11px; white-space: nowrap; }

/* ============================================================ SOURCES */
.flow { display: grid; grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr); align-items: center; gap: 18px; margin-top: 20px; padding: 12px 20px; border-radius: var(--radius-card); background: var(--warm); }
.flow-col { display: grid; gap: 4px; }
.flow-col small { font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.flow-col p { font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.flow-core { display: grid; place-items: center; gap: 4px; text-align: center; font-size: 12px; color: var(--ink-2); }
.flow-core .mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--aubergine); }
.flow-core .mark img { width: 26px; filter: brightness(0) invert(94%) sepia(12%) saturate(300%) hue-rotate(330deg); }
.flow .roles { margin-top: 0; }
.source-group { margin-top: 24px; }
.source-group h2 { font-size: 15px; font-weight: 600; }
.source-group h2 span { margin-left: 6px; font-weight: 500; color: var(--ink-3); }
.source-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 12px; margin-top: 10px; list-style: none; }
.source { display: grid; grid-template-rows: auto auto 1fr auto; gap: 8px; height: 100%; padding: 16px; border-radius: 18px; background: var(--raised); border: 1px solid var(--line); }
.source--lumo { background: var(--warm); border-color: rgba(251, 182, 34, 0.4); }
.source-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.source-logo { display: flex; align-items: center; gap: 6px; width: 144px; height: 36px; }
.source-logo img { max-width: 144px; max-height: 30px; width: auto; height: auto; object-fit: contain; }
.source-logo img.paw { height: 26px; }
.source-logo .wordmark { font-family: var(--display); font-size: 20px; }
.source-logo .text-logo { font-size: 15px; font-weight: 700; letter-spacing: 0.04em; }
.source b.name { font-size: 14px; font-weight: 600; }
.source p { font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.source-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-2); }
.source-foot button { height: 28px; padding: 0 12px; border-radius: 999px; background: var(--wash); font-size: 12px; font-weight: 600; }
.sources-fine { margin-top: 22px; }

/* ============================================================ DIALOGS */
.roster-dialog { position: fixed; inset: 0; z-index: 80; display: grid; place-items: start center; padding-top: 10vh; background: rgba(49, 10, 30, 0.32); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.roster-dialog[hidden] { display: none; }
.roster-dialog__panel { width: min(560px, calc(100vw - 32px)); max-height: 72vh; display: flex; flex-direction: column; border-radius: 22px; background: var(--raised); box-shadow: 0 30px 80px rgba(49, 10, 30, 0.3); overflow: hidden; }
.roster-dialog__head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px 20px; border-bottom: 1px solid var(--line); }
.roster-dialog__head h2 { font-size: 15px; font-weight: 600; }
.roster-dialog__head input { flex: 1; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); outline: none; }
.roster-dialog__head input:focus { border-color: var(--magenta); box-shadow: 0 0 0 3px rgba(222, 85, 193, 0.15); }
.roster-dialog__list { overflow-y: auto; padding: 6px; list-style: none; }
.roster-dialog__list a { display: grid; grid-template-columns: 36px 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; font-size: 14px; }
.roster-dialog__list a:hover, .roster-dialog__list a:focus-visible, .roster-dialog__list a[aria-current="true"] { background: var(--wash); }
.roster-dialog__list .head { width: 34px; height: 34px; }
.roster-dialog__list .no { font-weight: 700; color: var(--ink-2); text-align: right; }
.roster-dialog__list small { color: var(--ink-2); }
.roster-dialog__list .group { padding: 10px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }

.ask-panel { position: fixed; right: 20px; bottom: 20px; z-index: 70; width: min(420px, calc(100vw - 40px)); max-height: min(640px, calc(100dvh - 40px)); display: flex; flex-direction: column; border-radius: 22px; background: var(--raised); box-shadow: 0 0 0 1px var(--line), 0 30px 70px rgba(49, 10, 30, 0.25); }
.ask-panel[hidden] { display: none; }
.ask-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 12px 18px; border-bottom: 1px solid var(--line); }
.ask-head h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.ask-body { overflow-y: auto; padding: 16px 18px 18px; display: grid; gap: 12px; font-size: 14px; line-height: 1.5; }
.ask-body .q { justify-self: end; max-width: 85%; padding: 10px 14px; border-radius: 16px; background: var(--wash); }
.ask-body .a p + p { margin-top: 8px; }
.ask-body .a ul { margin: 6px 0 0 18px; }
.ask-body .note { font-size: 12px; color: var(--ink-2); }
.ask-prompts { display: grid; gap: 6px; }
.ask-prompts button { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); text-align: left; font-size: 13.5px; transition: background 0.2s; }
.ask-prompts button:hover { background: var(--wash); }

/* ============================================================ RESPONSIVE */
@media (max-width: 1320px) {
  .app { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar { padding: 18px 10px; align-items: center; }
  .brand-word, .brand-tag, .team-card div, .search span, .search kbd, .side-nav span, .side-label, .side-foot { display: none; }
  .team-card { padding: 6px; background: none; }
  .search { width: 44px; justify-content: center; padding: 0; }
  .side-nav a, .side-nav button { width: 48px; justify-content: center; padding: 0; }
  .side-nav a[aria-current="page"]::before { left: -10px; }
  .side-nav .nav-showcase:not([aria-current])::after { left: 29px; top: 9px; }
  .player-view { grid-template-columns: 420px minmax(0, 1fr); column-gap: 22px; }
  .top-actions .date { display: none; }
}
/* Down to 980px the hero stays beside the dashboard, on a narrower stage. */
@media (max-width: 1200px) {
  .player-view { grid-template-columns: 360px minmax(0, 1fr); }
  /* The shorter stage needs the readings spread a little further apart. */
  .callout[data-callout="hydration"] { top: 44% !important; }
  .callout[data-callout="sodium"] { top: 62% !important; }
  .callout[data-callout="carbs"] { top: 80% !important; }
  .ov-score, .ov-next { grid-column: span 6; }
  .ov-carbs, .ov-spot { grid-column: span 12; }
  .ov-score { order: 1; } .ov-next { order: 2; } .ov-carbs { order: 3; } .ov-spot { order: 4; } .ov-day { order: 5; }
  .kitchen-grid, .fuel-layout, .corr-layout { grid-template-columns: minmax(0, 1fr); }
  .labs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topline { flex-wrap: wrap; }
  .team-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Below that, a compact hero sits above the dashboard with its readings beside the bust. */
@media (max-width: 980px) {
  .player-view { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "tabs" "stage" "panel"; }
  .player-view .tabs-row { margin-top: 14px; }
  .player-view .stage { position: relative; top: auto; display: grid; grid-template-columns: 256px minmax(0, 300px); align-items: center; column-gap: 24px; margin-top: 12px; }
  .stage-figure { width: 256px; height: 320px; aspect-ratio: auto; }
  .figure-wrap { left: 0; top: 0; width: 256px; }
  .callout, .leaders, .focal { display: none; }
  .stage-readings { display: grid; gap: 8px; }
  .stage-readings div { padding: 10px 12px; border-radius: 14px; background: var(--raised); border: 1px solid var(--line); }
  .stage-readings dt { font-size: 12px; color: var(--ink-2); }
  .stage-readings dd { font-size: 18px; font-weight: 600; }
  .stage-readings dd small { margin-left: 3px; font-size: 12px; font-weight: 500; color: var(--ink-2); }
  .stage-readings dd.co-state { margin-top: 2px; font-size: 12px; font-weight: 500; }
  .stage-foot { grid-column: 1 / -1; margin-top: 12px; }
  .stage-show { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  body { overflow: auto; }
  .app { display: block; height: auto; }
  .sidebar { position: sticky; top: 0; z-index: 40; flex-direction: row; align-items: center; justify-content: space-between; gap: 6px; padding: 10px 12px; background: var(--shell); overflow: visible; }
  .brand { padding: 0; }
  .brand-word { display: inline; font-size: 20px; }
  .team-card, .side-label, .side-nav--tools, .side-foot, .search { display: none; }
  /* The sport switcher drops to its own full-width row under the bar. */
  .sidebar:has(.dept:not([hidden])) { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 4px; row-gap: 8px; }
  .sidebar:has(.dept:not([hidden])) .side-nav { justify-self: end; }
  .sidebar:has(.dept:not([hidden])) .side-nav a, .sidebar:has(.dept:not([hidden])) .side-nav button { width: 40px; height: 40px; }
  .dept { order: 10; grid-column: 1 / -1; margin-top: 0; }
  .dept-label, .dept-count { display: none; }
  .dept-select select { height: 36px; }
  .dept-select svg { top: 12px; }
  .side-nav { display: flex; gap: 2px; }
  .side-nav a { width: 44px; height: 44px; }
  .side-nav a[aria-current="page"]::before { display: none; }
  .canvas { margin: 0; border-radius: 20px 20px 0 0; overflow: visible; }
  .view { padding: 18px 16px 28px; }
  .topline { flex-direction: column; gap: 12px; }
  .top-actions { flex-wrap: wrap; gap: 8px; }
  .top-actions .icon-btn, .top-actions .avatar { display: none; }
  .page-title h1 { font-size: 28px; }
  .page-title .player-name { font-size: 28px; }
  .tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .player-view .stage { width: 100%; }
  .stage-figure { width: 100%; height: 270px; margin: 0 auto; }
  .figure-wrap { left: calc(50% - 108px); width: 216px; top: 0; }
  .stage-aura { left: 10%; width: 80%; }
  .ov-carbs { order: -2; } .ov-next { order: -1; }
  .tabs button { padding: 0 11px; }
  .player-view { grid-template-areas: "top" "tabs" "next" "stage" "panel"; }
  .next-strip { grid-area: next; display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 14px; border-radius: 14px; background: var(--raised); border: 1px solid var(--line); font-size: 14px; }
  .next-strip span { flex: none; padding: 2px 8px; border-radius: 999px; background: var(--amber); color: var(--aubergine); font-size: 12px; font-weight: 600; }
  .next-strip b { flex: 1; min-width: 0; font-weight: 600; }
  .next-strip svg { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
  .player-view .stage { display: flex; }
  .stage-figure { width: 100%; }
  .ov-day .card-head { flex-wrap: wrap; row-gap: 6px; }
  .ov-day .day-scroll { overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: thin; }
  .ov-day .day-lanes { min-width: 620px; }
  .stage-readings { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: -30px; position: relative; }
  .stage-readings div { padding: 10px; }
  .stage-readings dd { font-size: 16px; }
  .stage-foot { margin-top: 12px; }
  .roster-switch { width: 100%; justify-content: space-between; }
  .stage-show { width: 100%; box-sizing: border-box; justify-self: stretch; }
  .roster-switch .icon-btn { width: 44px; height: 44px; }
  .overview-grid > * { grid-column: span 12; }
  .day-foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .day-foot .src { justify-self: start; grid-column: 1 / -1; text-align: left; max-width: none; }
  .corr-layout, .labs-grid, .flow { grid-template-columns: minmax(0, 1fr); }
  .side-nav .nav-showcase { width: 44px; height: 44px; }
  .sc-side { grid-template-columns: minmax(0, 1fr); }
  .side-nav .nav-showcase:not([aria-current])::after { left: 27px; top: 9px; }
  .sc-seg { min-width: 56px; grid-template-rows: 96px auto auto auto; }
  .sc-seg__bar { height: 96px; }
  .sc-brk { flex-basis: 66px; grid-template-rows: 96px auto auto auto; }
  .sc-seg__note { display: none; }
  .holes__row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .team-summary.sc-tiles { grid-template-columns: 1fr 1fr; }
  .meet-row { grid-template-columns: 92px minmax(0, 1fr); }
  .meet-row b { font-size: 12px; }
  .meet-ticks { left: 102px; }
  .fx-strip { grid-template-columns: repeat(8, 70px); }
  .grp-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .b2b { overflow-x: auto; }
  .b2b > div { min-width: 620px; }
  .ev-track { overflow-x: auto; }
  .ev-lane, .ev-days { min-width: 600px; }
  .labs-grid .body-card, .labs-grid--status .labs-status { grid-column: auto; }
  .team-summary { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meal { grid-template-columns: 60px minmax(0, 1fr); }
  .meal .pill { grid-column: 2; justify-self: start; }
  .meal-photo { width: 60px; height: 48px; }
  .station { grid-template-columns: 96px minmax(0, 1fr); }
  .station img { width: 96px; height: 76px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}

.roles .pill { max-width: 100%; white-space: normal; }

/* ------------------------------------------------------------ ROUND 1 FIXES */
/* A view that failed to render says so in place, never leaving the last athlete on screen. */
.render-error { display: grid; justify-items: start; gap: 8px; max-width: 560px; margin: 48px auto; padding: 22px 24px; border-radius: var(--radius-card); background: var(--raised); border: 1px solid var(--line-2); }
.render-error svg { width: 22px; height: 22px; fill: none; stroke: var(--ink-2); stroke-width: 1.8; }
.render-error b { font-size: 16px; }
.render-error p { font-size: 14px; line-height: 1.45; color: var(--ink-2); }

/* The overview's own showcase card is for phones, where the stage card is hidden. */
.ov-show { display: none; }
.ov-show .stage-show { margin-top: 0; }

/* Team tables: the athlete column stays put while the rest scrolls; the reserved rest of a
   real roster and each fixture's total sit under the athletes. */
.sc-table th:first-child, .sc-table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--raised); }
.sc-table .others-row td { color: var(--ink-2); background: var(--surface); }
.sc-table .others-row td:first-child { background: var(--surface); }
.head--others { display: grid; width: 32px; height: 32px; background: var(--wash-2); }
.sc-table .total-row td { font-weight: 600; border-top: 1px solid var(--line-2); }

/* Wide timelines and tables: an edge fade and an arrow while there is more to the right. */
.sc-scroll { display: flex; margin-top: 18px; overflow-x: auto; scrollbar-width: thin; }
.sc-scroll > * { flex: 1 0 auto; min-width: 100%; margin-top: 0; }
.sc-scroll::after, .sc-table-scroll::after { content: '›'; position: sticky; right: 0; z-index: 2; flex: none; display: grid; place-items: center end; width: 44px; margin-left: -44px; padding-right: 4px; font-size: 22px; line-height: 1; color: var(--ink-2); background: linear-gradient(90deg, rgba(255, 255, 252, 0), var(--raised) 70%); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.sc-table-scroll { display: flex; }
.sc-table-scroll > table { flex: 1 0 auto; }
.sc-scroll.has-more::after, .sc-table-scroll.has-more::after { opacity: 1; }

/* The travel clock keeps about 20 px an hour, so a three-day road trip scrolls instead of crowding;
   a short trip's block still names it. */
.sc-scroll > .b2b > div { min-width: calc(var(--span) * 20px); }
.b2b-blk--travel { padding: 0 2px; overflow: visible; }
.b2b-blk--travel b { font-size: 10.5px; overflow: visible; text-overflow: clip; }

/* Group cards: text wraps inside the card and a +N chip replaces portraits that do not fit. */
.grp-col > * { min-width: 0; }
.grp-col__focus { display: block; overflow: visible; overflow-wrap: anywhere; -webkit-line-clamp: unset; }
.grp-col dd { overflow-wrap: anywhere; }
.grp-col__heads { flex-wrap: wrap; row-gap: 4px; }
.grp-col__heads .grp-col__more { display: inline-grid; place-items: center; min-width: 26px; height: 26px; margin-left: 10px; padding: 0 6px; border-radius: 999px; background: var(--wash-2); font-size: 11.5px; font-weight: 600; color: var(--ink-2); }

/* Football's week: today's pre-kickoff carbs as a marker on the whole-day bar. */
.wk-pre { position: absolute; left: 3px; right: 3px; bottom: var(--p); height: 0; border-top: 2px dashed var(--aubergine); text-decoration: none; }
.sw.wk-sw-pre { width: 12px; height: 0; border-radius: 0; border-top: 2px dashed var(--aubergine); }

/* Weight plans: descent, scale and clearance as separate sections; a held refuel. */
.wt-sec + .wt-sec { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.wt-sec h4 { margin-bottom: 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-3); }
.wt-hold { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--warning-surface); color: var(--warning-ink); font-size: 13px; line-height: 1.4; }
.wt-hold svg { flex: none; width: 16px; height: 16px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.sc-brk-list.is-held { opacity: 0.55; }
.locked-panel--inline { min-height: 220px; margin-top: 14px; }

/* Kitchen: the portion table says whether it is a sample, and marks the athlete you came from. */
.portion-count { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 6px; font-size: 12.5px; color: var(--ink-2); }
.portion-table tr.is-selected td { background: var(--warm); }

/* Sources: the sport's own inputs, and the one a showcase link points at. */
.source--input { border-color: rgba(251, 182, 34, 0.55); }
.source.is-focus { box-shadow: 0 0 0 3px rgba(222, 85, 193, 0.35); }
.sc-input { margin-top: 12px; }
a.src-link { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; }
a.src-link:hover, a.src-link:focus-visible { color: var(--ink); text-decoration-color: currentColor; }

/* Segment charts scroll as one strip inside their cue. */
.sc-scroll > .sc-cols { flex: 1 0 0; min-width: min-content; overflow: visible; }
/* Event tiles keep their label and load readable, whatever their share of the day. */
.ev-blk { min-width: 86px; }

/* A heat plan's modeled result, from the athlete's own peak; a review leads the card. */
.sc-status { margin-top: 8px; padding: 9px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.4; }
.sc-status--ok { background: var(--success-surface); color: var(--success-ink); }
.sc-status--review { background: var(--warning-surface); color: var(--warning-ink); font-weight: 600; }
.sc-status--over { background: var(--danger-surface); color: var(--danger-ink); font-weight: 600; }

/* A ledger entry held for the athletic trainer. */
.meal.is-held { border-color: rgba(186, 115, 42, 0.45); box-shadow: none; }
.meal-hold { grid-column: 2 / -1; margin-top: -8px; font-size: 12.5px; line-height: 1.35; color: var(--warning-ink); }
/* A long night on an event track is drawn shortened; the break mark says so. */
.ev-cut { position: absolute; top: 0; bottom: 0; width: 10px; margin-left: -5px; background: repeating-linear-gradient(135deg, transparent 0 3px, var(--line-2) 3px 5px); border-radius: 3px; }
.pill svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.8; }

@media (max-width: 720px) {
  /* Team tables: the athlete column keeps a compact width so the values beside it show at
     every scroll position. */
  .sc-table th:first-child, .sc-table td:first-child { width: 1px; }
  .sc-table td:first-child .who { width: 128px; }
  .sc-table .who > span:last-child { min-width: 0; overflow: hidden; overflow-wrap: anywhere; }
  .sc-table .who small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sc-table .head--others { flex: none; }
  /* Innings and sets keep a readable width and scroll with a cue. */
  .sc-cols--innings .sc-seg { min-width: 44px; }
  .sc-cols--innings .sc-brk { flex-basis: 62px; }
  .sc-cols .sc-seg__load { white-space: nowrap; }
  /* The stage card moves into the overview; every other tab opens on a compact athlete
     summary (name, tabs, the next step and the roster switch), so the panel is in view. */
  .ov-show { display: block; }
  .player-view .stage .stage-show { display: none; }
  .player-view:not([data-active-tab="overview"]) .stage-figure,
  .player-view:not([data-active-tab="overview"]) .stage-readings { display: none; }
  .player-view:not([data-active-tab="overview"]) .stage-foot { margin-top: 10px; }
  .sc-scroll > .b2b, .sc-scroll > .ev-track, .sc-scroll > .fx-strip { overflow: visible; }
  .sc-scroll > .ev-track { min-width: 600px; }
}
