/* Gaesteseite Brain-Speech
 *
 * Gelesen wird abends, im Halbdunkel, auf einem Handy, von Gaesten jeden Alters.
 * Alle Farben und Schriften kommen aus design.css. Hier steht nur Anordnung,
 * Groesse und Abstand. Keine eigenen Farbwerte.
 */

body {
  min-height: 100dvh;
  background: var(--verlauf-warm);
  background-attachment: fixed;
}

.ohne-js {
  max-width: 34rem;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  font-family: var(--schrift-text);
  font-size: var(--text-groesse);
  line-height: var(--text-hoehe);
  text-align: center;
}

/* ---------------------------------------------------------------- Startbild */

.startbild {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem calc(2rem + env(safe-area-inset-bottom));
}

.startbild__mitte {
  width: 100%;
  max-width: 26rem;
  text-align: center;
}

.namen--gross {
  font-size: clamp(2.4rem, 12vw, 3.4rem);
  line-height: 1.15;
  margin: 0 0 1.25rem;
}

.startbild__datum,
.warten__datum {
  font-family: var(--schrift-titel);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  margin: 0 0 0.2rem;
}

.startbild__ort,
.warten__ort {
  font-family: var(--schrift-ui);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
}

.startbild__frage {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-leise);
  margin: 2.75rem 0 1rem;
}

.sprachwahl {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.knopf--sprache {
  width: 100%;
  font-size: 1.15rem;
  padding: 1.05rem 1.5rem;
  min-height: 60px;
  font-family: var(--schrift-titel);
  letter-spacing: 0.02em;
}

.knopf--sprache:active {
  background: var(--beige);
}

/* -------------------------------------------------------------------- Kopf */

.ansicht {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.kopf {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: calc(0.6rem + env(safe-area-inset-top)) 1rem 0.6rem;
  background: var(--grund);
  border-bottom: 1px solid var(--rahmen);
}

.kopf__zeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: 42rem;
  margin: 0 auto;
}

.kopf__namen {
  font-size: 1.5rem;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kopf__bedienung {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
}

.sprachschalter {
  display: flex;
  border: 1px solid var(--rahmen);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--karte);
}

.sprachschalter__knopf {
  font-family: var(--schrift-ui);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0 0.7rem;
  min-height: 44px;
  border: 0;
  background: none;
  color: var(--text-leise);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.sprachschalter__knopf[aria-pressed="true"] {
  background: var(--primaer);
  color: var(--primaer-text);
}

.themaknopf {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rahmen);
  border-radius: var(--radius);
  background: var(--karte);
  color: var(--text-leise);
  cursor: pointer;
}

/* Sonne und Mond als reine Form, kein Emoji */
.themaknopf__zeichen {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: none;
}

.themaknopf[aria-pressed="true"] .themaknopf__zeichen {
  background: none;
  box-shadow: inset -5px -3px 0 0 currentColor;
  transform: rotate(-20deg);
}

.verbindung {
  max-width: 42rem;
  margin: 0.5rem auto 0;
  font-family: var(--schrift-ui);
  font-size: 0.8rem;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.verbindung::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
  opacity: 0.7;
}

/* ------------------------------------------------------------------ Buehne */

.buehne {
  flex: 1;
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem calc(4.5rem + env(safe-area-inset-bottom));
}

/* Wartezustand */

.warten {
  min-height: 60dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 0;
}

.zierlinie {
  width: 3.5rem;
  height: 1px;
  border: 0;
  background: var(--salbei);
  margin: 2rem 0 1.75rem;
}

.warten__titel {
  font-size: 1.6rem;
  font-weight: 400;
  margin: 0 0 0.75rem;
}

.warten__text {
  font-family: var(--schrift-text);
  font-size: var(--text-groesse);
  line-height: var(--text-hoehe);
  max-width: 22rem;
  margin: 0;
}

/* Laufende Rede */

.rede__kopf {
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--rahmen);
}

.rede__label {
  font-family: var(--schrift-ui);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.3rem;
}

.rede__sprecher {
  font-size: clamp(1.5rem, 6vw, 2rem);
  font-weight: 500;
  margin: 0;
}

.rede__text {
  font-family: var(--schrift-text);
  font-size: clamp(var(--text-groesse), 4.6vw, 24px);
  line-height: var(--text-hoehe);
  hyphens: auto;
}

.stueck {
  margin: 0 0 1.15rem;
  transition: background-color 0.5s ease;
  border-radius: 0.35rem;
  /* Der Rand faengt die Andeutung beim Austausch auf, ohne das Layout zu ruecken */
  padding: 0.1rem 0.35rem;
  margin-left: -0.35rem;
  margin-right: -0.35rem;
}

.stueck--neu {
  animation: stueck-ein 0.45s ease both;
}

@keyframes stueck-ein {
  from {
    opacity: 0;
    transform: translateY(0.35rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Sehr dezente Andeutung, dass ein Stueck ausgetauscht wurde. Kein Aufblitzen. */
.stueck--korrigiert {
  background-color: var(--beige);
}

.rede__leer,
.rede__ende {
  font-family: var(--schrift-text);
  font-size: var(--text-groesse);
  line-height: var(--text-hoehe);
  margin: 1.5rem 0 0;
  font-style: italic;
}

.rede__ende {
  padding-top: 1.25rem;
  border-top: 1px solid var(--rahmen);
}

/* --------------------------------------------------- Zum Ende springen */

.zumende {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(1.1rem + env(safe-area-inset-bottom));
  z-index: 20;
  font-family: var(--schrift-ui);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.8rem 1.4rem;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid var(--primaer);
  background: var(--primaer);
  color: var(--primaer-text);
  cursor: pointer;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--text) 25%, transparent);
}

/* ------------------------------------------------------------ Grosse Schirme */

@media (min-width: 46rem) {
  .buehne {
    padding-top: 2.5rem;
  }

  .rede__text {
    font-size: 22px;
  }
}
