/* Abendfarben, passend zur Szene auf der Startseite */
body {
  font-family: system-ui, sans-serif;
  max-width: 640px;
  margin: 40px auto;
  padding: 0 16px;
  line-height: 1.6;
  background: #14153a;
  color: #efe6f5;
}
h1 { font-size: 1.4rem; color: #ffe29a; }
h2 { color: #ffc978; }
a { color: #ff9fb4; }
section { margin-top: 40px; }
label { display: block; margin-top: 12px; font-size: .9rem; }
input, textarea { width: 100%; padding: 8px; font: inherit; box-sizing: border-box; }
button { margin-top: 12px; padding: 8px 16px; font: inherit; cursor: pointer; }
canvas { border: 1px solid #333; display: block; margin-top: 12px; touch-action: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg { padding: 8px; margin-top: 12px; border: 1px solid #70408a; }

/* Fokus muss sichtbar sein, sonst ist die Seite per Tastatur nicht bedienbar */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #ffe29a;
  outline-offset: 2px;
}

footer {
  margin-top: 56px;
  padding-top: 16px;
  border-top: 1px solid #4d3780;
  font-size: .9rem;
}

/* ---------- Startseite für Elfi ---------- */
body.elfi {
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: #14153a;
}

/* Die Szene füllt das ganze Fenster, Pixel bleiben hart */
#szene {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  margin: 0;
  border: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: none;
}
body.laeuft #szene { display: block; }

/* Ohne Skript: nur der Text, mittig auf Abendhimmel */
.botschaft {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 16px;
  background: linear-gradient(#14153a, #70408a 55%, #f9855f);
}
.botschaft h1 { font-size: 3rem; margin: 0; letter-spacing: .1em; }
.botschaft p { font-size: 1.3rem; margin: 8px 0 0; }

/* Mit Skript steht der Text im Bild, hier bleibt er nur für Vorleseprogramme */
body.laeuft .botschaft {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
}

#nochmal {
  position: fixed;
  left: 12px;
  bottom: 10px;
  margin: 0;
  padding: 4px 10px;
  font: 12px ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #ffe29a;
  background: #150f27;
  border: 2px solid #ffe29a;
  border-radius: 0;
}
#nochmal[hidden] { display: none; }

body.elfi footer {
  position: fixed;
  right: 12px;
  bottom: 10px;
  margin: 0;
  padding: 0;
  border: 0;
  font: 12px ui-monospace, Menlo, Consolas, monospace;
}
body.elfi footer p { margin: 0; }
body.elfi footer a { color: #a994c2; text-decoration: none; }
body.elfi footer a:hover { color: #ffe29a; }

/* Wer Animationen abgestellt hat, soll nicht überrannt werden */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- Zugang (Tor) ---------- */
#tor {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: linear-gradient(#14153a, #70408a 55%, #f9855f);
}
#torform {
  width: 100%;
  max-width: 360px;
  text-align: center;
}
#torform h1 {
  font-size: 2rem;
  margin: 0 0 6px;
  letter-spacing: .08em;
}
#torform .frage {
  margin: 0 0 20px;
  font-size: 1.05rem;
  color: #efe6f5;
}
#antwort {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  text-align: center;
  color: #efe6f5;
  background: rgba(20, 21, 58, .55);
  border: 2px solid #ffe29a;
  border-radius: 10px;
  box-sizing: border-box;
}
#antwort::placeholder { color: #a994c2; }
#torform button {
  margin-top: 14px;
  width: 100%;
  padding: 12px;
  font: inherit;
  font-weight: 600;
  letter-spacing: .06em;
  color: #14153a;
  background: #ffe29a;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}
#torform button:disabled { opacity: .6; cursor: default; }
#fehler {
  margin: 16px 0 0;
  color: #ffd1d8;
  font-size: .95rem;
}

/* Die entschlüsselte Bühne füllt wie zuvor das ganze Fenster */
#buehne { display: contents; }
