:root {
  color-scheme: dark;
  --ink: #eaf7f7;
  --muted: #9db8bf;
  --line: rgba(167, 214, 221, .18);
  --mint: #6ff7c8;
  --amber: #ffcb6b;
  --bg: #050d14;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif; }
body { overflow: hidden; }
.map-shell { position: relative; width: 100vw; height: 100vh; min-height: 480px; overflow: hidden; }
#map-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; touch-action: none; }
.map-vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 55%, transparent 38%, rgba(1, 6, 10, .55) 100%), linear-gradient(180deg, rgba(1, 6, 10, .35), transparent 26%, transparent 72%, rgba(1, 6, 10, .72)); }
.map-head { position: absolute; left: clamp(20px, 5vw, 72px); top: clamp(22px, 6vh, 72px); pointer-events: none; }
.map-back { display: inline-block; pointer-events: auto; color: var(--mint); text-decoration: none; font: 600 10px/1.2 ui-monospace, SFMono-Regular, monospace; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.map-kicker { margin: 24px 0 8px; color: var(--amber); font: 600 9px/1.2 ui-monospace, SFMono-Regular, monospace; letter-spacing: .18em; text-transform: uppercase; }
.map-head h1 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(2.5rem, 7vw, 6.4rem); font-weight: 400; letter-spacing: -.055em; line-height: .92; text-shadow: 0 0 60px rgba(0,0,0,.4); }
.map-sub { margin: 16px 0 0; max-width: 34ch; color: var(--muted); font-size: clamp(11px, 1.3vw, 14px); line-height: 1.55; }
.map-panel { position: absolute; right: clamp(16px, 4vw, 64px); top: clamp(72px, 15vh, 150px); width: min(280px, 30vw); padding: 18px 18px 16px; border: 1px solid var(--line); background: rgba(6, 17, 23, .62); backdrop-filter: blur(16px); border-radius: 12px; box-shadow: 0 24px 80px rgba(0,0,0,.22); }
.map-stat { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(167,214,221,.08); }
.map-stat span { color: var(--muted); font: 500 8px/1 ui-monospace, SFMono-Regular, monospace; letter-spacing: .14em; }
.map-stat strong { font: 500 11px/1.3 ui-monospace, SFMono-Regular, monospace; color: var(--ink); text-align: right; }
.map-note { margin: 14px 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.map-legend { display: grid; gap: 7px; padding-top: 4px; color: var(--muted); font: 500 8px/1.2 ui-monospace, SFMono-Regular, monospace; letter-spacing: .06em; }
.map-legend span { display: flex; align-items: center; gap: 8px; }
.sw { width: 14px; height: 3px; display: inline-block; border-radius: 2px; }
.sw--land { background: linear-gradient(90deg, #527849, #9b895f); }
.sw--water { background: #0d4155; }
.sw--road { background: #c7964f; }
.sw--river { background: #1d7288; }
.map-loading { position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%); width: min(240px, 60vw); padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: rgba(5,13,20,.8); color: var(--muted); font: 500 9px/1.3 ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; text-align: center; }
.map-bar { height: 2px; margin-top: 10px; background: rgba(167,214,221,.14); overflow: hidden; }
.map-bar i { display: block; width: 0; height: 100%; background: var(--mint); transition: width .25s ease; }
.map-error { position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%); z-index: 4; max-width: 340px; margin: 0; padding: 14px 16px; border: 1px solid rgba(255,127,142,.4); border-radius: 8px; background: rgba(30,8,12,.88); color: #ffb3bd; font-size: 12px; line-height: 1.5; }
.map-foot { position: absolute; left: clamp(20px, 5vw, 72px); right: clamp(20px, 5vw, 72px); bottom: 20px; display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font: 500 8px/1.2 ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; opacity: .65; pointer-events: none; }
@media (max-width: 720px) {
  .map-head { top: 22px; left: 18px; }
  .map-head h1 { font-size: clamp(2.4rem, 12vw, 4rem); }
  .map-panel { top: auto; bottom: 42px; right: 12px; width: min(250px, calc(100vw - 24px)); padding: 13px 14px; }
  .map-note { display: none; }
  .map-legend { grid-template-columns: 1fr 1fr; }
  .map-foot { left: 18px; right: 18px; bottom: 14px; font-size: 7px; }
  .map-foot span:last-child { display: none; }
}
