/* NOVA GARDENS – Layout nach Vorlage: Hintergrundbild, Logo + Maskottchen, Bild-Panels (Moves/Score/Collect), Spielfeld im Rahmen, Booster unten. */
:root {
  --bg: #071030; --panel: rgba(10, 22, 60, .72); --line: rgba(79, 216, 255, .35);
  --fg: #f2f6ff; --muted: #a9b8e8; --accent: #4fd8ff; --accent-2: #ffd84d; --purple: #b36cff; --good: #5ee39a; --danger: #ff6b8a;
  --nebula: #c86bff; --nebula-2: #ff6ec7;
  --font-display: 'Fredoka', 'Baloo 2', 'Trebuchet MS', system-ui, sans-serif;
  --font-body: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  --cell: 48px; --board: 300px; --fw: 1;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; touch-action: manipulation; } /* kein Zoom per Doppeltipp (Wischen und Tippen bleiben) */
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); overflow: hidden; -webkit-tap-highlight-color: transparent; user-select: none; }
body::before { content: ''; position: fixed; inset: 0; z-index: 0; background: var(--bg) url(img/bg.jpg) center / cover no-repeat; }
body::after { content: ''; position: fixed; inset: 0; z-index: 0; background: linear-gradient(180deg, rgba(4, 8, 30, .25), rgba(4, 8, 30, .1) 40%, rgba(4, 8, 30, .45)); pointer-events: none; }

/* ---------- Grundraster ---------- */
#app {
  position: relative; z-index: 1; height: 100%; display: grid; grid-template-rows: auto 1fr; gap: 6px;
  padding-top: max(8px, env(safe-area-inset-top, 0px)); padding-bottom: max(10px, env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); /* iPhone: Statusleiste (Uhr, WLAN, Akku) und Home-Balken freihalten */
  max-width: 620px; margin: 0 auto;
}
#side { display: grid; grid-template-columns: 40% 1fr; grid-template-areas: "logo hud" "mascot hud"; column-gap: 10px; row-gap: 2px; align-items: start; }
#logo { grid-area: logo; width: 100%; max-width: 300px; display: block; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .5)); }
#mascot { grid-area: mascot; display: flex; align-items: flex-start; gap: 4px; min-width: 0; }
#mascot-img { width: 46%; max-width: 120px; flex: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); animation: drift 3.2s ease-in-out infinite; }
#bubble {
  position: relative; margin-top: 10%; background: rgba(236, 244, 255, .94); color: #15224a; border-radius: 14px; padding: 8px 10px;
  font: 600 .78rem/1.25 var(--font-display); box-shadow: 0 4px 14px rgba(0, 0, 0, .35); min-width: 0; flex: 1;
}
#bubble::before { content: ''; position: absolute; left: -8px; top: 16px; border: 8px solid transparent; border-right-color: rgba(236, 244, 255, .94); border-left: 0; }
#bubble.pop { animation: bubblepop .35s cubic-bezier(.2, 1.4, .4, 1); }

/* ---------- HUD-Panels aus Bildern ---------- */
#hud { grid-area: hud; display: grid; grid-template-columns: 1fr 1.78fr; grid-template-areas: "moves score" "collect collect"; gap: 6px; align-content: start; }
.panel { position: relative; container-type: inline-size; background-repeat: no-repeat; background-position: center; background-size: 100% 100%; }
.panel.moves { grid-area: moves; aspect-ratio: 1; background-image: url(img/panel-moves.webp); }
.panel.score { grid-area: score; aspect-ratio: 1.777; }
.panel.collect { grid-area: collect; aspect-ratio: 2.2; background-image: url(img/panel-collect.webp); background-size: 100% auto; }
.panel .num { position: absolute; left: 0; right: 0; text-align: center; font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; color: #fff; text-shadow: 0 2px 0 #1a3b8a, 0 0 12px rgba(79, 216, 255, .7), 0 3px 6px rgba(0, 0, 0, .6); }
.panel.moves .num { top: 34%; font-size: 38cqw; }
.panel.moves .num.low { color: var(--danger); animation: lowpulse 1s ease-in-out infinite; }
.panel.score .num { top: 24%; font-size: 15cqw; color: var(--accent-2); text-shadow: 0 2px 0 #8a4a00, 0 0 12px rgba(255, 216, 77, .6), 0 3px 6px rgba(0, 0, 0, .6); }
.panel.score .bar { position: absolute; left: 11.6%; width: 77.4%; top: 64.6%; height: 15%; border-radius: 999px; overflow: hidden; background: #08173f; }
.panel.score #progress-fill { height: 100%; width: 100%; border-radius: 999px; background: linear-gradient(90deg, #ffb02e, #ffd84d, #fff3b0); box-shadow: 0 0 10px rgba(255, 216, 77, .8); transform-origin: 0 50%; transform: scaleX(0); transition: transform .4s ease-out; will-change: transform; } /* Füllstand per Transform: läuft auf dem Compositor weiter, auch wenn die Endsequenz den Hauptthread auslastet (Breiten-Animation blieb hängen) */
.panel.score .mark { position: absolute; top: 70%; transform: translate(-50%, 0) scale(.8); width: 10.5%; font-size: 11cqw; line-height: 1; text-align: center; color: transparent; transition: color .3s, transform .3s; }
.panel.score .mark.m1 { left: 58.2%; } .panel.score .mark.m2 { left: 70.9%; } .panel.score .mark.m3 { left: 83.6%; }
.panel.score .mark.lit { color: var(--accent-2); text-shadow: 0 0 10px rgba(255, 216, 77, .9), 0 0 2px #fff; transform: translate(-50%, 0) scale(1.05); }
.panel.collect.done { filter: drop-shadow(0 0 10px rgba(94, 227, 154, .8)); }
#goal-items { position: absolute; left: 6%; right: 6%; top: 27%; bottom: 5%; display: flex; justify-content: center; align-items: center; gap: 5%; }
.goal-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2cqw; height: 100%; min-width: 0; }
.goal-item .ico { height: 60%; aspect-ratio: 1; background: center / contain no-repeat; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6)); }
.goal-item .ico.star { background: none; }
.goal-item .ico.star::before { content: '★'; display: block; font-size: 10cqw; line-height: 1; color: var(--accent-2); text-shadow: 0 0 10px rgba(255, 216, 77, .9); }
.goal-item .ico.neb { border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ffd0f0, var(--nebula) 60%, #5a2a9a); box-shadow: 0 0 10px rgba(200, 107, 255, .9); }
.goal-item .ico.astro svg { width: 100%; height: 100%; }
.goal-item .cnt { font: 700 6.5cqw var(--font-display); color: #fff; text-shadow: 0 2px 0 #1a3b8a, 0 2px 6px rgba(0, 0, 0, .6); white-space: nowrap; font-variant-numeric: tabular-nums; }
.goal-item.done .cnt { color: var(--good); }
.goal-item.done .ico { filter: drop-shadow(0 0 6px rgba(94, 227, 154, .9)); }

/* ---------- Spielfeld ---------- */
#play { display: flex; flex-direction: column; align-items: center; min-height: 0; min-width: 0; gap: 2px; }
#level-label { font: 600 .82rem var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: #dff3ff; text-shadow: 0 0 10px rgba(79, 216, 255, .8), 0 2px 4px rgba(0, 0, 0, .7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
#stage { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
#frame {
  box-sizing: content-box; width: var(--board); height: var(--board);
  border-style: solid; border-width: calc(var(--board) * .186 * var(--fw)) calc(var(--board) * .1435 * var(--fw)) calc(var(--board) * .26 * var(--fw)) calc(var(--board) * .139 * var(--fw));
  border-image-source: url(img/frame.png); border-image-slice: 11.6% 11.2% 16.2% 10.8%; border-image-width: 1; border-image-repeat: stretch;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .55));
}
#board { position: relative; width: var(--board); height: var(--board); touch-action: none; background: linear-gradient(180deg, #0b1a44, #070f2c); box-shadow: 0 0 0 2px rgba(79, 216, 255, .35), 0 0 18px rgba(79, 216, 255, .25), inset 0 0 40px rgba(0, 0, 0, .55); overflow: hidden; }
#cells, #gems, #fx, #particles { position: absolute; inset: 0; }
#gems { cursor: pointer; }
#fx, #particles { pointer-events: none; overflow: hidden; }
#gems.fade .gem { opacity: 0; }
#board.flash::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle, #fff, var(--nebula) 70%); animation: flash .6s ease-out forwards; }
#board.target { cursor: crosshair; }
#app.shake-1 { animation: shake1 .3s linear; }
#app.shake-2 { animation: shake2 .45s linear; }
#app.shake-3 { animation: shake3 .65s linear; }

.cell { position: absolute; left: 0; top: 0; width: var(--cell); height: var(--cell); }
.cell::before { content: ''; position: absolute; inset: 3%; border-radius: 14%; background: rgba(12, 24, 64, .82); box-shadow: inset 0 0 0 1px rgba(79, 216, 255, .22), inset 0 0 8px rgba(0, 0, 0, .5); transition: background .3s, box-shadow .3s; }
.cell.neb1::before { background: radial-gradient(circle at 40% 40%, rgba(255, 110, 199, .45), rgba(200, 107, 255, .32) 55%, rgba(60, 30, 120, .7) 85%); box-shadow: inset 0 0 0 1px rgba(255, 170, 240, .5), inset 0 0 12px rgba(255, 150, 230, .4); }
.cell.neb2::before { background: radial-gradient(circle at 40% 40%, rgba(255, 110, 199, .85), rgba(200, 107, 255, .65) 55%, rgba(60, 30, 120, .8) 85%); box-shadow: inset 0 0 0 2px rgba(255, 190, 245, .7), inset 0 0 16px rgba(255, 150, 230, .6); }
.cell.cleared::before { animation: clearcell .45s ease-out; }
.rock { position: absolute; left: 0; top: 0; width: var(--cell); height: var(--cell); padding: calc(var(--cell) * .07); }
.rock svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); }
.rock.hp2 .crack { display: none; }
.rock.hp2 { padding: calc(var(--cell) * .02); }
.rock.hit svg { animation: shake .3s; }
.rock .inner { width: 100%; height: 100%; }
.rock.crumble .inner, .rock.dark.grow.crumble .inner, .rock.crumble .inner.dark-img { animation: crumble .45s ease-in forwards; }

/* ---------- Steine ---------- */
.gem { position: absolute; left: 0; top: 0; width: var(--cell); height: var(--cell); pointer-events: none; transition: transform .2s cubic-bezier(.4, .2, .2, 1), opacity .35s; will-change: transform; }
.no-anim .gem { transition: none !important; }
.gem .inner { position: absolute; inset: 4%; transition: transform .15s ease-out; }
.gem .tile { position: absolute; inset: 0; background: center / contain no-repeat; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .55)); }
.gem .tile.t0 { background-image: url(img/tile0.png); } .gem .tile.t1 { background-image: url(img/tile1.png); } .gem .tile.t2 { background-image: url(img/tile2.png); }
.gem .tile.t3 { background-image: url(img/tile3.png); } .gem .tile.t4 { background-image: url(img/tile4.png); } .gem .tile.t5 { background-image: url(img/tile5.png); }
.gem svg { width: 100%; height: 100%; display: block; overflow: visible; }
.gem.sel .inner { transform: scale(1.15); }
.gem.hint .inner { animation: hint 1s ease-in-out infinite; }
.gem.pop .inner { animation: pop .27s ease-in forwards; }
.gem.born .inner { animation: born .45s cubic-bezier(.2, 1.4, .4, 1); }
.gem.exit { opacity: 0; transition: transform .4s ease-in, opacity .4s; }
.gem.ing svg { filter: drop-shadow(0 0 8px rgba(255, 255, 255, .7)); animation: drift 2.2s ease-in-out infinite; }
/* Komet (Vierer-Match): Stein wird zum Kometenbild seiner Sorte (Nutzerbilder) und pulsiert neonartig in seiner eigenen Farbe (--neon). */
.gem.sp-H .tile, .gem.sp-V .tile { inset: -8%; --neon: #4fd8ff; filter: drop-shadow(0 0 5px var(--neon)) drop-shadow(0 3px 4px rgba(0, 0, 0, .5)); animation: neon 1.1s ease-in-out infinite; }
.gem.sp-H .tile.t0, .gem.sp-V .tile.t0 { --neon: #7cff4d; background-image: url(img/comet0.webp); } .gem.sp-H .tile.t1, .gem.sp-V .tile.t1 { --neon: #ff5bd6; background-image: url(img/comet1.webp); }
.gem.sp-H .tile.t2, .gem.sp-V .tile.t2 { --neon: #4f8cff; background-image: url(img/comet2.webp); } .gem.sp-H .tile.t3, .gem.sp-V .tile.t3 { --neon: #ffa632; background-image: url(img/comet3.webp); }
.gem.sp-H .tile.t4, .gem.sp-V .tile.t4 { --neon: #c86bff; background-image: url(img/comet4.webp); } .gem.sp-H .tile.t5, .gem.sp-V .tile.t5 { --neon: #7ff4ff; background-image: url(img/comet5.webp); }
@keyframes neon { 0%, 100% { filter: drop-shadow(0 0 3px var(--neon)) drop-shadow(0 3px 4px rgba(0, 0, 0, .5)); } 50% { filter: drop-shadow(0 0 8px var(--neon)) drop-shadow(0 0 18px var(--neon)) drop-shadow(0 3px 4px rgba(0, 0, 0, .5)); } }
.gem.sp-H .inner .sp, .gem.sp-V .inner .sp { display: none; } /* kein blauer Streifen mehr über den Kometenbildern (schlägt die Streifen-Regeln weiter unten) */
/* Supernova (Fünfer-Match): Bild je Sorte (Nutzerbilder) mit Neon-Pulsieren statt goldenem Ring */
.gem.sp-W .tile { inset: -8%; --neon: #ffd84d; filter: drop-shadow(0 0 5px var(--neon)) drop-shadow(0 3px 4px rgba(0, 0, 0, .5)); animation: neon 1.1s ease-in-out infinite; }
.gem.sp-W .tile.t0 { --neon: #7cff4d; background-image: url(img/nova0.webp); } .gem.sp-W .tile.t1 { --neon: #ff5bd6; background-image: url(img/nova1.webp); }
.gem.sp-W .tile.t2 { --neon: #4f8cff; background-image: url(img/nova2.webp); } .gem.sp-W .tile.t3 { --neon: #ffa632; background-image: url(img/nova3.webp); }
.gem.sp-W .tile.t4 { --neon: #c86bff; background-image: url(img/nova4.webp); } .gem.sp-W .tile.t5 { --neon: #7ff4ff; background-image: url(img/nova5.webp); }
.gem.sp-W .inner .sp { display: none; }
.gem .sp { position: absolute; inset: 0; display: none; pointer-events: none; }
.gem.sp-H .sp, .gem.sp-V .sp { display: block; border-radius: 999px; filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 3px var(--accent)); }
.gem.sp-H .sp { inset: 40% -2%; background: linear-gradient(90deg, transparent 0, rgba(79, 216, 255, .7) 35%, #fff 50%, rgba(79, 216, 255, .7) 65%, transparent 100%); background-size: 200% 100%; animation: travel-h 1s linear infinite; }
.gem.sp-V .sp { inset: -2% 40%; background: linear-gradient(180deg, transparent 0, rgba(79, 216, 255, .7) 35%, #fff 50%, rgba(79, 216, 255, .7) 65%, transparent 100%); background-size: 100% 200%; animation: travel-v 1s linear infinite; }
.gem.sp-W .sp { display: block; inset: -2%; border-radius: 50%; border: 3px solid var(--accent-2); box-shadow: 0 0 12px #ff8a3d, 0 0 4px #fff, inset 0 0 10px rgba(255, 216, 77, .7); animation: pulse 1.1s ease-in-out infinite; }
.gem.armed .sp { animation-duration: .35s; border-color: #fff; box-shadow: 0 0 18px #fff, inset 0 0 12px #fff; }
.gem .orb { position: absolute; inset: 6%; border-radius: 50%; box-shadow: 0 0 18px rgba(255, 170, 90, .6); background: conic-gradient(from 0deg, #ff8a3d, #ffd84d, #fff, #b76cff, #4f8dff, #ff8a3d); animation: spin 1.8s linear infinite; }
.gem .orb i { position: absolute; inset: 24%; border-radius: 50%; background: #000; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 0 14px 4px rgba(255, 255, 255, .45); }

/* ---------- Effekte ---------- */
.fx { position: absolute; pointer-events: none; }
.fx.beam { opacity: 0; border-radius: 30%; filter: blur(1px); animation: beam .62s ease-out forwards; }
.fx.beam.h { left: 0; width: 100%; background: linear-gradient(90deg, transparent, rgba(79, 216, 255, .7) 25%, #fff 50%, rgba(79, 216, 255, .7) 75%, transparent); }
.fx.beam.v { top: 0; height: 100%; background: linear-gradient(180deg, transparent, rgba(79, 216, 255, .7) 25%, #fff 50%, rgba(79, 216, 255, .7) 75%, transparent); }
.fx.blast { border-radius: 50%; background: radial-gradient(circle, #fff, rgba(255, 216, 77, .85) 28%, rgba(255, 120, 60, .55) 52%, transparent 70%); animation: blast .62s ease-out forwards; }
.fx.score { transform: translate(-50%, -50%); white-space: nowrap; color: #fff; font: 700 clamp(12px, calc(var(--cell) * .42), 26px) var(--font-display); text-shadow: 0 2px 0 #1a3b8a, 0 2px 8px rgba(0, 0, 0, .8), 0 0 12px var(--accent); animation: scoreup .95s ease-out forwards; }
.fx.score.chain { color: var(--accent-2); text-shadow: 0 2px 0 #8a4a00, 0 2px 8px rgba(0, 0, 0, .8), 0 0 12px var(--accent-2); }
#banner {
  position: fixed; left: 50%; top: 44%; transform: translate(-50%, -50%) scale(.6); opacity: 0; pointer-events: none; z-index: 5;
  font: 700 clamp(1.6rem, 7vw, 3.2rem) var(--font-display); color: #fff; letter-spacing: .04em; text-align: center; padding: 14px 44px;
  background: radial-gradient(ellipse at center, rgba(4, 8, 30, .7), transparent 70%);
  text-shadow: 0 3px 0 #1a3b8a, 0 0 20px var(--accent), 0 0 40px #3f8cff, 0 6px 12px rgba(0, 0, 0, .8);
}
#banner.show { animation: banner 1.5s cubic-bezier(.2, .9, .3, 1) forwards; }
#banner.t1 { color: var(--accent); }
#banner.t2 { color: var(--accent-2); text-shadow: 0 3px 0 #8a4a00, 0 0 20px var(--accent-2), 0 0 40px #ff8a3d, 0 6px 12px rgba(0, 0, 0, .8); }
#banner.t3 { color: #ff6ec7; text-shadow: 0 3px 0 #7a1a5a, 0 0 20px #ff6ec7, 0 0 44px var(--nebula), 0 6px 12px rgba(0, 0, 0, .8); font-size: clamp(1.8rem, 8vw, 3.6rem); }
#banner.t4 { background-image: linear-gradient(90deg, #ff5c5c, #ffe45c, #5ee36b, #4fd8ff, #b76cff); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 0 18px rgba(255, 255, 255, .7)); font-size: clamp(1.9rem, 8.5vw, 3.8rem); }
#banner.combo { color: #ff8a3d; text-shadow: 0 3px 0 #7a2a00, 0 0 20px #ff8a3d, 0 0 50px #ff5c5c, 0 6px 12px rgba(0, 0, 0, .8); font-size: clamp(1.7rem, 7.5vw, 3.4rem); }
#banner.sp1 { color: #fff; } #banner.sp2 { color: var(--accent-2); text-shadow: 0 3px 0 #8a4a00, 0 0 20px #ff8a3d, 0 0 40px #ff8a3d, 0 6px 12px rgba(0, 0, 0, .8); }
#banner.sp3 { color: #e6ccff; text-shadow: 0 3px 0 #3a1a6a, 0 0 20px var(--nebula), 0 0 50px #4f1d9e, 0 6px 12px rgba(0, 0, 0, .8); }
#banner.boost { color: #c8ffd6; text-shadow: 0 3px 0 #1a5a2a, 0 0 20px #5ee39a, 0 6px 12px rgba(0, 0, 0, .8); }

/* ---------- Booster ---------- */
#boosters { display: flex; justify-content: center; align-items: flex-start; gap: 4%; width: 100%; padding: 2px 0 0; }
.booster { position: relative; width: 24%; max-width: 128px; background: none; border: none; padding: 0; cursor: pointer; color: #fff; font: 700 clamp(.5rem, 1.9vw, .66rem) var(--font-display); text-transform: uppercase; letter-spacing: .03em; text-shadow: 0 2px 0 #1a3b8a, 0 2px 6px rgba(0, 0, 0, .7); display: flex; flex-direction: column; align-items: center; gap: 2px; transition: transform .12s; }
.booster img { width: 100%; display: block; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); transition: filter .15s, transform .15s; }
.booster .count { position: absolute; right: 6%; top: 60%; width: 27%; aspect-ratio: 1; border-radius: 50%; background: linear-gradient(180deg, #c27dff, #7a3fd6); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .6); display: grid; place-items: center; font: 700 clamp(.7rem, 2.6vw, 1rem) var(--font-display); text-shadow: none; }
.booster .lbl { white-space: nowrap; }
.booster:hover img { transform: translateY(-2px); }
.booster.armed img { filter: drop-shadow(0 0 16px var(--accent)) drop-shadow(0 6px 10px rgba(0, 0, 0, .5)) brightness(1.15); transform: scale(1.08); }
.booster.armed .lbl { color: var(--accent); }
.booster:disabled, .booster.empty { cursor: default; }
.booster.empty img { filter: grayscale(.8) brightness(.6); }
.booster.empty .count { background: #4a4a5e; }
.booster:focus-visible, .gear:focus-visible, .btn:focus-visible, .lvl:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gear { position: fixed; left: max(14px, env(safe-area-inset-left, 0px)); bottom: max(14px, env(safe-area-inset-bottom, 0px)); z-index: 4; width: 46px; height: 46px; border-radius: 50%; background: rgba(10, 18, 48, .8); border: 2px solid var(--line); color: #dff3ff; font-size: 1.5rem; cursor: pointer; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0, 0, 0, .5); transition: transform .3s; }
.gear:hover { transform: rotate(30deg); }
.mi { display: block; width: 80%; height: 80%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45)); } /* Bild-Icons der Knöpfe (img/ui-*.webp) */
.gear { padding: 0; } .gear .mi { width: 82%; height: 82%; }
#map .nav .mi { width: 72%; height: 72%; } #map .nav.next .mi { transform: scaleX(-1); } /* rechter Pfeil = linker gespiegelt */
#map .tasks-btn.locked .mi, #map .base-btn.locked .mi, #map .clan-btn.locked .mi { filter: grayscale(1) brightness(.8); opacity: .75; }

/* ---------- Overlays ---------- */
#overlay { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; background: rgba(3, 6, 24, .62); backdrop-filter: blur(5px); padding: 16px; }
.panel-box {
  position: relative; width: min(100%, 400px); background: linear-gradient(180deg, rgba(16, 34, 96, .96), rgba(8, 16, 48, .97)); border: 2px solid var(--line); border-radius: 22px;
  padding: 26px 22px 22px; text-align: center; box-shadow: 0 0 0 5px rgba(79, 216, 255, .08), 0 0 30px rgba(79, 216, 255, .25), 0 30px 80px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .15); animation: born .4s cubic-bezier(.2, 1.3, .4, 1);
}
.panel-box h2 { margin: 0 0 6px; font: 700 1.9rem var(--font-display); letter-spacing: .02em; text-wrap: balance; text-shadow: 0 3px 0 #1a3b8a, 0 0 16px rgba(79, 216, 255, .6); }
.panel-box p { margin: 4px 0; color: var(--muted); line-height: 1.45; }
#ov-goal { color: var(--fg); background: rgba(255, 255, 255, .07); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 12px 0; }
#ov-stars { font-size: 2.8rem; line-height: 1; margin: 10px 0 4px; letter-spacing: .1em; }
#ov-stars .star { display: inline-block; color: rgba(255, 255, 255, .18); }
#ov-stars .star.on { color: var(--accent-2); text-shadow: 0 0 16px rgba(255, 216, 77, .9), 0 2px 0 #8a4a00; animation: starpop .5s cubic-bezier(.2, 1.5, .4, 1) both; }
#ov-score { font: 700 1.3rem var(--font-display); color: var(--fg); font-variant-numeric: tabular-nums; }
#ov-buttons, .ov-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
#ov-gold { font: 800 1.05rem var(--font-body); color: var(--accent-2); margin-top: 2px; }
.btn { font: 700 1rem var(--font-display); letter-spacing: .02em; padding: 12px 24px; border-radius: 999px; border: none; cursor: pointer; color: #0b1a44; background: linear-gradient(180deg, #c9f3ff, var(--accent) 60%, #2bb8e8); box-shadow: 0 5px 0 #1a7ea8, 0 8px 20px rgba(79, 216, 255, .35), inset 0 1px 0 #fff; transition: transform .1s, filter .15s, box-shadow .1s; }
.btn:hover { filter: brightness(1.06); } .btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #1a7ea8, 0 4px 10px rgba(79, 216, 255, .3), inset 0 1px 0 #fff; }
.btn.ghost { background: rgba(255, 255, 255, .08); color: var(--fg); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:active { transform: scale(.97); }
.btn.small { padding: 8px 14px; font-size: .8rem; }
.ios-hint { margin: 4px 0 0; font-size: .8rem; color: var(--muted); line-height: 1.4; }
.toast { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 999px; background: rgba(8, 16, 48, .95); border: 1px solid var(--line); color: var(--fg); font: 600 .9rem var(--font-display); box-shadow: 0 10px 30px rgba(0, 0, 0, .6); max-width: calc(100% - 32px); pointer-events: none; }
body:has(#battle-bar:not([hidden])) .toast { bottom: max(132px, calc(env(safe-area-inset-bottom, 0px) + 122px)); } /* im Kampf über der Truppenleiste */


/* ---------- Keyframes ---------- */
@keyframes pop { 0% { transform: scale(1); filter: brightness(1); } 35% { transform: scale(1.3); filter: brightness(2.4); opacity: 1; } 100% { transform: scale(0) rotate(20deg); opacity: 0; filter: brightness(3); } }
@keyframes born { 0% { transform: scale(.2); } 100% { transform: scale(1); } }
@keyframes hint { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15) translateY(-3px); } }
@keyframes pulse { 0%, 100% { transform: scale(.94); opacity: .8; } 50% { transform: scale(1.04); opacity: 1; } }
@keyframes travel-h { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes travel-v { from { background-position: 0 100%; } to { background-position: 0 -100%; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-5%) rotate(2deg); } }
@keyframes bubblepop { 0% { transform: scale(.7); } 100% { transform: scale(1); } }
@keyframes beam { 0% { opacity: 0; transform: scaleY(.3); } 20% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes blast { 0% { transform: scale(.2); opacity: 1; } 100% { transform: scale(1.1); opacity: 0; } }
@keyframes flash { 0% { opacity: .9; } 100% { opacity: 0; } }
@keyframes scoreup { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -160%) scale(1); } }
@keyframes clearcell { 0% { box-shadow: inset 0 0 0 40px rgba(255, 255, 255, .7); } 100% { box-shadow: inset 0 0 0 1px rgba(79, 216, 255, .22), inset 0 0 8px rgba(0, 0, 0, .5); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6%); } 75% { transform: translateX(6%); } }
@keyframes crumble { to { transform: scale(.3) rotate(15deg); opacity: 0; } }
@keyframes lowpulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(-4deg); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.18) rotate(1deg); } 28% { transform: translate(-50%, -50%) scale(1); } 72% { opacity: 1; transform: translate(-50%, -50%) scale(1.02); } 100% { opacity: 0; transform: translate(-50%, -80%) scale(1.05); } }
@keyframes starpop { 0% { transform: scale(0) rotate(-30deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes shake1 { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-3px, 2px); } 50% { transform: translate(3px, -2px); } 75% { transform: translate(-2px, -2px); } }
@keyframes shake2 { 0%, 100% { transform: translate(0, 0); } 15% { transform: translate(-7px, 4px) rotate(-.3deg); } 30% { transform: translate(7px, -4px) rotate(.3deg); } 45% { transform: translate(-5px, -3px); } 60% { transform: translate(5px, 3px); } 80% { transform: translate(-2px, 1px); } }
@keyframes shake3 { 0%, 100% { transform: translate(0, 0) scale(1); } 10% { transform: translate(-12px, 7px) rotate(-.6deg) scale(1.01); } 25% { transform: translate(12px, -7px) rotate(.6deg); } 40% { transform: translate(-9px, -5px) rotate(-.4deg); } 55% { transform: translate(9px, 5px) rotate(.4deg); } 70% { transform: translate(-4px, 2px); } 85% { transform: translate(4px, -2px); } }

/* ---------- Breite Fenster: Seitenleiste links, Spielfeld rechts ---------- */
@media (min-width: 840px) and (min-aspect-ratio: 1/1) {
  #app { max-width: 1100px; grid-template-rows: 1fr; grid-template-columns: minmax(250px, 330px) 1fr; column-gap: 24px; padding-top: max(12px, env(safe-area-inset-top, 0px)); padding-bottom: max(12px, env(safe-area-inset-bottom, 0px)); }
  #side { grid-template-columns: 1fr; grid-template-areas: "logo" "mascot" "hud"; row-gap: 10px; align-content: start; }
  #logo { max-width: 100%; }
  #mascot-img { width: 42%; max-width: 150px; }
  #bubble { font-size: .9rem; }
  #hud { gap: 8px; }
  #play { height: 100%; }
  .booster { max-width: 140px; }
}
@media (max-width: 560px) {
  :root { --fw: .5; }
  #app { gap: 4px; padding-block: 6px 8px; }
  #side { column-gap: 6px; }
  #bubble { font-size: .66rem; padding: 6px 7px; }
  .booster .lbl { font-size: .58rem; }
  #level-label { font-size: .72rem; }
  #map .world-pill { top: 16.8%; }
}
@media (prefers-reduced-motion: reduce) {
  .gem .sp, .gem .orb, .gem .tile.baby, .gem .tile.hole, .gem.sp-H .tile, .gem.sp-V .tile, .gem.sp-W .tile, .rock .inner.dark-img, .gem.hint .inner, .panel.moves .num.low, #mascot-img, #app.shake-1, #app.shake-2, #app.shake-3 { animation: none !important; }
}

/* ---------- Levelkarte (Bildvorlage 941×1672, alle Positionen in Prozent der Karte) ---------- */
#menu { position: fixed; inset: 0; z-index: 20; overflow: hidden; background: rgba(3, 6, 24, .35); }
/* Hochkant-Handys: Die Karte füllt die Breite, oben bleibt Platz. Der wird ruhig im Himmelston der Kartenoberkante gefüllt (statt Spielhintergrund + Statusleiste durcheinander). */
/* Neu: Die Karte füllt die ganze Höhe unter der Statusleiste und wird dafür seitlich etwas beschnitten (--crop setzt das Spiel);
   Knöpfe am Rand rücken um den beschnittenen Teil nach innen. #menu #map … schlägt die normalen Regeln weiter unten. */
@media (max-aspect-ratio: 941 / 1672) {
  #menu { background: #080f33; }
  #menu #map { width: auto; height: calc(100% - env(safe-area-inset-top, 0px)); }
  #menu #map .nav.prev, #menu #map .tasks-btn, #menu #map .base-btn, #menu #map .gear { left: calc(3% + var(--crop, 0px)); }
  #menu #map .nav.next, #menu #map .friends-btn, #menu #map .clan-btn { right: calc(3% + var(--crop, 0px)); }
  #menu #map .player-name { right: calc(3% + var(--crop, 0px)); bottom: calc(2.8% + env(safe-area-inset-bottom, 0px)); }
  #menu #map .map-stars { bottom: calc(2.4% + env(safe-area-inset-bottom, 0px)); }
}
#map { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100vw, calc(100vh * 941 / 1672)); aspect-ratio: 941 / 1672; background: url(img/map-2.webp) center / 100% 100% no-repeat; container-type: inline-size; direction: ltr; }
#map > * { position: absolute; }
#map .lives, #map .gold { top: 6.4%; height: 3.1%; display: flex; align-items: center; justify-content: center; gap: .9cqw; font: 700 3.7cqw var(--font-display); color: #15307c; text-shadow: 0 .2cqw 0 #fff, 0 0 1cqw rgba(255, 255, 255, .9); white-space: nowrap; }
#map .lives { left: 20.3%; width: 17.2%; }
#map.map-alt .lives, #map.map-alt .gold { top: 7%; height: 3.2%; } /* Nutzerkarten: Leistenfelder sitzen etwas tiefer */
#map .lives .timer { font: 800 4cqw var(--font-body); color: #15307c; letter-spacing: .02em; }
#map .gold { left: 70.1%; width: 19.6%; }
#map .avatar-btn { left: 49.1%; top: 7.8%; width: 14.5cqw; height: 14.5cqw; transform: translate(-50%, -50%); background: none; border: 0; padding: 0; cursor: pointer; border-radius: 50%; }
.av-frame { display: block; position: relative; width: 100%; aspect-ratio: 1; }
.av-frame .av { position: absolute; left: 19%; top: 19%; width: 62%; height: 62%; border-radius: 12%; object-fit: cover; background: #0b1a44; }
.av-frame .fr { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 .3cqw .8cqw rgba(0, 0, 0, .45)); }
.fr-gold { background: conic-gradient(from 20deg, #ffe9a0, #d99a1c, #fff2b8, #c47d0a, #ffe9a0); box-shadow: 0 0 1.5cqw rgba(255, 210, 80, .8), 0 .4cqw 1cqw rgba(0, 0, 0, .35); }
.fr-crystal { background: linear-gradient(135deg, #7fe8ff, #b36cff 50%, #ff6ec7); box-shadow: 0 0 1.5cqw rgba(179, 108, 255, .8), 0 .4cqw 1cqw rgba(0, 0, 0, .35); }
.fr-leaf { background: conic-gradient(#3fd47a, #9af06a, #1f9f55, #9af06a, #3fd47a); box-shadow: 0 0 1.5cqw rgba(94, 227, 154, .7), 0 .4cqw 1cqw rgba(0, 0, 0, .35); }
.fr-nova { background: conic-gradient(#ff5c8a, #ffd84d, #ff5c8a, #ffd84d, #ff5c8a); box-shadow: 0 0 1.5cqw rgba(255, 120, 150, .8), 0 .4cqw 1cqw rgba(0, 0, 0, .35); }
.fr-rainbow { background: conic-gradient(#ff5c5c, #ffe45c, #5ee36b, #4fd8ff, #b76cff, #ff5c5c); box-shadow: 0 0 1.5cqw rgba(255, 255, 255, .6), 0 .4cqw 1cqw rgba(0, 0, 0, .35); }
#map .world-pill { left: 50%; top: 17.2%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; justify-content: center; box-sizing: border-box; width: 52cqw; aspect-ratio: 640 / 185; padding: 0 10cqw .4cqw; background: url(img/ui-world.webp) center / 100% 100% no-repeat; color: #fff; white-space: nowrap; filter: drop-shadow(0 .6cqw 1cqw rgba(0, 0, 0, .45)); } /* Welten-Schild (Bild ohne Text, Name und Level schreibt das Spiel) */
#map .world-pill > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
#map .world-pill .w { font: 700 3.6cqw var(--font-display); letter-spacing: .03em; text-shadow: 0 .2cqw .4cqw rgba(0, 0, 0, .6); }
#map .world-pill .r { font: 800 2.5cqw var(--font-body); color: #b9e4ff; }
#map-nodes { inset: 0; }
.node { position: absolute; transform: translate(-50%, -50%); container-type: inline-size; border-radius: 50%; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center; color: #fff; font-size: 1cqw;
  --c1: #ff6fb3; --c2: #e8197f; --c3: #a80d5c; background: radial-gradient(ellipse at 50% 28%, var(--c1), var(--c2) 72%);
  box-shadow: inset 0 -.9cqw 0 var(--c3), 0 0 0 .5cqw #fff6ea, 0 .9cqw 0 .5cqw #d2c6b4, 0 1.4cqw 2cqw rgba(0, 0, 0, .45); }
.node.purple { --c1: #cf85f4; --c2: #9d38d4; --c3: #6a1a9a; }
.node.teal { --c1: #86eee2; --c2: #22bcb0; --c3: #0f8278; }
.node.locked { --c1: #d6d6e2; --c2: #9d9db2; --c3: #6e6e84; cursor: default; }
.node .num { font: 700 46cqw/1 var(--font-display); text-shadow: 0 .06em 0 rgba(0, 0, 0, .35), 0 0 .3em rgba(255, 255, 255, .45); }
.node .num.d3 { font-size: 37cqw; }
.node .st { position: absolute; left: 50%; bottom: -36%; transform: translateX(-50%); font-size: 26cqw; line-height: 1; color: #ffd84d; letter-spacing: -.03em; text-shadow: 0 .05em 0 #8a4a00, 0 0 .3em rgba(0, 0, 0, .7); white-space: nowrap; }
.node svg { width: 44%; height: 44%; fill: #fff; opacity: .92; }
.node.ultra::after { content: 'ULTRA'; position: absolute; top: -42%; left: 50%; transform: translateX(-50%); font: 700 19cqw/1.3 var(--font-display); letter-spacing: .1em; color: #fff; background: linear-gradient(90deg, #ff5c5c, #ff8a3d); border-radius: 999px; padding: 0 .5em; box-shadow: 0 0 .5em rgba(255, 92, 92, .8); }
.node.current { animation: nodepulse 1.6s ease-in-out infinite; }
.node:not(.locked):hover { filter: brightness(1.08); }
.node:not(.locked):active { transform: translate(-50%, -50%) scale(.94); }
#map-nodes.in .node { animation: nodein .5s cubic-bezier(.2, 1.4, .4, 1) both; }
#map-nodes.in .node.current { animation: nodein .5s cubic-bezier(.2, 1.4, .4, 1) both, nodepulse 1.6s ease-in-out .6s infinite; }
#map-marker.side { translate: -50% -55%; }
#map-marker { translate: -50% -94%; filter: drop-shadow(0 .6cqw 1cqw rgba(0, 0, 0, .5)); animation: drift 2.4s ease-in-out infinite; pointer-events: none; }
#map .nav { top: 52%; width: 10cqw; height: 10cqw; transform: translateY(-50%); border-radius: 50%; border: .3cqw solid rgba(170, 225, 255, .7); background: rgba(8, 20, 60, .62); color: #fff; font: 700 7cqw/1 var(--font-display); display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(4px); box-shadow: 0 .5cqw 1.2cqw rgba(0, 0, 0, .45); padding: 0; }
#map .nav.prev { left: 3%; } #map .nav.next { right: 3%; }
#map .nav:disabled { opacity: .25; cursor: default; }
#map .map-stars { left: 50%; bottom: 2.4%; transform: translateX(-50%); font: 700 3.2cqw var(--font-display); color: #ffd84d; text-shadow: 0 .2cqw 0 #8a4a00, 0 .3cqw 1cqw rgba(0, 0, 0, .9); white-space: nowrap; }
/* Aufgaben-Knopf auf der Karte (links über dem Zahnrad) */
#map .tasks-btn { left: 3%; bottom: 11%; width: 12cqw; height: 12cqw; border-radius: 50%; border: .3cqw solid rgba(170, 225, 255, .7); background: rgba(8, 20, 60, .72); color: #fff; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(4px); box-shadow: 0 .5cqw 1.2cqw rgba(0, 0, 0, .45); padding: 0; }
#map .tasks-btn svg { width: 58%; height: 58%; fill: #ffd84d; filter: drop-shadow(0 .2cqw .3cqw rgba(0, 0, 0, .5)); }
#map .tasks-btn.locked svg { fill: #8d9ab8; }
#map .tasks-btn .badge { position: absolute; right: -.8cqw; top: -.8cqw; min-width: 4.6cqw; height: 4.6cqw; padding: 0 1cqw; border-radius: 999px; background: linear-gradient(180deg, #ff7bd1, #d63a9b); border: .4cqw solid #fff; color: #fff; font: 800 2.7cqw/3.8cqw var(--font-display); text-align: center; box-sizing: border-box; animation: pulse 1.4s ease-in-out infinite; }
#map .tasks-btn .badge[hidden] { display: none; }
.cover.tasks { padding: 2.5cqw 3.2cqw; }
.tk-days { display: flex; gap: 1.2cqw; margin-bottom: 1.6cqw; }
.tk-day { position: relative; flex: 1; border: .4cqw solid #c9d6ff; background: rgba(255, 255, 255, .6); border-radius: 2cqw; padding: 1.3cqw 0; font: 800 2.7cqw var(--font-display); color: #1c2d7a; cursor: pointer; }
.tk-day.on { background: linear-gradient(180deg, #c9f3ff, #4fd8ff); border-color: #fff; }
.tk-day:disabled { opacity: .4; cursor: default; }
.tk-day .dot { position: absolute; top: -.9cqw; right: -.9cqw; width: 2.8cqw; height: 2.8cqw; border-radius: 50%; background: #ff5bd6; border: .3cqw solid #fff; }
.tk-row { display: flex; align-items: center; gap: 2cqw; background: rgba(255, 255, 255, .66); border: .4cqw solid #c9d6ff; border-radius: 2.4cqw; padding: 1.6cqw 2cqw; margin-bottom: 1.6cqw; }
.tk-row.done { border-color: #8fd9a8; background: rgba(226, 250, 232, .8); }
.tk-ico { width: 11cqw; height: 11cqw; flex: none; display: grid; place-items: center; }
.tk-ico img, .tk-ico svg { width: 100%; height: 100%; object-fit: contain; }
.tk-txt { flex: 1; min-width: 0; text-align: start; }
.tk-txt b { display: block; font: 700 3.2cqw/1.15 var(--font-display); color: #1c2d7a; }
.tk-bar { height: 2.2cqw; border-radius: 999px; background: #dfe6ff; margin: 1cqw 0 .5cqw; overflow: hidden; }
.tk-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffb02e, #ffd84d); border-radius: 999px; }
.tk-txt small { font: 700 2.6cqw var(--font-body); color: #4a3a6a; }
.tk-claim.claimed, .tk-claim.claimed:disabled { background: #d7e3d9; box-shadow: none; color: #2f6a44; filter: none; }
.tk-info { font: 600 2.8cqw/1.4 var(--font-body); color: #4a3a6a; text-align: center; margin: .6cqw 0 1.6cqw; }
.tk-bonus { text-align: center; font: 800 3cqw/1.3 var(--font-display); color: #2a6a3a; margin: 1cqw 0; }
.tk-locked { text-align: center; font: 700 3.6cqw/1.4 var(--font-display); color: #1c2d7a; padding: 5cqw 2cqw; }
.tk-locked svg, .tk-locked img { width: 18cqw; height: 18cqw; fill: #8d9ab8; }
.tk-locked img { object-fit: contain; filter: grayscale(1); opacity: .7; }
.tip-ico.tk-tip svg { fill: #ffd84d; }
/* Freunde: Knopf rechts unten auf der Karte, Panel, Avatare an den Levelpunkten */
#map .friends-btn { right: 3%; bottom: 11%; width: 12cqw; height: 12cqw; border-radius: 50%; border: .3cqw solid rgba(170, 225, 255, .7); background: rgba(8, 20, 60, .72); display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(4px); box-shadow: 0 .5cqw 1.2cqw rgba(0, 0, 0, .45); padding: 0; }
#map .friends-btn svg { width: 64%; height: 64%; fill: #7ff4ff; filter: drop-shadow(0 .2cqw .3cqw rgba(0, 0, 0, .5)); }
.cover.friends { padding: 2.5cqw 3.2cqw; }
.cover.friends .btn { display: inline-block; width: auto; margin: 0; font-size: 3.4cqw; padding: 1.8cqw 3.6cqw; }
.fr-addrow { display: flex; gap: 1.5cqw; align-items: stretch; margin-bottom: 2cqw; }
.fr-addrow .pf-input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .08em; direction: ltr; margin: 0; }
.fr-row { display: flex; align-items: center; gap: 2cqw; background: rgba(255, 255, 255, .66); border: .4cqw solid #c9d6ff; border-radius: 2.4cqw; padding: 1.4cqw 2cqw; margin-bottom: 1.4cqw; }
.fr-av { width: 12cqw; height: 12cqw; flex: none; }
.fr-txt { flex: 1; min-width: 0; text-align: start; }
.fr-txt b { display: block; font: 700 3.4cqw/1.15 var(--font-display); color: #1c2d7a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-txt small { font: 700 2.7cqw var(--font-body); color: #4a3a6a; }
.fr-row .fr-del { flex: none; width: 7cqw; height: 7cqw; border-radius: 50%; background: rgba(28, 45, 122, .12); color: #1c2d7a; font: 800 3.4cqw/1 var(--font-display); display: grid; place-items: center; }
.fr-empty { font: 600 3cqw/1.45 var(--font-body); color: #4a3a6a; text-align: center; padding: 3cqw 1cqw; }
.node .frs { position: absolute; right: -46cqw; top: 50%; translate: 0 -50%; display: flex; pointer-events: none; }
.node .frs.left { right: auto; left: -46cqw; flex-direction: row-reverse; }
.node .frs img { width: 38cqw; height: 38cqw; border-radius: 50%; border: 2cqw solid #fff; box-shadow: 0 1.5cqw 3cqw rgba(0, 0, 0, .5); margin-left: -10cqw; background: #123; object-fit: cover; }
.node .frs.left img { margin-left: 0; margin-right: -10cqw; }
/* Basis: Knopf auf der Karte (links über den Aufgaben) */
#map .base-btn { left: 3%; bottom: 20%; width: 12cqw; height: 12cqw; border-radius: 50%; border: .3cqw solid rgba(170, 225, 255, .7); background: rgba(8, 20, 60, .72); display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(4px); box-shadow: 0 .5cqw 1.2cqw rgba(0, 0, 0, .45); padding: 0; }
#map .base-btn svg { width: 64%; height: 64%; fill: #7ff4ff; filter: drop-shadow(0 .2cqw .3cqw rgba(0, 0, 0, .5)); }
#map .base-btn.locked svg { fill: #8d9ab8; }
/* Clan (clan.js): Knopf auf der Karte, Fenster und Clan-Basis */
#map .clan-btn { right: 3%; bottom: 20%; width: 12cqw; height: 12cqw; border-radius: 50%; border: .3cqw solid rgba(170, 225, 255, .7); background: rgba(8, 20, 60, .72); display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(4px); box-shadow: 0 .5cqw 1.2cqw rgba(0, 0, 0, .45); padding: 0; }
#map .clan-btn svg { width: 62%; height: 62%; fill: #c58bff; filter: drop-shadow(0 .2cqw .3cqw rgba(0, 0, 0, .5)); }
#map .clan-btn.locked svg { fill: #8d9ab8; }
.cl-head { display: flex; align-items: center; gap: 2.4cqw; margin-bottom: 2.4cqw; text-align: start; }
.cl-head svg { width: 14cqw; height: 14cqw; flex: none; fill: #8f5cff; filter: drop-shadow(0 .3cqw .5cqw rgba(0, 0, 0, .3)); }
.cl-head b { display: block; font: 700 4.4cqw/1.15 var(--font-display); color: #1c2d7a; word-break: break-word; }
.cl-head small { font: 700 2.8cqw var(--font-body); color: #4a3a6a; }
#cl-go { display: block; margin: 0 auto 2cqw; }
.fr-addrow #cl-name { text-transform: none; letter-spacing: 0; }
.cl-badge { width: 10cqw; height: 10cqw; flex: none; display: grid; place-items: center; }
.cl-badge svg { width: 100%; height: 100%; fill: #8f5cff; }
.fr-row.me { border-color: #8f5cff; }
.fr-row .fr-del + .fr-del { margin-inline-start: -1cqw; }
.fr-row .fr-fight { flex: none; white-space: nowrap; } /* Übungskampf */
.rw-me { margin: 1cqw 0; font: 700 3.4cqw var(--font-display); color: #1c2d7a; } /* Raid-Wochenende im Clan-Fenster */
.rw-list { margin: 1.4cqw 0 2cqw; }
.rw-row { display: flex; align-items: baseline; gap: 2cqw; padding: 1.2cqw 2cqw; margin-bottom: 1cqw; border-radius: 2cqw; background: rgba(255, 255, 255, .55); color: #1c2d7a; font-size: 3.3cqw; }
.rw-row.me { background: rgba(255, 216, 77, .4); }
.rw-row b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rw-row small { opacity: .8; white-space: nowrap; }
.fr-row .fr-del.arm { background: #ff5b7a; color: #fff; }
#cl-leave { background: linear-gradient(180deg, #ff8aa0, #e0456a); color: #fff; border-color: rgba(255, 255, 255, .7); }
#base.clan { background: #0c0833 url(img/base-bg-clan.webp) center / cover no-repeat; } /* Kristall-Galaxie (auch beim Clan-Raid) */
#base-hud .bh[hidden] { display: none; }
#base.clan #bh-build { cursor: pointer; }
#bh-build { min-width: 0; overflow: hidden; }
#bh-build b { min-width: 0; max-width: 36vw; overflow: hidden; text-overflow: ellipsis; }
#base.clan #bh-build small { opacity: .8; }
.bld.ruin > img, .bld.ruin > svg { opacity: .4; filter: grayscale(.7); }
.cb-bar { position: relative; height: 24px; border-radius: 999px; background: rgba(255, 255, 255, .12); overflow: hidden; margin: 6px 0 4px; }
.cb-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #8f5cff, #d58bff); }
.cb-bar span { position: relative; display: flex; align-items: center; justify-content: center; gap: 4px; height: 100%; font: 700 .85rem var(--font-display); color: #fff; }
.bsheet .cb-note { font-size: .8rem; margin: 2px 0 8px; }
.cb-req { list-style: none; margin: 0 0 8px; padding: 0; font: 700 .9rem/1.5 var(--font-body); color: #ff9aae; }
.cb-req li.ok { color: #7dffb0; }
.bsheet .cb-forge { background: rgba(197, 139, 255, .14); border-radius: 12px; padding: 8px 10px; }
/* Basis-Bildschirm */
#base { position: fixed; inset: 0; z-index: 25; overflow: hidden; background: #080f33 url(img/base-bg.webp) center / cover no-repeat; /* Weltraum-Hintergrund, Mitte frei für die Insel */ user-select: none; -webkit-user-select: none; }
#base-view { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; }
#base-world { position: absolute; left: 0; top: 0; width: 1280px; height: 790px; transform-origin: 0 0; }
#base-ground, #base-fp { position: absolute; left: 0; top: 0; pointer-events: none; }
#base-fp { z-index: 1; }
#base .blds { position: absolute; inset: 0; z-index: 2; }
.bld { position: absolute; }
.bld svg, .bld img { width: 100%; height: 100%; display: block; overflow: visible; object-fit: contain; object-position: bottom; pointer-events: none; }
.bld.sel { filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 10px #4fd8ff); }
.bld.ghost { opacity: .78; filter: drop-shadow(0 0 8px #fff); }
.bld.building svg, .bld.building img { filter: saturate(.35) brightness(.8); }
.bld .lv { position: absolute; left: 50%; bottom: 4%; translate: -50% 0; min-width: 18px; padding: 1px 6px; border-radius: 999px; background: rgba(8, 20, 60, .82); border: 1.5px solid rgba(255, 255, 255, .7); color: #fff; font: 800 12px/16px var(--font-display); text-align: center; pointer-events: none; }
.bld .tm { position: absolute; left: 50%; top: 18%; translate: -50% 0; padding: 2px 7px; border-radius: 999px; background: rgba(8, 20, 60, .88); color: #ffd84d; font: 800 12px var(--font-display); white-space: nowrap; pointer-events: none; }
.bld .bub { position: absolute; left: 50%; top: 4%; translate: -50% -40%; width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 2px solid #ffd84d; display: grid; place-items: center; font-size: 18px; box-shadow: 0 3px 8px rgba(0, 0, 0, .4); animation: pulse 1.2s ease-in-out infinite; pointer-events: none; }
.bld .bub .ri { width: 22px; height: 22px; }
.ri { width: 1.25em; height: 1.25em; vertical-align: -.25em; display: inline-block; }
/* Obere Leiste wie bei Clash of Clans: links Zurück und Baumeister, rechts Sternenstaub, Nektar und Gold als gleich breite Spalte */
#base-hud { position: absolute; z-index: 5; top: max(10px, env(safe-area-inset-top, 0px)); left: max(8px, env(safe-area-inset-left, 0px)); right: max(8px, env(safe-area-inset-right, 0px)); display: grid; grid-template-columns: auto minmax(0, auto) 1fr auto; gap: 6px; align-items: center; pointer-events: none; }
#base-hud .bh { pointer-events: auto; box-sizing: border-box; height: 36px; display: flex; align-items: center; gap: 5px; padding: 0 11px; border-radius: 999px; background: rgba(8, 20, 60, .82); border: 1.5px solid rgba(150, 210, 255, .55); color: #fff; font: 700 14px var(--font-display); white-space: nowrap; }
#base-hud .bh small { opacity: .6; font-size: 11px; }
#base-hud .back { grid-area: 1 / 1; width: 36px; justify-content: center; padding: 0 0 3px; font-size: 26px; cursor: pointer; transform: none; }
#base-hud .back:active { transform: scale(.92); }
#bh-build { grid-area: 1 / 2; }
#bh-dust { grid-area: 1 / 4; }
#bh-nectar { grid-area: 2 / 4; }
#bh-gold { grid-area: 3 / 4; }
#base-zoom { position: absolute; z-index: 5; right: max(10px, env(safe-area-inset-right, 0px)); top: 50%; translate: 0 -50%; display: flex; flex-direction: column; gap: 8px; }
#base-zoom .bz { width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid rgba(150, 210, 255, .6); background: rgba(8, 20, 60, .8); color: #fff; font: 700 24px/1 var(--font-display); cursor: pointer; }
#base-buildbtn { position: absolute; z-index: 5; right: max(14px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); padding: 14px 26px; font-size: 1.1rem; }
#base-place { position: absolute; z-index: 6; left: 50%; translate: -50% 0; bottom: max(16px, env(safe-area-inset-bottom, 0px)); display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 999px; background: rgba(8, 20, 60, .88); border: 1.5px solid rgba(150, 210, 255, .55); color: #fff; font: 700 14px var(--font-display); white-space: nowrap; }
#base-place[hidden], #base-buildbtn[hidden] { display: none; }
/* Angriffe (battle.js) */
#base-attack { position: absolute; z-index: 5; left: max(14px, env(safe-area-inset-left, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); padding: 12px 20px; font-size: 1.05rem; display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(180deg, #ff8a5c, #e0452a); }
#base-attack svg { width: 22px; height: 22px; fill: #fff; }
#base-attack.locked { filter: grayscale(.8); opacity: .75; }
#base-attack[hidden], #battle-bar[hidden], #battle-stat[hidden] { display: none; }
#overlay.top { z-index: 31; }
#battle-fx { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; }
.bld.dead > img, .bld.dead > svg { filter: grayscale(1) brightness(.45); opacity: .55; }
.bld.dead .lv { display: none; }
.bld .hpb { position: absolute; left: 50%; top: 8%; translate: -50% 0; width: 46%; min-width: 26px; height: 6px; border-radius: 3px; background: rgba(0, 0, 0, .55); overflow: hidden; pointer-events: none; }
.bld .hpb i { display: block; height: 100%; background: linear-gradient(90deg, #ff5b7a, #ffd84d); }
#battle-stat { position: absolute; z-index: 5; left: 50%; translate: -50% 0; top: max(56px, calc(env(safe-area-inset-top, 0px) + 50px)); display: flex; gap: 12px; align-items: center; padding: 6px 14px; border-radius: 999px; background: rgba(8, 20, 60, .85); border: 1.5px solid rgba(150, 210, 255, .55); color: #fff; font: 700 15px var(--font-display); white-space: nowrap; }
#battle-stat .bs-st i { font-style: normal; color: rgba(255, 255, 255, .25); }
#battle-stat .bs-st i.on { color: #ffd84d; }
#battle-bar { position: absolute; z-index: 6; left: 50%; translate: -50% 0; bottom: max(10px, env(safe-area-inset-bottom, 0px)); width: min(96vw, 520px); display: flex; gap: 8px; align-items: center; padding: 8px; border-radius: 18px; background: rgba(8, 20, 60, .9); border: 1.5px solid rgba(150, 210, 255, .55); }
#battle-bar .bb-troops { flex: 1; display: flex; gap: 6px; overflow-x: auto; }
#battle-bar .bt-tr { min-width: 66px; flex: none; }
#battle-bar .bt-tr.on { border-color: #ffd84d; background: rgba(255, 216, 77, .18); }
#battle-bar .bb-btns { display: flex; flex-direction: column; gap: 6px; }
#battle-bar .bb-btns .btn { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.bsheet { position: absolute; z-index: 7; left: 50%; translate: -50% 0; bottom: max(10px, env(safe-area-inset-bottom, 0px)); width: min(94vw, 440px); max-height: 62vh; overflow: auto; padding: 12px 14px; border-radius: 18px; background: linear-gradient(180deg, rgba(16, 34, 96, .97), rgba(8, 16, 48, .98)); border: 2px solid var(--line); box-shadow: 0 10px 40px rgba(0, 0, 0, .6); color: #fff; }
.bsheet .bi-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.bsheet .bi-head b { font: 700 1.15rem var(--font-display); }
.bsheet .bi-head span { font: 700 .8rem var(--font-body); color: #b9e4ff; background: rgba(255, 255, 255, .1); padding: 2px 8px; border-radius: 999px; }
.bsheet .bi-x { margin-left: auto; width: 32px; height: 32px; font-size: 18px; color: #fff; }
.bsheet p { margin: 4px 0 10px; color: #c9d6ff; font: 600 .9rem/1.4 var(--font-body); }
.bi-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.bi-btns .btn { display: inline-flex; align-items: center; gap: 4px; }
.bi-btns .btn:disabled { opacity: .5; }
/* Kaserne: Truppen ausbilden */
.bt-army { font: 700 .9rem var(--font-display); color: #b9e4ff; margin: 0 0 6px; }
.bt-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.bt-tr { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; border: 1.5px solid rgba(150, 210, 255, .45); background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; font: inherit; }
.bt-tr:disabled { opacity: .45; cursor: default; }
.bt-tr:not(:disabled):active { transform: scale(.95); }
.bt-ico { font-size: 1.6rem; line-height: 1; }
.bt-ico img { display: block; width: 2.1rem; height: 2.1rem; }
#base-view.shake { animation: bv-shake .28s ease-out; } /* Gebäude zerstört */
@keyframes bv-shake { 0%, 100% { translate: 0 0; } 20% { translate: -4px 2px; } 40% { translate: 4px -2px; } 60% { translate: -3px 1px; } 80% { translate: 2px -1px; } }
.bt-tr b { font: 700 .8rem/1.15 var(--font-display); text-align: center; }
.bt-tr small { font: 600 .72rem var(--font-body); color: #c9d6ff; display: flex; align-items: center; gap: 2px; }
.bt-tr small .ri { width: 14px; height: 14px; }
.bt-tr i { position: absolute; top: -6px; right: -4px; min-width: 20px; padding: 0 5px; border-radius: 999px; background: linear-gradient(180deg, #5ee39a, #2fa86a); border: 1.5px solid #fff; font: 800 .75rem/18px var(--font-display); font-style: normal; text-align: center; }
.bt-cq { margin-inline-start: 6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(255, 91, 122, .8); color: #fff; font: 800 .8rem/1 var(--font-display); cursor: pointer; }
.bs-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.bs-row.off { opacity: .5; }
.bs-ico { width: 52px; height: 52px; flex: none; }
.bs-ico svg, .bs-ico img { width: 100%; height: 100%; object-fit: contain; overflow: visible; }
.bs-txt { flex: 1; min-width: 0; text-align: start; }
.bs-txt b { display: block; font: 700 .95rem var(--font-display); }
.bs-txt small { color: #b9e4ff; font: 600 .78rem var(--font-body); }
.bs-row .sh-buy { font-size: .85rem; padding: 6px 10px; }
#map .player-name { right: 3%; bottom: 2.8%; font: 800 2.8cqw var(--font-body); color: #fff; text-shadow: 0 .2cqw .6cqw rgba(0, 0, 0, .9); max-width: 30%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#map .gear { position: absolute; left: 3%; bottom: 2.2%; width: 10cqw; height: 10cqw; font-size: 6cqw; }

/* ---------- Einstellungs-Panels (Bildvorlagen 1024×1536, Overlays in Prozent) ---------- */
.modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(3, 6, 24, .62); backdrop-filter: blur(5px); padding: 10px; }
.pnl { position: relative; width: min(94vw, 440px, calc(92vh * 2 / 3)); aspect-ratio: 2 / 3; container-type: inline-size; background: url(img/panel-settings.webp) center / 100% 100% no-repeat; animation: born .35s cubic-bezier(.2, 1.3, .4, 1); direction: ltr; }
.pnl-sub { background-image: url(img/panel-sub.webp); }
.pnl > * { position: absolute; }
.pnl-title { margin: 0; left: 22%; width: 56%; top: 17.6%; height: 9.4%; display: flex; align-items: center; justify-content: center; text-align: center; font: 700 6.4cqw/1 var(--font-display); color: #1c2d7a; -webkit-text-stroke: 1.1cqw #fff; paint-order: stroke fill; text-shadow: 0 .5cqw 0 rgba(255, 255, 255, .8), 0 .8cqw 1.4cqw rgba(30, 60, 140, .3); letter-spacing: .01em; }
.pnl-sub .pnl-title { top: 14.6%; }
.hot { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; color: inherit; font: inherit; border-radius: 999px; -webkit-tap-highlight-color: transparent; }
.hot:focus-visible { outline: .6cqw solid #4fd8ff; }
.close, .back, .rb, .lang-btn { transform: translate(-50%, -50%); width: 12cqw; height: 12cqw; transition: transform .12s; }
.close:active, .back:active, .rb:active, .lang-btn:active { transform: translate(-50%, -50%) scale(.92); }
.pnl-main .close { left: 89.6%; top: 22.9%; }
.pnl-sub .close { left: 89.5%; top: 20.2%; }
.pnl-sub .back { left: 10.8%; top: 20.5%; }
.lang-btn { left: 10.8%; top: 22.9%; width: 11cqw; height: 11cqw; border-radius: 50%; background: radial-gradient(circle at 35% 28%, #ff8fc4, #e4187d 65%, #b80a5e); border: .5cqw solid #ffe6a8; box-shadow: 0 .5cqw 0 #8a0a4c, 0 .8cqw 1.4cqw rgba(0, 0, 0, .35), inset 0 .6cqw 1cqw rgba(255, 255, 255, .45); color: #fff; display: grid; place-items: center; }
.lang-btn span { font: 700 3.4cqw/1 var(--font-display); text-shadow: 0 .3cqw 0 #8a0a4c; }
.rb { width: 14.6cqw; height: 14.6cqw; border-radius: 50%; top: 39.3%; }
.rb1 { left: 23.8%; } .rb2 { left: 41.3%; } .rb3 { left: 59%; } .rb4 { left: 76.5%; }
.slash { display: none; position: absolute; left: 12%; right: 12%; top: 50%; height: 9%; margin-top: -4.5%; background: #e8143c; border-radius: 999px; transform: rotate(45deg); box-shadow: 0 0 0 .3cqw #fff; pointer-events: none; }
.off .slash { display: block; }
.row { left: 14.6%; width: 70.8%; top: 47.9%; height: 9.1%; }
.row-lbl { position: absolute; left: 20%; top: 50%; transform: translateY(-50%); font: 800 4cqw var(--font-body); color: #4a1a6a; }
.row:active { transform: scale(.985); }
.pill { left: 17.9%; width: 64.4%; top: 61.3%; height: 10.1%; display: grid; place-items: center; }
.pill.p-pink { top: 75.9%; height: 9.6%; }
.pnl-sub .pill { left: 18.4%; width: 63.4%; top: 69.9%; height: 9%; }
.pnl-sub .pill.p-pink { top: 80.7%; height: 9%; }
.pill span { font: 700 5cqw/1.1 var(--font-display); color: #fff; -webkit-text-stroke: .9cqw #1c2d7a; paint-order: stroke fill; text-shadow: 0 .5cqw 0 #1c2d7a, 0 .6cqw 1cqw rgba(0, 0, 0, .3); text-align: center; padding: 0 6%; }
.pill.p-pink span { -webkit-text-stroke-color: #7a0a46; text-shadow: 0 .5cqw 0 #7a0a46, 0 .6cqw 1cqw rgba(0, 0, 0, .3); }
.pill:active { transform: scale(.975); }
.sub-head { left: 20%; width: 60%; top: 28.2%; height: 5.4%; display: grid; place-items: center; font: 700 5.6cqw/1 var(--font-display); color: #5a1050; text-shadow: 0 .3cqw 0 rgba(255, 255, 255, .8); }
.pnl .lbl { left: 20%; width: 60%; height: 4%; display: grid; place-items: center; font: 800 4.1cqw/1 var(--font-body); color: #4a1a5a; }
.pnl .lbl.l1 { top: 35.4%; } .pnl .lbl.l2 { top: 52.2%; }
.slider { left: 18.3%; width: 66.5%; height: 7.36%; --v: 1; touch-action: none; cursor: pointer; }
.slider.s1 { top: 42.9%; } .slider.s2 { top: 60.2%; }
.slider .track { position: absolute; left: 0; right: 0; top: 28%; height: 44%; border-radius: 999px; background: #d7def6; box-shadow: inset 0 .3cqw .5cqw rgba(60, 80, 160, .25); overflow: hidden; }
.slider .track.pinkish { background: #f1d7e6; }
.slider .fill { height: 100%; width: calc(8.2% + var(--v) * 83.6%); background: linear-gradient(180deg, #7fd0ff, #2f93f2 60%, #1d7be0); border-radius: 999px; box-shadow: inset 0 .3cqw 0 rgba(255, 255, 255, .6); }
.slider .knob { position: absolute; top: 0; left: calc(8.2% + var(--v) * 83.6%); width: 16.6%; height: 100%; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle at 35% 28%, #8fd4ff, #2b8cf0 60%, #1364c8); border: .45cqw solid #fff; box-shadow: 0 .5cqw 0 #0d4fa8, 0 .8cqw 1.4cqw rgba(0, 0, 0, .35), inset 0 .6cqw 1cqw rgba(255, 255, 255, .5); display: grid; place-items: center; color: #fff; }
.slider .knob svg { width: 58%; height: 58%; filter: drop-shadow(0 .2cqw 0 rgba(0, 0, 0, .35)); }
.slider .knob .slash { left: 16%; right: 16%; height: 10%; margin-top: -5%; }
.slider .val { position: absolute; left: calc(8.2% + var(--v) * 83.6%); top: -34%; transform: translateX(-50%); font: 800 3.8cqw/1 var(--font-body); color: #4a1a5a; white-space: nowrap; pointer-events: none; }
.covered .cover { left: 12%; width: 76%; top: 26%; bottom: 9%; border-radius: 3cqw; background: linear-gradient(180deg, #d4e2fc, #e8e9fd 35%, #f0eefa); box-shadow: inset 0 0 0 .3cqw rgba(255, 255, 255, .5); }
.covered.prof .cover { bottom: 31.5%; }
.cover.scroll { overflow-y: auto; overscroll-behavior: contain; padding: 3.5cqw 4cqw; -webkit-overflow-scrolling: touch; }
.rules { margin: 0; padding-inline-start: 4.5cqw; color: #3a2a5a; font: 600 3.3cqw/1.45 var(--font-body); text-align: start; }
.rules li { margin: 0 0 1.8cqw; }
.cover .btn { display: block; width: 100%; margin: 2.5cqw 0 0; font-size: 3.8cqw; padding: 2.4cqw 4cqw; }
.cover .ios-hint { margin: 2.5cqw 0 0; color: #4a3a6a; font: 600 3.1cqw/1.4 var(--font-body); }
.lang-list { display: flex; flex-direction: column; gap: 2.4cqw; padding: 4cqw 5cqw; }
.lang-row { border: .5cqw solid #b7c6ff; border-radius: 999px; background: #fff; color: #1c2d7a; font: 700 4.6cqw var(--font-display); padding: 2.6cqw 4cqw; cursor: pointer; box-shadow: 0 .5cqw 0 #c7d2f5; transition: transform .1s; }
.lang-row:active { transform: translateY(.3cqw); }
.lang-row.on { background: linear-gradient(180deg, #7fd0ff, #2f93f2 60%, #1d7be0); color: #fff; border-color: #fff; box-shadow: 0 .5cqw 0 #0d4fa8, 0 .8cqw 1.4cqw rgba(29, 123, 224, .35); text-shadow: 0 .3cqw 0 rgba(0, 0, 0, .3); }
.pf-preview { display: flex; justify-content: center; margin-bottom: 1cqw; }
.pf-preview .av-frame { width: 24cqw; }
.pf-sec { font: 800 3.3cqw var(--font-body); color: #6a2a7a; text-transform: uppercase; letter-spacing: .08em; margin: 3cqw 0 1.6cqw; text-align: start; }
.chips { display: flex; flex-wrap: wrap; gap: 1.6cqw; }
.chip { border: .4cqw solid #b7c6ff; border-radius: 999px; background: #fff; color: #1c2d7a; font: 700 3.3cqw var(--font-body); padding: 1.3cqw 2.8cqw; cursor: pointer; }
.chip.on { background: #2f93f2; color: #fff; border-color: #fff; box-shadow: 0 0 0 .3cqw #2f93f2; }
.pf-input { display: block; width: 100%; border: .5cqw solid #b7c6ff; border-radius: 999px; background: #fff; color: #1c2d7a; font: 800 4.2cqw var(--font-body); padding: 2cqw 4cqw; text-align: center; outline: none; }
.pf-input:focus { border-color: #2f93f2; box-shadow: 0 0 0 .4cqw rgba(47, 147, 242, .35); }
.pf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.4cqw; }
.pf-av, .pf-fr { border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; }
.pf-av img { display: block; width: 100%; aspect-ratio: 1; border-radius: 50%; object-fit: cover; background: radial-gradient(circle at 40% 35%, #1b3a8a, #070f2c); border: .5cqw solid #fff; box-shadow: 0 .4cqw 1cqw rgba(0, 0, 0, .25); }
.pf-av.on img, .pf-fr.on .av-frame { outline: .7cqw solid #2f93f2; outline-offset: .3cqw; }
.pf-fr .av-frame { padding: 8%; }
@keyframes nodepulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.25) drop-shadow(0 0 8px rgba(255, 255, 255, .9)); } }
@keyframes nodein { from { opacity: 0; transform: translate(-50%, -50%) scale(.4); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
body.in-menu #app, body.in-menu #btn-settings { visibility: hidden; }

/* ---------- Hindernisse: Laser-Käfig und Schwarze Materie ---------- */
.gem .cage { position: absolute; inset: -7%; pointer-events: none; animation: cageglow 1.6s ease-in-out infinite; }
.gem .cage svg { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 0 4px rgba(125, 255, 106, .9)); }
.gem .tile.cage { inset: -9%; filter: drop-shadow(0 0 5px rgba(79, 216, 255, .75)) drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.gem.unlock .cage { animation: cagebreak .45s ease-in forwards; }
.gem.deny .inner { animation: shake .3s; }
.gem.eaten .inner { animation: eaten .4s ease-in forwards; }
.rock.dark { padding: calc(var(--cell) * .03); }
.rock.dark svg { filter: drop-shadow(0 0 7px rgba(154, 77, 255, .85)); animation: spin 10s linear infinite; }
.rock.dark.hit svg { animation: shake .3s; }
.rock.dark.grow .inner { animation: born .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes cageglow { 0%, 100% { opacity: .85; } 50% { opacity: 1; } }
@keyframes cagebreak { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.6) rotate(14deg); opacity: 0; } }
@keyframes eaten { to { transform: scale(.15) rotate(-30deg); opacity: 0; filter: brightness(.2); } }
/* ---------- HUD-Panels ohne eingebrannten Text, Sterne per Bildvariante ---------- */
.plbl { position: absolute; left: 0; right: 0; text-align: center; font: 700 8cqw/1 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: #bfe9ff; text-shadow: 0 0 8px rgba(79, 216, 255, .8), 0 2px 3px rgba(0, 0, 0, .8); pointer-events: none; }
.panel.moves .plbl { top: 20%; font-size: 11cqw; }
.panel.score .plbl { top: 13%; font-size: 7cqw; }
.panel.collect .plbl { top: 11%; font-size: 7cqw; }
.panel.score .art { position: absolute; inset: 0; background: url(img/panel-score-0.webp) center / 100% 100% no-repeat; pointer-events: none; }
.panel.score.s1 .art { background-image: url(img/panel-score-1.webp); }
.panel.score.s2 .art { background-image: url(img/panel-score-2.webp); }
.panel.score.s3 .art { background-image: url(img/panel-score-3.webp); }
.panel.score .num { z-index: 1; }
/* Gesperrte Booster */
.booster.locked img { filter: grayscale(1) brightness(.5); }
.booster.locked .count { display: none; }
.booster .lock { position: absolute; left: 50%; top: 36%; width: 30%; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; }
.booster:not(.locked) .lock { display: none; }
.booster .lock svg { width: 100%; height: 100%; fill: #fff; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .9)); }
.booster.locked .lbl { color: #ffd84d; }
/* Leben: Zahl im Herz, Countdown groß im Feld */
#map .heart-n { position: absolute; left: 15.8%; top: 7.95%; transform: translate(-50%, -46%); font: 700 4.8cqw/1 var(--font-display); color: #fff; -webkit-text-stroke: .9cqw #b4004e; paint-order: stroke fill; text-shadow: 0 .3cqw 0 #8a0038, 0 .4cqw 1cqw rgba(0, 0, 0, .4); pointer-events: none; }
/* ---------- Profil-Popup (Bildvorlage 1225×1284) ---------- */
.pnl-prof { aspect-ratio: 1225 / 1284; width: min(94vw, 480px, calc(88vh * 1225 / 1284)); background-image: url(img/panel-profile.webp); }
.pnl-prof .pnl-title { left: 24%; width: 52%; top: 5.2%; height: 11.4%; font-size: 5.6cqw; color: #fff; -webkit-text-stroke: .8cqw #0b3a8a; text-shadow: 0 .4cqw 0 #0b3a8a, 0 0 1.6cqw rgba(79, 216, 255, .8); }
.pnl-prof .close { left: 89.4%; top: 11.6%; width: 10cqw; height: 10cqw; }
.pnl-prof .pf-preview { left: 50%; top: 23.4%; width: 14cqw; transform: translate(-50%, -50%); margin: 0; display: block; }
.pnl-prof .pf-preview .av-frame { width: 100%; }
.pnl-prof .chips { left: 8%; width: 84%; top: 30.3%; height: 5%; display: flex; justify-content: center; align-items: center; flex-wrap: nowrap; gap: 1cqw; }
.pnl-prof .chip { font-size: 2.5cqw; padding: .5cqw 1.6cqw; background: rgba(8, 20, 60, .78); color: #cfe9ff; border-color: rgba(120, 200, 255, .6); white-space: nowrap; }
.pnl-prof .chip.on { background: #2f93f2; color: #fff; border-color: #fff; box-shadow: 0 0 .8cqw #4fd8ff; }
.pnl-prof .pf-input { left: 15%; width: 68%; top: 37.4%; height: 6.8%; background: transparent; border: 0; border-radius: 999px; color: #fff; font: 800 4.2cqw var(--font-body); text-align: center; padding: 0 2cqw; display: block; outline: none; }
.pnl-prof .pf-input::placeholder { color: rgba(200, 225, 255, .55); }
.pnl-prof .pf-input:focus { box-shadow: 0 0 0 .4cqw rgba(79, 216, 255, .5); }
.pnl-prof .pf-grid { left: 9%; width: 82%; top: 49.4%; height: 9.1%; display: grid; grid-template-columns: repeat(8, 1fr); gap: .4cqw; }
.pnl-prof .pf-grid.frames { top: 64%; }
.pnl-prof .pf-av, .pnl-prof .pf-fr { border-radius: 1.2cqw; padding: 7%; display: grid; place-items: center; transition: box-shadow .15s, transform .12s; }
.pnl-prof .pf-av img, .pnl-prof .pf-fr img { width: 100%; aspect-ratio: 1; display: block; }
.pnl-prof .pf-av img { border-radius: .9cqw; object-fit: cover; border: 0; box-shadow: none; }
.pnl-prof .pf-av.on, .pnl-prof .pf-fr.on { box-shadow: 0 0 0 .45cqw #4fd8ff, 0 0 1.6cqw #4fd8ff; outline: none; transform: scale(1.06); }
.pnl-prof .pf-save { left: 26.4%; width: 47.3%; top: 77.3%; height: 9.7%; }
/* ---------- Käfigbilder je Sorte, Alien-Baby ---------- */
.gem .tile.cage.c0 { background-image: url(img/cage0.webp); } .gem .tile.cage.c1 { background-image: url(img/cage1.webp); } .gem .tile.cage.c2 { background-image: url(img/cage2.webp); }
.gem .tile.cage.c3 { background-image: url(img/cage3.webp); } .gem .tile.cage.c4 { background-image: url(img/cage4.webp); } .gem .tile.cage.c5 { background-image: url(img/cage5.webp); }
.gem.unlock .tile.cage { animation: cagebreak .45s ease-in forwards; }
.gem .tile.baby { inset: -5%; background-image: url(img/baby.webp); filter: drop-shadow(0 0 8px rgba(190, 255, 140, .85)) drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); animation: drift 2.2s ease-in-out infinite; }
.goal-item .ico.baby { background-image: url(img/baby.webp); }
/* ---------- Schwarzes Loch und Schwarze Materie als Bilder ---------- */
.gem .tile.hole { inset: -12%; background-image: url(img/hole.webp); animation: spin 7s linear infinite; filter: drop-shadow(0 0 8px rgba(183, 108, 255, .9)); }
.rock .inner.dark-img { background: url(img/dark.webp) center / 108% no-repeat; filter: drop-shadow(0 0 7px rgba(154, 77, 255, .85)); animation: darkpulse 2.6s ease-in-out infinite; }
@keyframes darkpulse { 0%, 100% { transform: scale(.96) rotate(-3deg); } 50% { transform: scale(1.05) rotate(3deg); } }
/* ---------- Weiterspielen-Popup (keine Züge mehr): 5 Züge für 10 Gold ---------- */
.pnl-moves { aspect-ratio: 2 / 3; width: min(94vw, 420px, calc(92vh * 2 / 3)); background-image: url(img/panel-moves-out.webp); }
.pnl-moves .mp-title { left: 12%; width: 76%; top: 25.7%; height: 7.5%; display: flex; align-items: center; justify-content: center; text-align: center; font: 700 4.3cqw/1.1 var(--font-display); font-style: italic; color: #e8fbff; text-shadow: 0 0 1.2cqw rgba(79, 216, 255, .9), 0 .3cqw 0 #0b3a8a; padding: 0 2cqw; }
.pnl-moves .mp-gold { left: 18.2%; width: 16%; top: 42.3%; height: 4.3%; display: flex; align-items: center; justify-content: center; font: 800 3.6cqw/1 var(--font-body); color: #1c2d7a; }
.pnl-moves .mp-head { left: 15%; width: 70%; top: 48.3%; height: 5%; display: grid; place-items: center; font: 700 5.4cqw/1 var(--font-display); color: #1c2d7a; text-shadow: 0 .3cqw 0 rgba(255, 255, 255, .8); }
.pnl-moves .close { left: 91.3%; top: 41%; width: 10cqw; height: 10cqw; }
.pnl-moves .mp-buy { left: 18.5%; width: 63.5%; top: 74.9%; height: 9.1%; display: block; transition: transform .12s, filter .2s; }
.pnl-moves .mp-buy span { position: absolute; left: 5%; width: 55%; top: 50%; transform: translateY(-50%); text-align: center; font: 700 4.3cqw/1.1 var(--font-display); font-style: italic; color: #fff; -webkit-text-stroke: .8cqw #0f5a1a; paint-order: stroke fill; text-shadow: 0 .4cqw 0 #0f5a1a; }
.pnl-moves .mp-buy.poor { filter: grayscale(.8) brightness(.7); }
.pnl-moves .mp-buy:active { transform: scale(.98); }

/* ---------- Cloud-Speicher (Sync-Panel) ---------- */
.sy-status { margin: 0 0 1.5cqw; font: 700 3.2cqw/1.35 var(--font-body); color: #1f6b3a; text-align: center; }
.sy-status.bad { color: #a0243a; }
.sy-code { font: 800 5.4cqw/1.2 ui-monospace, Consolas, 'Courier New', monospace; letter-spacing: .08em; text-align: center; color: #1c2d7a; background: #fff; border: .5cqw solid #b7c6ff; border-radius: 2cqw; padding: 2cqw; margin: 0 0 2cqw; user-select: text; -webkit-user-select: text; direction: ltr; }
.sy-row { display: flex; gap: 2cqw; justify-content: center; margin-bottom: 2cqw; }
.cover.sync .btn { display: inline-block; width: auto; margin: 0; font-size: 3.4cqw; padding: 1.8cqw 3.6cqw; }
.cover.sync #sy-link { display: block; width: 100%; margin-top: 2cqw; }
.sy-info { font: 600 3cqw/1.45 var(--font-body); color: #4a3a6a; margin: 0 0 1cqw; }
.cover.sync .pf-input { text-transform: uppercase; letter-spacing: .08em; direction: ltr; }
.cover.sync .btn:disabled, .cover.sync .pf-input:disabled { opacity: .45; cursor: default; }

/* ---------- Shop ---------- */
.gold-ico { display: inline-block; width: 1.3em; height: 1.06em; vertical-align: -.16em; background: url(img/gold.webp) center / contain no-repeat; } /* Goldbarren (Nutzerbild) */
#ov-gold::before { content: ''; display: inline-block; width: 1.5em; height: 1.22em; vertical-align: -.3em; margin-right: .25em; background: url(img/gold.webp) center / contain no-repeat; }
#map .gold-bar { position: absolute; left: 59.4%; top: 4.85%; width: 14%; aspect-ratio: 200 / 163; background: url(img/gold.webp) center / contain no-repeat; cursor: pointer; filter: drop-shadow(0 .3cqw .6cqw rgba(0, 0, 0, .45)); }
.cover.shop { padding: 2.5cqw 3.2cqw; }
.sh-gold { display: flex; justify-content: center; align-items: center; gap: 1.4cqw; font: 800 4.8cqw var(--font-display); color: #1c2d7a; margin: 0 0 2cqw; }
.sh-item { display: flex; align-items: center; gap: 2.2cqw; background: rgba(255, 255, 255, .66); border: .4cqw solid #c9d6ff; border-radius: 2.4cqw; padding: 1.6cqw 2cqw; margin-bottom: 1.6cqw; }
.sh-item.off { opacity: .55; }
.sh-ico { width: 12.5cqw; height: 12.5cqw; flex: none; display: grid; place-items: center; }
.sh-ico img, .sh-ico svg { width: 100%; height: 100%; object-fit: contain; display: block; }
.sh-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2cqw; text-align: start; }
.sh-txt b { font: 700 3.7cqw/1.15 var(--font-display); color: #1c2d7a; }
.sh-txt small { font: 600 2.8cqw/1.3 var(--font-body); color: #4a3a6a; }
.sh-txt em { font: 800 2.7cqw var(--font-body); color: #2a6a3a; font-style: normal; }
.sh-buy { flex: none; display: inline-flex; align-items: center; gap: .7cqw; font: 800 3.7cqw var(--font-display); color: #3a2a00; background: linear-gradient(180deg, #ffe08a, #f7c948 60%, #d9a31c); border: .4cqw solid #fff; border-radius: 999px; padding: 1.5cqw 2.4cqw; cursor: pointer; box-shadow: 0 .5cqw 0 #a67a0a, 0 .6cqw 1cqw rgba(0, 0, 0, .25); transition: transform .1s; }
.sh-buy:active { transform: translateY(.3cqw); }
.sh-buy:disabled { filter: grayscale(1); cursor: default; }
#map .gold { cursor: pointer; }
#mp-gold { cursor: pointer; }
/* Konto (im Cloud-Panel) */
.ac-box { display: flex; align-items: center; justify-content: center; gap: 2cqw; margin-bottom: 1.5cqw; }
.ac-photo { width: 9cqw; height: 9cqw; border-radius: 50%; border: .5cqw solid #fff; box-shadow: 0 .4cqw 1cqw rgba(0, 0, 0, .25); flex: none; }
.ac-status { margin: 0; font: 700 3.1cqw/1.35 var(--font-body); color: #1c2d7a; text-align: center; }
.ac-google { background: #fff; color: #1c2d7a; box-shadow: 0 .5cqw 0 #b7c6ff, 0 .6cqw 1cqw rgba(0, 0, 0, .2); }
.ac-google::before { content: 'G'; display: inline-block; margin-inline-end: 1.2cqw; font: 800 1.15em var(--font-display); color: #4285f4; }
.cover.sync .btn.ghost { background: rgba(255, 255, 255, .55); color: #1c2d7a; box-shadow: none; border: .4cqw solid #b7c6ff; }
/* Pakete für echtes Geld */
.sh-packs { display: grid; grid-template-columns: 1fr 1fr; gap: 2cqw; margin-bottom: 1cqw; }
.sh-pack { position: relative; display: flex; flex-direction: column; align-items: center; gap: .8cqw; background: rgba(255, 255, 255, .7); border: .4cqw solid #c9d6ff; border-radius: 2.6cqw; padding: 2.2cqw 1.6cqw 1.8cqw; }
.sh-pack img { width: 62%; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 .6cqw .8cqw rgba(0, 0, 0, .3)); }
.sh-pack b { font: 800 3.6cqw/1.1 var(--font-display); color: #1c2d7a; text-align: center; }
.sh-pack small { font: 600 2.5cqw/1.25 var(--font-body); color: #4a3a6a; text-align: center; min-height: 2.5em; }
.sh-pack .sh-buy { padding: 1.4cqw 3cqw; font-size: 3.4cqw; }
.sh-pack .badge { position: absolute; top: -1.6cqw; right: -1cqw; background: linear-gradient(180deg, #ff7bd1, #d63a9b); color: #fff; font: 800 2.4cqw var(--font-display); padding: .7cqw 1.8cqw; border-radius: 999px; border: .4cqw solid #fff; transform: rotate(6deg); box-shadow: 0 .4cqw .8cqw rgba(0, 0, 0, .25); }
/* Rechtliches (deutscher Text, deshalb immer links-nach-rechts; Mindestgröße für lange Absätze) */
.cover.legal { text-align: start; color: #3a2a5a; font: 600 2.9cqw/1.5 var(--font-body); font-size: max(3.3cqw, 12px); direction: ltr; }
.cover.legal h3 { font: 800 3.8cqw var(--font-display); font-size: max(4cqw, 14px); color: #1c2d7a; margin: 2cqw 0 1cqw; }
html[dir=rtl] .cover { direction: rtl; } /* Arabisch: Panel-Inhalte rechts-nach-links, die Bildknöpfe bleiben absolut positioniert */
.cover.legal p { margin: 0 0 1.6cqw; }
.cover .btn.small { font-size: 3.2cqw; padding: 1.8cqw 3cqw; }
/* Startbooster im Level-Start-Fenster */
/* Level-Start (Nutzerbild): Titel, Zielzeile, drei Startbooster-Slots, Start-Knopf */
.pnl-start { aspect-ratio: 1408 / 1117; width: min(94vw, 440px, calc(90vh * 1408 / 1117)); background-image: url(img/panel-start.webp); }
.pnl-start .sp-title { left: 19%; width: 62%; top: 11.4%; height: 18.9%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #1c2d7a; text-shadow: 0 .3cqw 0 rgba(255, 255, 255, .85); }
.pnl-start .sp-title b { font: 700 8cqw/1.05 var(--font-display); }
.pnl-start .sp-title span { font: 600 3.6cqw/1.2 var(--font-body); opacity: .85; }
.pnl-start .sp-goal { left: 21%; width: 58%; top: 36.6%; height: 8%; display: flex; align-items: center; justify-content: center; text-align: center; font: 600 3.2cqw/1.1 var(--font-body); color: #1c2d7a; padding: 0 1cqw; overflow: hidden; } /* Schriftgröße wird per fitText() an lange Zieltexte angepasst */
.pnl-start .sp-lbl { left: 20%; width: 60%; top: 45.6%; height: 5.5%; display: grid; place-items: center; font: 700 3.2cqw var(--font-display); letter-spacing: .1em; text-transform: uppercase; color: #3c4f9c; }
.pnl-start .sp-slots { inset: 0; pointer-events: none; }
.pnl-start .sb { position: absolute; pointer-events: auto; top: 52.1%; width: 13.3%; height: 15.8%; border: 0; border-radius: 2.2cqw; background: transparent; padding: 2.6cqw; cursor: pointer; color: #fff; transition: transform .12s, box-shadow .15s; -webkit-tap-highlight-color: transparent; }
.pnl-start .sb:nth-child(1) { left: 26.7%; } .pnl-start .sb:nth-child(2) { left: 43.3%; } .pnl-start .sb:nth-child(3) { left: 59.9%; }
.pnl-start .sb svg, .pnl-start .sb img { width: 100%; height: 100%; display: block; object-fit: contain; filter: drop-shadow(0 .4cqw .6cqw rgba(0, 0, 0, .4)); }
.pnl-start .sb img { transform: scale(1.55); } /* Bildsymbole (Komet, +5) dürfen über den Slot hinausragen, sonst wirken sie winzig */
.pnl-start .sb .cnt { z-index: 1; }
/* gesperrter Startbooster: graues Symbol, Schloss, "Ab Level N" unter dem Feld */
.pnl-start .sb.locked { cursor: default; }
.pnl-start .sb.locked > img, .pnl-start .sb.locked > svg { filter: grayscale(1) brightness(.45) opacity(.75); transform: scale(1.15); }
.pnl-start .sb .lock { position: absolute; left: 50%; top: 50%; width: 44%; height: 44%; transform: translate(-50%, -50%); color: #fff; fill: #fff; filter: drop-shadow(0 .3cqw .6cqw rgba(0, 0, 0, .7)); }
.pnl-start .sb .lock svg { width: 100%; height: 100%; display: block; filter: none; }
.pnl-start .sb .lvl { position: absolute; left: -12%; right: -12%; top: 104%; font: 700 2.2cqw/1 var(--font-display); color: #ffd84d; text-align: center; text-shadow: 0 .2cqw 0 #5a3a00, 0 0 .8cqw rgba(0, 0, 0, .6); white-space: nowrap; }
.pnl-start .sb .cnt { position: absolute; right: -1.6cqw; top: -1.6cqw; min-width: 5.4cqw; height: 5.4cqw; padding: 0 1.4cqw; border-radius: 999px; background: linear-gradient(180deg, #c27dff, #7a3fd6); border: .5cqw solid #fff; color: #fff; font: 700 3cqw/4.4cqw var(--font-display); box-sizing: border-box; text-align: center; }
.pnl-start .sb.on { box-shadow: 0 0 0 .7cqw #4fd8ff, 0 0 2.5cqw rgba(79, 216, 255, .9); transform: scale(1.06); }
.pnl-start .sb.none { opacity: .7; }
.pnl-start .sb.none .cnt { background: linear-gradient(180deg, #ffe08a, #d9a31c); color: #3a2a00; }
.pnl-start .sp-go { left: 32.1%; width: 35.6%; top: 74.2%; height: 11.1%; display: block; transition: transform .12s; }
.pnl-start .sp-go span, .pnl-win .hot span { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font: 700 4.6cqw/1.1 var(--font-display); color: #fff; -webkit-text-stroke: .8cqw #0b4f8a; paint-order: stroke fill; text-shadow: 0 .4cqw 0 #0b4f8a; }
.pnl-start .sp-go:active, .pnl-win .hot:active { transform: scale(.97); }
/* Gewinnfenster: Bildvariante je Sternezahl, Titel, Punkte, Gold, zwei Knöpfe */
.pnl-win { aspect-ratio: 1448 / 1086; width: min(94vw, 460px, calc(90vh * 1448 / 1086)); background-image: url(img/panel-win-3.webp); }
.pnl-win.s1 { background-image: url(img/panel-win-1.webp); } .pnl-win.s2 { background-image: url(img/panel-win-2.webp); }
.pnl-win .wp-title { left: 19%; width: 62%; top: 10.9%; height: 17%; display: grid; place-items: center; text-align: center; font: 700 8.4cqw/1 var(--font-display); color: #1c2d7a; text-shadow: 0 .3cqw 0 rgba(255, 255, 255, .85); white-space: nowrap; }
.pnl-start .sp-go span, .pnl-win .hot span { white-space: nowrap; }
.pnl-win .wp-sub { left: 15%; width: 70%; top: 29%; height: 6%; display: grid; place-items: center; font: 600 3.5cqw var(--font-body); color: #3c4f9c; }
.pnl-win .wp-score { left: 15%; width: 70%; top: 55%; height: 8%; display: grid; place-items: center; font: 800 5.6cqw var(--font-display); color: #1c2d7a; font-variant-numeric: tabular-nums; }
.pnl-win .wp-gold { left: 15%; width: 70%; top: 63%; height: 7%; display: flex; align-items: center; justify-content: center; gap: 1.2cqw; font: 800 4.6cqw var(--font-body); color: #b8730a; }
.pnl-win .wp-gold::before { content: ''; width: 6.5cqw; height: 5.3cqw; background: url(img/gold.webp) center / contain no-repeat; }
.pnl-win .wp-gold:empty { display: none; }
.pnl-win .wp-next { left: 15%; width: 31.6%; top: 73.3%; height: 13.2%; display: block; transition: transform .12s; }
.pnl-win .wp-map { left: 51.6%; width: 33.6%; top: 74%; height: 12.2%; display: block; transition: transform .12s; }
.pnl-win .wp-map span { -webkit-text-stroke-color: #0a1f5c; text-shadow: 0 .4cqw 0 #0a1f5c; }
.pnl-win .hot[hidden] { display: none; }
#shop-panel { z-index: 31; } /* liegt auch über dem Weiterspielen-Fenster */
#map-nodes { pointer-events: none; } .node { pointer-events: auto; } /* Leiste darüber (Gold, Avatar) bleibt antippbar */

/* ---------- Handy: kleinerer Rahmen und kompaktere Leiste, damit das Spielfeld groß bleibt ---------- */
@media (max-width: 560px) {
  #app { gap: 3px; padding-top: max(4px, env(safe-area-inset-top, 0px)); padding-bottom: max(6px, env(safe-area-inset-bottom, 0px)); padding-left: max(6px, env(safe-area-inset-left, 0px)); padding-right: max(6px, env(safe-area-inset-right, 0px)); }
  #side { column-gap: 6px; grid-template-columns: 36% 1fr; }
  #logo { max-width: 150px; }
  #mascot-img { width: 40%; }
  #bubble { font-size: .62rem; padding: 5px 7px; }
  #hud { gap: 4px; }
  .panel.collect { aspect-ratio: 2.45; }
  #level-label { font-size: .64rem; }
  #boosters { gap: 3%; padding-top: 0; }
  .booster { max-width: 82px; }
  .booster .lbl { font-size: .5rem; }
  .booster .count { font-size: .65rem; }
  .gear { width: 38px; height: 38px; font-size: 1.2rem; left: max(6px, env(safe-area-inset-left, 0px)); bottom: max(6px, env(safe-area-inset-bottom, 0px)); } /* kein Überlappen mit dem ersten Booster auf schmalen Handys */
}
/* ---------- "Neu!"-Hinweise ---------- */
#ov-icon { display: flex; justify-content: center; margin: 2px 0 4px; }
.tip-ico { display: block; width: 76px; height: 76px; background: center / contain no-repeat; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5)); }
.tip-ico svg { width: 100%; height: 100%; display: block; }
/* Freischalt-Fenster: Band oben, großes Bild mit drehendem Strahlenkranz, darunter "Wofür?" und "So geht's" */
#unlock { position: fixed; inset: 0; z-index: 30; display: flex; padding: 30px 16px 16px; overflow-y: auto; background: rgba(3, 6, 24, .7); backdrop-filter: blur(5px); }
#unlock .panel-box { margin: auto; padding-top: 30px; }
#unlock .ul-ribbon { position: absolute; left: 50%; top: 0; translate: -50% -50%; padding: 7px 22px; border-radius: 999px; background: linear-gradient(180deg, #ffe98a, var(--accent-2) 55%, #e8a400); color: #4a2600; font: 800 1.15rem var(--font-display); white-space: nowrap; box-shadow: 0 4px 0 #a66a00, 0 0 18px rgba(255, 216, 77, .6); }
#unlock .ul-art { position: relative; width: 132px; height: 132px; margin: 0 auto 2px; }
#unlock .ul-art::before { content: ''; position: absolute; inset: -20px; border-radius: 50%; background: repeating-conic-gradient(rgba(255, 216, 77, .3) 0 12deg, transparent 12deg 30deg); -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%); animation: spin 14s linear infinite; }
#ul-img { position: relative; width: 100%; height: 100%; animation: born .5s cubic-bezier(.2, 1.4, .4, 1) both; }
#ul-img img, #ul-img svg { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .55)); }
#ul-img svg { box-sizing: border-box; padding: 16px; fill: var(--accent-2); fill-rule: evenodd; } /* evenodd: Haken im Aufgaben-Symbol bleiben sichtbar */
#ul-level { margin: 0; color: var(--accent-2); font: 700 .95rem var(--font-display); }
#ul-name { font-size: 1.5rem; }
#unlock .ul-sec { margin-top: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); text-align: start; }
#unlock .ul-sec b { display: block; color: var(--accent); font: 700 .95rem var(--font-display); }
#unlock .ul-sec p { margin: 2px 0 0; color: var(--fg); }
#ul-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
#ul-chips:empty { display: none; }
#ul-chips span { padding: 4px 12px; border-radius: 999px; background: rgba(8, 20, 60, .82); border: 1.5px solid rgba(255, 216, 77, .55); color: #fff; font: 700 .95rem var(--font-display); }
.tip-ico.neb { border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ffd0f0, var(--nebula) 60%, #5a2a9a); box-shadow: 0 0 16px rgba(200, 107, 255, .9); }
