/* Speedchtime - Erscheinungsbild.
   Siebdruck-Plakat trifft Bleistiftzeichnung: kraeftige Fluessigfarben, harte Tuschekonturen,
   versetzte Schatten, Rasterpunkte. Der Countdown ist das Herzstueck. */

/* Alle Schriften liegen im Projekt und stehen unter freier Lizenz
   (Lizenztexte neben den Dateien in assets/fonts). */
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/roboto-400.woff2") format("woff2");
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/roboto-700.woff2") format("woff2");
}

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../assets/fonts/archivo-800.woff2") format("woff2");
}

/* Countdown und Restzeit: Comic-Optik, angelehnt an einen kraeftigen Comic-Font. */
@font-face {
  font-family: "Comic Neue";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/comicneue-700.woff2") format("woff2");
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; height: 100%; }

/* Handy und Tablet: kein Gummiband beim Ziehen, kein Doppeltipp-Zoom. */
html { overscroll-behavior: none; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: #1b1712;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  touch-action: manipulation;
}

button, input, select, textarea { font: inherit; color: inherit; }

/* Nur die Definitionen der SVG-Filter, nichts Sichtbares. */
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Auf dem Handy laeuft die App nur im Querformat: im Hochformat erscheint dieser Hinweis. */
.dreh-hinweis {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-5);
  text-align: center;
  background: var(--ink);
  color: var(--paper);
}

.dreh-hinweis__bild { width: min(38vw, 170px); height: auto; color: var(--mustard); }

.dreh-hinweis__de, .dreh-hinweis__en {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  letter-spacing: 0.02em;
}

html[lang="en"] .dreh-hinweis__de, html:not([lang="en"]) .dreh-hinweis__en { display: none; }

@media (orientation: portrait) and (max-width: 560px) {
  .dreh-hinweis { display: flex; }
}
h1, h2, h3, p { margin: 0; }

/* ---------- Hintergrund ---------- */

.app { position: relative; min-height: 100vh; min-height: 100dvh; overflow: hidden; isolation: isolate; }

.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #1b1712; }

.backdrop__image {
  position: absolute;
  inset: -6%;
  background-image: url("../assets/muender-quer.jpg");
  background-size: cover;
  background-position: center;
  filter: grayscale(1) contrast(1.12) brightness(1.06);
  animation: backdrop-drift 54s ease-in-out infinite alternate;
}

.backdrop__color {
  position: absolute;
  inset: 0;
  background: linear-gradient(152deg, #efb03c 0%, #e8823a 20%, #d7263d 44%, #c33c7d 66%, #6e4a9e 84%, #12796f 100%);
  mix-blend-mode: multiply;
  opacity: 0.86;
}

.backdrop__dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(22, 18, 12, 0.55) 1.1px, transparent 1.3px);
  background-size: 7px 7px;
  mix-blend-mode: multiply;
  opacity: 0.3;
}

.backdrop__veil {
  position: absolute;
  inset: 0;
  background: radial-gradient(125% 88% at 50% 4%, rgba(252, 246, 231, 0.34) 0%, rgba(22, 18, 12, 0.46) 80%);
}

.backdrop__glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(32% 26% at 50% 50%, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 72%);
  mix-blend-mode: screen;
  animation: backdrop-glow 22s ease-in-out infinite alternate;
}

/* Nur eine leichte Bewegung: bei staerkerem Zoom wuerden die Gesichter am Rand
   wieder angeschnitten. */
@keyframes backdrop-drift {
  from { transform: scale(1) translate3d(-1%, -0.6%, 0); }
  to { transform: scale(1.03) translate3d(1%, 0.6%, 0); }
}

@keyframes backdrop-glow {
  from { transform: translate3d(-12%, -8%, 0); opacity: 0.34; }
  to { transform: translate3d(12%, 10%, 0); opacity: 0.66; }
}

/* ---------- Muender als Bildelemente (Ausschnitte aus der Zeichnung) ---------- */

.mouth {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  background-color: var(--paper-2);
}

/* Je Ausdruck eine eigene, sauber aus der Zeichnung geschnittene Kachel.
   Im Startband stehen sie in dieser Reihenfolge: Frau, Mann, Frau, Mann, Frau. */
.mouth--smile { background-image: url("../assets/mund-frau-ohne-lippenstift.jpg"); }
.mouth--grin { background-image: url("../assets/mund-mann-vollbart.jpg"); }
.mouth--laugh { background-image: url("../assets/mund-frau-lippenstift.jpg"); }
.mouth--beard { background-image: url("../assets/mund-mann-ohne-bart.jpg"); }
.mouth--yell { background-image: url("../assets/mund-frau-beisst-lippe.jpg"); }
.mouth--shout { background-image: url("../assets/mund-mann-rufend.jpg"); }

/* ---------- Grundgeruest ---------- */

.screen {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Alle vier Seiten: im Querformat liegen Notch und Home-Anzeige seitlich. */
  padding:
    calc(env(safe-area-inset-top, 0px) + var(--space-3))
    calc(env(safe-area-inset-right, 0px) + var(--space-3))
    calc(env(safe-area-inset-bottom, 0px) + var(--space-3))
    calc(env(safe-area-inset-left, 0px) + var(--space-3));
  gap: var(--space-3);
  animation: screen-in var(--speed) ease-out;
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.label {
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--mute);
}

/* ---------- Schaltflaechen ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--tap);
  padding: 0 var(--space-5);
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--text-md);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--hard-sm);
  transition: transform var(--speed) ease, box-shadow var(--speed) ease, background var(--speed) ease;
}

.button:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.button:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.button--primary { background: var(--red); color: var(--paper); }
.button--ghost { background: var(--paper); }
.button--quiet { background: rgba(252, 246, 231, 0.92); }
.button--large { min-height: 84px; font-size: var(--text-lg); width: 100%; }
.button--small { min-height: 44px; padding: 0 var(--space-3); font-size: var(--text-sm); box-shadow: 2px 2px 0 var(--ink); }

/* Der Startknopf als Farbwalze: Zylinder mit Achszapfen an beiden Enden. */
.button--walze {
  position: relative;
  overflow: visible;
  padding: 0 var(--space-5);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0 4%, rgba(255, 255, 255, 0) 13% 87%, rgba(0, 0, 0, 0.24) 96% 100%),
    linear-gradient(180deg, #e8515f 0%, var(--red) 46%, #8f0f1e 100%);
}

.button--walze::before,
.button--walze::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 30px;
  height: 30px;
  margin-top: -15px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fffdf6 0%, #d9cdb3 56%, #776e5d 100%);
  box-shadow: 2px 2px 0 var(--ink);
}

.button--walze::before { left: -11px; }
.button--walze::after { right: -11px; }

.button:focus-visible, .flag:focus-visible, .option:focus-within, .segment input:focus-visible + span {
  outline: 4px solid var(--ink);
  outline-offset: 3px;
}

/* ---------- Startbildschirm ---------- */

.screen--start { align-items: center; justify-content: space-between; text-align: center; overflow-y: auto; }

.start__brand { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); margin-top: auto; }

.start__title {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  gap: 0.015em;
  padding: 0 0.1em;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 0.9rem + 6.6vw, 5.4rem);
  line-height: 1;
  color: var(--paper);
  text-shadow: 4px 4px 0 var(--ink), -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink);
}

/* Jeder Buchstabe sitzt von Hand gesetzt: eigene Drehung, eigene Hoehe. */
.letter {
  display: inline-block;
  transform: rotate(var(--turn, 0deg)) translateY(var(--lift, 0px)) scale(var(--scale, 1));
}

/* Das d liegt schraeger und hat eine andere Farbe. */
.letter--accent {
  color: var(--mustard);
  text-shadow: 5px 5px 0 var(--ink), -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink);
}

.start__swipe {
  position: absolute;
  left: -3%;
  right: -3%;
  top: 64%;
  height: 1.1rem;
  border-radius: 999px;
  background: var(--red);
  transform: rotate(-1.9deg);
  z-index: -1;
}

.start__swipe--2 {
  top: 24%;
  height: 0.65rem;
  background: var(--teal);
  transform: rotate(1.5deg);
}

.start__edition {
  display: inline-flex;
  align-items: center;
  padding: 6px 18px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--hard-sm);
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.start__lead {
  max-width: 36ch;
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--paper);
  text-shadow: 2px 2px 0 rgba(22, 18, 12, 0.7);
  line-height: 1.4;
}

.start__claim {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--paper);
  text-shadow: 3px 3px 0 var(--ink), -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink);
}

/* Die englische Zeile steht kleiner und ruhiger unter der deutschen. */
.start__lead--en, .start__claim--en, .start__prompt--en {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.start__lead--en { max-width: none; opacity: 0.85; }
.start__claim--en { text-shadow: 2px 2px 0 rgba(22, 18, 12, 0.7); opacity: 0.9; }
.start__prompt--en { padding: 3px 12px; font-size: 0.68rem; letter-spacing: 0.14em; opacity: 0.85; }

.start__prompt {
  display: inline-block;
  padding: 6px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 800;
}

.mouth-strip { display: flex; gap: var(--space-2); justify-content: center; align-items: flex-end; }

.mouth-strip .mouth {
  width: clamp(44px, 7vw, 76px);
  border: 3px solid var(--ink);
  border-radius: 13px;
  box-shadow: var(--hard-sm);
}

.mouth-strip .mouth:nth-child(odd) { transform: rotate(-2.6deg); }
.mouth-strip .mouth:nth-child(even) { transform: rotate(2deg) translateY(-7px); }

.flags { display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: center; align-items: center; }

.flag {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  width: clamp(150px, 28vw, 214px);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--radius-xl);
  box-shadow: var(--hard);
  cursor: pointer;
  transition: transform var(--speed) ease, box-shadow var(--speed) ease;
  animation: flag-sway 5.5s ease-in-out infinite;
}

.flag:nth-child(2) { animation-delay: -2.6s; }
.flag:hover { transform: translateY(-6px) rotate(-0.8deg); box-shadow: 10px 10px 0 var(--ink); }
.flag:active { transform: translateY(0) scale(0.99); box-shadow: var(--hard-sm); }

.flag__canvas {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 3px solid var(--ink);
}

.flag__canvas svg { display: block; width: 100%; height: 100%; }
.flag__name { font-family: var(--font-display); font-size: var(--text-lg); letter-spacing: 0.04em; }
.flag__hint { font-size: var(--text-xs); color: var(--mute); font-weight: 700; }

@keyframes flag-sway {
  0%, 100% { transform: rotate(-1.1deg) translateY(0); }
  50% { transform: rotate(1.1deg) translateY(-6px); }
}

/* Nur auf dem iPhone im Browser: Safari kann dort kein echtes Vollbild.
   Der Hinweis sagt, wie die App ohne Browserleiste laeuft. */
.start__ios-hint {
  max-width: 42ch;
  padding: 6px 14px;
  border: 2px solid rgba(252, 246, 231, 0.5);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1.35;
  color: var(--paper);
  text-shadow: 1px 1px 0 rgba(22, 18, 12, 0.8);
}

.start__ios-hint[hidden] { display: none; }

.start__foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  font-size: var(--text-xs);
  color: var(--paper);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: auto;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(22, 18, 12, 0.55);
}

/* ---------- Einstellungen ---------- */

.screen--setup { gap: var(--space-3); }

.setup__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 8px 16px 8px 8px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--hard-sm);
  width: fit-content;
}

.setup__titles { display: flex; flex-direction: column; gap: 2px; }

.setup__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--ink);
  letter-spacing: 0.01em;
}

.setup__sub { font-size: var(--text-xs); letter-spacing: 0.2em; text-transform: uppercase; color: var(--red); font-weight: 800; }

/* Die scrollenden Bereiche zeigen keinen Balken mehr: der duenne dunkle Streifen
   wirkte wie ein Strich ueber den Karten bzw. ueber dem Startknopf. Gescrollt wird
   weiter mit Finger, Mausrad oder Pfeiltasten. Waagerecht darf nichts ueberlaufen. */
.setup__body, .run__grid, .run__reveals, .overlay__panel {
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.setup__body::-webkit-scrollbar, .run__grid::-webkit-scrollbar,
.run__reveals::-webkit-scrollbar, .overlay__panel::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.setup__ribbon {
  grid-column: 1 / -1;
  height: 15px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red) 0%, var(--orange) 26%, var(--mustard) 48%, var(--teal) 74%, var(--purple) 100%);
  box-shadow: 3px 3px 0 var(--ink);
  transform-origin: 50% 0;
  animation: ribbon-in 780ms cubic-bezier(0.2, 0.9, 0.25, 1.04) both;
}

@keyframes ribbon-in {
  from { transform: translateY(-320%) rotate(-1.6deg); opacity: 0; }
  72% { transform: translateY(8%) rotate(0.7deg); opacity: 1; }
  to { transform: none; opacity: 1; }
}

.setup__body {
  flex: 1;
  display: grid;
  /* 20 Pixel mehr Luft zwischen den Karten (der Faden oben waechst mit). */
  gap: calc(var(--space-2) + 20px);
  grid-template-columns: 1fr;
  align-content: start;
  overflow-y: auto;
  min-height: 0;
  padding-bottom: var(--space-1);
}

@media (min-width: 900px) {
  .setup__body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setup__body > .card--wide { grid-column: 1 / -1; }
}

.setup__foot { display: flex; gap: var(--space-3); align-items: center; }

.option {
  --accent: var(--ink);
  --accent-ink: var(--paper);
  --rest: 0deg;
  position: relative;
  transform: rotate(var(--rest));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
  padding: 10px var(--space-4) 10px 10px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--hard-sm);
  /* Alle Karten stehen gerade, bleiben aber ruhig in Bewegung. Das Wabern beginnt
     ohne Vorlauf, sonst springt die Karte beim Uebergang aus dem Einzug. */
  animation: karten-schweben 5.3s ease-in-out infinite alternate;
}

/* 'translate' laeuft unabhaengig von 'transform': Einzug und Ruckeln bleiben unberuehrt. */
@keyframes karten-schweben {
  from { translate: 0 0; }
  to { translate: 0 -7px; }
}

/* Leicht welliger Rand in der Farbe der jeweiligen Nummer (Siebdruck-Look).
   Der Wellenverlauf beginnt in jeder Karte oben links. */
.option__rand {
  position: absolute;
  inset: -8px;
  border: 4px solid var(--accent);
  border-radius: calc(var(--radius-lg) + 8px);
  filter: url(#wackelrand);
  pointer-events: none;
}

.option[data-accent="red"] { --accent: var(--red); }
.option[data-accent="orange"] { --accent: var(--orange); }
.option[data-accent="mustard"] { --accent: var(--mustard); --accent-ink: var(--ink); }
.option[data-accent="teal"] { --accent: var(--teal); }
.option[data-accent="blue"] { --accent: var(--blue); }
.option[data-accent="magenta"] { --accent: var(--magenta); }

/* Jede Karte haengt an einem Faden, der am Band bzw. an der Karte darueber ansetzt.
   Der Knoten sitzt genau ueber der Nummer. */
.option::before {
  content: "";
  position: absolute;
  left: 31px;
  top: calc((var(--space-2) + 20px) * -1);
  width: 3px;
  height: calc(var(--space-2) + 20px);
  background: var(--ink);
  opacity: 0.75;
}

.option::after {
  content: "";
  position: absolute;
  left: 24px;
  top: -7px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--ink);
}

/* Die Karte wird am Band ins Bild gezogen - jede mit eigenem Versatz. */
.option.is-entering {
  /* Weiches Einfahren ohne Bogen: danach uebernimmt das Wabern. */
  animation: pull-in 640ms cubic-bezier(0.22, 0.75, 0.28, 1) both;
  animation-delay: calc(var(--index, 0) * 110ms + 60ms);
}

@keyframes pull-in {
  from { transform: translateY(-26px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Kurzer Ruck beim Umschalten: als haette jemand am Band gezogen. */
.option.is-tugged { animation: tug 700ms cubic-bezier(0.25, 0.9, 0.3, 1.1); }

@keyframes tug {
  0% { transform: translateY(0) rotate(var(--rest)); }
  30% { transform: translateY(11px) rotate(calc(var(--rest) - 1deg)); }
  64% { transform: translateY(-4px) rotate(calc(var(--rest) + 0.6deg)); }
  100% { transform: translateY(0) rotate(var(--rest)); }
}

.option__extra.is-opening { animation: extra-open 380ms cubic-bezier(0.2, 0.9, 0.3, 1.05); }

@keyframes extra-open {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}

.option__badge {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--font-display);
  font-size: 1.3rem;
}

.option__body { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.option__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.option__text { display: flex; flex-direction: column; gap: 4px; }
.option__title { font-size: var(--text-md); font-weight: 800; }
.option__hint { font-size: var(--text-sm); color: var(--ink-2); line-height: 1.35; }
.option__extra { display: flex; flex-direction: column; gap: var(--space-2); }
.option__extra[hidden] { display: none; }

.switch { position: relative; display: inline-flex; flex: 0 0 auto; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.switch__track {
  width: 86px;
  height: 48px;
  border-radius: 999px;
  background: var(--paper-3);
  border: 3px solid var(--ink);
  display: inline-flex;
  align-items: center;
  padding: 3px;
  box-shadow: inset 2px 2px 0 rgba(22, 18, 12, 0.14);
  transition: background var(--speed) ease;
}

.switch__thumb {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--ink);
  transition: transform var(--speed) cubic-bezier(0.3, 0.9, 0.4, 1.2);
}

.switch input:checked + .switch__track { background: var(--accent); }
.switch input:checked + .switch__track .switch__thumb { transform: translateX(36px); }

.segmented { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.segment { position: relative; }
.segment input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.segment span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  min-height: 48px;
  padding: 0 var(--space-3);
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-2);
  font-size: var(--text-sm);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  transition: background var(--speed) ease, color var(--speed) ease, transform var(--speed) ease;
}

.segment input:checked + span {
  background: var(--accent);
  color: var(--accent-ink);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}

/* ---------- Ablauf ---------- */

.screen--run { gap: var(--space-3); }

.run__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }

.run__headline {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper);
  text-shadow: 2px 2px 0 var(--ink);
}

.run__grid {
  flex: 1;
  display: grid;
  gap: var(--space-3);
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  overflow-y: auto;
  min-height: 0;
}

@media (min-width: 700px) and (orientation: landscape) {
  .run__grid { grid-template-columns: minmax(0, 1fr) minmax(440px, 1.05fr); align-items: start; }
  .run__side { position: sticky; top: 0; }
}

/* Auf dem Handy steht der Countdown oben: er ist das Herzstueck, die Karten laufen darunter. */
@media (max-width: 899px) {
  .run__grid { gap: var(--space-2); }
  .run__side { order: -1; }
  .timer { padding: var(--space-2) var(--space-2) var(--space-3); gap: var(--space-1); }
  .timer__speaker { width: clamp(60px, 17vw, 88px); }
  .timer__dial { width: min(56vw, 286px); }
}

.run__stack { display: flex; flex-direction: column; gap: 4px; min-height: 0; }
.run__side { display: flex; flex-direction: column; gap: var(--space-3); }

/* Thema und Redensart bleiben stehen, die Einblendungen scrollen in ihrem eigenen Bereich. */
.run__reveals {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  flex: 0 0 auto;
  max-height: 42vh;
  min-height: 0;
}

@media (min-width: 700px) and (orientation: landscape) {
  .run__grid { align-items: stretch; }
  .run__reveals { flex: 1 1 auto; max-height: none; }
}

/* Karten als schmale Zeilen: Beschriftung links, Inhalt daneben. So passen bis zu
   neun Karten untereinander, ohne dass unten etwas abgeschnitten wird. */
.card {
  --accent: var(--ink);
  --accent-ink: var(--paper);
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  padding: 11px 16px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-left: 10px solid var(--accent);
  border-radius: var(--radius-md);
  box-shadow: 4px 4px 0 var(--ink);
}

.card--topic { --accent: var(--magenta); }
.card--role { --accent: var(--mustard); --accent-ink: var(--ink); }
.card--word { --accent: var(--red); }
.card--gesture { --accent: var(--teal); }

.card--topic .card__value { font-family: var(--font-display); font-weight: 800; font-size: var(--text-lg); }

.card__label {
  flex: 0 0 auto;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--accent);
}

.card--role .card__label { color: #a8730f; }
.card--topic .card__label { color: #a32c68; }
.card--word .card__label { color: #b81e31; }
.card--gesture .card__label { color: #0e6159; }

.card__value { flex: 1 1 auto; min-width: 0; font-size: var(--text-lg); line-height: 1.1; }

/* Sehr flache Fenster (Handy quer): die Karten ruecken noch enger zusammen,
   damit auch dort bis zu neun Karten untereinander sichtbar bleiben. */
.card--flash { animation: card-flash 620ms cubic-bezier(0.2, 0.9, 0.3, 1.2); }

@keyframes card-flash {
  0% { opacity: 0; transform: translateY(18px) rotate(-0.6deg) scale(0.96); }
  60% { opacity: 1; transform: translateY(0) rotate(0.2deg) scale(1.01); }
  100% { opacity: 1; transform: none; }
}

/* ---------- Countdown: das Herzstueck ---------- */

.timer {
  --timer-color: var(--teal);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-3) var(--space-4);
  /* Wie das Startfenster: hell-orange Flaeche. */
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 60%),
    var(--orange-2);
  border: 4px solid var(--ink);
  border-radius: var(--radius-xl);
  box-shadow: var(--hard);
}

.timer[data-band="late"] { --timer-color: var(--orange); }
.timer[data-band="ending"] { --timer-color: var(--red); }

.timer__label {
  font-size: var(--text-xs);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--timer-color);
}

.timer__speaker {
  width: clamp(76px, 12vw, 118px);
  border: 3px solid var(--ink);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--hard-sm);
  background: var(--paper-2);
}

/* Im Startfenster des Beitrags stehen Mann und Frau nebeneinander. */
.timer__speaker--paar {
  width: clamp(150px, 42vw, 230px);
  display: flex;
  gap: var(--space-2);
  align-items: flex-end;
  border: none;
  background: none;
  box-shadow: none;
  overflow: visible;
}

.timer__speaker--paar .mouth {
  flex: 1 1 0;
  width: auto;
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: var(--hard-sm);
  background-color: var(--paper-2);
}

/* Logo und Muenderpaar im Redebildschirm: etwas kleiner als im Startfenster. */
.timer__logo { margin-bottom: calc(var(--space-1) * -1); }
.timer__logo .start__title { font-size: clamp(1.35rem, 0.75rem + 3.4vw, 2.4rem); }
.timer__logo .start__swipe { height: 0.5rem; top: 66%; }
.timer__logo .start__swipe--2 { height: 0.3rem; top: 26%; }

/* Die Uhr richtet sich auch nach der Fensterhoehe: auf flachen Tablet-Fenstern
   (1024 x 768) schob sie sonst den Rest der Karte unter den Bildrand. */
.timer__dial { position: relative; width: min(56vw, 34vh, 356px); aspect-ratio: 1; display: grid; place-items: center; }

/* Bei jeder vollen Minute: die Restzeit in Minuten, weiss mit blauem Rand, fuenf Sekunden. */
.timer__minute {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 19vw, 7.5rem);
  line-height: 1;
  color: var(--paper);
  opacity: 0;
  pointer-events: none;
  text-shadow:
    -5px -5px 0 var(--blue), 5px -5px 0 var(--blue), -5px 5px 0 var(--blue), 5px 5px 0 var(--blue),
    -5px 0 0 var(--blue), 5px 0 0 var(--blue), 0 -5px 0 var(--blue), 0 5px 0 var(--blue),
    7px 7px 0 rgba(22, 18, 12, 0.3);
}

.timer__minute.is-visible { animation: minutenzahl 5s ease-in-out both; }

@keyframes minutenzahl {
  0% { opacity: 0; transform: scale(0.7); }
  10% { opacity: 1; transform: scale(1); }
  82% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.06); }
}

/* Punktkranz statt Striche: am Zifferblatt und an der Countdown-Uhr. */
.punktkranz {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--ink);
  opacity: 0.45;
}

.timer__halo {
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--timer-color) 0%, rgba(255, 255, 255, 0) 70%);
  animation: halo-breathe 3.6s ease-in-out infinite;
}

/* Der Haupt-Countdown: eine Farbflaeche, die mit jeder Sekunde gegen den Uhrzeigersinn
   kleiner wird. Gruen am Anfang, orange ab 40 Sekunden, rot und blinkend ab 20 Sekunden. */
.timer__flaeche {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  /* Ohne Startwinkel beginnt die Kante oben bei 12 Uhr und laeuft im Uhrzeigersinn weg. */
  background: conic-gradient(rgba(22, 18, 12, 0.06) 0 calc((1 - var(--timer-rest, 1)) * 1turn), var(--timer-color) 0);
  transition: background 900ms linear;
}

.timer[data-band="ending"] .timer__flaeche { animation: flaeche-blinkt 760ms ease-in-out infinite; }

@keyframes flaeche-blinkt {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.timer.is-ending { animation: timer-alarm 620ms ease-in-out infinite; }

@keyframes halo-breathe {
  0%, 100% { opacity: 0.16; transform: scale(0.96); }
  50% { opacity: 0.34; transform: scale(1.04); }
}

@keyframes timer-alarm {
  0%, 100% { box-shadow: var(--hard); background: #fff2f4; transform: scale(1); }
  50% { box-shadow: var(--hard), 0 0 0 28px rgba(215, 38, 61, 0.34); background: #ffccd5; transform: scale(1.02); }
}

@keyframes digits-alarm {
  0%, 100% { color: var(--red); }
  50% { color: #78071a; }
}

/* Zusaetzlich pulsiert ein roter Rahmen um den ganzen Bildschirm. */
.app.is-ending::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border: 16px solid rgba(215, 38, 61, 0.4);
  animation: frame-alarm 620ms ease-in-out infinite;
}

@keyframes frame-alarm {
  0%, 100% { border-color: rgba(215, 38, 61, 0.32); }
  50% { border-color: rgba(215, 38, 61, 0.92); }
}

.app.is-ending .backdrop__veil { animation: veil-alarm 620ms ease-in-out infinite; }

@keyframes veil-alarm {
  0%, 100% { background-color: rgba(215, 38, 61, 0); }
  50% { background-color: rgba(215, 38, 61, 0.55); }
}

.preview {
  position: fixed;
  right: calc(env(safe-area-inset-right, 0px) + var(--space-3));
  bottom: calc(env(safe-area-inset-bottom, 0px) + var(--space-3));
  width: min(28vw, 230px);
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 4px solid var(--paper);
  box-shadow: var(--hard);
  background: var(--ink);
  z-index: 5;
}

.preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }

.preview__badge {
  position: absolute;
  left: 8px;
  top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--red);
  color: var(--paper);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.preview__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--paper); animation: dot-pulse 1.4s ease-in-out infinite; }

@keyframes dot-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ---------- Fenster ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  background: rgba(22, 18, 12, 0.62);
  backdrop-filter: blur(7px) saturate(1.25);
  animation: screen-in var(--speed) ease-out;
}

.overlay__panel {
  position: relative;
  width: min(720px, 94vw);
  max-height: 92vh;
  overflow-y: auto;
  padding: var(--space-5) var(--space-4) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: center;
  text-align: center;
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: var(--radius-xl);
  box-shadow: 12px 12px 0 rgba(22, 18, 12, 0.6);
}

.overlay__panel::before {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  top: -4px;
  height: 16px;
  border: 4px solid var(--ink);
  border-bottom: none;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: linear-gradient(90deg, var(--mustard) 0%, var(--orange) 22%, var(--red) 45%, var(--magenta) 66%, var(--purple) 82%, var(--teal) 100%);
}

.overlay__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Das Startfenster des Beitrags: hell-orange Flaeche mit dunkelgruener Schrift. */
.overlay__panel--start { background: var(--orange-2); }

.overlay__panel--start .label,
.overlay__panel--start .overlay__title,
.overlay__panel--start .overlay__text,
.overlay__panel--start .overlay__topic,
.overlay__panel--start .overlay__count { color: var(--teal); }

/* Das Thema bleibt in derselben Groesse wie auf dem Redebildschirm. */
.overlay__panel--start .overlay__topic { font-size: var(--text-lg); line-height: 1.1; }

.overlay__text { font-size: var(--text-md); color: var(--ink-2); line-height: 1.4; max-width: 44ch; }

.overlay__panel--applause { width: min(800px, 94vw); }

.overlay__question {
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.35;
  max-width: 42ch;
}

/* Das klatschende Publikum als laengliches Bild. */
.applause-banner {
  width: 100%;
  aspect-ratio: 2.6;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--hard-sm);
  background: var(--paper-2);
}

.applause-banner__image { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }

.button--back { padding: 0 var(--space-6); min-height: 66px; }

.overlay__topic {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1.08;
  max-width: 26ch;
}

.overlay__count-wrap {
  --count-size: clamp(170px, 30vw, 250px);
  position: relative;
  width: var(--count-size);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 4px solid var(--ink);
  box-shadow: var(--hard);
  background: radial-gradient(circle at 50% 38%, #fff8e6 0%, var(--paper-2) 100%);
  overflow: hidden;
}

/* Der kurze Startcountdown zeigt Ziffern; der Ring laeuft als Fortschritt mit. */
.overlay__count-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--red) calc(var(--count-progress, 0) * 1turn), rgba(22, 18, 12, 0.1) 0);
  -webkit-mask: radial-gradient(circle, rgba(0, 0, 0, 0) 0 80%, #000 81%);
  mask: radial-gradient(circle, rgba(0, 0, 0, 0) 0 80%, #000 81%);
}

.overlay__count {
  position: relative;
  font-family: var(--font-fun);
  /* Groesse an den Kreis gekoppelt: so wird die Ziffer nie unten abgeschnitten. */
  font-size: calc(var(--count-size, 200px) * 0.44);
  line-height: 1;
  color: var(--teal);
  text-shadow: 3px 3px 0 rgba(22, 18, 12, 0.12);
}

.overlay__count.is-red { color: var(--red); }

.overlay__count-kranz { position: absolute; inset: 0; border-radius: 50%; }
.overlay__count-kranz .punktkranz { fill: var(--ink); opacity: 0.4; }

/* Das Logo im Countdown-Fenster: dieselbe Schrift, nur kleiner.
   'isolation' haelt die zwei Striche im Logo: sie liegen hinter den Buchstaben, aber
   vor dem Papier des Fensters. Ohne das verschwinden sie hinter dem Hintergrund. */
.overlay__logo { position: relative; isolation: isolate; display: flex; justify-content: center; }
.overlay__logo .start__title { font-size: clamp(1.6rem, 0.8rem + 4.4vw, 3.1rem); }
.overlay__logo .start__swipe { height: 0.62rem; top: 66%; }
.overlay__logo .start__swipe--2 { height: 0.36rem; top: 26%; }

.overlay__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; }

.overlay__applause {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 1.4rem + 4.6vw, 4.6rem);
  text-transform: uppercase;
  color: var(--red);
  text-shadow: 4px 4px 0 rgba(22, 18, 12, 0.18);
}

.recording-preview { width: min(520px, 100%); border-radius: var(--radius-md); overflow: hidden; border: 3px solid var(--ink); background: var(--ink); }
.recording-preview video, .recording-preview audio { display: block; width: 100%; }

.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 3px solid var(--ink);
  font-size: var(--text-sm);
  font-weight: 800;
}

.chip--red { background: var(--red); color: var(--paper); }
.chip--teal { background: var(--teal); color: var(--paper); }
.chip--mustard { background: var(--mustard); color: var(--ink); }

.notice {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  background: #ffe8b8;
  border: 3px solid var(--ink);
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 700;
}

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

/* Sehr flache Fenster (Handy quer): Karten und Uhr ruecken zusammen, damit bis zu
   neun Karten und die Farbflaeche gleichzeitig sichtbar bleiben. Steht bewusst am
   Ende der Datei, damit diese Werte die Grundregeln oben ueberschreiben. */
@media (max-height: 520px) {
  .screen--run { gap: var(--space-2); }
  .run__stack, .run__reveals { gap: 3px; }

  /* Auf flachen Fenstern duerfen Beschriftung und Inhalt wieder umbrechen:
     kurze Eintraege bleiben so in einer Zeile. */
  .card { flex-wrap: wrap; padding: 1px 10px; border-left-width: 7px; border-radius: var(--radius-sm); }
  .card__label { font-size: 0.58rem; letter-spacing: 0.06em; }
  .card__value { font-size: var(--text-sm); line-height: 1.05; }

  .timer { padding: var(--space-1) var(--space-1) var(--space-2); gap: 2px; }
  .timer__logo .start__title { font-size: 1.15rem; }
  .timer__logo .start__swipe { height: 0.34rem; }
  .timer__logo .start__swipe--2 { height: 0.2rem; }
  .timer__speaker--paar { width: clamp(70px, 16vw, 100px); }
  .timer__dial { width: min(26vw, 158px); }
  .timer__label { font-size: 0.58rem; letter-spacing: 0.16em; }
  .timer__logo { margin-bottom: 2px; }
}

/* ---------- Startbildschirm im Querformat (Handy und Tablet) ----------
   Untereinander passt der Startbildschirm auf flachen Fenstern nicht ins Bild:
   Titel und Muendergesichter werden angeschnitten und die Sprachwahl liegt
   unterhalb des sichtbaren Bereichs. Deshalb steht er dort zweispaltig -
   links die Marke, rechts die Sprachwahl. Steht bewusst am Ende der Datei,
   damit diese Werte die Grundregeln oben ueberschreiben. */
@media (orientation: landscape) and (max-height: 860px) {
  .screen--start {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    grid-template-rows: auto minmax(0, 1fr);
    align-content: center;
    align-items: center;
    justify-items: center;
    gap: var(--space-1) var(--space-4);
    padding-top: calc(env(safe-area-inset-top, 0px) + var(--space-2));
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--space-2));
  }

  .start__fullscreen { grid-column: 1 / -1; grid-row: 1; }

  .start__brand { grid-column: 1; grid-row: 2; margin-top: 0; gap: var(--space-1); }

  .start__title { font-size: clamp(1.8rem, 1rem + 6.2vh, 3.5rem); }
  .start__swipe { height: 0.62rem; }
  .start__swipe--2 { height: 0.4rem; }
  .mouth-strip { gap: var(--space-1); }
  .mouth-strip .mouth { width: clamp(32px, 8vh, 58px); border-width: 2px; border-radius: 10px; }
  .start__edition { padding: 3px 14px; font-size: 0.62rem; letter-spacing: 0.18em; }
  .start__lead, .start__lead--en { font-size: var(--text-sm); line-height: 1.25; max-width: 30ch; }
  .start__claim, .start__claim--en { font-size: var(--text-md); }

  /* Die Zeilen "Sprache waehlen" stehen sinngemaess schon auf den Flaggen. */
  .start__prompt, .start__prompt--en { display: none; }

  .start__ios-hint { grid-column: 1 / -1; grid-row: 3; font-size: 0.66rem; }

  .flags { grid-column: 2; grid-row: 2; flex-wrap: nowrap; gap: var(--space-2); }
  .flag { width: clamp(118px, 21vw, 196px); padding: var(--space-2); gap: var(--space-1); border-radius: var(--radius-lg); }
  .flag__name { font-size: var(--text-md); }
  .flag__hint { font-size: 0.62rem; letter-spacing: 0.02em; }
}

/* Sehr schmale Handys (iPhone SE und kleiner) im Querformat: hier entfallen die
   Erlaeuterungszeilen der Karten, damit die fuenf Karten ohne Scrollen sichtbar
   bleiben. Die Ueberschriften der Karten sagen, worum es geht. */
@media (orientation: landscape) and (max-height: 560px) and (max-width: 719px) {
  .option__hint { display: none; }
}

/* ---------- Handy quer: alles eine Nummer kleiner ----------
   Auf flachen Fenstern (Handy im Querformat, 320 bis 430 Pixel Hoehe) waren die
   Karten zu gross: die Einstellungen mussten fuenf Bildschirmhoehen weit gescrollt
   werden, und das Startfenster mit der 10-Sekunden-Uhr schob die Uhr unter den
   Bildrand. Hier bekommen Karten, Uhr und Fenster kompakte Masse.
   Steht bewusst am Ende der Datei, damit diese Werte die Grundregeln ueberschreiben. */
@media (orientation: landscape) and (max-height: 560px) {
  /* ---- Einstellungen: zwei Spalten, kleine Karten ---- */
  .screen--setup { gap: 8px; }

  .setup__head { padding: 1px 6px 1px 3px; border-radius: var(--radius-md); gap: var(--space-2); }
  .setup__title { font-size: var(--text-md); }
  /* "Family Edition" steht schon auf dem Startbildschirm - hier kostet es nur Hoehe. */
  .setup__sub { display: none; }
  .setup__ribbon { height: 7px; border-width: 2px; }

  .setup__body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-bottom: 0;
  }
  .setup__body > .card--wide { grid-column: 1 / -1; }

  .option {
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--space-2);
    padding: 3px 9px 3px 3px;
    border-width: 2px;
    border-radius: var(--radius-md);
  }
  .option__badge {
    width: 26px; height: 26px;
    font-size: 0.9rem;
    border-width: 2px;
    border-radius: 9px;
    box-shadow: 2px 2px 0 var(--ink);
  }
  .option__body { gap: var(--space-1); }
  .option__text { gap: 2px; }
  .option__title { font-size: var(--text-sm); }
  .option__hint { font-size: 0.66rem; line-height: 1.2; }

  /* Karten mit einer Auswahl (Dauer, Aufzeichnung) legen Text und Knoepfe
     nebeneinander: das spart rund 60 Pixel Hoehe je Karte. */
  .option:not(:has(.option__row)) .option__body {
    flex-direction: row;
    /* Passt die Auswahl nicht mehr neben den Text, rutscht sie in die naechste
       Zeile - statt den Text in schmale Spalten zu quetschen. */
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-1) var(--space-2);
  }
  .option:not(:has(.option__row)) .option__text { flex: 1 1 40%; min-width: 0; }

  /* Die Zusatzauswahl (Anzahl der Woerter) steht neben ihrer Beschriftung. */
  .option__extra {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-1) var(--space-2);
  }
  .option__extra .label { font-size: 0.56rem; letter-spacing: 0.14em; }

  .switch__track { width: 58px; height: 32px; border-width: 2px; }
  .switch__thumb { width: 22px; height: 22px; border-width: 2px; }
  .switch input:checked + .switch__track .switch__thumb { transform: translateX(24px); }

  .segmented { gap: var(--space-1); }
  .segment span {
    min-width: 52px; min-height: 28px;
    padding: 0 9px;
    border-width: 2px;
    font-size: 0.66rem;
  }

  .setup__foot { gap: var(--space-2); }
  .button--large { min-height: 42px; font-size: var(--text-md); }
  .button--small { min-height: 34px; font-size: 0.72rem; }

  /* ---- Redebildschirm: Uhr und Karten nebeneinander, alles flacher ---- */
  .screen--run { gap: var(--space-2); }

  .run__head .button--quiet { min-height: 34px; font-size: 0.72rem; padding: 0 var(--space-3); }
  .run__headline { font-size: 0.62rem; letter-spacing: 0.14em; }

  /* Zwei Spalten auch auf schmalen Handys: links die Uhr, rechts Thema und Karten. */
  .run__grid {
    grid-template-columns: minmax(0, 1fr) minmax(232px, 0.8fr);
    align-items: stretch;
    gap: var(--space-2);
  }
  .run__side { order: -1; gap: var(--space-1); }

  .timer {
    padding: var(--space-1) var(--space-2) var(--space-2);
    gap: 2px;
    border-width: 3px;
    border-radius: var(--radius-lg);
    box-shadow: var(--hard-sm);
  }
  .timer__logo { margin-bottom: 0; }
  .timer__logo .start__title { font-size: clamp(1.1rem, 4vh, 1.5rem); }
  .timer__logo .start__swipe { height: 0.3rem; }
  .timer__logo .start__swipe--2 { height: 0.2rem; }
  .timer__speaker--paar { width: clamp(46px, 14vh, 74px); gap: var(--space-1); }
  .timer__speaker--paar .mouth { border-width: 2px; border-radius: 10px; }
  .timer__label { font-size: 0.5rem; letter-spacing: 0.12em; }
  .timer__dial { width: clamp(78px, 29vh, 126px); }
  .timer__minute { font-size: clamp(1.8rem, 13vh, 3.4rem); }

  .run__stack, .run__reveals { gap: 3px; }
  .card {
    padding: 1px 8px;
    border-left-width: 6px;
    border-radius: var(--radius-sm);
    box-shadow: 2px 2px 0 var(--ink);
  }
  .card__label { font-size: 0.52rem; letter-spacing: 0.06em; }
  .card__value { font-size: clamp(0.82rem, 2.6vh, 1.05rem); line-height: 1.08; }

  /* ---- Startfenster mit der 10-Sekunden-Uhr ----
     Das Muenderpaar ist hier nur Schmuck und kostet 70 Pixel Hoehe: es tritt zurueck,
     damit die Uhr gross und vollstaendig sichtbar bleibt. */
  .overlay { padding: var(--space-2); }
  .overlay__panel {
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    max-height: calc(100dvh - 12px);
    border-radius: var(--radius-lg);
  }
  .overlay__panel--start { width: min(760px, 96vw); }
  .overlay__panel--start .overlay__logo .start__title { font-size: clamp(1.05rem, 3.8vh, 1.6rem); }
  .overlay__panel--start .timer__speaker { display: none; }
  .overlay__panel--start .overlay__topic { font-size: clamp(0.95rem, 3.2vh, 1.35rem); line-height: 1.1; max-width: 34ch; }
  .overlay__panel--start .overlay__title { font-size: var(--text-xs); letter-spacing: 0.1em; }
  .overlay__panel--start .overlay__text { font-size: 0.64rem; line-height: 1.2; }
  .overlay__count-wrap { --count-size: clamp(104px, 38vh, 168px); border-width: 3px; box-shadow: var(--hard-sm); }
  .overlay__panel--start .chip { font-size: 0.62rem; padding: 2px 10px; }

  /* ---- Schlusskarte Applaus: Bild und Text nebeneinander ---- */
  .overlay__panel--applause { width: min(760px, 96vw); }
  .applause-banner { aspect-ratio: 3.6; }
  .overlay__panel--applause .overlay__applause { font-size: clamp(1.2rem, 5vh, 2rem); }
  .overlay__panel--applause .overlay__title { font-size: var(--text-md); }
  .overlay__panel--applause .overlay__question { font-size: 0.72rem; line-height: 1.25; max-width: 52ch; }
  .button--back { min-height: 46px; font-size: var(--text-md); }
}



