/*
 * Taste Atlas — editorial field guide.
 * Palette and rhythm follow hanabidesign.com: paper ground, ink text, hairline
 * rules instead of card chrome, square corners, one vermilion accent spent
 * sparingly. Numerals are set in a serif and used as anchors, the way an
 * editorial masthead numbers its sections.
 */

:root {
  /* hanabidesign.com tokens */
  --paper: #f3f4f4;
  --paper-2: #ebeef0;
  --paper-3: #dfe3e5;
  --surface: #fbfcfc;
  --ink: #17191a;
  --ink-soft: #363a3c;
  --muted: #676d70;
  --rule: #d0d6d9;
  --rule-strong: #9ba3a7;

  /* the single accent, rationed */
  --accent: #f62200;
  --accent-soft: #fde8e4;
  /* The accent at text size: 12px #f62200 is 3.70:1 on paper, under the 4.5:1
     small-text floor. Same hue, darker: 5.52:1 on paper, 5.92:1 on surface.
     Any red text under 18px uses this; rules, pins and fills keep --accent. */
  --accent-ink: oklch(0.52 0.2 33);

  --font-ui: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", -apple-system, system-ui, sans-serif;
  --font-numeral: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, ui-serif, serif;

  --step-eyebrow: 0.6875rem;
  --step-meta: 0.75rem;
  --step-body: 0.9375rem;
  --step-row: 1rem;
  --step-title: clamp(1.625rem, 7vw, 2rem);
  --step-display: clamp(2rem, 9vw, 2.5rem);

  --gutter: 20px;
  --space-tight: 6px;
  --space-row: 14px;
  --space-block: 20px;
  --space-chapter: 34px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 160ms;

  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  font-family: var(--font-ui);
  font-size: var(--step-body);
  line-height: 1.55;
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

.app {
  min-height: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  border-inline: 1px solid var(--rule);
}

/* ---------- masthead ---------- */

header {
  padding: var(--gutter) var(--gutter) var(--space-block);
  padding-top: max(var(--gutter), env(safe-area-inset-top));
  border-bottom: 1px solid var(--ink);
}

.brand {
  margin: 0 0 10px;
  font-family: var(--font-numeral);
  font-size: var(--step-eyebrow);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: var(--step-title);
  font-weight: 620;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h2 {
  margin: 0 0 var(--space-tight);
  font-size: var(--step-display);
  font-weight: 620;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

main {
  flex: 1;
  padding: var(--space-block) var(--gutter) 108px;
}

.app.gate nav { display: none; }
.app.gate main { padding-bottom: max(28px, env(safe-area-inset-bottom)); }

.landing .primary { margin-top: var(--space-block); }

.plate { margin: 0 0 var(--space-block); }
.plate img, .plate-row img {
  display: block;
  width: 100%;
  object-fit: cover;
}
.plate img { height: 168px; }
.plate.tall img { height: 232px; }
.plate.short img { height: 112px; }
.plate-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: var(--space-block) 0;
}
.plate-row img { height: 132px; }

/* ---------- editorial micro-labels ---------- */

.eyebrow {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: var(--space-chapter) 0 var(--space-row);
  font-size: var(--step-eyebrow);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.eyebrow .num {
  font-family: var(--font-numeral);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--ink);
}

main > .eyebrow:first-child { margin-top: 0; }

.lead {
  margin: 0 0 var(--space-block);
  font-size: var(--step-body);
  line-height: 1.6;
  color: var(--ink-soft);
}

.meta {
  margin: 2px 0 0;
  font-size: var(--step-meta);
  line-height: 1.5;
  color: var(--muted);
}

.error {
  margin: var(--space-tight) 0;
  min-height: 1.2em;
  font-size: var(--step-meta);
  color: var(--accent-ink);
}

/* ---------- rows: hairlines, not boxes ---------- */

.row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: var(--space-row) 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
}

.row:first-of-type { border-top: 1px solid var(--rule); }
.row:active { background: var(--paper-2); }

.row strong {
  display: block;
  font-size: var(--step-row);
  font-weight: 560;
  letter-spacing: -0.01em;
}

.badge {
  flex: none;
  font-family: var(--font-numeral);
  font-size: var(--step-meta);
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

.badge.now { color: var(--accent-ink); }

/* ---------- stat strip ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: var(--space-block);
  border-block: 1px solid var(--ink);
}

.stats div {
  padding: 12px 4px;
  text-align: center;
  border-left: 1px solid var(--rule);
}

.stats div:first-child { border-left: 0; }

.stats b {
  display: block;
  font-family: var(--font-numeral);
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.stats span {
  font-size: var(--step-eyebrow);
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ---------- cards: a single hairline, paper inset for evidence ---------- */

.card {
  padding: var(--space-row) 0;
  border-bottom: 1px solid var(--rule);
}

.card:first-of-type { border-top: 1px solid var(--rule); }

.card strong {
  display: block;
  font-size: var(--step-row);
  font-weight: 560;
}

.card a { color: var(--ink); text-underline-offset: 3px; }

blockquote {
  margin: var(--space-tight) 0 10px;
  padding: 2px 0 2px 14px;
  border-left: 2px solid var(--accent);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
}

/* ---------- controls ---------- */

label, .field {
  display: flex;
  flex-direction: column;
  gap: var(--space-tight);
  margin-bottom: var(--space-row);
  font-size: var(--step-eyebrow);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

input, textarea, select {
  font: inherit;
  font-size: 1rem;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink);
  padding: 11px 12px;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: var(--surface);
  appearance: none;
}

input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

textarea { min-height: 92px; resize: vertical; }

select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 16px) 51%, calc(100% - 11px) 51%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

input[type='file'] {
  padding: 9px 10px;
  font-size: var(--step-meta);
  background: var(--paper-2);
}

button.primary, button.ghost, a.primary {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 14px;
  font: inherit;
  font-size: var(--step-meta);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  border-radius: 0;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

button.primary, a.primary {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
}

button.primary:active, a.primary:active { background: var(--accent); border-color: var(--accent); }
button.primary[disabled] { background: var(--rule-strong); border-color: var(--rule-strong); }

button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule-strong);
}

button.ghost:active { background: var(--paper-2); }

button.danger {
  display: block;
  width: 100%;
  margin-top: var(--space-block);
  padding: 12px 0;
  font: inherit;
  font-size: var(--step-meta);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: none;
  border: 0;
  border-top: 1px solid var(--rule);
}

/* ---------- chips ---------- */

.chips {
  display: flex;
  gap: 0;
  margin-bottom: var(--space-row);
  overflow-x: auto;
  scrollbar-width: none;
  border: 1px solid var(--rule);
  background: var(--surface);
}

.chips::-webkit-scrollbar { display: none; }

.chips button {
  flex: none;
  font: inherit;
  font-size: var(--step-meta);
  padding: 9px 13px;
  white-space: nowrap;
  color: var(--muted);
  background: none;
  border: 0;
  border-left: 1px solid var(--rule);
  border-radius: 0;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.chips button:first-child { border-left: 0; }
.chips button.on { background: var(--ink); color: var(--paper); }

/* ---------- map ---------- */

#map-screen {
  position: relative;
  height: calc(100dvh - 128px);
  display: flex;
  flex-direction: column;
  background: var(--paper-2);
}

#map-screen[hidden] { display: none; }

.map-tools {
  padding: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.map-bar {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.map-bar > select {
  flex: 0 1 auto;
  width: auto;
  max-width: 7.5rem;
  margin: 0;
  padding: 6px 22px 6px 10px;
  font-size: var(--step-meta);
  border: 0;
  border-right: 1px solid var(--rule);
  border-radius: 0;
  background-color: var(--paper);
  background-position: calc(100% - 10px) 50%, calc(100% - 6px) 50%;
}

.map-tools .chips {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  border: 0;
}

.map-tools .chips button {
  padding: 6px 10px;
}

#map {
  flex: 1 1 auto;
  min-height: 200px;
  background: var(--paper-3);
}

/* The list rides over the map as a sheet — the map keeps its own frame. */
#map-list {
  flex: 0 1 auto;
  max-height: 42vh;
  overflow: auto;
  padding: 0 var(--gutter) 8px;
  background: var(--surface);
  border-top: 1px solid var(--ink);
  box-shadow: 0 -12px 28px -24px rgba(23, 25, 26, 0.55);
}

#map-list[hidden] { display: none; }

#map-list::before {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  margin: 8px auto 4px;
  background: var(--rule-strong);
}

#map-list .row { font-size: var(--step-body); }

#map-note, #locate-bar {
  margin: 0;
  padding: 9px var(--gutter);
  font-size: var(--step-meta);
  line-height: 1.45;
  color: var(--muted);
  background: var(--paper);
  border-top: 1px solid var(--rule);
}

#locate-bar {
  display: flex;
  gap: 10px;
  align-items: center;
}

#locate-bar[hidden] { display: none; }
#locate-bar p { margin: 0; flex: 1; color: var(--ink); }

#locate-bar button {
  flex: none;
  font: inherit;
  font-size: var(--step-meta);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 14px;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: 0;
}

/* ---------- thumbnails ---------- */

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 10px 0;
}

.thumb {
  position: relative;
  display: block;
  width: 76px;
  height: 76px;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid var(--rule);
  background: var(--paper-2);
}

.thumb .drop-thumb {
  position: absolute;
  top: 0;
  right: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  font: inherit;
  font-size: 13px;
  line-height: 22px;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: 0;
}

/* ---------- tab bar ---------- */

nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(480px, 100%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--paper);
  border-top: 1px solid var(--ink);
  padding-bottom: env(safe-area-inset-bottom);
}

nav button {
  position: relative;
  font: inherit;
  font-size: var(--step-meta);
  letter-spacing: 0.08em;
  padding: 15px 0;
  color: var(--muted);
  background: none;
  border: 0;
  border-left: 1px solid var(--rule);
  border-radius: 0;
}

nav button:first-child { border-left: 0; }
nav button.active { color: var(--ink); font-weight: 600; }

nav button.active::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- place detail ---------- */

.address {
  margin: 0 0 var(--space-tight);
  font-size: var(--step-body);
  line-height: 1.5;
  color: var(--ink-soft);
}

.standing { color: var(--accent-ink); }

.url {
  margin: 0 0 var(--space-tight);
  font-size: var(--step-meta);
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* The category sits where a section number would, so it reads as the label it is. */
.eyebrow .num { text-transform: none; letter-spacing: 0.06em; }

#place-photos:empty { display: none; }
#place-photos:empty + .eyebrow { margin-top: var(--space-block); }

/* ---------- file picker: the native control never matches the page ---------- */

.filepick {
  display: block;
  margin: 0;
  padding: 11px;
  font-size: var(--step-meta);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule-strong);
}

.filepick:active { background: var(--paper-2); }

#import-images {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* The label is the visible control, so it wears the focus ring. */
.field:has(#import-images:focus-visible) .filepick { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- map pins ---------- */

.pin {
  display: block;
  width: 12px;
  height: 12px;
  background: var(--ink);
  border: 2px solid var(--surface);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--ink);
}

/* 想去 reads as an outline waiting to be filled; 去过 is filled in. */
.pin-want { background: var(--surface); box-shadow: 0 0 0 1px var(--accent); border-color: var(--accent); }
.pin-been { background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

.amap-marker-label {
  border: 0;
  background: none;
  padding: 0;
}

.pin-name {
  display: inline-block;
  padding: 2px 6px;
  font-family: var(--font-ui);
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--ink);
  white-space: nowrap;
}

/* =====================================================================
 * Structure pass, 2026-09-24. Rationale: taste-atlas-ui/decisions.md.
 * Only existing tokens plus --accent-ink. Backup: public.bak-20260924-012815/
 * ===================================================================== */

/* ---------- shared small controls ---------- */

a.primary.inline, button.primary.inline, a.ghost.inline, button.ghost.inline {
  display: inline-block;
  width: auto;
  margin: 0;
  padding: 12px 16px;
}

a.ghost.inline {
  font-size: var(--step-meta);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
}

button.ghost.inline { border-color: var(--ink); }
a.ghost.inline:active { background: var(--paper-2); }

.tlink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  font: inherit;
  font-size: var(--step-meta);
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: 0;
}

.tlink.sm { min-height: 0; }
.go { color: var(--accent-ink); font-weight: 600; text-underline-offset: 3px; }
.skel { display: block; height: 12px; margin: 8px 0; width: 70%; background: var(--paper-2); }
.skel.short { width: 45%; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.alt { display: flex; flex-wrap: wrap; gap: 0 20px; }
label.quiet { margin-top: var(--space-block); }

/* ---------- import sequence: 留下 · 确认 · 核对 · 落点 ---------- */

.seq {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: calc(-1 * var(--space-block)) calc(-1 * var(--gutter)) var(--space-block);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.map-tools .seq { margin: -12px calc(-1 * var(--gutter)) 0; }

.seq a, .seq span {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-height: 44px;
  padding: 13px 0 0 12px;
  font-size: var(--step-meta);
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  border-left: 1px solid var(--rule);
}

.seq > :first-child { border-left: 0; padding-left: var(--gutter); }
.seq i { font-style: normal; font-family: var(--font-numeral); font-size: 0.8125rem; }
.seq .done { color: var(--ink-soft); }
.seq .done i { color: var(--ink); }
.seq .now { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--ink); }

.ctx {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 var(--space-row);
  font-size: var(--step-meta);
  color: var(--muted);
}

.ctx b { font-family: var(--font-numeral); font-weight: 500; font-size: 1rem; color: var(--ink); }

.crumb {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin: -8px 0 var(--space-row);
  border-bottom: 1px solid var(--rule);
  font-size: var(--step-meta);
}

.map-tools .crumb { margin: 0; border-bottom: 0; }
.crumb a { color: var(--ink); text-decoration: none; letter-spacing: 0.04em; }
.crumb .of { font-family: var(--font-numeral); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cand {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 0 10px;
  padding: var(--space-row) 0;
  border-bottom: 1px solid var(--rule);
}

.cand:first-of-type { border-top: 1px solid var(--rule); }
.cand .ix { font-family: var(--font-numeral); font-size: 0.8125rem; padding-top: 3px; }
.cand strong { font-size: var(--step-row); font-weight: 560; }
.cand.done strong { color: var(--ink-soft); }
.cand .sm { display: block; font-size: var(--step-meta); color: var(--muted); }
.cand .st { font-size: var(--step-meta); color: var(--muted); white-space: nowrap; padding-top: 3px; }
.cand .st.ok { color: var(--ink); }
.cand .act { grid-column: 2 / 4; display: flex; gap: 18px; align-items: center; margin-top: 10px; }

/* The red follows focus: only the next candidate's quote carries the accent rule. */
.cand .q {
  grid-column: 2 / 4;
  margin: 8px 0 0;
  padding-left: 10px;
  border-left: 2px solid var(--rule-strong);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.cand.next .q { border-left-color: var(--accent); color: var(--ink); }

.verdict { margin: 0 0 var(--space-tight); font-size: var(--step-body); font-weight: 560; line-height: 1.6; }

details.more { margin-top: var(--space-chapter); padding-top: 4px; border-top: 1px solid var(--rule); }
details.more summary { min-height: 44px; display: flex; align-items: center; font-size: var(--step-meta); color: var(--ink); cursor: pointer; }
details.more form { margin-top: var(--space-tight); }

label.match {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 12px;
  align-items: start;
  min-height: 44px;
  margin: -1px 0 0;
  padding: 12px;
  font-size: var(--step-body);
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  position: relative;
  cursor: pointer;
}

label.match input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; }
label.match .box { width: 14px; height: 14px; margin-top: 4px; border: 1px solid var(--ink-soft); }
label.match strong { display: block; font-weight: 560; }
label.match:has(input:checked) { border-color: var(--ink); z-index: 1; }
label.match:has(input:checked) .box { background: var(--ink); box-shadow: inset 0 0 0 3px var(--surface); }
label.match:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; z-index: 2; }

/* 落点: drag the map under a fixed crosshair. */
.cross { display: none; position: absolute; left: 50%; width: 36px; height: 36px; transform: translate(-50%, -50%); pointer-events: none; z-index: 400; }
.locating .cross { display: block; }
.cross::before, .cross::after { content: ""; position: absolute; background: var(--ink); }
.cross::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.cross::after { top: 50%; left: 0; right: 0; height: 1px; }
.cross i { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; transform: translate(-50%, -50%); border: 2px solid var(--accent); background: var(--surface); }
.readout { display: block; font-family: var(--font-numeral); letter-spacing: 0.04em; color: var(--ink); }

/* ---------- 收藏: the ledger is the filter ---------- */

.ledger { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: var(--space-block); border-block: 1px solid var(--ink); }

.ledger button {
  font: inherit;
  min-height: 60px;
  padding: 11px 4px 9px;
  color: var(--muted);
  background: none;
  border: 0;
  border-left: 1px solid var(--rule);
  border-radius: 0;
}

.ledger button:first-child { border-left: 0; }
.ledger b { display: block; font-family: var(--font-numeral); font-size: 1.375rem; font-weight: 500; line-height: 1.1; color: var(--ink); }
.ledger span { font-size: var(--step-eyebrow); letter-spacing: 0.1em; }
.ledger .due b { color: var(--accent); } /* 22px numeral: 3.70:1 passes the large-text floor */
.ledger button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.ledger button[aria-pressed="true"] b { color: var(--paper); }

.qrow { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: var(--space-row) 0; border-bottom: 1px solid var(--rule); }
.qrow > a:first-child { color: inherit; text-decoration: none; }
.qrow strong { display: block; font-size: var(--step-row); font-weight: 560; }
.qrow .why { grid-column: 1 / -1; margin-top: 4px; font-size: var(--step-meta); line-height: 1.6; color: var(--ink-soft); }

.badge.count { font-size: var(--step-body); color: var(--ink); }
.badge.count span { color: var(--muted); }

/* ---------- 地点: two opposing records sit at equal weight ---------- */

.tally { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 var(--space-row); border-block: 1px solid var(--ink); }
.tally div { padding: 10px 0 8px; }
.tally div + div { padding-left: 14px; border-left: 1px solid var(--rule); }
.tally b { font-family: var(--font-numeral); font-size: 1.375rem; font-weight: 500; line-height: 1.1; margin-right: 6px; }
.tally span { font-size: var(--step-eyebrow); letter-spacing: 0.1em; }

.vrow { display: grid; grid-template-columns: 4.2em 1fr; gap: 12px; padding: var(--space-row) 0; border-bottom: 1px solid var(--rule); }
.vrow:first-of-type { border-top: 1px solid var(--rule); }
.vrow .st { font-size: var(--step-eyebrow); letter-spacing: 0.1em; font-weight: 600; padding-top: 5px; }
.vrow .st time { display: block; margin-top: 4px; font-family: var(--font-numeral); font-size: var(--step-meta); font-weight: 400; color: var(--muted); }
.vrow blockquote { margin: 0 0 6px; }
.vrow.mention .st { font-weight: 400; color: var(--muted); }
.vrow.mention blockquote { border-left-color: var(--rule-strong); color: var(--ink-soft); }

/* ---------- empty and first run ---------- */

.empty { padding: var(--space-block) 0 0; border-top: 1px solid var(--ink); }
#map-list .empty { border-top: 0; padding-top: 4px; }
.empty h3 { margin: 0 0 var(--space-tight); font-size: 1.25rem; font-weight: 620; line-height: 1.4; }
.empty p { margin: 0 0 var(--space-row); color: var(--ink-soft); line-height: 1.7; }

.steps { list-style: none; margin: var(--space-chapter) 0 0; padding: 0; counter-reset: s; border-top: 1px solid var(--rule); }
.steps li { counter-increment: s; display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 0.875rem; color: var(--ink-soft); }
.steps li::before { content: counter(s); font-family: var(--font-numeral); font-size: 0.8125rem; color: var(--ink); padding-top: 1px; }

/* ---------- map: counts, clusters, names only from zoom 14 ---------- */

.mk { display: flex; align-items: center; gap: 3px; }
.mk.sel .pin { transform: scale(1.34); }
.vt { font-family: var(--font-numeral); font-size: 11px; font-weight: 400; line-height: 1; padding: 2px 3px; color: var(--ink); background: var(--surface); }
.vt.split { box-shadow: inset 0 0 0 1px var(--ink); } /* boxed = someone recommends against it */

.pin-name {
  max-width: 9em;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  padding: 1px 5px;
  font-weight: 560;
  border: 1px solid var(--rule);
}

.pin-name.sel { color: var(--surface); background: var(--ink); border-color: var(--ink); }
#map.names-off .pin-name { display: none; }

.cluster {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  font-family: var(--font-numeral);
  font-size: 15px;
  line-height: 1;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--ink);
  cursor: pointer;
}

.cluster.c2 { min-width: 34px; height: 34px; font-size: 16px; }
.cluster.c3 { min-width: 40px; height: 40px; font-size: 17px; }

#map-list button.row { width: 100%; font: inherit; text-align: left; color: inherit; background: none; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; }
.queue-note { margin-top: 10px; }

.callout-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 4px; }
.callout-head strong { font-size: var(--step-row); font-weight: 560; }
.voice { display: grid; grid-template-columns: 3.4em 1fr; gap: 10px; align-items: baseline; margin-top: 10px; }
.voice .st { font-size: var(--step-eyebrow); letter-spacing: 0.1em; font-weight: 600; }
.voice q { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding-left: 10px; border-left: 2px solid var(--accent); font-size: var(--step-body); }
.voice q::before { content: "“"; }
.voice q::after { content: "”"; }
.attrib { margin: 8px 0 0; font-size: var(--step-meta); color: var(--muted); }
.callout-act { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; margin-top: 12px; }
.callout-act .primary { margin-top: 0; }
