/* Studio Call – Hörerseite. Baut auf base.css auf (Token, Leuchte, Tasten, Pegel, Hinweise).
 * Mobile-first (Referenz 390×844), ab 640 px eine zentrierte Spalte auf einer Pult-Fläche.
 * Farben nur über Token; Rot nur in der leuchtenden Leuchte (ON AIR).
 */

body { font-size: 1.0625rem; }   /* Fließtext >= 17 px */

/* ------------------------------------------------------------------ Gerüst */
.app {
  display: flex;
  flex-direction: column;
  width: min(100%, 34rem);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(var(--s-2), env(safe-area-inset-top)) max(var(--s-4), env(safe-area-inset-right))
           max(var(--s-5), env(safe-area-inset-bottom)) max(var(--s-4), env(safe-area-inset-left));
}
.app-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  margin-bottom: var(--s-3);
}
.wordmark {
  color: var(--beschriftung);
  font-family: var(--font-kopf);
  font-stretch: semi-condensed;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: .01em;
}
.progress { display: flex; gap: 6px; }
.progress li { width: 28px; height: 4px; border-radius: var(--r-led); background: var(--fader); }
.progress li.is-done { background: var(--skala); }

#warn, #btn-mic { margin-bottom: var(--s-4); }

/* ------------------------------------------------------------------ Schritte */
.step {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  flex: 1;
}
.step h1 { font-size: 1.875rem; }
.step h1:focus { outline: none; }          /* Fokus nur für Bildschirmleser (Schrittwechsel) */
.step h2 { font-size: 1.125rem; }
.step-head { display: grid; gap: var(--s-2); }
.eyebrow {
  color: var(--beschriftung);
  font-family: var(--font-kopf);
  font-stretch: semi-condensed;
  font-weight: 700;
}
.foot, .hint { color: var(--beschriftung); font-size: var(--fs-klein); }
.opt { color: var(--beschriftung); font-weight: 400; }
.opt::before { content: "("; }
.opt::after { content: ")"; }
.actions { display: grid; gap: var(--s-3); }
.actions .live { margin-bottom: var(--s-2); }
.actions .foot { text-align: center; }
.step-center { justify-content: center; text-align: center; align-items: center; }
.step-center p { max-width: 26em; }

/* Textschaltfläche (Nebenaktion), Trefferfläche >= 44 px */
.link {
  align-self: center;
  min-height: 44px;
  padding: 0 var(--s-2);
  border: 0;
  background: none;
  color: var(--skala);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--kante);
  text-underline-offset: .2em;
  touch-action: manipulation;
}
.link:disabled { opacity: .45; }
@media (hover: hover) { .link:hover:not(:disabled) { text-decoration-color: currentColor; } }

/* ------------------------------------------------------------------ S2 Kurz vorab */
.timeline { display: grid; gap: var(--s-3); }
.timeline li { display: grid; grid-template-columns: 5.25rem 1fr; align-items: center; gap: var(--s-3); }
.timeline .lamp.sm, .chip { justify-self: start; min-width: 5.8em; font-size: .8125rem; }
.timeline strong { font-weight: 600; }
.chip {                                  /* erster Schritt: neutrale Marke in Leuchtenform */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .38em .7em .34em;
  border: 1px solid var(--kante);
  border-radius: var(--r-feld);
  color: var(--beschriftung);
  font-family: var(--font-kopf);
  font-stretch: semi-condensed;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .04em;
}
.tips { display: grid; gap: var(--s-2); }
.tips ul { display: grid; gap: var(--s-2); padding-left: 1.1em; }
.tips li::marker { color: var(--beschriftung); }
.live {
  padding: var(--s-3) var(--s-4);
  border-left: 3px solid var(--skala);
  background: var(--pult);
  font-weight: 600;
}

/* ------------------------------------------------------------------ S3 Ton prüfen */
.devices { display: grid; gap: var(--s-3); }
.level { display: grid; gap: var(--s-2); }
.level .link { justify-self: start; margin-left: calc(-1 * var(--s-2)); }
.choose { display: grid; gap: var(--s-3); }
.ask { font-weight: 600; }
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: var(--s-3); }
.key.mode {
  --key-h: 80px;
  flex-direction: column;
  gap: 2px;
  padding: var(--s-2) var(--s-3);
}
.mode-label { font-size: 1.25rem; }
.mode-hint { font-family: var(--font-text); font-size: var(--fs-klein); font-weight: 400; letter-spacing: 0; }
.row-links { display: flex; justify-content: center; gap: var(--s-4); }
.help {
  display: grid;
  gap: var(--s-3);
  padding: var(--s-4);
  border: 1px solid var(--fader);
  border-radius: var(--r-flaeche);
  background: var(--pult);
}
.help ul { display: grid; gap: var(--s-2); padding-left: 1.1em; }
.help-actions { display: grid; gap: var(--s-2); }
ul.checklist, ol.checklist { display: grid; gap: var(--s-2); padding-left: 1.2em; list-style: disc; }
ol.checklist { padding-left: 1.4em; list-style: decimal; }
.checklist li::marker, .help li::marker { color: var(--beschriftung); }

/* Echotest: einmaliger Fortschritt (läuft so lange wie die Aufnahme, keine Dauer-Animation) */
.bar { width: min(100%, 16rem); height: 4px; border-radius: var(--r-led); background: var(--fader); overflow: hidden; }
.bar > div { width: 100%; height: 100%; background: var(--skala); transform: scaleX(0); transform-origin: left; }
.bar > div.run { transform: scaleX(1); transition: transform 2.8s linear; }

/* ------------------------------------------------------------------ Warteraum / Studio */
.call { gap: var(--s-4); }
.status {
  display: grid;
  justify-items: center;
  gap: var(--s-4);
  padding: var(--s-6) var(--s-4) var(--s-5);
  border: 1px solid var(--fader);
  border-radius: var(--r-flaeche);
  background: var(--pult);
  text-align: center;
}
.status-words { display: grid; gap: var(--s-2); justify-items: center; }
.status h1 { font-size: 1.625rem; }
.status p { max-width: 24em; }
.status .note { font-weight: 600; }
.status .note:empty { display: none; }
.status .wait { color: var(--beschriftung); font-size: var(--fs-klein); }
.strip {                                  /* stummgeschaltet: flach Bernstein, kein Schein */
  justify-self: stretch;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-feld);
  background: var(--bernstein);
  color: var(--regie);
  line-height: 1.35;
}
.strip span { display: block; }
.conn:empty, .notes:empty { display: none; }
.conn { justify-content: center; }
.conn.dot { display: flex; }
.onair-hint { text-align: center; font-weight: 600; }
/* Technik-Kurzzeile: erste Zeile (erledigt bzw. Warnung) mit Punkt, Hinweise darunter leiser */
.notes { display: grid; gap: var(--s-1); font-size: var(--fs-klein); }
.notes .dot { align-items: baseline; }
.notes .dot::before { transform: translateY(-.05em); }
.notes .dot.warn::before { transform: translateY(-.05em) rotate(45deg); }
.notes .dot:not(.ok, .warn) { color: var(--beschriftung); }
.notes .dot:not(.ok, .warn)::before { visibility: hidden; }
.unlock { display: grid; gap: var(--s-3); }
.diag {
  padding-top: var(--s-3);
  border-top: 1px solid var(--fader);
  color: var(--beschriftung);
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
  white-space: pre-line;
}
.call-foot { display: grid; gap: var(--s-3); margin-top: auto; padding-top: var(--s-4); }
.call-foot .foot { text-align: center; }

/* Ende */
#step-end .key { max-width: 22rem; }

/* ------------------------------------------------------------------ Größere Fenster */
@media (min-width: 640px) {
  .app { width: min(100%, 38rem); padding-top: var(--s-6); padding-bottom: var(--s-6); }
  .app-head { margin-bottom: var(--s-4); }
  .step {
    flex: none;
    padding: var(--s-6);
    border: 1px solid var(--fader);
    border-radius: var(--r-flaeche);
    background: var(--pult);
  }
  .step.call { padding: 0; border: 0; background: none; }
  .step-center { min-height: 22rem; }
  .live, .help { background: var(--regie); }
  .devices { grid-template-columns: 1fr 1fr; }
  .help-actions { grid-template-columns: 1fr auto; align-items: center; gap: var(--s-4); }
  .devices .hint, .devices .notice { grid-column: 1 / -1; }
  .call-foot { margin-top: var(--s-2); }
}

/* Kleine Handys (360×640): enger; die Zustimmung bleibt unten stehen, der Text scrollt darunter */
@media (max-height: 700px) {
  .step { gap: var(--s-4); }
  .step h1 { font-size: 1.625rem; }
  .status { padding: var(--s-5) var(--s-3) var(--s-4); gap: var(--s-3); }
  .lamp.lg { font-size: 2.125rem; }
  .live { padding: var(--s-2) var(--s-3); }
}
@media (max-width: 639px) and (max-height: 760px) {
  .actions.sticky {
    position: sticky;
    bottom: 0;
    z-index: 1;
    margin: 0 calc(-1 * var(--s-4));
    padding: var(--s-4) var(--s-4) max(var(--s-3), env(safe-area-inset-bottom));
    background: linear-gradient(transparent, var(--regie) var(--s-4));
  }
}

@media (forced-colors: active) {
  .progress li { border: 1px solid CanvasText; }
  .progress li.is-done { background: CanvasText; forced-color-adjust: none; }
  .strip { border: 2px dashed CanvasText; }
  .live { border-left-color: CanvasText; }
}
