/* ============================================
   PHILLIES WIRE — COMMAND CENTER
   Clean SaaS layout, reuses tokens.css
   ============================================ */

:root {
  /* Semantic layer built on tokens.css primitives */
  --dash-bg:            #0b1020;
  --dash-surface:       #121a34;
  --dash-surface-raise: #1a2444;
  --dash-border:        #24305a;
  --dash-ink:           #eaeef7;
  --dash-ink-dim:       #8893b8;
  --dash-ink-quiet:     #5b6788;
  --dash-brand:         var(--primitive-red-500);
  --dash-brand-deep:    var(--primitive-red-700);
  --dash-navy:          var(--primitive-navy-500);
  --dash-navy-soft:     var(--primitive-navy-300);
  --dash-gold:          var(--primitive-gold-500);
  --dash-good:          #2fbf71;
  --dash-warn:          #e5a93a;
  --dash-bad:           #ef5f5f;

  --dash-radius:        14px;
  --dash-radius-lg:     18px;
  --dash-shadow:        0 12px 40px -18px rgba(0, 0, 0, 0.6);
  --dash-gap:           16px;
  --sidebar-w:          72px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* ── Motion tokens ─────────────────────────── */
:root {
  --t-press:   120ms;
  --t-hover:   180ms;
  --t-entry:   320ms;
  --t-pulse:   800ms;
  --t-streak:  160ms;
  --ease-out-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-snappy:     cubic-bezier(0.25, 0, 0.3, 1);
  --ease-exit:       cubic-bezier(0.4, 0, 1, 1);
}

/* ── Entry choreography ────────────────────── */
@keyframes card-enter {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes streak-dot-in {
  from { opacity: 0; transform: scaleX(0); }
  to   { opacity: 1; transform: scaleX(1); }
}
@keyframes row-slide-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes streak-alert-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(239, 95, 95, 0.55); }
  70%  { box-shadow: 0 0 0 14px rgba(239, 95, 95, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 95, 95, 0); }
}
@keyframes mode-pulse-live {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 24, 40, 0.55); }
  50%      { box-shadow: 0 0 0 6px rgba(232, 24, 40, 0); }
}

body {
  background: radial-gradient(ellipse at top, #161f3d 0%, #0b1020 55%, #070a15 100%);
  color: var(--dash-ink);
  font-family: var(--font-body, "Work Sans", "Inter", -apple-system, BlinkMacSystemFont, sans-serif);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Row wrapping sidebar + stage, so the Wire banner can stack above them. */
.dash-app {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* ── Sidebar ───────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: rgba(8, 12, 28, 0.85);
  border-right: 1px solid var(--dash-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 0;
  gap: 8px;
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
}

.sidebar-brand {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  color: var(--dash-brand);
  background: rgba(232, 24, 40, 0.12);
  border: 1px solid rgba(232, 24, 40, 0.35);
  border-radius: 12px;
  margin-bottom: 14px;
}

.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.sidebar-footer { margin-top: auto; }

.nav-item {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  color: var(--dash-ink-dim);
  border-radius: 10px;
  transition:
    background var(--t-hover) var(--ease-out-spring),
    color      var(--t-hover) var(--ease-out-spring),
    transform  var(--t-press) var(--ease-snappy);
  text-decoration: none;
}
.nav-item:hover  { background: rgba(255, 255, 255, 0.05); color: var(--dash-ink); }
.nav-item:active { transform: scale(0.92); }
.nav-item.is-active {
  color: var(--dash-brand);
  background: rgba(232, 24, 40, 0.12);
  box-shadow: inset 0 0 0 1px rgba(232, 24, 40, 0.35);
}

/* ── Stage ─────────────────────────────────── */
.stage {
  flex: 1;
  padding: 28px clamp(20px, 3vw, 44px) 48px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 1600px;
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar-title { display: flex; flex-direction: column; gap: 2px; }
.eyebrow {
  font-family: var(--font-mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dash-ink-dim);
}
.topbar-title h1 {
  margin: 0;
  font-family: var(--font-display, "Bangers", "Oswald", sans-serif);
  font-weight: 600;
  font-size: clamp(22px, 2.2vw, 30px);
  letter-spacing: 0.04em;
  color: var(--dash-ink);
}
.crumbs {
  font-size: 12px;
  color: var(--dash-ink-quiet);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-meta { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  color: var(--dash-ink-dim);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  cursor: pointer;
  transition:
    color      var(--t-hover) var(--ease-out-spring),
    background var(--t-hover) var(--ease-out-spring),
    transform  var(--t-press) var(--ease-snappy),
    border-color var(--t-hover) var(--ease-out-spring);
}
.icon-btn:hover  { color: var(--dash-ink); background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.15); }
.icon-btn:active { transform: scale(0.95); }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 12px 4px 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--dash-border);
  border-radius: 40px;
}
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dash-brand), var(--dash-brand-deep));
  color: #fff;
  font-size: 12px; font-weight: 700;
  display: grid; place-items: center;
  letter-spacing: 0.08em;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.1; }
.user-name { font-weight: 600; font-size: 13px; color: var(--dash-ink); }
.user-role { font-size: 11px; color: var(--dash-ink-quiet); }

/* ── Grid ─────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: var(--dash-gap);
}

.card {
  background: linear-gradient(160deg, var(--dash-surface) 0%, var(--dash-surface-raise) 100%);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-lg);
  padding: 18px 20px;
  box-shadow: var(--dash-shadow);
  display: flex; flex-direction: column; gap: 12px;
  min-width: 0;
  animation: card-enter var(--t-entry) var(--ease-out-spring) both;
  transition:
    transform   var(--t-hover) var(--ease-out-spring),
    border-color var(--t-hover) var(--ease-out-spring),
    box-shadow  var(--t-hover) var(--ease-out-spring);
}
.card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 48px -18px rgba(0, 0, 0, 0.75);
}

/* Staggered arrival — top-left to bottom-right */
.card-hero     { animation-delay:  20ms; }
.card-next     { animation-delay:  80ms; }
.card-activity { animation-delay: 140ms; }
.card-record   { animation-delay: 200ms; }
.card-health   { animation-delay: 260ms; }
.card-key      { animation-delay: 320ms; }
.card-hero     { grid-column: span 8; }
.card-next     { grid-column: span 4; }
.card-activity { grid-column: span 8; grid-row: span 2; }
.card-record   { grid-column: span 4; }
.card-health   { grid-column: span 4; }
.card-lineup   { grid-column: span 8; }
.card-focus    { grid-column: span 4; }
.card-key      { grid-column: span 12; }

@media (max-width: 960px) {
  .card-hero, .card-next, .card-activity, .card-record, .card-health,
  .card-lineup, .card-focus, .card-key {
    grid-column: span 12;
    grid-row: auto;
  }
}

.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.card-eyebrow {
  font-family: var(--font-mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dash-ink-dim);
}
.card-status {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--dash-border);
  color: var(--dash-ink-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-mono, "IBM Plex Mono", ui-monospace, monospace);
  transition:
    color        var(--t-hover) var(--ease-out-spring),
    background   var(--t-hover) var(--ease-out-spring),
    border-color var(--t-hover) var(--ease-out-spring),
    transform    var(--t-press) var(--ease-snappy);
}
.card-status:active { transform: scale(0.93); }
.card-status[data-mode="live"]    { color: #fff; background: var(--dash-brand); border-color: var(--dash-brand); animation: mode-pulse-live 1800ms var(--ease-out-spring) infinite; }
.card-status[data-mode="final"]   { color: var(--dash-gold); border-color: var(--dash-gold); background: rgba(196, 151, 58, 0.1); }
.card-status[data-mode="pregame"] { color: var(--dash-navy-soft); border-color: var(--dash-navy-soft); background: rgba(58, 106, 191, 0.12); }
.card-status[data-mode="off_day"] { color: var(--dash-ink-quiet); }

/* Hero */
.hero-body { display: flex; flex-direction: column; gap: 16px; padding-top: 4px; }

/* Outside-in score row: NAME·LOGO·SCORE | STATE | SCORE·LOGO·NAME
   away (PHI) reads left→right, home (opp) reads right→left. */
.hero-score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}
.team { display: flex; align-items: center; gap: 14px; min-width: 0; }
.team-phi { justify-content: flex-end; text-align: right; }
.team-opp { justify-content: flex-start; text-align: left; }

/* PHI-home: swap grid columns so the home team sits on the right per
   scoreboard convention, and reverse each cluster so the team NAME
   stays on the outside (furthest from centered state column). */
.hero-score[data-phi-side="home"] .team-phi {
  grid-column: 3;
  flex-direction: row-reverse;
  justify-content: flex-end;
  text-align: right;
}
.hero-score[data-phi-side="home"] .team-opp {
  grid-column: 1;
  flex-direction: row-reverse;
  justify-content: flex-start;
  text-align: left;
}
.team-logo {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-family: var(--font-display, "Bangers", "Oswald", sans-serif);
  font-size: 26px; font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--dash-brand), var(--dash-brand-deep));
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), inset 0 -3px 0 rgba(0, 0, 0, 0.2);
}
.team-logo-opp { background: linear-gradient(135deg, var(--dash-navy-soft), var(--dash-navy)); }
.team-detail { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.team-abbr {
  font-family: var(--font-display, "Bangers", "Oswald", sans-serif);
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: 0.02em;
  color: var(--dash-ink);
  font-weight: 600;
  line-height: 1;
}
.team-name {
  font-size: 11px;
  color: var(--dash-ink-quiet);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 4px;
  font-family: var(--font-mono, "IBM Plex Mono", ui-monospace, monospace);
  white-space: nowrap;
}
.team-runs {
  font-family: var(--font-display, "Bangers", "Oswald", sans-serif);
  font-size: clamp(40px, 5.4vw, 58px);
  font-weight: 700;
  color: var(--dash-ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.team-runs[data-empty="true"] { color: var(--dash-ink-quiet); }

/* Centered state column: small label on top, larger value below.
   Modes: pregame ("First Pitch" / "2:20 PM"), live ("Inning" / "▲ 7"),
   final ("Final" / "9 inn · 2:48"), off_day ("Off Day" / "—"). */
.hero-state {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px;
  min-width: 96px;
  text-align: center;
}
.hero-state-label {
  font-family: var(--font-mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dash-ink-quiet);
}
.hero-state-value {
  font-family: var(--font-display, "Bangers", "Oswald", sans-serif);
  font-size: clamp(20px, 2.2vw, 26px);
  color: var(--dash-ink);
  line-height: 1;
  letter-spacing: 0.02em;
}
.hero-state[data-mode="live"] .hero-state-value {
  color: var(--dash-brand);
}
.hero-state[data-mode="live"] .hero-state-value::before {
  content: "▲";
  font-size: 0.7em;
  margin-right: 6px;
  color: var(--dash-brand);
}
.hero-state[data-mode="pregame"] .hero-state-value {
  color: var(--dash-navy-soft);
  font-family: var(--font-mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: clamp(16px, 1.8vw, 20px);
  font-weight: 500;
}
.hero-state[data-mode="final"] .hero-state-value {
  color: var(--dash-gold);
  font-family: var(--font-mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: clamp(13px, 1.4vw, 15px);
  letter-spacing: 0.06em;
}
.hero-state[data-mode="off_day"] .hero-state-value {
  color: var(--dash-ink-quiet);
}
.hero-headline {
  margin: 0;
  font-family: var(--font-serif, "Libre Caslon Text", Georgia, serif);
  font-size: clamp(18px, 2vw, 22px);
  color: var(--dash-ink);
  line-height: 1.35;
}
.hero-dek {
  margin: 0;
  color: var(--dash-ink-dim);
  font-size: 13px;
}

.card-foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: var(--dash-ink-quiet);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.foot-value { color: var(--dash-ink-dim); }

/* Next game */
.next-body { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; font-size: 13px; }
.next-empty { color: var(--dash-ink-quiet); font-style: italic; }
.next-matchup { color: var(--dash-ink); font-weight: 600; font-size: 15px; }
.next-meta { color: var(--dash-ink-dim); }

/* Activity feed */
.activity-list { list-style: none; margin: 0; padding: 4px 0 0; display: flex; flex-direction: column; gap: 8px; }
.activity-empty { color: var(--dash-ink-quiet); font-style: italic; }
.activity-row {
  display: grid;
  grid-template-columns: 94px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
  transition:
    background   var(--t-hover) var(--ease-out-spring),
    border-color var(--t-hover) var(--ease-out-spring),
    transform    var(--t-hover) var(--ease-out-spring);
  animation: row-slide-in var(--t-entry) var(--ease-out-spring) both;
}
.activity-row::before {
  content: "";
  position: absolute; inset: 0 auto 0 0;
  width: 0;
  background: var(--dash-brand);
  transition: width var(--t-hover) var(--ease-out-spring);
}
.activity-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}
.activity-row:hover::before { width: 3px; }
/* Stagger activity rows — first 10 only, 40ms apart */
.activity-row:nth-child(1)  { animation-delay:  40ms; }
.activity-row:nth-child(2)  { animation-delay:  80ms; }
.activity-row:nth-child(3)  { animation-delay: 120ms; }
.activity-row:nth-child(4)  { animation-delay: 160ms; }
.activity-row:nth-child(5)  { animation-delay: 200ms; }
.activity-row:nth-child(6)  { animation-delay: 240ms; }
.activity-row:nth-child(7)  { animation-delay: 280ms; }
.activity-row:nth-child(8)  { animation-delay: 320ms; }
.activity-row:nth-child(9)  { animation-delay: 360ms; }
.activity-row:nth-child(10) { animation-delay: 400ms; }
.activity-date {
  font-family: var(--font-mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--dash-ink-dim);
  text-transform: uppercase;
}
.activity-headline { color: var(--dash-ink); font-weight: 600; font-size: 14px; line-height: 1.3; }
.activity-dek { color: var(--dash-ink-dim); font-size: 12px; margin-top: 2px; line-height: 1.35; }
.activity-mode {
  font-family: var(--font-mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--dash-border);
  color: var(--dash-ink-dim);
}
.activity-mode[data-mode="final"]   { color: var(--dash-gold); border-color: var(--dash-gold); background: rgba(196, 151, 58, 0.1); }
.activity-mode[data-mode="live"]    { color: #fff; background: var(--dash-brand); border-color: var(--dash-brand); }
.activity-mode[data-mode="pregame"] { color: var(--dash-navy-soft); border-color: var(--dash-navy-soft); background: rgba(58, 106, 191, 0.12); }
.activity-mode[data-mode="off_day"] { color: var(--dash-ink-quiet); }

/* Record watch */
.record-body {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.record-stat {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.record-stat-full { grid-column: 1 / -1; }
.stat-label {
  font-size: 11px;
  color: var(--dash-ink-quiet);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-mono, "IBM Plex Mono", ui-monospace, monospace);
}
.stat-value {
  font-family: var(--font-display, "Bangers", "Oswald", sans-serif);
  font-size: 32px;
  color: var(--dash-ink);
  line-height: 1;
}
.streak-strip {
  display: flex; gap: 4px;
  margin-top: 8px;
}
.streak-dot {
  flex: 1;
  height: 10px;
  min-width: 14px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  transform-origin: left center;
  animation: streak-dot-in var(--t-entry) var(--ease-out-spring) both;
  transition: transform var(--t-hover) var(--ease-out-spring), height var(--t-hover) var(--ease-out-spring);
}
.streak-dot:nth-child(1)  { animation-delay:  60ms; }
.streak-dot:nth-child(2)  { animation-delay:  90ms; }
.streak-dot:nth-child(3)  { animation-delay: 120ms; }
.streak-dot:nth-child(4)  { animation-delay: 150ms; }
.streak-dot:nth-child(5)  { animation-delay: 180ms; }
.streak-dot:nth-child(6)  { animation-delay: 210ms; }
.streak-dot:nth-child(7)  { animation-delay: 240ms; }
.streak-dot:nth-child(8)  { animation-delay: 270ms; }
.streak-dot:nth-child(9)  { animation-delay: 300ms; }
.streak-dot:nth-child(10) { animation-delay: 330ms; }
.streak-dot:hover { height: 14px; }
.streak-dot[data-result="W"] { background: var(--dash-good); }
.streak-dot[data-result="L"] { background: var(--dash-bad); }
.streak-dot[title] { cursor: help; }

/* L3+ alert pulse — one-time on mount */
.card-record[data-streak-alert="true"] .stat-value {
  animation: streak-alert-pulse var(--t-pulse) var(--ease-exit) 1;
  border-radius: 8px;
}

/* Health — IL list */
.il-list { list-style: none; margin: 0; padding: 4px 0 0; display: flex; flex-direction: column; gap: 8px; }
.il-empty { color: var(--dash-ink-quiet); font-style: italic; font-size: 13px; }
.il-row {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  display: flex; flex-direction: column; gap: 4px;
  animation: row-slide-in var(--t-entry) var(--ease-out-spring) both;
}
.il-row:nth-child(1) { animation-delay:  80ms; }
.il-row:nth-child(2) { animation-delay: 160ms; }
.il-row:nth-child(3) { animation-delay: 240ms; }
.il-row:nth-child(4) { animation-delay: 320ms; }
.il-row:nth-child(5) { animation-delay: 400ms; }
.il-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.il-name { color: var(--dash-ink); font-weight: 600; font-size: 14px; }
.il-pos  { color: var(--dash-ink-quiet); font-size: 11px; letter-spacing: 0.08em; font-family: var(--font-mono, ui-monospace, monospace); }
.il-badge {
  padding: 2px 8px; border-radius: 999px;
  font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  font-family: var(--font-mono, ui-monospace, monospace);
  background: rgba(239, 95, 95, 0.15); color: var(--dash-bad);
  border: 1px solid rgba(239, 95, 95, 0.35);
}
.il-meta { color: var(--dash-ink-dim); font-size: 12px; line-height: 1.4; }
.il-return { color: var(--dash-ink-quiet); font-size: 11px; margin-top: 2px; font-style: italic; }
.inline-link { color: var(--dash-brand); text-decoration: none; border-bottom: 1px dashed rgba(232, 24, 40, 0.4); }
.inline-link:hover { color: #fff; border-bottom-color: #fff; }

/* Lineup */
.lineup-body { padding-top: 6px; display: flex; flex-direction: column; gap: 12px; }
.lineup-starter {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(232, 24, 40, 0.08);
  border: 1px solid rgba(232, 24, 40, 0.25);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.lineup-starter-label { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dash-ink-quiet); font-family: var(--font-mono, ui-monospace, monospace); }
.lineup-starter-name  { color: var(--dash-ink); font-family: var(--font-display, "Bangers", sans-serif); font-size: 20px; letter-spacing: 0.04em; }
.lineup-starter-hand  { font-size: 11px; color: var(--dash-ink-dim); letter-spacing: 0.08em; font-family: var(--font-mono, ui-monospace, monospace); }
.lineup-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
@media (max-width: 640px) { .lineup-list { grid-template-columns: repeat(2, 1fr); } }
.lineup-row {
  display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  animation: row-slide-in var(--t-entry) var(--ease-out-spring) both;
}
.lineup-row:nth-child(1) { animation-delay:  50ms; }
.lineup-row:nth-child(2) { animation-delay: 100ms; }
.lineup-row:nth-child(3) { animation-delay: 150ms; }
.lineup-row:nth-child(4) { animation-delay: 200ms; }
.lineup-row:nth-child(5) { animation-delay: 250ms; }
.lineup-row:nth-child(6) { animation-delay: 300ms; }
.lineup-row:nth-child(7) { animation-delay: 350ms; }
.lineup-row:nth-child(8) { animation-delay: 400ms; }
.lineup-row:nth-child(9) { animation-delay: 450ms; }
.lineup-slot { font-family: var(--font-mono, ui-monospace, monospace); font-size: 11px; color: var(--dash-ink-quiet); text-align: center; }
.lineup-name { color: var(--dash-ink); font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lineup-pos  { color: var(--dash-ink-quiet); font-size: 10px; font-family: var(--font-mono, ui-monospace, monospace); letter-spacing: 0.08em; }

/* Player Focus */
.focus-body { padding-top: 6px; display: flex; flex-direction: column; gap: 10px; }
.focus-name  { color: var(--dash-ink); font-family: var(--font-display, "Bangers", sans-serif); font-size: 22px; letter-spacing: 0.04em; line-height: 1.1; }
.focus-role  { color: var(--dash-ink-dim); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; font-family: var(--font-mono, ui-monospace, monospace); }
.focus-matchup { color: var(--dash-ink-quiet); font-size: 12px; font-style: italic; }
.focus-line {
  display: grid; grid-template-columns: 1fr auto; gap: 8px;
  padding: 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
}
.focus-label { color: var(--dash-ink-quiet); text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font-mono, ui-monospace, monospace); font-size: 10.5px; }
.focus-value { color: var(--dash-ink); }

/* Key events */
.key-list { list-style: none; margin: 0; padding: 4px 0 0; display: flex; flex-direction: column; gap: 6px; }
.key-empty { color: var(--dash-ink-quiet); font-style: italic; }
.key-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 14px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
}
.key-row:nth-child(odd) { background: rgba(255, 255, 255, 0.02); }
.key-date { color: var(--dash-ink-quiet); font-family: var(--font-mono, "IBM Plex Mono", ui-monospace, monospace); font-size: 11px; letter-spacing: 0.08em; }
.key-text { color: var(--dash-ink-dim); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.key-badge {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  font-family: var(--font-mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: 11px; font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  color: var(--dash-ink);
  letter-spacing: 0.08em;
}
.key-badge.key-win  { background: rgba(47, 191, 113, 0.18); color: var(--dash-good); }
.key-badge.key-loss { background: rgba(239, 95, 95, 0.18);  color: var(--dash-bad); }
.key-dek { color: var(--dash-ink-quiet); font-size: 12px; }

/* Stage footer */
.stage-foot {
  margin-top: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--dash-border);
  display: flex; align-items: center; gap: 10px;
  color: var(--dash-ink-quiet);
  font-size: 12px;
  font-family: var(--font-mono, "IBM Plex Mono", ui-monospace, monospace);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.foot-sep { opacity: 0.4; }
.foot-link { color: var(--dash-brand); text-decoration: none; transition: color var(--t-hover) var(--ease-out-spring); }
.foot-link:hover { color: #fff; }

/* ── Key-event badge press feedback ─────────── */
.key-badge {
  transition:
    background var(--t-hover) var(--ease-out-spring),
    color      var(--t-hover) var(--ease-out-spring),
    transform  var(--t-press) var(--ease-snappy);
}
.key-badge:active { transform: scale(0.9); }

/* ── User chip hover feedback ──────────────── */
.user-chip {
  transition:
    background   var(--t-hover) var(--ease-out-spring),
    border-color var(--t-hover) var(--ease-out-spring);
}
.user-chip:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

/* ── Reduced-motion guard ──────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration:  0.01ms !important;
    animation-delay:     0ms    !important;
    transition-duration: 0.01ms !important;
  }
  .card-status[data-mode="live"] { animation: none; }
  .card-record[data-streak-alert="true"] .stat-value { animation: none; }
}

/* ── Save-data mode ─────────────────────────
   User opted out of animations (Data Saver on, slow conn, or prefs). */
:root[data-save-data="true"] *,
:root[data-save-data="true"] *::before,
:root[data-save-data="true"] *::after {
  animation: none !important;
  transition-duration: 0.01ms !important;
}

/* ── Time-aware hero emphasis ───────────────
   Pregame + live modes push the hero forward visually. */
.card-hero[data-emphasis="true"] {
  border-color: rgba(232, 24, 40, 0.35);
  box-shadow:
    0 12px 40px -18px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(232, 24, 40, 0.18) inset;
}
.stage[data-mode="off_day"] .card-hero { opacity: 0.85; }
.stage[data-mode="final"]   .card-hero { border-color: rgba(196, 151, 58, 0.25); }

/* ── Mobile bottom-tab nav ──────────────────
   Sidebar collapses to a bottom tab bar under 768px. */
@media (max-width: 768px) {
  body {
    flex-direction: column;
    padding-bottom: 70px; /* leave room for the tab bar */
  }
  .sidebar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    width: 100%;
    min-height: 0;
    height: 58px;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    padding: 6px 10px;
    border-right: none;
    border-top: 1px solid var(--dash-border);
    backdrop-filter: blur(12px);
    z-index: 80;
  }
  .sidebar-brand { display: none; }
  .sidebar-nav { flex-direction: row; gap: 4px; flex: 1; justify-content: space-around; }
  .sidebar-footer { margin: 0; }
  .nav-item {
    width: 44px; height: 44px; /* meet 44px touch target */
  }
  .stage {
    padding: 18px 16px 24px;
  }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .topbar-meta { align-self: stretch; justify-content: space-between; }
}

/* ── First-visit hint (only shows once until user acts) ─
   Tiny label under the Command Center eyebrow for first-time visitors. */
:root[data-visit-kind="first"] .topbar-title::after {
  content: "· Welcome — explore the cards";
  font-size: 11px;
  color: var(--dash-ink-quiet);
  font-style: italic;
  margin-left: 6px;
}
