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

:root {
  --bg-glass: rgba(15, 23, 42, 0.82);
  --bg-glass-strong: rgba(15, 23, 42, 0.92);
  --border: rgba(255, 255, 255, 0.14);
  --accent: #38bdf8;
  --accent-bavaria: #0ea5e9;
  --gold: #fbbf24;
  --green: #4ade80;
  --text: #f8fafc;
  --muted: #94a3b8;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

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;
}

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

/* ---------------- FLOATING 3D MAP LABELS ---------------- */
#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: 5px;
  padding: 3px 9px 3px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
  transition: background 0.15s, border-color 0.15s;
}
.map-label:hover {
  background: rgba(14, 165, 233, 0.92);
  border-color: #fff;
  z-index: 20;
}
.map-label.label-home {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.94), rgba(217, 119, 6, 0.94));
  border-color: #fef08a;
  color: #111827;
  font-weight: 800;
}
.map-label.label-food {
  border-color: rgba(251, 146, 60, 0.65);
}
.map-label.label-project {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.92), rgba(14, 116, 144, 0.92));
  border-color: #7dd3fc;
}
.map-label.label-project-done {
  background: rgba(22, 101, 52, 0.82);
  border-color: #86efac;
  opacity: 0.85;
}

/* ---------------- TOP HUD ---------------- */
.hud-top {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.hud-top > * {
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 14px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.crest {
  font-size: 24px;
  line-height: 1;
}
.brand-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.brand-title span {
  color: var(--accent);
}
.brand-sub {
  font-size: 11px;
  color: var(--muted);
}

.stats-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 13px;
  border-radius: 14px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.stat-ico {
  font-size: 18px;
}
.stat-val {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
}
.stat-sub {
  font-size: 11px;
  color: var(--green);
  font-weight: 600;
}

.mini-bars {
  display: flex;
  gap: 7px;
  margin-top: 2px;
  font-size: 10px;
}
.mini-bars > span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.mini-bars .bar {
  display: inline-block;
  width: 28px;
  height: 5px;
  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);
  border-radius: 3px;
  transition: width 0.35s ease;
}

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

.top-controls {
  display: flex;
  gap: 6px;
}
.ctrl-btn {
  padding: 8px 11px;
  border-radius: 12px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 0.15s;
}
.ctrl-btn:hover {
  background: rgba(30, 41, 59, 0.95);
}
.ctrl-btn.active {
  border-color: var(--accent);
  color: #bae6fd;
}

/* ---------------- LEFT MISSIONS PANEL ---------------- */
.missions-panel {
  position: fixed;
  top: 78px;
  left: 12px;
  width: 278px;
  z-index: 18;
  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: 10px 13px;
  font-size: 13px;
  font-weight: 700;
  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: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 44vh;
  overflow-y: auto;
}

.mission-item {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.15s, border-color 0.15s;
}
.mission-item:hover:not(.done) {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.5);
}
.mission-item.done {
  opacity: 0.58;
  background: rgba(34, 197, 94, 0.1);
}
.m-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
}
.m-reward {
  color: var(--gold);
  font-size: 11px;
  white-space: nowrap;
}
.m-desc {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.35;
}

/* ---------------- RIGHT PROJECTS DRAWER ---------------- */
.projects-drawer {
  position: fixed;
  top: 78px;
  right: 12px;
  width: 300px;
  max-height: 60vh;
  z-index: 19;
  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;
}
.drawer-title {
  font-size: 14px;
  font-weight: 800;
}
.drawer-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 10px;
}
.projects-list {
  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: 9px 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.15s, border-color 0.15s;
}
.proj-card:hover {
  background: rgba(56, 189, 248, 0.18);
  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: 22px;
  flex-shrink: 0;
}
.proj-name {
  font-size: 12.5px;
  font-weight: 700;
}
.proj-cost {
  font-size: 11.5px;
  color: var(--gold);
  font-weight: 600;
}
.proj-card.built .proj-cost {
  color: var(--green);
}

/* ---------------- INFO / BUILD CARD ---------------- */
.info-card {
  position: fixed;
  right: 16px;
  bottom: 148px;
  width: 330px;
  z-index: 25;
  padding: 16px;
  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.18s ease-out;
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(10px) 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.1);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
}
.card-close:hover {
  background: rgba(255, 255, 255, 0.2);
}
.card-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #7dd3fc;
  margin-bottom: 4px;
}
.info-card h3 {
  font-size: 16px;
  margin-bottom: 7px;
  padding-right: 20px;
}
.info-card p {
  font-size: 12.5px;
  line-height: 1.48;
  color: #cbd5e1;
  margin-bottom: 8px;
}
.card-effect {
  color: #fde68a !important;
  font-weight: 600;
}
.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
}
.btn-primary,
.btn-secondary {
  padding: 9px 13px;
  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:hover {
  filter: brightness(1.1);
}
.btn-primary.disabled {
  opacity: 0.55;
  background: #475569;
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}
.built-pill {
  flex: 1;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(74, 222, 128, 0.4);
  color: #86efac;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
}

/* ---------------- TOAST & BUILD HINT ---------------- */
.build-hint {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 24;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.94);
  border: 1px solid #bae6fd;
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow);
  display: none;
}
.build-hint.visible {
  display: block;
}

.toast {
  position: fixed;
  top: 122px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  z-index: 30;
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--bg-glass-strong);
  border: 1px solid var(--gold);
  color: #fef3c7;
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

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

.quick-jumps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}
.jump-btn {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s;
}
.jump-btn:hover {
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.96);
  border-color: var(--accent);
}
.jump-btn.jump-home {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.92), rgba(217, 119, 6, 0.92));
  color: #111827;
  font-weight: 800;
  border-color: #fde047;
}

.toolbar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 16px;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 6px 10px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.tool-btn span {
  font-size: 18px;
  line-height: 1.1;
}
.tool-btn small {
  font-size: 10.5px;
  font-weight: 600;
  margin-top: 2px;
}
.tool-btn:hover {
  background: rgba(255, 255, 255, 0.13);
}
.tool-btn.active {
  background: rgba(14, 165, 233, 0.32);
  border-color: var(--accent);
}
.tool-btn.proj-highlight {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.42), rgba(37, 99, 235, 0.42));
  border-color: rgba(125, 211, 252, 0.6);
}
.tool-sep {
  width: 1px;
  height: 34px;
  background: var(--border);
  margin: 0 2px;
}

.controls-hint {
  display: flex;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.65);
  font-size: 11px;
  color: var(--muted);
}

.news-bar {
  width: min(860px, 100%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 13px;
  border-radius: 10px;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  font-size: 12px;
}
.news-tag {
  background: #f59e0b;
  color: #111827;
  font-weight: 800;
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
}
.news-text {
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------------- V1.0: WALK MODE, STORY, MINIGAMES & DE/EN ---------------- */
.top-controls {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.walk-btn {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.85), rgba(5, 150, 105, 0.85));
  border-color: #6ee7b7;
  color: #fff;
  font-weight: 800;
}
.walk-btn.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #fde047;
  color: #111827;
}

.lbl-game {
  margin-left: 2px;
  font-size: 10.5px;
}

.card-actions-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.card-actions-col .card-actions {
  margin-top: 0;
}
.btn-game {
  width: 100%;
  padding: 10px 14px;
  border-radius: 11px;
  border: 1px solid #fde047;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.35);
}
.btn-game:hover {
  filter: brightness(1.08);
}

.walk-prompt {
  position: fixed;
  bottom: 148px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 26;
  padding: 11px 22px;
  border-radius: 999px;
  border: 2px solid #fde047;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.94));
  color: #fef08a;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  display: none;
}
.walk-prompt.visible {
  display: block;
  animation: popIn 0.16s ease-out;
}

/* ---------------- MODALS (MINIGAMES & STORY) ---------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(8, 13, 26, 0.72);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.open {
  display: flex;
}

.mg-dialog,
.story-dialog {
  position: relative;
  width: min(520px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: 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: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
}
.mg-close:hover {
  background: rgba(255, 255, 255, 0.24);
}
.mg-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.mg-ico {
  font-size: 36px;
}
.mg-header h2 {
  font-size: 20px;
  line-height: 1.15;
}
.mg-sub {
  font-size: 12px;
  color: var(--gold);
  font-weight: 700;
}
.mg-rules {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.45;
  margin-bottom: 14px;
}
.mg-hud-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 12px;
}

.mg-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.mg-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.mg-choice-btn {
  padding: 13px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
}
.mg-choice-btn em {
  display: inline-block;
  font-style: normal;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  margin-right: 4px;
}
.mg-choice-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: var(--accent);
}
.mg-choice-btn:active {
  transform: scale(0.96);
}

/* Butcher Counter */
.bt-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(245, 158, 11, 0.15));
  border: 1px solid rgba(251, 191, 36, 0.35);
}
.bt-customer {
  font-size: 52px;
}
.bt-bubble {
  background: #fff;
  color: #111827;
  padding: 10px 16px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  min-width: 195px;
}
.bt-bubble small {
  font-size: 11px;
  color: #64748b;
  font-weight: 700;
}
.bt-bubble strong {
  font-size: 17px;
}

/* Beer Mug Pour */
.beer-arena {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 10px 0 14px;
}
.beer-mug {
  position: relative;
  width: 116px;
  height: 176px;
  border: 5px solid rgba(255, 255, 255, 0.72);
  border-top: 3px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px 8px 18px 18px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.beer-sweet-zone {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 78%;
  height: 14%;
  background: rgba(74, 222, 128, 0.28);
  border-top: 2px dashed #4ade80;
  border-bottom: 2px dashed #4ade80;
  z-index: 4;
}
.beer-liquid {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  background: linear-gradient(180deg, #f59e0b, #d97706);
  z-index: 2;
}
.beer-foam {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  background: #fffbeb;
  border-radius: 6px 6px 0 0;
  z-index: 3;
}
.beer-status {
  font-size: 14px;
  font-weight: 800;
  color: #fde68a;
  min-height: 22px;
}
.beer-hold-btn {
  width: 100%;
  padding: 14px;
  font-size: 15px;
}

/* Kindergarten Lantern Tiles */
.kg-tile {
  padding: 26px 12px;
  border-radius: 16px;
  border: 2px solid var(--tc);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.1s, background 0.12s, box-shadow 0.12s;
}
.kg-tile.lit,
.kg-tile:active {
  background: var(--tc);
  color: #111827;
  transform: scale(1.04);
  box-shadow: 0 0 28px var(--tc);
}

/* Road Crossing & Bells Canvas */
.cr-canvas {
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  max-width: 100%;
}
.cr-pad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}
.cr-pad button {
  width: 48px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.12);
  font-size: 18px;
  cursor: pointer;
}
.cr-pad button:hover {
  background: rgba(56, 189, 248, 0.3);
}

/* Post Parcel Box */
.pkg-stage {
  display: flex;
  justify-content: center;
  padding: 14px 0;
}
.pkg-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 26px;
  border-radius: 16px;
  background: linear-gradient(135deg, #d97706, #b45309);
  border: 2px solid #fde68a;
  color: #fff;
  min-width: 210px;
}
.pkg-box.vip {
  background: linear-gradient(135deg, #f59e0b, #dc2626);
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.55);
}
.pkg-box > div {
  font-size: 36px;
}
.pkg-box strong {
  font-size: 16px;
}

.mg-result {
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}
.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-result-btns {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* Story Dialog */
.story-top-tag {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: 10px;
}
.story-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.story-avatar {
  font-size: 46px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.4);
  flex-shrink: 0;
}
.story-speaker {
  font-size: 12px;
  color: #7dd3fc;
  font-weight: 700;
}
.story-dialog h3 {
  font-size: 18px;
  line-height: 1.25;
}
.story-text {
  font-size: 14px;
  line-height: 1.58;
  color: #e2e8f0;
  margin-bottom: 12px;
}
.story-tip {
  font-size: 12.5px;
  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;
}
.story-actions {
  display: flex;
  justify-content: flex-end;
}
.archive-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.arch-item {
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}
.arch-item.locked {
  opacity: 0.45;
}
.arch-head {
  font-size: 13.5px;
  margin-bottom: 4px;
}
.arch-item p {
  font-size: 12.5px;
  color: #cbd5e1;
  line-height: 1.45;
}

/* ---------------- V2.0: CANVAS MINIGAMES, TUTORIAL, COUNCIL VOTES, STREET BADGE, COVERAGE ---------------- */
.phase-sub {
  font-size: 10.5px;
  color: #7dd3fc;
  font-weight: 700;
  white-space: nowrap;
}

.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-score-pill {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  color: #fde047;
  font-size: 12.5px;
}

.ps-sw.active-sw {
  background: rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.45);
  transform: scale(1.02);
}

/* Interactive Onboarding Tutorial */
.tut-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.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-skip:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}
.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-actions {
  gap: 8px;
}

/* Municipal Council Policy Vote Pill & Modal */
.policy-alert-btn {
  position: fixed;
  top: 84px;
  left: 302px;
  z-index: 24;
  padding: 10px 16px;
  border-radius: 999px;
  border: 2px solid #fde047;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(245, 158, 11, 0.45);
  display: none;
  animation: pulseVote 1.6s infinite;
}
.policy-alert-btn.visible {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
@keyframes pulseVote {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.policy-options {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 12px;
}
.policy-opt-btn {
  text-align: left;
  padding: 12px 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;
  transition: background 0.15s, border-color 0.15s;
}
.policy-opt-btn:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: #7dd3fc;
}
.policy-opt-btn strong {
  font-size: 13.5px;
}
.policy-opt-btn span {
  font-size: 12px;
  color: #fde68a;
  font-weight: 600;
}

/* Walk Mode Live Street Name Badge & Coverage Legend */
.street-badge {
  position: fixed;
  top: 78px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 23;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(10px);
  border: 1px solid #38bdf8;
  color: #e0f2fe;
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow);
  display: none;
}
.street-badge.visible {
  display: block;
}

.coverage-legend {
  position: fixed;
  bottom: 146px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 22;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  display: none;
}
.coverage-legend.visible {
  display: block;
}
