/* Borderless cards use surface depth; keyboard focus keeps its visible outline. */
:root {
  --surface-0: var(--paper);
  --surface-1: var(--white);
  --surface-2: oklch(.95 .008 255);
  --surface-inset: oklch(.95 .008 255);
  --selection: oklch(.93 .035 262);
}
:root[data-theme='dark'] {
  color-scheme: dark;
  /* Ink canvas, lifted graphite cards, and a distinct cobalt action color. */
  --paper: oklch(.16 .012 260);
  --white: oklch(.235 .014 260);
  --surface-2: oklch(.295 .016 260);
  --surface-inset: oklch(.12 .01 260);
  --ink: oklch(.985 .003 260);
  --muted: oklch(.78 .016 260);
  --line: oklch(.35 .015 260);
  --accent: oklch(.76 .14 250);
  --on-accent: oklch(.14 .02 260);
  --action: oklch(.54 .225 263);
  --action-hover: oklch(.575 .215 263);
  --on-action: oklch(1 0 0);
  --navy: oklch(.12 .01 260);
  --green: oklch(.26 .06 158);
  --green-ink: oklch(.84 .14 157);
  --selection: oklch(.28 .07 258);
}
:is(.host-card, .game-card, .empty-inline, .empty-state, .post-card,
  .pick-card, .pick-team, .pick-summary, .bracket-match, .schedule-row,
  .replay-card, .composer, .match-stage, .athlete-card, .valpo-resource,
  .stat-entry, .channel-schedule > a, .stats-panel, .community-teaser,
  .challenge-tabs, .prediction-card, .prediction-team, .ticket,
  .ticket-slots > span, .history-list article, .league-switch,
  .round-tabs button, .tournament-match, .playbook-entry, .friend-card,
  .space-card, .invite-panel, .space-access-options button,
  .space-room-topics article, .friday-fixtures > a, .friday-panel,
  .friday-attendance > button, .friday-empty, .hl-card, .hl-teaser,
  .hl-empty, .hl-search, .hl-filters button, .chip, .button.secondary,
  .boost-button, .file-choice label, .channel-tools .icon-button,
  .widget-choice .icon-button, .gridiron-emblem, .earth-marker) {
  border: 0;
}
:is(input:not([type=range]), textarea, select, #challenge-link,
  .community-form input, .community-form select, .community-form textarea,
  .friday-form input, .friday-form select, .friday-form textarea,
  .invite-form input, .invite-form textarea) {
  border: 0;
  background: var(--surface-inset);
  color: var(--ink);
}
:is(.pick-team, .ticket-slots > span, .boost-button, .empty-state,
  .friday-empty, .hl-empty, .space-access-options button) {
  background: var(--surface-inset);
}
:is(.pick-team.selected, .prediction-team.selected,
  .space-access-options button[aria-pressed=true]) {
  background: var(--selection);
}
/* Fixed-light surfaces in older feature sheets inherit the same theme. */
[data-theme='dark'] :is(.schedule-row, .replay-card, .match-stage,
  .hl-card, .hl-teaser, .hl-filters button, .space-room-topics article) {
  background: var(--surface-1);
}
[data-theme='dark'] :is(.icon-button:hover, .game-card:hover) {
  background: var(--surface-2);
}
[data-theme='dark'] :is(.nav-link.active, .world-row:hover, .world-row.selected,
  .prediction-team.selected, .pick-team.selected, .boost-button.active,
  .round-tabs button.active, .tournament-team.selected,
  .space-access-options button[aria-pressed=true]) {
  background: var(--selection);
  color: var(--accent);
}
[data-theme='dark'] :is(.chip.active, .hl-filters button[aria-pressed=true],
  .league-switch button.active, .hl-save[aria-pressed=true],
  .bracket-match > button.selected, .ticket-slots > span > small,
  .post-byline > button, .fake-score i) {
  background: var(--action);
  color: var(--on-action);
}
[data-theme='dark'] :is(.button.primary, .brand-mark) {
  background: var(--action);
  color: var(--on-action);
}
[data-theme='dark'] .button.primary:hover { background: var(--action-hover); }
[data-theme='dark'] :is(.hl-feature, .hl-feature-image, .hl-thumb,
  .hl-teaser-image, .hl-tag, .hl-video) { background: var(--surface-inset); }
[data-theme='dark'] .challenge-tabs a.active { color: var(--ink); }
[data-theme='dark'] #toast { background: var(--surface-2); color: var(--ink); }
[data-theme='dark'] .hl-search { background: var(--surface-inset); }
[data-theme='dark'] .hl-search input { background: transparent; }
[data-theme='dark'] :is(input, textarea)::placeholder { color: var(--muted); opacity: 1; }
[data-theme='dark'] :is(.source-box, .studio-guide, .friend-card, .friday-shared,
  .picks-promo, .champion, .space-symbol, .space-gate-main > .space-access-label,
  .visitor-banner) { background: var(--selection); color: var(--ink); }
[data-theme='dark'] .visitor-banner { border: 0; }
[data-theme='dark'] .champion h2 { color: var(--accent); }
[data-theme='dark'] .fake-score b { box-shadow: 0 4px 0 var(--surface-inset); }
[data-theme='dark'] .fake-score i { border: 0; }
[data-theme='dark'] :is(.community-teaser, .challenge-finish, .status-label.reviewed,
  .sim-result.won, .schedule-row.up-next, .friday-attendance > button[aria-pressed=true]) {
  background: oklch(.235 .042 157);
}
[data-theme='dark'] :is(.won, .status-label.reviewed, .challenge-finish > .icon,
  .friday-heading .eyebrow, .friday-panel .eyebrow, .friday-empty > svg,
  .friday-watch-empty > svg, .friday-timeline li > svg, .schedule-hq b,
  .friday-attendance > button[aria-pressed=true], .date-block,
  .schedule-row .eyebrow, .v-mark.small, .space-request-label) { color: var(--green-ink); }
[data-theme='dark'] .friday-fixtures > a[aria-current] {
  box-shadow: none;
  background: oklch(.235 .042 157);
  color: var(--green-ink);
}
[data-theme='dark'] :is(.baseball-hero, .connection-banner) {
  background: oklch(.255 .042 80);
  color: var(--ink);
}
[data-theme='dark'] :is(.error, .friday-form-error) { color: oklch(.79 .12 25); }
[data-theme='dark'] .invite-panel { background: var(--surface-1); box-shadow: none; }
[data-theme='dark'] .invite-panel > svg { color: var(--accent); }
[data-theme='dark'] .invite-summary div { border-color: var(--line); }
[data-theme='dark'] .theme-blue { background: oklch(.28 .09 263); }
[data-theme='dark'] .hl-play { color: oklch(.48 .18 264); }
[data-theme='dark'] ::selection { background: var(--selection); color: var(--ink); }
/* Team logos remain on a quiet light backing, preserving the original artwork. */
[data-theme='dark'] .team-badge.has-team-logo {
  background: oklch(.89 .008 265);
  border: 0;
}
[data-theme='dark'] :is(.replay-art, .valpo-crest) > .team-badge { background: transparent; }
/* Tighter corners and solid surfaces keep the dark edition crisp. */
[data-theme='dark'] :is(.host-card, .game-card, .post-card, .pick-card,
  .schedule-row, .replay-card, .composer, .athlete-card, .prediction-card,
  .space-card, .invite-panel, .friday-panel, .hl-card, .hl-teaser, .hl-feature,
  .empty-state) { border-radius: 14px; }
[data-theme='dark'] :is(.button, .pick-team, .prediction-team,
  .space-access-options button) { border-radius: 9px; }
[data-theme='dark'] .nav-link.active { color: var(--ink); }
