/* Base tokens (design review 5A).
   Dark by default: players use a phone next to a TV, often in a dark room.
   Fonts (Atkinson Hyperlegible Next, Bricolage Grotesque, both OFL) are self-hosted in task U1;
   until the files land, the fallbacks below apply. */

:root {
  color-scheme: dark light;

  --bg: #10161a;
  --surface: #18222a;
  --text: #e8eef0;
  --muted: #9fb2ba;
  --accent: #f28ca8; /* spoonbill pink: actions, focus, selection */
  --on-accent: #1a0b10; /* text on accent fills */
  --found: #6fbf8e;
  --error: #ff8a7a;
  --hairline: #2a3640;

  --font-body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", sans-serif;
  --font-display: "Bricolage Grotesque", var(--font-body);

  --text-body: 17px;
  --text-id-tip: 19px;
  --text-species-name: 28px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  --radius: 6px;
  --tap-min: 44px;
  --photo-dim: 0.9;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f7f8;
    --surface: #ffffff;
    --text: #14202a;
    --muted: #4a5d68;
    --accent: #b03a60; /* ≥4.5:1 on --bg and with white text (QA ISSUE-002) */
    --on-accent: #ffffff;
    --found: #2f7d52;
    --error: #b3261e;
    --hairline: #d5dee2;
    --photo-dim: 1;
  }
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  accent-color: var(--accent);
  scrollbar-color: var(--hairline) var(--bg);
}

::selection {
  background: color-mix(in srgb, var(--accent) 30%, transparent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:visited {
  color: color-mix(in srgb, var(--accent) 70%, var(--muted));
}

img {
  opacity: var(--photo-dim);
}

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