/* ==========================================================================
   Promenade Studio — Sunlit Architectural Field Map
   Full-bleed living map, floating translucent ivory glass, zero sidebar walls.
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/Fraunces-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/Fraunces-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/static/fonts/SourceSerif4-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/static/fonts/SourceSerif4-Semibold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Sunlit Limestone & Crisp Vellum spatial map palette (AGENTS.md locked):
     warm limestone paper, deep archival ink, winter sun-gold, shadow slate,
     botanical moss, warm terracotta and crisp vermilion. */
  --map-alabaster: #F3EFE6;
  --map-water: #B8C9C8;
  --map-cypress: #CBDAC6;
  --map-limestone: #E8E0D2;
  --map-graphite: #6E6A63;

  --nocturne: #0B0F17;
  --nocturne-soft: #161E2E;
  --ink: #17202A;
  --ink-muted: #4D535B;
  --ink-whisper: #6E6A63;

  --ivory-glass: rgba(252, 250, 245, 0.92);
  --ivory-glass-strong: rgba(253, 251, 247, 0.97);
  --ivory-paper: #FDFBF7;
  --ivory-inset: #EFEAE0;

  --sun-gold: #D89622;
  --sun-liquid: #F3C05A;
  --sun-wash: rgba(216, 150, 34, 0.13);

  --shadow-slate: #687A8C;
  --shadow-slate-wash: rgba(104, 122, 140, 0.13);

  --canopy-emerald: #2C5E43;
  --canopy-lush: #40916C;
  --canopy-wash: rgba(44, 94, 67, 0.11);

  --terracotta: #B85D3B;
  --terracotta-wash: rgba(184, 93, 59, 0.11);

  --vermilion: #B83A2D;
  --vermilion-wash: rgba(184, 58, 45, 0.11);

  --claret-voice: #7C3F58;
  --slate-museum: #1E293B;

  --hairline: rgba(23, 32, 42, 0.08);
  --hairline-strong: rgba(23, 32, 42, 0.14);
  --shadow-float: 0 0 0 1px rgba(23, 32, 42, 0.08), 0 24px 56px -12px rgba(23, 32, 42, 0.18), 0 6px 18px -4px rgba(23, 32, 42, 0.07);
  --shadow-pill: 0 0 0 1px rgba(23, 32, 42, 0.08), 0 10px 28px -8px rgba(23, 32, 42, 0.15), 0 2px 6px rgba(23, 32, 42, 0.06);

  --font-display: "Fraunces", Charter, Georgia, serif;
  --font-body: "Source Serif 4", Charter, Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Text", "Segoe UI", system-ui, sans-serif;

  --composer-w: 392px;
  --pad-edge: 14px;
  --golden-wash: 0.04;
  --night-wash: 0;
  --sun-glow-x: 68%;
  --sun-glow-y: 34%;
  --map-ground-live: #F3EFE6;
  --surface-sheet: #FCFAF5;
  --surface-elevated: #FDFBF7;
  --surface-inset: #EFEAE0;
  --surface-hud: rgba(252, 250, 245, 0.92);
  --text-primary: #17202A;
  --text-secondary: #4D535B;
  --text-tertiary: #6E6A63;
  --rule-subtle: rgba(23, 32, 42, 0.08);
  --rule-strong: rgba(23, 32, 42, 0.14);
  --cta-bg: #17202A;
  --cta-fg: #FCFAF5;
  --paper-ticket: linear-gradient(180deg, #FDFBF7 0%, #F5F0E6 100%);
  --inset-letterpress: 0 1px 2px rgba(23, 32, 42, 0.05);
  --fade-scroll-x: linear-gradient(90deg, #000 0, #000 calc(100% - 24px), transparent 100%);

  /* Critically-damped spring timing curves (CSS linear()) */
  --spring-crisp: linear(
    0, 0.012, 0.048 2.4%, 0.185 5.4%, 0.562 11.8%, 0.834 18.2%,
    0.946 24.8%, 0.986 32.4%, 0.998 43%, 1
  );
  --spring-tactile: linear(
    0, 0.009, 0.036 2.2%, 0.148 5.2%, 0.492 11.4%, 0.788 17.8%,
    0.935 25%, 0.988 34%, 1.004 45%, 1.002 62%, 1
  );
}

body[data-ui-theme="dark"],
body:not([data-ui-theme="light"])[data-diurnal-phase="twilight"],
body:not([data-ui-theme="light"])[data-diurnal-phase="nocturne"] {
  --surface-sheet: #0F1520;
  --surface-elevated: #161F2E;
  --surface-inset: #1E293B;
  --surface-hud: rgba(15, 21, 32, 0.88);
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-tertiary: #64748B;
  --rule-subtle: rgba(248, 250, 252, 0.08);
  --rule-strong: rgba(248, 250, 252, 0.15);
  --cta-bg: #F8FAFC;
  --cta-fg: #0B0F17;
  --ink: #F8FAFC;
  --ink-muted: #94A3B8;
  --ink-whisper: #64748B;
  --hairline: rgba(248, 250, 252, 0.08);
  --hairline-strong: rgba(248, 250, 252, 0.15);
  --ivory-glass: rgba(15, 21, 32, 0.88);
  --ivory-glass-strong: rgba(18, 25, 38, 0.95);
  --ivory-paper: #161F2E;
  --ivory-inset: #1E293B;
  background: #0B0F17;
  color: var(--text-primary);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100vw;
  height: 100%;
  background: var(--map-alabaster);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  overflow-x: clip;
}

body.is-brick-mode {
  overflow-x: clip;
  overflow-y: auto;
  background: var(--map-alabaster);
}

.tabular {
  font-variant-numeric: tabular-nums;
}

button,
input,
a {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

button:focus-visible,
input:focus-visible,
a:focus-visible,
svg[role="slider"]:focus-visible {
  outline: 2px solid var(--sun-gold);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   1. Floating Frosted-Glass Island over Full-Bleed Edge-to-Edge Map Stage
   -------------------------------------------------------------------------- */

.studio-shell {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  overflow-x: clip;
}

.field-book-rail {
  position: fixed;
  top: 14px;
  left: 14px;
  width: var(--composer-w);
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  height: auto;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--rule-strong) transparent;
  background: var(--surface-hud);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  color: var(--text-primary);
  border: 1px solid var(--rule-strong);
  border-radius: 20px;
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
  z-index: 25;
  transition: background 240ms ease, color 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

body.is-zen .field-book-rail {
  width: auto;
  max-height: none;
  overflow: visible;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-color: transparent;
  box-shadow: none;
}

.map-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: var(--map-ground-live);
  z-index: 1;
  transition: background 280ms ease;
}

.map-canvas,
.map-svg-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.map-ambient-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      68% 62% at var(--sun-glow-x) var(--sun-glow-y),
      rgba(243, 192, 90, calc(var(--golden-wash) * 0.20)) 0%,
      rgba(216, 150, 34, 0) 70%
    ),
    radial-gradient(
      125% 95% at 55% 44%,
      rgba(19, 27, 36, calc(var(--night-wash) * 0.08)) 38%,
      rgba(19, 27, 36, calc(var(--night-wash) * 0.28)) 100%
    );
  transition: background 240ms ease;
}

/* Discreet MapLibre attribution tucked cleanly inside the map column */
.maplibregl-ctrl-bottom-right,
.maplibregl-ctrl-bottom-left {
  opacity: 0.48;
  z-index: 2 !important;
  transition: opacity 180ms ease;
}

.maplibregl-ctrl-bottom-right {
  right: max(12px, env(safe-area-inset-right, 0px)) !important;
  left: auto !important;
  bottom: max(8px, env(safe-area-inset-bottom, 0px)) !important;
}

.maplibregl-ctrl-bottom-right:hover {
  opacity: 0.9;
}

.maplibregl-ctrl-attrib {
  font-family: var(--font-sans) !important;
  font-size: 10px !important;
  background: var(--surface-hud) !important;
  color: var(--text-secondary) !important;
  backdrop-filter: blur(8px);
  border-radius: 6px !important;
  padding: 1px 28px 1px 8px !important;
}

/* --------------------------------------------------------------------------
   2. Field-Book Composer Header, Folded Route Ticket & Zen Pill
   -------------------------------------------------------------------------- */

.atelier-composer {
  position: relative;
  width: 100%;
  background: transparent;
  border-bottom: 1px solid var(--rule-strong);
  padding: 14px 16px 13px;
  z-index: 25;
  flex-shrink: 0;
}

.composer-zen-pill {
  position: fixed;
  top: max(var(--pad-edge), env(safe-area-inset-top, 0px));
  left: max(var(--pad-edge), env(safe-area-inset-left, 0px));
  z-index: 30;
}

.zen-pill-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px 7px 13px;
  border-radius: 12px;
  background: var(--surface-hud);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow-pill);
  color: var(--text-primary);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.zen-pill-trigger:hover {
  transform: translateY(-1px);
}

.zen-wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15.5px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.zen-route-summary {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 210px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zen-edit-tag {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  padding: 3.5px 9px;
  border-radius: 7px;
  background: var(--cta-bg);
  color: var(--cta-fg);
  white-space: nowrap;
  flex-shrink: 0;
}

.composer-sheet-handle,
.walk-sheet-handle,
.collapse-mobile-label {
  display: none;
}

.composer-header {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 10px;
}

.composer-masthead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.composer-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1;
}

.brand-emblem {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--text-primary);
}

.brand-wordmark {
  margin: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 6px;
  min-width: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.composer-masthead-tools {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.whisper-info-btn {
  position: relative;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--rule-subtle);
  background: var(--surface-elevated);
  flex-shrink: 0;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.whisper-info-btn::after,
.icon-circle-btn::after,
.step-nudge-btn::after,
.stop-clear-btn::after {
  content: "";
  position: absolute;
  inset: -5px;
}

.swap-circle-btn::after {
  content: "";
  position: absolute;
  inset: -2px;
}

.whisper-info-btn:hover,
.whisper-info-btn[aria-expanded="true"].whisper-info-btn:not(.is-desktop-fold) {
  background: var(--cta-bg);
  color: var(--cta-fg);
  border-color: var(--cta-bg);
}

.folded-route-ticket {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-subtle);
}

.folded-ticket-summary {
  font-family: var(--font-sans);
  font-size: 12.2px;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-edit-link {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--sun-gold);
  flex-shrink: 0;
}

.composer-header-actions {
  display: flex;
  align-items: center;
  width: 100%;
}

.mode-pill-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  padding: 2px;
  border-radius: 8px;
  background: var(--surface-inset);
  border: 1px solid var(--rule-subtle);
}

.mode-btn {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  padding: 4.5px 10px;
  border-radius: 6px;
  text-align: center;
  color: var(--text-secondary);
  transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.mode-btn.is-active {
  background: var(--surface-elevated);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(23, 32, 42, 0.12);
}

.icon-circle-btn {
  position: relative;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: var(--surface-elevated);
  border: 1px solid var(--rule-subtle);
  transition: background 150ms ease, color 150ms ease;
}

.icon-circle-btn:hover {
  background: var(--surface-inset);
  color: var(--text-primary);
}

.atelier-colophon {
  margin-bottom: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-subtle);
}

.atelier-colophon-text {
  margin: 0;
  font-size: 12.8px;
  line-height: 1.48;
  color: var(--text-secondary);
}

.composer-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.composer-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Route Endpoints Table (Destination Mode) */
.route-endpoints-card {
  position: relative;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-subtle);
  border-radius: 10px;
  padding: 5px 10px;
}

.endpoint-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

.endpoint-tag {
  width: 34px;
  flex-shrink: 0;
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--text-tertiary);
}

.autocomplete-anchor {
  position: relative;
  flex: 1;
  min-width: 0;
}

.endpoint-input {
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  padding: 2px 0;
}

.endpoint-input::placeholder {
  color: var(--text-tertiary);
  font-weight: 400;
}

.endpoint-input:focus {
  outline: none;
}

.endpoint-divider {
  position: relative;
  display: flex;
  align-items: center;
  height: 12px;
  margin-left: 42px;
}

.route-endpoints-card .locate-me-btn {
  margin-right: 32px;
}

.divider-hairline {
  flex: 1;
  height: 1px;
  background: var(--rule-subtle);
}

.swap-circle-btn {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--surface-sheet);
  border: 1px solid var(--rule-strong);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  transition: transform 180ms ease, color 150ms ease, border-color 150ms ease;
}

.swap-circle-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
  transform: rotate(180deg);
}

/* Autocomplete Dropdown */
.suggestions-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: -8px;
  right: -6px;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  box-shadow: var(--shadow-float);
  z-index: 60;
  max-height: 210px;
  overflow-y: auto;
}

.suggestion-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 7px;
  font-size: 13.2px;
  cursor: pointer;
  color: var(--text-primary);
}

.suggestion-item:hover,
.suggestion-item.is-highlighted {
  background: var(--sun-wash);
}

.suggestion-hood {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

/* Whisper Destination & Stop Suggestion Chips */
.whisper-places-row,
.stop-whispers-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

#composer-ab-panel .whisper-places-row {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: -4px;
  pointer-events: none;
  transition: max-height 220ms var(--spring-crisp), opacity 170ms ease, margin-top 180ms ease;
}

#composer-ab-panel:focus-within .whisper-places-row,
#composer-ab-panel.is-presets-open .whisper-places-row {
  max-height: 88px;
  opacity: 1;
  margin-top: 0;
  pointer-events: auto;
}

.whisper-chip {
  font-family: var(--font-sans);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-subtle);
  color: var(--text-secondary);
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.whisper-chip:hover {
  border-color: var(--rule-strong);
  color: var(--text-primary);
}

.whisper-chip.is-selected {
  background: var(--sun-wash);
  color: var(--text-primary);
  border-color: rgba(216, 150, 34, 0.45);
  font-weight: 600;
}

/* Spare Minutes Slider & Another Way */
.spare-budget-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 1px;
}

.spare-slider-col {
  flex: 1;
  min-width: 0;
}

.spare-label-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 3px;
}

.spare-readout {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.spare-compare {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--text-tertiary);
}

.sculpted-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sun-gold) 0%, var(--canopy-emerald) 100%);
  outline: none;
}

.sculpted-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--text-primary);
  border: 2px solid var(--surface-elevated);
  box-shadow: 0 1px 5px rgba(23, 32, 42, 0.3);
  cursor: grab;
}

.sculpted-slider::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--text-primary);
  border: 2px solid var(--surface-elevated);
  box-shadow: 0 1px 5px rgba(23, 32, 42, 0.3);
  cursor: grab;
}

.another-way-pill {
  flex-shrink: 0;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  padding: 5.5px 10px;
  border-radius: 7px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-strong);
  color: var(--text-primary);
  transition: background 150ms ease, color 150ms ease;
}

.another-way-pill:hover {
  background: var(--cta-bg);
  color: var(--cta-fg);
  border-color: var(--cta-bg);
}

/* Flânerie Sentence Composer */
.flanerie-sentence-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-subtle);
}

.flanerie-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.flanerie-line:first-child {
  flex-wrap: nowrap;
}

.flanerie-prose {
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.flanerie-scrub-handle {
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
  border-bottom: 1px dashed var(--rule-strong);
}

.flanerie-origin-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

.flanerie-inline-place {
  width: 100%;
  border: none;
  border-bottom: 1.5px solid var(--rule-strong);
  background: transparent;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text-primary);
  padding: 2px 2px 3px;
}

.flanerie-inline-place:focus {
  outline: none;
  border-bottom-color: var(--sun-gold);
}

.duration-sculpt-box {
  display: inline-flex;
  align-items: center;
  background: var(--surface-sheet);
  border: 1px solid var(--rule-strong);
  border-radius: 7px;
  padding: 1px 3px;
}

.step-nudge-btn {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.step-nudge-btn:hover {
  background: var(--surface-inset);
  color: var(--text-primary);
}

.duration-digit-input {
  width: 40px;
  border: none;
  background: transparent;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  -moz-appearance: textfield;
}

.duration-digit-input::-webkit-outer-spin-button,
.duration-digit-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.duration-digit-input:focus {
  outline: none;
}

/* Diurnal Clock & 24-Hour Solar/Nocturne Horizon Section */
.sun-arc-section {
  padding: 8px 10px 8px;
  border-radius: 10px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-subtle);
}

.section-caption-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  flex-wrap: wrap;
}

.diurnal-clock-lead {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.diurnal-sky-glyph {
  font-size: 13px;
  line-height: 1;
  color: var(--sun-gold);
}

body[data-diurnal-phase="twilight"] .diurnal-sky-glyph,
body[data-diurnal-phase="nocturne"] .diurnal-sky-glyph {
  color: var(--sun-liquid);
}

.sun-clock-readout {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.sun-time-controls {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.diurnal-preview-btn {
  font-family: var(--font-sans);
  font-size: 10.8px;
  font-weight: 600;
  padding: 2px 7px;
  min-height: 24px;
  border-radius: 6px;
  background: rgba(243, 192, 90, 0.18);
  border: 1px solid rgba(243, 192, 90, 0.48);
  color: var(--text-primary);
  white-space: nowrap;
}

.diurnal-preview-btn:hover {
  background: var(--sun-gold);
  color: #17202A;
}

.sun-date-input,
.brick-date-input {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--surface-sheet);
  border: 1px solid var(--rule-subtle);
  border-radius: 6px;
  padding: 1.5px 6px;
  min-height: 24px;
  max-width: 118px;
}

.sun-time-input {
  font-family: var(--font-sans);
  font-size: 11.2px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--surface-sheet);
  border: 1px solid var(--rule-subtle);
  border-radius: 6px;
  padding: 1.5px 6px;
  min-height: 24px;
}

.sun-now-pill {
  position: relative;
  font-family: var(--font-sans);
  font-size: 10.8px;
  font-weight: 600;
  padding: 1.5px 7px;
  min-height: 24px;
  border-radius: 6px;
  background: var(--sun-wash);
  border: 1px solid rgba(216, 150, 34, 0.38);
  color: var(--text-primary);
}

.sun-now-pill.is-active {
  background: var(--cta-bg);
  color: var(--cta-fg);
  border-color: var(--cta-bg);
}

.sun-arc-stage {
  margin: 0 -2px;
}

.sun-arc-svg {
  width: 100%;
  height: 46px;
  display: block;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.sun-horizon-rule {
  stroke: var(--rule-strong);
  stroke-width: 1;
}

.sun-arc-track {
  fill: none;
  stroke: var(--rule-strong);
  stroke-width: 1.35;
  stroke-dasharray: 2.5 3.5;
}

.sun-arc-active {
  fill: none;
  stroke: var(--sun-gold);
  stroke-width: 2.2;
  stroke-linecap: round;
}

.sun-horizon-dot {
  fill: var(--text-tertiary);
}

.sun-zenith-tick {
  fill: rgba(216, 150, 34, 0.55);
}

.sun-arc-orb-group {
  cursor: grab;
}

.sun-arc-orb-group:active {
  cursor: grabbing;
}

.sun-orb-core {
  fill: var(--sun-gold);
  stroke: var(--surface-elevated);
  stroke-width: 1.6;
}

body[data-diurnal-phase="nocturne"] .sun-orb-core,
body[data-diurnal-phase="twilight"] .sun-orb-core {
  fill: #EAE6DC;
  stroke: #283645;
}

.sun-orb-highlight {
  fill: #FFF6DC;
  opacity: 0.75;
}

.solar-moments-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  margin-top: 1px;
}

.moment-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3px 2px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background 140ms ease, border-color 140ms ease;
}

.moment-btn:hover {
  background: var(--surface-inset);
}

.moment-btn.is-active {
  background: var(--sun-wash);
  border-color: rgba(216, 150, 34, 0.42);
}

.moment-name {
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-primary);
}

.moment-clock {
  font-family: var(--font-sans);
  font-size: 9.8px;
  color: var(--text-tertiary);
}

/* Sleek Architectural Tags (Replacing Chunky Pill Soup) */
.atmosphere-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.atmo-chip {
  flex: 1 1 auto;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 7px;
  font-family: var(--font-sans);
  font-size: 11.4px;
  font-weight: 500;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-subtle);
  color: var(--text-secondary);
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.atmo-chip.is-active {
  background: var(--cta-bg);
  color: var(--cta-fg);
  border-color: var(--cta-bg);
  font-weight: 600;
}

.atmo-dot {
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-quiet { background: #74A892; }
.dot-sun { background: var(--sun-liquid); }
.dot-canopy { background: var(--canopy-lush); }
.dot-historic { background: #E08A6B; }

.stop-desire-box {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-subtle);
}

.stop-desire-box:focus-within {
  border-color: var(--canopy-emerald);
}

.stop-desire-icon {
  flex-shrink: 0;
  color: var(--canopy-emerald);
}

.stop-desire-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-primary);
}

.stop-desire-input::placeholder {
  color: var(--text-tertiary);
}

.stop-desire-input:focus {
  outline: none;
}

.stop-clear-btn {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: var(--surface-inset);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Single-Row Scrollable Stop Category Bar (No 3-Row Wrap Clutter) */
.stop-chain-bar {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 4px;
  padding-right: 14px;
  mask-image: var(--fade-scroll-x);
  -webkit-mask-image: var(--fade-scroll-x);
}

.stop-chain-bar::-webkit-scrollbar {
  display: none;
}

.composer-error-banner {
  margin: 8px 0 0;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--vermilion-wash);
  border: 1px solid rgba(184, 58, 45, 0.35);
  color: var(--vermilion);
  font-family: var(--font-sans);
  font-size: 12px;
}

/* --------------------------------------------------------------------------
   3. Top-Right Spatial Street Lenses Bar (Clean Segmented Map Instrument)
   -------------------------------------------------------------------------- */

.mobile-lenses-toggle {
  display: none;
}

.top-stage-bar {
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  left: auto;
  max-width: calc(100vw - var(--composer-w) - 28px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  pointer-events: none;
  z-index: 22;
}

body.is-zen .top-stage-bar {
  max-width: calc(100vw - 290px);
}

.zone-lenses-pill,
.stage-cta-cluster {
  pointer-events: auto;
}

.zone-lenses-pill {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface-hud);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow-pill);
}

.zone-lenses-pill::-webkit-scrollbar {
  display: none;
}

.lens-pill {
  flex: 0 0 auto;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 7px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background 150ms ease, color 150ms ease;
}

.lens-pill:hover {
  background: var(--surface-inset);
  color: var(--text-primary);
}

.lens-pill.is-active {
  background: var(--cta-bg);
  color: var(--cta-fg);
  font-weight: 600;
}

.lens-pill:not(.is-active) .lens-gem {
  opacity: 0.68;
}

.lens-gem {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transition: transform 150ms ease, opacity 150ms ease;
}

.lens-pill:hover .lens-gem {
  transform: scale(1.2);
}

.gem-sun {
  background: var(--sun-gold);
}

.gem-green {
  background: var(--canopy-emerald);
}

.gem-historic {
  background: var(--terracotta);
}

.gem-noisy {
  background: var(--vermilion);
}

.gem-lit {
  background: linear-gradient(90deg, #D89622 50%, #687A8C 50%);
}

.gem-calm {
  background: linear-gradient(90deg, #2C5E43 50%, #B83A2D 50%);
}

.gem-waterways {
  background: #687A8C;
  box-shadow: 0 0 0 1.5px rgba(104, 122, 140, 0.35);
}

.walk-listen-cta {
  flex-shrink: 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 9px;
  border-radius: 8px;
  background: var(--cta-bg);
  color: var(--cta-fg);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 150ms ease, opacity 150ms ease;
}

.walk-listen-cta:hover {
  opacity: 0.92;
}

.walk-listen-cta.is-playing {
  box-shadow: 0 0 0 2px var(--sun-gold);
}

.cta-pulse-glyph {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: rgba(243, 192, 90, 0.22);
  color: var(--sun-liquid);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body[data-diurnal-phase="twilight"] .cta-pulse-glyph,
body[data-diurnal-phase="nocturne"] .cta-pulse-glyph {
  background: rgba(20, 29, 38, 0.22);
  color: #141D26;
}

.walk-sheet-link {
  flex-shrink: 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 7px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-subtle);
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  transition: background 140ms ease, border-color 140ms ease;
}

.walk-sheet-link:hover {
  border-color: var(--rule-strong);
  background: var(--surface-inset);
}

/* --------------------------------------------------------------------------
   4. Promenade Cinema Audio Bar (Walk & Listen)
   -------------------------------------------------------------------------- */

.promenade-bar {
  position: fixed;
  top: 58px;
  right: 12px;
  z-index: 28;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 13px 15px;
  border-radius: 14px;
  background: rgba(23, 32, 42, 0.95);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  color: var(--ivory-paper);
  border: 1px solid rgba(243, 192, 90, 0.36);
  box-shadow: 0 18px 42px -12px rgba(23, 32, 42, 0.5);
  max-width: min(600px, calc(100vw - var(--composer-w) - 32px));
  overflow: hidden;
}

.promenade-wave {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 16px;
}

.promenade-wave span {
  width: 3px;
  height: 6px;
  border-radius: 2px;
  background: var(--sun-liquid);
  animation: promenadeEq 950ms ease-in-out infinite alternate;
}

.promenade-wave.is-paused span {
  animation-play-state: paused;
  height: 4px !important;
}

.promenade-wave span:nth-child(2) { animation-delay: 180ms; }
.promenade-wave span:nth-child(3) { animation-delay: 360ms; }
.promenade-wave span:nth-child(4) { animation-delay: 520ms; }

@keyframes promenadeEq {
  0% { height: 4px; opacity: 0.55; }
  100% { height: 16px; opacity: 1; }
}

.promenade-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.promenade-kicker {
  font-family: var(--font-sans);
  font-size: 10.5px;
  color: var(--sun-liquid);
}

.promenade-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.promenade-quote {
  margin: 2px 0 0;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 12.2px;
  line-height: 1.35;
  color: rgba(250, 246, 239, 0.82);
  max-width: 290px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.promenade-progress-rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.5px;
  background: rgba(250, 246, 239, 0.12);
  pointer-events: none;
}

.promenade-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--sun-gold) 0%, var(--sun-liquid) 100%);
  transition: width 180ms linear;
}

.promenade-controls {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.promenade-ctrl-btn {
  font-family: var(--font-sans);
  font-size: 11.2px;
  font-weight: 500;
  padding: 5px 9px;
  border-radius: 7px;
  color: rgba(250, 246, 239, 0.86);
  background: rgba(255, 255, 255, 0.1);
}

.promenade-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.promenade-ctrl-btn.is-primary {
  background: var(--sun-gold);
  color: #17202A;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   5. Dimensional Map Medallions (MapLibre Markers & SVG Fallback)
   -------------------------------------------------------------------------- */

.detour-medallion {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ivory-paper);
  border: 1.5px solid rgba(23, 32, 42, 0.22);
  box-shadow: 0 5px 14px rgba(23, 32, 42, 0.24), 0 1px 3px rgba(23, 32, 42, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  cursor: pointer;
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 200ms ease;
}

.detour-medallion-core {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFDF8;
}

.detour-medallion:hover,
.detour-medallion.is-hovered {
  transform: scale(1.2) translateY(-2px);
  box-shadow: 0 0 0 3.5px rgba(243, 192, 90, 0.56), 0 10px 22px rgba(23, 32, 42, 0.34);
  z-index: 15 !important;
}

.detour-medallion.is-active {
  transform: scale(1.25) translateY(-3px);
  box-shadow: 0 0 0 4.5px rgba(216, 150, 34, 0.76), 0 12px 26px rgba(23, 32, 42, 0.38);
  z-index: 20 !important;
}

.detour-endpoint-pin {
  padding: 3px 8px;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 10.8px;
  font-weight: 600;
  background: #17202A;
  color: #FAF6EF;
  border: 1.5px solid #FAF6EF;
  box-shadow: 0 4px 12px rgba(23, 32, 42, 0.28);
  white-space: nowrap;
}

.detour-endpoint-pin.is-origin {
  background: #FAF6EF;
  color: #17202A;
  border-color: #17202A;
}

/* --------------------------------------------------------------------------
   6. Field-Book Walk Ledger, Unrolled Walk Timeline & Walk Spine
   -------------------------------------------------------------------------- */

.exhibition-dock {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  min-height: 0;
  pointer-events: auto;
  z-index: 24;
}

body.is-zen .exhibition-dock {
  display: none;
}

.summary-ribbon,
.exhibition-carousel,
.sidewalk-sheet {
  pointer-events: auto;
}

.night-lit-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(243, 192, 90, 0.14);
  border-bottom: 1px solid rgba(243, 192, 90, 0.32);
  font-family: var(--font-sans);
  font-size: 11.5px;
}

.night-lit-copy {
  color: var(--text-secondary);
}

.night-enable-lit-btn {
  font-family: var(--font-sans);
  font-size: 11.2px;
  font-weight: 600;
  padding: 3.5px 9px;
  border-radius: 6px;
  background: var(--sun-gold);
  color: #17202A;
}

/* Tuftian Hairline Ledger (Zero Clipped Pill Boxes) */
.summary-ribbon {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  padding: 12px 16px 12px;
  border-bottom: 1px solid var(--rule-strong);
  background: transparent;
}

.summary-gains-track {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 0;
  min-width: 0;
}

.gain-pill {
  position: relative;
  font-family: var(--font-sans);
  font-size: 11.8px;
  font-weight: 500;
  padding: 1px 9px 1px 0;
  margin-right: 9px;
  border-right: 1px solid var(--rule-subtle);
  background: none;
  color: var(--text-secondary);
}

.gain-pill:last-child {
  border-right: none;
  margin-right: 0;
  padding-right: 0;
}

.gain-pill.is-primary {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

.gain-pill.is-sun,
.gain-pill.is-lit {
  color: var(--sun-gold);
  font-weight: 600;
}

.gain-pill.is-calm,
.gain-pill.is-flora {
  color: var(--canopy-lush);
  font-weight: 600;
}

.gain-pill.is-safe,
.gain-pill.is-rooms {
  color: var(--text-primary);
}

.gain-pill.is-stops {
  color: var(--sun-gold);
  font-weight: 600;
}

/* Distance-Indexed 6px Sun, Canopy & Shade Exposure Strip */
.walk-exposure-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.walk-exposure-strip {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 7px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface-inset);
  cursor: crosshair;
}

.exposure-seg {
  height: 100%;
  min-width: 2px;
  transition: opacity 120ms ease, filter 120ms ease;
}

.exposure-seg.tone-sun { background: var(--sun-gold); }
.exposure-seg.tone-park { background: var(--canopy-emerald); }
.exposure-seg.tone-shade { background: var(--shadow-slate); }
.exposure-seg.tone-lit { background: #E8A838; }
.exposure-seg.tone-dim { background: #364554; }

.exposure-seg:hover,
.exposure-seg.is-hovered {
  filter: brightness(1.18);
}

.walk-exposure-caption-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 10.5px;
  color: var(--text-tertiary);
}

.exposure-hover-readout {
  color: var(--text-secondary);
  font-weight: 500;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-sheet-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.ribbon-action-btn {
  flex-shrink: 0;
  white-space: nowrap;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 9px;
  border-radius: 7px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-subtle);
  color: var(--text-primary);
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.ribbon-action-btn.is-quiet-tool {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
  padding: 4px 7px;
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 3px;
}

.ribbon-action-btn:hover:not(:disabled),
.ribbon-action-btn[aria-expanded="true"] {
  background: var(--cta-bg);
  color: var(--cta-fg);
  border-color: var(--cta-bg);
  text-decoration: none;
}

.ribbon-action-btn:disabled {
  opacity: 0.38;
  cursor: default;
}

/* Legacy Colophon & Stop Contrast Styles */
.certified-human-signature {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule-subtle);
  background: linear-gradient(180deg, rgba(44, 94, 67, 0.06) 0%, rgba(216, 150, 34, 0.04) 100%);
}

.human-signature-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.human-printer-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--canopy-wash);
  border: 1px solid rgba(44, 94, 67, 0.34);
  color: var(--canopy-lush);
  font-size: 15px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.human-signature-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.human-signature-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.human-signature-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.human-signature-counts {
  font-family: var(--font-sans);
  font-size: 10.8px;
  font-weight: 600;
  color: var(--canopy-lush);
}

.human-signature-byline {
  margin: 0;
  font-family: var(--font-body);
  font-size: 12.8px;
  line-height: 1.42;
  color: var(--text-secondary);
}

.stop-contrast-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-subtle);
}

.stop-contrast-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.stop-contrast-col.is-rejected {
  padding-left: 10px;
  border-left: 1px solid var(--rule-subtle);
}

.stop-contrast-kicker {
  font-family: var(--font-sans);
  font-size: 10.2px;
  font-weight: 600;
  color: var(--canopy-lush);
}

.stop-contrast-col.is-rejected .stop-contrast-kicker {
  color: var(--vermilion);
}

.stop-contrast-name {
  font-family: var(--font-display);
  font-size: 13.2px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stop-contrast-meta {
  font-family: var(--font-sans);
  font-size: 10.5px;
  color: var(--text-tertiary);
}

.stop-contrast-quote {
  margin: 2px 0 0;
  font-family: var(--font-body);
  font-size: 11.8px;
  line-height: 1.38;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Unified Chronological Walk Spine (Replaces Vignette Bar) */
.walk-spine-section {
  padding: 12px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.walk-spine-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.walk-spine-heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.walk-spine-meta {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--text-tertiary);
}

.walk-spine-list {
  margin: 0;
  padding: 0 0 0 13px;
  list-style: none;
  border-left: 1.5px solid var(--rule-strong);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spine-entry {
  position: relative;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-subtle);
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.spine-entry::before {
  content: "";
  position: absolute;
  left: -18.5px;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--surface-sheet);
  border: 2px solid var(--text-tertiary);
}

.spine-entry.has-voice::before {
  border-color: var(--sun-gold);
  background: var(--sun-gold);
}

.spine-entry:hover,
.spine-entry.is-active {
  border-color: var(--sun-gold);
}

.spine-entry-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.spine-entry-instr {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13.6px;
  line-height: 1.3;
  color: var(--text-primary);
}

.spine-entry-dist {
  font-family: var(--font-sans);
  font-size: 10.8px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.spine-voice-card {
  margin-top: 3px;
  padding-top: 6px;
  border-top: 1px solid var(--rule-subtle);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.spine-voice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.spine-voice-kicker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.spine-voice-toggle {
  font-family: var(--font-sans);
  font-size: 10.8px;
  font-weight: 600;
  color: var(--sun-gold);
}

.spine-voice-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 14.2px;
  font-weight: 600;
  line-height: 1.22;
  color: var(--text-primary);
}

.spine-voice-byline {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--text-tertiary);
}

.spine-voice-excerpt {
  margin: 0;
  font-family: var(--font-body);
  font-size: 12.8px;
  line-height: 1.45;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.spine-entry.is-expanded .spine-voice-excerpt {
  display: block;
  -webkit-line-clamp: unset;
}

.spine-inline-detail {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 4px;
}

.spine-inline-photo {
  width: 100%;
  max-height: 164px;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid var(--rule-subtle);
}

.spine-inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* Expandable Sidewalk, WalkFolio & Live Guide Sheets (Inside Field-Book) */
.sidewalk-sheet {
  margin: 10px 16px;
  max-height: min(390px, 52dvh);
  overflow-y: auto;
  padding: 13px 15px;
  border-radius: 12px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow-pill);
}

.sidewalk-sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--rule-subtle);
  margin-bottom: 9px;
}

.sidewalk-sheet-title {
  margin: 0 0 3px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
}

.sidewalk-sheet-streets {
  margin: 0;
  font-size: 13px;
  color: var(--text-primary);
}

.sidewalk-sheet-canopy {
  margin: 2px 0 0;
  font-family: var(--font-sans);
  font-size: 11.8px;
  color: var(--canopy-lush);
}

.sheet-close-btn {
  font-family: var(--font-sans);
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--surface-inset);
  color: var(--text-primary);
}

.sidewalk-steps-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidewalk-step-item {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-sheet);
  border: 1px solid var(--rule-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: border-color 140ms ease;
}

.sidewalk-step-item:hover {
  border-color: var(--sun-gold);
}

.sidewalk-step-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.sidewalk-step-instr {
  font-weight: 600;
  font-size: 13.2px;
  color: var(--text-primary);
}

.sidewalk-step-dist {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.sidewalk-cue-pill {
  display: inline-flex;
  align-self: flex-start;
  font-family: var(--font-sans);
  font-size: 10.8px;
  font-weight: 500;
  padding: 1.5px 7px;
  border-radius: 5px;
}

.sidewalk-cue-pill.tone-sun {
  background: var(--sun-wash);
  color: #8A5B0A;
}

body[data-diurnal-phase="twilight"] .sidewalk-cue-pill.tone-sun,
body[data-diurnal-phase="nocturne"] .sidewalk-cue-pill.tone-sun {
  color: var(--sun-liquid);
}

.sidewalk-cue-pill.tone-shade {
  background: var(--shadow-slate-wash);
  color: var(--text-secondary);
}

.sidewalk-cue-pill.tone-park {
  background: var(--canopy-wash);
  color: var(--canopy-lush);
}

/* Folded Exhibition Track (Inside Field-Book When Opened; Never Covers Map) */
.exhibition-carousel {
  position: relative;
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
}

.exhibition-track {
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow-x: hidden;
  width: 100%;
}

.exhibition-track::-webkit-scrollbar {
  display: none;
}

.carousel-paddle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ivory-glass-strong);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--hairline-strong);
  box-shadow: var(--shadow-pill);
  color: var(--nocturne);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  opacity: 0.94;
  transition: opacity 150ms ease, transform 150ms ease;
}

.carousel-paddle::after {
  content: "";
  position: absolute;
  inset: -6px;
}

.carousel-paddle.is-edge {
  opacity: 0;
  pointer-events: none;
}

.carousel-paddle:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.06);
}

.carousel-paddle.is-prev { left: 6px; }
.carousel-paddle.is-next { right: 6px; }

/* Tactile Horizontal Archival Placard Card */
.exhibit-card {
  flex: 0 0 344px;
  scroll-snap-align: start;
  background: var(--ivory-glass-strong);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  box-shadow: var(--shadow-float);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 190ms cubic-bezier(0.22, 1, 0.36, 1), border-color 180ms ease, box-shadow 180ms ease;
  cursor: pointer;
}

.exhibit-card:hover,
.exhibit-card.is-hovered {
  transform: translateY(-3px);
  border-color: rgba(216, 150, 34, 0.58);
}

.exhibit-card.is-active {
  border-color: var(--sun-gold);
  box-shadow: 0 0 0 2px rgba(216, 150, 34, 0.45), var(--shadow-float);
}

.exhibit-placard-main {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 10px 12px 9px;
  flex: 1;
  min-width: 0;
}

.exhibit-media-wrap {
  position: relative;
  contain: content;
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  border-radius: 12px;
  background: #EAE2D3;
  overflow: hidden;
  border: 1px solid var(--hairline);
}

.exhibit-media-wrap.is-contain-plate {
  background: var(--ivory-paper);
  padding: 4px;
}

.exhibit-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 360ms ease;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .exhibit-card:hover .exhibit-photo {
    will-change: transform;
  }
}

.exhibit-media-wrap.is-contain-plate .exhibit-photo {
  object-fit: contain;
}

.exhibit-card:hover .exhibit-photo {
  transform: scale(1.04);
}

.exhibit-zoom-pill {
  position: absolute;
  right: 5px;
  bottom: 5px;
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 600;
  padding: 1.5px 5.5px;
  border-radius: 999px;
  background: rgba(23, 32, 42, 0.76);
  color: var(--ivory-paper);
  backdrop-filter: blur(6px);
}

/* Medallion badge when a passage carries pure archival text without a photo */
.exhibit-frontispiece {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 35%, rgba(216, 150, 34, 0.18) 0%, rgba(216, 150, 34, 0) 70%),
    linear-gradient(145deg, rgba(236, 228, 212, 0.9) 0%, rgba(250, 246, 239, 0.72) 100%);
  border: 1px solid var(--hairline);
}

.exhibit-frontispiece-seal {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FFFDF8;
  box-shadow: 0 3px 8px rgba(23, 32, 42, 0.18);
}

.exhibit-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2.5px;
  flex: 1;
  min-width: 0;
}

.exhibit-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.exhibit-kind-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exhibit-mini-swatch {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.exhibit-dist-tag {
  font-family: var(--font-sans);
  font-size: 10.5px;
  color: var(--ink-whisper);
  flex-shrink: 0;
}

.exhibit-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14.8px;
  line-height: 1.2;
  color: var(--nocturne);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exhibit-subline {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--ink-whisper);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exhibit-excerpt {
  margin: 2px 0 0;
  font-family: var(--font-body);
  font-size: 12.6px;
  line-height: 1.38;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.exhibit-card.is-no-photo .exhibit-excerpt {
  -webkit-line-clamp: 3;
}

.exhibit-skipped-note {
  margin: 3px 0 0;
  padding: 3px 7px;
  border-radius: 7px;
  background: rgba(23, 32, 42, 0.045);
  font-family: var(--font-sans);
  font-size: 10.5px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exhibit-citation-footer {
  margin-top: auto;
  padding: 6px 11px 7px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(246, 241, 231, 0.58);
}

.exhibit-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.exhibit-cite-source {
  font-size: 11.8px;
  font-style: italic;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exhibit-cite-link {
  flex-shrink: 0;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--nocturne);
  text-decoration: none;
  border-bottom: 1px solid rgba(18, 36, 29, 0.35);
  transition: color 140ms ease, border-color 140ms ease;
}

.exhibit-cite-link:hover {
  color: var(--terracotta);
  border-bottom-color: var(--terracotta);
}

/* --------------------------------------------------------------------------
   7. QR Handoff Modal & Full-Bleed Darkroom Lightbox
   -------------------------------------------------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(18, 36, 29, 0.44);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.is-darkroom {
  background: rgba(14, 24, 20, 0.88);
  backdrop-filter: blur(18px);
}

.qr-dialog-card {
  width: min(370px, 100%);
  background: var(--ivory-paper);
  border: 1px solid var(--hairline-strong);
  border-radius: 24px;
  padding: 18px 20px 20px;
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.qr-dialog-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qr-dialog-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--nocturne);
}

.qr-svg-mount {
  width: 196px;
  height: 196px;
  padding: 10px;
  border-radius: 18px;
  background: #FAF9F6;
  border: 1px solid var(--hairline-strong);
}

.qr-svg-mount svg {
  width: 100%;
  height: 100%;
  display: block;
}

.qr-dialog-caption {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-muted);
}

.qr-dialog-actions {
  display: flex;
  gap: 8px;
  width: 100%;
}

.qr-primary-btn,
.qr-secondary-link {
  flex: 1;
  padding: 9px 12px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.qr-primary-btn {
  background: var(--nocturne);
  color: var(--ivory-paper);
}

.qr-secondary-link {
  background: rgba(18, 36, 29, 0.08);
  color: var(--nocturne);
}

/* Lightbox -> Editorial Book-Spread Vignette Reader & 2-Column Tufte Field Guide */
.archive-count-pill {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 4px 10px 4px 6px;
  border-left: 1px solid var(--hairline);
}

.walk-sheet-link.is-story-cta {
  background: rgba(255, 251, 242, 0.96);
  border-color: rgba(223, 154, 40, 0.48);
  font-weight: 600;
}

.pangram-human-seal {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(42, 111, 78, 0.13);
  border: 1px solid rgba(42, 111, 78, 0.34);
  color: #19583A;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 140ms ease, transform 140ms ease;
}

.pangram-human-seal:hover {
  background: rgba(42, 111, 78, 0.22);
  transform: translateY(-1px);
}

.detour-fastest-callout {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(250, 246, 239, 0.94);
  border: 1px dashed rgba(110, 106, 99, 0.65);
  color: #4E4A44;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(18, 36, 29, 0.12);
  pointer-events: none;
  white-space: nowrap;
}

.detour-discovery-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #B85D3B;
  border: 2px solid #FAF6EF;
  box-shadow: 0 2px 7px rgba(18, 36, 29, 0.28);
  cursor: pointer;
  padding: 0;
  opacity: 0.78;
  transition: transform 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
}

.detour-discovery-dot:hover {
  transform: scale(1.55);
  opacity: 1;
  box-shadow: 0 0 0 4px rgba(223, 154, 40, 0.45), 0 4px 12px rgba(18, 36, 29, 0.35);
  z-index: 18 !important;
}

.map-hover-card {
  position: fixed;
  top: 68px;
  right: var(--pad-edge);
  z-index: 32;
  width: min(336px, calc(100vw - 32px));
  background: rgba(252, 249, 242, 0.97);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  border: 1px solid var(--hairline-strong);
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: 0 18px 42px -12px rgba(18, 36, 29, 0.32);
  display: flex;
  flex-direction: column;
  gap: 7px;
  pointer-events: none;
}

.hover-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hover-card-media-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.hover-card-thumb {
  width: 62px;
  height: 62px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--hairline);
}

.hover-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.22;
  color: var(--nocturne);
}

.hover-card-sub {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--ink-whisper);
}

.hover-card-excerpt {
  margin: 0;
  font-family: var(--font-body);
  font-size: 12.6px;
  line-height: 1.42;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hover-card-hint {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--canopy-emerald);
}

.exhibit-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.exhibit-card .pangram-human-seal {
  font-size: 10px;
  padding: 2px 7px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exhibit-read-btn {
  flex-shrink: 0;
  white-space: nowrap;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--nocturne);
  background: rgba(216, 150, 34, 0.16);
  border: 1px solid rgba(216, 150, 34, 0.4);
  border-radius: 999px;
  padding: 2.5px 9px;
  transition: background 140ms ease;
}

.exhibit-read-btn:hover {
  background: rgba(216, 150, 34, 0.28);
}

.modal-backdrop.is-vignette-reader {
  background: rgba(14, 24, 20, 0.72);
  backdrop-filter: blur(18px);
  z-index: 95;
}

.vignette-reader-frame {
  width: min(1180px, 95vw);
  max-height: 91dvh;
  background: #FAF6EF;
  color: var(--nocturne);
  border: 1px solid var(--hairline-strong);
  border-radius: 26px;
  padding: 18px 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 32px 80px rgba(10, 20, 16, 0.48);
  overflow: hidden;
  transition: width 180ms ease, max-height 180ms ease, height 180ms ease;
}

.vignette-reader-frame.is-fullscreen {
  width: 98vw;
  height: 96dvh;
  max-height: 96dvh;
  border-radius: 18px;
}

.vignette-reader-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
  flex-wrap: wrap;
}

.vignette-head-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 240px;
  flex: 1;
}

.vignette-badges-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.vignette-kicker {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--terracotta);
}

.vignette-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.18;
  color: var(--nocturne);
}

.vignette-subline {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--ink-muted);
}

.vignette-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.vignette-mode-tabs,
.vignette-zoom-controls,
.vignette-font-controls {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(18, 36, 29, 0.06);
  border: 1px solid var(--hairline);
}

.vignette-fullscreen-btn {
  font-family: var(--font-sans);
  font-size: 11.8px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(223, 154, 40, 0.18);
  border: 1px solid rgba(223, 154, 40, 0.44);
  color: var(--nocturne);
}

.vignette-fullscreen-btn.is-active {
  background: var(--nocturne);
  border-color: var(--nocturne);
  color: var(--ivory-paper);
}

.promenade-ctrl-btn.is-enlarge {
  background: rgba(223, 154, 40, 0.24);
  border: 1px solid rgba(243, 192, 90, 0.55);
  color: #FFF8EA;
  font-weight: 600;
}

.promenade-meta.is-clickable {
  cursor: pointer;
}

.vignette-tab,
.font-step-btn {
  font-family: var(--font-sans);
  font-size: 11.8px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--ink-muted);
  transition: background 140ms ease, color 140ms ease;
}

.vignette-tab.is-active,
.font-step-btn.is-active {
  background: var(--nocturne);
  color: var(--ivory-paper);
  font-weight: 600;
}

.vignette-listen-btn {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--sun-gold);
  color: var(--nocturne);
}

.vignette-listen-btn.is-compact {
  padding: 4px 10px;
  font-size: 11.2px;
}

.vignette-close-btn {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(18, 36, 29, 0.08);
  color: var(--nocturne);
}

.vignette-reader-grid {
  display: grid;
  grid-template-columns: minmax(280px, 45%) 1fr;
  gap: 22px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.vignette-reader-frame[data-reader-mode="image"] .vignette-reader-grid,
.vignette-reader-frame[data-reader-mode="streetview"] .vignette-reader-grid,
.vignette-reader-frame[data-reader-mode="document"] .vignette-reader-grid,
.vignette-reader-frame[data-reader-mode="timelens"] .vignette-reader-grid {
  grid-template-columns: 1fr;
}

.vignette-reader-frame[data-reader-mode="image"] .vignette-text-col,
.vignette-reader-frame[data-reader-mode="streetview"] .vignette-text-col,
.vignette-reader-frame[data-reader-mode="document"] .vignette-text-col,
.vignette-reader-frame[data-reader-mode="timelens"] .vignette-text-col {
  display: none;
}

.vignette-tab.is-doc-tab {
  color: var(--nocturne);
  font-weight: 600;
}

.vignette-document-stage {
  width: 100%;
  height: 70dvh;
  border-radius: 16px;
  overflow: auto;
  border: 1px solid var(--hairline-strong);
  background: #FFFDF9;
  display: flex;
  flex-direction: column;
}

.vignette-reader-frame.is-fullscreen .vignette-document-stage {
  height: 79dvh;
}

.vignette-doc-cert-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 18px;
  background: linear-gradient(90deg, rgba(42, 111, 78, 0.11) 0%, rgba(223, 154, 40, 0.10) 100%);
  border-bottom: 1px solid var(--hairline-strong);
  flex-shrink: 0;
}

.vignette-doc-cert-meta {
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--ink);
  font-weight: 500;
}

.vignette-doc-scan-wrap {
  width: 100%;
  background: #F4EFE4;
  border-bottom: 1px solid var(--hairline-strong);
  padding: 14px 20px;
  overflow: auto;
  flex-shrink: 0;
}

.vignette-doc-scan-img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  background: #FFFDF9;
  cursor: zoom-in;
  transform-origin: top left;
}

.vignette-document-iframe {
  width: 100%;
  min-height: 58dvh;
  flex: 1;
  border: 0;
  display: block;
  background: var(--map-alabaster);
}

.vignette-document-sheet {
  width: 100%;
  flex: 1;
  overflow-y: visible;
  padding: 26px 40px 34px;
  max-width: 82ch;
  margin: 0 auto;
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.74;
  color: var(--nocturne);
  display: flex;
  flex-direction: column;
  gap: 15px;
  transform-origin: top center;
}

.vignette-reader-frame[data-font-scale="sm"] .vignette-document-sheet {
  font-size: 17px;
}

.vignette-reader-frame[data-font-scale="lg"] .vignette-document-sheet {
  font-size: 23.5px;
}

.vignette-reader-frame[data-font-scale="xl"] .vignette-document-sheet,
.vignette-reader-frame[data-font-scale="xl"] .vignette-story-body {
  font-size: 27px;
  line-height: 1.76;
}

.vignette-doc-banner {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
}

.vignette-doc-contrast {
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(201, 74, 56, 0.07);
  border-left: 3.5px solid var(--vermilion);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}

.exhibit-doc-btn {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ivory-paper);
  background: var(--nocturne);
  border-radius: 999px;
  padding: 3.5px 10px;
}

.vignette-reader-frame[data-reader-mode="text"] .vignette-reader-grid {
  grid-template-columns: 1fr;
}

.vignette-reader-frame[data-reader-mode="text"] .vignette-media-col {
  display: none;
}

.vignette-media-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
}

.vignette-photo-stage {
  position: relative;
  background: #16231D;
  border-radius: 16px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  max-height: 54dvh;
  overflow: auto;
}

.vignette-reader-frame[data-reader-mode="image"] .vignette-photo-stage {
  max-height: 68dvh;
}

.lightbox-img {
  max-width: 100%;
  max-height: 50dvh;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  cursor: zoom-in;
  transition: transform 200ms ease;
}

.vignette-reader-frame[data-reader-mode="image"] .lightbox-img {
  max-height: 64dvh;
}

.lightbox-img.is-zoomed {
  max-width: none;
  max-height: none;
  width: 180%;
  cursor: zoom-in;
}

.lightbox-img.is-zoomed-deep {
  max-width: none;
  max-height: none;
  width: 265%;
  cursor: zoom-out;
}

.vignette-zoom-chip {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(18, 36, 29, 0.82);
  color: var(--ivory-paper);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
}

.vignette-cite-stage {
  background: #F2ECE0;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow: auto;
}

.vignette-cite-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cite-enlarge-chip {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--nocturne);
  color: var(--ivory-paper);
}

.lightbox-cite-img {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 6px;
  cursor: zoom-in;
}

.vignette-reader-frame[data-reader-mode="image"] .lightbox-cite-img {
  max-height: none;
}

.brick-story-head-btns,
.brick-plate-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.brick-landmark-img {
  cursor: zoom-in;
}

.vignette-ext-link.is-pangram-link {
  color: #19583A;
  font-weight: 600;
}

.vignette-cite-tag {
  font-family: var(--font-sans);
  font-size: 10.5px;
  color: var(--ink-muted);
}

.vignette-streetview-stage {
  width: 100%;
  height: 54dvh;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--hairline-strong);
  background: #E8E0D2;
}

.vignette-reader-frame[data-reader-mode="streetview"] .vignette-streetview-stage {
  height: 66dvh;
}

.vignette-streetview-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.vignette-media-caption {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-muted);
}

.vignette-text-col {
  overflow-y: auto;
  padding: 4px 10px 10px 4px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vignette-reader-frame[data-reader-mode="text"] .vignette-text-col {
  max-width: 70ch;
  margin: 0 auto;
  width: 100%;
  padding: 12px 18px;
  background: #FFFDF9;
  border-radius: 18px;
  border: 1px solid var(--hairline);
}

.vignette-story-body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.68;
  color: var(--nocturne);
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.vignette-reader-frame[data-reader-mode="text"] .vignette-story-body {
  font-size: 21px;
  line-height: 1.74;
}

.vignette-reader-frame[data-font-scale="sm"] .vignette-story-body {
  font-size: 15px;
}

.vignette-reader-frame[data-reader-mode="text"][data-font-scale="sm"] .vignette-story-body {
  font-size: 17.5px;
}

.vignette-reader-frame[data-font-scale="lg"] .vignette-story-body {
  font-size: 22px;
  line-height: 1.74;
}

.vignette-reader-frame[data-reader-mode="text"][data-font-scale="lg"] .vignette-story-body {
  font-size: 25px;
}

.vignette-reader-frame[data-font-scale="xl"] .vignette-story-body {
  font-size: 26px;
  line-height: 1.76;
}

.vignette-reader-frame[data-reader-mode="text"][data-font-scale="xl"] .vignette-story-body {
  font-size: 29px;
}

.vignette-story-body p {
  margin: 0;
}

.vignette-context-box {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(18, 36, 29, 0.045);
  border-left: 3px solid var(--sun-gold);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-muted);
}

.vignette-reader-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
  flex-wrap: wrap;
}

.vignette-stepper-btns,
.vignette-links-cluster {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.vignette-nav-btn {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(18, 36, 29, 0.08);
  color: var(--nocturne);
}

.vignette-counter {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-muted);
}

.vignette-ext-link {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
}

.vignette-source-cta {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--nocturne);
  color: var(--ivory-paper);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   8. 2-Column Tuftian Field Guide / Brick Mode (/?b=1)
   -------------------------------------------------------------------------- */

.brick-shell {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;
  background: var(--map-alabaster);
  color: var(--nocturne);
  display: flex;
  flex-direction: column;
}

.brick-topbar {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top, 0px)) 24px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--hairline-strong);
}

.brick-topbar-title-group {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1;
}

.brick-badge {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--canopy-emerald);
}

.brick-route-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.brick-value-strip {
  font-family: var(--font-sans);
  font-size: 12.2px;
  color: var(--ink-muted);
}

.brick-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.brick-ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  white-space: nowrap;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--hairline-strong);
  text-decoration: none;
  color: var(--nocturne);
  background: #FFFDF9;
}

.brick-ghost-btn.is-dark {
  background: var(--nocturne);
  color: var(--ivory-paper);
  border-color: var(--nocturne);
}

.brick-tufte-grid {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 24px max(26px, env(safe-area-inset-bottom, 0px));
  flex: 1;
  display: grid;
  grid-template-columns: minmax(290px, 37%) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.brick-tufte-grid > * {
  min-width: 0;
  max-width: 100%;
}

.brick-macro-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100dvh - 110px);
}

.brick-sparkmap-box {
  background: var(--surface-elevated);
  border: 1px solid var(--hairline-strong);
  border-radius: 18px;
  padding: 12px 14px 10px;
}

.brick-sparkmap-svg {
  width: 100%;
  height: 185px;
  display: block;
}

.brick-sparkmap-legend {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--ink-whisper);
  margin-top: 4px;
}

.brick-step-spine {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.brick-spine-row {
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 253, 249, 0.72);
  border: 1px solid var(--hairline);
  font-family: var(--font-sans);
  font-size: 12.2px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
}

.brick-spine-row.is-active {
  background: var(--nocturne);
  color: var(--ivory-paper);
  border-color: var(--nocturne);
  font-weight: 600;
}

.brick-card {
  background: var(--surface-elevated);
  border: 1px solid var(--hairline-strong);
  border-radius: 24px;
  padding: 26px 28px;
  box-shadow: var(--inset-letterpress), var(--shadow-pill);
  display: flex;
  flex-direction: column;
  gap: 15px;
  touch-action: pan-y;
}

.brick-compass-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  min-width: 0;
}

.brick-compass-dial {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-inset);
  box-shadow: inset 0 0 0 1px var(--rule-subtle);
}

.brick-compass-cardinal {
  font-family: var(--font-display);
  font-size: 5.8px;
  font-weight: 600;
  fill: var(--sun-gold);
}

.brick-step-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brick-step-counter {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
}

.brick-step-distance {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--nocturne);
}

.brick-instruction {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: var(--nocturne);
  overflow-wrap: anywhere;
}

.brick-sidewalk-badge {
  margin-left: auto;
  max-width: 100%;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 12px;
  background: var(--sun-wash);
  color: #6B4608;
  overflow-wrap: anywhere;
}

.brick-sidewalk-badge.tone-shade {
  background: rgba(37, 68, 94, 0.12);
  color: var(--slate-museum);
}

.brick-sidewalk-badge.tone-park {
  background: var(--canopy-wash);
  color: var(--canopy-emerald);
}

.brick-landmark-hint {
  margin: 0;
  font-size: 15.5px;
  color: var(--ink-muted);
}

.brick-story-box {
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--ivory-paper);
  border-left: 3.5px solid var(--claret-voice);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.brick-story-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.pangram-human-seal.is-inline {
  white-space: normal;
  max-width: 100%;
}

.brick-story-quote {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink);
}

.brick-story-cite {
  font-size: 13px;
  font-style: italic;
  color: var(--ink-muted);
}

.brick-landmark-plate {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(18, 36, 29, 0.04);
  border: 1px solid var(--hairline);
}

.brick-landmark-img {
  width: 112px;
  height: 82px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

.brick-landmark-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brick-landmark-caption {
  font-size: 14px;
  color: var(--nocturne);
}

.brick-next-whisper {
  margin: 4px 0 0;
  padding: 10px 13px;
  border-radius: 13px;
  background: var(--surface-inset);
  border: 1px solid var(--rule-subtle);
  font-family: var(--font-sans);
  font-size: 12.8px;
  color: var(--ink-muted);
}

.brick-nav-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.brick-nav-btn {
  min-height: 44px;
  flex-shrink: 0;
  white-space: nowrap;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(23, 32, 42, 0.08);
  color: var(--nocturne);
}

.brick-nav-btn.is-primary {
  background: var(--nocturne);
  color: var(--ivory-paper);
}

.brick-nav-btn:disabled {
  opacity: 0.36;
  cursor: default;
}

.brick-dots {
  display: flex;
  align-items: center;
  gap: 1px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
  max-width: 100%;
  justify-content: flex-start;
}

.brick-dots::-webkit-scrollbar {
  display: none;
}

.brick-dot {
  flex: 0 0 auto;
  min-width: 22px;
  min-height: 44px;
  background: transparent;
  padding: 0 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brick-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(23, 32, 42, 0.22);
  transition: width 180ms var(--spring-tactile), background 160ms ease;
}

.brick-dot.is-active {
  min-width: 28px;
}

.brick-dot.is-active::before {
  width: 18px;
  border-radius: 999px;
  background: var(--nocturne);
}

@media (max-width: 900px) {
  .vignette-reader-grid,
  .brick-tufte-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  #brick-card {
    order: -1;
  }
  .brick-topbar {
    padding: max(12px, env(safe-area-inset-top, 0px)) 16px 11px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .brick-route-title {
    font-size: 18px;
  }
  .brick-tufte-grid {
    padding: 12px 14px max(20px, env(safe-area-inset-bottom, 0px));
    gap: 16px;
  }
  .brick-card {
    padding: 20px 18px;
    border-radius: 20px;
  }
  .brick-instruction {
    font-size: 25px;
  }
  .brick-sidewalk-badge {
    margin-left: 0;
    width: 100%;
  }
  .brick-nav-btn {
    padding: 10px 13px;
    font-size: 12.8px;
  }
  .brick-macro-col {
    max-height: none;
  }
}

/* --------------------------------------------------------------------------
   10. v4.0 Motion Choreography, @starting-style, View Transitions & Controls
   -------------------------------------------------------------------------- */

/* View Transitions paper-folio morphs */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 260ms;
  animation-timing-function: var(--spring-crisp);
}

::view-transition-old(root) {
  animation-name: detourFolioOut;
}

::view-transition-new(root) {
  animation-name: detourFolioIn;
}

@keyframes detourFolioOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.992); }
}

@keyframes detourFolioIn {
  from { opacity: 0; transform: scale(1.008); }
  to { opacity: 1; transform: scale(1); }
}

/* Baseline @starting-style + allow-discrete transitions for drawers, cards & modals */
.sidewalk-sheet,
.map-hover-card,
.promenade-bar,
.modal-backdrop {
  transition:
    opacity 240ms var(--spring-crisp),
    transform 320ms var(--spring-tactile),
    display 240ms allow-discrete,
    overlay 240ms allow-discrete;
}

.sidewalk-sheet:not([hidden]),
.map-hover-card:not([hidden]),
.promenade-bar:not([hidden]) {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@starting-style {
  .sidewalk-sheet:not([hidden]) {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  .map-hover-card:not([hidden]) {
    opacity: 0;
    transform: translateY(-8px) scale(0.975);
  }
  .promenade-bar:not([hidden]) {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
  .modal-backdrop:not([hidden]) {
    opacity: 0;
  }
  .modal-backdrop:not([hidden]) .qr-dialog-card,
  .modal-backdrop:not([hidden]) .vignette-reader-frame {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
}

.modal-backdrop .qr-dialog-card,
.modal-backdrop .vignette-reader-frame {
  transition:
    opacity 260ms var(--spring-crisp),
    transform 340ms var(--spring-tactile);
}

.detour-medallion,
.detour-discovery-dot,
.exhibit-card,
.lens-pill,
.atmo-chip,
.era-chip,
.modifier-chip {
  transition-timing-function: var(--spring-tactile);
}

/* Outer positioning anchor owned exclusively by MapLibre Marker translate() */
.detour-marker-anchor {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 3D Buildings Lens Gem */
.gem-3d {
  background: #8B7B65;
  box-shadow: 0 0 6px rgba(139, 123, 101, 0.45);
}

/* Progressive-Disclosure Tailor & Share Drawer */
.atelier-more-drawer {
  border-top: 1px solid var(--hairline);
  padding-top: 5px;
  margin-top: 2px;
}

.atelier-more-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 2px 3px;
  cursor: pointer;
  user-select: none;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  transition: color 150ms ease;
}

.atelier-more-summary::-webkit-details-marker {
  display: none;
}

.atelier-more-summary:hover {
  color: var(--nocturne);
}

.atelier-more-label::before {
  content: "▸ ";
  display: inline-block;
  margin-right: 4px;
  color: var(--sun-gold);
  transition: transform 180ms var(--spring-tactile);
}

.atelier-more-drawer[open] .atelier-more-label::before {
  transform: rotate(90deg);
}

.atelier-more-badge {
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 600;
  padding: 1.5px 7px;
  border-radius: 999px;
  background: rgba(216, 150, 34, 0.2);
  color: #6B4608;
}

.atelier-more-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 5px;
}

/* Architectural Era Filter Strip */
.era-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 2px;
}

.era-chip {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-subtle);
  color: var(--text-secondary);
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.era-chip:hover {
  background: var(--surface-inset);
  color: var(--text-primary);
  border-color: var(--rule-strong);
}

.era-chip.is-active {
  background: var(--cta-bg);
  color: var(--cta-fg);
  border-color: var(--cta-bg);
  font-weight: 600;
}

/* Walk Modifiers & Studio Utility Strip */
.walk-modifiers-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 1px;
}

.modifier-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-sans);
  font-size: 11.2px;
  font-weight: 500;
  padding: 4px 8.5px;
  border-radius: 6px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-subtle);
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 180ms ease;
}

.modifier-chip:hover {
  background: var(--surface-inset);
  color: var(--text-primary);
  border-color: var(--rule-strong);
}

.modifier-chip.is-active {
  background: var(--cta-bg);
  color: var(--cta-fg);
  border-color: var(--cta-bg);
  font-weight: 600;
}

/* After dark: a warm streetlamp glow suggests "Well-lit at night" until it is on. */
.modifier-chip.is-suggested:not(.is-active) {
  background: rgba(216, 150, 34, 0.16);
  border-color: rgba(243, 192, 90, 0.62);
  color: var(--sun-gold);
  box-shadow: 0 0 0 1px rgba(243, 192, 90, 0.2);
}

body[data-diurnal-phase="twilight"] .modifier-chip.is-suggested:not(.is-active),
body[data-diurnal-phase="nocturne"] .modifier-chip.is-suggested:not(.is-active) {
  color: var(--sun-liquid);
}

.modifier-chip.is-suggested:not(.is-active) .dot-lit {
  box-shadow: 0 0 6px 1px rgba(243, 192, 90, 0.9);
}

@media (prefers-reduced-motion: no-preference) {
  .modifier-chip.is-suggested:not(.is-active) .dot-lit {
    animation: streetlamp-flicker-on 1.6s ease-out 1;
  }
}

@keyframes streetlamp-flicker-on {
  0%, 18%, 30% { opacity: 0.25; }
  12%, 24%, 100% { opacity: 1; }
}

.modifier-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-lit {
  background: var(--sun-liquid);
}

.dot-puppy {
  background: var(--canopy-lush);
}

.dot-safe {
  background: #687A8C;
}

.dot-calm {
  background: #2C5E43;
}

/* Live Guide & Ask Guide Sheet */
.live-guide-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.live-guide-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.live-demo-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-demo-label {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
}

.ask-guide-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ask-guide-input {
  flex: 1;
  min-width: 0;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--hairline-strong);
  background: #FFFDF9;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--nocturne);
}

.ask-guide-btn {
  flex-shrink: 0;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--nocturne);
  color: var(--ivory-paper);
}

.ask-guide-answer {
  padding: 10px 13px;
  border-radius: 14px;
  background: rgba(255, 253, 249, 0.92);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--sun-gold);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ask-guide-cites {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 11.2px;
  color: var(--ink-muted);
}

/* Meet Halfway Modal */
.rendezvous-dialog-card {
  width: min(410px, 100%);
  text-align: left;
  align-items: stretch;
}

.rendezvous-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rendezvous-form .endpoint-tag {
  width: 62px;
}

.rendezvous-form .endpoint-row {
  padding: 6px 10px;
  border-radius: 12px;
  background: #FFFDF9;
  border: 1px solid var(--hairline);
}

.rendezvous-result {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(42, 111, 78, 0.08);
  border: 1px solid rgba(42, 111, 78, 0.24);
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--nocturne);
}

/* Promenade wordmark tagline, colophon links and the short-link readout */
.brand-tagline {
  margin-left: 0;
  white-space: nowrap;
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  font-size: 12.2px;
  letter-spacing: 0;
  color: var(--ink-muted);
}

.colophon-links {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  font-family: var(--font-sans);
  font-size: 11.5px;
}

.colophon-links a {
  color: var(--nocturne);
  text-decoration: underline;
  text-decoration-color: var(--hairline-strong);
  text-underline-offset: 3px;
}

.colophon-links a:hover {
  text-decoration-color: var(--sun-gold);
}

.qr-dialog-actions {
  flex-wrap: wrap;
}

.qr-secondary-link:disabled {
  opacity: 0.45;
  cursor: default;
}

.short-link-output {
  width: 100%;
  padding: 8px 12px;
  border-radius: 12px;
  background: #FFFDF9;
  border: 1px solid var(--hairline);
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--nocturne);
  overflow-wrap: anywhere;
  user-select: all;
}

/* The server's notes on this walk (stop changes, closures, after-dark advice) */
.route-notes {
  pointer-events: auto;
  align-self: flex-start;
  max-width: min(620px, 100%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 16px;
  background: var(--ivory-glass);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--shadow-slate);
  box-shadow: var(--shadow-pill);
}

.coverage-notice {
  border-left-color: var(--sun-gold);
  cursor: pointer;
}

/* The walker's own position */
.walker-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--ivory-paper);
  box-shadow: var(--shadow-pill);
}

.route-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
}

/* Photo credit under every venue, story and landmark photograph */
.exhibit-photo-credit {
  position: absolute;
  left: 8px;
  bottom: 8px;
  max-width: calc(100% - 96px);
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(250, 246, 239, 0.86);
  font-family: var(--font-sans);
  font-size: 9.5px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Neighborhood gems: walker-suggested places */
.dot-gem {
  background: var(--sun-gold);
}

.detour-gem-pin {
  width: 22px;
  height: 22px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ivory-paper);
  border: 2px solid var(--sun-gold);
  color: var(--nocturne);
  box-shadow: 0 2px 7px rgba(23, 32, 42, 0.28);
  cursor: pointer;
  transition: transform 160ms ease;
}

.detour-gem-pin:hover {
  transform: scale(1.18);
}

.gems-dialog-card {
  width: min(440px, 100%);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 32px);
  overflow-y: auto;
  text-align: left;
  align-items: stretch;
}

.gems-status {
  margin: 0;
  font-size: 13px;
  color: var(--ink-muted);
}

.gems-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gem-card {
  padding: 10px 12px;
  border-radius: 14px;
  background: #FFFDF9;
  border: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gem-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.gem-card-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--nocturne);
}

.gem-card-meta,
.gem-card-address {
  font-family: var(--font-sans);
  font-size: 11.5px;
  color: var(--ink-muted);
}

.gem-card-note {
  margin: 3px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
}

.gem-report-btn {
  flex-shrink: 0;
  font-family: var(--font-sans);
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid rgba(184, 58, 45, 0.34);
  color: var(--vermilion);
  background: transparent;
}

.gem-report-btn:hover {
  background: var(--vermilion-wash);
}

.gem-suggest-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.gem-suggest-form .endpoint-row {
  padding: 6px 10px;
  border-radius: 12px;
  background: #FFFDF9;
  border: 1px solid var(--hairline);
}

.gem-suggest-form .endpoint-tag {
  width: 62px;
}

.gem-category-row {
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.gem-category-row legend {
  float: left;
}

.gem-suggest-form input[type="radio"],
.gem-suggest-form input[type="checkbox"] {
  accent-color: var(--canopy-emerald);
}

.gem-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink);
}

.gem-note-label {
  width: auto;
}

.gem-note-input {
  width: 100%;
  resize: vertical;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid var(--hairline-strong);
  background: #FFFDF9;
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--nocturne);
}

.gem-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gem-dog-row {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink);
}

.gem-note-count {
  font-family: var(--font-sans);
  font-size: 11.5px;
  color: var(--ink-whisper);
}

.gem-form-status {
  margin: 0;
  padding: 8px 11px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  background: var(--shadow-slate-wash);
  color: var(--nocturne);
}

.gem-form-status.is-accepted {
  background: var(--canopy-wash);
  color: var(--canopy-emerald);
}

.gem-form-status.is-rejected {
  background: var(--vermilion-wash);
  color: var(--vermilion);
}

/* --------------------------------------------------------------------------
   10b. Promenade v5 Controls, Stop Chain, WalkFolio Spread & Time-Lens Stage
   -------------------------------------------------------------------------- */

.v5-comfort-row,
.stop-chain-bar,
.brick-tune-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.dot-variety {
  background: var(--sun-gold);
}

.dot-shelter {
  background: var(--shadow-slate);
}

.dot-stepfree {
  background: var(--canopy-emerald);
}

.stop-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-sans);
  font-size: 11.2px;
  font-weight: 500;
  padding: 4px 8.5px;
  border-radius: 6px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-subtle);
  color: var(--text-secondary);
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.stop-cat-chip:hover {
  background: var(--surface-inset);
  color: var(--text-primary);
  border-color: var(--rule-strong);
}

.stop-cat-chip.is-active {
  background: var(--cta-bg);
  color: var(--cta-fg);
  border-color: var(--cta-bg);
  font-weight: 600;
}

.stop-order-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--sun-gold);
  color: var(--nocturne);
  font-size: 10px;
  font-weight: 700;
}

.walk-folio-sheet {
  max-height: min(460px, 60dvh);
}

.walk-folio-body {
  display: grid;
  grid-template-columns: minmax(250px, 37%) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.folio-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.folio-epigraph-card,
.folio-botanical-card,
.folio-chapter-card {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-elevated);
  border: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.folio-epigraph-card {
  border-left: 3px solid var(--sun-gold);
}

.folio-epigraph-quote {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  line-height: 1.5;
  color: var(--nocturne);
}

.folio-epigraph-cite,
.folio-botanical-cite,
.folio-chapter-cite {
  font-family: var(--font-sans);
  font-size: 11.5px;
  color: var(--ink-muted);
}

.folio-botanical-card {
  border-left: 3px solid var(--canopy-emerald);
}

.folio-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.folio-botanical-title,
.folio-chapter-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--nocturne);
}

.folio-genus {
  font-style: italic;
  font-weight: 400;
  color: var(--ink-muted);
}

.folio-bloom-pill,
.folio-rights-pill,
.timelens-decade-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 600;
}

.folio-bloom-pill {
  background: var(--canopy-wash);
  color: var(--canopy-emerald);
}

.folio-rights-pill {
  background: var(--shadow-slate-wash);
  color: var(--nocturne);
}

.folio-rights-pill.is-public {
  background: var(--canopy-wash);
  color: var(--canopy-emerald);
}

.folio-rights-pill.is-card-only {
  background: var(--sun-wash);
  color: #6B4608;
}

.folio-excerpt {
  margin: 0;
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
}

.folio-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.folio-timelens-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.folio-timelens-btn {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--shadow-slate-wash);
  border: 1px solid rgba(104, 122, 140, 0.36);
  color: var(--nocturne);
}

.folio-timelens-btn:hover {
  background: var(--nocturne);
  color: var(--ivory-paper);
}

.vignette-timelens-stage {
  width: 100%;
  max-height: 68dvh;
  overflow-y: auto;
  padding: 4px 2px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timelens-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.timelens-plate-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface-elevated);
  border: 1px solid var(--hairline-strong);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timelens-decade-pill {
  background: var(--nocturne);
  color: var(--ivory-paper);
}

.timelens-plate-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15.5px;
  line-height: 1.25;
  color: var(--nocturne);
}

.timelens-plate-thumb {
  width: 100%;
  max-height: 170px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--hairline);
}

.timelens-honesty-note {
  margin: 0;
  padding: 6px 10px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 11.8px;
  font-weight: 600;
}

.timelens-honesty-note.is-prior {
  background: var(--vermilion-wash);
  border-left: 3px solid var(--vermilion);
  color: var(--vermilion);
}

.timelens-honesty-note.is-same {
  background: var(--canopy-wash);
  border-left: 3px solid var(--canopy-emerald);
  color: var(--canopy-emerald);
}

.timelens-plate-attr {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink-muted);
}

.brick-tune-drawer,
.brick-folio-panel {
  background: var(--surface-elevated);
  border: 1px solid var(--hairline-strong);
  border-radius: 16px;
  padding: 10px 13px;
}

.brick-tune-summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--nocturne);
}

.brick-tune-summary::-webkit-details-marker {
  display: none;
}

.brick-tune-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
}

.brick-folio-panel .walk-folio-body {
  grid-template-columns: 1fr;
}

@media (max-width: 900px) {
  .walk-folio-body {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   11. Responsive Choreography (Tablet & Mobile iPhone Safari 375x667-430x932)
   -------------------------------------------------------------------------- */

@media (max-width: 1320px) {
  .archive-count-pill {
    display: none;
  }
}

@media (max-width: 1100px) {
  :root {
    --composer-w: 332px;
  }

  .top-stage-bar {
    top: max(12px, env(safe-area-inset-top, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    left: auto;
    max-width: calc(100vw - var(--composer-w) - 24px);
  }
}

@media (max-width: 780px) {
  :root {
    --pad-edge: 12px;
  }

  .studio-shell,
  body.is-zen .studio-shell {
    display: block;
  }

  .field-book-rail {
    position: static;
    width: 0;
    height: 0;
    overflow: visible;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: transparent;
    pointer-events: none;
  }

  .field-book-rail > * {
    pointer-events: auto;
  }

  .map-stage {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
  }

  .is-desktop-fold,
  #folded-route-ticket {
    display: none !important;
  }

  /* Zero iOS Safari Auto-Zoom: every mobile form control >= 16px */
  input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
  select,
  textarea,
  .endpoint-input,
  .flanerie-inline-place,
  .duration-digit-input,
  .sun-date-input,
  .brick-date-input,
  .sun-time-input,
  .stop-desire-input,
  .ask-guide-input,
  .gem-note-input {
    font-size: 16px;
  }

  .endpoint-row {
    min-height: 44px;
  }

  .stop-desire-box {
    min-height: 44px;
    padding: 6px 12px;
  }

  .sculpted-slider {
    height: 7px;
    margin: 9px 0;
    touch-action: pan-y;
  }

  .sculpted-slider::-webkit-slider-thumb {
    width: 26px;
    height: 26px;
    border-width: 3px;
  }

  .sculpted-slider::-moz-range-thumb {
    width: 26px;
    height: 26px;
    border-width: 3px;
  }

  /* Single-row quiet top bar + on-demand Layers toggle */
  .composer-zen-pill {
    top: max(10px, env(safe-area-inset-top, 0px));
    left: max(10px, env(safe-area-inset-left, 0px));
    right: 92px;
    z-index: 26;
  }

  .zen-pill-trigger {
    width: 100%;
    min-height: 44px;
    justify-content: space-between;
    padding: 6px 10px 6px 13px;
    gap: 6px;
  }

  .zen-route-summary {
    flex: 1;
    min-width: 0;
    max-width: none;
    font-size: 12.2px;
  }

  .zen-edit-tag {
    padding: 5px 10px;
    font-size: 11.8px;
  }

  .top-stage-bar {
    top: max(10px, env(safe-area-inset-top, 0px));
    left: max(10px, env(safe-area-inset-left, 0px));
    right: max(10px, env(safe-area-inset-right, 0px));
    max-width: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    z-index: 25;
  }

  body.is-zen .top-stage-bar {
    left: max(10px, env(safe-area-inset-left, 0px));
    max-width: none;
  }

  /* Keep upper map window completely clear while mobile bottom-sheet composer is open */
  body:not(.is-zen) .top-stage-bar {
    opacity: 0;
    pointer-events: none;
  }

  .mobile-lenses-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 44px;
    min-width: 74px;
    padding: 0 12px;
    border-radius: 12px;
    background: var(--surface-hud);
    backdrop-filter: blur(22px) saturate(145%);
    -webkit-backdrop-filter: blur(22px) saturate(145%);
    border: 1px solid var(--rule-strong);
    box-shadow: var(--shadow-pill);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    pointer-events: auto;
  }

  .mobile-lenses-toggle[aria-expanded="true"],
  .mobile-lenses-toggle.has-active-lens {
    background: var(--cta-bg);
    color: var(--cta-fg);
    border-color: var(--cta-bg);
  }

  .mobile-lenses-badge {
    font-size: 10.5px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--sun-gold);
    color: #17202A;
  }

  .zone-lenses-pill {
    display: flex;
    width: 100%;
    align-self: stretch;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 14px 4px 4px;
    margin-top: 2px;
    mask-image: var(--fade-scroll-x);
    -webkit-mask-image: var(--fade-scroll-x);
    transition: max-height 220ms var(--spring-crisp), opacity 180ms ease, padding 180ms ease;
  }

  .top-stage-bar:not(.is-lenses-open) .zone-lenses-pill {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    border-width: 0;
    box-shadow: none;
  }

  .top-stage-bar.is-lenses-open .zone-lenses-pill {
    max-height: 58px;
    opacity: 1;
    pointer-events: auto;
  }

  .zone-lenses-pill::-webkit-scrollbar {
    display: none;
  }

  .lens-pill {
    flex: 0 0 auto;
    min-height: 44px;
    white-space: nowrap;
    justify-content: center;
    padding: 0 12px;
    font-size: 12px;
  }

  /* Native iPhone Bottom-Sheet Atelier Composer (74dvh, live sunlit map visible above) */
  .atelier-composer {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100vw;
    max-height: 74vh;
    max-height: 74dvh;
    overflow-y: auto;
    background: var(--surface-sheet);
    border: 1px solid var(--rule-strong);
    border-radius: 24px 24px 0 0;
    border-bottom: none;
    box-shadow: var(--shadow-float);
    padding: 0 16px calc(20px + env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    z-index: 55;
  }

  .composer-sheet-handle,
  .walk-sheet-handle {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0 4px;
    cursor: grab;
    touch-action: none;
    flex-shrink: 0;
  }

  .composer-grabber-bar {
    width: 38px;
    height: 4.5px;
    border-radius: 999px;
    background: var(--rule-strong);
  }

  .composer-header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--surface-sheet);
    padding: 4px 16px 9px;
    margin: 0 -16px 10px;
    border-bottom: 1px solid var(--rule-subtle);
  }

  .swap-btn {
    width: 36px;
    height: 36px;
  }

  .swap-btn::after {
    content: "";
    position: absolute;
    inset: -5px;
  }

  #composer-collapse-btn {
    width: auto;
    min-width: 72px;
    min-height: 44px;
    padding: 0 13px;
    border-radius: 9px;
    gap: 5px;
    background: var(--cta-bg);
    color: var(--cta-fg);
    border-color: var(--cta-bg);
    font-family: var(--font-sans);
    font-size: 12.5px;
    font-weight: 600;
  }

  #composer-collapse-btn svg {
    transform: rotate(-90deg);
  }

  .collapse-mobile-label {
    display: inline;
  }

  /* >= 44px touch targets across composer, drawers & map pins */
  .whisper-info-btn,
  .sun-now-pill,
  .diurnal-preview-btn,
  .another-way-pill,
  .atmo-chip,
  .mode-btn,
  .whisper-chip,
  .era-chip,
  .modifier-chip,
  .stop-cat-chip,
  .sheet-close-btn,
  .ask-guide-btn,
  .qr-primary-btn,
  .qr-secondary-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .atmosphere-chips-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sun-date-input,
  .brick-date-input {
    min-height: 44px;
    max-width: 156px;
    padding: 4px 10px;
  }

  .whisper-info-btn,
  .sun-now-pill {
    padding: 0 12px;
    font-size: 12px;
  }

  .sun-time-input {
    min-height: 44px;
    padding: 4px 10px;
  }

  .moment-btn {
    min-height: 44px;
    justify-content: center;
  }

  .atelier-more-summary {
    min-height: 44px;
  }

  .detour-discovery-dot,
  .detour-gem-pin {
    position: relative;
  }

  .detour-discovery-dot::after {
    content: "";
    position: absolute;
    inset: -15px;
  }

  .detour-gem-pin::after {
    content: "";
    position: absolute;
    inset: -11px;
  }

  .promenade-bar {
    top: calc(max(10px, env(safe-area-inset-top, 0px)) + 54px);
    left: 10px;
    right: 10px;
    max-width: none;
    border-radius: 14px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .promenade-ctrl-btn {
    min-height: 40px;
    padding: 6px 12px;
  }

  /* 3-Detent Mobile Walk Sheet (Peek / Half / Full) */
  body.is-zen .exhibition-dock {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 46vh;
    max-height: 46dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: var(--surface-sheet);
    border-top: 1px solid var(--rule-strong);
    border-radius: 22px 22px 0 0;
    box-shadow: var(--shadow-float);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 24;
    transition: max-height 240ms var(--spring-crisp);
  }

  body.is-zen .exhibition-dock[data-detent="peek"] {
    max-height: 168px;
    overflow-y: hidden;
  }

  body.is-zen .exhibition-dock[data-detent="full"] {
    max-height: 86vh;
    max-height: 86dvh;
  }

  body:not(.is-zen) .exhibition-dock {
    display: none;
  }

  .stop-contrast-panel {
    grid-template-columns: 1fr;
  }

  .stop-contrast-col.is-rejected {
    padding-left: 0;
    padding-top: 8px;
    border-left: none;
    border-top: 1px solid var(--rule-subtle);
  }

  .sidewalk-sheet {
    max-height: 52vh;
    max-height: 52dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .summary-ribbon {
    padding: 8px 14px 10px;
    gap: 7px;
  }

  .summary-sheet-actions {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
    gap: 6px;
    padding-right: 16px;
    mask-image: var(--fade-scroll-x);
    -webkit-mask-image: var(--fade-scroll-x);
  }

  .summary-sheet-actions::-webkit-scrollbar {
    display: none;
  }

  .walk-listen-cta {
    width: auto;
    min-height: 44px;
    padding: 0 14px 0 10px;
    font-size: 12.5px;
    justify-content: center;
  }

  .ribbon-action-btn,
  .walk-sheet-link {
    flex: 0 0 auto;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    font-size: 12px;
    padding: 0 11px;
  }

  .exhibit-card {
    flex: 0 0 auto;
    width: 100%;
  }

  .exhibit-media-wrap {
    width: 72px;
    height: 72px;
  }

  .carousel-paddle {
    display: none;
  }

  /* Native bottom-sheet modals on iPhone */
  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .qr-dialog-card,
  .rendezvous-dialog-card,
  .gems-dialog-card {
    width: 100%;
    max-width: 100vw;
    max-height: 88vh;
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 16px);
    border-radius: 24px 24px 0 0;
    border-bottom: none;
    padding: 18px 18px calc(22px + env(safe-area-inset-bottom, 0px));
  }

  .vignette-reader-frame {
    width: 100%;
    max-width: 100vw;
    max-height: 92vh;
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 8px);
    border-radius: 24px 24px 0 0;
    border-bottom: none;
    padding: 14px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  }
}

/* ==========================================================================
   Unified Live Walk Companion & 3-Stop Preference Dial (iOS + Web Parity)
   ========================================================================== */

body.is-live-walk .atelier-composer,
body.is-live-walk .composer-zen-pill,
body.is-live-walk #tour-benefits-section,
body.is-live-walk #summary-ribbon {
  display: none !important;
}

@media (min-width: 781px) {
  body.is-live-walk.is-zen .studio-shell {
    grid-template-columns: var(--composer-w) minmax(0, 1fr);
  }

  body.is-live-walk.is-zen .exhibition-dock {
    display: flex;
  }
}

body.is-live-walk[data-companion-style="quiet"] #certified-human-signature,
body.is-live-walk[data-companion-style="quiet"] #walk-spine-section,
body.is-live-walk[data-companion-style="quiet"] #exhibition-carousel,
body.is-live-walk[data-companion-style="gentle"] #certified-human-signature,
body.is-live-walk[data-companion-style="gentle"] #exhibition-carousel {
  display: none !important;
}

body.is-brick-mode[data-companion-style="quiet"] #brick-tune-drawer,
body.is-brick-mode[data-companion-style="quiet"] #brick-folio-panel {
  display: none !important;
}

.live-walk-dock {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 12px 16px 14px;
  border-bottom: 1px solid var(--rule-subtle);
}

.live-walk-dock[hidden] {
  display: none !important;
}

.live-walk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.live-walk-head-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.live-walk-title {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-walk-progress-meta {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-secondary);
}

.live-walk-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.live-end-btn {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(184, 58, 45, 0.34);
  background: var(--vermilion-wash);
  color: var(--vermilion);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.live-progress-track {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: var(--rule-subtle);
  overflow: hidden;
}

.live-progress-fill {
  display: block;
  height: 100%;
  width: 6%;
  border-radius: 999px;
  background: var(--sun-gold);
  transition: width 240ms ease;
}

.live-turn-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 16px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--inset-letterpress);
}

.live-turn-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-compass-dial {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  color: var(--text-primary);
}

.live-turn-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.live-turn-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.live-step-distance {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--canopy-emerald);
}

.live-step-instruction {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--text-primary);
}

.live-turn-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.live-step-arrows {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.live-arrow-btn {
  min-width: 38px;
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid var(--rule-subtle);
  background: var(--surface-inset);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  cursor: pointer;
}

.live-arrow-btn:disabled {
  opacity: 0.38;
  cursor: default;
}

.live-next-whisper {
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid var(--rule-subtle);
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--text-secondary);
}

.live-companion-bar,
.brick-companion-bar {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.brick-companion-bar {
  margin-bottom: 6px;
}

.live-companion-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.live-companion-dial {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  flex: 1;
  padding: 3px;
  border-radius: 12px;
  background: var(--surface-inset);
  border: 1px solid var(--rule-subtle);
}

.live-companion-btn {
  min-height: 36px;
  padding: 0 8px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 400;
  cursor: pointer;
}

.live-companion-btn.is-active {
  background: var(--cta-bg);
  color: var(--cta-fg);
  font-weight: 600;
}

.live-mute-btn {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 11px;
  border-radius: 11px;
  border: 1px solid var(--rule-subtle);
  background: var(--surface-inset);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.live-mute-btn[aria-pressed="true"] {
  color: var(--text-secondary);
  opacity: 0.82;
}

.live-mute-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.live-companion-summary {
  margin: 0;
  font-family: var(--font-body);
  font-size: 12.8px;
  color: var(--text-secondary);
}

.live-voice-controls {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 2px;
}

.live-voice-controls[hidden],
.live-offroute-banner[hidden],
.live-arrival-card[hidden] {
  display: none !important;
}

.live-voice-controls.is-muted {
  opacity: 0.52;
}

.live-persona-dial {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  flex: 1;
  padding: 3px;
  border-radius: 11px;
  background: var(--surface-inset);
  border: 1px solid var(--rule-subtle);
}

.live-persona-btn {
  min-height: 34px;
  padding: 0 7px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 12.8px;
  font-weight: 400;
  cursor: pointer;
}

.live-persona-btn.is-active {
  background: var(--cta-bg);
  color: var(--cta-fg);
  font-weight: 600;
}

.live-speak-turns-btn {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--rule-subtle);
  background: var(--surface-inset);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.live-speak-turns-btn.is-active {
  background: var(--cta-bg);
  color: var(--cta-fg);
  border-color: var(--cta-bg);
  font-weight: 600;
}

.live-offroute-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 14px;
  background: var(--surface-inset);
  border: 1px solid var(--rule-strong);
}

.live-offroute-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.live-offroute-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.live-offroute-detail {
  margin: 0;
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--text-secondary);
}

.live-rejoin-btn {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 13px;
  border: none;
  border-radius: 999px;
  background: var(--cta-bg);
  color: var(--cta-fg);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.live-arrival-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-strong);
}

.live-arrival-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.live-arrival-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

.live-arrival-summary {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--text-secondary);
}

.live-finish-btn {
  width: 100%;
  min-height: 40px;
  border: none;
  border-radius: 999px;
  background: var(--cta-bg);
  color: var(--cta-fg);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.live-context-stack,
.brick-curated-extras {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.live-context-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-subtle);
}

.live-context-kicker {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--canopy-emerald);
}

.live-context-kicker.is-stop {
  color: var(--sun-gold);
}

.live-context-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.live-context-quote {
  margin: 0;
  font-family: var(--font-body);
  font-size: 13.8px;
  line-height: 1.45;
  color: var(--text-primary);
}

.live-context-sub {
  font-family: var(--font-sans);
  font-size: 11.8px;
  color: var(--text-secondary);
}

.live-context-rejected {
  font-family: var(--font-sans);
  font-size: 11.5px;
  color: var(--vermilion);
}

.live-curated-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.live-indoor-drawer {
  border-top: 1px solid var(--rule-subtle);
  padding-top: 6px;
}

.live-indoor-summary {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.live-indoor-body {
  padding-top: 6px;
}

.brick-ghost-btn.is-live-active {
  background: var(--canopy-emerald);
  color: #FAF6EF;
  border-color: var(--canopy-emerald);
}

@media (max-width: 780px) {
  .live-companion-btn,
  .live-persona-btn,
  .live-speak-turns-btn,
  .live-rejoin-btn,
  .live-finish-btn,
  .live-mute-btn,
  .live-end-btn,
  .live-arrow-btn {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ==========================================================================
   Walker Field Book, Promenade Lifecycle Bar & Tour Benefits Ledger
   ========================================================================== */

.composer-zen-pill:not([hidden]) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.zen-field-book-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  background: var(--surface-hud);
  backdrop-filter: blur(14px);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-pill);
  cursor: pointer;
}

.is-field-book-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.field-book-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--sun-wash);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 600;
}

.tour-benefits-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 16px 8px;
  border-bottom: 1px solid var(--rule-subtle);
}

.walk-lifecycle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.walk-state-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--rule-subtle);
  background: var(--surface-inset);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
}

.walk-state-pill::before {
  content: "";
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: var(--shadow-slate);
}

.walk-state-pill[data-walk-state="saved"] {
  background: var(--sun-wash);
  color: var(--text-primary);
  border-color: rgba(216, 150, 34, 0.34);
}

.walk-state-pill[data-walk-state="saved"]::before {
  background: var(--sun-gold);
}

.walk-state-pill[data-walk-state="walking"] {
  background: var(--canopy-wash);
  color: var(--canopy-emerald);
  border-color: rgba(44, 94, 67, 0.34);
}

.walk-state-pill[data-walk-state="walking"]::before {
  background: var(--canopy-emerald);
}

.walk-state-pill[data-walk-state="completed"] {
  background: var(--canopy-wash);
  color: var(--text-primary);
  border-color: rgba(44, 94, 67, 0.36);
}

.walk-state-pill[data-walk-state="completed"]::before {
  background: var(--canopy-lush);
}

.walk-lifecycle-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.lifecycle-chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  background: var(--surface-elevated);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.lifecycle-chip-btn:hover {
  background: var(--surface-inset);
}

.lifecycle-chip-btn[aria-pressed="true"],
.lifecycle-chip-btn.is-solid {
  background: var(--cta-bg);
  color: var(--cta-fg);
  border-color: var(--cta-bg);
}

.walk-quick-note-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.walk-quick-list-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 9px 11px;
  border-radius: 12px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-strong);
}

.tour-benefits-ledger {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--inset-letterpress);
}

.benefits-header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.benefits-eyebrow {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--canopy-emerald);
}

.benefits-route-delta {
  font-family: var(--font-sans);
  font-size: 11.5px;
  color: var(--text-secondary);
}

.benefits-headline {
  margin: 0;
  font-family: var(--font-body);
  font-size: 13.8px;
  line-height: 1.42;
  color: var(--text-primary);
}

.benefits-highlights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.benefit-tile {
  display: flex;
  flex-direction: column;
  gap: 1.5px;
  padding: 7px 9px;
  border-radius: 10px;
  background: var(--surface-sheet);
  border: 1px solid var(--rule-subtle);
  min-width: 0;
}

.benefit-tile-top {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.benefit-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--sun-gold);
}

.benefit-dot.cat-quiet {
  background: var(--shadow-slate);
}

.benefit-dot.cat-canopy {
  background: var(--canopy-emerald);
}

.benefit-dot.cat-history {
  background: var(--claret-voice);
}

.benefit-dot.cat-stop {
  background: var(--terracotta);
}

.benefit-dot.cat-safety {
  background: var(--sun-liquid);
}

.benefit-figure {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.benefit-label {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.benefit-detail {
  font-family: var(--font-sans);
  font-size: 10.8px;
  line-height: 1.3;
  color: var(--text-secondary);
}

/* Field Book Modal & Curated Lists */
.field-book-dialog-card {
  width: min(640px, 94vw);
  max-height: min(86vh, 780px);
  max-height: min(86dvh, 780px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  text-align: left;
  background: var(--surface-sheet);
  color: var(--text-primary);
}

.field-book-head {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.field-book-title-wrap {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 9px;
}

.field-book-identity-pill {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-inset);
  color: var(--text-secondary);
}

.field-book-identity-pill.is-signed-in {
  background: var(--canopy-wash);
  color: var(--canopy-emerald);
}

.field-book-head-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.field-book-banner-msg {
  margin: 0;
  padding: 8px 11px;
  border-radius: 10px;
  background: var(--sun-wash);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 12.2px;
}

.field-book-auth-box,
.field-book-pair-box,
.list-editor-form,
.shared-list-showcase {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px 13px;
  border-radius: 14px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-strong);
}

.field-book-pair-box {
  flex-direction: row;
  align-items: center;
  gap: 14px;
}

.fb-pair-qr {
  width: 132px;
  height: 132px;
  padding: 8px;
  flex-shrink: 0;
  margin: 0;
}

.fb-pair-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fb-pair-code {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.04em;
}

.fb-pair-caption {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-secondary);
}

.fb-auth-mode-bar,
.fb-vis-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface-inset);
  align-self: flex-start;
}

.fb-seg-btn {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.fb-seg-btn.is-active {
  background: var(--cta-bg);
  color: var(--cta-fg);
}

.fb-auth-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 7px;
}

.fb-input,
.fb-textarea {
  width: 100%;
  min-height: 38px;
  padding: 7px 11px;
  border-radius: 10px;
  border: 1px solid var(--rule-strong);
  background: var(--surface-sheet);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
}

.fb-textarea {
  min-height: 60px;
  resize: vertical;
  font-family: var(--font-body);
}

.fb-auth-submit-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.fb-status-msg {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-secondary);
}

.field-book-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 9px 10px;
  border-radius: 13px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-subtle);
}

.fb-stat-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.fb-stat-num {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.fb-stat-label {
  font-family: var(--font-sans);
  font-size: 10.8px;
  color: var(--text-secondary);
}

.field-book-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 3px;
  border-radius: 12px;
  background: var(--surface-inset);
  border: 1px solid var(--rule-subtle);
}

.fb-tab-btn {
  min-height: 34px;
  padding: 0 8px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12.2px;
  font-weight: 600;
  cursor: pointer;
}

.fb-tab-btn.is-active {
  background: var(--surface-elevated);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(23, 32, 42, 0.08);
}

.fb-list-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.fb-subhead {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 600;
}

.list-candidate-walks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 190px;
  overflow-y: auto;
}

.list-candidate-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 7px 9px;
  border-radius: 9px;
  background: var(--surface-sheet);
  border: 1px solid var(--rule-subtle);
  font-family: var(--font-sans);
  font-size: 12.2px;
}

.list-candidate-check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  cursor: pointer;
}

.list-candidate-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.list-order-btns {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.benefits-breakdown-disclosure {
  margin-top: 2px;
}

.benefits-breakdown-summary {
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 11.8px;
  font-weight: 600;
  color: var(--canopy-emerald);
  padding: 2px 0 6px;
  user-select: none;
}

.fb-guest-import-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 11px;
  background: rgba(216, 150, 34, 0.14);
  border: 1px solid rgba(216, 150, 34, 0.35);
  font-family: var(--font-sans);
  font-size: 12.2px;
  color: var(--text-primary);
}

.fb-outings-disclosure {
  border-top: 1px solid var(--rule-subtle);
  padding-top: 6px;
}

.fb-outings-summary {
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.fb-outings-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  font-family: var(--font-sans);
  font-size: 11.8px;
  color: var(--text-secondary);
}

.field-book-panel-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 140px;
}

.fb-empty-state {
  margin: 0;
  padding: 18px 14px;
  border-radius: 12px;
  border: 1px dashed var(--rule-strong);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
}

.fb-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 13px;
  border-radius: 14px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-subtle);
}

.fb-card.is-walking-now {
  border-color: var(--canopy-emerald);
  box-shadow: inset 0 0 0 1px rgba(44, 94, 67, 0.18);
}

.fb-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.fb-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.fb-card-meta {
  font-family: var(--font-sans);
  font-size: 11.5px;
  color: var(--text-secondary);
}

.fb-card-headline {
  margin: 0;
  font-family: var(--font-body);
  font-size: 13.4px;
  line-height: 1.4;
  color: var(--text-primary);
}

.fb-benefit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.fb-benefit-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2.5px 8px;
  border-radius: 999px;
  background: var(--surface-sheet);
  border: 1px solid var(--rule-subtle);
  font-family: var(--font-sans);
  font-size: 11.2px;
  color: var(--text-primary);
}

.fb-personal-note {
  margin: 0;
  padding: 7px 10px;
  border-left: 2.5px solid var(--sun-gold);
  background: var(--surface-sheet);
  border-radius: 0 8px 8px 0;
  font-family: var(--font-body);
  font-size: 13px;
  font-style: italic;
  color: var(--text-primary);
}

.fb-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 900px) {
  .benefits-highlights-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .field-book-stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .field-book-dialog-card {
    width: 100%;
    max-width: 100vw;
    max-height: 90vh;
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 10px);
    border-radius: 24px 24px 0 0;
    border-bottom: none;
    padding: 16px 16px calc(22px + env(safe-area-inset-bottom, 0px));
  }
  .field-book-pair-box {
    flex-direction: column;
    align-items: flex-start;
  }
  .lifecycle-chip-btn,
  .fb-tab-btn,
  .zen-field-book-btn {
    min-height: 40px;
  }
}

/* ==========================================================================
   Promenade v6 — Strict 3-Level Progressive Disclosure & Crisp Alabaster Island
   ========================================================================== */

/* 1. Single-Row Masthead & Recessed Endpoint Well */
.brand-tagline,
#colophon-toggle-btn,
#composer-fold-form-btn {
  display: none;
}

.atelier-composer {
  padding: 13px 16px 12px;
  border-bottom: 1px solid var(--rule-subtle);
  z-index: 24;
}

.atelier-composer:focus-within,
.atelier-composer.has-open-suggestions {
  z-index: 38;
}

.exhibition-dock {
  z-index: 26;
}

.exhibition-dock:has(.walk-tools-menu[open]) {
  z-index: 42;
}

.composer-header {
  gap: 6px;
  margin-bottom: 10px;
}

.composer-masthead-row {
  flex-wrap: wrap;
  gap: 5px;
}

.composer-brand {
  flex: 0 0 auto;
  gap: 6px;
}

.brand-wordmark {
  flex-shrink: 0;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.022em;
}

.composer-header-actions {
  flex: 0 0 auto;
  width: auto;
  margin-left: auto;
}

.mode-pill-switch {
  display: inline-grid;
  grid-template-columns: auto auto;
  width: auto;
  border-radius: 8px;
  padding: 2px;
  background: var(--surface-inset);
  border: none;
}

.mode-btn {
  border-radius: 6px;
  padding: 3.5px 7.5px;
  font-size: 11.2px;
}

.mode-btn.is-active {
  box-shadow: 0 1px 2px rgba(15, 20, 25, 0.08), 0 0 0 1px rgba(15, 20, 25, 0.04);
}

.composer-masthead-tools {
  gap: 4px;
}

.route-endpoints-card {
  background: var(--surface-inset);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 6px 12px;
  transition: background 150ms ease, border-color 150ms ease;
}

.route-endpoints-card:focus-within {
  background: var(--surface-elevated);
  border-color: var(--rule-strong);
}

.endpoint-input {
  font-family: var(--font-sans);
  font-size: 13.8px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.detour-budget-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 7px;
  padding: 8px 11px;
  border-radius: 11px;
  background: var(--surface-inset);
  border: 1px solid var(--rule-subtle);
}

.detour-budget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.detour-budget-meta {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.spare-readout {
  font-family: var(--font-sans);
  font-size: 12.8px;
  font-weight: 600;
  color: var(--text-primary);
}

.fastest-whisper {
  font-size: 11.2px;
  color: var(--text-tertiary);
}

.sculpted-slider {
  height: 4px;
  background: var(--rule-strong);
}

.sculpted-slider::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  background: var(--cta-bg);
  border: 2px solid var(--surface-elevated);
  box-shadow: 0 1px 4px rgba(15, 20, 25, 0.22);
}

.another-way-pill {
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 11.5px;
  border-color: var(--rule-subtle);
}

/* 2. Four One-Tap Smart Walk Bundles */
.smart-bundles-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.smart-bundle-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 6px;
  border-radius: 9px;
  background: var(--surface-inset);
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.smart-bundle-pill:hover {
  color: var(--text-primary);
  border-color: var(--rule-strong);
}

.smart-bundle-pill.is-active {
  background: var(--cta-bg);
  color: var(--cta-fg);
  font-weight: 600;
}

.smart-bundle-pill.is-suggested {
  border-color: var(--sun-gold);
  background: var(--sun-wash);
  color: var(--text-primary);
}

.bundle-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.bundle-dot.dot-sun { background: var(--sun-gold); }
.bundle-dot.dot-shade { background: #64748B; }
.bundle-dot.dot-quiet { background: #3B82F6; }
.bundle-dot.dot-canopy { background: var(--canopy-emerald); }
.bundle-dot.dot-historic { background: var(--terracotta); }
.bundle-dot.dot-lit { background: var(--sun-liquid); }
.bundle-dot.dot-dark { background: #94A3B8; }

.smart-bundle-pill[data-light-state="shade"].is-active,
.smart-bundle-pill[data-light-state="dark"].is-active {
  background: #334155;
  color: #F8FAFC;
  border-color: rgba(148, 163, 184, 0.34);
}

.pd-pill.is-mode-switch {
  flex: 0 0 auto;
  padding: 0 9px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--surface-inset);
  border-color: var(--rule-strong);
}

.pd-pill.is-mode-switch::after {
  content: none;
  display: none;
}

.pd-pill.is-mode-switch.is-night-mode {
  background: #1E293B;
  color: #F8FAFC;
  border-color: rgba(251, 191, 36, 0.42);
}

#safe-lit-toggle {
  display: none;
}

/* 3. Progressive-Disclosure Trigger Bar & Single-Open Accordion Panels */
.pd-pill-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.pd-pill {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 28px;
  padding: 0 6.5px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--rule-subtle);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.night-lit-banner,
.exhibition-dock:not(.is-details-open) #route-notes:not(.coverage-notice) {
  display: none !important;
}

.pd-pill::after {
  content: "▾";
  font-size: 11px;
  line-height: 1;
  opacity: 0.72;
}

.pd-pill:hover {
  background: var(--surface-inset);
  color: var(--text-primary);
}

.pd-pill.has-value {
  background: var(--surface-inset);
  color: var(--text-primary);
  border-color: var(--rule-strong);
  font-weight: 600;
}

.pd-pill.is-open {
  background: var(--cta-bg);
  color: var(--cta-fg);
  border-color: var(--cta-bg);
  font-weight: 600;
}

.pd-pill.is-open::after {
  content: "▴";
  opacity: 0.9;
}

.pd-disclosure-panel {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 10px 11px;
  border-radius: 12px;
  background: var(--surface-inset);
  border: 1px solid var(--rule-subtle);
}

.pd-disclosure-panel.is-open {
  display: flex;
}

.sun-arc-section {
  padding: 10px 11px;
  border-radius: 12px;
  background: var(--surface-inset);
  border: 1px solid var(--rule-subtle);
}

.sun-arc-drawer-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

#pd-stop-panel .stop-chain-bar {
  display: flex !important;
  flex-wrap: wrap !important;
  overflow-x: visible;
  mask-image: none;
  -webkit-mask-image: none;
  padding-right: 0;
  gap: 5px;
}

.stop-cat-chip {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-subtle);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.stop-cat-chip:hover {
  border-color: var(--rule-strong);
  color: var(--text-primary);
}

.stop-cat-chip.is-active {
  background: var(--cta-bg);
  color: var(--cta-fg);
  border-color: var(--cta-bg);
  font-weight: 600;
}

/* Hide legacy Customize <summary> since #pd-tune-btn drives #atelier-more-drawer.open */
.atelier-more-drawer {
  margin: 0;
  padding: 0;
  border: none;
}

.atelier-more-summary {
  display: none !important;
}

.atelier-more-label::before {
  content: none !important;
  display: none !important;
}

.atelier-more-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 11px;
  border-radius: 12px;
  background: var(--surface-inset);
  border: 1px solid var(--rule-subtle);
}

/* 4. Calm Level-1 Route Verdict + Primary Action Bar */
.summary-ribbon {
  padding: 12px 16px 13px;
  gap: 8px;
  border-bottom: none;
}

.exhibition-dock.is-details-open .summary-ribbon {
  border-bottom: 1px solid var(--rule-subtle);
}

#summary-gains-track > .gain-pill:not(#gain-duration):not(#gain-sun):not(#gain-sheds):not(#gain-landmarks):not(.is-chosen):not(#gain-stops) {
  display: none !important;
}

.summary-gains-track {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
}

#gain-sheds,
#gain-landmarks,
.gain-pill.is-chosen,
#gain-stops {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.gain-pill {
  margin: 0;
  padding: 0;
  border: none;
}

.gain-pill.is-primary {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.022em;
  color: var(--text-primary);
  margin-right: 2px;
}

.gain-pill.is-sun {
  font-size: 12.2px;
  font-weight: 600;
  color: var(--sun-gold);
}

.walk-exposure-strip {
  height: 5.5px;
  border-radius: 999px;
}

.walk-exposure-caption-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 3px;
  font-size: 10.6px;
  color: var(--text-tertiary);
}

.exposure-hover-readout {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-sheet-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
}

#start-live-walk-btn {
  flex: 1 1 auto;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}

.summary-sheet-actions .ribbon-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  background: var(--surface-inset);
  border: 1px solid var(--rule-subtle);
  color: var(--text-primary);
  font-size: 11.8px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.summary-sheet-actions .ribbon-action-btn:hover:not(:disabled) {
  background: var(--surface-elevated);
  border-color: var(--rule-strong);
}

.summary-sheet-actions .ribbon-action-btn.is-bookmark-pill {
  width: 38px;
  padding: 0;
  flex: 0 0 auto;
}

.summary-sheet-actions .ribbon-action-btn.is-bookmark-pill.is-saved {
  background: var(--sun-wash);
  border-color: var(--sun-gold);
  color: var(--sun-gold);
}

.summary-sheet-actions .ribbon-action-btn.is-bookmark-pill.is-saved svg path {
  fill: currentColor;
}

.itinerary-toggle-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 2px;
}

.itinerary-bar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 9px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-inset);
  border: 1px solid var(--rule-subtle);
  color: var(--text-secondary);
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.itinerary-bar-btn:hover {
  color: var(--text-primary);
  border-color: var(--rule-strong);
}

#toggle-details-btn {
  flex: 1 1 auto;
}

#toggle-details-btn::after {
  content: "▾";
  font-size: 11.5px;
  line-height: 1;
  opacity: 0.75;
}

#toggle-details-btn.is-active,
#toggle-places-btn.is-active {
  background: var(--cta-bg);
  color: var(--cta-fg);
  border-color: var(--cta-bg);
}

#toggle-details-btn.is-active::after {
  content: "▴";
}

.walk-tools-menu {
  position: relative;
  flex: 0 0 auto;
}

.walk-tools-summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 10px;
  background: var(--surface-inset);
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.walk-tools-summary::-webkit-details-marker {
  display: none;
}

.walk-tools-menu[open] .walk-tools-summary {
  background: var(--cta-bg);
  color: var(--cta-fg);
}

.walk-tools-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  width: 204px;
  padding: 5px;
  border-radius: 12px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 60;
}

.exhibition-dock.is-details-open .walk-tools-popover {
  bottom: auto;
  top: calc(100% + 6px);
}

.walk-tools-popover .ribbon-action-btn,
.walk-tools-popover .walk-sheet-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  width: 100%;
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  font-size: 12.2px;
  font-weight: 500;
  text-decoration: none;
}

.walk-tools-popover .ribbon-action-btn:hover:not(:disabled),
.walk-tools-popover .walk-sheet-link:hover {
  background: var(--surface-inset);
  color: var(--text-primary);
}

#composer-ab-panel .whisper-places-row {
  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.whisper-chip.is-meet-chip,
.whisper-chip.is-gems-chip {
  border-style: dashed;
  border-color: var(--rule-strong);
  color: var(--text-primary);
}

.autocomplete-anchor {
  display: flex;
  align-items: center;
}

.endpoint-clear-btn {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  padding: 0;
  margin-left: 4px;
  border-radius: 50%;
  border: none;
  background: rgba(100, 116, 139, 0.16);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, background 120ms ease, color 120ms ease;
}

.autocomplete-anchor:focus-within .endpoint-clear-btn:not([hidden]),
.autocomplete-anchor:hover .endpoint-clear-btn:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
}

.endpoint-clear-btn:hover {
  background: rgba(100, 116, 139, 0.28);
  color: var(--text-primary);
}

.suggestions-menu {
  left: -6px;
  right: -6px;
  top: calc(100% + 6px);
  padding: 5px;
  border-radius: 12px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-strong);
  box-shadow: 0 14px 36px rgba(23, 32, 42, 0.22);
  z-index: 90;
  max-height: 236px;
}

body[data-ui-theme="dark"] .suggestions-menu,
body:not([data-ui-theme="light"])[data-diurnal-phase="nocturne"] .suggestions-menu,
body:not([data-ui-theme="light"])[data-diurnal-phase="twilight"] .suggestions-menu {
  background: #141B26;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.58);
}

.suggestion-item {
  align-items: center;
  padding: 7px 10px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 12.8px;
  font-weight: 500;
}

.suggestion-item.is-gps-action {
  color: var(--sun-gold);
  font-weight: 600;
}

@media (min-width: 781px) {
  .field-book-rail:not(:has(.exhibition-dock.is-details-open)):not(:has(.atelier-more-drawer[open])),
  .field-book-rail:has(.suggestions-menu:not([hidden])) {
    overflow: visible;
  }

  .field-book-rail:not(:has(.exhibition-dock.is-details-open)) .walk-tools-popover {
    bottom: auto;
    top: calc(100% + 6px);
  }
}

/* 5. Level-2 Progressive Disclosure: Chronological Spine + Places */
#drawer-view-tabs {
  display: none !important;
}

.exhibition-dock:not(.is-details-open) #tour-benefits-section,
.exhibition-dock:not(.is-details-open) #certified-human-signature,
.exhibition-dock:not(.is-details-open) #walk-spine-section,
.exhibition-dock:not(.is-details-open) #walk-places-panel {
  display: none;
}

.exhibition-dock[data-drawer-tab="steps"] #walk-places-panel {
  display: none;
}

.exhibition-dock[data-drawer-tab="places"] #tour-benefits-section,
.exhibition-dock[data-drawer-tab="places"] #walk-spine-section {
  display: none;
}

.drawer-view-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 8px 16px 2px;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface-inset);
  border: 1px solid var(--rule-subtle);
}

.drawer-tab-btn {
  flex: 1 1 0;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.drawer-tab-btn:hover {
  color: var(--text-primary);
}

.drawer-tab-btn.is-active {
  background: var(--surface-elevated);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 20, 25, 0.08);
}

.ribbon-action-btn.is-places-pill {
  padding: 0 10px;
  font-size: 12px;
}

.ribbon-action-btn.is-places-pill.is-active {
  background: var(--cta-bg);
  color: var(--cta-fg);
  border-color: var(--cta-bg);
}

/* Numbered Pure Navigation Steps */
.spine-step-num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--surface-inset);
  border: 1px solid var(--rule-subtle);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 600;
}

.spine-entry:hover .spine-step-num,
.spine-entry.is-active .spine-step-num {
  background: var(--cta-bg);
  border-color: var(--cta-bg);
  color: var(--cta-fg);
}

.spine-entry-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.spine-step-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 27px;
}

.spine-place-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--rule-subtle);
  background: var(--surface-elevated);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spine-place-chip:hover {
  border-color: var(--rule-strong);
  color: var(--text-primary);
}

.spine-place-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Separated Places Panel */
.walk-places-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 16px 14px;
}

.walk-places-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.place-card-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 9px 11px;
  border-radius: 11px;
  background: var(--surface-inset);
  border: 1px solid var(--rule-subtle);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}

.place-card-item:hover,
.place-card-item.is-expanded {
  border-color: var(--rule-strong);
  background: var(--surface-elevated);
}

.place-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.place-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.place-card-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 12.8px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-card-kind {
  flex: 0 0 auto;
  font-family: var(--font-sans);
  font-size: 10.5px;
  color: var(--text-tertiary);
}

.place-card-sub {
  font-family: var(--font-sans);
  font-size: 11.3px;
  color: var(--text-secondary);
  padding-left: 26px;
}

.place-card-excerpt {
  display: none;
  margin: 2px 0 0;
  padding-left: 26px;
  font-family: var(--font-body);
  font-size: 12.4px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.place-card-item.is-expanded .place-card-excerpt {
  display: block;
  color: var(--text-primary);
}

.place-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 0 0 26px;
}

.lens-gem.gem-places {
  background: #6366F1;
}

body:not(.show-place-markers) .detour-place-marker {
  display: none !important;
}

/* Compact 3-Metric Verdict Strip (Visible inside Level-2 Details Drawer) */
.tour-benefits-section {
  padding: 10px 16px;
  gap: 8px;
  border-bottom: 1px solid var(--rule-subtle);
}

.tour-benefits-ledger {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  gap: 0;
}

.benefits-header-row,
.benefits-headline,
.benefits-breakdown-summary,
.benefit-detail,
.benefit-tile:nth-child(n+4) {
  display: none;
}

.benefits-highlights-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.benefit-tile {
  padding: 7px 9px;
  border-radius: 10px;
  background: var(--surface-inset);
  border: none;
}

.benefit-tile-top {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.benefit-dot {
  display: none;
}

.benefit-figure {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.benefit-label {
  font-size: 10.8px;
  font-weight: 500;
  line-height: 1.26;
  color: var(--text-secondary);
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
}

.detour-fastest-callout {
  background: var(--surface-hud) !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--rule-strong) !important;
  border-radius: 999px !important;
  box-shadow: var(--shadow-pill) !important;
  font-family: var(--font-sans) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 3px 9px !important;
}

.walk-lifecycle-bar {
  order: 2;
  padding-top: 2px;
}

.walk-state-pill[data-walk-state="exploring"] {
  display: none;
}

.lifecycle-chip-btn {
  min-height: 26px;
  padding: 0 9px;
  border-radius: 7px;
  border-color: transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11.2px;
  font-weight: 500;
}

.lifecycle-chip-btn:hover {
  background: var(--surface-inset);
  color: var(--text-primary);
}

/* Legacy Colophon Strip */
.certified-human-signature {
  padding: 10px 16px;
  background: transparent;
  border-bottom: 1px solid var(--rule-subtle);
}

.human-printer-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.human-signature-title {
  font-family: var(--font-sans);
  font-size: 12.2px;
  font-weight: 600;
}

.human-signature-byline {
  font-family: var(--font-sans);
  font-size: 11.5px;
  line-height: 1.38;
  color: var(--text-secondary);
}

/* Clean Hairline Walk Spine (Boxed cards strictly for human literary/archival notes) */
.walk-spine-section {
  padding: 12px 16px 20px;
  gap: 6px;
}

.walk-spine-heading {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.walk-spine-list {
  padding-left: 0;
  border-left: none;
  gap: 2px;
}

.spine-entry {
  padding: 6px 8px;
  border-radius: 9px;
  background: transparent;
  border: 1px solid transparent;
  gap: 4px;
}

.spine-entry::before {
  display: none;
}

.spine-entry.has-voice {
  margin: 0;
  padding: 6px 8px;
  background: transparent;
  border-color: transparent;
}

.spine-entry:hover {
  background: var(--surface-inset);
}

.spine-entry-instr {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.32;
}

.spine-voice-callout {
  margin: 4px 0 2px 27px;
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--surface-inset);
  border: 1px solid var(--rule-subtle);
  border-left: 2.5px solid var(--terracotta);
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}

.spine-voice-callout:hover {
  background: var(--surface-elevated);
  border-color: var(--rule-strong);
  border-left-color: var(--terracotta);
}

.spine-voice-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.spine-voice-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
}

.spine-voice-badge {
  flex: 0 0 auto;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.spine-voice-excerpt {
  margin: 0;
  font-family: var(--font-body);
  font-size: 12.2px;
  line-height: 1.42;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.spine-entry.is-expanded .spine-voice-excerpt {
  display: block;
  -webkit-line-clamp: unset;
  color: var(--text-primary);
}

/* 6. Unified Spatial Sky, 3D Canyon & Street Lenses HUD + Direct Map Popovers */
.stage-hud-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  pointer-events: auto;
}

.diurnal-preview-btn.is-hud-pill,
.hud-sky-pill,
.hud-camera-lenses-group {
  min-height: 36px;
  border-radius: 999px;
  background: var(--surface-hud);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow-pill);
  color: var(--text-primary);
  pointer-events: auto;
}

.diurnal-preview-btn.is-hud-pill {
  padding: 0 12px;
  font-family: var(--font-sans);
  font-size: 11.8px;
  font-weight: 600;
  color: var(--sun-gold);
}

.hud-sky-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  font-family: var(--font-sans);
  font-size: 12.2px;
  font-weight: 600;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.hud-sky-pill:hover {
  background: var(--surface-elevated);
}

.hud-sky-pill[aria-expanded="true"] {
  background: var(--cta-bg);
  color: var(--cta-fg);
  border-color: var(--cta-bg);
}

.hud-solar-angle {
  font-size: 11.4px;
  font-weight: 500;
  opacity: 0.78;
}

.hud-pill-sep {
  width: 1px;
  height: 15px;
  background: var(--rule-strong);
  flex: 0 0 auto;
}

.hud-sky-pill[aria-expanded="true"] .hud-pill-sep {
  background: rgba(252, 250, 245, 0.25);
}

.hud-camera-lenses-group {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  gap: 2px;
}

.hud-3d-btn {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 11.8px;
  font-weight: 700;
  color: var(--text-secondary);
  transition: background 140ms ease, color 140ms ease;
}

.hud-3d-btn:hover {
  color: var(--text-primary);
}

.hud-3d-btn[aria-pressed="true"] {
  background: var(--cta-bg);
  color: var(--cta-fg);
}

#sun-arc-section.is-sky-popover {
  width: min(352px, calc(100vw - 28px));
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface-hud);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow-float);
  pointer-events: auto;
  z-index: 48;
}

.detour-route-marker {
  z-index: 14;
}

.map-place-popover {
  position: fixed;
  right: 16px;
  bottom: 18px;
  width: min(352px, calc(100vw - 32px));
  padding: 13px 15px;
  border-radius: 16px;
  background: var(--surface-hud);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow-float);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 44;
}

.map-popover-head,
.map-click-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.map-popover-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.map-popover-close {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-inset);
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.map-popover-close:hover {
  background: var(--cta-bg);
  color: var(--cta-fg);
}

.map-popover-media {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.map-popover-thumb {
  width: 58px;
  height: 58px;
  border-radius: 9px;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid var(--rule-subtle);
}

.map-popover-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.map-popover-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
}

.map-popover-sub {
  margin-top: 2px;
  font-size: 11.4px;
  color: var(--text-secondary);
}

.map-popover-excerpt {
  margin: 0;
  font-family: var(--font-body);
  font-size: 12.6px;
  line-height: 1.44;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.map-popover-actions,
.map-click-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.map-popover-btn {
  min-height: 30px;
  padding: 0 11px;
  border-radius: 8px;
  background: var(--surface-inset);
  border: 1px solid var(--rule-strong);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 11.6px;
  font-weight: 600;
  transition: background 140ms ease, color 140ms ease;
}

.map-popover-btn:hover {
  background: var(--surface-elevated);
}

.map-popover-btn.is-primary {
  background: var(--cta-bg);
  border-color: var(--cta-bg);
  color: var(--cta-fg);
}

.map-click-chip {
  position: fixed;
  left: 50%;
  top: 50%;
  min-width: 224px;
  max-width: min(304px, calc(100vw - 28px));
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-hud);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow-float);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 45;
}

.map-click-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qr-dialog-postcards {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding-top: 4px;
  border-top: 1px solid var(--rule-subtle);
}

.qr-postcard-link {
  font-family: var(--font-sans);
  font-size: 11.8px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.qr-postcard-link:hover {
  color: var(--text-primary);
}

@media (min-width: 781px) {
  .top-stage-bar {
    top: 14px;
    right: 14px;
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
  }

  .mobile-lenses-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: transparent;
    border: none;
    box-shadow: none;
    font-family: var(--font-sans);
    font-size: 12.2px;
    font-weight: 600;
    color: var(--text-primary);
    pointer-events: auto;
  }

  .mobile-lenses-toggle[aria-expanded="true"],
  .mobile-lenses-toggle.has-active-lens {
    background: var(--cta-bg);
    color: var(--cta-fg);
  }

  .mobile-lenses-badge {
    font-size: 10.5px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--sun-gold);
    color: #17202A;
  }

  .zone-lenses-pill {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 280px;
    gap: 4px;
    padding: 8px;
    border-radius: 16px;
    overflow: hidden;
    transition: max-height 200ms var(--spring-crisp), opacity 150ms ease, padding 150ms ease;
  }

  .top-stage-bar:not(.is-lenses-open) .zone-lenses-pill {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
    box-shadow: none;
  }

  .top-stage-bar.is-lenses-open .zone-lenses-pill {
    max-height: 272px;
    opacity: 1;
    pointer-events: auto;
  }

  .archive-count-pill {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4px 6px 2px;
    font-size: 11px;
    color: var(--text-tertiary);
  }
}

.detour-endpoint-pin {
  z-index: 8;
  background: #17202A;
  color: #FCFAF5;
  border-color: #FCFAF5;
  cursor: grab;
}

.detour-endpoint-pin:active {
  cursor: grabbing;
}

.detour-endpoint-pin.is-origin {
  background: #FCFAF5;
  color: #17202A;
  border-color: #17202A;
}

@media (max-width: 780px) {
  body.is-zen .exhibition-dock[data-detent="peek"] {
    max-height: 204px;
    overflow-y: hidden;
  }

  body.is-zen .exhibition-dock[data-detent="peek"] .itinerary-toggle-bar {
    display: none;
  }

  /* Keep mobile Zen top-right HUD compact so Layers never collides with Zen pill or Walks */
  body.is-zen .diurnal-preview-btn.is-hud-pill,
  body.is-zen .hud-sky-pill,
  body.is-zen .hud-3d-btn,
  body.is-zen .hud-camera-lenses-group > .hud-pill-sep {
    display: none;
  }

  .hud-camera-lenses-group {
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .hud-solar-angle {
    display: none;
  }

  .summary-sheet-actions .ribbon-action-btn.is-share-pill span {
    display: none;
  }

  .map-place-popover {
    left: 10px;
    right: 10px;
    bottom: 14px;
    width: auto;
  }

  .smart-bundles-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .smart-bundle-pill,
  .pd-pill,
  .walk-tools-summary,
  #start-live-walk-btn,
  #toggle-details-btn,
  #open-field-guide-btn {
    min-height: 44px;
  }

  .walk-tools-summary {
    width: 44px;
  }

  body.is-zen .exhibition-dock[data-detent="full"] #tour-benefits-section,
  body.is-zen .exhibition-dock[data-detent="full"] #certified-human-signature,
  body.is-zen .exhibition-dock[data-detent="full"] #walk-spine-section {
    display: flex;
  }

  .walk-tools-popover {
    top: auto;
    bottom: calc(100% + 6px);
  }

  .composer-zen-pill:not([hidden]) {
    display: flex;
  }

  .composer-zen-pill .zen-pill-trigger {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }

  /* Field Book joins the map's right-hand control column, directly under Layers. */
  .composer-zen-pill .zen-field-book-btn {
    position: fixed;
    top: calc(max(10px, env(safe-area-inset-top, 0px)) + 50px);
    right: max(10px, env(safe-area-inset-right, 0px));
    min-width: 74px;
    min-height: 40px;
    padding: 0 10px;
    border-radius: 12px;
    white-space: nowrap;
    backdrop-filter: blur(22px) saturate(145%);
    -webkit-backdrop-filter: blur(22px) saturate(145%);
  }

  body:has(.mobile-lenses-toggle[aria-expanded="true"]) .zen-field-book-btn {
    visibility: hidden;
  }
}

/* Current Location Crosshair Button (From & Loop Origin) */
.locate-me-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.locate-me-btn:hover {
  background: var(--surface-elevated);
  border-color: var(--rule-strong);
  color: var(--text-primary);
}

.locate-me-btn.is-located {
  color: var(--sun-gold);
}

.locate-me-btn.is-locating {
  color: var(--sun-gold);
  animation: detourLocatePulse 1.1s ease-in-out infinite;
}

@keyframes detourLocatePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (max-width: 780px) {
  .locate-me-btn {
    width: 36px;
    height: 36px;
  }
}

/* 7. Explicit Dark Appearance Toggle, Floating Tools Sheets & Unmistakable POI Stops */
.icon-circle-btn.is-theme-toggle[aria-pressed="true"] {
  background: var(--cta-bg);
  color: var(--cta-fg);
  border-color: var(--cta-bg);
}

/* Chosen Points of Interest Strip inside Summary Ribbon */
.chosen-stops-strip {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.chosen-stop-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 10px;
  background: var(--surface-inset);
  border: 1px solid rgba(245, 158, 11, 0.36);
  border-left: 3px solid var(--sun-gold);
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}

.chosen-stop-pill:hover {
  background: var(--surface-elevated);
  border-color: var(--sun-gold);
}

.chosen-stop-main {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1 1 auto;
}

.chosen-stop-tag {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1.5px 6.5px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: var(--sun-gold);
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 700;
}

.chosen-stop-name {
  font-family: var(--font-sans);
  font-size: 12.4px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chosen-stop-meta {
  flex: 0 0 auto;
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--text-secondary);
}

.chosen-stop-remove {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.chosen-stop-remove:hover {
  background: var(--surface-elevated);
  color: var(--text-primary);
}

/* Unmistakable Map Stop Markers (Always visible; distinct from round turn dots) */
.detour-stop-marker {
  z-index: 16;
}

.detour-stop-badge,
.detour-medallion.detour-stop-badge {
  position: relative;
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4.5px 11px 4.5px 7px;
  border-radius: 999px;
  background: #17202A;
  color: #FCFAF5;
  border: 2px solid #D89622;
  box-shadow: 0 8px 22px rgba(23, 32, 42, 0.36);
  font-family: var(--font-sans);
  font-size: 11.8px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.detour-medallion:has(.detour-poi-badge) {
  width: auto;
  height: auto;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.exhibit-cite-link {
  color: var(--sun-gold);
}

.detour-stop-badge:hover,
.detour-stop-badge.is-hovered,
.detour-stop-badge.is-active {
  transform: translateY(-2px) scale(1.04);
  border-color: #F3C05A;
}

.detour-stop-badge::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #D89622;
}

.detour-stop-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  flex-shrink: 0;
}

.detour-poi-badge {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  border: 2px solid #FFFFFF;
  box-shadow: 0 4px 12px rgba(15, 20, 25, 0.28);
}

/* Highlighted Stop Callout inside Steps Itinerary */
.spine-stop-callout {
  margin: 4px 0 2px 27px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-inset);
  border: 1px solid rgba(245, 158, 11, 0.34);
  border-left: 3px solid var(--sun-gold);
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
}

.spine-stop-callout:hover {
  background: var(--surface-elevated);
  border-color: var(--sun-gold);
}

.spine-stop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.spine-stop-title {
  font-family: var(--font-sans);
  font-size: 12.6px;
  font-weight: 600;
  color: var(--text-primary);
}

.spine-stop-sub {
  font-family: var(--font-sans);
  font-size: 11.2px;
  color: var(--text-secondary);
}

/* Floating Sheets & Theme-Safe Modals (Reading Notes, Sidewalk, Ask Guide, Reader, QR, Gems) */
#walk-folio-sheet,
#sidewalk-sheet,
#live-guide-sheet {
  position: fixed;
  top: 60px;
  left: calc(var(--composer-w) + 26px);
  width: min(660px, calc(100vw - var(--composer-w) - 42px));
  max-height: calc(100dvh - 76px);
  margin: 0;
  padding: 18px 20px;
  overflow-y: auto;
  border-radius: 20px;
  background: var(--surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow-float);
  z-index: 84;
}

.walk-folio-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

#exhibition-carousel {
  position: fixed;
  left: calc(var(--composer-w) + 26px);
  right: 16px;
  bottom: 16px;
  width: auto;
  padding: 34px 8px 6px;
  border-radius: 18px;
  background: var(--surface-hud);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow-float);
  z-index: 82;
}

.carousel-close-btn {
  position: absolute;
  top: 6px;
  right: 10px;
  z-index: 4;
}

#exhibition-carousel .exhibition-track {
  display: flex;
  flex-direction: row;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 8px 8px;
}

@media (max-width: 780px) {
  #walk-folio-sheet,
  #sidewalk-sheet,
  #live-guide-sheet {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: 12px;
    width: auto;
    max-height: 80dvh;
    padding: 15px 16px;
    z-index: 88;
  }

  #exhibition-carousel {
    left: 10px;
    right: 10px;
    bottom: 12px;
    max-height: 68dvh;
    overflow-y: auto;
    z-index: 88;
  }
}

/* Tufte Unrolled Walk Timeline (#walk-exposure-wrap & #walk-timeline-svg) */
#summary-ribbon .walk-exposure-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 0 3px;
  border-top: 1px solid var(--rule-subtle);
  border-bottom: 1px solid var(--rule-subtle);
}

#summary-ribbon .walk-exposure-wrap[hidden] {
  display: none !important;
}

#summary-ribbon .walk-exposure-strip {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.walk-timeline-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  user-select: none;
}

.walk-timeline-svg .tl-hit {
  cursor: pointer;
}

.walk-timeline-svg .tl-hit:hover .tl-run-bar {
  stroke-width: 3.2;
}

#summary-ribbon .walk-exposure-caption-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 15px;
}

#summary-ribbon #exposure-start-label,
#summary-ribbon #exposure-end-label {
  display: none;
}

#summary-ribbon #exposure-hover-readout {
  font-family: var(--font-sans);
  font-size: 10.8px;
  color: var(--text-tertiary);
  text-align: left;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tour-benefits-ledger {
  display: none !important;
}

/* HUD Day/Night Pill + Fixed Viewport-Safe Walk Tools Menu */
.hud-day-night-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface-hud);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow-pill);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  pointer-events: auto;
  transition: background 150ms ease, color 150ms ease;
}

.hud-day-night-btn:hover {
  background: var(--surface-elevated);
}

.hud-day-night-btn.is-night-mode {
  color: var(--sun-gold);
}

.walk-tools-popover {
  position: fixed;
  width: 214px;
  max-height: min(420px, calc(100dvh - 28px));
  overflow-y: auto;
  z-index: 94;
}

.walk-tools-legal {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 3px;
  padding: 6px 10px 3px;
  border-top: 1px solid var(--rule-subtle);
}

.walk-tools-legal-link {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--text-tertiary);
  text-decoration: none;
}

.walk-tools-legal-link:hover {
  color: var(--text-primary);
}

/* Narrow Desktop / Tablet Squeeze Guard (781px - 1100px) */
@media (min-width: 781px) and (max-width: 1100px) {
  .composer-masthead-row {
    flex-wrap: wrap;
    gap: 6px;
  }

  .summary-sheet-actions {
    flex-wrap: wrap;
    gap: 5px;
  }
}

/* Mobile Lenses 2-Column Popover, Attribution Offset, Modal & Zen Pill Guards */
@media (max-width: 780px) {
  .top-stage-bar,
  body.is-zen .top-stage-bar {
    left: auto;
    right: max(10px, env(safe-area-inset-right, 0px));
  }

  body.is-zen .hud-day-night-btn {
    display: none;
  }

  .zone-lenses-pill {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(296px, calc(100vw - 20px));
    align-self: flex-end;
    gap: 4px;
    padding: 8px;
    border-radius: 16px;
    overflow: hidden;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .top-stage-bar.is-lenses-open .zone-lenses-pill {
    max-height: 312px;
    padding: 8px;
  }

  .archive-count-pill {
    grid-column: 1 / -1;
    text-align: center;
    border-left: none;
    padding: 4px 6px 2px;
  }

  .composer-masthead-row {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .composer-brand {
    flex: 1 0 auto;
  }

  .composer-masthead-tools {
    margin-left: auto;
  }

  #composer-mode-bar {
    order: 3;
    flex: 1 0 100%;
    width: 100%;
    margin-left: 0;
  }

  #composer-mode-bar .mode-pill-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .summary-sheet-actions:has(.walk-tools-menu[open]) {
    overflow: visible !important;
    mask-image: none !important;
    -webkit-mask-image: none !important;
  }

  body:has(.walk-tools-menu[open]) .field-book-rail,
  body.is-zen .exhibition-dock:has(.walk-tools-menu[open]) {
    overflow: visible !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: none !important;
  }

  .walk-tools-popover {
    width: auto;
    z-index: 120;
  }

  body.is-zen .maplibregl-ctrl-bottom-right {
    bottom: 176px !important;
  }

  body:has(#promenade-bar:not([hidden])) .zen-field-book-btn {
    visibility: hidden;
  }

  .vignette-mode-tabs {
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .vignette-mode-tabs::-webkit-scrollbar {
    display: none;
  }

  .vignette-reader-head {
    gap: 8px;
    padding-bottom: 8px;
  }

  .vignette-title {
    font-size: 18px;
  }
}

@media (max-width: 420px) {
  .zen-wordmark {
    display: none;
  }
}

/* Map Pin Truncation, Hover Card Placement, Dark-Mode Modal CTAs & Brick Mode */
.detour-endpoint-pin {
  max-width: 185px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-hover-card {
  top: auto;
  bottom: 18px;
  right: 16px;
  background: var(--surface-hud);
  color: var(--text-primary);
  border: 1px solid var(--rule-strong);
  z-index: 43;
}

.hover-card-sub {
  color: var(--text-secondary);
}

.hover-card-excerpt {
  color: var(--text-primary);
}

.field-book-dialog-card {
  align-items: stretch;
}

.field-book-stats-strip {
  width: 100%;
}

.qr-primary-btn,
.ask-guide-btn,
.vignette-source-cta,
.exhibit-doc-btn,
.cite-enlarge-chip,
.timelens-decade-pill.is-active {
  background: var(--cta-bg);
  color: var(--cta-fg);
  border-color: var(--cta-bg);
}

.qr-secondary-link,
.vignette-nav-btn {
  background: var(--surface-inset);
  color: var(--text-primary);
  border: 1px solid var(--rule-strong);
}

.vignette-reader-frame[data-reader-mode="text"] .vignette-text-col {
  background: var(--surface-inset);
  border-color: var(--rule-strong);
}

.vignette-doc-banner,
.vignette-media-caption,
.vignette-counter,
.vignette-context-box,
.vignette-doc-cert-meta {
  color: var(--text-secondary);
}

/* Brick Mode Dark Appearance & Mobile Header Column Fix */
.brick-shell {
  background: var(--surface-sheet);
  color: var(--text-primary);
}

.brick-topbar,
.brick-nav-footer {
  border-color: var(--rule-strong);
}

.brick-route-title,
.brick-instruction,
.brick-step-distance,
.brick-landmark-caption {
  color: var(--text-primary);
}

.brick-value-strip,
.brick-step-counter,
.brick-landmark-hint,
.brick-story-cite,
.brick-sparkmap-legend {
  color: var(--text-secondary);
}

.brick-story-box,
.brick-landmark-plate,
.brick-spine-row {
  background: var(--surface-inset);
  border-color: var(--rule-subtle);
  color: var(--text-primary);
}

.brick-story-quote {
  color: var(--text-primary);
}

.brick-spine-row.is-active,
.brick-ghost-btn.is-dark,
.brick-nav-btn.is-primary {
  background: var(--cta-bg);
  color: var(--cta-fg);
  border-color: var(--cta-bg);
}

.brick-ghost-btn,
.brick-nav-btn {
  background: var(--surface-inset);
  color: var(--text-primary);
  border: 1px solid var(--rule-strong);
}

.brick-dot::before {
  background: var(--rule-strong);
}

.brick-dot.is-active::before {
  background: var(--cta-bg);
}

.brick-sparkmap-route {
  stroke: var(--text-primary);
}

body[data-ui-theme="dark"] .brick-sidewalk-badge,
body:not([data-ui-theme="light"])[data-diurnal-phase="nocturne"] .brick-sidewalk-badge,
body:not([data-ui-theme="light"])[data-diurnal-phase="twilight"] .brick-sidewalk-badge {
  background: rgba(245, 158, 11, 0.18);
  color: #FCD34D;
}

body[data-ui-theme="dark"] .brick-sidewalk-badge.tone-shade,
body:not([data-ui-theme="light"])[data-diurnal-phase="nocturne"] .brick-sidewalk-badge.tone-shade,
body:not([data-ui-theme="light"])[data-diurnal-phase="twilight"] .brick-sidewalk-badge.tone-shade {
  background: rgba(148, 163, 184, 0.18);
  color: #CBD5E1;
}

body[data-ui-theme="dark"] .brick-sidewalk-badge.tone-park,
body:not([data-ui-theme="light"])[data-diurnal-phase="nocturne"] .brick-sidewalk-badge.tone-park,
body:not([data-ui-theme="light"])[data-diurnal-phase="twilight"] .brick-sidewalk-badge.tone-park {
  background: rgba(52, 211, 153, 0.18);
  color: #6EE7B7;
}

@media (max-width: 900px) {
  .brick-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .brick-topbar-title-group {
    flex: 0 0 auto;
    width: 100%;
  }

  .brick-topbar-actions {
    flex-wrap: wrap;
  }

  .brick-nav-footer {
    flex-wrap: wrap;
    row-gap: 8px;
  }
}

/* 8. Citymapper-Style City Emblem Pill & Multi-City Switcher */
.city-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 23px;
  padding: 0 6px 0 3px;
  border-radius: 999px;
  background: var(--canopy-emerald);
  color: #FCFAF5;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 2px 6px rgba(23, 32, 42, 0.16);
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease, box-shadow 140ms ease;
}

.city-badge-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.city-badge-emblem {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(15, 23, 32, 0.24);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FCFAF5;
}

.city-badge-caret {
  opacity: 0.82;
}

.zen-city-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.5px 6px;
  border-radius: 999px;
  background: var(--canopy-emerald);
  color: #FCFAF5;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.city-switcher-card {
  width: min(520px, 94vw);
  align-items: stretch;
  gap: 12px;
}

.city-switcher-subhead {
  display: block;
  margin-top: 2px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-secondary);
}

.city-live-hero {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 16px;
  background: var(--surface-inset);
  border: 1.5px solid var(--canopy-emerald);
}

.city-live-top {
  display: flex;
  align-items: center;
  gap: 11px;
}

.city-medallion {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FCFAF5;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(23, 32, 42, 0.18);
}

.city-live-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.city-live-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.city-card-name {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.city-live-pill {
  padding: 1.5px 7px;
  border-radius: 999px;
  background: rgba(44, 94, 67, 0.16);
  color: var(--canopy-emerald);
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 700;
}

body[data-ui-theme="dark"] .city-live-pill,
body:not([data-ui-theme="light"])[data-diurnal-phase="nocturne"] .city-live-pill,
body:not([data-ui-theme="light"])[data-diurnal-phase="twilight"] .city-live-pill {
  background: rgba(52, 211, 153, 0.18);
  color: #6EE7B7;
}

.city-card-meta {
  display: block;
  font-family: var(--font-sans);
  font-size: 11.8px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.city-hood-Row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.city-hood-chip {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-strong);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 11.2px;
  font-weight: 500;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.city-hood-chip:hover {
  background: var(--cta-bg);
  color: var(--cta-fg);
  border-color: var(--cta-bg);
}

.city-upcoming-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2px;
}

.city-upcoming-kicker {
  font-family: var(--font-sans);
  font-size: 11.2px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.city-switcher-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.city-upcoming-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 12px;
  background: var(--surface-inset);
  border: 1px solid var(--rule-subtle);
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}

.city-upcoming-card:hover,
.city-upcoming-card.is-selected {
  background: var(--surface-elevated);
  border-color: var(--sun-gold);
}

.city-medallion.is-compact {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.city-upcoming-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.city-upcoming-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.city-upcoming-code {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-tertiary);
}

.city-upcoming-sub {
  display: block;
  font-family: var(--font-sans);
  font-size: 10.8px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.city-switcher-status {
  margin: 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--surface-inset);
  border-left: 3px solid var(--sun-gold);
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.42;
  color: var(--text-primary);
}

@media (max-width: 520px) {
  .city-switcher-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.folio-epigraph-card,
.folio-botanical-card,
.folio-chapter-card,
.timelens-plate-card,
.gem-card {
  background: var(--surface-inset);
  border-color: var(--rule-subtle);
  color: var(--text-primary);
}

.folio-epigraph-quote,
.folio-botanical-title,
.folio-chapter-title,
.folio-excerpt,
.timelens-plate-title,
.vignette-title,
.qr-dialog-title,
.gem-card-name,
.hover-card-title,
.exhibit-title {
  color: var(--text-primary);
}

.folio-epigraph-cite,
.folio-botanical-cite,
.folio-chapter-cite,
.folio-genus,
.vignette-subline,
.qr-dialog-caption,
.gem-card-meta,
.gem-card-address,
.exhibit-subline {
  color: var(--text-secondary);
}

.folio-rights-pill,
.folio-timelens-btn,
.exhibit-read-btn {
  background: var(--surface-elevated);
  border: 1px solid var(--rule-strong);
  color: var(--text-primary);
}

.folio-timelens-btn:hover,
.exhibit-read-btn:hover {
  background: var(--cta-bg);
  border-color: var(--cta-bg);
  color: var(--cta-fg);
}

.vignette-reader-frame,
.qr-dialog-card {
  background: var(--surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--rule-strong);
}

.vignette-document-stage,
.vignette-doc-scan-wrap,
.short-link-output,
.ask-guide-input,
.ask-guide-answer,
.rendezvous-form .endpoint-row,
.gem-suggest-form .endpoint-row,
.gem-note-input {
  background: var(--surface-inset);
  color: var(--text-primary);
  border-color: var(--rule-strong);
}

.vignette-document-sheet,
.vignette-story-body,
.rendezvous-result,
.gem-form-status {
  color: var(--text-primary);
}

.vignette-tab,
.font-step-btn,
.vignette-close-btn,
.vignette-fullscreen-btn {
  color: var(--text-secondary);
  background: var(--surface-inset);
  border-color: var(--rule-subtle);
}

.vignette-tab.is-active,
.font-step-btn.is-active,
.vignette-fullscreen-btn.is-active {
  background: var(--cta-bg);
  border-color: var(--cta-bg);
  color: var(--cta-fg);
}
