:root {
  --bg: #000;
  --bg-2: #111;
  --panel: rgba(24, 24, 24, 0.94);
  --panel-solid: #181818;
  --line: rgba(255, 255, 255, 0.14);
  --text: #f5f5f5;
  --muted: #b8b8b8;
  --accent: #a88cff;
  --neon-pink: #ff4fd8;
  --neon-cyan: #4ff0ff;
  --neon-yellow: #ffe14f;
  --red: #ff4d6d;
  --green: #3ddc97;
  --blue: #4da3ff;
  --gold: #ffd166;
  --radius: 14px;
  --font: system-ui, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: #000;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
#view { position: relative; z-index: 1; }
a { color: inherit; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 0.9em; }
.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Animierter Neon-Hintergrund ---------- */
.bg-fx { display: none; }
.bg-fx .blob { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(80px); opacity: 0.45; mix-blend-mode: screen; }
.bg-fx .b1 { background: radial-gradient(circle, #ff4fd8, transparent 65%); left: -15vmax; top: -20vmax; animation: drift1 22s ease-in-out infinite alternate; }
.bg-fx .b2 { background: radial-gradient(circle, #4ff0ff, transparent 65%); right: -20vmax; bottom: -25vmax; animation: drift2 26s ease-in-out infinite alternate; }
.bg-fx .b3 { background: radial-gradient(circle, #ffe14f, transparent 65%); left: 30vw; top: 40vh; width: 40vmax; height: 40vmax; opacity: 0.22; animation: drift3 30s ease-in-out infinite alternate; }
.bg-fx .grid {
  position: absolute; inset: -50%;
  background-image: linear-gradient(rgba(180, 160, 255, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(180, 160, 255, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(600px) rotateX(55deg) translateY(10%);
  animation: grid-move 6s linear infinite;
  mask-image: linear-gradient(to bottom, transparent 30%, black 75%);
}
@keyframes drift1 { to { transform: translate(25vw, 20vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-25vw, -15vh) scale(1.2); } }
@keyframes drift3 { to { transform: translate(-20vw, -25vh) scale(0.85); } }
@keyframes grid-move { to { background-position: 0 48px; } }
.fx-layer { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 60; pointer-events: none; }

/* ---------- Kopfzeile ---------- */
.topbar {
  display: flex; align-items: center; gap: 24px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(255, 79, 216, 0.25), 0 6px 30px rgba(79, 240, 255, 0.08);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.04em; text-decoration: none; font-size: 1.05rem; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 6px;
  background: conic-gradient(from 200deg, var(--red), var(--gold), var(--green), var(--blue), var(--accent), var(--red));
  box-shadow: 0 0 14px rgba(139, 123, 255, 0.6);
}
.tabs { display: flex; gap: 4px; }
.tabs a {
  text-decoration: none; padding: 7px 14px; border-radius: 999px;
  color: var(--muted); font-weight: 500; transition: background 0.2s, color 0.2s;
}
.tabs a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.tabs a[aria-current] { color: var(--text); background: rgba(139, 123, 255, 0.22); box-shadow: inset 0 0 0 1px rgba(139, 123, 255, 0.5); }

.view { flex: 1; display: flex; flex-direction: column; min-height: 0; outline: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05);
  color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform 0.12s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, #7b6bff, #4da3ff); border-color: transparent; box-shadow: 0 6px 24px rgba(123, 107, 255, 0.35); }
.btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, #8d7fff, #63b0ff); box-shadow: 0 8px 30px rgba(123, 107, 255, 0.5); }
.btn-sm { padding: 6px 11px; font-size: 0.85rem; border-radius: 8px; }
.btn small { font-weight: 400; opacity: 0.8; }
.link { background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; padding: 2px 0; text-align: left; }
.link:hover { color: var(--gold); }

/* ---------- Menü ---------- */
.menu { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 36px; padding: 40px 16px; }
.menu-hero { text-align: center; }
.menu-title {
  font-size: clamp(3rem, 8vw, 5.5rem); margin: 10px 0 4px; letter-spacing: 0.06em; font-weight: 800;
  background: linear-gradient(90deg, #ff7a8f, #ffd166, #6ff0b4, #73b8ff, #b59bff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px rgba(139, 123, 255, 0.35));
}
.menu-sub { color: var(--muted); font-size: 1.15rem; margin: 0; }
.menu-actions { display: flex; flex-direction: column; gap: 12px; min-width: 280px; }

.prism-logo { position: relative; width: 220px; height: 110px; margin: 0 auto; }
.prism-logo .tri {
  position: absolute; left: 50%; top: 10px; width: 80px; height: 80px; transform: translateX(-50%);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: linear-gradient(160deg, rgba(255,255,255,0.35), rgba(255,255,255,0.06));
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.5);
}
.prism-logo .ray { position: absolute; height: 4px; border-radius: 4px; transform-origin: left center; }
.prism-logo .ray-in { left: 0; top: 58px; width: 92px; background: #fff; box-shadow: 0 0 12px #fff; }
.prism-logo .ray-r, .prism-logo .ray-g, .prism-logo .ray-b { left: 128px; top: 60px; width: 92px; animation: ray-pulse 2.6s ease-in-out infinite; }
.prism-logo .ray-r { background: var(--red); box-shadow: 0 0 12px var(--red); transform: rotate(-14deg); }
.prism-logo .ray-g { background: var(--green); box-shadow: 0 0 12px var(--green); animation-delay: 0.2s; }
.prism-logo .ray-b { background: var(--blue); box-shadow: 0 0 12px var(--blue); transform: rotate(14deg); animation-delay: 0.4s; }
@keyframes ray-pulse { 50% { opacity: 0.55; } }

.menu-progress { text-align: center; margin: 0; font-size: 0.9rem; }
/* Level-Auswahl */
.level-select { width: min(960px, 100%); }
.level-select h2 { text-align: center; margin: 0 0 12px; }
.level-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.level-tile {
  position: relative; display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--text);
  background: rgba(40, 24, 110, 0.6); border: 1px solid rgba(160, 123, 255, 0.35); transition: transform 0.15s, box-shadow 0.15s;
}
a.level-tile:hover, a.level-tile:focus-visible { transform: translateY(-2px); box-shadow: 0 0 18px rgba(255, 79, 216, 0.45); border-color: var(--neon-pink); }
.level-tile.next { border-color: var(--neon-cyan); box-shadow: 0 0 14px rgba(79, 240, 255, 0.35); }
.level-tile.locked { opacity: 0.45; }
.lt-num { font-size: 0.75rem; color: var(--muted); font-weight: 700; }
.lt-name { font-weight: 700; }
.lt-meta { font-size: 0.75rem; color: var(--muted); }
.lt-stars b { color: rgba(255, 255, 255, 0.18); font-size: 0.95rem; }
.lt-stars b.on { color: var(--neon-yellow); text-shadow: 0 0 6px rgba(255, 209, 102, 0.7); }
.lt-lock { position: absolute; top: 8px; right: 10px; font-size: 0.85rem; }
@media (prefers-reduced-motion: reduce) { .level-tile { transition: none; } }
.mode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 300px)); gap: 14px; justify-content: center; width: 100%; }
.mode-card {
  display: grid; gap: 4px; padding: 18px 20px; border-radius: 16px; text-decoration: none;
  background: var(--panel); border: 1px solid var(--line);
  transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s;
}
.mode-card:hover, .mode-card:focus-visible { transform: translateY(-2px); border-color: rgba(139, 123, 255, 0.6); box-shadow: 0 10px 30px rgba(123, 107, 255, 0.25); }
.mode-main { background: linear-gradient(150deg, rgba(123, 107, 255, 0.35), rgba(77, 163, 255, 0.18)); border-color: rgba(139, 123, 255, 0.5); }
.mode-icon { font-size: 1.6rem; color: var(--gold); }
.mode-name { font-size: 1.2rem; font-weight: 700; }
.mode-desc { color: var(--muted); font-size: 0.9rem; }
.mode-meta { font-size: 0.8rem; color: #cfd6ff; margin-top: 4px; }

/* ---------- Spiel ---------- */
.view-run .game, .view-play .game { background: #000; }
.game { flex: 1; display: flex; flex-direction: column; padding: 14px 20px 12px; gap: 10px; min-height: 0; }
.game-hud { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hud-left { display: flex; align-items: center; gap: 14px; }
.level-name { margin: 0; font-size: 1.35rem; }
.hud-stats { display: flex; gap: 10px; }
.stat {
  display: grid; justify-items: center; min-width: 78px; padding: 6px 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.stat span { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.stat b { font-size: 1.35rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat small { font-size: 0.7rem; color: var(--muted); }
.stat.over-par b { color: #ffb86b; }
.hud-actions { display: flex; gap: 8px; }
.board-wrap { position: relative; flex: 1; min-height: 300px; }
#board { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: manipulation; cursor: pointer; border-radius: var(--radius); }
#board:focus-visible { outline: 2px solid rgba(255, 209, 102, 0.5); }
.hint { margin: 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.92rem; }
.hint-text { color: var(--text); }
.keys { font-size: 0.82rem; }
.legend-line { margin: 0; }
.sym-r { color: var(--red); } .sym-g { color: var(--green); } .sym-b { color: var(--blue); }

.win { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10, 12, 22, 0.55); backdrop-filter: blur(3px); animation: fade-in 0.3s ease-out; }
.win-card {
  text-align: center; padding: 26px 34px; border-radius: 18px; min-width: 300px;
  background: linear-gradient(160deg, rgba(40, 36, 90, 0.96), rgba(18, 22, 46, 0.96));
  border: 1px solid rgba(139, 123, 255, 0.5); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 60px rgba(139, 123, 255, 0.25);
  animation: pop-in 0.35s cubic-bezier(.2, 1.4, .4, 1);
}
.win-card h2 { margin: 6px 0 4px; font-size: 1.8rem; }
.win-card p { margin: 4px 0; }
.win-stars { font-size: 2.4rem; letter-spacing: 6px; }
.win-stars span { color: rgba(255, 255, 255, 0.15); display: inline-block; }
.win-stars span.on { color: var(--gold); text-shadow: 0 0 18px rgba(255, 209, 102, 0.7); animation: star-pop 0.5s calc(var(--i) * 0.15s) both cubic-bezier(.2, 1.6, .4, 1); }
@keyframes star-pop { from { transform: scale(0) rotate(-30deg); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
.win-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }

/* ---------- Lab ---------- */
.lab { flex: 1; display: flex; flex-direction: column; padding: 18px 20px 20px; gap: 14px; min-height: 0; }
.lab-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.lab-head h1 { margin: 0; font-size: 1.6rem; }
.lab-head p { margin: 4px 0 0; }
.lab-head-meta { display: flex; align-items: center; gap: 10px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: blink 2s infinite; }
@keyframes blink { 50% { opacity: 0.35; } }
.env-badge {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
}
.env-development { color: #ffd166; border-color: rgba(255, 209, 102, 0.45); background: rgba(255, 209, 102, 0.08); }
.env-production { color: var(--green); border-color: rgba(61, 220, 151, 0.45); }

.lab-grid { flex: 1; display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 14px; min-height: 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; backdrop-filter: blur(8px); }
.card h2 { margin: 0 0 10px; font-size: 1.05rem; }
.lab-side { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow: auto; max-height: calc(100vh - 150px); }
.now-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.kicker { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.now h2 { font-size: 1.15rem; }
.now-list { margin: 0; display: grid; gap: 4px; }
.now-list dt { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 6px; }
.now-list dd { margin: 0; line-height: 1.45; }

.status-chip { font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--line); }
.st-passed { color: var(--green); border-color: rgba(61, 220, 151, 0.4); background: rgba(61, 220, 151, 0.08); }
.st-in_progress, .st-testing { color: var(--gold); border-color: rgba(255, 209, 102, 0.4); background: rgba(255, 209, 102, 0.08); }
.st-planned, .st-idea { color: var(--muted); border-style: dashed; }
.st-open, .st-failed { color: #ff8a98; border-color: rgba(255, 95, 109, 0.5); background: rgba(255, 95, 109, 0.1); }
.st-built { color: #9ad1ff; border-color: rgba(77, 163, 255, 0.45); }
.st-rejected { color: var(--muted); text-decoration: line-through; }

.step-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.step details { border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.025); }
.step summary { display: flex; align-items: center; gap: 8px; padding: 9px 11px; cursor: pointer; list-style: none; }
.step summary::-webkit-details-marker { display: none; }
.step-icon { width: 18px; text-align: center; }
.step.st-passed .step-icon { color: var(--green); }
.step.st-in_progress .step-icon { color: var(--gold); }
.step-title { flex: 1; font-weight: 600; font-size: 0.92rem; }
.step.st-planned .step-title { color: var(--muted); font-weight: 500; }
.step-body { padding: 0 12px 12px 37px; font-size: 0.88rem; line-height: 1.5; }
.step-body h4 { margin: 10px 0 4px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.step-body ul { margin: 0; padding-left: 18px; }
.step-body p { margin: 6px 0; }
.quality { border-left: 2px solid var(--accent); padding-left: 10px; margin: 8px 0; }
.quality dl { margin: 0; }
.quality dt { font-weight: 600; font-size: 0.8rem; margin-top: 4px; }
.quality dd { margin: 0; }

.map-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; min-height: 520px; }
.map-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.map-toolbar h2 { margin: 0; }
.map-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.map-view-switch .seg-btn { min-width: 76px; }
.view-list .brain-only { display: none !important; }
.map-tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.map-tools input {
  background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 0.85rem; width: 170px;
}
.growth-stack { display: grid; gap: 6px; flex: 0 1 210px; min-width: 180px; }
.growth-stack > #growth-play { width: 100%; }
.growth-controls { display: grid; gap: 5px; width: 100%; padding: 0 2px; }
.growth-control { display: grid !important; gap: 3px !important; min-width: 0; margin: 0 !important; color: #d5c9ff; font-size: .68rem; font-weight: 650; }
.growth-control span { display: flex; justify-content: space-between; gap: 10px; }
.growth-control output { color: #9ff5ff; font-variant-numeric: tabular-nums; }
.growth-control input[type="range"] { width: 100%; height: 4px; margin: 5px 0; padding: 0; accent-color: #aa7bff; cursor: pointer; }
.growth-control input[type="range"]:disabled { opacity: .45; cursor: default; }
.map-wrap { position: relative; flex: 1; min-height: 0; background: #000; }
#brain { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.map-legend {
  position: absolute; left: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 4px;
  background: rgba(10, 12, 22, 0.78); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
  font-size: 0.72rem; max-width: calc(100% - 20px); pointer-events: none;
}
.legend-group { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.legend-item { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.lg-shape { display: inline-block; width: 11px; height: 11px; background: var(--c); flex: none; }
.lg-circle { border-radius: 50%; }
.lg-diamond { transform: rotate(45deg) scale(0.85); }
.lg-hexagon { clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%); }
.lg-triangle { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.lg-pentagon { clip-path: polygon(50% 0, 100% 38%, 82% 100%, 18% 100%, 0 38%); }
.lg-octagon { clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }
.lg-roundrect { border-radius: 3px; height: 8px; width: 13px; }
.lg-chevron { clip-path: polygon(50% 0, 100% 60%, 75% 100%, 50% 70%, 25% 100%, 0 60%); }
.lg-star { clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.lg-ring { width: 11px; height: 11px; border-radius: 50%; border: 1.6px solid rgba(255, 255, 255, 0.75); display: inline-block; }
.lg-st-idea, .lg-st-testing, .lg-st-rejected { border-style: dashed; }
.lg-st-passed { border-color: var(--green); }
.lg-st-open { border-color: #ff5f6d; }
.lg-badge { display: inline-grid; place-items: center; width: 12px; height: 12px; border-radius: 50%; background: var(--c); color: #0a0c16; font-size: 8px; }

.map-detail {
  position: absolute; top: 10px; right: 10px; width: min(320px, calc(100% - 20px)); max-height: calc(100% - 20px); overflow: auto;
  background: rgba(14, 17, 34, 0.94); border: 1px solid rgba(139, 123, 255, 0.4); border-radius: 12px; padding: 14px 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); font-size: 0.88rem; line-height: 1.5;
  animation: pop-in 0.22s ease-out;
}
.map-growth-caption { position: absolute; z-index: 3; top: 16px; left: 50%; width: min(92%, 460px); min-height: 82px; transform: translateX(-50%); overflow: hidden; border: 1px solid rgba(168,140,255,.48); border-radius: 14px; background: linear-gradient(135deg, rgba(17,12,34,.94), rgba(8,25,37,.92)); box-shadow: 0 12px 38px rgba(0,0,0,.65), 0 0 28px rgba(132,99,233,.2); backdrop-filter: blur(12px); pointer-events: none; }
.growth-caption-layer { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 12px 18px; opacity: 0; transform: translateY(8px) scale(.985); transition: opacity .38s ease, transform .48s cubic-bezier(.2,.8,.2,1); }
.growth-caption-layer.is-active { opacity: 1; transform: translateY(0) scale(1); }
.growth-caption-count { color: #9fefff; font: 700 .62rem/1.2 ui-monospace, Consolas, monospace; letter-spacing: .14em; }
.growth-caption-layer strong { overflow: hidden; color: #faf6ff; font-size: clamp(.95rem, 2.3vw, 1.25rem); line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 0 18px rgba(168,140,255,.38); }
.growth-caption-layer small { color: #aebbc9; font-size: .72rem; }
.map-detail h3 { margin: 4px 0 6px; font-size: 1.05rem; }
.map-detail h4 { margin: 12px 0 4px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.map-detail .close { position: absolute; top: 6px; right: 8px; background: none; border: 0; color: var(--muted); font-size: 1.3rem; cursor: pointer; }
.detail-kicker { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.75rem; }
.detail-result { border-left: 2px solid var(--green); padding-left: 8px; }
.rel-list { list-style: none; padding: 0; margin: 0; }
.rel-list li { border-top: 1px solid var(--line); padding: 3px 0; }
.map-card.is-full {
  position: fixed; inset: 0; z-index: 50; border-radius: 0; border: 0; min-height: 0;
  background: #000;
  animation: pop-in 0.25s ease-out;
}
.btn-full[aria-pressed="true"] { background: rgba(139, 123, 255, 0.3); border-color: rgba(139, 123, 255, 0.6); }
body.no-scroll { overflow: hidden; }
body.standalone .topbar { display: none; }
body.standalone .map-card.is-full { animation: none; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg-btn { background: transparent; border: 0; color: var(--muted); font: inherit; font-size: 0.82rem; font-weight: 600; padding: 6px 11px; cursor: pointer; }
.seg-btn[aria-pressed="true"] { background: rgba(139, 123, 255, 0.35); color: var(--text); }
.seg-btn:hover { color: var(--text); }
.formation select {
  background: rgba(0, 0, 0, 0.3); color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 8px; font: inherit; font-size: 0.85rem;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.map-hint { position: absolute; right: 12px; bottom: 10px; pointer-events: none; opacity: 0.8; }
.map-toast {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  background: rgba(61, 220, 151, 0.14); border: 1px solid rgba(61, 220, 151, 0.5); color: #bff5dc;
  padding: 7px 14px; border-radius: 999px; font-size: 0.82rem; animation: pop-in 0.3s ease-out; max-width: 70%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@keyframes pop-in { from { opacity: 0; transform: translate(var(--tx, 0), -6px) scale(0.97); } }
.map-toast { --tx: -50%; }

@media (max-width: 900px) {
  .lab-grid { grid-template-columns: 1fr; }
  .lab-side { max-height: none; }
  .map-card { min-height: 560px; }
  .topbar { gap: 12px; padding: 10px 16px; }
}

.reduced-motion *, .reduced-motion *::before, .reduced-motion *::after {
  animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important;
}

/* ---------- Prismara-Farbsignatur ---------- */
:root { --accent: #a88cff; --neon-pink: #ff4fd8; --neon-cyan: #4ff0ff; --neon-yellow: #ffd166; --gold: #ffd166; }
:focus-visible { outline-color: var(--neon-cyan); }
.topbar { box-shadow: 0 1px 0 rgba(168,140,255,.2), 0 6px 28px rgba(79,240,255,.1); }
.brand-mark { background: conic-gradient(from 210deg, #ff4d6d, #ff4fd8, #a07bff, #4ff0ff, #3ddc97, #ffd166, #ff4d6d); box-shadow: 0 0 16px rgba(132,116,255,.48); }
.tabs a[aria-current] { color: #f4edff; background: linear-gradient(115deg, rgba(168,140,255,.24), rgba(79,240,255,.14)); box-shadow: inset 0 0 0 1px rgba(168,140,255,.48), 0 0 18px rgba(168,140,255,.12); }
.btn-primary, .btn-primary:hover:not(:disabled) { color: #fff; background: linear-gradient(115deg, #a34ef1, #4e9bff 52%, #32cfc4); border-color: rgba(205,190,255,.56); box-shadow: 0 6px 25px rgba(123,81,255,.34), 0 0 24px rgba(79,240,255,.14); }
.menu-title { background-image: linear-gradient(95deg, #fff, #83ecdf 38%, #bd9bff 72%, #ff8cda); filter: drop-shadow(0 0 22px rgba(129,135,255,.25)); }
.prism-logo .ray-r { background: #ff4d6d; box-shadow: 0 0 10px #ff4d6d; }
.prism-logo .ray-g { background: #3ddc97; box-shadow: 0 0 10px #3ddc97; }
.prism-logo .ray-b { background: #4da3ff; box-shadow: 0 0 10px #4da3ff; }
.level-tile { background: linear-gradient(145deg, rgba(67,34,119,.48), rgba(17,24,46,.94)); border-color: rgba(168,140,255,.4); }
a.level-tile:hover, a.level-tile:focus-visible { border-color: var(--neon-cyan); box-shadow: 0 0 20px rgba(79,240,255,.25); }
.level-tile.next { border-color: var(--neon-yellow); box-shadow: 0 0 18px rgba(255,209,102,.24); }
.mode-card:hover, .mode-card:focus-visible { border-color: rgba(255,79,216,.65); box-shadow: 0 10px 30px rgba(255,79,216,.12), 0 0 22px rgba(79,240,255,.1); }
.mode-main { background: linear-gradient(145deg, rgba(90,47,151,.4), rgba(27,39,75,.58)); border-color: rgba(168,140,255,.5); }
.mode-icon, .lt-stars b.on, .win-stars span.on { color: var(--neon-yellow); text-shadow: 0 0 12px rgba(255,209,102,.38); }
.mode-meta { color: #c8b8ff; }
.stat.over-par b { color: #ffb86b; }
#board:focus-visible { outline-color: var(--neon-cyan); }
.win-card { background: linear-gradient(145deg, rgba(88,51,143,.7), rgba(12,21,36,.98)); border-color: rgba(79,240,255,.4); box-shadow: 0 20px 60px rgba(0,0,0,.7), 0 0 40px rgba(168,140,255,.16); }
.live-dot, .env-production, .st-passed, .st-built, .step.st-passed .step-icon, .lg-st-passed { color: #a7ffd7; border-color: rgba(61,220,151,.52); background-color: rgba(61,220,151,.1); box-shadow: 0 0 12px rgba(61,220,151,.12); }
.env-development, .st-in_progress, .st-testing, .step.st-in_progress .step-icon { color: #9ff5ff; border-color: rgba(79,240,255,.45); background-color: rgba(79,240,255,.09); }
.st-open, .lg-st-open { color: #ffe68a; border-color: rgba(255,209,102,.48); background-color: rgba(255,209,102,.09); }
.st-failed { color: #ff9bad; border-color: rgba(255,77,109,.48); background-color: rgba(255,77,109,.1); }
.live-dot { background: #3ddc97; }
.map-legend, .map-detail { background: rgba(12,12,24,.96); border-color: rgba(168,140,255,.35); box-shadow: 0 12px 40px rgba(0,0,0,.7), 0 0 28px rgba(113,81,210,.12); }
.btn-full[aria-pressed="true"], .seg-btn[aria-pressed="true"] { color: #eaffff; background: linear-gradient(110deg, rgba(79,240,255,.15), rgba(168,140,255,.18)); border-color: #72dfe9; }
.map-toast { background: linear-gradient(120deg, #1e1733, #102532); border-color: rgba(168,140,255,.5); color: #f2edff; }
.lab { padding-top: 14px; }
.lab-grid { grid-template-columns: minmax(0, 1fr); }
.map-card { min-height: max(520px, calc(100vh - 150px)); }
.map-tools { gap: 8px; }
.map-choice { display: grid; gap: 2px; color: #c9baff; font-size: .65rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.map-choice select { min-width: 112px; max-width: 150px; padding: 6px 26px 6px 9px; border: 1px solid rgba(168,140,255,.42); border-radius: 8px; color: #eee8ff; background: #171426; font: 600 .82rem var(--font); text-transform: none; letter-spacing: normal; }
.map-choice select:hover, .map-choice select:focus-visible { border-color: var(--neon-cyan); }
.map-choice option { color: #eee; background: #111; }
.map-card .map-wrap { margin-right: 0 !important; }
.map-node-list { position: absolute; inset: 0; overflow: auto; padding: 12px; background: linear-gradient(145deg, rgba(15,12,30,.96), rgba(5,13,22,.98)); }
.node-list-row { display: grid; grid-template-columns: 20px minmax(150px, 1.5fr) minmax(110px, 1fr) 28px minmax(95px, .7fr); align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 7px 10px; border: 0; border-bottom: 1px solid rgba(168,140,255,.14); color: #ddd; background: transparent; text-align: left; font: inherit; cursor: pointer; }
.node-list-row:hover, .node-list-row:focus-visible, .node-list-row[aria-pressed="true"] { outline: none; color: #fff; background: linear-gradient(90deg, rgba(168,140,255,.14), rgba(79,240,255,.08)); }
.node-list-row .lg-shape { justify-self: center; width: 12px; height: 12px; }
.node-list-name { font-weight: 650; }
.node-list-type, .node-list-status { color: #999; font-size: .78rem; }
.node-list-level { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1px solid rgba(255,209,102,.58); border-radius: 50%; color: #ffe68a; background: rgba(255,209,102,.08); font-size: .72rem; }
.node-list-empty { margin: 24px; color: #aaa; text-align: center; }
.view-list .map-wrap { min-height: 420px; }
@media (max-width: 680px) {
  .node-list-row { grid-template-columns: 18px minmax(0, 1fr) 26px; gap: 7px; }
  .node-list-type, .node-list-status { display: none; }
}

/* ---------- Projekt-Startseite ---------- */
.view-home { overflow-y: auto; }
.home-page { width: min(1120px, 100%); margin: 0 auto; padding: clamp(24px, 5vw, 64px) clamp(16px, 4vw, 42px) 28px; display: flex; flex-direction: column; gap: clamp(34px, 6vw, 70px); }
.home-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(240px, .8fr); align-items: center; min-height: 350px; overflow: hidden; padding: clamp(24px, 5vw, 56px); border: 1px solid rgba(139,151,206,.34); border-radius: 24px; background: radial-gradient(ellipse at 77% 42%, rgba(42,105,132,.32), transparent 38%), radial-gradient(ellipse at 90% 82%, rgba(114,63,151,.2), transparent 34%), linear-gradient(125deg, rgba(17,21,29,.72), rgba(12,13,19,.48) 70%); }
.home-hero-copy { position: relative; z-index: 1; }
.home-eyebrow { display: inline-block; color: #77ded4; font-size: .7rem; font-weight: 750; letter-spacing: .16em; }
.home-hero h1 { margin: 12px 0 0; font-size: clamp(3rem, 8vw, 5.7rem); line-height: .98; letter-spacing: -.065em; background: linear-gradient(100deg, #fff, #a4f4e8 42%, #a9b9ff 76%, #f19be5); background-clip: text; color: transparent; filter: drop-shadow(0 0 24px rgba(121,168,255,.15)); }
.home-owner { margin: 5px 0 8px; color: #c4a6ff; font-size: clamp(1.45rem, 4vw, 2.25rem); font-weight: 650; letter-spacing: -.035em; text-shadow: 0 0 24px rgba(175,124,255,.24); }
.home-lead { max-width: 570px; margin: 12px 0 24px; color: #d0d4df; font-size: clamp(1rem, 2vw, 1.22rem); line-height: 1.65; }
.home-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.home-facts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 24px 0 0; color: #999; font-size: .78rem; }
.home-facts i { width: 3px; height: 3px; border-radius: 50%; background: #777; }
.home-visual { position: relative; display: grid; min-height: 250px; place-items: center; filter: drop-shadow(0 0 36px rgba(117,116,255,.16)); }
.home-orbit { position: absolute; width: min(24vw, 250px); aspect-ratio: 1; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; transform: rotate(-24deg) scaleY(.72); }
.orbit-two { width: min(19vw, 200px); transform: rotate(54deg) scaleY(.7); border-color: rgba(255,255,255,.2); }
.home-prism { position: relative; z-index: 1; width: 100px; height: 110px; clip-path: polygon(50% 0, 100% 100%, 0 100%); background: linear-gradient(145deg, #f5ffff 0, #75e6dc 34%, #b890ff 68%, #ff79ce); filter: drop-shadow(0 0 32px rgba(123,220,255,.42)); }
.home-prism span { position: absolute; inset: 24px 26px 15px; clip-path: polygon(50% 0, 100% 100%, 0 100%); background: linear-gradient(160deg, #142137, #6f80ac 58%, #f1b9ed); }
.home-light-ray { position: absolute; left: 6%; width: 88%; height: 2px; background: linear-gradient(90deg, transparent, #ff71cd 20%, #fff 48%, #70f1dd 74%, #818cff 90%, transparent); box-shadow: 0 0 20px rgba(130,220,255,.7); }
.home-beam { position: absolute; left: 50%; top: 50%; width: 43%; height: 2px; transform-origin: left center; opacity: .78; }
.beam-red { transform: rotate(28deg); background: linear-gradient(90deg, #ff557a, transparent); box-shadow: 0 0 12px #ff557a; }.beam-green { transform: rotate(90deg); background: linear-gradient(90deg, #54ebbd, transparent); box-shadow: 0 0 12px #54ebbd; }.beam-blue { transform: rotate(-28deg); background: linear-gradient(90deg, #718cff, transparent); box-shadow: 0 0 12px #718cff; }
.energy-field { position: relative; width: min(32vw, 340px); min-width: 270px; aspect-ratio: 1; display: grid; place-items: center; isolation: isolate; filter: drop-shadow(0 0 34px rgba(117,116,255,.26)); }
.energy-field::before, .energy-field::after { content: ""; position: absolute; inset: 18%; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 18%, rgba(79,240,255,.22) 24%, transparent 34% 54%, rgba(255,79,216,.2) 62%, transparent 72%); filter: blur(18px); animation: energy-nebula 9s linear infinite; }
.energy-field::after { inset: 4%; opacity: .58; filter: blur(30px); animation-duration: 15s; animation-direction: reverse; }
.energy-orbit { position: absolute; inset: 10%; border: 1px solid rgba(79,240,255,.52); border-radius: 50%; box-shadow: 0 0 22px rgba(79,240,255,.12), inset 0 0 16px rgba(79,240,255,.08); }
.energy-orbit-one { transform: rotateX(68deg) rotateZ(-24deg); animation: energy-orbit-one 12s linear infinite; }
.energy-orbit-two { inset: 15%; border-color: rgba(255,79,216,.66); border-style: dashed; box-shadow: 0 0 24px rgba(255,79,216,.16); transform: rotateY(66deg) rotateZ(28deg); animation: energy-orbit-two 9s linear infinite reverse; }
.energy-orbit-three { inset: 2%; border-color: rgba(255,255,255,.22); transform: rotateX(74deg) rotateY(35deg); animation: energy-orbit-three 18s linear infinite; }
.energy-orbit-four { inset: 27%; border-color: rgba(255,209,102,.44); transform: rotateX(58deg) rotateZ(70deg); animation: energy-orbit-four 7s linear infinite reverse; }
.energy-trail { position: absolute; z-index: 1; left: -7%; width: 114%; height: 3px; border-radius: 50%; background: linear-gradient(90deg, transparent, #ff4fd8, #fff, #4ff0ff, #ffe14f, transparent); filter: blur(1px); box-shadow: 0 0 16px rgba(113,224,255,.82); animation: energy-sweep 2.8s ease-in-out infinite; }
.energy-trail-two { transform: rotate(58deg); animation-delay: -.9s; animation-duration: 3.5s; background: linear-gradient(90deg, transparent, #7c6bff, #fff, #ff7a8f, transparent); }
.energy-trail-three { transform: rotate(-58deg); animation-delay: -1.8s; animation-duration: 4.1s; background: linear-gradient(90deg, transparent, #4ff0ff, #fff, #65e6ad, transparent); }
.energy-core { position: relative; z-index: 2; width: 92px; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.88); border-radius: 30% 50% 38% 52%; background: radial-gradient(circle at 28% 24%, #fff 0, #d8d5ff 12%, #9a79ff 34%, #211846 72%); box-shadow: 0 0 26px #a88cff, 0 0 82px rgba(79,240,255,.4), inset 0 0 30px rgba(255,255,255,.28); animation: energy-core 3.4s ease-in-out infinite; }
.energy-core b { color: transparent; background: linear-gradient(125deg,#fff,#74efff 42%,#ff8ddd); background-clip: text; font-size: 1.75rem; font-weight: 850; letter-spacing: -.1em; filter: drop-shadow(0 0 12px rgba(255,255,255,.75)); }
.energy-particle { position: absolute; z-index: 3; width: 6px; height: 6px; border-radius: 50%; background: #e4fdff; box-shadow: 0 0 12px #4ff0ff, 0 0 28px #b5a1ff; animation: particle-float 4.8s ease-in-out infinite; }
.particle-one { top: 10%; left: 27%; }.particle-two { right: 8%; top: 35%; background: #ffc2ed; box-shadow: 0 0 14px #ff4fd8, 0 0 28px #ff4fd8; animation-delay: -1.1s; }.particle-three { bottom: 11%; left: 22%; animation-delay: -2.2s; }.particle-four { right: 18%; bottom: 19%; width: 4px; height: 4px; animation-delay: -.5s; }.particle-five { left: 8%; top: 54%; width: 4px; height: 4px; animation-delay: -3s; }.particle-six { right: 30%; top: 8%; width: 3px; height: 3px; animation-delay: -1.8s; }
.energy-flare { position: absolute; z-index: 3; width: 18px; height: 18px; clip-path: polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%); background: #fff; filter: drop-shadow(0 0 10px #fff) drop-shadow(0 0 24px #4ff0ff); animation: energy-flare 2.8s ease-in-out infinite; }
.flare-one { top: 17%; right: 21%; }.flare-two { left: 19%; bottom: 22%; width: 12px; height: 12px; background: #ff9fe6; animation-delay: -1.4s; }
@keyframes energy-orbit-one { to { transform: rotateX(68deg) rotateZ(336deg); } }
@keyframes energy-orbit-two { to { transform: rotateY(66deg) rotateZ(388deg); } }
@keyframes energy-orbit-three { to { transform: rotateX(74deg) rotateY(35deg) rotateZ(360deg); } }
@keyframes energy-orbit-four { to { transform: rotateX(58deg) rotateZ(430deg); } }
@keyframes energy-nebula { to { rotate: 360deg; filter: hue-rotate(360deg) blur(18px); } }
@keyframes energy-sweep { 0%,100% { opacity: .14; scale: .68 1; } 50% { opacity: 1; scale: 1.08 1; } }
@keyframes energy-core { 0%,100% { scale: .92; rotate: -8deg; filter: brightness(.94); } 50% { scale: 1.12; rotate: 12deg; filter: brightness(1.34); } }
@keyframes energy-flare { 0%,100% { scale: .5; opacity: .25; rotate: 0deg; } 50% { scale: 1.35; opacity: 1; rotate: 45deg; } }
.home-section-head { margin-bottom: 18px; }
.home-section h2, .home-build h2 { margin: 8px 0; font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -.025em; }
.home-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.home-card { display: flex; flex-direction: column; min-height: 205px; padding: 22px; border: 1px solid #333; border-radius: 16px; background: linear-gradient(145deg, rgba(25,26,33,.9), rgba(16,16,20,.84)); transition: border-color .2s, box-shadow .2s, transform .2s; }
.home-card:hover { transform: translateY(-3px); border-color: rgba(116,221,224,.42); box-shadow: 0 14px 35px rgba(16,118,139,.12); }
.home-card-index { color: #86dcd7; font-size: .67rem; font-weight: 750; letter-spacing: .12em; }
.home-card h3 { margin: 18px 0 5px; color: #eee; font-size: 1.15rem; }
.home-card p { flex: 1; margin: 0 0 16px; color: #aaa; font-size: .9rem; line-height: 1.55; }
.home-card a, .home-footer a { color: #aeece7; font-weight: 650; font-size: .85rem; text-decoration: none; }
.home-card a span, .home-footer a span { margin-left: 5px; color: #aaa; }
.home-card a:hover, .home-footer a:hover { color: #fff; text-decoration: underline; }
.home-build { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr); gap: clamp(22px, 5vw, 60px); padding: clamp(22px, 4vw, 38px); border: 1px solid #333; border-radius: 20px; background: rgba(16,16,16,.86); }
.home-build-intro p { max-width: 330px; color: #aaa; line-height: 1.6; }
.home-build-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
.home-build-steps article { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #292929; }
.home-build-steps article > b { color: #8c8c8c; font-size: .75rem; }
.home-build-steps h3 { margin: 0 0 4px; font-size: .95rem; }
.home-build-steps p { margin: 0; color: #999; font-size: .82rem; line-height: 1.55; }
.home-build-steps code { color: #ddd; }
.home-footer { display: flex; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid #292929; color: #888; font-size: .78rem; }
@media (max-width: 760px) {
  .home-hero { grid-template-columns: minmax(0, 1fr); }
  .home-visual { position: absolute; top: 0; right: -30px; width: 48%; min-height: 100%; opacity: .72; }
  .energy-field { width: 280px; min-width: 0; }
  .home-prism { width: 70px; height: 78px; }
  .home-orbit { width: 180px; }
  .home-cards { grid-template-columns: 1fr; }
  .home-card { min-height: 165px; }
  .home-build { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .energy-field *, .energy-field::before, .energy-field::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media (max-width: 500px) {
  .home-visual { right: -78px; width: 58%; opacity: .46; }
  .energy-field { width: 250px; }
  .home-build-steps { grid-template-columns: 1fr; }
  .home-footer { flex-direction: column; }
}
.importance-controls { display: flex; align-items: center; gap: 10px 16px; width: 100%; flex-wrap: wrap; padding-top: 2px; }
.importance-heading { display: flex; align-items: baseline; gap: 8px; }
.importance-heading strong { color: #eee; font-size: .8rem; }
.importance-heading .small { font-size: .72rem; }
.importance-heading button { border: 1px solid #4d4d4d; border-radius: 7px; padding: 4px 8px; color: #ddd; background: #151515; font: 600 .7rem var(--font); cursor: pointer; }
.importance-heading button:hover, .importance-heading button:focus-visible { border-color: #aaa; color: #fff; }
.importance-heading button[aria-pressed="true"] { border-color: #888; background: #2a2a2a; }
.importance-options { display: flex; gap: 6px; flex-wrap: wrap; }
.importance-btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #484848; border-radius: 999px; padding: 5px 9px; color: #aaa; background: #111; font: 600 .76rem var(--font); cursor: pointer; }
.importance-btn:hover, .importance-btn:focus-visible { border-color: #aaa; color: #fff; }
.importance-btn[aria-pressed="true"] { border-color: #bbb; color: #fff; background: #292929; }
.importance-number { display: inline-grid; width: 19px; height: 19px; place-items: center; border-radius: 50%; color: #111; background: #aaa; font-size: .7rem; }
.importance-count { min-width: 1.4em; text-align: right; color: #888; font-variant-numeric: tabular-nums; }
@media (max-width: 680px) {
  .importance-controls { align-items: flex-start; flex-direction: column; gap: 7px; }
  .importance-options { gap: 5px; }
  .importance-btn { font-size: .7rem; }
  .map-card { min-height: max(560px, calc(100vh - 120px)); }
}

/* Prismara liquid glass: keep the dark spectrum and add a luminous, frosted surface. */
:root { --panel: rgba(22,20,36,.68); --panel-solid: rgba(23,21,37,.92); --line: rgba(231,224,255,.18); }
body { overflow-x: hidden; background: radial-gradient(ellipse at 12% 5%, rgba(91,58,163,.17), transparent 34%), radial-gradient(ellipse at 88% 26%, rgba(32,137,161,.12), transparent 34%), #030308; }
#view { width: 100%; min-width: 0; }
.topbar { background: rgba(7,8,17,.68); border-bottom-color: rgba(229,224,255,.14); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6); }
.btn {
  border-color: rgba(236,231,255,.2);
  background: linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.035));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), inset 0 -1px 0 rgba(255,255,255,.035), 0 8px 22px rgba(0,0,0,.24);
  backdrop-filter: blur(18px) saturate(1.55); -webkit-backdrop-filter: blur(18px) saturate(1.55);
}
.btn:hover:not(:disabled) { background: linear-gradient(145deg, rgba(255,255,255,.22), rgba(255,255,255,.07)); border-color: rgba(255,255,255,.34); box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 10px 26px rgba(0,0,0,.32), 0 0 18px rgba(168,140,255,.1); }
.btn-primary, .btn-primary:hover:not(:disabled) { color: #fff; background: linear-gradient(115deg, rgba(163,78,241,.88), rgba(78,155,255,.88) 52%, rgba(50,207,196,.88)); border-color: rgba(232,224,255,.48); box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 6px 25px rgba(123,81,255,.34), 0 0 24px rgba(79,240,255,.14); }
.card, .mode-card, .stat, .home-card, .home-build, .map-legend, .map-detail {
  background-color: rgba(19,17,32,.62); border-color: rgba(231,224,255,.17);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.11), 0 16px 38px rgba(0,0,0,.22);
  backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5);
}
.map-card { background: rgba(12,12,24,.72); border-color: rgba(196,181,255,.2); }
.map-toolbar { background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.018)); }
.mode-card, .home-card { background-image: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.018)); }
.home-build { background-image: linear-gradient(145deg, rgba(255,255,255,.06), rgba(255,255,255,.012)); }
.map-legend, .map-detail { background-color: rgba(12,12,24,.78); }
.view-run .game, .view-play .game { background: radial-gradient(ellipse at 50% 45%, rgba(50,35,110,.22), transparent 55%), radial-gradient(ellipse at 10% 90%, rgba(20,148,173,.1), transparent 38%), #030308; }
.growth-stack { flex: 0 1 218px; min-width: 190px; }
.growth-controls { padding-top: 2px; }
.growth-control input[type="range"] { min-height: 22px; }
@media (max-width: 680px) {
  .topbar { gap: 8px; padding: 9px 12px; flex-wrap: wrap; }
  .brand { font-size: .98rem; }
  .tabs { flex: 1 1 100%; width: 100%; justify-content: space-between; }
  .tabs a { flex: 1; padding: 8px 7px; text-align: center; font-size: .84rem; }
  .game { padding: 10px 12px max(12px, env(safe-area-inset-bottom)); gap: 8px; }
  .game-hud { align-items: stretch; gap: 8px; }
  .hud-left { width: 100%; justify-content: space-between; gap: 8px; }
  .level-name { font-size: 1.05rem; }
  .hud-stats { gap: 5px; }
  .stat { min-width: 64px; padding: 5px 7px; }
  .stat b { font-size: 1.08rem; }
  .hud-actions { width: 100%; justify-content: stretch; flex-wrap: wrap; gap: 6px; }
  .hud-actions .btn { flex: 1 1 auto; min-width: 78px; padding: 8px 9px; font-size: .82rem; }
  .board-wrap { flex: 1 0 46dvh; min-height: 300px; }
  .map-toolbar { display: grid; grid-template-columns: minmax(0,1fr); justify-content: stretch; padding: 12px; gap: 10px; }
  .map-title { justify-content: space-between; }
  .map-tools { display: grid; width: 100%; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
  .map-tools > .seg { grid-column: 1 / -1; display: flex; width: 100%; }
  .map-tools > .seg .seg-btn { flex: 1; }
  .map-tools .map-choice { min-width: 0; max-width: none; }
  .map-tools .map-choice select { width: 100%; min-width: 0; max-width: none; }
  .map-tools input[type="search"] { grid-column: 1 / -1; width: 100%; min-width: 0; }
  .map-tools > [data-act="fit"], .map-tools > [data-act="full"] { grid-column: span 2; }
  .growth-stack { grid-column: 1 / -1; width: 100%; min-width: 0; }
  .growth-stack > #growth-play { min-height: 42px; }
  .growth-controls { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 14px; }
  .growth-control { min-width: 0; font-size: .66rem; }
  .importance-controls, .importance-options { width: 100%; }
  .map-card { min-height: 0; }
  .map-wrap { min-height: 56dvh; }
  .map-growth-caption { top: 8px; width: calc(100% - 16px); min-height: 72px; }
  .map-legend { max-height: 122px; overflow: auto; font-size: .64rem; }
  .node-list-row { grid-template-columns: 18px minmax(0,1fr) 26px; gap: 7px; }
  .node-list-type, .node-list-status { display: none; }
  .menu { padding: 24px 14px; gap: 24px; }
  .menu-actions { width: min(100%,320px); min-width: 0; }
  .level-grid { grid-template-columns: repeat(auto-fill,minmax(128px,1fr)); }
  .home-page { padding: 18px 12px 24px; gap: 28px; }
  .home-hero { min-height: 390px; padding: 24px 20px; border-radius: 20px; }
  .home-cards { gap: 10px; }
  .home-card { padding: 18px; }
}
@media (max-width: 390px) {
  .hud-stats .stat { min-width: 57px; padding-inline: 5px; }
  .hud-actions .btn { min-width: 70px; font-size: .76rem; }
  .growth-controls { grid-template-columns: 1fr; }
  .importance-heading { flex-wrap: wrap; }
  .importance-btn { padding: 4px 7px; }
}

.home-how { display: grid; gap: 18px; }
.home-how .home-section-head { max-width: 720px; }
.home-how .home-section-head p { max-width: 640px; color: var(--muted); line-height: 1.75; }
.home-how-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.home-how-card { display: flex; align-items: flex-start; gap: 14px; min-height: 150px; padding: 20px; border: 1px solid rgba(231,224,255,.16); border-radius: 18px; background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.018)); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 12px 30px rgba(0,0,0,.18); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); }
.home-how-card > span { display: grid; place-items: center; flex: 0 0 34px; height: 34px; border: 1px solid rgba(126,239,255,.35); border-radius: 50%; color: #a9f4ff; background: rgba(70,190,255,.1); font-size: .75rem; font-weight: 800; box-shadow: 0 0 18px rgba(68,222,255,.12); }
.home-how-card h3 { margin: 2px 0 8px; font-size: 1rem; }
.home-how-card p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.65; }
@media (max-width: 680px) { .home-how-grid { grid-template-columns: 1fr; } .home-how-card { min-height: 0; padding: 16px; } }

/* Keep the category legend available on phones without letting it cover the node list. */
.map-legend-toggle { display: none; }
@media (max-width: 680px) {
  .map-legend-toggle { display: inline-flex; justify-self: start; width: max-content; min-height: 34px; }
  .map-legend,
  .view-list .map-legend { display: none !important; }
  .map-legend.is-open,
  .view-list .map-legend.is-open { display: flex !important; z-index: 6; max-height: min(34dvh, 240px); overflow: auto; }
}

/* Give the Lab controls clear groups and use the available width efficiently. */
.map-toolbar { display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; align-items: stretch; padding: 12px 14px; }
.map-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.map-tools { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(300px,1fr); align-items: stretch; gap: 10px; width: 100%; }
.map-tool-section { display: flex; flex-direction: column; justify-content: center; gap: 8px; min-width: 0; padding: 10px 12px; border: 1px solid rgba(220,214,255,.14); border-radius: 12px; background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.014)); }
.map-tool-heading { color: #bcb3dc; font-size: .64rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.map-tool-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-width: 0; }
.map-node-tools .map-tool-row > .seg { flex: 0 0 auto; }
.map-node-tools .map-choice { flex: 0 1 132px; min-width: 112px; }
.map-node-tools .map-choice select { width: 100%; min-width: 0; max-width: none; }
.map-node-tools #map-search { flex: 1 1 150px; min-width: 135px; width: auto; }
.map-growth-row { align-items: stretch; }
.map-growth-row > .btn { align-self: center; }
.map-growth-row .growth-stack { flex: 1 1 190px; min-width: 170px; }
.map-growth-tools .growth-controls { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px 12px; }
.map-growth-tools .growth-control { font-size: .66rem; }
.importance-controls { margin: 0; padding: 8px 2px 0; border-top: 1px solid rgba(220,214,255,.12); }
.importance-heading { align-items: center; }
.view-list .map-tools { grid-template-columns: minmax(0,1fr); }
.view-list .map-growth-tools { display: none !important; }
@media (max-width: 680px) {
  .map-toolbar { grid-template-columns: minmax(0,1fr); padding: 10px; gap: 8px; }
  .map-title { gap: 8px; }
  .map-title h2 { font-size: .96rem; }
  .map-tools { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .map-tool-section { gap: 7px; padding: 9px; }
  .map-tool-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .map-node-tools .map-tool-row > .seg { grid-column: 1 / -1; display: flex; width: 100%; }
  .map-node-tools .map-tool-row > .seg .seg-btn { flex: 1; }
  .map-node-tools .map-choice { min-width: 0; max-width: none; }
  .map-node-tools .map-choice select { width: 100%; min-width: 0; }
  .map-node-tools #map-search { grid-column: 1 / -1; width: 100%; min-width: 0; }
  .map-growth-row { grid-template-columns: repeat(4,minmax(0,1fr)); align-items: center; }
  .map-growth-row > .btn { width: 100%; min-width: 0; }
  .map-growth-row .growth-stack { grid-column: 1 / -1; width: 100%; min-width: 0; }
  .map-growth-tools .growth-controls { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .importance-controls { gap: 7px; padding-top: 8px; }
  .importance-heading { flex-wrap: wrap; gap: 5px 8px; }
  .importance-heading .small { flex: 1 1 100%; }
  .importance-options { gap: 5px; }
  .importance-btn { padding: 4px 7px; }
  .map-legend-toggle { min-height: 32px; }
  .view-list .map-toolbar { gap: 7px; }
}

/* In der Listenansicht soll die Kartenlegende keine Knoten überdecken. */
.view-list .map-legend,
.view-list .map-hint { display: none !important; }

/* Prismara liquid glass surfaces: keep the existing spectrum, add depth and light. */
:root {
  --panel: rgba(22, 20, 36, .68);
  --panel-solid: rgba(23, 21, 37, .92);
  --line: rgba(231, 224, 255, .18);
}
body { overflow-x: hidden; background: radial-gradient(ellipse at 12% 5%, rgba(91,58,163,.17), transparent 34%), radial-gradient(ellipse at 88% 26%, rgba(32,137,161,.12), transparent 34%), #030308; }
#view { width: 100%; min-width: 0; }
.topbar { background: rgba(7,8,17,.68); border-bottom-color: rgba(229,224,255,.14); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6); }
.btn {
  border-color: rgba(236,231,255,.2);
  background: linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.035));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), inset 0 -1px 0 rgba(255,255,255,.035), 0 8px 22px rgba(0,0,0,.24);
  backdrop-filter: blur(18px) saturate(1.55);
  -webkit-backdrop-filter: blur(18px) saturate(1.55);
}
.btn:hover:not(:disabled) { background: linear-gradient(145deg, rgba(255,255,255,.22), rgba(255,255,255,.07)); border-color: rgba(255,255,255,.34); box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 10px 26px rgba(0,0,0,.32), 0 0 18px rgba(168,140,255,.1); }
.btn-primary, .btn-primary:hover:not(:disabled) { color: #fff; background: linear-gradient(115deg, rgba(163,78,241,.88), rgba(78,155,255,.88) 52%, rgba(50,207,196,.88)); border-color: rgba(232,224,255,.48); box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 6px 25px rgba(123,81,255,.34), 0 0 24px rgba(79,240,255,.14); }
.card, .mode-card, .stat, .home-card, .home-build, .map-legend, .map-detail {
  background-color: rgba(19,17,32,.62);
  border-color: rgba(231,224,255,.17);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.11), 0 16px 38px rgba(0,0,0,.22);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
}
.map-card { background: rgba(12,12,24,.72); border-color: rgba(196,181,255,.2); }
.map-toolbar { background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.018)); }
.mode-card, .home-card { background-image: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.018)); }
.home-build { background-image: linear-gradient(145deg, rgba(255,255,255,.06), rgba(255,255,255,.012)); }
.map-legend, .map-detail { background-color: rgba(12,12,24,.78); }
.growth-stack { flex: 0 1 218px; min-width: 190px; }
.growth-controls { padding-top: 2px; }
.growth-control input[type="range"] { min-height: 22px; }

@media (max-width: 680px) {
  .topbar { gap: 8px; padding: 9px 12px; flex-wrap: wrap; }
  .brand { font-size: .98rem; }
  .tabs { flex: 1 1 100%; width: 100%; justify-content: space-between; }
  .tabs a { flex: 1; padding: 8px 7px; text-align: center; font-size: .84rem; }
  .game { padding: 10px 12px max(12px, env(safe-area-inset-bottom)); gap: 8px; }
  .game-hud { align-items: stretch; gap: 8px; }
  .hud-left { width: 100%; justify-content: space-between; gap: 8px; }
  .level-name { font-size: 1.05rem; }
  .hud-stats { gap: 5px; }
  .stat { min-width: 64px; padding: 5px 7px; }
  .stat b { font-size: 1.08rem; }
  .hud-actions { width: 100%; justify-content: stretch; flex-wrap: wrap; gap: 6px; }
  .hud-actions .btn { flex: 1 1 auto; min-width: 78px; padding: 8px 9px; font-size: .82rem; }
  .board-wrap { flex: 1 0 46dvh; min-height: 300px; }
  .map-toolbar { display: grid; grid-template-columns: minmax(0,1fr); justify-content: stretch; padding: 12px; gap: 10px; }
  .map-title { justify-content: space-between; }
  .map-tools { display: grid; width: 100%; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 7px; }
  .map-tools > .seg { grid-column: 1 / -1; display: flex; width: 100%; }
  .map-tools > .seg .seg-btn { flex: 1; }
  .map-tools .map-choice { min-width: 0; max-width: none; }
  .map-tools .map-choice select { width: 100%; min-width: 0; max-width: none; }
  .map-tools input[type="search"] { grid-column: 1 / -1; width: 100%; min-width: 0; }
  .map-tools > [data-act="fit"], .map-tools > [data-act="full"] { grid-column: span 2; }
  .growth-stack { grid-column: 1 / -1; width: 100%; min-width: 0; }
  .growth-stack > #growth-play { min-height: 42px; }
  .growth-controls { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px 14px; }
  .growth-control { min-width: 0; font-size: .66rem; }
  .importance-controls { width: 100%; }
  .importance-options { width: 100%; }
  .map-card { min-height: 0; }
  .map-wrap { min-height: 56dvh; }
  .map-growth-caption { top: 8px; width: calc(100% - 16px); min-height: 72px; }
  .map-legend { max-height: 122px; overflow: auto; font-size: .64rem; }
  .node-list-row { grid-template-columns: 18px minmax(0,1fr) 26px; gap: 7px; }
  .node-list-type, .node-list-status { display: none; }
  .menu { padding: 24px 14px; gap: 24px; }
  .menu-actions { width: min(100%, 320px); min-width: 0; }
  .level-grid { grid-template-columns: repeat(auto-fill, minmax(128px,1fr)); }
  .home-page { padding: 18px 12px 24px; gap: 28px; }
  .home-hero { min-height: 390px; padding: 24px 20px; border-radius: 20px; }
  .home-cards { gap: 10px; }
  .home-card { padding: 18px; }
}
@media (max-width: 390px) {
  .hud-stats .stat { min-width: 57px; padding-inline: 5px; }
  .hud-actions .btn { min-width: 70px; font-size: .76rem; }
  .growth-controls { grid-template-columns: 1fr; }
  .importance-heading { flex-wrap: wrap; }
  .importance-btn { padding: 4px 7px; }
}

