/* Veisla themes (docs/THEMES.md). One block per theme, keyed by the
   data-veisla-theme attribute the server writes on <html> (and the admin
   picker writes on each thumbnail). A theme sets ONLY:
     --twe-accent-h / -s / -l   the single accent the kit derives everything from
     --veisla-display-font      the TV display face
     --veisla-stamp             the stamp glyph (a CSS string)
     --veisla-plate             the TV background plate, url() or none
   Neutral ramp, elevation, type scale and status hues are never touched.
   Loaded after twe-ui/accent.css so the theme hue wins. */

[data-veisla-theme='arcade'] {
  --twe-accent-h: 38; --twe-accent-s: 95%; --twe-accent-l: 55%;
  --veisla-display-font: 'Press Start 2P', var(--twe-font-mono);
  --veisla-stamp: '\1FA99';
  --veisla-plate: url('../plates/arcade.jpg');
}

[data-veisla-theme='holiday'] {
  --twe-accent-h: 356; --twe-accent-s: 73%; --twe-accent-l: 58%;
  --veisla-display-font: var(--twe-font-sans);
  --veisla-stamp: '\1F381';
  --veisla-plate: url('../plates/holiday.jpg');
}

[data-veisla-theme='frost'] {
  --twe-accent-h: 200; --twe-accent-s: 85%; --twe-accent-l: 60%;
  --veisla-display-font: var(--twe-font-sans);
  --veisla-stamp: '\2744';
  --veisla-plate: url('../plates/frost.jpg');
}

[data-veisla-theme='classic'] {
  --twe-accent-h: 356; --twe-accent-s: 73%; --twe-accent-l: 58%;
  --veisla-display-font: var(--twe-font-sans);
  --veisla-stamp: '\2713';
  --veisla-plate: none;
}

[data-veisla-theme='pinball'] {
  --twe-accent-h: 320; --twe-accent-s: 90%; --twe-accent-l: 60%;
  --veisla-display-font: 'Press Start 2P', var(--twe-font-mono);
  --veisla-stamp: '\272A';
  --veisla-plate: url('../plates/pinball.jpg');
}

/* The lightness above is the dark-ground value. Re-assert the kit's own
   light/field lightness (the same values twe-ui/accent.css uses) so a themed
   accent never drops below 4.5:1 on a white or sunlit ground. */
@media (prefers-color-scheme: light) {
  :root[data-veisla-theme]:not([data-twe-theme]) { --twe-accent-l: 44%; }
}
[data-veisla-theme][data-twe-theme='light'] { --twe-accent-l: 44%; }
[data-veisla-theme][data-twe-theme='field'] { --twe-accent-l: 38%; }
