/* UrbanWalks — design tokens & shared styles */

:root {
  /* Color */
  --uw-bg: #FAF8F4;
  --uw-bg-card: #F2EEE5;
  --uw-ink: #1F1D1A;
  --uw-ink-soft: #3D3933;
  --uw-muted: #6B655D;
  --uw-rule: #E4DDD0;
  --uw-rule-strong: #CFC6B4;
  --uw-accent: #7AA9D0;
  --uw-accent-ink: #0F1822;        /* dark text on the lighter blue accent */
  --uw-accent-hover: #5E8EB5;
  /* AA-compliant blue text on the cream page bg — clears 4.5:1 against
     #FAF8F4 (~5.1:1). Used for blue links + filled badges. */
  --uw-accent-deep: #355C82;
  /* Subtle nav-on-dark border. Used wherever a hairline sits inside the
     dark nav and needs to read as a soft separator, not as the page rule. */
  --uw-rule-on-dark: rgba(255, 255, 255, 0.08);
  --uw-error: #A04848;
  --uw-error-bg: #F4E8E5;
  --uw-success: #4A6B4F;

  /* Type */
  --uw-serif: "Newsreader", "Iowan Old Style", "Charter", Georgia, serif;
  --uw-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --uw-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Rhythm — 8px scale */
  --uw-1: 4px;
  --uw-2: 8px;
  --uw-3: 16px;
  --uw-4: 24px;
  --uw-5: 32px;
  --uw-6: 48px;
  --uw-7: 72px;

  --uw-radius-sm: 6px;
  --uw-radius-md: 8px;
  --uw-radius-pill: 999px;
}

/* Base */
.uw-screen {
  background: var(--uw-bg);
  color: var(--uw-ink);
  font-family: var(--uw-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Wordmark */
.uw-wordmark {
  font-family: var(--uw-serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--uw-ink);
}

/* Form bits */
.uw-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--uw-ink);
  margin-bottom: var(--uw-2);
}
.uw-label-meta {
  font-size: 13px;
  font-weight: 400;
  color: var(--uw-muted);
  margin-left: var(--uw-1);
}
.uw-input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  background: #FFFDF8;
  border: 1px solid var(--uw-rule-strong);
  border-radius: var(--uw-radius-sm);
  font: inherit;
  color: var(--uw-ink);
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.uw-input::placeholder { color: #9A9389; }
.uw-input:focus {
  outline: none;
  border-color: var(--uw-accent);
  box-shadow: 0 0 0 3px rgba(44,95,141,0.15);
}

/* Buttons */
.uw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--uw-2);
  height: 48px;
  padding: 0 20px;
  border-radius: var(--uw-radius-sm);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  box-sizing: border-box;
}
.uw-btn--primary {
  background: var(--uw-accent);
  color: var(--uw-accent-ink);
  border-color: var(--uw-accent);
}
.uw-btn--primary:hover {
  background: transparent;
  color: var(--uw-ink);             /* dark ink text — readable, no faint blue-on-cream */
  border-color: var(--uw-accent);
}
.uw-btn--secondary {
  background: transparent;
  color: var(--uw-ink);
  border-color: var(--uw-rule-strong);
}
.uw-btn--secondary:hover { background: #FFFDF8; border-color: var(--uw-ink-soft); }
/* Accent-filled button — solid brand-blue with dark-ink text. On hover
   it inverts to an outlined treatment (transparent bg, blue text + border)
   so the affordance reads clearly without sliding back into the primary CTA. */
.uw-btn--accent {
  background: var(--uw-accent);
  color: var(--uw-accent-ink);
  border-color: var(--uw-accent);
}
.uw-btn--accent:hover {
  background: transparent;
  color: var(--uw-ink);
  border-color: var(--uw-accent);
}
.uw-btn--ghost {
  background: transparent;
  color: var(--uw-ink-soft);
  border-color: var(--uw-rule);
  height: 44px;
  font-size: 14px;
}
.uw-btn--block { width: 100%; }

/* Checkbox row */
.uw-check {
  display: flex;
  align-items: center;
  gap: var(--uw-3);
  min-height: 44px;
  padding: var(--uw-2) 0;
  border-bottom: 1px solid var(--uw-rule);
  cursor: pointer;
  user-select: none;
}
.uw-check:last-child { border-bottom: none; }
.uw-check input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--uw-rule-strong);
  border-radius: 4px;
  background: #FFFDF8;
  cursor: pointer;
  position: relative;
  flex: 0 0 auto;
  margin: 0;
}
.uw-check input[type="checkbox"]:checked {
  background: var(--uw-accent);
  border-color: var(--uw-accent);
}
.uw-check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid #FFFDF8;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.uw-check__label {
  font-size: 16px;
  color: var(--uw-ink);
}

/* Slider */
.uw-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--uw-rule-strong);
  border-radius: 2px;
  outline: none;
  margin: 12px 0;
}
.uw-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  background: var(--uw-accent);
  border: 3px solid #FFFDF8;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--uw-rule-strong);
}
.uw-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: var(--uw-accent);
  border: 3px solid #FFFDF8;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--uw-rule-strong);
}
.uw-slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--uw-muted);
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}

/* Stops list */
.uw-stops {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: stop;
}
.uw-stop {
  counter-increment: stop;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: var(--uw-3);
  padding: var(--uw-4) 0;
  border-bottom: 1px solid var(--uw-rule);
}
.uw-stop:last-child { border-bottom: none; }
.uw-stop::before {
  content: counter(stop, decimal-leading-zero);
  font-family: var(--uw-serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--uw-muted);
  line-height: 1;
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
}
.uw-stop__name {
  font-size: 17px;
  font-weight: 600;
  color: var(--uw-ink);
  margin: 0 0 4px;
  line-height: 1.3;
}
.uw-stop__blurb {
  font-size: 15px;
  color: var(--uw-ink-soft);
  margin: 0 0 var(--uw-2);
  line-height: 1.5;
}
.uw-stop__meta {
  font-size: 13px;
  color: var(--uw-muted);
  font-variant-numeric: tabular-nums;
}
.uw-stop__meta-sep { margin: 0 6px; opacity: 0.6; }

/* Summary paragraph */
.uw-summary {
  font-family: var(--uw-serif);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--uw-ink);
  margin: 0;
  letter-spacing: 0.005em;
}

/* Save card */
.uw-save {
  background: var(--uw-bg-card);
  border: 1px solid var(--uw-rule);
  border-radius: var(--uw-radius-md);
  padding: var(--uw-4);
}
.uw-save__h {
  font-family: var(--uw-serif);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 var(--uw-1);
  color: var(--uw-ink);
  line-height: 1.2;
}
.uw-save__sub {
  font-size: 14px;
  color: var(--uw-muted);
  margin: 0 0 var(--uw-3);
}
.uw-permalink {
  display: block;
  width: 100%;
  font-family: var(--uw-mono);
  font-size: 13px;
  color: var(--uw-ink);
  background: #FFFDF8;
  border: 1px solid var(--uw-rule-strong);
  border-radius: var(--uw-radius-sm);
  padding: 12px 14px;
  margin-bottom: var(--uw-3);
  user-select: all;
  word-break: break-all;
  box-sizing: border-box;
}

/* Section + small heading */
.uw-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--uw-muted);
  margin: 0 0 var(--uw-2);
}

/* Error */
.uw-error {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--uw-error);
  margin: var(--uw-2) 0 0;
}
.uw-error::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--uw-error);
  flex: 0 0 auto;
}
/* Honor [hidden] — the rule above sets display: flex which would otherwise
   leave empty error placeholders showing as bare red dots. */
.uw-error[hidden] { display: none; }

/* Toast */
.uw-toast {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--uw-success);
  margin-top: var(--uw-2);
}
.uw-toast::before {
  content: "✓";
  font-weight: 600;
}

/* Footer */
.uw-foot {
  font-size: 12px;
  color: var(--uw-muted);
  text-align: center;
  padding: var(--uw-3) var(--uw-4) var(--uw-4);
}
.uw-foot a { color: inherit; text-decoration: underline; text-decoration-color: var(--uw-rule-strong); text-underline-offset: 3px; }

/* Attribution */
.uw-attrib {
  font-style: italic;
  font-size: 14px;
  color: var(--uw-muted);
  margin: var(--uw-3) 0 0;
}
.uw-back {
  display: inline-block;
  margin-top: var(--uw-3);
  font-size: 14px;
  /* --uw-accent + --uw-accent-hover both fail AA on cream. --uw-accent-deep
     is the darker brand blue tuned for 4.5:1+. */
  color: var(--uw-accent-deep);
  text-decoration: none;
  font-weight: 500;
}
.uw-back:hover { text-decoration: underline; }

/* Frame chrome */
.uw-frame {
  position: relative;
  background: var(--uw-bg);
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.uw-mobile {
  width: 375px;
  font-size: 16px;
}
.uw-mobile .uw-pad { padding: var(--uw-5) var(--uw-4); }

.uw-desktop {
  width: 1200px;
}
.uw-desktop .uw-pad {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--uw-7) var(--uw-4);
}

/* Status bar (mobile) */
.uw-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--uw-ink);
  font-variant-numeric: tabular-nums;
}
.uw-statusbar__icons {
  display: flex;
  gap: 5px;
  align-items: center;
}

/* Header treatments */
.uw-hero-wordmark {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0;
  line-height: 1;
}
.uw-hero-tagline {
  font-family: var(--uw-serif);
  font-size: 17px;
  font-style: italic;
  color: var(--uw-muted);
  margin: var(--uw-2) 0 0;
  line-height: 1.4;
}
.uw-divider {
  height: 1px;
  background: var(--uw-rule);
  margin: var(--uw-6) 0;
  border: none;
}
.uw-divider--soft {
  margin: var(--uw-5) 0;
}

/* Saved pill row buttons */
.uw-btn-row {
  display: flex;
  gap: var(--uw-2);
}
.uw-btn-row .uw-btn { flex: 1; }

@media (max-width: 480px) {
  .uw-btn-row { flex-direction: column; }
}

/* Maps icon */
.uw-icon-arrow::after {
  content: "→";
  font-weight: 400;
}

/* CTA row — preview + open in maps */
.uw-cta-row {
  display: flex;
  flex-direction: column;
  gap: var(--uw-2);
  margin-top: var(--uw-4);
}
@media (min-width: 600px) {
  .uw-cta-row { flex-direction: row; }
  .uw-cta-row .uw-btn { flex: 0 0 auto; }
  .uw-cta-row .uw-btn--primary { order: 2; }
  .uw-cta-row .uw-btn--secondary { order: 1; }
}

/* Production layout — overrides the designer's fixed-width mockup classes
   (.uw-mobile = 375px, .uw-desktop = 1200px). Live pages omit those modifier
   classes; .uw-screen alone gets a responsive centered column. */
.uw-screen {
  width: 100%;
  min-height: 100vh;
}
.uw-screen > .uw-pad {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px var(--uw-4) var(--uw-5);     /* tighter top, 24px sides, 32px bottom */
}
@media (min-width: 768px) {
  .uw-screen > .uw-pad {
    padding: 24px var(--uw-4) var(--uw-7);   /* desktop: small gap below nav, generous bottom */
  }
}

/* Modal */
.uw-frame { position: relative; }
.uw-modal-scrim {
  position: fixed;            /* viewport-pinned for production (designer used absolute for the mockup frame) */
  inset: 0;
  background: rgba(31, 29, 26, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
  animation: uw-fade 0.18s ease-out;
}
/* Honor the HTML `hidden` attribute even though the rule above sets display:flex.
   Without this, the modal would be permanently visible. */
.uw-modal-scrim[hidden] { display: none; }
@media (min-width: 640px) {
  .uw-modal-scrim { align-items: center; }  /* center on desktop instead of bottom-sheet */
}
.uw-modal {
  background: var(--uw-bg);
  width: 100%;
  max-width: 640px;
  height: 86vh;                /* tall sheet so the embedded map has real room to render */
  max-height: 86vh;
  border-radius: 12px 12px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: uw-rise 0.22s cubic-bezier(.2,.7,.3,1);
}
@media (min-width: 640px) {
  .uw-modal {
    height: 80vh;
    max-height: 80vh;
    border-radius: 12px;        /* full corners on desktop centered dialog */
  }
}
.uw-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--uw-rule);
}
.uw-modal__title {
  font-family: var(--uw-serif);
  font-size: 20px;
  font-weight: 500;
  margin: 0;
  line-height: 1.2;
}
.uw-modal__sub {
  font-size: 12px;
  color: var(--uw-muted);
  margin: 2px 0 0;
}
.uw-modal__close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  color: var(--uw-ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.uw-modal__close:hover { background: var(--uw-rule); }
.uw-modal__map {
  flex: 1 1 auto;
  position: relative;
  background: #EFEAE0;
  min-height: 360px;
  overflow: hidden;
}
.uw-modal__foot {
  padding: 14px 20px 20px;
  border-top: 1px solid var(--uw-rule);
  background: var(--uw-bg);
}

/* Map placeholder canvas */
.uw-map-svg {
  display: block;
  width: 100%;
  height: 100%;
}
.uw-map-note {
  position: absolute;
  left: 12px;
  bottom: 12px;
  font-family: var(--uw-mono);
  font-size: 10px;
  color: var(--uw-muted);
  background: rgba(250, 248, 244, 0.9);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--uw-rule);
}

@keyframes uw-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes uw-rise { from { transform: translateY(40px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }

/* Chip rows — designer v2 unified vocabulary across all three question groups.
   Single-select rows use aria-checked; multi-select rows use aria-pressed. */
.uw-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.uw-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--uw-rule-strong);
  border-radius: 999px;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--uw-ink);
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.uw-chip:hover {
  background: #FFFDF8;
  border-color: var(--uw-ink-soft);
}
.uw-chip[aria-checked="true"],
.uw-chip[aria-pressed="true"] {
  border-color: var(--uw-ink);
  background: var(--uw-ink);
  color: #FAF8F4;
}
.uw-chip[aria-checked="true"]:hover,
.uw-chip[aria-pressed="true"]:hover {
  background: var(--uw-ink);
  border-color: var(--uw-ink);
}
.uw-chip:focus-visible {
  outline: 2px solid var(--uw-accent);
  outline-offset: 2px;
}
/* Multi-select selected chip gets a leading ✓ glyph */
.uw-chip--multi[aria-pressed="true"]::before {
  content: "✓";
  font-size: 13px;
  margin-left: -4px;
  line-height: 1;
}

/* Header band — wordmark+mark left, Browse walks right.
   Architectural dark bar; cream text. Sticky over the cream page. */
.uw-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;                       /* tight on mobile so right-side toggle never clips */
  min-width: 0;                   /* allow children to shrink instead of overflow */
  padding: 6px 16px;              /* tighter vertical: trimmed from 10 → 6 */
  margin: -16px -16px 12px;       /* bleed sideways; small gap to the card below */
  border-radius: 4px;             /* tiny softening of the otherwise hard box */
  background: var(--uw-ink);
  color: #FAF8F4;
}

/* Thin hairline bounding the hero tagline + walk-planner form as one
   card. Tiny radius mirrors the nav band above. */
.uw-card {
  border: 1px solid var(--uw-rule);
  border-radius: 6px;
  padding: 20px 18px 16px;
  background: var(--uw-bg);
}
.uw-card .uw-tagline { margin-top: 0; }
@media (min-width: 768px) {
  .uw-header {
    gap: 12px;
    padding: 10px 16px;            /* desktop trimmed from 14 → 10 */
    margin: -24px -16px 16px;
  }
}
.uw-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;                   /* lets the wordmark truncate gracefully */
  color: #FAF8F4;                 /* cream on dark nav */
  text-decoration: none;
  flex: 1 1 auto;
  overflow: hidden;
}
.uw-header__mark {
  display: block;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
}
.uw-header__wordmark {
  font-family: var(--uw-serif);
  font-weight: 500;
  font-size: 17px;                /* mobile size */
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (min-width: 768px) {
  .uw-header__brand { gap: 14px; }
  .uw-header__mark { width: 40px; height: 40px; }
  .uw-header__wordmark { font-size: 24px; }
}
.uw-header__right {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex: 0 0 auto;                 /* never shrink — keeps EN|ES on screen */
}
@media (min-width: 768px) {
  .uw-header__right { gap: 4px; }
}
.uw-header__link {
  font-size: 13px;
  color: rgba(250, 248, 244, 0.78);   /* cream-soft on dark */
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* So <button class="uw-header__link"> looks like the <a> siblings */
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}
@media (min-width: 768px) {
  .uw-header__link { font-size: 14px; }
}
.uw-header__link:hover { color: var(--uw-accent); }
.uw-header__link-icon { display: none; flex: 0 0 auto; }
/* Below 480px, show only the icon — saves room for the wordmark. */
@media (max-width: 480px) {
  .uw-header__link-icon { display: block; }
  .uw-header__link-text { display: none; }
}

/* Visually hidden but exposed to assistive tech. Used to attach an
   accessible-name word (e.g. "Like") next to a numeric counter so that
   the visible text is a substring of the accessible name. */
.uw-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Top-of-page progress bar (nprogress-style). Shows during cross-page
   navigations so the user sees instant feedback on slow pages
   (library + permalink can take 1–3 s). Lives at the very top of <body>. */
.uw-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, #7AA9D0, #5b8ab6);
  box-shadow: 0 0 8px rgba(122, 169, 208, 0.55);
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: width 0.18s ease-out, opacity 0.22s ease;
}
.uw-progress.is-active {
  opacity: 1;
}
.uw-progress.is-done {
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .uw-progress {
    transition: opacity 0.15s linear;
  }
}

/* Fast custom tooltip for icon-only nav buttons. Uses [data-tooltip] so we
   don't pay the ~1.5s native title-attribute delay. Shows after 80 ms. */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translate(-50%, -4px);
  white-space: nowrap;
  font-size: 12px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(31, 29, 26, 0.92);
  color: #FAF8F4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease, transform 0.12s ease;
  transition-delay: 0.08s;
  z-index: 80;
}
[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.uw-header__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: none;
  border: 0;
  padding: 0;
  color: rgba(250, 248, 244, 0.78);   /* cream-soft on dark */
  cursor: pointer;
  flex: 0 0 auto;
  transition: color 0.12s, background 0.12s;
}
.uw-header__icon:hover {
  color: #FAF8F4;
  background: rgba(255, 255, 255, 0.08);
}
.uw-header__icon svg { display: block; width: 18px; height: 18px; }
@media (min-width: 768px) {
  .uw-header__icon { width: 32px; height: 32px; }
  .uw-header__icon svg { width: 20px; height: 20px; }
}

/* Locale toggle (EN | ES) — inverted to read on the dark nav. */
.uw-locale {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  overflow: hidden;
  font-size: 10px;
  letter-spacing: 0.05em;
  flex: 0 0 auto;                 /* don't shrink */
  /* Distinct shape from the row of round icon buttons — give it a touch
     more breathing room so the eye reads them as separate clusters. */
  margin-left: 6px;
}
.uw-locale__pill {
  padding: 3px 7px;
  color: rgba(250, 248, 244, 0.6);
  text-decoration: none;
  font-weight: 600;
  background: transparent;
}
.uw-locale__pill--on {
  background: #FAF8F4;
  color: var(--uw-ink);
}
.uw-locale__pill:hover:not(.uw-locale__pill--on) {
  color: #FAF8F4;
}

/* Tagline — single line, italic, sits below header band */
/* Starting-point row: input + geolocate button. Side-by-side on tablet+,
   stacked vertically on phones so the input and button each get full width. */
.uw-address-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}
.uw-address-row__input { width: 100%; }
.uw-address-row__btn { white-space: nowrap; }
@media (min-width: 540px) {
  .uw-address-row { flex-direction: row; }
  .uw-address-row__input { flex: 1 1 auto; min-width: 0; }
  .uw-address-row__btn { flex: 0 0 auto; }
}

.uw-tagline {
  font-family: var(--uw-serif);
  font-style: italic;
  font-size: 23px;
  line-height: 1.3;
  color: #6B655D;
  max-width: 28ch;
  margin: 0 auto 20px;
  text-align: center;
}
.uw-tagline__line1,
.uw-tagline__line2 { display: block; }
.uw-tagline__line1 { color: var(--uw-ink); }
/* Slightly darker than --uw-accent for stronger contrast on cream. */
.uw-tagline__line2 { color: #4A7DA6; }
@media (min-width: 768px) {
  .uw-tagline { font-size: 25px; }
}

/* Helper text under inputs — tighter than uw-label-meta */
.uw-helper {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--uw-muted);
}

/* Form row — consistent vertical rhythm between groups */
.uw-row { margin: 0 0 28px; }
.uw-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.uw-row-head__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--uw-ink);
}
.uw-skip {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: var(--uw-muted);
  cursor: pointer;
  visibility: hidden;            /* hidden by default — appears once a chip is selected */
}
.uw-skip:hover { color: var(--uw-ink); }
.uw-skip:focus-visible {
  outline: 2px solid var(--uw-accent);
  outline-offset: 2px;
  border-radius: 2px;
}
/* Reveal the row's Skip › link only when that row has a selection.
   Sibling selector + :has() — modern browsers (Chrome 105+, Safari 15.4+, FF 121+). */
.uw-row:has(.uw-chips [aria-checked="true"]) .uw-skip,
.uw-row:has(.uw-chips [aria-pressed="true"]) .uw-skip {
  visibility: visible;
}

/* Generate button gets extra weight on the page */
.uw-btn--commit {
  height: 46px;
  margin-top: 32px;
  font-size: 14px;
}

/* Library page — search bar */
.uw-search-bar {
  display: flex;
  gap: 8px;
  margin: 16px 0 24px;
}
.uw-search-bar input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--uw-rule-strong);
  border-radius: 6px;
  background: #FFFDF8;
  font-size: 14px;
  font-family: inherit;
}
.uw-search-bar input:focus {
  outline: none;
  border-color: var(--uw-accent);
  box-shadow: 0 0 0 3px rgba(44,95,141,0.15);
}

/* Library page — mode toggle pills */
.uw-mode-toggle {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.uw-mode-toggle__pill {
  padding: 8px 14px;
  border: 1px solid var(--uw-rule-strong);
  border-radius: 999px;
  background: white;
  font-size: 13px;
  color: var(--uw-ink);
  cursor: pointer;
  font-family: inherit;
}
.uw-mode-toggle__pill[aria-selected="true"] {
  border-color: var(--uw-ink);
  background: var(--uw-ink);
  color: #FAF8F4;
}
/* Active-search status chip — non-interactive, sits next to the mode toggle
   so the user can see which query is currently filtering the list. */
.uw-mode-toggle__chip {
  padding: 8px 14px;
  border: 1px dashed var(--uw-rule-strong);
  border-radius: 999px;
  font-size: 13px;
  color: var(--uw-ink-soft);
  background: rgba(255, 253, 248, 0.6);
}

/* Library page — walk card */
.uw-walk-list { list-style: none; padding: 0; margin: 0; }
.uw-walk-list__item { margin: 0 0 16px; }
.uw-walk-card {
  display: block;
  padding: 20px;
  border: 1px solid var(--uw-rule);
  border-radius: 8px;
  background: var(--uw-bg-card);
  text-decoration: none;
  color: var(--uw-ink);
  transition: border-color 0.12s ease;
}
.uw-walk-card:hover {
  border-color: var(--uw-rule-strong);
}
.uw-walk-card__head {
  font-size: 14px;
  color: var(--uw-ink-soft);
  margin-bottom: 6px;
}
.uw-walk-card__hood {
  color: var(--uw-muted);
}
.uw-walk-card__summary {
  font-family: var(--uw-serif);
  font-size: 16px;
  line-height: 1.5;
  margin: 8px 0;
  color: var(--uw-ink);
}
.uw-walk-card__meta {
  font-size: 12px;
  color: var(--uw-muted);
  margin-top: 12px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}
.uw-walk-card__cta {
  margin-left: auto;
  color: var(--uw-accent);
}
/* Planning state — form stays visible but dimmed/disabled; the Generate
   button morphs into a row of [animated brand mark] [rotating status text]. */
.uw-form--planning .uw-row,
.uw-form--planning .uw-eyebrow {
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.18s ease;
}
.uw-btn--commit .uw-btn__status {
  font-family: var(--uw-serif);
  font-style: italic;
  font-size: 16px;
  font-weight: 400;
}
.uw-btn--commit .uw-btn__status.is-fading {
  animation: uw-fade 400ms ease-out;
}

/* Bigger animated brand mark, sits below the Generate button during planning */
.uw-planning-mark {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 24px;
  color: var(--uw-ink);          /* drives currentColor on path + start dot */
}
.uw-planning-mark[hidden] { display: none; }
.uw-loader {
  display: block;
  overflow: visible;             /* the pulse extends slightly past the viewBox */
}
.uw-loader__path {
  animation: uw-flow 1.6s linear infinite;
}
.uw-loader__end {
  transform-box: fill-box;
  transform-origin: center;
  animation: uw-pulse 1.6s ease-in-out infinite;
}
@keyframes uw-flow { to { stroke-dashoffset: -33.6; } }
@keyframes uw-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.35); }
}
@keyframes uw-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .uw-loader__path,
  .uw-loader__end,
  .uw-planning__status { animation: none; }
}

/* Reaction bar (heart + comment count) on permalink pages */
.uw-react {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 0 4px;
}
.uw-react__heart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--uw-rule-strong);
  background: transparent;
  color: var(--uw-ink);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  transition: background 0.12s, border-color 0.12s, color 0.12s, transform 0.12s;
}
.uw-react__heart:hover { border-color: var(--uw-ink-soft); background: #FFFDF8; }
.uw-react__heart-icon { color: var(--uw-muted); transition: color 0.12s, transform 0.18s; }
.uw-react__heart.is-liked {
  border-color: #B7382C;
  background: rgba(183, 56, 44, 0.08);
}
.uw-react__heart.is-liked .uw-react__heart-icon {
  color: #B7382C;
  transform: scale(1.15);
}
.uw-react__count { font-variant-numeric: tabular-nums; min-width: 1ch; }
.uw-react__comments-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--uw-muted);
  text-decoration: none;
  font-size: 14px;
}
.uw-react__comments-link:hover { color: var(--uw-ink); }

/* Comment list + form on permalink */
.uw-comments {
  margin: 32px 0;
  /* The sticky .uw-header floats over the top of the viewport. Without this,
     scrolling to #comments lands the section flush against the top edge —
     the heading and first input get hidden behind the header band. */
  scroll-margin-top: 96px;
}
.uw-comments__h {
  font-family: var(--uw-serif);
  font-weight: 500;
  font-size: 18px;
  margin: 0 0 16px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.uw-comments__count {
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  color: var(--uw-muted);
}
.uw-comments__empty {
  color: var(--uw-muted);
  font-size: 14px;
  margin: 16px 0 0;
}
.uw-comment-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.uw-comment-form__name { font-size: 14px; }
.uw-comment-form__body {
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  min-height: 72px;
}
.uw-comment-form__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.uw-comment-form__counter {
  font-size: 12px;
  color: var(--uw-muted);
  font-variant-numeric: tabular-nums;
}
.uw-comment-form__submit {
  font-size: 14px;
  padding: 8px 16px;
  width: auto;
}
.uw-comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.uw-comment {
  border-top: 1px solid var(--uw-rule);
  padding-top: 16px;
}
.uw-comment:first-child { border-top: none; padding-top: 0; }
.uw-comment__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.uw-comment__name {
  font-size: 14px;
  color: var(--uw-ink);
}
.uw-comment__time {
  font-size: 12px;
  color: var(--uw-muted);
}
.uw-comment__body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--uw-ink-soft);
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Compact reaction strip on library cards */
.uw-walk-card__react {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--uw-muted);
}
.uw-walk-card__react span + span { margin-left: 4px; }

/* Footer link button — matches the styling of the <a> elements next to it */
.uw-foot__link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.uw-foot__link:hover { color: var(--uw-accent); }

/* Stats modal — same centering treatment as the tip modal */
.uw-modal--stats {
  max-width: 520px !important;
  width: auto !important;
  height: auto !important;
  max-height: calc(100vh - 32px) !important;
  border-radius: 12px !important;
  margin: 0 !important;
}
.uw-modal--stats .uw-modal__head {
  padding: 18px 20px 14px;
}
#uw-stats-modal {
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.uw-stats__loading {
  text-align: center;
  color: var(--uw-muted);
  padding: 32px 8px;
  font-size: 14px;
  margin: 0;
}
.uw-stats__hero {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 12px 0 8px;
  text-align: center;
}
.uw-stats__hero-stat {
  flex: 0 0 auto;
}
.uw-stats__hero-num {
  font-family: var(--uw-serif);
  font-weight: 500;
  font-size: 48px;
  line-height: 1;
  color: var(--uw-ink);
  letter-spacing: -0.02em;
}
.uw-stats__hero-label {
  font-size: 13px;
  color: var(--uw-muted);
  margin-top: 6px;
  letter-spacing: 0.02em;
}
.uw-stats__cities {
  display: flex;
  flex-direction: column;
}
.uw-stats__city {
  border-top: 1px solid var(--uw-rule);
  padding: 12px 0;
}
.uw-stats__city:first-child { border-top: none; padding-top: 4px; }
.uw-stats__city-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  list-style: none;          /* hide default <details> triangle */
  cursor: pointer;
  user-select: none;
}
.uw-stats__city-head::-webkit-details-marker { display: none; }
.uw-stats__city-name { flex: 1 1 auto; }
.uw-stats__city-head::after {
  content: "›";
  color: var(--uw-muted);
  font-size: 18px;
  line-height: 1;
  transition: transform 0.18s ease;
  flex: 0 0 auto;
}
.uw-stats__city[open] > .uw-stats__city-head::after { transform: rotate(90deg); }
.uw-stats__city[open] > .uw-stats__places {
  margin-top: 10px;
}
.uw-stats__city-name {
  font-family: var(--uw-serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--uw-ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.12s, border-color 0.12s;
}
.uw-stats__city-name:hover {
  color: var(--uw-accent);
  border-bottom-color: var(--uw-accent);
}
.uw-stats__city-country {
  font-family: var(--uw-sans);
  font-style: normal;
  font-size: 12px;
  font-weight: 400;
  color: var(--uw-muted);
  letter-spacing: 0;
}
.uw-stats__city-count {
  font-size: 12px;
  color: var(--uw-muted);
  font-variant-numeric: tabular-nums;
}
.uw-stats__places {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.uw-stats__place {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--uw-ink-soft);
}
.uw-stats__place-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.uw-stats__place-count {
  color: var(--uw-muted);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  flex: 0 0 auto;
}

/* Tip-the-maker modal — minimal styling on top of the existing .uw-modal.
   Uses absolute centering instead of flex inheritance from .uw-modal-scrim,
   which the base modal monkey-patched for a bottom-sheet on mobile. */
#uw-tip-modal {
  align-items: center;            /* override flex-end from .uw-modal-scrim */
  justify-content: center;
  padding: 16px;
}
.uw-modal--tip {
  width: auto !important;
  max-width: 480px !important;
  height: auto !important;
  max-height: calc(100vh - 32px) !important;
  border-radius: 12px !important; /* full corners, even on mobile */
  margin: 0 !important;
}
.uw-modal--tip .uw-modal__head {
  padding: 14px 16px 10px;
  border-bottom: none;
}
.uw-modal--tip .uw-modal__title {
  font-size: 18px;
}
.uw-modal__body {
  padding: 8px 12px 12px;
  overflow-y: auto;
  /* Inside a flex column .uw-modal, an unconstrained intrinsic min-height
     stops `overflow-y: auto` from ever engaging — the body just pushes
     its parent past max-height instead of scrolling. min-height: 0 plus
     flex: 1 1 auto lets the modal's outer max-height (calc(100vh - …))
     do the constraining and gives the body the leftover space to scroll. */
  flex: 1 1 auto;
  min-height: 0;
}
/* TipTopJar's inline widget ships with its own outer margins; collapse the
   first child's top margin so it sits snug under the modal header. */
.uw-modal__body > #uw-tip-mount > :first-child,
.uw-modal__body > #uw-tip-mount > :first-child > :first-child {
  margin-top: 0 !important;
}
.uw-tip-btn {
  font-size: 13px;
  padding: 8px 14px;
}

/* Share-this-walk block (used twice on permalink pages) */
.uw-share {
  margin: 16px 0 24px;
  padding: 16px;
  border: 1px solid var(--uw-rule);
  border-radius: var(--uw-radius-sm);
  background: var(--uw-bg-card);
}
.uw-share__h {
  font-size: 13px;
  font-weight: 600;
  color: var(--uw-ink-soft);
  margin: 10px 0 0;
  padding-left: 12px;
}
.uw-share__nudge {
  font-size: 13px;
  color: var(--uw-muted);
  margin: 4px 0 0;
  padding-left: 12px;
  line-height: 1.4;
}
.uw-share__row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.uw-share__main {
  flex: 1 1 auto;
  min-width: 0;
}
.uw-share__pill-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.uw-share__pill {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--uw-mono);
  font-size: 13px;
  color: var(--uw-ink);
  background: #FFFDF8;
  border: 1px solid var(--uw-rule-strong);
  border-radius: var(--uw-radius-sm);
  padding: 10px 12px;
  user-select: all;
  box-sizing: border-box;
}
.uw-share__qr {
  flex: 0 0 auto;
  width: 110px;
  height: 110px;
  padding: 6px;
  background: #FFFDF8;
  border: 1px solid var(--uw-rule-strong);
  border-radius: var(--uw-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.uw-share__qr svg,
.uw-share__qr img {
  display: block;
  width: 100%;
  height: 100%;
}
.uw-share__toast {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--uw-success);
}
.uw-share__toast::before {
  content: "✓ ";
  font-weight: 600;
}
.uw-share__toast[hidden] { display: none; }
.uw-share--inline {
  margin: 16px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}

/* Icon-only button for copy / share actions. Same height as inputs. */
.uw-icon-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--uw-bg-card);
  border: 1px solid var(--uw-rule-strong);
  border-radius: var(--uw-radius-sm);
  color: var(--uw-ink-soft);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.uw-icon-btn:hover {
  background: var(--uw-ink);
  color: var(--uw-cream);
  border-color: var(--uw-ink);
}
.uw-icon-btn:focus-visible {
  outline: 2px solid var(--uw-accent);
  outline-offset: 2px;
}

/* Stack QR below the URL on narrow screens. */
@media (max-width: 540px) {
  .uw-share__row {
    flex-direction: column-reverse;
    gap: 12px;
  }
  .uw-share__qr {
    align-self: center;
    width: 140px;
    height: 140px;
  }
}

/* Interest hashtags below the summary on each walk card */
.uw-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.uw-tag {
  font-size: 12px;
  color: var(--uw-muted);
  letter-spacing: 0.01em;
}

/* Library page — empty state */
.uw-empty {
  text-align: center;
  padding: 48px 24px;
}
.uw-empty__title {
  font-family: var(--uw-serif);
  font-size: 20px;
  margin: 0 0 8px;
}
.uw-empty__sub {
  color: var(--uw-muted);
  margin: 0 0 24px;
  font-size: 14px;
}

/* Saved-state library callout */
.uw-save__see-others {
  color: var(--uw-muted);
  margin-top: 12px;
}
.uw-save__see-others a {
  color: var(--uw-accent);
}

/* Refine panel — collapsed <details> sitting between the chip rows. */
.uw-more {
  border: 1px solid var(--uw-rule);
  border-radius: 8px;
  padding: 0;
  background: rgba(255, 253, 248, 0.4);
}
.uw-more__summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--uw-ink-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.uw-more__summary::-webkit-details-marker { display: none; }
.uw-more__summary::after {
  content: "›";
  color: var(--uw-muted);
  font-size: 18px;
  line-height: 1;
  transition: transform 0.18s ease;
}
.uw-more[open] > .uw-more__summary {
  border-bottom: 1px solid var(--uw-rule);
  color: var(--uw-ink);
}
.uw-more[open] > .uw-more__summary::after { transform: rotate(90deg); }
.uw-more__body {
  padding: 14px 16px 16px;
}
.uw-more__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--uw-muted);
  margin: 0 0 8px;
}

/* Step-by-step directions <details> on the permalink page. */
.uw-directions {
  margin: 16px 0 24px;
  padding: 0;
  border: 1px solid var(--uw-rule);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.4);
}
.uw-directions__summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--uw-ink-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.uw-directions__summary::-webkit-details-marker { display: none; }
.uw-directions__summary::after {
  content: "›";
  color: var(--uw-muted);
  font-size: 18px;
  line-height: 1;
  transition: transform 0.18s ease;
}
.uw-directions[open] > .uw-directions__summary {
  border-bottom: 1px solid var(--uw-rule);
  color: var(--uw-ink);
}
.uw-directions[open] > .uw-directions__summary::after { transform: rotate(90deg); }
.uw-directions__body { padding: 12px 16px 16px; }
.uw-directions__loading,
.uw-directions__error {
  font-size: 13px;
  color: var(--uw-muted);
  margin: 8px 0;
}
.uw-directions__error { color: var(--uw-error); }
.uw-directions__legs {
  list-style: none;
  margin: 0;
  padding: 0;
}
.uw-directions__leg {
  margin: 0 0 18px;
  padding: 0;
}
.uw-directions__leg-head {
  font-size: 14px;
  font-weight: 600;
  color: var(--uw-ink);
  margin: 12px 0 2px;
}
.uw-directions__leg-meta {
  font-size: 12px;
  color: var(--uw-muted);
  margin: 0 0 8px;
}
.uw-directions__steps {
  list-style: decimal;
  padding-left: 20px;
  margin: 0;
}
.uw-directions__step {
  font-size: 13px;
  color: var(--uw-ink-soft);
  padding: 4px 0;
  line-height: 1.45;
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.uw-directions__step-instr { flex: 1 1 auto; }
.uw-directions__step-meta {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--uw-muted);
  font-variant-numeric: tabular-nums;
}

/* Per-stop Street View expander on the permalink. Lazy-mounts an embed
   iframe on first open. */
.uw-streetview {
  margin-top: 10px;
}
.uw-streetview__summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--uw-ink-soft);
  padding: 6px 10px;
  border: 1px solid var(--uw-rule);
  border-radius: var(--uw-radius-sm);
  background: rgba(255, 253, 248, 0.6);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  user-select: none;
}
.uw-streetview__summary::-webkit-details-marker { display: none; }
.uw-streetview__summary:hover {
  color: var(--uw-ink);
  border-color: var(--uw-ink-soft);
  background: #FFFDF8;
}
.uw-streetview__icon { flex: 0 0 auto; }
.uw-streetview__frame {
  margin-top: 10px;
  border: 1px solid var(--uw-rule-strong);
  border-radius: var(--uw-radius-sm);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--uw-bg-card);
}
.uw-streetview__frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* While planning a walk, collapse every form row so the loader (submit
   button + animated mark) is the only thing on screen. The result section
   renders below; renderResult() scrolls it into view AFTER finally{} has
   removed this class — so the page expands while the user's eye is already
   on the result, no perceived push-down. */
#walk-form.is-planning .uw-row { display: none; }
/* Now that the form is hidden, give the brand mark room to breathe. */
#walk-form.is-planning .uw-planning-mark {
  margin: 40px 0 32px;
}
#walk-form.is-planning .uw-planning-mark .uw-loader {
  width: 128px;
  height: 128px;
}

/* Curated walk badge — replaces 'A walk by …' on cards for source_type=curated. */
.uw-walk-card__badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  /* --uw-accent-deep clears WCAG AA on cream for the outlined pill. */
  color: var(--uw-accent-deep);
  border: 1px solid var(--uw-accent-deep);
  border-radius: 999px;
  padding: 1px 8px;
  margin-right: 4px;
  vertical-align: 2px;
}

/* Curated walk badge — top of permalink in place of the 'A walk by …' eyebrow. */
.uw-curated-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  /* Cream on the lighter accents fails AA contrast at this small,
     tracked-out size. --uw-accent-deep gives cream text ~5.1:1. */
  color: #FAF8F4;
  background: var(--uw-accent-deep);
  border-radius: 999px;
  padding: 3px 10px;
  vertical-align: 2px;
}
/* Source attribution line — sits directly under the hashtags. Small and quiet. */
.uw-curated-source {
  font-size: 12px;
  color: var(--uw-muted);
  margin: 8px 0 0;
}
.uw-curated-source a {
  color: var(--uw-muted);
  text-decoration: underline;
  text-decoration-color: var(--uw-rule-strong);
}
.uw-curated-source a:hover {
  color: var(--uw-ink);
  text-decoration-color: var(--uw-ink);
}

/* Bookmark toggle — used on permalink (icon-only) and on the home saved
   card (with a text label via .uw-bookmark--with-label). Filled state
   shows the solid bookmark glyph; unfilled shows just the outline. */
.uw-bookmark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--uw-rule-strong);
  border-radius: var(--uw-radius-pill);
  color: var(--uw-ink-soft);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  padding: 6px 10px;
  height: 36px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.uw-bookmark:hover {
  color: var(--uw-ink);
  border-color: var(--uw-ink-soft);
  background: #FFFDF8;
}
.uw-bookmark.is-on {
  color: var(--uw-accent);
  border-color: var(--uw-accent);
  background: rgba(122, 169, 208, 0.12);
}
/* Outline-only when off, filled-only when on. */
.uw-bookmark .uw-bookmark__fill { display: none; }
.uw-bookmark.is-on .uw-bookmark__fill { display: inline; }
.uw-bookmark.is-on .uw-bookmark__outline { display: none; }
.uw-bookmark__label { display: none; }
.uw-bookmark--with-label .uw-bookmark__label { display: inline; }

/* First-time disclosure tooltip after a successful bookmark. */
.uw-bookmark-disclose {
  position: absolute;
  z-index: 90;
  max-width: 320px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--uw-cream, #FAF8F4);
  background: var(--uw-ink);
  border-radius: 6px;
  padding: 10px 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.uw-bookmark-disclose.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* First-visit tour overlay. The scrim dims everything; the spotlight is a
   transparent rectangle around the targeted element with an outer glow that
   draws the eye. The card floats below or above the target depending on
   available room. */
.uw-tour-scrim {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 24, 34, 0.25);
  pointer-events: auto;
}
.uw-tour-spot {
  position: absolute;
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(15, 24, 34, 0.25),
              0 0 0 3px rgba(122, 169, 208, 0.95);
  pointer-events: none;
  transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease;
}
.uw-tour-card {
  position: fixed;            /* viewport-anchored; survives page scroll */
  z-index: 101;
  width: min(92vw, 420px);
  background: #FFFDF8;
  color: var(--uw-ink);
  border-radius: 10px;
  padding: 18px 18px 12px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.28);
  /* Force sans-serif for body + buttons; the title overrides to serif below. */
  font-family: var(--uw-sans);
  /* When un-anchored (welcome / no-target steps), center on screen. */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.uw-tour-card.is-anchored {
  /* JS sets top + left + transform: translateX(-50%); */
}
.uw-tour-card__title {
  font-family: var(--uw-serif);
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 8px;
  line-height: 1.25;
}
.uw-tour-card__body {
  font-size: 14px;
  line-height: 1.5;
  color: var(--uw-ink-soft);
  margin: 0 0 16px;
}
.uw-tour-card__dots {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.uw-tour-card__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--uw-rule-strong);
}
.uw-tour-card__dot.is-on {
  background: var(--uw-accent);
  width: 18px;
}
.uw-tour-card__row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
.uw-tour-card__row .uw-btn {
  height: 36px;
  font-size: 13px;
  padding: 0 14px;
}
.uw-tour-card__skip {
  margin-right: auto;          /* push skip to the left edge */
  background: transparent;
  border: 0;
  color: var(--uw-muted);
}
.uw-tour-card__back {
  background: transparent;
  border: 1px solid var(--uw-rule-strong);
  color: var(--uw-ink);
}
.uw-tour-card__next {
  background: var(--uw-accent);
  color: var(--uw-accent-ink);
  border: 1px solid var(--uw-accent);
}
.uw-tour-card__next:hover {
  background: transparent;
  color: var(--uw-ink);
}

/* Footer CTA pills — Wear it + Buy me a coffee, side by side. */
.uw-foot__pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.uw-foot__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  font-size: 13px;
  padding: 0 14px;
  border-radius: 999px;
  text-decoration: none;
}
.uw-foot__pill svg { display: block; }

/* Per-card source attribution for curated walks. Sits below the hashtags,
   small + muted so it reads as a credit, not as primary metadata. */
.uw-walk-card__source {
  font-size: 12px;
  color: var(--uw-muted);
  margin: 6px 0 0;
  font-style: italic;
}

/* Curated walk hero image — sits at the top of cards (library) and at
   the top of the permalink page. Wikipedia images via the REST summary
   endpoint, attribution rendered tiny under the photo. */
.uw-walk-card__hero {
  margin: -16px -16px 12px;       /* bleed to card edges */
  position: relative;
  background: var(--uw-bg-card);
  border-top-left-radius: var(--uw-radius-md);
  border-top-right-radius: var(--uw-radius-md);
  overflow: hidden;
}
.uw-walk-card__hero img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
}
/* Card hero attribution lives in the figure's `title` (browser tooltip)
   and the img `alt`. No visible overlay — keeps the photo unobstructed. */

.uw-perma-hero {
  margin: 0 0 16px;
  position: relative;
  border-radius: var(--uw-radius-md);
  overflow: hidden;
  background: var(--uw-bg-card);
}
.uw-perma-hero img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}
/* Tiny info-circle in the corner — hover for tooltip, click to the
   Commons file page where author + license live. Discreet but discoverable. */
.uw-perma-hero__credit {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(15, 24, 34, 0.45);
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.uw-perma-hero__credit:hover,
.uw-perma-hero__credit:focus-visible {
  background: rgba(15, 24, 34, 0.75);
  color: #FFFFFF;
  outline: none;
}
/* Tooltip for the hero credit: anchor above + right (the icon sits in the
   bottom-right of the image, so a below-tooltip would clip off the edge).
   `width: max-content` sizes the box to its natural single-line width;
   without it the absolute-positioned ::after shrinks to the 24 px (i)
   container and wraps every word onto its own line. */
.uw-perma-hero__credit[data-tooltip]::after {
  top: auto;
  bottom: calc(100% + 6px);
  left: auto;
  right: 0;
  transform: translate(0, 4px);
  white-space: nowrap;
  width: max-content;
  max-width: min(280px, calc(100vw - 32px));
  text-align: right;
}
.uw-perma-hero__credit[data-tooltip]:hover::after,
.uw-perma-hero__credit[data-tooltip]:focus-visible::after {
  transform: translate(0, 0);
}
