:root {
  --bg: #ffffff;
  --fg: #1f2328;
  --muted: #656d76;
  --line: #d8dee4;
  --accent: #d9480f;
  --accent-fg: #ffffff;
  --chip: #f3f4f6;
  --shadow: 0 2px 12px rgba(0, 0, 0, .18);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1f24;
    --fg: #e6e8eb;
    --muted: #9aa3ad;
    --line: #353b43;
    --accent: #ff7a3d;
    --accent-fg: #1c1f24;
    --chip: #2a2f36;
    --shadow: 0 2px 12px rgba(0, 0, 0, .5);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", "Noto Sans Thai", sans-serif; }
#map { position: fixed; inset: 0; }

.top { position: fixed; top: 0; left: 0; right: 0; padding: max(10px, env(safe-area-inset-top)) 12px 0; z-index: 2; pointer-events: none; }
.top > * { pointer-events: auto; }
.search { display: flex; gap: 8px; }
.search input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--line);
  background: var(--bg); color: var(--fg); font: inherit; box-shadow: var(--shadow); }
.icon-btn { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line); background: var(--bg);
  color: var(--accent); font-size: 22px; box-shadow: var(--shadow); cursor: pointer; }
.icon-btn.on { background: var(--accent); color: var(--accent-fg); }
.results { list-style: none; margin: 6px 0 0; padding: 4px 0; background: var(--bg); border-radius: 12px; box-shadow: var(--shadow); max-height: 50vh; overflow: auto; }
.results li { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--line); }
.results li:last-child { border-bottom: 0; }
.chips { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chip { flex: none; height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--line); background: var(--bg);
  color: var(--fg); font: inherit; font-size: 14px; box-shadow: var(--shadow); cursor: pointer; }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.chip.ghost.on { border-color: var(--accent); color: var(--accent); }

.fab { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 2;
  height: 44px; padding: 0 20px; border-radius: 22px; border: 0; background: var(--accent); color: var(--accent-fg);
  font: inherit; font-weight: 600; box-shadow: var(--shadow); cursor: pointer; }

.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; max-height: 70vh; overflow: auto; background: var(--bg);
  border-radius: 16px 16px 0 0; box-shadow: var(--shadow); padding: 18px 16px max(18px, env(safe-area-inset-bottom)); }
@media (min-width: 720px) { .sheet { left: 12px; right: auto; width: 400px; bottom: 12px; border-radius: 16px; } }
.sheet-close { position: sticky; top: 0; float: right; width: 32px; height: 32px; border-radius: 16px; border: 0;
  background: var(--chip); color: var(--fg); cursor: pointer; }
.sheet h2 { margin: 0 40px 2px 0; font-size: 19px; }
.sheet h3 { margin: 16px 0 6px; font-size: 14px; color: var(--muted); font-weight: 600; }
.meta { color: var(--muted); font-size: 13px; }
.nav { display: flex; gap: 8px; margin: 12px 0 4px; }
.nav a { flex: 1; text-align: center; padding: 10px; border-radius: 10px; text-decoration: none; font-weight: 600; }
.nav a.primary { background: var(--accent); color: var(--accent-fg); }
.nav a.secondary { background: var(--chip); color: var(--fg); }
.review { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.review img { width: 120px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; flex: none; background: var(--chip); }
.review b { display: block; font-size: 14px; }
.review span { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list-item { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.list-item small { color: var(--muted); white-space: nowrap; }
.checks label { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.checks input { width: 18px; height: 18px; accent-color: var(--accent); }
select { height: 40px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; }
.empty { color: var(--muted); padding: 8px 0; }
.maplibregl-ctrl-bottom-right { bottom: 70px; }
