/* Tokens aus der Designsprache, Akzent Farbton 300°, Spielansicht dunkel (Weltraum). Nur Laptop. */
:root {
  --grund: #171514;
  --karte: #262220;
  --linie: #3a3430;
  --text: #F5EFE6;
  --nebentext: #B8AFA6;
  --akzent: #745F9A;
  --akzent-text: #A88FD6;
  --gut: #4CAF6A;
  --schlecht: #E0605A;
  --ecke: 14px;
  --dauer: 450ms;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--grund);
  color: var(--text);
  overflow: hidden;
}

.top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--karte);
}
.title { font-weight: 700; }
.mission-label { color: var(--nebentext); flex: 1; }
.budget { font-weight: 700; font-variant-numeric: tabular-nums; }
.budget.low { color: var(--schlecht); }

/* Drei Spalten: Teile links, Rakete Mitte, Status rechts */
.stage {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 340px 1fr 280px;
  transition: grid-template-columns var(--dauer) ease;
}
.stage.full, .stage.launching { grid-template-columns: 0 1fr 0; }
/* Raketen-Schritt: linke Spalte fällt weg, das Karussell in der Mitte übernimmt (Linus 14.11.) */
.stage.rocket-step { grid-template-columns: 0 1fr 280px; }
.stage.rocket-step .left { opacity: 0; pointer-events: none; padding: 0; transform: translateX(-100%); visibility: hidden; }

.side {
  overflow-y: auto;
  padding: 16px;
  background: #1c1918;
  transition: transform var(--dauer) ease, opacity var(--dauer) ease;
}
.left { border-right: 1px solid var(--karte); }
.right { border-left: 1px solid var(--karte); }
.stage.full .side, .stage.launching .side { opacity: 0; pointer-events: none; padding: 0; }
.stage.full .left, .stage.launching .left { transform: translateX(-100%); }
.stage.full .right, .stage.launching .right { transform: translateX(100%); }

.center {
  min-width: 0;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Weicher Wechsel des Inhalts */
.enter { animation: enter var(--dauer) ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Bildschirm wackelt beim Zünden */
.shake { animation: shake 500ms linear; }
@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-4px, 2px); }
  40% { transform: translate(4px, -2px); }
  60% { transform: translate(-3px, -1px); }
  80% { transform: translate(3px, 1px); }
}

@media (prefers-reduced-motion: reduce) {
  :root { --dauer: 1ms; }
  .enter, .shake { animation: none; }
}

h1 { font-size: 1.6rem; margin: 8px 0; text-align: center; }
h2 { font-size: 1rem; margin: 0 0 8px; }
.lead { color: var(--nebentext); margin: 0 0 20px; text-align: center; }

/* Schritte im linken Menü */
.steps { display: flex; gap: 6px; margin-bottom: 14px; }
.steps button {
  flex: 1; font: inherit; font-size: 0.9rem; min-height: 40px;
  border-radius: 10px; border: 1px solid var(--linie);
  background: transparent; color: var(--nebentext); cursor: pointer;
}
.steps button[aria-current="step"] { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.steps button:disabled { opacity: 0.35; cursor: not-allowed; }
.hint { color: var(--nebentext); font-size: 0.9rem; margin: 0 0 12px; }

.catalog { display: grid; gap: 10px; }
.card {
  background: var(--karte);
  border: 2px solid transparent;
  border-radius: var(--ecke);
  padding: 12px 14px;
  cursor: grab;
  user-select: none;
}
.card:hover { border-color: var(--linie); }
.card[aria-pressed="true"] { border-color: var(--akzent-text); }
.card.dragging { opacity: 0.5; }
.card h2 { display: flex; justify-content: space-between; gap: 8px; }
.card .price { color: var(--akzent-text); font-variant-numeric: tabular-nums; }
.card dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0; color: var(--nebentext); font-size: 0.9rem; }
.card dd { margin: 0; color: var(--text); font-variant-numeric: tabular-nums; }

/* Startbildschirm: Schwierigkeit */
.levels { display: grid; grid-template-columns: repeat(3, minmax(200px, 280px)); gap: 16px; margin-top: 12px; }
.level { cursor: pointer; padding: 20px; }
.level .tag { color: var(--akzent-text); font-weight: 700; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.06em; }
.level h2 { font-size: 1.15rem; margin: 6px 0 10px; display: block; }
.level p { color: var(--nebentext); margin: 0 0 12px; }

/* Rakete in der Mitte, Ablagefläche */
.dropzone {
  width: 100%;
  max-width: 900px; /* Karussell braucht Breite */
  flex: 1;
  min-height: 0;
  display: flex;
  border-radius: var(--ecke);
  border: 2px dashed transparent;
  transition: border-color 150ms, background 150ms;
}
.dropzone.over { border-color: var(--akzent-text); background: rgba(168, 143, 214, 0.08); }
.dropzone svg { width: 100%; height: 100%; }
.svg-label { fill: var(--text); font-size: 13px; font-family: inherit; }
.svg-muted { fill: var(--nebentext); font-size: 12px; font-family: inherit; }
.chip { cursor: pointer; }

/* Rechte Spalte: Zahlen */
.big-number { font-size: 1.8rem; font-weight: 700; font-variant-numeric: tabular-nums; margin: 0 0 4px; }
.meters { display: grid; gap: 10px; margin: 16px 0; }
.meter-label { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 0.9rem; }
.bar { height: 8px; border-radius: 4px; background: var(--linie); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--gut); transition: width 250ms ease; }
.bar.over span { background: var(--schlecht); }
.info { background: var(--karte); border-radius: var(--ecke); padding: 12px 14px; color: var(--nebentext); font-size: 0.95rem; }
.info strong { color: var(--text); display: block; margin-bottom: 4px; }

canvas { width: 100%; height: 100%; display: block; border-radius: var(--ecke); background: #0b0a12; }
.launch-wrap { width: 100%; flex: 1; min-height: 0; }

.result { max-width: 520px; width: 100%; font-size: 1.05rem; }
.result .big { font-size: 2rem; font-weight: 700; margin: 8px 0 12px; text-align: center; }
.result .big.ok { color: var(--gut); }
.result .big.fail { color: var(--schlecht); }
.result ul { color: var(--nebentext); }
.result dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; background: var(--karte); border-radius: var(--ecke); padding: 16px; }
.result dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

.bottom {
  display: flex;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--karte);
}
button.primary, button.secondary {
  font: inherit;
  font-weight: 600;
  min-height: 56px;
  border-radius: var(--ecke);
  border: none;
  cursor: pointer;
}
button.primary { flex: 1; background: var(--akzent); color: #fff; }
button.secondary { padding: 0 24px; background: var(--karte); color: var(--text); }
button:disabled { opacity: 0.4; cursor: not-allowed; }
button:focus-visible, .card:focus-visible, .chip:focus-visible { outline: 3px solid var(--akzent-text); outline-offset: 2px; }
.hidden { visibility: hidden; }

/* ---------- Weltraum-Hintergrund, Home und Schwierigkeitswahl (Skizze Team, Sa 14.11.) ---------- */
/* Hintergrund: Webb-Bild „Cosmic Cliffs“ (NASA, ESA, CSA, STScI, CC BY 4.0), abgedunkelt (Skizze Josias) */
body { display: block; background: linear-gradient(rgba(11, 10, 18, 0.7), rgba(11, 10, 18, 0.7)), url("assets/webb-cosmic-cliffs.jpg") center / cover fixed, #0b0a12; cursor: url("assets/cursor.svg") 3 3, auto; }
button, [role="button"] { cursor: url("assets/cursor.svg") 3 3, pointer; }
#space { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; background: transparent; border-radius: 0; }

.app { position: relative; z-index: 1; height: 100vh; display: flex; flex-direction: column; background: rgba(23, 21, 20, 0.86); }
.app.hidden-app { display: none; }

.home { position: fixed; inset: 0; z-index: 1; display: none; }
.home.show { display: block; }

.corner { position: fixed; z-index: 3; }
.lang, .sound {
  font: inherit; font-weight: 700; color: var(--text); background: rgba(38, 34, 32, 0.7);
  border: 1px solid var(--linie); border-radius: 999px; min-height: 44px; padding: 0 16px;
  display: flex; align-items: center; gap: 8px;
}
.lang { top: 18px; left: 20px; }
.sound { bottom: 18px; right: 20px; width: 52px; height: 52px; padding: 0; justify-content: center; font-size: 1.3rem; }
.app.show-app ~ .sound, body.playing .sound { bottom: 88px; }
.credits-corner { bottom: 18px; left: 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.pill { font: inherit; font-weight: 700; color: var(--text); background: transparent; border: 2px solid var(--text); border-radius: 999px; padding: 6px 16px; }
.version { color: var(--nebentext); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }

.game-title {
  position: absolute; left: 50%; top: 14vh; transform: translateX(-50%);
  margin: 0; text-align: center; font-size: clamp(3rem, 7vw, 6rem); line-height: 0.95;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text);
  text-shadow: 0 0 30px rgba(168, 143, 214, 0.45);
  transition: top var(--dauer) ease, font-size var(--dauer) ease;
}
.game-title small { display: block; font-size: 0.35em; letter-spacing: 0.3em; color: var(--akzent-text); margin: 6px 0; }
.home.choosing .game-title { top: 4vh; font-size: clamp(1.8rem, 3.5vw, 3rem); }

.planet {
  /* Sonne kleiner und ruhiger (Linus 14.11.: zu dominant) */
  position: absolute; right: 7vw; top: 9vh; width: 11vw; max-width: 150px; aspect-ratio: 1; border-radius: 50%; opacity: 0.85;
  background: radial-gradient(circle at 35% 35%, #ffd27a, #ff9a3c 45%, #b9482f 80%);
  box-shadow: 0 0 40px 8px rgba(255, 154, 60, 0.18);
  transition: opacity var(--dauer) ease;
}
.home.choosing .planet { opacity: 0.35; }

/* Satellit schwebt, fliegt beim Spielen aus dem Bild */
.sat-wrap {
  position: absolute; left: 50%; top: 60vh; width: min(42vw, 520px); transform: translate(-50%, -50%) rotate(-18deg);
  /* langsamer schweben und wegfliegen (Linus 14.11.: zu schnell) */
  animation: float 14s ease-in-out infinite; transition: transform 2s ease-in, opacity 2s ease-in;
}
.sat-wrap svg { width: 100%; height: auto; display: block; }
@keyframes float { 0%, 100% { margin-top: 0; } 50% { margin-top: -8px; } }
.home.choosing .sat-wrap { transform: translate(70vw, -90vh) rotate(25deg) scale(0.6); opacity: 0; animation: none; }

/* Längliche Sechseck-Knöpfe links */
.side-buttons { position: absolute; left: 4vw; top: 46vh; display: flex; flex-direction: column; gap: 14px; }
.hexbtn {
  font: inherit; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text);
  min-width: 200px; min-height: 56px; padding: 0 28px; border: none;
  background: var(--akzent);
  clip-path: polygon(10% 0, 90% 0, 100% 50%, 90% 100%, 10% 100%, 0 50%);
  transition: background 150ms, transform 150ms;
}
.hexbtn.ghost { background: rgba(116, 95, 154, 0.35); }
.hexbtn:hover { background: #846BAF; transform: translateX(4px); }

/* Waben für die Schwierigkeit */
.hexes {
  position: absolute; left: 50%; top: 58vh; transform: translate(-50%, -50%);
  display: none; width: 700px; height: 520px;
}
.home.choosing .hexes { display: block; animation: fade var(--dauer) ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.hex-title { position: absolute; left: 0; right: 0; top: -44px; text-align: center; margin: 0; font-size: 1.3rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--akzent-text); }
.hex {
  position: absolute; width: 236px; height: 205px; border: none; color: var(--text); font: inherit;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: rgba(38, 34, 32, 0.92); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 0 30px; text-align: center; transition: background 150ms, transform 150ms;
}
.hex:hover, .hex:focus-visible { background: var(--akzent); transform: scale(1.04); outline: none; }
.hex .lvl { font-weight: 800; font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.06em; }
.hex .meta { font-size: 0.8rem; color: var(--nebentext); }
.hex:hover .meta, .hex:focus-visible .meta { color: #fff; }
.hex.h-easy { left: 40px; top: 158px; }
.hex.h-intermediate { left: 232px; top: 50px; }
.hex.h-hard { left: 424px; top: 158px; background: rgba(120, 40, 36, 0.92); }
.hex.h-hard:hover, .hex.h-hard:focus-visible { background: #b9482f; }
.hex.h-unrestricted { left: 232px; top: 266px; }
.hex .lvl { font-size: 1.3rem; }
.hex .done { color: var(--gut); font-weight: 800; font-size: 1.4rem; line-height: 1; }

/* Einstellungen und Credits */
.panel {
  border: 1px solid var(--linie); border-radius: var(--ecke); background: var(--karte); color: var(--text);
  padding: 24px; min-width: 360px; max-width: 560px; max-height: 85vh; overflow-y: auto; /* Quellenliste ist lang */
}
.panel::backdrop { background: rgba(0, 0, 0, 0.6); }
.panel h2 { font-size: 1.3rem; margin: 0 0 16px; }
.panel .row { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 12px 0; }
.panel p { color: var(--nebentext); margin: 6px 0; }
.panel .seg button { font: inherit; min-height: 40px; padding: 0 14px; border: 1px solid var(--linie); background: transparent; color: var(--text); border-radius: 10px; }
.panel .seg button[aria-pressed="true"] { background: var(--akzent); border-color: var(--akzent); }
.panel .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.panel .actions button, .panel .danger { font: inherit; min-height: 44px; padding: 0 18px; border-radius: 10px; border: none; background: var(--akzent); color: #fff; }
.panel .danger { background: transparent; border: 1px solid var(--schlecht); color: var(--schlecht); }

.group { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--akzent-text); margin: 16px 0 8px; }

/* Forschung */
.research { max-width: 760px; width: 100%; }
.research .rp { text-align: center; color: var(--akzent-text); }
.projects { display: grid; gap: 16px; }
.project { cursor: default; }
.project .primary { width: 100%; margin-top: 12px; }
.done-card { border-color: var(--gut); }
.research-actions { display: flex; gap: 10px; margin-top: 12px; }
.research-actions button[aria-pressed="true"] { background: var(--akzent); color: #fff; }
.team { width: 100%; max-width: 360px; display: block; margin: 8px auto; }
.worker { animation: bob 0.9s ease-in-out infinite; }
.worker.w1 { animation-delay: 0.3s; } .worker.w2 { animation-delay: 0.6s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.blink { animation: blink 1.2s steps(2) infinite; }
.blink.b1 { animation-delay: 0.4s; } .blink.b2 { animation-delay: 0.8s; }
@keyframes blink { 50% { opacity: 0.2; } }
.rp-earned { text-align: center; color: var(--akzent-text); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .worker, .blink { animation: none; } }

/* Versicherung und Raketenname */
.insure { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; cursor: pointer; }
.insure input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--akzent); }
.name-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.name-form label { width: 100%; color: var(--nebentext); font-size: 0.9rem; }
.name-form input { flex: 1; min-height: 44px; border-radius: 10px; border: 1px solid var(--linie); background: var(--grund); color: var(--text); font: inherit; padding: 0 12px; }
.name-form button { min-height: 44px; }

/* Kampagne */
.contracts { color: var(--nebentext); margin: 16px 0; padding-left: 20px; }
.contracts li { margin: 4px 0; }
.contracts .is-done { color: var(--gut); }
.result-msg { text-align: center; font-weight: 700; font-size: 1.2rem; }
.result-msg.ok { color: var(--gut); }
.result-msg.fail { color: var(--schlecht); }

/* Weltraum-Fakt nach erfolgreichem Start */
.fact { max-width: 46ch; margin: 12px auto; padding: 12px 16px; border-radius: 12px; background: var(--karte); border: 1px solid var(--linie); line-height: 1.5; }
.fact strong { color: var(--akzent-text, var(--akzent)); }
.fact { display: flex; gap: 14px; align-items: center; text-align: left; }
.fact p { margin: 0; }
.fact-icon { width: 56px; height: 56px; flex: none; }

/* Countdown-Knopf über der Startrampe */
.launch-wrap { position: relative; overflow: hidden; border-radius: var(--ecke); }
.launch-wrap canvas { position: absolute; inset: 0; background: transparent; border-radius: 0; }
/* Rakete im Vollbild über der Szene; Höhe und Position setzt app.js */
.launch-rocket { position: absolute; left: 50%; width: auto; transform: translateX(-50%); pointer-events: none; }
/* Bau-Ansicht blendet beim Start aus, die vordere Rakete übernimmt die Szene */
.launch-wrap > .dropzone { position: absolute; inset: 0; margin: 0 auto; transition: opacity 450ms ease; }
.launch-wrap > .dropzone.fading { opacity: 0; pointer-events: none; }
.rocket-pic.gone { visibility: hidden; }

/* Bildnachweis für den Hintergrund, sichtbar laut CC BY 4.0 */
.image-credit { bottom: 18px; left: 50%; transform: translateX(-50%); color: var(--nebentext); font-size: 0.75rem; text-decoration: none; white-space: nowrap; }
.image-credit:hover, .image-credit:focus-visible { color: var(--text); text-decoration: underline; }
@media (max-width: 700px) { .image-credit { left: auto; right: 16px; transform: none; bottom: 70px; white-space: normal; max-width: 60vw; text-align: right; } }

/* Raketen-Karussell in der Mitte (Skizze Josias) */
.carousel { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; outline: none; }
.carousel:focus-visible { outline: 3px solid var(--akzent-text); outline-offset: -6px; border-radius: var(--ecke); }
.carousel-stage { width: 100%; display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 8px; }
.carousel .arrow { min-height: 48px; min-width: 48px; border-radius: 50%; font-size: 1.8rem; line-height: 1; padding: 0; }
.slots { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr); align-items: end; gap: 6px; }
/* Wechsel gleitet in Pfeilrichtung (Linus 14.11.) */
/* nur Raketen und Namen gleiten, der Ständer bleibt stehen */
.slots.slide-next .slot > .rocket-pic, .slots.slide-next .banner { animation: slide-next 260ms ease; }
.slots.slide-prev .slot > .rocket-pic, .slots.slide-prev .banner { animation: slide-prev 260ms ease; }
@keyframes slide-next { from { transform: translateX(60%); opacity: 0.3; } to { transform: none; opacity: 1; } }
@keyframes slide-prev { from { transform: translateX(-60%); opacity: 0.3; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .slots .rocket-pic, .slots .banner { animation: none !important; } }
.slot .rocket-pic { position: relative; }
.slot.mid .tower-pic { position: absolute; top: 0; left: 0; width: 100%; height: 54vh; pointer-events: none; }
.slot.mid { grid-column: 2; }
.slot.side.prev { grid-column: 1; }
.slot.side.next { grid-column: 3; }
.carousel .rocket-facts { display: grid; grid-template-columns: auto auto; gap: 2px 14px; margin: 0; }
.carousel .rocket-facts dt { color: var(--nebentext); }
.carousel .rocket-facts dd { margin: 0; font-weight: 600; }
.carousel .insure, .carousel .hint { max-width: 420px; }
.slot { margin: 0; position: relative; display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.slot.side { opacity: 0.55; transform: scale(0.85); transform-origin: bottom center; transition: opacity 200ms ease; }
.slot.side:hover { opacity: 0.85; }
.slot .rocket-pic { width: 100%; height: 36vh; }
.slot.mid .rocket-pic { height: 54vh; }
.carousel { overflow-y: auto; justify-content: flex-start; padding: 8px 12px 0; box-sizing: border-box; }
.slot.side .banner { font-size: 0.65rem; padding: 3px 6px; }
.slot .banner { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.banner { margin-top: -6px; padding: 4px 12px; border-radius: 8px; background: #e8c547; color: #171514; font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; transform: rotate(-3deg); white-space: nowrap; }
.picked-tag { position: absolute; bottom: 34px; padding: 3px 10px; border-radius: 6px; background: #e0605a; color: #fff; font-weight: 700; font-size: 0.8rem; text-transform: uppercase; z-index: 1; }
.carousel .pick { flex: none; min-height: 48px; min-width: 180px; padding: 0 28px; }
.dots { display: flex; justify-content: center; gap: 6px; margin: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--linie); }
.dot.on { background: var(--akzent-text); }

/* Basis von oben (Idee Josias) */
.company { width: 100%; max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 24px; align-items: start; padding: 16px; overflow: auto; max-height: 100%; }
.base-wrap { display: grid; gap: 8px; }
.base { width: 100%; height: auto; }
.bldg { cursor: pointer; outline: none; }
.bldg polygon, .bldg ellipse { transition: filter 150ms ease; }
.bldg:hover polygon, .bldg:hover ellipse, .bldg:focus-visible polygon { filter: brightness(1.25); }
.bldg-tag { fill: rgba(23, 21, 20, 0.85); stroke: var(--akzent-text); stroke-width: 1; }
.bldg:focus-visible .bldg-tag { stroke-width: 3; }
.bldg-label { fill: #F5EFE6; font: 600 11px sans-serif; }
@media (max-width: 800px) { .company { grid-template-columns: 1fr; } }

/* Level-Leiste über der Basis */
.levels { display: flex; flex-wrap: wrap; gap: 6px; }
.level { font: inherit; font-size: 0.85rem; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--linie); background: var(--karte); color: var(--text); }
.level.on { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.level:disabled { opacity: 0.45; }

/* Teile-Karten mit Bild, das sich langsam dreht (Linus 14.11.) */
.card.with-pic { display: grid; grid-template-columns: 76px minmax(0, 1fr); column-gap: 12px; align-items: center; }
.part-pic { width: 76px; height: 70px; animation: turn 7s ease-in-out infinite; transform-origin: 50% 60%; }
.card:nth-child(2n) .part-pic { animation-delay: -3.5s; }
@keyframes turn { 0%, 100% { transform: perspective(240px) rotateY(-22deg); } 50% { transform: perspective(240px) rotateY(22deg); } }
@media (prefers-reduced-motion: reduce) { .part-pic { animation: none; } }

/* Quellen in den Credits */
.panel h3 { margin: 16px 0 6px; font-size: 1rem; color: var(--akzent-text); }
.sources { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 0.9rem; }
.sources a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.sources a:hover, .sources a:focus-visible { color: var(--akzent-text); }

.pad-mark { fill: rgba(245, 239, 230, 0.7); font: 700 16px sans-serif; }
.hint.warn { color: #e8c547; }

/* Forschung je Ort: Kulisse oben, nicht anklickbar */
.research .levels { justify-content: center; margin-bottom: 8px; }
.lab-scene { max-width: 520px; margin: 0 auto; pointer-events: none; border-radius: var(--ecke); overflow: hidden; }
.lab-scene .base { display: block; }

.danger-text { color: #e8a09c; }

/* ---------- 3D-Schicht (Linus 14.11.): Licht von oben links, Schatten nach unten rechts ---------- */
.card {
  background: linear-gradient(180deg, #2f2a27 0%, #241f1d 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 6px 14px rgba(0, 0, 0, 0.35);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.card:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 12px 22px rgba(0, 0, 0, 0.45); }
.card[aria-pressed="true"] { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 0 1px var(--akzent-text), 0 10px 26px rgba(116, 95, 154, 0.45); }
.project.card:hover, .carousel .insure.card:hover { transform: none; }

button.primary {
  background: linear-gradient(180deg, #8a72b6 0%, #6a5590 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 4px 0 #3f3159, 0 8px 16px rgba(0, 0, 0, 0.35);
  transition: transform 90ms ease, box-shadow 90ms ease, filter 150ms ease;
}
button.primary:hover:not(:disabled) { filter: brightness(1.08); }
button.primary:active:not(:disabled) { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 0 #3f3159, 0 3px 6px rgba(0, 0, 0, 0.3); }
button.secondary, .steps button, .level, .carousel .arrow {
  background: linear-gradient(180deg, #342e2b 0%, #241f1d 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 3px 0 #120f0e, 0 6px 12px rgba(0, 0, 0, 0.3);
  transition: transform 90ms ease, box-shadow 90ms ease;
}
button.secondary:active:not(:disabled), .steps button:active, .level:active:not(:disabled), .carousel .arrow:active {
  transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 1px 0 #120f0e;
}
.steps button[aria-current="step"], .level.on { background: linear-gradient(180deg, #8a72b6 0%, #6a5590 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 3px 0 #3f3159, 0 6px 12px rgba(0, 0, 0, 0.3); }
.carousel .arrow { color: var(--text); border: 1px solid var(--linie); }

/* Sechseck-Knöpfe: clip-path schneidet box-shadow ab, darum filter: drop-shadow für die Kante */
.hexbtn { background: linear-gradient(180deg, #8a72b6 0%, #644f8a 100%); filter: drop-shadow(0 4px 0 #3f3159) drop-shadow(0 10px 14px rgba(0, 0, 0, 0.45)); }
.hexbtn.ghost { background: linear-gradient(180deg, rgba(138, 114, 182, 0.5) 0%, rgba(100, 79, 138, 0.35) 100%); }
.hexbtn:active { transform: translate(4px, 3px); filter: drop-shadow(0 1px 0 #3f3159); }
.hex { background: linear-gradient(160deg, rgba(58, 52, 48, 0.95) 0%, rgba(30, 27, 25, 0.95) 100%); filter: drop-shadow(0 6px 0 rgba(10, 8, 7, 0.9)) drop-shadow(0 14px 18px rgba(0, 0, 0, 0.45)); }
.hex:hover, .hex:focus-visible { background: linear-gradient(160deg, #8a72b6 0%, #5f4b84 100%); transform: translateY(-4px) scale(1.03); }
.hex.h-hard { background: linear-gradient(160deg, rgba(150, 56, 48, 0.95) 0%, rgba(96, 30, 26, 0.95) 100%); }

/* Balken: vertiefte Rinne, glänzende Füllung */
.bar { box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6); background: #2a2522; height: 10px; border-radius: 5px; }
.bar span { background: linear-gradient(180deg, #8fe0a6 0%, #4CAF6A 55%, #3a8f55 100%); border-radius: 5px; }
.bar.over span { background: linear-gradient(180deg, #f5a29d 0%, #E0605A 55%, #b8433e 100%); }

/* Kopf- und Fußleiste wie Glas */
.top, .bottom { background: rgba(20, 18, 17, 0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.side { background: linear-gradient(180deg, rgba(30, 27, 25, 0.92), rgba(24, 21, 20, 0.92)); }
.panel { background: linear-gradient(180deg, #2f2a27, #221e1c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 30px 60px rgba(0, 0, 0, 0.6); }
.corner.lang, .pill { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); background: rgba(20, 18, 17, 0.45); }

/* Sonne als Kugel: Licht von links oben, Schatten-Grenze unten rechts */
.planet { box-shadow: inset -16px -12px 28px rgba(80, 14, 0, 0.6), inset 6px 6px 16px rgba(255, 240, 200, 0.35), 0 0 40px 8px rgba(255, 154, 60, 0.18); }

/* Schatten für Satellit, Raketen und Gebäude: wirken dadurch räumlich */
.sat-wrap svg { filter: drop-shadow(0 22px 26px rgba(0, 0, 0, 0.55)); }
.slot .rocket-pic { filter: drop-shadow(8px 10px 10px rgba(0, 0, 0, 0.45)); }
.base .bldg > g, .base .bldg > polygon, .base .bldg > path, .base .bldg > rect, .base .bldg > circle, .base .bldg > ellipse { filter: drop-shadow(4px 6px 5px rgba(0, 0, 0, 0.4)); }
.base { filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.45)); }
.fact, .result-card, .stats { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 8px 18px rgba(0, 0, 0, 0.35); }

/* ---------- Level-Auswahl (Linus 14.11.) ---------- */
.home.choosing .hexes { left: calc(50% + 7vw); top: 23vh; bottom: 2vh; transform: translateX(-50%); width: min(980px, 62vw); height: auto; overflow-y: auto; padding: 0 8px 24px; }
.level-select { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.level-select .hex-title { position: static; }
.lvl-stage { width: 100%; display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; gap: 8px; }
.lvl-stage .arrow { min-width: 52px; min-height: 52px; border-radius: 50%; font-size: 2rem; line-height: 1; padding: 0; color: var(--text); border: 1px solid var(--linie);
  background: linear-gradient(180deg, #342e2b 0%, #241f1d 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 3px 0 #120f0e; }
.lvl-stage .arrow:disabled { opacity: 0.3; }
.lvl-cards { display: grid; grid-template-columns: 1fr 1.7fr 1fr; gap: 14px; align-items: center; }
.lvl-cards.slide-next .lvl-card { animation: slide-next 280ms ease; }
.lvl-cards.slide-prev .lvl-card { animation: slide-prev 280ms ease; }
.lvl-card { margin: 0; position: relative; border-radius: var(--ecke); overflow: hidden; cursor: pointer;
  background: linear-gradient(180deg, #2f2a27, #1f1b19); box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 24px rgba(0,0,0,0.45); transition: transform 200ms ease, opacity 200ms ease; }
.lvl-card.empty { visibility: hidden; }
.lvl-card.side { opacity: 0.6; transform: scale(0.9); }
.lvl-card.side:hover { opacity: 0.85; }
.lvl-card.mid { cursor: default; box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 0 0 2px var(--akzent-text), 0 18px 40px rgba(116,95,154,0.4); }
.lvl-scene .base { display: block; width: 100%; height: auto; filter: none; }
.lvl-card.locked .lvl-scene { filter: grayscale(1) brightness(0.45); }
.lvl-card figcaption { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; font-size: 0.95rem; }
.lvl-card.side figcaption { font-size: 0.8rem; }
.diff { padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: #171514; }
.diff.d1 { background: #8fe0a6; } .diff.d2 { background: #e8c547; } .diff.d3 { background: #f0a052; } .diff.d4 { background: #e0605a; color: #fff; }
.lock { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); font-size: 3rem; filter: drop-shadow(0 6px 10px rgba(0,0,0,0.6)); }
/* Freischalten: Schloss wackelt, springt auf und verschwindet, Karte leuchtet */
.lvl-card.unlocking { animation: glow 2.2s ease; }
.lvl-card.unlocking .lock { animation: unlock 1.6s ease forwards; }
@keyframes unlock { 0% { transform: translate(-50%, -50%) rotate(0); } 20% { transform: translate(-50%, -50%) rotate(-14deg); } 40% { transform: translate(-50%, -50%) rotate(14deg); }
  60% { transform: translate(-50%, -50%) rotate(0) scale(1.2); opacity: 1; } 100% { transform: translate(-50%, -140%) scale(1.6); opacity: 0; } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 2px var(--akzent-text), 0 18px 40px rgba(116,95,154,0.4); } 50% { box-shadow: 0 0 0 4px #e8c547, 0 0 60px rgba(232,197,71,0.7); } }
.unlock-msg { margin: 0; font-size: 1.4rem; font-weight: 800; color: #e8c547; animation: fade 600ms ease both; }
.lvl-goal { margin: 0; max-width: 60ch; text-align: center; font-size: 1.05rem; line-height: 1.5; }
.start-big { flex: none !important; min-width: 320px; min-height: 64px !important; font-size: 1.25rem !important; letter-spacing: 0.04em; }
.lvl-research { width: 100%; }
.lvl-research h3 { text-align: center; color: var(--akzent-text); margin: 10px 0; }
.lvl-research .projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
@media (prefers-reduced-motion: reduce) { .lvl-card.unlocking, .lvl-card.unlocking .lock, .lvl-cards .lvl-card { animation: none !important; } }

/* ---------- Josias-Fixes 14.11. abends ---------- */
/* Ergebnis über die ganze Seite */
.result { max-width: 860px; margin: auto; font-size: 1.15rem; display: grid; gap: 14px; }
.result .big { font-size: 3rem; letter-spacing: 0.02em; }
.result dl { font-size: 1.2rem; padding: 20px 24px; background: linear-gradient(180deg, #2f2a27, #221e1c); }
/* Preis und Nutzlast unter jeder Rakete */
.slot-price { margin-top: 6px; font-size: 0.8rem; color: var(--nebentext); font-variant-numeric: tabular-nums; white-space: nowrap; }
.slot.mid .slot-price { font-size: 0.95rem; color: var(--text); }
/* Wertung rechts */
.score-box { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 10px; margin: 6px 0 4px; padding: 10px 12px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(116, 95, 154, 0.35), rgba(116, 95, 154, 0.15)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.08); }
.score-box strong { font-size: 1.6rem; color: #e8c547; font-variant-numeric: tabular-nums; }
.score-box .hint { grid-column: 1 / -1; margin: 0; font-size: 0.8rem; }
/* ?-Knopf auf Karten */
.qmark { margin-left: 8px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--akzent-text); background: transparent; color: var(--akzent-text);
  font: 700 0.8rem sans-serif; line-height: 1; padding: 0; cursor: pointer; vertical-align: middle; }
.qmark:hover, .qmark:focus-visible { background: var(--akzent); color: #fff; }
/* Name der eigenen Rakete auf dem Rumpf */
.rocket-name { fill: #2b2440; font: 700 5px sans-serif; letter-spacing: 0.4px; }

.result { text-align: center; }
.result dl { text-align: left; }

/* Fun Fact groß mit Erklärbild */
.big-fact { flex-direction: column; max-width: 560px; padding: 16px 20px; border: 1px solid var(--akzent-text); text-align: center;
  background: linear-gradient(180deg, rgba(116, 95, 154, 0.28), rgba(30, 27, 25, 0.9)); }
.fact-pic { width: 100%; max-width: 480px; height: auto; display: block; margin: 0 auto 8px; }
.fact-label { fill: #F5EFE6; font: 600 11px sans-serif; }
.big-fact p { font-size: 1.1rem; line-height: 1.5; }

/* Hitzeschild: Hälften gleiten beim Start von außen zu */
.rocket-pic .shield { opacity: 0; transition: transform 900ms ease, opacity 300ms ease; transform-box: fill-box; }
.rocket-pic .shield-l { transform: translateX(-60%); }
.rocket-pic .shield-r { transform: translateX(60%); }
.launch-rocket.closed .shield { opacity: 1; transform: none; }

.kenney.gray { filter: grayscale(1) brightness(1.05); }

/* Fortschritt im Auftrag (Bau-Ansicht links) */
.contract-box { cursor: default; margin-bottom: 12px; padding: 10px 12px; }
.contract-box:hover { transform: none; }
.contract-box h3 { margin: 0 0 6px; font-size: 0.95rem; color: var(--akzent-text); }
.contract-steps { margin: 0 0 6px; padding-left: 20px; font-size: 0.85rem; color: var(--nebentext); }
.contract-steps .is-done { color: var(--gut); }
.contract-steps .is-now { color: var(--text); font-weight: 700; }
.contract-box .hint { margin: 4px 0; font-size: 0.85rem; }
.link-btn { background: none; border: none; padding: 4px 0; color: var(--akzent-text); font: 600 0.85rem sans-serif; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.new-company { margin-top: 18px; }

.lvl-scene { pointer-events: none; } /* Vorschau im Karussell, Gebäude dort nicht anklickbar */

/* ---------- Nacht 14./15.11. (Gespräch Linus und Freund) ---------- */
/* Level-Karussell mittig unter dem Titel, schmal genug für die Menü-Knöpfe links */
.home.choosing .hexes { left: 50%; width: min(900px, calc(100vw - 2 * (4vw + 230px))); bottom: 44px; } /* unten Platz für den Bildnachweis */

/* Icons in Knöpfen */
.icon, .dropzone svg.icon { width: 1.2em; height: 1.2em; flex: none; } /* .dropzone svg macht sonst jedes Bild riesig */
button.primary, .link-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.panel h2 .icon { vertical-align: -0.15em; color: #e8c547; }

/* Zurück: kleiner runder Knopf oben links, daneben das Ziel */
.round-back { display: inline-flex; align-items: center; gap: 10px; padding: 0 12px 0 0; border: none; background: none; color: var(--text); font: 600 0.95rem sans-serif; min-height: 44px; }
.round-back .round { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--linie);
  background: linear-gradient(180deg, #342e2b 0%, #241f1d 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 3px 0 #120f0e; transition: transform 90ms ease; }
.round-back:hover .round { border-color: var(--akzent-text); }
.round-back:active .round { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 1px 0 #120f0e; }
.round-back:focus-visible { outline: none; }
.round-back:focus-visible .round { outline: 3px solid var(--akzent-text); outline-offset: 2px; }
.round-back .icon { width: 20px; height: 20px; }
.back-label { color: var(--nebentext); }
.round-back:hover .back-label { color: var(--text); }
body.playing .sound { bottom: 18px; } /* keine Fußleiste mehr */

/* Hauptknopf als Kasten über der Rakete bzw. unter dem Ergebnis */
button.primary.action { flex: none; min-width: 280px; min-height: 56px; padding: 0 32px; font-size: 1.15rem; letter-spacing: 0.03em; }
.action-bar { display: flex; justify-content: center; width: 100%; }
.result > button.primary.action { justify-self: center; margin-top: 6px; }

/* Infobox statt losem Hinweistext */
.infobox { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; margin: 0 0 12px; padding: 10px 12px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(116, 95, 154, 0.22), rgba(116, 95, 154, 0.08)); border: 1px solid rgba(168, 143, 214, 0.35); }
.infobox .icon { color: var(--akzent-text); margin-top: 1px; }
.infobox p { margin: 0; color: var(--text); font-size: 0.88rem; line-height: 1.45; }
.link-btn .icon { width: 1.05em; height: 1.05em; }

/* Startturm: vorderer Greifarm liegt über der Rakete */
.slot.mid .tower-front { position: absolute; top: 0; left: 0; width: 100%; height: 54vh; pointer-events: none; z-index: 1; }
.launch-wrap canvas.front { pointer-events: none; }

/* Space Facts */
.facts-view { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; }
.facts-view .arrow { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; padding: 0; border: 1px solid var(--linie); color: var(--text);
  background: linear-gradient(180deg, #342e2b 0%, #241f1d 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 3px 0 #120f0e; }
.facts-view .big-fact { margin: 0; max-width: none; }
.facts-view figcaption p { color: var(--text); margin: 0 0 6px; }
.fact-source { color: var(--akzent-text); font-size: 0.85rem; }
.panel .dots { margin-top: 12px; }
.panel:has(.facts-view) { width: min(680px, 92vw); max-width: 680px; }

/* 15.11. (Linus): Hauptknopf unten rechts in der Ecke der Mitte, Rakete rückt hoch, damit nichts scrollt */
.action-bar { position: fixed; right: calc(280px + 24px); bottom: 24px; width: auto; z-index: 2; }
.action-bar button.primary.action { min-width: 220px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 4px 0 #3f3159, 0 12px 28px rgba(0,0,0,0.55); }
.slot.mid .rocket-pic, .slot.mid .tower-pic, .slot.mid .tower-front { height: max(240px, calc(100vh - 460px)); } /* Rest der Mitte (Zahlen, Versicherung, Platz für den Knopf) braucht etwa 460 px */
.slot.side .rocket-pic { height: max(160px, calc((100vh - 460px) * 0.66)); }
.carousel { gap: 10px; padding-bottom: 80px; } /* unten Platz, damit der Knopf die Versicherung nicht verdeckt */

/* Im All (Linus 15.11.): Booster weg, Hitzeschild-Hälften fliegen nach außen, Satellit verlässt die Spitze */
.launch-rocket.no-boosters .side-booster, .launch-rocket.deployed .payload { display: none; }
.launch-rocket.jettison .nose-outline { opacity: 0; }
.launch-rocket.jettison .shield { opacity: 0; transform-origin: 50% 100%; transition: transform 1.6s ease-in, opacity 1.6s ease-in; }
.launch-rocket.jettison .shield-l { transform: translate(-110%, 20%) rotate(-40deg); }
.launch-rocket.jettison .shield-r { transform: translate(110%, 20%) rotate(40deg); }

/* ---------- 15.11. Teil 1 ---------- */
/* Nächster sinnvoller Knopf: grün, hebt sich vom Lila ab */
button.primary.go:not(:disabled) { background: linear-gradient(180deg, #6fd08b 0%, #3f9a5c 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 4px 0 #2a6a3e, 0 10px 24px rgba(76,175,106,0.35); color: #fff; }
.hexbtn.go { background: linear-gradient(180deg, #6fd08b 0%, #3f9a5c 100%); filter: drop-shadow(0 4px 0 #2a6a3e) drop-shadow(0 10px 14px rgba(0,0,0,0.45)); }
.hexbtn.go:hover { background: linear-gradient(180deg, #7fdc9a 0%, #47a865 100%); }
/* Versicherung mit Schild-Icon */
.insure-icon { color: var(--akzent-text); display: grid; place-items: center; }
.insure-icon .icon { width: 26px; height: 26px; }
/* Starship: Ladeklappe zu beim Countdown, im All klappt sie auf */
.rocket-pic .door { opacity: 0; transform-box: fill-box; transform-origin: 0 50%; transform: scaleX(0.08); transition: transform 900ms ease, opacity 300ms ease; }
.launch-rocket.closed .door { opacity: 1; transform: none; }
.launch-rocket.jettison .door { opacity: 1; transform: scaleX(0.08); transition: transform 1.2s ease; }
/* Platzhalter eigene Rakete */
.rocket-pic.placeholder { filter: none; }
.own-later { display: grid; justify-items: center; gap: 8px; max-width: 360px; text-align: center; }
.own-later p { margin: 0; color: var(--nebentext); }
.own-later button.primary { flex: none; min-height: 48px; padding: 0 22px; }

/* Feste Plätze in der Spitze: leer gestrichelt, beim Ziehen leuchtet der passende */
.slot-empty { fill: rgba(168, 143, 214, 0.08); stroke: #A88FD6; stroke-width: 0.5; stroke-dasharray: 1.5 1; }
body[data-drag="bus"] .slot-bus, body[data-drag="panel"] .slot-panel, body[data-drag="instrument"] .slot-inst { fill: rgba(143, 224, 166, 0.25); stroke: #8fe0a6; stroke-width: 0.8; animation: slot-pulse 0.9s ease-in-out infinite; }
body[data-drag="bus"] .zone-bus, body[data-drag="panel"] .zone-panel, body[data-drag="instrument"] .zone-instrument { filter: drop-shadow(0 0 2px #8fe0a6); }
@keyframes slot-pulse { 50% { fill: rgba(143, 224, 166, 0.45); } }
@media (prefers-reduced-motion: reduce) { .slot-empty { animation: none !important; } }

/* Einführung: alles dunkel außer dem Ziel, Tipp daneben */
.tut-spot { position: fixed; z-index: 50; display: none; border-radius: 12px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(5, 4, 10, 0.7); outline: 2px solid #8fe0a6; transition: left 250ms ease, top 250ms ease, width 250ms ease, height 250ms ease; }
.tut-tip { position: fixed; z-index: 51; display: none; padding: 14px 16px; border-radius: 12px; border: 1px solid #8fe0a6;
  background: linear-gradient(180deg, #2f2a27, #221e1c); box-shadow: 0 20px 40px rgba(0,0,0,0.6); }
.tut-spot.on, .tut-tip.on { display: block; }
.tut-tip p { margin: 4px 0 0; line-height: 1.45; }
.tut-count { color: #8fe0a6; font-size: 0.8rem; font-weight: 700; }
.tut-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }
.tut-tip button.primary { flex: none; min-height: 40px; padding: 0 18px; }
@media (prefers-reduced-motion: reduce) { .tut-spot { transition: none; } }

/* Levelauswahl ohne Scrollen: kleinere Szenen, unten zwei Spalten */
.home.choosing .hexes { overflow: hidden; }
.level-select { gap: 8px; }
.lvl-scene { height: min(30vh, 300px); }
.lvl-card.side .lvl-scene { height: min(22vh, 220px); }
.lvl-scene .base { width: 100%; height: 100%; }
.lvl-bottom { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; align-items: start; }
.lvl-main { display: grid; justify-items: center; gap: 6px; text-align: center; }
.lvl-main .hint { margin: 0; }
.lvl-main .lvl-goal { font-size: 0.98rem; }
.start-big { min-width: 0 !important; width: 100%; max-width: 360px; }
.new-company { margin-top: 2px; }
.lvl-research h3 { margin: 0 0 6px; text-align: left; font-size: 1rem; display: flex; align-items: center; gap: 6px; }
.project-rows { display: grid; gap: 6px; }
.project-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'name price' 'act act'; gap: 4px 10px; align-items: center;
  padding: 8px 10px; border-radius: 10px; background: linear-gradient(180deg, rgba(47,42,39,0.92), rgba(34,30,28,0.92)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.07); }
.project-row .pr-name { grid-area: name; display: flex; align-items: center; gap: 4px; font-size: 0.9rem; }
.project-row .price { grid-area: price; color: var(--akzent-text); font-size: 0.85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.project-row > :nth-child(3) { grid-area: act; }
.project-row .hint { margin: 0; font-size: 0.8rem; }
.project-row.is-done { opacity: 0.7; }
.project-row.is-done > :nth-child(3) { display: none; }
.project-row.is-done { grid-template-areas: 'name price'; }
button.primary.small { min-height: 34px; font-size: 0.85rem; padding: 0 12px; width: 100%; gap: 6px; }
.project-row .research-meter { display: grid; gap: 2px; }
/* Forschungs-Zeilen als kleine Kacheln in zwei Spalten, Knopftext einzeilig */
.lvl-bottom { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); }
.project-rows { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.project-row, .project-row.is-done { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'name' 'price' 'act'; gap: 2px; }
.project-row button.primary.small span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lvl-scene { height: min(26vh, 280px); }
.lvl-card.side .lvl-scene { height: min(19vh, 200px); }

/* Ergebnis ohne Scrollen (Linus 15.11.): links Ergebnis und Zahlen, rechts der Weltraum-Fakt */
.result { max-width: 1100px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 32px; row-gap: 10px; align-items: start; align-content: center; }
.result > * { grid-column: 1; }
.result > .big-fact { grid-column: 2; grid-row: 1 / span 12; align-self: center; margin: 0; }
.result:not(:has(.big-fact)) { grid-template-columns: minmax(0, 620px); justify-content: center; }
.result .big { font-size: 2.4rem; margin: 0; }
.result p { margin: 0; }
.result dl { padding: 14px 18px; font-size: 1.05rem; }
.level-select { gap: 6px; }

/* Teile links als kleine Kacheln in zwei Spalten, damit die Liste ohne Scrollen passt (Linus 15.11.) */
#left .catalog { grid-template-columns: 1fr 1fr; gap: 8px; }
#left .card.with-pic { grid-template-columns: 1fr; padding: 6px 8px 8px; row-gap: 2px; justify-items: center; text-align: center; }
#left .card .part-pic { width: 56px; height: 44px; }
#left .card h2 { display: grid; gap: 0; justify-items: center; font-size: 0.8rem; margin: 0; line-height: 1.2; }
#left .card .qmark { width: 18px; height: 18px; font-size: 0.7rem; margin-left: 4px; }
#left .card dl { font-size: 0.72rem; gap: 0 6px; justify-content: center; }
#left .card-body { width: 100%; }
#left .group { margin: 8px 0 6px; }
#left .infobox { padding: 8px 10px; margin-bottom: 8px; }
#left .infobox p { font-size: 0.8rem; }
#left .steps { margin-bottom: 8px; }
#left .steps button { min-height: 34px; }
#left .contract-box { margin-bottom: 8px; padding: 8px 10px; }
.side { padding: 12px; }
/* noch kompakter: Bild links klein, Text rechts */
#left .card.with-pic { grid-template-columns: 34px minmax(0, 1fr); column-gap: 6px; justify-items: start; text-align: left; align-items: center; padding: 6px 6px 6px 4px; }
#left .card .part-pic { width: 34px; height: 30px; }
#left .card h2 { display: block; font-size: 0.74rem; line-height: 1.15; }
#left .card h2 > span:first-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#left .card h2 .price { display: block; font-size: 0.72rem; }
#left .card dl { font-size: 0.66rem; justify-content: start; line-height: 1.25; }
#left .card .qmark { width: 15px; height: 15px; font-size: 0.6rem; margin-left: 2px; }

/* Labor ohne Scrollen: links Kulisse und Punkte, rechts die Projekte in kompakten Karten */
.research { max-width: 1200px; display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.3fr); column-gap: 24px; row-gap: 6px; align-content: start;
  grid-template-areas: 'nav nav' 'scene projects' 'title projects' 'lead projects' 'rp projects' 'x projects'; grid-template-rows: auto auto auto auto auto 1fr; }
.research > .levels { grid-area: nav; }
.research > .lab-scene { grid-area: scene; max-width: none; width: 100%; }
.research > h1 { grid-area: title; margin: 4px 0 0; font-size: 1.3rem; }
.research > .lead { grid-area: lead; margin: 0; font-size: 0.9rem; }
.research > .rp { grid-area: rp; margin: 0; font-size: 1.3rem; }
.research > .projects { grid-area: projects; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; align-content: start; }
.research .project { padding: 10px 12px; }
.research .project h2 { font-size: 0.92rem; margin: 0 0 4px; }
.research .project .hint { font-size: 0.8rem; margin: 0 0 6px; }
.research .project .primary { min-height: 42px; margin-top: 6px; font-size: 0.9rem; }
.research .team { max-width: 200px; margin: 2px auto; }
.research .research-actions button { min-height: 40px; }
/* kleinere Bildschirme: Levelauswahl rückt hoch, Notfall-Scrollen bleibt erlaubt statt abgeschnitten */
.home.choosing .hexes { overflow-y: auto; top: 21vh; }
.lvl-scene { height: min(24vh, 280px); }
.lvl-card.side .lvl-scene { height: min(17vh, 200px); }
@media (max-height: 820px) {
  #left .infobox { display: none; }
  .home.choosing .game-title { top: 2vh; }
  .home.choosing .hexes { top: 18vh; }
}

/* Gewinn-Bildschirm */
.win { display: grid; gap: 6px; padding: 14px 18px; border-radius: 14px; border: 1px solid #e8c547; background: linear-gradient(180deg, rgba(232,197,71,0.22), rgba(30,27,25,0.9)); }
.win-title { font-size: 1.8rem; font-weight: 800; color: #e8c547; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti span { position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }

/* Basis-Bildschirm ohne Scrollen: links der Ort, rechts die Gebäude mit Knopf */
.base-screen { max-width: 1250px; align-items: center; height: 100%; overflow: hidden; }
.base-screen .base { max-height: calc(100vh - 190px); width: 100%; }
.base-screen .company-panel { display: grid; gap: 10px; }
.base-screen .company-panel h1 { text-align: left; margin: 0; font-size: 1.4rem; }
.base-screen .big-number { margin: 0; text-align: left; font-size: 1.2rem; }
.bldg-row { display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-areas: 'icon text' 'icon btn'; gap: 6px 12px; padding: 12px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(47,42,39,0.95), rgba(34,30,28,0.95)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 6px 14px rgba(0,0,0,0.3); }
.bldg-icon { grid-area: icon; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--akzent-text); background: rgba(116,95,154,0.2); }
.bldg-icon .icon { width: 24px; height: 24px; }
.bldg-text { grid-area: text; }
.bldg-text p { margin: 2px 0 0; font-size: 0.85rem; }
.bldg-row > button { grid-area: btn; justify-self: start; width: auto; min-width: 200px; }
.base-screen .contracts { margin: 0; font-size: 0.85rem; }
.contracts .is-now { color: var(--text); font-weight: 700; }
/* Levelauswahl nur noch Karussell und Start (Forschung ist in der Basis) */
.lvl-bottom { grid-template-columns: minmax(0, 620px); justify-content: center; }
.lvl-scene { height: min(32vh, 320px); }
.lvl-card.side .lvl-scene { height: min(22vh, 230px); }

/* Hover-Infos und Leuchten wie in Spielen (Linus und Freund 15.11.) */
.info { border: 1px solid rgba(168, 143, 214, 0.45); background: linear-gradient(180deg, rgba(116, 95, 154, 0.25), rgba(38, 34, 32, 0.95)); }
.info .info-head { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; font-size: 1rem; margin-bottom: 6px; }
.info .info-head .icon { color: var(--akzent-text); width: 22px; height: 22px; }
.info p { margin: 0 0 6px; color: var(--text); line-height: 1.45; }
.info .hint { color: var(--nebentext); font-size: 0.82rem; }
.info.flash { animation: info-flash 700ms ease; }
@keyframes info-flash { 0% { box-shadow: 0 0 0 0 rgba(168,143,214,0.9); } 100% { box-shadow: 0 0 0 10px rgba(168,143,214,0); } }
.card:hover, .insure:hover, .bldg-row:hover { animation: edge-glow 1.8s ease-in-out infinite; }
@keyframes edge-glow { 0%, 100% { box-shadow: 0 0 0 1px rgba(168,143,214,0.6), 0 0 10px rgba(168,143,214,0.25); } 50% { box-shadow: 0 0 0 2px rgba(168,143,214,0.95), 0 0 22px rgba(168,143,214,0.55); } }
.slot.mid:hover .rocket-pic { filter: drop-shadow(0 0 12px rgba(168,143,214,0.6)); }
@media (prefers-reduced-motion: reduce) { .card:hover, .insure:hover, .bldg-row:hover, .info.flash { animation: none; } }

/* Größer und klarer (Linus und Freund 15.11.): breitere linke Leiste, größere Kacheln, große Basis */
.stage { grid-template-columns: 410px 1fr 290px; }
.stage.full, .stage.launching { grid-template-columns: 0 1fr 0; }
#left .catalog { gap: 10px; }
#left .card.with-pic { grid-template-columns: 52px minmax(0, 1fr); column-gap: 8px; padding: 8px 8px 8px 6px; }
#left .card .part-pic { width: 52px; height: 46px; }
#left .card h2 { font-size: 0.88rem; }
#left .card h2 .price { font-size: 0.84rem; margin-top: 2px; }
#left .card dl { font-size: 0.76rem; line-height: 1.35; }
#left .infobox p { font-size: 0.86rem; }
.drag-ghost { position: fixed; top: -400px; left: -400px; width: 140px; height: 120px; display: grid; place-items: center; border-radius: 18px;
  background: radial-gradient(circle, rgba(168,143,214,0.45), rgba(23,21,20,0) 70%); }
.drag-ghost .part-pic { width: 130px; height: 112px; animation: none; filter: drop-shadow(0 0 10px #A88FD6) drop-shadow(0 0 4px #F5EFE6); }
/* Basis groß, rechts mehr Platz für Text */
.base-screen { grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); max-width: 1400px; gap: 28px; }
.base-screen .base { max-height: calc(100vh - 140px); }
.base-screen .bldg-text p { font-size: 0.95rem; }
.base-screen .bldg-text strong { font-size: 1.05rem; }
.base-screen .lvl-desc { margin: 0; color: var(--text); font-size: 1rem; line-height: 1.5; }

/* Icons an den Balken und an der Zahlung */
.meter-name { display: inline-flex; align-items: center; gap: 6px; }
.meter-name .icon { width: 16px; height: 16px; color: var(--akzent-text); }
.fee-line { display: flex; align-items: center; gap: 6px; margin: 4px 0 2px; font-weight: 800; font-size: 1rem; color: #e8c547; }
.fee-line .icon { width: 20px; height: 20px; }
#left .card dl { grid-template-columns: auto auto; justify-content: start; column-gap: 6px; }
#left .card dd { white-space: nowrap; }

/* ---------- Usability-Funde 15.11. ---------- */
.tagline { position: absolute; left: 50%; top: calc(14vh + 3.2 * clamp(3rem, 7vw, 6rem)); transform: translateX(-50%); margin: 0; width: min(90vw, 720px);
  text-align: center; font-size: 1.15rem; color: var(--text); text-shadow: 0 2px 10px rgba(0,0,0,0.8); transition: opacity var(--dauer) ease; }
.home.choosing .tagline { opacity: 0; pointer-events: none; }
.launch-warn { margin: 0 0 8px; padding: 8px 12px; border-radius: 10px; background: rgba(224, 96, 90, 0.18); border: 1px solid #e0605a; color: #f5c2bf; font-size: 0.9rem; max-width: 300px; }
.action-bar { flex-direction: column; align-items: flex-end; }
.skip-launch { position: absolute; right: 18px; bottom: 18px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; min-height: 44px !important; }
.stars-box { display: grid; gap: 2px; }
.stars { font-size: 2.2rem; color: #e8c547; letter-spacing: 0.1em; line-height: 1; }
.why { display: flex; gap: 8px; align-items: flex-start; text-align: left; padding: 10px 12px; border-radius: 10px; background: rgba(143, 224, 166, 0.1); border: 1px solid rgba(143, 224, 166, 0.4); font-size: 0.95rem; line-height: 1.45; }
.why .icon { color: #8fe0a6; flex: none; margin-top: 2px; }
.why a { color: var(--akzent-text); white-space: nowrap; }
html.big-text { font-size: 112.5%; }
html.big-text .bldg-label { font-size: 14px; }
html.big-text .fact-label { font-size: 13px; }
.tagline { z-index: 2; }
.home:not(.choosing) .sat-wrap { top: 68vh; }
.action-bar { flex-direction: row; align-items: center; gap: 10px; }
.launch-warn { margin: 0; white-space: nowrap; max-width: none; }

/* Geld und Forschungspunkte oben rechts */
.budget { display: flex; gap: 10px; }
.hud-item { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(38, 34, 32, 0.8); border: 1px solid var(--linie); font-weight: 800; font-variant-numeric: tabular-nums; }
.hud-item .icon { width: 18px; height: 18px; color: #e8c547; }
.hud-item + .hud-item .icon { color: var(--akzent-text); }
.hud-item.low { color: var(--schlecht); border-color: var(--schlecht); }
.hud { top: 18px; right: 20px; display: flex; gap: 10px; }
.hud:empty { display: none; }
/* Labor: großes Bild links, Projekte rechts */
.research { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr); grid-template-areas: 'nav nav' 'scene projects'; grid-template-rows: auto 1fr; align-items: center; }
.research > .lab-scene { align-self: center; }
.research { max-width: 1380px; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); column-gap: 20px; }
.research > .projects { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
/* Werte in den Kacheln bleiben im Rand: Name links, Wert rechts */
#left .card-body { min-width: 0; }
#left .card dl { grid-template-columns: minmax(0, 1fr) auto; justify-content: stretch; width: 100%; }
#left .card dt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#left .card dd { text-align: right; }
/* Kosten im Ergebnis */
.result dl .sub { color: var(--nebentext); font-size: 0.92em; }
.result dl dt.profit, .result dl dd.profit { font-weight: 800; border-top: 1px solid var(--linie); padding-top: 6px; }
.result dl dd.plus { color: var(--gut); }
.result dl dd.minus { color: var(--schlecht); }

/* Mindestbudget für den nächsten Auftrag */
.budget-need { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 12px; border-radius: 10px; background: rgba(232, 197, 71, 0.12); border: 1px solid rgba(232, 197, 71, 0.45); font-size: 0.92rem; }
.budget-need .icon { color: #e8c547; flex: none; }
.budget-need.tight { background: rgba(224, 96, 90, 0.14); border-color: #e0605a; }
.research > .budget-need { grid-column: 1 / -1; justify-self: center; }
.after-research { margin: 0 0 4px; font-size: 0.8rem; color: var(--gut); }
.after-research.tight { color: #e8c547; }
.after-research.bad { color: var(--schlecht); }
.research { grid-template-areas: 'need need' 'nav nav' 'scene projects'; grid-template-rows: auto auto 1fr; }
.research > .budget-need { grid-area: need; }

/* Nebenaufträge */
#left .card.side-job { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: center; padding: 8px; cursor: pointer; }
#left .card.side-job .icon { color: #e8c547; width: 20px; height: 20px; }
#left .card.side-job strong { display: block; font-size: 0.84rem; line-height: 1.2; }
.side-meta { font-size: 0.76rem; color: var(--nebentext); }
#left .card.side-job strong { overflow-wrap: anywhere; }
body[data-drag] .zone-side { opacity: 0.6; }
.rp-line { display: flex; align-items: center; gap: 6px; margin: 2px 0; font-weight: 700; font-size: 0.9rem; color: var(--akzent-text); }
.rp-line .icon { width: 18px; height: 18px; }

/* Level 2: eigene Raumstation planen */
.station-plan { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; padding: 20px 24px; align-items: start; height: 100%; box-sizing: border-box; overflow: auto; }
.station-plan h1 { margin: 0 0 10px; font-size: 1.5rem; }
.st-name { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 12px; max-width: 420px; margin: 40px auto; }
.st-name input { font: inherit; font-size: 1.2rem; padding: 10px 12px; border-radius: 10px; border: 1px solid #5a5466; background: #171514; color: #F5EFE6; }
.st-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.st-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: #262220; font-size: 0.85rem; }
.st-chip .icon { width: 16px; height: 16px; color: #A88FD6; }
.st-chip.bad { background: #4a2422; }
.st-chip.bad strong { color: #E0605A; }
.st-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.st-tabs .tab { flex: 1; padding: 8px; border-radius: 10px; border: 1px solid #3a3440; background: #171514; color: #F5EFE6; font: inherit; cursor: pointer; }
.st-tabs .tab.on { background: #745F9A; border-color: #A88FD6; }
.st-tabs .tab:disabled { opacity: 0.4; cursor: default; }
.st-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 10px; }
.st-choice { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border-radius: 10px; border: 1px solid #3a3440; background: #171514; color: #F5EFE6; font: inherit; text-align: left; cursor: pointer; }
.st-choice.on { border-color: #A88FD6; box-shadow: 0 0 0 2px rgba(168, 143, 214, 0.4); }
.st-right { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.station-grid { width: min(100%, 360px); height: auto; }
.st-empty { fill: none; stroke: rgba(245, 239, 230, 0.12); stroke-dasharray: 4 4; }
.st-cell { fill: rgba(245, 239, 230, 0.03); stroke: rgba(245, 239, 230, 0.25); stroke-dasharray: 5 4; }
.st-cell.ok { stroke: #4CAF6A; fill: rgba(76, 175, 106, 0.08); cursor: pointer; }
.st-cell.ok:hover, .st-cell.ok:focus { fill: rgba(76, 175, 106, 0.25); outline: none; }
.st-cell.chosen { fill: rgba(76, 175, 106, 0.45); stroke-dasharray: none; stroke-width: 3; }
.st-cell.bad { stroke: #E0605A; fill: rgba(224, 96, 90, 0.2); }
.station-round { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.station-round .station-grid { width: 180px; }
@media (max-width: 760px) { .station-plan { grid-template-columns: 1fr; } }
.st-3d { width: 100%; height: 340px; border-radius: 14px; overflow: hidden; background: radial-gradient(ellipse at 50% 120%, #14304f 0%, #0B0A12 60%); }
.st-3d canvas { width: 100%; height: 100%; display: block; cursor: pointer; }
.st-3d + .station-grid { width: min(100%, 200px); }
.station-round .st-3d { height: 260px; width: min(100%, 520px); }
.station-outline { width: 100%; max-width: 680px; height: auto; background: radial-gradient(ellipse at 50% 140%, #14304f 0%, #0B0A12 65%); border-radius: 14px; }
.st-slot { fill: rgba(76, 175, 106, 0.08); stroke-width: 2.5; stroke-dasharray: 6 4; }
.st-slot.ok { stroke: #4CAF6A; cursor: pointer; animation: slot-glow 1.6s ease-in-out infinite; }
.st-slot.ok:hover, .st-slot.ok:focus { fill: rgba(76, 175, 106, 0.3); outline: none; }
.st-slot.bad { stroke: #E0605A; fill: rgba(224, 96, 90, 0.12); }
.st-slot.chosen { fill: rgba(76, 175, 106, 0.4); stroke-dasharray: none; animation: none; }
@keyframes slot-glow { 50% { fill: rgba(76, 175, 106, 0.22); } }
@media (prefers-reduced-motion: reduce) { .st-slot.ok { animation: none; } }
.station-plan .st-right .st-3d { height: 220px; }

/* Spielgefühl (Prüfung 15.11. abends): Weltraum hinter jedem Bildschirm statt dunkler Fläche, weiche Übergänge */
.app { background: linear-gradient(180deg, rgba(11, 10, 18, 0.55) 0%, rgba(11, 10, 18, 0.35) 40%, rgba(11, 10, 18, 0.6) 100%); }
.side { background: rgba(23, 21, 20, 0.72); backdrop-filter: blur(6px); }
.company-panel, .result, .research, .station-plan .st-left { background: rgba(23, 21, 20, 0.7); backdrop-filter: blur(8px); border-radius: 18px; padding: 18px 20px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35); }
.phase-in { animation: phase-in 260ms cubic-bezier(.2, .8, .2, 1) both; }
@keyframes phase-in { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }
.app:not(.hidden-app) { animation: fade 300ms ease both; }
@media (prefers-reduced-motion: reduce) { .phase-in, .app:not(.hidden-app) { animation: none; } }
.stage.launching .launch-wrap { border-radius: 0; }
.stage.launching .center { padding: 0; }
/* Niedrige Bildschirme (Laptop 1280 × 720): nichts scrollen (Prüfung 15.11.) */
@media (max-height: 780px) {
  .result { font-size: 0.98rem; gap: 8px; padding: 12px 16px; }
  .result h2, .result .result-msg { margin: 0; }
  .result .fact-pic { max-height: 130px; }
  .result .big-fact { padding: 10px; }
  .company-panel { padding: 12px 16px; }
  .company-panel h1 { font-size: 1.3rem; margin: 0 0 4px; }
  .company-panel .bldg-row { padding: 8px 10px; }
  .company-panel .lvl-desc { margin: 0 0 6px; }
  .station-plan { padding: 12px 16px; gap: 16px; }
  .station-plan h1 { font-size: 1.25rem; margin-bottom: 6px; }
  .station-outline { max-height: 360px; }
  .research { padding: 12px 16px; }
  .research h1, .research h2 { margin-top: 0; }
}
.stars span { display: inline-block; }
.stars .star-on { animation: star-pop 420ms cubic-bezier(.3, 1.6, .5, 1) both; }
.stars .star-on:nth-child(2) { animation-delay: 220ms; }
.stars .star-on:nth-child(3) { animation-delay: 440ms; }
@keyframes star-pop { from { transform: scale(0) rotate(-40deg); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .stars .star-on { animation: none; } }
.hud-item.up { color: #4CAF6A; box-shadow: 0 0 0 1px rgba(76,175,106,0.6), 0 0 18px rgba(76,175,106,0.45); transition: box-shadow 200ms; }
.hud-item.down { color: #E0605A; box-shadow: 0 0 0 1px rgba(224,96,90,0.6), 0 0 18px rgba(224,96,90,0.4); transition: box-shadow 200ms; }

/* 3D-Welt der Basen */
.world-screen { position: relative; width: 100%; height: 100%; overflow: hidden; }
.world { position: absolute; inset: 0; }
.world-canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.world-fade { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
/* Levelname beim Ankommen: groß einblenden, kurz stehen lassen, ausblenden */
.world-arrive { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); z-index: 4; pointer-events: none; opacity: 0; font-size: clamp(1.6rem, 4vw, 3rem); font-weight: 800; letter-spacing: 0.04em; text-align: center; color: var(--text, #f5efe6); text-shadow: 0 4px 30px rgba(0, 0, 0, 0.7); white-space: nowrap; }
.world-arrive:empty { display: none; }
.world-arrive.show { animation: arrive 2600ms ease forwards; }
@keyframes arrive { 0% { opacity: 0; transform: translate(-50%, -40%) scale(0.96); } 18% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -56%); } }
@media (prefers-reduced-motion: reduce) { .world-arrive.show { animation-duration: 1ms; } }
.world-title { position: absolute; left: 20px; top: 16px; max-width: 420px; padding: 14px 18px; border-radius: 16px; background: rgba(23, 21, 20, 0.62); backdrop-filter: blur(8px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); pointer-events: auto; }
.world-title h1 { margin: 0 0 4px; font-size: 1.35rem; }
.world-title p { margin: 4px 0; font-size: 0.92rem; }
.world-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); margin: 0; font-size: 0.82rem; color: var(--nebentext); background: rgba(11, 10, 18, 0.55); padding: 6px 12px; border-radius: 999px; pointer-events: none; }
.world-widget { position: absolute; left: 0; top: 0; z-index: 2; transition: opacity 250ms ease; will-change: transform; }
.world-widget.off { opacity: 0; pointer-events: none; }
.ww-pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: rgba(23, 21, 20, 0.78); backdrop-filter: blur(8px); border: 1px solid rgba(168, 143, 214, 0.55); font-weight: 600; font-size: 0.9rem; white-space: nowrap; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }
.ww-pill .icon { width: 18px; height: 18px; color: var(--akzent-text); }
.ww-body { display: none; margin-top: 6px; width: 280px; padding: 12px 14px; border-radius: 14px; background: rgba(23, 21, 20, 0.86); backdrop-filter: blur(10px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); font-size: 0.9rem; }
.ww-body p { margin: 0 0 8px; }
.ww-body .contracts { margin: 0; padding-left: 18px; font-size: 0.82rem; }
.world-widget:hover .ww-body, .world-widget.hot .ww-body, .world-widget.pinned .ww-body, .world-widget:focus-visible .ww-body, .world-widget:has(:focus-visible) .ww-body, .world-widget.open .ww-body { display: block; }
.world-widget.hot .ww-pill, .world-widget.pinned .ww-pill, .world-widget:hover .ww-pill { border-color: #e8c547; box-shadow: 0 0 0 3px rgba(232, 197, 71, 0.25), 0 8px 24px rgba(0, 0, 0, 0.4); }
.world-widget.open .ww-body { width: auto; padding: 0; background: none; box-shadow: none; backdrop-filter: none; }
.world-widget:hover, .world-widget.hot, .world-widget.pinned, .world-widget:focus-within { z-index: 3; }
.company.world-screen { display: block; max-width: none; margin: 0; padding: 0; gap: 0; overflow: hidden; height: 100%; max-height: none; }
.center:has(.world-screen) { padding: 0; }

/* 3D-Welt hinter allen Bildschirmen (Umgebungs-Modus) */
.world-bg { position: fixed; inset: 0; z-index: 0; opacity: 0; transition: opacity 500ms ease; pointer-events: none; }
.world-bg canvas { width: 100%; height: 100%; display: block; } /* kein CSS-Filter: macht im Browser die Seite darüber unsichtbar */
.world-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, rgba(11, 10, 18, 0.45) 0%, rgba(11, 10, 18, 0.7) 100%); pointer-events: none; }
body.ambient-3d .carousel-stage { background: radial-gradient(ellipse at 50% 60%, rgba(11, 10, 18, 0.6) 0%, rgba(11, 10, 18, 0) 70%); }
body.ambient-3d .world-bg { opacity: 1; }
body.ambient-3d .app { background: linear-gradient(180deg, rgba(11, 10, 18, 0.35) 0%, rgba(11, 10, 18, 0.1) 45%, rgba(11, 10, 18, 0.45) 100%); }
body.ambient-3d .side { background: rgba(23, 21, 20, 0.66); backdrop-filter: blur(10px); }
body.ambient-3d .world-fade { display: none; }
.st-left .launch-warn, .station-round .launch-warn { white-space: normal; } /* Warnung bricht um statt über die Karte zu ragen */
body.ambient-3d .station-plan .st-left { background: rgba(23, 21, 20, 0.9); }

/* Meilensteine */
.badge-row { display: flex; gap: 6px; margin-top: 8px; }
.badge { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(245, 239, 230, 0.08); border: 1px solid rgba(245, 239, 230, 0.15); }
.badge .icon { width: 15px; height: 15px; color: rgba(245, 239, 230, 0.3); }
.badge.on { background: radial-gradient(circle at 35% 30%, #f3d97a, #b8860b); border-color: #e8c547; box-shadow: 0 0 12px rgba(232, 197, 71, 0.45); }
.badge.on .icon { color: #2a1f06; }
.badge.big { width: 46px; height: 46px; }
.badge.big .icon { width: 24px; height: 24px; }
.badge-won { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.badge-new { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 999px; background: rgba(232, 197, 71, 0.12); border: 1px solid rgba(232, 197, 71, 0.5); animation: star-pop 520ms cubic-bezier(.3, 1.6, .5, 1) both 300ms; }
.badge-new small { display: block; font-size: 0.72rem; color: #e8c547; text-transform: uppercase; letter-spacing: 0.06em; }
@media (prefers-reduced-motion: reduce) { .badge-new { animation: none; } }
/* Startseite und Level-Auswahl mit 3D-Karte: altes Sternenfeld und gezeichneter Satellit treten zurück */
body.menu-3d #space, body.menu-3d .sat-wrap, body.menu-3d .planet { display: none; }
body.menu-3d { background: #05040a; }
body.menu-3d .world-bg::after { background: radial-gradient(ellipse at 50% 50%, rgba(5, 4, 10, 0) 30%, rgba(5, 4, 10, 0.55) 100%); }
.credit-3d { display: none; }
body.menu-3d .credit-2d { display: none; }
body.menu-3d .credit-3d { display: inline-block; }
/* Entscheidung 6: Teile-Karten mit Symbolen statt Beschriftungen */
.card-chips { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 4px; }
.card-chip { display: inline-flex; align-items: center; gap: 3px; font-size: 0.8rem; color: var(--nebentext); white-space: nowrap; }
.card-chip .icon { width: 13px; height: 13px; color: var(--akzent-text); }
/* Start in 3D */
.launch3d { position: relative; width: 100%; height: 100%; }
.launch3d-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.launch3d-caption { position: absolute; top: 18%; left: 50%; transform: translateX(-50%); font-size: 2rem; font-weight: 800; color: #F5EFE6; text-shadow: 0 2px 12px rgba(0,0,0,0.7); pointer-events: none; white-space: nowrap; }
.launch3d-caption.show { animation: star-pop 360ms cubic-bezier(.3, 1.4, .5, 1) both; }
.launch3d .skip-launch { position: absolute; right: 18px; bottom: 18px; z-index: 2; }

/* Andocken in 3D (Linus 16.11.): Ergebnis wartet, bis das Modul montiert ist; nichts verdunkelt die Szene */
body.docking .result { visibility: hidden; background: none; box-shadow: none; backdrop-filter: none; }
body.docking .result .skip-dock { visibility: visible; }
/* Nach dem Andocken: Station hinter dem Ergebnis gut sichtbar, Karte etwas durchsichtiger */
body.station-result .world-bg::after { opacity: 0.35; }
body.station-result .result { background: rgba(23, 21, 20, 0.55); }
body.docking .world-bg::after { opacity: 0; }
body.docking .world-fade { display: block; }
body.docking .app { background: none; }
.world-bg::after { transition: opacity 800ms ease; }
.skip-dock { position: fixed; right: 24px; bottom: 24px; z-index: 5; display: inline-flex; align-items: center; gap: 6px; }
/* Kein Webb-Hintergrund zwischen Start, Andocken und Ergebnis (Linus 16.11.): Übergänge laufen über Schwarz */
.launch-wrap.launch3d { background: #000; }
body.ambient-3d { background: #05040a; }
body.docking .world-bg { transition: none; opacity: 1; }
