/* Air Time Machine. Fonts are self-hosted (Go fonts, BSD-style licence). */

@font-face { font-family: "Go"; src: url("../fonts/Go-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Go"; src: url("../fonts/Go-Medium.woff2") format("woff2"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "Go"; src: url("../fonts/Go-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Go Mono"; src: url("../fonts/Go-Mono.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #04060c;
  --glass: rgba(12, 18, 31, 0.62);
  --glass-strong: rgba(12, 18, 31, 0.86);
  --edge: rgba(190, 215, 255, 0.10);
  --edge-strong: rgba(190, 215, 255, 0.22);
  --hi: rgba(255, 255, 255, 0.06);
  --ink: #eef4ff;
  --ink-2: #b4c2d8;
  --ink-3: #7d8ba3;
  --accent: #ffb547;
  --accent-2: #ffd08a;
  --accent-ink: #201300;
  --ok: #6fe0b0;
  --warn: #ff9b73;
  --r: 16px;
  --shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.35);
  --ui: "Go", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Go Mono", ui-monospace, Menlo, Consolas, monospace;
  --top: max(14px, env(safe-area-inset-top));
  --side: max(16px, env(safe-area-inset-left));
  --side-r: max(16px, env(safe-area-inset-right));
  --bottom: max(14px, env(safe-area-inset-bottom));
  --tl-h: 150px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 14px/1.45 var(--ui); letter-spacing: 0.005em;
  overflow: hidden; overscroll-behavior: none;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent-2); text-underline-offset: 2px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { flex: none; }

/* ---------- Stage ---------- */
#globe { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#globe:active { cursor: grabbing; }
.vignette { position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.55) 100%); }

/* ---------- Loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 22px;
  background: radial-gradient(60% 50% at 50% 45%, #0a1426 0%, var(--bg) 70%);
  transition: opacity .7s ease, visibility .7s;
}
#loader.done { opacity: 0; visibility: hidden; }
.loader-orb {
  width: 84px; height: 84px; border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #4b9be3, #0f3e72 60%, #061a33);
  box-shadow: 0 0 40px rgba(80, 150, 255, 0.35), inset -10px -12px 24px rgba(0, 0, 0, 0.55);
  position: relative;
}
.loader-orb::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 2px solid transparent; border-top-color: var(--accent); border-right-color: rgba(255, 181, 71, 0.35);
  animation: spin 1.1s linear infinite;
}
#loader p { margin: 0; color: var(--ink-2); font-size: 14px; max-width: 80vw; text-align: center; }
#loader.error p { color: var(--warn); }
#loader.error .loader-orb::after { animation: none; border-color: var(--warn) transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Glass ---------- */
.topbar, .seg, .timeline, .sheet, .toast, .legend, .round, .search-box, .results, .city {
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow), inset 0 1px 0 var(--hi);
}

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; z-index: 10; top: var(--top); left: var(--side); right: var(--side-r);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 7px 7px 7px 10px; border-radius: var(--r);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.brand-mark { width: 32px; height: 32px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text b { font-size: 15.5px; font-weight: 700; letter-spacing: 0.01em; white-space: nowrap; }
.brand-text small { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.top-actions { display: flex; gap: 6px; }
.btn {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px;
  border-radius: 11px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--ink-2);
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--hi); color: var(--ink); border-color: var(--edge); }
.btn svg, .ctl svg, .round svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn.icon { padding: 0 9px; }

/* ---------- Segmented controls ---------- */
.seg { display: inline-flex; gap: 3px; padding: 4px; border-radius: 999px; }
.seg button {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; height: 34px; padding: 0 15px;
  border-radius: 999px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; font-size: 13.5px;
  transition: background .2s, color .2s;
}
.seg button:hover { color: var(--ink); background: var(--hi); }
.seg button[aria-checked="true"] { background: var(--ink); color: #07101f; font-weight: 600; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }
.seg-sm { box-shadow: none; background: rgba(255, 255, 255, 0.04); -webkit-backdrop-filter: none; backdrop-filter: none; }
.seg-sm button { height: 30px; padding: 0 11px; font-size: 12.5px; }



/* ---------- City search ---------- */
.search { position: fixed; z-index: 12; left: var(--side); top: calc(var(--top) + 64px); width: min(360px, calc(100vw - 32px)); }
.search-box {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 8px 0 14px; border-radius: 14px; cursor: text;
}
.search-box:focus-within { border-color: rgba(255, 181, 71, 0.55); }
.search-box svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-3); stroke-width: 1.9; stroke-linecap: round; }
.search-box input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none; font-size: 15px; color: var(--ink); }
.search-box input::placeholder { color: var(--ink-3); }
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; }
.kbd { font: 11px/1 var(--mono); color: var(--ink-3); border: 1px solid var(--edge-strong); border-radius: 6px; padding: 4px 7px; }
.search-box:focus-within .kbd { display: none; }
.results { list-style: none; margin: 6px 0 0; padding: 5px; border-radius: 14px; background: var(--glass-strong); max-height: min(60vh, 420px); overflow-y: auto; }
.results li { display: flex; align-items: baseline; gap: 8px; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.results li[aria-selected="true"], .results li:hover { background: rgba(255, 255, 255, 0.08); }
.results .nm { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results .wh { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.results .pp { font: 11px var(--mono); color: var(--ink-3); white-space: nowrap; }
.results .empty { cursor: default; color: var(--ink-3); }

/* ---------- Selected place ---------- */
.city {
  position: fixed; z-index: 9; left: var(--side); top: calc(var(--top) + 118px); width: min(360px, calc(100vw - 32px));
  padding: 12px 14px 12px; border-radius: 16px; display: grid; gap: 9px;
}
.city[hidden] { display: none; }
.city-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.city h2 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.2; }
.city-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-3); }
.city .close { height: 30px; margin: -4px -6px 0 0; }
.reads { display: grid; gap: 6px; }
.read { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px; background: rgba(255, 255, 255, 0.045); border: 1px solid var(--edge); }
.read .sw { width: 14px; height: 14px; border-radius: 4px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2); }
.read .when { font-size: 12.5px; color: var(--ink-2); }
.read .when i { font-style: normal; color: var(--ink-3); }
.read .val { font: 600 16px/1.1 var(--ui); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.read .val small { display: block; font: 10.5px/1.3 var(--mono); color: var(--ink-3); font-weight: 400; }
.read.none .val { font-size: 12.5px; font-weight: 400; color: var(--ink-3); white-space: normal; max-width: 150px; }
.read.wait .val { color: var(--ink-3); font-weight: 400; font-size: 12.5px; }
.change { font-size: 12.5px; color: var(--ink-2); padding: 0 2px; }
.change b { color: var(--ink); }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--edge-strong); background: rgba(255, 255, 255, 0.04); color: var(--ink-2); font-size: 12.5px; cursor: pointer; }
.chip:hover { color: var(--ink); background: rgba(255, 255, 255, 0.09); }
.fine { margin: 0; font-size: 11.5px; line-height: 1.4; color: var(--ink-3); }
.fine b { color: var(--ink-2); font-weight: 600; }

/* Marker for the selected place, positioned over the globe each frame. */
.pin { position: fixed; z-index: 6; left: 0; top: 0; pointer-events: none; display: flex; align-items: center; gap: 7px; will-change: transform; }
.pin[hidden] { display: none; }
.pin-dot { width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2.5px solid #fff; background: rgba(255, 255, 255, 0.15); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5), 0 0 14px rgba(255, 255, 255, 0.5); align-self: flex-start; }
.pin-name { margin-top: -16px; font: 600 12.5px/1 var(--ui); padding: 5px 8px; border-radius: 8px; background: rgba(8, 12, 22, 0.78); border: 1px solid var(--edge-strong); white-space: nowrap; }

/* ---------- Legend ---------- */
.legend {
  position: fixed; z-index: 8; left: var(--side); bottom: calc(var(--tl-h) + var(--bottom) + 12px);
  padding: 10px 12px 9px; border-radius: 12px; font-size: 12px; color: var(--ink-2); display: grid; gap: 5px; width: 300px;
}
.lg-layers { display: flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 12px; margin-bottom: 3px; }
.lg-layers button { height: 28px; padding: 0 10px; font-size: 12.5px; }
.lg-layers button.pending { box-shadow: inset 0 0 0 1px var(--accent); color: var(--ink); }
.lg-title { font-size: 12px; color: var(--ink-3); }
.lg-title b { color: var(--ink); font-weight: 600; font-size: 12.5px; margin-right: 4px; }
.lg-bar { height: 12px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.lg-bar img { display: block; width: 100%; height: 40px; object-fit: contain; }
.lg-bar.img { height: auto; background: none; box-shadow: none; }
.lg-ticks { position: relative; height: 14px; font: 10.5px/1 var(--mono); color: var(--ink-3); }
.lg-ticks span { position: absolute; top: 1px; transform: translateX(-50%); white-space: nowrap; }
.lg-ticks span:first-child { transform: none; }
.lg-ticks span:last-child { transform: translateX(-100%); }
.lg-rows { display: flex; flex-wrap: wrap; gap: 3px 12px; }
.lg-rows .row { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; }
.sw { width: 18px; height: 8px; border-radius: 3px; flex: none; }
.sw-none { background: #525c6c; box-shadow: 0 0 0 1px var(--edge-strong); }
.sw-filled { background: linear-gradient(90deg, rgba(255, 170, 60, 0.45), rgba(200, 70, 40, 0.45)); box-shadow: 0 0 0 1px var(--edge-strong); }
.lg-note { margin: 2px 0 0; font-size: 11.5px; color: var(--ink-3); }
.link { border: 0; background: none; padding: 0; color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-size: inherit; }
body.nofill #lg-filled, body.sparse #lg-filled { display: none; }
.warnbox { color: var(--ink); background: rgba(255, 155, 115, 0.1); border: 1px solid rgba(255, 155, 115, 0.35); border-radius: 12px; padding: 10px 12px; }
kbd { font: 11.5px var(--mono); border: 1px solid var(--edge-strong); border-radius: 5px; padding: 1px 5px; }
code { font: 12.5px var(--mono); color: var(--ink); }

/* ---------- Navigation buttons ---------- */
.nav-btns { position: fixed; z-index: 8; right: var(--side-r); bottom: calc(var(--tl-h) + var(--bottom) + 12px); display: grid; gap: 8px; }
.round { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.round:hover { color: var(--ink); border-color: var(--edge-strong); }

/* ---------- Timeline ---------- */
.timeline {
  position: fixed; z-index: 10; left: 50%; transform: translateX(-50%);
  bottom: var(--bottom); width: min(1040px, calc(100vw - 32px));
  padding: 14px 18px 12px; border-radius: 20px;
}
.tl-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.tl-date { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.date-big { font-size: 30px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.05; font-variant-numeric: tabular-nums; white-space: nowrap; }
.date-sub { color: var(--ink-3); font-size: 14px; }
.tl-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; min-width: 0; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); min-height: 17px; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: none; }
.status.loading::before { background: var(--accent); animation: pulse 1s ease-in-out infinite; }
.status.ready::before { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.status.warn { color: var(--warn); }
.status.warn::before { background: var(--warn); }
.source { font: 11px/1.3 var(--mono); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 48vw; }
@keyframes pulse { 50% { transform: scale(0.55); opacity: 0.45; } }

.tl-slider { position: relative; margin: 14px 0 6px; padding-bottom: 20px; }
.track { position: absolute; left: 0; right: 0; top: 11px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden; pointer-events: none; }
.track .gap { position: absolute; top: 0; bottom: 0; z-index: 1;
  background: repeating-linear-gradient(135deg, rgba(10, 14, 24, 0.95) 0 2px, rgba(255, 255, 255, 0.25) 2px 4px); }
.track .fill { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: linear-gradient(90deg, rgba(255, 181, 71, 0.35), var(--accent)); }
#slider { position: relative; width: 100%; margin: 0; height: 28px; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
#slider::-webkit-slider-runnable-track { height: 28px; background: transparent; }
#slider::-moz-range-track { height: 28px; background: transparent; }
#slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; margin-top: 3px; border-radius: 50%;
  background: #fff; border: 5px solid var(--accent); box-shadow: 0 0 0 6px rgba(255, 181, 71, 0.18), 0 3px 10px rgba(0, 0, 0, 0.6);
}
#slider::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 5px solid var(--accent); box-shadow: 0 0 0 6px rgba(255, 181, 71, 0.18); }
.ticks { position: absolute; left: 11px; right: 11px; bottom: 0; height: 18px; pointer-events: none; }
.tick { position: absolute; bottom: 0; transform: translateX(-50%); font: 10.5px/1 var(--mono); color: var(--ink-3); }
.tick::before { content: ""; position: absolute; left: 50%; bottom: 15px; width: 1px; height: 4px; background: var(--edge-strong); }

.tl-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.transport { display: flex; align-items: center; gap: 6px; }
.ctl {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 12px; border: 1px solid var(--edge); background: rgba(255, 255, 255, 0.04); cursor: pointer; color: var(--ink-2);
  transition: background .15s, color .15s;
}
.ctl:hover { background: rgba(255, 255, 255, 0.09); color: var(--ink); }
.ctl:disabled { opacity: 0.35; cursor: default; }
.ctl.play { width: 54px; height: 44px; border-radius: 14px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-ink); border-color: transparent; box-shadow: 0 6px 18px -6px rgba(255, 181, 71, 0.8); }
.ctl.play svg { width: 20px; height: 20px; }
.ctl.play .i-play { fill: currentColor; }
.ctl.play .i-pause { display: none; stroke-width: 3; }
.ctl.play[aria-pressed="true"] .i-play { display: none; }
.ctl.play[aria-pressed="true"] .i-pause { display: block; }
.ctl.text { width: auto; padding: 0 14px; font-size: 13px; }
.tl-right { display: flex; gap: 8px; margin-left: auto; }
.date-pick input {
  height: 40px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--edge);
  background: rgba(255, 255, 255, 0.04); color-scheme: dark; font: 13px var(--mono);
}

/* ---------- Sheets ---------- */
.sheet { color: var(--ink); padding: 0; border-radius: 20px; width: min(600px, calc(100vw - 32px)); max-height: min(82vh, 760px); background: var(--glass-strong); }
.sheet-sm { width: min(480px, calc(100vw - 32px)); }
.sheet::backdrop { background: rgba(2, 4, 10, 0.55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.sheet[open] { display: flex; flex-direction: column; animation: rise .22s ease-out; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 14px 10px 22px; margin: 0; }
.sheet-head h2 { margin: 0; font-size: 19px; font-weight: 700; }
.sheet-head p { margin: 3px 0 0; color: var(--ink-3); font-size: 13px; }
.prose { overflow-y: auto; padding: 0 22px 22px; font-size: 14px; color: var(--ink-2); }
.prose b { color: var(--ink); font-weight: 600; }
.prose h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3); margin: 20px 0 6px; font-weight: 600; }
.prose ul { padding-left: 18px; margin: 6px 0; }
.prose li { margin: 5px 0; }
.prose .ack { color: var(--ink); border-left: 2px solid var(--accent); padding-left: 12px; }

.moments { list-style: none; margin: 0; padding: 4px 12px 14px; overflow-y: auto; display: grid; gap: 4px; }
.moment {
  width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; text-align: left;
  padding: 11px 12px; border-radius: 14px; border: 1px solid transparent; background: transparent; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.moment:hover, .moment:focus-visible { background: rgba(255, 255, 255, 0.05); border-color: var(--edge); }
.moment .t { font-weight: 600; display: block; font-size: 14.5px; }
.moment .n { color: var(--ink-3); font-size: 12.5px; display: block; margin-top: 1px; }
.moment .d { color: var(--ink-2); font: 12px var(--mono); white-space: nowrap; }
.moment .dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18); background: radial-gradient(circle at 45% 45%, #ffe7a8 0, #ff9f1c 40%, #b5121b 100%); }

.settings { padding: 2px 22px 20px; display: grid; gap: 4px; overflow-y: auto; }
.settings .row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--edge); }
.settings .row:first-child { border-top: 0; }
.settings b { display: block; font-weight: 600; font-size: 14px; }
.settings small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.switch { position: relative; width: 44px; height: 26px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 13px; background: rgba(255, 255, 255, 0.14); transition: background .2s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Compare ---------- */
.cmp-bar, .cmp-divider { display: none; }
body.comparing .cmp-bar {
  display: flex; align-items: center; gap: 6px; position: fixed; z-index: 9; right: var(--side-r);
  top: calc(var(--top) + 64px); padding: 5px 6px 5px 12px; border-radius: 14px;
  background: var(--glass); border: 1px solid var(--edge); box-shadow: var(--shadow), inset 0 1px 0 var(--hi);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
}
.cmp-tag { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); margin-right: 2px; }
.cmp-bar input { height: 34px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--edge); background: rgba(255,255,255,0.04); color-scheme: dark; font: 13px var(--mono); }
.ctl.sm { width: 34px; height: 34px; border-radius: 10px; }
.ctl.sm svg { width: 16px; height: 16px; }
body.comparing .cmp-divider { display: block; position: fixed; z-index: 7; top: 0; bottom: 0; left: 0; width: 0; pointer-events: none; }
.cmp-divider::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: linear-gradient(180deg, transparent, rgba(255,255,255,0.85) 18%, rgba(255,255,255,0.85) 82%, transparent); box-shadow: 0 0 12px rgba(0,0,0,0.6); }
.cmp-handle {
  position: absolute; left: -22px; top: 50%; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%;
  display: grid; place-items: center; pointer-events: auto; cursor: ew-resize; touch-action: none;
  background: #fff; color: #07101f; border: 0; box-shadow: 0 4px 16px rgba(0,0,0,0.55);
}
.cmp-handle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cmp-label {
  position: absolute; top: calc(var(--top) + 122px); white-space: nowrap; font: 600 12.5px/1 var(--ui);
  padding: 6px 10px; border-radius: 999px; background: rgba(8, 12, 22, 0.75); border: 1px solid var(--edge); color: var(--ink);
}
.cmp-label.left { right: 12px; }
.cmp-label.left::before { content: "◀ "; color: var(--accent); }
.cmp-label.right { left: 12px; }
.cmp-label.right::after { content: " ▶"; color: var(--accent); }
#btn-compare[aria-pressed="true"] { background: rgba(255, 181, 71, 0.16); color: var(--accent-2); border-color: rgba(255, 181, 71, 0.4); }

/* ---------- Moment marks on the timeline ---------- */
.mdots { position: absolute; left: 11px; right: 11px; top: 4px; height: 0; pointer-events: none; }
.mdot {
  position: absolute; top: 0; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; padding: 0;
  border: 0; background: transparent; cursor: pointer; pointer-events: auto;
}
.mdot::before { content: ""; position: absolute; left: 4px; top: 0; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(7, 16, 31, 0.9); }
.mdot::after {
  content: attr(data-name); position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  font-size: 11.5px; padding: 4px 8px; border-radius: 8px; background: var(--glass-strong); border: 1px solid var(--edge);
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
.mdot:hover::after, .mdot:focus-visible::after { opacity: 1; }
.more-apps a { font-weight: 600; }

/* ---------- Toast ---------- */
.toast { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); top: calc(var(--top) + 64px);
  padding: 10px 16px; border-radius: 12px; font-size: 13.5px; max-width: calc(100vw - 32px); }
.noscript { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; }

.phone-only { display: none !important; }

/* Short desktop windows: keep the place panel clear of the legend. */
@media (min-width: 761px) and (max-height: 860px) {
  .city .fine { display: none; }
  .city .quick { flex-wrap: nowrap; }
  .chip { padding: 0 9px; white-space: nowrap; }
}

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  :root { --tl-h: 168px; }
  .brand-text small { display: none; }
  .brand-text b { font-size: 14.5px; }
  .brand-mark { width: 28px; height: 28px; }
  .top-actions { gap: 2px; }
  .btn span { display: none; }
  .btn { padding: 0 9px; }
  .seg button { height: 32px; padding: 0 9px; font-size: 12.5px; gap: 6px; }
  .timeline { padding: 12px 14px 10px; border-radius: 18px; }
  .date-big { font-size: 23px; }
  .date-sub { font-size: 12.5px; }
  .tl-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .tl-date { gap: 8px; }
  .tl-meta { align-items: flex-start; flex-direction: row; gap: 10px; max-width: 100%; }
  .source { max-width: 52vw; }
  .tl-slider { margin-top: 8px; }
  .ctl { width: 36px; }
  .ctl.play { width: 48px; }
  .tl-controls { gap: 8px; }
  .seg-sm button { padding: 0 7px; }
  .transport { gap: 4px; }
  .tl-right { margin-left: 0; flex: 1 1 100%; }
  .date-pick { flex: 1; }
  .date-pick input { width: 100%; }
  .nav-btns { display: none; }
  .search { top: calc(var(--top) + 60px); left: var(--side); right: var(--side-r); width: auto; }
  .search-box { height: 42px; }
  .kbd { display: none; }
  .city { top: auto; left: var(--side); right: var(--side-r); width: auto; bottom: calc(var(--tl-h) + var(--bottom) + 10px); padding: 10px 12px; gap: 7px; }
  .city .fine { display: none; }
  .city h2 { font-size: 15.5px; }
  .city-head { align-items: center; }
  .city-head > div { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
  .city-head p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .city .close { margin: -6px -6px -6px 0; }
  .reads { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; }
  .read { grid-template-columns: auto 1fr; gap: 2px 7px; padding: 6px 9px; }
  .read .val { grid-column: 1 / -1; text-align: left; font-size: 15px; }
  .read .val small { display: inline; margin-left: 4px; }
  .read.none .val { max-width: none; font-size: 11.5px; }
  .read .when { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .read .sw { width: 11px; height: 11px; }
  .change { grid-column: 1 / -1; font-size: 11.5px; }
  .quick { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; }
  .quick::-webkit-scrollbar { display: none; }
  .chip { height: 28px; padding: 0 10px; font-size: 12px; white-space: nowrap; flex: none; }
  .timeline .legend .lg-rows .row:last-child { display: none; }
  .timeline .legend .lg-ticks { height: 12px; }
  .timeline .legend {
    position: static; width: auto; margin: 8px 0 0; padding: 0; gap: 3px;
    background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .timeline .legend .lg-rows, .timeline .legend .lg-note { font-size: 11px; }
  .lg-layers { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 0 2px; }
  .lg-layers::-webkit-scrollbar { display: none; }
  .lg-layers button { flex: none; height: 28px; padding: 0 9px; }
  body.comparing .cmp-bar { top: calc(var(--top) + 108px); right: auto; left: 50%; transform: translateX(-50%); gap: 4px; padding: 4px 4px 4px 8px; max-width: calc(100vw - 24px); }
  .cmp-tag { display: none; }
  .cmp-bar input { width: 132px; }
  .cmp-label { top: calc(var(--top) + 156px); font-size: 11.5px; }
  .phone-only { display: inline-flex !important; }
  .round { width: 40px; height: 40px; }
  .toast { top: calc(var(--top) + 108px); }
}
@media (max-width: 440px) {
  .brand-text { display: none; }
  .topbar { justify-content: space-between; }
}
@media (max-width: 380px) {
  .seg-sm button { padding: 0 6px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
