/* ---------- Welt mit mehreren Gebieten ---------- */
:root { --boden: max(170px, calc(var(--p) * 58)); }

.track {
  position: relative; z-index: 1;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  /* durchgehender Boden */
  background: linear-gradient(180deg, transparent calc(100% - var(--boden)), #c9c5e6 calc(100% - var(--boden)), #a9a4d0 calc(100% - var(--boden) * .6), #8a84b8 100%);
}
.track::-webkit-scrollbar { display: none; }
.track.zieht { cursor: grabbing; }
.track img { -webkit-user-drag: none; }

.gebiet {
  position: relative;
  flex: none;
  width: max(640px, 170vw);
  overflow: hidden;
  isolation: isolate;
}
@media (min-width: 1000px) { .gebiet { width: max(1400px, 100vw); } }

.welt.gebiet {
  width: 100vw;
  min-width: 360px;
  max-width: none;
  margin: 0;
}
.welt .garten { height: var(--boden); min-height: 0; background: radial-gradient(ellipse 50% 40% at 50% 0%, rgba(255, 170, 80, .28), transparent 70%); box-shadow: none; }

/* Himmel und Boden je Gebiet, an den Rändern weich ausgeblendet */
.gebiet .himmel-schicht, .gebiet .boden-schicht {
  position: absolute; left: 0; right: 0; z-index: -1;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
  pointer-events: none;
}
.gebiet .himmel-schicht { top: 0; bottom: var(--boden); transition: filter 2s steps(8); }
.gebiet .boden-schicht { bottom: 0; height: var(--boden); }
.gebiet .boden-schicht::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: calc(var(--p) * 2); background: rgba(255,255,255,.35); }

.gebiet .ding { position: absolute; }
.gebiet .klick { cursor: pointer; }
.gebiet .parallax { will-change: transform; }

.gebiet-titel {
  position: absolute; top: 40px; left: 50%; transform: translateX(-50%);
  font-family: var(--pixel); font-size: clamp(14px, 3.6vw, 26px);
  white-space: nowrap; z-index: 3;
  pointer-events: none;
}

/* Wegweiser an den Gebietsgrenzen */
.wegweiser {
  position: absolute; z-index: 6;
  bottom: calc(var(--boden) - var(--p) * 2);
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer;
}
.wegweiser .brett {
  font-family: var(--pixel); font-size: 9px; line-height: 1.4;
  color: #2a1810; background: #c9955a;
  padding: 7px 8px 5px;
  box-shadow: 0 0 0 3px #4a2e1a, inset 0 -3px 0 #a8744a;
  white-space: nowrap;
}
.wegweiser .pfosten { width: calc(var(--p) * 2); height: calc(var(--p) * 16); background: #6b4428; box-shadow: inset calc(var(--p) * -1) 0 0 #4a2e1a; }
.wegweiser:hover .brett { background: #ffd27a; }

/* Randpfeile */
.randpfeil {
  position: fixed; top: 50%; z-index: 25;
  transform: translateY(-50%);
  border: 0; cursor: pointer;
  font-family: var(--pixel); font-size: 9px; line-height: 1.5;
  color: var(--amber-hell);
  background: rgba(42, 24, 16, .82);
  padding: 12px 8px 10px;
  box-shadow: 0 0 0 3px #c9a050;
  max-width: 120px;
}
.randpfeil.links { left: 6px; }
.randpfeil.rechts { right: 6px; }
.randpfeil[hidden] { display: none; }
.randpfeil.lockt { animation: locken 1.2s infinite steps(2, end); }
@keyframes locken { 50% { transform: translateY(-50%) translateX(var(--wackel, 4px)); } }
.randpfeil.links.lockt { --wackel: -4px; }
@media (max-width: 600px) { .randpfeil .name { display: none; } .randpfeil { padding: 14px 8px 12px; font-size: 12px; } }

/* HUD mit Karte */
.hud { left: 50%; right: auto; transform: translateX(-50%); align-items: center; max-width: calc(100vw - 16px); }
.karte { display: flex; gap: 6px; margin-right: 8px; }
.karte button {
  display: flex; align-items: center; gap: 6px;
  border: 0; cursor: pointer;
  background: #2a1810; color: #b8a890;
  font-family: var(--pixel); font-size: 8px;
  padding: 6px 7px;
  box-shadow: 0 0 0 3px #6b5a40, 0 0 0 6px #2a1810;
  height: 34px;
}
.karte button img { width: 22px !important; height: auto !important; }
.karte button.aktiv { color: var(--amber-hell); box-shadow: 0 0 0 3px #ffd27a, 0 0 0 6px #2a1810; background: #4a2a18; }
.karte .name { display: none; }
@media (min-width: 900px) { .karte .name { display: inline; } }
@media (max-width: 420px) { .karte { gap: 4px; margin-right: 4px; } .karte button { padding: 5px 4px; } .karte button img { width: 18px !important; } .hud-knopf { padding: 9px 7px 7px; font-size: 9px; } }

.fuss { background: #8a84b8; padding-bottom: 110px; }

/* ---------- KÜSTE ---------- */
.kueste .himmel-schicht { background: linear-gradient(180deg, #24123e 0%, #4a2058 22%, #8a3060 42%, #e0566a 56%, #ff9a52 62%, #ffc66a 64%); }
.kueste.nacht .himmel-schicht { filter: brightness(.35) saturate(.6); }
.kueste .boden-schicht { background: linear-gradient(180deg, #f0d098, #d8b070 60%, #b88a52); }
.kueste .meer {
  position: absolute; left: 0; right: 0; top: 64%; bottom: var(--boden); z-index: 2;
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,.0) 0 calc(var(--p) * 5), rgba(255, 200, 170, .25) calc(var(--p) * 5) calc(var(--p) * 6)),
    linear-gradient(180deg, #ff9e6a 0%, #c8566a 12%, #5a2e6a 45%, #2a1e52 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%);
  transition: filter 2s steps(8);
}
.kueste.nacht .meer { filter: brightness(.45); }
.kueste .wellen {
  position: absolute; left: 0; right: 0; height: calc(var(--p) * 2);
  background: repeating-linear-gradient(90deg, rgba(255, 230, 210, .55) 0 calc(var(--p) * 4), transparent calc(var(--p) * 4) calc(var(--p) * 12));
  animation: wellen 3s infinite steps(6) linear;
}
@keyframes wellen { to { background-position: calc(var(--p) * 12) 0; } }
.kueste .spiegelung {
  position: absolute; top: 0; height: 70%; width: calc(var(--p) * 30);
  background: repeating-linear-gradient(180deg, rgba(255, 220, 150, .7) 0 var(--p), transparent var(--p) calc(var(--p) * 4));
  -webkit-mask-image: linear-gradient(180deg, #000, transparent);
  mask-image: linear-gradient(180deg, #000, transparent);
  animation: glitzern 1.4s infinite steps(2);
  transition: opacity 2s steps(6);
}
.kueste.nacht .spiegelung { opacity: 0; }
@keyframes glitzern { 50% { transform: scaleX(.8); opacity: .7; } }
.kueste .sonne { z-index: 1; transition: top 3s steps(12); filter: drop-shadow(0 0 20px rgba(255, 160, 80, .7)); }
.kueste .sterne-nacht { position: absolute; inset: 0 0 40% 0; opacity: 0; transition: opacity 2s steps(6); pointer-events: none; z-index: 0;
  background-image: radial-gradient(#fff 1px, transparent 1.5px), radial-gradient(#ffe8c0 1px, transparent 1.5px);
  background-size: 97px 83px, 151px 127px; background-position: 13px 7px, 61px 41px; }
.kueste.nacht .sterne-nacht { opacity: .8; }
.kueste .vogel-flieger { z-index: 2; animation: zurSonne linear infinite; }
@keyframes zurSonne {
  0% { transform: translate(0, 0) scale(1); opacity: 0; }
  6% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translate(var(--zx), var(--zy)) scale(.25); opacity: 0; }
}
.kueste .vogel-flieger.erschreckt img { animation: flattern .6s steps(3); }
@keyframes flattern { 50% { transform: translateY(-30px) rotate(-20deg); } }
.kueste .boot { z-index: 3; animation: segeln 70s linear infinite; }
@keyframes segeln { from { transform: translateX(-20vw); } to { transform: translateX(var(--weg, 180vw)); } }
.kueste .boot img { animation: schaukeln 3s infinite steps(4) alternate; }
@keyframes schaukeln { from { transform: rotate(-3deg); } to { transform: rotate(3deg) translateY(2px); } }
.kueste .wal { z-index: 3; }
.kueste .wal img { animation: auftauchen 6s infinite steps(6); }
@keyframes auftauchen { 0%, 100% { transform: translateY(40%); } 40%, 60% { transform: translateY(0); } }
.fontaene {
  position: absolute; width: calc(var(--p) * 2); height: calc(var(--p) * 2);
  background: #cfe8ff; box-shadow: 0 0 4px #fff;
  animation: fontaene 1.4s ease-out forwards;
  pointer-events: none;
  z-index: 4;
}
@keyframes fontaene { 0% { transform: translate(0, 0); opacity: 1; } 100% { transform: translate(var(--fx), var(--fy)); opacity: 0; } }
.kueste .leuchtturm { z-index: 3; }
.kueste .lichtkegel {
  position: absolute; z-index: 2;
  width: 60vw; max-width: 700px; height: calc(var(--p) * 18);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(255, 240, 170, .65), transparent);
  clip-path: polygon(0 45%, 100% 0, 100% 100%, 0 55%);
  animation: kegel 6s linear infinite;
  opacity: 0; transition: opacity .3s steps(2);
  pointer-events: none;
}
.kueste .lichtkegel.an { opacity: 1; }
@keyframes kegel { 0% { transform: translateY(-50%) scaleX(1) rotate(-8deg); } 50% { transform: translateY(-50%) scaleX(-1) rotate(8deg); } 100% { transform: translateY(-50%) scaleX(1) rotate(-8deg); } }
.kueste .krabbe { z-index: 4; animation: krabbeln 7s infinite steps(28) alternate; }
.kueste .krabbe.flucht { animation: krabbeln 1s infinite steps(8) alternate; }
@keyframes krabbeln { from { transform: translateX(0); } to { transform: translateX(calc(var(--p) * 40)); } }
.kueste .ballon { z-index: 1; animation: treiben 40s ease-in-out infinite alternate; }
@keyframes treiben { from { transform: translate(0, 0); } to { transform: translate(calc(var(--p) * 60), calc(var(--p) * 10)); } }
.kueste .wolke { z-index: 0; opacity: .85; animation: ziehen linear infinite; }
@keyframes ziehen { from { transform: translateX(-30%); } to { transform: translateX(60vw); } }

/* ---------- DSCHUNGEL ---------- */
.dschungel .himmel-schicht { background: linear-gradient(180deg, #0c2228 0%, #163a34 35%, #24543a 70%, #2f6a3a 100%); }
.dschungel .boden-schicht { background: linear-gradient(180deg, #3a6a2a, #2a5020 50%, #1f3a18); }
.dschungel .baum-hinten img { filter: brightness(.55) saturate(.8); }
.dschungel .baum-mitte img { filter: brightness(.8); }
.dschungel .liane { position: absolute; top: 0; width: var(--p); background: repeating-linear-gradient(180deg, #3a6a2a 0 calc(var(--p) * 3), #4a8a3a calc(var(--p) * 3) calc(var(--p) * 4)); z-index: 3; pointer-events: none; }
.dschungel .schaukel { position: absolute; top: 0; z-index: 4; transform-origin: 50% 0; animation: schaukel 3.4s ease-in-out infinite alternate; }
.dschungel .schaukel .seil { width: var(--p); margin: 0 auto; background: repeating-linear-gradient(180deg, #4a7a2a 0 calc(var(--p) * 3), #3a5a20 calc(var(--p) * 3) calc(var(--p) * 4)); }
.dschungel .schaukel .affe { cursor: pointer; margin-top: calc(var(--p) * -2); }
.dschungel .schaukel.wild { animation-duration: .6s; }
@keyframes schaukel { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }
.dschungel .wasserfall {
  position: absolute; z-index: 2;
  width: calc(var(--p) * 16);
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,.55) 0 calc(var(--p) * 2), transparent calc(var(--p) * 2) calc(var(--p) * 7)),
    linear-gradient(90deg, #5aa8d8, #8ad0f0 40%, #5aa8d8);
  background-size: 100% calc(var(--p) * 14), 100% 100%;
  animation: fallen-wasser .5s infinite steps(4) linear;
  box-shadow: inset calc(var(--p) * 2) 0 0 rgba(255,255,255,.25);
  cursor: pointer;
}
@keyframes fallen-wasser { to { background-position: 0 calc(var(--p) * 14), 0 0; } }
.dschungel .becken {
  position: absolute; z-index: 3;
  height: calc(var(--p) * 12);
  background: linear-gradient(180deg, #8ad0f0, #3a7ab8);
  clip-path: polygon(4% 0, 96% 0, 100% 40%, 96% 100%, 4% 100%, 0 40%);
}
.dschungel .regenbogen {
  position: absolute; z-index: 2; pointer-events: none;
  background: radial-gradient(circle at 50% 100%, transparent 56%, #ff5a5a 56% 61%, #ffa23a 61% 66%, #ffe83a 66% 71%, #5ad85a 71% 76%, #3a9ae0 76% 81%, #9a5ae0 81% 86%, transparent 86%);
  opacity: 0; transition: opacity 1s steps(5);
}
.dschungel .regenbogen.an { opacity: .75; }
.dschungel .elefant { z-index: 5; }
.dschungel .elefant img { animation: wippen 2.6s infinite steps(2); }
@keyframes wippen { 50% { transform: translateY(calc(var(--p) * -1)); } }
.tropfen {
  position: fixed; z-index: 80; pointer-events: none;
  width: 6px; height: 6px; background: #8ad0f0; box-shadow: 0 0 3px #fff;
  animation: tropfen 1.3s cubic-bezier(.3, -.6, .7, 1) forwards;
}
@keyframes tropfen { to { transform: translate(var(--tx), var(--ty)); opacity: .2; } }
.dschungel .papagei { z-index: 5; }
.dschungel .papagei.nickt img { animation: nicken .3s 4 steps(2); }
@keyframes nicken { 50% { transform: translateY(calc(var(--p) * 1)) rotate(-8deg); } }
.dschungel .frosch { z-index: 5; }
.dschungel .frosch.springt img { animation: hupf .7s steps(6); }
@keyframes hupf { 50% { transform: translateY(calc(var(--p) * -14)); } }
.gluehwurm {
  position: absolute; z-index: 6; pointer-events: none;
  width: calc(var(--p) * 1.5); height: calc(var(--p) * 1.5);
  background: #e8ff7a;
  box-shadow: 0 0 6px 3px rgba(220, 255, 120, .7);
  animation: gluehen 1.8s infinite steps(2);
}
@keyframes gluehen { 50% { opacity: .25; } }
.faller-banane { position: fixed; z-index: 80; pointer-events: none; animation: banane 1.2s ease-in forwards; }
@keyframes banane { to { transform: translateY(var(--fall, 400px)) rotate(540deg); } }

/* ---------- TEICH ---------- */
.teich .himmel-schicht { background: linear-gradient(180deg, rgba(10, 20, 40, .35), rgba(20, 30, 60, .1)); }
.teich .boden-schicht { background: linear-gradient(180deg, #d8d8f0, #b0b0d8 60%, #9090c0); }
.polarlicht { position: absolute; left: -10%; right: -10%; top: 4%; height: 38%; z-index: 0; cursor: pointer; transition: filter 1.2s steps(6); }
.polarlicht .band {
  position: absolute; left: 0; right: 0; height: 32%;
  background: linear-gradient(180deg, transparent, rgba(90, 255, 170, .45) 45%, rgba(90, 220, 255, .25) 70%, transparent);
  mix-blend-mode: screen;
  animation: wogen 9s ease-in-out infinite alternate;
  clip-path: polygon(0 30%, 10% 10%, 20% 35%, 32% 5%, 45% 40%, 58% 10%, 70% 35%, 82% 0, 92% 30%, 100% 15%, 100% 100%, 0 100%);
}
.polarlicht .band:nth-child(2) { top: 25%; animation-duration: 12s; animation-delay: -4s; background: linear-gradient(180deg, transparent, rgba(160, 120, 255, .35) 50%, transparent); }
.polarlicht .band:nth-child(3) { top: 50%; animation-duration: 7s; animation-delay: -2s; background: linear-gradient(180deg, transparent, rgba(255, 120, 200, .25) 50%, transparent); }
@keyframes wogen { from { transform: translateX(-4%) skewX(-8deg) scaleY(1); } to { transform: translateX(4%) skewX(8deg) scaleY(1.3); } }
.huegel { position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none; }
.teich .tanne img { filter: brightness(.9); }
.teich .tanne.hinten img { filter: brightness(.55) saturate(.7); }
.teich-rand, .teich-wasser { position: absolute; }
.teich-rand { background: #f2f0ff; z-index: 3; }
.teich-wasser {
  z-index: 3;
  background:
    repeating-linear-gradient(180deg, transparent 0 calc(var(--p) * 4), rgba(180, 220, 255, .18) calc(var(--p) * 4) calc(var(--p) * 5)),
    radial-gradient(ellipse at 50% 40%, #3a6ab0, #1e3a78 70%, #142a5a);
  overflow: visible;
}
.otter { position: absolute; z-index: 4; cursor: pointer; }
.otter.salto img { animation: salto .8s steps(8); }
@keyframes salto { to { transform: rotate(360deg); } }
.luftblase {
  position: absolute; z-index: 7;
  border: calc(var(--p) * .8) solid rgba(220, 240, 255, .85);
  background: rgba(200, 230, 255, .12);
  box-shadow: inset calc(var(--p) * .8) calc(var(--p) * .8) 0 rgba(255,255,255,.55);
  animation: blaseSteigen linear forwards;
  cursor: pointer;
}
.luftblase::after { content: ""; position: absolute; inset: -12px; }
@keyframes blaseSteigen {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 1; }
  25% { transform: translate(var(--w1), -18vh); }
  50% { transform: translate(var(--w2), -36vh); }
  75% { transform: translate(var(--w1), -54vh); opacity: .9; }
  100% { transform: translate(var(--w2), -72vh); opacity: 0; }
}
.luftblase.platzt { animation: platzen .25s steps(3) forwards !important; }
@keyframes platzen { to { transform: scale(2.2); opacity: 0; border-style: dashed; } }
.angel-schnur { position: absolute; width: 2px; background: rgba(255,255,255,.7); transform-origin: top; z-index: 5; pointer-events: none; }
.angel-rute { position: absolute; height: 3px; background: #6b4428; transform-origin: left center; z-index: 5; pointer-events: none; }
.fisch-sprung { position: fixed; z-index: 80; pointer-events: none; animation: fischsprung 1.4s ease-in-out forwards; }
@keyframes fischsprung { 0% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(var(--sx), -120px) rotate(-180deg); } 100% { transform: translate(calc(var(--sx) * 2), 10px) rotate(-360deg); opacity: 0; } }
.hase { z-index: 5; cursor: pointer; }
.hase.hoppelt img { animation: hoppeln .45s steps(3) 3; }
@keyframes hoppeln { 50% { transform: translateY(calc(var(--p) * -6)); } }

/* ---------- BERGE ---------- */
.berge .himmel-schicht { background: linear-gradient(180deg, rgba(26, 16, 48, .55) 0%, rgba(58, 35, 80, .55) 45%, rgba(110, 58, 90, .6) 80%); }
.berge .boden-schicht { background: linear-gradient(180deg, #d8d4ee, #b4aed4 60%, #908ac0); }
.berge .bergkette { position: absolute; left: -5%; width: 110%; z-index: 1; pointer-events: none; }
.berge .bergkette img { width: 100% !important; height: 100% !important; }
.seilbahn { position: absolute; height: 2px; background: #d8c8e8; box-shadow: 0 1px 0 #2a2030; transform-origin: 0 50%; z-index: 3; pointer-events: none; }
.gondel { position: absolute; z-index: 4; cursor: pointer; transform: translate(-50%, -2px); }
.adler-kreis { position: absolute; z-index: 3; width: 0; height: 0; animation: kreisen 14s linear infinite; }
.adler-kreis .adler { position: absolute; left: calc(var(--p) * 30); cursor: pointer; animation: gegenkreisen 14s linear infinite; padding: 10px; margin: -10px; }
@keyframes kreisen { to { transform: rotate(360deg); } }
@keyframes gegenkreisen { to { transform: rotate(-360deg); } }
.ziege { z-index: 4; cursor: pointer; transition: left .6s steps(6), bottom .6s steps(6); }
.quelle {
  position: absolute; z-index: 4;
  height: calc(var(--p) * 16);
}
.quelle .wasser {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(180deg, transparent 0 calc(var(--p) * 3), rgba(255,255,255,.25) calc(var(--p) * 3) calc(var(--p) * 4)),
    linear-gradient(180deg, #7ae0e0, #3aa8b8 60%, #2a7a90);
  clip-path: polygon(3% 0, 97% 0, 100% 30%, 97% 100%, 3% 100%, 0 30%);
  box-shadow: 0 0 0 var(--p) #5a5068;
}
.quelle .rand {
  position: absolute; left: -2%; right: -2%; bottom: -10%; height: 40%;
  background: repeating-linear-gradient(90deg, #6a6078 0 calc(var(--p) * 6), #5a5068 calc(var(--p) * 6) calc(var(--p) * 7));
  clip-path: polygon(0 0, 4% 0, 4% 30%, 96% 30%, 96% 0, 100% 0, 100% 100%, 0 100%);
  z-index: 3;
}
.quelle .capy { position: absolute; z-index: 2; cursor: pointer; bottom: 22%; }
.quelle .capy img { animation: wippen 3s infinite steps(2); }
.quelle .wasser-vorne {
  position: absolute; left: 0; right: 0; bottom: 0; height: 38%; z-index: 2;
  background: linear-gradient(180deg, rgba(90, 210, 220, .85), rgba(42, 122, 144, .95));
  pointer-events: none;
}
.quelle .ente { position: absolute; z-index: 3; bottom: 42%; cursor: pointer; animation: enteschwimmt 9s ease-in-out infinite alternate; }
.quelle .ente img { animation: wippen 1.6s infinite steps(2); }
@keyframes enteschwimmt { from { transform: translateX(0); } to { transform: translateX(calc(var(--p) * 22)) scaleX(-1); } }
.dampf {
  position: absolute; z-index: 5; pointer-events: none;
  width: calc(var(--p) * 4); height: calc(var(--p) * 4);
  background: rgba(255, 255, 255, .35);
  animation: dampf 4s linear forwards;
}
@keyframes dampf { to { transform: translate(var(--dx, 10px), -140px) scale(3); opacity: 0; } }
.onsen-schild {
  position: absolute; z-index: 5;
  font-family: var(--pixel); font-size: 9px;
  background: #c9955a; color: #2a1810; padding: 6px 7px 4px;
  box-shadow: 0 0 0 3px #4a2e1a;
}
.berge .stern-funkel { position: absolute; width: calc(var(--p) * 1); height: calc(var(--p) * 1); background: #fff6e0; animation: gluehen 2.2s infinite steps(2); z-index: 0; }

@media (prefers-reduced-motion: reduce) {
  .luftblase, .gluehwurm { display: none; }
}

/* ---------- Kamera (frei ziehen & zoomen) ---------- */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
.kamera {
  position: fixed; inset: 0; z-index: 1;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}
.kamera.zieht { cursor: grabbing; }
.kamera .track {
  position: absolute; top: 0; left: 0;
  width: max-content;
  overflow: visible;
  transform-origin: 0 0;
  will-change: transform;
  cursor: inherit;
}
.fuss { display: none; }
.zoomknopf { font-size: 14px; padding: 8px 10px 6px; }

/* ---------- Nebel über unentdeckten Gebieten ---------- */
.nebel {
  position: absolute; inset: 0; z-index: 50;
  cursor: pointer;
  background:
    radial-gradient(ellipse at 50% 55%, rgba(40, 30, 64, .55), rgba(22, 14, 40, .93) 70%),
    rgba(22, 14, 40, .6);
  transition: opacity 1.6s steps(8), background 1.6s steps(8);
}
.nebel-wolke {
  position: absolute; opacity: .92;
  animation: nebelwabern 7s ease-in-out infinite alternate;
  transition: transform 1.6s steps(8), opacity 1.6s steps(8);
}
@keyframes nebelwabern { to { translate: calc(var(--p) * 10) calc(var(--p) * 3); } }
.nebel-text {
  position: absolute; left: 50%; top: 45%;
  transform: translate(-50%, -50%);
  text-align: center; color: #e8dcff;
  width: min(80%, 520px);
  pointer-events: none;
}
.nebel-fragen {
  font-family: var(--pixel); font-size: clamp(28px, 6vw, 56px);
  color: #ffd27a;
  text-shadow: 0 0 10px rgba(255, 190, 90, .7), 0 0 30px rgba(255, 140, 60, .4);
  animation: pochen 2s infinite steps(2, end);
}
.nebel-text p { font-size: clamp(26px, 4vw, 40px); margin: 18px 0 8px; }
.nebel-text small { font-family: var(--pixel); font-size: 10px; opacity: .7; }
.gebiet.entdeckt .nebel { opacity: 0; pointer-events: none; }
.gebiet.entdeckt .nebel-wolke { transform: translateX(var(--weg)); opacity: 0; }
.gebiet.ohne-nebel .nebel { display: none; }
.gebiet:not(.entdeckt) .gebiet-titel { visibility: hidden; }

.karte button.unbekannt { color: #8a7a68; }
.karte .fragezeichen { font-family: var(--pixel); font-size: 12px; width: 22px; text-align: center; }

/* ---------- 2D-Anordnung ---------- */
.kamera .track { display: block; background: none; }
.kamera .gebiet { position: absolute; }
.welt.gebiet {
  background: linear-gradient(180deg, transparent calc(100% - var(--boden)), #c9c5e6 calc(100% - var(--boden)), #a9a4d0 calc(100% - var(--boden) * .6), #8a84b8 100%);
}

.wildnis {
  position: absolute; z-index: 0; overflow: hidden; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, rgba(34, 24, 56, .85), rgba(18, 10, 32, .97));
}
.wolkenband { position: absolute; z-index: 45; pointer-events: none; overflow: visible; }
.feld-wolke { position: absolute; opacity: .85; animation: nebelwabern 9s ease-in-out infinite alternate; }
.wolkenband .feld-wolke { opacity: .55; }

/* Wegweiser je Richtung */
.wegweiser.weg-links { left: 3%; }
.wegweiser.weg-rechts { right: 3%; }
.wegweiser.weg-oben { top: 6px; bottom: auto; left: 4%; }
.wegweiser.weg-unten { bottom: 6px; left: 50%; transform: translateX(-50%); }
.wegweiser.weg-oben .pfosten, .wegweiser.weg-unten .pfosten { display: none; }

/* Pfeile oben und unten */
.randpfeil.oben { top: 44px; left: 50%; transform: translateX(-50%); max-width: none; white-space: nowrap; }
.randpfeil.unten { top: auto; bottom: 80px; left: 50%; transform: translateX(-50%); max-width: none; white-space: nowrap; }
.randpfeil.oben.lockt { animation: lockenY 1.2s infinite steps(2, end); --wackel: -4px; }
.randpfeil.unten.lockt { animation: lockenY 1.2s infinite steps(2, end); --wackel: 4px; }
@keyframes lockenY { 50% { transform: translateX(-50%) translateY(var(--wackel)); } }
@media (max-width: 600px) { .randpfeil.oben, .randpfeil.unten { padding: 8px 12px 6px; } }
.randpfeil.oben { top: 6px; padding: 6px 12px 4px; }
body:has(#vorschau-banner:not([hidden])) .randpfeil.oben { top: 28px; }
.randpfeil.unten { bottom: 74px; padding: 6px 12px 4px; }

/* ---------- Lückenlose Welt ---------- */
.wildnis { display: none; }
.wolkenband .feld-wolke { opacity: .5; }

/* Haustür passt sich der Zahl der Fenster an */
.raster .fenster.tuer24 { grid-row: var(--tuer-zeile-m, 3) / span 2; }
@media (min-width: 700px) { .raster .fenster.tuer24 { grid-row: var(--tuer-zeile-d, 1) / span 2; } }

/* ---------- Schatzkisten-Türchen ---------- */
.kisten-platz {
  position: absolute; z-index: 9;
  transform: translateX(-50%);
  display: flex; flex-direction: column-reverse; align-items: center;
}
.kisten-brett {
  width: calc(var(--p) * 30); height: calc(var(--p) * 3);
  background: #6b4428; box-shadow: inset 0 calc(var(--p) * -1) 0 #4a2e1a, 0 var(--p) 0 rgba(0,0,0,.3);
}
.kisten-brett::before, .kisten-brett::after {
  content: ""; position: absolute; bottom: 100%; width: var(--p); height: 200vh;
  background: repeating-linear-gradient(180deg, #8a6a3a 0 calc(var(--p) * 2), #6a4a22 calc(var(--p) * 2) calc(var(--p) * 3));
}
.kisten-brett { position: relative; }
.kisten-brett::before { left: calc(var(--p) * 3); }
.kisten-brett::after { right: calc(var(--p) * 3); }
.ort-teich .kisten-brett::before, .ort-teich .kisten-brett::after, .ort-berge .kisten-brett::before, .ort-berge .kisten-brett::after { display: none; }

.fenster.kiste {
  --holz: #8a5a30; --band: #3a2414; --akzent: #d8a040;
  width: calc(var(--p) * 22);
  aspect-ratio: 5 / 4;
  background: #1a0e08;
  perspective: 300px;
  box-shadow: 0 calc(var(--p) * 1) 0 rgba(0,0,0,.35);
}
.ort-kueste .fenster.kiste { --holz: #b08850; --band: #6a4a2a; --akzent: #e8d0a0; }
.ort-dschungel .fenster.kiste { --holz: #6a4a2a; --band: #2f5a2a; --akzent: #8ac85a; }
.ort-teich .fenster.kiste { --holz: #5a8ac8; --band: #e8eeff; --akzent: #ffffff; }
.ort-berge .fenster.kiste { --holz: #a83a32; --band: #3a2414; --akzent: #ffd27a; }
.fenster.kiste::after { display: none; }
.ort-kueste .fenster.kiste::before, .ort-dschungel .fenster.kiste::before { display: none; }
.fenster.kiste .glas { inset: calc(var(--p) * 1.5); }
.fenster.kiste .glas::before, .fenster.kiste .vorhang { display: none; }
.deckel {
  position: absolute; inset: 0; z-index: 5;
  background:
    linear-gradient(90deg, transparent 20%, var(--band) 20% calc(20% + var(--p) * 2), transparent calc(20% + var(--p) * 2) calc(80% - var(--p) * 2), var(--band) calc(80% - var(--p) * 2) 80%, transparent 80%),
    linear-gradient(180deg, transparent 32%, var(--band) 32% calc(32% + var(--p) * 2), transparent calc(32% + var(--p) * 2)),
    repeating-linear-gradient(180deg, var(--holz) 0 calc(var(--p) * 4), rgba(0,0,0,.18) calc(var(--p) * 4) calc(var(--p) * 5)),
    var(--holz);
  box-shadow: inset 0 0 0 var(--p) rgba(0,0,0,.35);
  transform-origin: 50% 0;
  transition: transform .7s steps(7, end);
  backface-visibility: hidden;
}
.ort-teich .deckel {
  background:
    linear-gradient(90deg, transparent calc(50% - var(--p) * 1.5), var(--band) calc(50% - var(--p) * 1.5) calc(50% + var(--p) * 1.5), transparent calc(50% + var(--p) * 1.5)),
    linear-gradient(180deg, transparent calc(50% - var(--p) * 1.5), var(--band) calc(50% - var(--p) * 1.5) calc(50% + var(--p) * 1.5), transparent calc(50% + var(--p) * 1.5)),
    var(--holz);
}
.fenster.kiste.offen .deckel { transform: rotateX(-118deg); }
.fenster.kiste .nr { top: 60%; }
.fenster.kiste.heute { animation: leuchten 1.6s infinite steps(2, end); }

/* Pfeil in Richtung des heutigen Türchens */
.randpfeil.heute-hier { background: #ffb347; color: #2a1810; box-shadow: 0 0 0 3px #fff1c0, 0 0 18px 4px rgba(255, 180, 70, .7); }

/* ---------- Feinschliff ---------- */
/* Wasserfall stürzt von einer moosigen Felswand */
.dschungel .felswand {
  position: absolute; z-index: 2;
  background:
    repeating-linear-gradient(180deg, rgba(0,0,0,.18) 0 calc(var(--p) * 2), transparent calc(var(--p) * 2) calc(var(--p) * 9)),
    linear-gradient(90deg, #3a3a48 0%, #5a5868 30%, #4a4858 70%, #2e2e3a 100%);
  clip-path: polygon(8% 4%, 22% 0, 40% 3%, 62% 0, 82% 4%, 94% 2%, 100% 14%, 96% 40%, 100% 70%, 94% 100%, 6% 100%, 0 72%, 4% 40%, 0 14%);
}
.dschungel .felswand::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: calc(var(--p) * 8);
  background: repeating-linear-gradient(90deg, #3e8a4a 0 calc(var(--p) * 4), #2f6b3e calc(var(--p) * 4) calc(var(--p) * 6));
  clip-path: polygon(0 0, 100% 0, 100% 50%, 88% 100%, 76% 40%, 60% 90%, 46% 30%, 30% 100%, 16% 45%, 0 80%);
}
.dschungel .wasserfall { z-index: 3; width: calc(var(--p) * 14); }
.dschungel .becken { z-index: 4; height: calc(var(--p) * 14); }
.dschungel .gischt {
  position: absolute; left: 30%; right: 30%; top: calc(var(--p) * -4); height: calc(var(--p) * 8);
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.9) 0 calc(var(--p) * 2), transparent calc(var(--p) * 2) calc(var(--p) * 4));
  animation: gischt .4s infinite steps(2);
}
@keyframes gischt { 50% { transform: translateY(calc(var(--p) * -1)) scaleX(1.08); opacity: .7; } }
.dschungel .regenbogen { z-index: 1; }
.dschungel .frosch { z-index: 6; }

/* Kisten im Meer, die auf- und abtauchen */
.kisten-platz.im-wasser { z-index: 4; animation: auftauchenKiste 7s ease-in-out infinite; }
.kisten-platz.im-wasser .fenster.kiste { transform: rotate(-4deg); }
.kisten-platz .wasserlinie {
  position: absolute; left: -30%; right: -30%; bottom: calc(var(--p) * -2); height: 55%;
  background:
    repeating-linear-gradient(90deg, rgba(255, 230, 210, .7) 0 calc(var(--p) * 4), transparent calc(var(--p) * 4) calc(var(--p) * 10)) top / 100% calc(var(--p) * 1.5) no-repeat,
    linear-gradient(180deg, rgba(90, 46, 106, .82), rgba(42, 30, 82, .95));
  pointer-events: none;
  animation: wellen 2.4s infinite steps(6) linear;
}
@keyframes auftauchenKiste {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  45% { transform: translateX(-50%) translateY(calc(var(--p) * -5)); }
  70% { transform: translateX(-50%) translateY(calc(var(--p) * 3)); }
}

/* Kisten an Gondel und Seil */
.kisten-platz.haengend { flex-direction: column; bottom: auto; }
.kisten-platz.an-gondel { top: 100%; left: 50%; }
.kisten-platz.haengend .haken-seil { width: 2px; height: calc(var(--p) * 10); background: #d8c8e8; box-shadow: 1px 0 0 #2a2030; }
.kisten-platz.haengend .fenster.kiste { animation: baumeln 3s ease-in-out infinite alternate; transform-origin: 50% -40px; }
@keyframes baumeln { from { rotate: -4deg; } to { rotate: 4deg; } }
.kisten-platz.haengend:not(.an-gondel) { z-index: 4; }

/* ---------- Wasserfall (neu) ---------- */
.dschungel .felswand, .dschungel .gischt { display: none; }
.wf-stein {
  position: absolute; z-index: 2;
  background:
    linear-gradient(90deg, transparent 46%, rgba(0,0,0,.25) 46% 54%, transparent 54%),
    repeating-linear-gradient(180deg, rgba(255,255,255,.06) 0 var(--p), transparent var(--p) calc(var(--p) * 7)),
    repeating-linear-gradient(90deg, rgba(0,0,0,.12) 0 calc(var(--p) * 2), transparent calc(var(--p) * 2) calc(var(--p) * 9)),
    linear-gradient(90deg, #34323e 0%, #62606e 22%, #545262 50%, #4a4858 75%, #2a2832 100%);
  clip-path: polygon(0 100%, 2% 34%, 7% 22%, 11% 30%, 16% 8%, 22% 18%, 28% 3%, 34% 14%, 40% 6%, 44% 12%, 56% 12%, 60% 4%, 66% 15%, 72% 0, 78% 16%, 84% 7%, 89% 26%, 94% 16%, 98% 36%, 100% 100%);
}
.wf-moos {
  position: absolute; left: 0; right: 0; top: 10%; height: calc(var(--p) * 10);
  background: repeating-linear-gradient(90deg, #3e8a4a 0 calc(var(--p) * 3), transparent calc(var(--p) * 3) calc(var(--p) * 7), #2f6b3e calc(var(--p) * 7) calc(var(--p) * 9), transparent calc(var(--p) * 9) calc(var(--p) * 14));
  clip-path: polygon(0 40%, 100% 0, 100% 40%, 80% 100%, 60% 50%, 40% 100%, 20% 60%, 0 100%);
  opacity: .85;
}
.dschungel .wasserfall {
  z-index: 3; width: calc(var(--p) * 18);
  background: linear-gradient(90deg, #2a78b8, #4aa8e0 30%, #6ac4f0 55%, #3a90cc 85%, #2a78b8);
  background-size: auto; animation: none; box-shadow: none;
  overflow: visible;
}
.wf-strom {
  position: absolute; top: 0; bottom: 0;
  background-size: 100% calc(var(--p) * 16);
  animation: wfFall .5s infinite steps(4) linear;
}
.wf-strom.a { left: 6%; width: 22%; background-image: repeating-linear-gradient(180deg, transparent 0 calc(var(--p) * 7), rgba(255,255,255,.75) calc(var(--p) * 7) calc(var(--p) * 10), transparent calc(var(--p) * 10) calc(var(--p) * 16)); }
.wf-strom.b { left: 40%; width: 18%; background-image: repeating-linear-gradient(180deg, rgba(255,255,255,.9) 0 calc(var(--p) * 4), transparent calc(var(--p) * 4) calc(var(--p) * 16)); animation-duration: .38s; }
.wf-strom.c { right: 8%; width: 16%; background-image: repeating-linear-gradient(180deg, transparent 0 calc(var(--p) * 3), rgba(220,245,255,.7) calc(var(--p) * 3) calc(var(--p) * 8), transparent calc(var(--p) * 8) calc(var(--p) * 16)); animation-duration: .62s; }
@keyframes wfFall { to { background-position: 0 calc(var(--p) * 16); } }
.wf-lippe {
  position: absolute; left: calc(var(--p) * -3); right: calc(var(--p) * -3); top: calc(var(--p) * -4);
  height: calc(var(--p) * 6);
  background: linear-gradient(180deg, #e8f8ff 0 calc(var(--p) * 1.5), #8ad0f4 calc(var(--p) * 1.5));
  clip-path: polygon(0 100%, 4% 40%, 14% 15%, 30% 0, 70% 0, 86% 15%, 96% 40%, 100% 100%);
  animation: wfLippe 1.2s infinite steps(2);
}
@keyframes wfLippe { 50% { transform: scaleX(1.05) translateY(calc(var(--p) * -.5)); } }
.dschungel .becken {
  z-index: 4; height: calc(var(--p) * 16);
  background: linear-gradient(180deg, #7ad0f0, #3a8ac8 50%, #2a6aa0);
  clip-path: polygon(6% 0, 94% 0, 100% 30%, 100% 70%, 94% 100%, 6% 100%, 0 70%, 0 30%);
  overflow: visible;
}
.wf-ring {
  position: absolute; left: 50%; top: 35%;
  width: calc(var(--p) * 30); height: calc(var(--p) * 7);
  border: var(--p) solid rgba(255,255,255,.7); border-radius: 50%;
  transform: translate(-50%, -50%) scale(.3); opacity: 0;
  animation: wfRing 2s infinite steps(8);
}
.wf-ring.r2 { animation-delay: -1s; }
@keyframes wfRing { 10% { opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; } }
.wf-schaum { position: absolute; left: 30%; right: 30%; top: calc(var(--p) * -3); height: calc(var(--p) * 6); }
.wf-schaum span {
  position: absolute; bottom: 0;
  width: calc(var(--p) * 4); height: calc(var(--p) * 4);
  background: #fff; box-shadow: 0 0 0 var(--p) rgba(255,255,255,.4);
  animation: wfSchaum .7s infinite steps(3);
}
@keyframes wfSchaum { 50% { transform: translateY(calc(var(--p) * -3)) scale(1.3); opacity: .7; } }
.wf-tropfen {
  position: absolute; z-index: 5; pointer-events: none;
  width: calc(var(--p) * 1.5); height: calc(var(--p) * 1.5);
  background: #dff4ff;
  animation: wfTropfen 1.2s ease-out forwards;
}
@keyframes wfTropfen { to { transform: translate(var(--tx), calc(var(--p) * -22)); opacity: 0; } }
/* Wasserfall vor die Baumkronen holen */
.wf-stein { z-index: 8; }
.dschungel .wasserfall, .dschungel .becken { z-index: 9; }
.dschungel .frosch { z-index: 10; }
.dschungel .regenbogen { z-index: 8; }
.wegweiser { z-index: 12; }

/* Felsen als Pixel-Art, Wellen im Wasserfall */
.wf-stein { background: none; clip-path: none; }
.wf-stein .wf-moos { display: none; }
.wf-stein-bild { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.wf-strom { opacity: .7; }
.wf-welle {
  position: absolute; top: -6%;
  height: calc(var(--p) * 3);
  border-bottom: calc(var(--p) * 1) solid rgba(255, 255, 255, .9);
  border-left: calc(var(--p) * 1) solid transparent;
  border-right: calc(var(--p) * 1) solid transparent;
  border-radius: 0 0 50% 50%;
  animation: wfWelle 1.8s infinite linear;
  pointer-events: none;
}
@keyframes wfWelle {
  0% { top: -6%; opacity: 0; transform: scaleX(.7); }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 98%; opacity: 0; transform: scaleX(1.1); }
}

/* ---------- Scheinwerfer auf das aktuelle Gebiet ---------- */
.fokus-maske {
  position: absolute; z-index: 60; pointer-events: none;
  box-shadow: 0 0 0 30000px #0d0818, inset 0 0 40px 18px rgba(13, 8, 24, .85);
  transition: left .9s ease-in-out, top .9s ease-in-out, width .9s ease-in-out, height .9s ease-in-out;
}

/* ---------- Mia ---------- */
.mia { position: absolute; z-index: 20; transform: translate(-50%, -100%); cursor: pointer; transition: opacity .4s steps(3); padding: 8px; }
.mia.versteckt { opacity: 0; pointer-events: none; }
.mia-bild { display: block; }
.mia-extra { position: absolute; left: 50%; bottom: 0; width: 0; height: 0; }
.mia-extra > * { position: absolute; }
.mia-z { font-family: var(--pixel); font-size: 12px; color: #e8e0ff; left: 10px; bottom: 40px; animation: miaZ 2.4s infinite linear; opacity: 0; }
.mia-z.z2 { animation-delay: .8s; font-size: 14px; }
.mia-z.z3 { animation-delay: 1.6s; font-size: 17px; }
@keyframes miaZ { 0% { transform: translate(0, 0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(26px, -44px); opacity: 0; } }
.mia-ast {
  left: 20px; bottom: calc(var(--p) * 30);
  display: flex; gap: 6px; align-items: flex-end;
  padding: 0 8px; border-bottom: calc(var(--p) * 1.5) solid #6b4428;
  transition: transform .8s steps(6), opacity .8s steps(6);
}
.mia-ast::after { content: ""; position: absolute; right: -40px; bottom: calc(var(--p) * -1.5); width: 40px; height: calc(var(--p) * 1.5); background: #6b4428; }
.mia-ast.weg img { transform: translate(30px, -60px); opacity: 0; transition: transform .6s steps(5), opacity .6s steps(5); }
.mia.springt .mia-bild { animation: miaSprung .6s steps(6); }
@keyframes miaSprung { 50% { transform: translateY(calc(var(--p) * -14)); } }
.mia-napf {
  left: 24px; bottom: 0;
  width: calc(var(--p) * 12); height: calc(var(--p) * 4);
  background: #c8433a; box-shadow: inset 0 calc(var(--p) * 1) 0 #8f2a26, 0 calc(var(--p) * .5) 0 #5a1a18;
  border-radius: 0 0 40% 40%;
}
.mia-leckerli { position: absolute; left: 50%; bottom: 100%; animation: leckerliFall .7s steps(6) forwards; }
@keyframes leckerliFall { from { transform: translate(-50%, -80px); } to { transform: translate(-50%, 2px); } }
.mia.frisst .mia-bild { animation: miaFressen .25s infinite steps(2); }
@keyframes miaFressen { 50% { transform: translateY(calc(var(--p) * 1.5)) rotate(4deg); } }
.mia.rollt .mia-bild { animation: miaRollen .8s steps(4); }
@keyframes miaRollen { 50% { transform: scaleX(-1) translateY(calc(var(--p) * -2)); } }
.mia-staub { position: absolute; z-index: 19; width: calc(var(--p) * 3); height: calc(var(--p) * 3); background: rgba(240, 236, 255, .8); pointer-events: none; animation: miaStaub .6s steps(4) forwards; }
@keyframes miaStaub { to { transform: translate(0, -10px) scale(2); opacity: 0; } }

/* Überlappungen behoben */
.dschungel .schaukel { z-index: 8; }
.hase { z-index: 8; }
.maus { z-index: 6; }

/* Wegweiser in der Welt weg: die Pfeile am Rand übernehmen das */
.wegweiser { display: none !important; }

/* Meldungen oben, damit sie nicht über Leiste und Figuren liegen */
#toast { top: max(52px, calc(env(safe-area-inset-top) + 46px)); bottom: auto; transform: translate(-50%, -20px); }
#toast.sichtbar { transform: translate(-50%, 0); }
body:has(#vorschau-banner:not([hidden])) #toast { top: 74px; }

/* Galerie: Pfeile und klickbare Punkte */
.galerie-box { position: relative; }
.galerie img { user-select: none; -webkit-user-drag: none; }
.galerie-pfeil {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 48px; border: 0; cursor: pointer;
  background: rgba(42, 24, 16, .75); color: var(--amber-hell);
  font-family: var(--pixel); font-size: 12px;
  box-shadow: 0 0 0 3px #c9a050;
}
.galerie-pfeil.links { left: 8px; }
.galerie-pfeil.rechts { right: 8px; }
.galerie-pfeil:hover { background: #2a1810; }
.punkte button { width: 12px; height: 12px; padding: 0; border: 0; cursor: pointer; background: #d9c6a4; }
.punkte button.aktiv { background: var(--rot); }

/* Längere Gebiete: mehr Platz, weniger Gedränge */
.gebiet { width: max(1150px, 300vw); }
@media (min-width: 1000px) { .gebiet { width: max(2600px, 190vw); } }
.welt.gebiet { width: 100vw; }

.kueste .vogel-flieger { z-index: 4; }

.tanne-leucht { cursor: pointer; transition: filter .3s steps(3); }
.tanne-leucht.leuchtet { filter: drop-shadow(0 0 10px rgba(255, 200, 100, .8)) drop-shadow(0 0 26px rgba(255, 150, 60, .45)); }

/* Stern für Sophia */
.sophia-stern {
  position: absolute; z-index: 3; top: 12px; left: 7%;
  width: calc(var(--p) * 2); height: calc(var(--p) * 2);
  background: #fff8e8;
  box-shadow: 0 0 6px 2px rgba(255, 244, 220, .9), 0 0 18px 6px rgba(255, 220, 170, .35);
  cursor: pointer;
  animation: sophiaFunkeln 4.5s ease-in-out infinite;
}
.sophia-stern::before, .sophia-stern::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  background: rgba(255, 248, 232, .8); transform: translate(-50%, -50%);
}
.sophia-stern::before { width: calc(var(--p) * 7); height: calc(var(--p) * .6); }
.sophia-stern::after { width: calc(var(--p) * .6); height: calc(var(--p) * 7); }
.sophia-stern::marker { content: none; }
.sophia-stern { outline: 14px solid transparent; }
@keyframes sophiaFunkeln { 50% { transform: scale(1.35); box-shadow: 0 0 10px 4px rgba(255, 244, 220, 1), 0 0 30px 10px rgba(255, 220, 170, .45); } }
.sophia-stern.hell { animation: sophiaHell 2.5s ease-out, sophiaFunkeln 4.5s 2.5s ease-in-out infinite; }
@keyframes sophiaHell { 20% { transform: scale(2.2); box-shadow: 0 0 16px 8px #fff, 0 0 60px 24px rgba(255, 220, 170, .6); } }


/* ---------- Wolkenblende beim Gebietswechsel ---------- */
.fokus-maske { transition: none; }
.wolkenblende { position: fixed; inset: 0; z-index: 20; pointer-events: none; overflow: hidden; }
.wb-band { position: absolute; left: 0; top: -10vh; width: 170vw; height: 120vh; transform: translateX(105vw); will-change: transform; }
.wb-band.vertikal { top: 0; left: -10vw; width: 120vw; height: 170vh; transform: translateY(105vh); }
.wb-kern { position: absolute; left: 16%; right: 16%; top: 0; bottom: 0; background: #8a7fb8; }
.wb-band.vertikal .wb-kern { left: 0; right: 0; top: 6%; bottom: 6%; }
.wb-puff { position: absolute; image-rendering: pixelated; }
.blende .blase { display: none; }

/* Gebiete, die sich erst später öffnen */
.randpfeil.gesperrt { opacity: .55; filter: saturate(.4); }

/* ---------- Freunde in der Welt ---------- */
.freund { position: absolute; z-index: 7; cursor: pointer; padding: 6px; margin: -6px; }
.garten > .freund { position: absolute; }
.freund-koerper { transform-origin: 50% 100%; }
.freund-koerper.links img { transform: scaleX(-1); }
.freund-koerper.geht { animation: freundWippen .36s infinite steps(2); }
@keyframes freundWippen { 50% { transform: translateY(calc(var(--p) * -.6)); } }
.freund-koerper.hopst { animation: freundHopsen .5s steps(4); }
@keyframes freundHopsen { 50% { transform: translateY(calc(var(--p) * -5)); } }
.freund-plausch {
  position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%);
  font-size: 15px; pointer-events: none; animation: freundPlausch 1.8s steps(6) forwards;
}
@keyframes freundPlausch { 0% { opacity: 0; transform: translate(-50%, 4px); } 20%, 80% { opacity: 1; transform: translate(-50%, -4px); } 100% { opacity: 0; transform: translate(-50%, -10px); } }
