:root,
html[data-theme='dark'] {
  color-scheme: dark;
  --bg: #101216;
  --mast: #111419;
  --panel: #191d23;
  --panel2: #242932;
  --control: #20252c;
  --hover: #2c323b;
  --line: #393f49;
  --control-line: #737e8c;
  --ink: #f7f8fa;
  --muted: #b8c0cc;
  --brand: #cb2f44;
  --brand-hover: #ae1d32;
  --on-brand: #fff;
  --accent: #ff8b97;
  --accent-border: #cb5364;
  --selected: #39232b;
  --focus: #b8c3cf;
  --green: #89d9a9;
  --positive-bg: #183a2a;
  --red: #ffa6a9;
  --negative-bg: #42242b;
  --warning: #f1cf88;
  --warning-bg: #362e20;
  --opponent: #abcdde;
  --opponent-mark: #91bfd4;
  --shot-make: #ff687b;
  --court-floor: #242930;
  --court-edge: #191c22;
  --court-grain: #b4bdc8;
  --court-line: #b6bfca;
  --video-bg: #08090b;
  --video-overlay: #111419ed;
  --video-ink: #fff;
  --shadow: #0007;
  --shadow-soft: #0004;
  --backdrop: #07090da8;
}

html[data-theme='light'] {
  color-scheme: light;
  --bg: #f4f6f8;
  --mast: #fff;
  --panel: #fff;
  --panel2: #e9edf1;
  --control: #fff;
  --hover: #e2e7ed;
  --line: #c8cfd7;
  --control-line: #75808d;
  --ink: #151a20;
  --muted: #4e5966;
  --brand: #c42036;
  --brand-hover: #a1152a;
  --accent: #a9142a;
  --accent-border: #ad4253;
  --selected: #fbe7eb;
  --focus: #536373;
  --green: #146038;
  --positive-bg: #dcf1e4;
  --red: #9f1f30;
  --negative-bg: #fae4e7;
  --warning: #6b4a0d;
  --warning-bg: #f7efd9;
  --opponent: #315369;
  --opponent-mark: #39677e;
  --shot-make: #b71931;
  --court-floor: #e9edf1;
  --court-edge: #f4f6f8;
  --court-grain: #4e5c6d;
  --court-line: #5b6674;
  --shadow: #15263928;
  --shadow-soft: #15263919;
  --backdrop: #10151b70;
}

/* Let WebKit move/restore focus normally when a sheet opens or closes. */
:root:is([data-focus-input="initial"], [data-focus-input="pointer"]) {
  --focus-style: none;
  --field-focus-color: transparent;
}
/* WebKit can carry pointer focus through Enter, dialog autofocus and Escape. */
:focus-visible,
:where(:root[data-focus-input="keyboard"]) :focus {
  outline: 2px var(--focus-style, solid) var(--focus);
  outline-offset: 2px;
}
