:root {
  color-scheme: light;
  --color-primary: #cd151d;
  --color-primary-hover: #a9141a;
  --color-primary-light: #fbedee;
  --color-background: #fff;
  --color-surface: #fff;
  --color-surface-secondary: #f5f5f5;
  --color-text-primary: #222;
  --color-text-secondary: #626262;
  --color-text-muted: #6d6d6d;
  --color-border: #e9e9e9;
  --color-rating: #80540f;
  --radius-small: 6px;
  --radius-medium: 9px;
  --radius-large: 12px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --nav-height: 58px;
  --gutter: 16px;
  --text: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  /* Aliases for the existing contact and Leaflet styles. */
  --jade: var(--color-primary);
  --jade-soft: var(--color-primary-light);
  --surface: var(--color-surface);
  --bg: var(--color-surface-secondary);
  --ink: var(--color-text-primary);
  --muted: var(--color-text-secondary);
  --line: var(--color-border);
  --chili: var(--color-rating);
}
*, *::before, *::after { box-sizing: border-box; }
body { background: var(--color-background); color: var(--ink); font: 15px/1.55 var(--text); }
main, header, nav, section, .content { min-width: 0; }
a { color: inherit; text-underline-offset: 3px; }
button, select, input, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--jade); outline-offset: 2px; }
.wrap { width: 100%; max-width: 1248px; margin-inline: auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
header .wrap { display: grid; gap: var(--space-1); padding-block: 6px 10px; }
svg { vertical-align: middle; }
.ui-icon, .brand svg, nav.tabs svg, .fav svg, .share svg, .dir-go { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.brand { display: flex; align-items: center; gap: var(--space-2); }
.brand h1 { margin: 0; line-height: 1.25; }
.brand .home { display: inline-flex; align-items: center; min-height: 44px; color: var(--jade); font: 900 28px/1 "Noto Serif SC", "Noto Serif CJK SC", "Songti SC", "Microsoft YaHei", serif; letter-spacing: .04em; text-decoration: none; white-space: nowrap; }
.brand p { display: none; margin: 0; color: var(--muted); white-space: nowrap; font-size: 13px; }
.favlink { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; margin-inline-start: auto; position: relative; color: var(--ink); text-decoration: none; border-radius: var(--radius-medium); }
.favlink[aria-current="page"] { color: var(--jade); background: var(--jade-soft); }
#favn:not(:empty) { position: absolute; top: 4px; inset-inline-end: 2px; min-width: 14px; padding-inline: 2px; border-radius: 5px; background: var(--jade-soft); color: var(--jade); font-size: 10px; line-height: 15px; text-align: center; }
.search { height: 44px; display: flex; align-items: center; gap: var(--space-2); padding-inline: 12px 2px; border-radius: var(--radius-medium); background: var(--bg); color: var(--muted); }
.search:focus-within { outline: 2px solid var(--jade); outline-offset: 1px; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; padding: 0; outline: none; background: transparent; color: var(--ink); font-size: 16px; appearance: none; }
.search input::placeholder { color: var(--muted); opacity: 1; }
.search input::-webkit-search-cancel-button, .search input::-webkit-search-decoration { display: none; }
.search button { width: 44px; height: 44px; background: transparent; border: 0; color: inherit; font-size: 22px; }
main { padding-block-end: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 16px); }
#view { padding-block: 4px 12px; }
#view.single { max-width: 784px; }
.section-head { min-height: 42px; display: flex; align-items: center; gap: var(--space-2); margin-block: 0 var(--space-1); }
.section-head h2, .detail-title { margin: 0; color: var(--ink); font-size: 22px; font-weight: 720; line-height: 1.25; overflow-wrap: anywhere; }
.section-head .count { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mode-toggle { margin-inline-start: auto; display: flex; align-items: center; gap: 2px; padding: 2px; border-radius: var(--radius-medium); background: var(--bg); }
.mode-toggle button { min-width: 47px; min-height: 36px; background: transparent; border: 0; border-radius: var(--radius-small); font-size: 13px; line-height: 1; color: var(--muted); }
.mode-toggle button[aria-pressed="true"] { background: var(--surface); color: var(--jade); font-weight: 650; box-shadow: 0 0 0 1px var(--line); }
.chips { display: flex; max-width: 100%; gap: 4px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: transparent transparent; overscroll-behavior-inline: contain; padding: 2px; margin-inline: -2px; }
.chips:is(:hover,:focus-within) { scrollbar-color: #b8b8b8 transparent; }
.chip { flex: none; position: relative; min-height: 44px; padding: 0 10px; border: 0; background: transparent; color: var(--ink); font-size: 14px; white-space: nowrap; isolation: isolate; }
.chip::before { content: ""; position: absolute; z-index: -1; inset: 4px 0; border-radius: var(--radius-small); }
.chip[aria-pressed="true"] { color: var(--jade); font-weight: 650; }
.chip[aria-pressed="true"]::before { background: var(--jade-soft); }
.filter-bar { display: flex; align-items: center; gap: 6px 16px; min-height: 44px; margin-block: 0; border-bottom: 1px solid var(--line); }
.filter-bar label { position: relative; min-width: 0; display: inline-grid; align-items: center; }
.filter-bar label::after { content: ""; position: absolute; right: 6px; width: 7px; height: 7px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); pointer-events: none; }
.filter-bar select { appearance: none; max-width: 100%; min-height: 44px; padding: 0 22px 0 3px; border: 0; border-radius: var(--radius-small); background: transparent; color: var(--ink); font-size: 13px; text-overflow: ellipsis; }
.newbie { display: flex; gap: 4px; align-items: center; min-width: 0; margin-block: 0 9px; background: var(--bg); border-radius: var(--radius-medium); padding-inline-start: 12px; }
.newbie a { display: flex; flex: 1; min-height: 44px; min-width: 0; align-items: center; gap: 8px; font-size: 13px; text-decoration: none; }
.newbie .ui-icon { width: 17px; height: 17px; color: var(--jade); }
.newbie .dir-go { margin-inline-start: auto; width: 16px; color: var(--muted); }
.newbie button { flex: 0 0 44px; height: 44px; border: 0; background: transparent; color: var(--muted); font-size: 20px; }
.group-title { margin: 18px 0 0; font-size: 15px; font-weight: 680; line-height: 1.4; }
.result-group + .result-group { margin-top: 12px; }
.callout, .guide-hits { overflow-wrap: anywhere; margin: 10px 0; padding: 9px 12px; background: var(--bg); border-radius: var(--radius-medium); font-size: 13px; }
.guide-hits { display: grid; gap: 8px; }
.intro { color: var(--muted); margin: 4px 0 14px; font-size: 14px; }
.empty { margin: 0; padding: 32px 14px; text-align: center; color: var(--muted); }
.result-list { min-width: 0; }
.result-item { --image-width: 90px; position: relative; isolation: isolate; display: grid; grid-template-columns: var(--image-width) minmax(0,1fr); grid-template-rows: 1fr auto; gap: 0 12px; padding-block: 12px 1px; min-height: 132px; border-bottom: 1px solid var(--line); }
.result-item > .thumb { grid-row: 1 / 3; }
.thumb { display: grid; place-items: center; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius-medium); background: var(--bg); color: var(--muted); }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb.logo img { object-fit: contain; }
.thumb > .ui-icon { width: 29px; height: 29px; }
.result-focus { display: block; align-self: start; min-width: 0; color: inherit; text-decoration: none; }
.result-focus::before { content: ""; position: absolute; inset: 0; }
.result-focus:focus-visible { outline: none; }
.result-focus:focus-visible::before { outline: 2px solid var(--jade); outline-offset: -2px; border-radius: var(--radius-small); }
.result-name { font-size: 17px; font-weight: 700; line-height: 1.25; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-item .result-name { padding-inline-end: 42px; }
.result-es { margin-inline-start: 4px; color: var(--muted); font-size: 13px; font-weight: 400; }
.result-address { display: flex; align-items: baseline; gap: 6px; margin: 4px 0 0; color: var(--ink); font-size: 13px; line-height: 1.35; }
.result-address > :first-child { min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.result-address .branch-count { flex: none; color: var(--muted); font-size: 12px; white-space: nowrap; }
.result-meta, .result-blurb { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.35; overflow-wrap: anywhere; }
.result-blurb { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.rating { color: var(--color-rating); font-weight: 650; }
.rating svg { width: 14px; height: 14px; stroke-width: 1.5; margin-inline-end: 2px; vertical-align: -2px; }
.fav, .share { position: relative; z-index: 1; display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; background: transparent; border: 0; border-radius: var(--radius-medium); color: var(--muted); }
.fav[aria-pressed="true"] { color: var(--jade); }
.fav[aria-pressed="true"] svg { fill: var(--jade); }
.result-item > .fav, .entry-row > .fav, .scenic-card > .fav { position: absolute; inset-inline-end: 0; top: 3px; }
.result-actions { display: flex; gap: 6px; align-items: center; min-width: 0; margin-inline-start: -6px; }
.result-actions button { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 6px; border: 0; border-radius: var(--radius-small); background: transparent; color: var(--ink); font-size: 13px; white-space: nowrap; }
.result-actions svg:not(.dir-go) { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.result-actions .dir-go { margin-inline-start: auto; width: 17px; color: var(--muted); pointer-events: none; }
.entry-row { position: relative; isolation: isolate; display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: start; gap: 0 10px; min-height: 65px; padding: 12px 45px 12px 0; border-bottom: 1px solid var(--line); }
.entry-row .entry-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-medium); background: var(--bg); color: var(--muted); }
.entry-row .result-name:not(:has(.result-es)) { white-space: normal; }
.entry-row .result-actions { grid-column: 2; }
.entry-row .result-blurb { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; }
.entry-row time { font-size: 12px; color: var(--muted); }
.entry-row .item-open { position: absolute; right: 44px; top: 12px; z-index: 1; font-size: 13px; color: var(--muted); }
.entry-row:has(.item-open) { padding-inline-end: 82px; }
.entry-row[data-kind="info"] .entry-icon { background: var(--jade-soft); color: var(--jade); }
.scenic-grid { display: grid; gap: 16px 14px; margin-block: 10px 18px; }
.scenic-card { min-width: 0; position: relative; isolation: isolate; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.scenic-card > .thumb { margin-bottom: 9px; aspect-ratio: 16 / 9; }
.scenic-card > .fav { background: var(--surface); top: 6px; right: 6px; }
.scenic-card .result-blurb { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.detail-bar { display: flex; align-items: center; gap: var(--space-2); margin-bottom: 8px; }
.detail-bar a { margin-inline-end: auto; min-height: 44px; display: inline-flex; align-items: center; gap: var(--space-1); text-decoration: none; }
.detail-bar .dir-go { rotate: 180deg; }
.place-detail { display: flex; flex-direction: column; gap: var(--space-4); }
.detail-main, .detail-story { display: contents; }
.detail-photo { display: grid; justify-items: start; gap: 6px; margin: 0; min-width: 0; }
.detail-image { width: min(100%, var(--photo-width)); aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-large); background: var(--bg); }
.detail-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.detail-photo.is-logo .detail-image { width: fit-content; max-width: 100%; aspect-ratio: auto; background: none; }
.detail-photo.is-logo img { width: auto; height: auto; max-height: 132px; object-fit: contain; }
.detail-photo figcaption { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 12px; }
.detail-title { font-size: clamp(26px, 4vw, 38px); }
.detail-es { margin: 4px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.detail-header .result-meta { margin-top: 8px; font-size: 14px; }
.detail-header .warn { margin-top: 8px; color: var(--color-rating); font-size: 13px; }
.detail-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 7px 12px; border: 1px solid transparent; border-radius: var(--radius-medium); background: var(--bg); color: var(--ink); text-decoration: none; font-size: 14px; line-height: 1.2; }
.btn.primary { background: var(--jade-soft); color: var(--jade); font-weight: 650; }
.detail-quick .primary { background: var(--jade); color: white; }
.detail-quick .primary:hover { background: var(--color-primary-hover); }
.detail-practical { display: grid; gap: 14px; align-self: start; width: 100%; padding: 15px; background: var(--bg); border-radius: var(--radius-large); }
.detail-practical .btn:not(.primary), .detail-practical .mini { background: var(--surface); }
.detail-practical h3 { margin: 0; font-size: 17px; }
.detail-about { order: 1; }
.detail-section h3 { margin: 0 0 10px; font-size: 17px; }
.detail-section p { margin: 0; overflow-wrap: anywhere; }
.detail-section p + p { margin-top: 8px; }
.detail-section ul { margin-block: 8px 0; padding-inline-start: 20px; }
.facts { display: grid; gap: 9px; margin: 0; }
.facts > div { display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 8px; align-items: baseline; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts.big a { color: var(--jade); font-weight: 650; }
.tel-line, .addr-line { display: block; }
.mini { display: inline-flex; align-items: center; min-height: 36px; margin-inline-start: 6px; padding: 4px 8px; border-radius: 6px; border: 0; background: var(--bg); color: var(--ink); font-size: 13px; text-decoration: none; }
.wa-link { color: #236127; }
.todo, .upd { color: var(--muted); }
.upd { font-size: 13px; }
.detail-meta { order: 2; border-top: 1px solid var(--line); padding-top: var(--space-3); color: var(--muted); font-size: 13px; }
.detail-meta > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.detail-meta summary { display: inline-block; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.detail-meta details { margin-top: 8px; }
.detail-meta details ul { margin-block: 4px 8px; padding-inline-start: 18px; }
.detail-meta details p { margin: 4px 0; }
.detail-readmore { margin-top: 8px; }
.detail-readmore summary { width: fit-content; cursor: pointer; color: var(--muted); font-size: 14px; }
.detail-readmore p { margin-top: 8px; }
.foot { display: grid; gap: 6px; margin-top: 24px; padding-block: 14px 4px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.foot p { margin: 0; }
.toast { position: fixed; z-index: 30; bottom: calc(var(--nav-height) + env(safe-area-inset-bottom,0px) + 10px); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 28px); padding: 8px 14px; background: #242424; color: white; border-radius: var(--radius-medium); font-size: 14px; overflow-wrap: anywhere; }
nav.tabs { position: fixed; z-index: 10; bottom: 0; inset-inline: 0; border-top: 1px solid var(--line); background: var(--surface); padding-bottom: env(safe-area-inset-bottom, 0px); }
nav.tabs .row { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); max-width: 650px; margin: 0 auto; }
nav.tabs a { min-height: var(--nav-height); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 12px; text-decoration: none; white-space: nowrap; }
nav.tabs a[aria-current="page"] { color: var(--jade); font-weight: 680; }
nav.tabs a[aria-current="page"] svg { stroke-width: 2; }
.feedback-form textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-medium); background: var(--surface); color: var(--ink); padding: 10px; resize: vertical; }
.credits { padding-inline-start: 22px; }
.credits li + li { margin-top: 8px; }
.credits b { margin-inline-end: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.results-more { min-height: 44px; }
.view-detail header .search { display: none; }

@media (max-width: 359px) {
  :root { --gutter: 14px; }
  .result-item { --image-width: 88px; column-gap: 9px; }
  .result-item .result-name { padding-inline-end: 36px; }
  .result-item > .fav { right: -5px; }
}
@media (min-width: 430px) { .scenic-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (min-width: 768px) {
  :root { --gutter: 24px; }
  .result-list.venue-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 22px; }
  .newbie { max-width: none; }
}
@media (min-width: 1024px) {
  :root { --gutter: 28px; }
  header { border-bottom: 1px solid var(--line); }
  header .wrap { grid-template-columns: auto auto minmax(140px,1fr) auto; grid-template-areas: "logo nav search fav"; align-items: center; gap: 13px; min-height: 70px; padding-block: 10px; }
  .brand { display: contents; }
  .brand h1 { grid-area: logo; }
  .brand .favlink { grid-area: fav; margin: 0; }
  header .search { grid-area: search; width: 100%; max-width: 398px; justify-self: end; }
  nav.tabs { grid-area: nav; position: static; background: none; border: 0; padding: 0; }
  nav.tabs .row { display: flex; gap: 4px; }
  nav.tabs a { min-height: 44px; flex-direction: row; gap: 5px; padding: 0 9px; border-radius: var(--radius-medium); font-size: 14px; }
  nav.tabs a svg { width: 17px; height: 17px; }
  nav.tabs a[aria-current="page"] { background: var(--jade-soft); }
  main { padding-block: 20px 30px; }
  .section-head h2 { font-size: 25px; }
  .section-head { margin-bottom: 8px; }
  .newbie { margin-bottom: 14px; }
  .scenic-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
  .directory-page { display: grid; grid-template-columns: 180px minmax(0,1fr); column-gap: 28px; align-items: start; }
  .directory-page > .section-head, .directory-page > .filter-bar { grid-column: 1 / -1; }
  .directory-page > .chips { position: sticky; top: 16px; flex-direction: column; overflow: visible; }
  .directory-page .chip { text-align: start; }
  .directory-page > .content { grid-column: 2; }
  .toast { bottom: 24px; }
  .view-detail header .search { display: flex; }
  .view-detail #view.single { max-width: 1248px; }
  .place-detail.has-practical { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); column-gap: clamp(24px, 4vw, 48px); row-gap: 24px; align-items: start; }
  .detail-main { display: grid; gap: 22px; }
  .detail-story { display: grid; gap: 20px; align-items: start; }
  .detail-story.has-photo-and-copy { grid-template-columns: minmax(0, 1fr) minmax(190px, 1fr); }
  .detail-practical { padding: 22px; }
  .detail-meta { grid-column: 1 / -1; }
}
@media (min-width: 1240px) {
  header .wrap { grid-template-columns: auto auto auto minmax(190px,1fr) auto; grid-template-areas: "logo subtitle nav search fav"; gap: 16px; }
  .brand p { display: block; grid-area: subtitle; }
}
@media (min-width: 1280px) {
  .result-list.venue-list:is(.venue-food, .venue-market) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (hover: hover) {
  .result-item:has(.result-focus:hover), .entry-row:has(.result-focus:hover) { background: #fafafa; }
  .chip:hover::before, .favlink:hover, .fav:hover, .share:hover, .result-actions button:hover { background: var(--bg); }
  .chip[aria-pressed="true"]:hover::before { background: var(--jade-soft); }
}
@media print {
  header, nav.tabs, .detail-bar, .detail-quick, .fav, .share, .chips, .filter-bar, .mode-toggle, .result-actions, .sheet, .sheet-backdrop, .newbie { display: none !important; }
  main { padding: 0; }
  .result-item, .detail-section { break-inside: avoid; }
}

/* Contact form, dialogs, and Leaflet integration */
.feedback-form { display: grid; gap: 10px; }
.contact-form label { display: grid; gap: 4px; font-size: 14px; }
.contact-form .req { color: var(--jade); }
.contact-form > label[for] { display: block; }
.contact-form input { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--jade); outline-offset: 1px; }
.contact-optional { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 12px; margin: 0; display: grid; gap: 8px; }
.contact-optional legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.privacy { margin: 0; font-size: 12.5px; color: var(--muted); }
.sheet-backdrop { position: fixed; inset: 0; z-index: 20; background: rgb(0 0 0 / 0.45); }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; background: var(--surface);
  border-radius: 16px 16px 0 0; box-shadow: 0 -8px 30px rgb(0 0 0 / 0.2);
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.sheet-inner { max-width: 560px; margin: 0 auto; display: grid; gap: 8px; padding-top: 14px; }
.sheet h4 { margin: 0; font-size: 16px; }
.sheet .sub { margin: -4px 0 4px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.sheet a, .sheet button {
  display: flex; align-items: center; gap: 12px; text-decoration: none; font: inherit; font-size: 15px; font-weight: 600;
  padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; text-align: left;
}
.sheet a small { margin-left: auto; font-weight: 400; color: var(--muted); font-size: 12px; }
.sheet a:first-of-type { background: var(--jade); border-color: var(--jade); color: var(--surface); }
.sheet a:first-of-type small { color: inherit; opacity: .85; }
.sheet .cancel { justify-content: center; background: var(--surface); }
.manual-copy {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; resize: none;
  -webkit-user-select: text; user-select: text;
}
.sheet a:focus-visible, .sheet button:focus-visible { outline: 2px solid var(--chili); outline-offset: 2px; }
.mapview { display: grid; gap: 10px; min-width: 0; }
.map-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mt-btn, .mt-sel, .mt-check { display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; cursor: pointer; }
.mt-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.mt-btn[aria-pressed="true"] { background: var(--jade); border-color: var(--jade); color: var(--surface); }
.mt-sel select { font: inherit; font-weight: 400; color: inherit; background: none; border: 0; padding: 0; max-width: 9.5em; }
.mt-check input { margin: 0; accent-color: var(--jade); }
.mt-btn:focus-visible, .mt-sel:focus-within, .mt-check:focus-within { outline: 2px solid var(--chili); outline-offset: 1px; }
.map-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: -2px 0 0; font-size: 12px; color: var(--muted); }
.map-legend i, .map-row .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 4px; vertical-align: -1px; }
.map-card .mp-note { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.map-box { position: relative; height: max(320px, calc(100svh - 360px)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #e9e5df; }
.map-canvas { position: absolute; inset: 0; z-index: 0; font: inherit; }
.map-card { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 2; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 12px; box-shadow: 0 6px 24px rgb(0 0 0 / .18); max-height: 70%; overflow: auto; }
.mp-close { position: absolute; right: 6px; top: 4px; font-size: 22px; line-height: 1; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px 8px; }
.map-fail { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; gap: 12px; text-align: center; padding: 20px; background: rgb(247 243 241 / .94); color: #241614; }
.map-fail.static { position: static; border: 1px solid var(--line); border-radius: 14px; min-height: 240px; }
.map-fail p { margin: 0; }
.map-fail div { display: flex; gap: 8px; justify-content: center; }
.map-list { display: grid; gap: 6px; align-content: start; min-width: 0; }
.map-count { margin: 0; font-size: 12.5px; color: var(--muted); }
.map-row { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 6px; align-items: center; width: 100%; text-align: left; font: inherit; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.map-row b { display: block; font-size: 14.5px; overflow-wrap: anywhere; }
.map-row small { display: block; font-size: 12px; color: var(--muted); }
.map-row .d { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.map-row[aria-current="true"] { border-color: var(--jade); box-shadow: inset 0 0 0 1px var(--jade); }
.map-row:focus-visible { outline: 2px solid var(--chili); outline-offset: 1px; }
.map-missing { display: grid; gap: 6px; align-content: start; min-width: 0; }
.map-missing .map-count { margin-top: 4px; line-height: 1.5; }
.map-row.nopin { text-decoration: none; background: transparent; border-style: dashed; }
.map-row.nopin .dot { background: transparent; border: 1.5px solid var(--muted); box-sizing: border-box; }
/* 地图标记：水滴形，颜色按栏目，里面是栏目图标 */
.pin-wrap { background: none; border: 0; }
.pin { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--c);
  border: 2px solid #fff; box-shadow: 0 1px 4px rgb(0 0 0 / .35); box-sizing: border-box; }
.pin svg { transform: rotate(45deg); width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pin-wrap.on .pin, .pin-wrap.hot .pin { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--c), 0 2px 8px rgb(0 0 0 / .4); }
.leaflet-marker-icon.pin-wrap:focus-visible { outline: none; }
.leaflet-marker-icon.pin-wrap:focus-visible .pin { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #9a6a00; }
/* 弹窗 / 底部卡片里的内容 */
.mp { display: grid; gap: 5px; font-family: var(--text); font-size: 13.5px; color: var(--ink); }
.mp-head { display: flex; align-items: flex-start; gap: 8px; padding-right: 22px; }
.mp-head b { font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.mp-head .fav { margin-left: auto; }
.leaflet-popup .mp-head { padding-right: 14px; }
.mp-sub { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.mp-cat { display: inline-block; color: #fff; background: var(--c); border-radius: 999px; padding: 0 7px; margin-right: 6px; font-size: 11.5px; font-weight: 600; }
.mp-note, .mp-addr { margin: 0; overflow-wrap: anywhere; }
.mp-addr { font-size: 12.5px; color: var(--muted); }
.mp-act { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.mp-act .btn { flex: 1 1 auto; justify-content: center; padding: 7px 10px; font-size: 13px; min-height: 0; }
.leaflet-popup-content { margin: 12px 14px; }
.leaflet-popup-content-wrapper { border-radius: 14px; }
.leaflet-popup-content a.btn.primary { color: var(--jade); }
.leaflet-popup-content p { margin: 0; }
.leaflet-container a.leaflet-popup-close-button { width: 26px; height: 26px; font-size: 20px; }
.sheet { max-height: 85vh; max-height: 85dvh; overflow: auto; }
.sheet pre.preview { margin: 0; padding: 10px 12px; background: var(--bg); color: var(--muted); border-radius: var(--radius-medium); font: 13px/1.55 var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.sheet a.wa { background: #236127; border-color: #236127; color: white; }
.mt-btn, .mt-sel, .mt-check { min-height: 44px; border-radius: var(--radius-medium); font-weight: 500; }
.map-box { background: #eef0ee; border-radius: var(--radius-large); height: max(310px, calc(100svh - 270px)); }
.map-fail { background: rgb(255 255 255 / .91); }
.map-card { bottom: 25px; border-radius: var(--radius-medium); }
.map-card .mp-main { padding-right: 24px; }
.mp-main { display: flex; gap: 8px; align-items: flex-start; }
.mp-main > div:not(.thumb) { min-width: 0; flex: 1; }
.mp-main .thumb { width: 54px; flex: none; }
.mp-name { display: block; font-size: 16px; line-height: 1.35; color: var(--ink) !important; overflow-wrap: anywhere; text-decoration: none; }
.mp-act .btn { min-height: 44px; }
.mp-close { min-width: 38px; min-height: 42px; right: 2px; }
.map-row { min-height: 44px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.map-row[aria-current="true"] { box-shadow: inset 3px 0 var(--jade); background: var(--jade-soft); }
@media (min-width: 1024px) {
  .mapview { grid-template-columns: minmax(220px, 1fr) minmax(0, 2.5fr); align-items: start; }
  .mapview > :is(.map-tools, .map-legend, .map-fail.static) { grid-column: 1 / -1; }
  /* 没标位置的店放在左栏列表下面，地图在右栏跟着滚动，不把地图挤到屏幕下方 */
  .map-box { grid-column: 2; grid-row: 3 / span 2; position: sticky; top: 16px; height: max(438px, calc(100svh - 280px)); }
  .map-list { grid-column: 1; grid-row: 3; max-height: max(438px, calc(100svh - 280px)); overflow-y: auto; }
  .map-missing { grid-column: 1; grid-row: 4; }
}
