/* BowlsSelect canonical design tokens.
   Authority: approved whole-product makeover master pack, 13 September 2026. */
:root {
  color-scheme: light;

  --bs-canvas: #edf0f2;
  --bs-surface: #ffffff;
  --bs-soft: #f3f6f8;
  --bs-text: #152b3b;
  --bs-muted: #516576;
  --bs-line: #d2dbe1;
  --bs-amber: #855600;
  --bs-amber-surface: #fff5dc;
  --bs-success: #236348;
  --bs-success-surface: #eaf5ee;
  --bs-error: #9a3040;
  --bs-focus: #096bbb;
  --bs-action: #087cff;
  --bs-action-hover: #2d92ff;
  --bs-gold: #f2c14e;
  --bs-shadow: 0 3px 5px #0b1f3a10, 0 1px 1px #0b1f3a1a;

  --bs-font: "Segoe UI", Arial, sans-serif;
  --bs-display: "Bahnschrift", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  --bs-space-1: 4px;
  --bs-space-2: 8px;
  --bs-space-3: 12px;
  --bs-space-4: 16px;
  --bs-space-6: 24px;
  --bs-space-8: 32px;
  --bs-radius: 8px;
  --bs-panel-radius: 14px;
  --bs-fast: 120ms;

  --bs-club: #0b1f3a;
  --bs-club-secondary: #ffffff;
  --bs-club-accent: #2e6db4;
  --bs-on-club: #ffffff;
  --bs-club-emblem: none;
  --bs-art: url("./assets/white-bowl-header.png");
  --bs-art-shade: color-mix(in srgb, var(--bs-club) 78%, #000);
  --bs-art-text: #ffffff;

  /* Temporary compatibility aliases while legacy module declarations migrate. */
  --club: var(--bs-club);
  --club2: var(--bs-club-secondary);
  --accent: var(--bs-club-accent);
  --bg: var(--bs-canvas);
  --surface: var(--bs-surface);
  --ink: var(--bs-text);
  --muted: var(--bs-muted);
  --line: var(--bs-line);
  --radius: var(--bs-panel-radius);
  --shadow: var(--bs-shadow);
  --win: var(--bs-success);
  --loss: var(--bs-error);
  --draw: var(--bs-amber);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bs-canvas: #0a141e;
  --bs-surface: #152433;
  --bs-soft: #1b2c3d;
  --bs-text: #f1f5f8;
  --bs-muted: #b5c6d5;
  --bs-line: #3c5368;
  --bs-amber: #f2c36b;
  --bs-amber-surface: #342b1b;
  --bs-success: #91dbb2;
  --bs-success-surface: #20392e;
  --bs-error: #ff9fae;
  --bs-focus: #89c8ff;
  --bs-shadow: 0 4px 8px #0005, 0 1px 1px #ffffff0a;
}

/* Dark-mode-only Selection Board results contrast hotfix, 29 September 2026.
   Keep light mode unchanged. Use both colour and readable text/borders so result
   states remain clear for colour-vision-deficient selectors. */
html[data-theme="dark"] body #screen-board .resultrow-v1 {
  background: #101c28 !important;
  border-top-color: #3f566c !important;
}
html[data-theme="dark"] body #screen-board .resultlabel-v1 {
  background: #526b85 !important;
  color: #ffffff !important;
  border: 1px solid #7189a0 !important;
}
html[data-theme="dark"] body #screen-board .resultbox-v1 {
  background: #172635 !important;
  color: #f3f7fb !important;
  border-color: #50677d !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body #screen-board .resultbox-v1.win {
  background: #163725 !important;
  border-color: #45c977 !important;
  box-shadow: inset 0 0 0 2px #45c977 !important;
}
html[data-theme="dark"] body #screen-board .resultbox-v1.loss {
  background: #401c24 !important;
  border-color: #d94b5b !important;
  box-shadow: inset 0 0 0 2px #d94b5b !important;
}
html[data-theme="dark"] body #screen-board .resultbox-v1.draw {
  background: #403318 !important;
  border-color: #e0a72f !important;
  box-shadow: inset 0 0 0 2px #e0a72f !important;
}
html[data-theme="dark"] body #screen-board .scoreline-v1 span,
html[data-theme="dark"] body #screen-board .scoreline-v1 b {
  color: #d5e2ed !important;
}
html[data-theme="dark"] body #screen-board .scoreline-v1 input {
  background: #0f1a25 !important;
  color: #ffffff !important;
  border-color: #668096 !important;
}
html[data-theme="dark"] body #screen-board .resultstatus-v1 {
  color: #e5edf4 !important;
  font-weight: 1000 !important;
}
html[data-theme="dark"] body #screen-board .resultbox-v1.win .resultstatus-v1 {
  color: #9cf0b8 !important;
}
html[data-theme="dark"] body #screen-board .resultbox-v1.loss .resultstatus-v1 {
  color: #ffb9c1 !important;
}
html[data-theme="dark"] body #screen-board .resultbox-v1.draw .resultstatus-v1 {
  color: #ffd777 !important;
}
html[data-theme="dark"] body #screen-board .overallresult-v1 {
  background: #1a2b3b !important;
  color: #eef5fb !important;
  border-top-color: #4b6379 !important;
}
html[data-theme="dark"] body #screen-board .overallresult-v1.win {
  background: #185232 !important;
  color: #ffffff !important;
  border-top-color: #45c977 !important;
}
html[data-theme="dark"] body #screen-board .overallresult-v1.loss {
  background: #6f1f2a !important;
  color: #ffffff !important;
  border-top-color: #d94b5b !important;
}
html[data-theme="dark"] body #screen-board .overallresult-v1.draw {
  background: #6b4d12 !important;
  color: #ffffff !important;
  border-top-color: #e0a72f !important;
}
