﻿* { box-sizing: border-box; }
body { margin: 1rem; font: 16px sans-serif; }
header, nav, main, section { display: block; margin-bottom: 1rem; }
nav, button, input, select { margin: .25rem; }
#map-stage { position: relative; height: min(70vh, 640px); min-height: 420px; border: 1px solid #24364b; overflow: hidden; isolation: isolate; background: #050b18; }
#globe, #detail-map { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .9s ease, transform 1s cubic-bezier(.2,.7,.2,1); will-change: opacity, transform; }
#globe { z-index: 1; opacity: 1; transform: scale(1); }
#detail-map { z-index: 2; opacity: 0; transform: scale(.94); pointer-events: none; background: #050b18; }
#map-stage.detailed #detail-map { opacity: 1; transform: scale(1); pointer-events: auto; }
#map-stage.detailed #globe { opacity: 0; transform: scale(1.16); pointer-events: none; }
.map-pin { width: 17px; height: 17px; padding: 0; border: 2px solid #dffaff; border-radius: 50%; background: #29dfff; box-shadow: 0 0 0 4px #29dfff33, 0 0 14px #29dfff; cursor: pointer; }
.map-pin.user { display: block; background: #ff5b75; border-color: white; box-shadow: 0 0 0 5px #ff5b7540, 0 0 18px #ff5b75; }
#detail-map .maplibregl-ctrl-group { overflow: hidden; border: 1px solid #29425c; border-radius: 6px; background: #0b1626; box-shadow: 0 0 12px #0008; }
#detail-map .maplibregl-ctrl-group button { background-color: #0b1626; }
#detail-map .maplibregl-ctrl-group button + button { border-top: 1px solid #29425c; }
#detail-map .maplibregl-ctrl-icon { filter: invert(1); }
#detail-map .maplibregl-ctrl-attrib { color: #bed0e4; background: #07111dcc; }
#detail-map .maplibregl-ctrl-attrib a { color: #b9eaff; }
#detail-map .maplibregl-popup-content { padding: .6rem .8rem; border: 1px solid #31506e; border-radius: 6px; color: #e9f6ff; background: #0b1626; box-shadow: 0 0 16px #0009; }
#detail-map .maplibregl-popup-tip { border-top-color: #0b1626; border-bottom-color: #0b1626; }
#place-list, #nearby-list { display: grid; gap: .75rem; }
.place-card, #place-panel { border: 1px solid; padding: .75rem; }
.place-card img, #place-detail img, #swipe-card img { display: block; width: min(100%, 420px); height: auto; }
#place-panel { position: fixed; z-index: 1000; top: 1rem; right: 1rem; width: min(420px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto; background: white; }
#search-results:empty { display: none; }
#search-results button { display: block; }
#globe-route-info { min-height: 1.25em; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  #globe, #detail-map { transition-duration: .2s; }
}
