* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

input {
  user-select: text;
}

:root {
  --bg-glass: rgba(15, 23, 42, 0.84);
  --bg-glass-strong: rgba(15, 23, 42, 0.94);
  --border: rgba(255, 255, 255, 0.14);
  --accent: #38bdf8;
  --accent-bavaria: #0ea5e9;
  --gold: #fbbf24;
  --green: #4ade80;
  --text: #f8fafc;
  --muted: #94a3b8;
  --shadow: 0 8px 26px rgba(0, 0, 0, 0.34);
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: #87c4eb;
}

body.in-splash .game-ui {
  display: none !important;
}

#game-canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  cursor: grab;
}
#game-canvas:active {
  cursor: grabbing;
}

/* ---------------- START SPLASH SCREEN ---------------- */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.52));
  backdrop-filter: blur(1.5px);
}
.splash-screen.hidden {
  display: none;
}

.splash-card {
  width: min(500px, 94vw);
  padding: 26px 28px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(251, 191, 36, 0.34);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  animation: popIn 0.25s ease-out;
}
.splash-crest {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
  filter: drop-shadow(0 6px 14px rgba(14, 165, 233, 0.35));
}
.splash-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}
.splash-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #7dd3fc;
}
.splash-lang {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.sp-lang-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.sp-lang-btn.active {
  background: var(--accent-bavaria);
  color: #fff;
}

.splash-hero {
  text-align: center;
  margin-bottom: 20px;
}
.splash-crest {
  font-size: 48px;
  margin-bottom: 6px;
}
.splash-hero h1 {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 30%, #7dd3fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}
.splash-hero p {
  font-size: 13.5px;
  line-height: 1.5;
  color: #cbd5e1;
}

.splash-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.splash-form label {
  font-size: 12px;
  font-weight: 700;
  color: #fde68a;
}
.splash-form input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  outline: none;
}
.splash-form input:focus {
  border-color: #38bdf8;
  background: rgba(255, 255, 255, 0.13);
}
.btn-splash {
  margin-top: 4px;
  padding: 14px 18px;
  border-radius: 13px;
  border: none;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  font-size: 15.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(14, 165, 233, 0.42);
  transition: transform 0.12s, filter 0.15s;
}
.btn-splash:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.splash-legend {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 700;
  color: #cbd5e1;
}

/* ---------------- FLOATING 3D MAP LABELS (COLOR-CODED & NON-OVERLAPPING) ---------------- */
#labels-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 5;
}

.map-label {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(6px);
  color: #f1f5f9;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
  transition: background 0.14s, border-color 0.14s;
}
.map-label:hover {
  background: rgba(14, 165, 233, 0.96);
  border-color: #fff;
  color: #fff;
  z-index: 30;
}
/* 🟡 Gold = Home */
.map-label.label-home {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(217, 119, 6, 0.95));
  border-color: #fef08a;
  color: #111827;
  font-weight: 800;
}
/* 🟠 Warm Orange = Playable Minigame Station */
.map-label.label-game-spot {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.88), rgba(194, 65, 12, 0.88));
  border-color: #fdba74;
  color: #fff;
}
/* 🔵 Blue = Buildable Council Project */
.map-label.label-project {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.92), rgba(29, 78, 216, 0.92));
  border-color: #7dd3fc;
}
.map-label.label-project-done {
  background: rgba(22, 101, 52, 0.82);
  border-color: #86efac;
  opacity: 0.82;
}
.lbl-game {
  font-size: 10px;
}

/* ---------------- SINGLE-ROW MACBOOK-PERFECT TOP HUD ---------------- */
.hud-top {
  position: fixed;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
.hud-top > * {
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 13px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.crest {
  font-size: 20px;
  line-height: 1;
}
.brand-title {
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand-title span {
  color: var(--accent);
}
.brand-sub {
  font-size: 10.5px;
  color: #fde68a;
  font-weight: 700;
  white-space: nowrap;
}

.stats-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 1;
  min-width: 0;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 12px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.stat-ico {
  font-size: 16px;
}
.stat-val {
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.1;
}
.stat-sub {
  font-size: 10px;
  color: var(--green);
  font-weight: 700;
}
.phase-sub {
  font-size: 10px;
  color: #7dd3fc;
  font-weight: 700;
}

.mini-bars {
  display: flex;
  gap: 5px;
  margin-top: 2px;
  font-size: 9.5px;
}
.mini-bars > span {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.mini-bars .bar {
  display: inline-block;
  width: 22px;
  height: 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}
.mini-bars .bar b {
  display: block;
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, #38bdf8, #4ade80);
  transition: width 0.35s ease;
}

.speed-btns {
  display: flex;
  gap: 2px;
  margin-left: 4px;
}
.speed-btns button {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}
.speed-btns button.active {
  background: var(--accent-bavaria);
  border-color: #7dd3fc;
}

.top-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.ctrl-btn {
  padding: 7px 11px;
  border-radius: 11px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
  white-space: nowrap;
  transition: background 0.14s, border-color 0.14s;
}
.ctrl-btn:hover {
  background: rgba(30, 41, 59, 0.96);
  border-color: var(--accent);
}
.ctrl-btn.active {
  border-color: var(--accent);
  color: #bae6fd;
}
.walk-btn {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.88), rgba(5, 150, 105, 0.88));
  border-color: #6ee7b7;
  color: #fff;
}
.walk-btn.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #fde047;
  color: #111827;
}

/* ---------------- CLEAN SETTINGS MENU POPOVER ---------------- */
.menu-popover {
  position: fixed;
  top: 62px;
  right: 10px;
  width: 230px;
  z-index: 35;
  padding: 8px;
  border-radius: 14px;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.48);
  display: none;
  flex-direction: column;
  gap: 4px;
}
.menu-popover.open {
  display: flex;
  animation: popIn 0.15s ease-out;
}
.menu-item {
  text-align: left;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.menu-item:hover {
  background: rgba(56, 189, 248, 0.2);
}
.menu-item.active {
  background: rgba(56, 189, 248, 0.22);
  border-color: rgba(56, 189, 248, 0.45);
  color: #bae6fd;
}
.menu-item.danger {
  color: #fca5a5;
}
.menu-sep {
  height: 1px;
  background: var(--border);
  margin: 3px 4px;
}

/* ---------------- LEFT DOCK (MISSIONS + COUNCIL VOTE, ZERO OVERLAP!) ---------------- */
.left-dock {
  position: fixed;
  top: 64px;
  left: 10px;
  width: 256px;
  z-index: 18;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.left-dock > * {
  pointer-events: auto;
}

.missions-panel {
  border-radius: 14px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  font-size: 12.5px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.missions-panel.collapsed .missions-body {
  display: none;
}
.missions-panel.collapsed .chevron {
  transform: rotate(-90deg);
}
.missions-body {
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 36vh;
  overflow-y: auto;
}
.mission-item {
  padding: 7px 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.14s, border-color 0.14s;
}
.mission-item:hover:not(.done) {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.55);
}
.mission-item.done {
  opacity: 0.52;
  background: rgba(34, 197, 94, 0.1);
}
.m-head {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 700;
  gap: 5px;
}
.m-reward {
  color: var(--gold);
  font-size: 10.5px;
  white-space: nowrap;
}
.m-desc {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.32;
}

.policy-alert-btn {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid #fde047;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #111827;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.42);
  display: none;
  animation: pulseVote 1.6s infinite;
}
.policy-alert-btn.visible {
  display: block;
}
@keyframes pulseVote {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* ---------------- RIGHT DRAWERS (PROJECTS, GAMES, TRAFFIC) ---------------- */
.projects-drawer {
  position: fixed;
  top: 64px;
  right: 10px;
  width: 300px;
  max-height: calc(100vh - 180px);
  z-index: 24;
  padding: 13px;
  border-radius: 16px;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
}
.projects-drawer.open {
  display: flex;
  animation: popIn 0.16s ease-out;
}
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}
.drawer-x {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}
.drawer-title {
  font-size: 14px;
  font-weight: 800;
}
.drawer-sub {
  font-size: 11px;
  color: var(--muted);
}
.projects-list,
.traffic-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow-y: auto;
  padding-right: 2px;
}
.proj-card {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s;
}
.proj-card:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--accent);
}
.proj-card.built {
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(34, 197, 94, 0.12);
}
.proj-ico {
  font-size: 20px;
  flex-shrink: 0;
}
.proj-name {
  font-size: 12px;
  font-weight: 700;
}
.proj-cost {
  font-size: 11px;
  color: var(--gold);
  font-weight: 600;
}
.proj-card.built .proj-cost {
  color: var(--green);
}

/* Traffic & Bus 214 Control Panel */
.tr-sec-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7dd3fc;
  margin-top: 6px;
}
.tr-btn-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.tr-pill-btn {
  padding: 7px 5px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.tr-pill-btn.active {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  border-color: #7dd3fc;
}
.tr-stop-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.tr-stop-row.on {
  border-color: #facc15;
  background: rgba(250, 204, 21, 0.14);
}
.tr-sig-btn {
  text-align: left;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
}
.tr-sig-btn small {
  color: #fde68a;
  font-weight: 600;
  font-size: 10.5px;
}
.tr-sig-btn.active {
  border-color: #4ade80;
  background: rgba(34, 197, 94, 0.16);
}

/* ---------------- INFO / BUILD CARD ---------------- */
.info-card {
  position: fixed;
  right: 12px;
  bottom: 114px;
  width: 315px;
  z-index: 26;
  padding: 15px;
  border-radius: 16px;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  display: none;
}
.info-card.visible {
  display: block;
  animation: popIn 0.16s ease-out;
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.card-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  cursor: pointer;
}
.card-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #7dd3fc;
  margin-bottom: 4px;
}
.info-card h3 {
  font-size: 15.5px;
  margin-bottom: 6px;
  padding-right: 22px;
}
.info-card p {
  font-size: 12px;
  line-height: 1.46;
  color: #cbd5e1;
  margin-bottom: 7px;
}
.card-effect {
  color: #fde68a !important;
  font-weight: 600;
}
.card-actions-col {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
}
.card-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}
.btn-primary,
.btn-secondary,
.btn-game {
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  border: none;
}
.btn-primary {
  flex: 1;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
}
.btn-primary.disabled {
  opacity: 0.52;
  background: #475569;
}
.btn-secondary {
  flex: 1;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
}
.btn-game {
  width: 100%;
  border: 1px solid #fde047;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #fff;
  font-weight: 800;
}
.built-pill {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(74, 222, 128, 0.4);
  color: #86efac;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

/* ---------------- CONTEXT PILLS ---------------- */
.street-badge {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 23;
  padding: 6px 15px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid #38bdf8;
  color: #e0f2fe;
  font-size: 12.5px;
  font-weight: 800;
  display: none;
}
.street-badge.visible { display: block; }

.walk-prompt {
  position: fixed;
  bottom: 112px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 26;
  padding: 10px 20px;
  border-radius: 999px;
  border: 2px solid #fde047;
  background: rgba(15, 23, 42, 0.94);
  color: #fef08a;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: none;
}
.walk-prompt.visible { display: block; }

.coverage-legend {
  position: fixed;
  bottom: 112px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 22;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 11.5px;
  font-weight: 700;
  display: none;
}
.coverage-legend.visible { display: block; }

.build-hint {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 24;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.95);
  border: 1px solid #bae6fd;
  font-size: 12.5px;
  font-weight: 700;
  display: none;
}
.build-hint.visible { display: block; }

.toast {
  position: fixed;
  top: 102px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  z-index: 35;
  padding: 9px 16px;
  border-radius: 12px;
  background: var(--bg-glass-strong);
  border: 1px solid var(--gold);
  color: #fef3c7;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
}
.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------------- COMPACT BOTTOM DOCK ---------------- */
.hud-bottom {
  position: fixed;
  bottom: 8px;
  left: 10px;
  right: 10px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}
.hud-bottom > * {
  pointer-events: auto;
}

.quick-jumps {
  display: flex;
  gap: 5px;
  max-width: 100%;
  overflow-x: auto;
  padding: 2px 4px;
  scrollbar-width: none;
}
.quick-jumps::-webkit-scrollbar { display: none; }

.jump-btn {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.jump-btn:hover {
  background: rgba(30, 41, 59, 0.96);
  border-color: var(--accent);
}
.jump-btn.jump-home {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.94), rgba(217, 119, 6, 0.94));
  color: #111827;
  border-color: #fde047;
}

.bottom-bar-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 1260px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  border-radius: 14px;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 4px 7px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
}
.tool-btn span { font-size: 16px; line-height: 1.1; }
.tool-btn small { font-size: 10px; font-weight: 700; margin-top: 1px; }
.tool-btn:hover { background: rgba(255, 255, 255, 0.14); }
.tool-btn.active {
  background: rgba(14, 165, 233, 0.34);
  border-color: var(--accent);
}
.tool-btn.proj-highlight {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.45), rgba(37, 99, 235, 0.45));
  border-color: rgba(125, 211, 252, 0.65);
}
.tool-btn.zoom-btn {
  min-width: 44px;
}
.tool-sep {
  width: 1px;
  height: 30px;
  background: var(--border);
  margin: 0 2px;
}

.news-bar {
  flex: 1;
  min-width: 240px;
  max-width: 680px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 14px;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(251, 191, 36, 0.24);
  font-size: 11.5px;
  box-shadow: var(--shadow);
}

/* Juicy floating ±k€ HUD feedback popup */
.stat-pill {
  position: relative;
}
.money-float {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  pointer-events: none;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.65);
  animation: floatDelta 1.1s ease-out forwards;
}
.money-float.pos { color: #4ade80; }
.money-float.neg { color: #fb923c; }
@keyframes floatDelta {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.9); }
  18% { opacity: 1; transform: translate(-50%, 6px) scale(1.06); }
  100% { opacity: 0; transform: translate(-50%, 26px) scale(0.95); }
}
.news-tag {
  background: #f59e0b;
  color: #111827;
  font-weight: 800;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
}
.news-text {
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------------- MODALS (MINIGAMES, TUTORIAL, VOTES, AKTE, IMPRESSUM) ---------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(8, 13, 26, 0.74);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modal-backdrop.open {
  display: flex;
}
.mg-dialog,
.story-dialog {
  position: relative;
  width: min(550px, 95vw);
  max-height: 92vh;
  overflow-y: auto;
  padding: 20px 22px;
  border-radius: 20px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.58);
  animation: popIn 0.2s ease-out;
}
.mg-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}
.mg-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.mg-ico { font-size: 34px; }
.mg-header h2 { font-size: 19px; line-height: 1.15; }
.mg-sub { font-size: 12px; color: var(--gold); font-weight: 700; }
.mg-rules { font-size: 12.5px; color: #cbd5e1; line-height: 1.45; margin-bottom: 12px; }
.mg-hud-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13.5px;
  font-weight: 800;
  margin-bottom: 10px;
}
.mg-canvas {
  display: block;
  margin: 0 auto 10px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  max-width: 100%;
  height: auto;
  cursor: pointer;
}
.mg-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mg-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.mg-choice-btn {
  padding: 11px 8px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.mg-choice-btn em {
  font-style: normal;
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.16);
  margin-right: 4px;
}
.mg-choice-btn:hover { background: rgba(56, 189, 248, 0.25); border-color: var(--accent); }
.ps-sw.active-sw { background: rgba(56, 189, 248, 0.36); box-shadow: 0 0 14px rgba(56, 189, 248, 0.45); }
.beer-hold-btn { width: 100%; padding: 13px; font-size: 14.5px; }
.cr-pad { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.cr-pad button {
  width: 46px; height: 36px; border-radius: 9px; border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.12); font-size: 16px; cursor: pointer;
}

.mg-result {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 800;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.mg-result.win { background: rgba(34, 197, 94, 0.22); border: 1px solid #4ade80; color: #bbf7d0; }
.mg-result.lose { background: rgba(239, 68, 68, 0.2); border: 1px solid #f87171; color: #fecaca; }
.mg-score-pill {
  padding: 3px 9px; border-radius: 999px; background: rgba(15, 23, 42, 0.55); color: #fde047; font-size: 12px; white-space: nowrap;
}
.mg-result-btns { display: flex; gap: 8px; margin-top: 10px; }

/* Tutorial, Policy & Akte Modals */
.story-top-tag { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; color: var(--gold); }
.tut-top-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.tut-skip {
  border: none; background: rgba(255, 255, 255, 0.1); color: var(--muted); font-size: 11.5px;
  font-weight: 700; padding: 4px 10px; border-radius: 999px; cursor: pointer;
}
.tut-dots { display: flex; gap: 6px; margin-bottom: 14px; }
.tut-dots i { display: block; height: 5px; flex: 1; border-radius: 4px; background: rgba(255, 255, 255, 0.16); }
.tut-dots i.done { background: #4ade80; }
.tut-dots i.on { background: #38bdf8; }
.story-row { display: flex; align-items: center; gap: 13px; margin-bottom: 12px; }
.story-avatar {
  font-size: 40px; width: 58px; height: 58px; display: flex; align-items: center; justify-content: center;
  border-radius: 14px; background: rgba(56, 189, 248, 0.16); border: 1px solid rgba(56, 189, 248, 0.4); flex-shrink: 0;
}
.story-text { font-size: 13.5px; line-height: 1.56; color: #e2e8f0; margin-bottom: 12px; }
.story-tip {
  font-size: 12px; padding: 10px 12px; border-radius: 10px;
  background: rgba(251, 191, 36, 0.14); border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fde68a; margin-bottom: 14px; line-height: 1.45;
}
.story-actions { display: flex; gap: 8px; justify-content: flex-end; }
.policy-options { display: flex; flex-direction: column; gap: 9px; margin-top: 10px; }
.policy-opt-btn {
  text-align: left; padding: 11px 14px; border-radius: 12px; border: 1px solid rgba(56, 189, 248, 0.4);
  background: rgba(255, 255, 255, 0.07); color: #f8fafc; cursor: pointer; display: flex; flex-direction: column; gap: 3px;
}
.policy-opt-btn:hover { background: rgba(56, 189, 248, 0.22); }
.policy-opt-btn span { font-size: 12px; color: #fde68a; font-weight: 600; }
.archive-list { display: flex; flex-direction: column; gap: 9px; }
.arch-item { padding: 10px 12px; border-radius: 11px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border); }
.arch-item.locked { opacity: 0.45; }
.arch-head { font-size: 13px; margin-bottom: 4px; }
.arch-item p { font-size: 12px; color: #cbd5e1; line-height: 1.45; }

/* ---------------- CREDITS FOOTER & IMPRESSUM ---------------- */
.splash-credits {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
}
.splash-credits a,
.credits-footer a {
  color: #7dd3fc;
  text-decoration: none;
  font-weight: 700;
}
.splash-credits a:hover,
.credits-footer a:hover {
  text-decoration: underline;
  color: #bae6fd;
}
.credits-quote,
.cf-quote {
  color: #fde68a;
  font-style: italic;
}
.credits-imprint-btn {
  background: none;
  border: none;
  padding: 0 2px;
  color: #cbd5e1;
  font-size: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.credits-imprint-btn:hover {
  color: #ffffff;
}

.credits-footer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 10.5px;
  color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}
.cf-dot {
  opacity: 0.45;
}

.imprint-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #e2e8f0;
  margin-bottom: 12px;
}
.imprint-box a {
  color: #7dd3fc;
  text-decoration: none;
  font-weight: 600;
}
.imprint-box a:hover {
  text-decoration: underline;
}

/* ---------------- PC/MAC TIP & VEHICLE DRIVE/RIDE COCKPIT HUD ---------------- */
.splash-pc-tip {
  margin-top: 10px;
  padding: 6px 11px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(125, 211, 252, 0.34);
  color: #bae6fd;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.ctrl-btn.drive-btn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.85), rgba(217, 119, 6, 0.85));
  border-color: rgba(253, 224, 71, 0.65);
  color: #111827;
  font-weight: 800;
}
.ctrl-btn.drive-btn.active {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  border-color: #bae6fd;
  color: #ffffff;
}

.drive-hud {
  position: fixed;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 26;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 16px;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(251, 191, 36, 0.55);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  max-width: 94vw;
}
.drive-hud.visible {
  display: flex;
}
.drive-hud-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}
.drive-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #fef08a;
}
.drive-speed {
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid rgba(125, 211, 252, 0.45);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 800;
  color: #7dd3fc;
}
.drive-street {
  font-size: 11.5px;
  color: #cbd5e1;
  font-weight: 600;
}
.drive-pill {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.drive-pill:hover {
  background: rgba(56, 189, 248, 0.28);
  border-color: #7dd3fc;
}
.drive-pill.active {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  border-color: #bae6fd;
}
.drive-pill.exit {
  background: rgba(239, 68, 68, 0.24);
  border-color: rgba(248, 113, 113, 0.55);
  color: #fecaca;
}
.drive-hint {
  font-size: 10.5px;
  color: #94a3b8;
  font-weight: 600;
}
