:root {
  --bg: #2c1457;
  --bg-deep: #0c0518;
  --panel: #4a2494;
  --panel-2: #5c2fb8;
  --panel-border: #000000;
  --text: #ffffff;
  --text-dim: #e0d2ff;
  --land: #5b31a8;
  --land-hover: #7443cc;
  --border: #050014;
  --accent: #2be8ff;
  --accent-2: #7cf6ff;
  --accent-dim: #1fc4d6;
  --accent-glow: rgba(43,232,255,0.75);
  --magenta: #ff36e0;
  --magenta-dim: #b0169a;
  --yellow: #ffe93b;
  --lime: #8dff3b;
  --orange: #ff8a1f;
  --danger: #ff5577;
  --success: #8dff3b;
  --found-fill: #1fe8d4;
  --no-credit-fill: #ffcf1f;
  font-family: "VT323", "Courier New", monospace;
}

* { box-sizing: border-box; }
*, *::before, *::after { image-rendering: pixelated; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
}

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  font-size: 19px;
}

button, input, select {
  font-family: inherit;
  color: inherit;
}

h1, h2, .pixel {
  font-family: "Press Start 2P", monospace;
}

/* retro scrollbars */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg-deep); border-left: 2px solid #000; }
::-webkit-scrollbar-thumb { background: var(--accent-dim); border: 2px solid #000; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* CRT scanline overlay */
.crt-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0.16) 0px,
    rgba(0,0,0,0.16) 1px,
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,0) 3px
  );
  mix-blend-mode: multiply;
  opacity: 0.55;
}

/* ---------- Topbar ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-bottom: 4px solid #000;
  background: linear-gradient(180deg, var(--panel-2), var(--bg-deep));
  flex-shrink: 0;
  flex-wrap: wrap;
  row-gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  font-size: 22px;
  filter: drop-shadow(2px 2px 0 #000);
}

.brand h1 {
  font-size: 15px;
  letter-spacing: 1px;
  font-weight: 400;
  margin: 0;
  color: var(--yellow);
  text-shadow: 2px 2px 0 #000, 0 0 10px var(--magenta);
}

.player-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}
.player-name {
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  color: #04141a;
  background: var(--lime);
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000;
  padding: 6px 10px;
  white-space: nowrap;
}
.player-name:empty { display: none; }

.mode-badge {
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  color: #1a0b33;
  background: var(--accent-2);
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000;
  padding: 6px 10px;
  white-space: nowrap;
}
.mode-badge:empty { display: none; }

.timer-display {
  font-family: "Press Start 2P", monospace;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--accent-2);
  background: #000;
  border: 3px solid var(--accent-dim);
  padding: 7px 12px;
  letter-spacing: 1px;
  text-shadow: 0 0 6px var(--accent-glow);
}
.timer-display.paused {
  color: var(--text-dim);
  border-color: #000;
  text-shadow: none;
}

.progress-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.progress-count {
  font-family: "Press Start 2P", monospace;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
}

.progress-track {
  width: 220px;
  height: 16px;
  background: #000;
  border: 3px solid #000;
  box-shadow: inset 0 0 0 2px #000;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(
    90deg,
    var(--magenta) 0px, var(--magenta) 8px,
    var(--accent) 8px, var(--accent) 16px
  );
  transition: width 0.4s steps(12);
}

.ghost-btn {
  background: var(--panel);
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000;
  color: var(--text);
  padding: 8px 14px;
  cursor: pointer;
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  text-transform: uppercase;
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}
a.ghost-btn {
  text-decoration: none;
  display: inline-block;
}
.ghost-btn:hover {
  color: var(--accent-2);
  background: var(--panel-2);
}
.ghost-btn:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 #000;
}

/* ---------- Layout ---------- */

.layout {
  flex: 1;
  display: flex;
  min-height: 0;
}

.map-pane {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 4px solid #000;
}

.continent-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 4px solid #000;
  background: var(--bg-deep);
  flex-shrink: 0;
}
.chip-btn.nav-right {
  margin-left: auto;
  color: var(--yellow);
}

.chip-btn {
  background: var(--panel);
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000;
  color: var(--text-dim);
  padding: 7px 14px;
  cursor: pointer;
  font-family: "Press Start 2P", monospace;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: transform 0.06s ease;
}
.chip-btn:hover {
  color: var(--text);
  background: var(--panel-2);
}
.chip-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 #000; }
.chip-btn.active {
  color: #1a0b33;
  background: var(--yellow);
  box-shadow: 3px 3px 0 #000, 0 0 12px var(--yellow);
}

.map-wrap {
  flex: 1;
  position: relative;
  min-height: 0;
  background: var(--bg-deep);
  box-shadow: inset 0 0 0 6px var(--panel-2), inset 0 0 0 10px #000;
}

#map {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}
#map:active { cursor: grabbing; }

.country {
  fill: var(--land);
  stroke: #000;
  stroke-width: 1.1;
  vector-effect: non-scaling-stroke;
  transition: fill 0.25s ease, stroke 0.25s ease;
  cursor: pointer;
}
.country:hover {
  fill: var(--land-hover);
}
.country.found {
  fill: var(--found-fill);
  stroke: #000;
  stroke-width: 1.3;
}
.country.found.no-credit {
  fill: var(--no-credit-fill);
  stroke: #000;
}
.country.found:hover {
  filter: brightness(1.2);
}
.country.just-found {
  animation: pulseFound 0.9s ease;
}
.country.excluded {
  fill: var(--land);
  opacity: 0.4;
  cursor: default;
}
.country.excluded:hover {
  fill: var(--land);
  opacity: 0.55;
}
@keyframes pulseFound {
  0%   { filter: drop-shadow(0 0 0px rgba(43,232,255,0)); }
  30%  { filter: drop-shadow(0 0 14px var(--accent-glow)) brightness(1.4); }
  100% { filter: drop-shadow(0 0 0px rgba(43,232,255,0)); }
}

.zoom-controls {
  position: absolute;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.icon-btn {
  width: 34px;
  height: 34px;
  background: var(--panel);
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000;
  color: var(--text);
  font-family: "Press Start 2P", monospace;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.icon-btn:hover {
  color: var(--accent-2);
  background: var(--panel-2);
}
.icon-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 #000; }

.map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-2);
  letter-spacing: 1px;
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
  pointer-events: none;
  background: var(--bg-deep);
}
.map-loading.hidden { display: none; }

.map-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: var(--panel);
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000;
  color: var(--text);
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  letter-spacing: 0.5px;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}
.map-badge:hover {
  color: var(--accent-2);
  background: var(--panel-2);
}
.map-badge:active { transform: translate(3px, 3px); box-shadow: 0 0 0 #000; }

/* ---------- Click popover ---------- */

.click-popover {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--panel);
  border: 4px solid #000;
  box-shadow: 6px 6px 0 #000, 0 0 24px var(--accent-glow);
  padding: 16px 18px;
  width: min(360px, 90%);
}
.click-popover.hidden { display: none; }

.popover-label {
  font-family: "Press Start 2P", monospace;
  font-size: 10.5px;
  color: var(--yellow);
  margin-bottom: 10px;
  letter-spacing: 0.4px;
}

.popover-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 20px;
  cursor: pointer;
}
.popover-close:hover { color: var(--danger); }

.popover-hint-mask {
  font-family: "Press Start 2P", monospace;
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--accent-2);
  margin-bottom: 10px;
}

.popover-clue-text {
  font-size: 16px;
  line-height: 1.35;
  color: var(--yellow);
  background: #000;
  border: 2px solid var(--magenta);
  padding: 8px 10px;
  margin-bottom: 10px;
}

.popover-actions {
  margin-top: 8px;
  display: flex;
  gap: 16px;
}

#popoverForm, #guessForm {
  display: flex;
  gap: 8px;
}

input[type="text"] {
  flex: 1;
  background: #000;
  border: 3px solid #000;
  box-shadow: inset 0 0 0 2px var(--accent-dim);
  color: var(--accent-2);
  padding: 9px 12px;
  font-size: 19px;
  outline: none;
}
input[type="text"]::placeholder { color: var(--text-dim); opacity: 0.7; }
input[type="text"]:focus {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.accent-btn {
  background: var(--lime);
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000;
  color: #0a1a02;
  font-weight: 700;
  padding: 9px 16px;
  cursor: pointer;
  font-family: "Press Start 2P", monospace;
  font-size: 10.5px;
  text-transform: uppercase;
  transition: transform 0.06s ease;
}
.accent-btn:hover {
  background: var(--yellow);
}
.accent-btn:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 #000;
}
.accent-btn.small, .ghost-btn.small {
  padding: 6px 10px;
  font-size: 9px;
}

.popover-feedback, .feedback {
  margin-top: 10px;
  font-size: 18px;
  line-height: 1.35;
  min-height: 18px;
}
.feedback.ok, .popover-feedback.ok { color: var(--lime); }
.feedback.warn, .popover-feedback.warn { color: var(--yellow); }
.feedback.err, .popover-feedback.err { color: var(--danger); }

/* ---------- Sidebar ---------- */

.sidebar {
  width: 350px;
  flex-shrink: 0;
  background: var(--bg-deep);
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel {
  background: var(--panel);
  border: 3px solid #000;
  box-shadow: 5px 5px 0 #000;
  padding: 14px;
}

.panel h2 {
  font-size: 11.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--yellow);
  margin: 0 0 12px;
  font-weight: 400;
  text-shadow: 1px 1px 0 #000;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-header h2 { margin: 0; }

.link-btn {
  background: none;
  border: none;
  color: var(--accent-2);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link-btn:hover { color: var(--yellow); }

.field-label {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin: 8px 0 4px;
}

select {
  width: 100%;
  background: #000;
  border: 3px solid #000;
  box-shadow: inset 0 0 0 2px var(--accent-dim);
  color: var(--accent-2);
  padding: 8px 10px;
  font-size: 16px;
  margin-bottom: 6px;
}

.hint-used-count {
  font-size: 13px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.hint-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.hint-controls select { margin-bottom: 0; flex: 1.2; }
.hint-controls input[type="text"] { flex: 1; }

.hint-list {
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.hint-item { display: flex; flex-direction: column; gap: 6px; }

.hint-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #000;
  border: 2px solid var(--accent-dim);
  padding: 7px 8px 7px 10px;
}
.hint-row .hint-mask {
  flex: 1;
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--accent-2);
  word-break: break-word;
}
.hint-row .hint-continent-tag {
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  flex-shrink: 0;
}
.hint-row .hint-reveal-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--magenta);
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  color: #1a0033;
  font-family: "Press Start 2P", monospace;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.hint-row .hint-reveal-btn:hover {
  background: var(--yellow);
}
.hint-row .hint-reveal-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 #000;
}
.hint-row .hint-reveal-btn:disabled {
  opacity: 0.3;
  cursor: default;
  transform: none;
  box-shadow: 2px 2px 0 #000;
}

.hint-row .hint-clue-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--accent);
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  color: #04141a;
  font-family: "Press Start 2P", monospace;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.hint-row .hint-clue-btn:hover {
  background: var(--yellow);
}
.hint-row .hint-clue-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 #000;
}
.hint-row .hint-clue-btn:disabled {
  opacity: 0.3;
  cursor: default;
  transform: none;
  box-shadow: 2px 2px 0 #000;
}

.hint-clue-text {
  font-size: 14px;
  line-height: 1.4;
  color: var(--yellow);
  background: #000;
  border: 2px dashed var(--accent-dim);
  padding: 8px 10px;
}
.hint-row.maxed { border-color: var(--yellow); }
.hint-row.maxed .hint-mask { color: var(--yellow); }
.hint-row-empty {
  color: var(--text-dim);
  font-size: 15px;
  padding: 10px 4px;
  text-align: center;
}

.hint-note {
  font-size: 13.5px;
  color: var(--text-dim);
  margin: 10px 0 0;
  line-height: 1.4;
}

.continent-progress {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.continent-progress li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.continent-progress .c-name {
  width: 100px;
  flex-shrink: 0;
  color: var(--text-dim);
  text-transform: uppercase;
  font-size: 12px;
}
.continent-progress .c-bar {
  flex: 1;
  height: 10px;
  background: #000;
  border: 2px solid #000;
  overflow: hidden;
}
.continent-progress .c-bar-fill {
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    var(--accent) 0px, var(--accent) 5px,
    var(--accent-dim) 5px, var(--accent-dim) 10px
  );
}
.continent-progress .c-num {
  width: 46px;
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-height: 220px;
  overflow-y: auto;
}
.chip-list .chip {
  background: var(--accent);
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  color: #04141a;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.06s ease;
}
.chip-list .chip:hover {
  background: var(--yellow);
}
.chip-list .chip:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 #000;
}
.chip-list.dim .chip {
  background: var(--panel-2);
  border-color: #000;
  color: var(--text-dim);
  box-shadow: 2px 2px 0 #000;
}
.chip-list .chip.no-credit {
  background: var(--yellow);
  border-color: #000;
  color: #3a2a00;
}

.hidden { display: none !important; }

/* ---------- Win overlay ---------- */

.win-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,2,20,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.win-card {
  background: var(--panel);
  border: 5px solid #000;
  box-shadow: 8px 8px 0 #000, 0 0 60px var(--accent-glow);
  padding: 36px 44px;
  text-align: center;
}
.win-title {
  font-family: "Press Start 2P", monospace;
  font-size: 16px;
  color: var(--yellow);
  text-shadow: 2px 2px 0 #000, 0 0 14px var(--magenta);
  margin-bottom: 12px;
  line-height: 1.6;
}
.win-sub {
  color: var(--text-dim);
  margin-bottom: 22px;
  font-size: 18px;
}

.win-stats {
  display: flex;
  gap: 22px;
  justify-content: center;
  margin-bottom: 26px;
}
.win-stats .stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: #000;
  border: 2px solid var(--accent-dim);
  padding: 10px 14px;
}
.win-stats .stat-value {
  font-family: "Press Start 2P", monospace;
  font-size: 16px;
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}
.win-stats .stat-label {
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-dim);
}
.win-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ---------- Generic modals (name entry / leaderboard) ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,2,20,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
}
.modal-card {
  position: relative;
  background: var(--panel);
  border: 5px solid #000;
  box-shadow: 8px 8px 0 #000, 0 0 40px rgba(255,54,224,0.35);
  padding: 32px 36px;
  width: min(420px, 90vw);
  text-align: center;
}
.modal-title {
  font-family: "Press Start 2P", monospace;
  font-size: 16px;
  color: var(--yellow);
  text-shadow: 2px 2px 0 #000, 0 0 12px var(--magenta);
  margin-bottom: 10px;
  line-height: 1.6;
}
.modal-sub {
  color: var(--text-dim);
  font-size: 16px;
  margin-bottom: 20px;
}
#nameInput { text-align: left; width: 100%; margin-bottom: 16px; }

.mode-choice {
  display: flex;
  gap: 12px;
}
.mode-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  white-space: normal;
  line-height: 1.4;
}
.mode-btn-sub {
  font-family: "VT323", monospace;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0.3px;
  opacity: 0.85;
}

.leaderboard-card {
  width: min(600px, 92vw);
  text-align: left;
}
.leaderboard-card .modal-title,
.leaderboard-card .modal-sub {
  text-align: center;
}
.leaderboard-table-wrap {
  max-height: 50vh;
  overflow-y: auto;
}
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}
.leaderboard-table th {
  text-align: left;
  color: var(--yellow);
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 8px;
  border-bottom: 3px solid #000;
  position: sticky;
  top: 0;
  background: var(--panel);
}
.leaderboard-table td {
  padding: 8px;
  border-bottom: 2px solid #000;
}
.leaderboard-table tr.completed td { color: var(--lime); }
.leaderboard-table td.lb-rank { font-weight: 800; color: var(--text-dim); width: 28px; }
.leaderboard-table td.lb-loading { text-align: center; color: var(--text-dim); padding: 24px 10px; }
.leaderboard-empty {
  padding: 24px 10px;
  text-align: center;
  color: var(--text-dim);
  font-size: 16px;
}

/* ---------- Celebration banners ---------- */

.banner-stack {
  position: fixed;
  top: 96px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 45;
  pointer-events: none;
}
.celebrate-banner {
  background: var(--magenta);
  border: 4px solid #000;
  box-shadow: 6px 6px 0 #000;
  padding: 14px 28px;
  font-family: "Press Start 2P", monospace;
  font-size: 13px;
  color: #fff8ff;
  text-shadow: 2px 2px 0 #000;
  text-align: center;
  text-transform: uppercase;
  animation: bannerPop 2.6s ease forwards;
}
@keyframes bannerPop {
  0%   { opacity: 0; transform: translateY(-14px) scale(0.9); }
  12%  { opacity: 1; transform: translateY(0) scale(1); }
  82%  { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-8px) scale(0.96); }
}

/* ---------- Toasts ---------- */

.toast-stack {
  position: fixed;
  top: 76px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 40;
}
.toast {
  background: var(--panel);
  border: 3px solid #000;
  border-left: 6px solid var(--accent);
  padding: 10px 14px;
  font-size: 15px;
  box-shadow: 4px 4px 0 #000;
  animation: toastIn 0.2s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .layout { flex-direction: column; overflow-y: auto; }
  .map-pane { height: 55vh; border-right: none; border-bottom: 4px solid #000; }
  .sidebar { width: 100%; }
  .progress-track { width: 120px; }
}
