/* ============================================================================
   Broad Street Jawn — desktop shell.

   Windows 11 visual language: Mica-style translucency, 8px window radius,
   soft elevation, a floating taskbar. Team colour is the only strong hue; the
   chrome stays neutral so four teams can be open at once without clashing.
   ========================================================================== */

:root {
  --taskbar-h: 52px;

  /* Chrome — deliberately desaturated so team colours carry the identity. */
  --mica: rgba(32, 32, 38, 0.72);
  --mica-solid: #202026;
  --surface: rgba(44, 44, 52, 0.86);
  --stroke: rgba(255, 255, 255, 0.09);
  --stroke-strong: rgba(255, 255, 255, 0.16);

  --text: #f3f3f5;
  --text-dim: #a8a8b3;
  --text-faint: #7b7b86;

  --accent: #4cc2ff;          /* W11 system accent */
  --shadow-win: 0 18px 44px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.35);

  /* Philadelphia */
  --phillies: #e81828;
  --eagles: #1c7d74;          /* midnight green, lifted so it reads on dark */
  --sixers: #3b7ae0;
  --flyers: #f5801f;

  --radius-win: 9px;
  --radius-ctl: 7px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;           /* the desktop never scrolls; windows do */
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system,
               "Helvetica Neue", sans-serif;
  color: var(--text);
  background: #0b0b0e;
  -webkit-font-smoothing: antialiased;
}

/* ── Desktop ─────────────────────────────────────────────────────────────── */

.desktop {
  position: fixed;
  inset: 0 0 var(--taskbar-h) 0;
  /* Liberty-bell blue through Phillies red, the way W11 blooms from a point. */
  background:
    radial-gradient(1200px 780px at 22% 18%, rgba(60, 110, 200, 0.42), transparent 62%),
    radial-gradient(1000px 680px at 82% 74%, rgba(232, 24, 40, 0.28), transparent 60%),
    radial-gradient(900px 600px at 60% 8%, rgba(245, 128, 31, 0.14), transparent 55%),
    linear-gradient(160deg, #10131c 0%, #0b0b0e 60%, #120e12 100%);
}

/* The splash, as a band down the right edge.
   A pseudo-element rather than an extra background layer on .desktop, so it can
   carry its own opacity without washing out the gradients underneath. It sits
   behind the icons and never takes a click. */
.desktop::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: min(46vw, 620px);
  background: url("../assets/brand/splash.webp") right center / contain no-repeat;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
.icons, .windows { z-index: 1; }

/* Narrow screens have no room for a 46vw band beside the icons. */
@media (max-width: 720px) {
  .desktop::after { opacity: 0.2; }
}

.icons {
  position: absolute;
  inset: 12px auto auto 12px;
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(auto-fill, 92px);
  gap: 4px;
  max-height: calc(100% - 24px);
}

.icon {
  width: 88px;
  padding: 8px 4px 6px;
  border: 1px solid transparent;
  border-radius: var(--radius-ctl);
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 11.5px;
  text-align: center;
  cursor: pointer;
  display: grid;
  justify-items: center;
  gap: 5px;
}
.icon:hover { background: rgba(255, 255, 255, 0.08); }
.icon:focus-visible,
.icon[aria-selected="true"] {
  background: rgba(76, 194, 255, 0.22);
  border-color: rgba(76, 194, 255, 0.5);
  outline: none;
}
.icon-glyph {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 18px; font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14);
}
.icon-label {
  line-height: 1.25;
  max-height: 2.5em;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0,0,0,0.85);
  word-break: break-word;
}

/* ── Windows ─────────────────────────────────────────────────────────────── */

.windows { position: fixed; inset: 0; pointer-events: none; }

.win {
  position: absolute;
  min-width: 320px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  background: var(--mica);
  backdrop-filter: blur(34px) saturate(150%);
  -webkit-backdrop-filter: blur(34px) saturate(150%);
  border: 1px solid var(--stroke-strong);
  border-radius: var(--radius-win);
  box-shadow: var(--shadow-win);
  overflow: hidden;
}
/* Backdrop-filter is expensive during a drag; drop it while moving. */
.win.is-moving,
.win.is-resizing {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: var(--mica-solid);
  will-change: transform;
}
.win.is-minimized { display: none; }
.win.is-max {
  border-radius: 0;
  border-width: 0;
}

.win-title {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding-left: 12px;
  flex: 0 0 auto;
  cursor: grab;
  user-select: none;
  border-bottom: 1px solid var(--stroke);
  /* Team colour lives here, as a hairline — enough to tell four windows apart. */
  box-shadow: inset 0 2px 0 0 var(--win-accent, transparent);
}
.win.is-moving .win-title { cursor: grabbing; }
.win-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--win-accent, #666); flex: 0 0 auto; }
.win-name { font-size: 12.5px; font-weight: 600; letter-spacing: 0.1px; flex: 1; min-width: 0;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.win-btns { display: flex; height: 100%; }
.win-btn {
  width: 44px; height: 100%;
  border: 0; background: none; color: var(--text-dim);
  cursor: pointer; display: grid; place-items: center;
}
.win-btn:hover { background: rgba(255,255,255,0.09); color: var(--text); }
.win-btn.close:hover { background: #c42b1c; color: #fff; }

.win-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 14px 16px 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.22) transparent;
}
.win-body::-webkit-scrollbar { width: 10px; }
.win-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2); border-radius: 6px;
  border: 3px solid transparent; background-clip: content-box;
}

/* Resize handles — 8 of them, invisible but grabbable. */
.rz { position: absolute; }
.rz-n  { top: -3px; left: 10px; right: 10px; height: 7px; cursor: ns-resize; }
.rz-s  { bottom: -3px; left: 10px; right: 10px; height: 7px; cursor: ns-resize; }
.rz-w  { left: -3px; top: 10px; bottom: 10px; width: 7px; cursor: ew-resize; }
.rz-e  { right: -3px; top: 10px; bottom: 10px; width: 7px; cursor: ew-resize; }
.rz-nw { top: -3px; left: -3px; width: 14px; height: 14px; cursor: nwse-resize; }
.rz-ne { top: -3px; right: -3px; width: 14px; height: 14px; cursor: nesw-resize; }
.rz-sw { bottom: -3px; left: -3px; width: 14px; height: 14px; cursor: nesw-resize; }
.rz-se { bottom: -3px; right: -3px; width: 14px; height: 14px; cursor: nwse-resize; }
.win.is-max .rz { display: none; }

/* ── Taskbar ─────────────────────────────────────────────────────────────── */

.taskbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--taskbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 6px;
  background: rgba(24, 24, 29, 0.82);
  backdrop-filter: blur(40px) saturate(160%);
  -webkit-backdrop-filter: blur(40px) saturate(160%);
  border-top: 1px solid rgba(255,255,255,0.07);
  z-index: 9000;
}
.taskbar-left { display: flex; align-items: center; gap: 4px; min-width: 0; }
.taskbar-right { display: flex; align-items: center; gap: 8px; }

.tb-item {
  height: 40px;
  border: 0;
  border-radius: var(--radius-ctl);
  background: none;
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0 10px;
  position: relative;
}
.tb-item:hover { background: rgba(255,255,255,0.09); }
.tb-item:active { background: rgba(255,255,255,0.05); transform: translateY(0.5px); }
.tb-item[aria-expanded="true"] { background: rgba(255,255,255,0.13); }

.tb-today-label { font-size: 11px; font-weight: 800; letter-spacing: 1.4px; }
.tb-start img { display: block; }

.tb-search {
  position: relative;
  display: flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 11px;
  margin-left: 2px;
  border-radius: 17px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--stroke);
  color: var(--text-dim);
}
.tb-search:focus-within { border-color: var(--accent); background: rgba(255,255,255,0.12); }
.tb-search input {
  width: 190px; border: 0; background: none; outline: none;
  color: var(--text); font: inherit; font-size: 12.5px;
}
.tb-search input::placeholder { color: var(--text-faint); }
.tb-search input::-webkit-search-cancel-button { display: none; }

.search-results {
  position: absolute;
  bottom: calc(100% + 10px); left: -6px;
  width: 340px; max-height: 340px; overflow: auto;
  padding: 6px;
  background: var(--surface);
  backdrop-filter: blur(40px) saturate(160%);
  -webkit-backdrop-filter: blur(40px) saturate(160%);
  border: 1px solid var(--stroke-strong);
  border-radius: 10px;
  box-shadow: var(--shadow-win);
}
.sr-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 8px 10px;
  border: 0; border-radius: 6px; background: none;
  color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer;
}
.sr-item:hover, .sr-item[aria-selected="true"] { background: rgba(255,255,255,0.1); }
.sr-kind { margin-left: auto; font-size: 10.5px; color: var(--text-faint);
           letter-spacing: 0.6px; text-transform: uppercase; }
.sr-empty { padding: 14px; color: var(--text-faint); font-size: 12.5px; text-align: center; }

.tb-divider { width: 1px; height: 24px; margin: 0 6px; background: var(--stroke-strong); }
.tb-teams, .tb-running { display: flex; align-items: center; gap: 4px; }

.tb-team {
  width: 40px; height: 40px;
  border: 0; border-radius: var(--radius-ctl);
  background: none; cursor: pointer;
  display: grid; place-items: center;
  position: relative;
}
.tb-team:hover { background: rgba(255,255,255,0.09); }
/* The running indicator, same as W11: a short bar under the icon. */
.tb-team::after, .tb-run::after {
  content: ""; position: absolute; bottom: 3px; left: 50%;
  width: 0; height: 3px; border-radius: 2px;
  background: var(--tb-accent, var(--accent));
  transform: translateX(-50%);
  transition: width 140ms ease;
}
.tb-team.is-open::after { width: 16px; }
.tb-team.is-active::after { width: 24px; }

.tb-run {
  height: 40px; padding: 0 12px 0 10px;
  border: 0; border-radius: var(--radius-ctl);
  background: rgba(255,255,255,0.06);
  color: var(--text); font: inherit; font-size: 12px;
  cursor: pointer; position: relative;
  max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tb-run:hover { background: rgba(255,255,255,0.12); }
.tb-run.is-active { background: rgba(255,255,255,0.15); }
.tb-run.is-active::after { width: 24px; }

.tb-clock {
  display: grid; justify-items: end; gap: 1px;
  padding: 4px 10px;
  border-radius: var(--radius-ctl);
  font-size: 11.5px; line-height: 1.25;
  font-variant-numeric: tabular-nums;
  cursor: default;
}
.tb-clock time { font-weight: 600; }
.tb-clock span { color: var(--text-dim); }

/* ── Start menu ──────────────────────────────────────────────────────────── */

.start-menu {
  position: fixed;
  bottom: calc(var(--taskbar-h) + 10px);
  left: 10px;
  width: 400px;
  max-height: min(620px, calc(100vh - var(--taskbar-h) - 30px));
  overflow: auto;
  padding: 18px;
  background: var(--surface);
  backdrop-filter: blur(48px) saturate(160%);
  -webkit-backdrop-filter: blur(48px) saturate(160%);
  border: 1px solid var(--stroke-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-win);
  z-index: 9100;
}
.start-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.start-title { font-size: 15px; font-weight: 700; }
.start-sub { font-size: 11.5px; color: var(--text-dim); margin-top: 2px; }
.start-section {
  font-size: 10.5px; font-weight: 800; letter-spacing: 1.3px;
  color: var(--text-faint); text-transform: uppercase;
  margin: 16px 0 10px;
}
.start-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.start-grid-empty { display: block; }
.start-empty { margin: 0; font-size: 12px; color: var(--text-faint); }
.start-tile {
  border: 0; border-radius: 8px; background: none; cursor: pointer;
  color: var(--text); font: inherit; font-size: 11px;
  padding: 12px 6px 10px;
  display: grid; justify-items: center; gap: 7px;
}
.start-tile:hover { background: rgba(255,255,255,0.1); }

/* ── Window content primitives (shared by all "apps") ───────────────────── */

.card {
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: rgba(255,255,255,0.035);
  padding: 12px 13px;
  margin-bottom: 10px;
}
.card-kicker {
  font-size: 10px; font-weight: 800; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--win-accent, var(--accent));
}
.card-title { font-size: 15px; font-weight: 700; margin: 7px 0 0; letter-spacing: -0.2px; }
.card-meta { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

.row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--stroke);
}
.row:first-of-type { border-top: 0; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 13px; font-weight: 600; }
.row-sub { font-size: 11.5px; color: var(--text-dim); margin-top: 2px; }
.row-val { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

.pill {
  display: inline-block;
  padding: 2px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.7px;
  border: 1px solid currentColor;
}
.win-empty, .win-loading {
  padding: 26px 10px; text-align: center;
  color: var(--text-faint); font-size: 12.5px;
}
.win-error { color: #ff9aa2; }

.fav-btn {
  border: 1px solid var(--stroke-strong); border-radius: 6px;
  background: none; color: var(--text-dim);
  font: inherit; font-size: 11px; padding: 4px 9px; cursor: pointer;
}
.fav-btn:hover { background: rgba(255,255,255,0.09); color: var(--text); }
.fav-btn.is-fav { color: #ffd166; border-color: rgba(255,209,102,0.5); }

/* ── Player card ─────────────────────────────────────────────────────────── */
.player-head { display: flex; align-items: center; gap: 14px; }
.player-shot {
  width: 72px; height: 72px; border-radius: 50%; flex: none;
  background: rgba(255,255,255,0.06); object-fit: cover;
  font-size: 18px;
}
/* Illustrated art is drawn to the frame edges — `contain` on a squared box
   keeps a cartoon's chin from being cropped the way a headshot tolerates. */
.player-shot.is-art {
  border-radius: 10px; object-fit: contain;
  background: rgba(255,255,255,0.05); border: 1px solid var(--stroke);
}
.sr-art {
  width: 26px; height: 26px; flex: none; border-radius: 5px;
  object-fit: contain; background: rgba(255,255,255,0.06);
}
.player-id { min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }

.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 8px; margin: 10px 0 12px;
}
.stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 9px 4px; border-radius: 8px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--stroke);
}
.stat-val { font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-key { font-size: 9.5px; letter-spacing: 0.06em; color: var(--text-dim); text-transform: uppercase; }

/* Stat tables are wider than the window on purpose — they scroll themselves
   so the window body never scrolls sideways. */
.table-scroll { overflow-x: auto; margin: 0 -2px; }
.stat-table {
  border-collapse: collapse; width: 100%;
  font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.stat-table th, .stat-table td { padding: 5px 8px; text-align: right; }
.stat-table thead th {
  position: sticky; top: 0; text-align: right;
  font-size: 9.5px; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-dim); border-bottom: 1px solid var(--stroke-strong);
  /* Opaque, not the translucent --mica: rows must not show through a sticky
     header as they scroll under it. */
  background: var(--mica-solid);
}
.stat-table tbody th { text-align: left; font-weight: 500; color: var(--text-dim); }
.stat-table tbody tr:nth-child(even) { background: rgba(255,255,255,0.03); }
.stat-table tbody tr:first-child th,
.stat-table tbody tr:first-child td { color: var(--text); font-weight: 600; }
.stat-totals th, .stat-totals td {
  border-top: 1px solid var(--stroke-strong); color: var(--text) !important; font-weight: 600;
}

/* ── Brand art ───────────────────────────────────────────────────────────── */
/* Logos and player art are `contain` everywhere: these are illustrations with
   their own framing, and `cover` would crop them. */
.tb-logo, .tile-logo, .icon-art, .team-logo, .gm-teambtn img {
  object-fit: contain;
  display: block;
}
.tb-logo { width: 30px; height: 30px; }
.tile-logo { width: 30px; height: 30px; flex: none; }
.icon-art {
  width: 48px; height: 48px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}
.gm-teambtn img { width: 34px; height: 34px; }

.team-head { position: relative; }
.team-logo {
  position: absolute; top: 12px; right: 12px;
  width: 52px; height: 52px; opacity: 0.95;
}
/* Keep the record and title clear of the logo. */
.team-head .card-title, .team-head .card-meta { padding-right: 60px; }

/* ── Game links ──────────────────────────────────────────────────────────── */
/* Anything that opens a game. Underline on hover rather than always-on link
   colour — these sit inside dense rows where a blue word every line is noise. */
.is-gamelink { cursor: pointer; border-radius: 5px; }
.is-gamelink:hover { text-decoration: underline; text-underline-offset: 2px; }
tr.is-gamelink:hover > * { background: rgba(255,255,255,0.07); }
tr.is-gamelink:hover { text-decoration: none; }
.is-gamelink:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* `background: none` is load-bearing: a <button> otherwise paints the browser's
   default ButtonFace, which is near-white and shows as a pale slab behind a
   transparent logo. Every other button here sets it for the same reason. */
.gm-teambtn {
  border: 0;
  background: none;
  padding: 2px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  flex: none;
  line-height: 0;
}
.gm-teambtn:hover { background: rgba(255, 255, 255, 0.09); }

/* ── Game window ─────────────────────────────────────────────────────────── */
.gm-team { display: flex; align-items: center; gap: 9px; padding: 6px 0; }
.gm-team.is-win .gm-name { font-weight: 600; }
.gm-team.is-win .gm-score { color: var(--text); }
.gm-logo { width: 26px; height: 26px; flex: none; object-fit: contain; }
.gm-name { flex: 1; min-width: 0; font-size: 13px; }
.gm-rec { font-size: 10.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.gm-score {
  font-size: 20px; font-weight: 600; min-width: 34px; text-align: right;
  color: var(--text-dim); font-variant-numeric: tabular-nums;
}
.gm-line { margin-top: 8px; }
.gm-line thead th:first-child { min-width: 34px; }
.gm-lead-team { padding: 6px 0; }
.gm-lead-team + .gm-lead-team { border-top: 1px solid var(--stroke); }
.gm-lead-abbr {
  font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-dim);
}

/* ── Player view selector ────────────────────────────────────────────────── */
.player-controls { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.view-select {
  font: inherit; font-size: 11.5px;
  color: var(--text); background: rgba(255,255,255,0.07);
  border: 1px solid var(--stroke-strong); border-radius: 6px;
  padding: 4px 7px; cursor: pointer; max-width: 190px;
}
.view-select:hover { background: rgba(255,255,255,0.12); }
/* The native menu paints on the OS surface, not the window's — without an
   explicit colour pair the options render dark-on-dark. */
.view-select option { background: var(--mica-solid); color: var(--text); }

/* ── Calendars ───────────────────────────────────────────────────────────── */
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.cal-nav {
  flex: none; width: 26px; height: 26px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--stroke); background: rgba(255,255,255,0.05);
  color: var(--phillies); font-size: 16px; line-height: 1;
}
.cal-nav:hover { background: rgba(255,255,255,0.12); }
.cal-title { flex: 1; text-align: center; display: flex; flex-direction: column; gap: 1px; }
.cal-month { font-size: 13px; font-weight: 600; }
.cal-sub { font-size: 10.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }

.cal-legend {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  margin-bottom: 9px; font-size: 9.5px; color: var(--text-dim);
}
.cal-legend span { display: inline-flex; align-items: center; gap: 4px; }
.cal-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.cal-legend i.is-outline { border: 1px solid var(--stroke-strong); }

.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-dow {
  margin-bottom: 3px; text-align: center;
  font-size: 10px; font-weight: 600; color: var(--text-dim);
}
.cal-cell {
  aspect-ratio: 1; min-height: 34px; border-radius: 6px; padding: 3px 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  background: none; border: 0; color: var(--text-faint); font: inherit;
}
.cal-cell.is-blank { visibility: hidden; }
.cal-cell.is-game { cursor: pointer; border: 1px solid var(--stroke-strong); color: var(--text-dim); }
.cal-cell.is-filled { border-color: transparent; color: rgba(255,255,255,0.9); }
.cal-cell.is-game:hover { outline: 1px solid var(--accent); }
.cal-cell.is-sel { outline: 2px solid var(--accent); outline-offset: -1px; }
.cal-day { font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cal-mark { font-size: 12px; line-height: 1; }
.cal-mark.cal-hits { font-size: 9px; font-variant-numeric: tabular-nums; opacity: 0.9; }

.cal-detail { margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--stroke); }
.cal-detail-head {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 11.5px; font-weight: 600;
}
.cal-detail-date { color: var(--text-dim); font-weight: 400; }

/* ── Phillies player detail ──────────────────────────────────────────────── */
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fact {
  display: flex; flex-direction: column; gap: 1px;
  padding: 5px 9px; border-radius: 6px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--stroke);
}
.fact-key { font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }
.fact-val { font-size: 12px; }
.injury-note { margin: 9px 0 0; font-size: 11px; color: #ffb4a2; }
.card-note { margin: 8px 0 0; font-size: 10px; color: var(--text-dim); opacity: 0.8; }

.streaks { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.streak {
  display: flex; align-items: baseline; gap: 6px;
  padding: 6px 10px; border-radius: 7px;
  background: rgba(232,24,40,0.14); border: 1px solid rgba(232,24,40,0.4);
}
.streak-n { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.streak-label { font-size: 10.5px; color: var(--text-dim); }

.split-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 7px; margin-top: 9px;
}
.split {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 8px 4px; border-radius: 8px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--stroke);
}
.split-avg { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.split-label { font-size: 9.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-dim); }
.split-sub { font-size: 9.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }

.ptype { display: flex; align-items: center; gap: 9px; padding: 4px 0; font-size: 11.5px; }
.ptype-name { width: 78px; flex: none; color: var(--text-dim); }
.ptype-bar { flex: 1; height: 7px; border-radius: 4px; background: rgba(255,255,255,0.07); overflow: hidden; }
.ptype-bar > span { display: block; height: 100%; background: var(--phillies); border-radius: 4px; }
.ptype-avg { width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.ptype-n { width: 78px; text-align: right; font-size: 10px; color: var(--text-faint); font-variant-numeric: tabular-nums; }

.hr-num {
  width: 26px; flex: none; text-align: center;
  font-size: 10.5px; font-variant-numeric: tabular-nums; color: var(--text-faint);
}
.hr-log .row { gap: 6px; }

/* ── Parlays ──────────────────────────────────────────────────────────────
   Each parlay is a block inside the card rather than its own card, so three
   of them still read as one panel. */
.parlay { padding: 10px 0; border-top: 1px solid var(--stroke); }
.parlay:first-of-type { border-top: 0; padding-top: 4px; }

.parlay-head { display: flex; align-items: center; gap: 8px; }
.parlay-name { font-weight: 600; font-size: 13px; }
.parlay-odds {
  margin-left: auto; color: var(--text);
  border: 1px solid var(--stroke-strong); border-radius: 5px;
  padding: 1px 6px; font-variant-numeric: tabular-nums;
}
.parlay-why { margin: 4px 0 8px; font-size: 11.5px; color: var(--text-dim); line-height: 1.45; }

.legs { display: flex; flex-direction: column; gap: 3px; }
.leg {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: 6px;
  background: rgba(255,255,255,0.04);
  /* A left rail marks an Eagles leg — colour alone would be the only cue. */
  border-left: 2px solid transparent;
}
.leg.is-ours { border-left-color: var(--eagles); background: rgba(28,125,116,0.13); }
.leg-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.leg-player { font-size: 12px; }
.leg-market { font-size: 10.5px; color: var(--text-dim); }
.leg-odds { font-size: 11.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }

.parlay-foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 7px; font-size: 10.5px; color: var(--text-dim);
}
.parlay-link { margin-left: auto; color: var(--accent); text-decoration: none; white-space: nowrap; }
.parlay-link:hover { text-decoration: underline; }
.parlay-stamp { margin: 8px 0 0; font-size: 10px; color: var(--text-dim); opacity: 0.75; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Narrow screens: the desktop metaphor still works, but give windows room. */
@media (max-width: 720px) {
  .tb-search input { width: 96px; }
  .tb-running { display: none; }
}
