/* layup.win
   Minimal: every page is white, or near-black in dark mode. Type and numbers do the work,
   thin lines instead of boxes, and every shade is mixed from the page and text colors.
   A team page brings its color in only as the highlight (--accent) and a few small marks
   (--team: logo ring, dot, standings row, sidebar tint). */

:root {
  --bg: #ffffff;          /* page color: white, or near-black in dark mode */
  --on: #141414;          /* text that reads on it */
  --accent: #2e8b57;      /* one highlight: sea green at home, the team color on team pages */
  --accent-ink: #ffffff;  /* text on the highlight */
  --team: #2e8b57;        /* the team's own color, for small marks only */
  --red: #ff4b55;

  --text: var(--on);
  --soft: color-mix(in srgb, var(--on) 84%, var(--bg));
  --muted: color-mix(in srgb, var(--on) 64%, var(--bg));
  --dim: color-mix(in srgb, var(--on) 42%, var(--bg));
  --line-strong: color-mix(in srgb, var(--on) 30%, var(--bg));
  --line: color-mix(in srgb, var(--on) 16%, var(--bg));
  --chip: color-mix(in srgb, var(--on) 12%, var(--bg));
  --row-hover: color-mix(in srgb, var(--on) 9%, var(--bg));
  --row: color-mix(in srgb, var(--on) 5%, var(--bg));

  --display: 'Fredoka', 'Lexend', system-ui, sans-serif;
  --pad: 48px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Lexend', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  transition: background-color 0.45s ease, color 0.45s ease;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; }
.ico { width: 20px; height: 20px; flex: none; }
.link { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 22px;
  padding: 30px 16px; border-right: 1px solid var(--line);
  background: var(--bg); transition: background-color 0.45s ease;
}
.brand { padding: 0 8px; }
.brand img { width: 132px; height: auto; }
.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; }
.favs { display: flex; flex-direction: column; gap: 2px; }
.side-label { margin: 18px 8px 6px; font-size: 12px; color: var(--muted); }
.side-empty { margin: 0 8px 6px; font-size: 13px; line-height: 1.5; color: var(--muted); }

.fav {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 10px 6px 6px; border-radius: 12px;
  font-size: 14px; font-weight: 500; text-align: left;
  transition: background 0.15s;
}
.fav:hover { background: var(--row-hover); }
.fav.active { background: var(--chip); }
.fav-logo { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: #fff; }
.fav-logo img { width: 72%; height: 72%; object-fit: contain; }
.fav-logo.home { background: none; color: var(--text); }
.fav-logo.add { background: none; border: 1px dashed var(--line-strong); color: var(--muted); }
.fav-logo.add .ico, .fav-logo.home .ico { width: 18px; height: 18px; }
.fav-txt small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.add-team { color: var(--muted); }
.add-team:hover { color: var(--text); }

.stage { min-width: 0; padding: 40px var(--pad) 96px; }
.view { max-width: 1080px; margin: 0 auto; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* Page changes: a short crossfade (browser view transitions). The sidebar is its own layer, so it
   holds still while the page fades. Pages arrive complete, so nothing slides in piece by piece. */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.2s; animation-timing-function: ease-out; }
.sidebar { view-transition-name: sidebar; }
::view-transition-group(sidebar) { animation: none; }
::view-transition-old(sidebar) { display: none; }
::view-transition-new(sidebar) { animation: none; }
.hl-thumb, .hl-frame, .game.open .more { animation-duration: 0.2s; }

/* ---------- Type ---------- */
.kicker { margin: 0; font-size: 14px; color: var(--muted); }
.hero h1, .team-head h1 { margin: 8px 0 0; font-family: var(--display); font-weight: 600; line-height: 1; letter-spacing: -0.01em; }
.hero h1 { font-size: clamp(40px, 5.4vw, 72px); }
.sub { margin: 12px 0 0; font-size: 17px; color: var(--soft); }
.quiet { margin: 0; color: var(--muted); font-size: 14px; }
.note { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.mini-label { margin: 26px 0 4px; color: var(--muted); font-size: 12px; }

.cta {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 26px; padding: 12px 22px 12px 16px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--display); font-weight: 600; font-size: 17px;
}
.text-btn { color: var(--muted); font-size: 14px; }
.text-btn:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.pill { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); font-size: 12px; white-space: nowrap; }
.pill.accent { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 500; }

/* Live marker: a red dot and plain text, readable on any page color */
.live, .pill.live, .live-txt { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; }
.live::before, .pill.live::before, .live-txt::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px color-mix(in srgb, var(--on) 35%, transparent); animation: pulse 1.2s infinite; }
.pill.live { border-color: var(--line-strong); }
@keyframes pulse { 50% { opacity: 0.3; } }

/* Text tabs (league filter, standings groups, stat tabs, picker) */
.seg { display: inline-flex; gap: 18px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { padding: 4px 0; border-bottom: 2px solid transparent; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; transition: color 0.15s, border-color 0.15s; }
.seg button:hover { color: var(--text); }
.seg button.on { color: var(--text); border-bottom-color: var(--accent); }

/* ---------- Sections ---------- */
.sec { margin-top: 56px; scroll-margin-top: 90px; }
.sec-head, .panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 4px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.sec-head { margin-bottom: 18px; }
.sec-head h2, .panel-head h2 { margin: 0; font-family: var(--display); font-weight: 500; font-size: 20px; }
.panel { min-width: 0; }
.panel h2 .pill { margin-left: 8px; vertical-align: 3px; font-family: 'Lexend', sans-serif; }

/* ---------- Home ---------- */
.home-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.today-line { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.today-line b { font-family: var(--display); font-weight: 600; font-size: 18px; color: var(--text); }

.tcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.tcard {
  display: flex; flex-direction: column; gap: 10px; min-width: 0; overflow: hidden;
  padding: 18px; border-radius: 20px;
  background: var(--c); color: var(--ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent);
  transition: transform 0.2s ease;
}
.tcard:hover { transform: translateY(-2px); }
.tcard:active { transform: scale(0.99); }
.tc-top { display: flex; align-items: center; gap: 10px; }
.tc-logo { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #fff; flex: none; }
.tc-logo img { width: 72%; height: 72%; object-fit: contain; }
.tc-name b { display: block; font-family: var(--display); font-weight: 500; font-size: 17px; line-height: 1.1; }
.tc-name small { font-size: 12px; opacity: 0.7; }
.tc-live { margin-left: auto; padding: 3px 9px; border-radius: 999px; background: var(--ink); color: var(--c); font-size: 11px; font-weight: 600; }
.tc-score { display: flex; align-items: center; gap: 10px; min-height: 56px; }
.tc-score strong { display: flex; align-items: baseline; font-family: var(--display); font-weight: 600; font-size: 48px; line-height: 1; }
.tc-score strong i { font-style: normal; margin: 0 4px; opacity: 0.4; font-size: 30px; }
.tc-off { font-size: 26px !important; opacity: 0.8; }
.tc-res { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-family: var(--display); font-weight: 600; font-size: 13px; flex: none; }
.tc-res.W { background: var(--ink); color: var(--c); }
.tc-res.L, .tc-res.T, .tc-res.D { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink) 60%, transparent); }
.tc-opp { margin-left: auto; }
.tc-opp img { width: 34px; height: 34px; padding: 4px; border-radius: 50%; background: rgba(0, 0, 0, 0.16); object-fit: contain; }
.tc-when { margin: -2px 0 0; font-size: 13px; opacity: 0.8; }
.tc-when b { font-weight: 600; }
.tc-when .dot { display: none; }
.tc-sit { margin: 0; font-size: 12px; line-height: 1.4; opacity: 0.85; }
.tc-next {
  margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline;
  padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); font-size: 13px;
}
.tc-next span { opacity: 0.7; }
.tc-next b { font-weight: 600; }

/* ---------- Game rows ---------- */
.games { display: flex; flex-direction: column; }
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); column-gap: 40px; }
.game {
  display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: start; gap: 4px 14px;
  padding: 14px 8px; border-top: 1px solid var(--line);
  transition: background 0.15s;
}
.games > .game:first-child { border-top: 0; }
.game.openable { cursor: pointer; }
.game.openable:hover { background: var(--row); }
.lg { display: grid; place-items: center; padding-top: 3px; color: var(--dim); }
.lg .ico { width: 18px; height: 18px; }
.matchup { display: flex; flex-direction: column; gap: 6px; }
.tm { display: grid; grid-template-columns: 22px auto minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 15px; }
.tm img { width: 22px; height: 22px; object-fit: contain; }
.tm .nm { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm:hover .nm { text-decoration: underline; text-underline-offset: 3px; }
.tm small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; }
.tm .pts { grid-column: 4; font-family: var(--display); font-weight: 600; font-size: 20px; line-height: 1; text-align: right; min-width: 2ch; }
.tm.lose .nm, .tm.lose .pts { color: var(--dim); }
.tm.fav .nm::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-radius: 50%; background: var(--accent); vertical-align: 2px; }
.status { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; min-width: 72px; text-align: right; font-size: 13px; color: var(--muted); }
.status b { font-family: var(--display); font-weight: 600; font-size: 16px; color: var(--text); }
.status small { font-size: 12px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status .live { font-size: 12px; }
.sit { grid-column: 2 / -1; margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.game .more { display: none; grid-column: 1 / -1; padding: 6px 0 4px 34px; }
.game.open .more { display: block; animation: rise 0.25s ease-out; }
.pts.bump { animation: bump 0.9s ease; }
@keyframes bump { 35% { transform: scale(1.25); color: var(--accent); } }
.more-btn { margin-top: 18px; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); font-size: 14px; }
.more-btn:hover { color: var(--text); border-color: var(--text); }

/* ---------- Game details ---------- */
.scroll-x { overflow-x: auto; scrollbar-width: thin; }
.lines { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.lines th { padding: 0 6px 6px; color: var(--muted); font-weight: 400; text-align: center; }
.lines td { padding: 7px 6px; text-align: center; border-top: 1px solid var(--line); color: var(--soft); }
.lines .who { text-align: left; color: var(--text); font-weight: 500; white-space: nowrap; }
.lines .who i { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; }
.lines .tot { font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--text); }
.t0 { --tone: var(--on); }
.t1 { --tone: var(--line-strong); }
.lines .who i, .cmp-bar i { background: var(--tone); }

.cmp { display: grid; gap: 12px; margin-top: 20px; }
.cmp-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px 10px; font-size: 13px; }
.cmp-row span { color: var(--muted); }
.cmp-row b { font-weight: 600; }
.cmp-row b:last-of-type { text-align: right; }
.cmp-bar { grid-column: 1 / -1; display: flex; gap: 3px; height: 4px; }
.cmp-bar i { display: block; border-radius: 99px; }
.cmp-bar i:last-child { flex: 1; }

.leaders { display: grid; gap: 12px; margin-top: 20px; }
.ldr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 13px; }
.ldr small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.ldr p { margin: 0; padding-left: 9px; border-left: 2px solid var(--tone); color: var(--soft); line-height: 1.35; }
.ldr p b { color: var(--text); font-weight: 500; }

/* ---------- Team page ---------- */
.team-head { padding-top: 2px; }
.hero-bar { display: flex; justify-content: space-between; align-items: center; }
.round {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-strong); color: var(--text);
  transition: background 0.15s, transform 0.15s;
}
.round:hover { background: var(--row-hover); }
.round:active { transform: scale(0.92); }
.star.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.star.on .ico { fill: currentColor; }
.hero-main { display: flex; align-items: center; gap: 20px; margin-top: 22px; }
.badge { display: grid; place-items: center; flex: none; width: 80px; height: 80px; border-radius: 50%; background: #fff; }
.badge img { width: 70%; height: 70%; object-fit: contain; }
.team-head h1 { font-size: clamp(32px, 4.2vw, 52px); margin-top: 4px; }
.team-head .sub { margin-top: 8px; font-size: 15px; }
.head-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 28px; margin-top: 16px; }
.form { display: flex; align-items: center; gap: 5px; }
.form small { margin-right: 6px; font-size: 12px; color: var(--muted); }
.f { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-family: var(--display); font-weight: 600; font-size: 11px; cursor: default; }
.f.W { background: var(--text); color: var(--bg); }
.f.L, .f.T, .f.D { box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--muted); }
.season small { display: block; font-size: 12px; color: var(--muted); }
.track { display: block; width: 120px; height: 3px; margin-top: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.track i { display: block; height: 100%; background: var(--text); }

.secbar {
  position: sticky; top: 0; z-index: 4;
  margin: 32px calc(var(--pad) * -1) 0; padding: 14px var(--pad) 0;
  background: var(--bg); border-bottom: 1px solid var(--line);
  transition: background-color 0.45s ease;
}
.secnav { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; }
.secnav button { padding: 0 0 12px; border-bottom: 2px solid transparent; margin-bottom: -1px; font-family: var(--display); font-weight: 500; font-size: 16px; color: var(--muted); white-space: nowrap; transition: color 0.15s, border-color 0.15s; }
.secnav button:hover { color: var(--text); }
.secnav button.on { color: var(--text); border-bottom-color: var(--accent); }

.scores-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }

/* Scoreboard */
.strip {
  display: flex; gap: 4px; margin: 10px 0 22px; padding-right: 30px; overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent);
}
.strip::-webkit-scrollbar { display: none; }
.chipgame {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 62px; padding: 6px 4px 8px; border-bottom: 2px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}
.chipgame:hover { background: var(--row); border-radius: 8px 8px 0 0; }
.chipgame.on { border-bottom-color: var(--accent); }
.chipgame small { font-size: 11px; color: var(--muted); }
.chipgame img { width: 24px; height: 24px; object-fit: contain; }
.chipgame b { font-family: var(--display); font-weight: 600; font-size: 12px; white-space: nowrap; }
.chipgame b.L, .chipgame b.T, .chipgame b.D { color: var(--muted); }
.chipgame.live-chip small { color: var(--text); font-weight: 600; }

.sb { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 8px 0; }
.sb-side { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.sb-side img { width: 72px; height: 72px; object-fit: contain; transition: transform 0.2s; }
.sb-side:hover img { transform: scale(1.05); }
.sb-side span { font-size: 15px; font-weight: 500; }
.sb-side small { font-size: 12px; color: var(--muted); }
.sb-nums { display: flex; align-items: center; gap: 18px; font-family: var(--display); font-weight: 600; font-size: 96px; line-height: 1; }
.sb-nums .lose { color: var(--dim); }
.sb-nums i { font-style: normal; font-size: 32px; color: var(--line-strong); }
.sb-meta { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; color: var(--muted); font-size: 14px; }
.res { display: inline-grid; place-items: center; padding: 3px 11px; border-radius: 999px; font-family: var(--display); font-weight: 600; font-size: 13px; }
.res.W { background: var(--text); color: var(--bg); }
.res.L, .res.T, .res.D { box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--text); }
.sit-big { margin: 14px auto 0; max-width: 90%; text-align: center; color: var(--soft); font-size: 14px; }
#sb-details { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }

/* Next up */
.next-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 0 18px; text-align: center; }
.next-logos { display: flex; align-items: center; gap: 14px; }
.next-logos img { width: 48px; height: 48px; object-fit: contain; }
.next-logos em { font-style: normal; color: var(--muted); font-size: 13px; }
.next-hero b { margin-top: 4px; font-family: var(--display); font-weight: 600; font-size: 22px; }
.next-when { font-family: var(--display); font-weight: 500; font-size: 17px; color: var(--accent); }
.next-hero small { color: var(--muted); font-size: 13px; }
.next-hero:hover b { text-decoration: underline; text-underline-offset: 4px; }

.ups { display: flex; flex-direction: column; }
.up { display: grid; grid-template-columns: 52px auto minmax(0, 1fr); align-items: center; gap: 14px; padding: 10px 6px; border-top: 1px solid var(--line); transition: background 0.15s; }
.ups > .up:first-child { border-top: 0; }
.up:hover { background: var(--row); }
.chip { display: flex; flex-direction: column; line-height: 1.2; }
.chip small { font-size: 11px; color: var(--muted); }
.chip b { font-family: var(--display); font-weight: 600; font-size: 14px; white-space: nowrap; }
.up-logos { display: flex; }
.up-logos img { width: 26px; height: 26px; object-fit: contain; }
.up-logos img + img { margin-left: -4px; }
.up-main { min-width: 0; }
.up-main b { display: block; font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-main small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Standings */
.table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.table th { padding: 12px 6px 8px; font-size: 12px; font-weight: 400; color: var(--muted); text-align: right; }
.table th:nth-child(2) { text-align: left; }
.table td { padding: 8px 6px; text-align: right; border-top: 1px solid var(--line); }
.table .rk { width: 30px; text-align: center; color: var(--muted); }
.table .tm-cell { text-align: left; }
.table .tm-cell a { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.table .tm-cell a:hover { text-decoration: underline; text-underline-offset: 3px; }
.table .tm-cell img { width: 20px; height: 20px; object-fit: contain; }
.table td:last-child { font-weight: 600; }
.table tbody tr:hover td { background: var(--row); }
.table tr.me td { background: var(--chip); font-weight: 600; }
.table tr.me .rk { color: var(--accent); border-radius: 8px 0 0 8px; }
.table tr.me td:last-child { border-radius: 0 8px 8px 0; }

/* Team stats */
.stats { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
.stat { padding: 14px 0; border-top: 1px solid var(--line); }
.stats > .stat:nth-child(-n + 2) { border-top: 0; }
.stat small { display: block; margin-bottom: 4px; color: var(--muted); font-size: 13px; }
.stat b { font-family: var(--display); font-weight: 600; font-size: 26px; }
.stat i { display: block; margin-top: 2px; font-style: normal; font-size: 12px; color: var(--accent); }

/* Leaders */
.pls, .injs { display: flex; flex-direction: column; }
.pl { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.pls > .pl:first-child, .injs > .inj:first-child { border-top: 0; }
.head { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--chip); }
.head img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.head b { font-family: var(--display); font-size: 15px; color: var(--muted); }
.pl-txt b { display: block; font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-txt small { color: var(--muted); font-size: 13px; }
.pl strong { font-family: var(--display); font-weight: 600; font-size: 22px; color: var(--accent); }

/* Injuries */
.inj { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.inj-txt { min-width: 0; }
.inj-txt b { font-weight: 500; font-size: 15px; }
.inj-txt small { color: var(--muted); font-size: 12px; }
.inj-txt .what { display: block; margin-top: 2px; font-size: 13px; }
.st { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--soft); font-size: 12px; white-space: nowrap; }
.st.out::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }

/* Skeleton */
.sk { border-radius: 12px; background: linear-gradient(90deg, var(--row), var(--row-hover), var(--row)); background-size: 200% 100%; animation: sh 1.3s infinite linear; }
@keyframes sh { to { background-position: -200% 0; } }

/* ---------- Picker ---------- */
.picker {
  width: min(760px, calc(100vw - 24px)); max-height: min(780px, calc(100vh - 24px));
  padding: 28px; border: 1px solid var(--line-strong); border-radius: 22px;
  background: var(--bg); color: var(--text);
}
.picker[open] { animation: rise 0.2s ease-out; }
.picker::backdrop { background: rgba(0, 0, 0, 0.5); }
.picker-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.picker-head h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 24px; }
.done { padding: 8px 18px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-top: 20px; }
.tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 6px 10px; border-radius: 14px; border: 1px solid var(--line);
  font-size: 13px; text-align: center; line-height: 1.2;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.tile:hover { background: var(--row); }
.tile:active { transform: scale(0.96); }
.tile img { width: 40px; height: 40px; object-fit: contain; }
.tile.on { border-color: var(--accent); background: var(--row-hover); }
.tile.on::after {
  content: '✓'; position: absolute; top: 6px; right: 6px;
  display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700;
}
.tile-sk { height: 104px; }

/* ---------- Small screens ---------- */
@media (max-width: 1000px) {
  .scores-grid, .board { grid-template-columns: minmax(0, 1fr); gap: 48px; }
}

@media (max-width: 900px) {
  :root { --pad: 18px; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    z-index: 5; height: auto; flex-direction: row; align-items: center; gap: 10px;
    padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line);
    overflow-x: auto; scrollbar-width: none;
  }
  .brand { padding: 0; }
  .brand img { width: 84px; }
  .nav { flex-direction: row; align-items: center; overflow: visible; }
  .favs { flex-direction: row; gap: 4px; }
  .fav { padding: 2px; border-radius: 50%; }
  .fav.active { box-shadow: 0 0 0 2px var(--accent); background: none; }
  .fav-txt, .side-label, .side-empty, #home-link { display: none; }
  .add-team { position: sticky; right: 0; background: var(--bg); }

  .stage { padding: 26px var(--pad) 64px; }
  .sec { margin-top: 44px; scroll-margin-top: 120px; }
  .hero h1 { font-size: clamp(34px, 9vw, 48px); }
  .secbar { top: 56px; margin-top: 24px; }
  .secnav { gap: 22px; }
  .sb-side img { width: 54px; height: 54px; }
  .sb-nums { font-size: 64px; gap: 10px; }
  .sb-nums i { font-size: 24px; }
  .badge { width: 64px; height: 64px; }
  .hero-main { gap: 16px; }
  .tc-score strong { font-size: 42px; }
  .tm small { display: none; }
  .tm { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .tm .pts { grid-column: 3; }
  .game .more { padding-left: 0; }
  .stats { column-gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.brand { color: var(--text); }
.brand svg { display: block; width: 132px; height: auto; }
@media (max-width: 900px) { .brand svg { width: 84px; } }

/* Light / dark toggle: bottom of the sidebar; next to the logo on phones */
.mode-toggle { margin-top: auto; color: var(--muted); }
.mode-toggle:hover { color: var(--text); }
@media (max-width: 900px) {
  .mode-toggle { order: 1; margin-top: 0; padding: 2px; border-radius: 50%; }
  .nav { order: 2; }
}

/* Small phones */
@media (max-width: 420px) {
  .sb { gap: 4px; }
  .sb-side { min-width: 0; }
  .sb-side img { width: 40px; height: 40px; }
  .sb-side span { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sb-nums { font-size: 46px; gap: 6px; }
  .sb-nums i { font-size: 20px; }
  .hero-main { align-items: flex-start; }
  .badge { width: 52px; height: 52px; }
  .tc-score strong { font-size: 38px; }
  .tc-opp img { width: 30px; height: 30px; }
}

/* Team color, used lightly */
.badge { box-shadow: 0 0 0 1px var(--line), 0 0 0 4px var(--bg), 0 0 0 7px var(--team); }
.team-head .kicker { display: flex; align-items: center; gap: 8px; }
.team-head .kicker::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--team); box-shadow: 0 0 0 1px var(--line); }
.table tr.me td { background: color-mix(in srgb, var(--team) 16%, var(--bg)); }
.fav-logo:not(.home):not(.add) { box-shadow: 0 0 0 1px var(--line); }
.fav.active { background: color-mix(in srgb, var(--c, var(--on)) 14%, var(--bg)); }
@media (max-width: 900px) {
  .fav.active { background: none; box-shadow: 0 0 0 2px var(--c, var(--accent)); }
}

/* Highlights video: thumbnail first, YouTube player only after a tap */
.hl { margin-top: 22px; }
.hl:empty { display: none; }
.hl-thumb, .hl-frame { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--chip); animation: rise 0.3s ease-out; }
.hl-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.hl-thumb:hover img { transform: scale(1.03); }
.hl-play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
}
.hl-play svg { width: 26px; height: 26px; margin-left: 3px; }
.hl-thumb:hover .hl-play { transform: scale(1.08); }
.hl-tag { position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 12px; font-weight: 500; }
.hl-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.hl-cap { margin: 10px 0 0; font-size: 13px; color: var(--soft); line-height: 1.4; }
.hl-cap span { color: var(--muted); }
.hl-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--soft); font-size: 13px; }
.hl-link:hover { color: var(--text); border-color: var(--text); }
.hl:has(.hl-link) { display: flex; justify-content: center; }

/* ---------- League pages ---------- */
.kicker-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.lg-badge { color: var(--team); }
.lg-badge .ico { width: 40px; height: 40px; stroke-width: 1.6; }
[data-mode='dark'] .lg-badge { background: var(--chip); }

.follow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px 8px 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--text); font-size: 14px; font-weight: 500;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.follow .ico { width: 16px; height: 16px; }
.follow:hover { background: var(--row-hover); }
.follow:active { transform: scale(0.96); }
.follow.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.follow.sm { padding: 5px 12px; font-size: 13px; }

.daynav { display: flex; align-items: center; gap: 8px; }
.round.sm { width: 32px; height: 32px; }
.round.sm .ico { width: 16px; height: 16px; }
.round.flip .ico { transform: scaleX(-1); }

.lgl { display: grid; gap: 4px; }
.lgl-cat .mini-label { margin-top: 16px; }
.lgl-row { display: grid; grid-template-columns: 18px 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.lgl-cat .lgl-row:first-of-type { border-top: 0; }
.lgl-row .rk { color: var(--muted); font-size: 12px; text-align: center; }
.lgl-row .head { width: 32px; height: 32px; }
.lgl-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lgl-name img { width: 18px; height: 18px; object-fit: contain; flex: none; }
.lgl-row strong { font-family: var(--display); font-weight: 600; font-size: 18px; }
.lgl-cat .lgl-row:first-of-type strong { color: var(--accent); }

.lteams { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: 4px 16px; margin-top: 8px; }
.lteam { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 500; transition: background 0.15s; }
.lteam:hover { background: var(--row); }
.lteam img { width: 28px; height: 28px; object-fit: contain; flex: none; }
.star-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: auto; }

.league-link { display: inline-block; margin-top: 18px; }

/* Sidebar leagues */
.fav-logo.lgi { background: none; box-shadow: inset 0 0 0 1px var(--line); color: var(--c); }
.fav-logo.lgi .ico { width: 18px; height: 18px; }
[data-mode='dark'] .fav-logo.lgi { color: color-mix(in srgb, var(--c) 70%, white); }
.lg-item:not(.following) .fav-txt { color: var(--muted); font-weight: 400; }

/* Picker: league tabs + follow button on one row */
.picker-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .lg-item:not(.following), .side-label { display: none; }
  .fav-logo.lgi { background: var(--bg); }
}

/* Season status: Eliminated / Missed playoffs / Off-season / Playoffs / Champions */
.season-status { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--soft); font-size: 12px; font-weight: 500; }
.season-status.active { border-color: var(--accent); color: var(--accent); }
.season-status.off:not(:empty) { color: var(--muted); }
.tc-status { margin-left: auto; padding: 3px 9px; border-radius: 999px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 45%, transparent); font-size: 11px; font-weight: 600; }
.tcard.is-over { opacity: 0.82; }
.tcard.is-over:hover { opacity: 1; }

/* ---------- Players ---------- */
.plink:hover b, .plink:hover { text-decoration: underline; text-underline-offset: 3px; }
a.pl:hover .pl-txt b { text-decoration: underline; text-underline-offset: 3px; }
.badge.headshot { overflow: hidden; background: var(--chip); }
.badge.headshot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.badge.headshot b { font-family: var(--display); font-size: 32px; color: var(--muted); }
.next-line { font-size: 13px; color: var(--muted); }
.next-line b { color: var(--text); font-weight: 500; }

.pstats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0 28px; }
.pstat { padding: 12px 0; }
.pstat b { display: block; font-family: var(--display); font-weight: 600; font-size: 40px; line-height: 1; }
.pstat small { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.pstat i { display: block; margin-top: 2px; font-style: normal; font-size: 12px; color: var(--accent); }

.ptable th, .ptable td { white-space: nowrap; }
.ptable th:nth-child(2), .ptable td:nth-child(2), .ptable th:first-child, .ptable td:first-child { text-align: left; }
.ptable td:last-child { font-weight: 500; }
.ptable.full td:last-child { font-weight: 400; }
.ptable .row-name { font-weight: 500; }
.pg-date { color: var(--muted); }
.pg-opp a { display: inline-flex; align-items: center; gap: 8px; }
.pg-opp img { width: 20px; height: 20px; object-fit: contain; }
.pg-res .r { display: inline-block; min-width: 16px; font-family: var(--display); font-weight: 600; }
.pg-res .r.L { color: var(--muted); }
.pg-key { text-align: left !important; }
.ptable th:last-child { text-align: left; }

/* Sidebar faces */
.fav-logo.face { overflow: hidden; background: var(--chip); font-family: var(--display); font-weight: 600; color: var(--muted); }
.fav-logo.face img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* Home: your players */
.prows { display: flex; flex-direction: column; }
.prow { display: grid; grid-template-columns: 44px minmax(0, 0.8fr) minmax(0, 1.6fr); align-items: center; gap: 14px; padding: 10px 6px; border-top: 1px solid var(--line); transition: background 0.15s; }
.prows > .prow:first-child { border-top: 0; }
.prow:hover { background: var(--row); }
.prow .head { width: 44px; height: 44px; box-shadow: 0 0 0 2px var(--c); }
.prow-name b { display: block; font-weight: 500; font-size: 15px; }
.prow-name small { color: var(--muted); font-size: 12px; }
.prow-last { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; color: var(--muted); }
.prow-last b { font-family: var(--display); font-weight: 600; font-size: 16px; color: var(--text); }
.prow-last span, .prow-last small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) {
  .prow { grid-template-columns: 40px minmax(0, 1fr); }
  .prow-last { grid-column: 2; }
}
.ptable .pg-key { white-space: normal; min-width: 110px; }
@media (max-width: 600px) {
  .ptable .pg-opp span { display: none; }
  .ptable .pg-opp a::after { content: attr(data-short); }
}

/* ---------- Search ---------- */
#search-btn kbd { margin-left: auto; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line-strong); color: var(--muted); font: 500 11px 'Lexend', sans-serif; }
.picker.search { width: min(560px, calc(100vw - 24px)); padding: 16px; align-self: start; margin-top: min(12vh, 120px); }
.search-bar { display: flex; align-items: center; gap: 12px; padding: 4px 4px 12px; border-bottom: 1px solid var(--line); }
.search-bar input { flex: 1; min-width: 0; padding: 8px 4px; border: 0; outline: 0; background: none; color: var(--text); font: 500 18px 'Lexend', sans-serif; }
.search-bar input::placeholder { color: var(--muted); }
.search-bar input::-webkit-search-cancel-button { display: none; }
.search-results { max-height: min(60vh, 520px); overflow-y: auto; padding-top: 6px; }
.sr-hint { margin: 10px 8px 4px; }
.sr { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; }
.sr.on, .sr:hover { background: var(--row-hover); }
.sr-ico { display: grid; place-items: center; width: 34px; height: 34px; flex: none; }
.sr-ico img { width: 30px; height: 30px; object-fit: contain; }
.sr-ico.lg { border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); color: var(--c); }
.sr-ico.lg .ico { width: 18px; height: 18px; }
.sr-txt b { display: block; font-weight: 500; font-size: 15px; }
.sr-txt small { color: var(--muted); font-size: 12px; }
.sr-empty { padding: 18px 8px; }
@media (max-width: 900px) {
  #search-btn { order: -1; padding: 2px; border-radius: 50%; }
  #search-btn kbd { display: none; }
}

.sr-ico.face { border-radius: 50%; overflow: hidden; background: var(--chip); font-family: var(--display); font-weight: 600; color: var(--muted); }
.sr-ico.face img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

.brand { min-height: 28px; }

/* ---------- College ---------- */
.rk25 { margin-right: 6px; font-style: normal; font-size: 11px; font-weight: 600; color: var(--muted); vertical-align: 1px; }
.top25 { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); column-gap: 32px; }
.top25 a { display: grid; grid-template-columns: 26px 26px minmax(0, 1fr) auto 34px; align-items: center; gap: 10px; padding: 8px 4px; border-top: 1px solid var(--line); font-size: 14px; }
.top25 a:hover { background: var(--row); }
.t25-rk { font-family: var(--display); font-weight: 600; font-size: 16px; text-align: center; }
.top25 img { width: 24px; height: 24px; object-fit: contain; }
.t25-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top25 small { color: var(--muted); font-size: 12px; }
.mv { text-align: right; }
.mv.up { color: var(--accent); }
.mv.new { font-style: italic; }

/* Home: Coming up */
.ups .up { grid-template-columns: 52px auto minmax(0, 1fr) auto; }
.up-in { color: var(--muted); font-size: 12px; white-space: nowrap; }
.both { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-style: normal; font-size: 11px; font-weight: 500; vertical-align: 1px; }
@media (max-width: 600px) { .up-in { display: none; } }
@media (max-width: 600px) {
  .ups .up { grid-template-columns: 48px auto minmax(0, 1fr); gap: 10px; }
  .ups .up-logos img { width: 22px; height: 22px; }
  .ups .up-main b, .ups .up-main small { white-space: normal; }
}

/* =====================================================================
   Phones: favorites across the top, main actions in a bottom tab bar,
   swipeable team cards, bottom-sheet dialogs, room for notches/home bars.
   ===================================================================== */
.tabbar { display: none; }
@keyframes sheet { from { transform: translateY(48px); opacity: 0; } }

@media (max-width: 900px) {
  :root { --topbar: 54px; --tabbar: 60px; }

  /* Top bar: logo + your teams, players and followed leagues */
  .sidebar { top: 0; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; min-height: calc(var(--topbar) + env(safe-area-inset-top)); }
  #search-btn, .mode-toggle, .add-team { display: none; }
  .nav { padding-right: 24px; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .fav-logo { width: 38px; height: 38px; }

  /* Bottom tab bar */
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: var(--bg); border-top: 1px solid var(--line);
    view-transition-name: tabbar; transition: background-color 0.45s ease;
  }
  .tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 48px; border-radius: 12px; color: var(--muted); font-size: 11px; font-weight: 500; -webkit-tap-highlight-color: transparent; }
  .tab .ico { width: 22px; height: 22px; }
  .tab.on { color: var(--text); }
  .tab.on .ico { color: var(--accent); }
  .tab:active { background: var(--row-hover); }

  .stage {
    padding-bottom: calc(var(--tabbar) + 32px + env(safe-area-inset-bottom));
    padding-left: max(var(--pad), env(safe-area-inset-left));
    padding-right: max(var(--pad), env(safe-area-inset-right));
  }
  .secbar { top: calc(var(--topbar) + env(safe-area-inset-top)); }

  /* Swipe through your team cards instead of scrolling past all of them */
  .tcards {
    grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 84%;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 calc(var(--pad) * -1); padding: 2px var(--pad) 6px; scroll-padding: 0 var(--pad);
  }
  .tcards::-webkit-scrollbar { display: none; }
  .tcard { scroll-snap-align: start; }

  /* Team picker: a sheet from the bottom. Search: full screen, so the keyboard never covers results. */
  .picker { width: 100vw; max-width: 100vw; max-height: 90vh; max-height: 90dvh; margin: auto 0 0; border-width: 1px 0 0; border-radius: 22px 22px 0 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); }
  .picker[open] { animation: sheet 0.25s ease-out; }
  .picker.search { margin: 0; height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; border: 0; border-radius: 0; padding: calc(10px + env(safe-area-inset-top)) 12px env(safe-area-inset-bottom); }
  .picker.search[open] { display: flex; flex-direction: column; animation: rise 0.2s ease-out; }
  .search-results { flex: 1; max-height: none; }
  .search-bar input { font-size: 17px; }
  .sr { padding: 10px 8px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }

  /* Bigger tap areas */
  .seg { gap: 6px; }
  .seg button { padding: 8px 6px; }
  .daynav .round.sm { width: 38px; height: 38px; }
  .chipgame { min-width: 66px; padding: 8px 4px 10px; }
}

/* Touch screens: no hover lifts that stick after a tap */
@media (hover: none) {
  .tcard:hover, .up:hover, .next-hero:hover, .chipgame:hover, .side:hover img, .sb-side:hover img { transform: none; }
}
@media (max-width: 900px) {
  /* 100% of the screen (100vw would include the scrollbar and leave a sliver of page showing) */
  .picker, .picker.search { width: 100%; max-width: 100%; }
}

/* ---------- Scroll arrows ---------- */
.arrows-wrap { position: relative; min-width: 0; }
.arrow {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 3;
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg); color: var(--text);
  box-shadow: 0 0 0 1px var(--line-strong), 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: opacity 0.15s, transform 0.15s;
}
.arrow .ico { width: 16px; height: 16px; }
.arrow.prev { left: 4px; }
.arrow.next { right: 4px; }
.arrow.next .ico { transform: scaleX(-1); }
.arrow:active { transform: scale(0.92); }
.arrow[hidden] { display: none; }

/* Desktop sidebar is a column: the favorites wrapper shouldn't change its layout. */
@media (min-width: 901px) {
  .sidebar > .arrows-wrap { display: contents; }
  .sidebar .arrow { display: none; }
}
@media (max-width: 900px) {
  /* Phones: the favorites row scrolls inside its own lane, between the logo and the edge */
  .sidebar { overflow: hidden; }
  .nav-wrap { flex: 1; min-width: 0; display: flex; align-items: center; order: 2; }
  .nav { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
  .nav::-webkit-scrollbar { display: none; }
  .nav-wrap .arrow { width: 28px; height: 28px; }
  .nav-wrap .arrow.prev { left: 0; }
  .nav-wrap .arrow.next { right: 0; }
  .tcards + .arrow, .arrows-wrap .tcards ~ .arrow { top: 45%; }
}

/* Teams without a logo (e.g. non-Division I opponents) */
img[src=""] { visibility: hidden; }
.no-logo { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(0, 0, 0, 0.16); font-size: 9px; font-weight: 700; letter-spacing: 0.02em; }

/* ---------- Roster ---------- */
.roster th:nth-child(2), .roster td.ro-name { text-align: left; }
.roster th:first-child, .roster td.rk { width: 36px; text-align: center; }
.roster td:nth-child(n + 3) { color: var(--soft); }
.roster td:last-child { font-weight: 400; }
.ro-name a { display: flex; align-items: center; gap: 10px; min-width: 160px; font-weight: 500; }
.ro-name a:hover span:last-child { text-decoration: underline; text-underline-offset: 3px; }
.ro-name .head { width: 32px; height: 32px; flex: none; }
.hurt { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 4px; border-radius: 50%; background: var(--red); color: #fff; font-style: normal; font-size: 11px; font-weight: 700; vertical-align: 1px; }
.seg button small { color: var(--muted); font-size: 11px; font-weight: 400; }

/* ---------- News page (the only place with stories) ---------- */
.story-lead { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 22px; align-items: center; margin-bottom: 22px; }
.story-img { display: block; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--chip); }
.story-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
a:hover > .story-img img { transform: scale(1.03); }
.story-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.story-lead b { font-family: var(--display); font-weight: 600; font-size: 28px; line-height: 1.1; }
.story-meta { color: var(--muted); font-size: 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.story-sum { color: var(--soft); font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
a:hover b { text-decoration: underline; text-underline-offset: 3px; }

.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 20px 18px; }
.story-card { display: flex; flex-direction: column; gap: 8px; }
.story-card b { font-weight: 500; font-size: 15px; line-height: 1.35; }

.stories { display: flex; flex-direction: column; }
.story-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 16px; align-items: center; padding: 14px 4px; border-top: 1px solid var(--line); }
.stories > .story-row:first-child { border-top: 0; }
.story-row b { font-weight: 500; font-size: 16px; line-height: 1.35; }
.story-row .story-sum { -webkit-line-clamp: 2; font-size: 13px; }
.story-thumb { display: block; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--chip); }
.story-thumb img { width: 100%; height: 100%; object-fit: cover; }
.story-team { padding: 1px 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text); font-style: normal; font-weight: 500; border-left: 3px solid var(--c); }
.news-note { margin-top: 40px; }

@media (max-width: 900px) {
  #news-link { display: none; }
  .tabbar { grid-template-columns: repeat(5, 1fr); }
  .story-lead { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .story-lead b { font-size: 22px; }
  .story-row { grid-template-columns: minmax(0, 1fr) 84px; gap: 12px; }
  .story-row .story-sum { display: none; }
  .story-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 12px; }
  .story-card b { font-size: 14px; }
}

/* =====================================================================
   Motion. Quick and quiet; all of it is skipped for "reduce motion"
   (the global rule near the top already zeroes animations and transitions).
   ===================================================================== */
:root { interpolate-size: allow-keywords; }

/* Page change: old page fades out, new page fades up a few pixels. */
::view-transition-old(root) { animation: 0.16s ease-out both vt-out; }
::view-transition-new(root) { animation: 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* Theme switch: a circle of the new look spreads from the button; nothing else moves. */
.vt-theme::view-transition-old(root), .vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.vt-theme .sidebar, .vt-theme .tabbar { view-transition-name: none; }

/* Lists cascade in on a new page (opacity and a small lift only, so nothing shifts). */
.stage[data-enter] :is(.tcard, .games > .game, .games-grid > .game, .ups > .up, .stories > .story-row, .story-grid > .story-card, .pls > .pl, .injs > .inj, .lteams > .lteam, .top25 > li, .prows > .prow, .stats > .stat, .pstats > .pstat, .chipgame) {
  animation: cascade 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--n, 0) * 32ms + 60ms);
}
.stage[data-enter] :nth-child(2) { --n: 1; }
.stage[data-enter] :nth-child(3) { --n: 2; }
.stage[data-enter] :nth-child(4) { --n: 3; }
.stage[data-enter] :nth-child(5) { --n: 4; }
.stage[data-enter] :nth-child(6) { --n: 5; }
.stage[data-enter] :nth-child(7) { --n: 6; }
.stage[data-enter] :nth-child(8) { --n: 7; }
.stage[data-enter] :nth-child(n + 9) { --n: 8; }
@keyframes cascade { from { opacity: 0; transform: translateY(8px); } }

/* Sliding tab underline (replaces each tab's own underline). */
.seg, .secnav { position: relative; }
.has-ind button.on { border-bottom-color: transparent; }
.tab-ind {
  position: absolute; left: 0; bottom: 0; height: 2px; border-radius: 2px;
  background: var(--accent); pointer-events: none;
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), width 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.secnav .tab-ind { bottom: 1px; height: 2px; }

/* Game details unfold instead of popping open. */
.game .more { display: block; height: 0; overflow: hidden; padding-top: 0; padding-bottom: 0; opacity: 0; transition: height 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease, padding 0.3s; }
.game.open .more { height: auto; opacity: 1; padding-top: 6px; padding-bottom: 4px; animation: none; }
.chev { transition: transform 0.25s ease; }

/* Press feedback on things you tap. */
:is(.seg button, .secnav button, .tab, .chipgame, .tile, .fav, .more-btn, .follow, .cta, .done, .text-btn, .arrow, .sr, .up, .story-row, .lteam, .game.openable):active { transform: scale(0.97); }
:is(.seg button, .secnav button, .tab, .fav, .more-btn, .follow, .text-btn, .sr, .up, .lteam, .story-row) { transition: transform 0.12s ease, background 0.15s, color 0.15s, border-color 0.15s; }

/* Section tabs get a soft shadow once they stick to the top. */
.secbar { transition: box-shadow 0.2s ease, background-color 0.45s ease; }
.secbar.stuck { box-shadow: 0 10px 18px -14px rgba(0, 0, 0, 0.55); }

/* Logos give a little on hover (pointer devices only). */
@media (hover: hover) {
  .fav:hover .fav-logo img, .tcard:hover .tc-logo img, .lteam:hover img { transform: scale(1.08); }
  .fav-logo img, .tc-logo img, .lteam img { transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); }
}

/* Shown only if the app can't start */
.boot-fail { position: fixed; left: 16px; right: 16px; top: 30%; z-index: 100; display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 16px; background: #fff; color: #141414; font: 15px/1.4 system-ui, sans-serif; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); }
.boot-fail[hidden] { display: none; }
.boot-fail code { font-size: 12px; color: #a00; word-break: break-word; }
