:root {
  --forest: #0e2a22;
  --forest-2: #14382c;
  --pine: #1f5a42;
  --ink: #12241c;
  --muted: #2c4a3c;
  --mint: #e7f6ef;
  --mint-2: #f4fbf7;
  --glass: rgba(244, 251, 247, 0.9);
  --line: rgba(18, 36, 28, 0.12);
  --ember: #e4572e;
  --header: 76px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--ink);
  background: var(--forest);
  font: 15px/1.5 Inter, "Segoe UI", system-ui, sans-serif;
}
:focus-visible {
  outline: 3px solid #f4fbf7;
  outline-offset: 2px;
}
.panel :focus-visible,
.transport :focus-visible,
footer :focus-visible {
  outline-color: var(--forest);
}
.topbar {
  min-height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  padding: 14px 28px;
  background: var(--forest);
  color: var(--mint-2);
  border-bottom: 1px solid rgba(231, 246, 239, 0.16);
}
.brand h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.brand p { margin: 3px 0 0; color: #d5ebe0; font-size: 13px; font-weight: 450; }
.built-note { margin: 0; color: #c5e0d2; font-size: 12px; text-align: right; }
.stage { position: relative; flex: 1; min-height: 0; }
.map-wrap { position: absolute; inset: 0; }
#map { position: absolute; inset: 0; background: #c9ddd2; }
.panel {
  position: absolute;
  z-index: 600;
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: 392px;
  overflow: auto;
  padding: 18px 18px 22px;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  box-shadow: 0 18px 48px rgba(8, 28, 20, 0.22);
}
.map-dock {
  position: absolute;
  z-index: 650;
  left: 12px;
  right: 424px;
  bottom: 10px;
}
.dock-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  height: 32px;
}
.transport {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 0;
  height: 32px;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  margin: 0;
  padding: 0 4px;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(8, 28, 20, 0.16);
}
html.chrome-hidden .transport,
.map-dock.chrome-hidden .transport { display: none; }
.when {
  flex: 1 1 48px;
  min-width: 28px;
  margin: 0;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--forest);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#speed {
  flex: 0 0 auto;
  width: 52px;
  height: 26px;
  min-height: 0;
  padding: 0 2px;
  font: 600 11px/1 Inter, system-ui, sans-serif;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(14, 42, 34, 0.18);
  border-radius: 999px;
}
#play, #full, #go {
  cursor: pointer;
  touch-action: manipulation;
}
#play {
  flex: 0 0 auto;
  min-width: 52px;
  height: 26px;
  min-height: 0;
  padding: 0 8px;
  font-size: 12px;
  color: var(--mint-2);
  background: var(--forest);
  border: 1px solid var(--forest);
}
#play:hover { background: var(--pine); }
#full, #go {
  padding: 0 8px;
  color: var(--forest);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(14, 42, 34, 0.22);
}
#full {
  flex: 0 0 auto;
  height: 26px;
  min-height: 0;
  font-size: 11px;
}
.full-short { display: none; }
#scrub {
  flex: 1 1 48px;
  min-width: 36px;
  width: auto;
  height: 18px;
  margin: 0;
}
#full:hover, #go:hover { background: #fff; }
#scrub { accent-color: var(--pine); cursor: pointer; }
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.filter-extra { display: contents; }
.place-row { grid-column: 1 / -1; display: flex; gap: 8px; align-items: flex-end; }
.grow { flex: 1; }
.controls label { display: flex; flex-direction: column; gap: 4px; }
.controls label {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.controls input, .controls select {
  width: 100%;
  min-height: 40px;
  font: 500 14px/1.2 Inter, system-ui, sans-serif;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(14, 42, 34, 0.16);
  border-radius: 10px;
  padding: 8px 10px;
}
#go { min-height: 40px; border-radius: 10px; font-weight: 650; }
.dot-size { grid-column: 1 / -1; }
.dot-line { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.dot-line input[type="range"] {
  flex: 1;
  width: auto;
  min-width: 0;
  height: 28px;
  min-height: 28px;
  padding: 0;
  background: transparent;
  border: 0;
  accent-color: var(--pine);
}
.dot-line output {
  flex: 0 0 auto;
  min-width: 42px;
  text-align: right;
  font: 650 13px/1 Inter, system-ui, sans-serif;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
}
.hint { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 13px; }
.panel h2 { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 8px; color: var(--pine); }
.panel h3 { font-size: 14px; margin: 16px 0 8px; }
.panel section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.place-name { margin: 0 0 4px; font-size: 20px; font-weight: 650; letter-spacing: -0.03em; }
.muted, small { color: var(--muted); }
.legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend span { width: 16px; height: 10px; border-radius: 3px; display: inline-block; }
#hits { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
#hits button, .hit {
  text-align: left;
  font: 13px/1.35 Inter, system-ui, sans-serif;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink);
}
#hits button:hover, .hit:hover { background: #fff; }
#stats p { margin: 0 0 6px; }
.chart { overflow-x: auto; }
.bar { display: flex; align-items: flex-end; height: 96px; gap: 2px; min-width: 100%; }
.bar div { background: var(--ember); flex: 1 0 3px; border-radius: 2px 2px 0 0; }
.report { margin: 0 0 8px; font-size: 14px; }
.report a { margin-left: 8px; font-weight: 600; }
.notes { margin: 0; padding-left: 18px; }
.notes li { margin: 0 0 8px; }
footer {
  padding: 14px 28px 16px;
  background: var(--forest-2);
  color: #d7ebe1;
  font-size: 12px;
  line-height: 1.5;
  border-top: 1px solid rgba(231, 246, 239, 0.14);
}
footer p { margin: 0 0 4px; }
footer a { color: #d8f6e6; font-weight: 600; }
.footer-brand { color: #f4fbf7; font-size: 13px; }
a { color: var(--pine); }
.leaflet-bottom { display: none; }
.leaflet-control-attribution { display: none !important; }
.scale-slot { display: flex; align-items: center; flex: 0 0 auto; }
.scale-slot .leaflet-control { margin: 0; float: none; }
.leaflet-control-scale-line {
  font-size: 9px;
  line-height: 1.15;
  padding: 0 3px 1px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(14, 42, 34, 0.45);
  border-top: none;
  white-space: nowrap;
}
.dock-icon { width: 26px; height: 26px; flex: 0 0 auto; border-radius: 8px; }
#chrome-toggle .icon-show { display: none; }
#chrome-toggle[aria-pressed="false"] .icon-hide { display: none; }
#chrome-toggle[aria-pressed="false"] .icon-show { display: block; }
.credits-btn {
  width: auto;
  height: 26px;
  flex: 0 0 auto;
  gap: 3px;
  padding: 0 7px;
  border-radius: 8px;
  font: 650 10px/1 Inter, system-ui, sans-serif;
  white-space: nowrap;
}
.credits-pop {
  position: absolute;
  right: 0;
  bottom: 36px;
  width: min(340px, calc(100% - 4px));
  max-height: min(168px, 38vh);
  overflow: auto;
  margin: 0;
  padding: 8px 10px;
  background: rgba(14, 42, 34, 0.95);
  color: #e7f6ef;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.4;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
.credits-pop p { margin: 0 0 6px; }
.credits-pop a { color: #d8f6e6; }
.credits-pop[hidden] { display: none !important; }
.leaflet-bar a {
  background: rgba(244, 251, 247, 0.94);
  color: var(--forest);
  border-bottom-color: rgba(14, 42, 34, 0.12);
}
.leaflet-bar a:hover { background: #fff; }
.map-tools {
  position: absolute;
  z-index: 700;
  top: 10px;
  left: 52px;
  display: flex;
  gap: 6px;
}
.icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(14, 42, 34, 0.16);
  background: rgba(244, 251, 247, 0.94);
  color: var(--forest);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(8, 28, 20, 0.16);
}
.icon-btn:hover { background: #fff; }
.icon-btn:disabled { opacity: 0.55; cursor: progress; }
.dock-icon, .credits-btn { width: 26px; height: 26px; }
.credits-btn { width: auto; padding: 0 7px; }
#fullscreen .icon-exit { display: none; }
#fullscreen[aria-pressed="true"] .icon-enter { display: none; }
#fullscreen[aria-pressed="true"] .icon-exit { display: block; }
.panel-toggle { display: none; }
.export-note {
  position: absolute;
  z-index: 700;
  top: 50px;
  left: 52px;
  margin: 0;
  max-width: 240px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(14, 42, 34, 0.9);
  color: #f4fbf7;
  font-size: 12px;
}
.export-note:empty { display: none; }
footer { padding: 6px 16px; }
.footer-line {
  margin: 0;
  white-space: nowrap;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.4;
  color: #f4fbf7;
}
#footer-toggle {
  font: 600 12px/1.2 Inter, system-ui, sans-serif;
  color: #d8f6e6;
  background: transparent;
  border: 0;
  padding: 2px 2px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#footer-more { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(231, 246, 239, 0.16); }
#footer-more[hidden] { display: none !important; }
.map-wrap:fullscreen,
.map-wrap:-webkit-full-screen {
  width: 100%;
  height: 100%;
  background: #c9ddd2;
}
.map-wrap.is-pseudo-fs {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw;
  height: 100dvh;
  z-index: 9000;
  background: #c9ddd2;
}
body.pseudo-fs { overflow: hidden; }
.map-wrap:fullscreen .map-dock,
.map-wrap:-webkit-full-screen .map-dock,
.map-wrap.is-pseudo-fs .map-dock {
  left: 6px;
  right: 6px;
  bottom: 6px;
}
.map-wrap:fullscreen .credits-short,
.map-wrap:-webkit-full-screen .credits-short,
.map-wrap.is-pseudo-fs .credits-short,
.map-wrap:fullscreen .full-long,
.map-wrap:-webkit-full-screen .full-long,
.map-wrap.is-pseudo-fs .full-long { display: none; }
.map-wrap:fullscreen .full-short,
.map-wrap:-webkit-full-screen .full-short,
.map-wrap.is-pseudo-fs .full-short { display: inline; }
@media (max-width: 900px) {
  body { height: auto; min-height: 100dvh; overflow: visible; }
  .topbar { align-items: flex-start; flex-direction: column; gap: 4px; padding: 12px 16px; }
  .built-note { text-align: left; }
  .stage { flex: none; display: flex; flex-direction: column; }
  .map-wrap { position: relative; height: 68vh; min-height: 420px; }
  #map { position: absolute; inset: 0; }
  .panel {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: auto;
    margin: 12px;
    max-height: none;
    overflow: visible;
  }
  .map-dock { left: 6px; right: 6px; bottom: 6px; }
  .credits-short, .full-long { display: none; }
  .full-short { display: inline; }
  .map-tools { top: 8px; left: 46px; gap: 4px; }
  .map-tools .icon-btn { width: 30px; height: 30px; }
  footer { padding: 6px 12px 8px; }
}
@media (max-height: 500px) {
  body { height: 100dvh; overflow: hidden; }
  .topbar {
    min-height: 0;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
  }
  .brand h1 { font-size: 15px; }
  .brand p, .built-note { display: none; }
  .stage { flex: 1; min-height: 0; display: block; }
  .map-wrap { position: absolute; inset: 0; height: auto; min-height: 0; }
  html:not(.filters-collapsed) .panel {
    display: block;
    position: absolute;
    z-index: 650;
    top: 8px;
    right: 8px;
    bottom: 8px;
    width: min(320px, 46vw);
    margin: 0;
    max-height: none;
    overflow: auto;
  }
  .panel-toggle { display: none; }
  .map-dock { left: 6px; right: 6px; bottom: 4px; }
  .credits-short, .full-long { display: none; }
  .full-short { display: inline; }
  footer { position: relative; z-index: 40; padding: 3px 10px; }
  #footer-more {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    max-height: 42vh;
    overflow: auto;
    margin: 0;
    padding: 8px 10px;
    background: var(--forest-2);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.28);
  }
}
#filters-toggle { flex: 0 0 auto; align-self: flex-end; width: 40px; height: 40px; }
#filters-toggle .icon-expand { display: none; }
html.filters-collapsed #filters-toggle .icon-collapse { display: none; }
html.filters-collapsed #filters-toggle .icon-expand { display: block; }
html.filters-collapsed #filters-toggle { align-self: center; height: 36px; width: 36px; }
html.filters-collapsed .filter-extra,
html.filters-collapsed .panel-more,
html.filters-collapsed .place-label { display: none; }
html.filters-collapsed,
html.filters-collapsed body {
  height: 100dvh;
  overflow: hidden;
}
html.filters-collapsed .stage {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
html.filters-collapsed .panel {
  display: block;
  order: -1;
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  width: auto;
  height: auto;
  max-height: none;
  margin: 0;
  padding: 8px 10px;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}
html.filters-collapsed .map-wrap {
  position: relative;
  flex: 1 1 auto;
  inset: auto;
  width: auto;
  height: auto;
  min-height: 0;
}
html.filters-collapsed .map-dock { right: 12px; }
html.filters-collapsed .controls { display: block; }
html.filters-collapsed .place-row { margin: 0; align-items: center; }
html.filters-collapsed .controls label.grow { gap: 0; }
html.filters-collapsed #q,
html.filters-collapsed #go { min-height: 36px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
