/* ============================================================
   Welt-Pages — gemeinsame Styles für alle Abenteuer-Seiten
   Bucht der Moai (offen), Pfad der stillen Wächter (bald),
   Karte, die sich räusperte (bald)
   ============================================================ */

.welt-page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 9vw, 7.5rem) 0 clamp(3rem, 7vw, 5.5rem);
  background-size: cover;
  background-position: center 45%;
  color: #f7ebd2;
}

.welt-page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 14, 8, .58), rgba(20, 14, 8, .35) 55%, rgba(247, 235, 210, .85) 100%);
  pointer-events: none;
}

.welt-page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(247, 235, 210, .45), transparent 60%);
}

/* Spezifische Hintergrundbilder pro Welt */
.welt-page-hero--bucht-der-moai {
  background-image: url("../assets/collage/welt-bucht-der-moai.png");
}

.welt-page-hero--pfad-der-stillen-waechter {
  background-image: url("../assets/collage/welt-pfad-der-stillen-waechter.png");
}

.welt-page-hero--karte-die-sich-raeusperte {
  background-image: url("../assets/collage/welt-karte-die-sich-raeusperte.png");
}

.welt-page-hero__inner {
  position: relative;
  z-index: 1;
  width: min(var(--container, 1180px), calc(100% - 2rem));
  margin: 0 auto;
  max-width: 880px;
  display: grid;
  gap: 1rem;
}

.welt-page-hero__status {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  width: fit-content;
  padding: .3rem .9rem;
  margin: 0;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  backdrop-filter: blur(6px);
}

.welt-page-hero__status--open {
  background: rgba(60, 145, 90, .72);
  color: #fff;
}

.welt-page-hero__status--soon {
  background: rgba(195, 145, 55, .8);
  color: #2a1a06;
}

.welt-page-hero__status::before {
  content: "";
  display: inline-block;
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: currentColor;
}

.welt-page-hero__kicker {
  margin: 0;
  font-size: .82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: rgba(255, 255, 255, .82);
}

.welt-page-hero h1 {
  margin: 0;
  font-family: var(--font-adventure, Georgia, serif);
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -.03em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .4);
}

.welt-page-hero__lead {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  max-width: 680px;
  color: #f6ead0;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .35);
  margin: 0;
}

/* Rück-Link "Zur Welten-Karte" */
.welt-page-hero__back {
  margin-top: .5rem;
  font-size: .9rem;
  color: rgba(255, 255, 255, .82);
}

.welt-page-hero__back a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .15em;
}

.welt-page-hero__back a:hover {
  color: #fff;
}

/* ============================================================
   Content-Bereich unter dem Hero
   ============================================================ */

.welt-content {
  background:
    linear-gradient(180deg, #f7ebd2 0%, #efdfbc 100%);
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.welt-content__wrap {
  width: min(var(--container, 1180px), calc(100% - 2rem));
  margin: 0 auto;
  max-width: 880px;
}

.welt-content h2 {
  margin: 0 0 1rem 0;
  font-family: var(--font-adventure, Georgia, serif);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  line-height: 1.1;
  color: #3e240a;
}

.welt-content p {
  margin: 0 0 1rem 0;
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.65;
  color: #4a2f12;
}

/* ============================================================
   Abenteuer-Song Toggle-Button (im Hero)
   ============================================================ */

.welt-audio-toggle {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-top: .4rem;
  width: fit-content;
  padding: .6rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .14);
  color: #f7ebd2;
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background .18s ease, transform .18s ease;
}

.welt-audio-toggle:hover {
  background: rgba(255, 255, 255, .24);
  transform: translateY(-1px);
}

.welt-audio-toggle__icon {
  font-size: 1.05rem;
  line-height: 1;
}

.welt-audio-toggle.is-playing {
  background: rgba(76, 194, 160, .3);
  border-color: rgba(76, 194, 160, .55);
}

.welt-audio-toggle.is-playing .welt-audio-toggle__icon {
  animation: welt-note-pulse 1.1s ease-in-out infinite;
}

@keyframes welt-note-pulse {
  0%, 100% { transform: scale(1); opacity: .9; }
  50% { transform: scale(1.18); opacity: 1; }
}

/* ============================================================
   Geheimnisvolle Intro-Video-Sektion (zwischen Hero & 3D-Welt)
   ============================================================ */

.welt-intro-video {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 38%, #16283d 0%, #0a121d 60%, #060b13 100%);
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.welt-intro-video__wrap {
  position: relative;
  z-index: 1;
  width: min(var(--container, 1180px), calc(100% - 2rem));
  margin: 0 auto;
  text-align: center;
}

.welt-intro-video__hint {
  margin: 0 0 1.6rem 0;
  font-family: var(--font-adventure, Georgia, serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2.4vw, 1.7rem);
  letter-spacing: .04em;
  color: rgba(240, 224, 188, .85);
  text-shadow: 0 2px 24px rgba(0, 0, 0, .65);
}

.welt-intro-video__frame {
  position: relative;
  width: min(680px, 92vw);
  margin: 0 auto;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow:
    0 0 70px rgba(120, 160, 215, .22),
    0 26px 64px rgba(0, 0, 0, .6),
    inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.welt-intro-video__frame video {
  width: 100%;
  height: auto;
  display: block;
  filter: saturate(.96) contrast(1.04);
}

/* Sanfte Vignette über dem Video für den geheimnisvollen Look */
.welt-intro-video__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 52%, rgba(6, 11, 19, .62) 100%);
}

/* ============================================================
   Interaktives 3D-Welt-Fenster (Marble iframe)
   ============================================================ */

.welt-explore {
  background: linear-gradient(180deg, #0c1a24 0%, #123047 100%);
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.welt-explore__wrap {
  width: min(var(--container, 1180px), calc(100% - 2rem));
  margin: 0 auto;
  max-width: 1080px;
  text-align: center;
}

.welt-explore__wrap h2 {
  margin: 0 0 .5rem 0;
  font-family: var(--font-adventure, Georgia, serif);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  color: #f3fafd;
}

.welt-explore__hint {
  margin: 0 auto 1.5rem;
  max-width: 620px;
  color: rgba(220, 235, 244, .82);
  font-size: clamp(.95rem, 1.5vw, 1.05rem);
  line-height: 1.55;
}

.welt-explore__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 1.2rem;
  overflow: hidden;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, .45),
    inset 0 0 0 1px rgba(255, 255, 255, .08);
  background: #081420;
}

.welt-explore__frame iframe,
.welt-explore__frame canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

@media (max-width: 760px) {
  .welt-explore__frame {
    aspect-ratio: 4 / 3;
  }
}

/* ============================================================
   Comic-Platzhalter (für Bucht der Moai)
   ============================================================ */

.welt-comics {
  background:
    linear-gradient(180deg, #f0e2bc 0%, #e9d5a0 100%);
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.welt-comics__wrap {
  width: min(var(--container, 1180px), calc(100% - 2rem));
  margin: 0 auto;
  max-width: 1080px;
}

.welt-comics__intro {
  max-width: 720px;
  margin: 0 auto clamp(1.5rem, 3vw, 2.5rem);
  text-align: center;
}

.welt-comics__intro h2 {
  margin: 0 0 .6rem 0;
  font-family: var(--font-adventure, Georgia, serif);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  color: #3e240a;
}

.welt-comics__intro p {
  margin: 0;
  color: #5a3a1a;
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.6;
}

.welt-comics__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}

.welt-comic-panel {
  aspect-ratio: 3 / 4;
  border-radius: 1rem;
  background:
    linear-gradient(180deg, #fff4d6, #f4dca3);
  border: 1px dashed rgba(120, 80, 30, .35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  color: #6a4319;
  font-style: italic;
  font-size: .9rem;
  box-shadow:
    0 8px 22px rgba(120, 80, 30, .08),
    inset 0 0 0 1px rgba(255, 255, 255, .5);
}

.welt-comic-panel__number {
  font-style: normal;
  font-weight: 700;
  font-size: .85rem;
  margin-bottom: .8rem;
  padding: .25rem .75rem;
  border-radius: 999px;
  background: rgba(120, 80, 30, .14);
  color: #5a3712;
  letter-spacing: .1em;
}

/* Gefüllte Comic-Kachel mit echtem Bild */
.welt-comic-panel--filled {
  aspect-ratio: auto;
  display: block;
  padding: 0;
  margin: 0;
  text-align: left;
  font-style: normal;
  border: 1px solid rgba(120, 80, 30, .2);
  background: linear-gradient(180deg, #fff8e2, #f6e6c2);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}

.welt-comic-panel--filled:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(120, 80, 30, .18);
}

.welt-comic-panel--filled img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.welt-comic-panel--filled figcaption {
  padding: .8rem 1rem 1.1rem;
  font-family: var(--font-adventure, Georgia, serif);
  color: #4a2c0e;
  font-size: 1.02rem;
  line-height: 1.3;
}

.welt-comic-panel--filled figcaption .welt-comic-panel__number {
  display: inline-block;
  margin: 0 0 .45rem 0;
}

/* ============================================================
   "Bald"-Hinweis-Box (für die zwei noch nicht offenen Welten)
   ============================================================ */

.welt-soon {
  background: linear-gradient(180deg, #4a2c0e, #2f1a06);
  color: #f8ebcd;
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.welt-soon__wrap {
  width: min(var(--container, 1180px), calc(100% - 2rem));
  margin: 0 auto;
  max-width: 720px;
  text-align: center;
}

.welt-soon h2 {
  margin: 0 0 .8rem 0;
  font-family: var(--font-adventure, Georgia, serif);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  color: #fcf4de;
}

.welt-soon p {
  color: rgba(248, 235, 205, .9);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.6;
  margin: 0 auto .8rem;
  max-width: 580px;
}

.welt-soon__hint {
  margin-top: 1.2rem;
  font-size: .85rem;
  color: rgba(248, 235, 205, .65);
  font-style: italic;
}

.welt-soon__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.4rem;
  padding: .75rem 1.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #fcf4de;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .25);
  transition: background .18s ease, transform .18s ease;
}

.welt-soon__back:hover {
  background: rgba(255, 255, 255, .22);
  transform: translateY(-1px);
}

.welt-soon__back::before {
  content: "🗺";
  margin-right: .55rem;
}

/* ============================================================
   "Welt betreten" / "Vorschau ansehen" Buttons in den
   world-postcard Kacheln auf der Startseite
   ============================================================ */

.world-postcard__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: .75rem;
  padding: .55rem 1.1rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.world-postcard__button::after {
  content: "→";
  margin-left: .45rem;
  transition: transform .18s ease;
}

.world-postcard__button:hover {
  transform: translateY(-1px);
  filter: saturate(1.05);
}

.world-postcard__button:hover::after {
  transform: translateX(2px);
}

.world-postcard__button--open {
  background: linear-gradient(180deg, #3c915a, #1e5e35);
  color: #fff;
  border-color: rgba(255, 255, 255, .22);
  box-shadow: 0 10px 22px rgba(30, 94, 53, .28);
}

.world-postcard__button--open:hover {
  box-shadow: 0 14px 28px rgba(30, 94, 53, .38);
}

.world-postcard__button--soon {
  background: rgba(120, 80, 30, .14);
  color: #5a3712;
  border-color: rgba(120, 80, 30, .28);
}

.world-postcard__button--soon:hover {
  background: rgba(120, 80, 30, .22);
}

/* ============================================================
   Story-Modus (Scrollytelling) — 3D-Bühne + Comic-Overlays
   ============================================================ */

.welt-story {
  position: relative;
  /* Scroll-Länge: ein Bildschirm pro Beat + etwas Puffer.
     Wird bei 5 Panels zu ~550vh; per Custom-Property anpassbar. */
  height: 560vh;
  background: #0c1a24;
}

.welt-story__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: #0c1a24;
}

/* Fallback-Variante (Mobil / reduzierte Bewegung): statisches Bild */
.welt-story__sticky--static {
  background-size: cover;
  background-position: center center;
}

#welt-3d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Abdunkelung, damit die Comic-Panels lesbar über der Welt sitzen */
.welt-story__sticky::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 60%, transparent 30%, rgba(8, 20, 30, .55) 100%);
  z-index: 1;
}

.welt-story__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* Comic-Panel — unten platziert, damit die Welt frei sichtbar bleibt */
.welt-panel {
  position: absolute;
  left: 50%;
  bottom: 3.5vh;
  width: min(440px, 78vw);
  opacity: 0;
  transform: translateX(-50%) translateY(26px) scale(.97);
  transition: opacity .55s ease, transform .55s ease;
  background: rgba(255, 252, 244, .94);
  border-radius: 1.1rem;
  padding: .55rem .55rem .9rem;
  box-shadow:
    0 24px 50px rgba(0, 0, 0, .45),
    inset 0 0 0 1px rgba(255, 255, 255, .6);
}

.welt-panel.is-active {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.welt-panel__frame {
  aspect-ratio: 4 / 3;
  border-radius: .7rem;
  overflow: hidden;
  background:
    linear-gradient(160deg, #cfe3ef, #b6cfdf);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(13, 58, 84, .18);
}

.welt-panel__frame img,
.welt-panel__frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Platzhalter-Text, solange noch kein Comic-Bild drin ist */
.welt-panel__placeholder {
  text-align: center;
  color: #4a6577;
  font-style: italic;
  font-size: .92rem;
  padding: 1.2rem;
}

.welt-panel__caption {
  margin: .8rem .4rem .2rem;
  font-family: var(--font-adventure, Georgia, serif);
  color: #243b49;
  font-size: 1.05rem;
  line-height: 1.35;
}

.welt-panel__chapter {
  display: inline-block;
  margin: .35rem .4rem 0;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: #1a6593;
}

/* Fortschrittsbalken oben */
.welt-story__progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 3;
  background: rgba(255, 255, 255, .12);
}

.welt-story__progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, #4cc2a0, #1a6593);
  transition: transform .1s linear;
}

/* Scroll-Hinweis, blendet nach Beginn aus */
.welt-story__hint {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  margin: 0;
  padding: .5rem 1rem;
  border-radius: 999px;
  background: rgba(8, 20, 30, .55);
  color: rgba(255, 255, 255, .9);
  font-size: .85rem;
  backdrop-filter: blur(6px);
  animation: welt-hint-bounce 2.2s ease-in-out infinite;
}

@keyframes welt-hint-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(5px); }
}

/* Intro-Titel über der Story */
.welt-story__intro {
  position: absolute;
  top: clamp(1.5rem, 6vh, 4rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  text-align: center;
  width: min(680px, 90vw);
  color: #f3fafd;
  pointer-events: none;
}

.welt-story__intro h2 {
  margin: 0;
  font-family: var(--font-adventure, Georgia, serif);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  text-shadow: 0 2px 16px rgba(0, 0, 0, .5);
}

@media (max-width: 760px) {
  .welt-story {
    height: 520vh;
  }

  .welt-panel {
    width: min(420px, 90vw);
  }
}

/* Lade-Overlay für die Splat-Welt (63 MB Download) */
.welt-story__loader {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  background: radial-gradient(ellipse at 50% 50%, #143246, #081420);
  color: #eaf4fa;
  transition: opacity .6s ease;
}

.welt-story__loader.is-done {
  opacity: 0;
}

.welt-story__loader-spinner {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, .18);
  border-top-color: #4cc2a0;
  animation: welt-spin 1s linear infinite;
}

@keyframes welt-spin {
  to { transform: rotate(360deg); }
}

.welt-story__loader-text {
  margin: 0;
  text-align: center;
  font-family: var(--font-adventure, Georgia, serif);
  font-size: 1.1rem;
  line-height: 1.5;
  color: #dcebf4;
}

.welt-story__loader-text span {
  font-size: .95rem;
  color: #88c8b3;
  letter-spacing: .05em;
}

/* ============================================================
   Scrollytelling-Ergänzungen (Iteration 2)
   ============================================================ */

/* Scroll-Cue unter dem Intro-Video */
.welt-intro-video__scrollcue {
  margin: 1.8rem 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  color: rgba(220, 235, 244, .7);
  font-size: .85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.welt-intro-video__scrollcue-arrow {
  font-size: 1.3rem;
  animation: welt-hint-bounce 2.2s ease-in-out infinite;
}

/* Intro-Titel & Scroll-Hinweis sanft ausblenden, sobald die Story läuft */
.welt-story__intro {
  transition: opacity .5s ease, transform .5s ease;
}

.welt-story__intro.is-hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(-12px);
  pointer-events: none;
}

.welt-story__hint {
  transition: opacity .5s ease;
}

.welt-story__hint.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* "Bucht selbst erkunden"-Aufforderung am Ende der Story */
.welt-roam-cta {
  position: absolute;
  left: 50%;
  bottom: 2.2vh;
  transform: translateX(-50%) translateY(14px);
  z-index: 4;
  opacity: 0;
  transition: opacity .5s ease, transform .5s ease;
}

.welt-roam-cta.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.welt-roam-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .35);
  background: linear-gradient(180deg, rgba(76, 194, 160, .92), rgba(26, 101, 147, .92));
  color: #fff;
  font-size: 1.02rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .4);
  backdrop-filter: blur(4px);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.welt-roam-btn:hover {
  transform: translateY(-2px);
  filter: saturate(1.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
}

/* ---- Vollbild-Erkundungsmodus ---- */
body.welt-roam-active {
  overflow: hidden;
}

body.welt-roam-active .welt-story__sticky {
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  z-index: 1000;
}

/* Im Erkunden-Modus stören Overlays nicht */
body.welt-roam-active .welt-story__overlay,
body.welt-roam-active .welt-story__intro,
body.welt-roam-active .welt-story__progress,
body.welt-roam-active .welt-story__hint,
body.welt-roam-active .welt-roam-cta {
  display: none;
}

body.welt-roam-active .welt-story__sticky::after {
  /* Vignette zurücknehmen, freie Sicht beim Erkunden */
  opacity: .35;
}

/* HUD im Erkunden-Modus */
.welt-roam-hud {
  position: fixed;
  inset: 0;
  z-index: 1001;
  pointer-events: none;
}

.welt-roam-hud__hint {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: .55rem 1.1rem;
  border-radius: 999px;
  background: rgba(8, 20, 30, .6);
  color: rgba(255, 255, 255, .92);
  font-size: .85rem;
  text-align: center;
  backdrop-filter: blur(6px);
}

.welt-roam-hud__close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  pointer-events: auto;
  padding: .55rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(8, 20, 30, .6);
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background .18s ease;
}

.welt-roam-hud__close:hover {
  background: rgba(8, 20, 30, .85);
}

@media (max-width: 760px) {
  .welt-roam-hud__hint {
    width: min(92vw, 30rem);
    font-size: .8rem;
  }
}

/* ============================================================
   Gerahmtes 3D-Fenster (Iteration 3)
   Kleiner als Vollbild -> Splats wirken dichter/schärfer und es
   läuft flüssiger. Im Free-Roam wird das Fenster zu Vollbild.
   ============================================================ */

/* Bühne = Holzrahmen eines alten Schiffsfensters */
.welt-story__stage {
  position: absolute;
  top: 4vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(1150px, 92vw);
  height: min(648px, 64vh);
  padding: clamp(12px, 1.5vw, 22px);
  border-radius: 1.5rem;
  background:
    linear-gradient(145deg, #7a5430 0%, #5a3c20 28%, #3c2613 70%, #2c1a0c 100%);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, .6),
    0 1px 0 rgba(255, 228, 180, .25) inset,
    0 -2px 6px rgba(0, 0, 0, .5) inset;
  z-index: 1;
}

/* Holzmaserung über dem Rahmen */
.welt-story__stage::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    repeating-linear-gradient(180deg,
      rgba(255, 225, 180, .05) 0 2px,
      rgba(0, 0, 0, .05) 2px 5px,
      rgba(255, 225, 180, .03) 5px 9px);
  opacity: .55;
  mix-blend-mode: overlay;
}

/* Messing-Nieten in den vier Ecken */
.welt-story__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 16px 16px, #f2d79a 0 2px, #b9893f 2px 4px, #6e4a1d 4px 6px, transparent 7px),
    radial-gradient(circle at calc(100% - 16px) 16px, #f2d79a 0 2px, #b9893f 2px 4px, #6e4a1d 4px 6px, transparent 7px),
    radial-gradient(circle at 16px calc(100% - 16px), #f2d79a 0 2px, #b9893f 2px 4px, #6e4a1d 4px 6px, transparent 7px),
    radial-gradient(circle at calc(100% - 16px) calc(100% - 16px), #f2d79a 0 2px, #b9893f 2px 4px, #6e4a1d 4px 6px, transparent 7px);
}

/* Innenfenster: versenkt, mit Messing-Ring */
.welt-story__porthole {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: .9rem;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 3px rgba(196, 150, 80, .85),
    inset 0 0 0 5px rgba(60, 40, 18, .9),
    inset 0 0 28px rgba(0, 0, 0, .7);
}

/* Steuer-Hinweis im Fenster (blendet nach einigen Sekunden aus) */
.welt-stage-hint {
  position: absolute;
  left: 50%;
  bottom: .8rem;
  transform: translateX(-50%);
  z-index: 4;
  margin: 0;
  padding: .35rem .85rem;
  border-radius: 999px;
  background: rgba(8, 20, 30, .55);
  color: rgba(255, 255, 255, .88);
  font-size: .78rem;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  pointer-events: none;
  animation: welt-stagehint-fade 1s ease 6s forwards;
}

@keyframes welt-stagehint-fade {
  to { opacity: 0; visibility: hidden; }
}

/* Auf Touch keine Maus/WASD-Steuerung im Fenster -> Hinweis weg */
@media (hover: none), (pointer: coarse) {
  .welt-stage-hint { display: none; }
}

/* Comic-Panel sitzt im unteren Bereich, überlappend dem Fenster */
.welt-panel {
  bottom: 4vh;
  width: min(540px, 88vw);
  z-index: 2;
}

/* Cineastische Panels = Memory-Cards (Text, Figur-Satz, Mehr-Link) */
.welt-panel__text {
  margin: .55rem .5rem .15rem;
  color: #33271a;
  font-size: .98rem;
  line-height: 1.45;
}

.welt-panel__line {
  margin: .1rem .5rem .25rem;
  color: #5a3712;
  font-style: italic;
  font-size: .92rem;
}

.welt-panel__more {
  display: inline-block;
  margin: .45rem .5rem .2rem;
  padding: .42rem .95rem;
  border-radius: 999px;
  border: 1px solid rgba(26, 101, 147, .4);
  color: #1a6593;
  font-weight: 700;
  text-decoration: none;
  font-size: .85rem;
}

.welt-panel__more:hover { background: rgba(26, 101, 147, .1); }

/* Intro-Titel über das Fenster legen (verblasst beim Scrollen) */
.welt-story__intro {
  top: clamp(1rem, 3.5vh, 2.4rem);
  z-index: 3;
}

/* Free-Roam: Fenster auf Vollbild aufziehen, Rahmen weg */
body.welt-roam-active .welt-story__stage {
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  transform: none;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  padding: 0;
  border-radius: 0;
  background: #081420;
  box-shadow: none;
  z-index: 1000;
}

body.welt-roam-active .welt-story__stage::before,
body.welt-roam-active .welt-story__stage::after { display: none; }

body.welt-roam-active .welt-story__porthole {
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 760px) {
  .welt-story__stage {
    width: 94vw;
    height: min(72vw, 48vh);
    padding: 10px;
  }
}

/* ============================================================
   Modus-Umschalter (Film / Selbst erkunden)
   ============================================================ */
.welt-modus-toggle {
  position: fixed;
  top: 70px;
  right: 14px;
  z-index: 1200;
  display: flex;
  gap: .25rem;
  padding: .25rem;
  border-radius: 999px;
  background: rgba(8, 20, 30, .6);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
}

.welt-modus-toggle__btn {
  padding: .4rem .85rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 700;
  color: #dfeaf0;
  text-decoration: none;
  white-space: nowrap;
}

.modus-film .welt-modus-toggle [data-modus-film],
.modus-erkunden .welt-modus-toggle [data-modus-erkunden] {
  background: linear-gradient(180deg, #4cc2a0, #1a6593);
  color: #fff;
}

/* ============================================================
   Entdecker-Layout: Welt füllt den Bildschirm, Rest ausgeblendet
   ============================================================ */
html.modus-erkunden,
.modus-erkunden body {
  overflow: hidden;
  height: 100%;
}

.modus-erkunden .welt-page-hero,
.modus-erkunden .welt-intro-video,
.modus-erkunden .welt-comics,
.modus-erkunden .welt-story__overlay,
.modus-erkunden .welt-story__intro,
.modus-erkunden .welt-story__hint,
.modus-erkunden .welt-story__progress,
.modus-erkunden .welt-roam-cta,
.modus-erkunden .welt-stage-hint {
  display: none !important;
}

.modus-erkunden .welt-story,
.modus-erkunden .welt-story__sticky {
  height: 100vh;
  height: 100dvh;
}

.modus-erkunden .welt-story__stage {
  position: absolute;
  top: 64px;
  left: 2vw;
  right: 2vw;
  bottom: 2vh;
  width: auto;
  height: auto;
  transform: none;
}

/* ============================================================
   Fortschritts-HUD
   ============================================================ */
.adv-hud {
  position: fixed;
  top: 64px;
  left: 14px;
  z-index: 1200;
  width: min(260px, 52vw);
  padding: .7rem .9rem;
  border-radius: 1rem;
  background: rgba(8, 20, 30, .6);
  backdrop-filter: blur(8px);
  color: #eaf4fa;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

.adv-hud__title {
  display: block;
  font-family: var(--font-adventure, Georgia, serif);
  font-size: 1.05rem;
  line-height: 1.1;
  margin-bottom: .2rem;
}

.adv-hud__count {
  font-weight: 800;
  color: #9be7d2;
}

.adv-hud__dots {
  display: flex;
  gap: .35rem;
  margin: .45rem 0 .3rem;
}

.adv-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}

.adv-dot.is-found {
  background: radial-gradient(circle at 35% 30%, #ffe9b0, #f2a93f);
  box-shadow: 0 0 8px rgba(242, 169, 63, .7);
}

.adv-hud__hint {
  margin: .3rem 0 0;
  font-size: .74rem;
  color: rgba(220, 235, 244, .7);
  line-height: 1.3;
}

/* ============================================================
   Memory-Card (entfaltete Spur)
   ============================================================ */
/* WICHTIG: hidden muss display:flex schlagen, sonst liegen die
   unsichtbaren Overlays über der Welt und fangen die Maus ab. */
.adv-card-backdrop[hidden],
.adv-complete[hidden] {
  display: none !important;
}

.adv-card-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(6, 12, 20, .55);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .3s ease;
}

.adv-card-backdrop.is-open { opacity: 1; }

.adv-card {
  position: relative;
  width: min(1440px, 96vw);
  max-height: 94vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #fff8e8, #f3e2bd);
  border-radius: 1.2rem;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .5);
  transform: translateY(16px) scale(.98);
  transition: transform .3s ease;
}

.adv-card-backdrop.is-open .adv-card { transform: none; }

@media (min-width: 820px) {
  .adv-card { flex-direction: row; align-items: stretch; }
}

.adv-card__close {
  position: absolute;
  top: .6rem;
  right: .6rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
}

.adv-card__media {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #cfe0ea;
  flex: none;
}

.adv-card__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.adv-card__body {
  padding: 1.1rem 1.4rem 1.4rem;
  overflow: auto;
}

@media (min-width: 820px) {
  .adv-card__media { width: 58%; aspect-ratio: auto; }
  .adv-card__body { width: 42%; }
}

.adv-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
  margin-top: .4rem;
}

.adv-card__more {
  display: inline-block;
  padding: .58rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(26, 101, 147, .4);
  color: #1a6593;
  font-weight: 700;
  text-decoration: none;
}

.adv-card__more:hover { background: rgba(26, 101, 147, .1); }

.adv-card__chapter {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #1a6593;
}

.adv-card__title {
  margin: .2rem 0 .5rem;
  font-family: var(--font-adventure, Georgia, serif);
  font-size: 1.5rem;
  color: #3e240a;
}

.adv-card__text {
  margin: 0 0 .7rem;
  color: #4a2f12;
  line-height: 1.55;
}

.adv-card__line {
  margin: 0 0 1rem;
  color: #5a3712;
  font-style: italic;
}

.adv-card__next {
  padding: .6rem 1.2rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #4cc2a0, #1a6593);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

/* ============================================================
   Kapitel-Abschluss
   ============================================================ */
.adv-complete {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(6, 12, 20, .7);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .4s ease;
}

.adv-complete.is-open { opacity: 1; }

.adv-complete__box {
  width: min(520px, 94vw);
  text-align: center;
  background: linear-gradient(180deg, #fff8e8, #efdcb0);
  border-radius: 1.2rem;
  padding: 2rem 1.5rem;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55);
}

.adv-complete__badge { font-size: 3rem; }

.adv-complete__box h2 {
  font-family: var(--font-adventure, Georgia, serif);
  color: #3e240a;
  margin: .3rem 0 .6rem;
}

.adv-complete__box p {
  color: #4a2f12;
  line-height: 1.55;
  margin: 0 0 1.2rem;
}

.adv-complete__actions {
  display: flex;
  gap: .6rem;
  justify-content: center;
  flex-wrap: wrap;
}

.adv-complete__actions button,
.adv-complete__actions a {
  padding: .6rem 1.2rem;
  border-radius: 999px;
  border: 0;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.adv-complete__actions [data-replay] {
  background: linear-gradient(180deg, #4cc2a0, #1a6593);
  color: #fff;
}

.adv-complete__actions a {
  background: rgba(120, 80, 30, .15);
  color: #5a3712;
}

@media (max-width: 760px) {
  .welt-modus-toggle { top: 60px; right: 8px; }
  .adv-hud { top: 58px; left: 8px; width: min(220px, 60vw); }
}

/* ============================================================
   Leuchtpunkte (Beacons) — flache HTML-Marker über der Welt
   Konstante Größe, immer klickbar, nie bildschirmfüllend.
   ============================================================ */
.adv-beacons {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;   /* Drags gehen an die Welt; nur Punkte klickbar */
  overflow: hidden;
}

.adv-beacon {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #06302a;
  font-weight: 800;
  font-size: .9rem;
  background: radial-gradient(circle at 35% 30%, #d9fff2, #4cc2a0);
  box-shadow: 0 0 0 4px rgba(76, 194, 160, .25), 0 2px 8px rgba(0, 0, 0, .45);
  transition: transform .08s linear;
}

.adv-beacon:hover { filter: brightness(1.08); }

.adv-beacon__pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(155, 231, 210, .85);
  animation: adv-pulse 1.8s ease-out infinite;
  pointer-events: none;
}

@keyframes adv-pulse {
  0% { transform: scale(.65); opacity: .9; }
  100% { transform: scale(2); opacity: 0; }
}

.adv-beacon__num { position: relative; }

.adv-beacon.is-found {
  background: radial-gradient(circle at 35% 30%, #ffe9b0, #f2a93f);
  box-shadow: 0 0 0 4px rgba(242, 169, 63, .25), 0 2px 8px rgba(0, 0, 0, .45);
}

.adv-beacon.is-found .adv-beacon__pulse { display: none; }

/* ============================================================
   Film-Modus: klick-geführte Sequenz
   ============================================================ */
.modus-film .welt-story,
.modus-film .welt-story__sticky {
  height: 100vh;
  height: 100dvh;
}

.modus-film .welt-story__hint { display: none; }

.adv-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  padding: .9rem 1.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .35);
  background: linear-gradient(180deg, #4cc2a0, #1a6593);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .4);
  transition: transform .18s ease, filter .18s ease;
}

.adv-play:hover { transform: translate(-50%, -50%) translateY(-2px); filter: saturate(1.08); }

.adv-card__prev {
  padding: .58rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(120, 80, 30, .35);
  background: transparent;
  color: #5a3712;
  font-weight: 700;
  cursor: pointer;
}

.adv-card__prev:hover { background: rgba(120, 80, 30, .1); }

/* ============================================================
   Kapitel-Hintergrundseiten
   ============================================================ */
.welt-content img {
  display: block;
  width: 100%;
  max-width: 680px;
  margin: 1.2rem auto 1.6rem;
  border-radius: 1rem;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .18);
}

.welt-content__lead {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: #3e240a;
}

.kapitel-tag {
  display: inline-block;
  padding: .3rem .9rem;
  border-radius: 999px;
  background: rgba(26, 101, 147, .14);
  color: #1a6593;
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .6rem;
}

.welt-content__back {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.welt-content__back a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .65rem 1.25rem;
  border-radius: 999px;
  background: rgba(120, 80, 30, .14);
  color: #5a3712;
  text-decoration: none;
  font-weight: 700;
}

.welt-content__back a:hover { background: rgba(120, 80, 30, .22); }
