/*
 * Wspólne tokeny projektu „Kółko i krzyżyk” (design/Kolko i krzyzyk.dc.html → sekcja Tokeny).
 * Domyślnie tryb ciemny. Jasny włącza się:
 *   - automatycznie, gdy system preferuje jasny i <html> nie ma data-theme="dark",
 *   - na sztywno przez <html data-theme="light">.
 */

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/manrope-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/manrope-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(0, 0, .2, 1);

  /* Paleta — tryb ciemny (domyślny) */
  --bg: #121417;
  --surface: #1A1D22;
  --surface2: #23272E;
  --line: #343941;
  --text: #E6E3DD;
  --text2: #9CA2A9;
  --x: #D08B6E;
  --o: #7FA6BF;
  --primary: #E6E1D6;
  --on-primary: #121417;

  /* Pochodne (mix() z Ekran.dc.html) */
  --icon-hover: #232527;
  --s2-hover: #2D3037;
  --s2-press: #373A40;
  --pri-hover: #D7D3C9;
  --pri-press: #CDC8BF;
  --win-x: #42393A;
  --win-o: #343E48;
  --dialog: #23272E;
  --dialog-hover: #2F3239;
  --scrim: rgba(0, 0, 0, .6);

  /* Kształty */
  --r-chip: 12px;
  --r-tile: 16px;
  --r-dialog: 28px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #F3F1EC;
    --surface: #FBFAF7;
    --surface2: #E9E6DF;
    --line: #D6D2CA;
    --text: #1E2126;
    --text2: #5E646B;
    --x: #B0664A;
    --o: #4A7690;
    --primary: #2A2E35;
    --on-primary: #F3F1EC;
    --icon-hover: #E6E5E0;
    --s2-hover: #DFDCD6;
    --s2-press: #D5D2CD;
    --pri-hover: #383C42;
    --pri-press: #42454B;
    --win-x: #DFCFC4;
    --win-o: #CCD2D1;
    --dialog: #FBFAF7;
    --dialog-hover: #EEEDEA;
    --scrim: rgba(30, 33, 38, .42);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F3F1EC;
  --surface: #FBFAF7;
  --surface2: #E9E6DF;
  --line: #D6D2CA;
  --text: #1E2126;
  --text2: #5E646B;
  --x: #B0664A;
  --o: #4A7690;
  --primary: #2A2E35;
  --on-primary: #F3F1EC;
  --icon-hover: #E6E5E0;
  --s2-hover: #DFDCD6;
  --s2-press: #D5D2CD;
  --pri-hover: #383C42;
  --pri-press: #42454B;
  --win-x: #DFCFC4;
  --win-o: #CCD2D1;
  --dialog: #FBFAF7;
  --dialog-hover: #EEEDEA;
  --scrim: rgba(30, 33, 38, .42);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
  }
}
