:root {
  --red: #e30613;
  --red-soft: rgba(227, 6, 19, 0.28);
  --ink: #1f2328;
  --muted: #5d6670;
  --line: #d9dde1;
  --bg: #ffffff;
  --bg-soft: #f4f5f6;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  --radius: 10px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: #e8e8e8; }
#map { position: absolute; inset: 0; }
/* The viewer is a column at the right (a sheet at the bottom on small screens);
   the map shrinks to the space next to it so the cam's view is never covered. */
:root { --viewer-w: clamp(360px, 38vw, 580px); --viewer-h: 58vh; }
body.viewer-open #map { right: var(--viewer-w); }

/* ---------- Search bar (top left) and legend (bottom left) ---------- */
.topbar {
  position: absolute; z-index: 1000; top: 12px; left: 12px; width: 340px; max-width: calc(100vw - 72px);
  display: grid; gap: 8px; font-size: 14px; pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.card { background: var(--bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 14px; margin: 0; }
.card[hidden] { display: none; }
.searchbar {
  display: flex; align-items: center; gap: 4px; padding: 4px 4px 4px 10px;
  background: var(--bg); border-radius: 999px; box-shadow: var(--shadow);
}
.brand { margin: 0; width: 14px; height: 14px; flex: none; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.badge { position: absolute; top: 1px; right: 1px; min-width: 15px; height: 15px; border-radius: 8px; padding: 0 4px;
  background: var(--red); color: #fff; font-size: 10px; font-weight: 700; line-height: 15px; }
.badge[hidden] { display: none; }
#filter-btn { position: relative; border-radius: 50%; }
#filter-btn[aria-expanded="true"], #info-btn[aria-expanded="true"] { background: var(--bg-soft); color: var(--ink); }

.suggest { padding: 4px; max-height: min(70vh, 520px); overflow-y: auto; }
.sg-head { padding: 8px 10px 4px; color: var(--muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.sg-note { padding: 4px 10px 8px; color: var(--muted); font-size: 13px; }
.sg-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; border-radius: 7px;
  background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.sg-item.on { background: var(--bg-soft); }
.sg-main { display: grid; min-width: 0; }
.sg-main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-main small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-ico { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.sg-cam { background: var(--red); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--red-soft); }
.sg-place { background: #fff; border: 2.5px solid #111; }
.sg-all { color: var(--red); font-weight: 600; font-size: 13px; }

.bottombar {
  position: absolute; z-index: 1000; left: 12px; bottom: 12px; max-width: calc(100% - 200px);
  display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 8px; font-size: 13px;
}
body.viewer-open .bottombar { max-width: calc(100% - var(--viewer-w) - 200px); }
.legend-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 3px 3px 3px 12px;
  background: rgba(255, 255, 255, 0.92); border-radius: 999px; box-shadow: var(--shadow);
}
.info { width: 320px; max-width: calc(100vw - 24px); max-height: 60vh; overflow-y: auto; font-size: 13px; }
.info .tip { margin-top: 0; }

.icon-btn {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  width: 30px; height: 30px; border-radius: 6px; display: grid; place-items: center;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--ink); }

#search { flex: 1; min-width: 0; padding: 7px 8px; font: inherit; border: 0; border-radius: 999px; background: none; }
#search:focus { outline: none; }
.searchbar:focus-within { box-shadow: var(--shadow), 0 0 0 2px var(--red-soft); }

.filters { border: 0; display: grid; gap: 7px; }
.filters label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.filters input { accent-color: var(--red); margin: 0; }

.count { font-weight: 600; white-space: nowrap; }

.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 12.5px; }
.legend li { display: flex; align-items: center; gap: 4px; }
.lg { width: 18px; height: 18px; display: inline-block; position: relative; flex: none; }
.lg::after { content: ""; position: absolute; left: 6px; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 1.5px #fff; }
.lg-cone::before { content: ""; position: absolute; inset: 0; background: var(--red-soft); clip-path: polygon(50% 55%, 10% 0, 90% 0); }
.lg-pano::before { content: ""; position: absolute; inset: 1px; border-radius: 50%; border: 2px solid var(--red-soft); }
/* The ground an open cam sees (js: drawVisible): blue patches with a dashed edge. */
.lg-seen::after { display: none; }
.lg-seen::before { content: ""; position: absolute; inset: 3px 1px; border-radius: 3px;
  background: rgba(0, 110, 200, 0.38); outline: 1.5px dashed rgba(0, 110, 200, 0.6); outline-offset: 1px; }

.sources { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.sources summary { cursor: pointer; font-weight: 600; }
.sources ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px;
  max-height: 40vh; overflow-y: auto; font-size: 13px; }
.sources a { color: var(--red); font-weight: 600; }
.sources .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.sources .desc { color: var(--muted); font-size: 12px; line-height: 1.4; }

.credits { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.credits a { color: var(--red); }

/* ---------- Markers ---------- */
.cam-icon { overflow: visible; }
.cam-icon svg { overflow: visible; display: block; }
.cam-icon .cone { fill: var(--red-soft); stroke: rgba(227, 6, 19, 0.55); stroke-width: 1; }
.cam-icon .pano { fill: none; stroke: var(--red-soft); stroke-width: 4; }
.cam-icon .dot { fill: var(--red); stroke: #fff; stroke-width: 2; }
/* Cams open in the viewer are blue; the active one gets a dark ring. */
.cam-icon.open .dot, .cam-icon.selected .dot { fill: #006ec8; }
.cam-icon.selected .dot { stroke: #0b2f55; stroke-width: 2.5; r: 7px; }
.cam-icon.open .cone, .cam-icon.selected .cone { fill: rgba(0, 110, 200, 0.3); stroke: rgba(0, 110, 200, 0.7); }
.cam-icon.open .pano, .cam-icon.selected .pano { stroke: rgba(0, 110, 200, 0.4); }
.cam-icon.open .live, .cam-icon.selected .live { stroke: #006ec8; }

.cluster {
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(227, 6, 19, 0.88); color: #fff; font-weight: 700; font-size: 12px;
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.cluster.has-open { background: rgba(0, 110, 200, 0.92); }

.muted { color: var(--muted); }
.warn { color: #8a5a00; background: #fff5db; padding: 6px 8px; border-radius: 6px; margin: 0 0 10px; font-size: 12.5px; }

@media (max-width: 600px) {
  .topbar { top: 8px; left: 8px; width: auto; right: 56px; max-width: none; }
  .bottombar { left: 8px; bottom: 8px; max-width: calc(100% - 16px); }
  .legend-bar .legend { display: none; }
  body.viewer-open .bottombar { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 7px 11px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink) !important; font: inherit; font-weight: 600; font-size: 13px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--bg-soft); }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff !important; }
.btn.primary:hover { background: #c00510; }
.btn.quiet { border-color: transparent; color: var(--muted) !important; }
.btn:disabled { opacity: 0.5; cursor: default; }
.link { border: 0; background: none; padding: 0; font: inherit; color: var(--red); cursor: pointer; text-align: left; }
.link:hover { text-decoration: underline; }
.row-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.4; margin: 6px 0 0; }

/* ---------- Popup additions ---------- */

/* ---------- Markers: live video, your edits ---------- */
.cam-icon .live { fill: #fff; stroke: var(--red); stroke-width: 1.4; }
.cam-icon.edited:not(.open):not(.selected) .cone { fill: rgba(208, 138, 0, 0.3); stroke: rgba(208, 138, 0, 0.75); }
.lg-live::after { left: 5px; top: 5px; }
.lg-live::before { content: ""; position: absolute; left: 10px; top: 2px; width: 5px; height: 5px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 1.4px var(--red); z-index: 1; }

/* ---------- Panel additions ---------- */
.tip { color: var(--muted); font-size: 12px; margin: 10px 0 0; line-height: 1.4; }
.looking, .edits { max-height: 50vh; overflow-y: auto; }
/* The spot whose cams are listed */
.spot-pin { overflow: visible; }
.spot-pin svg { position: relative; display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35)); }
.spot-pulse { position: absolute; left: 4px; top: 27px; width: 20px; height: 20px; margin: -10px 0 0 0; border-radius: 50%;
  background: rgba(17, 17, 17, 0.35); animation: spot-pulse 1.8s ease-out infinite; }
@keyframes spot-pulse { from { transform: scale(0.4); opacity: 1; } to { transform: scale(2.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .spot-pulse { animation: none; } }
.leaflet-tooltip.spot-label { background: #111; color: #fff; border: 0; border-radius: 6px; font-weight: 600; font-size: 12.5px; padding: 3px 8px; }
.leaflet-tooltip.spot-label::before { border-top-color: #111; }
.route-tools { display: flex; gap: 6px; margin: 8px 0 2px; }
.btn.quiet[disabled] { opacity: 0.45; cursor: default; }
#map.drawing, #map.drawing .leaflet-grab { cursor: crosshair; }
#route-btn[aria-pressed="true"] { background: #111; color: #fff; border-radius: 50%; }
body.dropping #map::after { content: "Drop the GPX file to see the cams along it"; position: absolute; inset: 12px; z-index: 999;
  display: grid; place-items: center; border: 3px dashed #111; border-radius: var(--radius); background: rgba(255, 255, 255, 0.6);
  font-weight: 700; font-size: 18px; pointer-events: none; }
.toast { font-size: 13.5px; }
.head-btns { display: flex; gap: 2px; align-self: flex-start; }
.star[aria-pressed="true"] { color: #e0a000; }
.star[aria-pressed="true"] path { fill: #f2b200; }
#star-btn { position: relative; border-radius: 50%; }
.cam-icon.starred .dot { stroke: #f2b200; stroke-width: 3; }
.looking-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.looking-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.looking ul { list-style: none; margin: 6px 0 0; padding: 0; max-height: 34vh; overflow-y: auto; display: grid; gap: 4px; font-size: 13px; }
.looking .n { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* ---------- Viewer ---------- */
.viewer {
  position: absolute; z-index: 1001; top: 0; right: 0; bottom: 0; width: var(--viewer-w);
  display: flex; flex-direction: column;
  background: var(--bg); border-left: 1px solid var(--line); box-shadow: -2px 0 10px rgba(0, 0, 0, 0.12); font-size: 14px;
}
.viewer[hidden] { display: none; }
.viewer-head { display: flex; align-items: flex-start; gap: 10px; padding: 12px 12px 6px 16px; }
.head-main { flex: 1; min-width: 0; }
/* Provider and listings, right-aligned next to the buttons. */
.head-src { flex: 0 1 auto; max-width: 42%; margin-top: 2px; text-align: right; font-size: 12px; line-height: 1.35;
  color: var(--muted); overflow-wrap: anywhere; }
.head-src .prov { display: block; font-weight: 600; }
.head-src .via { display: block; }
.head-src a { color: inherit; text-decoration: none; }
.head-src a:hover { color: var(--red); text-decoration: underline; }
.dir-short { border: 0; padding: 0; background: none; font: inherit; color: inherit; white-space: nowrap; cursor: pointer;
  text-decoration: underline dotted; text-underline-offset: 2px; }
.dir-why { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; }
.viewer-head h2 { margin: 0; font-size: 16px; line-height: 1.3; }
.viewer-head .where { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.tabs button {
  border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted);
  padding: 8px 10px; border-bottom: 2.5px solid transparent; cursor: pointer;
}
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--red); }
.tabs button[hidden] { display: none; }
.viewer-body { padding: 12px 16px 16px; }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 38px;
  padding: 6px 12px 6px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 600; }
.viewer-bar [hidden] { display: none; }
.viewer-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.viewer > .v-detail { display: none; }   /* parked while no cam is active */
.cam-card { border-bottom: 6px solid var(--bg-soft); }
.cam-card.active { box-shadow: inset 4px 0 0 #006ec8; }
.cam-card:not(.active) { cursor: pointer; }
.cam-card:not(.active):hover .viewer-head h2 { color: #006ec8; }
.preview { padding: 0 16px 12px; }
.preview .strip.wide img { height: 140px; }
.preview .strip-wrap > .fresh { top: 8px; }
.v-image .thumb-missing, .preview .thumb-missing { aspect-ratio: 16 / 10; display: grid; place-items: center; background: var(--bg-soft);
  border-radius: 6px; color: var(--muted); }

.strip { border-radius: 6px; background: var(--bg-soft); overflow: hidden; }
.strip.wide { overflow-x: auto; overscroll-behavior-x: contain; cursor: grab; }
.strip.wide:active { cursor: grabbing; }
.strip-inner { position: relative; }
.strip.wide .strip-inner { width: max-content; }
.strip-track { display: flex; width: max-content; }
.strip-copy { pointer-events: auto; }
.strip img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.strip.wide img { width: auto; height: 260px; max-width: none; }
.ticks { position: absolute; inset: 0 0 auto 0; height: 26px; pointer-events: none;
  background: linear-gradient(rgba(0, 0, 0, 0.45), transparent); }
.tick { position: absolute; top: 0; width: 1px; height: 6px; background: rgba(255, 255, 255, 0.8); }
.tick.major { height: 10px; width: 1.5px; background: #fff; }
.tick b { position: absolute; top: 10px; transform: translateX(-50%); color: #fff; font-size: 11px; font-weight: 700;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.8); white-space: nowrap; }
.pick-hint { display: none; }
.viewer.aligning .strip-inner { cursor: crosshair; outline: 3px solid var(--red); outline-offset: -3px; }
.viewer.aligning .strip.wide { cursor: crosshair; }
.viewer.aligning .pick-hint { display: block; position: absolute; bottom: 8px; left: 8px; background: var(--red); color: #fff;
  padding: 3px 8px; border-radius: 5px; font-size: 12px; font-weight: 600; pointer-events: none; }
#map.aligning, #map.aligning .leaflet-interactive { cursor: crosshair; }
.img-note { color: var(--muted); font-size: 12px; margin: 6px 0 0; }

.frame { position: relative; aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden; background: #000; }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.v-meta { margin-top: 14px; }
.v-meta a { color: var(--red); }
.v-edit { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.edit-intro p { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.edit-intro .btn { margin-right: 6px; }
.editor { display: grid; gap: 8px; }
.editor .seg { display: flex; gap: 14px; }
.editor .seg label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.editor input { accent-color: var(--red); }
.editor .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.editor .row span { display: flex; align-items: center; gap: 6px; }
.editor input[type="number"] { width: 70px; padding: 5px 7px; font: inherit; border: 1px solid var(--line); border-radius: 6px; }
.editor output { min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.editor .step { margin: 0; padding: 6px 8px; border-radius: 6px; background: #fff5db; color: #8a5a00; font-size: 12.5px; }
.edit-handle { background: #fff; border: 3px solid #006ec8; border-radius: 50%; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); cursor: grab; }

@media (max-width: 900px) {
  .viewer { left: 0; top: auto; width: auto; height: var(--viewer-h); border-left: 0; border-top: 1px solid var(--line);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.12); border-radius: var(--radius) var(--radius) 0 0; }
  body.viewer-open #map { right: 0; bottom: var(--viewer-h); }
  .strip.wide img { height: 200px; }
}

/* ---------- How fresh the preview is ---------- */
.fresh {
  position: absolute; z-index: 2; left: 6px; bottom: 14px;
  padding: 2px 7px; border-radius: 4px; font-size: 11.5px; font-weight: 700; line-height: 1.5;
  color: #fff; background: rgba(0, 0, 0, 0.62); pointer-events: auto; white-space: nowrap;
}
.strip-wrap { position: relative; }
.strip-wrap > .fresh { bottom: auto; top: 30px; left: 8px; }
.fresh-live { background: #1d7f3a; }
.fresh-live::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: #fff; margin-right: 5px; vertical-align: 1px; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }
.fresh-old { background: #a86200; }
.fresh-stale { background: #b3261e; }
.fresh-unknown { background: rgba(0, 0, 0, 0.62); }
@media (prefers-reduced-motion: reduce) { .fresh-live::before { animation: none; } }

/* ---------- Full screen (the active cam's detail; js: setFullscreen) ---------- */
/* The button on the image (bottom right, as in video players) and on the live
   player (top right, clear of the player's own controls). */
.fs-btn {
  position: absolute; z-index: 3; right: 8px; bottom: 8px; width: 34px; height: 34px; padding: 0;
  display: grid; place-items: center; border: 0; border-radius: 6px; cursor: pointer;
  background: rgba(0, 0, 0, 0.5); color: #fff; opacity: 0.8; transition: opacity 0.15s, background 0.15s;
}
.fs-btn:hover, .fs-btn:focus-visible { opacity: 1; background: rgba(0, 0, 0, 0.72); }
.fs-btn:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.frame .fs-btn { top: 8px; bottom: auto; }
.fs-btn .fs-exit, .is-full .fs-btn .fs-enter { display: none; }
.is-full .fs-btn .fs-exit { display: block; }

/* Native full screen and the overlay fallback share one layout. */
.v-detail.is-full {
  --fs-chrome: 144px;   /* tabs and the time bar under the image */
  position: fixed; inset: 0; z-index: 10000; display: flex; flex-direction: column;
  width: 100%; height: 100%; background: #0d0f11; color: #e8eaed;
}
body.has-full .viewer { z-index: 10000; }   /* the overlay must cover the top and bottom bars */
body.has-full { overflow: hidden; }
.is-full .tabs { flex: none; border-bottom-color: rgba(255, 255, 255, 0.14); background: #15181b; padding: 0 10px; }
.is-full .tabs button { color: #9aa3ab; }
.is-full .tabs button[aria-selected="true"] { color: #fff; }
.is-full .viewer-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 10px 14px 12px; }
.is-full .v-meta, .is-full .v-edit { display: none; }
.is-full .v-image:not([hidden]), .is-full .v-live:not([hidden]) { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.is-full .v-image .strip-wrap { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.is-full .strip { background: transparent; border-radius: 4px; }
/* An ordinary image: as large as fits, never distorted (the summit names follow its box). */
.is-full .strip:not(.wide) { width: fit-content; max-width: 100%; }
.is-full .strip:not(.wide) img { width: auto; height: auto; max-width: 100%;
  max-height: calc(100vh - var(--fs-chrome)); max-height: calc(100dvh - var(--fs-chrome)); }
/* Its box shrinks to the image, so the badge, readout and button sit on the image, not in the screen's corners. */
.is-full .v-image .strip-wrap:has(> .strip:not(.wide)) { flex: none; width: fit-content; max-width: 100%; margin: auto; }
/* A panorama strip: full height, scroll sideways (drag, wheel or the arrow keys). */
.is-full .strip.wide { width: 100%; }
.is-full .strip.wide img { height: calc(100vh - var(--fs-chrome)); height: calc(100dvh - var(--fs-chrome)); }
.is-full .img-note, .is-full .cam-history,
.is-full .ch-time.now, .is-full .ch-title, .is-full .ch-ticks span, .is-full .ch-msg, .is-full .ch-days-one { color: #b7bec5; }
.is-full .ch-time { color: #fff; }
.is-full .ch-day { background: #1b1e21; border-color: #3a4046; color: #e8eaed; }
.is-full .ch-day[aria-selected="true"] { background: #fff; border-color: #fff; color: #111; }
.is-full .img-note .link, .is-full .img-note a { color: #fff; }
.is-full .ch-btn { background: #23272b; border-color: #3a4046; color: #e8eaed; }
.is-full .thumb-missing { background: #1b1e21; color: #b7bec5; }
/* The live player fills the screen. */
.is-full .frame { flex: 1; min-height: 0; aspect-ratio: auto; border-radius: 4px; }

/* ---------- 360° view: endless strip, direction readout, compass ---------- */
.strip.wide.looping { overflow: hidden; touch-action: pan-y; }   /* js turns it; vertical swipes still scroll */
.strip.looping .strip-track { will-change: transform; }
.strip.looping:focus-visible { outline: 2px solid #006ec8; outline-offset: 2px; }
.strip.looping.dragging { cursor: grabbing; }
/* The caret marks the centre of the view; the readout says which way that is. */
.dir-caret { position: absolute; z-index: 2; left: 50%; top: 0; width: 0; height: 0; margin-left: -7px; pointer-events: none;
  border: 7px solid transparent; border-top: 9px solid #006ec8; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5)); }
.dir-caret::after { content: ""; position: absolute; left: -0.75px; top: 2px; width: 1.5px; height: 26px; background: rgba(0, 110, 200, 0.7); }
.dir-read { position: absolute; z-index: 2; left: 50%; bottom: 8px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; pointer-events: none; }
.dir-text { padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, 0.58); color: #fff;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.to-north { pointer-events: auto; border: 0; padding: 0; background: none; cursor: pointer; display: grid; border-radius: 50%; }
.to-north:hover svg circle { fill: rgba(0, 0, 0, 0.78); }
.to-north:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.to-north .needle { transition: transform 0.05s linear; }
/* "Drag to look around": shown briefly when a panorama opens, gone once you touch it. */
.drag-hint { position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none;
  padding: 6px 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.62); color: #fff; font-size: 13px; font-weight: 600;
  white-space: nowrap; animation: drag-hint 4.5s ease forwards; }
.drag-hint span { display: inline-block; animation: drag-hint-nudge 1.2s ease-in-out 3; }
.strip-wrap.touched .drag-hint { display: none; }
@keyframes drag-hint { 0%, 70% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@keyframes drag-hint-nudge { 0%, 100% { transform: translateX(-4px); } 50% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .drag-hint, .drag-hint span { animation: none; } }
.preview .dir-read, .preview .dir-caret, .preview .drag-hint { display: none; }
/* ‹ › on the edges of a panorama: show that it turns, and turn it. */
.turn {
  position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); width: 34px; height: 52px; padding: 0;
  display: grid; place-items: center; border: 0; cursor: pointer; touch-action: none;
  background: rgba(0, 0, 0, 0.42); color: #fff; font: 600 28px/1 system-ui, sans-serif;
  opacity: 0.75; transition: opacity 0.15s, background 0.15s;
}
.turn-l { left: 0; border-radius: 0 8px 8px 0; }
.turn-r { right: 0; border-radius: 8px 0 0 8px; }
.turn span[aria-hidden] { margin-top: -3px; }
.turn:hover, .turn:focus-visible { opacity: 1; background: rgba(0, 0, 0, 0.66); }
.turn:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.is-full .turn { width: 44px; height: 72px; font-size: 36px; }
/* Only while a cam is open does the map show its seen area. */
.legend .seen-item { display: none; }
body.viewer-open .legend .seen-item { display: flex; }
