@layer base {
  * { box-sizing: border-box; }
  :root {
    color-scheme: light;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--canvas);
    font-synthesis: none;
  }
  body { margin: 0; line-height: 1.5; background: var(--canvas); }
  [hidden] { display: none !important; }
  img { display: block; max-width: 100%; }
  ul { margin: 0; padding: 0; list-style: none; }
  h1, h2, h3, p { margin: 0; overflow-wrap: anywhere; }
  h1, h2, h3 { font-family: var(--font-heading); line-height: 1.15; font-weight: 800; letter-spacing: -0.03em; text-wrap: balance; }
  a { color: var(--primary-strong); text-underline-offset: 0.18em; }
  button, input { font: inherit; color: inherit; }
  button { cursor: pointer; }
  button:disabled { cursor: default; opacity: 0.4; }
  :focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .skip-link { position: absolute; left: var(--space-4); top: -80px; z-index: var(--z-topbar); padding: var(--space-3) var(--space-4); background: var(--ink); color: var(--canvas); border-radius: var(--radius-1); text-decoration: none; font-weight: 800; }
  .skip-link:focus { top: var(--space-3); }
}

@layer components {
  .button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px var(--space-4); border: 1px solid transparent; border-radius: var(--radius-2); font-weight: 800; text-decoration: none; }
  .button:active { transform: translateY(1px); }
  .button-primary { background: var(--primary-strong); color: var(--surface); }
  .button-primary:hover { background: var(--primary-deep); }
  .button-secondary { background: var(--surface); color: var(--ink); }
  .button-light { background: color-mix(in srgb, var(--primary) 10%, var(--surface)); color: var(--primary-strong); }
  .button-danger { background: var(--danger-strong); color: var(--surface); }
  .text-button { min-height: 44px; padding: var(--space-2) 0; border: 0; background: transparent; color: var(--primary-strong); font-weight: 800; text-decoration: underline; text-underline-offset: 0.18em; }
  .field { display: grid; gap: 6px; }
  .chip, .game-label, .tags li { border-radius: var(--radius-pill); }
  .side-nav { z-index: var(--z-rail); }
  .toast { border-radius: var(--radius-pill); background: var(--scrim-soft); color: var(--surface); }
}
