#map-search-toggle,#map-search-close,#map-controls-toggle,#map-controls{display:none}
.immersive #map-search-toggle,.immersive #map-controls-toggle{display:flex;align-items:center;justify-content:center;gap:7px;min-height:46px;padding:10px 16px;border:1px solid #466067;border-radius:24px;background:#0b222bea;color:#efeadb;box-shadow:0 4px 18px #0003;pointer-events:auto;font-size:14px}
.immersive .map-top{position:fixed;left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));top:max(12px,env(safe-area-inset-top));z-index:72;display:flex;align-items:center;gap:8px;width:auto;max-width:none;padding:0;margin:0;pointer-events:none}
.immersive #map-search-toggle{justify-content:flex-start;flex:1;max-width:320px;color:#ddd9c7}
.immersive #map-controls-toggle{margin-left:auto;flex:none}
.immersive #searchform{display:none}
.immersive.map-search-open #searchform{display:flex;flex:1;flex-basis:auto;width:auto;max-width:540px;min-width:0;min-height:46px;margin:0;border-radius:24px;background:#07191ef5;pointer-events:auto}
.immersive.map-search-open #map-search-toggle{display:none}
.immersive.map-search-open #map-search-close{display:block;flex:none;font-size:23px;min-width:44px;min-height:44px}
.immersive #searchform input{min-width:0;font-size:16px;padding:10px 0}
.immersive #searchform>span{padding-left:12px}
.immersive #searchform>button{min-width:44px;min-height:44px;padding:5px}
.immersive #suggestions{max-height:min(360px,55dvh);overflow-y:auto}
.immersive #map-controls:not([hidden]){display:grid;gap:18px;position:fixed;top:70px;right:max(12px,env(safe-area-inset-right));width:min(360px,calc(100vw - 24px));max-height:calc(100dvh - 170px);overflow:auto;padding:20px;background:#10272ff5;border:1px solid #476169;border-radius:20px;z-index:80;box-shadow:0 18px 60px #0007;overscroll-behavior:contain;box-sizing:border-box}
.map-controls-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}
.map-controls-heading h2{font-size:23px;margin:0}
.map-controls-heading button{min-width:44px;min-height:44px;font-size:23px}
.immersive #map-controls .header-actions{display:flex;position:static;justify-content:flex-start}
.immersive #map-controls .language-switch{margin:0}
.immersive #map-controls .view-switch{position:static;inset:auto;display:grid;grid-template-columns:1fr;width:100%;margin:0;border-radius:12px}
.immersive #map-controls .view-switch button{min-height:44px;font-size:14px;text-align:left}
.immersive #map-controls .weather-toolbar{display:grid;grid-template-columns:1fr 1fr;width:100%;margin:0;gap:8px}
.immersive #map-controls .weather-toolbar button{min-height:44px;white-space:normal}
.immersive #map-controls #weather-status{grid-column:1/-1}
.control-appearance{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.control-appearance button{display:flex;align-items:center;gap:8px;min-height:44px;padding:8px;font-size:16px;background:#071b24;border:1px solid #425d65;border-radius:10px;color:#e5c681}
.control-appearance button span{display:inline;font-size:13px;color:#e1e9e7}
.immersive .maptools{bottom:92px;right:max(12px,env(safe-area-inset-right))}
.immersive .maptools>div{display:flex;flex-direction:column;background:#0b222bdb;border-radius:20px;padding:2px}
.immersive .maptools>div button{width:44px;min-height:44px}
.immersive #maximize{right:max(12px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));min-width:44px;min-height:44px;border-radius:16px}
.weather-legend{pointer-events:auto;max-width:260px;padding:0!important;border-radius:16px;overflow:hidden}
.weather-legend summary{cursor:pointer;display:flex;align-items:center;gap:8px;min-height:44px;padding:10px 13px;box-sizing:border-box;color:#e5e8df;font-size:13px;list-style:none}
.weather-legend summary::after{content:'⌄';margin-left:auto;color:#e6c77f}
.weather-legend details[open] summary::after{content:'⌃'}
.weather-legend .weather-legend-body{padding:0 13px 13px;max-height:220px;overflow:auto}
.weather-legend p{margin:0 0 8px}
.immersive .weather-legend{left:12px;top:70px;width:auto;max-width:min(260px,calc(100vw - 80px));z-index:7}
.immersive .layers-panel{top:70px;max-height:calc(100dvh - 170px);z-index:82}
.immersive .weather-card,.immersive:has(#guide:not([hidden])) .weather-card{top:124px;bottom:auto;right:68px;left:auto;max-height:min(350px,45dvh)}
.immersive:has(#map-controls:not([hidden])) .weather-legend{display:none}
@media(max-width:600px){
 .immersive #map-controls:not([hidden]){top:auto;bottom:max(14px,env(safe-area-inset-bottom));left:12px;right:12px;width:auto;max-height:62dvh;padding:16px;border-radius:22px}
 .immersive #map-controls .view-switch{grid-template-columns:repeat(3,1fr)}
 .immersive #map-controls .view-switch button{font-size:12px;padding:7px;text-align:center}
 .immersive.map-search-open #map-controls-toggle span{display:none}
 .immersive.map-search-open #map-controls-toggle{padding:10px;min-width:44px}
 .immersive .layers-panel{position:fixed;top:auto;bottom:max(14px,env(safe-area-inset-bottom));left:12px;right:12px;width:auto;max-width:none;max-height:65dvh;border-radius:22px;padding:16px}
 .immersive .weather-card,.immersive:has(#guide:not([hidden])) .weather-card{top:124px;max-height:34dvh}
 .immersive .map-peek{max-width:calc(100% - 84px)}
}
