/* Handy-Seite fuer Live-Fragen. Werte aus css/tokens.css der Praesentation kopiert
   (die Seite darf nichts ausserhalb von public/ laden). Systemschrift, keine Webfonts. */
:root {
  --rot: #AA2034;
  --rot-dunkel: #8B1929;
  --rot-hell: #FBEBED;
  --anthrazit: #2E2E2E;
  --grau: #444444;
  --mittelgrau: #888888;
  --hell: #F4F4F4;
  --linie: #EBEBEB;
  --weiss: #FFFFFF;
  --font: -apple-system, "Segoe UI", system-ui, sans-serif;
  --radius-s: 8px;
  --radius-m: 16px;
  --radius-pill: 999px;
  --tippflaeche: 60px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--weiss);
  color: var(--anthrazit);
  font: 400 18px/1.45 var(--font);
  -webkit-tap-highlight-color: transparent;
  transition: background-color .4s ease;
}
body[data-zustand="danke"] { background: var(--rot-hell); }

/* Roter Faden: schmaler Strich oben, waechst beim Zustandswechsel kurz */
.faden {
  position: fixed; top: 0; left: 0; z-index: 2;
  width: 100%; height: 4px;
  background: var(--rot);
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
  transform-origin: 0 50%;
  transform: scaleX(.18);
  transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}
.faden.waechst { transform: scaleX(1); transition-duration: .5s; }

main {
  max-width: 480px;
  margin: 0 auto;
  padding: calc(56px + env(safe-area-inset-top)) 24px calc(32px + env(safe-area-inset-bottom));
}

.ansicht { display: none; }
body[data-zustand="keine-sitzung"] [data-fuer="keine-sitzung"],
body[data-zustand="warten"] [data-fuer="warten"],
body[data-zustand="frage"] [data-fuer="frage"],
body[data-zustand="danke"] [data-fuer="danke"],
body[data-zustand="getrennt"] [data-fuer="getrennt"] { display: block; animation: auftauchen .35s ease both; }

/* Ruhige Zustaende: vertikal mittig */
[data-fuer="keine-sitzung"], [data-fuer="warten"], [data-fuer="danke"], [data-fuer="getrennt"] {
  padding-top: 18vh;
}

h1 {
  outline: none;
  margin: 0 0 16px;
  font-size: 28px; line-height: 1.25; font-weight: 700;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
  hyphens: manual;
}
[data-fuer="frage"] h1 { font-size: 26px; margin-bottom: 24px; }
.leise { margin: 0; color: var(--grau); font-size: 17px; }
.label {
  margin: 0 0 12px;
  text-transform: uppercase; font-weight: 600; letter-spacing: .1em; font-size: 14px;
  color: var(--rot);
}

textarea {
  display: block; width: 100%;
  min-height: 132px;
  padding: 16px;
  font: inherit; font-size: 18px; color: var(--anthrazit);
  background: var(--hell);
  border: 2px solid var(--linie);
  border-radius: var(--radius-m);
  resize: none;
  -webkit-appearance: none; appearance: none;
}
textarea::placeholder { color: var(--grau); opacity: .8; }
textarea:focus { outline: none; border-color: var(--rot); background: var(--weiss); }
.zaehler { margin: 8px 4px 20px; text-align: right; font-size: 15px; color: var(--grau); font-variant-numeric: tabular-nums; }

.knopf {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: var(--tippflaeche);
  padding: 14px 24px;
  font: inherit; font-size: 19px; font-weight: 600; line-height: 1.2;
  color: var(--weiss); background: var(--rot);
  border: 0; border-radius: var(--radius-pill);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .2s ease, transform .1s ease, opacity .2s ease;
  overflow-wrap: anywhere;
}
.knopf:active:not(:disabled) { background: var(--rot-dunkel); transform: scale(.98); }
.knopf:disabled { opacity: .35; cursor: default; }
.knopf:focus-visible { outline: 3px solid var(--anthrazit); outline-offset: 3px; }

.optionen { display: grid; gap: 16px; }
.optionen .knopf { min-height: 88px; font-size: 22px; border-radius: var(--radius-m); }
.optionen .knopf.option { color: var(--rot); background: var(--weiss); border: 3px solid var(--rot); }
.optionen .knopf.option:active:not(:disabled) { color: var(--weiss); background: var(--rot); }

.hinweis { min-height: 1.45em; margin: 16px 4px 0; color: var(--rot-dunkel); font-size: 16px; }

.haken {
  width: 64px; height: 64px; margin-bottom: 24px;
  border-radius: 50%; background: var(--rot);
  position: relative;
}
.haken::after {
  content: ""; position: absolute; left: 22px; top: 15px;
  width: 16px; height: 28px;
  border: solid var(--weiss); border-width: 0 5px 5px 0;
  transform: rotate(45deg);
}
.strich { width: 56px; height: 4px; margin-bottom: 28px; border-radius: var(--radius-pill); background: var(--rot); }
.puls {
  width: 14px; height: 14px; margin-bottom: 28px;
  border-radius: 50%; background: var(--rot);
  animation: puls 1.6s ease-in-out infinite;
}

.unsichtbar {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

@keyframes auftauchen { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes puls { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .faden.waechst { transform: scaleX(.18); }
}
