/* Die heißen 5 – Schreibspiel für Margot Dimi / „Schreib’ dich frei!“
   Farbwelt aus ihrer Wortmarke: Tintenblau, Türkis, Goldfeder – plus Glut für „heiß“. */

@font-face { font-family: 'Kalam'; font-weight: 400; font-display: swap; src: url('../fonts/kalam-400.woff2') format('woff2'); }
@font-face { font-family: 'Kalam'; font-weight: 700; font-display: swap; src: url('../fonts/kalam-700.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 400 800; font-display: swap; src: url('../fonts/nunito-var.woff2') format('woff2'); }

:root {
  --papier: #FBF7EE;
  --papier-tief: #F3ECDC;
  --karte: #FFFDF8;
  --tinte: #06497F; /* Markenblau aus Margots Wortmarke */
  --tinte-tief: #04345C;
  --text: #1D2A3B;
  --text-leise: #566377;
  --tuerkis: #178F86;
  --tuerkis-hell: #30D5C8;
  --gold: #B8863B;
  --gold-hell: #F2B45A;
  --glut: #E0532A;
  --linie: rgba(23, 69, 127, 0.14);
  --linie-stark: rgba(23, 69, 127, 0.28);
  --fehler: #B42318;
  --auf-tinte: #FFFDF8;
  --schatten: 0 1px 2px rgba(14, 46, 87, 0.06), 0 10px 30px -8px rgba(14, 46, 87, 0.16);
  --schatten-gross: 0 2px 4px rgba(14, 46, 87, 0.06), 0 24px 60px -18px rgba(14, 46, 87, 0.28);
  --klecks-a: rgba(48, 213, 200, 0.16);
  --klecks-b: rgba(23, 69, 127, 0.08);
  --lineatur: rgba(23, 143, 134, 0.10);
  --appbar: #06497F;
  --auf-appbar: #FFFDF8;

  --schrift-hand: 'Kalam', 'Segoe Print', 'Bradley Hand', cursive;
  --schrift: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 20px;
  --radius-klein: 12px;
  --rand: clamp(16px, 4vw, 40px);
  --uebergang: 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="hell"]) {
    --papier: #0D1A2B; --papier-tief: #0A1523; --karte: #13243A; --tinte: #9CC1F4; --tinte-tief: #D6E5FB;
    --text: #E9EFF7; --text-leise: #9DAEC4; --tuerkis: #3FD6C9; --tuerkis-hell: #3FD6C9; --gold: #D9A95A;
    --gold-hell: #FFC46E; --glut: #FF7043; --linie: rgba(156, 193, 244, 0.14); --linie-stark: rgba(156, 193, 244, 0.3);
    --fehler: #FF8A7A; --auf-tinte: #0D1A2B;
    --schatten: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px -8px rgba(0, 0, 0, 0.5);
    --schatten-gross: 0 2px 4px rgba(0, 0, 0, 0.3), 0 24px 60px -18px rgba(0, 0, 0, 0.7);
    --klecks-a: rgba(63, 214, 201, 0.10); --klecks-b: rgba(156, 193, 244, 0.06); --lineatur: rgba(63, 214, 201, 0.07); --appbar: #0B1D33;
    color-scheme: dark;
  }
}
:root[data-theme="dunkel"] {
  --papier: #0D1A2B; --papier-tief: #0A1523; --karte: #13243A; --tinte: #9CC1F4; --tinte-tief: #D6E5FB;
  --text: #E9EFF7; --text-leise: #9DAEC4; --tuerkis: #3FD6C9; --tuerkis-hell: #3FD6C9; --gold: #D9A95A;
  --gold-hell: #FFC46E; --glut: #FF7043; --linie: rgba(156, 193, 244, 0.14); --linie-stark: rgba(156, 193, 244, 0.3);
  --fehler: #FF8A7A; --auf-tinte: #0D1A2B;
  --schatten: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px -8px rgba(0, 0, 0, 0.5);
  --schatten-gross: 0 2px 4px rgba(0, 0, 0, 0.3), 0 24px 60px -18px rgba(0, 0, 0, 0.7);
  --klecks-a: rgba(63, 214, 201, 0.10); --klecks-b: rgba(156, 193, 244, 0.06); --lineatur: rgba(63, 214, 201, 0.07); --appbar: #0B1D33;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
button, .knopf, .steuer-knopf, label { touch-action: manipulation; }
button, .knopf, .steuer-knopf { -webkit-user-select: none; user-select: none; }
/* Im Spiel kein versehentliches Neuladen durch Herunterziehen */
body.im-spiel { overscroll-behavior-y: none; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--papier);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 400ms ease, color 400ms ease;
}
/* Papierstruktur – feines Rauschen, kaum sichtbar */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45  0 0 0 0 .38  0 0 0 0 .25  0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: var(--tinte); text-underline-offset: 3px; }
a:hover { color: var(--tuerkis); }
button { font: inherit; color: inherit; }
svg { display: block; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.nur-leser { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--tuerkis); outline-offset: 3px; border-radius: 8px; }
/* Überschriften bekommen beim Bildschirmwechsel den Fokus (für Screenreader) – ohne Rahmen */
[tabindex="-1"]:focus { outline: none; }

/* Farbkleckse im Hintergrund */
.hintergrund { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.klecks { position: absolute; border-radius: 50%; filter: blur(60px); }
.k1 { width: 46vmax; height: 46vmax; background: var(--klecks-a); top: -18vmax; right: -14vmax; animation: schweben 26s ease-in-out infinite alternate; }
.k2 { width: 38vmax; height: 38vmax; background: var(--klecks-b); bottom: -16vmax; left: -12vmax; animation: schweben 32s ease-in-out infinite alternate-reverse; }
.k3 { width: 18vmax; height: 18vmax; background: rgba(242, 180, 90, 0.10); top: 40%; left: 55%; animation: schweben 22s ease-in-out infinite alternate; }
@keyframes schweben { to { transform: translate(4vmax, 3vmax) scale(1.08); } }

/* Kopf & Fuß ----------------------------------------------------------------- */
.kopf, main, .fuss { position: relative; z-index: 1; }
.kopf {
  position: sticky; top: 0; z-index: 15;
  display: flex; align-items: center; gap: 6px;
  min-height: calc(56px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(8px, calc(var(--rand) - 12px)) 0;
  background: var(--appbar); color: var(--auf-appbar);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), 0 6px 18px -12px rgba(0, 0, 0, 0.5);
}
.marke { display: inline-flex; align-items: center; gap: 10px; padding: 0 6px; text-decoration: none; font-family: var(--schrift-hand); font-weight: 700; font-size: 1.28rem; color: var(--auf-appbar); }
.marke:hover { color: var(--auf-appbar); opacity: 0.9; }
.marke-feder { width: 14px; height: 28px; transform: rotate(35deg); }
.kopf-aktionen { margin-left: auto; display: flex; gap: 4px; }
.kopf-knopf {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--auf-appbar);
  display: grid; place-items: center; cursor: pointer; transition: background-color var(--uebergang);
}
.kopf-knopf[hidden] { display: none; }
.kopf-knopf:hover, .kopf-knopf:focus-visible { background: rgba(255, 255, 255, 0.14); }
.kopf-knopf svg { width: 22px; height: 22px; }
#installieren-knopf { animation: winken 2.4s ease-in-out 1.5s 2; }
@keyframes winken { 0%, 100% { transform: none; } 10%, 30% { transform: rotate(-12deg); } 20%, 40% { transform: rotate(12deg); } 50% { transform: none; } }
.nur-dunkel { display: none !important; }
:root[data-theme="dunkel"] .nur-hell { display: none !important; }
:root[data-theme="dunkel"] .nur-dunkel { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="hell"]) .nur-hell { display: none !important; }
  :root:not([data-theme="hell"]) .nur-dunkel { display: block !important; }
}

main { flex: 1; width: 100%; max-width: 1160px; margin: 0 auto; padding: 8px var(--rand) 32px; overflow-x: clip; }
html, body { overflow-x: clip; }
.fuss { text-align: center; font-size: 0.86rem; color: var(--text-leise); padding: 20px var(--rand) max(24px, env(safe-area-inset-bottom)); }
.fuss p { margin: 0.2em 0; }
.fuss a { color: inherit; }
.fuss-umsetzung { font-size: 0.78rem; opacity: 0.8; }

/* Screens ---------------------------------------------------------------------- */
.screen { animation: auftauchen 520ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.screen[hidden] { display: none; }
@keyframes auftauchen { from { opacity: 0; transform: translateY(14px); } }

.kicker { margin: 0 0 6px; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tuerkis); }
.lead { font-size: 1.14rem; color: var(--text-leise); max-width: 34em; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.4em; color: var(--tinte-tief); }
h2 { font-family: var(--schrift-hand); font-weight: 700; font-size: clamp(1.8rem, 3.4vw, 2.3rem); color: var(--tinte); }
h3 { font-size: 1.1rem; font-weight: 800; }

/* Knöpfe */
.knopf {
  --h: 54px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--h); padding: 0 26px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 800; font-size: 1.02rem; letter-spacing: 0.01em; text-decoration: none; cursor: pointer;
  transition: transform var(--uebergang), box-shadow var(--uebergang), background-color var(--uebergang), color var(--uebergang), border-color var(--uebergang);
  -webkit-tap-highlight-color: transparent;
}
.knopf svg { width: 20px; height: 20px; flex: none; transition: transform var(--uebergang); }
.knopf:hover svg use[href="#i-pfeil"] { transform: translateX(3px); }
.knopf-haupt { background: var(--tinte); color: var(--auf-tinte); box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--tinte) 70%, transparent); }
.knopf-haupt:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px color-mix(in srgb, var(--tinte) 80%, transparent); color: var(--auf-tinte); }
.knopf-haupt:active { transform: translateY(0); }
.knopf-haupt:hover svg { transform: translateX(3px); }
.knopf-zart { background: transparent; border-color: var(--linie-stark); color: var(--tinte); }
.knopf-zart:hover { border-color: var(--tinte); background: color-mix(in srgb, var(--tinte) 6%, transparent); color: var(--tinte); }
.knopf-breit { width: 100%; }
.knopf-gross { --h: 64px; font-size: 1.15rem; padding: 0 40px; }
.knopf[disabled], .knopf[aria-busy="true"] { opacity: 0.7; cursor: progress; transform: none; }
.knopf-link { background: none; border: 0; padding: 10px; min-height: 44px; color: var(--text-leise); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 0.95rem; }
.knopf-link:hover { color: var(--tinte); }

.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); padding: clamp(20px, 3vw, 32px); }
.klein { font-size: 0.84rem; color: var(--text-leise); margin: 12px 0 0; }

/* 1 · Start --------------------------------------------------------------------- */
/* Hero: Margots Kolibri-Motiv randlos oben, ihr Foto darüber, alles zentriert */
.held { display: flex; flex-direction: column; align-items: center; text-align: center; margin: -8px calc(-1 * var(--rand)) 0; padding-bottom: clamp(28px, 5vw, 48px); }
.held-bild { position: relative; width: 100%; height: clamp(180px, 50vw, 320px); overflow: hidden; }
.held-bild img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; animation: einzoomen 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes einzoomen { from { transform: scale(1.08); } }
.held-bild::after { content: ''; position: absolute; inset: auto 0 0; height: 55%; background: linear-gradient(to bottom, transparent, var(--papier)); }
:root[data-theme="dunkel"] .held-bild img { filter: brightness(0.85) saturate(0.95); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="hell"]) .held-bild img { filter: brightness(0.85) saturate(0.95); } }
.held-foto { position: relative; z-index: 1; width: clamp(112px, 30vw, 140px); height: clamp(112px, 30vw, 140px); margin-top: calc(clamp(112px, 30vw, 140px) * -0.62); border-radius: 50%; object-fit: cover; border: 5px solid var(--karte); box-shadow: var(--schatten-gross); animation: auftauchen 700ms 200ms both; }
.held-name { margin: 10px 0 20px; display: flex; flex-direction: column; line-height: 1.2; }
.held-name strong { font-family: var(--schrift-hand); font-weight: 700; font-size: 1.35rem; color: var(--tinte); }
.held-name span { font-size: 0.9rem; color: var(--text-leise); }
.held .kicker, .held .titel, .held .lead { padding: 0 var(--rand); }
.held .lead { margin: 0 auto 26px; }
.held .knopf { width: min(calc(100% - 2 * var(--rand)), 360px); }
.held .knopf svg { transform: rotate(90deg); }
.held .knopf:hover svg { transform: rotate(90deg) translateX(3px); }
.held .knopf.direkt svg, .held .knopf.direkt:hover svg { transform: none; }
@media (min-width: 920px) {
  .held { margin: 18px 0 0; }
  .held-bild { border-radius: 28px; box-shadow: var(--schatten); }
  .held-bild::after { display: none; }
}

.start-raster { display: grid; gap: clamp(20px, 3vw, 32px); align-items: start; }
@media (min-width: 920px) { .start-raster { grid-template-columns: 1fr 1fr; } }
.so-gehts h2 { margin-bottom: 0.1em; }
.start-karten { scroll-margin-top: calc(72px + env(safe-area-inset-top)); }

.titel { margin: 4px 0 18px; font-family: var(--schrift-hand); font-weight: 700; color: var(--tinte); display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 0 0.3em; line-height: 1.05; font-size: clamp(2.9rem, 12.5vw, 5.4rem); letter-spacing: 0.005em; }
.titel-5 {
  position: relative; display: inline-block; font-size: 1.9em; line-height: 0.8; padding-right: 0.06em;
  background: linear-gradient(180deg, var(--gold-hell) 0%, var(--glut) 70%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transform: rotate(-7deg) translateY(0.06em); transform-origin: 50% 80%;
  animation: flackern 5s ease-in-out infinite;
}
.glut-schein { position: absolute; inset: 20% 5% 0; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--glut) 45%, transparent), transparent); filter: blur(18px); z-index: -1; animation: gluehen 3.6s ease-in-out infinite alternate; }
@keyframes flackern { 0%, 100% { transform: rotate(-7deg) translateY(0.06em); } 50% { transform: rotate(-5deg) translateY(0.02em) scale(1.02); } }
@keyframes gluehen { from { opacity: 0.55; transform: scale(0.94); } to { opacity: 1; transform: scale(1.06); } }

.mini-zeitleiste { list-style: none; margin: 22px 0 26px; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); position: relative; max-width: 560px; }
.mini-zeitleiste::before { content: ''; position: absolute; left: 8.33%; right: 8.33%; top: 7px; height: 2px; background: linear-gradient(90deg, var(--tinte) 0 83%, var(--glut) 83% 100%); opacity: 0.35; border-radius: 2px; }
.mini-zeitleiste li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 0.8rem; color: var(--text-leise); padding-top: 22px; }
.mini-zeitleiste li::before { content: ''; position: absolute; top: 1px; width: 14px; height: 14px; border-radius: 50%; background: var(--karte); border: 2.5px solid var(--tinte); }
.mini-zeitleiste li.ziel::before { border-color: var(--glut); background: var(--glut); }
.mini-zeitleiste b { font-weight: 800; color: var(--tinte); font-variant-numeric: tabular-nums; }

.schritte { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; max-width: 34em; }
.schritte li { display: flex; gap: 14px; align-items: flex-start; }
.schritte p { margin: 0; color: var(--text-leise); }
.schritte strong { color: var(--text); }
.schritt-nr { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--schrift-hand); font-weight: 700; font-size: 1.15rem; color: var(--tinte); background: color-mix(in srgb, var(--tuerkis-hell) 22%, transparent); }

.anmelde-karte h2, .willkommen-karte h2 { margin-bottom: 0.2em; }
.anmelde-karte > p { color: var(--text-leise); margin: 0 0 20px; }
.feld { display: grid; gap: 6px; margin-bottom: 16px; }
.feld label { font-weight: 800; font-size: 0.92rem; }
input[type="email"] {
  width: 100%; min-height: 54px; padding: 0 18px; border-radius: 14px;
  border: 1.5px solid var(--linie-stark); background: var(--papier); color: var(--text); font: inherit; font-size: 1.05rem;
  transition: border-color var(--uebergang), box-shadow var(--uebergang);
}
input[type="email"]::placeholder { color: var(--text-leise); opacity: 0.7; }
input[type="email"]:focus { outline: none; border-color: var(--tinte); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tinte) 16%, transparent); }
input[aria-invalid="true"] { border-color: var(--fehler) !important; box-shadow: 0 0 0 4px color-mix(in srgb, var(--fehler) 14%, transparent) !important; }
.feld-fehler { margin: 2px 0 0; color: var(--fehler); font-size: 0.88rem; font-weight: 700; }
.einwilligung { display: flex; gap: 12px; align-items: flex-start; font-size: 0.9rem; color: var(--text-leise); line-height: 1.5; margin-bottom: 6px; cursor: pointer; }
.einwilligung input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--tinte); cursor: pointer; }
.einwilligung.fehlt { color: var(--fehler); }
.anmelde-karte .knopf { margin-top: 14px; }
.demo-hinweis { margin: 14px 0 0; padding: 10px 14px; border-radius: var(--radius-klein); background: color-mix(in srgb, var(--gold-hell) 18%, transparent); color: var(--text); font-size: 0.84rem; }
.willkommen-karte p { color: var(--text-leise); }
.willkommen-karte strong { color: var(--text); word-break: break-all; }
.willkommen-karte .knopf-link { display: block; margin: 8px auto 0; }

/* 2 · Bereit ------------------------------------------------------------------- */
.screen-kopf { text-align: center; margin: clamp(8px, 3vw, 28px) 0 26px; }
.bereit-raster { display: grid; gap: 22px; max-width: 980px; margin: 0 auto; }
@media (min-width: 860px) { .bereit-raster { grid-template-columns: 1fr 1fr; } }
fieldset.karte { margin: 0; min-width: 0; }
legend { font-weight: 800; font-size: 1.1rem; color: var(--tinte-tief); padding: 0; margin-bottom: 16px; float: left; width: 100%; }
.stimmen { clear: both; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.stimme { position: relative; cursor: pointer; }
.stimme input { position: absolute; opacity: 0; inset: 0; }
.stimme-karte {
  display: flex; flex-direction: column; align-items: center; gap: 2px; height: 100%; padding: 20px 12px 16px; border-radius: 16px;
  border: 2px solid var(--linie); background: var(--papier); text-align: center; transition: border-color var(--uebergang), transform var(--uebergang), box-shadow var(--uebergang);
}
.stimme-karte strong { font-size: 1.05rem; }
.stimme-karte small { color: var(--text-leise); }
.stimme:hover .stimme-karte { transform: translateY(-2px); }
.stimme input:checked + .stimme-karte { border-color: var(--tinte); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tinte) 12%, transparent); background: var(--karte); }
.stimme input:focus-visible + .stimme-karte { outline: 3px solid var(--tuerkis); outline-offset: 3px; }
.stimme-foto { position: relative; width: 58px; height: 58px; margin-bottom: 8px; border-radius: 50%; }
.stimme-foto img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid var(--karte); }
.stimme-foto::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--tuerkis); opacity: 0; }
.stimme input:checked + .stimme-karte .stimme-foto::after { opacity: 0.6; }
.spricht .stimme input:checked + .stimme-karte .stimme-foto::after { animation: sprechen 1.1s ease-out infinite; }
@keyframes sprechen { from { opacity: 0.9; transform: scale(1); } to { opacity: 0; transform: scale(1.35); } }
.stimme-welle { display: flex; align-items: center; gap: 4px; height: 58px; margin-bottom: 8px; }
.stimme-welle i { max-height: 30px; }
.stimme-welle i { width: 4px; height: 30%; border-radius: 4px; background: var(--tuerkis); opacity: 0.55; }
.stimme input:checked + .stimme-karte .stimme-welle i { background: var(--tinte); opacity: 1; }
.stimme-welle i:nth-child(2), .stimme-welle i:nth-child(4) { height: 60%; }
.stimme-welle i:nth-child(3) { height: 100%; }
.spricht .stimme input:checked + .stimme-karte .stimme-welle i { animation: welle 0.9s ease-in-out infinite; }
.spricht .stimme-welle i:nth-child(2) { animation-delay: -0.2s !important; }
.spricht .stimme-welle i:nth-child(3) { animation-delay: -0.4s !important; }
.spricht .stimme-welle i:nth-child(4) { animation-delay: -0.6s !important; }
.spricht .stimme-welle i:nth-child(5) { animation-delay: -0.8s !important; }
@keyframes welle { 0%, 100% { transform: scaleY(0.5); } 50% { transform: scaleY(1.25); } }
#probe-knopf { width: 100%; }

.check-liste { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 12px; }
.check-liste li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-leise); }
.check-liste svg { flex: none; width: 24px; height: 24px; padding: 3px; border-radius: 50%; color: var(--auf-tinte); background: var(--tuerkis); margin-top: 1px; }
.optionen { border-top: 1px solid var(--linie); padding-top: 14px; }
.optionen summary { cursor: pointer; font-weight: 800; color: var(--tinte); min-height: 44px; display: flex; align-items: center; gap: 8px; list-style: none; }
.optionen summary::-webkit-details-marker { display: none; }
.optionen summary::after { content: ''; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform var(--uebergang); margin-left: 4px; }
.optionen[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.schalter-liste { display: grid; gap: 4px; padding-top: 6px; }
.schalter { display: flex; align-items: center; gap: 14px; padding: 8px 0; cursor: pointer; }
.schalter input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.schalter-bahn { flex: none; position: relative; width: 48px; height: 28px; border-radius: 99px; background: var(--linie-stark); transition: background-color var(--uebergang); }
.schalter-bahn::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: transform var(--uebergang); }
.schalter input:checked + .schalter-bahn { background: var(--tuerkis); }
.schalter input:checked + .schalter-bahn::after { transform: translateX(20px); }
.schalter input:focus-visible + .schalter-bahn { outline: 3px solid var(--tuerkis); outline-offset: 3px; }
.schalter strong { display: block; font-size: 0.96rem; }
.schalter small { display: block; color: var(--text-leise); font-size: 0.84rem; line-height: 1.35; }
.bereit-aktion { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 30px; }
@media (max-width: 719px) {
  .bereit-aktion { position: sticky; bottom: 0; z-index: 5; margin: 24px calc(-1 * var(--rand)) 0; padding: 14px var(--rand) calc(8px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--papier) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--linie); }
  .bereit-aktion .knopf { width: 100%; }
  .ende-aktionen { flex-direction: column; align-items: stretch; width: min(100%, 420px); }
  .schreibraum-karte .knopf, .install-karte .knopf { width: 100%; }
}

/* 3 · Spiel -------------------------------------------------------------------- */
#s-spiel { display: flex; flex-direction: column; align-items: center; gap: clamp(14px, 2.4vh, 26px); }
#s-spiel[hidden] { display: none; }
.im-spiel .kopf, .im-spiel .fuss { display: none; }
.im-spiel main { padding-top: max(16px, env(safe-area-inset-top)); display: flex; flex-direction: column; }
.im-spiel #s-spiel { flex: 1; justify-content: space-between; }

/* Lineatur wie in einem Schreibheft */
body.im-spiel::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: repeating-linear-gradient(180deg, transparent 0 39px, var(--lineatur) 39px 40px);
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}

.zeitleiste { width: min(100%, 720px); }
.zeitleiste-spur { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.zeitleiste-spur span { position: relative; height: 8px; border-radius: 8px; background: var(--linie); overflow: hidden; }
.zeitleiste-spur i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: var(--tinte); border-radius: inherit; }
.zeitleiste-spur span.aktiv { box-shadow: 0 0 0 3px color-mix(in srgb, var(--tuerkis-hell) 30%, transparent); }
.zeitleiste-spur span:last-child i { background: linear-gradient(90deg, var(--tinte), var(--glut)); }
.zeitleiste-text { display: flex; justify-content: space-between; margin-top: 8px; font-size: 0.86rem; color: var(--text-leise); font-weight: 700; }
#gesamt-rest { font-variant-numeric: tabular-nums; }

.buehne { width: 100%; display: grid; place-items: center; }
.ring { --gr: min(88vw, 54vh, 540px); position: relative; width: var(--gr); height: var(--gr); display: grid; place-items: center; }
.buehnenmodus .ring { --gr: min(90vw, 64vh, 820px); }
.ring-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transform: rotate(-90deg); }
.ring-spur { fill: none; stroke: var(--linie-stark); stroke-width: 1.4; stroke-dasharray: 1.2 5.2; stroke-linecap: round; }
.ring-tinte, .ring-geist { fill: none; stroke: var(--tinte); stroke-width: 5.5; stroke-linecap: round; filter: url(#tinte-rau); transition: stroke 600ms ease; }
.ring-geist { opacity: 0; }
.ring-geist.verblasst { animation: verblassen 1.4s ease-out forwards; }
@keyframes verblassen { from { opacity: 0.9; } to { opacity: 0; stroke-width: 14; } }
.ring.heiss .ring-tinte { stroke: var(--glut); }
.ring.heiss { animation: puls 1s ease-in-out infinite; }
@keyframes puls { 50% { transform: scale(1.012); } }
.ring-feder { transition: opacity 300ms; }
.feder-tropfen { fill: var(--tinte); filter: blur(0.6px); }
.ring.heiss .feder-tropfen { fill: var(--glut); }
/* Die Feder wird im gedrehten SVG positioniert – hier wieder aufrichten */
.ring-feder use { transform-box: fill-box; }

.ring.vorlauf .ring-inhalt { opacity: 0; }
.ring-inhalt { transition: opacity 400ms ease; }
.ring-inhalt { position: relative; width: 78%; display: flex; flex-direction: column; align-items: center; text-align: center; }
.sprecherin { width: 1.9em; height: 1.9em; border-radius: 50%; object-fit: cover; border: 2px solid var(--karte); box-shadow: 0 0 0 0 color-mix(in srgb, var(--tuerkis-hell) 70%, transparent); transition: box-shadow 300ms; flex: none; }
.sprecherin[hidden] { display: none; }
.sprecherin.spricht { animation: sprecherin 1s ease-out infinite; }
@keyframes sprecherin { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tuerkis-hell) 70%, transparent); } to { box-shadow: 0 0 0 9px transparent; } }
.wort-nummer { display: flex; align-items: center; justify-content: center; gap: 0.6em; margin: 0; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; font-size: clamp(0.72rem, calc(var(--gr) * 0.028), 1.1rem); color: var(--tuerkis); min-height: 1.6em; }
.wort-rahmen { position: relative; display: grid; place-items: center; min-height: calc(var(--gr) * 0.3); width: 100%; }
.wort-rahmen::before { /* Tintenklecks hinter dem Wort */
  content: ''; position: absolute; width: 90%; aspect-ratio: 1.9; border-radius: 48% 52% 46% 54% / 55% 45% 55% 45%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--tuerkis-hell) 26%, transparent), transparent 75%);
  transform: scale(0); opacity: 0; transition: transform 900ms cubic-bezier(0.2, 0.8, 0.2, 1.2), opacity 900ms;
}
.wort-rahmen.hat-wort::before { transform: scale(1); opacity: 1; }
.wort {
  position: relative; margin: 0; font-family: var(--schrift-hand); font-weight: 700; color: var(--tinte);
  font-size: var(--wort-groesse, calc(var(--gr) * 0.14)); line-height: 1.05; letter-spacing: -0.01em; word-break: break-word; hyphens: auto;
}
.wort.schreibt { animation: schreiben 1100ms cubic-bezier(0.3, 0.7, 0.2, 1) both; }
@keyframes schreiben {
  0% { clip-path: inset(-20% 100% -20% 0); filter: blur(6px); transform: translateY(6px) rotate(-2deg); }
  60% { filter: blur(0); }
  100% { clip-path: inset(-20% -5% -20% 0); transform: none; }
}
.wort.geht { animation: gehen 380ms ease-in both; }
@keyframes gehen { to { opacity: 0; transform: translateY(-12px) scale(0.96); filter: blur(4px); } }
.wort-nur-hoeren { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--tinte); font-family: var(--schrift-hand); font-weight: 700; font-size: calc(var(--gr) * 0.07); }
.wort-nur-hoeren[hidden] { display: none; }
.wort-nur-hoeren svg { width: calc(var(--gr) * 0.16); height: calc(var(--gr) * 0.16); }
.wort-nur-hoeren.schreibt { animation: auftauchen 700ms both; }
.wort-kategorie { margin: 2px 0 0; min-height: 1.5em; color: var(--text-leise); font-size: clamp(0.8rem, calc(var(--gr) * 0.03), 1.2rem); font-weight: 700; }
.restzeit { margin: clamp(6px, 1.4vh, 16px) 0 0; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.restzeit-zahl { font-size: clamp(1.8rem, calc(var(--gr) * 0.085), 4.2rem); font-weight: 800; font-variant-numeric: tabular-nums; color: var(--tinte-tief); letter-spacing: -0.02em; }
.restzeit-label { font-size: clamp(0.78rem, calc(var(--gr) * 0.028), 1.15rem); color: var(--text-leise); font-weight: 700; }
.ring.heiss .restzeit-zahl { color: var(--glut); }

.countdown { position: absolute; inset: 12%; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--papier) 88%, transparent); backdrop-filter: blur(4px); }
.countdown[hidden] { display: none; }
#countdown-zahl { font-family: var(--schrift-hand); font-weight: 700; font-size: calc(var(--gr) * 0.42); line-height: 1; color: var(--glut); }
#countdown-zahl.poppt { animation: poppen 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes poppen { 0% { transform: scale(1.6); opacity: 0; } 25% { opacity: 1; } 100% { transform: scale(0.9); opacity: 0.15; } }
#countdown-zahl.ansage-text { font-family: var(--schrift-hand); font-size: calc(var(--gr) * 0.065); color: var(--tinte); text-align: center; padding: 0 12%; line-height: 1.25; }

.wortkarten { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(6px, 1.4vw, 14px); width: min(100%, 760px); perspective: 900px; }
.wortkarte { position: relative; height: clamp(64px, 11vh, 92px); transform-style: preserve-3d; transition: transform 800ms cubic-bezier(0.3, 1.4, 0.4, 1); }
.wortkarte.offen { transform: rotateY(180deg); }
.wortkarte > div { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px; text-align: center; }
.karte-rueck { background: color-mix(in srgb, var(--tinte) 7%, var(--karte)); border: 1.5px dashed var(--linie-stark); color: var(--text-leise); }
.karte-rueck b { font-family: var(--schrift-hand); font-size: 1.6rem; color: var(--tinte); line-height: 1; opacity: 0.55; }
.karte-rueck small { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.karte-vorn { transform: rotateY(180deg); background: var(--karte); border: 1.5px solid var(--linie-stark); box-shadow: var(--schatten); }
.karte-vorn strong { font-family: var(--schrift-hand); font-weight: 700; color: var(--tinte); font-size: var(--karten-groesse, 1.1rem); line-height: 1.1; white-space: nowrap; }
.karte-vorn small { font-size: 0.66rem; color: var(--text-leise); font-weight: 700; margin-top: 2px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .karte-vorn small { display: none; } }
.wortkarte.aktuell .karte-vorn { border-color: var(--tuerkis); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tuerkis-hell) 28%, transparent), var(--schatten); }
.wortkarte.naechste .karte-rueck { border-style: solid; border-color: var(--tuerkis); }

.steuerung { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 104px); gap: clamp(8px, 2vw, 16px); justify-content: center; width: 100%; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
.steuer-knopf {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 64px; padding: 8px 6px;
  border-radius: 16px; border: 1px solid var(--linie); background: var(--karte); color: var(--tinte); cursor: pointer; font-size: 0.76rem; font-weight: 800;
  box-shadow: var(--schatten); transition: transform var(--uebergang), border-color var(--uebergang);
}
.steuer-knopf svg { width: 22px; height: 22px; }
.steuer-knopf:hover { transform: translateY(-2px); border-color: var(--linie-stark); }
.steuer-knopf[hidden] { display: none; }
.steuer-knopf:disabled { opacity: 0.45; cursor: default; transform: none; }
.steuer-haupt { background: var(--tinte); color: var(--auf-tinte); border-color: transparent; }
.buehnenmodus .steuerung { opacity: 0.35; transition: opacity 300ms; }
.buehnenmodus .steuerung:hover, .buehnenmodus .steuerung:focus-within { opacity: 1; }

.pause-schicht { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: var(--rand); background: color-mix(in srgb, var(--papier) 70%, transparent); backdrop-filter: blur(10px); animation: auftauchen 300ms both; }
.pause-schicht[hidden] { display: none; }
.pause-karte { text-align: center; background: var(--karte); border: 1px solid var(--linie); border-radius: 24px; box-shadow: var(--schatten-gross); padding: 36px clamp(24px, 5vw, 48px); max-width: 420px; }
.pause-karte p { color: var(--text-leise); }

/* 4 · Ende --------------------------------------------------------------------- */
#s-ende { display: flex; flex-direction: column; align-items: center; gap: 26px; text-align: center; padding-top: clamp(8px, 3vw, 28px); }
#s-ende[hidden] { display: none; }
.ende-kopf { position: relative; max-width: 680px; }
.ende-kopf .lead { margin: 0 auto; }
.ende-titel { font-size: clamp(2.8rem, 8vw, 5rem); margin-bottom: 0.2em; animation: schreiben 1200ms cubic-bezier(0.3, 0.7, 0.2, 1) 150ms both; }
.ende-titel-rahmen { position: relative; display: inline-block; }
.spritzer { position: absolute; inset: -18px clamp(-36px, -3vw, -8px); pointer-events: none; z-index: -1; }
.spritzer i { position: absolute; border-radius: 50%; background: var(--tinte); opacity: 0; animation: spritzen 900ms cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
.spritzer i.t { background: var(--tuerkis-hell); }
.spritzer i.g { background: var(--glut); }
@keyframes spritzen { 0% { opacity: 0; transform: scale(0); } 60% { opacity: 0.7; } 100% { opacity: 0.45; transform: scale(1); } }

.ergebnis-karte { width: min(100%, 560px); text-align: left; position: relative; overflow: hidden; }
.ergebnis-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 12px; margin-bottom: 6px; position: relative; }
.ergebnis-kopf h3 { font-family: var(--schrift-hand); font-size: 1.6rem; color: var(--tinte); margin: 0; white-space: nowrap; }
.ergebnis-datum { font-size: 0.82rem; color: var(--text-leise); }
.ergebnis-liste { list-style: none; margin: 0; padding: 0; position: relative; counter-reset: nr; }
.ergebnis-liste li { counter-increment: nr; display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; padding: 6px 0; border-bottom: 1px dashed var(--linie); animation: auftauchen 500ms both; }
.ergebnis-liste li:last-child { border-bottom: 0; }
.ergebnis-liste li::before { content: counter(nr); flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 0.9rem; color: var(--auf-tinte); background: var(--tinte); align-self: center; }
.ergebnis-liste li:last-child::before { background: var(--glut); }
.ergebnis-liste strong { font-family: var(--schrift-hand); font-size: 1.55rem; color: var(--tinte); line-height: 1.2; }
.ergebnis-liste small { margin-left: auto; color: var(--text-leise); font-size: 0.8rem; white-space: nowrap; }
.ende-aktionen { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.schreibraum-karte { width: min(100%, 720px); display: flex; gap: 24px; align-items: center; text-align: left; background: linear-gradient(90deg, color-mix(in srgb, var(--karte) 20%, transparent), var(--karte) 42%), url('../bilder/kolibri.webp') left 30% center / cover no-repeat; }
/* KI-Kennzeichnung (EU AI Act Art. 50): Das Kolibri-Motiv stammt aus ChatGPT. Als Element statt
   ins Bild gebrannt, weil das Bild je nach Breite beschnitten und unten ausgeblendet wird. */
.ki-hinweis { position: absolute; z-index: 2; right: 12px; bottom: 12px; padding: 3px 8px; border-radius: 6px; background: rgba(17, 17, 17, 0.78); color: #fff; font-size: 0.72rem; font-weight: 700; line-height: 1.3; letter-spacing: 0.02em; pointer-events: none; }
/* Unter 920 px ragt Margots Foto unten ins Bild (s. .held-foto) und oben liegt die App-Leiste
   darüber – der Hinweis sitzt deshalb rechts knapp oberhalb der Foto-Oberkante. */
@media (max-width: 919px) { .held-bild .ki-hinweis { bottom: calc(clamp(112px, 30vw, 140px) * 0.62 + 10px); } }
.schreibraum-karte { position: relative; }
.schreibraum-karte .ki-hinweis { right: auto; bottom: auto; left: 12px; top: 12px; }
.schreibraum-karte h3 { font-family: var(--schrift-hand); font-size: 1.5rem; color: var(--tinte); margin-bottom: 0.3em; }
.schreibraum-karte p:not(.kicker) { color: var(--text-leise); margin: 0 0 16px; }
.schreibraum-foto { flex: none; width: 112px; height: 112px; border-radius: 50%; object-fit: cover; border: 4px solid var(--karte); box-shadow: var(--schatten); }
@media (max-width: 560px) { .schreibraum-karte { flex-direction: column; text-align: center; } .schreibraum-foto { width: 96px; height: 96px; } }

/* Als App ablegen */
.install-karte { width: min(100%, 720px); display: flex; gap: 20px; align-items: center; text-align: left; }
.install-karte[hidden] { display: none; }
.install-karte img { flex: none; width: 64px; height: 64px; border-radius: 16px; box-shadow: var(--schatten); }
.install-karte h3 { font-family: var(--schrift-hand); font-size: 1.4rem; color: var(--tinte); margin-bottom: 0.2em; }
.install-karte p { margin: 0; color: var(--text-leise); }
.install-karte .knopf { flex: none; }
@media (max-width: 719px) { .install-karte { flex-direction: column; text-align: center; } }

.install-sheet {
  position: fixed; left: 50%; bottom: 0; z-index: 25; width: min(100%, 520px); transform: translateX(-50%);
  padding: 22px var(--rand) calc(14px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0;
  background: var(--karte); border: 1px solid var(--linie); border-bottom: 0; box-shadow: 0 -20px 60px -20px rgba(4, 30, 60, 0.45);
  animation: hochschieben 420ms cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
.install-sheet[hidden] { display: none; }
.install-sheet::before { content: ''; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--linie-stark); }
@keyframes hochschieben { from { transform: translate(-50%, 100%); } }
.install-kopf { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.install-kopf img { flex: none; width: 56px; height: 56px; border-radius: 14px; box-shadow: var(--schatten); }
.install-kopf strong { display: block; font-family: var(--schrift-hand); font-size: 1.3rem; color: var(--tinte); line-height: 1.2; }
.install-kopf span { display: block; font-size: 0.92rem; color: var(--text-leise); line-height: 1.45; }
.install-schritte { list-style: none; margin: 0 0 14px; padding: 12px 14px; display: grid; gap: 10px; border-radius: 16px; background: color-mix(in srgb, var(--tuerkis-hell) 12%, transparent); font-size: 0.95rem; line-height: 1.45; }
.install-schritte li { display: flex; gap: 12px; align-items: flex-start; }
.install-schritte .schritt-nr { width: 26px; height: 26px; font-size: 0.95rem; background: var(--karte); }
.install-schritte[hidden], .install-inapp[hidden], .install-pfeil[hidden] { display: none; }
.teilen-symbol { display: inline-block; width: 22px; height: 22px; padding: 2px; vertical-align: -6px; border-radius: 6px; color: #0A84FF; background: var(--karte); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
.install-inapp p { margin: 0 0 12px; font-size: 0.95rem; color: var(--text); }
.install-pfeil { position: absolute; left: 50%; bottom: 4px; margin-left: -14px; width: 28px; height: 28px; color: var(--tuerkis); animation: runterzeigen 1.2s ease-in-out infinite; }
.install-pfeil svg { width: 28px; height: 28px; transform: rotate(90deg); }
@keyframes runterzeigen { 50% { transform: translateY(6px); } }
.install-aktionen { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.install-aktionen [hidden] { display: none; }

/* Hinweis-Toast */
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; max-width: min(92vw, 460px); padding: 12px 20px; border-radius: 14px; background: var(--tinte-tief); color: var(--papier); font-weight: 700; font-size: 0.94rem; box-shadow: var(--schatten-gross); animation: auftauchen 300ms both; }
.toast[hidden] { display: none; }

/* Handy quer / wenig Höhe */
@media (max-height: 560px) and (orientation: landscape) {
  .im-spiel #s-spiel { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr auto; column-gap: 24px; align-items: center; }
  .im-spiel .zeitleiste { grid-column: 1 / -1; width: 100%; }
  .im-spiel .buehne { grid-row: 2 / 4; }
  .ring { --gr: min(62vh, 46vw); }
  .wortkarten { grid-template-columns: repeat(5, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .klecks { animation: none; }
}
