:root {
  --forest: #1b7a47;
  --forest-deep: #155e37;
  --leaf: #4caf50;
  --ink: #232a26;
  --muted: #6b7280;
  --line: #e8ece9;
  --bg: #f1f4f0;
  --surface: #ffffff;
  --shadow-card: 0 10px 30px rgb(20 60 40 / 8%);
  --shadow-float: 0 8px 24px rgb(0 0 0 / 12%);

  /* category colors */
  --c-food: #f39a1f;
  --c-sightseeing: #2e7dcc;
  --c-information: #8b5cf6;
  --c-souvenir: #a06a3c;
  --c-lodging: #18b0c4;
  --c-other: #1b7a47;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }

.ui-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 1.15em;
  height: 1.15em;
  color: currentColor;
  vertical-align: -0.18em;
}

.pc-only { display: inline-flex; }
.mobile-only { display: none; }

/* ===================== SHELL ===================== */
.app-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 392px;
  gap: 0;
  height: 100vh;
  padding: 0;
  background: var(--surface);
}

.filter-panel,
.spot-panel {
  min-height: 0;
  overflow: auto;
  padding: 24px 22px;
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
}

.filter-panel { border-right: 1px solid var(--line); }
.spot-panel { border-left: 1px solid var(--line); }

.map-panel {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-radius: 0;
  background: #e3ecdc;
  box-shadow: none;
}

/* ===================== LEFT PANEL ===================== */
.brand { margin-bottom: 22px; }

.brand-logo {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  object-fit: contain;
}

.section-label {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.filter-title {
  margin: 24px 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
}

.category-list {
  display: grid;
  gap: 8px;
}

.category-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}

.category-row:hover { border-color: #cdd8d1; }

.category-row .cat-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.category-row .cat-icon .ui-icon { width: 19px; height: 19px; }

.category-row b { flex: 1; min-width: 0; font-weight: 700; }

.category-row small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.category-row.active {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
}
.category-row.active .cat-icon { background: rgb(255 255 255 / 18%) !important; color: #fff !important; }
.category-row.active small { color: rgb(255 255 255 / 80%); }

/* per-category tinted icon chips */
.cat-icon.all { background: #e7f3ec; color: var(--forest); }
.cat-icon.food { background: #fdefda; color: var(--c-food); }
.cat-icon.sightseeing { background: #e4eefb; color: var(--c-sightseeing); }
.cat-icon.information { background: #efeafd; color: var(--c-information); }
.cat-icon.souvenir { background: #f3e9df; color: var(--c-souvenir); }
.cat-icon.lodging { background: #def3f6; color: var(--c-lodging); }
.cat-icon.other { background: #e7f3ec; color: var(--forest); }

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.feature-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}

.feature-chip .ui-icon { color: var(--forest); width: 17px; height: 17px; }
.feature-chip b { font-weight: 700; }
.feature-chip small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.feature-chip:hover { border-color: #cdd8d1; }

.feature-chip.active {
  border-color: var(--forest);
  background: #eef7f1;
  color: var(--forest-deep);
}
.feature-chip.active .ui-icon { color: var(--forest); }

.filter-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 22px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}
.filter-clear:hover { border-color: #cdd8d1; color: var(--ink); }
.filter-clear .ui-icon { width: 16px; height: 16px; }

/* ===================== MAP OVERLAY ===================== */
.map-overlay {
  position: absolute;
  z-index: 600;
  top: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}
.map-overlay > * { pointer-events: auto; }

.map-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.map-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  height: 56px;
  padding: 0 20px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-float);
}
.map-search .ui-icon { width: 20px; height: 20px; color: var(--muted); }
.map-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px;
  color: var(--ink);
}
.map-search input::placeholder { color: #9aa3a0; }

.tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  padding: 0 22px;
  border: 0;
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  box-shadow: var(--shadow-float);
  cursor: pointer;
}
.tool-button .ui-icon { width: 20px; height: 20px; color: var(--forest); }
.tool-button.icon-only { padding: 0; width: 56px; }

.hamburger { display: grid; gap: 4px; }
.hamburger i { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); }

.category-chips {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.category-chips::-webkit-scrollbar { display: none; }

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: var(--shadow-float);
  cursor: pointer;
}
.cat-chip .ui-icon { width: 18px; height: 18px; }
.cat-chip.food .ui-icon { color: var(--c-food); }
.cat-chip.sightseeing .ui-icon { color: var(--c-sightseeing); }
.cat-chip.information .ui-icon { color: var(--c-information); }
.cat-chip.souvenir .ui-icon { color: var(--c-souvenir); }
.cat-chip.lodging .ui-icon { color: var(--c-lodging); }
.cat-chip.all .ui-icon { color: var(--forest); }

.cat-chip.active {
  background: var(--forest);
  color: #fff;
}
.cat-chip.active .ui-icon { color: #fff; }

.map-canvas {
  width: 100%;
  height: 100%;
  background: #d9e6cf;
}
.map-canvas > p { display: grid; height: 100%; place-items: center; margin: 0; color: var(--muted); }

.leaflet-container { font: inherit; }
.leaflet-control-zoom { border: 0 !important; box-shadow: var(--shadow-float) !important; border-radius: 14px !important; overflow: hidden; }
.leaflet-control-zoom a { width: 40px !important; height: 40px !important; line-height: 40px !important; font-size: 22px !important; color: var(--ink) !important; }
.leaflet-control-attribution { font-size: 9px !important; opacity: 0.6 !important; background: rgba(255,255,255,0.7) !important; }

.map-mobile-actions {
  display: none;
}
.map-action-control {
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: var(--forest);
  box-shadow: var(--shadow-float);
  cursor: pointer;
}
.map-action-control .ui-icon { width: 20px; height: 20px; }
.map-action-control.active {
  background: var(--forest);
  color: #fff;
}
.map-zoom-actions {
  display: grid;
  grid-template-columns: 1fr;
  width: 44px;
  overflow: hidden;
  justify-self: end;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-float);
}
.map-zoom-actions button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 40px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 23px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.map-zoom-actions button:last-child {
  border-bottom: 0;
  padding-bottom: 3px;
}

/* ===================== MAP PINS ===================== */
.marker-shell { background: transparent; border: 0; }

.map-pin {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 4px;
  box-shadow: 0 6px 14px rgb(0 0 0 / 28%);
  color: #fff;
  transform: rotate(-45deg);
}
.map-pin .ui-icon { width: 17px; height: 17px; transform: rotate(45deg); }

.map-pin.food { background: var(--c-food); }
.map-pin.sightseeing { background: var(--c-sightseeing); }
.map-pin.information { background: var(--c-information); }
.map-pin.souvenir { background: var(--c-souvenir); }
.map-pin.lodging { background: var(--c-lodging); }
.map-pin.other { background: var(--c-other); }

/* ===================== MAP POPUP CARD ===================== */
.leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgb(0 0 0 / 22%);
}
.leaflet-popup-content { margin: 0; width: 360px !important; }
.leaflet-popup-tip { box-shadow: 0 18px 50px rgb(0 0 0 / 22%); }
.leaflet-popup-close-button { display: none; }

.popup-card {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 18px;
  cursor: pointer;
}
.popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.popup-close:hover { background: #f0f2f0; color: var(--ink); }
.popup-close .ui-icon { width: 18px; height: 18px; }

.popup-top { display: grid; grid-template-columns: 144px minmax(0, 1fr); gap: 16px; align-items: stretch; }
.popup-thumb {
  width: 144px;
  height: 100%;
  min-height: 168px;
  border-radius: 14px;
  object-fit: cover;
  background: #e8efe8;
}
.popup-thumb.placeholder { display: grid; place-items: center; color: var(--forest); }
.popup-thumb.placeholder .ui-icon { width: 34px; height: 34px; }
.popup-head { min-width: 0; padding-right: 22px; }
.popup-statusline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.popup-card h3 { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.3; color: var(--ink); }
.popup-card .popup-addr { margin: 8px 0 0; font-size: 14px; color: var(--muted); line-height: 1.45; }
.popup-summary { margin: 12px 0 0; font-size: 14px; color: #4b5550; line-height: 1.6; }
.popup-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.popup-actions .pill-btn { padding: 13px; font-size: 15px; border-radius: 14px; }

/* ===================== STATUS / BADGE / DISTANCE (shared) ===================== */
.status-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--forest-deep);
  white-space: nowrap;
}
.status-open::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--forest);
}

.status-closed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #b91c1c;
  white-space: nowrap;
}
.status-closed::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ef4444;
}

.dist {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.dist .ui-icon { width: 14px; height: 14px; }

.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
}
.category-badge .ui-icon { width: 14px; height: 14px; }
.category-badge.food { background: #fdefda; color: #b06a00; }
.category-badge.sightseeing { background: #e4eefb; color: #1d5fa6; }
.category-badge.information { background: #efeafd; color: #6d44c9; }
.category-badge.souvenir { background: #f3e9df; color: #7d4f26; }
.category-badge.lodging { background: #def3f6; color: #0d7d8c; }
.category-badge.other { background: #e7f3ec; color: var(--forest-deep); }

/* solid variant used in the map popup */
.category-badge.solid { color: #fff; }
.category-badge.solid.food { background: var(--c-food); color: #fff; }
.category-badge.solid.sightseeing { background: var(--c-sightseeing); color: #fff; }
.category-badge.solid.information { background: var(--c-information); color: #fff; }
.category-badge.solid.souvenir { background: var(--c-souvenir); color: #fff; }
.category-badge.solid.lodging { background: var(--c-lodging); color: #fff; }
.category-badge.solid.other { background: var(--c-other); color: #fff; }

/* ===================== BUTTONS (route/detail, shared) ===================== */
.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border: 1px solid #d4e3d9;
  border-radius: 12px;
  background: #fff;
  color: var(--forest-deep);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.pill-btn .ui-icon { width: 16px; height: 16px; }
.pill-btn:hover { background: #f1f8f3; border-color: #bcd6c6; }

/* ===================== RIGHT: SPOT LIST ===================== */
.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.count { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.sort-wrap { position: relative; }
.sort-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding: 9px 30px 9px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.sort-wrap::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 8px; height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.spot-list { display: grid; gap: 14px; }

.spot-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 14px rgb(20 60 40 / 5%);
  cursor: pointer;
  transition: border-color .16s, box-shadow .16s, transform .16s;
}
.spot-card:hover,
.spot-card.selected {
  border-color: var(--forest);
  box-shadow: 0 12px 28px rgb(27 122 71 / 16%);
  transform: translateY(-1px);
}

.spot-thumb {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
  background: #e8efe8;
}
.spot-thumb.placeholder { display: grid; place-items: center; color: var(--forest); }
.spot-thumb.placeholder .ui-icon { width: 34px; height: 34px; }

.spot-body { display: grid; gap: 7px; align-content: start; min-width: 0; padding: 14px 16px; }

.spot-badge-row { display: flex; justify-content: flex-end; }
.spot-status-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.spot-card h3 {
  overflow: hidden;
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spot-addr {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spot-actions { display: flex; gap: 10px; margin-top: 4px; }
.spot-actions .pill-btn { flex: 1; }

/* ===================== MOBILE bits hidden on PC ===================== */
.mobile-sheet, .mobile-nav, .mobile-list-page { display: none; }

/* ===================== DETAIL DIALOG ===================== */
.detail-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden auto;
  border: 0;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgb(0 0 0 / 28%);
}
.detail-dialog::backdrop { background: rgb(0 0 0 / 36%); }

.dialog-close {
  position: absolute;
  z-index: 2;
  top: 12px; right: 12px;
  display: grid;
  width: 38px; height: 38px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 92%);
  color: var(--ink);
  box-shadow: 0 4px 14px rgb(0 0 0 / 18%);
  cursor: pointer;
}

.detail-hero img { width: 100%; height: 260px; object-fit: cover; background: #e8efe8; }
.detail-body { padding: 24px; }
.detail-body .category { margin: 0 0 4px; color: var(--forest); font-weight: 800; font-size: 13px; }
.detail-body h2 { margin: 4px 0 12px; color: var(--ink); font-size: 24px; }
.detail-body > p { margin: 0; color: #41504a; line-height: 1.7; }
.detail-body dl { display: grid; gap: 0; margin: 20px 0; }
.detail-body dl div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.detail-body dt { color: var(--forest-deep); font-weight: 800; font-size: 14px; }
.detail-body dd { margin: 0; color: #374151; }
.dialog-actions { display: flex; gap: 12px; margin-top: 8px; }
.dialog-actions a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  border: 1px solid #d4e3d9;
  border-radius: 12px;
  background: #fff;
  color: var(--forest-deep);
  font-weight: 800;
  text-decoration: none;
}
.dialog-actions a:first-child { background: var(--forest); border-color: var(--forest); color: #fff; }

.empty {
  margin: 0;
  padding: 22px;
  border: 1px dashed #cbd5d1;
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

/* ===================== RESPONSIVE: ≤960px = MOBILE ===================== */
@media (max-width: 960px) {
  .pc-only { display: none !important; }
  .mobile-only { display: inline-flex !important; }

  .app-shell {
    display: block;
    height: 100dvh;
    padding: 0;
    gap: 0;
  }

  .filter-panel, .spot-panel { display: none; }

  .map-panel {
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }

  /* top overlay: search + locate side by side, then chips */
  .map-overlay {
    top: max(14px, env(safe-area-inset-top));
    left: 14px;
    right: 14px;
    gap: 14px;
  }
  .map-search { height: 54px; border-radius: 18px; }
  .tool-button { height: 54px; border-radius: 18px; padding: 0 18px; }
  .cat-chip { height: 46px; }

  .leaflet-control-zoom { display: none !important; }
  .map-mobile-actions {
    display: grid;
    justify-items: end;
    gap: 8px;
    margin: 0 12px calc(92px + env(safe-area-inset-bottom)) 0 !important;
  }
  .map-action-control { display: inline-flex; }
  body.showing-mobile-preview .map-mobile-actions {
    margin-bottom: calc(184px + env(safe-area-inset-bottom)) !important;
  }
  body.showing-mobile-list .map-overlay,
  body.showing-mobile-list .mobile-sheet,
  body.showing-mobile-list .leaflet-control-container {
    display: none;
  }

  /* mobile list page */
  .mobile-list-page {
    position: fixed;
    z-index: 680;
    inset: 0;
    display: block;
    overflow-y: auto;
    padding: max(16px, env(safe-area-inset-top)) 16px calc(94px + env(safe-area-inset-bottom));
    background:
      radial-gradient(circle at 20% 0%, rgb(255 255 255 / 90%), transparent 34%),
      linear-gradient(180deg, #fbfcfb 0%, #f5f7f4 48%, #eef2ee 100%);
  }
  .mobile-list-page[hidden] { display: none !important; }

  .mobile-list-categories {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    margin: 0 -16px;
    padding: 0 16px 4px;
    scrollbar-width: none;
  }
  .mobile-list-categories::-webkit-scrollbar { display: none; }
  .mobile-list-category-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    height: 46px;
    padding: 0 14px;
    border: 1px solid #dce1de;
    border-radius: 999px;
    background: rgb(255 255 255 / 92%);
    color: #4d5650;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgb(20 60 40 / 5%);
    cursor: pointer;
  }
  .mobile-list-category-chip .ui-icon { width: 18px; height: 18px; }
  .mobile-list-category-chip.food .ui-icon { color: var(--c-food); }
  .mobile-list-category-chip.sightseeing .ui-icon { color: var(--c-sightseeing); }
  .mobile-list-category-chip.information .ui-icon { color: var(--forest); }
  .mobile-list-category-chip.souvenir .ui-icon { color: #764fe0; }
  .mobile-list-category-chip.lodging .ui-icon { color: #1b8aa0; }
  .mobile-list-category-chip.all .ui-icon { color: var(--forest); }
  .mobile-list-category-chip.active {
    border-color: var(--forest);
    background: linear-gradient(135deg, var(--forest), #07934f);
    color: #fff;
    box-shadow: 0 12px 24px rgb(27 122 71 / 22%);
  }
  .mobile-list-category-chip.active .ui-icon { color: #fff; }

  .mobile-list-cards {
    display: grid;
    gap: 12px;
    margin-top: 16px;
  }

  .mobile-list-card {
    position: relative;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) 16px;
    gap: 12px;
    align-items: center;
    padding: 10px 12px 10px 10px;
    border: 1px solid rgb(232 236 233 / 82%);
    border-radius: 22px;
    background: rgb(255 255 255 / 94%);
    box-shadow: 0 10px 26px rgb(20 60 40 / 8%);
    cursor: pointer;
    transition: border-color .16s, box-shadow .16s;
  }
  .mobile-list-card.selected {
    border-color: var(--forest);
    box-shadow: 0 14px 30px rgb(27 122 71 / 16%);
  }
  .mobile-list-thumb {
    width: 96px;
    height: 96px;
    border-radius: 16px;
    object-fit: cover;
    background: #e8efe8;
  }
  .mobile-list-thumb.placeholder {
    display: grid;
    place-items: center;
    color: var(--forest);
  }
  .mobile-list-thumb.placeholder .ui-icon { width: 34px; height: 34px; }
  .mobile-list-card-body {
    display: grid;
    gap: 6px;
    min-width: 0;
  }
  .mobile-list-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
  }
  .mobile-list-card-meta .category-badge {
    padding: 4px 8px;
    font-size: 11.5px;
  }
  .mobile-list-card-meta .category-badge .ui-icon { width: 13px; height: 13px; }
  .mobile-list-card-meta .status-open,
  .mobile-list-card-meta .status-closed,
  .mobile-list-card-meta .dist {
    font-size: 12.5px;
  }
  .mobile-list-card-meta .status-open::before,
  .mobile-list-card-meta .status-closed::before {
    width: 7px;
    height: 7px;
  }
  .mobile-list-card-meta .dist .ui-icon { width: 13px; height: 13px; }
  .mobile-list-card h3 {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: #111815;
    font-size: 16.5px;
    font-weight: 850;
    line-height: 1.25;
    white-space: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .mobile-list-addr {
    overflow: hidden;
    margin: 0;
    color: #68716c;
    font-size: 13.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-list-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 1px;
  }
  .mobile-list-card-actions .pill-btn {
    min-width: 0;
    padding: 8px 8px;
    border-radius: 999px;
    font-size: 13px;
  }
  .mobile-list-chevron {
    display: grid;
    place-items: center;
    color: #6e7772;
  }
  .mobile-list-chevron .ui-icon {
    width: 18px;
    height: 18px;
  }

  /* compact map preview shown only after a pin tap */
  .mobile-sheet {
    position: absolute;
    z-index: 650;
    left: 12px;
    right: 12px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    display: block;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .18s ease, transform .18s ease;
  }
  .mobile-sheet[hidden] { display: none !important; }
  .mobile-sheet.open {
    opacity: 1;
    transform: translateY(0);
  }
  .sheet-handle { display: none; }
  .mobile-cards {
    display: block;
    overflow: visible;
    padding: 0;
  }

  .sheet-card {
    pointer-events: auto;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 88px;
    padding: 10px;
    border: 1px solid rgb(255 255 255 / 84%);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 28px rgb(0 0 0 / 16%);
    transition: box-shadow .18s, outline-color .18s;
    outline: 2px solid transparent;
  }
  .sheet-card.selected { outline-color: var(--forest); }
  .sheet-card .sheet-thumb {
    width: 64px;
    height: 64px;
    border-radius: 13px;
    object-fit: cover;
    background: #e8efe8;
  }
  .sheet-card .sheet-thumb.placeholder { display: grid; place-items: center; color: var(--forest); }
  .sheet-card .sheet-thumb.placeholder .ui-icon { width: 28px; height: 28px; }
  .sheet-body {
    display: grid;
    gap: 4px;
    min-width: 0;
  }
  .sheet-toprow {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }
  .sheet-toprow .category-badge {
    max-width: 58%;
    padding: 4px 9px;
    font-size: 12px;
  }
  .sheet-toprow .dist {
    min-width: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
  }
  .sheet-toprow .dist .ui-icon { width: 12px; height: 12px; }
  .sheet-card h3 {
    margin: 0;
    color: var(--ink);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .sheet-card .sheet-addr {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .sheet-actions {
    display: grid;
    grid-template-columns: 38px 52px;
    gap: 6px;
  }
  .sheet-actions .pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 36px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
  }
  .sheet-actions .pill-btn.icon-only {
    width: 38px;
    padding: 0;
  }

  /* bottom nav */
  .mobile-nav {
    position: fixed;
    z-index: 700;
    left: 0; right: 0; bottom: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgb(0 0 0 / 6%);
  }
  .nav-item {
    display: grid;
    justify-items: center;
    gap: 4px;
    flex: 1;
    padding: 6px 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
  }
  .nav-item .ui-icon { width: 24px; height: 24px; }
  .nav-item.active { color: var(--forest); }

  .detail-dialog { width: calc(100vw - 24px); border-radius: 22px; }
  .detail-hero img { height: 220px; }
  .detail-body { padding: 20px; }
  .dialog-actions { flex-direction: column; }
  .dialog-actions a { justify-content: center; }

  /* filter popup (条件) */
  .filter-sheet {
    position: fixed;
    z-index: 800;
    left: 50%;
    top: 50%;
    width: min(420px, calc(100vw - 32px));
    max-height: min(82dvh, 640px);
    display: flex;
    flex-direction: column;
    padding: 18px 20px 22px;
    border-radius: 26px;
    background: var(--surface);
    box-shadow: 0 22px 70px rgb(0 0 0 / 24%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, -48%) scale(.96);
    transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
  }
  .filter-sheet.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
  }
  .filter-sheet .sheet-grip { display: none; }
  .filter-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
  .filter-sheet-head h2 { margin: 0; font-size: 19px; font-weight: 800; color: var(--ink); }
  .filter-sheet-close {
    display: grid; place-items: center;
    width: 38px; height: 38px;
    border: 0; border-radius: 999px;
    background: #f0f2f0; color: var(--ink);
    cursor: pointer;
  }
  .filter-sheet-close .ui-icon { width: 18px; height: 18px; }
  .filter-sheet-body { overflow-y: auto; padding-top: 6px; }
  .filter-sheet-body .filter-title:first-child { margin-top: 8px; }
  .filter-backdrop {
    position: fixed;
    z-index: 790;
    inset: 0;
    background: rgb(0 0 0 / 38%);
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s ease, visibility .28s ease;
  }
  .filter-backdrop.open { opacity: 1; visibility: visible; }
}

@media (max-width: 380px) {
  .mobile-list-card {
    grid-template-columns: 86px minmax(0, 1fr) 14px;
    gap: 10px;
  }
  .mobile-list-thumb {
    width: 86px;
    height: 98px;
  }
  .mobile-list-card h3 { font-size: 15.5px; }
  .mobile-list-card-actions { gap: 8px; }
  .mobile-list-card-actions .pill-btn { padding: 9px 8px; }
}

@media (min-width: 961px) {
  .filter-sheet, .filter-backdrop { display: none !important; }

  /* show the whole PC UI at 80% scale */
  .app-shell {
    zoom: 0.8;
    width: 125vw;
    height: 125vh;
  }
}
