/* PLUB · Placemaking Laboratory Urban Bureau — civic daylight register.
   Radius 0, no shadows, no gradients. One ink (Pansy Purple, Wada plate 273),
   one accent (Red Orange) with one job, four type sizes: 20 / 14 / 12 / 11.
   Everything is self-hosted: no third-party font request, no visitor leaves the site. */

/* Jost — the Latin UI face (house face). Variable: one file covers 100–900.
   SIL Open Font License 1.1, see fonts/OFL-Jost.txt. */
@font-face { font-family: "Jost"; src: url("fonts/jost-latin.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; 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; }
@font-face { font-family: "Jost"; src: url("fonts/jost-latin-ext.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; 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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Prompt — the Thai face, non-looped (a looped Thai head reads as "not made by Thais").
   SIL Open Font License 1.1, see fonts/OFL-Prompt.txt. */
@font-face { font-family: "Prompt"; src: url("fonts/prompt-thai-400.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Prompt"; src: url("fonts/prompt-thai-500.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Prompt"; src: url("fonts/prompt-latin-400.woff2") format("woff2"); font-weight: 400; font-display: swap; 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; }
@font-face { font-family: "Prompt"; src: url("fonts/prompt-latin-500.woff2") format("woff2"); font-weight: 500; font-display: swap; 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; }
@font-face { font-family: "Prompt"; src: url("fonts/prompt-latin-ext-400.woff2") format("woff2"); font-weight: 400; font-display: swap; 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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Prompt"; src: url("fonts/prompt-latin-ext-500.woff2") format("woff2"); font-weight: 500; font-display: swap; 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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Sao Chingcha: Dr Non's own lettering. PL;UB is read as Placemaking Laboratory ; Urban Bureau. */
@font-face { font-family: "Sao Chingcha"; src: url("fonts/SaoChingcha-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
/* Non's own handwriting (Non Architecture, 2026): Latin, digits, basic punctuation only.
   Used for voice, never for data: Plub's lines, each neighbourhood's purpose, Non's own visit notes. */
@font-face { font-family: "Non Architecture"; src: url("fonts/NonArchitecture-Regular.woff2") format("woff2"); font-display: swap; }
.hand, .plub-say q, .hood-mood .for { font-family: "Non Architecture", "Jost", sans-serif; font-weight: 400; letter-spacing: .01em; }
.plub-say q { font-size: var(--big); line-height: 1.3; }
/* one small hand-drawn mark: a squiggle under the neighbourhood's purpose */
.hood-mood .for { padding-bottom: 6px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='8' viewBox='0 0 60 8'%3E%3Cpath d='M1 5 q6 -5 12 0 t12 0 t12 0 t12 0' fill='none' stroke='%237d133a' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") left bottom / 60px 8px no-repeat; }

:root {
  /* Paper and ground */
  --paper: #ffffff;
  --wash: #f4f4f0;
  --guide: #f9c1ce;          /* Hermosa Pink, plate 273 — Nong Plub's bounded surfaces */
  --seam: #e88ba1;           /* the semicolon in the wordmark, nowhere else */
  /* One ink. Pansy Purple, Wada plate 273. Every reading mark and every hairline. */
  --ink: #7d133a;
  --ink-80: #974261;         /* 6.43:1 on white — secondary text */
  --ink-45: #c08da2;         /* a quiet tint of the same ink, for fills only */
  --muted: var(--ink-80);
  --rule: #b6bfc1;           /* Neutral Gray, plate 273 — hairlines and arcs */
  /* The one accent. One job: the co-working category mark. Red Orange, plate 241 — the
     only catalogue colour no neighbourhood ground and no data role already wears. */
  --accent: #dd4027;
  /* Catalogue data chord, Wada plate 320 — the map's category fills and pins. */
  --cat-cafe: #f58e84; --cat-cowork: #f5ecc2; --cat-library: #819238; --cat-food: #a5c8d1; --cat-cannabis: #87c540;
  /* Four type sizes. The wordmark is a logotype, not a type size. */
  --big: 20px; --body: 14px; --small: 12px; --micro: 11px;
  /* Motion: one duration, one curve. A state change is noticed once, then it is still. */
  --motion: 160ms; --ease: cubic-bezier(.2,.6,.2,1);
  --font: "Jost", "Prompt", sans-serif;
  --thai: "Prompt", "Jost", sans-serif;
  --pad: 12px;
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  font: 400 var(--body)/1.45 var(--font); color: var(--ink); background: var(--paper);
  display: grid; grid-template: "bar" auto "chips" auto "map" 1fr / 100%;
  height: 100dvh; overflow: hidden;
}
/* Thai carries stacked vowel and tone marks: it needs more leading than Latin and
   must never be tracked, or the marks break apart. */
:lang(th), .th { font-family: var(--thai); line-height: 1.65; letter-spacing: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.micro { font-size: var(--micro); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* Bar: brand anchor + focal search + clear action tools, one unified identity line */
.bar { grid-area: bar; position: relative; display: flex; align-items: center; gap: 10px;
  padding: 8px var(--pad); border-bottom: 1px solid var(--rule); background: var(--paper); }
.bar-brand { display: flex; align-items: center; padding-right: 12px; border-right: 1px solid var(--rule); flex: none; }
/* The wordmark: PL;UB in his lettering. The semicolon is the seam between the two phrases. */
.mark { font: 700 17px/1 "Sao Chingcha", var(--font); letter-spacing: .07em; text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; }
.mark .semi { color: #e88ba1; display: inline-flex; align-items: center; }
.plub-badge { display:inline-block; width:22px; height:22px; object-fit:cover; object-position:center top; border-radius:50%; }
.brand-hero { display: block; width: 104px; height: 104px; }
.search { flex: 1; position: relative; display: flex; align-items: center; min-width: 0; }
.search-lens { position: absolute; left: 10px; color: var(--muted); font-size: 14px; pointer-events: none; line-height: 1; }
.search input { width: 100%; min-height: 36px; padding: 6px 10px 6px 28px; font: inherit; font-size: var(--body); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 0; background: var(--paper); }
.search input:focus { outline: none; border-color: var(--ink); background: var(--paper); }

.bar-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.bar-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border: 1px solid var(--rule);
  color: var(--ink); font: 500 var(--body)/1 var(--font); white-space: nowrap; background: var(--paper); cursor: pointer; }
.bar-btn:hover { border-color: var(--ink); }
.bar-btn svg { display: block; }
.count-badge { display: inline-block; padding: 2px 5px; font-size: var(--micro); font-weight: 600; font-variant-numeric: tabular-nums;
  background: var(--wash); border: 1px solid var(--rule); line-height: 1; }
.btn-lbl { font-size: var(--small); font-weight: 500; }
.iconbtn { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 36px; min-width: 36px; }
.plub-btn { padding: 0 8px; }
.pass-btn { padding: 0 8px; }
.hits { position: absolute; z-index: 30; top: 100%; left: 0; right: 0; list-style: none; padding: 0;
  background: var(--paper); border-bottom: 1px solid var(--ink); max-height: 60dvh; overflow-y: auto; }
.hits li, .list li { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px var(--pad);
  border-top: 1px solid var(--rule); cursor: pointer; }
.hits li[aria-selected="true"], .hits li:hover, .list li:hover { background: var(--wash); }
.hits .nm, .list .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hits .meta, .list .meta { color: var(--muted); font-size: var(--micro); white-space: nowrap; }

/* Chips: one scrolling row on phone, label-plus-padding boxes */
.chips { grid-area: chips; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 4px var(--pad);
  border-bottom: 1px solid var(--rule); }
.chips::-webkit-scrollbar { display: none; }
.chips button { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 8px;
  white-space: nowrap; border: 1px solid var(--rule); color: var(--muted); }
/* Owner audit 4 Nov, one strip: resting filters must not be three filled posters.
   Filters are instruments: on = ink edge and ink label, off = hairline and muted.
   Filled ground stays for primary actions inside sheets — never for resting chrome. */
.chips button[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); }
.chips .sep { display: none; }
.count { margin-left: auto; padding-left: 8px; color: var(--muted); font-size: var(--micro); white-space: nowrap; }
.moods { flex: none; display: flex; gap: 4px; padding: 6px var(--pad) 0; overflow-x: auto; scrollbar-width: none; }
.moods button, .moods a { flex: none; height: 32px; padding: 0 8px; white-space: nowrap; border: 1px solid var(--ink); }
.moods a { display:inline-flex; align-items:center; text-decoration:none; color:var(--ink); }
.moods button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.mood-bar { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 6px var(--pad) 0; padding: 6px 0 6px 10px; border-left: 3px solid var(--ink); }
.mood-bar[hidden] { display: none; }
.mood-bar .how { flex-basis: 100%; color: var(--muted); font-size: var(--micro); max-width: 65ch; }
.mood-bar .close { margin: -6px 0 -6px auto; width: 32px; height: 32px; }
.mood-dot { color: var(--ink); }
.moods [data-act] { background: var(--ink); color: var(--paper); }
.now-ctl { display: grid; gap: 6px; margin-top: 8px; }
.mini-plub { flex: none; margin: -6px 4px -6px -4px; }
.mini-plub svg { display: block; }
.feel.needs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.feel.needs button { flex: none; padding: 0 7px; }
.now-ctl .seg { display: flex; gap: 4px; }
.now-ctl .seg button { flex: 1; }
.now-list { list-style: none; padding: 0; margin-top: 8px; }
.now-list li { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--rule); }
.now-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.now-body .nm { text-align: left; font-weight: 500; }
.needs-met { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: var(--micro); }
.needs-met .ok { color: var(--ink); } .needs-met .unk { color: var(--muted); }
.go { display: flex; gap: 14px; }
.go a { display: inline-flex; align-items: center; min-height: 32px; text-decoration: underline; text-underline-offset: 3px; }
.hop-starts { margin-top: 10px; }
.flags { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px var(--pad) 0; }
.flags button { display: inline-flex; align-items: center; height: 32px; padding: 0 8px; white-space: nowrap; border: 1px solid var(--rule); }
.flags button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.cafe { background: var(--ink); }
.dot.coworking { background: var(--accent); }
.dot.library { background: var(--paper); box-shadow: inset 0 0 0 2px var(--ink); }
.dot.restaurant { background: var(--ink-45); }
.dot.cannabis { background: var(--cat-cannabis); }

#map { grid-area: map; min-height: 0; background: var(--guide); } /* Grand Budapest ground before the first tile arrives */
.phone-only { }
.idx { min-width: 2.2em; text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.hits .missing { min-height: 36px; font-size: var(--micro); }
.hits .missing a { text-decoration: underline; text-underline-offset: 3px; }
.hits .ring { width: 12px; height: 12px; border: 1.5px dashed var(--ink); border-radius: 50%; flex: none; }
.hits .th { display: inline; color: var(--muted); }

/* Phone: the list stays hidden; a place opens as a bottom sheet over the lower map */
.side { display: contents; }
.list-wrap { display: none; }
.sheet { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; max-height: 58dvh; overflow-y: auto;
  background: var(--paper); border-top: 2px solid var(--ink);
  padding: var(--pad) var(--pad) calc(var(--pad) + env(safe-area-inset-bottom)); }
.sheet[hidden] { display: none; }

.sheet header { display: flex; align-items: flex-start; gap: 8px; }
.sheet h1 { flex: 0 1 auto; margin-right:auto; min-width:0; font-size: var(--big); font-weight: 500; line-height: 1.2; }
.sheet .th { display: block; font-size: var(--body); color: var(--muted); font-weight: 400; margin-top: 2px; }
.close { width: 44px; height: 44px; margin: -10px -10px 0 0; font-size: var(--big); line-height: 1; }
.kindline { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--muted); }
.place-sheet h1 { font-weight: 600; overflow-wrap: anywhere; }
.place-sheet h1:focus { outline: none; }
.facts { list-style: none; padding: 0; margin-top: 5px; }
.facts > li { display: grid; grid-template-columns: 1.15em minmax(0, 1fr); gap: 6px; align-items: baseline; padding-block: 1px; }
.facts .sym { color: var(--muted); text-align: center; }
.fact-value { overflow-wrap: anywhere; }
.place-contact { display: flex; flex-wrap: wrap; gap: 0 12px; }
.place-contact a { padding-block: 4px; }
.place-sheet .place-actions { display: flex; flex-wrap: wrap; align-items: start; gap: 6px; margin-top: 5px; }
.place-sheet .place-actions > a { background: var(--ink); color: var(--paper); padding-inline: 12px; }
.place-sheet .place-actions .been-open { background: var(--paper); color: var(--ink); border: 1px solid var(--rule); padding-inline: 12px; }
.place-sheet .place-actions .been-form { flex: 0 0 100%; }
.place-sheet .place-social { gap: 0 12px; border-bottom: 0; }
.place-sheet .place-social button { padding-inline: 0; }
.place-sheet .place-visit-report { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--rule); }
.place-visit-report h2 { font-size: var(--body); font-weight: 600; }
.place-visit-report h2 span { color: var(--muted); font-weight: 400; }
.place-visit-report > a { display: inline-flex; min-height: 32px; align-items: center; }
.place-description { margin-top: 8px; }

.scores { margin-top: 12px; border-top: 1px solid var(--rule); padding-top: 10px; }
.scores table { border-collapse: collapse; margin-top: 6px; }
.scores td { padding: 2px 16px 2px 0; }
.scores td:last-child { color: var(--muted); font-size: var(--micro); white-space: nowrap; }
.bars { letter-spacing: 2px; }
.bars b { font-weight: 400; color: var(--ink); }
.bars s { text-decoration: none; color: var(--rule); }

.rate { margin-top: 10px; display: grid; grid-template-columns: repeat(4, max-content); gap: 4px; align-items: center; }
.rate > span { padding-right: 8px; }
.seg { display: grid; grid-column: span 3; grid-template-columns: subgrid; }
.seg button { height: 32px; padding: 0 12px; border: 1px solid var(--rule); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.send { grid-column: 1 / -1; justify-self: start; height: 44px; padding: 0 16px; margin-top: 4px; background: var(--ink); color: var(--paper); }
.send:disabled { background: var(--rule); color: var(--muted); cursor: default; }
.note { grid-column: 1 / -1; color: var(--muted); font-size: var(--micro); }
.note:empty { display: none; }
.rate[hidden] { display: none; }
.rate-open { margin-top: 8px; }

.links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rule); }
.links a, .links button, .links label { display: inline-flex; align-items: center; min-height: 32px; text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer; }
.src { margin-top: 8px; color: var(--muted); font-size: var(--micro); }
.about p { max-width: 65ch; margin-top: 8px; }

.sheet section { margin-top: 14px; }
.sheet h2.micro { margin-bottom: 6px; }
.big { font-size: var(--big); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.big small { font-size: var(--body); color: var(--muted); font-weight: 400; }
.data-note { color: var(--muted); font-size: var(--micro); margin-top: 6px; max-width: 65ch; }
.linkish { text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }

/* Nong Plub beside her line: art at the size it reads, standing on a hairline */
.plub-say { display: flex; align-items: center; gap: 12px; margin-top: 8px; border-bottom: 1px solid var(--rule); }
.plub-say svg { flex: none; margin-bottom: -1px; }
.plub-say p { padding-bottom: 10px; max-width: 46ch; }
.plub-say q { display: block; quotes: none; }
.plub-say .for { display: block; font-size: var(--big); font-weight: 500; }
.plub-say .th { margin: 0 0 6px; }

/* Great Good Place glyph */
.ggp { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; }
.ggp-num { display: flex; flex-direction: column; gap: 4px; }
.ggp-table { grid-column: 1 / -1; border-collapse: collapse; width: 100%; }
.ggp-table td { padding: 3px 8px 3px 0; vertical-align: top; }
.ggp-table .sym { width: 18px; color: var(--muted); text-align: center; }
.ggp-table .raw { color: var(--muted); font-size: var(--micro); }
.ggp-table.how td { padding-top: 6px; }
.ggp-table .what { color: var(--muted); }
.cov { display: inline-block; width: 48px; height: 6px; background: var(--wash); margin-right: 6px; vertical-align: middle; }
.cov i { display: block; height: 100%; background: var(--ink); }
.hist { width: 100%; height: auto; margin-bottom: 6px; }
.hist text { font-size: var(--micro); fill: var(--muted); font-family: var(--font); }
.ggp-table .why td { padding-top: 0; color: var(--muted); font-size: var(--micro); }

/* been here */
.been { border-top: 1px solid var(--rule); padding-top: 10px; }
.been-form { display: grid; gap: 8px; }
.stars-pick button { width: 36px; height: 36px; font-size: var(--big); color: var(--rule); }
.stars-pick button[aria-pressed="true"] { color: var(--ink); }
.feel { display: flex; flex-wrap: wrap; gap: 4px; }
.feel button { height: 32px; padding: 0 10px; border: 1px solid var(--rule); }
.feel button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.work-q summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; color: var(--muted); }
.work-q .rate { margin-top: 6px; }
.been-form textarea { font: inherit; padding: 8px; border: 1px solid var(--rule); border-radius: 0; resize: vertical; }
.photo-pick { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border: 1px dashed var(--ink); cursor: pointer; justify-self: start; }
.moments { list-style: none; padding: 0; margin-top: 8px; }
.moment { border-left: 2px solid var(--ink); padding: 4px 0 8px 10px; margin-bottom: 8px; }
.moment-head { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: var(--micro); }
.moment-head .del { margin-left: auto; width: 32px; height: 32px; }
.stars { color: var(--ink); letter-spacing: 1px; }
.stars s { text-decoration: none; color: var(--rule); }
.words { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.words span { padding: 1px 6px; border: 1px solid var(--rule); font-size: var(--micro); }
.moment p { margin-top: 4px; max-width: 65ch; }
.thumbs { display: flex; gap: 4px; margin-top: 6px; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; display: block; }
.moment-place { display: flex; align-items: center; gap: 6px; min-height: 32px; cursor: pointer; }

/* neighbourhood infographics */
.hood-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 12px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.strip, .comp, .comp-legend, .hood-stats .data-note { grid-column: 1 / -1; }
.strip { width: 100%; height: auto; overflow: visible; }
.strip text { font-size: var(--micro); fill: var(--muted); font-family: var(--font); }
.comp { display: flex; height: 10px; }
.comp i { display: block; min-width: 2px; }
.seg-cafe { background: var(--ink); } .seg-coworking { background: var(--accent); }
.seg-library { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink); } .seg-restaurant { background: var(--ink-45); }
.seg-cannabis { background: var(--cat-cannabis); }
.comp-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--micro); color: var(--muted); }
.comp-legend span { display: inline-flex; align-items: center; gap: 4px; }
.traits { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.traits li { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid var(--rule); color: var(--muted); font-size: var(--micro); }
.traits li.on { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.story p { max-width: 65ch; margin-top: 8px; }
.walk, .line, .board, .stamps { list-style: none; padding: 0; }
.walk li, .line li { position: relative; display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
.walk li::before, .line li::before { content: ""; position: absolute; left: 11px; top: 0; bottom: 0; width: 2px; background: var(--ink); }
.walk li:first-child::before, .line li:first-child::before { top: 50%; }
.walk li:last-child::before, .line li:last-child::before { bottom: 50%; }
.stop { position: relative; z-index: 1; flex: none; width: 24px; height: 24px; border: 2px solid var(--ink); border-radius: 50%;
  background: var(--paper); display: inline-flex; align-items: center; justify-content: center; font-size: var(--micro); font-weight: 600; }
.stop.stamped { background: var(--ink); color: var(--paper); }
.walk .nm, .line .nm { flex: 1; min-width: 0; }
.line .nm .micro { display: block; }
.line .th { display: inline; }
.line .meta, .walk .idx { color: var(--muted); font-size: var(--micro); white-space: nowrap; }
.walk li:hover, .line li:hover { background: var(--wash); }
.board li { display: grid; grid-template-columns: 9.5em 1fr 2.5em; gap: 8px; align-items: center; min-height: 24px; }
.board .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barwrap { height: 8px; background: var(--wash); }
.barwrap i { display: block; height: 100%; background: var(--ink-45); }
.board li.hl .barwrap i { background: var(--ink); }
.board li.hl .nm { font-weight: 600; }
.board .meta { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.stamps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stamps li { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; text-align: center; }
.stamp { width: 76px; height: 76px; border: 2px dashed var(--rule); border-radius: 50%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: var(--muted); font-size: var(--micro); }
.stamp b { font-weight: 600; }
.stamp .th { display: block; margin: 0; font-size: var(--micro); }
/* Stamp board is a named `modular` grid; this tilt is the deliberate ink-stamp mark, not a stray break. No other rotation is licensed (see STYLE.md). */
.stamps li.on .stamp { border: 2px solid var(--ink); color: var(--ink); background: var(--wash); transform: rotate(-6deg); }
.sorts { flex: none; display: flex; gap: 0; padding: 6px var(--pad); border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: none; }
.sorts button { height: 32px; padding: 0 5px; white-space: nowrap; color: var(--muted); border-bottom: 2px solid transparent; }
.sorts button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 500; }
.sorts .list-close { margin: 0 -8px 0 auto; height: 32px; }

/* phone list: a bottom sheet the user asked for */
@media (max-width: 899px) {
  .list-wrap.open { display: flex; flex-direction: column; position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
    max-height: 58dvh; background: var(--paper); border-top: 2px solid var(--ink); padding-bottom: env(safe-area-inset-bottom); }
  .list-wrap.open .list { list-style: none; padding: 0; overflow-y: auto; }
}

/* MapLibre chrome, flattened to the house style */
.maplibregl-ctrl-group { border-radius: 0 !important; box-shadow: none !important; border: 1px solid var(--rule); }
.maplibregl-ctrl-group button { width: 44px !important; height: 44px !important; }
.maplibregl-ctrl-attrib, .maplibregl-ctrl-attrib-button { border-radius: 0 !important; }
.maplibregl-ctrl-attrib { font: 400 var(--micro)/1.4 var(--font) !important; }
.maplibregl-ctrl-attrib-button { position: relative; }
.maplibregl-ctrl-attrib-button::after { content: ""; position: absolute; inset: -10px; }
/* Collapsed attribution is its icon and nothing else (MSH: no box wider than its content). */
.maplibregl-ctrl-attrib.maplibregl-compact:not(.maplibregl-compact-show) { padding: 2px !important; min-height: 0; }

/* Manga lens: one map control, in the house instrument language. Line and tone, not a poster. */
.manga-ctrl { margin-top: 4px; }
.manga-ctrl .manga-toggle { display: grid; place-items: center; background-color: var(--paper); color: var(--muted); }
.manga-ctrl .manga-toggle[aria-pressed="true"] { color: var(--ink); background-color: var(--wash); }
.manga-ctrl .manga-toggle:disabled { color: var(--muted); opacity: .55; cursor: default; }

/* Desktop: a 360px instrument column, map takes the rest (~75% at 1440) */
@media (min-width: 900px) {
  body { grid-template: "bar map" auto "chips map" auto "side map" 1fr / 360px 1fr; }
  .bar, .chips, .side { border-right: 1px solid var(--rule); }
  .side { grid-area: side; display: flex; flex-direction: column; min-height: 0; }
  .list-wrap { display: flex; flex-direction: column; min-height: 0; flex: 1; }
  .list-wrap h2 { padding: 10px var(--pad) 6px; }
  .list { list-style: none; padding: 0; overflow-y: auto; flex: 1; }
  .sheet { position: static; order: -1; flex: none; max-height: 70%; border-top: 0; border-bottom: 2px solid var(--ink); }
  .hits { max-height: 70dvh; }
  .phone-only { display: none !important; }
  .sheet { max-height: 78%; }
  .side:has(.place-sheet:not([hidden])) .list-wrap { display: none; }
  .side .place-sheet { max-height: 100%; border-bottom: 0; }
  .search-lens { left: 6px; }
  .search input { padding-inline: 19px 4px; }
}

/* Motion, kept to one short curve. Colour and border changes ease; nothing bounces,
   nothing loops, and a panel that opens settles rather than springs. */
button, a, summary, .list li, .hits li, .chips button, .flags button, .wa-row,
.mood-bar, .hits, .atlas-state, .atlas-reset {
  transition: background-color var(--motion) var(--ease), color var(--motion) var(--ease),
              border-color var(--motion) var(--ease), opacity var(--motion) var(--ease);
}
@media (max-width:899px) {
  /* The phone sheet is an overlay: it rises a little as it arrives, and stops. */
  .sheet:not([hidden]), .list-wrap.open { animation: plub-rise var(--motion) var(--ease) both; }
}
@keyframes plub-rise { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

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

/* neighbourhood sheet: the places first; numbers and story one tap away */
.hood-more { margin-top: 12px; border-top: 1px solid var(--rule); }
.hood-more > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 500; }
.hood-more[open] > summary { margin-bottom: 4px; }

/* branch label after a repeated name: quiet, never louder than the name */
.branch { color: var(--muted); font-weight: 400; }
.place-visit-report h2 { font-size: var(--micro); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.cannabis-law { margin: 10px 0; padding: 8px 10px; border-left: 2px solid var(--cat-cannabis); background: var(--wash); }
.cannabis-law p { font-size: var(--micro); line-height: 1.5; color: var(--ink); margin-top: 2px; }
