/* AOP viewer core styles — Sprint 13 slice 1 (viewer extraction).
   Started empty per the card; every rule below was pulled from css/app.css
   ONLY because a ported slice-1 control needs it. Each block names its
   app.css source line. As later slices port the drawer / locate / install /
   version, pull their rules in the same way — do NOT link app.css wholesale.
   Source: brain/tasks/13_viewer_extraction/viewer_core_scaffold.md */

/* Palette + layout tokens (app.css:8-56) — only the subset the pill-bar,
   controls margins, and attribution reference. The read viewer has no edit FAB,
   but its bottom-right corner holds the Locate FAB — so the bottom-left ⓘ
   attribution reserves --locate-fab-reserve on the right (same role app.css's
   --edit-fab-reserve plays for the editor's corner FAB) so its expanded body
   never wraps under the button. */
:root {
  --brown-ink: #2e2418;
  --brown-mid: #4e4128;
  --brown-dark: #2a1f12;
  --brown-soft: #5a4828;
  --cream-hover: #efe2c6;
  --cream-surface: rgba(250, 246, 235, 0.96);
  --cream-border: #d8cdb4;
  --control-bg: #fffdf5;
  --control-border: #b9aa88;
  --moss: #5f7157;
  --moss-dark: #384833;
  --moss-soft: #e3ebdc;
  --rust: #a85020;
  /* Locate FAB — a GPS blue that reads against the Muted Earth map without
     clashing with the rust edit FAB. */
  --locate-blue: #2b7cd3;
  --locate-blue-dark: #2367b4;
  /* Space the bottom-left ⓘ attribution must leave clear on the right so its
     expanded text never wraps under the bottom-right Locate FAB (56px + 12px
     margin + gap). Mirrors app.css --edit-fab-reserve (120px for the same 56px FAB). */
  --locate-fab-reserve: 120px;

  /* Left-rail drawer tokens (app.css:27-30). */
  --tab-h: 44px;
  --hairline: rgba(46, 36, 24, 0.14);
  --moss-tint-hover: #d6e0cb;
  --cream-wash-hover: #f1e8d2;

  --sa-top:    env(safe-area-inset-top, 0px);
  --sa-bottom: env(safe-area-inset-bottom, 0px);
  --sa-left:   env(safe-area-inset-left, 0px);
  --sa-right:  env(safe-area-inset-right, 0px);
  --frame-radius: 18px; /* iOS Safari-tab corner fillet radius */
}

/* Full-bleed map (app.css:67-92). Context-split height: 100dvh in a browser
   tab (collapsing address bar), 100vh in the installed PWA (closes the iOS
   bottom band). overflow:hidden stops page rubber-band. */
body, html { margin: 0; padding: 0; height: 100dvh; overflow: hidden; font-family: Inter, system-ui, sans-serif; }
html, body { background: #000; }
#map { position: fixed; top: 0; left: 0; width: 100vw; height: 100dvh; }
@media (display-mode: standalone) {
  html, body, #map { height: 100vh; }
}

/* MapLibre corner controls clear of the notch / home indicator (app.css:111-123).
   Only the bottom-left ⓘ attribution is present in slice 1. */
.maplibregl-ctrl-top-left    { margin-top: var(--sa-top); margin-left: var(--sa-left); }
.maplibregl-ctrl-top-right   { margin-top: var(--sa-top); margin-right: var(--sa-right); }
.maplibregl-ctrl-bottom-left { margin: 0; }
.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib { margin: 0 0 18px 16px; max-width: calc(100vw - 24px - var(--sa-left) - var(--sa-right) - var(--locate-fab-reserve)); }
.maplibregl-ctrl-bottom-right{ margin-bottom: var(--sa-bottom); margin-right: var(--sa-right); }

/* Inverted black corner fillets — round the map into iOS Safari's black chrome bands
   so the frame reads rounded, not sharp. Scoped to the iOS Safari TAB via
   html.ios-browser (head script in index.html); hidden in the installed PWA (device
   rounds the screen) + desktop. #000 blends with body{background:#000}. z:1 sits above
   the map canvas but below every control (z≥3), so they never paint over the
   pills/FAB. (app.css:103-108, verbatim.) */
.screen-corner { display: none; position: fixed; width: var(--frame-radius); height: var(--frame-radius); z-index: 1; pointer-events: none; }
html.ios-browser .screen-corner { display: block; }
.screen-corner.tl { top: 0;    left: 0;  background: radial-gradient(circle at bottom right, transparent calc(var(--frame-radius) - 0.5px), #000 var(--frame-radius)); }
.screen-corner.tr { top: 0;    right: 0; background: radial-gradient(circle at bottom left,  transparent calc(var(--frame-radius) - 0.5px), #000 var(--frame-radius)); }
.screen-corner.bl { bottom: 0; left: 0;  background: radial-gradient(circle at top right,     transparent calc(var(--frame-radius) - 0.5px), #000 var(--frame-radius)); }
.screen-corner.br { bottom: 0; right: 0; background: radial-gradient(circle at top left,      transparent calc(var(--frame-radius) - 0.5px), #000 var(--frame-radius)); }

/* Left control stack — slice 1 carries only the pill-bar (app.css:124-125). */
.left-controls { position: absolute; left: calc(12px + var(--sa-left)); top: calc(12px + var(--sa-top)); z-index: 3; width: 340px; max-width: calc(100vw - 392px - var(--sa-left) - var(--sa-right)); display: grid; gap: 8px; }
.left-controls * { box-sizing: border-box; letter-spacing: 0; }
/* Overlay pass-through. The left-controls stack floats over the map at a fixed
   340px width, so its grid gaps, the pill-bar gaps, and — when the drawer is
   collapsed — the full-width drawer row beside the narrow icon column all sit
   over empty map. With default pointer-events those empty regions eat map
   pan/zoom drags and show the arrow cursor instead of the grab-hand. Make the
   container click-through and re-arm only the visible interactive cards, so a
   drag reaches the map everywhere the chrome is actually empty. */
.left-controls { pointer-events: none; }
.left-controls .pill,
.left-controls .lr-icon-col,
.left-controls .lr-content-col,
.left-controls .util-install,
.left-controls .util-ios-hint { pointer-events: auto; }

/* Pill bar: zoom / preset / 3D (app.css:301-308). */
.pill-bar { display: grid; grid-template-columns: 3fr 4fr 1fr; gap: 8px; align-items: stretch; }
.pill-bar .pill { display: flex; width: 100%; border: 1px solid var(--control-border); border-radius: 999px; background: var(--control-bg); overflow: hidden; box-shadow: 0 8px 28px rgba(0,0,0,0.18); }
.pill-bar .pill > button { flex: 1; min-width: 0; min-height: 36px; padding: 6px 8px; border: 0; background: transparent; color: var(--brown-ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pill-bar .pill > button + button { border-left: 1px solid var(--control-border); }
.pill-bar .pill > button:hover:not(.active):not(:disabled) { background: var(--cream-hover); }
.pill-bar .pill > button.active { background: var(--moss); color: var(--control-bg); border-left-color: transparent; }
.pill-bar .pill > button svg { width: 22px; height: 22px; }
.pill-bar .pill > button.terrain-button { font: 800 0.86rem Inter, system-ui, sans-serif; letter-spacing: 0.04em; }

/* Keyboard focus ring on the controls (app.css:755). */
.left-controls button:focus-visible, .search input:focus-visible { outline: 2px solid var(--moss-dark); outline-offset: 2px; }

/* Feature search — slice 2 (app.css:126-127, 698-717). The bare search box in
   .left-controls; the full left-rail drawer (Search/Hot/Calendar tabs) is a
   later slice. The results dropdown is position:fixed and anchored to the input
   by positionSearchResults() so it escapes any clip. */
.search-shell { border: 1px solid rgba(155,132,92,0.34); border-radius: 8px; background: var(--cream-surface); box-shadow: 0 8px 28px rgba(0,0,0,0.18); display: flex; gap: 6px; padding: 6px; }
.search { position: relative; margin-bottom: 10px; }
.left-controls .search { margin-bottom: 0; width: 100%; }
.search input { width: 100%; box-sizing: border-box; padding: 8px 10px 8px 32px; font: inherit; border: 1px solid var(--control-border); border-radius: 7px; background: var(--control-bg); color: var(--brown-ink); }
.search input:focus { outline: 2px solid var(--moss-dark); border-color: var(--moss); }
.search-icon { position: absolute; left: 10px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: var(--brown-soft); pointer-events: none; z-index: 1; }
.search-results { position: fixed; background: #fff; border: 1px solid #ccc; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.18); max-height: 240px; overflow-y: auto; display: none; z-index: 1000; }
.search-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 6px 9px; cursor: pointer; font-size: 0.9rem; }
.search-item:hover, .search-item.active { background: #e8dcc3; }
.search-kind { color: #888; font-size: 0.78rem; flex: none; padding-top: 1px; }
.search-result-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.search-result-label { font-size: 0.9rem; color: var(--brown-ink); }
.search-result-desc { font-size: 0.74rem; line-height: 1.25; color: var(--brown-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-empty { padding: 6px 9px; color: #999; font-size: 0.88rem; }

/* ── Left-rail drawer — slice 3 (app.css:129-293) ──────────────────────
   Col1 (icons) + Col2 (stacked panels). Icons float DOWN to meet their
   panel's top (driven by the reflow JS); slice 3 carries two cards
   (Search, Calendar), so the icon column reserves 2 tab-heights. */
.lr-drawer { display: flex; align-items: stretch; }
.lr-icon-col { flex: 0 0 var(--tab-h); width: var(--tab-h); min-height: calc(var(--tab-h) * 3); display: flex; flex-direction: column; background: var(--cream-surface); border: 1px solid var(--cream-border); border-radius: 8px 0 0 8px; overflow: hidden; position: relative; }
.lr-icon-col.standalone { border-radius: 8px; }
.lr-icon-col.col2-short { border-bottom-right-radius: 8px; }
.lr-content-col { flex: 1 1 auto; min-width: 0; align-self: flex-start; display: flex; flex-direction: column; background: var(--cream-surface); border: 1px solid var(--cream-border); border-left: 0; border-radius: 0 8px 8px 0; overflow: hidden; position: relative; }
.lr-content-col[hidden] { display: none; }
.lr-tab { position: relative; flex: 0 0 var(--tab-h); width: var(--tab-h); height: var(--tab-h); display: grid; place-items: center; border: 0; background: transparent; color: var(--brown-mid); cursor: pointer; transition: background 0.12s ease, color 0.12s ease; }
.lr-tab svg { width: 22px; height: 22px; }
.lr-tab + .lr-tab { border-top: 1px solid var(--hairline); }
.lr-tab:hover { background: var(--cream-wash-hover); }
.lr-tab:focus-visible { outline: 2px solid var(--moss); outline-offset: -2px; }
.lr-tab.open { background: var(--moss-soft); color: var(--moss-dark); }
.lr-tab.open:hover { background: var(--moss-tint-hover); }
.lr-panel { display: none; position: relative; min-width: 0; }
.lr-panel.open { display: block; }
.lr-panel.open ~ .lr-panel.open { border-top: 1px solid var(--hairline); }
/* Inner shells lose their standalone card chrome inside the drawer. */
.lr-panel .search-shell, .lr-panel .hot-control, .lr-panel .calendar-card { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.lr-panel .search-shell { display: flex; height: var(--tab-h); padding: 0 8px; align-items: center; }

/* ── Hot now — slice 5 (app.css:820-853). Event lane only. ───────────── */
.hot-control { display: grid; gap: 6px; padding: 8px; }
.hot-control[hidden] { display: none; }
.hot-control-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 2px; color: var(--brown-ink); }
.hot-control-title { font: 800 0.68rem Inter, system-ui, sans-serif; text-transform: uppercase; }
.hot-control-status { min-width: 0; font: 600 0.68rem Inter, system-ui, sans-serif; color: var(--brown-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot-lanes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.hot-lanes[data-lane-count="1"] { grid-template-columns: minmax(0, 1fr); }
.hot-button { width: 100%; min-height: 64px; display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 7px; margin: 0; padding: 8px 9px; border: 1px solid rgba(85, 67, 44, 0.25); border-radius: 8px; background: var(--brown-mid); color: #f7f1e2; cursor: pointer; text-align: left; font: 700 0.74rem Inter, system-ui, sans-serif; text-transform: uppercase; }
.hot-button[hidden] { display: none; }
.hot-button:hover:not(:disabled) { filter: brightness(1.06); }
.hot-button:disabled { cursor: default; opacity: 0.55; filter: saturate(0.7); }
.hot-button[data-hot-state="hot-now"] { background: var(--rust); }
.hot-button[data-hot-state="coming-up"] { background: var(--brown-dark); }
.hot-button[data-hot-state="trail-hot"] { background: var(--moss); }
.hot-button[data-hot-selected="true"] { box-shadow: 0 0 0 2px rgba(247, 241, 226, 0.82), 0 0 0 4px rgba(42, 33, 22, 0.16); }
.hot-button[data-hot-priority="alert"][data-hot-selected="false"] { box-shadow: 0 0 0 2px rgba(191, 90, 54, 0.4); }
/* Trail toggle ON: brighter moss + inset ring + check glyph (app.css:845-847). */
.hot-button[data-hot-lane="trails"][data-hot-on="true"] { background: var(--moss-dark, #4e6a34); box-shadow: inset 0 0 0 2px rgba(247, 241, 226, 0.92), 0 0 0 2px rgba(78, 106, 52, 0.5); }
.hot-button[data-hot-lane="trails"][data-hot-on="true"] .hot-button-glyph { color: #eaf3d6; }
.hot-button-glyph { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; font-size: 1.1rem; line-height: 1; }
.hot-button-text { display: block; min-width: 0; }
.hot-button-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot-button-detail { display: block; margin-top: 1px; font: 400 0.72rem Inter, system-ui, sans-serif; text-transform: none; letter-spacing: 0; color: rgba(247, 241, 226, 0.88); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Locate FAB + Install / version float groups — slice 6/7 (app.css:209-274) ─ */
.util-group { width: var(--tab-h); justify-self: start; border-radius: 8px; overflow: hidden; box-shadow: 0 8px 28px rgba(0,0,0,0.18); }
.util-btn { width: var(--tab-h); height: var(--tab-h); display: grid; place-items: center; border: 0; padding: 0; cursor: pointer; transition: background 0.12s ease, color 0.12s ease; }
.util-btn svg { width: 22px; height: 22px; }

/* Locate — blue crosshair FAB, bottom-right. Mirrors the editor's pencil FAB
   (app.css .panel.collapsed: 56px circle, glow + cream ring, flat 18px bottom so
   it aligns with the bottom-left ⓘ). Locate is ALWAYS present, so it anchors the
   far-right corner (right:12px, the same corner slot the edit FAB uses elsewhere).
   On the future tester view, where Locate + Edit both show, the edit FAB sits to
   its LEFT (right:80px = 12 + 56 + 12). The lit `.active` state is set by
   viewer_core.js while the GeolocateControl tracks. */
.locate-fab {
  position: fixed; right: 12px; bottom: 18px; z-index: 5;
  width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--locate-blue); color: #f3f8ff;
  box-shadow: 0 8px 22px rgba(20,74,128,0.42), 0 0 0 4px rgba(255,253,245,0.55);
  transition: background 0.12s ease, box-shadow 0.12s ease;
}
.locate-fab[hidden] { display: none; }
.locate-fab svg { width: 24px; height: 24px; }
.locate-fab:hover { background: var(--locate-blue-dark); }
.locate-fab:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.locate-fab.active {
  background: var(--locate-blue-dark);
  box-shadow: 0 8px 22px rgba(20,74,128,0.5), 0 0 0 4px rgba(255,253,245,0.82), inset 0 0 0 2px rgba(255,255,255,0.6);
}

/* Travel notice — shown beside the Locate FAB when the device is off-park (the
   camera leash means the blue dot can't show from home). Anchored to the LEFT of the
   FAB (right 12 + 56 + 12 gap = 80px), bottoms aligned (bottom 18px), capped width,
   tap to dismiss. */
.locate-notice {
  position: fixed; right: 80px; bottom: 18px; z-index: 6;
  max-width: min(72vw, 260px);
  background: var(--locate-blue); color: #f3f8ff;
  padding: 10px 13px; border-radius: 12px; cursor: pointer;
  box-shadow: 0 8px 22px rgba(20,74,128,0.42), 0 0 0 3px rgba(255,253,245,0.55);
  font: 500 13px/1.35 "Inter", system-ui, sans-serif;
}
.locate-notice[hidden] { display: none; }
.locate-notice strong { display: block; font-size: 14px; font-weight: 700; }
.locate-notice span { display: block; margin-top: 2px; opacity: 0.85; font-size: 12px; }

/* Tester chip — injected by viewer_core.js only on ?tester=1. A small top-center
   badge so a field tester on a phone can tell the test surface (shifted GPS/clock)
   from the live day-of viewer. Non-interactive; clears the safe-area notch. */
.tester-badge {
  position: fixed; top: calc(8px + var(--sa-top)); left: 50%; transform: translateX(-50%);
  z-index: 6; pointer-events: none;
  padding: 3px 11px; border-radius: 999px;
  background: var(--rust); color: #fff;
  font: 700 11px/1.4 -apple-system, system-ui, sans-serif; letter-spacing: 0.16em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.32);
}
#pwaInstallBtn.util-install { width: var(--tab-h); height: var(--tab-h); justify-self: start; display: grid; place-items: center; padding: 0; border: 1px solid var(--rust); border-radius: 8px; background: var(--rust); color: #fff; cursor: pointer; box-shadow: 0 8px 28px rgba(0,0,0,0.18); }
#pwaInstallBtn.util-install svg { width: 22px; height: 22px; }
#pwaInstallBtn.util-install:hover { background: #96461b; }
#pwaInstallBtn.util-install:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
#pwaInstallBtn.util-install[hidden] { display: none; }
#pwaIosHint.util-ios-hint { justify-self: start; max-width: 240px; }
/* Version beside the ⓘ ("ⓘ v64"), one source of truth (#appVersion):
   - EXPANDED (loading credit / open): MapLibre's pill carries "Made by Rock Warblers
     · v64" (customAttribution, viewer_core.js); this label hides so they don't double.
   - COLLAPSED (loaded): the ⓘ + "v64" read as ONE white pill — the same combined-bubble
     look as the loading credit, not a separate ⓘ disc with a floating mark beside it.
   The combined bubble is made by letting the flex WRAPPER carry the pill background and
   dropping the inner compact ⓘ's own background, so a single rounded fill spans both.
   :has() scopes that to the collapsed state; expanded keeps MapLibre's own pill. */
.maplibregl-ctrl-bottom-left.attrib-with-version { display: flex; flex-direction: row; align-items: center; }
.attrib-version { margin: 0 7px 0 1px; font: 700 0.62rem Inter, system-ui, sans-serif; line-height: 1; letter-spacing: 0.02em; color: var(--brown-mid); white-space: nowrap; user-select: none; pointer-events: none; }
.maplibregl-ctrl-attrib.maplibregl-compact-show ~ .attrib-version { display: none; }
.attrib-with-version:has(> .maplibregl-ctrl-attrib.maplibregl-compact:not(.maplibregl-compact-show)) {
  margin: 0 0 18px 16px; background: #fff; border-radius: 12px;
}
.attrib-with-version:has(> .maplibregl-ctrl-attrib.maplibregl-compact:not(.maplibregl-compact-show)) .maplibregl-ctrl-attrib.maplibregl-compact {
  margin: 0; background: transparent;
}
/* The Locate control lives in the bottom-right FAB — hide MapLibre's default
   top-right geolocate button (it is the only top-right ctrl). */
.maplibregl-ctrl-top-right .maplibregl-ctrl-group { display: none; }

/* ── Calendar / Events + About (app.css:718-816) ───────────────────── */
.calendar-card { display: block; padding: 0; overflow: hidden; }
.left-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 8px; border-bottom: 0; background: transparent; }
.left-tab { min-width: 0; min-height: 32px; margin: 0; padding: 5px 4px; border: 1px solid var(--cream-border); border-radius: 6px; background: rgba(255,248,232,0.88); color: var(--brown-mid); cursor: pointer; font: 800 0.76rem Inter, system-ui, sans-serif; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; box-shadow: inset 0 -1px 0 rgba(46,36,24,0.06); }
.left-tab:hover { background: var(--cream-hover); border-color: var(--control-border); color: var(--brown-dark); }
.left-tab[aria-selected="true"] { background: var(--rust); border-color: #8b431b; color: var(--control-bg); box-shadow: inset 0 -2px 0 rgba(46,36,24,0.28); }
.left-tab-panel[hidden] { display: none; }
.left-tab-panels { display: block; }
.calendar-row:focus-visible { outline: 2px solid var(--moss-dark); outline-offset: 2px; }
.calendar-heading { width: 100%; display: block; margin: 0; padding: 8px 10px; border: 0; background: transparent; color: var(--brown-ink); text-align: left; }
.calendar-title { display: block; font: 800 0.78rem Inter, system-ui, sans-serif; text-transform: uppercase; }
.calendar-range { display: block; margin-top: 1px; font-size: 0.76rem; color: var(--brown-soft); }
.calendar-body { height: var(--lr-card-body-height, 240px); overflow-y: auto; padding: 0; opacity: 1; scrollbar-gutter: stable; }
.calendar-days { list-style: none; display: grid; gap: 0; margin: 0; padding: 0; }
.calendar-days li { margin: 0; padding: 0; border-top: 1px solid var(--cream-border); color: var(--brown-ink); }
.calendar-row { width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: start; gap: 8px; margin: 0; padding: 7px 10px; border: 0; border-radius: 0; background: transparent; color: var(--brown-ink); cursor: pointer; text-align: left; }
.calendar-row:hover, .calendar-row.active { background: var(--cream-hover); }
.calendar-day { padding-top: 2px; font: 800 0.68rem Inter, system-ui, sans-serif; text-transform: uppercase; color: var(--brown-mid); }
.calendar-time { display: block; min-width: 0; font: 700 0.74rem Inter, system-ui, sans-serif; line-height: 1.15; color: var(--brown-soft); overflow-wrap: anywhere; }
.calendar-name { display: block; margin-top: 1px; font-size: 0.88rem; line-height: 1.18; overflow-wrap: anywhere; }
.calendar-location { display: block; margin-top: 2px; font-size: 0.74rem; line-height: 1.15; color: var(--brown-soft); overflow-wrap: anywhere; }
.calendar-empty { padding: 8px; font-size: 0.86rem; color: var(--brown-soft); }
/* Schedule loading placeholder — spinner row.
   The 44px glyph column lines up with the calendar-row day/time column, so the
   ring sits where the schedule rows will land. Namespaced keyframe to avoid collision. */
@keyframes calLoadSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.loading-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 8px; padding: 9px 8px; }
.loading-glyph { display: flex; align-items: center; justify-content: center; }
.spinner-ring { width: 18px; height: 18px; border: 2px solid var(--cream-border); border-top-color: var(--brown-soft); border-radius: 50%; animation: calLoadSpin 0.9s linear infinite; }
.loading-text { font-size: 0.84rem; color: var(--brown-soft); line-height: 1.3; }
.loading-text strong { display: block; font: 700 0.82rem Inter, system-ui, sans-serif; color: var(--brown-mid); }
.calendar-days li[data-session-state] { position: relative; }
.calendar-days li[data-session-state="happening"] { background: #dde2cf; box-shadow: inset 3px 0 0 0 var(--rust); }
.calendar-days li[data-session-state="upcoming_next"] { background: #ecd9b1; box-shadow: inset 3px 0 0 0 var(--brown-dark); }
.calendar-days li[data-session-state="past"] { opacity: 0.5; }
.calendar-days li[data-session-state="happening"] .calendar-name { font-weight: 700; }
.calendar-days li[data-session-state="upcoming_next"] .calendar-name { font-weight: 400; }
.cal-live-badge, .cal-soon-badge { position: absolute; top: 8px; right: 8px; padding: 1px 6px; border-radius: 3px; font: 700 10px Inter, system-ui, sans-serif; text-transform: uppercase; color: #f7f1e2; white-space: nowrap; pointer-events: none; }
.cal-live-badge { background: var(--rust); }
.cal-soon-badge { top: 7px; padding: 0 5px; background: transparent; border: 1px solid var(--rust); color: var(--rust); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; text-transform: lowercase; }
.calendar-countdown { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0; padding: 5px 10px; border-radius: 0; background: rgba(250, 246, 235, 0.3); color: var(--brown-dark); border-bottom: 0; box-shadow: none; }
.calendar-countdown[hidden] { display: none; }
.calendar-countdown-label { font: 800 0.66rem Inter, system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.04em; color: var(--brown-mid); }
.calendar-countdown-value { position: relative; padding-left: 12px; font: 800 1.02rem Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; color: var(--brown-dark); }
.calendar-countdown-value::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 4px; border-radius: 50%; background: var(--rust); }
.info-panel { height: var(--lr-card-body-height, 240px); overflow-y: auto; padding: 10px; border-top: 1px solid rgba(216,205,180,0.78); color: var(--brown-ink); }
.info-panel h2 { margin: 0 0 6px; font-size: 0.95rem; line-height: 1.15; }
.info-copy { margin: 0 0 9px; font-size: 0.86rem; line-height: 1.36; }
.info-list { list-style: none; display: grid; gap: 6px; margin: 0; padding: 0; }
.info-list li { display: grid; gap: 2px; padding-top: 6px; border-top: 1px solid rgba(216,205,180,0.78); font-size: 0.82rem; line-height: 1.28; }
.info-label { font-weight: 800; color: var(--moss-dark); }
.info-note { margin: 10px 0 0; padding-top: 7px; border-top: 1px solid rgba(216,205,180,0.78); font-size: 0.78rem; line-height: 1.3; color: var(--brown-soft); }
.info-subhead { margin: 13px 0 7px; padding-top: 9px; border-top: 1px solid rgba(216,205,180,0.78); font-size: 0.9rem; line-height: 1.15; color: var(--moss-dark); }
.info-rules { list-style: disc; margin: 0 0 9px; padding-left: 18px; font-size: 0.82rem; line-height: 1.3; }
.info-rules li { margin: 0 0 3px; }

/* ── Schedule "clipboard" resize handle (app.css:804-809) ───────────────────
   One handle pinned under each card body (Events / POI / About). Dragging any
   one updates the shared --lr-card-body-height var on .lr-content-col, so all
   three bodies stay the same height across tab switches. Restored into the
   read viewer (the per-card handles were deferred at the slice-7 swap). */
.lr-resize-handle { position: relative; width: 100%; height: 13px; margin: 0; border: 0; border-top: 1px solid var(--cream-border); background: linear-gradient(180deg, rgba(250,246,235,0.92), rgba(239,226,198,0.96)); cursor: ns-resize; touch-action: none; }
.lr-resize-handle::before { content: ""; position: absolute; left: 50%; top: 50%; width: 36px; height: 4px; transform: translate(-50%, -50%); border-top: 1px solid rgba(78,65,40,0.48); border-bottom: 1px solid rgba(78,65,40,0.34); }
.lr-resize-handle:active { background: var(--cream-hover); }
.lr-resize-handle:focus-visible { outline: 2px solid var(--moss-dark); outline-offset: 2px; }

/* ── Feature click popup — slice 4 (app.css:748-754). The ONE normalized
   "what is this?" card: title, blurb / revisit, then Kind/Status/Source/Caveat.
   Rendered by window.AOPFeatureDisplay.popupHtml. ─────────────────────── */
.poi-tab-popup .poi-popup-title { margin: 0 0 4px; font: 800 0.92rem Inter, system-ui, sans-serif; line-height: 1.2; color: var(--brown-ink); }
.poi-tab-popup .poi-popup-subtitle { margin: 0 0 6px; font-size: 0.82rem; line-height: 1.3; color: var(--brown-ink); }
.poi-tab-popup .poi-popup-placeholder { margin: 0 0 6px; padding: 6px 7px; border-radius: 5px; background: #ecd9b1; color: var(--brown-dark); font-size: 0.78rem; line-height: 1.3; }
.poi-tab-popup .poi-popup-meta { margin: 0; padding: 0; font-size: 0.74rem; color: var(--brown-soft); }
.poi-tab-popup .poi-popup-meta dt { display: inline; font-weight: 700; }
.poi-tab-popup .poi-popup-meta dd { display: inline; margin: 0 8px 0 4px; }
.poi-tab-popup .poi-popup-meta dt::before { content: ""; display: block; }
/* Optional final outbound link (callout tourism page, brand-logo official site).
   Rendered last by popupHtml when the feature carries link_url. */
.poi-tab-popup .poi-popup-link { display: inline-block; margin-top: 9px; padding: 5px 11px; border-radius: 6px; background: #a85020; color: #fff; font: 700 0.78rem Inter, system-ui, sans-serif; text-decoration: none; }
.poi-tab-popup .poi-popup-link:hover { background: #8f4019; }
.poi-tab-popup .poi-popup-link:focus-visible { outline: 2px solid var(--brown-ink); outline-offset: 2px; }

/* ── POI-tab directory — slice 4b (app.css:736-747) ────────────────────── */
.poi-list { height: var(--lr-card-body-height, 240px); overflow-y: auto; padding: 8px 8px 10px; display: grid; gap: 8px; align-content: start; }
.poi-list-group { display: grid; gap: 3px; }
.poi-list-group-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 3px 4px 2px; border-bottom: 1px solid var(--cream-border); font: 800 0.68rem Inter, system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.04em; color: var(--brown-mid); }
.poi-list-group-count { color: var(--brown-soft); font: 700 0.72rem Inter, system-ui, sans-serif; text-transform: none; letter-spacing: 0; }
.poi-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; margin: 0; padding: 7px 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--brown-ink); cursor: pointer; text-align: left; font: inherit; }
.poi-row:hover, .poi-row:focus-visible { background: var(--cream-hover); border-color: var(--cream-border); outline: none; }
.poi-row-name { font: 700 0.88rem Inter, system-ui, sans-serif; line-height: 1.2; overflow-wrap: anywhere; }
.poi-row-subtitle { margin-top: 2px; font-size: 0.78rem; line-height: 1.3; color: var(--brown-soft); overflow-wrap: anywhere; }
.poi-row-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; font: 600 0.66rem Inter, system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.03em; color: var(--brown-soft); }
.poi-row-meta span { padding: 1px 5px; background: rgba(247, 241, 226, 0.7); border: 1px solid var(--cream-border); border-radius: 4px; }
.poi-empty { padding: 14px 10px; font-size: 0.86rem; line-height: 1.35; color: var(--brown-soft); text-align: center; }

/* V5 dropped the publish-count status on every width (app.css:697). The
   element stays in the DOM (it still takes load / error textContent) but is
   not painted. */
.message { display: none; }

/* Narrow-screen pill sizing (app.css:861-865). */
@media (max-width: 760px) {
  .left-controls { left: calc(8px + var(--sa-left)); right: calc(8px + var(--sa-right)); top: calc(8px + var(--sa-top)); width: auto; max-width: none; gap: 6px; }
  .pill-bar { gap: 6px; }
  .pill-bar .pill > button { min-height: 32px; padding: 4px 6px; }
  .pill-bar .pill > button svg { width: 22px; height: 22px; }
  .search-shell { padding: 4px; }
  /* Shorter default card body on phones (app.css:868); drag still overrides. */
  .lr-content-col { --lr-card-body-height: 160px; }
}
