/* CityCore, top to bottom. A playful field-geology look: a cream paper map, floating cards,
   and a striped core sample whose colours follow the strata from sky to underground. */

/* Bricolage Grotesque (SIL OFL 1.1, vendor/fonts/OFL.txt), served from this site so that no visitor's
   address goes to a font host. One variable file per script covers weights 500 to 800. */
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 500 800; font-stretch: 100%; font-display: swap;
  src: url(../vendor/fonts/bricolage-grotesque-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 500 800; font-stretch: 100%; font-display: swap;
  src: url(../vendor/fonts/bricolage-grotesque-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #fff7ed; --panel: #fffdf9; --panel-2: #fbf3e8; --ink: #1f1a14; --muted: #74695d; --line: #ecdfcf;
  --accent: #ea580c; --accent-ink: #ffffff; --accent-soft: #ffedd5;
  --sky: #38bdf8; --surface: #22c55e; --rules: #f59e0b; --water: #3b82f6; --underground: #a16207; --nearby: #8b5cf6; --outdoors: #0d9488; --home: #e11d48;
  --good: #16a34a; --warn: #f59e0b; --bad: #dc2626;
  --shadow: 0 1px 2px rgba(60, 35, 10, .08), 0 10px 30px -6px rgba(60, 35, 10, .22);
  --shadow-lg: 0 2px 4px rgba(60, 35, 10, .08), 0 24px 60px -12px rgba(60, 35, 10, .35);
  --radius: 20px; --gap: 12px; --top: 76px; --drawer: 310px; --core: 410px;
  --display: "Bricolage Grotesque", ui-rounded, ui-sans-serif, system-ui, sans-serif;
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17120d; --panel: #211a13; --panel-2: #2a2118; --ink: #f6efe6; --muted: #b2a594; --line: #3a2f24;
    --accent: #fb923c; --accent-ink: #1a0f05; --accent-soft: #3b2412;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -6px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 24px 60px -12px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); overflow: hidden; }
a { color: var(--accent); text-underline-offset: 2px; }
button { font: inherit; cursor: pointer; color: inherit; }
h1, h2, h3, h4, .big, .kicker { font-family: var(--display); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.x {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: var(--panel-2); color: var(--muted); font-size: 22px; line-height: 1; transition: transform .2s var(--ease-bounce), background .2s;
}
.x:hover { transform: rotate(90deg) scale(1.08); background: var(--accent-soft); color: var(--accent); }
.kicker { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }

/* ---------- map ---------- */
#map { position: fixed; inset: 0; background: #efe6d8; }
.leaflet-container { font: inherit; background: #efe6d8; }
@media (prefers-color-scheme: dark) { #map, .leaflet-container { background: #1b1612; } }
.base-light { filter: saturate(.5) sepia(.18) brightness(1.04) contrast(.94); }
@media (prefers-color-scheme: dark) { .base-light { filter: grayscale(.85) invert(.9) hue-rotate(180deg) sepia(.25) brightness(.92) contrast(.9); } }

.leaflet-control-zoom { border: 0 !important; box-shadow: var(--shadow) !important; border-radius: 14px !important; overflow: hidden; }
.leaflet-control-zoom a { width: 38px !important; height: 38px !important; line-height: 38px !important; background: var(--panel) !important; color: var(--ink) !important; border-color: var(--line) !important; font-size: 20px !important; }
.leaflet-control-zoom a:hover { background: var(--accent-soft) !important; color: var(--accent) !important; }
.leaflet-control-scale-line { background: color-mix(in srgb, var(--panel) 85%, transparent); border-color: var(--muted); color: var(--ink); border-radius: 0 0 4px 4px; }
.leaflet-control-attribution { font-size: 11px; line-height: 1.4; max-width: 60vw; background: color-mix(in srgb, var(--panel) 85%, transparent) !important; color: var(--muted); border-radius: 10px 0 0 0; }
.leaflet-control-attribution a { color: var(--muted); }
body.drawer-open .leaflet-bottom.leaflet-left { left: calc(var(--drawer) + var(--gap)); }
.leaflet-bottom.leaflet-left { transition: left .3s ease; }
.leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: var(--shadow); background: var(--panel); color: var(--ink); }
.leaflet-popup-tip { background: var(--panel); }
.leaflet-popup-content { margin: 12px 16px; font-size: 13px; }
.leaflet-popup-content b { font-family: var(--display); font-size: 15px; }

/* ---------- top bar ---------- */
#top {
  position: fixed; top: var(--gap); left: var(--gap); right: var(--gap); z-index: 1000;
  display: flex; align-items: center; gap: 10px; pointer-events: none;
}
#top > * { pointer-events: auto; }
.brand {
  display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 10px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); color: inherit; text-decoration: none;
}
.brand h1 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; }
.brand h1 em { font-style: normal; color: var(--accent); }
.brand p { margin: 0; font-size: 12px; color: var(--muted); white-space: nowrap; }

/* The logo is a little core sample, and it wiggles when you hover. */
.logo { display: flex; flex-direction: column; width: 22px; height: 40px; border-radius: 11px; overflow: hidden; flex: none; box-shadow: inset 0 0 0 2px rgba(0,0,0,.08); }
.logo i { flex: 1; }
.logo i:nth-child(1) { background: var(--sky); } .logo i:nth-child(2) { background: var(--surface); }
.logo i:nth-child(3) { background: var(--rules); } .logo i:nth-child(4) { background: var(--water); }
.logo i:nth-child(5) { background: var(--underground); flex: 1.4; }
.brand:hover .logo { animation: wiggle .5s ease; }
@keyframes wiggle { 25% { transform: rotate(-10deg); } 75% { transform: rotate(8deg); } }

#search {
  position: relative; display: flex; align-items: center; flex: 1; max-width: 420px; margin-left: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); transition: box-shadow .2s, border-color .2s;
}
#search:focus-within { border-color: var(--accent); box-shadow: var(--shadow), 0 0 0 4px var(--accent-soft); }
.ico { width: 18px; height: 18px; margin-left: 16px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; }
#q { flex: 1; min-width: 0; padding: 13px 14px 13px 10px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 15px; outline: none; }
#q::placeholder { color: var(--muted); }
#search-msg { position: absolute; top: calc(100% + 6px); left: 16px; font-size: 12px; font-weight: 600; color: var(--accent); background: var(--panel); padding: 2px 10px; border-radius: 999px; box-shadow: var(--shadow); }
#search-msg:empty { display: none; }

nav { display: flex; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 11px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); box-shadow: var(--shadow); font-size: 14px; white-space: nowrap; transition: transform .2s var(--ease-bounce), background .2s;
}
.pill b { font-weight: 600; }
/* Language switcher (js/i18n.js): a pill-shaped select, shown only when the city has 2+ languages. */
select.pill.lang { appearance: none; padding: 11px 14px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }
.pill:hover { transform: translateY(-2px); }
.pill:active { transform: translateY(1px) scale(.97); }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.pill-hot { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.pill-hot:hover span { display: inline-block; animation: roll .6s ease; }
@keyframes roll { to { transform: rotate(360deg); } }

/* ---------- layers drawer ---------- */
#layers {
  position: fixed; z-index: 900; top: calc(var(--top) + var(--gap)); left: var(--gap); bottom: var(--gap); width: var(--drawer);
  display: flex; flex-direction: column; overflow: hidden; overflow: clip; /* clip: never scrollable, only #layers-body scrolls */
  transform: translateX(calc(-100% - 2 * var(--gap))); transition: transform .35s var(--ease-bounce); visibility: hidden;
}
body.drawer-open #layers { transform: none; visibility: visible; }
.panel-title { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 6px 18px; }
.panel-title h2 { margin: 0; font-size: 20px; font-weight: 800; }
#layers-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 14px 18px; font-size: 14px; }
#layers h3 {
  display: flex; align-items: center; gap: 8px; margin: 16px 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
#layers h3 .dot { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 8px; font-size: 12px; background: color-mix(in srgb, var(--c, var(--muted)) 22%, transparent); }

.bases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.base { position: relative; display: block; cursor: pointer; text-align: center; font-size: 11px; line-height: 1.25; color: var(--muted); }
.base input { position: absolute; opacity: 0; }
.base .thumb { display: block; aspect-ratio: 1; border-radius: 12px; background-size: cover; background-position: center; border: 2px solid var(--line); margin-bottom: 3px; transition: transform .2s var(--ease-bounce), border-color .2s; }
.base:hover .thumb { transform: scale(1.05); }
.base input:checked + .thumb { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.base input:checked ~ span:last-child { color: var(--ink); font-weight: 600; }
.base input:focus-visible + .thumb { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Overlay rows with a toggle switch in the stratum colour. */
/* position: relative keeps each hidden checkbox inside its row. Without it the checkboxes were placed
   against the whole drawer, overflowed it, and focusing one scrolled the drawer itself, leaving a big
   blank gap under a list squeezed into the top of the sheet (most visible on phones). */
.row { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 8px; margin: 0 -8px; border-radius: 12px; cursor: pointer; transition: background .15s; }
.row:hover { background: var(--panel-2); }
.row input { position: absolute; opacity: 0; pointer-events: none; }
.switch { flex: none; position: relative; width: 36px; height: 21px; border-radius: 999px; background: var(--line); transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .3s var(--ease-bounce); }
.row input:checked + .switch { background: var(--c, var(--accent)); }
.row input:checked + .switch::after { transform: translateX(15px); }
.row input:focus-visible + .switch { outline: 3px solid var(--accent); outline-offset: 2px; }
.row .label { line-height: 1.25; }
.row .status { margin-left: auto; font-size: 11px; color: var(--muted); font-style: normal; white-space: nowrap; }
.row .status.busy::before, #map-busy .spinner {
  content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 5px; vertical-align: -1px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: roll .8s linear infinite;
}

/* Everyday places as chunky emoji chips. */
.chips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.chip { position: relative; display: flex; align-items: center; gap: 7px; padding: 7px 9px; border-radius: 14px; border: 1.5px solid var(--line); cursor: pointer; font-size: 13px; line-height: 1.15; transition: transform .2s var(--ease-bounce), background .2s, border-color .2s; }
.chip:hover { transform: translateY(-2px); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip .emo { font-size: 18px; transition: transform .3s var(--ease-bounce); }
.chip:has(input:checked) { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--panel)); }
.chip:has(input:checked) .emo { transform: scale(1.2) rotate(-8deg); }
.chip:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.chip .status { position: absolute; top: -7px; right: -5px; font-size: 10px; font-weight: 700; font-style: normal; background: var(--c); color: #fff; padding: 1px 6px; border-radius: 999px; }
.chip .status:empty { display: none; }

/* ---------- welcome card ---------- */
#welcome {
  position: fixed; z-index: 800; left: 50%; bottom: 28px; width: min(620px, calc(100vw - 2 * var(--gap)));
  display: flex; gap: 18px; padding: 18px 18px 18px 20px; transform: translateX(-50%);
  animation: popup .6s var(--ease-bounce) .3s both; box-shadow: var(--shadow-lg);
}
body.has-core #welcome, body.welcome-hidden #welcome { display: none; }
@keyframes popup { from { opacity: 0; transform: translate(-50%, 40px) scale(.95); } }
.welcome-art { position: relative; flex: none; width: 54px; }
.mini-core { display: flex; flex-direction: column; width: 30px; height: 86px; margin: 14px auto 0; border-radius: 15px; overflow: hidden; }
.mini-core i { flex: 1; animation: grow 2.4s ease-in-out infinite; transform-origin: top; }
.mini-core i:nth-child(1) { background: var(--sky); } .mini-core i:nth-child(2) { background: var(--surface); animation-delay: .1s; }
.mini-core i:nth-child(3) { background: var(--rules); animation-delay: .2s; } .mini-core i:nth-child(4) { background: var(--water); animation-delay: .3s; }
.mini-core i:nth-child(5) { background: var(--underground); animation-delay: .4s; flex: 1.5; }
@keyframes grow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.2); } }
.mini-drill { position: absolute; top: -6px; left: 50%; font-size: 26px; animation: dig 1.2s ease-in-out infinite; }
@keyframes dig { 0%, 100% { transform: translate(-50%, 0) rotate(-20deg); } 50% { transform: translate(-50%, 8px) rotate(10deg); } }
.welcome-text h2 { margin: 0 0 4px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.welcome-text p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.try { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.try > span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-right: 2px; }
.try button { padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--panel-2); font-size: 13px; transition: transform .2s var(--ease-bounce), border-color .2s; }
.try button:hover { transform: translateY(-2px) rotate(-1deg); border-color: var(--accent); }
#welcome .x { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; font-size: 18px; }

/* ---------- core sample panel ---------- */
#core {
  position: fixed; z-index: 900; top: calc(var(--top) + var(--gap)); right: var(--gap); bottom: var(--gap); width: var(--core);
  display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-lg);
  animation: slidein .45s var(--ease-bounce) both;
}
#core[hidden] { display: none; }
@keyframes slidein { from { transform: translateX(calc(100% + 24px)); } }
.grip { display: none; }
.core-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 16px 16px 8px 20px; }
.core-head h2 { margin: 2px 0 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
#core-where { margin: 3px 0 0; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.progress { display: flex; align-items: center; gap: 10px; padding: 4px 20px 8px; font-size: 12px; color: var(--muted); }
.progress-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.progress-bar i {
  display: block; height: 100%; width: 0; border-radius: inherit; transition: width .4s ease;
  background: linear-gradient(90deg, var(--sky), var(--surface), var(--rules), var(--water), var(--underground)); background-size: 410px 100%;
}
#progress-text { min-width: 9em; text-align: right; font-weight: 600; }
.progress.done #progress-text { color: var(--good); }

#core-nav { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 20px 10px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
#core-nav button {
  display: flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; border: 0; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: color-mix(in srgb, var(--c) 15%, var(--panel)); transition: transform .2s var(--ease-bounce), background .2s, color .2s;
}
#core-nav button:hover { transform: translateY(-2px); }
#core-nav button.on { background: var(--c); color: #fff; }

#strata { flex: 1; overflow-y: auto; scroll-behavior: smooth; padding-bottom: 12px; }
#core-links { margin: 0; padding: 10px 20px 12px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); background: var(--panel-2); }

/* The column. Each stratum is a band with a textured core on its left edge. */
.stratum { position: relative; padding: 16px 16px 6px 58px; animation: drillin .5s ease both; animation-delay: calc(var(--i, 0) * 110ms); }
@keyframes drillin { from { opacity: 0; transform: translateY(-14px); clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.stratum::before { content: ""; position: absolute; left: 20px; top: 0; bottom: 0; width: 22px; background: var(--tex); box-shadow: inset 3px 0 0 rgba(255,255,255,.25), inset -3px 0 0 rgba(0,0,0,.08); }
.stratum:first-child::before { border-radius: 11px 11px 0 0; }
.stratum:last-child::before { border-radius: 0 0 11px 11px; }
.stratum .badge {
  position: absolute; left: 14px; top: 12px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  background: var(--panel); border: 3px solid var(--c); font-size: 16px; box-shadow: var(--shadow); z-index: 1;
}
.stratum header h2 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.01em; color: color-mix(in srgb, var(--c) 70%, var(--ink)); }
.stratum header p { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); }
.stratum header .depth { float: right; font-size: 11px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 4px; }

.s-sky { --c: var(--sky); --tex: radial-gradient(circle at 30% 18%, rgba(255,255,255,.75) 0 4px, transparent 5px) 0 0 / 22px 44px, radial-gradient(circle at 70% 70%, rgba(255,255,255,.55) 0 3px, transparent 4px) 0 0 / 22px 34px, linear-gradient(#bae6fd, #38bdf8); }
.s-surface { --c: var(--surface); --tex: repeating-linear-gradient(90deg, rgba(255,255,255,.18) 0 2px, transparent 2px 6px), linear-gradient(#86efac, #16a34a); }
.s-outdoors { --c: var(--outdoors); --tex: radial-gradient(circle at 50% 40%, rgba(255,255,255,.3) 0 3px, transparent 4px) 0 0 / 22px 18px, linear-gradient(135deg, transparent 45%, rgba(0,0,0,.12) 45% 55%, transparent 55%) 0 0 / 11px 11px, linear-gradient(#5eead4, #0f766e); }
.s-rules { --c: var(--rules); --tex: repeating-linear-gradient(135deg, #fcd34d 0 7px, #f59e0b 7px 14px); }
.s-water { --c: var(--water); --tex: radial-gradient(circle, rgba(255,255,255,.5) 0 2px, transparent 3px) 0 0 / 11px 16px, linear-gradient(#60a5fa, #1d4ed8); }
.s-underground { --c: var(--underground); --tex: radial-gradient(circle, rgba(0,0,0,.25) 0 2px, transparent 3px) 3px 4px / 12px 13px, radial-gradient(circle, rgba(255,255,255,.2) 0 1.5px, transparent 2px) 0 0 / 9px 10px, linear-gradient(#ca8a04, #713f12); }
.s-nearby { --c: var(--nearby); --tex: radial-gradient(ellipse 4px 6px, var(--nearby) 90%, transparent) 4px 2px / 22px 26px, radial-gradient(ellipse 4px 6px, var(--nearby) 90%, transparent) 14px 15px / 22px 26px; }
.s-nearby::before { opacity: .6; box-shadow: none; }

.card {
  position: relative; margin: 0 0 10px; padding: 12px 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.45;
  background: color-mix(in srgb, var(--c) 7%, var(--panel)); border: 1px solid color-mix(in srgb, var(--c) 18%, var(--line));
  animation: rise .4s var(--ease-bounce) both;
}
.card h4 { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .01em; }
.card footer { font-size: 11px; color: var(--muted); margin-top: 8px; }
.card footer a { color: var(--muted); }
.card.loading .body { min-height: 22px; }
.card.failed { background: var(--panel-2); border-style: dashed; border-color: var(--line); }
.card.failed h4 { opacity: .8; }
.card.landed { animation: land .5s var(--ease-bounce); }
@keyframes land { 40% { transform: scale(1.02); } }
.card p { margin: 3px 0; }
.big { margin: 0 0 2px !important; font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.big small { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.muted, .nl { color: var(--muted); }
.shrug { display: flex; gap: 8px; align-items: flex-start; }
.shrug::before { content: "🤷"; font-size: 18px; line-height: 1.2; }
.explain { font-size: 12px; color: var(--muted); }
dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 4px 0; }
dt { color: var(--muted); } dd { margin: 0; overflow-wrap: anywhere; font-weight: 500; }

/* Loading: a little drill bit boring through dirt. */
.dig { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.dig i { width: 46px; height: 8px; border-radius: 999px; background: linear-gradient(90deg, transparent, var(--c), transparent) 0 0 / 50% 100% no-repeat, var(--panel-2); animation: bore 1s linear infinite; }
@keyframes bore { from { background-position: -50% 0, 0 0; } to { background-position: 150% 0, 0 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* Weather */
.wx { display: flex; align-items: center; gap: 12px; }
.wx .emo { font-size: 44px; line-height: 1; animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-4px); } }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 56px; margin-top: 12px; }
.bars i { flex: 1; min-height: 3px; border-radius: 4px 4px 2px 2px; background: color-mix(in srgb, var(--water) calc(var(--p) * 1%), #bae6fd); transform-origin: bottom; animation: bar .6s var(--ease-bounce) both; animation-delay: calc(var(--n) * 18ms); }
.bars i:first-child { outline: 2px solid var(--accent); outline-offset: 1px; }
@keyframes bar { from { transform: scaleY(0); } }
.bars-axis { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-top: 3px; }

/* Air quality gauge */
.gauge { position: relative; height: 10px; margin: 10px 0 18px; border-radius: 999px; background: linear-gradient(90deg, #22c55e 0 20%, #a3e635 20% 40%, #facc15 40% 60%, #fb923c 60% 80%, #ef4444 80% 100%); }
.gauge b { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; background: var(--panel); border: 4px solid var(--ink); transform: translate(-50%, -50%); box-shadow: var(--shadow); animation: slide 1s var(--ease-bounce) both; }
@keyframes slide { from { left: 0; } }
.gauge span { position: absolute; top: 14px; font-size: 10px; color: var(--muted); }
/* Air quality per pollutant: a coloured level and a small bar over the EEA bands (js/air.js) */
.card .aq-sum { margin: 22px 0 14px; }
.aq-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 12px; }
.aq-row { --lc: #22c55e; }
.aq-row[data-level="fair"] { --lc: #a3e635; }
.aq-row[data-level="moderate"] { --lc: #facc15; }
.aq-row[data-level="poor"] { --lc: #fb923c; }
.aq-row[data-level="very_poor"] { --lc: #ef4444; }
.aq-row[data-level="extremely_poor"] { --lc: #a21caf; }
.aq-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.aq-name { font-weight: 600; font-size: 13.5px; }
.aq-lvl { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 2px 9px 2px 7px; border-radius: 999px; font-size: 12px; font-weight: 700; background: color-mix(in srgb, var(--lc) 24%, var(--panel)); border: 1px solid color-mix(in srgb, var(--lc) 60%, var(--line)); }
.aq-lvl::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--lc); }
.aq-bar { position: relative; height: 6px; margin: 7px 0 4px; border-radius: 999px; background: linear-gradient(90deg, #22c55e 0 20%, #a3e635 20% 40%, #facc15 40% 60%, #fb923c 60% 80%, #ef4444 80% 100%); opacity: .9; }
.aq-bar b { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--panel); border: 3px solid var(--ink); transform: translate(-50%, -50%); animation: slide 1s var(--ease-bounce) both; }
.card .aq-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0; font-size: 11.5px; color: var(--muted); }
.aq-raw { flex: none; font-variant-numeric: tabular-nums; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.chips-row span { padding: 3px 9px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 12px; }
.chips-row b { font-variant-numeric: tabular-nums; }

/* Elevation */
.elev { display: flex; align-items: flex-end; gap: 14px; }
.elev .stack { display: flex; flex-direction: column-reverse; gap: 2px; }
.elev .stack i { width: 18px; height: 6px; border-radius: 2px; background: color-mix(in srgb, var(--surface) 70%, #fff); animation: rise .3s both; animation-delay: calc(var(--n) * 40ms); }

/* Nearby */
ul.nearby { list-style: none; padding: 0; margin: 0; }
ul.nearby li { display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: center; padding: 6px 0; animation: rise .4s both; animation-delay: calc(var(--n) * 50ms); }
ul.nearby li.far { opacity: .55; }
ul.nearby button { width: 38px; height: 38px; border-radius: 12px; border: 0; font-size: 18px; background: color-mix(in srgb, var(--pc) 18%, var(--panel)); transition: transform .2s var(--ease-bounce); }
ul.nearby button:hover { transform: scale(1.12) rotate(-6deg); }
ul.nearby .what { display: block; font-size: 13px; line-height: 1.3; }
ul.nearby .walk { display: flex; align-items: center; gap: 8px; margin-top: 3px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
ul.nearby .meter { flex: 1; height: 6px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
ul.nearby .meter i { display: block; height: 100%; border-radius: inherit; background: var(--pc); }

/* ---------- map markers ---------- */
.poi span {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg);
  background: var(--c); border: 2.5px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.3); animation: drop .45s var(--ease-bounce) backwards;
}
.poi span b { transform: rotate(45deg); font-size: 14px; font-weight: 400; }
.poi:hover span { transform: rotate(-45deg) scale(1.2); transition: transform .2s var(--ease-bounce); }
@keyframes drop { from { opacity: 0; transform: rotate(-45deg) translate(10px, -10px) scale(.4); } }

.drill { pointer-events: none; }
.drill .pin { position: absolute; left: 50%; bottom: 50%; transform: translateX(-50%); animation: plunge .7s var(--ease-bounce) both; }
.drill .pin span {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg);
  background: var(--accent); border: 3px solid #fff; box-shadow: 0 6px 16px rgba(0,0,0,.35);
}
.drill .pin span b { transform: rotate(45deg); font-size: 20px; animation: chop 1s ease-in-out .7s 3; }
.drill .ring { position: absolute; left: 50%; top: 50%; width: 16px; height: 8px; margin: -4px 0 0 -8px; border-radius: 50%; background: rgba(0,0,0,.25); }
.drill .ring::before, .drill .ring::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--accent); animation: ripple 1.8s ease-out infinite; }
.drill .ring::after { animation-delay: .9s; }
@keyframes plunge { from { transform: translate(-50%, -120px); opacity: 0; } 60% { opacity: 1; } }
@keyframes chop { 50% { transform: rotate(25deg) translateY(2px); } }
@keyframes ripple { from { transform: scale(1); opacity: .9; } to { transform: scale(6); opacity: 0; } }

/* ---------- toast ---------- */
#toast {
  position: fixed; z-index: 1200; left: 50%; top: calc(var(--top) + 20px); padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: var(--panel); font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg);
  transform: translate(-50%, -20px); opacity: 0; pointer-events: none; transition: transform .35s var(--ease-bounce), opacity .25s;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; }
/* Something slow is on its way (the satellite image): js/main.js busy(). Sits just under the toast. */
#map-busy {
  position: fixed; z-index: 1100; left: 50%; top: calc(var(--top) + 72px); display: flex; align-items: center; gap: 4px;
  width: max-content; max-width: calc(100vw - 32px); padding: 9px 16px; border-radius: 999px; background: var(--panel); color: var(--ink);
  font-weight: 600; font-size: 13px; box-shadow: var(--shadow-lg); pointer-events: none;
  transform: translate(-50%, -12px); opacity: 0; transition: transform .35s var(--ease-bounce), opacity .25s;
}
#map-busy.show { transform: translate(-50%, 0); opacity: 1; }
#map-busy .spinner { flex: none; width: 12px; height: 12px; color: var(--accent); }
@media (max-width: 760px) { #map-busy { top: calc(var(--top) + 100px); } } /* the toast wraps to two lines on a phone */
@media (prefers-reduced-motion: reduce) { .row .status.busy::before, #map-busy .spinner { animation-duration: 2.4s; } }

/* ---------- almanac ---------- */
dialog#almanac {
  width: min(760px, calc(100vw - 32px)); max-height: 84vh; border: 0; border-radius: 24px; padding: 0;
  background: var(--panel); color: var(--ink); box-shadow: var(--shadow-lg);
}
dialog#almanac[open] { animation: popin .4s var(--ease-bounce); }
@keyframes popin { from { opacity: 0; transform: scale(.92) translateY(20px); } }
dialog::backdrop { background: rgba(31, 26, 20, .45); backdrop-filter: blur(3px); }
.dlg-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 20px 20px 12px 24px; position: sticky; top: 0; background: var(--panel); z-index: 1; }
.dlg-head h2 { margin: 2px 0 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
#almanac-body { padding: 4px 24px 24px; font-size: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
#almanac-body article { padding: 14px 16px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line); transition: transform .2s var(--ease-bounce); }
#almanac-body article:hover { transform: translateY(-3px) rotate(-.4deg); }
#almanac-body h3 { font-size: 16px; margin: 0 0 6px; line-height: 1.2; }
#almanac-body h3 a { color: var(--ink); text-decoration: none; }
#almanac-body h3 a:hover { color: var(--accent); }
#almanac-body p { margin: 4px 0; line-height: 1.45; }
#almanac-body .tag { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; }
#almanac-body .foot { grid-column: 1 / -1; }

/* ---------- small screens ---------- */
@media (max-width: 1100px) { .brand p { display: none; } .pill b { display: none; } .pill { padding: 11px 13px; } }
@media (max-width: 760px) {
  /* --top is measured from the header by main.js; this is only its first guess. */
  :root { --gap: 8px; --top: 106px; }
  body.drawer-open .leaflet-bottom.leaflet-left { left: 0; }
  #core { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: var(--sheet); border-radius: 24px 24px 0 0; border-bottom: 0; transition: height .35s var(--ease-bounce); animation-name: sheetin; }
  @keyframes sheetin { from { transform: translateY(100%); } }
  .grip { display: block; width: 100%; height: 24px; flex: none; cursor: grab; position: relative; touch-action: none; }
  .grip::after { content: ""; position: absolute; left: 50%; top: 9px; width: 44px; height: 5px; margin-left: -22px; border-radius: 999px; background: var(--line); }
  .core-head { padding-top: 0; }
  .core-head h2 { font-size: 20px; }
  body.has-core .leaflet-bottom { bottom: var(--sheet); }
  .leaflet-control-scale { display: none; }
}

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

/* ---------- report a mistake ---------- */
.card footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 8px; }
.card footer > span:first-child { flex: 1 1 140px; }
.flag {
  flex: none; border: 1px solid var(--line); background: var(--panel); color: var(--muted); border-radius: 999px;
  padding: 2px 9px; font-size: 11px; font-weight: 600; transition: transform .2s var(--ease-bounce), color .2s, border-color .2s;
}
.flag:hover { color: var(--bad); border-color: var(--bad); transform: rotate(-3deg) scale(1.05); }
.card .flag { opacity: 0; }
.card:hover .flag, .card:focus-within .flag, .card.failed .flag { opacity: 1; }
@media (hover: none) { .card .flag { opacity: 1; } }
#core-links .flag { margin-right: 6px; font-size: 12px; }
.flag-pop { margin-top: 8px; font-size: 12px; }

dialog#report, dialog#suggest, dialog#prefs {
  width: min(520px, calc(100vw - 24px)); max-height: 90vh; border: 0; border-radius: 24px; padding: 0;
  background: var(--panel); color: var(--ink); box-shadow: var(--shadow-lg);
}
dialog#report[open], dialog#suggest[open], dialog#prefs[open] { animation: popin .4s var(--ease-bounce); }
#report-form, #suggest-form, .report-done { padding: 0 24px 22px; }
.report-ctx { margin: 0 0 14px; padding: 10px 14px; border-radius: 14px; background: var(--panel-2); font-size: 13px; }
.report-ctx dd { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
#report fieldset { border: 0; padding: 0; margin: 0 0 12px; }
#report legend, .field > span { font-family: var(--display); font-weight: 700; font-size: 15px; margin-bottom: 6px; padding: 0; display: block; }
.field em { font-family: ui-sans-serif, system-ui, sans-serif; font-style: normal; font-weight: 400; font-size: 12px; color: var(--muted); }
.kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.kind { position: relative; cursor: pointer; }
.kind input { position: absolute; opacity: 0; }
.kind span { display: inline-block; padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--line); font-size: 13px; transition: transform .2s var(--ease-bounce), background .2s, border-color .2s; }
.kind:hover span { transform: translateY(-2px); }
.kind input:checked + span { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.kind input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.field { display: block; margin-bottom: 12px; }
.field textarea, .field input, .field select {
  width: 100%; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink);
  font: inherit; font-size: 15px; resize: vertical;
}
.field textarea:focus, .field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.report-osm { font-size: 12.5px; color: var(--muted); margin: 0 0 10px; }
.report-err { min-height: 1em; margin: 0 0 6px; color: var(--bad); font-size: 13px; font-weight: 600; }
.report-err:empty { display: none; }
.report-actions { display: flex; justify-content: flex-end; }
#report-send:disabled, #suggest-send:disabled { opacity: .6; cursor: progress; }
.report-done { text-align: center; }
.report-done .party { font-size: 56px; animation: popin .6s var(--ease-bounce), float 3s ease-in-out .6s infinite; }
.report-done p { font-size: 15px; line-height: 1.5; margin: 6px 0 16px; }
.check { margin: 6px 0 0 !important; font-size: 11.5px; color: var(--muted); }
.check a { color: var(--muted); font-weight: 600; }
.check a:hover { color: var(--accent); }
.foot-r { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.votes { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.votes b { color: var(--bad); }
.metoo { border: 0; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 2px 8px; font-size: 11.5px; font-weight: 700; transition: transform .2s var(--ease-bounce); }
.metoo:hover { transform: scale(1.08); }
.metoo:disabled { opacity: .6; }
.voted { color: var(--good); font-weight: 600; }
.pop-report { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.pop-report .check { margin: 0 !important; }
.pop-report .flag-pop { margin: 0; }
.report-check { font-size: 12.5px; color: var(--muted); margin: -4px 0 14px; padding: 8px 12px; border-radius: 12px; border: 1px dashed var(--line); }
.report-check a { font-weight: 600; }
.talk { border: 0; background: var(--panel-2); color: var(--ink); border-radius: 999px; padding: 2px 8px; font-size: 11.5px; font-weight: 700; }
.talk[aria-expanded="true"] { background: var(--ink); color: var(--panel); }
ul.comments { list-style: none; margin: 6px 0 0; padding: 0; width: 100%; max-height: 220px; overflow-y: auto; }
ul.comments li { padding: 6px 10px; margin-bottom: 4px; border-radius: 10px; background: var(--panel-2); font-size: 12.5px; line-height: 1.4; white-space: normal; }
ul.comments li .muted { display: block; font-size: 11px; }
.card footer ul.comments { flex-basis: 100%; }
.foot-r { flex-wrap: wrap; justify-content: flex-end; }
.foot-r ul.comments { flex-basis: 100%; }

/* ---------- reach: travel profile and time/radius control on the Nearby section ---------- */
.reach { margin: 0 0 10px; padding: 6px 12px; border-radius: 14px; background: color-mix(in srgb, var(--nearby) 8%, var(--panel)); border: 1px solid color-mix(in srgb, var(--nearby) 25%, transparent); }
.reach > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 32px; list-style: none; cursor: pointer; font-size: 13px; }
.reach > summary::-webkit-details-marker { display: none; }
.reach-change { flex: none; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--nearby); background: var(--panel); border: 1px solid color-mix(in srgb, var(--nearby) 30%, transparent); }
.reach-change::after { content: " ▾"; }
.reach[open] .reach-change::after { content: " ▴"; }
.reach[open] > summary { margin-bottom: 8px; }
.reach[open] { padding-bottom: 10px; }
.reach-modes { display: flex; flex-wrap: wrap; gap: 6px; }
.reach-modes button { font: inherit; font-size: 12.5px; padding: 5px 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--nearby) 30%, transparent); background: var(--panel); color: inherit; cursor: pointer; transition: background .15s, transform .15s; }
.reach-modes button:hover { transform: translateY(-1px); }
.reach-modes button[aria-pressed="true"] { background: var(--nearby); border-color: var(--nearby); color: #fff; }
.reach-range { display: grid; grid-template-columns: auto 1fr 4.2em; align-items: center; gap: 10px; margin-top: 10px; font-size: 12.5px; }
.reach-range input { width: 100%; accent-color: var(--nearby); }
.reach-range output { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.reach-what { color: var(--muted); }
.reach-note { margin: 8px 0 0; font-size: 12px; line-height: 1.4; color: var(--muted); }
.reach-note b { color: var(--ink); }
.reach-note small { font-size: 11px; }

/* ---------- map key: stacked legends for every layer that is on ---------- */
#legends {
  position: fixed; z-index: 850; right: var(--gap); bottom: 26px; width: 300px;
  max-height: calc(100vh - var(--top) - 2 * var(--gap) - 26px); max-height: calc(100dvh - var(--top) - 2 * var(--gap) - 26px);
  display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-lg); transition: right .3s ease, bottom .35s var(--ease-bounce);
}
#legends[hidden] { display: none; }
body.has-core #legends { right: calc(var(--core) + 2 * var(--gap)); }
@media (max-width: 1250px) { body.has-legends #welcome { display: none; } }
.lg-head {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  padding: 10px 14px; border: 0; background: none; font-family: var(--display); font-weight: 800; font-size: 15px; text-align: left;
}
.lg-head em { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); margin-left: 4px; vertical-align: 2px; }
.lg-head em:empty { display: none; }
.lg-head > i, .lg-title > i { flex: none; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform .25s; }
.lg-head[aria-expanded="false"] > i, .lg-title[aria-expanded="false"] > i { transform: rotate(-135deg) translate(-2px, -2px); }
body.legends-min #legends-body { display: none; }
body.legends-min #legends { width: auto; }
#legends-body { overflow-y: auto; overscroll-behavior: contain; padding: 0 12px 10px; border-top: 1px solid var(--line); }
.lg { border-bottom: 1px solid var(--line); }
.lg:last-child { border-bottom: 0; }
.lg-title {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 10px 2px 8px; border: 0; background: none;
  font-family: var(--display); font-weight: 700; font-size: 14px; line-height: 1.2; text-align: left;
}
.lg-title small { display: block; font-family: ui-sans-serif, system-ui, sans-serif; font-weight: 400; font-size: 11px; color: var(--muted); margin-top: 1px; }
.lg.waiting .lg-title[aria-expanded="false"] small::after { content: " · zoom in to see it"; color: var(--accent); font-weight: 600; }
.lg-content { padding: 0 2px 10px; font-size: 12.5px; line-height: 1.35; }
.lg-lead { margin: 0 0 8px; color: var(--ink); }
.lg-note, .lg-tip { margin: 8px 0 0; color: var(--muted); font-size: 11.5px; }
.lg-tip::before { content: "👆 "; }
.lg-sub { margin: 10px 0 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.lg-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.lg-items li { display: flex; align-items: flex-start; gap: 9px; }
.lg-items li > span { padding-top: 1px; }
.lg-items .nl { display: block; font-size: 10.5px; color: var(--muted); font-style: italic; }
.lg-zoom {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 10px; padding: 8px 10px; border-radius: 12px;
  background: var(--accent-soft); color: var(--ink); font-size: 12px; font-weight: 600;
}
.lg-zoom[hidden] { display: none; }
.lg-zoom span { flex: 1 1 150px; }
.lg-zoom button { border: 0; border-radius: 999px; padding: 4px 12px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 12px; }
.lg-ramp i { display: block; height: 12px; border-radius: 999px; background: var(--ramp); opacity: var(--o); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.lg-ticks { display: flex; justify-content: space-between; margin-top: 3px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lg-ticks span:first-child { text-align: left; } .lg-ticks span:last-child { text-align: right; }

/* Swatches: drawn over the beige of the map so a see-through layer looks as it does on the map. */
.sw { flex: none; position: relative; display: inline-block; width: 24px; height: 16px; margin-top: 1px; border-radius: 4px; }
.sw-fill, .sw-hatch, .sw-grid, .sw-dots, .sw-cross, .sw-outline { background: #efe6d8; box-shadow: inset 0 0 0 1px var(--s, rgba(0,0,0,.25)); }
.sw-fill::before, .sw-hatch::before, .sw-grid::before, .sw-dots::before, .sw-cross::before { content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: var(--o, 1); background: var(--c); }
.sw-two::before { background: linear-gradient(90deg, var(--c) 50%, var(--c2) 50%); }
.sw-hatch::before { background: repeating-linear-gradient(135deg, var(--c2) 0 2px, var(--c) 2px 6px); }
.sw-grid::before { background: linear-gradient(var(--c2) 1px, transparent 1px) 0 0 / 6px 6px, linear-gradient(90deg, var(--c2) 1px, transparent 1px) 0 0 / 6px 6px, var(--c); }
.sw-dots::before { background: radial-gradient(var(--c2) 0 1px, transparent 1.4px) 0 0 / 5px 5px, var(--c); }
.sw-cross::before { background: repeating-linear-gradient(45deg, var(--c2) 0 1px, transparent 1px 6px), repeating-linear-gradient(-45deg, var(--c2) 0 1px, transparent 1px 6px), var(--c); }
.sw-up, .sw-down, .sw-diamond { width: 14px; height: 14px; margin: 1px 5px 0; background: #6b7280; }
.sw-up { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.sw-down { clip-path: polygon(0 0, 100% 0, 50% 100%); }
.sw-diamond { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); transform: scale(.8); }
.sw-line { height: 4px; margin-top: 7px; border-radius: 2px; background: var(--c); }
.sw-dash { height: 0; margin-top: 8px; border-radius: 0; border-top: 3px dotted var(--c); }
.sw-ring { width: 18px; height: 18px; margin: -1px 3px 0; border-radius: 50%; border: 2px dashed var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); }
.sw-pin { width: 24px; height: 18px; text-align: center; font-size: 14px; line-height: 18px; }
.sw-icon { width: 22px; height: 22px; margin: -2px 1px 0; border-radius: 50%; border: 2px solid var(--c); background: var(--panel); text-align: center; font-size: 12px; line-height: 18px; }

@media (max-width: 760px) {
  /* On phones the key sits bottom left (the zoom buttons give way to pinching) and the
     my-location button bottom right, both riding on top of the core sample sheet. */
  #legends { right: auto; left: var(--gap); bottom: calc(var(--below) + var(--gap) + 16px); width: min(300px, calc(100vw - 80px)); max-height: 46vh; max-height: calc(100dvh - var(--top) - var(--below) - 3 * var(--gap) - 16px); z-index: 940; }
  body.has-core #legends { right: auto; bottom: calc(var(--sheet) + var(--gap)); max-height: calc(100dvh - var(--sheet) - var(--top) - 2 * var(--gap)); }
  body.has-core.core-full #legends { display: none; }
  .lg-head { padding: 9px 12px; font-size: 14px; }
}

/* ---------- Home: buying, renting, safety ---------- */
.s-home { --c: var(--home); --tex: linear-gradient(rgba(255,255,255,.45) 0 2px, transparent 2px) 0 0 / 100% 10px, linear-gradient(90deg, rgba(255,255,255,.45) 0 2px, transparent 2px) 0 0 / 20px 20px, linear-gradient(90deg, rgba(255,255,255,.45) 0 2px, transparent 2px) 10px 10px / 20px 20px, linear-gradient(#fda4af, #be123c); }
.prices { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.prices li { display: grid; grid-template-columns: 30px 1fr; gap: 8px; align-items: start; }
.prices .emo { font-size: 22px; line-height: 1.2; }
.prices p { margin: 0; font-size: 13px; }
.prices .price { font-family: var(--display); font-size: 18px; font-weight: 800; color: var(--home); font-variant-numeric: tabular-nums; }
.prices small { color: var(--muted); }
.prices .vs { font-size: 11.5px; color: var(--muted); }
.pbars { display: flex; align-items: flex-end; gap: 2px; height: 30px; margin-top: 5px; }
.pbars i { flex: 1; border-radius: 3px 3px 1px 1px; background: color-mix(in srgb, var(--home) 70%, #fecdd3); transform-origin: bottom; animation: bar .6s var(--ease-bounce) both; animation-delay: calc(var(--n) * 25ms); }
.pbars i:last-child { outline: 2px solid var(--accent); outline-offset: 1px; }
.pbars i.gap { background: repeating-linear-gradient(135deg, var(--line) 0 3px, transparent 3px 6px); }
.legend { margin: 6px 4px 10px; display: grid; grid-template-columns: auto 1fr auto; gap: 2px 8px; align-items: center; font-size: 11.5px; color: var(--muted); }
.legend .ramp { grid-column: 1 / -1; height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--a), var(--b)); opacity: .8; }
.legend span:nth-of-type(2) { grid-column: 1; } .legend span:nth-of-type(3) { grid-column: 3; text-align: right; }
.legend small { grid-column: 1 / -1; line-height: 1.35; }
.price-tip { font-size: 12.5px; border-radius: 10px; }

/* ---------- "What are you looking for?" results and suggestions (js/find.js) ---------- */
#find {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 1100; padding: 8px; max-height: min(60vh, 460px); overflow: auto;
  box-shadow: var(--shadow-lg); animation: find-in .18s ease-out;
}
#find[hidden] { display: none; }
@keyframes find-in { from { opacity: 0; transform: translateY(-4px); } }
body.find-open #search-msg { display: none; }
.find-emo { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--c, var(--muted)) 18%, var(--panel)); font-size: 15px; }
.find-sugg small { display: block; color: var(--muted); font-size: 12px; }
.find-sugg, .find-list { list-style: none; margin: 0; padding: 0; }
.find-sugg button, .find-list button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 12px; background: none; text-align: left; font-size: 14px;
}
.find-sugg button:hover, .find-sugg button.on, .find-list button:hover { background: var(--panel-2); }
.find-sugg button.on { box-shadow: inset 0 0 0 2px var(--accent-soft); }
.find-head { display: flex; align-items: center; gap: 10px; padding: 4px 4px 8px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.find-head > div { flex: 1; min-width: 0; }
.find-head b { display: block; font-family: var(--display); font-size: 16px; }
.find-head small, .find-list small { display: block; color: var(--muted); font-size: 12px; }
.find-x { width: 28px; height: 28px; font-size: 18px; }
.find-list i {
  display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  font-style: normal; font-weight: 800; font-size: 12px; font-family: var(--display);
}
.find-list b { font-weight: 600; }
.find-none { margin: 8px; font-size: 13px; }
.find-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 4px 2px; border-top: 1px solid var(--line); margin-top: 4px; font-size: 12px; color: var(--muted); }
.find-foot span { margin-left: auto; }
.find-me { border: 1px solid var(--line); border-radius: 999px; background: var(--panel); padding: 5px 10px; font-size: 12px; font-weight: 600; }
.find-me:hover { border-color: var(--accent); color: var(--accent); }
.find-hit { z-index: 1000; }
.find-hit span { width: 36px; height: 36px; border-width: 3px; }
.find-hit span b { font-size: 17px; }
.find-hit i {
  position: absolute; top: -6px; right: -8px; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); border: 2px solid #fff; font: 800 11px/1 var(--display); font-style: normal;
}
@media (max-width: 760px) {
  #find { max-height: 42vh; }
}
.find-note { margin: 2px 6px 6px; padding: 7px 10px; border-radius: 10px; background: var(--accent-soft); font-size: 12.5px; line-height: 1.4; }

/* ---------- my location (js/locate.js) ---------- */
.lc-btn {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: var(--panel); color: var(--muted); box-shadow: var(--shadow); transition: transform .2s var(--ease-bounce), color .2s;
}
.leaflet-left .lc-btn { border-radius: 14px; width: 38px; height: 38px; }
.lc-btn:hover { color: var(--ink); }
.lc-btn:active { transform: scale(.92); }
.lc-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.lc-btn .lc-core { fill: none; stroke: none; }
.lc-btn[data-state="shown"] { color: #1a73e8; }
.lc-btn[data-state="follow"] { color: #1a73e8; }
.lc-btn[data-state="follow"] .lc-core { fill: currentColor; }
.lc-btn[data-state="locating"] svg { animation: lc-spin 1.4s linear infinite; }
.lc-btn[data-state="locating"] .lc-ring { stroke-dasharray: 12 5; }
.lc-btn[data-state="denied"] { color: var(--muted); opacity: .75; }
.lc-btn[data-state="denied"] svg { stroke: var(--muted); }
.lc-btn[data-state="denied"]::after { content: ""; position: absolute; width: 26px; height: 2.5px; border-radius: 2px; background: var(--bad); transform: rotate(-45deg); }
@keyframes lc-spin { to { transform: rotate(360deg); } }
@media (prefers-color-scheme: dark) { .lc-btn[data-state="shown"], .lc-btn[data-state="follow"] { color: #8ab4f8; } }

/* The blue dot: a white-ringed dot, a soft pulse, a cone when moving, and the accuracy circle. */
.lc-acc { fill: #1a73e8; fill-opacity: .12; stroke: #1a73e8; stroke-opacity: .35; stroke-width: 1; }
.lc-dot { position: relative; }
.lc-dot b { position: absolute; inset: 2px; border-radius: 50%; background: #1a73e8; border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.4); }
.lc-dot .lc-pulse { position: absolute; inset: 0; border-radius: 50%; background: #1a73e8; animation: lc-pulse 2s ease-out infinite; }
.lc-dot.lc-rough b { background: #7baaf7; }
.lc-dot .lc-cone {
  display: none; position: absolute; left: 50%; bottom: 50%; width: 44px; height: 40px; margin-left: -22px; transform-origin: 50% 100%;
  transform: rotate(var(--heading, 0deg)); background: radial-gradient(ellipse at 50% 100%, rgba(26,115,232,.45), transparent 70%);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}
.lc-dot.lc-moving .lc-cone { display: block; }
@keyframes lc-pulse { from { transform: scale(1); opacity: .45; } to { transform: scale(3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .lc-dot .lc-pulse, .lc-btn[data-state="locating"] svg { animation: none; } }
.lc-pop .leaflet-popup-content { text-align: center; }
.lc-pop .lc-drill { margin-top: 8px; padding: 8px 14px; font-size: 13px; box-shadow: none; }

/* ---------- quick searches (phones only) ---------- */
#quick { display: none; }

/* ---------- phones: one search row, a row of chips, bottom sheets ---------- */
@media (max-width: 760px) {
  body { --sheet: 0px; --sheet-peek: calc(150px + env(safe-area-inset-bottom)); --sheet-half: 56vh; --sheet-half: 56dvh;
    --sheet-full: calc(100vh - var(--top) - 4px); --sheet-full: calc(100dvh - var(--top) - 4px); --below: var(--welcome-h, 0px); }
  body.has-core { --sheet: var(--sheet-half); --below: var(--sheet); }
  body.has-core.core-min { --sheet: var(--sheet-peek); }
  body.has-core.core-full { --sheet: var(--sheet-full); }
  body.sheet-dragging #core, body.sheet-dragging .leaflet-bottom, body.sheet-dragging #legends { transition: none; }
  .leaflet-bottom { bottom: var(--below); transition: bottom .35s var(--ease-bounce); }
  body.has-core.core-full .leaflet-bottom { visibility: hidden; }
  #search-msg { position: fixed; top: calc(var(--top) + 4px); left: calc(var(--gap) + 4px); }

  /* Header: the logo and the search on one row, then a row of chips that scrolls sideways. */
  #top { top: calc(var(--gap) + env(safe-area-inset-top)); left: calc(var(--gap) + env(safe-area-inset-left)); right: calc(var(--gap) + env(safe-area-inset-right)); flex-wrap: wrap; column-gap: 8px; row-gap: 8px; }
  .brand { order: 1; flex: none; width: 46px; height: 46px; padding: 0; justify-content: center; border-radius: 50%; }
  .brand-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .logo { width: 16px; height: 30px; }
  #search { order: 2; flex: 1 1 calc(100% - 54px); min-width: 0; max-width: none; margin: 0; height: 46px; }
  .ico { margin-left: 14px; }
  #q { padding: 11px 12px 11px 8px; font-size: 16px; } /* 16px stops iOS from zooming in on focus */
  #top > nav, #quick { order: 3; }
  #top > nav { margin: 0; gap: 6px; flex: none; }
  /* The second row: the three buttons as round chips, then the quick searches, which scroll. */
  #quick { display: flex; gap: 6px; flex: 1 1 0; min-width: 0; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding: 2px 24px 4px 0; margin: -2px 0 -4px; }
  #quick::-webkit-scrollbar { display: none; }
  #quick button, #top > nav .pill {
    flex: none; display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line);
    background: var(--panel); box-shadow: 0 1px 3px rgba(60, 35, 10, .18); font-size: 13.5px; font-weight: 600; white-space: nowrap;
  }
  #top > nav .pill { width: 36px; padding: 0; justify-content: center; }
  #top > nav .pill-hot { background: var(--accent); border-color: transparent; }
  #top > nav .pill b { display: none; }
  #top > nav select.pill.lang { width: auto; padding: 0 10px; font-size: 13px; }
  #quick button:active { transform: scale(.96); }
  body.find-open #quick { visibility: hidden; }

  /* Zooming is a pinch on a phone; the my-location button takes the bottom right corner. */
  .leaflet-touch .leaflet-control-zoom { display: none; }
  .leaflet-bottom.leaflet-right .lc-btn { margin: 0 var(--gap) 10px 0; width: 48px; height: 48px; }
  .leaflet-bottom.leaflet-right .lc-btn svg { width: 26px; height: 26px; }
  .leaflet-control-attribution { max-width: 100vw; font-size: 10px; border-radius: 8px 0 0 0; }

  /* The welcome card becomes a short strip with the starting places in one sideways row. */
  #welcome { left: var(--gap); right: var(--gap); width: auto; bottom: calc(var(--gap) + env(safe-area-inset-bottom)); transform: none; padding: 12px 12px 12px 14px; gap: 10px; animation-name: popup-phone; }
  @keyframes popup-phone { from { opacity: 0; transform: translateY(40px); } }
  .welcome-art { display: none; }
  .welcome-text { min-width: 0; flex: 1; }
  .welcome-text h2 { font-size: 19px; padding-right: 34px; }
  .welcome-text p { font-size: 13px; line-height: 1.4; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .try { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -12px; padding-right: 12px; }
  .try::-webkit-scrollbar { display: none; }
  .try button { flex: none; padding: 8px 12px; }
  #welcome .x { top: 8px; right: 8px; width: 34px; height: 34px; }

  /* Layers: a bottom sheet over the lower part of the map. Tap the map above it to close. */
  #layers {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 72vh; height: 72dvh; max-height: calc(100dvh - var(--top) - 8px);
    border-radius: 24px 24px 0 0; border-bottom: 0; z-index: 950; box-shadow: 0 -8px 40px -8px rgba(60, 35, 10, .35);
    transform: translateY(105%); transition: transform .35s cubic-bezier(.2, .9, .3, 1.05), visibility 0s .35s;
  }
  body.drawer-open #layers { transition: transform .35s cubic-bezier(.2, .9, .3, 1.05); }
  #layers .grip { display: block; height: 20px; cursor: pointer; }
  #layers .panel-title { padding-top: 0; }
  #layers-body { padding-bottom: calc(18px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
  .bases { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .chips { gap: 8px; }

  /* The core sample sheet: room for the home indicator, and a scroll that stays inside it. */
  #strata { overscroll-behavior: contain; }
  #core-links { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  #core-nav { flex-wrap: nowrap; padding-bottom: 8px; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  body.core-min #core-nav, body.core-min .progress, body.core-min #core-links { display: none; }
  .stratum { padding-left: 52px; padding-right: 12px; }

  /* Popups (the card for a place): never wider than the screen, links easy to hit. */
  .leaflet-popup-content { margin: 12px 14px; max-width: calc(100vw - 72px); overflow-wrap: anywhere; }
  .leaflet-popup-content a { display: inline-block; padding: 3px 0; }
  .leaflet-container a.leaflet-popup-close-button { width: 32px; height: 32px; font: 22px/30px Tahoma, Verdana, sans-serif; }

  /* Dialogs slide up from the bottom like the other sheets. */
  dialog#almanac, dialog#report, dialog#suggest, dialog#prefs {
    width: 100%; max-width: 100%; max-height: 92vh; max-height: 92dvh; margin: auto 0 0; border-radius: 24px 24px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  dialog#almanac[open], dialog#report[open], dialog#suggest[open], dialog#prefs[open] { animation: sheetup .35s cubic-bezier(.2, .9, .3, 1.05); }
  @keyframes sheetup { from { transform: translateY(60%); opacity: .4; } }
  #almanac-body { padding: 4px 16px 20px; grid-template-columns: 1fr; }
  .dlg-head { padding: 18px 16px 10px 20px; }
  .dlg-head h2 { font-size: 22px; }
  #report-form, #suggest-form, .report-done { padding: 0 18px 20px; }

  #find { position: fixed; top: calc(var(--top) - 38px); left: var(--gap); right: var(--gap); max-height: 55vh; max-height: calc(100dvh - var(--top) - 40px); }
  #toast { max-width: calc(100vw - 32px); width: max-content; text-align: center; border-radius: 18px; white-space: normal; }
}

/* ---------- fingers: bigger targets wherever the pointer is coarse ---------- */
@media (pointer: coarse) {
  .x { width: 40px; height: 40px; }
  .row { padding: 10px 8px; }
  .chip { padding: 10px 10px; min-height: 44px; }
  #core-nav button { padding: 8px 12px; font-size: 12.5px; }
  .flag, .metoo, .talk { padding: 6px 12px; font-size: 12px; }
  .find-me { padding: 8px 12px; font-size: 13px; }
  .find-sugg button, .find-list button { padding: 10px 8px; min-height: 48px; }
  .reach-modes button { padding: 8px 12px; font-size: 13px; }
  .lg-head { min-height: 44px; }
  .lg-title { min-height: 40px; }
  .lg-zoom button { padding: 8px 14px; }
  ul.nearby button { width: 42px; height: 42px; }
  ul.nearby li { grid-template-columns: 42px 1fr; }
  .reach-range input { height: 32px; }
  .sat-opts select { padding: 6px 8px; }
  .pill:hover, .chip:hover, .try button:hover, #core-nav button:hover, ul.nearby button:hover { transform: none; }
}

/* ---------- a place pointed out from the Nearby list ---------- */
ul.nearby li { cursor: pointer; border-radius: 12px; padding: 6px; margin: 0 -6px; transition: background .15s; }
ul.nearby li.on { background: color-mix(in srgb, var(--pc) 14%, transparent); box-shadow: inset 3px 0 0 var(--pc); }
ul.nearby li.on button { outline: 2.5px solid var(--pc); outline-offset: 2px; }
.hl-pin { z-index: 2000; }
.hl-pin span { position: relative; width: 40px; height: 40px; border-width: 3px; }
.hl-pin span b { font-size: 19px; }
.hl-pin .hl-ring { position: absolute; left: 50%; top: 100%; width: 18px; height: 9px; margin: -5px 0 0 -9px; border-radius: 50%; background: rgba(0,0,0,.25); }
.hl-pin .hl-ring::before, .hl-pin .hl-ring::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--c); animation: ripple 1.8s ease-out infinite; }
.hl-pin .hl-ring::after { animation-delay: .9s; }
.leaflet-tooltip.hl-tip { padding: 5px 9px; border-radius: 10px; border: 0; background: var(--panel); color: var(--ink); box-shadow: 0 4px 14px rgba(0,0,0,.25); font-size: 12.5px; line-height: 1.3; text-align: center; width: max-content; max-width: 220px; white-space: normal; }
.leaflet-tooltip.hl-tip b { display: block; }
.leaflet-tooltip.hl-tip small { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .hl-pin .hl-ring::before, .hl-pin .hl-ring::after { animation: none; } }
/* Latest satellite image: the cloud limit under its switch, and the ask button in the core sample. */
.sat-opts { display: flex; align-items: center; gap: 8px; margin: 0 0 6px 46px; font-size: 12px; color: var(--muted); }
.sat-opts select { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 3px 6px; }
.sat-ask { margin: 10px 0 0; }
.sat-ask .pill { padding: 8px 14px; font-size: 13px; box-shadow: none; cursor: pointer; }
.sat-ask a.pill { text-decoration: none; color: var(--ink); }

/* Shops, food and services: opening hours in popups */
.open-now, .closed-now { font-size: inherit; }
.open-now { color: #15803d; }
.closed-now { color: #b91c1c; }
@media (prefers-color-scheme: dark) { .open-now { color: #4ade80; } .closed-now { color: #f87171; } }

/* Public transport departures (Nearby stratum) */
.tx-stop + .tx-stop { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.tx-stop > p { margin: 0 0 4px; }
.tx-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tx-list li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; font-size: 14px; }
.tx-line { min-width: 2.6em; padding: 1px 6px; border-radius: 6px; background: var(--panel-2); color: var(--ink); font-weight: 700; font-size: 13px; text-align: center; white-space: nowrap; }
.tx-head { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-time { white-space: nowrap; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 4px; }
.tx-live { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; display: inline-block; }
.tx-late { color: #dc2626; font-weight: 700; }
.tx-off .tx-head, .tx-off .tx-line { text-decoration: line-through; opacity: .6; }
/* ---------- clearing the map: the Clear button, the "On the map" chips, Undo ---------- */
.lg-bar { flex: none; display: flex; align-items: center; gap: 4px; padding-right: 8px; }
.lg-bar .lg-head { flex: 1; min-width: 0; }
.clear-btn {
  flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--panel-2); font-size: 12.5px; font-weight: 700; white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s, transform .2s var(--ease-bounce);
}
.clear-btn[hidden] { display: none; }
.clear-btn:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.clear-btn:active { transform: scale(.95); }
#layers-clear { margin-left: auto; margin-right: 8px; }

.on-map { padding: 10px 0 8px; border-bottom: 1px solid var(--line); }
.on-map-t { margin: 0 0 7px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.on-map-t small { display: block; margin-top: 1px; font-size: 11px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.on-map ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.on-map button {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 4px 6px 4px 9px; border-radius: 999px;
  border: 1.5px solid var(--c); background: color-mix(in srgb, var(--c) 12%, var(--panel)); font-size: 12.5px; line-height: 1.2; text-align: left;
}
.on-map button > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.on-map button i {
  flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: color-mix(in srgb, var(--c) 22%, var(--panel)); font-style: normal; font-size: 14px; line-height: 1; color: var(--ink);
}
.on-map button:hover i { background: var(--c); color: #fff; }

#toast.has-action { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px; }
#toast button {
  flex: none; border: 0; border-radius: 999px; padding: 6px 14px; background: var(--accent); color: var(--accent-ink);
  font-weight: 800; font-size: 13.5px;
}
@media (pointer: coarse) {
  .clear-btn { min-height: 36px; padding: 6px 12px; font-size: 13px; }
  .on-map button { min-height: 36px; padding: 6px 8px 6px 11px; font-size: 13px; }
  .on-map button i { width: 22px; height: 22px; }
  #toast button { min-height: 36px; padding: 8px 16px; }
}

/* ---------- add a missing place ---------- */
.flag-add:hover { color: var(--good); border-color: var(--good); }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
@media (max-width: 520px) { .field-pair { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.drawer-hint { margin: 6px 2px 0; font-size: 12px; color: var(--muted); }
.poi-visitor span { border-style: dashed; }
/* Unverified places from Overture Maps (js/unverified.js): hollow, dashed in the kind's colour, a little see-through */
.poi-unverified span { background: color-mix(in srgb, var(--c) 14%, var(--panel)); border: 2.5px dashed var(--c); box-shadow: 0 2px 5px rgba(0,0,0,.2); opacity: .9; }
.poi-unverified span b { filter: saturate(.6); }
.unverified-tag { display: inline-block; margin-top: 2px; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, #b45309 15%, var(--panel)); color: #b45309; font-weight: 600; }
.lg-unverified { display: flex; gap: 8px; align-items: flex-start; }
.lg-unverified i { flex: none; width: 14px; height: 14px; margin-top: 2px; border-radius: 50% 50% 50% 2px; transform: rotate(-45deg); border: 2px dashed var(--muted); }
#suggest [hidden] { display: none; }

/* "Is it one of these?" in the Add a missing place form (js/suggest.js) */
.found { margin: -4px 0 12px; padding: 10px 12px; border-radius: 14px; background: var(--panel-2); font-size: 13px; }
.found > p { margin: 0 0 8px; color: var(--muted); }
.found ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.found button { width: 100%; text-align: left; display: flex; gap: 10px; align-items: baseline; justify-content: space-between; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: inherit; font: inherit; cursor: pointer; }
.found button:hover, .found button:focus-visible { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.found button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.found b { font-weight: 600; }
.found small { color: var(--muted); white-space: nowrap; }
.found .addr { display: block; color: var(--muted); font-size: 12px; }
.found .credit { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); }

/* Opening hours, day by day, in the Add a missing place form (js/hours-editor.js) */
.hours-ed .h-know { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.hours-ed .h-know input, .hours-ed .h-day input { width: auto; accent-color: var(--accent); margin: 0; }
.hours-ed .h-body { margin-top: 8px; padding: 10px 12px; border-radius: 14px; background: var(--panel-2); }
.hours-ed .h-row { display: grid; grid-template-columns: 9.5em 1fr; gap: 6px 10px; align-items: center; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.hours-ed .h-row.weekend { box-shadow: inset 3px 0 0 var(--accent-soft); padding-left: 8px; }
.hours-ed .h-row.weekend + .h-ph, .hours-ed .h-row:nth-child(5) { border-bottom-style: solid; }
.hours-ed .h-ph { border-bottom: 0; margin-top: 4px; }
.hours-ed .h-day { display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; cursor: pointer; }
.hours-ed .h-row:not(.h-ph) .h-day span { text-transform: capitalize; }
.hours-ed .h-row.closed .h-day span { color: var(--muted); font-weight: 400; }
.hours-ed .h-times { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hours-ed .h-span { display: inline-flex; gap: 4px; align-items: center; padding: 2px 4px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.hours-ed input[type=time] { width: auto; padding: 4px 6px; border-radius: 8px; border: 1px solid transparent; font-size: 14px; background: transparent; }
.hours-ed input[type=time]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hours-ed select { width: auto; padding: 5px 8px; font-size: 14px; border-radius: 10px; }
.hours-ed .h-closed { font-size: 13px; color: var(--muted); }
.hours-ed .h-del, .hours-ed .h-add, .hours-ed .chipbtn, .hours-ed .linkbtn { font: inherit; cursor: pointer; color: inherit; }
.hours-ed .h-del { border: 0; background: none; font-size: 16px; line-height: 1; padding: 2px 4px; color: var(--muted); }
.hours-ed .h-del:hover { color: var(--bad); }
.hours-ed .h-add { border: 1px dashed var(--line); background: none; border-radius: 999px; padding: 3px 9px; font-size: 12.5px; color: var(--muted); }
.hours-ed .h-add:hover { border-color: var(--accent); color: var(--accent); }
.hours-ed .h-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.hours-ed .chipbtn { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 5px 10px; font-size: 12.5px; }
.hours-ed .chipbtn:hover, .hours-ed .chipbtn:focus-visible { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.hours-ed .h-out { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.hours-ed .h-out code { color: var(--ink); background: var(--panel); padding: 1px 6px; border-radius: 6px; word-break: break-word; }
.hours-ed .linkbtn { border: 0; background: none; padding: 0; color: var(--accent); text-decoration: underline; font-size: inherit; }
.hours-ed .h-text input { width: 100%; }
@media (max-width: 520px) {
  .hours-ed .h-row { grid-template-columns: 1fr; }
}

/* Suggest an edit (js/suggest.js): "It has closed for good" in the form */
.field-check { display: flex; gap: 8px; align-items: center; margin: 4px 0 12px; font-size: 14px; cursor: pointer; }
.field-check[hidden] { display: none; }
.field-check input { width: auto; accent-color: var(--accent); margin: 0; }
.pop-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.flag-edit:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- routes: junction numbers, popup buttons ---------- */
.junction span { display: grid; place-items: center; min-width: 22px; height: 18px; padding: 0 4px; border-radius: 9px;
  background: var(--c); color: #fff; font: 700 11px/1 system-ui, sans-serif; border: 1.5px solid #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .35); }
.route-acts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.route-acts .chipbtn { border: 1px solid var(--line); background: var(--panel); color: inherit; border-radius: 999px; padding: 5px 10px; font-size: 12.5px; text-decoration: none; cursor: pointer; }
.sw-line.sw-dash { background: repeating-linear-gradient(90deg, var(--c) 0 6px, transparent 6px 10px); }

/* ---------- my routes: drawer list, upload, the drawing bar and its handles ---------- */
.my-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.my-acts .pill { cursor: pointer; font-size: 13px; }
.my-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.my-list li { display: grid; grid-template-columns: 14px 1fr auto; grid-template-areas: "sw name btns" "sw meta btns"; align-items: center; column-gap: 8px; padding: 6px 8px; border-radius: 12px; background: var(--panel-2); }
.my-list li.my-empty { display: block; background: none; padding: 2px 0; font-size: 12.5px; }
.my-sw { grid-area: sw; width: 6px; height: 28px; border-radius: 3px; background: var(--c); justify-self: center; }
.my-name { grid-area: name; min-width: 0; border: 1px solid transparent; background: transparent; color: inherit; font: inherit; font-weight: 600; padding: 2px 4px; border-radius: 6px; }
.my-name:hover, .my-name:focus { border-color: var(--line); background: var(--panel); outline: none; }
.my-list small { grid-area: meta; padding-left: 5px; }
.my-btns { grid-area: btns; display: flex; gap: 2px; }
.my-btns button { border: 0; background: none; cursor: pointer; font-size: 15px; padding: 4px; border-radius: 8px; }
.my-btns button:hover { background: var(--panel); }
.my-climb { margin: 8px 0 2px; min-width: 220px; }
.my-climb .climb-head { margin: 0 0 4px; font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.climb-level { font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; color: #fff; }
.climb-level.lv-flat { background: #15803d; } .climb-level.lv-gentle { background: #a16207; }
.climb-level.lv-some { background: #c2410c; } .climb-level.lv-steep { background: #b91c1c; }
.climb-svg { display: block; width: 100%; height: 64px; color: var(--ink, currentColor); }
.climb-axis { display: flex; justify-content: space-between; margin: 0 0 4px; font-size: 11px; }
.my-bar { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 1200;
  width: min(640px, calc(100vw - 32px)); padding: 12px 14px; display: grid; gap: 8px; }
.my-bar[hidden] { display: none; }
.my-bar-t { margin: 0; font-size: 13.5px; }
.my-bar-b { display: flex; flex-wrap: wrap; gap: 6px; }
.my-bar-b .pill { font-size: 13px; }
.my-bar-b .pill[disabled] { opacity: .45; cursor: default; }
body.my-drawing #welcome, body.my-drawing #legends { display: none; }
body.my-drawing .leaflet-container { cursor: crosshair; }
.my-h { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid #7c3aed; box-shadow: 0 1px 4px rgb(0 0 0 / .35); cursor: grab; }
.my-h.my-start { border-color: #16a34a; }
.my-h.my-end { border-color: #dc2626; }
.my-h.my-mid { width: 16px; height: 16px; border-width: 2px; opacity: .8; font: 700 12px/1 system-ui, sans-serif; color: #7c3aed; cursor: copy; }
.leaflet-container.drop-on { outline: 4px dashed #7c3aed; outline-offset: -10px; }
@media (max-width: 760px) { .my-bar { bottom: calc(8px + env(safe-area-inset-bottom)); } }

/* Shops, food and services: a category search, then folding sections of chips (js/business.js). */
.biz-find input { width: 100%; box-sizing: border-box; padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-size: 14px; }
.biz-find input:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.biz-none { margin: 8px 2px; font-size: 13px; }
.biz-sec { margin-top: 6px; border-radius: 14px; }
.biz-sec > summary { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 12px; cursor: pointer; font-weight: 600; font-size: 13.5px; list-style: none; background: color-mix(in srgb, var(--c) 9%, transparent); }
.biz-sec > summary::-webkit-details-marker { display: none; }
.biz-sec > summary::after { content: '▸'; margin-left: 2px; color: var(--muted); transition: transform .2s; }
.biz-sec[open] > summary::after { transform: rotate(90deg); }
.biz-sec > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.biz-sec > summary .biz-sec-name { flex: 1 1 auto; }
.biz-sec > summary small { color: var(--muted); font-weight: 500; }
.biz-sec .biz-on { font-style: normal; font-size: 11px; font-weight: 700; color: #fff; background: var(--c); padding: 1px 7px; border-radius: 999px; }
.biz-sec .biz-on:empty { display: none; }
.biz-sec > .chips { margin: 6px 0 4px; }
.biz-sec[hidden], .chips .chip[hidden] { display: none; }
/* ---------- everyday services card, "What matters to me", the score map (js/everyday.js) ---------- */
.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.every-score .big { display: flex; align-items: baseline; gap: 8px; margin: 0; }
.every-num { display: inline-grid; place-items: center; min-width: 56px; height: 44px; padding: 0 8px; border-radius: 14px; background: var(--sc); color: #fff; font-weight: 800; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.every-cov { margin: 6px 0 0; font-size: 12px; }
.every-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 4px; font-size: 12px; }
ul.nearby.every li { grid-template-columns: 38px 1fr auto; }
ul.nearby.every li.off { opacity: .6; }
ul.nearby.every .walk { white-space: normal; flex-wrap: wrap; gap: 2px 6px; }
.every-pts { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; min-width: 44px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.every-pts i { display: block; width: 44px; height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--pc) calc(var(--s) * 100%), var(--panel-2) 0); }
.every-pts.muted { font-weight: 400; font-size: 11px; text-align: right; }
.detour { font-style: normal; padding: 0 6px; border-radius: 999px; background: color-mix(in srgb, #d97706 18%, transparent); color: #b45309; font-size: 11px; }
@media (max-width: 760px) { ul.nearby.every li { grid-template-columns: 42px 1fr auto; } }
.score-img { image-rendering: pixelated; image-rendering: crisp-edges; }
.score-ramp { height: 12px; border-radius: 999px; margin: 6px 0 2px; }
.score-ramp-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.prefs-body { padding: 0 24px 24px; font-size: 14px; }
.prefs-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0; }
.prefs-row .pill[aria-pressed="true"] { background: var(--accent); color: #fff; }
.prefs-lbl { width: 100%; font-size: 12px; font-weight: 700; color: var(--muted); }
.prefs-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 4px; }
.prefs-list li { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(110px, 1.2fr) 96px; align-items: center; gap: 4px 10px; padding: 6px 8px; border-radius: 12px; background: color-mix(in srgb, var(--c) 8%, transparent); }
.prefs-list input[type=range] { width: 100%; accent-color: var(--c); }
.prefs-list output { font-size: 12px; color: var(--muted); }
.prefs-adv { display: none; grid-column: 1 / -1; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.prefs-adv input { width: 52px; }
#prefs.adv .prefs-adv { display: flex; }
.prefs-more summary { cursor: pointer; font-weight: 700; }
.prefs-formula { font-family: ui-monospace, monospace; font-size: 12px; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); overflow-wrap: anywhere; }
.prefs-map { display: flex; gap: 8px; align-items: center; margin: 12px 0 4px; }
.prefs-private { font-size: 12px; }
@media (max-width: 760px) {
  .prefs-body { padding: 0 16px 20px; }
  .prefs-list li { grid-template-columns: 1fr 96px; }
  .prefs-list input[type=range] { grid-column: 1 / -1; grid-row: 2; }
}

/* suggested loops (js/loops.js) */
ul.loops { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 6px; }
ul.loops li { display: grid; gap: 2px; padding: 8px 10px; border-radius: 12px; border-left: 4px dashed var(--pc); background: var(--panel-2); font-size: 12px; }
ul.loops li.on { background: color-mix(in srgb, var(--pc) 14%, var(--panel)); }
.loop-show { justify-self: start; border: 0; background: none; padding: 0; font: 700 13px/1.3 inherit; color: var(--ink); cursor: pointer; text-align: left; }
.loop-acts { display: flex; gap: 12px; }
.every-acts .pill[aria-pressed="true"] { background: var(--accent); color: #fff; }

/* the cityScore: badge by the spot's name, grade, strong and weak points, welcome line */
#core-score { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 0 auto; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink); cursor: pointer; text-align: left; flex-shrink: 0; animation: popin .4s var(--ease-bounce); }
#core-score[hidden] { display: none; }
#core-score .n { display: grid; place-items: center; min-width: 40px; height: 36px; border-radius: 10px; background: var(--sc); color: #fff; font: 800 18px/1 var(--display); text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
#core-score .w { display: grid; line-height: 1.15; font-size: 13px; }
#core-score small { font-size: 10.5px; color: var(--muted); }
.every-grade { display: grid; line-height: 1.15; }
.every-grade b { font-size: 18px; }
.every-grade small { font-size: 11px; color: var(--muted); font-family: var(--body, inherit); font-weight: 400; }
.every-sum { margin: 6px 0 0; font-size: 13px; }
.welcome-score { margin: 12px 0 0; font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (max-width: 760px) { #core-score .w small { display: none; } .welcome-score { display: none; } }

.prefs-status { margin: 0; min-height: 1.3em; font-size: 12.5px; font-weight: 600; color: var(--accent); }
.prefs-row .pill[data-preset][aria-pressed="true"] { background: var(--accent); color: #fff; }

.prefs-step { margin: 16px 0 6px; font-size: 15px; }
.prefs-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.prefs-picks .chipbtn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 999px; border: 1.5px solid color-mix(in srgb, var(--c) 45%, var(--line)); background: var(--panel); color: var(--ink); font: 600 12.5px/1.2 inherit; cursor: pointer; }
.prefs-picks .chipbtn[aria-pressed="true"] { background: color-mix(in srgb, var(--c) 22%, var(--panel)); border-color: var(--c); }
.prefs-picks .chipbtn[aria-pressed="false"] { opacity: .7; }
.every-choice { font-weight: 600; color: var(--ink); }
.prefs-picks .chipbtn[aria-pressed="true"]::before { content: "✓"; font-weight: 800; color: var(--c); }

/* the distance curve on each cityScore row */
.every-pts { flex-direction: column; align-items: flex-end; }
.every-pts small { font-weight: 500; color: var(--muted); }
.every-pts > i { display: none; }
.every-curve { overflow: visible; }
.every-curve path { fill: none; stroke: color-mix(in srgb, var(--pc) 70%, var(--muted)); stroke-width: 1.5; }
.every-curve line { stroke: var(--line); stroke-dasharray: 2 2; }
.every-curve circle { fill: var(--pc); stroke: var(--panel); stroke-width: 1; }
.every-curve circle.o { fill: var(--panel); stroke: var(--pc); stroke-width: 1.2; }

/* ---------- phones: keep the map free (js/main.js tidyForMap, setFocus) ---------- */
.focus-btn { display: none; }
.lg-head.bump { animation: lg-bump .6s var(--ease-bounce); }
@keyframes lg-bump { 30% { transform: scale(1.08); } }
@media (max-width: 760px) {
  /* "Hide panels": a round button above my-location. Arrows in to hide, arrows out to show again. */
  .focus-btn {
    display: grid; place-items: center; width: 44px; height: 44px; margin: 0 calc(var(--gap) + 2px) 10px 0; padding: 0; border: 0; border-radius: 50%;
    background: var(--panel); color: var(--muted); box-shadow: var(--shadow); transition: transform .2s var(--ease-bounce), color .2s;
  }
  .focus-btn:active { transform: scale(.92); }
  .focus-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  .focus-btn .f-out, body.map-focus .focus-btn .f-in { display: none; }
  body.map-focus .focus-btn .f-out { display: inline; }
  body.map-focus .focus-btn { color: var(--accent-ink); background: var(--accent); }
  body.map-focus #top > nav, body.map-focus #quick, body.map-focus #welcome, body.map-focus #legends { display: none; }
  body.map-focus #search-msg { display: none; }

  /* A shorter peek: just the handle, the name of the spot and its score. */
  body { --sheet-peek: calc(112px + env(safe-area-inset-bottom)); }
  body.core-min #strata { visibility: hidden; }
  body.sheet-dragging { -webkit-user-select: none; user-select: none; }
  /* On a phone the report / add / check-by-hand links end the scroll instead of taking a band of the sheet. */
  #strata #core-links { margin: 18px 0 0; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); line-height: 2; }
  #strata { padding-bottom: 0; }
}

/* Near here: the first few, then a button for the rest. */
.near-more { margin: 6px 0 2px; }
/* cityScore: a short summary; the breakdown folds open. */
.every-full { margin-top: 8px; border-top: 1px solid var(--line); }
.every-full > summary { display: flex; align-items: center; justify-content: space-between; min-height: 40px; cursor: pointer; list-style: none; font-size: 13px; font-weight: 600; color: var(--ink); }
.every-full > summary::-webkit-details-marker { display: none; }
.every-full > summary::after { content: "▾"; color: var(--muted); transition: transform .2s; }
.every-full[open] > summary::after { transform: rotate(180deg); }
.every-sum { margin: 6px 0 0; font-size: 13px; line-height: 1.4; }
