/* KOPIE aus _shared_welt/leiste.css (bauen_arcade.py) — nicht hier bearbeiten */
/* ==========================================================================
   Gemeinsame Welten-Technik — Ziele, Leiste, Dialog (14.11.2026, Abenteuerinsel)
   Felder ≥ 120 × 96 (unter 420 px Höhe ≥ 96 × 72), DM Sans aus kern/css/spiel.css,
   Abenteuer-Ziel gelbe Marke + Stern, Fokus/Scan wie der Kern (gelber Rahmen, schwarzer Rand),
   CVI (body.bf-cvi): schwarzer Grund, gelbe Kontur, keine Glas-Effekte.
   ========================================================================== */
.wz { position: absolute; inset: 0; pointer-events: none; z-index: 4; font-family: 'DM Sans', system-ui, sans-serif;
  --wz-b: 152px; --wz-h: 116px; --wz-gelb: #ffd23f; }
.wz-leiste { position: absolute; left: max(10px, env(safe-area-inset-left)); top: max(10px, env(safe-area-inset-top));
  right: 10px; display: flex; flex-wrap: wrap; gap: 10px; pointer-events: none; align-items: flex-start; }
.wz-felder { position: absolute; inset: 0; pointer-events: none; }
.wz-feld { pointer-events: auto; position: relative; box-sizing: border-box; min-width: 144px; min-height: 112px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px 12px;
  border-radius: 22px; border: 4px solid rgba(255, 255, 255, .9); background: rgba(14, 34, 24, .86); color: #fff;
  font: 700 clamp(17px, 0.65vw + 1vh, 24px)/1.1 'DM Sans', system-ui, sans-serif; text-align: center; cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .4); overflow: hidden; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.wz-feld[hidden] { display: none; }
.wz-symbol { display: block; width: 52px; height: 52px; flex: none; }
.wz-symbol svg { width: 100%; height: 100%; display: block; }
.wz-wort { display: block; max-width: 100%; overflow-wrap: normal; word-break: keep-all; hyphens: none; }
.wz-fort { position: absolute; left: 0; bottom: 0; height: 100%; width: 100%; background: rgba(255, 210, 63, .38);
  transform-origin: left center; transform: scaleX(var(--fort, 0)); pointer-events: none; }
.wz-feld > *:not(.wz-fort) { position: relative; }
.wz-feld:hover { border-color: #fff; }
.wz-leiste-feld { min-width: 144px; min-height: 112px; background: rgba(10, 26, 42, .9); }
.wz-l-wasjetzt { border-color: var(--wz-gelb); border-width: 5px; box-shadow: 0 0 0 3px #000, 0 6px 18px rgba(255, 210, 63, .35); }
.wz-l-pause { min-width: 160px; min-height: 112px; }
/* Felder über der Welt */
.wz-welt { position: absolute; width: var(--wz-b); height: var(--wz-h); min-width: 0; min-height: 0; transition: none; }
.wz-welt::after { content: ''; position: absolute; left: 50%; bottom: -1px; width: 14px; height: 8px; margin-left: -7px;
  background: rgba(255, 255, 255, .85); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.wz-person, .wz-tier { background: rgba(48, 30, 66, .84); }
.wz-ding { background: rgba(64, 44, 14, .84); }
.wz-gruppe { background: rgba(30, 40, 70, .9); border-style: dashed; }
.wz-abenteuer { border-color: var(--wz-gelb); border-width: 5px; box-shadow: 0 0 0 3px #000, 0 6px 22px rgba(255, 210, 63, .45); }
.wz-stern { position: absolute !important; right: 4px; top: 4px; width: 24px; height: 24px; color: var(--wz-gelb); }
.wz-stern svg { width: 100%; height: 100%; }
.wz-zahl { position: absolute !important; left: 6px; top: 4px; font-size: 18px; color: var(--wz-gelb); }
.wz-anhalten { position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: 200px; height: 112px; border-color: var(--wz-gelb); background: rgba(80, 20, 20, .88); }
/* Fokus (Tastatur) und Scan (Taster): wie der Kern, gut sichtbar, nicht nur Farbe (dicker Rahmen) */
.wz-feld.wz-fokus, .wz-feld.wz-scan { outline: 6px solid var(--wz-gelb); outline-offset: 2px; box-shadow: 0 0 0 11px #000; z-index: 3; }
.wz-feld.wz-scan { background-color: rgba(120, 96, 0, .9); }
/* Dialog-Leiste unten */
.wd { position: absolute; left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right));
  bottom: max(10px, env(safe-area-inset-bottom)); z-index: 6; pointer-events: auto; display: flex; gap: 16px; align-items: center;
  padding: 16px 18px; border-radius: 28px; background: rgba(250, 246, 236, .98); color: #1b2430; box-shadow: 0 12px 36px rgba(0, 0, 0, .5);
  font-family: 'DM Sans', system-ui, sans-serif; }
.wd-kopf { display: flex; gap: 16px; align-items: center; flex: 1 1 auto; min-width: 0; }
.wd-bild { width: 112px; height: 112px; flex: none; border-radius: 20px; background: #d8e6d0; object-fit: cover; border: 4px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.wd-bild-symbol { display: grid; place-items: center; color: #2c5a3a; }
.wd-bild-symbol svg { width: 72px; height: 72px; }
.wd-text { min-width: 0; }
.wd-name { display: block; font-size: clamp(18px, .55vw + 1.1vh, 24px); color: #6a3f00; margin-bottom: 4px; }
.wd-saetze { margin: 0; font-size: clamp(20px, .85vw + 1.4vh, 32px); line-height: 1.25; font-weight: 700; }
.wd-knoepfe { display: flex; gap: 12px; flex: none; align-items: stretch; }
.wd .wz-feld { position: relative; min-width: 168px; min-height: 128px; background: #12324d; font-size: clamp(18px, .7vw + 1.1vh, 26px); }
.wd .wz-symbol { width: 56px; height: 56px; }
.wd .wd-haupt { background: #0f4a2e; border-color: var(--wz-gelb); border-width: 5px; box-shadow: 0 0 0 3px #000, 0 8px 22px rgba(255, 210, 63, .4); }
.wd .wd-vorlesen { background: #3a4654; min-width: 152px; }
@media (max-width: 899px) {
  .wd { flex-direction: column; align-items: stretch; }
  .wd-knoepfe { justify-content: flex-end; flex-wrap: wrap; }
  .wd-bild { width: 72px; height: 72px; }
}
/* schmal (Handy hoch): Leiste als Spalte links */
@media (max-width: 699px) and (min-height: 421px) {
  .wz-leiste { flex-direction: column; flex-wrap: nowrap; right: auto; bottom: 10px; }
}
/* flach (Handy quer): Felder ≥ 96 × 72 (Ausnahme kern/LAYOUT.md) */
@media (max-height: 420px) {
  .wz-feld, .wz-leiste-feld { min-width: 96px; min-height: 72px; padding: 4px 6px; font-size: 14px; border-radius: 16px; }
  .wz-symbol { width: 30px; height: 30px; }
  .wz-anhalten { width: 150px; height: 80px; }
  .wd { padding: 6px 10px; gap: 8px; }
  .wd-bild { width: 56px; height: 56px; }
  .wd-saetze { font-size: 16px; }
  .wd-knoepfe .wz-feld { min-width: 96px; min-height: 72px; }
}
/* CVI: schwarzer Grund, klare Kontur, höchstens wenige hervorgehobene Ziele (macht das Spiel) */
body.bf-cvi .wz-feld { background: #000; border-color: #ffd400; border-width: 4px; box-shadow: none; color: #fff; }
body.bf-cvi .wz-feld.wz-abenteuer, .bf-cvi .wz-feld.wz-abenteuer { border-color: #ff3b30 !important; border-width: 6px; }
body.bf-cvi .wd { background: #000; color: #fff; border: 4px solid #ffd400; }
body.bf-cvi .wd-name { color: #ffd400; }
@media (prefers-reduced-motion: reduce) { .wz-fort { transition: none; } }
@media (min-width: 2400px) and (min-height: 1300px) { .wz-leiste-feld, .wd .wz-feld, .ai-tafel .wz-feld { min-width: 168px; min-height: 132px; font-size: 24px; } .wz-symbol { width: 58px; height: 58px; } }
