:root {
  /* Wird beim Laden aus der Ecke des ersten Frames ueberschrieben, damit die
     Buehne nahtlos in den Bildhintergrund uebergeht. */
  --bg: #0a1018;
  --ink: #eef3fb;
  --ink-dim: #8b97ad;
  --accent: #4aa8ff;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  overflow: hidden;
}

/* ---------- Navigation ----------
   Alle Flaechen bleiben durchsichtig, Kontur geben allein die 1-px-Linien.
   Der Glaseindruck entsteht aus drei Schichten: sehr schwache Fuellung,
   Hintergrundunschaerfe und ein heller Lichtsaum an der Oberkante. */

.kopf {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(0.9rem, 1.6vw, 1.4rem) clamp(1.1rem, 3vw, 2.6rem);
}

/* Marke: dieselbe Wortmarke wie in den uebrigen Showcases */
.marke{display:block;line-height:0;text-decoration:none}
.marke img{display:block;height:22px;width:auto}

/* Mittleres Menue */

/* Ohne Rahmen: die Links stehen frei ueber dem Bild. Lesbar bleiben sie durch
   den Textschatten, nicht durch eine Flaeche darunter. */

/* Leuchtpunkt ueber dem aktiven Eintrag, wie in der Vorlage */

/* Menue-Knopf */

/* ---------- Buehne ---------- */

.stage {
  position: relative;
  width: 100%;
  height: 100dvh;
  background: var(--bg);
  cursor: crosshair;
}

#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------- Text ---------- */

.overlay {
  position: absolute;
  top: 50%;
  left: clamp(1.5rem, 5vw, 5rem);
  transform: translateY(-50%);
  max-width: min(26rem, 34vw);
  pointer-events: none;
  z-index: 2;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.8);
}

.eyebrow {
  margin: 0 0 1.1rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 4.6vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
}

.lede {
  margin: 0;
  font-size: clamp(0.9rem, 1.1vw, 1.05rem);
  line-height: 1.6;
  color: var(--ink-dim);
}

.hint {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(139, 151, 173, 0.5);
  pointer-events: none;
  z-index: 2;
  font-variant-numeric: tabular-nums;
}

.hint__sep {
  margin: 0 0.5rem;
  opacity: 0.5;
}

kbd {
  padding: 0.1em 0.42em;
  border: 1px solid rgba(139, 151, 173, 0.3);
  border-radius: 4px;
  font: inherit;
  font-size: 0.95em;
}

/* ---------- Ladeanzeige ---------- */

.loader {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 1rem;
  justify-items: center;
  background: var(--bg);
  z-index: 5;
  transition: opacity 0.5s ease;
}

.loader[hidden] {
  display: none;
}

.loader.is-done {
  opacity: 0;
  pointer-events: none;
}

.loader__bar {
  width: 12rem;
  height: 2px;
  background: rgba(139, 151, 173, 0.16);
  overflow: hidden;
}

.loader__bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  transition: width 0.2s ease;
}

#loader-text {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}

/* Hinweis statt stummem Haenger, wenn die Seite ueber file:// geoeffnet wurde */
.loader.is-fehler .loader__bar {
  display: none;
}

.loader.is-fehler #loader-text {
  max-width: 26rem;
  text-align: center;
  line-height: 1.9;
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 0.85rem;
  color: var(--ink);
}

.loader.is-fehler strong {
  color: var(--accent);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.loader.is-fehler code {
  padding: 0.1em 0.4em;
  border-radius: 4px;
  background: rgba(139, 151, 173, 0.14);
  font-size: 0.9em;
}

/* ---------- Regler ---------- */

.debug {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 17rem;
  max-height: calc(100dvh - 2rem);
  display: flex;
  flex-direction: column;
  background: rgba(10, 16, 24, 0.94);
  border: 1px solid rgba(74, 168, 255, 0.22);
  border-radius: 10px;
  backdrop-filter: blur(14px);
  font-size: 0.74rem;
  z-index: 10;
}

.debug[hidden] {
  display: none;
}

.debug__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid rgba(139, 151, 173, 0.14);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.66rem;
  color: var(--accent);
}

.debug__head button {
  background: none;
  border: 0;
  color: var(--ink-dim);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.2rem;
}

.debug__head button:hover {
  color: var(--ink);
}

.debug__body {
  padding: 0.35rem 0.85rem 0.85rem;
  overflow-y: auto;
}

.debug__group {
  margin-top: 0.85rem;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(139, 151, 173, 0.7);
}

.ctrl {
  margin-top: 0.55rem;
}

.ctrl__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.22rem;
  color: var(--ink-dim);
}

.ctrl__val {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.ctrl input[type="range"] {
  width: 100%;
  height: 3px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(139, 151, 173, 0.22);
  border-radius: 2px;
  outline: none;
}

.ctrl input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

.ctrl input[type="range"]::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

.ctrl--schalter .ctrl__row {
  margin-bottom: 0;
}

.ctrl input[type="checkbox"] {
  accent-color: var(--accent);
  width: 0.9rem;
  height: 0.9rem;
  cursor: pointer;
}

.debug__foot {
  display: flex;
  gap: 0.4rem;
  padding: 0.6rem 0.85rem 0.75rem;
  border-top: 1px solid rgba(139, 151, 173, 0.14);
}

.debug__foot button {
  flex: 1;
  padding: 0.42rem;
  background: rgba(74, 168, 255, 0.1);
  border: 1px solid rgba(74, 168, 255, 0.26);
  border-radius: 5px;
  color: var(--accent);
  font: inherit;
  font-size: 0.68rem;
  cursor: pointer;
}

.debug__foot button:hover {
  background: rgba(74, 168, 255, 0.2);
}

@media (max-width: 900px) {
  .overlay {
    top: auto;
    bottom: 3.2rem;
    left: 1.4rem;
    right: 1.4rem;
    transform: none;
    max-width: none;
  }
}

/* Rueckweg zur Hauptseite – gleiche Stelle und Form wie in den uebrigen
   Showcases (unten rechts, Pillenform), damit der Besucher den Ausgang
   ueberall am selben Ort findet. Farben aus diesem Showcase, nicht aus dem
   Spiral-Showcase: dort ist der Grund hell, hier dunkel. */
.sc-back{position:fixed;right:14px;bottom:14px;z-index:80;
  background:rgba(10,16,24,.82);backdrop-filter:blur(8px);
  border:1px solid rgba(255,255,255,.18);color:#e8eef6;text-decoration:none;
  border-radius:100px;padding:.6em 1.1em;font-size:.85rem;font-weight:600;
  display:inline-flex;gap:.5em;align-items:center;
  box-shadow:0 8px 24px -12px rgba(0,0,0,.7);
  transition:border-color .25s,color .25s}
.sc-back:hover{border-color:#4aa8ff;color:#4aa8ff}
