/* Welten- und Levelauswahl (14.11.26, Christoph: „auch die ganzen Menüs“).
   Bildschirmfüllend statt kleiner Kasten in der Mitte. Jede Welt zeigt ein Bild aus dem echten Spiel
   (img/landing/world-N-800.jpg), die Levelauswahl liegt über dem Bild ihrer Welt.
   Rückmeldung beim Zeigen: 4 px anheben in 120 ms, gelber Rand – nicht skalieren (Pixelschrift bleibt scharf). */
html body #scr-worlds.screen, html body #scr-levels.screen {
  align-items: stretch; justify-content: center;
  padding: max(clamp(10px, 2.6vh, 30px), env(safe-area-inset-top)) max(clamp(12px, 3.2vw, 56px), env(safe-area-inset-right)) max(clamp(10px, 2.2vh, 26px), env(safe-area-inset-bottom)) max(clamp(12px, 3.2vw, 56px), env(safe-area-inset-left));
  background-color: #0d0820; background-image: linear-gradient(180deg, rgba(13, 8, 32, .9), rgba(13, 8, 32, .96));
  background-size: cover; background-position: center;
}
html body #scr-worlds .panel, html body #scr-levels .panel {
  display: flex; flex-direction: column; width: 100%; max-width: 1360px; max-height: none; margin: 0 auto; padding: 0;
  background: none; border: 0; border-radius: 0; box-shadow: none; overflow: auto;
}
html body #scr-worlds .phead, html body #scr-levels .phead { flex: 0 0 auto; margin-bottom: clamp(8px, 1.8vh, 20px); }
html body #scr-worlds .phead h2, html body #scr-levels .phead h2 {
  font-size: clamp(24px, 4.6vh, 46px); letter-spacing: .04em; color: #fff; text-shadow: 0 4px 0 #1a0f33;
}
html body #scr-levels .phead .sub { font-size: clamp(13px, 2vh, 18px); color: #ffd36b; margin-top: 4px; }
html body #scr-worlds .phead .btn, html body #scr-levels .phead .btn { font-size: clamp(13px, 1.9vh, 16px); padding: 9px 14px; background: rgba(21, 14, 46, .82); border: 2px solid rgba(255, 255, 255, .22); color: #fff; }
html body #scr-worlds .st-wrow { flex: 0 0 auto; margin-bottom: clamp(8px, 1.6vh, 16px); }

/* Weltkarten */
html body #scr-worlds .world-grid { flex: 1 1 auto; gap: clamp(10px, 1.5vw, 20px); grid-auto-rows: minmax(clamp(118px, 21vh, 240px), 1fr); padding: 4px 4px 10px; margin: 0; }
html body #scr-worlds .wcard {
  min-height: 0; padding: clamp(10px, 1.8vh, 18px) clamp(12px, 1.4vw, 20px); gap: 3px;
  border: 2px solid rgba(255, 255, 255, .2); border-radius: 12px; box-shadow: 0 6px 0 rgba(0, 0, 0, .5); outline: 0;
  background-size: cover; background-position: center 62%; overflow: hidden;
  transition: transform .12s cubic-bezier(.2, 1.4, .4, 1), border-color .12s linear, box-shadow .12s linear;
}
html body #scr-worlds .wcard::before { inset: 0; height: auto; opacity: 1; background: linear-gradient(180deg, rgba(13, 8, 32, 0) 22%, rgba(13, 8, 32, .5) 52%, rgba(13, 8, 32, .95) 100%); }
html body #scr-worlds .wcard:hover, html body #scr-worlds .wcard:focus-visible {
  transform: translateY(-4px); border-color: #ffd36b; outline: 0;
  box-shadow: 0 10px 0 rgba(0, 0, 0, .5), 0 0 0 3px rgba(255, 211, 107, .35);
}
html body #scr-worlds .wcard:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0, 0, 0, .5); }
html body #scr-worlds .wcard.locked { filter: saturate(.3) brightness(.86); }
html body #scr-worlds .wcard.locked::before { background: linear-gradient(180deg, rgba(13, 8, 32, .18) 0, rgba(13, 8, 32, .55) 50%, rgba(13, 8, 32, .95) 100%); }
html body #scr-worlds .wnum { font-size: clamp(11px, 1.6vh, 13px); letter-spacing: .22em; color: #ffd36b; }
html body #scr-worlds .wname { font-size: clamp(19px, 3.3vh, 32px); color: #fff; text-shadow: 0 3px 0 #1a0f33; }
html body #scr-worlds .wsub { font-size: clamp(12px, 1.8vh, 15px); color: #ece5ff; }
html body #scr-worlds .wmeta { font-size: clamp(11px, 1.6vh, 13px); color: #cfc6ea; }
html body #scr-worlds .wbar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .2); overflow: hidden; }
html body #scr-worlds .wbar i { border-radius: 3px; background: #ffd36b; }
html body #scr-worlds .wcard.th-meadow { background-image: url(img/landing/world-1-800.jpg); }
html body #scr-worlds .wcard.th-cave { background-image: url(img/landing/world-2-800.jpg); }
html body #scr-worlds .wcard.th-factory { background-image: url(img/landing/world-3-800.jpg); }
html body #scr-worlds .wcard.th-glacier { background-image: url(img/landing/world-4-800.jpg); }
html body #scr-worlds .wcard.th-abyss { background-image: url(img/landing/world-5-800.jpg); }
html body #scr-worlds .wcard.th-patch { background-image: url(img/landing/world-6-800.jpg); }
html body #scr-worlds .wcard.th-dlc { background-image: url(img/landing/world-7-800.jpg); }
html body #scr-worlds .wcard.th-kulisse { background-image: url(img/landing/world-8-800.jpg); }
html body #scr-worlds .wcard.th-gratis { background-image: url(img/landing/world-9-800.jpg); }
html body #scr-worlds .wcard.th-giftkueche { background-image: url(img/landing/world-10-800.jpg); }
html body #scr-worlds .wcard.th-pass { background-image: url(img/landing/world-11-800.jpg); }
html body #scr-worlds .wcard.th-zugabe { background-image: url(img/landing/world-12-800.jpg); }
html body #scr-worlds .wcard.th-lehrgang { background-image: url(img/landing/world-13-800.jpg); }
html body #scr-worlds .wcard.th-absturz { background-image: url(img/landing/world-14-800.jpg); }
html body #scr-worlds .wcard.th-geruest { background-image: url(img/landing/world-16-800.jpg); }
html body #scr-worlds .wcard.th-steg { background-image: url(img/landing/world-17-800.jpg); }
html body #scr-worlds .wcard.th-leine { background-image: url(img/landing/world-18-800.jpg); }
html body #scr-worlds .wcard.th-treibhaus { background-image: url(img/landing/world-19-800.jpg); }
html body #scr-worlds .wcard.th-keller { background-image: url(img/landing/world-20-800.jpg); }
html body #scr-worlds .wcard.th-kommode { background-image: url(img/landing/world-21-800.jpg); }
html body #scr-worlds .wcard.th-laube { background-image: url(img/landing/world-22-800.jpg); }
html body #scr-worlds .wcard.th-decke { background-image: url(img/landing/world-23-800.jpg); }
html body #scr-worlds .wcard.th-stellwerk { background-image: url(img/landing/world-24-800.jpg); }
html body #scr-worlds .wcard.th-atelier { background-image: url(img/landing/world-25-800.jpg); }
html body #scr-worlds .wcard.th-miniatur { background-image: url(img/landing/world-26-800.jpg); }
html body #scr-worlds .wcard.th-sanduhr { background-image: url(img/landing/world-27-800.jpg); }
html body #scr-worlds .wcard.th-blende { background-image: url(img/landing/world-28-800.jpg); }
html body #scr-worlds .wcard.th-spiegelwelt { background-image: url(img/landing/world-29-800.jpg); }

/* Levelkacheln */
html body #scr-levels.th-meadow.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-1-800.jpg); }
html body #scr-levels.th-cave.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-2-800.jpg); }
html body #scr-levels.th-factory.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-3-800.jpg); }
html body #scr-levels.th-glacier.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-4-800.jpg); }
html body #scr-levels.th-abyss.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-5-800.jpg); }
html body #scr-levels.th-patch.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-6-800.jpg); }
html body #scr-levels.th-dlc.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-7-800.jpg); }
html body #scr-levels.th-kulisse.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-8-800.jpg); }
html body #scr-levels.th-gratis.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-9-800.jpg); }
html body #scr-levels.th-giftkueche.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-10-800.jpg); }
html body #scr-levels.th-pass.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-11-800.jpg); }
html body #scr-levels.th-zugabe.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-12-800.jpg); }
html body #scr-levels.th-lehrgang.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-13-800.jpg); }
html body #scr-levels.th-absturz.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-14-800.jpg); }
html body #scr-levels.th-geruest.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-16-800.jpg); }
html body #scr-levels.th-steg.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-17-800.jpg); }
html body #scr-levels.th-leine.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-18-800.jpg); }
html body #scr-levels.th-treibhaus.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-19-800.jpg); }
html body #scr-levels.th-keller.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-20-800.jpg); }
html body #scr-levels.th-kommode.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-21-800.jpg); }
html body #scr-levels.th-laube.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-22-800.jpg); }
html body #scr-levels.th-decke.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-23-800.jpg); }
html body #scr-levels.th-stellwerk.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-24-800.jpg); }
html body #scr-levels.th-atelier.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-25-800.jpg); }
html body #scr-levels.th-miniatur.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-26-800.jpg); }
html body #scr-levels.th-sanduhr.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-27-800.jpg); }
html body #scr-levels.th-blende.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-28-800.jpg); }
html body #scr-levels.th-spiegelwelt.screen { background-image: linear-gradient(180deg, rgba(13, 8, 32, .8), rgba(13, 8, 32, .95)), url(img/landing/world-29-800.jpg); }
html body #scr-levels .level-grid { flex: 0 1 auto; gap: clamp(8px, 1.2vw, 16px); padding: 4px 4px 10px; margin: auto 0; grid-auto-rows: minmax(clamp(92px, 24vh, 210px), auto); }
html body #scr-levels .lcard {
  min-height: 0; padding: clamp(8px, 1.6vh, 14px) clamp(10px, 1.2vw, 16px);
  border: 2px solid rgba(255, 255, 255, .2); border-radius: 12px; background: rgba(24, 17, 54, .9); color: #fff; outline: 0;
  box-shadow: 0 5px 0 rgba(0, 0, 0, .5);
  transition: transform .12s cubic-bezier(.2, 1.4, .4, 1), border-color .12s linear, box-shadow .12s linear;
}
html body #scr-levels .lcard:hover, html body #scr-levels .lcard:focus-visible {
  transform: translateY(-4px); border-color: #ffd36b; outline: 0; box-shadow: 0 9px 0 rgba(0, 0, 0, .5), 0 0 0 3px rgba(255, 211, 107, .35);
}
html body #scr-levels .lcard:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0, 0, 0, .5); }
html body #scr-levels .lcard .lnum { font-size: clamp(26px, 5vh, 44px); color: #fff; text-shadow: 0 3px 0 #1a0f33; }
html body #scr-levels .lcard .lstars { font-size: clamp(12px, 2vh, 17px); letter-spacing: 2px; }
html body #scr-levels .lcard .lname { font-size: clamp(12px, 1.8vh, 15px); color: #ece5ff; }
html body #scr-levels .lcard .lmeta { font-size: clamp(11px, 1.6vh, 13px); color: #cfc6ea; }
html body #scr-levels .lcard.done { background: rgba(24, 62, 40, .92); border-color: rgba(107, 227, 138, .55); }
html body #scr-levels .lcard.done .lnum { color: #8ff0a8; }
html body #scr-levels .lcard.skipped { background: rgba(70, 48, 16, .92); border-color: rgba(255, 190, 80, .5); }
html body #scr-levels .lcard.locked { opacity: 1; background: rgba(16, 11, 36, .78); border-color: rgba(255, 255, 255, .08); box-shadow: none; }
html body #scr-levels .lcard.locked .lnum { color: rgba(255, 255, 255, .28); text-shadow: none; }

@media (max-width: 760px) {
  /* Hochkant-Handy: Karten so hoch wie ihr Inhalt, sonst wird der Weltname abgeschnitten */
  html body #scr-worlds .world-grid { flex: 0 0 auto; grid-auto-rows: auto; }
  html body #scr-worlds .wcard { min-height: 128px; }
  html body #scr-worlds .wname { font-size: 18px; }
  html body #scr-worlds .wsub { font-size: 12px; }
  html body #scr-levels .level-grid { margin: 0; grid-auto-rows: minmax(104px, auto); }
  html body #scr-levels .phead h2 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html body #scr-worlds .wcard, html body #scr-levels .lcard { transition: none; }
}

/* ── Alle Tafeln und Knöpfe: dieselbe Sprache wie Titel und Weltkarte (runde Ecken, Violett, weiche Tiefe) ── */
html body .screen .panel {
  border-radius: 14px; border: 2px solid rgba(255, 255, 255, .2); border-top: 2px solid rgba(255, 255, 255, .2);
  background: linear-gradient(180deg, #241b4d 0, #171033 100%);
  box-shadow: 0 10px 0 rgba(0, 0, 0, .45), 0 30px 90px rgba(0, 0, 0, .55);
}
html body #scr-worlds .panel, html body #scr-levels .panel { border: 0; background: none; box-shadow: none; border-radius: 0; }
html body .screen-dark { background: rgba(13, 8, 32, .84); }
html body .screen-dim { background: rgba(13, 8, 32, .62); }
html body .screen .btn { border-radius: 10px; transition: transform .12s cubic-bezier(.2, 1.4, .4, 1), border-color .12s linear, box-shadow .12s linear, background-color .12s linear; }
html body .screen .btn:not(.btn-acc):not(.btn-ghost):not(.btn-danger):not(.btn-warn) { background: #2c2157; border-color: rgba(255, 255, 255, .22); color: #fff; }
html body .screen .btn:not(.btn-ghost):hover, html body .screen .btn:not(.btn-ghost):focus-visible { transform: translateY(-2px); border-color: #ffd36b; box-shadow: 0 6px 0 rgba(0, 0, 0, .5), 0 0 0 3px rgba(255, 211, 107, .3); outline: 0; }
html body .screen .btn:not(.btn-acc):not(.btn-ghost):not(.btn-danger):not(.btn-warn):hover, html body .screen .btn:not(.btn-acc):not(.btn-ghost):not(.btn-danger):not(.btn-warn):focus-visible { background: #3d2c6e; }
html body .screen .btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .5); }
html body .screen .panel h2 { color: #fff; text-shadow: 0 3px 0 #1a0f33; }
html body .screen input[type=text] { border-radius: 10px; }
@media (prefers-reduced-motion: reduce) { html body .screen .btn { transition: none; } }

/* ── Levelauswahl als Pfad (14.11.26): Karten in Schlangenlinie, Linie dazwischen, Level-Umriss als Kartenboden ── */
html body #scr-levels .level-grid { position: relative; gap: clamp(20px, 3.4vh, 40px) clamp(22px, 3vw, 48px); padding: 14px 6px 14px; }
html body #scr-levels .lpfad { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 0; overflow: visible; }
html body #scr-levels .lpfad line { stroke-width: 8; stroke-linecap: butt; fill: none; }
html body #scr-levels .lpfad line.offen { stroke: rgba(255, 255, 255, .3); stroke-dasharray: 8 8; }
html body #scr-levels .lpfad line.gegangen { stroke: #ffd36b; }
html body #scr-levels .lcard { z-index: 1; overflow: hidden; }
html body #scr-levels .lcard > :not(.lmini):not(.lfigur):not(.crown):not(.gold):not(.lavg) { position: relative; z-index: 1; }
html body #scr-levels .lcard > .crown, html body #scr-levels .lcard > .gold { z-index: 1; }
html body #scr-levels .lcard > .lmini {
  position: absolute; z-index: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 46%;
  image-rendering: pixelated; opacity: .2; pointer-events: none;
}
html body #scr-levels .lcard.done > .lmini { opacity: .26; }
html body #scr-levels .lcard.locked > .lmini { opacity: .09; }
html body #scr-levels .lcard.jetzt { border-color: #ffd36b; overflow: visible; animation: lcard-jetzt 1.6s ease-in-out infinite; }
html body #scr-levels .lcard.jetzt > .lmini { border-radius: 0 0 10px 10px; }
html body #scr-levels .lcard > .lfigur {
  position: absolute; z-index: 2; right: clamp(6px, 1vw, 14px); top: 0; width: clamp(30px, 6vh, 54px); height: auto;
  transform: translateY(-58%); image-rendering: pixelated; pointer-events: none; animation: lfigur-wipp 1.1s steps(2) infinite;
}
@keyframes lcard-jetzt { 0%, 100% { box-shadow: 0 5px 0 rgba(0, 0, 0, .5), 0 0 0 0 rgba(255, 211, 107, .5); } 50% { box-shadow: 0 5px 0 rgba(0, 0, 0, .5), 0 0 0 7px rgba(255, 211, 107, 0); } }
@keyframes lfigur-wipp { 0%, 100% { transform: translateY(-58%); } 50% { transform: translateY(-66%); } }
@media (max-width: 760px) {
  html body #scr-levels .level-grid { gap: 16px 14px; padding: 16px 4px 12px; }
  html body #scr-levels .lpfad line { stroke-width: 6; }
}
@media (prefers-reduced-motion: reduce) {
  html body #scr-levels .lcard.jetzt, html body #scr-levels .lcard > .lfigur { animation: none; }
}

/* Sterbe-Stellen (rote Kreuze) und Schnitt aller Spieler auf der Levelkarte */
html body #scr-levels .lcard > .lmini.ltot, html body #scr-levels .lcard.done > .lmini.ltot, html body #scr-levels .lcard.locked > .lmini.ltot { opacity: .95; z-index: 0; }
html body #scr-levels .lcard > .lavg {
  position: absolute; z-index: 1; right: clamp(8px, 1vw, 14px); bottom: clamp(6px, 1.2vh, 12px);
  font-size: clamp(10px, 1.5vh, 13px); color: #ff9c9c; white-space: nowrap; text-shadow: 0 2px 0 rgba(0, 0, 0, .6);
}
html body #scr-levels .lcard.locked > .lavg { color: rgba(255, 156, 156, .55); }
@media (max-width: 760px) {
  html body #scr-levels .lcard > .lavg { position: relative; right: auto; bottom: auto; display: block; margin-top: 2px; }
}

/* ── Lesbarkeit (14.11.26 Christoph: „Schrift teilweise schwer lesbar“): Fließtext, Knöpfe und Zahlen in Figtree,
   die Pixelschrift bleibt nur für große Überschriften (Logo, Bildschirmtitel, Weltname, Level-Banner). ── */
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 300 900; font-display: swap; src: url(fonts/figtree-latin-wght-normal.woff2) format('woff2'); }
:root { --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; --px: 'Pixelify Sans', ui-monospace, monospace; }
html, body { font-weight: 600; font-variant-numeric: tabular-nums; }
html body h1, html body h2, html body .logo, html body .term-title { font-family: var(--px); }
/* Ziffern und C/G/O sind in der Pixelschrift leicht zu verwechseln (2/8, 5/S, DLC/DLO): alles mit Zahlen oder Namen bleibt in Figtree */
html body .logo .logo-v, html body #levels-title, html body .wname, html body #banner { font-family: var(--font); font-weight: 800; letter-spacing: 0; }
html body .btn, html body button { font-weight: 700; letter-spacing: .02em; }
html body #scr-levels .lcard .lnum, html body .wnum { font-weight: 800; }
