:root {
  /* Design tokens: brand/README.md */
  --land: #6e6a65;
  --card: rgba(30, 28, 26, 0.86);
  --text: #eeeae3;
  --muted: #a9a39a;
  --line: rgba(255, 255, 255, 0.10);
  --accent: #f1ece4;        /* warm white: controls never use a temperature colour */
  --ink: #1e1b19;
  --fog: #b9a9d6;           /* brand lavender (logo fog) */
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--land); color: var(--text);
  font: 14px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
#map { position: fixed; inset: 0; }

.card { position: fixed; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); padding: 10px 12px; z-index: 2; }

.readout { top: calc(12px + env(safe-area-inset-top, 0px)); left: 12px; width: 250px; }
.readout-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.label { font-weight: 600; }
.when { font-variant-numeric: tabular-nums; }
.range { font-size: 22px; font-weight: 650; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.toggle { display: flex; gap: 6px; align-items: center; cursor: pointer; user-select: none; }
.note { color: var(--muted); font-size: 12px; margin-top: 4px; }

.legend-bar { height: 8px; border-radius: 4px; margin-top: 2px; }
.legend-ticks { position: relative; height: 14px; color: var(--muted); font-size: 11px; margin: 3px 0 8px;
  font-variant-numeric: tabular-nums; }
.legend-ticks span { position: absolute; transform: translateX(-50%); }
.range small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 4px; }

.scrubber { left: 12px; right: 12px; bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 4px 10px; align-items: center; }
.play { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--ink); background: var(--accent);
  color: var(--ink); font-size: 14px; cursor: pointer; }
.play:focus-visible, #hour:focus-visible, .toggle input:focus-visible { outline: 2px solid var(--fog); outline-offset: 2px; }
#hour { width: 100%; accent-color: var(--accent); }
.run { grid-column: 1 / -1; margin: 0; }

.banner { position: fixed; left: 50%; transform: translateX(-50%); top: calc(12px + env(safe-area-inset-top, 0px));
  background: #7a2a1e; color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 3; max-width: calc(100% - 32px); }

.maplibregl-popup-content { background: #25221f; color: var(--text); border-radius: 10px; font-size: 13px; }
.maplibregl-popup-tip { border-top-color: #25221f !important; border-bottom-color: #25221f !important; }
.pop-title { font-weight: 600; margin-bottom: 4px; }
.pop-grid { display: grid; grid-template-columns: auto auto; gap: 2px 12px; font-variant-numeric: tabular-nums; }
.pop-grid span:nth-child(odd) { color: var(--muted); }

@media (max-width: 560px) {
  .readout { width: auto; right: 12px; }
  .range { font-size: 18px; }
  .maplibregl-ctrl-bottom-right .maplibregl-ctrl-group { display: none; }
}

/* Link-preview render mode (?share=1): map only. */
.share .card, .share .banner, .share .maplibregl-ctrl-bottom-right, .share .maplibregl-ctrl-bottom-left,
.share .maplibregl-ctrl-attrib { display: none !important; }
