@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: normal; font-display: swap;
  src: url(/vendor/fonts/cormorant-garamond-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-style: normal; font-display: swap;
  src: url(/vendor/fonts/cormorant-garamond-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 700; font-style: normal; font-display: swap;
  src: url(/vendor/fonts/cormorant-garamond-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: italic; font-display: swap;
  src: url(/vendor/fonts/cormorant-garamond-latin-500-italic.woff2) format("woff2"); }

/* Night & gold: near-black chrome, warm gold accents, a high-contrast serif for display type. */
:root {
  --bg: #16130f;          /* panels, bars */
  --surface: #211c16;     /* inputs, cards, secondary buttons */
  --raise: #2a241c;       /* hover */
  --text: #efe7d8;
  --muted: #a29785;
  --line: #3b3328;
  --gold: #c9a35a;
  --gold-2: #e8cd8f;
  --accent: linear-gradient(180deg, #e3c27c, #b88a3e);
  --on-accent: #17130d;
  --ink: #0f0d0a;
  --historic: #c9a35a;
  --dark: #a8423a;
  --weird: #8f72c4;
  --lost: #6f8fa8;
  --lived: #6fa37d;
  --community: #5aa59a;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --caps: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; }

#map { position: absolute; inset: 0; z-index: 0; }

/* top bar */
.topbar {
  position: absolute; z-index: 1000; top: max(10px, env(safe-area-inset-top)); left: 10px; right: 10px;
  display: flex; gap: 8px; align-items: center;
  background: var(--bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px 8px;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text);
  font-family: var(--display); font-weight: 700; white-space: nowrap; padding-right: 4px; }
.search { position: relative; flex: 1; min-width: 0; }
.search input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 9px 12px; font-size: 15px; }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 4px; list-style: none;
  background: var(--surface); border-radius: 10px; box-shadow: var(--shadow); max-height: 50vh; overflow: auto; }
.search-results li { padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.search-results li:hover, .search-results li:focus { background: var(--bg); outline: none; }
.icon-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; width: 40px; height: 40px; font-size: 20px; }

/* filters */
.filters { position: absolute; z-index: 999; top: calc(max(10px, env(safe-area-inset-top)) + 64px); left: 10px; right: 10px;
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; box-shadow: 0 2px 8px rgba(0,0,0,.08); opacity: .55; }
.chip.on { opacity: 1; border-color: var(--text); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.historic { background: var(--historic); } .dot.dark { background: var(--dark); } .dot.weird { background: var(--weird); }
.dot.lost { background: var(--lost); } .dot.lived { background: var(--lived); } .dot.community { background: var(--community); }

/* markers */
.pin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--bg); box-shadow: 0 0 0 1px rgba(201,163,90,.55), 0 1px 4px rgba(0,0,0,.5); }
.pin.historic { background: var(--historic); } .pin.dark { background: var(--dark); } .pin.weird { background: var(--weird); }
.pin.lost { background: var(--lost); } .pin.lived { background: var(--lived); } .pin.community { background: var(--community); }
.pin.has-people { outline: 3px solid var(--lived); outline-offset: 1px; }
.cluster { background: rgba(20,17,13,.88); color: var(--gold-2); border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 13px; border: 1.5px solid var(--gold); box-shadow: 0 1px 6px rgba(0,0,0,.4); }

/* status, fab, hint */
.status { position: absolute; z-index: 1000; left: 50%; transform: translateX(-50%); top: calc(max(10px, env(safe-area-inset-top)) + 110px);
  background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 7px 14px; font-size: 13px; box-shadow: var(--shadow); white-space: nowrap; }
.fab { position: absolute; z-index: 1000; right: 16px; bottom: calc(var(--attr-h, 16px) + 12px); border: 0; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); padding: 13px 20px; font-weight: 600; box-shadow: var(--shadow); }
.add-hint { position: absolute; z-index: 1001; left: 50%; bottom: calc(var(--attr-h, 16px) + 12px); transform: translateX(-50%);
  background: var(--accent); color: var(--on-accent); border-radius: var(--radius); padding: 12px 16px; box-shadow: var(--shadow); text-align: center; width: max-content; max-width: 90vw; }
.link { background: none; border: 0; color: inherit; text-decoration: underline; padding: 0 4px; }
.adding #map { cursor: crosshair; }
.adding .fab { display: none; }

/* panel: right side on desktop, bottom sheet on phones */
.panel { position: absolute; z-index: 1002; top: 120px; right: 10px; bottom: 10px; width: min(420px, calc(100vw - 20px));
  background: var(--bg); border-radius: var(--radius); box-shadow: var(--shadow); overflow-y: auto; padding: 20px 20px 28px; }
@media (max-width: 640px) {
  .panel { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 72vh; border-radius: 18px 18px 0 0;
    padding-bottom: max(28px, env(safe-area-inset-bottom)); }
  .brand span { display: none; }
}
.panel-close { position: sticky; top: 0; float: right; border: 0; background: var(--surface); border-radius: 50%; width: 32px; height: 32px; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.panel h2 { margin: 4px 40px 6px 0; font-size: 24px; line-height: 1.2; }
.panel .years { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.panel img.hero { width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; margin: 6px 0 10px; background: var(--line); }
.panel p { line-height: 1.55; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.tag { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; color: #fff; }
.tag.historic { background: var(--historic); } .tag.dark { background: var(--dark); } .tag.weird { background: var(--weird); }
.tag.lost { background: var(--lost); } .tag.community { background: var(--community); }
.source { font-size: 12.5px; color: var(--muted); border-left: 3px solid var(--line); padding: 4px 10px; margin: 10px 0; }
.source.verified { border-color: var(--historic); }
.source.unverified { border-color: var(--community); }
.source a { color: inherit; }
.content-note { background: #fdf2f2; border: 1px solid #f5c2c2; color: var(--dark); border-radius: 10px; padding: 8px 12px; font-size: 13px; margin: 8px 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.btn { border: 1px solid var(--gold); background: var(--surface); color: var(--text); border-radius: 10px; padding: 9px 14px; font-weight: 600; font-size: 14px; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.lived { background: var(--lived); border-color: var(--lived); color: #fff; }
.btn.small { padding: 5px 10px; font-size: 13px; font-weight: 500; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 8px; font-family: inherit; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline > li { position: relative; padding: 0 0 14px 16px; }
.timeline > li::before { content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); border: 2px solid var(--bg); }
.timeline > li.lived::before { background: var(--lived); } .timeline > li.dark::before { background: var(--dark); }
.timeline > li.weird::before { background: var(--weird); } .timeline > li.story::before { background: var(--historic); }
.timeline .when { font-size: 12.5px; color: var(--muted); }
.timeline .who { font-weight: 600; }
.timeline .body { margin: 4px 0; line-height: 1.5; white-space: pre-wrap; }
.timeline .meta { font-size: 12px; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.timeline .meta button { background: none; border: 0; color: var(--muted); padding: 0; font-size: 12px; text-decoration: underline; }
.empty { color: var(--muted); font-size: 14px; }

/* forms */
form.entry { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 8px; }
form.entry label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
form.entry input, form.entry textarea, form.entry select { font: inherit; font-weight: 400; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; background: var(--surface); }
form.entry textarea { min-height: 110px; resize: vertical; }
form.entry .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
form.entry input, form.entry textarea, form.entry select { min-width: 0; max-width: 100%; box-sizing: border-box; }
form.entry .hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.kind-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kind-picker label { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px; cursor: pointer; font-weight: 500; }
.kind-picker input { margin: 0; }
.kind-picker label:has(input:checked) { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--gold); }
.error { color: var(--dark); font-size: 13px; }

dialog { border: 0; border-radius: 18px; padding: 24px 26px; max-width: 460px; box-shadow: var(--shadow); background: var(--bg); color: var(--text); }
dialog::backdrop { background: rgba(28, 25, 23, .45); }
dialog h2 { margin-top: 0; font-size: 26px; }
dialog p { line-height: 1.55; }
.legend { list-style: none; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.legend li { display: flex; gap: 8px; align-items: center; }

.leaflet-control-attribution { font-size: 10px; padding-bottom: env(safe-area-inset-bottom) !important; }
.leaflet-top.leaflet-left { top: 110px; }
@media (max-width: 640px) { .leaflet-control-zoom { display: none; } }

/* top places & tours */
.fab.left { right: auto; left: 16px; background: var(--surface); color: var(--text); border: 1px solid var(--gold); }
.touring .fab { display: none; }
.cat-picker { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.cat-picker .chip { box-shadow: none; }
.toplist { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: top; }
.toplist li { display: grid; grid-template-columns: 22px 56px 1fr; gap: 10px; align-items: center; padding: 8px 4px;
  border-bottom: 1px solid var(--line); cursor: pointer; counter-increment: top; }
.toplist li::before { content: counter(top); font-family: var(--display); font-weight: 700; color: var(--muted); text-align: right; }
.toplist li:hover { background: var(--surface); }
.toplist .thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--line); }
.toplist .name { font-weight: 600; line-height: 1.25; }
.toplist .sub { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
form.tour-form .row { grid-template-columns: 1fr 1fr; }
form.tour-form select { font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; background: var(--surface); }
.tour-pin { width: 28px; height: 28px; border-radius: 8px; background: var(--surface); color: var(--text); font-weight: 800; font-size: 14px;
  display: grid; place-items: center; border: 3px solid var(--gold); box-shadow: 0 2px 6px rgba(0,0,0,.45); }
.tour-pin.current { background: var(--dark); border-color: #fff; color: #fff; transform: scale(1.25); }
.tour-pin.visited { background: var(--line); color: var(--muted); border-color: var(--muted); }
/* During a tour, everything else on the map steps back. */
.touring .leaflet-marker-icon:not(.tour-icon, .me-icon) { filter: opacity(.35); }
.me { width: 18px; height: 18px; border-radius: 50%; background: #2563eb; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(37,99,235,.25), 0 1px 4px rgba(0,0,0,.4); }
.icon-btn.on { background: #2563eb; color: #fff; border-color: #2563eb; }
.icon-btn.on.free { background: var(--surface); color: #2563eb; }

.tourbar, .near { position: absolute; z-index: 1001; left: 50%; transform: translateX(-50%); width: min(520px, calc(100vw - 20px));
  background: var(--bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; }
.tourbar { bottom: calc(var(--attr-h, 16px) + 8px); }
.tourbar .label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tourbar .stop { font-family: var(--display); font-weight: 600; font-size: 18px; margin: 2px 0; cursor: pointer; }
.tourbar .dist { font-size: 13px; color: var(--muted); }
.tourbar .actions { margin: 10px 0 0; }
.near { bottom: calc(var(--attr-h, 16px) + 74px); display: flex; gap: 12px; align-items: center; border-left: 5px solid var(--historic); }
.touring .near { bottom: calc(var(--attr-h, 16px) + 148px); }
.near.dark { border-color: var(--dark); } .near.weird { border-color: var(--weird); } .near.lost { border-color: var(--lost); } .near.lived { border-color: var(--lived); }
.near img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.near .text { flex: 1; min-width: 0; }
.near .kicker { font-size: 12px; color: var(--muted); }
.near .name { font-weight: 600; }
.near button { flex: none; }
@media (max-width: 640px) { body:has(.panel:not([hidden])) :is(.near, .tourbar) { display: none; } }
.link.back { padding: 0; font-size: 13px; color: var(--muted); margin-bottom: 6px; }

/* why it's on the map */
.near[hidden] { display: none; }
.why { border-left: 4px solid var(--historic); padding: 2px 0 2px 12px; margin: 0 0 16px; }
.why.dark { border-color: var(--dark); } .why.weird { border-color: var(--weird); } .why.lost { border-color: var(--lost); }
.why-head { font-weight: 700; font-size: 14px; }
.why.dark .why-head { color: var(--dark); } .why.weird .why-head { color: var(--weird); }
.why.lost .why-head { color: var(--lost); } .why.historic .why-head { color: var(--historic); }
.why-head span { font-weight: 400; color: var(--muted); }
.why blockquote { margin: 6px 0; font-family: var(--display); font-size: 15px; line-height: 1.5; }
.why blockquote::before { content: "“"; } .why blockquote::after { content: "”"; }
.why-facts { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.why-note { font-size: 12px; color: var(--muted); }

/* flagging & disputes */
.disputed { background: var(--surface)beb; border: 1px solid #f5d27a; color: #78350f; border-radius: 10px; padding: 8px 12px; font-size: 13px; margin: 8px 0; }
.disputed ul { margin: 4px 0 0; padding-left: 18px; }
.disputed a { color: inherit; }
.reason-list { display: grid; gap: 6px; }
form.entry .reason-list label, form.entry .kind-picker label { display: flex; }
.reason-list label { display: flex; align-items: center; gap: 8px; font-weight: 500; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.reason-list label:has(input:checked) { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--gold); }
.reason-list input { margin: 0; }
.flag-thanks { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; }

/* turn-by-turn */
.tourbar .turn { display: flex; gap: 10px; align-items: center; margin: 6px 0 2px; font-size: 15px; line-height: 1.3; }
.arrow { flex: none; width: 34px; height: 34px; border-radius: 8px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 20px; font-weight: 700; }
.steps, .legs { list-style: none; margin: 8px 0; padding: 0; }
.steps li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.steps li .arrow { width: 28px; height: 28px; font-size: 16px; background: var(--muted); }
.steps li.now .arrow { background: var(--dark); }
.steps li.now { font-weight: 600; }
.steps .dist, .legs .dist { color: var(--muted); font-size: 13px; font-weight: 400; }
.legs { counter-reset: leg; }
.legs li { counter-increment: leg; padding: 7px 0; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.legs li::before { content: counter(leg) ". "; font-weight: 700; }
.legs li.now { font-weight: 700; color: var(--dark); }
.legs li.visited { color: var(--muted); text-decoration: line-through; }
.touring .near { bottom: calc(var(--attr-h, 16px) + 208px); }

/* explore tabs, paths, HEREoes */
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--dark); color: #fff; font-size: 12px; font-weight: 700; }
.icon-btn.on#account { background: var(--accent); color: var(--on-accent); border-color: var(--text); font-weight: 700; font-size: 16px; }
.tabs { display: flex; gap: 4px; margin: -4px 40px 12px 0; overflow-x: auto; scrollbar-width: none; }
.tab { flex: none; border: 0; background: none; padding: 7px 9px; border-radius: 8px; font-weight: 600; font-size: 13.5px; color: var(--muted); }
.tab.on { background: var(--accent); color: var(--on-accent); }
.tab .count { margin-left: 2px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: var(--surface); margin: 4px 0 10px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--accent); color: var(--on-accent); }
.toplist li { grid-template-columns: 22px 56px 1fr 34px; }
.toplist li .add { grid-column: 4; grid-row: 1; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--gold); background: var(--surface); font-weight: 700; }
.toplist li > div:not(.thumb) { grid-column: 3; }
.path-card { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.path-card:hover { background: var(--surface); }
.path-card .thumb, .path-stops .thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--line); }
.path-card .name { font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1.2; }
.path-card .sub, .heroes .sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.path-card .desc { font-size: 13.5px; margin-top: 5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.link.user { padding: 0; font-weight: 600; color: var(--text); text-decoration: none; }
.link.user:hover { text-decoration: underline; }
.curated { color: var(--historic); font-weight: 600; }
.tag.path { background: var(--accent); color: var(--on-accent); }
.byline { font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
.path-desc { white-space: pre-wrap; }
.rate { display: flex; align-items: center; gap: 2px; margin: 4px 0 6px; font-size: 13px; color: var(--muted); }
.rate span { margin-right: 6px; }
.rate button { border: 0; background: none; font-size: 26px; line-height: 1; color: var(--line); padding: 0 2px; }
.rate button.on, .rate:hover button { color: #d69e2e; }
.rate button:hover ~ button { color: var(--line); }
.path-stops { list-style: none; padding: 0; margin: 0; }
.path-stops li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.path-stops .name { font-weight: 700; }
.path-stops .note { font-size: 13.5px; line-height: 1.45; margin-top: 3px; }
.heroes { list-style: none; padding: 0; margin: 0; }
.heroes li { display: grid; grid-template-columns: 40px 1fr; gap: 8px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.heroes .rank { font-size: 22px; font-weight: 700; text-align: center; font-family: var(--display); color: var(--muted); }
.heroes .pts { font-size: 12px; font-weight: 700; background: #fef3c7; color: #92400e; border-radius: 999px; padding: 2px 8px; margin-left: 4px; }
.draft-stops { list-style: none; padding: 0; margin: 4px 0 10px; }
.draft-stops li { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.draft-stops .num { width: 26px; height: 26px; border-radius: 7px; border: 2px solid var(--gold); display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--surface); }
.draft-stops .name { padding: 0; font-weight: 600; text-align: left; text-decoration: none; color: var(--text); }
.draft-stops textarea { width: 100%; margin-top: 6px; font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; resize: vertical; background: var(--surface); }
.draft-stops .ctrl { display: flex; gap: 4px; }
.draft-stops .ctrl button { width: 30px; height: 30px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; font-size: 12px; }
.draft-stops .ctrl button:disabled { opacity: .35; cursor: default; }
#auth { width: min(400px, calc(100vw - 32px)); }
#auth h2 { margin-bottom: 4px; }

/* stamps, badges, passport, sharing */
.celebrate { position: absolute; z-index: 1003; left: 50%; top: calc(max(10px, env(safe-area-inset-top)) + 112px); transform: translateX(-50%);
  display: flex; gap: 12px; align-items: center; width: max-content; max-width: calc(100vw - 24px);
  background: var(--accent); color: var(--on-accent); border-radius: 16px; padding: 12px 18px; box-shadow: var(--shadow); font-size: 14px; }
.celebrate[hidden] { display: none; }
.celebrate .icon { font-size: 30px; }
.celebrate div div { color: #d6d3d1; font-size: 13px; }
.celebrate.pop { animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pop { from { transform: translateX(-50%) scale(.6); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
.stamped { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; border-radius: 10px; padding: 7px 12px; font-size: 13px; margin: 4px 0 8px; }
.stamp-hint { padding: 0; font-size: 12.5px; color: var(--lived); margin-top: 2px; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.badge-tile { display: grid; justify-items: center; text-align: center; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; }
.badge-tile .icon { font-size: 28px; }
.badge-tile strong { font-size: 12.5px; line-height: 1.2; }
.badge-tile span:last-child { font-size: 11px; color: var(--muted); line-height: 1.3; }
.badge-tile.locked { opacity: .45; filter: grayscale(1); }
.passport { list-style: none; padding: 0; margin: 0 0 8px; }
.passport li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.passport .icon { font-size: 20px; }
.passport .dist { color: var(--muted); font-size: 12.5px; }
form.entry label[hidden], form.entry .hint[hidden] { display: none; }
.update { position: absolute; z-index: 1004; left: 50%; transform: translateX(-50%); top: calc(max(10px, env(safe-area-inset-top)) + 64px);
  border: 0; border-radius: 999px; background: #2563eb; color: #fff; padding: 9px 16px; font-size: 14px; box-shadow: var(--shadow); white-space: nowrap; }
.update[hidden] { display: none; }

/* search */
.search { display: flex; }
.search input { padding-right: 44px; }
.search-go { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 8px;
  background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.search-results li.search-head { cursor: default; padding: 8px 10px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.search-results li.search-head:hover { background: none; }
.search-results li.search-note { cursor: default; color: var(--muted); font-size: 13px; }
.search-results li.search-item { display: flex; gap: 10px; align-items: center; }
.search-results li.search-item.active { background: var(--bg); box-shadow: inset 3px 0 0 var(--gold); }
.search-results li.search-item strong { font-weight: 600; }
.search-results li.search-item small { display: block; color: var(--muted); font-size: 12px; }
.search-results .ico { width: 18px; text-align: center; flex: none; }
.brand em { color: var(--historic); font-style: italic; }

/* ===== Night & gold brand layer ===== */
html, body { background: var(--bg); }
h1, h2, h3, .panel h2, dialog h2 { font-family: var(--display); font-weight: 600; letter-spacing: .005em; }
.panel h2 { font-size: 30px; line-height: 1.08; }
dialog h2 { font-size: 34px; }

/* An old-map warmth on the tiles, so the gold sits naturally on top. */
.leaflet-tile-pane { filter: sepia(.38) saturate(.78) brightness(.93) contrast(1.02); }
.leaflet-container { background: #1d1913; font-family: inherit; }
.leaflet-bar a, .leaflet-bar a:hover { background: var(--bg); color: var(--gold-2); border-color: var(--line); }
.leaflet-control-attribution { background: rgba(22,19,15,.8) !important; color: var(--muted); }
.leaflet-control-attribution a { color: var(--gold-2); }

/* Top bar: dark glass with a hairline of gold. */
.topbar { background: rgba(22,19,15,.94); border: 1px solid rgba(201,163,90,.28); backdrop-filter: blur(8px); }
.brand { color: var(--text); font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: .01em; }
.brand em { color: var(--gold-2); font-style: italic; }
.search input { border-color: var(--line); color: var(--text); }
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,163,90,.18); }
.icon-btn { color: var(--gold-2); border-color: var(--line); }
.icon-btn.on, .icon-btn.on#account { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.icon-btn.on.free { background: var(--surface); color: var(--gold-2); border-color: var(--gold); }

/* Filters: dark pills with gold outline when on. */
.chip { color: var(--text); border-color: var(--line); background: rgba(22,19,15,.9); box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.chip.on { border-color: var(--gold); }

/* Letter-spaced gold small caps, as in the brand. */
.section-title, .tourbar .label, .search-results li.search-head, .why-head span, .tabs .tab, .seg button {
  font-family: var(--caps); }
.section-title, .tourbar .label, .search-results li.search-head { color: var(--gold); letter-spacing: .16em; font-weight: 600; font-size: 11.5px; }
.section-title::after { content: ""; display: block; width: 28px; height: 1px; background: var(--gold); opacity: .6; margin-top: 6px; }

/* Buttons. */
.btn { border-color: rgba(201,163,90,.55); color: var(--gold-2); background: transparent; }
.btn:hover { background: var(--raise); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn.lived { background: transparent; border-color: var(--lived); color: #9fd3ad; }
.fab { background: var(--accent); color: var(--on-accent); font-family: var(--caps); letter-spacing: .04em; }
.fab.left { background: rgba(22,19,15,.94); color: var(--gold-2); border: 1px solid var(--gold); }
@media (max-width: 400px) { .fab { right: 10px; padding: 12px 14px; font-size: 14px; letter-spacing: .02em; } .fab.left { left: 10px; } }
.panel, dialog { border: 1px solid rgba(201,163,90,.22); }
.panel-close { background: var(--surface); color: var(--gold-2); box-shadow: none; border: 1px solid var(--line); }
.tab { color: var(--muted); }
.tab.on { background: transparent; color: var(--gold-2); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }
.link, .link.user { color: var(--gold-2); }
.empty, .byline, .why-note, .hint { color: var(--muted); }
.source { border-color: var(--line); }
.tag { color: #fff; }
.tag.historic { color: var(--on-accent); }
.tag.path { background: transparent; color: var(--gold-2); border: 1px solid var(--gold); }
.curated { color: var(--gold-2); }
.count { background: var(--accent); color: var(--on-accent); }

/* Notices in dark-friendly tones. */
.disputed { background: rgba(201,163,90,.08); border-color: rgba(201,163,90,.45); color: var(--gold-2); }
.stamped { background: rgba(111,163,125,.1); border-color: rgba(111,163,125,.45); color: #a9d6b5; }
.heroes .pts { background: rgba(201,163,90,.15); color: var(--gold-2); }
.flag-thanks, .badge-tile { border-color: var(--line); }
.status, .celebrate, .add-hint { background: rgba(22,19,15,.95); color: var(--text); border: 1px solid rgba(201,163,90,.35); }
.celebrate div div { color: var(--muted); }
.update { background: var(--accent); color: var(--on-accent); }

/* Map furniture. */
.tour-pin { background: var(--bg); color: var(--gold-2); border-color: var(--gold); }
.tour-pin.current { background: var(--accent); color: var(--on-accent); border-color: var(--bg); }
.tour-pin.visited { background: var(--surface); color: var(--muted); border-color: var(--line); }
.arrow { color: var(--on-accent); }
.steps li .arrow { background: var(--surface); color: var(--gold-2); }
.steps li.now .arrow { background: var(--accent); color: var(--on-accent); }
.legs li.now { color: var(--gold-2); }
.me { background: #f2d48a; border-color: #16130f; box-shadow: 0 0 0 7px rgba(232,205,143,.25), 0 1px 4px rgba(0,0,0,.5); }
.near { border-left-color: var(--gold); }
.draft-stops .num { color: var(--gold-2); }
.rate button.on, .rate:hover button { color: var(--gold-2); }
.rate button, .rate button:hover ~ button { color: var(--line); }

/* Welcome splash */
dialog.splash { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0;
  background: radial-gradient(ellipse 70% 60% at 100% 0%, rgba(196,140,62,.42), transparent 70%),
              radial-gradient(ellipse 60% 50% at 0% 100%, rgba(120,70,30,.18), transparent 70%), #12100c; color: var(--text); }
dialog.splash::backdrop { background: #0c0a08; }
.splash-inner { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: max(28px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom)); }
.splash-mark { filter: drop-shadow(0 6px 18px rgba(201,163,90,.25)); }
.rule { display: flex; align-items: center; gap: 10px; margin: 14px 0 22px; }
.rule span { width: 70px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.rule span:last-child { transform: scaleX(-1); }
.rule i, .diamond { width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); display: block; }
dialog.splash h1, dialog.splash .splash-title { font-family: var(--display); font-weight: 500; font-size: clamp(46px, 8.5vw, 96px); line-height: .98; margin: 0 0 18px; letter-spacing: -.01em; color: #f4eee3; }
.lede { font-family: var(--display); font-size: clamp(19px, 2.6vw, 25px); line-height: 1.35; color: #d9cfbf; max-width: 520px; margin: 0 0 30px; }
.lede em { color: var(--gold-2); font-style: normal; }
.features { list-style: none; display: flex; padding: 0; margin: 0 0 30px; }
.features li { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 0 clamp(14px, 4vw, 40px); }
.features li + li { border-left: 1px solid rgba(201,163,90,.35); }
.features svg { width: 46px; height: 40px; fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.features span { font-family: var(--caps); font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.features span::after { content: ""; display: block; width: 44px; height: 1px; background: var(--gold); opacity: .55; margin: 10px auto 0; }
.splash-go { font-family: var(--caps); letter-spacing: .14em; text-transform: uppercase; font-size: 13px; padding: 13px 34px; border-radius: 999px; }
.legend-line { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: 12.5px; color: var(--muted); margin: 26px 0 0; }
.legend-line span { display: inline-flex; align-items: center; gap: 6px; }
.tagline { font-family: var(--caps); font-size: 12px; letter-spacing: .24em; color: #b9ad99; margin: 22px 0 12px; }
@media (max-width: 560px) {
  .features li { padding: 0 10px; }
  .features span { font-size: 9.5px; letter-spacing: .14em; white-space: normal; max-width: 90px; line-height: 1.5; }
  .features svg { width: 38px; height: 34px; }
}
.splash-go:focus { outline: none; }
.splash-go:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }
:focus-visible { outline-color: var(--gold); }
.forgot-row { margin: -4px 0 0; font-size: 13px; }
.auth-done { background: rgba(111,163,125,.1); border: 1px solid rgba(111,163,125,.45); color: #a9d6b5; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 0; }
.auth-done[hidden], form.entry p[hidden] { display: none; }
#auth-terms a { color: var(--gold-2); }

/* share menu, site links */
#share-dlg { width: min(420px, calc(100vw - 32px)); }
#share-dlg h2 { font-size: 26px; margin-bottom: 4px; }
#share-url { word-break: break-all; font-size: 13px; }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 16px; }
.share-grid .btn { text-align: center; text-decoration: none; display: block; }
.site-links, .splash-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin: 28px 0 4px; }
.site-links a, .splash-links a { color: var(--muted); font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; }
.site-links a:hover, .splash-links a:hover { color: var(--gold); }
.splash-links { margin-top: 18px; }
.btn.danger { border-color: rgba(168,66,58,.7); color: #e39a92; }
.btn.primary.danger { background: #a8423a; color: #fff; }
.celebrate .btn { margin-left: 6px; }

/* stories */
.story-photo { display: block; width: 100%; max-height: 260px; object-fit: cover; border-radius: 10px; margin: 8px 0 4px; cursor: pointer; }
.reacts { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 4px; }
.reacts button { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 4px 10px; font-size: 15px; line-height: 1.2; }
.reacts button span { font-size: 12.5px; color: var(--muted); min-width: 0; }
.reacts button.on { border-color: var(--gold); background: rgba(201,163,90,.14); }
.reacts button.on span { color: var(--gold-2); }
.timeline .meta button + button { margin-left: 2px; }
.story-quote { font-family: var(--display); font-style: italic; font-size: 25px; line-height: 1.35; margin: 10px 0 14px; padding: 0 0 0 16px;
  border-left: 2px solid var(--gold); color: #f4eee3; white-space: pre-wrap; }
.place-link { padding: 0; font-family: var(--display); font-size: 22px; color: var(--gold-2); text-decoration: none; }
.tag.lived-tag { background: var(--lived); }
.share-card { width: 100%; border-radius: 12px; border: 1px solid var(--line); margin: 6px 0 4px; aspect-ratio: 1200 / 630; background: var(--surface); }
.story-card { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.story-card:hover { background: var(--raise); }
.story-card .thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--surface); display: grid; place-items: center; font-size: 26px; }
.story-card .quote { font-family: var(--display); font-style: italic; font-size: 18px; line-height: 1.3; color: #f4eee3;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.story-card .sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.photo-preview { width: 100%; max-height: 200px; object-fit: cover; border-radius: 10px; }
.photo-preview[hidden] { display: none; }
.photo-field input[type=file] { color: var(--muted); }

/* Pre-rendered panel content (what search engines and first paint see) */
.ssr h1 { font-family: var(--display); font-weight: 600; font-size: 30px; line-height: 1.1; margin: 4px 40px 8px 0; }
.ssr h1.story-quote { font-weight: 500; font-style: italic; font-size: 25px; line-height: 1.35; }
.ssr a { color: var(--gold-2); }
.ssr ul { padding-left: 18px; line-height: 1.5; font-size: 14.5px; }
.ssr blockquote { font-family: var(--display); font-style: italic; font-size: 17px; margin: 8px 0; padding-left: 12px; border-left: 2px solid var(--gold); }
.ssr .path-stops li { display: block; cursor: default; }
.ssr h2.section-title { font-family: var(--caps); font-size: 11.5px; font-weight: 600; letter-spacing: .16em; margin: 22px 0 8px; }
.timeline li.notable .who { color: var(--gold-2); text-decoration: none; font-weight: 600; } .timeline li.notable .who:hover { text-decoration: underline; }
.why-line { font-size: 13px; color: var(--muted); border-left: 2px solid var(--gold); padding: 4px 0 4px 10px; margin: 8px 0; line-height: 1.45; }
.why-line strong { color: var(--gold-2); font-weight: 600; }
.told-row { display: flex !important; align-items: center; gap: 8px; font-weight: 500 !important; }
.told-hint { margin-top: -6px; }
.source-line { font-size: 12.5px; margin: 2px 0 6px; } .source-line a { color: var(--gold-2); }

/* verification meter */
.verify { margin: 10px 0 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.02); }
.verify .v-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.verify .v-label { font-weight: 600; color: var(--text); }
.verify .v-score { color: var(--muted); font-size: 12px; }
.verify .v-how { margin-left: auto; padding: 0; font-size: 12px; color: var(--muted); }
.verify .v-bar { height: 5px; border-radius: 999px; background: var(--line); margin: 7px 0 2px; overflow: hidden; }
.verify .v-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #b88a3e, #e3c27c); }
.verify.verified .v-bar i, .verify.strong .v-bar i { background: linear-gradient(90deg, #5f8a6a, #8fc49d); }
.verify.verified .v-label, .verify.strong .v-label { color: #a9d6b5; }
.verify.archive { border-color: rgba(201,163,90,.35); }
.verify.archive .v-label { color: var(--gold-2); font-size: 12.5px; }
.verify .v-detail ul { margin: 8px 0 4px; padding-left: 18px; font-size: 12.5px; color: var(--muted); }
.verify .v-detail ul span { color: var(--gold-2); }
.verify .v-vouches { font-size: 12.5px; color: var(--muted); display: grid; gap: 3px; margin: 4px 0; }
.verify .v-vouches em { color: #a9d6b5; font-style: normal; }
.verify .btn.vouch { margin-top: 8px; }
.verify .btn.vouch.on { border-color: rgba(111,163,125,.6); color: #a9d6b5; }
.v-mini { color: #a9d6b5; }
.verify .v-detail[hidden] { display: none; }
.confirm-notice { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: rgba(201,163,90,.08); border: 1px solid rgba(201,163,90,.45);
  color: var(--gold-2); border-radius: 10px; padding: 8px 12px; font-size: 13px; margin: 8px 0; }

/* Where the new pin is: nearest address, snap or keep, or type an address */
.where { display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.where .muted { color: var(--muted); }
.where .coord { font-variant-numeric: tabular-nums; color: var(--gold-2); }
.where-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.where-actions[hidden] { display: none; }
.where details summary { cursor: pointer; color: var(--gold-2); font-size: 13px; }
.where-find { display: flex; gap: 6px; margin-top: 8px; }
.where-find input { flex: 1; min-width: 0; }
.where-results { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.where-results .link { text-align: left; padding: 4px 0; color: var(--text); }
