/* The map has its own quiet blue palette and two compact rows of controls. */
#nearby-dialog.nearby-sheet[open] {
  --map-ink:#243e55; --map-muted:#5c7083; --map-green:#244b6b;
  --map-paper:#f0f5fb; --map-line:#d7e2ee; --map-soft:#e5eef8;
  position:fixed; inset:0 0 calc(var(--nav-height,76px) + env(safe-area-inset-bottom));
  display:flex; flex-direction:column; width:min(100%,560px); max-width:none;
  height:calc(100dvh - var(--nav-height,76px) - env(safe-area-inset-bottom));
  max-height:none; padding:max(10px,env(safe-area-inset-top)) 0 0;
  margin:0 auto; border:0; border-radius:0; background:var(--map-paper);
  color:var(--map-ink); overflow:hidden; box-shadow:none;
}
#nearby-dialog .sheet-handle { display:none; }
#nearby-dialog .sheet-header { flex:none; min-height:52px; padding:0 18px 9px; margin:0; }
#nearby-dialog .sheet-header h2 { color:var(--map-ink); font-size:25px; line-height:1.2; letter-spacing:-.6px; }
#nearby-dialog .sheet-header .icon-button { width:44px; height:44px; background:var(--map-soft); border:0; color:var(--map-green); }
#nearby-content { display:flex; flex-direction:column; flex:1; min-height:0; min-width:0; overflow:hidden; padding:0; }
.explore-location { flex:none; display:flex; gap:8px; min-width:0; padding:0 18px; }
.explore-location select { flex:1; min-width:0; width:0; min-height:44px; padding:8px 28px 8px 12px; border:1px solid var(--map-line); border-radius:11px; background:#fff; color:var(--map-ink); font:600 14px/1.3 var(--font); }
.explore-location button { display:inline-flex; align-items:center; justify-content:center; flex:none; gap:6px; min-height:44px; padding:8px 11px; border:0; border-radius:11px; background:var(--map-green); color:#fff; font:600 12px/1.3 var(--font); }
.explore-location button .icon { width:16px; height:16px; flex:none; }
.explore-controls { flex:none; display:flex; align-items:center; gap:8px; min-width:0; padding:5px 18px 8px; }
.explore-controls button { position:relative; isolation:isolate; flex:none; min-width:62px; min-height:44px; padding:8px 9px; border:0; border-radius:10px; background:transparent; color:var(--map-green); font:600 12px/1.3 var(--font); }
.explore-controls button::before { content:''; position:absolute; z-index:-1; inset:6px 0; border:1px solid var(--map-line); border-radius:9px; background:#fff; }
.explore-controls button[aria-pressed=true]::before,.explore-controls button[aria-expanded=true]::before { background:var(--map-soft); border-color:#a3bbd3; }
#explore-category { flex:1; min-width:0; width:0; min-height:44px; padding:8px 25px 8px 10px; border:0; border-radius:10px; background:transparent; color:var(--map-green); font:600 13px/1.3 var(--font); }
.explore-search { flex:none; padding:0 18px 9px; }
.explore-search[hidden] { display:none; }
.explore-search input { width:100%; min-width:0; min-height:44px; padding:9px 12px; border:1px solid #a5bcd3; border-radius:11px; background:#fff; color:var(--map-ink); font:400 16px/1.4 var(--font); }
.explore-search input::placeholder { color:var(--map-muted); }
.explore-map-wrap { position:relative; flex:none; margin:0 12px 10px; border:1px solid var(--map-line); border-radius:16px; overflow:hidden; background:#e7eef6; }
#explore-map { height:clamp(145px,26dvh,250px); width:100%; background:#e7eef6; }
#nearby-content[data-layout=list] #explore-map { height:105px; }
#explore-map-error { position:absolute; z-index:500; inset:0; display:grid; place-items:center; margin:0; padding:24px; text-align:center; background:#edf3f9; color:var(--map-ink); font-size:14px; line-height:1.5; }
#explore-map-error[hidden] { display:none; }
#explore-search-map { position:absolute; z-index:450; top:6px; left:9px; isolation:isolate; min-height:44px; padding:8px 12px; border:0; border-radius:10px; background:transparent; color:var(--map-green); font:600 12px/1.3 var(--font); }
#explore-search-map::before { content:''; position:absolute; z-index:-1; inset:5px 0; border:1px solid var(--map-line); border-radius:10px; background:#fff; box-shadow:0 1px 6px #243e5514; }
.explore-reference { position:absolute; z-index:450; bottom:22px; left:10px; max-width:calc(100% - 25px); padding:5px 8px; border:1px solid #d7e2ee; border-radius:8px; background:#ffffffed; color:#456078; font-size:11px; line-height:1.3; pointer-events:none; }
.explore-zoom { position:absolute; z-index:450; right:7px; top:6px; display:grid; gap:0; }
.explore-zoom button { position:relative; isolation:isolate; display:grid; place-items:center; width:44px; height:44px; padding:0; border:0; border-radius:10px; background:transparent; color:var(--map-green); font:500 23px/1 var(--font); }
.explore-zoom button::before { content:''; position:absolute; z-index:-1; inset:5px; border:1px solid var(--map-line); border-radius:10px; background:#fff; box-shadow:0 1px 6px #243e5514; }
.explore-zoom button:disabled,.explore-location button:disabled { opacity:.6; cursor:wait; }
.explore-results-heading { flex:none; display:flex; align-items:center; justify-content:space-between; gap:10px; min-width:0; padding:0 18px; }
.explore-results-heading h3 { margin:0; color:var(--map-ink); font:700 18px/1.4 var(--display); letter-spacing:-.3px; }
.explore-results-heading>span { flex:none; color:var(--map-muted); font-size:12px; }
.explore-status { flex:none; margin:3px 0 9px; padding:0 18px; color:var(--map-muted); font-size:12px; line-height:1.4; overflow-wrap:anywhere; }
.explore-results { flex:1; min-height:70px; min-width:0; display:grid; align-content:start; gap:8px; overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; padding:0 18px 12px; scroll-padding:8px 0; }
.explore-place { min-width:0; border:1px solid var(--map-line); border-radius:13px; background:#fff; }
.explore-place.is-selected { border-color:#8eacc9; box-shadow:0 0 0 1px #8eacc9; }
.explore-place-summary { display:flex; align-items:center; justify-content:space-between; gap:10px; list-style:none; min-height:74px; padding:11px 12px; cursor:pointer; }
.explore-place-summary::-webkit-details-marker { display:none; }
.explore-place-name { display:grid; gap:3px; min-width:0; }
.explore-place-name strong { color:var(--map-ink); font-size:14px; line-height:1.35; font-weight:650; overflow-wrap:anywhere; }
.explore-place-name small { color:var(--map-muted); font-size:12px; line-height:1.4; }
.explore-place-name .explore-place-teaser { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:1; overflow:hidden; }
.explore-place[open] .explore-place-teaser { display:none; }
.explore-place-distance { flex:none; padding:5px 7px; border-radius:7px; background:var(--map-soft); color:var(--map-green); font-size:12px; font-weight:600; white-space:nowrap; }
.explore-place-body { border-top:1px solid #e4ecf4; padding:12px; color:#455e74; font-size:14px; line-height:1.5; }
.explore-place-body p { margin:0 0 10px; overflow-wrap:anywhere; }
.explore-description { color:var(--map-ink); }
.explore-place-actions { display:flex; gap:8px; margin:12px 0 8px; }
.explore-save-button,.place-maps-link { flex:1; min-width:0; display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:9px 10px; border:1px solid #b9ccdf; border-radius:10px; background:#fff; color:var(--map-green); font:600 13px/1.3 var(--font); text-decoration:none; text-align:center; }
.explore-save-button[aria-pressed=true] { background:var(--map-soft); border-color:#88aacb; }
.explore-route-button { width:100%; min-height:44px; padding:10px 13px; border:0; border-radius:10px; background:var(--map-green); color:#fff; font:650 13px/1.3 var(--font); }
.explore-route-button:disabled { opacity:.65; cursor:wait; }
.explore-route-details { margin:10px 0 0; padding:12px; border-radius:10px; background:var(--map-soft); color:#244b6b; font-size:13px; line-height:1.5; }
.explore-route-details:empty { display:none; }
.explore-route-details p { margin:7px 0; }
.explore-route-details ol { margin:8px 0 0; padding-left:20px; }
.explore-route-details li+li { margin-top:7px; }
.explore-place-info { margin-top:8px; color:var(--map-muted); font-size:12px; }
.explore-place-info summary { min-height:44px; display:flex; align-items:center; cursor:pointer; color:var(--map-green); font-weight:600; }
.explore-place-info summary::after { content:'+'; margin-left:auto; font-size:19px; font-weight:400; }
.explore-place-info[open] summary::after { content:'−'; }
.explore-place-info a { display:inline-flex; align-items:center; min-height:44px; margin-right:14px; color:var(--map-green); text-underline-offset:3px; }
.explore-event-date { color:#765586; font-size:12px; font-weight:650; }
.place-rating { color:#66501d; font-size:13px; font-weight:600; }
.explore-info { flex:none; max-height:120px; overflow-y:auto; overflow-x:hidden; border-top:1px solid var(--map-line); background:var(--map-paper); color:var(--map-muted); font-size:12px; line-height:1.5; }
.explore-info>summary { min-height:34px; display:flex; align-items:center; justify-content:center; gap:8px; padding:5px 18px; cursor:pointer; font-size:11px; }
.explore-info>summary::after { content:'+'; }
.explore-info[open]>summary::after { content:'−'; }
.explore-info p { margin:0; padding:4px 18px 10px; overflow-wrap:anywhere; }
.leaflet-container { font-family:var(--font); }
.leaflet-control-attribution { max-width:100%; font-size:10px!important; }
.explore-marker { background:transparent; border:0; }
.explore-marker>span { display:grid; place-items:center; width:32px; height:32px; margin:6px; border:2px solid #fff; border-radius:11px; background:#315e87; color:#fff; box-shadow:0 2px 6px #243e5529; transition:transform .16s ease,box-shadow .16s ease; }
.explore-marker svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.explore-marker-food>span { background:#a4653f; }
.explore-marker-cafes>span { background:#7c5b3e; border-radius:50%; }
.explore-marker-activities>span { background:#55717e; }
.explore-marker-events>span { background:#76638c; }
.explore-marker.is-approximate>span { border-style:dashed; }
.explore-marker.is-selected>span { transform:scale(1.12); box-shadow:0 0 0 3px #244b6b,0 3px 9px #243e5538; }
.explore-marker-cluster>span { background:#f5f9ff; color:#244b6b; border:2px solid #315e87; border-radius:50%; font:700 14px/1 var(--font); box-shadow:0 0 0 3px #ffffffd9,0 2px 6px #243e5529; }
.explore-marker-cluster:hover>span { background:#dce9f8; }
.nearby-sheet button:focus-visible,.nearby-sheet select:focus-visible,.nearby-sheet input:focus-visible,.nearby-sheet summary:focus-visible,.nearby-sheet a:focus-visible,.explore-marker:focus-visible>span { outline:3px solid #176b94; outline-offset:3px; }
.nearby-sheet button:hover:not(:disabled),.place-maps-link:hover { filter:brightness(.96); }
@media(max-height:760px) {
  #nearby-dialog.nearby-sheet[open] { padding-top:max(5px,env(safe-area-inset-top)); }
  #nearby-dialog .sheet-header { min-height:46px; padding-bottom:5px; }
  #nearby-dialog .sheet-header h2 { font-size:23px; }
  #explore-map { height:clamp(105px,20dvh,150px); }
  #nearby-content[data-layout=list] #explore-map { height:80px; }
  .explore-map-wrap { margin-bottom:7px; }
  .explore-controls { padding-top:3px; padding-bottom:5px; }
  .explore-status { margin-bottom:7px; }
  .explore-place-name .explore-place-teaser { display:none; }
  .explore-place-summary { min-height:66px; }
  .explore-info>summary { min-height:30px; }
}
@media(max-width:350px) {
  .explore-location,.explore-controls,.explore-results,.explore-results-heading,.explore-status,.explore-search { padding-left:14px; padding-right:14px; }
  .explore-location button { padding-left:9px; padding-right:9px; }
  .explore-location select { font-size:13px; }
  .explore-controls { gap:6px; }
  .explore-controls button { min-width:58px; padding-left:7px; padding-right:7px; }
  #explore-category { font-size:12px; padding-left:6px; }
}
@media(max-height:530px) {
  #nearby-dialog.nearby-sheet[open] { overflow-y:auto; }
  #nearby-content { flex:none; min-height:470px; overflow:visible; }
  .explore-results { min-height:150px; max-height:320px; }
  #explore-map { height:110px; }
}
@media(prefers-reduced-motion:reduce) { .explore-marker>span { transition:none; } }
