/* Realtime TV – Design-Stile (ARCHITEKTUR 36, Entscheide 47–49).
   Farben pro Stil als Variablen (Datenattribut data-style, kein Inline-Style, CSP-konform), System-Schriften pro Voreinstellung
   (data-font), Vorschau-Muster als reine CSS-Verläufe und die Auswahlkarten des Story-Formulars.
   Quelle der Werte: public/assets/js/styles.js; der Test theme-contrast prüft Übereinstimmung und WCAG-AA-Kontraste. */

:root {
  --ff-condensed: "Avenir Next Condensed", "DIN Condensed", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --ff-serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --ff-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace;
  --ff-rounded: "Avenir Next Rounded", Nunito, "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --ff-slab: Rockwell, "Roboto Slab", "Courier New", serif;
  --ff-geometric: Futura, "Century Gothic", "Avenir Next", "Segoe UI", sans-serif;
  --ff-sans: "Helvetica Neue", Arial, "Segoe UI", sans-serif;
  --ff-comic: "Chalkboard SE", "Marker Felt", "Comic Sans MS", "Trebuchet MS", sans-serif;
}
[data-font="condensed"] { --style-font: var(--ff-condensed); }
[data-font="serif"] { --style-font: var(--ff-serif); }
[data-font="mono"] { --style-font: var(--ff-mono); }
[data-font="rounded"] { --style-font: var(--ff-rounded); }
[data-font="slab"] { --style-font: var(--ff-slab); }
[data-font="geometric"] { --style-font: var(--ff-geometric); }
[data-font="sans"] { --style-font: var(--ff-sans); }
[data-font="comic"] { --style-font: var(--ff-comic); }

[data-style="anime"] { --style-accent: #b3125f; --style-accent2: #ffd54f; }
[data-style="noir_bw"] { --style-accent: #4a4a4a; --style-accent2: #e6e6e6; }
[data-style="vhs_reality"] { --style-accent: #c40018; --style-accent2: #ffe600; }
[data-style="claymation"] { --style-accent: #a8431a; --style-accent2: #ffc94d; }
[data-style="animated_3d"] { --style-accent: #5b35b8; --style-accent2: #ffd23f; }
[data-style="documentary_handheld"] { --style-accent: #2f5d3a; --style-accent2: #dcd3ae; }
[data-style="glossy_commercial"] { --style-accent: #0b6b94; --style-accent2: #ffd166; }
[data-style="watercolor"] { --style-accent: #2a7263; --style-accent2: #f4c7a1; }
[data-style="retro_scifi"] { --style-accent: #b23a08; --style-accent2: #7ee8fa; }
[data-style="silent_film"] { --style-accent: #5b4636; --style-accent2: #f0e0b0; }
[data-style="cinematic_film"] { --style-accent: #a11d1d; --style-accent2: #e8b04a; }
[data-style="comic_book"] { --style-accent: #c22a0c; --style-accent2: #ffe14d; }

/* ---------- Vorschau-Muster (reine CSS-Verläufe, keine Bilder) ---------- */
.style-swatch {
  display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; border: 1px solid rgba(0, 0, 0, .35); background-color: #888;
}
.style-swatch[data-swatch="anime"] {
  background: repeating-conic-gradient(from 0deg at 28% 62%, rgba(255, 255, 255, .6) 0 3deg, transparent 3deg 10deg),
    linear-gradient(135deg, #ff8fb8 0 34%, #7ad0ff 34% 68%, #fff2a8 68%);
}
.style-swatch[data-swatch="noir_bw"] {
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .65) 0 5px, transparent 5px 11px),
    linear-gradient(100deg, #000 0 38%, #8c8c8c 38% 45%, #fff 45% 50%, #262626 50%);
}
.style-swatch[data-swatch="vhs_reality"] {
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .35) 0 2px, transparent 2px 4px),
    linear-gradient(0deg, transparent 0 62%, rgba(255, 255, 255, .5) 62% 66%, transparent 66%),
    linear-gradient(90deg, #ff2d55, #6a2cff 55%, #00e5ff);
}
.style-swatch[data-swatch="claymation"] {
  background: radial-gradient(circle at 30% 62%, #e2703a 0 20%, transparent 21%), radial-gradient(circle at 66% 44%, #5fb39c 0 25%, transparent 26%),
    radial-gradient(circle at 82% 78%, #d94f70 0 11%, transparent 12%), #f0d6a6;
}
.style-swatch[data-swatch="animated_3d"] {
  background: radial-gradient(circle at 36% 36%, #fff 0 5%, #9c8cff 6% 28%, #4a35a8 29% 58%, transparent 59%),
    radial-gradient(circle at 76% 70%, #ffd23f 0 12%, #ff9a3f 13% 22%, transparent 23%), linear-gradient(#bfe3ff, #eaf6ff);
}
.style-swatch[data-swatch="documentary_handheld"] {
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 4px),
    radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, .55) 100%), linear-gradient(#7b8b78 0 55%, #3f4c3d 55%);
}
.style-swatch[data-swatch="glossy_commercial"] {
  background: linear-gradient(115deg, rgba(255, 255, 255, .6) 0 16%, transparent 16% 22%, rgba(255, 255, 255, .25) 22% 28%, transparent 28%),
    linear-gradient(160deg, #0b6b94, #1bb5c8 58%, #ffd166);
}
.style-swatch[data-swatch="watercolor"] {
  background: radial-gradient(ellipse at 24% 32%, rgba(88, 150, 220, .75), transparent 56%), radial-gradient(ellipse at 72% 66%, rgba(240, 140, 150, .7), transparent 56%),
    radial-gradient(ellipse at 56% 24%, rgba(250, 220, 120, .7), transparent 50%), #fbf7ee;
}
.style-swatch[data-swatch="retro_scifi"] {
  background: repeating-linear-gradient(90deg, rgba(126, 232, 250, .55) 0 1px, transparent 1px 14px) 0 100% / 100% 42% no-repeat,
    linear-gradient(#1a0f3a 0 56%, #ff7a3d 56% 60%, #2b0f4a 60%);
}
.style-swatch[data-swatch="silent_film"] {
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .2) 0 1px, transparent 1px 7px),
    radial-gradient(circle at 50% 50%, #f3ead2 0 42%, #6b5a3f 100%);
}
.style-swatch[data-swatch="cinematic_film"] {
  background: linear-gradient(#0a121c 0 13%, transparent 13% 87%, #0a121c 87%), linear-gradient(120deg, #e0a45a, #b5533a 55%, #2c3e50);
}
.style-swatch[data-swatch="comic_book"] {
  background: radial-gradient(circle, rgba(0, 0, 0, .38) 1.2px, transparent 1.7px) 0 0 / 8px 8px, linear-gradient(135deg, #ffe14d 0 50%, #ff4d4d 50%);
}
.style-swatch[data-swatch="free"] {
  background: repeating-linear-gradient(45deg, rgba(128, 128, 128, .35) 0 6px, transparent 6px 12px), linear-gradient(135deg, #cfd3e6, #f5e7c8);
  display: grid; place-items: center;
}
.style-swatch[data-swatch="free"]::after { content: "\270E"; font-size: 1.6rem; color: #2b2b2b; }

/* ---------- Auswahl im Story-Formular ---------- */
.style-pick { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.style-pick legend { font-weight: 600; font-size: .92rem; margin-bottom: 6px; padding: 0; }
.style-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.sty { position: relative; margin: 0; font-weight: 500; }
.sty input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sty > span {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 8px 8px 10px; border: 2px solid var(--line);
  border-radius: var(--r-panel); background: var(--surface);
}
.sty strong { font: 700 1rem/1.1 var(--f-display); }
.sty small { color: var(--ink-2); font-size: .78rem; line-height: 1.3; }
.sty input:checked + span { border-color: var(--phosphor); box-shadow: inset 0 0 0 2px var(--phosphor); background: var(--phosphor-soft); }
.sty input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.sty input:disabled + span { opacity: .55; cursor: not-allowed; }
.style-free-field[hidden] { display: none; }

/* ---------- Programmwahl: Karte im Thema der Story ---------- */
.ch-card[data-style] .ch-link { border-top: 5px solid var(--style-accent); }
.ch-card[data-font] .ch-title { font-family: var(--style-font); font-size: 1.2rem; }
.badge.style-tag { background: var(--style-accent); color: #fff; border-color: transparent; }
