:root {
  --bg: #FAF7F2; --panel: #FFFFFF; --ink: #1D1F24; --muted: #646A75; --line: #E6E1D8;
  --water: #DCE9F2; --empty: #ECE8E1; --stroke: #FFFFFF; --accent: #E2557B;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, ui-serif, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
/* Dark for everyone. The light palette above stays for a possible future toggle (data-theme="light"). */
@media all {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #14161B; --panel: #1C1F26; --ink: #ECEDEF; --muted: #9AA0AB; --line: #2C3039;
    --water: #182230; --empty: #2A2E36; --stroke: #14161B;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; overflow-x: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1180px; margin: 0 auto; padding: 16px; }
.brand { font-weight: 700; letter-spacing: .01em; }
.brand .city { font-weight: 400; color: var(--muted); margin-left: 4px; }
.day-nav { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.day-nav button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--panel); font-size: 18px; line-height: 1; }
.day-nav button:disabled { opacity: .35; cursor: default; }
#day-label { min-width: 150px; text-align: center; }

main { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.lede { padding: 12px 0 20px; max-width: 760px; }
.kicker { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
h1 { font: 700 clamp(28px, 4.6vw, 44px)/1.12 var(--serif); margin: 0 0 10px; text-wrap: balance; }
#blurb { margin: 0; font-size: 18px; color: var(--muted); max-width: 640px; }
h2 { font: 700 18px/1.3 var(--serif); margin: 0 0 6px; }

.board { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.map-wrap { position: relative; background: var(--water); border-radius: 18px; overflow: hidden; }
.map-mode { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 8px;
  align-items: center; flex-wrap: wrap; z-index: 2; pointer-events: none; }
.chip { pointer-events: auto; border: 1px solid var(--line); background: var(--panel);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.chip.on { border-color: var(--ink); }
.mode-note { font-size: 13px; color: var(--muted); background: var(--panel); border-radius: 999px; padding: 6px 10px; }
.mode-note:empty { display: none; }
#map { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1.02; }
#map path { stroke: var(--stroke); stroke-width: .7; transition: fill .25s; cursor: pointer; }
#map path:hover, #map path.sel { stroke: var(--ink); stroke-width: 1.6; }

.card { position: absolute; left: 12px; bottom: 12px; width: min(300px, calc(100% - 24px));
  background: var(--panel); border-radius: 14px; padding: 14px 16px; box-shadow: 0 6px 24px rgba(0,0,0,.14);
  font-size: 14px; z-index: 3; }
.card h3 { font: 700 17px/1.2 var(--serif); margin: 0; }
.card .sub { color: var(--muted); margin: 2px 0 8px; }
.card ol { margin: 6px 0 0; padding-left: 18px; }
.card .close { position: absolute; top: 8px; right: 8px; border: 0; background: none; font-size: 18px; color: var(--muted); }

.side { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.hint { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.moods { list-style: none; margin: 0; padding: 0; }
.moods li { margin: 0 0 4px; }
.mood { width: 100%; display: grid; grid-template-columns: 26px 1fr auto; grid-template-rows: auto 6px;
  gap: 2px 8px; align-items: center; text-align: left; border: 1px solid transparent; background: none;
  border-radius: 10px; padding: 7px 8px; }
.mood:hover { background: var(--bg); }
.mood.on { border-color: var(--ink); }
.mood .e { grid-row: 1 / 3; font-size: 20px; }
.mood .n { font-variant-numeric: tabular-nums; font-size: 14px; }
.mood .vs { font-size: 12px; color: var(--muted); margin-left: 6px; }
.mood .vs.up { color: #C2410C; font-weight: 600; }
.mood .bar { grid-column: 2 / 4; height: 6px; border-radius: 3px; background: var(--empty); overflow: hidden; }
.mood .bar i { display: block; height: 100%; border-radius: 3px; }
.boroughs { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 14px; }
.boroughs p { margin: 0 0 8px; }
.boroughs b { display: block; font-size: 13px; }
.boroughs:empty { display: none; }

.extra { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 28px 0 8px; }
.types { margin: 6px 0 0; padding-left: 22px; }
.types li { margin: 0 0 6px; }
.types .vs { color: var(--muted); font-size: 13px; }
.types .vs.up { color: #C2410C; font-weight: 600; }
.extra p { margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.extra strong { color: var(--ink); }
.fine { font-size: 13px !important; }

footer { max-width: 1180px; margin: 24px auto 0; padding: 18px 16px 32px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted); }
footer p { margin: 0 0 6px; }

@media (max-width: 860px) {
  .board, .extra { grid-template-columns: 1fr; }
  .top { flex-wrap: wrap; }
  #day-label { min-width: 120px; }
  .card { position: static; width: auto; margin: 12px; box-shadow: none; border: 1px solid var(--line); }
}

.card-moods { list-style: none; margin: 4px 0 0; padding: 0; }
.card-moods li { padding: 6px 0; border-top: 1px solid var(--line); }
.card-moods li:first-child { border-top: 0; }
.card-moods .row { display: flex; justify-content: space-between; gap: 8px; }
.card-moods .row b { font-variant-numeric: tabular-nums; }
.card-moods em { font-style: normal; font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 6px; margin-left: 4px; }
.card-moods .parts { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.card { max-height: calc(100% - 70px); overflow: auto; }
.fine-card { margin: 6px 0 0; font-size: 12px; color: var(--muted); }

.extra.three { grid-template-columns: repeat(3, 1fr); }
.extra .hint { margin: 0 0 8px; }
.agencies { list-style: none; margin: 6px 0 0; padding: 0; font-size: 14px; }
.agencies li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; margin: 0 0 8px; }
.agencies b { font-variant-numeric: tabular-nums; }
.agencies i { grid-column: 1 / 3; height: 5px; border-radius: 3px; background: var(--muted); opacity: .45; }
@media (max-width: 860px) { .extra.three { grid-template-columns: 1fr; } }
.extra.solo { grid-template-columns: minmax(0, 760px); }

.rare { padding: 28px 0 0; }
.rare .hint { margin: 0 0 12px; }
.rare-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.rare-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.rare-card .e { font-size: 22px; }
.rare-card h3 { font: 700 16px/1.3 var(--serif); margin: 6px 0 4px; }
.rare-card .quip { margin: 0 0 6px; font-size: 14px; }
.rare-card .meta { margin: 0; font-size: 12px; color: var(--muted); }

/* Lists: label + quiet note on the left, numbers in their own column */
.types { list-style: none; margin: 4px 0 0; padding: 0; }
.types li { margin: 0; }
.row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 9px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.badge { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 14px;
  background: color-mix(in srgb, var(--tint) 18%, transparent); flex: none; }
.lbl { display: flex; flex-direction: column; min-width: 0; }
.lbl .main { font-size: 15px; font-weight: 600; line-height: 1.25; display: flex; align-items: center; gap: 6px; }
.lbl .note { font-size: 12.5px; color: var(--muted); line-height: 1.35; margin-top: 1px; }
.num { display: flex; flex-direction: column; align-items: flex-end; gap: 3px;
  font: 600 17px/1 var(--serif); font-variant-numeric: tabular-nums; }
.pill { font: 600 11px/1 var(--sans); padding: 3px 6px; border-radius: 999px; letter-spacing: .01em; }
.pill.up { color: #C2410C; background: color-mix(in srgb, #F97316 16%, transparent); }
.pill.down { color: var(--muted); background: var(--empty); }
@media all { :root:not([data-theme="light"]) .pill.up { color: #FDBA74; } }

.spike { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 10px 0; border-top: 1px solid var(--line); }
.spike:first-child { border-top: 0; }
.spike .mult { font: 700 26px/1 var(--serif); color: #C2410C; font-variant-numeric: tabular-nums; padding-top: 2px; }
@media all { :root:not([data-theme="light"]) .spike .mult { color: #FDBA74; } }
.spike .badge { width: 22px; height: 22px; font-size: 12px; }
.agencies li { padding: 2px 0; }
.agencies span { font-size: 14px; font-weight: 600; }
.agencies b { font: 600 16px/1 var(--serif); font-variant-numeric: tabular-nums; }
.agencies li { align-items: baseline; }

.signature { margin: 4px 0 8px; padding: 8px 10px; border-radius: 10px; background: var(--bg); font-size: 13.5px; line-height: 1.35; }
.share { margin-top: 10px; width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 10px;
  padding: 8px 10px; font-size: 13px; text-align: center; }
.share:hover { border-color: var(--ink); }

/* Hover label */
.hover { position: absolute; top: 0; left: 0; z-index: 4; pointer-events: none; max-width: 260px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,.14); font-size: 13px; line-height: 1.3; }
.hover b { display: block; font: 700 14px/1.25 var(--serif); }
.hover span { color: var(--muted); }

/* Borough names */
#map .boro { font: 700 17px var(--sans); letter-spacing: .14em; fill: var(--ink); opacity: .55;
  pointer-events: none; text-anchor: middle; paint-order: stroke; stroke: var(--water); stroke-width: 3px; }

/* Search */
.search { pointer-events: auto; margin-left: auto; }
.search input { width: 210px; max-width: 100%; border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  border-radius: 999px; padding: 6px 12px; font: 13px var(--sans); }
.search input:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 860px) { .search { margin-left: 0; flex-basis: 100%; } .search input { width: 100%; font-size: 16px; padding: 8px 14px; } }  /* 16px stops iPhone Safari zooming the page on focus */
@media (max-width: 860px) { .map-mode { position: static; padding: 12px 12px 0; } }

/* Search results: small, at most 6 */
.search { position: relative; }
.results { position: absolute; right: 0; top: calc(100% + 6px); width: 260px; max-width: calc(100vw - 48px); z-index: 6;
  list-style: none; margin: 0; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.16); }
.results li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 8px; cursor: pointer;
  font-size: 13.5px; }
.results li b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results li span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.results li.on, .results li:hover { background: var(--bg); }
@media (max-width: 860px) { .results { left: 0; right: auto; width: 100%; } }

/* Selected neighborhood: fade others, bold outline, name on the map */
#map.has-sel path { opacity: .45; }
#map.has-sel path.sel { opacity: 1; stroke: var(--ink); stroke-width: 3; }
#map .sel-label { pointer-events: none; }
#map .sel-label rect { fill: var(--ink); }
#map .sel-label text { fill: var(--bg); font: 700 17px var(--sans); }
#map .sel-label.pulse { animation: sel-pop .5s ease-out; transform-box: fill-box; transform-origin: center; }
@keyframes sel-pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { #map .sel-label.pulse { animation: none; } }

.ramp { display: inline-block; width: 46px; height: 8px; border-radius: 4px; vertical-align: middle; margin: 0 2px;
  background: linear-gradient(90deg, var(--empty), var(--muted)); }

/* City switcher */
.brand { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.city-pick select { font: 600 15px var(--sans); color: var(--ink); background-color: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 26px 4px 10px; appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 13px) 55%, calc(100% - 9px) 55%; background-size: 4px 4px; background-repeat: no-repeat; }
.city-pick:has(select:not([hidden])) + .city { display: none; }

/* Today in 311 */
.extras { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; max-width: 700px; }
.extras li { font-size: 14.5px; color: var(--muted); background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 12px; }

/* Map text scales with tall maps (set in app.js as --txt) */
#map .boro { font-size: calc(17px * var(--txt, 1)); }
#map .sel-label text { font-size: calc(17px * var(--txt, 1)); }

/* ===================================================== header: city tabs */
.top { gap: 10px 18px; }
a.brand { text-decoration: none; color: var(--ink); white-space: nowrap; }
.city-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0;
  mask-image: linear-gradient(90deg, #000 92%, transparent); }
.city-tabs::-webkit-scrollbar { display: none; }
.city-tabs a { flex: none; text-decoration: none; color: var(--muted); font-size: 14px; padding: 6px 12px;
  border-radius: 999px; border: 1px solid transparent; white-space: nowrap; transition: color .15s, border-color .15s; }
.city-tabs a:hover { color: var(--ink); }
.city-tabs a.on { color: var(--ink); font-weight: 600; border-color: var(--ink); background: var(--panel); }
@media (max-width: 860px) {
  .top { flex-wrap: wrap; }
  .city-tabs { order: 3; flex-basis: 100%; }
}

/* ===================================================== front page */
body.is-home #city-view, body.is-home .day-nav { display: none; }
.home { max-width: 1180px; margin: 0 auto; padding: 8px 16px 0; }
.hero { padding: 28px 0 30px; max-width: 860px; }
.hero h1 { font: 700 clamp(36px, 6.4vw, 68px)/1.04 var(--serif); margin: 0; letter-spacing: -.01em; text-wrap: balance; }
.hero .rot { display: inline-block; color: var(--accent); transition: opacity .3s ease, transform .3s ease; }
.hero .rot.out { opacity: 0; transform: translateY(.18em); }
.hero .sub { font: 600 clamp(20px, 2.6vw, 28px)/1.2 var(--serif); margin: 12px 0 0; color: var(--muted); }
.hero-note { margin: 16px 0 0; max-width: 640px; color: var(--muted); font-size: 16px; }
.city-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.city-cards .city-card { flex: 1 1 200px; max-width: 280px; }
@media (max-width: 520px) { .city-cards .city-card { max-width: none; } }
.city-card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: transform .18s, box-shadow .18s, border-color .18s; }
.city-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,.14); border-color: var(--muted); }
.cc-map { background: var(--water); aspect-ratio: 4 / 3; }
.cc-map svg { display: block; width: 100%; height: 100%; }
.cc-map path { stroke: var(--water); stroke-width: .6; }
.cc-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cc-body h2 { font: 700 24px/1.1 var(--serif); margin: 0; }
.cc-hook { margin: 0; font-size: 14.5px; line-height: 1.4; }
.cc-hook b { font-weight: 700; box-shadow: inset 0 -.42em 0 color-mix(in srgb, var(--tint) 35%, transparent); }
.cc-rare { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.cc-rare:empty { display: none; }
.cc-rare i { color: var(--ink); font-style: italic; }
.cc-head { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.4; flex: 1; }
.cc-foot { margin: 6px 0 0; display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); }
.cc-open { color: var(--ink); font-weight: 600; white-space: nowrap; }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 40px 0 8px; }
.how span { font-size: 24px; }
.how h3 { font: 700 18px/1.25 var(--serif); margin: 6px 0 4px; }
.how p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 860px) { .how { grid-template-columns: 1fr; gap: 18px; } }
.hero h1 .line { display: block; white-space: nowrap; }
@media (max-width: 520px) { .hero h1 .line { white-space: normal; } }

/* ===================================================== city cards: minimalist */
.city-cards .city-card { flex: 1 1 210px; max-width: 260px; }
.cc-body { padding: 16px 18px 16px; gap: 0; }
.cc-body h2 { font: 700 22px/1.15 var(--serif); margin: 0 0 12px; }
.cc-stat { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.cc-stat .badge { width: 28px; height: 28px; font-size: 15px; }
.cc-stat b { font: 700 26px/1 var(--serif); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.cc-stat .unit { font-size: 13px; color: var(--muted); }
.cc-label { margin: 8px 0 0; font-size: 14px; line-height: 1.35; font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc-rare { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-rare i { color: var(--muted); }
.cc-foot { margin: auto 0 0; padding-top: 14px; display: flex; justify-content: space-between; align-items: center;
  font-size: 12.5px; color: var(--muted); }
.cc-open { font-size: 16px; color: var(--ink); transition: transform .18s; }
.city-card:hover .cc-open { transform: translateX(3px); }
@media (max-width: 520px) { .city-cards .city-card { max-width: none; flex-basis: 100%; } }

/* card: commentary line, stat label, two-line rare find */
.cc-body h2 { margin-bottom: 4px; }
.cc-line { margin: 0 0 12px; font: italic 15px/1.35 var(--serif); color: var(--ink); }
.cc-line:empty { display: none; }
.cc-body h2 + .cc-line:empty + .cc-kicker { margin-top: 8px; }
.cc-kicker { margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cc-rare { white-space: normal; text-overflow: clip; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4; }

/* ===================================================== map zoom */
#map { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
#map.zoomed { touch-action: none; cursor: grab; }
#map.dragging, #map.dragging path { cursor: grabbing; }
#map path { vector-effect: non-scaling-stroke; }
#map .boro { font-size: calc(17px * var(--txt, 1) / var(--z, 1)); vector-effect: non-scaling-stroke; }
#map .sel-label text { font-size: calc(17px * var(--txt, 1) / var(--z, 1)); }
.zoom-ctl { position: absolute; right: 12px; bottom: 12px; z-index: 3; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.zoom-ctl button { width: 36px; height: 34px; border: 0; background: none; font-size: 18px; line-height: 1; color: var(--ink); }
.zoom-ctl button + button { border-top: 1px solid var(--line); }
.zoom-ctl button:hover:not(:disabled) { background: var(--bg); }
.zoom-ctl button:disabled { color: var(--muted); opacity: .45; cursor: default; }
.zoom-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 3; pointer-events: none;
  background: rgba(20,22,27,.82); color: #fff; font-size: 13px; padding: 7px 12px; border-radius: 999px; white-space: nowrap; }
@media (max-width: 860px) { .zoom-hint { display: none; } }

/* front page: section heading and card mood block */
.cards-head { margin: 0 0 14px; }
.cards-head h2 { font: 700 22px/1.2 var(--serif); margin: 0; }
.cards-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.cc-mood { margin: 0 0 14px; }
.cc-mood .cc-kicker { margin-bottom: 3px; }
.cc-mood .cc-line { margin: 0; }
.cc-body h2 { margin-bottom: 10px; }
a.brand { display: inline-flex; align-items: center; gap: 8px; }
a.brand img { display: block; }
/* zoom buttons as a short row so they cover less of the map's corner */
.zoom-ctl { flex-direction: row; }
.zoom-ctl button { width: 34px; height: 32px; }
.zoom-ctl button + button { border-top: 0; border-left: 1px solid var(--line); }


/* ===================================================== map text in real screen pixels (--u set in app.js) */
#map .boro { font-size: calc(var(--u, 1.5) * 11px); }
#map .sel-label text { font-size: calc(var(--u, 1.5) * 14px); }

/* ===================================================== phone: bar on the map pointing to the details */
.peek { display: none; }
@media (max-width: 860px) {
  .peek:not([hidden]) { display: flex; align-items: center; gap: 8px; position: absolute; left: 10px; right: 10px; bottom: 10px;
    z-index: 4; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel);
    color: var(--ink); font-size: 14px; text-align: left; box-shadow: 0 6px 18px rgba(0,0,0,.22); }
  .peek .pk-name { font: 700 15px/1.2 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .peek .pk-top { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
  .peek .pk-go { font-weight: 700; white-space: nowrap; }
  .map-wrap.has-peek .zoom-ctl { bottom: 62px; }
}

/* the map and its overlays (hover, zoom buttons, phone details bar) share one frame */
.map-stage { position: relative; }

/* phone details bar: open button + close button */
@media (max-width: 860px) {
  .peek:not([hidden]) { padding: 0; gap: 0; overflow: hidden; }
  .peek .pk-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 10px 6px 10px 12px;
    border: 0; background: none; color: inherit; text-align: left; font: inherit; }
  .peek .pk-close { flex: none; width: 46px; align-self: stretch; border: 0; border-left: 1px solid var(--line);
    background: none; color: var(--ink); font-size: 22px; line-height: 1; }
  .peek .pk-close:active { background: var(--bg); }
  /* the card's own close button sits in the card's corner, not the map's */
  .card { position: relative; }
  .card .close { top: 10px; right: 10px; width: 36px; height: 36px; font-size: 22px; border-radius: 50%; }
}

/* "Don't see your city?" ask, under the city cards on the home page */
.ask-city { display: flex; align-items: center; gap: 14px; max-width: 620px; margin: 22px auto 0; padding: 14px 18px;
  background: var(--panel); border: 1px dashed var(--line); border-radius: 14px; color: var(--ink); text-decoration: none;
  transition: border-color .15s; }
.ask-city:hover, .ask-city:focus-visible { border-color: var(--accent); border-style: solid; }
.ask-emoji { font-size: 24px; }
.ask-text { flex: 1; font-size: 15px; line-height: 1.4; }
.ask-text small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.ask-go { color: var(--accent); font-size: 20px; font-weight: 600; }
