/* ===========================================================================
   Die Themenwelt (EL52–EL57, K16)
   Regeln: R5.2.25 bis R5.2.34
   Stand: 2026-11-20 – im Kit nach Jan-Philips Freigabe; Entwurf seit 19.11.2026
   im Dummy (app/themenwelt.css), unverändert übernommen.
   Code: themenwelt.js. Aussehen wie im Vault-Entwurf
   wiki/07_anhaenge/onda-entwurf-haeufige-woerter-themenfeld.html. Gezeichnet in
   Weltkoordinaten, die Fläche wird auf die Bühne skaliert (themenwelt.js).
   =========================================================================== */

/* Das Themenfeld mit Welt: Weg, Inseln und der Buddy unten links treten zurück (R5.2.28) */
/* die Bühne ist ein Grid und setzt ihre Kinder auf relative (kit/buehne.css) – die Welt liegt darüber, randlos */
#thema > .buehne > .welt-wurzel { display: none; position: absolute; inset: 0; overflow: hidden; z-index: 0; }
#thema[data-welt="ja"] > .buehne > .welt-wurzel { display: block; }
#thema[data-welt="ja"] .thema-inhalt,
#thema[data-welt="ja"] .buddy-zone,
#thema[data-welt="ja"] .akzent { display: none; }

.welt-schirm { position: absolute; inset: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.welt-flaeche { position: absolute; left: 0; top: 0; transform-origin: 0 0; overflow: hidden; }
.welt-band { position: absolute; left: 0; right: 0; height: 680px; }
.welt-runden { position: absolute; top: 0; height: 680px; }
.welt-runden.hinten { filter: blur(3px) saturate(.8); }
.welt-runde { position: absolute; top: 0; height: 680px; }
.welt-runde > .welt-grund { position: absolute; }

/* Ort (EL54) und Spiel-Halt (EL55) sind die Insel aus dem Kit (startseite.css, gruppen.css): Zustände, Marken,
   Wackeln und Atmen kommen von dort. Die Welt setzt nur Lage und Größe; die Fläche ist schon skaliert, darum
   gelten die Maße der Layoutfälle hier nicht (vier Klassen schlagen :root[data-fall] .insel-…). */
.welt-ort { position: absolute; transform: translate(-50%, -50%); z-index: 2; }
.welt-flaeche .welt-ort .insel { --insel: 112px; gap: 8px; }
.welt-flaeche .welt-ort .insel .insel-kreis::before { border-width: 4px; }
/* Auf der Landschaft trägt der Name ein weißes Schild, sonst geht er im Gras unter (Abweichung vom Weg im Kit) */
.welt-flaeche .welt-ort .insel .insel-name { font-size: 17px; max-width: none; white-space: nowrap; color: var(--onda-petrol);
  background: var(--onda-white); border-radius: var(--onda-radius-pill, 999px); padding: 7px 13px 5px; box-shadow: 0 2px 6px rgba(1,31,38,.12); }
.welt-flaeche .welt-ort .themenkarte-punkte { --punkt: 10px; --luecke: 5px; }
.welt-flaeche .welt-ort .themenkarte-punkte .pille { background: var(--onda-white); box-shadow: inset 0 0 0 1.5px var(--onda-track-dot); }
.welt-flaeche .welt-ort .themenkarte-punkte .pille[data-zustand="geschafft"] { background: var(--onda-sage); box-shadow: none; }
.welt-flaeche .welt-halt .insel { --insel: 76px; }
.welt-schloss { background: var(--onda-text-ghost); }
.welt-haken { background: var(--onda-sage); }

/* Onda auf dem Weg (K16): steht vor dem Ort, Schatten zeigt beim Hüpfen die Höhe */
.welt-onda { position: absolute; z-index: 4; width: 0; height: 0; pointer-events: none; }
.welt-onda-koerper { position: absolute; left: -40px; top: -80px; width: 80px; height: 80px; transform-origin: 50% 100%; }
/* Onda ist der Buddy aus dem Kit (buddy.css, buddy-leben.js): 150 × 152 auf 80 px; keine Sprechblase in der Welt */
.welt-onda-koerper .buddy { --buddy: .533; display: block; filter: drop-shadow(0 3px 4px rgba(1,31,38,.18)); }
.welt-onda-schatten { position: absolute; left: -30px; top: -7px; width: 60px; height: 14px; border-radius: 50%; background: rgba(3,80,90,.18); }
/* schlafend: das Schlafgesicht aus dem Kit (buddy-schlaf.css) */

/* Ebenen über der unscharfen Welt: geöffnete Gruppe (EL57) und Spielinsel (EL56) */
.welt-schleier { position: absolute; z-index: 7; inset: 0; background: rgba(1,31,38,.30); cursor: pointer; }
.welt-klappe { position: absolute; z-index: 8; left: 50%; transform: translateX(-50%); border-radius: 30px; background: var(--onda-warm-white);
  box-shadow: 0 14px 40px rgba(1,31,38,.30); overflow: hidden; }
.welt-klappe-zu { position: absolute; z-index: 3; right: 20px; bottom: 20px; }   /* Kit-Knopf, unten rechts (R14.4.11) */
.welt-kopfort { position: absolute; z-index: 2; left: 34px; top: 22px; pointer-events: none; }
.welt-kopfort .insel { --insel: 84px; grid-auto-flow: column; align-items: center; gap: 16px; width: auto; }
.welt-kopfort .insel .insel-ring { display: none; }
.welt-kopfort .insel .insel-name { font-size: 24px; max-width: none; white-space: nowrap; color: var(--onda-petrol); }

/* geöffnete Gruppe: Punkte links, die gewählte Lektion rastet ab der zweiten mittig ein, Onda daneben */
.welt-fenster { position: absolute; left: 0; right: 0; top: 130px; bottom: 0; overflow-y: auto; scrollbar-width: none;
  scroll-snap-type: y mandatory; scroll-padding-top: 18px; }
.welt-fenster::-webkit-scrollbar { display: none; }
/* Der Finger scrollt die Gruppe mit dem Scrollen des Geräts (Schwung, Einrasten), auch wenn die
   Welt darunter das Wischen selbst übernimmt (20.11.2026) */
.welt-fenster { touch-action: pan-y; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.welt-flaeche .welt-seitenpunkte .pille { position: relative; cursor: pointer; }
.welt-flaeche .welt-seitenpunkte .pille::after { content: ""; position: absolute; inset: -10px; }   /* größere Tippfläche */
.welt-zeilen { display: grid; gap: 26px; padding: 18px 80px 160px 64px; }
.welt-zeile { display: grid; grid-template-columns: 110px 1fr; align-items: center; scroll-snap-align: center; }
.welt-zeile:first-child { scroll-snap-align: start; }
.welt-platz { position: relative; align-self: stretch; }
.welt-platz-onda .buddy { --buddy: .573; position: absolute; left: 12px; top: 50%; margin-top: -44px; filter: drop-shadow(0 3px 4px rgba(1,31,38,.18)); }
.welt-karte { position: relative; box-sizing: border-box; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 14px;
  min-height: 150px; padding: 20px 24px; border: 0; border-radius: 26px; background: var(--onda-petrol-wash); color: var(--onda-petrol); font: inherit; cursor: pointer; }
.welt-zeile[data-zustand="geschafft"] .welt-karte { background: color-mix(in srgb, var(--onda-sage) 22%, white); }
.welt-zeile[data-gewaehlt="ja"] .welt-karte { box-shadow: 0 0 0 3px var(--onda-pink); }
.welt-zeile[data-gewaehlt="ja"][data-zustand="offen"] .welt-karte { background: var(--onda-pink-tint); }
.welt-karte .insel-marke { display: grid; right: -9px; top: -9px; }
/* Die Wörter auf der Wortkarte der Übung 17 (EL51, wortfeld.css) */
.welt-karte { --wfeld-glyph: 30px; }
.welt-karte .wfeld-karte { padding: 12px 18px 8px; }
/* Punkte links: die Pillen der Themenkarte (Kit), senkrecht; die gewählte ist aktiv */
.welt-flaeche .welt-seitenpunkte { position: absolute; left: 26px; top: 130px; bottom: 0; flex-direction: column; justify-content: center;
  --punkt: 14px; --luecke: 14px; }

/* Spielinsel (EL56): alle Spiele als große Inseln wie die Wahl aus zwei (Kit, EL38); das neue atmet, die übrigen zu */
.welt-spielwahl { position: absolute; left: 0; right: 0; top: 140px; bottom: 90px; display: grid; grid-template-columns: repeat(3, 190px);
  justify-content: center; align-content: center; justify-items: center; gap: 26px 70px; }
.welt-flaeche .welt-spielwahl .insel { --insel: 138px; }
.welt-flaeche .welt-spielwahl .insel .insel-name { font-size: 18px; max-width: 190px; }
