:root {
  --green: #1f7a2e; --green-d: #165c22; --ink: #202124; --slate: #5f6368; --rule: #e3e3e0; --bg: #ffffff; --shadow: 0 2px 6px rgba(60, 64, 67, .28), 0 1px 2px rgba(60, 64, 67, .2);
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font: 15px/1.4 var(--font); color: var(--ink); background: #f2efe7; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
#map { position: fixed; inset: 0; }

/* search bar */
.top { position: absolute; top: 12px; left: 12px; z-index: 5; width: min(400px, calc(100% - 24px)); }
.search { display: flex; align-items: center; gap: 4px; background: var(--bg); border-radius: 24px; box-shadow: var(--shadow); padding: 5px 6px 5px 6px; height: 48px; }
.brand img { display: block; border-radius: 50%; }
.search input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: 16px; padding: 0 6px; background: none; }
.search input::-webkit-search-cancel-button { display: none; }
.ico { border: 0; background: none; width: 38px; height: 38px; border-radius: 50%; font-size: 17px; color: var(--slate); }
.ico:hover { background: #f1f3f4; }
.results { list-style: none; margin: 6px 0 0; padding: 6px 0; background: var(--bg); border-radius: 14px; box-shadow: var(--shadow); max-height: 60vh; overflow-y: auto; }
.results li { display: flex; gap: 12px; align-items: center; padding: 8px 14px; cursor: pointer; }
.results li:hover, .results li.on { background: #f1f3f4; }
.results li.none { color: var(--slate); cursor: default; }
.results b, .near b { display: block; font-weight: 600; font-size: 14.5px; }
.results small, .near small { color: var(--slate); font-size: 12.5px; }
.r-ico { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 13px; }
.chips { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; display: flex; gap: 6px; align-items: center; border: 0; background: var(--bg); border-radius: 18px; padding: 7px 13px; box-shadow: var(--shadow); font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.chips button[aria-pressed="true"] { background: #e6f2e7; color: var(--green-d); box-shadow: inset 0 0 0 1.5px var(--green), var(--shadow); }

/* card */
.card { position: absolute; z-index: 4; left: 12px; top: 118px; width: min(400px, calc(100% - 24px)); max-height: calc(100% - 140px); overflow-y: auto; background: var(--bg); border-radius: 14px; box-shadow: var(--shadow); padding: 18px 18px 14px; }
.card-x { position: absolute; top: 10px; right: 10px; border: 0; background: #f1f3f4; width: 32px; height: 32px; border-radius: 50%; color: var(--slate); }
.card h2 { margin: 2px 40px 2px 0; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.c-kind { font-size: 13px; font-weight: 600; }
.c-alt { margin: 0; color: var(--slate); font-size: 13.5px; }
.c-where { margin: 6px 0 0; font-size: 14px; }
.c-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 6px; }
.c-btn { border: 1px solid #dadce0; background: #fff; border-radius: 18px; padding: 7px 13px; font-size: 13.5px; font-weight: 500; color: var(--green-d); text-decoration: none; }
.c-btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.c-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 12px 0 4px; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 13.5px; }
.c-facts dt { color: var(--slate); }
.c-facts dd { margin: 0; font-variant-numeric: tabular-nums; }
.warn, .info { margin: 10px 0 0; font-size: 13.5px; border-radius: 10px; padding: 9px 11px; }
.warn { background: #fdecea; color: #8a1f17; }
.info { background: #f6efe2; color: #6b4e1d; }
.card h3 { font-size: 14px; margin: 14px 0 4px; }
.near { list-style: none; margin: 0; padding: 0; }
.near li { display: flex; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--rule); cursor: pointer; }
.near li > span:nth-child(2) { flex: 1; min-width: 0; }
.near em { font-style: normal; color: var(--slate); font-size: 12.5px; }

/* menu */
.menu { position: absolute; z-index: 6; top: 66px; left: 12px; width: min(330px, calc(100% - 24px)); background: var(--bg); border-radius: 14px; box-shadow: var(--shadow); padding: 16px; }
.menu-h { display: flex; gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.menu-h img { border-radius: 50%; }
.menu-h b { display: block; font-size: 16px; color: var(--green-d); }
.menu-h small { color: var(--slate); }
.menu h4 { margin: 14px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--slate); }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { border: 1px solid #dadce0; background: #fff; border-radius: 16px; padding: 5px 12px; font-size: 13.5px; }
.seg button[aria-pressed="true"] { background: #e6f2e7; border-color: var(--green); color: var(--green-d); font-weight: 600; }
.tog { display: flex; gap: 10px; align-items: center; padding: 5px 0; font-size: 14px; cursor: pointer; }
.tog input { width: 17px; height: 17px; accent-color: var(--green); }
.menu-note { font-size: 12.5px; color: var(--slate); margin: 14px 0 6px; }
.menu-links { font-size: 13px; margin: 0; }
.menu-links a { color: var(--green-d); }

.notice { position: absolute; z-index: 3; left: 50%; transform: translateX(-50%); bottom: 34px; background: rgba(32, 33, 36, .82); color: #fff; font-size: 13px; padding: 7px 14px; border-radius: 16px; max-width: calc(100% - 140px); text-align: center; pointer-events: none; }
.toast { position: absolute; z-index: 7; left: 50%; transform: translateX(-50%); bottom: 74px; background: #323232; color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; }

.maplibregl-ctrl-group { border-radius: 10px !important; box-shadow: var(--shadow) !important; }
.maplibregl-ctrl-attrib { font-size: 11px; }

@media (max-width: 640px) {
  .card { top: auto; bottom: 0; left: 0; width: 100%; max-height: 55%; border-radius: 16px 16px 0 0; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .notice { bottom: 22px; max-width: calc(100% - 110px); }
  .maplibregl-ctrl-bottom-left { bottom: 0; }
}
