:root {
  --pink: #ff6b9d;
  --pink-ink: #3a0d1e;
  --pink-soft: #ffe4ee;
  --blue: #1a73e8;
  --ink: #202124;
  --text: #3c4043;
  --muted: #5f6368;
  --faint: #6b7075; /* 5:1 on white */
  --line: #dadce0;
  --hover: #f1f3f4;
  --bg: #ffffff;
  --panel-w: 408px;
  --gap: 12px;
  --shadow-1: 0 1px 2px rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15);
  --shadow-2: 0 2px 4px rgba(60, 64, 67, 0.3), 0 4px 12px 4px rgba(60, 64, 67, 0.15);
  color-scheme: light;
  font: 14px/1.45 Roboto, Arial, 'Helvetica Neue', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #e8eaed; color: var(--text); }
#map, #gmap { position: fixed; inset: 0; }
#gmap { z-index: 1; }
[hidden] { display: none !important; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
svg { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- top bar ---------- */
.topbar { position: fixed; z-index: 6; top: var(--gap); left: var(--gap); right: var(--gap); display: flex; gap: 10px; align-items: flex-start; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.searchbox { position: relative; z-index: 2; display: flex; align-items: center; width: calc(var(--panel-w) - 2 * var(--gap)); height: 48px; background: var(--bg); border-radius: 24px; box-shadow: var(--shadow-1); padding: 0 6px; flex: none; }
.searchbox input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; padding: 0 6px; font-size: 15px; color: var(--ink); }
.searchbox input::-webkit-search-cancel-button { display: none; }
.ib { width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; display: grid; place-items: center; cursor: pointer; color: var(--muted); flex: none; }
.ib:hover { background: var(--hover); }
.ib svg { width: 22px; height: 22px; }
.ib.dir { color: var(--blue); }
.ib.dir .solid { fill: currentColor; stroke: none; }
.ib.dir .cut { stroke: #fff; stroke-width: 1.8; }
.vbar { width: 1px; height: 26px; background: var(--line); margin: 0 2px; }
#results { position: absolute; top: 50px; left: 0; right: 0; margin: 0; padding: 6px 0; list-style: none; background: var(--bg); border-radius: 0 0 16px 16px; box-shadow: var(--shadow-2); max-height: 70vh; overflow: auto; }
#results li { display: flex; gap: 12px; align-items: center; padding: 8px 16px; cursor: pointer; }
#results li[aria-selected='true'], #results li:hover { background: var(--hover); }
#results .ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--hover); }
#results .ic img { width: 16px; height: 16px; }
#results .t { display: block; color: var(--ink); font-weight: 500; }
#results .s { display: block; color: var(--muted); font-size: 12.5px; }
#results .empty { color: var(--muted); cursor: default; }

.chip-rail { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; position: relative; }
.chips-wrap { position: relative; flex: 1; min-width: 0; overflow: hidden; }
.chips { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 6px 4px 8px; min-width: 0; scroll-behavior: smooth; }
.chip-rail.overflow-start:not(.overflow-end) .chips {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 28px);
  mask-image: linear-gradient(to right, transparent, #000 28px);
}
.chip-rail.overflow-end:not(.overflow-start) .chips {
  -webkit-mask-image: linear-gradient(to left, transparent, #000 28px);
  mask-image: linear-gradient(to left, transparent, #000 28px);
}
.chip-rail.overflow-start.overflow-end .chips {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent);
}
.chips::-webkit-scrollbar { display: none; }
.chip-group { display: flex; gap: 8px; flex: none; }
.chip-sep { flex: none; width: 1px; height: 22px; margin: 0 2px; align-self: center; background: var(--line); }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; min-width: 24px; padding: 0 12px 0 10px; border-radius: 16px; border: 0; background: var(--bg); box-shadow: var(--shadow-1); cursor: pointer; white-space: nowrap; font-size: 13.5px; color: var(--ink); flex: none; scroll-snap-align: start; }
.chip img { width: 18px; height: 18px; object-fit: contain; flex: none; }
/* The walking flamingo is taller than wide; keep its shape instead of squeezing it into a square. */
.chip.tour img { width: auto; height: 22px; margin: -2px 0; }
.chip:hover { background: #f8f9fa; }
.chip:focus { outline: 2px solid var(--blue); outline-offset: 2px; box-shadow: var(--shadow-1), 0 0 0 2px var(--blue); z-index: 2; }
.chip[aria-pressed='true'] { background: #e8f0fe; color: #0d47a1; box-shadow: var(--shadow-1), inset 0 0 0 1px #aecbfa; }
.chip.tour { background: var(--bg); color: var(--pink-ink); font-weight: 600; box-shadow: var(--shadow-1), inset 0 0 0 2px var(--pink); }
.chip.tour:hover { background: var(--pink-soft); }
.chip-scroll { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--bg); box-shadow: var(--shadow-1); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.chip-scroll:hover { background: var(--hover); }
.chip-scroll svg { width: 20px; height: 20px; }
.chip-scroll[hidden] { display: none !important; }
.chip-caret { width: 18px; height: 18px; margin: 0 -4px 0 -2px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chip.on { background: #e8f0fe; color: #0d47a1; box-shadow: var(--shadow-1), inset 0 0 0 1px #aecbfa; }
.chip-menu[aria-expanded='true'] .chip-caret { transform: rotate(180deg); }
.chip-short { display: none; }
@media (max-width: 420px) {
  .chip .chip-long { display: none; }
  .chip .chip-short { display: inline; }
  .chips { gap: 6px; }
  .chips .chip { padding: 0 10px; }
  .chips .chip-menu { padding-right: 8px; }
}
.chip-menu-pop { position: absolute; z-index: 12; left: 0; top: 100%; min-width: 232px; max-width: calc(100vw - 2 * var(--gap)); max-height: min(60vh, 400px); overflow: auto; margin: 0; padding: 6px 0; background: var(--bg); border-radius: 12px; box-shadow: var(--shadow-2); }
.chip-menu-pop button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; text-align: left; border: 0; background: none; padding: 8px 16px; font-size: 14px; color: var(--ink); cursor: pointer; }
.chip-menu-pop button:hover, .chip-menu-pop button:focus-visible { background: var(--hover); outline: none; }
.chip-menu-pop button:focus-visible { box-shadow: inset 3px 0 0 var(--blue); }
.chip-menu-pop img, .chip-menu-pop .mi-dot { width: 20px; height: 20px; flex: none; object-fit: contain; }
.chip-menu-pop .mi-dot { border-radius: 50%; background: var(--pink-soft); box-shadow: inset 0 0 0 2px var(--pink); transform: scale(0.6); }
.chip-menu-pop .mi-t { display: flex; flex-direction: column; }
.chip-menu-pop .mi-s { font-size: 12.5px; color: var(--muted); }
.chip-menu-pop [aria-checked='true'] { color: #0d47a1; font-weight: 600; background: #e8f0fe; }
.chip-menu-pop [aria-checked='true']::after { content: ''; margin-left: auto; width: 6px; height: 11px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-2px, -2px); flex: none; }
@media (pointer: fine) {
  .chip-scroll { display: grid; }
}
@media (pointer: coarse) {
  .chip-scroll { display: none !important; }
}
body.has-panel .chip-rail { position: fixed; left: calc(var(--panel-w) + var(--gap)); top: calc(var(--gap) + 6px); right: var(--gap); z-index: 6; }

/* ---------- side panel ---------- */
.panel { position: fixed; z-index: 5; top: 0; left: 0; bottom: 0; width: var(--panel-w); background: var(--bg); box-shadow: 0 0 20px rgba(0, 0, 0, 0.18); display: flex; flex-direction: column; }
.panel-body { flex: 1; overflow: auto; padding-top: 72px; overscroll-behavior: contain; }
.panel-close { position: absolute; z-index: 2; top: 76px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.92); box-shadow: var(--shadow-1); display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.panel-close svg { width: 18px; height: 18px; }

.hero { position: relative; height: 240px; background: #e8eaed center / cover no-repeat; }
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero .credit { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 6px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.78)); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); color: #fff; font-size: 11.5px; }
.hero .credit a { color: #fff; text-decoration: underline; }
.ai-badge { position: absolute; top: 10px; left: 10px; background: rgba(32, 33, 36, 0.85); color: #fff; font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 4px; }
.hero.placeholder { display: grid; place-items: center; color: var(--faint); font-size: 13px; background: linear-gradient(160deg, #fdf1f5, #eef3fb); }
.hero.placeholder .ph { display: grid; justify-items: center; gap: 8px; }
.hero.placeholder img { width: 56px; height: 56px; opacity: 0.85; }
.pbody { padding: 16px 24px 24px; }
.ptitle { margin: 0; font-size: 22px; line-height: 1.25; color: var(--ink); font-weight: 400; }
.psub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.link { color: var(--blue); cursor: pointer; border: 0; background: none; padding: 0; font: inherit; }
.actions { display: flex; gap: 6px; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); margin: 14px -24px 0; }
.act { display: grid; justify-items: center; gap: 4px; width: 66px; border: 0; background: none; cursor: pointer; font-size: 12px; color: var(--blue); text-decoration: none; text-align: center; }
.act .circle { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; }
.act.primary .circle { background: var(--pink); border-color: var(--pink); color: var(--pink-ink); }
.act svg { width: 20px; height: 20px; }
.act:hover { text-decoration: none; }
.act:hover .circle { background: #e8f0fe; }
.act.primary:hover .circle { background: #ff85ae; }
.act[aria-pressed='true'] .circle { background: var(--pink-soft); border-color: var(--pink); color: #b0285a; }
.rows { padding: 8px 0; list-style: none; border-bottom: 1px solid var(--line); margin: 0 -24px; }
.rows li { display: flex; gap: 20px; align-items: flex-start; padding: 10px 24px; color: var(--ink); overflow-wrap: anywhere; }
.rows li svg { width: 20px; height: 20px; color: var(--blue); flex: none; margin-top: 1px; }
.section { padding: 16px 0 4px; border-bottom: 1px solid var(--line); }
.section:last-child { border-bottom: 0; }
.section h3 { margin: 0 0 8px; font-size: 16px; font-weight: 500; color: var(--ink); }
.about { margin: 0; color: var(--text); }
.src { color: var(--faint); font-size: 12px; margin: 6px 0 10px; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 12px; }
.photos figure { margin: 0; position: relative; aspect-ratio: 1; background: #e8eaed; border-radius: 6px; overflow: hidden; cursor: pointer; }
.photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 5px 3px; font-size: 10px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, 0.65)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stat { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.stat b { display: block; font-size: 16px; color: var(--ink); font-weight: 500; }
.stat span { color: var(--muted); font-size: 11.5px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tag { padding: 4px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); font-size: 12.5px; color: var(--text); }
button.tag { cursor: pointer; }
button.tag:hover { background: var(--hover); }
.list { list-style: none; margin: 0 -24px; padding: 0; }
.item { width: 100%; display: flex; gap: 12px; align-items: center; padding: 10px 24px; border: 0; background: none; text-align: left; cursor: pointer; }
.item:hover { background: var(--hover); }
.item .thumb { width: 56px; height: 56px; border-radius: 8px; background: #f1f3f4 center / cover no-repeat; flex: none; display: grid; place-items: center; position: relative; }
.item .thumb img.glyph { width: 24px; height: 24px; object-fit: contain; }
.item .thumb .ai { position: absolute; left: 2px; bottom: 2px; background: rgba(32, 33, 36, 0.8); color: #fff; font-size: 9px; padding: 0 3px; border-radius: 2px; }
.item .t { display: block; color: var(--ink); font-weight: 500; }
.item .s { display: block; color: var(--muted); font-size: 12.5px; }
.item .d { display: block; color: var(--faint); font-size: 12px; margin-top: 2px; }
.item .meta { margin-left: auto; color: var(--faint); font-size: 12px; flex: none; }
.item.small { padding: 7px 24px; }
.item.small .thumb { width: 36px; height: 36px; }
.item.current { background: var(--pink-soft); }
.count { color: var(--muted); font-size: 13px; margin: 0 0 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font-weight: 500; color: var(--blue); white-space: nowrap; text-decoration: none; }
.btn:hover { background: #f8f9fa; text-decoration: none; }
.btn.primary { background: var(--pink); border-color: var(--pink); color: var(--pink-ink); }
.btn.primary:hover { background: #ff85ae; }
.btn.wide { width: 100%; }
.field { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; outline: none; background: var(--bg); }
.field:focus { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.select { height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; background: var(--bg); }
.select.mini { height: 32px; }
.check { display: flex; gap: 8px; align-items: center; cursor: pointer; color: var(--text); }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }
.muted { color: var(--muted); }
.fine { color: var(--faint); font-size: 12px; }

/* explore header */
.xhero { position: relative; height: 170px; background: url('../img/brand/inner-harbor-hero.jpg') center 60% / cover; }
.xhero .over { position: absolute; inset: auto 0 0 0; padding: 30px 24px 14px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.62)); color: #fff; }
.xhero h2 { margin: 0; font-size: 22px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.xhero h2 img { width: 30px; height: 30px; }
.xhero p { margin: 2px 0 0; font-size: 13px; opacity: 0.92; }
.xhero .ai-badge { top: auto; bottom: 64px; left: auto; right: 10px; font-size: 10.5px; padding: 2px 6px; }
.passport { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.passport .ring { width: 44px; height: 44px; flex: none; }
.passport .ring svg { width: 44px; height: 44px; transform: rotate(-90deg); }
.passport .track { stroke: #e8eaed; stroke-width: 4; }
.passport .fill { stroke: var(--pink); stroke-width: 4; stroke-dasharray: 94.25; }
.passport b { color: var(--ink); }
.passport .btn { margin-left: auto; }

/* directions */
.dir-head { padding: 0 24px 12px; border-bottom: 1px solid var(--line); }
.dir-head h2 { margin: 0 0 8px; font-size: 18px; font-weight: 500; color: var(--ink); }
.modes { display: flex; gap: 8px; margin: 4px 0 12px; }
.mode { flex: 1; height: 36px; border-radius: 18px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font-weight: 500; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; justify-content: center; }
.mode svg { width: 18px; height: 18px; }
.mode[aria-pressed='true'] { background: #e8f0fe; border-color: #aecbfa; color: #174ea6; }
.ends { display: grid; grid-template-columns: 18px 1fr 36px; gap: 6px 10px; align-items: center; }
.ends .dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--muted); justify-self: center; }
.ends .dot.end { border-color: #d93025; background: #d93025; }
.ends .swap { grid-row: 1 / span 2; grid-column: 3; }
.ac-wrap { position: relative; }
.ac { position: absolute; z-index: 3; top: 42px; left: 0; right: 0; margin: 0; padding: 4px 0; list-style: none; background: var(--bg); border-radius: 8px; box-shadow: var(--shadow-2); max-height: 260px; overflow: auto; }
.ac li { padding: 7px 12px; cursor: pointer; }
.ac li:hover, .ac li[aria-selected='true'] { background: var(--hover); }
.ac .s { color: var(--muted); font-size: 12px; display: block; }
.opts { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; align-items: center; }
.suggest { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.summary { padding: 14px 24px; border-bottom: 1px solid var(--line); }
.summary .big { font-size: 20px; color: var(--ink); }
.summary .big b { color: #188038; font-weight: 500; }
.summary .btns { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: 14px; padding: 10px 24px; border-bottom: 1px solid #f1f3f4; color: var(--ink); }
.steps li .arrow { width: 22px; height: 22px; color: var(--muted); flex: none; display: grid; place-items: center; }
.steps li .arrow svg { width: 22px; height: 22px; }
.steps li .dist { color: var(--faint); font-size: 12px; display: block; }
.steps li.current { background: var(--pink-soft); }
.subhead { margin: 16px 24px 4px; font-size: 13px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- layers ---------- */
.layers { position: fixed; z-index: 4; left: var(--gap); bottom: 26px; }
body.has-panel .layers { left: calc(var(--panel-w) + var(--gap)); }
.layer-thumb { width: 76px; height: 76px; border-radius: 10px; border: 2px solid #fff; padding: 0; box-shadow: var(--shadow-1); cursor: pointer; position: relative; overflow: hidden; background: #ccc; }
.thumb { position: absolute; inset: 0; background: url('../img/brand/inner-harbor-thumb.jpg') center / cover; }
.thumb.default { background: linear-gradient(135deg, #f6f5f2 0 40%, #a4cff7 40% 55%, #cdebcd 55% 70%, #f6f5f2 70%); }
.thumb-label { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 4px 4px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.65)); color: #fff; font-size: 11.5px; font-weight: 500; }
.layer-pop { position: absolute; left: 0; bottom: 86px; width: 320px; background: var(--bg); border-radius: 12px; box-shadow: var(--shadow-2); padding: 12px 14px 14px; max-height: 70vh; overflow: auto; }
.pop-title { display: block; margin: 8px 0 6px; font-size: 12px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.maptypes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.maptypes button { border: 0; background: none; cursor: pointer; display: grid; gap: 4px; justify-items: center; font-size: 12px; color: var(--text); padding: 0; }
.maptypes .mt { width: 64px; height: 48px; border-radius: 8px; border: 2px solid transparent; }
.maptypes button[aria-pressed='true'] .mt { border-color: var(--blue); }
.maptypes button[aria-pressed='true'] { color: var(--blue); font-weight: 500; }
.mt-default { background: linear-gradient(135deg, #f6f5f2 0 40%, #a4cff7 40% 55%, #cdebcd 55% 70%, #f6f5f2 70%); }
.mt-satellite { background: url('../img/brand/inner-harbor-thumb.jpg') center / cover; }
.mt-google { background: linear-gradient(135deg, #e8eaed 0 45%, #aadaff 45% 60%, #c8e6c9 60%); }
.details { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.details label { display: flex; gap: 6px; align-items: center; font-size: 13px; cursor: pointer; }
.details input { accent-color: var(--blue); }
.legend { font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend .bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin-bottom: 3px; }
.legend .bar span { flex: 1; }
.legend .ticks { display: flex; justify-content: space-between; }

/* ---------- map controls ---------- */
.ctrls { position: fixed; z-index: 4; right: var(--gap); bottom: 140px; display: grid; gap: 8px; }
.fab { width: 40px; height: 40px; border-radius: 8px; border: 0; background: var(--bg); box-shadow: var(--shadow-1); display: grid; place-items: center; cursor: pointer; color: var(--muted); font-weight: 700; font-size: 13px; }
.fab svg { width: 20px; height: 20px; }
.fab .solid { fill: currentColor; stroke: none; }
.fab:hover { color: var(--ink); }
.fab[aria-pressed='true'] { color: var(--blue); }
.brandpill { position: fixed; z-index: 3; left: 50%; bottom: 8px; transform: translateX(-50%); display: inline-flex; gap: 6px; align-items: center; background: rgba(255, 255, 255, 0.92); color: var(--ink); font-size: 12px; font-weight: 500; padding: 3px 10px 3px 6px; border-radius: 12px; box-shadow: var(--shadow-1); }
.brandpill:hover { text-decoration: none; }
body.has-panel .brandpill { left: calc(var(--panel-w) + (100vw - var(--panel-w)) / 2); }
.maplibregl-ctrl-bottom-right { bottom: 8px; }
.maplibregl-ctrl-group { border-radius: 8px !important; box-shadow: var(--shadow-1) !important; }
.maplibregl-ctrl-attrib { font-size: 11px; }
.maplibregl-popup-content { border-radius: 8px; padding: 6px 10px; box-shadow: var(--shadow-1); font-size: 13px; }
.maplibregl-popup-content b { display: block; color: var(--ink); font-weight: 500; }
.maplibregl-popup-content span { color: var(--muted); font-size: 12px; }

/* ---------- tour HUD ---------- */
.streetview { position: fixed; z-index: 5; top: 72px; right: var(--gap); width: min(480px, 40vw); aspect-ratio: 4 / 3; background: #202124; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-2); }
.streetview.big { width: min(900px, 62vw); }
.sv-media { position: absolute; inset: 0; }
.sv-media img { width: 100%; height: 100%; object-fit: cover; display: block; animation: fadein 0.35s ease; }
.sv-media .none { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: #bdc1c6; padding: 20px; font-size: 13px; gap: 6px; }
.sv-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 8px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.7)); color: #fff; font-size: 11.5px; }
.sv-cap a { color: #fff; text-decoration: underline; }
.sv-size { position: absolute; z-index: 2; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 6px; border: 0; background: rgba(32, 33, 36, 0.7); color: #fff; cursor: pointer; display: grid; place-items: center; }
.sv-size svg { width: 16px; height: 16px; }
@keyframes fadein { from { opacity: 0.2; } to { opacity: 1; } }
.tourbar { position: fixed; z-index: 6; left: 50%; bottom: 34px; transform: translateX(-50%); width: min(620px, calc(100vw - 2 * var(--gap))); background: var(--bg); border-radius: 14px; box-shadow: var(--shadow-2); padding: 10px 14px 12px; }
body.has-panel .tourbar { left: calc(var(--panel-w) + (100vw - var(--panel-w)) / 2); width: min(620px, calc(100vw - var(--panel-w) - 2 * var(--gap))); }
.tb-step { display: flex; gap: 12px; align-items: center; }
.tb-arrow { width: 44px; height: 44px; border-radius: 10px; background: #188038; color: #fff; display: grid; place-items: center; flex: none; }
.tb-arrow svg { width: 26px; height: 26px; }
.tb-text { flex: 1; min-width: 0; }
.tb-main { margin: 0; font-size: 17px; color: var(--ink); font-weight: 500; }
.tb-sub { margin: 0; color: var(--muted); font-size: 13px; }
#tbSeek { width: 100%; margin: 8px 0; accent-color: var(--pink); }
.tb-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tb-dist { margin-left: auto; color: var(--faint); font-size: 12.5px; }
.check.small { font-size: 12.5px; gap: 5px; }
.check.small input { width: 15px; height: 15px; }
.tb-caption { margin: 8px 0 0; padding: 8px 10px; background: #f8f9fa; border-left: 3px solid var(--pink); border-radius: 6px; font-size: 13.5px; color: var(--ink); max-height: 6.2em; overflow: auto; }
.tb-caption b { color: #b0285a; font-weight: 600; }
.callout { position: fixed; z-index: 6; left: 50%; bottom: 262px; transform: translateX(-50%); width: min(520px, calc(100vw - 2 * var(--gap))); display: flex; gap: 12px; background: var(--bg); border-radius: 14px; box-shadow: var(--shadow-2); padding: 10px; animation: rise 0.35s ease; }
body.has-panel .callout { left: calc(var(--panel-w) + (100vw - var(--panel-w)) / 2); }
.callout .cimg { width: 112px; height: 112px; border-radius: 10px; background: #f1f3f4 center / cover no-repeat; flex: none; position: relative; display: grid; place-items: center; }
.callout .cimg .ai-badge { top: auto; left: 4px; bottom: 4px; font-size: 10px; padding: 1px 5px; }
.callout .side { color: #188038; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin: 0; }
.callout h4 { margin: 2px 0 4px; font-size: 16px; color: var(--ink); font-weight: 500; }
.callout p { margin: 0; font-size: 13px; color: var(--text); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.callout .more { margin-top: 6px; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.walker { width: 46px; height: 46px; background: url('../img/brand/flamingo-walker-128.png') center / contain no-repeat; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35)); }
.walker.car { width: 20px; height: 20px; border-radius: 50%; background: var(--blue); border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(26, 115, 232, 0.25); filter: none; }
.walkpad { position: fixed; z-index: 6; left: 50%; bottom: 34px; transform: translateX(-50%); background: var(--bg); border-radius: 14px; box-shadow: var(--shadow-2); padding: 12px 14px; width: min(560px, calc(100vw - 2 * var(--gap))); }
.walkpad p { margin: 0 0 8px; color: var(--muted); }
.walkpad b { color: var(--ink); }
.pad { display: none; grid-template-columns: repeat(4, 48px); gap: 6px; margin-bottom: 10px; }
.pad button { height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); touch-action: none; }
@media (pointer: coarse) { .pad { display: grid; } }

.toast { position: fixed; z-index: 9; left: 50%; bottom: 120px; transform: translateX(-50%); background: #323232; color: #fff; padding: 12px 18px; border-radius: 6px; box-shadow: var(--shadow-2); max-width: min(92vw, 520px); font-size: 14px; }
.loading { position: fixed; z-index: 10; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; background: #fff; color: var(--muted); font-weight: 500; transition: opacity 0.4s; }
.loading img { animation: bob 1.4s ease-in-out infinite; }
.loading .wordmark { width: min(300px, 76vw); height: auto; }
.loading.done { opacity: 0; pointer-events: none; }
@keyframes bob { 50% { transform: translateY(-6px); } }

/* ---------- time machine ---------- */
.compare { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.cmp-map, .cmp-map * { position: absolute; inset: 0; pointer-events: none !important; }
.cmp-handle { position: absolute; top: 0; bottom: 0; width: 4px; margin-left: -2px; background: #fff; box-shadow: 0 0 6px rgba(0, 0, 0, 0.45); pointer-events: auto; cursor: ew-resize; touch-action: none; }
.cmp-handle .knob { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-2); display: grid; place-items: center; color: var(--blue); font-size: 22px; font-weight: 700; }
.cmp-handle:focus-visible .knob { outline: 2px solid var(--blue); }
.cmp-tag { position: absolute; top: 78px; background: rgba(32, 33, 36, 0.85); color: #fff; padding: 4px 10px; border-radius: 4px; font-size: 12.5px; font-weight: 600; }
.cmp-left { left: 16px; }
body.has-panel .cmp-left { left: calc(var(--panel-w) + 16px); }
.cmp-right { right: 66px; }
.cmpbar { position: fixed; z-index: 6; left: 50%; bottom: 34px; transform: translateX(-50%); width: min(640px, calc(100vw - 2 * var(--gap))); background: var(--bg); border-radius: 14px; box-shadow: var(--shadow-2); padding: 10px 14px 12px; }
body.has-panel .cmpbar { left: calc(var(--panel-w) + (100vw - var(--panel-w)) / 2); width: min(640px, calc(100vw - var(--panel-w) - 2 * var(--gap))); }
.cmp-head { display: flex; align-items: center; gap: 10px; }
.cmp-head b { color: var(--ink); font-size: 15px; }
.cmp-head .ib { margin-left: auto; width: 32px; height: 32px; }
.cmp-eras { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 4px; }
.cmp-eras button { height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font-size: 13px; color: var(--text); }
.cmp-eras button[aria-checked='true'] { background: var(--pink); border-color: var(--pink); color: var(--pink-ink); font-weight: 600; }
.cmpbar .fine { margin: 4px 0 0; }

/* ---------- flyover ---------- */
.flycard { position: fixed; z-index: 6; left: 50%; bottom: 34px; transform: translateX(-50%); width: min(600px, calc(100vw - 2 * var(--gap))); display: flex; gap: 14px; background: var(--bg); border-radius: 16px; box-shadow: var(--shadow-2); padding: 12px; animation: rise 0.4s ease; }
.fc-img { width: 150px; height: 120px; border-radius: 10px; background: #f1f3f4 center / cover no-repeat; flex: none; position: relative; }
.fc-img .ai-badge { top: auto; bottom: 4px; left: 4px; font-size: 10px; padding: 1px 5px; }
.fc-body { min-width: 0; flex: 1; }
.fc-count { margin: 0; color: #b0285a; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.flycard h4 { margin: 2px 0 4px; font-size: 19px; color: var(--ink); font-weight: 500; }
.flycard p { margin: 0; color: var(--text); font-size: 13.5px; }
.fc-ctrl { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.fc-ctrl .btn { height: 32px; padding: 0 12px; }

/* ---------- context menu, reach, profile ---------- */
.ctxmenu { position: fixed; z-index: 8; margin: 0; padding: 6px 0; list-style: none; background: var(--bg); border-radius: 8px; box-shadow: var(--shadow-2); min-width: 220px; }
.ctxmenu li button { width: 100%; text-align: left; border: 0; background: none; padding: 8px 14px; cursor: pointer; color: var(--ink); font-size: 13.5px; }
.ctxmenu li button:hover, .ctxmenu li button:focus-visible { background: var(--hover); }
.ctxmenu .coord { padding: 4px 14px 6px; color: var(--faint); font-size: 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.wow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.wow .btn { height: 32px; padding: 0 8px; font-size: 12.5px; }
.bands { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 12px; }
.band { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text); }
.band i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.item .mins { margin-left: auto; flex: none; font-size: 12px; font-weight: 600; color: #b0285a; background: var(--pink-soft); padding: 2px 8px; border-radius: 10px; }
.profile { display: block; width: 100%; height: 64px; margin: 8px 0 2px; }
.climb { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text); margin-top: 8px; }
.climb b { color: var(--ink); font-weight: 500; }

/* ---------- Lost Baltimore ---------- */
.lost-kicker { margin: 0 0 4px; color: #6d4c41; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; display: flex; gap: 6px; align-items: center; }
.lost-hero img { filter: sepia(0.15); }
.then-badge { background: rgba(93, 64, 55, 0.92) !important; }
.tn { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #e8eaed; margin-bottom: 8px; --x: 50%; }
.tn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tn .tn-then { clip-path: inset(0 calc(100% - var(--x)) 0 0); filter: sepia(0.2) contrast(1.05); }
.tn.fade .tn-then { clip-path: none; opacity: var(--o, 0.5); }
.tn .tn-divider { position: absolute; top: 0; bottom: 0; left: var(--x); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 6px rgba(0, 0, 0, 0.5); pointer-events: none; }
.tn.fade .tn-divider { display: none; }
.tn-label { position: absolute; top: 8px; background: rgba(32, 33, 36, 0.82); color: #fff; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 4px; }
.tn-l { left: 8px; background: rgba(93, 64, 55, 0.92); }
.tn-r { right: 8px; }
.tn-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.tn.single { margin: 0 0 8px; }
.tn-modes { display: flex; gap: 6px; }
.tn-modes .btn { height: 30px; padding: 0 12px; font-size: 12.5px; }
.tn-modes .btn[aria-pressed='true'] { background: #e8f0fe; border-color: #aecbfa; color: #174ea6; }

/* ---------- phones: panel becomes a bottom sheet ---------- */
@media (max-width: 760px) {
  :root { --gap: 8px; --panel-w: 100vw; }
  .searchbox { width: 100%; }
  .topbar { flex-direction: column; gap: 4px; }
  .chip-rail { width: 100%; }
  /* Relative, not static: the rail anchors its menu popover. */
  body.has-panel .chip-rail { position: relative; left: auto; top: auto; right: auto; }
  .panel { top: auto; height: var(--sheet); border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); transition: height 0.25s ease; }
  .sheet-handle { display: grid; }
  /* The handle and close button get their own band, so content never scrolls under them. */
  .panel-body { margin-top: 48px; padding-top: 0; }
  .panel-close { top: 6px; right: 10px; box-shadow: none; background: #f1f3f4; }
  body.has-panel .layers { left: var(--gap); bottom: calc(var(--sheet) + 10px); }
  .layer-thumb { width: 60px; height: 60px; }
  .ctrls { bottom: 120px; }
  body.has-panel .ctrls { bottom: calc(var(--sheet) + 10px); }
  .hero { height: 190px; }
  .streetview { top: 112px; left: var(--gap); right: var(--gap); width: auto; aspect-ratio: 16 / 8; }
  .streetview.big { aspect-ratio: 4 / 3; }
  .streetview.big { width: auto; }
  body.has-panel .tourbar, body.has-panel .callout, body.has-panel .brandpill { left: 50%; width: calc(100vw - 2 * var(--gap)); }
  .callout { bottom: 318px; padding: 8px; }
  .callout p { -webkit-line-clamp: 2; }
  .tb-caption { max-height: 4.6em; font-size: 13px; }
  .tourbar { padding: 8px 12px 10px; }
  .tb-main { font-size: 16px; }
  .callout .cimg { width: 84px; height: 84px; }
  .brandpill { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cmpbar, .flycard { bottom: 12px; }
  body.has-panel .cmpbar { left: 50%; width: calc(100vw - 2 * var(--gap)); }
  .fc-img { width: 96px; height: 96px; }
  .cmp-tag { top: 112px; }
}

/* ---------- photos on the map (zoomed in) ---------- */
.pframe { position: relative; width: 66px; height: 50px; padding: 0; border: 3px solid #fff; border-radius: 6px; background: #dadce0; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); cursor: pointer; transition: transform 0.15s ease; transform-origin: 50% 100%; }
.pframe img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.pframe::after { content: ''; position: absolute; left: 50%; bottom: -9px; margin-left: -6px; border: 6px solid transparent; border-top-color: #fff; border-bottom: 0; }
.pframe.street { border-color: #e8f0fe; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35), inset 0 -3px 0 var(--blue); }
.pframe:hover, .pframe:focus-visible { transform: scale(1.7); z-index: 2; }

/* ---------- v0.5: phone sheet, loading, clutter and layout fixes ---------- */
body { --sheet: 50vh; }
body[data-sheet='peek'] { --sheet: 30vh; }
body[data-sheet='full'] { --sheet: calc(100dvh - 72px); }
.sheet-handle { display: none; position: absolute; z-index: 3; top: 0; left: 50%; transform: translateX(-50%); width: 96px; height: 24px; border: 0; background: none; padding: 0; place-items: center; cursor: grab; touch-action: none; }
.sheet-handle span { width: 40px; height: 5px; border-radius: 3px; background: #c4c7c5; }
@media (max-width: 760px) { .sheet-handle { display: grid; } }
.addr { display: block; }
.addr-note { display: block; font-size: 12px; color: #188038; margin-top: 2px; }
.addr-note.warn { color: #b06000; }
.rows li .copy { margin-left: auto; flex: none; width: 36px; height: 36px; margin-top: -6px; color: var(--muted); }
.rows li .copy svg { color: var(--muted); }
/* Directions: the suggest label sits on its own line, chips stay in one row. */
.suggest .fine { flex-basis: 100%; }
.dir-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dir-actions .gm { font-size: 13px; }
/* Tour callout without a photo shows the category icon instead of an empty box. */
.callout .cimg .glyph { width: 44px; height: 44px; opacity: 0.85; }
@media (pointer: coarse) {
  .maplibregl-ctrl-zoom-in, .maplibregl-ctrl-zoom-out { display: none !important; }
  .ib, .sheet-handle { min-width: 44px; min-height: 44px; }
  .chip { min-height: 36px; padding: 0 14px; }
}
@media (max-width: 760px) {
  .maplibregl-ctrl-scale { display: none; }
  .hero { height: 170px; }
  .streetview { aspect-ratio: auto; height: 150px; }
  .streetview.big { height: 46vh; }
  .sv-cap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-top: 16px; }
  .callout { bottom: 228px; }
  .tb-row { gap: 6px; }
  .tb-row .tb-dist { display: none; }
  #tbNarrator { flex: 1 1 140px; min-width: 0; }
  #tbHoldWrap { white-space: nowrap; }
  .tb-caption { max-height: 3.2em; }
  .layer-pop { max-height: calc(100dvh - 200px); }
  body.has-panel[data-sheet='full'] .chip-rail { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
.toast-act { margin-left: 12px; border: 0; background: none; color: #8ab4f8; font-weight: 600; cursor: pointer; padding: 4px 6px; }
/* Opening hours, loading skeleton, explore list (audit items) */
.status { margin: 2px 0 0; font-size: 14px; }
.is-open { color: #188038; }
.is-closed { color: #c5221f; }
details.hours summary { cursor: pointer; list-style: none; }
details.hours summary::-webkit-details-marker { display: none; }
details.hours summary::after { content: ' ▾'; color: var(--muted); }
details.hours[open] summary::after { content: ' ▴'; }
details.hours table { margin-top: 6px; border-collapse: collapse; font-size: 13.5px; }
details.hours th { text-align: left; font-weight: 400; color: var(--muted); padding: 2px 18px 2px 0; }
details.hours td { padding: 2px 0; }
details.hours tr.today th, details.hours tr.today td { font-weight: 600; color: var(--ink); }
.skel { display: grid; gap: 8px; margin: 14px 0; }
.skel span { height: 12px; border-radius: 6px; background: linear-gradient(90deg, #eef0f2 0, #f8f9fa 40%, #eef0f2 80%) 0 0 / 200% 100%; animation: shimmer 1.2s linear infinite; }
.skel span:nth-child(2) { width: 85%; }
.skel span:nth-child(3) { width: 60%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.wowlist .item .s { white-space: normal; }
@media (max-width: 760px) {
  .opts .btn.primary { flex: 1 1 100%; }
  .ib.swap { width: 44px; height: 44px; }
  .layer-thumb { width: 54px; height: 54px; }
  .thumb-label { font-size: 10.5px; padding-top: 10px; }
}

/* ---------- v0.6: map-first tour on phones (docs/PLAN-v0.6.md, lane A) ---------- */
.tb-phone { display: none; }
@media (max-width: 760px) {
  /* While touring, the search bar, chips and map buttons step aside; the tour bar has Stops, More and End. */
  body.touring .topbar, body.touring .chip-rail, body.touring .layers, body.touring .ctrls, body.touring .brandpill { display: none !important; }
  body.touring .tourbar { bottom: calc(10px + env(safe-area-inset-bottom, 0px)); padding: 8px 10px; }
  body.touring .tb-step { gap: 10px; }
  body.touring .tb-arrow { width: 38px; height: 38px; border-radius: 9px; }
  body.touring .tb-arrow svg { width: 22px; height: 22px; }
  body.touring .tb-main { font-size: 15.5px; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  body.touring #tbSeek { margin: 4px 0 6px; }
  body.touring .tb-phone { display: inline-flex; min-height: 40px; align-items: center; }
  body.touring .tb-row .btn { min-height: 40px; }
  body.touring .tourbar:not(.expanded) #tbSpeed,
  body.touring .tourbar:not(.expanded) #tbCam,
  body.touring .tourbar:not(.expanded) #tbNarrator,
  body.touring .tourbar:not(.expanded) #tbHoldWrap { display: none; }
  body.touring .tourbar.expanded #tbMoreBtn { background: var(--pink-soft, #ffe3ee); }
  body.touring .tb-caption { margin-top: 6px; padding: 5px 8px; font-size: 12.5px; max-height: none; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  /* The street photo is a short strip at the top, shown only when there is a real street photo. */
  body.touring .streetview { top: calc(8px + env(safe-area-inset-top, 0px)); height: 132px; aspect-ratio: auto; }
  body.touring .streetview.big { height: 42vh; }
  body.touring .sv-cap { padding: 14px 10px 6px; font-size: 10.5px; }
  body.touring .sv-size { width: 40px; height: 40px; top: 4px; right: 4px; }
  /* The stop card is compact, sits just above the tour bar, and leaves after 5 s. */
  body.touring .callout { bottom: calc(var(--dock, 150px) + 6px + env(safe-area-inset-bottom, 0px)); padding: 6px; gap: 10px; align-items: center; }
  body.touring .callout .cimg { width: 56px; height: 56px; border-radius: 8px; }
  body.touring .callout h4 { font-size: 15px; margin: 0 0 2px; }
  body.touring .callout p:not(.side) { -webkit-line-clamp: 1; font-size: 12.5px; }
  body.touring .callout .more { margin-top: 2px; min-height: 32px; }
}

/* iPhone Safari zooms the whole page when a text box or menu with text under 16px gets focus, and
   the zoom stays after focus leaves, shifting every panel. Touch screens and phone widths get 16px form text. */
@media (pointer: coarse), (max-width: 760px) {
  input, select, textarea, .searchbox input, .field, .select, .select.mini { font-size: 16px; }
}

/* ---------- v0.8: where to learn more, and the Lost Baltimore filter ---------- */
.rows.res li { align-items: flex-start; }
.rows.res a { display: flex; flex-direction: column; min-width: 0; color: var(--ink); text-decoration: none; }
.rows.res a .t { color: var(--blue-ink, #1a5fc8); font-weight: 500; }
.rows.res a:hover .t, .rows.res a:focus-visible .t { text-decoration: underline; }
.rows.res a .s { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.callout .more-row { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; }
.lost-hint { margin-top: 12px; }
