/*
 * Handy (public/index.html). Look „Leuchtreklame bei Nacht“ (SPEC Abschnitt 10): echtes Schwarz,
 * weiße Schrift, Bjola groß, Flächen nur als 3-px-Kontur oder volle Akzentfläche mit schwarzer
 * Schrift, harte versetzte Schatten, ringsum ein fahrender Regenbogen-Rand. Der Startknopf ist der Held.
 * Dazu alles für echte Geräte: iPhone Safari und Android Chrome, 320 px bis Tablet, Hoch- und
 * Querformat, sichere Ränder, eingeblendete Tastatur, kein Zoom, kein Markieren, kein Gummiband,
 * fester dunkler Farbmodus. Akzentfarbe des Akts kommt über die Klasse t-<accent> am <html>.
 */

:root {
  color-scheme: only dark;           /* Farbmodus des Geräts verfälscht nichts, native Felder dunkel */
  --gutter: 20px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --radius: 14px;
  --stroke: 3px;                     /* Kontur aller Flächen und Felder */
  --hard: 5px;                       /* Versatz der harten Schatten */
  --error: #ff4545;                  /* auf Schwarz 6,2:1, Schwarz darauf ebenso */
  --dud-deep: #2b2b2b;               /* Unterseite des grauen Knopfs */
  --say-shadow: var(--accent);       /* versetzter Schatten der großen Schrift */
}

/* Volle Akzentfläche: Schrift Schwarz, Nebentext und Akzentschrift ebenfalls Schwarz,
 * Schatten der großen Schrift Weiß. Gilt für alles darin. */
.loud, .mine:not(.is-pending), .readhint, .sp-ok, .podium,
body.flood .bar, body.flood .main {
  background: var(--accent);
  color: var(--on-accent);
  --muted: var(--on-accent);
  --accent-text: var(--on-accent);
  --say-shadow: var(--white);
}

/* Das Dokument scrollt nie. #app liegt fest über dem ganzen Fenster, nur #main scrollt.
 * Die Leisten (Antwort, Startknopf) liegen im Fluss am unteren Rand und verdecken nie etwas.
 * Hintergrund überall Schwarz, damit Safari-Leisten und Überscrollen nie weiß aufblitzen. */
html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--black);
  color: var(--ink);
}
html { touch-action: manipulation; }            /* kein Doppeltipp-Zoom, keine 300-ms-Verzögerung */
body {
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;                     /* kein Markieren beim schnellen Drücken */
  user-select: none;
  -webkit-touch-callout: none;                   /* kein Menü bei langem Druck */
}
input, textarea { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
/* Lesetexte dürfen markiert werden (langer Druck), Tipps darauf lösen nichts aus */
.read, .read p, .mine-text, .lead-quote { -webkit-user-select: text; user-select: text; }

#app {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  padding: var(--safe-t) var(--safe-r) 0 var(--safe-l);
  background: var(--paper);
}
/* Tastatur offen (iOS legt sie über die Seite): #app folgt dem sichtbaren Bereich, damit
 * Eingabefeld und „Antwort senden“ darüber bleiben. Werte setzt handy.js aus visualViewport. */
body.kb #app {
  bottom: auto;
  height: var(--vv-h, 100%);
  transform: translateY(var(--vv-top, 0px));
  padding-top: 0;
}

/* ---------------- Regenbogen-Rand ----------------
 * Baustein aus base.css. Am Handy: nur fahren, nie pulsieren (Akku). Er folgt den sicheren
 * Rändern, läuft also über dem Home-Balken und neben Notch bzw. Dynamic Island entlang, und
 * hat runde Ecken wie ein Display. pointer-events: none hat der Baustein, er schluckt nie Tipper. */
.rainbow-edge {
  top: var(--safe-t);
  right: var(--safe-r);
  bottom: var(--safe-b);
  left: var(--safe-l);
  border-radius: 22px;
  --rb-turn: 7s;
}
body.kb .rainbow-edge { display: none; }         /* bei offener Tastatur stimmt das Fenster nicht */

/* ---------------- Verbindung ---------------- */

.net {
  position: fixed;
  z-index: 70;
  top: calc(var(--safe-t) + 8px);
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--black);
  box-shadow: inset 0 0 0 var(--stroke) var(--yellow);
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  animation: net-in 300ms ease-out;
}
@keyframes net-in { 0% { opacity: 0; } 100% { opacity: 1; } }
/* Ohne Verbindung zählt kein Druck: Knopf entfärbt und gedimmt, klar anders als aktiv */
body.offline .start { filter: grayscale(1) brightness(.55); }
.noscript { padding: 24px; font-size: 18px; }

/* ---------------- Kopfleiste ---------------- */

.bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 6px var(--gutter) 6px calc(var(--gutter) - 6px);
}
.bar-nick {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 700;
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-score { flex: none; display: flex; align-items: baseline; gap: 5px; font-size: 15px; font-weight: 600; color: var(--muted); }
.bar-score .num { font-family: var(--font-head); font-size: 26px; line-height: 1; color: var(--accent-text); }

.logo-tap {
  flex: none;
  border: 0;
  padding: 0;
  background: none;
  border-radius: 12px;
  touch-action: manipulation;
}
.logo-tap img { pointer-events: none; }
.logo-small { width: 48px; height: 48px; display: grid; place-items: center; }
.logo-small img { width: 42px; height: auto; }
/* Nur das Bild hüpft, die Tap-Fläche bleibt stehen. */
.logo-tap.is-hop img { animation: hop 280ms cubic-bezier(.3, 1.6, .5, 1); }
@keyframes hop {
  0% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-8px) scale(1.06, .96); }
  100% { transform: translateY(0) scale(1); }
}

/* ---------------- Inhalt ---------------- */

.main {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 var(--gutter) 20px;   /* oben 0: sticky klebt sonst unter der Kante */
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  outline: none;
}
body[data-dock="big"] .main { flex: 0 1 auto; }
body[data-dock="none"] .main { display: flex; flex-direction: column; padding-bottom: calc(24px + var(--safe-b)); }
body.has-answerbar .main { padding-bottom: 24px; }

/* Große Schrift: Bjola, Weiß, harter Schatten in Akzentfarbe (auf Akzentfläche: Schwarz mit Weiß) */
.say {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.04;
  text-wrap: balance;
  overflow-wrap: break-word;
  text-shadow: .065em .065em 0 var(--say-shadow);
}
.say-xl { font-size: 48px; }
.say-xxl { font-size: 66px; line-height: .98; }

.lead { font-size: 19px; line-height: 1.42; text-wrap: pretty; overflow-wrap: break-word; }
.lead strong { font-weight: 700; color: var(--accent-text); }

.status { display: flex; flex-direction: column; gap: 14px; padding-top: 8px; }
.status-center { align-items: center; text-align: center; padding-top: 5vh; }

/* Lese-Hinweis (Thomas spricht): Schlüsselzeile, volle Akzentfläche */
.readhint {
  margin-top: 6px;
  padding: 14px 16px;
  border-radius: var(--radius);
  box-shadow: var(--hard) var(--hard) 0 var(--white);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  text-wrap: balance;
}

.center {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 16px 0;
}
.logo-big { width: 104px; height: auto; filter: drop-shadow(var(--hard) var(--hard) 0 var(--accent)); }

/* ---------------- Beitritt ---------------- */

.join { display: flex; flex-direction: column; gap: 14px; padding-top: 18px; }
.join .logo-tap { align-self: flex-start; margin: 0 0 6px -4px; padding: 4px; }
.join-form { display: flex; flex-direction: column; margin-top: 12px; }

.field-label { display: block; font-weight: 700; font-size: 17px; margin: 0 0 8px; }
.nick-row { display: flex; gap: 10px; }

/* Felder: Schwarz mit weißer 3-px-Kontur, Fokus in Akzentfarbe mit hartem Schatten.
 * Schrift in Feldern mindestens 16 px: sonst zoomt iOS beim Fokus. */
.input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 60px;
  padding: 0 16px;
  border: var(--stroke) solid var(--white);
  border-radius: 12px;
  background: var(--black);
  color: var(--white);
  caret-color: var(--accent);
  font-size: 20px;
  font-weight: 600;
  -webkit-appearance: none;
  appearance: none;
  transition: box-shadow 120ms ease-out, border-color 120ms ease-out;
}
.input::placeholder { color: var(--muted); font-weight: 400; opacity: 1; }
.nick-row .input { flex: 1 1 auto; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 4px 4px 0 var(--accent); }
/* „Wird gesendet“: gestrichelt grau, klar anders als ein aktives Feld */
.input:disabled { border-style: dashed; border-color: var(--dud); color: var(--muted); -webkit-text-fill-color: var(--muted); opacity: 1; }
.input[aria-invalid="true"], .input[aria-invalid="true"]:focus { border-color: var(--error); }
.input[aria-invalid="true"]:focus { box-shadow: 4px 4px 0 var(--error); }
/* Autofill (Mail, Telefon) bleibt schwarz statt hellblau bzw. gelb */
.input:-webkit-autofill, .input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--white);
  -webkit-box-shadow: 0 0 0 100px var(--black) inset;
  transition: background-color 99999s;
}

/* Das Kleingedruckte ist ein Spielelement: klein, aber lesbar (Regular statt Light, 10,7:1) */
.smallprint {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
  font-weight: 400;
}
.sp-ok {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  box-shadow: var(--hard) var(--hard) 0 var(--white);
  font-size: 17px;
  font-weight: 700;
}
.sp-dots { flex: none; display: inline-flex; gap: 4px; font-size: 20px; }
.sp-dots .blob-dot { background: var(--on-accent); }
.sp-dots .is-empty { display: none; }

.error {
  align-self: flex-start;
  margin: 10px 0 0;
  padding: 7px 12px;
  border-radius: 8px;
  background: var(--error);
  color: var(--black);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
}

.btn {
  border: 0;
  border-radius: var(--radius);
  font-weight: 700;
  color: var(--ink);
  touch-action: manipulation;
}
/* Hauptknopf: volle Akzentfläche, schwarze Bjola, harter weißer Schatten, gedrückt = ohne Schatten */
.btn-main {
  display: block;
  width: 100%;
  min-height: 62px;
  margin-top: 22px;
  padding: 12px 18px 13px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.05;
  box-shadow: var(--hard) var(--hard) 0 var(--white);
  transition: transform 60ms ease-out, box-shadow 60ms ease-out;
}
.btn-main:not(:disabled):active { transform: translate(var(--hard), var(--hard)); box-shadow: 0 0 0 var(--white); }
/* Gesperrt bzw. „Einen Moment“: grau gestrichelt, ohne Schatten, nicht mit aktiv zu verwechseln */
.btn:disabled { cursor: default; }
.btn-main:disabled {
  background: var(--black);
  color: var(--muted);
  box-shadow: inset 0 0 0 var(--stroke) var(--dud);
  background-image: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(255, 255, 255, .07) 10px 20px);
}
.btn-ghost {
  flex: none;
  min-height: 60px;
  padding: 0 14px;
  background: var(--black);
  box-shadow: inset 0 0 0 var(--stroke) var(--white);
  font-size: 15px;
  line-height: 1.15;
  max-width: 112px;
}
.btn-ghost:not(:disabled):active { background: var(--white); color: var(--black); }
.btn-ghost:disabled { color: var(--muted); box-shadow: inset 0 0 0 var(--stroke) var(--dud); }

/* ---------------- Runde ---------------- */

.round { display: flex; flex-direction: column; padding-top: 4px; }
.round.is-short { flex: 1 0 auto; }
.round.is-short .question { margin-top: auto; padding-top: 24px; }

.round-head {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  margin: 0 calc(-1 * var(--gutter));
  padding: 8px var(--gutter);
  background: var(--paper);
}
.status .round-head { position: static; margin-bottom: 0; background: transparent; padding-top: 4px; padding-bottom: 0; }
/* Runden-Marke: Aufkleber in Akzentfarbe (auf Akzentfläche: schwarz mit Akzentschrift) */
.round-label {
  flex: none;
  padding: 5px 10px 6px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.1;
  letter-spacing: .06em;
  text-transform: uppercase;
}
body.flood .round-label, .podium .round-label { background: var(--black); color: var(--accent); }
.timer { flex: 1 1 auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.timer-bar { flex: 1 1 auto; height: 12px; border-radius: 6px; background: var(--line); overflow: hidden; }
.timer-bar i { display: block; height: 100%; background: var(--accent); transform-origin: left center; transition: transform 200ms linear, background-color 200ms; }
.timer-text { flex: none; min-width: 5.2em; text-align: right; font-size: 18px; font-weight: 700; }
.timer.is-low .timer-text { color: var(--error); }
.timer.is-low .timer-bar i { background: var(--error); }

.round-title { margin: 8px 0 14px; }

/* Lesetext: der Held der Session „Lesen“. Ruhig, Weiß, Signika 19 px, Zeilenhöhe 1,5. */
.read p, p.read {
  font-size: 19px;
  line-height: 1.5;
  max-width: 34ch;
  -webkit-hyphens: auto;
  hyphens: auto;
  hyphenate-limit-chars: 10 4 4;
  text-wrap: pretty;
  overflow-wrap: break-word;
}
.round > .read { margin: 8px 0 4px; }
.texts { display: flex; flex-direction: column; gap: 24px; margin: 8px 0 4px; }
.read-quote { padding-left: 16px; border-left: 5px solid var(--accent); }
.read-label { font-size: 15px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 6px; }

.read-doc {
  margin: 8px 0 4px;
  padding: 16px 16px 16px;
  background: var(--black);
  border: var(--stroke) solid var(--white);
  border-radius: 8px;
}
.doc-head { font-size: 20px; font-weight: 700; line-height: 1.3; margin-bottom: 10px; color: var(--accent-text); }
.read-doc p + p { margin-top: 8px; }
.read-doc b { font-weight: 700; }

.prompt { margin: 18px 0 0; }
.prompt summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 16px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 var(--stroke) var(--white);
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
}
.prompt summary::before { content: "+"; font-family: var(--font-head); font-size: 26px; line-height: 1; color: var(--accent-text); }
.prompt[open] summary::before { content: "–"; }
.prompt summary::-webkit-details-marker { display: none; }
.prompt[open] summary { margin-bottom: 14px; }
.prompt-text { padding-left: 16px; border-left: 5px solid var(--line); }
.prompt-text p + p { margin-top: .75em; }

/* Frage: Bjola, groß */
.question {
  margin: 26px 0 16px;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 29px;
  line-height: 1.08;
  text-wrap: pretty;
  overflow-wrap: break-word;
}

/* Antwort-Kacheln: volle Breite, weiße Kontur, Buchstabenblock in Akzentfarbe (A, B, C …).
 * Gewählt = volle Akzentfläche mit schwarzer Schrift, Buchstabe invertiert. */
.options { display: flex; flex-direction: column; gap: 12px; counter-reset: opt; }
.opt {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 64px;
  padding: 12px 16px 12px 70px;
  border: var(--stroke) solid var(--white);
  border-radius: var(--radius);
  background: var(--black);
  color: var(--white);
  text-align: left;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.22;
  overflow: hidden;
  overflow-wrap: break-word;
  touch-action: manipulation;
  transition: background-color 80ms, color 80ms, transform 80ms, box-shadow 80ms;
}
.opt::before {
  counter-increment: opt;
  content: counter(opt, upper-alpha);
  content: counter(opt, upper-alpha) / "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 54px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 30px;
  line-height: 1;
}
.opt:active { transform: translate(3px, 3px); background: var(--accent); color: var(--on-accent); }
.opt:active::before, .opt.is-on::before { background: var(--black); color: var(--accent); }
.opt.is-on {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--hard) var(--hard) 0 var(--white);
}

/* Schätzen: große Plus/Minus-Tasten, große Zahl */
.guess { display: flex; flex-direction: column; }
.guess-row { display: grid; grid-template-columns: 68px minmax(0, 1fr) 68px; gap: 10px; }
.btn-step {
  height: 72px;
  background: var(--black);
  box-shadow: inset 0 0 0 var(--stroke) var(--white);
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 42px;
  line-height: 1;
  padding: 0 0 4px;
}
.btn-step:active { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0 0 var(--stroke) var(--accent); }
.guess-field {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 72px;
  border: var(--stroke) solid var(--white);
  border-radius: 12px;
  background: var(--black);
  padding-right: 12px;
  transition: box-shadow 120ms ease-out, border-color 120ms ease-out;
}
.guess-field:focus-within { border-color: var(--accent); box-shadow: 4px 4px 0 var(--accent); }
.guess-field .input { flex: 1 1 auto; height: 100%; padding: 0 12px; border: 0; box-shadow: none; background: transparent; font-family: var(--font-head); font-weight: 400; font-size: 34px; }
.guess-field .input:focus { box-shadow: none; }
.guess-field .input::placeholder { font-family: var(--font-text); font-weight: 400; font-size: 18px; color: var(--muted); }
.unit { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 600; color: var(--muted); }

.textarea { height: auto; min-height: 104px; padding: 12px 16px; resize: vertical; line-height: 1.4; font-weight: 400; }
.round .field-label { margin-top: 22px; }
.note { margin-top: 8px; font-size: 15px; line-height: 1.4; color: var(--muted); }

/* Eigene Antwort: gesendet und gespeichert = volle Akzentfläche. Wird gesendet = gestrichelte Kontur. */
.mine {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 4px 0;
  padding: 14px 18px 16px;
  border-radius: var(--radius);
  box-shadow: var(--hard) var(--hard) 0 var(--white);
}
.mine.is-pending { background: var(--black); color: var(--white); box-shadow: none; border: var(--stroke) dashed var(--accent); }
.mine-label { font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mine-value { font-family: var(--font-head); font-size: 34px; line-height: 1.05; overflow-wrap: break-word; }
.mine-text { font-size: 18px; font-weight: 600; margin-top: 4px; overflow-wrap: break-word; }
.mine.is-pending .mine-text { color: var(--muted); }

/* Ergebnis: Punkte als riesige Zahl. Ist es ein Treffer, wird die ganze Fläche Akzent (body.flood). */
.gains { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 28px; margin: 2px 0; }
.gain { display: flex; flex-direction: column; }
.gain-num { font-family: var(--font-head); font-size: 56px; line-height: .95; color: var(--accent-text); }
.gain:first-child .gain-num { font-size: 92px; }
.gain-unit { font-size: 15px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
body.flood .gain-num { text-shadow: 4px 4px 0 var(--white); }
p.read.reveal { margin-top: 2px; font-weight: 600; }
.is-wrong { color: var(--ink); }
.rank-line { font-size: 21px; font-weight: 700; }
.rank-line .num { font-family: var(--font-head); font-weight: 400; font-size: 1.5em; line-height: 1; }

/* Leerlauf: viel Platz über dem Knopf, also groß. Der Spitzname als Aufkleber. */
.idle .say-xl { font-size: 66px; line-height: .98; }
.idle .lead { font-size: 21px; }
.idle .lead strong {
  display: inline-block;
  max-width: 100%;
  margin-top: 8px;
  padding: 5px 12px 7px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 4px 4px 0 var(--white);
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.join .say-xl { font-size: 66px; line-height: .98; }

/* Platz: das Wort normal, die Zahl riesig */
.rank-num { font-size: 1.45em; line-height: .7; color: var(--accent-text); }
.podium {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  padding: 16px 20px 20px;
  border-radius: var(--radius);
  box-shadow: 7px 7px 0 var(--white);
}
.podium .lead { font-weight: 700; }
.podium .rank-num { color: var(--on-accent); }

.thanks { margin-top: 22px; }
.contact { font-size: 18px; font-weight: 600; }
.contact-link {
  display: inline-block;
  padding: 8px 0;
  font-family: var(--font-head);
  font-size: 30px;
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
  text-decoration-color: var(--white);
}

/* ---------------- Startknopf ---------------- */

.dock {
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter) calc(16px + var(--safe-b));
}
/* Groß: die Fläche unter dem Inhalt gehört dem Knopf. Tank und Knopf bleiben zusammen, unten im Daumenbereich. */
body[data-dock="big"] .dock { flex: 1 1 0; min-height: 280px; justify-content: flex-end; }

.dock-meta { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 10px; }
/* Tank: groß und klar. Wort, neun Blobs, Zahl in Bjola. Leer = alles grau. */
.tank { display: flex; align-items: center; gap: 10px; }
.tank-label { font-size: 15px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tank-dots { display: inline-flex; gap: 4px; font-size: 24px; line-height: 1; }
.tank-dots .blob-dot.is-empty { box-shadow: inset 0 0 0 2.5px var(--dud); }
.tank-dots .is-new { animation: fill-in 420ms cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc((var(--i) % 9) * 40ms); }
@keyframes fill-in { 0% { transform: scale(.2); } 100% { transform: scale(1); } }
.sp-dots .is-new { animation: fill-in 420ms cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--i) * 70ms); }
.tank-num { min-width: 1ch; font-family: var(--font-head); font-size: 32px; line-height: 1; color: var(--accent-text); }
.dock.is-dud .tank-label, .dock.is-dud .tank-num { color: var(--muted); }
.dock.is-dud .tank-dots .blob-dot.is-empty { box-shadow: inset 0 0 0 2.5px var(--muted); }

.hint { min-height: 1.35em; font-size: 17px; font-weight: 700; text-align: center; line-height: 1.3; text-wrap: balance; }
.dock.is-all .hint { color: var(--accent-text); font-size: 19px; }
.hint.is-flash { animation: flash 600ms ease-out; }
@keyframes flash { 0%, 40% { color: var(--error); } 100% { color: var(--ink); } }

.dock-pad {
  flex: none;
  padding-top: 12px;
  display: grid;
  place-items: center;
}

/* --btn-w setzt handy.js aus der freien Fläche (ResizeObserver), damit der Blob sie füllt.
 * Oben der Blob in Akzentfarbe mit schwarzer Schrift, darunter als harter Schatten ein
 * Regenbogen-Blob (Verlauf #rb-grad in index.html). Gedrückt verschwindet der Regenbogen. */
.start {
  position: relative;
  width: var(--btn-w, 240px);
  height: calc(var(--btn-w, 240px) * 121.4 / 141.9);
  padding: 0;
  border: 0;
  background: none;
  touch-action: none;              /* der Knopf gehört ganz dem Finger: kein Zoom, kein Scrollen */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.start:focus-visible { outline-offset: 6px; border-radius: 30px; }
.start-base, .start-top { position: absolute; left: 0; right: 0; height: 93.45%; }
.start-base { top: 6.55%; width: 100%; fill: url(#rb-grad) var(--white); }
/* Farben des Verlaufs aus den Tokens (stop-color ist eine CSS-Eigenschaft) */
.rb-s1 { stop-color: var(--pink); }
.rb-s2 { stop-color: var(--orange); }
.rb-s3 { stop-color: var(--yellow); }
.rb-s4 { stop-color: var(--green); }
.rb-s5 { stop-color: var(--blue); }
.rb-s6 { stop-color: var(--purple); }
.start-top { top: 0; display: block; transition: transform 160ms cubic-bezier(.3, 1.7, .5, 1); }
.start-top .blob { width: 100%; height: 100%; }
.start svg { pointer-events: none; }
.start-label {
  position: absolute;
  inset: 0;
  top: 0; left: 0; right: 0; bottom: 0;
  display: grid;
  place-items: center;
  padding-bottom: 4%;
  font-family: var(--font-head);
  font-size: calc(var(--btn-w, 240px) * .21);
  line-height: 1;
  color: var(--on-accent);
  pointer-events: none;
}
.start.is-down .start-top { transform: translateY(7%) scale(.985, .97); transition-duration: 40ms; }
.start.is-bump .start-label { animation: label-pop 220ms ease-out; }
@keyframes label-pop { 0% { transform: scale(.88); } 60% { transform: scale(1.1); } 100% { transform: scale(1); } }

/* Leerer Tank: eindeutig grau, ohne Regenbogen, weiße Schrift (6,7:1) */
.start.is-dud .start-top .blob { fill: var(--dud); }
.start.is-dud .start-base { fill: var(--dud-deep); }
.start.is-dud .start-label { color: var(--white); }
/* Die Schichten wackeln, der Knopf selbst bleibt stehen. */
.start.is-wobble .start-base, .start.is-wobble .start-top { animation: wobble 460ms ease-in-out; }
@keyframes wobble {
  0%, 100% { transform: translateX(0) rotate(0); }
  20% { transform: translateX(-7px) rotate(-4deg); }
  40% { transform: translateX(6px) rotate(3.5deg); }
  60% { transform: translateX(-4px) rotate(-2deg); }
  80% { transform: translateX(2px) rotate(1deg); }
}

/* Antwortleiste: solange eine Antwort aussteht, gibt es keinen Startknopf. Unten im Daumenbereich
 * sitzt dann nur die Antwort-Aktion. Im Fluss unter dem scrollenden Inhalt, verdeckt nie etwas. */
.answerbar {
  flex: none;
  padding: 14px var(--gutter) calc(16px + var(--safe-b));
  background: var(--paper);
  border-top: var(--stroke) solid var(--accent);
}
body.kb .answerbar { padding-bottom: 12px; }
.answerbar .field-label { margin: 0 0 8px; }
.answerbar .btn-main { margin-top: 14px; }
.answerbar > .btn-main:first-child { margin-top: 0; }
.answerbar .btn-quiet { margin-top: 8px; }

/* Übergang: frisch aufgetauchte Ziele nehmen kurz keine Tipper an (Sperre in handy.js) und
 * zeigen das nur optisch („noch nicht scharf“: entfärbt, gedimmt, kleiner). Bewusst kein pointer-events: none. */
body.dock-arming .start { animation: arm-in 650ms ease-out both; }
@keyframes arm-in {
  0% { opacity: .3; transform: scale(.9); filter: grayscale(1); }
  70% { filter: grayscale(1); }
  100% { opacity: 1; transform: none; filter: none; }
}
body.answers-arming .options, body.answers-arming .answerbar { opacity: .5; filter: grayscale(1); }
body.answers-arming .opt:active { transform: none; background: var(--black); color: var(--white); }
body.answers-arming .opt:active::before { background: var(--accent); color: var(--on-accent); }
.options, .answerbar { transition: opacity 180ms ease-out, filter 180ms ease-out; }

/* ---------------- Effekte ---------------- */

.fx { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 50; pointer-events: none; overflow: hidden; }
.puff { position: absolute; display: block; animation: rise 950ms cubic-bezier(.2, .7, .3, 1) forwards; }
.puff .blob { fill: var(--accent); }
.puff .flame {
  position: absolute;
  left: 32%;
  width: 36%;
  top: 72%;
  height: 50%;
  border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
  background: radial-gradient(circle at 50% 30%, var(--yellow), var(--orange) 70%);
  z-index: -1;
}
.puff-text { display: block; font-family: var(--font-head); font-size: 40px; color: var(--white); text-align: center;
  text-shadow: 3px 3px 0 var(--accent), 0 0 4px var(--black); }
@keyframes rise {
  0% { transform: translateY(0) scale(.6); opacity: 0; }
  12% { opacity: 1; transform: translateY(-10px) scale(1); }
  100% { transform: translateY(-260px) scale(.7) rotate(-8deg); opacity: 0; }
}
.puff-misfire { animation: fizzle 700ms ease-out forwards; }
.puff-misfire .blob { fill: var(--dud); }
@keyframes fizzle {
  0% { transform: translateY(0) scale(.6); opacity: 0; }
  25% { transform: translateY(-34px) scale(1); opacity: 1; }
  55% { transform: translateY(-14px) scale(.95, 1.05); opacity: 1; }
  100% { transform: translateY(-22px) scale(1.6); opacity: 0; filter: blur(4px); }
}

/* Aufmerksamkeit („Jetzt du!“, LULUBUBU-10138): Wird am Handy eine Eingabe nötig, flutet der ganze
 * Bildschirm einmal in der Akzentfarbe, darauf ein großes schwarzes Wort mit weißem Aufkleber-Schatten.
 * Genau zwei Helligkeitswechsel (an, dann weich aus), kein Stroboskop (SPEC 10.4). Dauer 640 ms, also
 * innerhalb der Totzeit von 650 ms, in der Antworten und Startknopf noch nichts annehmen. Nimmt nie
 * Tipper an. Der Endzustand der Animation ist unsichtbar: bleibt animationend aus, stört nichts. */
.attn {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-t) + 24px) calc(var(--safe-r) + 16px) calc(var(--safe-b) + 24px) calc(var(--safe-l) + 16px);
  background: var(--accent);
  color: var(--on-accent);
  pointer-events: none;
  visibility: hidden;
  -webkit-user-select: none;
  user-select: none;
}
.attn[hidden] { display: none; }
.attn-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-width: 100%;
  text-align: center;
}
.attn-kicker {
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.2;
  white-space: nowrap;
}
.attn-word {
  display: block;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: min(16vw, 92px);
  line-height: 1;
  white-space: nowrap;
  text-shadow: 5px 5px 0 var(--white);
  transform: rotate(-3deg);
}
.attn.is-on { animation: attn-flash 640ms linear forwards; }
.attn.is-on .attn-word { animation: attn-pop 640ms cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes attn-flash {
  0%, 58% { opacity: 1; visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}
@keyframes attn-pop {
  0% { transform: scale(.72) rotate(-6deg); }
  35% { transform: scale(1.06) rotate(-2deg); }
  50%, 100% { transform: scale(1) rotate(-3deg); }
}
/* Reduzierte Bewegung: keine Fläche, kein Blenden, keine Bewegung. Ein ruhiger Rahmen in Akzentfarbe
 * mit Balken oben, rund eine Sekunde, dann weg. Die Dauer setzt sich gegen die Kurzschaltung aller
 * Animationen in base.css durch (höhere Spezifität); animiert wird nur die Sichtbarkeit, in einem Schritt. */
.attn.is-calm {
  align-items: flex-start;
  padding: 0;
  background: transparent;
  box-shadow: inset 0 0 0 10px var(--accent);
  animation: attn-hold 1000ms linear forwards !important;
}
.attn.is-calm .attn-card {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  width: 100%;
  max-width: none;
  padding: calc(var(--safe-t) + 14px) 20px 14px;
  background: var(--accent);
}
.attn.is-calm .attn-kicker { font-size: 17px; padding: 6px 14px; }
.attn.is-calm .attn-word { font-size: min(11vw, 46px); transform: none; text-shadow: 3px 3px 0 var(--white); }
@keyframes attn-hold {
  0% { visibility: visible; }
  100% { visibility: hidden; }
}

/* Kurzmeldung: weißer Aufkleber mit Akzent-Schatten. Über dem Blatt (z 66): Der Bonus fürs
 * Kleingedruckte kommt im selben Moment wie die Frage nach „Mitspielen“. Nimmt keine Tipper an. */
.toast {
  position: fixed;
  z-index: 68;
  top: calc(var(--safe-t) + 10px);
  left: var(--gutter);
  right: var(--gutter);
  margin: 0 auto;
  max-width: 400px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--black);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.3;
  text-align: center;
  box-shadow: var(--hard) var(--hard) 0 var(--accent);
  pointer-events: none;
}
.toast.is-in { animation: toast-in 260ms cubic-bezier(.3, 1.4, .5, 1); }
@keyframes toast-in { 0% { transform: translateY(-16px); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* ---------------- Schlussfrage (Ansicht ask) ---------------- */

.ask { display: flex; flex-direction: column; padding-top: 20px; }
.ask-q { font-size: 36px; margin-bottom: 20px; }
.lead-form { display: flex; flex-direction: column; }
.lead-text { min-height: 140px; font-size: 18px; line-height: 1.45; }
.count { min-height: 1.3em; margin-top: 6px; font-size: 15px; text-align: right; }
.count.is-over { color: var(--error); font-weight: 700; }

/* Schalter: die ganze Zeile ist Tap-Fläche (mindestens 56 px hoch). Aus: schwarz mit weißer
 * Kontur, an: volle Akzentfläche mit schwarzem Knubbel. */
.switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  margin-top: 16px;
  padding: 8px 0;
  cursor: pointer;
  touch-action: manipulation;
}
.switch input { position: absolute; left: 0; top: 50%; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.switch-track {
  flex: none;
  position: relative;
  width: 64px;
  height: 38px;
  border-radius: 19px;
  background: var(--black);
  box-shadow: inset 0 0 0 var(--stroke) var(--white);
  transition: background-color 160ms ease-out, box-shadow 160ms ease-out;
}
.switch-thumb {
  position: absolute;
  top: 7px;
  left: 7px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--white);
  transition: transform 160ms cubic-bezier(.3, 1.4, .5, 1), background-color 160ms;
}
.switch input:checked + .switch-track { background: var(--accent); box-shadow: inset 0 0 0 var(--stroke) var(--accent); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(26px); background: var(--black); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--accent); outline-offset: 3px; }
.switch-label { font-size: 18px; font-weight: 700; line-height: 1.3; }

.contact-fields { display: flex; flex-direction: column; padding: 4px 0 4px 16px; border-left: 5px solid var(--accent); }
.contact-fields .field-label { margin-top: 14px; }
.contact-note { font-size: 16px; font-weight: 600; }
.privacy { margin-top: 20px; font-size: 15px; line-height: 1.45; color: var(--muted); }

.btn-quiet {
  display: block;
  width: 100%;
  min-height: 50px;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.btn-wide { width: 100%; max-width: none; min-height: 58px; font-size: 18px; }
.lead-quote { font-size: 18px; white-space: pre-line; overflow-wrap: break-word; }

/* Block in der Ansicht end: Frage und Knopf, oder Dank und „Antwort ändern“ */
.lead-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 18px 0 4px;
  padding: 18px;
  background: var(--black);
  border: var(--stroke) solid var(--white);
  border-radius: var(--radius);
}
.lead-card-q { font-family: var(--font-head); font-size: 26px; line-height: 1.08; }
.lead-card .muted { font-size: 17px; }
.lead-card .btn-main { margin-top: 4px; }

/* ---------------- Fragerunde (Ansicht questions, SPEC 13.21) ----------------
 * Wie die Schlussfrage: Formular oben, „Frage senden“ angeheftet unten. Darüber steht die eigene
 * Frage unterwegs (gestrichelt) bzw. kurz der Dank (Akzentfläche), darunter die schon gesendeten. */
.qa-lead { margin: -8px 0 16px; font-size: 18px; }
.qa-text { min-height: 112px; font-size: 18px; line-height: 1.45; }
.qa-who { margin-top: 2px; }
.qa-who strong { font-weight: 700; color: var(--accent-text); overflow-wrap: anywhere; }
.qa-status { margin: 0 0 18px; }
.qa-note { font-size: 16px; font-weight: 600; }
.qa-thanks { font-family: var(--font-head); font-size: 24px; line-height: 1.12; }
.qa-tag {
  align-self: flex-start;
  margin-top: 2px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 2px currentColor;
}
.qa-mine { margin-top: 26px; }
.qa-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.qa-list li { display: flex; flex-direction: column; gap: 4px; padding-left: 14px; border-left: 4px solid var(--accent); }
.qa-q { font-size: 17px; line-height: 1.4; overflow-wrap: break-word; -webkit-user-select: text; user-select: text; }
.qa .lead-card { margin-top: 26px; }
.qa-contact { margin-top: 16px; }

/* ---------------- Foto für deine Rakete: Guckloch (SPEC 11) ----------------
 * Bullauge: weiße 3-px-Kontur, Regenbogenring mit Nieten, schwarzes Glas mit weißer Kontur,
 * harter Schatten in Akzentfarbe. Im Glas Kamera, eigenes Bild, Ladezeichen oder „!“.
 * Ort setzt handy.js: im Hochformat in der freien Fläche über dem Tank (.peep-slot, bekommt nur
 * den Rest, der Startknopf bleibt gleich groß), im Querformat links unter dem Text, sonst klein
 * in der Kopfleiste. */

.peep-slot {
  flex: 1 1 0;                     /* nur die Fläche, die der Knopf ohnehin nicht braucht */
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.peep {
  --d: 120px;
  --ring: calc(var(--d) * .1);
  --rv: max(4px, calc(var(--ring) * .44));
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}
.peep-eye {
  position: relative;
  flex: none;
  display: block;
  width: var(--d);
  height: var(--d);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--hard) var(--hard) 0 var(--accent);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 80ms ease-out, box-shadow 80ms ease-out, opacity 180ms ease-out;
}
button.peep-eye:not([aria-disabled="true"]):active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--accent); }
.peep-eye:focus-visible { outline: 3px solid var(--white); outline-offset: 6px; }
button.peep-eye[aria-disabled="true"] { cursor: default; }
.peep-ring {
  position: absolute;
  top: var(--stroke); right: var(--stroke); bottom: var(--stroke); left: var(--stroke);
  border-radius: 50%;
  background: conic-gradient(from 200deg, var(--rainbow-stops));
}
.peep-rivet {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--rv);
  height: var(--rv);
  margin: calc(var(--rv) / -2) 0 0 calc(var(--rv) / -2);
  border-radius: 50%;
  background: var(--black);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .6);
  transform: rotate(calc(var(--n) * 45deg + 22.5deg)) translateY(calc(var(--d) / -2 + var(--stroke) + var(--ring) / 2));
}
.peep-glass {
  position: absolute;
  top: calc(var(--stroke) + var(--ring)); right: calc(var(--stroke) + var(--ring));
  bottom: calc(var(--stroke) + var(--ring)); left: calc(var(--stroke) + var(--ring));
  overflow: hidden;
  border-radius: 50%;
  background: var(--black);
  box-shadow: 0 0 0 var(--stroke) var(--white);
  color: var(--white);
}
/* Alles im Glas liegt übereinander und mittig (absolut, margin: auto bei fester Größe) */
.peep-glass > * { position: absolute; top: 0; right: 0; bottom: 0; left: 0; margin: auto; }
/* Lichtkante auf dem Glas: ein Bullauge, kein Profilbild */
.peep-glass::after {
  content: "";
  position: absolute;
  top: 9%; right: 9%; bottom: 9%; left: 9%;
  border-radius: 50%;
  border-top: max(2px, calc(var(--d) * .024)) solid rgba(255, 255, 255, .42);
  transform: rotate(-38deg);
  pointer-events: none;
}
.peep-cam { width: 46%; height: 46%; overflow: visible; }
.peep-ok { width: 46%; height: 46%; color: var(--accent-text); }
.peep-img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
/* Lädt: eigenes Bild gedimmt, darüber ein drehender Ring in Akzentfarbe */
.peep-spin {
  width: 62%;
  height: 62%;
  border-radius: 50%;
  border: max(4px, calc(var(--d) * .06)) solid rgba(255, 255, 255, .28);
  border-top-color: var(--accent);
  animation: peep-spin 900ms linear infinite;
}
@keyframes peep-spin { to { transform: rotate(360deg); } }
.is-loading .peep-img { opacity: .45; }
.is-loading .peep-cam { opacity: .3; }
/* Fehler: Ausrufezeichen in Fehlerrot, Bild dahinter blass */
.peep-bang {
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-size: calc(var(--d) * .5);
  line-height: 1;
  color: var(--error);
  text-shadow: 3px 3px 0 var(--black);
}
.is-error .peep-img, .is-error .peep-cam { opacity: .3; }
/* Gesperrt: ruhig grau, ohne Schatten, Kamera durchgestrichen */
.is-blocked .peep-eye { background: var(--dud); box-shadow: none; }
.is-blocked .peep-ring { background: var(--dud-deep); }
.is-blocked .peep-rivet { background: var(--dud); box-shadow: none; }
.is-blocked .peep-glass { box-shadow: 0 0 0 var(--stroke) var(--dud); }
.is-blocked .peep-cam { color: var(--dud); }
.is-blocked .peep-glass::before {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  margin: auto;
  width: 62%;
  height: max(3px, calc(var(--d) * .045));
  border-radius: 3px;
  background: var(--dud);
  transform: rotate(-45deg);
  z-index: 1;
}

.peep-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.peep-title {
  font-family: var(--font-head);
  font-size: 24px;
  line-height: 1.04;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.peep-title.is-error { font-family: var(--font-text); font-size: 17px; font-weight: 700; line-height: 1.3; }
/* Satz zur Einwilligung: gut lesbar, Weiß, nicht klein */
.peep-note { font-size: 15px; line-height: 1.38; text-wrap: pretty; overflow-wrap: break-word; }
.peep-retry { min-height: 46px; max-width: none; margin-top: 4px; padding: 0 14px; font-size: 16px; }
.is-blocked .peep-title { color: var(--muted); }
.is-blocked .peep-note { color: var(--muted); }

/* Querformat: links unter dem Text */
.peep-wrap { margin-top: 18px; }

/* Kopfleiste: kleines Guckloch zwischen Spitzname und Punkten, öffnet das Blatt */
.peep-bar { --d: 44px; --ring: 5px; flex: none; width: auto; }
.peep-bar .peep-eye { box-shadow: 3px 3px 0 var(--accent); }
.peep-bar .peep-glass::after { display: none; }
.peep-bar .peep-cam, .peep-bar .peep-ok { width: 60%; height: 60%; }
.peep-bar .peep-spin { width: 78%; height: 78%; border-width: 3px; }
.peep-bar .peep-bang { font-size: 24px; text-shadow: none; }
.peep-bar.is-blocked .peep-eye { background: var(--dud); }

/* Frisch aufgetaucht: kurz „noch nicht scharf“ (Sperre in handy.js), wie beim Startknopf */
body.peep-arming .peep-eye { opacity: .55; }

/* Unsichtbares Datei-Feld: nie zu sehen, nie antippbar. Ausgelöst nur über das Guckloch. */
.peep-file {
  position: fixed;
  left: -200px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Blatt: Einwilligung bzw. Auswahl „Neues Foto“ / „Foto entfernen“. Mittig, nicht im Daumenbereich
 * des Startknopfs, schwarzer Grund mit weißer Kontur und hartem Akzent-Schatten. */
.sheet {
  position: fixed;
  z-index: 66;
  top: 0; right: 0; bottom: 0; left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-t) + 16px) calc(var(--safe-r) + 16px) calc(var(--safe-b) + 16px) calc(var(--safe-l) + 16px);
}
.sheet-back { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0, 0, 0, .86); }
.sheet-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 14px;
  background: var(--black);
  border: var(--stroke) solid var(--white);
  border-radius: var(--radius);
  box-shadow: 7px 7px 0 var(--accent);
  text-align: center;
  outline: none;
  animation: toast-in 240ms cubic-bezier(.3, 1.4, .5, 1);
}
.peep-sheet { --d: 132px; width: auto; justify-content: center; margin-bottom: 6px; }
.sheet-title { font-size: 30px; }
.sheet-card .peep-note { font-size: 16px; max-width: 30ch; }
.sheet-btns { display: flex; flex-direction: column; align-self: stretch; gap: 10px; margin-top: 6px; }
.sheet-btns .btn-main { margin-top: 0; }
.sheet-btns .btn-ghost { max-width: none; }
.sheet-btns .btn-quiet { min-height: 46px; }
body.sheet-arming .sheet-btns { opacity: .6; }
/* Frage nach „Mitspielen“ (kommt von selbst): höher als mittig, freier Platz oben zu unten 1 : 3.
 * So liegen „Foto machen“ und „Ohne Foto“ ab 390 × 844 über dem Startknopf statt darauf. */
.sheet.is-ask { flex-direction: column; justify-content: flex-start; }
.sheet.is-ask::before, .sheet.is-ask::after { content: ""; min-height: 0; }
.sheet.is-ask::before { flex: 1 1 0; }
.sheet.is-ask::after { flex: 3 1 0; }

/* ---------------- Kleine und niedrige Geräte ---------------- */

/* 320 px (iPhone SE 1. Generation, kleine Androids): etwas weniger Rand, Schrift kleiner */
@media (max-width: 359px) {
  :root { --gutter: 16px; }
  .say { font-size: 29px; }
  .say-xl { font-size: 40px; }
  .say-xxl { font-size: 54px; }
  .ask-q { font-size: 30px; }
  .question { font-size: 25px; }
  .btn-ghost:not(.btn-wide) { max-width: 98px; font-size: 14px; padding: 0 10px; }
  .gain-num { font-size: 46px; }
  .gain:first-child .gain-num { font-size: 74px; }
  .mine-value { font-size: 29px; }
  .tank { gap: 8px; }
  .tank-dots { font-size: 18px; gap: 3px; }
  .tank-num { font-size: 28px; }
  .guess-row { grid-template-columns: 58px minmax(0, 1fr) 58px; gap: 8px; }
  .guess-field .input { font-size: 30px; padding: 0 10px; }
  .opt { padding-left: 62px; font-size: 18px; }
  .opt::before { width: 48px; font-size: 26px; }
  .lead-card-q { font-size: 23px; }
  .contact-link { font-size: 26px; }
  .idle .say-xl, .join .say-xl { font-size: 52px; }
  .idle .lead { font-size: 19px; }
  .idle .lead strong { font-size: 25px; }
  .qa-lead { font-size: 17px; }
  .qa-thanks { font-size: 21px; }
}

/* Niedrige Höhe: Knopf darf kleiner werden */
@media (max-height: 600px) {
  body[data-dock="big"] .dock { min-height: 216px; }
  .say-xl { font-size: 38px; }
  .say-xxl { font-size: 50px; }
  .gain:first-child .gain-num { font-size: 64px; }
  .gain-num { font-size: 44px; }
  .bar { min-height: 52px; padding-top: 2px; padding-bottom: 2px; }
  .dock-meta { gap: 2px; padding-top: 6px; }
  .tank-num { font-size: 26px; }
  .dock-pad { padding-top: 8px; }
  .hint.is-empty { min-height: 0; }             /* leerer Hinweis kostet keine Knopfhöhe */
  .idle .say-xl, .join .say-xl { font-size: 46px; }
  .logo-big { width: 76px; }
  .join { gap: 10px; padding-top: 12px; }
  .result { gap: 10px; }
  .rank-line { font-size: 18px; }
  .peep-sheet { --d: 104px; }                   /* Blatt: Luft für den Toast darüber */
  .qa-text { min-height: 92px; }                /* Fragerunde: Knopf und Haken bleiben näher am Feld */
}

/* Querformat auf dem Handy: zwei Spalten. Links Kopfleiste und Inhalt, rechts Startknopf bzw.
 * Antwortleiste, jeweils über die ganze Höhe. So bleibt für den Text genug Platz.
 * min-width: ein Handy im Hochformat mit offener Tastatur ist auch „breiter als hoch“, aber schmal. */
@media (orientation: landscape) and (max-height: 540px) and (min-width: 560px) {
  #app {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 40%);
    grid-template-rows: auto minmax(0, 1fr);
    padding-bottom: var(--safe-b);
  }
  body[data-dock="none"]:not(.has-answerbar) #app { grid-template-columns: minmax(0, 1fr); }
  .bar { grid-column: 1; grid-row: 1; }
  .main { grid-column: 1; grid-row: 2; }
  body[data-dock="none"] .main { padding-bottom: 16px; }
  .answerbar, .dock { grid-column: 2; grid-row: 1 / 3; min-height: 0; }
  .answerbar {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow-y: auto;
    padding-bottom: 14px;
    border-top: 0;
    border-left: var(--stroke) solid var(--accent);
  }
  body[data-dock="big"] .dock { min-height: 0; justify-content: center; padding-bottom: 10px; }
  .dock-meta { padding-top: 6px; gap: 2px; }
  .dock-pad { padding-top: 6px; }
  .tank { gap: 8px; }
  .tank-dots { font-size: 19px; gap: 3px; }
  .tank-num { font-size: 26px; }
  .status-center { padding-top: 8px; }
  .say { font-size: 30px; }
  .say-xl { font-size: 36px; }
  .say-xxl { font-size: 46px; }
  .gain:first-child .gain-num { font-size: 62px; }
  .gain-num { font-size: 42px; }
  .join { padding-top: 10px; }
  .logo-big { width: 84px; }
  .idle .say-xl, .join .say-xl { font-size: 44px; }
  .idle .lead strong { font-size: 24px; }
  /* Guckloch steht hier links im Inhalt, nicht im Dock */
  .peep-slot { display: none; }
  /* Blatt quer: Bild klein, Knöpfe nebeneinander */
  .sheet-card { max-width: 560px; padding-top: 16px; gap: 8px; }
  .peep-sheet { --d: 84px; margin-bottom: 0; }
  .sheet-title { font-size: 26px; }
  .sheet-btns { flex-direction: row; flex-wrap: wrap; }
  .sheet-btns .btn { flex: 1 1 0; min-width: 140px; min-height: 52px; font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .fx { display: none; }
  /* Ladezeichen steht still (Ring mit Akzentbogen), Blatt ohne Einflug */
  .peep-spin { animation: none; }
  .sheet-card { animation: none; }
  .peep-eye { transition: none; }
}

/* ---------------- Werkzeug-Diashow (SPEC 13.32) ----------------
 * Szene werkzeugschau: je Werkzeug eine Karte über den ganzen Bildschirm (innerhalb der sicheren
 * Ränder), im Takt der Leinwand. Look der Leinwand-Kachel als Leuchtreklame: schwarz, Kontur und Schein
 * im Farbton des Werkzeugs, Plakette mit Kürzel (nur hochkant), Name in Bjola so groß wie möglich
 * (Größe, Zeilen und Satzgröße setzt handy.js wzFit), Satz darunter. Ohne Kopfleiste und Startknopf.
 * Der Regenbogen-Rand ruht, solange Karten laufen, und kommt mit dem Endbild „40 Werkzeuge.“ zurück.
 * Bewegt wird nur transform (Plopp), Name und Satz stehen zusammen mittig unter der Plakette. */
body[data-view="gallery"] #app { max-width: none; padding: 0; }
body[data-view="gallery"] .main { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
body[data-view="gallery"] .rainbow-edge { opacity: 0; }
body[data-view="gallery"].wz-done .rainbow-edge { opacity: 1; }
.wz { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.wz-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  margin: calc(var(--safe-t) + 10px) calc(var(--safe-r) + 10px) calc(var(--safe-b) + 10px) calc(var(--safe-l) + 10px);
}
.wz-card {
  --wz-neon: var(--accent);
  --wz-badge: var(--accent);
  position: absolute;
  inset: 0;
  z-index: 1;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: var(--wz-gap, 16px);
  padding: var(--wz-pad, 20px);
  border: 4px solid var(--wz-neon);
  border-radius: 24px;
  background: var(--black);
  box-shadow: 0 0 28px color-mix(in srgb, var(--wz-neon) 45%, transparent), inset 0 0 22px color-mix(in srgb, var(--wz-neon) 18%, transparent);
  overflow: hidden;
}
.wz-badge {
  flex: none;
  align-self: flex-start;
  box-sizing: border-box;
  width: var(--wz-b, 64px);
  height: var(--wz-b, 64px);
  padding-top: .1em;                 /* Bjola sitzt hoch: optisch mittig */
  border-radius: 22%;
  display: grid;
  place-items: center;
  background: var(--wz-badge);
  color: var(--white);
  font-family: var(--font-head);
  font-size: calc(var(--wz-b, 64px) * .46);
  line-height: 1;
  letter-spacing: .02em;
}
.wz-card.is-wide .wz-badge { display: none; }
/* Name und Satz zusammen mittig im Platz unter der Plakette (wzFit rechnet die Höhe aus) */
.wz-namebox { flex: none; margin-top: auto; }
.wz-name {
  width: 100%;
  margin: 0;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 48px;                   /* Startwert, wzFit setzt die echte Größe */
  line-height: 1.04;
  color: var(--white);
  white-space: nowrap;
  text-shadow: .06em .06em 0 var(--wz-neon);
}
.wz-l { display: block; }
.wz-text {
  flex: none;
  margin: 0 0 auto;
  font-family: var(--font-text);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.3;
  color: #e6e6e6;
  text-wrap: pretty;
  overflow-wrap: break-word;
}
.wz-measure {
  position: absolute;
  left: 0;
  top: 0;
  visibility: hidden;
  white-space: pre;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 100px;
  line-height: 1;
  pointer-events: none;
}
/* Endbild: lila Kontur, die Zahl riesig, „Werkzeuge.“ auf dem Farbband */
.wz-end { justify-content: center; }
.wz-sum { margin: 0; font-family: var(--font-head); font-weight: 400; line-height: 1.04; white-space: nowrap; }
.wz-num { display: block; color: var(--white); text-shadow: .05em .05em 0 var(--accent); }
.wz-word {
  display: inline-block;
  margin-top: .12em;
  padding: .04em .14em 0;
  border-radius: .06em;
  background: var(--accent);
  color: var(--on-accent);
}
/* Vor dem Beitritt: unter dem Endbild „Mitspielen“ */
.wz-join {
  display: none;
  position: absolute;
  z-index: 2;
  left: calc(var(--safe-l) + 10px + var(--gutter));
  right: calc(var(--safe-r) + 10px + var(--gutter));
  bottom: calc(var(--safe-b) + 10px + var(--gutter));
  width: auto;
}
body.wz-done .wz-join { display: block; }
/* Auftritt: kurz und kräftig, nur per transform. Die vorige Karte ist schon weg, die neue ist vom ersten
 * Bild an voll da (kein Ausblenden, kein leeres Bild zwischen zwei Karten: im schnellen Teil sonst Flackern). */
.wz-card.is-pop { animation: wz-pop 260ms cubic-bezier(.2, .8, .3, 1) both; }
@keyframes wz-pop {
  0%   { transform: scale(.86); }
  55%  { transform: scale(1.035); }
  100% { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wz-card.is-pop { animation: none; }
}
