/* =========================================================================
   Deine Show — Web-Onboarding, Prototyp Screens 1-2
   Bildwelt: dunkler Zuschauerraum, Hochformat-Buehne in der Mitte.
   Auf dem Handy fuellt die Buehne den Schirm, auf dem Desktop wird die
   ueberschuessige Breite zum Saal statt zu abgeschnittenem Artwork.
   ========================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Klassen mit eigenem display (z.B. .name-field als Flexbox) wuerden das
   hidden-Attribut sonst stillschweigend ueberstimmen. */
[hidden] {
  display: none !important;
}

:root {
  /* Seitenverhaeltnis des Buehnenausschnitts (Artwork 720x1280) */
  --stage-ar: 0.5625;

  --house-black: #0b0708;
  --house-deep: #150d0e;
  --curtain: #6d1220;
  --curtain-dark: #3d0910;
  --curtain-light: #93202f;

  --brass: #e8b465;
  --brass-bright: #f6d29a;
  --brass-deep: #a9762f;

  --ink: #fdf8f2;
  --ink-muted: rgba(253, 248, 242, 0.72);
  --ink-faint: rgba(253, 248, 242, 0.5);

  --font: "DM Sans", system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--house-black);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
}

/* ---------------------------------------------------------------- Saal -- */

.house {
  position: relative;
  height: 100dvh;
  display: grid;
  grid-template-columns: 1fr min(100vw, calc(100dvh * var(--stage-ar))) 1fr;
  background: var(--house-black);
  isolation: isolate;
}

/* Das Szenenbild unscharf ueber den ganzen Saal — gibt der Breite Farbe,
   statt sie schwarz zu lassen. Quelle setzt plate.js. */
.house::before {
  content: "";
  position: absolute;
  inset: -10%;
  z-index: 0;
  background-image: var(--ambient);
  background-size: cover;
  background-position: center;
  filter: blur(70px) saturate(1.35) brightness(0.4);
  transform: scale(1.1);
}

.house::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 62% 58% at 50% 46%, transparent 0%, rgba(6, 3, 4, 0.82) 100%);
}

/* Vorhaenge links und rechts. Auf schmalen Schirmen sind die Spalten 0 breit
   und verschwinden von selbst — kein Media Query noetig. */
.house__wing {
  position: relative;
  z-index: 1;
  overflow: hidden;
  /* Drei Faltenraster mit teilerfremden Perioden (37 / 61 / 96 px) uebereinander:
     Dadurch wiederholt sich das Muster fuer das Auge praktisch nie, und der
     Stoff verliert das Tapetenhafte eines einzelnen Rasters. */
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 18%, transparent 72%, rgba(0, 0, 0, 0.68)),
    repeating-linear-gradient(90deg,
      rgba(0, 0, 0, 0.42) 0px, rgba(0, 0, 0, 0) 19px, rgba(0, 0, 0, 0.38) 37px),
    repeating-linear-gradient(90deg,
      rgba(255, 214, 170, 0.07) 0px, rgba(255, 255, 255, 0) 27px, rgba(255, 214, 170, 0.05) 61px),
    repeating-linear-gradient(90deg,
      var(--curtain-dark) 0px,
      var(--curtain) 24px,
      var(--curtain-light) 46px,
      var(--curtain) 70px,
      var(--curtain-dark) 96px);
  box-shadow: inset 0 0 150px rgba(0, 0, 0, 0.85);
}

/* Warmes Streulicht von der Buehne auf den Stoff. */
.house__wing::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(380px, 80%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.house__wing--left::before {
  right: 0;
  background: radial-gradient(ellipse 100% 62% at 100% 46%, rgba(255, 196, 122, 0.26), transparent 72%);
}

.house__wing--right::before {
  left: 0;
  background: radial-gradient(ellipse 100% 62% at 0% 46%, rgba(255, 196, 122, 0.26), transparent 72%);
}

/* Schmale Schattenkante direkt am Buehnenrahmen — schmaler als das Streulicht,
   damit die Buehne aus dem Stoff heraustritt statt hineinzuverlaufen. */
.house__wing::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(64px, 22%);
  background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.95));
}

.house__wing--left::after {
  right: 0;
}

.house__wing--right::after {
  left: 0;
  background: linear-gradient(to left, transparent, rgba(0, 0, 0, 0.95));
}

/* Schwenkbogen ueber der ganzen Breite — nur dort, wo es auch Vorhaenge gibt. */
.house__valance {
  --scallop-width: 74px;
  --scallop-height: 30px;

  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  height: clamp(44px, 8vh, 88px);
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.3) 0px, transparent 21px, rgba(0, 0, 0, 0.26) 47px),
    linear-gradient(to bottom, var(--curtain-light) 0%, var(--curtain) 52%, var(--curtain-dark) 100%);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.78);
  pointer-events: none;
}

/* Volant: eine Reihe halber Scheiben unter dem Band. Ohne die liest sich der
   Bogen als rotes Rechteck, mit ihnen sofort als Theatervorhang. */
.house__valance::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: var(--scallop-height);
  background:
    radial-gradient(circle at 50% 0,
      var(--curtain-dark) 0 44%,
      rgba(0, 0, 0, 0.55) 45%,
      transparent 52%);
  background-size: var(--scallop-width) 100%;
  background-repeat: repeat-x;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.6));
}

@media (max-aspect-ratio: 10/13) {

  /* Hochformat: die Buehne fuellt den Schirm, der Saal entfaellt. */
  .house__valance {
    display: none;
  }
}

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

.stage {
  position: relative;
  z-index: 1;
  height: 100dvh;
  overflow: hidden;
  background: var(--house-deep);
  isolation: isolate;
  box-shadow: 0 0 90px 20px rgba(0, 0, 0, 0.6);
}

/* Die Platte hat exakt die Geometrie des Artworks. Groesse und Versatz
   setzt plate.js — dieselbe Crop-Fill-Rechnung wie in der App, damit
   Sprechblasen auf jedem Seitenverhaeltnis am richtigen Kopf haengen. */
.plate {
  position: absolute;
  left: var(--plate-x, 0px);
  top: var(--plate-y, 0px);
  width: var(--plate-w, 100%);
  height: var(--plate-h, 100%);
}

.plate__art,
.plate__film {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Die Szene faehrt beim Oeffnen leicht heran — der Blick tritt naeher,
   statt dass ein Standbild einfach da ist. */
.plate__art {
  animation: scene-in 1.6s var(--ease) both;
}

@keyframes scene-in {
  from {
    transform: scale(1.06);
  }

  to {
    transform: scale(1);
  }
}

/* Warmes Licht ueber der Markise, das beim Laden flackernd angeht.
   Liegt als Verlauf ueber dem Artwork — die Lampen im Bild selbst sind
   gemalt und lassen sich nicht einzeln schalten. */
.marquee-glow {
  position: absolute;
  left: 2%;
  right: 2%;
  top: 27%;
  height: 21%;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(ellipse 58% 72% at 48% 52%,
      rgba(255, 208, 146, 0.52) 0%,
      rgba(255, 190, 112, 0.18) 46%,
      transparent 74%);
  animation: bulbs-on 2.1s var(--ease) both;
}

@keyframes bulbs-on {
  0% {
    opacity: 0;
  }

  16% {
    opacity: 0.5;
  }

  22% {
    opacity: 0.08;
  }

  33% {
    opacity: 0.82;
  }

  39% {
    opacity: 0.25;
  }

  62%,
  100% {
    opacity: 1;
  }
}

.plate__film {
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.plate__film.is-visible {
  opacity: 1;
}

/* ------------------------------------------------------------- Screens -- */

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  animation: screen-in 0.5s var(--ease) both;
}

.screen--film {
  cursor: pointer;
  justify-content: flex-end;
  align-items: center;
}

@keyframes screen-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Verlauf, damit Text lesbar bleibt — flach genug, dass Kevin und Otis
   ueber der Textkante sichtbar bleiben. Sie sind die halbe Miete des Screens. */
.scrim {
  position: absolute;
  inset: auto 0 0 0;
  height: 56%;
  background: linear-gradient(to top,
      rgba(8, 5, 6, 0.97) 0%,
      rgba(8, 5, 6, 0.94) 32%,
      rgba(8, 5, 6, 0.74) 56%,
      rgba(8, 5, 6, 0.3) 80%,
      transparent 100%);
  pointer-events: none;
}

.panel {
  position: relative;
  padding: 0 clamp(1.25rem, 5vw, 2rem) calc(1.35rem + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Der Textblock steigt versetzt ein, nachdem die Lampen an sind. */
.screen--welcome .panel>* {
  animation: rise 0.7s var(--ease) both;
}

.screen--welcome .panel> :nth-child(1) {
  animation-delay: 0.85s;
}

.screen--welcome .panel> :nth-child(2) {
  animation-delay: 0.98s;
}

.screen--welcome .panel> :nth-child(3) {
  animation-delay: 1.14s;
}

.screen--welcome .panel> :nth-child(4) {
  animation-delay: 1.26s;
}

.screen--welcome .panel> :nth-child(5) {
  animation-delay: 1.34s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------- Typografie -- */

.headline {
  margin: 0;
  font-size: clamp(1.5rem, 5.4vw, 1.92rem);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.7);
}

.subline {
  margin: 0;
  font-size: clamp(1rem, 3.6vw, 1.13rem);
  line-height: 1.45;
  color: var(--ink-muted);
  text-wrap: pretty;
}

.legal {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--ink-faint);
  text-align: center;
}

.legal a {
  color: var(--brass);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ------------------------------------------------------------ Buttons -- */

.btn-primary {
  appearance: none;
  border: 0;
  width: 100%;
  padding: 1.05rem 1.5rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #3a2408;
  background: linear-gradient(160deg, var(--brass-bright), var(--brass) 55%, var(--brass-deep));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 10px 30px rgba(232, 180, 101, 0.28);
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 16px 40px rgba(232, 180, 101, 0.36);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-quiet {
  appearance: none;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink-muted);
  padding: 0.5rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-quiet:hover {
  color: var(--ink);
}

:where(button, a, input):focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ------------------------------------------------------- Sprechblasen -- */

/* Position setzt plate.js in Pixeln — inklusive Randbegrenzung, damit die
   Blase nie aus der Buehne laeuft. */
.bubble-anchor {
  position: absolute;
  width: min(74%, 21rem);
  transform: translate(-50%, -100%);
  padding-bottom: 0.9rem;
  pointer-events: none;
  transition: opacity 0.32s var(--ease), transform 0.32s var(--ease);
}

/* Wer ausgeredet hat, verschwindet — sonst reden beide Figuren uebereinander. */
.bubble-anchor.is-gone {
  opacity: 0;
  transform: translate(-50%, -100%) translateY(-10px);
}

.bubble {
  position: relative;
  background: rgba(20, 12, 13, 0.93);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(232, 180, 101, 0.34);
  border-radius: 1.15rem;
  padding: 0.85rem 1.05rem;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ink);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6);
  animation: bubble-in 0.45s var(--ease) both;
  pointer-events: auto;
}

/* Noch nicht getippter Text: unsichtbar, aber raumnehmend. */
.bubble__pending {
  color: transparent;
}

.bubble::after {
  /* Zipfel nach unten zur Figur. --tail-dx gleicht aus, wenn die Blase
     wegen des Buehnenrands verschoben werden musste. */
  content: "";
  position: absolute;
  bottom: -8px;
  left: clamp(18px, calc(50% + var(--tail-dx, 0px)), calc(100% - 18px));
  width: 16px;
  height: 16px;
  margin-left: -8px;
  background: inherit;
  border-right: 1px solid rgba(232, 180, 101, 0.34);
  border-bottom: 1px solid rgba(232, 180, 101, 0.34);
  transform: rotate(45deg);
}

@keyframes bubble-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------------ Sorgen-Wand -- */

/* Die Rahmenoeffnung sitzt als Bruchteil im Wand-Artwork; Groesse und Lage
   setzt concerns.js aus denselben vermessenen Werten wie die App. */
.frame-opening {
  position: absolute;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.55);
}

.frame-opening.is-dragging {
  cursor: grabbing;
}

.painting {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  animation: painting-in 0.42s var(--ease) both;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.frame-opening.is-dragging .painting {
  transition: none;
  transform: translateX(var(--drag-px, 0px));
}

.frame-opening.is-leaving .painting {
  transform: translateX(calc(var(--drag, 1) * 125%)) rotate(calc(var(--drag, 1) * 7deg));
  opacity: 0;
}

@keyframes painting-in {
  from {
    opacity: 0;
    transform: scale(1.04);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* Stempel als Quittung auf die Entscheidung. */
.stamp {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-11deg) scale(1.7);
  opacity: 0;
  padding: 0.35rem 1.1rem;
  border: 3px solid currentColor;
  border-radius: 0.45rem;
  font-size: clamp(0.85rem, 3.2vw, 1.1rem);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.16s var(--ease), transform 0.3s var(--ease);
}

.stamp.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(-11deg) scale(1);
}

.stamp--yes {
  color: var(--brass-bright);
  background: rgba(58, 36, 8, 0.62);
}

.stamp--no {
  color: rgba(253, 248, 242, 0.75);
  background: rgba(18, 12, 13, 0.66);
}

.dots {
  display: flex;
  gap: 0.42rem;
  justify-content: center;
  padding-bottom: 0.2rem;
}

.dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(253, 248, 242, 0.22);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}

.dots span.is-done {
  background: var(--brass-deep);
}

.dots span.is-current {
  background: var(--brass-bright);
  transform: scale(1.4);
}

/* Feste Mindesthoehen, damit der Panel-Block zwischen den sechs Karten
   nicht springt — die Texte sind unterschiedlich lang. */
.headline--card {
  font-size: clamp(1.25rem, 4.4vw, 1.5rem);
  min-height: 2.3em;
  display: flex;
  align-items: flex-end;
}

.headline--card+.subline {
  min-height: 2.9em;
}

.decisions {
  display: flex;
  gap: 0.65rem;
}

.btn-decision {
  flex: 1;
  appearance: none;
  padding: 0.95rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease);
}

.btn-decision:hover {
  transform: translateY(-2px);
}

.btn-decision--no {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(253, 248, 242, 0.24);
  color: var(--ink-muted);
}

.btn-decision--yes {
  background: linear-gradient(160deg, var(--brass-bright), var(--brass) 55%, var(--brass-deep));
  color: #3a2408;
  box-shadow: 0 8px 24px rgba(232, 180, 101, 0.24);
}

/* ------------------------------------------------------ Spiegel-Moment -- */

.frame-opening--static {
  cursor: default;
  touch-action: auto;
}

/* Die gewaehlten Gemaelde als Haengung im selben Rahmen. */
.mirror-collage {
  display: grid;
  width: 100%;
  height: 100%;
  gap: 5px;
  grid-auto-rows: 1fr;
  background: rgba(6, 4, 4, 0.85);
}

.mirror-collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 0;
  animation: painting-in 0.5s var(--ease) both;
}

/* Warmes Buehnenlicht auf Haengung und Figur — der "Spot" aus dem Drehbuch.
   Liegt ueber Claudia: dunkles Gefieder vor dunkler Wand braucht Licht von vorn. */
.mirror-spot {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background:
    radial-gradient(ellipse 44% 32% at 50% 40%, rgba(255, 210, 150, 0.3), transparent 72%),
    radial-gradient(ellipse 34% 24% at 51% 82%, rgba(255, 206, 140, 0.42), transparent 70%);
  animation: screen-in 1s var(--ease) both;
}

.claudia {
  position: absolute;
  left: 48%;
  bottom: 3%;
  width: 29%;
  transform: translateX(-50%);
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.55));
  animation: claudia-in 0.7s var(--ease) both;
}

/* Flacherer Scrim als sonst: Claudia steht in der unteren Haelfte und muss
   sichtbar bleiben, der Screen traegt nur einen Knopf statt eines Textblocks. */
.screen--mirror .scrim {
  height: 30%;
  background: linear-gradient(to top,
      rgba(8, 5, 6, 0.9) 0%,
      rgba(8, 5, 6, 0.5) 50%,
      transparent 100%);
}

@keyframes claudia-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%);
  }
}

/* -------------------------------------------------------- Ziel-Frage -- */

/* Der Aushang: die Rahmenoeffnung als Anschlagtafel. Die Motive sind 1:1,
   die Oeffnung ist ~3:4 — deshalb haengt das Poster zentriert, statt per
   cover beschnitten zu werden. */
.goal-board {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  /* Haengt das Poster in die obere Haelfte der Tafel — auf kleinen Schirmen
     schiebt sich das Panel sonst ueber seine untere Kante. */
  padding-bottom: 18%;
  background: rgba(6, 4, 4, 0.85);
}

.goal-board__hint {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.goal-poster {
  width: 74%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  border: 2px solid rgba(232, 180, 101, 0.4);
  border-radius: 6px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.6);
  animation: painting-in 0.5s var(--ease) both;
}

/* Hoeherer Scrim als sonst: sechs Optionen plus Headline brauchen die
   untere Haelfte, das Artwork traegt hier nur den Aushang oben. */
.screen--goal .scrim {
  height: 80%;
  background: linear-gradient(to top,
      rgba(8, 5, 6, 0.97) 0%,
      rgba(8, 5, 6, 0.95) 48%,
      rgba(8, 5, 6, 0.72) 72%,
      rgba(8, 5, 6, 0.28) 88%,
      transparent 100%);
}

.headline--goal {
  font-size: clamp(1.25rem, 4.4vw, 1.5rem);
}

.subline--goal {
  font-size: clamp(0.92rem, 3.2vw, 1.02rem);
}

.goal-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn-goal {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  appearance: none;
  text-align: left;
  padding: 0.66rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(253, 248, 242, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 0.97rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease),
    border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.btn-goal:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.1);
}

.btn-goal__emoji {
  flex: none;
  width: 1.5rem;
  font-size: 1.15rem;
  text-align: center;
}

.btn-goal.is-selected {
  background: linear-gradient(160deg, rgba(246, 210, 154, 0.18), rgba(169, 118, 47, 0.18));
  border-color: var(--brass);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(232, 180, 101, 0.18);
}

/* Immer im Layout, damit die Optionsliste beim ersten Antippen nicht springt. */
.goal-cta {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.18s var(--ease);
}

.goal-cta.is-ready {
  opacity: 1;
  pointer-events: auto;
}

/* Kleine Schirme: kompaktere Liste, damit der Aushang sichtbar bleibt. */
@media (max-height: 700px) {
  .btn-goal {
    padding: 0.5rem 0.9rem;
    font-size: 0.92rem;
  }

  .goal-options {
    gap: 0.4rem;
  }

  .subline--goal {
    display: none;
  }
}

/* -------------------------------------------------------- Namensfeld -- */

.name-field {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
  animation: screen-in 0.45s var(--ease) both;
}

.name-field input {
  flex: 1;
  min-width: 0;
  appearance: none;
  font-family: inherit;
  font-size: 1.08rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(232, 180, 101, 0.34);
  border-radius: 999px;
  padding: 0.95rem 1.25rem;
}

.name-field input::placeholder {
  color: var(--ink-faint);
}

.name-field input:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--brass);
  outline: none;
}

.name-field .btn-primary {
  width: auto;
  padding-inline: 1.9rem;
}

/* ------------------------------------------------------------- Film -- */

.skip-hint {
  position: relative;
  margin: 0 0 calc(2rem + env(safe-area-inset-bottom));
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: rgba(8, 5, 6, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 0.86rem;
  color: var(--ink-muted);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}

.skip-hint.is-visible {
  opacity: 1;
}

/* ------------------------------------------------- Ende des Prototyps -- */

.outro {
  justify-content: center;
  padding: clamp(1.5rem, 6vw, 3rem);
  text-align: left;
  background: linear-gradient(to top, rgba(8, 5, 6, 0.97), rgba(8, 5, 6, 0.82));
}

.outro__eyebrow {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
}

.outro__list {
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.outro__list li::before {
  content: "→ ";
  color: var(--brass-deep);
}

.outro__restart {
  margin-top: 1.8rem;
  align-self: flex-start;
}

/* ----------------------------------------------------- Scrim-Varianten -- */

.scrim--tall {
  height: 82%;
  background: linear-gradient(to top,
      rgba(8, 5, 6, 0.97) 0%,
      rgba(8, 5, 6, 0.95) 55%,
      rgba(8, 5, 6, 0.7) 78%,
      transparent 100%);
}

.scrim--full {
  height: 100%;
  background: rgba(8, 5, 6, 0.88);
}

/* ------------------------------------------------------ Schon probiert -- */

.tried-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.tried-tile {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.7rem 0.45rem 0.45rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(253, 248, 242, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease),
    border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.tried-tile:hover {
  transform: translateY(-1px);
}

.tried-tile img {
  width: 2.6rem;
  height: 2.6rem;
  flex: none;
  border-radius: 0.6rem;
  object-fit: cover;
}

.tried-tile.is-selected {
  background: linear-gradient(160deg, rgba(246, 210, 154, 0.18), rgba(169, 118, 47, 0.18));
  border-color: var(--brass);
  color: var(--ink);
}

.tried-ack {
  min-height: 3.2em;
}

/* ----------------------------------------------------------- Licht an -- */

/* Kronleuchter-Glut, flackert mit demselben Timing an wie die Markise. */
.light-glow {
  position: absolute;
  left: 18%;
  right: 18%;
  top: 2%;
  height: 30%;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(ellipse 55% 55% at 50% 30%,
      rgba(255, 214, 150, 0.55) 0%,
      rgba(255, 196, 122, 0.2) 50%,
      transparent 75%);
  animation: bulbs-on 2.1s var(--ease) both;
}

/* --------------------------------------------------------- Lebensbild -- */

.lb-cast {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Die Fussleiste liegt auf dem Buehnenboden des Artworks — tiefer stuende
   das Ensemble hinter Scrim und Panel. */
.lb-figure {
  position: absolute;
  bottom: 23%;
  animation: lb-in 0.5s var(--ease) both;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.5));
}

/* Der pinke Platzhalter: bewusst grell, damit klar ist, dass hier ein Asset fehlt. */
.lb-figure--placeholder {
  aspect-ratio: 9 / 16;
  background: #ff4fa3;
  border-radius: 45% 45% 16% 16% / 30% 30% 8% 8%;
  opacity: 0.9;
}

.lb-prop {
  position: absolute;
  animation: lb-in 0.5s var(--ease) both;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.45));
}

@keyframes lb-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.94);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.lb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.lb-chip {
  appearance: none;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(253, 248, 242, 0.24);
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease),
    border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.lb-chip:hover {
  transform: translateY(-1px);
}

.lb-chip.is-selected {
  background: linear-gradient(160deg, rgba(246, 210, 154, 0.2), rgba(169, 118, 47, 0.2));
  border-color: var(--brass);
  color: var(--ink);
}

/* ----------------------------------------------------- Geld einsammeln -- */

.collect-counter {
  position: absolute;
  left: 50%;
  top: 56%;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.4rem 1.2rem;
  border-radius: 999px;
  background: rgba(20, 12, 13, 0.9);
  border: 1px solid rgba(232, 180, 101, 0.4);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--brass-bright);
  font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------- Verteilen -- */

.dist-env {
  position: absolute;
  bottom: 26%;
  width: 26%;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s var(--ease);
}

.dist-env img {
  width: 100%;
  display: block;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.5));
}

.dist-env__label,
.dist-env__amount {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

.dist-env__amount {
  color: var(--brass-bright);
  font-variant-numeric: tabular-nums;
}

.dist-env.is-wrong {
  animation: env-shake 0.4s var(--ease);
}

.dist-env.is-paying img {
  animation: env-pulse 0.9s var(--ease);
}

@keyframes env-shake {

  20%,
  60% {
    transform: translateX(-7px);
  }

  40%,
  80% {
    transform: translateX(7px);
  }
}

@keyframes env-pulse {
  30% {
    transform: scale(1.12);
  }
}

.dist-pile {
  position: absolute;
  top: 44%;
  text-align: center;
  cursor: grab;
  touch-action: none;
  z-index: 3;
}

.dist-pile img {
  width: 100%;
  display: block;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.5));
}

.dist-pile span {
  display: block;
  margin-top: -0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
  font-variant-numeric: tabular-nums;
}

.dist-pile.is-dragging {
  cursor: grabbing;
  z-index: 5;
}

.dist-pile.is-picked img {
  animation: pile-picked 0.9s var(--ease) infinite;
}

@keyframes pile-picked {
  50% {
    transform: translateY(-6px);
  }
}

.dist-crash {
  position: absolute;
  left: 28%;
  width: 44%;
  top: 18%;
  animation: crash-fall 0.55s cubic-bezier(0.5, 0, 0.9, 0.4) both;
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.6));
  z-index: 4;
}

@keyframes crash-fall {
  from {
    transform: translateY(-140%) rotate(-14deg);
  }

  to {
    transform: none;
  }
}

.plate.is-shaking {
  animation: stage-shake 0.5s 0.5s var(--ease);
}

@keyframes stage-shake {

  20%,
  60% {
    transform: translate(-5px, 2px);
  }

  40%,
  80% {
    transform: translate(5px, -2px);
  }
}

/* ---------------------------------------------------------- Umbaupause -- */

.screen--proc {
  justify-content: center;
  align-items: center;
  background: var(--house-black);
}

.proc-curtain {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 52%;
  background:
    repeating-linear-gradient(90deg,
      var(--curtain-dark) 0px,
      var(--curtain) 24px,
      var(--curtain-light) 46px,
      var(--curtain) 70px,
      var(--curtain-dark) 96px);
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.8);
}

.proc-curtain--left {
  left: 0;
  animation: curtain-close-left 0.9s var(--ease) both;
}

.proc-curtain--right {
  right: 0;
  animation: curtain-close-right 0.9s var(--ease) both;
}

@keyframes curtain-close-left {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: none;
  }
}

@keyframes curtain-close-right {
  from {
    transform: translateX(100%);
  }

  to {
    transform: none;
  }
}

.proc-content {
  position: relative;
  z-index: 1;
  padding: 1.5rem;
  text-align: center;
}

.proc-lines {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.98rem;
  color: var(--ink);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.proc-lines li {
  animation: rise 0.4s var(--ease) both;
}

.proc-lines li::after {
  content: " ✓";
  color: var(--brass-bright);
}

/* ----------------------------------------------------------- Spielplan -- */

/* Oben genug Luft, damit der Schwenkbogen des Saals den Titel nicht verdeckt. */
.bill-scroll {
  position: relative;
  height: 100%;
  overflow-y: auto;
  padding: calc(clamp(3.2rem, 11vh, 6.5rem) + env(safe-area-inset-top)) clamp(1rem, 4vw, 1.75rem) 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.bill {
  background: linear-gradient(175deg, #fdf6e8, #f3e6cd);
  color: #2c1c10;
  border-radius: 0.5rem;
  border: 3px double rgba(169, 118, 47, 0.65);
  padding: 1.3rem 1.2rem 1.1rem;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.55);
  animation: rise 0.6s var(--ease) both;
}

.bill__season {
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #a9762f;
}

.bill__title {
  margin: 0.3rem 0 0;
  text-align: center;
  font-size: clamp(1.4rem, 5vw, 1.7rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.bill__headline {
  margin: 0.55rem 0 0;
  text-align: center;
  font-size: 0.98rem;
  line-height: 1.4;
  color: #5a4128;
}

.bill__groups {
  margin-top: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.bill-group h2 {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a9762f;
  border-bottom: 1px solid rgba(169, 118, 47, 0.35);
  padding-bottom: 0.25rem;
}

.bill-group__cast {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.bill-role {
  appearance: none;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(90, 65, 40, 0.4);
  background: rgba(255, 255, 255, 0.55);
  color: #2c1c10;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.18s var(--ease), background 0.18s var(--ease);
}

.bill-role:disabled {
  cursor: default;
  background: linear-gradient(160deg, var(--brass-bright), var(--brass));
  border-color: var(--brass-deep);
}

.bill-role.is-off {
  opacity: 0.42;
  text-decoration: line-through;
}

.bill__hint {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: #8a6a48;
}

.panel--inline {
  position: static;
  padding-top: 0;
}

/* ------------------------------------------------------- Erste Buchung -- */

.reh-chips,
.acc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.reh-chip {
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(253, 248, 242, 0.24);
  background: rgba(20, 12, 13, 0.75);
  color: var(--ink-muted);
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.reh-chip b {
  color: var(--brass-bright);
  font-variant-numeric: tabular-nums;
}

.reh-chip.is-hit {
  border-color: var(--brass);
  color: var(--ink);
  background: rgba(58, 36, 8, 0.75);
  animation: env-pulse 0.9s var(--ease);
}

.reh-card {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(232, 180, 101, 0.4);
  background: rgba(20, 12, 13, 0.9);
  animation: rise 0.45s var(--ease) both;
}

.reh-card__label {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
}

.reh-card__text {
  flex: 1;
  font-weight: 600;
}

.reh-card__amount {
  font-weight: 700;
  color: var(--brass-bright);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------- Pressestimmen -- */

.press-cards {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.press-card {
  position: relative;
  margin: 0;
  padding: 0.85rem 1rem 0.7rem;
  border-radius: 0.5rem;
  border: 2px solid rgba(232, 180, 101, 0.5);
  background: rgba(20, 12, 13, 0.88);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  animation: rise 0.5s var(--ease) both;
}

.press-card__badge {
  position: absolute;
  top: -0.55rem;
  right: 0.8rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--curtain);
  border: 1px solid rgba(253, 248, 242, 0.3);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

.press-card__stars {
  font-size: 0.78rem;
  color: var(--brass-bright);
  letter-spacing: 0.2em;
}

.press-card blockquote {
  margin: 0.25rem 0 0.3rem;
  font-size: 0.98rem;
  line-height: 1.4;
  color: var(--ink);
}

.press-card figcaption {
  font-size: 0.78rem;
  color: var(--ink-faint);
}

/* ------------------------------------------------------ Trial-Timeline -- */

.tl-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
}

.tl-item {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  position: relative;
}

.tl-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 1.35rem;
  top: 2.9rem;
  bottom: -0.9rem;
  width: 2px;
  background: rgba(232, 180, 101, 0.4);
}

.tl-item img {
  width: 2.7rem;
  height: 2.7rem;
  flex: none;
  border-radius: 50%;
  border: 2px solid rgba(232, 180, 101, 0.55);
  background: #f2ecff;
  object-fit: cover;
}

.tl-item h2 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--brass-bright);
}

.tl-item p {
  margin: 0.1rem 0 0;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--ink-muted);
}

/* ---------------------------------------------------------- Konto-Gate -- */

.acc-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.btn-auth {
  appearance: none;
  width: 100%;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(253, 248, 242, 0.3);
  background: rgba(255, 255, 255, 0.09);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease);
}

.btn-auth:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.14);
}

/* ------------------------------------------------------------- Paywall -- */

.pw-quote {
  margin-top: 0.4rem;
}

.pw-plans {
  display: flex;
  gap: 0.6rem;
}

.pw-plan {
  flex: 1;
  appearance: none;
  padding: 0.85rem 0.6rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(253, 248, 242, 0.24);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-muted);
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  align-items: center;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease),
    border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.pw-plan span {
  font-size: 1rem;
  font-weight: 700;
}

.pw-plan small {
  font-size: 0.78rem;
}

.pw-plan.is-selected {
  background: linear-gradient(160deg, rgba(246, 210, 154, 0.2), rgba(169, 118, 47, 0.2));
  border-color: var(--brass);
  color: var(--ink);
}

/* ------------------------------------------------------------ Premiere -- */

.lb-cast--cheer .lb-figure {
  animation: lb-in 0.5s var(--ease) both, cheer 1.6s 0.8s var(--ease) infinite;
}

@keyframes cheer {

  0%,
  100% {
    transform: none;
  }

  18% {
    transform: translateY(-9px);
  }

  36% {
    transform: none;
  }
}

.prem-confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.prem-confetti span {
  position: absolute;
  top: -4%;
  width: 8px;
  height: 13px;
  border-radius: 2px;
  opacity: 0.9;
  animation: confetti-fall linear infinite;
}

@keyframes confetti-fall {
  from {
    transform: translateY(-10vh) rotate(0deg);
  }

  to {
    transform: translateY(115vh) rotate(540deg);
  }
}

/* ------------------------------------------------------------ Sonstiges -- */

.prototype-badge {
  position: fixed;
  top: calc(0.75rem + env(safe-area-inset-top));
  left: 0.85rem;
  margin: 0;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: rgba(8, 5, 6, 0.6);
  border: 1px solid rgba(232, 180, 101, 0.25);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  pointer-events: none;
  z-index: 10;
}

.noscript {
  padding: 2rem;
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.5rem + env(safe-area-inset-bottom));
  transform: translate(-50%, 1rem);
  margin: 0;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  background: rgba(20, 12, 13, 0.95);
  border: 1px solid rgba(232, 180, 101, 0.3);
  font-size: 0.88rem;
  color: var(--ink-muted);
  opacity: 0;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  z-index: 20;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
