:root{/* UI colours, shadows and type scale used by the panels; edit here only */--font-xs:12px;--font-sm:13px;--font-md:14px;--ui-scene-bg:#0b1215;--ui-scene-bg-light:#e5ebe7;--shadow-soft:#0002;--ui-profile-bg-light:#132326;--ui-backdrop:rgb(0 0 0 / 20%);--shadow-dialog:rgb(0 0 0 / 16%);--ui-backdrop-strong:rgb(0 0 0 / 24%);--ui-river-label:#c7f4ff;--ui-river-halo:#063747;--ui-ruler-active:#ff3452;--ui-chip-border:#ffffff80;--ui-chip-bg:#102022ed;--shadow-chip:#0004;--ui-location:#126ad0;--ui-location-ring:#124879;--shadow-legend:#0003;--ui-legend-path:#b2e55c;--ui-legend-gallery:#ff29bc;--ui-legend-gallery-ring:#3b1035;--warn:#ffb347;--warn-bg:rgba(255,179,71,.1);--warn-text:#ffcf8a;--warn-text-light:#8a4b00;--warn-bg-light:rgba(255,160,40,.14);--warn-light:#a65a00;--shadow-float:rgba(0,0,0,.38);--shadow-float-soft:rgba(0,0,0,.34);--on-accent:#06201c;--on-accent-light:#fff;--ui-swatch-green:#81e289;--ui-swatch-sand:#c49e74;--ui-swatch-teal:#77e3dc;--ui-swatch-amber:#ffca88;--ui-muted-teal:#a5bfbd;--ui-lime:#c5f484;--ui-accent-soft:#7ee4d6;--ui-badge-bg:rgba(26,45,47,0.8);--ui-badge-border:rgba(86,211,199,0.35);--ui-muted:#b4c5c4;--ui-well-bg:rgba(0,0,0,0.35);--ui-well-border:rgba(255,255,255,0.08);--ui-muted-2:#8fa7a6;--ui-well-bg-strong:rgba(0,0,0,0.4);--compass-face:#0d161cee;--compass-rim:#33474f;--compass-ticks:#1d2e35;--compass-north:#ff5555;--compass-letters:#9cb2b8;--compass-needle-north:#ff4d4d;--compass-needle-south:#75929d;--compass-hub:#e5f5f5;--ui-gradient-stop:#2a5a58;--ui-rule:#22333b;}
/* Viewer occupies the viewport; all controls sit above the cartography. */
html.atlas-ready{--panel:#142023;--inset:#1b2c30;--edge:#384b4d;--fg:#edf4ee;--dim:#a5bab4;--accent:#92e5ca;--selected:#244a40;color-scheme:dark}
html.atlas-ready[data-atlas-theme=light]{--panel:#f8fbf6;--inset:#edf2ec;--edge:#bdcbc2;--fg:#172e26;--dim:#455f53;--accent:#00654d;--selected:#d7eddf;color-scheme:light}
#atlasUI{display:none}.atlas-ready #atlasUI{display:contents}
.atlas-ready body>header,.atlas-ready #activeSceneHud,.atlas-ready #world>.tools,.atlas-ready .viewer>.legend,.atlas-ready .viewer>.geoRead{display:none!important}
.atlas-ready body #world{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;max-height:none!important;background:var(--ui-scene-bg)!important;border:0!important;border-radius:0!important}
.atlas-ready[data-atlas-theme=light] body #world,.atlas-ready[data-atlas-theme=light] #gl{background:var(--ui-scene-bg-light)!important}
.atlas-ready .atlas-surface,.atlas-ready .atlas-pop,.atlas-ready #atlasUI .top-dropdown-menu,.atlas-ready #profileContainer{background:var(--panel)!important;color:var(--fg)!important;border:1px solid var(--edge)!important;border-radius:11px!important;box-shadow:0 4px 16px var(--shadow-soft)!important;backdrop-filter:none!important}
#atlasUI .atlas-surface{position:fixed;z-index:1000;display:flex;align-items:center;gap:4px;padding:5px}
#atlasIdentity{top:14px;left:14px;gap:14px!important;padding:10px 14px!important}
#atlasIdentity .brand{display:flex;align-items:center;gap:6px;color:var(--accent)}#atlasIdentity .brand svg{width:29px;height:29px}
#atlasIdentity .brand-title{font:700 20px Space,sans-serif;letter-spacing:.06em;color:var(--fg)}#atlasIdentity .brand-sub,#atlasIdentity .atlas-badge{display:none!important}
#atlasIdentity .hcb-info{display:grid!important;gap:3px;border-left:1px solid var(--edge);padding-left:12px}#atlasIdentity .hcb-title{font:700 15px Space,sans-serif!important;color:var(--fg)!important}#atlasIdentity .hcb-sub{font: var(--font-xs) system-ui!important;color:var(--dim)!important}
#atlasModes{top:14px;left:50%;transform:translateX(-50%)}#atlasUtilities{top:14px;right:14px}
#atlasExplore{left:14px;top:88px;width:173px;flex-direction:column;align-items:stretch!important;padding:8px!important}
.atlas-caption{padding:4px 8px 7px;color:var(--dim);text-transform:uppercase;letter-spacing:.16em;font:700  var(--font-xs)/1.4 system-ui}
#atlasUI button,.atlas-ready #profileContainer button{position:static!important;transform:none!important;height:auto!important;width:auto;min-height:33px;min-width:0;max-width:100%;margin:0!important;border:1px solid transparent!important;border-radius:6px!important;padding:6px 10px!important;background:transparent!important;box-shadow:none!important;color:var(--fg)!important;font:600 13px/1.35 system-ui,sans-serif!important;letter-spacing:normal!important;white-space:normal;cursor:pointer}
#atlasUI button:hover,#atlasUI button:focus-visible{background:var(--inset)!important;border-color:var(--edge)!important}
#atlasUI button:focus-visible,#atlasUI input:focus-visible,#atlasUI select:focus-visible{outline:2px solid var(--accent)!important;outline-offset:1px}
#atlasUI button.active,#atlasUI .top-dropdown.open>.top-dropdown-btn,#atlasUI button[aria-expanded=true]{background:var(--selected)!important;color:var(--accent)!important}
.atlas-ready:has(#world[data-mode=map]) #atlasModes .preset-btn{background:transparent!important;color:var(--fg)!important}
#atlasUI .icon,#atlasUI .sp-icon,#atlasUI .caret{display:none!important}
#atlasExplore>button,#atlasExplore>.top-dropdown>button{width:100%!important;text-align:left!important;justify-content:space-between}
#atlasUI #quickStationBadge{color:var(--accent)!important}
#atlasUI .atlas-pop:popover-open{position:fixed;inset:70px 14px auto auto;margin:0;width:min(342px,calc(100vw - 28px));padding:14px;max-height:calc(100dvh - 88px);overflow:auto;box-sizing:border-box}
#atlasUI .atlas-pop h2{font:700 17px Space,system-ui;color:var(--fg);margin:2px 4px 12px}
#atlasUI #projectPanel:popover-open{display:grid;text-align:left}#projectPanel>button{text-align:left}
#atlasUI #routePanel:popover-open{inset:88px auto auto 198px}
#atlasUI #cameraPanel:popover-open,#atlasUI #legendPanel:popover-open{inset:auto auto 70px 14px}
#atlasUI #surveyPillbar,#atlasUI #viewAnglesWidget{position:static!important;display:flex!important;width:auto!important;height:auto!important;align-items:stretch;flex-wrap:wrap!important;gap:5px!important;padding:5px 0!important;border:0!important;background:none!important;box-shadow:none!important}
#atlasUI #surveyPillbar .sp-label{display:none}#atlasUI #surveyPillbar button{border-color:var(--edge)!important}
#atlasUI #viewAnglesWidget button{width:auto!important}
#atlasUI #atlasCamera{left:14px;bottom:16px}#atlasUI #atlasCamera button{display:inline-flex!important;align-items:center;justify-content:center}
#atlasUI .top-dropdown-menu{position:fixed!important;inset:80px 14px auto auto!important;transform:none!important;width:min(368px,calc(100vw - 28px))!important;max-height:calc(100dvh - 100px)!important;overflow:auto!important;z-index:1200!important}
#atlasUI .top-dropdown-body{max-height:none!important;background:var(--panel)!important;color:var(--fg)!important;overflow:visible!important}
#atlasUI .top-dropdown-header{background:var(--inset)!important;color:var(--fg)!important;position:sticky;top:0;z-index:1}
#atlasUI :is(.top-dropdown-header strong,.station-data-dl dd,.layer-item label,.top-dropdown-body strong,.dropdown-label,.sid-display){color:var(--fg)!important}
#atlasUI :is(dt,.top-dropdown-body small,.export-item-desc,#shots,#endCoords,#metricReadout,#accuracy){color:var(--dim)!important}
#atlasUI :is(input:not([type=checkbox],[type=range]),select){background:var(--inset)!important;border:1px solid var(--edge)!important;color:var(--fg)!important;min-height:34px;border-radius:5px}
#atlasUI .atlas-terrain{padding:4px 0 10px;border-bottom:1px solid var(--edge)}#atlasUI .atlas-terrain .ucb-group{display:flex;flex-wrap:wrap;gap:6px;color:var(--fg);margin:4px}
#atlasUI #legendPanel :is(.geoRead,.legend,#depthLegend){display:block!important;height:auto!important;margin:5px 0!important;padding:5px!important;background:var(--inset)!important;border:0!important;color:var(--fg)!important;white-space:normal}
.atlas-ready #world #compassWidget{top:75px!important;right:14px!important}
.atlas-ready #world #scaleWidget{bottom:70px!important;left:14px!important}
.atlas-ready #world #profileContainer:not([hidden]){position:absolute!important;inset:auto auto 73px 14px!important;width:min(660px,calc(100vw - 28px))!important;max-height:35dvh;overflow:auto}
.atlas-ready #world #pin{pointer-events:auto;cursor:pointer}
.atlas-ready #world[data-mode=map] .leaflet-bottom.leaflet-left{bottom:62px}
.atlas-ready[data-atlas-theme=light] dialog,.atlas-ready[data-atlas-theme=light] dialog :is(.modal-content,.modal-body,.modal-header,.modal-tabs,.tab-content,.modal-card,.import-tab-btn,button,.info-card){background-color:var(--panel)!important;color:var(--fg)!important;border-color:var(--edge)!important}
.atlas-ready[data-atlas-theme=light] dialog :is(p,span,small,li,td,h1,h2,h3,h4,b,strong,label,div){color:var(--fg)!important}
.atlas-ready[data-atlas-theme=light] dialog :is(section,article,table,th,td,[style*="background"]){background-color:var(--inset)!important}
@media(max-width:960px){#atlasModes{top:82px;left:14px;transform:none}#atlasExplore{top:142px}#atlasUI #routePanel:popover-open{top:142px}}
@media(max-width:620px){#atlasIdentity{top:7px;left:7px;padding:7px!important;gap:5px!important}#atlasIdentity .hcb-sub,#atlasIdentity .brand-text{display:none!important}#atlasIdentity .hcb-title{font-size:12px!important}#atlasIdentity .hcb-info{padding-left:5px}#atlasIdentity .brand svg{width:19px}#atlasUtilities{right:7px;top:7px}#atlasUI #atlasUtilities button{padding:4px 6px!important;font-size:12px!important}#atlasModes{left:7px;top:58px}#atlasExplore{top:108px;left:7px;width:138px}#atlasExplore .atlas-caption{display:none}#atlasUI #routePanel:popover-open,#atlasUI .top-dropdown-menu,#atlasUI #projectPanel:popover-open{inset:auto 7px 8px 7px!important;width:auto!important;max-height:65dvh!important}#atlasCamera{left:7px!important;bottom:8px!important}#atlasUI #cameraPanel:popover-open,#atlasUI #legendPanel:popover-open{left:7px;bottom:60px}.atlas-ready #world #compassWidget{top:59px!important;right:7px!important}.atlas-ready #world #profileContainer:not([hidden]){left:7px!important;bottom:59px!important;width:calc(100vw - 14px)!important}}
.atlas-ready[data-atlas-theme=light] dialog :is(.modal-box,.dossier-card,.modal-footer,.tab-pane,.drop-zone,.stat-card,.import-row,.info-callout){background:var(--panel)!important;color:var(--fg)!important;border-color:var(--edge)!important}
#atlasUI #toggleProfile,#atlasUI .top-dropdown-btn,#atlasUI [popovertarget=routePanel]{display:flex!important;align-items:center;justify-content:flex-start;gap:8px}
#atlasExplore>button::before,#atlasExplore .top-dropdown-btn::before{width:17px;font:16px/1 monospace;color:var(--accent);text-align:center}
#atlasExplore [popovertarget=routePanel]::before{content:'⑂'}#atlasExplore #toggleProfile::before{content:'∿'}#atlasExplore #btnDropdownLayers::before{content:'▱'}#atlasExplore #btnDropdownStation::before{content:'⌖'}
#atlasUI .top-dropdown-btn .btn-text{font:inherit;color:inherit}
#atlasUI .atlas-search-status:empty{display:none}#atlasUI .atlas-search-status{display:block;padding:5px 0}
.atlas-ready[data-atlas-theme=light] #profileContainer :is(.profile-header,.profile-legend,.profile-body){background:var(--panel)!important;color:var(--fg)!important}
.atlas-ready[data-atlas-theme=light] #profileContainer svg{background:var(--ui-profile-bg-light);border-radius:5px}
#atlasUI .atlas-pop .atlas-close{position:absolute!important;right:8px;top:7px;padding:4px 11px!important;font-size:19px!important}
#atlasResolution{display:flex;align-items:center;gap:9px;font:12px system-ui;color:var(--dim);margin:8px 3px}
.atlas-ready #profileContainer .profile-title strong,.atlas-ready #profileContainer .profile-title small{color:var(--fg)!important}
#atlasUI #menuStation,#atlasUI #menuLayers,#atlasUI #menuExport{opacity:1!important;background:var(--panel)!important;isolation:isolate}
@media (min-width:621px) and (min-height:501px), (min-width:621px) and (pointer:fine){
  #atlasUI #atlasExplore :is(#dropdownLayers,#dropdownStation){position:relative!important}
  #atlasUI #atlasExplore :is(#menuLayers,#menuStation){position:absolute!important;inset:0 auto auto calc(100% + 8px)!important;max-height:calc(100dvh - 160px)!important}
}
@media(max-width:620px),(pointer:coarse){
  html.atlas-ready{--base-bottom:calc(env(safe-area-inset-bottom,0px) + 7px);--dock-height:62px}
  #atlasIdentity{left:max(7px,env(safe-area-inset-left));top:max(7px,env(safe-area-inset-top));max-width:calc(100vw - 195px);min-height:44px;padding:6px!important;gap:3px!important;box-sizing:border-box}
  #atlasIdentity .brand-text,#atlasIdentity .hcb-sub,#atlasIdentity .atlas-badge{display:none!important}
  #atlasIdentity .hcb-info{padding-left:5px!important}#atlasIdentity .brand svg{width:20px}
  #atlasIdentity .hcb-title{white-space:normal!important;font-size:12px!important;line-height:1.16!important}
  #atlasUI #atlasUtilities{top:max(7px,env(safe-area-inset-top));right:max(7px,env(safe-area-inset-right));padding:2px!important;gap:0}
  #atlasUI #atlasUtilities button,#atlasUI #themeSwitch{min-height:44px!important;min-width:36px;font-size:12px!important;padding:4px 6px!important}
  #atlasUI #atlasModes{top:calc(max(7px,env(safe-area-inset-top)) + 54px);left:7px;transform:none;gap:0;padding:2px}
  #atlasUI #atlasModes button{min-height:42px!important;padding:4px 10px!important}
  #atlasUI #atlasExplore{position:fixed;top:auto!important;bottom:var(--base-bottom)!important;left:max(7px,env(safe-area-inset-left));right:max(7px,env(safe-area-inset-right));width:auto!important;height:var(--dock-height);box-sizing:border-box;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));align-items:stretch!important;gap:2px!important;padding:3px!important;z-index:1010}
  #atlasExplore .atlas-caption{display:none!important}
  #atlasUI #atlasExplore>button,#atlasUI #atlasExplore>.top-dropdown>.top-dropdown-btn{height:100%!important;min-height:48px!important;display:flex!important;flex-direction:column;align-items:center!important;justify-content:center!important;text-align:center!important;gap:3px;padding:3px!important;font-size: var(--font-xs)!important;white-space:nowrap}
  #atlasExplore .top-dropdown{position:static!important;min-width:0}#atlasExplore .btn-text{white-space:nowrap}#atlasExplore #quickStationBadge{font-size: var(--font-xs)}
  #atlasUI .top-dropdown-menu,#atlasUI .atlas-pop:popover-open{box-sizing:border-box!important;position:fixed!important;inset:auto max(7px,env(safe-area-inset-right)) calc(var(--base-bottom) + var(--dock-height) + 5px) max(7px,env(safe-area-inset-left))!important;width:auto!important;max-height:min(63dvh,610px)!important;overflow:auto!important;overscroll-behavior:contain;border-radius:14px!important}
  #atlasUI .top-dropdown-header{position:sticky!important;top:0!important}
  #atlasUI :is(.atlas-pop,.top-dropdown-menu) button{min-height:42px!important}
  #atlasUI input[type=search],#atlasUI select{font-size:16px!important}
  #atlasUI #atlasCamera{left:max(7px,env(safe-area-inset-left))!important;bottom:calc(var(--base-bottom) + var(--dock-height) + 5px)!important;padding:2px!important}
  #atlasUI #atlasCamera button{min-height:40px;min-width:36px}
  .atlas-ready #world #profileContainer:not([hidden]){left:7px!important;bottom:calc(var(--base-bottom) + var(--dock-height) + 6px)!important;width:calc(100vw - 14px)!important;box-sizing:border-box;max-height:44dvh}
  .atlas-ready #profileContainer .profile-header{display:flex!important;flex-wrap:wrap!important;gap:5px!important}.atlas-ready #profileContainer .profile-title{flex:1;flex-wrap:wrap}.atlas-ready #profileContainer .profile-legend{order:3;width:100%}
  .atlas-ready:has(#profileContainer:not([hidden])) #atlasCamera,.atlas-ready:has(.top-dropdown.open) #atlasCamera{visibility:hidden}
  .atlas-ready #world #scaleWidget{left:auto!important;right:8px;bottom:calc(var(--base-bottom) + var(--dock-height) + 7px)!important}
  .atlas-ready #world #compassWidget{right:7px!important;top:calc(max(7px,env(safe-area-inset-top)) + 107px)!important}
  .atlas-ready dialog.app-modal{padding:0!important;max-height:88dvh!important;overflow:auto}
  #world #gl{touch-action:none}
  .atlas-ready #world[data-mode=map] .leaflet-bottom{bottom:calc(var(--base-bottom) + var(--dock-height) + 47px)}
}
@media(max-height:500px) and (pointer:coarse){
  #atlasUI #atlasExplore{left:auto;width:350px!important}
  #atlasUI .top-dropdown-menu,#atlasUI .atlas-pop:popover-open{left:auto!important;width:min(380px,54vw)!important}
  #atlasUI #atlasCamera{bottom:var(--base-bottom)!important}
  .atlas-ready #world #profileContainer:not([hidden]){width:min(450px,53vw)!important;max-height:55dvh}
}
.atlas-ready #world[data-mode=map] #profileContainer:not([hidden]){display:block!important;z-index:810}
@media(max-width:620px),(pointer:coarse){
 .atlas-ready #msg{bottom:calc(var(--base-bottom) + var(--dock-height) + 54px)!important;max-width:78vw}
 #atlasUI #atlasExplore button::before{font-size:19px}
 #atlasUI .station-nav-btns button{min-width:44px!important;min-height:44px!important}
 #atlasUI .top-dropdown-body .tag,#atlasUI .top-dropdown-header .tag{display:none!important}
}

#atlasUI .projection-choice{display:flex;align-items:center;gap:8px;padding:12px 6px;color:var(--fg);font:14px system-ui}
@media(max-width:620px),(pointer:coarse){
 .atlas-ready:has(#atlasUI :is(.top-dropdown.open,:popover-open)) :is(#atlasCamera,#scaleWidget,#compassWidget){visibility:hidden}
}

#atlasExplore #btnDropdownLayers{--symbol:url("lucide/layers.svg")}
#atlasExplore #btnDropdownStation{--symbol:url("lucide/crosshair.svg")}
#atlasExplore [popovertarget=routePanel]{--symbol:url("lucide/route.svg")}
#atlasExplore #toggleProfile{--symbol:url("lucide/chart-spline.svg")}
#atlasUI #atlasExplore :is(#btnDropdownLayers,#btnDropdownStation,[popovertarget=routePanel],#toggleProfile)::before{content:"";display:inline-block;flex:none;width:17px;height:17px;background:var(--accent);mask:var(--symbol) center/contain no-repeat}
#atlasUI #full,#atlasUI #themeSwitch{font-size:0!important;min-width:34px}
#atlasUI #full::before,#atlasUI #themeSwitch .theme-icon{content:"";display:inline-block;width:17px;height:17px;background:var(--fg);mask:url("lucide/maximize.svg") center/contain no-repeat}
#atlasUI #themeSwitch .theme-icon{mask-image:url("lucide/sun.svg")}
html[data-atlas-theme=light] #atlasUI #themeSwitch .theme-icon{mask-image:url("lucide/moon.svg")}
@media(max-width:620px){
  #atlasUI :is(#menuStation,#menuLayers,#menuExport){max-width:none!important;width:calc(100vw - 14px - env(safe-area-inset-left) - env(safe-area-inset-right))!important}
}
@media (min-width:621px) and (min-height:501px), (min-width:621px) and (pointer:fine){
  #atlasUI #atlasExplore #menuStation{max-height:calc(100dvh - 180px)!important}
}
@media (min-width:621px) and (max-width:960px) and (min-height:501px){
  #atlasUI #atlasExplore #menuLayers{max-height:calc(100dvh - 200px)!important}
  #atlasUI #atlasExplore #menuStation{max-height:calc(100dvh - 235px)!important}
}
@media(max-height:500px) and (pointer:coarse){
  #atlasUI .top-dropdown-menu,#atlasUI .atlas-pop:popover-open{max-height:min(63dvh,calc(100dvh - var(--base-bottom) - var(--dock-height) - 70px))!important}
}
#atlasUI .mobile-only{display:none!important}
@media(max-width:620px),(pointer:coarse){
  #atlasUI .mobile-only{display:inline-flex!important}
  #atlasUI #atlasUtilities>:is(#themeSwitch,#full),#atlasUI #atlasUtilities #btnDropdownExport,#atlasUI #atlasCamera,.atlas-ready #world :is(#scaleWidget,#compassWidget){display:none!important}
  #atlasUI #atlasUtilities{gap:2px}
  #atlasUI #atlasUtilities>button{align-items:center;justify-content:center}
  #atlasIdentity{max-width:calc(100vw - 160px)}
  #atlasUI #mobileView #atlasModes{position:static;transform:none;display:flex;flex-wrap:wrap;gap:4px;padding:0!important;background:none!important;border:0!important;box-shadow:none!important}
  #atlasUI #mobileZoom{display:flex;gap:4px;margin:8px 0;padding:8px 0;border-block:1px solid var(--edge)}
  #atlasUI #mobileZoom button{min-width:48px}
  #atlasUI #mobileView [data-open-panel]{display:block;width:100%;text-align:left}
  #atlasUI #atlasExplore{height:56px;--dock-height:56px}
  html.atlas-ready{--dock-height:56px}
}

#surveyTool {
  width:min(400px,calc(100vw - 24px)); max-width:calc(100vw - 24px); box-sizing:border-box;
  padding:14px; border:1px solid var(--edge); border-radius:12px;
  background:var(--panel); color:var(--fg); max-height:85dvh; overflow:auto;
}
#surveyTool:has(#registry:not([hidden])){width:min(800px,calc(100vw - 24px))}
#surveyTool::backdrop{background:var(--ui-backdrop)}
.tool-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.tool-heading h2{margin:0;font-size:1rem;color:var(--fg)}
#registryQuery,#returnMap,#stationGrid .tabulator-cell button{border:1px solid var(--edge);border-radius:6px;background:var(--inset);color:var(--fg);padding:5px 10px}
#registryQuery{width:100%;margin-bottom:8px}
#surveyTool #stationGrid,#stationGrid .tabulator-header,#stationGrid .tabulator-col,#stationGrid .tabulator-row{background:var(--panel);color:var(--fg);border-color:var(--edge)}
#stationGrid .tabulator-row-even,#stationGrid .tabulator-col:hover{background:var(--inset)}

@media(max-width:620px),(pointer:coarse){
  #surveyTool{position:fixed;inset:auto 0 calc(var(--base-bottom,8px) + 62px);margin:0 auto;max-height:calc(100dvh - 82px)}
  #surveyTool .tool-heading button,#registryQuery,#stationGrid .tabulator-cell button{min-height:44px}
  
}
#atlasUI #atlasIdentity #aboutCavus{padding:0!important;border:0;background:transparent;color:var(--accent);min-width:32px}
#aboutDialog{
  position:fixed;inset:0;margin:auto;width:min(260px,calc(100vw - 32px));height:fit-content;
  max-height:calc(100dvh - 24px);text-align:center;color:var(--fg);border-radius:14px;
  box-shadow:0 6px 26px var(--shadow-dialog);
}
#aboutDialog .about-brand{display:flex;align-items:center;justify-content:center;gap:12px}
#aboutDialog .about-brand svg{width:56px;height:56px;fill:none;stroke:var(--accent);stroke-width:2.5}
#aboutDialog .about-brand div{text-align:left}
#aboutDialog h2{margin:0;color:var(--fg);font:700 24px/1.1 Space,system-ui,sans-serif;letter-spacing:.05em}
#aboutDialog .about-brand span,#aboutDialog p{font:13px/1.45 system-ui,sans-serif;color:var(--dim)}
#aboutDialog p{margin:12px 0 0}

#surveyTool,#aboutDialog{background:var(--panel)!important;border:1px solid var(--edge)!important}
#surveyTool{padding:12px!important}
#aboutDialog{padding:18px 16px!important}
#surveyTool::backdrop,#aboutDialog::backdrop{background:var(--ui-backdrop-strong)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}

#atlasUI .atlas-terrain .opacity-group{
  display:grid!important;grid-template-columns:minmax(0,1fr) auto;
  height:auto!important;gap:0!important;padding:6px 10px 0!important;
  background:var(--inset)!important;border-color:var(--edge)!important;
}
#atlasUI .opacity-group label{color:var(--fg)!important;font-size:12px!important;text-transform:none!important}
#atlasUI #surfaceInline{
  grid-area:2/1/3/-1;width:100%!important;max-width:none;height:44px!important;
  padding:0;margin:0;touch-action:pan-y;background:transparent!important;
}
#atlasUI #surfaceInline:focus-visible{outline:2px solid var(--accent)!important}
#atlasUI #opacityVal{grid-area:1/2;color:var(--accent)!important}

.atlas-ready #world[data-mode=map] #gis .leaflet-top.leaflet-right{top:68px;right:8px}
#gis .plan-navigation,#gis .plan-ruler{background:var(--panel);border:1px solid var(--edge);border-radius:8px;color:var(--fg)}
#gis .plan-navigation{display:grid;overflow:hidden}
#gis .plan-navigation button,#gis .plan-ruler button{min-width:40px;min-height:40px;color:var(--fg);font:600 18px system-ui}
#gis .plan-navigation span{display:inline-block;color:var(--accent);font:700 12px/1 system-ui}
#gis .plan-ruler button{font-size:13px}
#gis .plan-ruler output:not(:empty){padding-right:8px}
#gis .leaflet-control-zoom a{background:var(--panel);color:var(--fg)}
.atlas-ready #world[data-mode=map] #compassWidget{display:flex!important;z-index:810}
@media(max-width:620px),(pointer:coarse){
 .atlas-ready #world[data-mode=map] #gis .leaflet-top.leaflet-right{top:52px;right:0}
 .atlas-ready #world[data-mode=map] #gis .leaflet-bottom{bottom:calc(var(--base-bottom) + var(--dock-height) + 4px)}
 #gis .leaflet-control-zoom a,#gis .plan-navigation button{width:44px;height:44px;line-height:44px}
 #gis .leaflet-bottom.leaflet-right{max-width:48%}
 #gis .leaflet-control-scale{margin-bottom:3px!important}
}
@media(max-height:500px) and (pointer:coarse){
 #gis .plan-navigation{display:flex}
}

#caveSourceModal{
 width:min(620px,calc(100vw - 24px))!important;max-width:calc(100vw - 24px)!important;
 max-height:calc(100dvh - 32px);margin:auto;overflow:auto;overscroll-behavior:contain;
 color:var(--fg);background:var(--panel)!important;border:1px solid var(--edge)!important;
}
#caveSourceModal .source-heading{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 14px;background:var(--panel);border-bottom:1px solid var(--edge)}
#caveSourceModal .source-heading h2{margin:0;font-size:1.1rem;color:var(--fg)}
#caveSourceModal #closeCaveSourceModal{position:static!important;width:44px!important;height:44px!important;flex:none}
#caveSourceModal .source-content{padding:0 clamp(10px,3vw,22px) 16px;overflow-wrap:anywhere}
#caveSourceModal .source-dossier-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
#caveSourceModal .dossier-card{min-width:0;background:var(--inset);color:var(--fg);border-color:var(--edge)}
#caveSourceModal .dossier-table{width:100%;table-layout:fixed}
#caveSourceModal .dossier-table td{color:var(--fg);white-space:normal;border-color:var(--edge)}
#caveSourceModal .dossier-table td:first-child{width:39%;color:var(--dim)}
#caveSourceModal .dossier-card h3{color:var(--accent)}
.river-label{pointer-events:none!important;white-space:nowrap;font:italic 600 12px system-ui;color:var(--ui-river-label);text-shadow:0 1px 3px var(--ui-river-halo),1px 0 2px var(--ui-river-halo),-1px 0 2px var(--ui-river-halo)}

#aboutDialog .about-sources{margin-top:12px;padding-top:9px;border-top:1px solid var(--edge);font:12px/1.45 system-ui}
#aboutDialog .about-sources p{margin:5px 0;overflow-wrap:anywhere}
#aboutDialog .about-sources a,#aboutDialog summary{color:var(--accent)}
#aboutDialog summary{cursor:pointer}
#gis .esri-credit{display:none}
#gis[data-credit-mode=esri] .esri-credit{display:block;background:var(--panel);color:var(--fg);font: var(--font-xs) system-ui;padding:3px 6px;border-radius:4px}
#gis:is([data-credit-mode=esri],[data-credit-mode=about]) :is(.leaflet-control-attribution,.providercredit){display:none!important}

#atlasUI .ortho-opacity{display:grid;grid-template-columns:1fr auto;align-items:center;padding:4px 8px 0;color:var(--fg);font-size:13px}
#atlasUI #orthoPercent{color:var(--accent);font-variant-numeric:tabular-nums}
#atlasUI #orthoAlpha{grid-column:1/-1;display:block;width:100%!important;max-width:none;height:44px!important;margin:0;padding:0;accent-color:var(--accent);touch-action:pan-y}
#atlasUI .ortho-controls{border-bottom:1px solid var(--edge)}
body:has(#world[data-mode=map]) #atlasUI .ortho-controls{order:-1}
#world #rulerHud{position:absolute;z-index:820;left:50%;bottom:max(16px,env(safe-area-inset-bottom));transform:translateX(-50%);width:min(430px,90vw);box-sizing:border-box;padding:10px 12px;color:var(--fg);background:var(--panel);border:1px solid var(--edge);border-radius:10px}
#rulerHud[hidden]{display:none!important}
#rulerHud #rulerResult{display:block;font-size:13px;margin-top:6px}
#rulerHud #closeRuler{float:right}
@media(max-width:620px){#world #rulerHud{bottom:calc(76px + env(safe-area-inset-bottom))}}
@media(min-width:621px) and (max-width:1500px){#atlasUI #atlasExplore #menuStation,#atlasUI #routePanel:popover-open{max-height:42dvh!important;overflow:auto!important}}
@media(max-width:620px){#atlasUI #atlasExplore #menuStation,#atlasUI #routePanel:popover-open{max-height:42dvh!important;overflow:auto!important}}
#rulerResult dl{display:grid;grid-template-columns:1fr auto;gap:.2em 1em;margin:.35em 0 0}
#rulerResult dd{margin:0;text-align:right;font-variant-numeric:tabular-nums}
#rulerHud>strong{display:block;margin-bottom:.4rem}
#rulerHud>label{display:flex;align-items:center;gap:.65rem}
#rulerHud select{flex:1;min-width:0}
#atlasUI #terrainAdjust{display:grid;grid-template-columns:auto minmax(140px,1fr);align-items:center;gap:0 10px;padding:0 6px;border-left:1px solid var(--edge)}
#terrainAdjust label{color:var(--fg);font:600 12px system-ui;white-space:nowrap}
#terrainAdjust #surfaceInline{grid-area:auto;height:24px!important;accent-color:var(--accent)}
#terrainStops{grid-column:2;display:flex;justify-content:space-between}
#atlasUI #terrainStops button{font-size: var(--font-xs)!important;min-height:24px!important;padding:2px 6px!important}
.atlas-ready:has(#world[data-mode=map]) #atlasUI :is(#terrainAdjust,#terrainToggle){display:none!important}
@media(min-width:961px) and (max-width:1200px){#atlasUI #atlasModes{top:80px;left:50%}}
@media(max-width:960px) and (min-width:621px){#atlasUI #atlasModes{left:50%;transform:translateX(-50%)}}
@media(max-width:620px),(pointer:coarse){
  #atlasUI #terrainPanel:popover-open{position:fixed;inset:auto max(7px,env(safe-area-inset-right)) calc(var(--base-bottom) + var(--dock-height) + 8px) max(7px,env(safe-area-inset-left));margin:0;width:auto;box-sizing:border-box}
  #atlasUI #terrainAdjust{display:block;padding:4px 8px;border:0}
  #terrainAdjust #surfaceInline{display:block;height:44px!important}
  #atlasUI #terrainStops button{min-height:42px!important}
}
#terrainPercent{margin-inline-start:.25em;font-variant-numeric:tabular-nums}
#atlasIdentity .mobile-brand-sub{display:none}
#atlasUI #menuStation .top-dropdown-header{display:flex;align-items:center;gap:2px;padding:4px 6px;justify-content:flex-start}
.station-heading{display:grid;margin-right:auto;min-width:0;color:var(--dim);font: var(--font-xs)/1.25 system-ui}
.station-heading strong{font:700 19px/1.15 system-ui;overflow-wrap:anywhere}
#menuStation .top-dropdown-header svg{display:block;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8}
#atlasUI #menuStation .top-dropdown-header button{display:grid;place-items:center;padding:0!important;min-width:33px}
#menuStation .station-metrics{margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
#menuStation .station-metrics>div{background:var(--inset);border-radius:5px;padding:5px 8px}
#menuStation .station-metrics dt,#stationSource{font: var(--font-xs)/1.25 system-ui;color:var(--dim)}
#menuStation .station-metrics dd{margin:2px 0 0;color:var(--fg);font:600 14px/1.2 system-ui;font-variant-numeric:tabular-nums}
#menuStation .station-comparison{margin:6px 0;font: var(--font-xs)/1.5 system-ui;color:var(--dim)}
.station-comparison span{white-space:nowrap}.station-comparison b,.station-location b{font-weight:600;color:var(--fg)}
.station-location{display:flex;align-items:center;justify-content:space-between;gap:3px;border-top:1px solid var(--edge);font:12px/1.4 system-ui}
#stationSource{display:block;margin:4px 0 7px}
#profileTooltip.touch-tip{transform:none;max-width:min(255px,95%);box-sizing:border-box;white-space:normal;font:600 12px/1.35 system-ui;background:var(--panel);color:var(--fg);border-color:var(--accent)}
@media(max-width:620px),(pointer:coarse){
  #atlasUI #atlasIdentity .hcb-info{display:none!important}
  #atlasUI #atlasIdentity .brand-text{display:grid!important;text-align:left;gap:1px}
  #atlasUI #atlasIdentity .brand-title{font-size:15px!important;line-height:1.1}
  #atlasUI #atlasIdentity .mobile-brand-sub{display:block;color:var(--dim);font: var(--font-xs)/1.2 system-ui;white-space:normal}
  #atlasUI #menuStation .top-dropdown-header button{width:49px!important;height:49px!important;min-width:49px!important;min-height:49px!important}
  #atlasUI #menuStation .station-nav-btns{gap:1px}
  #atlasUI #menuStation :is(#prev,#next){font-size:24px!important}
  #atlasUI #menuStation{touch-action:pan-y pinch-zoom}
  #atlasUI #menuStation .top-dropdown-body{padding:5px 8px}
}
@media(max-width:620px),(pointer:coarse){
  #atlasUI #aboutCavus .brand-text,#atlasUI #aboutCavus .brand-text>span{border:0!important;margin:0!important;padding:0!important;letter-spacing:normal!important}
  #atlasUI #aboutCavus .brand-text{display:flex!important;flex-direction:column;align-items:flex-start;min-width:0}
  #atlasUI #aboutCavus .brand-title{display:block!important;color:var(--fg)!important;font:700 15px/1.1 Space,system-ui!important}
  #atlasUI #aboutCavus .mobile-brand-sub{font: var(--font-xs)/1.2 system-ui!important;text-transform:none}
  #atlasUI #menuStation .station-heading{white-space:nowrap}
  #atlasUI #menuStation .station-heading strong{font:700 17px/1.2 system-ui!important}
}
@media(max-width:620px) and (min-height:510px){
  #atlasUI #atlasExplore #menuStation{max-height:max(266px,42dvh)!important}
}

#atlasUI #cavePicker{max-width:100%;min-width:0;height:44px;border:0;background:var(--panel);color:var(--fg);font:600 14px system-ui;cursor:pointer}
#gis .plan-navigation svg{display:block;width:38px;height:38px;margin:auto}
#gis .ruler-icon::before,#atlasCamera #openRuler::before{
 content:'';display:inline-block;width:23px;height:23px;background:currentColor;vertical-align:middle;
 mask:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M2 16 16 2l6 6L8 22zM13 5l3 3m-6 0 2 2m-5 1 3 3m-6 0 2 2'/%3E%3C/svg%3E");
}
#gis .ruler-icon[aria-pressed=true]{color:var(--ui-ruler-active);background:var(--inset)}
@media(max-width:620px),(pointer:coarse){
 #atlasUI #atlasIdentity{inset:0 0 auto;max-width:none;width:100%;display:grid;grid-template-columns:auto minmax(0,1fr);gap:0!important;padding:env(safe-area-inset-top) max(8px,env(safe-area-inset-right)) 0 max(8px,env(safe-area-inset-left))!important;border-radius:0!important;box-sizing:border-box}
 #atlasUI #atlasIdentity #aboutCavus{justify-self:start;min-height:46px}
 #atlasUI #atlasIdentity .hcb-info{display:flex!important;justify-self:end;min-width:0;max-width:100%;padding:0!important;border:0}
 #atlasUI #cavePicker{text-align:end;font-size:14px!important;text-overflow:ellipsis}
 #atlasUI #atlasIdentity #atlasModes{grid-column:1/-1;position:static;transform:none;display:flex;flex-wrap:wrap;justify-content:center;gap:2px;padding:0!important;border:0!important;border-top:1px solid var(--edge)!important;border-radius:0!important;box-shadow:none!important}
 #atlasUI #atlasModes>button{min-height:42px!important;min-width:40px;padding:3px 7px!important}
 #atlasUI #atlasModes #terrainToggle,#atlasUI #atlasUtilities{display:none!important}
 #atlasUI #atlasModes #terrainAdjust{position:relative;flex:0 0 100%;min-width:0;padding:0 5px!important;box-sizing:border-box;border:0;height:19px}
 #atlasUI #atlasModes #surfaceInline{position:relative;width:100%;height:24px!important;margin:-3px 0 0;padding:0;display:block;appearance:none;background:transparent;touch-action:none}
 #surfaceInline::-webkit-slider-runnable-track{height:2px;background:var(--edge);border-radius:2px}
 #surfaceInline::-webkit-slider-thumb{appearance:none;margin-top:-4px;width:10px;height:10px;border-radius:50%;background:var(--accent)}
 #atlasModes #terrainAdjust label{display:none}
 #atlasModes #terrainAdjust.adjusting label{display:block;position:absolute;bottom:100%;left:50%;transform:translateX(-50%);padding:3px 7px;background:var(--panel);color:var(--fg);border:1px solid var(--edge);border-radius:6px;z-index:2;pointer-events:none}
 #atlasUI #atlasExplore{grid-template-columns:repeat(5,minmax(0,1fr))}
 #atlasExplore [popovertarget=projectPanel]::before{content:'▤'}
 #atlasExplore [popovertarget=projectPanel] span{display:none}
 #atlasUI #atlasCamera{display:flex!important;left:auto!important;right:max(8px,env(safe-area-inset-right));bottom:calc(var(--base-bottom) + var(--dock-height) + 9px)!important}
 #atlasUI #atlasCamera #openRuler{font-size:0!important;min-width:44px;min-height:44px}
 .atlas-ready #world:is([data-mode="3d"],[data-mode="map"]) #compassWidget{display:flex!important;top:calc(env(safe-area-inset-top) + 115px)!important;right:8px!important}
 .atlas-ready:has(#world[data-mode=map]) #atlasUI :is(#atlasCamera,#cameraToggle){display:none!important}
 .atlas-ready #world[data-mode=map] #gis .leaflet-top.leaflet-right{top:calc(env(safe-area-inset-top) + 90px)}
 .atlas-ready #gis .leaflet-control-zoom{display:none}
 #atlasUI #terrainStops{display:flex;gap:4px}
 #atlasUI #atlasExplore #menuLayers,#atlasUI #atlasExplore #menuStation{position:fixed!important;inset:auto 7px calc(var(--base-bottom) + var(--dock-height) + 5px) 7px!important;width:auto!important}
}
@media(min-width:700px) and (pointer:coarse){
 #atlasUI #atlasIdentity{grid-template-columns:minmax(100px,1fr) auto minmax(155px,1fr);min-height:58px}
 #atlasUI #atlasIdentity .hcb-info{grid-area:1/3}
 #atlasUI #atlasIdentity #atlasModes{grid-area:1/2;flex-wrap:nowrap;border:0!important}
 #atlasUI #atlasModes #terrainAdjust{flex:0 0 90px;height:24px}
 #atlasUI #atlasModes #surfaceInline{margin:0}
 #atlasModes #terrainAdjust.adjusting label{top:100%;bottom:auto}
 .atlas-ready #world:is([data-mode="3d"],[data-mode="map"]) #compassWidget,.atlas-ready #world[data-mode=map] #gis .leaflet-top.leaflet-right{top:calc(env(safe-area-inset-top) + 65px)!important}
}
@media(pointer:coarse){
 #world #rulerHud{bottom:calc(var(--base-bottom) + var(--dock-height) + 8px)}
}
#atlasUI #viewAnglesWidget[hidden]{display:none!important}
#atlasUI #cameraToggle{display:inline-flex;align-items:center;justify-content:center;min-width:42px}
#atlasUI #atlasIdentity #viewAnglesWidget{grid-column:1/-1;justify-content:center;border-top:1px solid var(--edge)!important;padding:2px 0!important}
#atlasUI #atlasIdentity #viewAnglesWidget button{min-height:42px}
.atlas-ready:has(#atlasIdentity #viewAnglesWidget:not([hidden])) #world:is([data-mode="3d"],[data-mode="map"]) #compassWidget{margin-top:48px}
#aboutDialog{box-sizing:border-box;width:min(490px,calc(100vw - 20px));max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain}
#aboutDialog .about-sources{text-align:left;margin-top:8px;padding-top:6px}
#aboutDialog>p{margin:3px 0 0}
#aboutDialog h3{margin:2px 0 8px;color:var(--fg);font:650 15px system-ui}
#aboutDialog dl{display:block;margin:0}
#aboutDialog dl>div{display:grid;grid-template-columns:minmax(80px,26%) 1fr;align-items:baseline;column-gap:8px;padding:3px 0;border-top:1px solid var(--edge)}
#aboutDialog dt{font:650 13px/1.4 system-ui;color:var(--fg)}
#aboutDialog dd{margin:0;font:13px/1.4 system-ui;color:var(--dim);overflow-wrap:anywhere}
#atlasUI #atlasIdentity:has(#caveChooser[open]){z-index:1100;overflow:visible}
#atlasIdentity .hcb-info:has(#caveChooser){overflow:visible}
#caveChooser{position:relative;width:max-content;min-width:min(152px,100%);max-width:100%;color:var(--fg);font:600 14px/1.25 system-ui}
#caveChooser summary,#caveChooser nav{box-sizing:border-box;background:var(--panel);color:inherit;border:1px solid var(--edge);border-radius:7px}
#caveChooser summary{display:block;position:relative;min-height:44px;line-height:42px;padding:0 29px 0 10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:pointer;list-style:none}
#caveChooser summary::-webkit-details-marker{display:none}
#caveChooser summary::after{content:'';position:absolute;right:11px;top:45%;width:6px;height:6px;border:solid var(--dim);border-width:0 1.5px 1.5px 0;transform:rotate(45deg)}
#caveChooser[open] summary{border-radius:7px 7px 0 0}
#caveChooser[open] summary::after{transform:rotate(225deg);top:50%}
#caveChooser nav{display:block;padding:0;white-space:normal;position:absolute;z-index:3;inset:100% 0 auto;max-height:min(45dvh,320px);overflow-x:hidden;overflow-y:auto;touch-action:pan-y;overscroll-behavior:contain;border-top:0;border-radius:0 0 7px 7px;box-shadow:0 4px 8px var(--shadow-soft)}
#caveChooser a{display:flex;align-items:center;min-height:44px;box-sizing:border-box;padding:7px 10px;color:inherit;font:inherit;text-decoration:none;overflow-wrap:anywhere}
#caveChooser a[aria-current=page]{color:var(--accent)}
#caveChooser a:hover,#caveChooser a:focus-visible{background:var(--inset)}
#atlasUI :is(#plus,#minus){display:inline-grid!important;place-items:center;font:500 25px/1 system-ui!important;color:var(--accent)!important}
@media(pointer:coarse),(max-width:620px){
 #atlasUI #atlasModes :is(#plus,#minus):not(:active){background:transparent!important;border-color:transparent!important;filter:none;-webkit-tap-highlight-color:transparent}
 #atlasUI #atlasModes :is(#plus,#minus):active{background:var(--selected)!important}
 #atlasUI #atlasIdentity #aboutCavus .brand-text{align-items:center!important;text-align:center}
 #atlasUI #atlasIdentity #aboutCavus .brand-title{font-size:19px!important}
}
#atlasUI #atlasIdentity .hcb-info:has(#caveChooser[open]){position:relative;z-index:1001}
#closeAbout{position:absolute;inset:4px 4px auto auto;display:grid;place-items:center;width:44px;height:44px;padding:0;background:transparent;color:var(--fg);cursor:pointer}
#closeAbout span{display:grid;place-items:center;border:0;background:transparent;width:29px;height:29px;font:21px/1 system-ui}
#closeAbout:focus-visible{outline:2px solid currentColor;outline-offset:-6px;border-radius:7px}
#world #rulerHud.hold-ruler>label,#world #rulerHud.hold-ruler>#rulerStation{display:none}
#gis .plan-ruler.hold-active .ruler-icon::before{content:'×';mask:none;background:none;color:var(--fg);font:22px/1 system-ui}
.opacity-tube{display:contents}.tube-track{display:none}
@media(max-width:620px),(pointer:coarse){
 #atlasUI #atlasIdentity{grid-template-columns:max-content max-content minmax(0,1fr);column-gap:6px!important;min-height:0}
 #atlasUI #atlasIdentity .hcb-info{grid-area:1/3;min-width:0;max-width:100%}
 #atlasUI #atlasIdentity #atlasModes{grid-area:1/2;border:0!important;flex-wrap:nowrap}
 #atlasUI #atlasModes #terrainToggle,#atlasUI #atlasCamera,#gis .plan-ruler:not(.hold-active){display:none!important}
 #atlasUI #atlasIdentity #terrainAdjust{grid-column:1/-1;position:static;display:block;height:27px;width:100%;padding:0 3px;border:0}
 #atlasUI #atlasIdentity #surfaceInline{display:block;width:100%;height:27px!important;margin:0;padding:0;appearance:none;background:transparent;cursor:pointer;touch-action:none;opacity:.57}
 #atlasIdentity .opacity-tube{display:grid;align-items:center;height:27px;position:relative}
 #atlasIdentity .tube-track{display:block;position:absolute;inset-inline:0;height:10px;overflow:hidden;border-radius:8px;background:var(--inset);box-shadow:inset 0 0 0 1px var(--edge);opacity:.65;pointer-events:none}
 #atlasIdentity .tube-fill{display:block;height:100%;width:var(--fill,38%);background:var(--accent)}
 #atlasIdentity #terrainAdjust.adjusting .tube-track{opacity:1}
 #atlasUI #atlasIdentity .opacity-tube #surfaceInline{grid-area:1/1;position:relative;opacity:0;width:100%;margin:0}
 #atlasIdentity .opacity-tube:focus-within .tube-track{outline:1px solid var(--accent)}
 #atlasIdentity #terrainAdjust label{display:none}
 #atlasIdentity #terrainAdjust.adjusting label{position:fixed;top:30dvh;left:50%;transform:translate(-50%,-50%);display:block;pointer-events:none;font-size:0;z-index:3}
 #atlasIdentity #opacityVal{display:block;padding:6px 16px;border:1px solid var(--ui-chip-border);border-radius:12px;background:var(--ui-chip-bg);color:white;font:700 32px/1.25 system-ui;font-variant-numeric:tabular-nums;box-shadow:0 2px 9px var(--shadow-chip)}
 .atlas-ready #world:is([data-mode="3d"],[data-mode="map"]) #compassWidget{top:calc(env(safe-area-inset-top) + 81px)!important}
 .atlas-ready #world[data-mode=map] #gis .leaflet-top.leaflet-right{top:calc(env(safe-area-inset-top) + 50px)!important}
}
@media(max-width:620px),(pointer:coarse){
 .atlas-ready #world #overlap{inset:auto 8px calc(var(--base-bottom) + var(--dock-height) + 8px);max-width:none;max-height:min(28dvh,160px);box-sizing:border-box;background:var(--panel);color:var(--fg);border:1px solid var(--edge);border-radius:10px;overscroll-behavior:contain}
 #world #overlap button{min-height:42px;padding:3px 9px;background:var(--inset);color:var(--fg);border-color:var(--edge)}
 .atlas-ready #world #pin{top:min(var(--station-y),calc(100% - var(--base-bottom) - var(--dock-height) - 8px))!important}
}
#atlasModes button.active::after{content:none}
#atlasUI #atlasExplore #dropdownLayers.open #menuLayers{
 display:flex!important;flex-direction:column;padding:0!important;overflow:hidden!important
}
#atlasUI #menuLayers>.top-dropdown-header{
 position:static!important;flex:none;align-items:center;margin:0;padding:2px 8px 2px 14px;
 background:var(--panel)!important;border-bottom:1px solid var(--edge)
}
#layerPanelTitle{margin:0;color:var(--fg);font:650 16px/1.25 system-ui;text-align:left}
#atlasUI #menuLayers>.top-dropdown-body{
 flex:1 1 auto;min-height:0;margin:0;padding:8px 14px 14px;
 overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain
}
#menuLayers>.top-dropdown-body>*{flex-shrink:0}
@media(max-width:620px),(pointer:coarse){
 #atlasUI #atlasExplore #dropdownStation.open #menuStation{display:flex!important;flex-direction:column;padding:0!important;overflow:hidden!important}
 #atlasUI #menuStation>.top-dropdown-header{position:static!important;flex:none;margin:0;background:var(--panel)!important;border-bottom:1px solid var(--edge)}
 #atlasUI #menuStation>.top-dropdown-body{flex:1 1 auto;min-height:0;margin:0;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain}
 #menuStation>.top-dropdown-body>*{flex-shrink:0}
}
#menuLayers .layer-item label{min-height:44px;box-sizing:border-box;gap:12px;margin:0;font-size:13px!important}
#menuLayers .layer-item input[type=checkbox]{
 appearance:none;box-sizing:border-box;position:relative;flex:none;width:38px!important;height:22px!important;
 margin:0;padding:0;border:1px solid var(--dim);border-radius:20px!important;background:var(--inset)
}
#menuLayers .layer-item input[type=checkbox]::after{
 left:3px;top:3px;width:14px;height:14px;border-radius:50%;background:var(--dim)
}
#menuLayers .layer-item input[type=checkbox]:checked{border-color:var(--accent);background:var(--accent)}
#menuLayers .layer-item input[type=checkbox]:checked::after{left:19px;background:var(--panel)}
#menuLayers .layer-item label:has(input:disabled){opacity:.55;cursor:default!important}
@media(forced-colors:active){
 #menuLayers .layer-item input[type=checkbox]{appearance:auto}
 #menuLayers .layer-item input[type=checkbox]::after{content:none}
}

#btnDropdownLayers{touch-action:manipulation}
#atlasUI #atlasExplore #dropdownLayers.open:not(.layers-expanded) #menuLayers{box-sizing:border-box;max-height:50dvh!important}
@media(max-width:620px),(pointer:coarse){
 #atlasUI #atlasExplore #dropdownLayers.open:not(.layers-expanded) #menuLayers{
   max-height:calc(50dvh - var(--base-bottom) - var(--dock-height) - 5px)!important
 }
}
#atlasUI #atlasExplore #dropdownLayers.open.layers-expanded #menuLayers{
 position:fixed!important;top:max(6px,env(safe-area-inset-top))!important;
 bottom:10px!important;left:198px!important;right:auto!important;max-height:none!important
}
@media(max-width:620px),(pointer:coarse){
 #atlasUI #atlasExplore #dropdownLayers.open.layers-expanded #menuLayers{
   inset:max(6px,env(safe-area-inset-top)) max(7px,env(safe-area-inset-right)) calc(var(--base-bottom) + var(--dock-height) + 5px) max(7px,env(safe-area-inset-left))!important
 }
}

#compassWidget,.plan-navigation button:first-child,#atlasExplore button{touch-action:manipulation}
.dock-sheet-body{display:contents}
#projectPanel .dock-sheet-body>button{text-align:left}
@media(max-width:620px),(pointer:coarse){
 #atlasUI #atlasExplore #dropdownStation.open #menuStation,
 #atlasUI #routePanel:popover-open,#atlasUI #projectPanel:popover-open,
 #atlasUI #profileContainer:not([hidden]){
   --sheet-top:auto;--sheet-limit:calc(50dvh - var(--base-bottom) - var(--dock-height) - 5px);
   display:flex!important;flex-direction:column;position:fixed!important;box-sizing:border-box;
   inset:var(--sheet-top) max(7px,env(safe-area-inset-right)) calc(var(--base-bottom) + var(--dock-height) + 5px) max(7px,env(safe-area-inset-left))!important;
   max-height:var(--sheet-limit)!important;width:auto!important;height:auto!important;
   margin:0!important;padding:0!important;overflow:hidden!important;z-index:1020!important
 }
 #atlasUI #atlasExplore #dropdownStation.open #menuStation.dock-expanded,
 #atlasUI :is(#routePanel,#projectPanel):popover-open.dock-expanded{
   --sheet-top:max(6px,env(safe-area-inset-top));--sheet-limit:none
 }
}
 #atlasUI :is(#routePanel,#projectPanel)>h2,#atlasUI #profileContainer .profile-header{
   flex:none;margin:0;padding:10px 52px 10px 14px;min-height:44px;
   background:var(--panel);border-bottom:1px solid var(--edge);box-sizing:border-box
 }
 #atlasUI :is(#routePanel,#projectPanel)>h2{font:650 16px/1.4 system-ui}
 #atlasUI :is(#routePanel,#projectPanel)>.atlas-close,#atlasUI #profileContainer #closeProfile{
   position:absolute!important;inset:0 4px auto auto!important;width:44px!important;height:44px!important
 }
 #atlasUI .dock-sheet-body,#atlasUI #profileContainer .profile-body{
   display:block;flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding:8px 14px 14px
 }
 #atlasUI #projectPanel .dock-sheet-body{display:grid;align-content:start;grid-auto-rows:max-content}
 #atlasUI .dock-sheet-body button{min-height:44px}

@media(min-width:621px) and (not (pointer:coarse)){
 html.atlas-ready{--dock-width:min(570px,calc(100vw - 32px));--dock-bottom:12px;--panel-bottom:74px}
 #atlasUI #atlasIdentity{inset:0 0 auto;display:flex;width:100%;box-sizing:border-box;border-radius:0!important;padding:4px 14px!important;gap:6px!important}
 #atlasUI #atlasIdentity .hcb-info{margin-left:auto;min-width:0;padding:0;border:0}
 #atlasIdentity .hcb-sub{display:none!important}
 #atlasUI #aboutCavus{display:inline-flex;align-items:center;gap:7px!important;margin-right:5px!important}
 #atlasUI #aboutCavus span{border:0;padding:0;margin:0;letter-spacing:normal}
 #atlasUI #aboutCavus .brand-text{display:grid!important;justify-items:center;gap:1px}
 #atlasUI #aboutCavus .brand-title{font:700 19px/1.05 Space,system-ui;color:var(--fg)}
 #atlasUI #aboutCavus .mobile-brand-sub{display:block;color:var(--dim);font: var(--font-xs)/1.15 system-ui}
 #atlasUI #atlasIdentity :is(#atlasModes,#atlasUtilities){position:static;transform:none;border:0!important;box-shadow:none!important;background:transparent!important;padding:0!important}
 #atlasUI #atlasIdentity #terrainAdjust{display:flex;align-items:center;gap:8px;flex:0 1 230px;min-width:64px;border:0;padding:0 8px}
 #atlasIdentity .opacity-tube{display:grid;align-items:center;position:relative;height:32px;flex:1;min-width:52px}
 #atlasIdentity .tube-track{display:block;position:absolute;inset-inline:0;height:9px;border-radius:7px;background:var(--inset);box-shadow:inset 0 0 0 1px var(--edge);overflow:hidden;pointer-events:none;opacity:.7}
 #atlasIdentity .tube-fill{display:block;height:100%;width:var(--fill,38%);background:var(--accent)}
 #atlasIdentity .opacity-tube:focus-within .tube-track{outline:1px solid var(--accent)}
 #atlasIdentity #terrainAdjust.adjusting .tube-track{opacity:1}
 #atlasIdentity #surfaceInline{position:relative;width:100%;opacity:0;cursor:pointer;margin:0}
 #atlasIdentity #terrainAdjust label{font-size:0}
 #atlasIdentity #opacityVal{font:600 12px system-ui;font-variant-numeric:tabular-nums}
 #atlasUI #atlasExplore{inset:auto 0 var(--dock-bottom)!important;margin-inline:auto;width:var(--dock-width)!important;height:54px;box-sizing:border-box;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;padding:4px!important;z-index:1010}
 #atlasExplore .atlas-caption,#atlasExplore [popovertarget=projectPanel] span{display:none}
 #atlasUI #atlasExplore>button,#atlasUI #atlasExplore>.top-dropdown>.top-dropdown-btn{display:flex!important;align-items:center!important;justify-content:center!important;gap:4px;padding:3px!important;width:100%;height:100%!important}
 #atlasExplore [popovertarget=projectPanel]::before{content:'▤';color:var(--accent)}
 #atlasUI #atlasExplore #dropdownLayers.open #menuLayers,#atlasUI #atlasExplore #dropdownStation.open #menuStation,
 #atlasUI :is(#routePanel,#projectPanel):popover-open,#atlasUI #profileContainer:not([hidden]){
    position:fixed!important;inset:auto 0 var(--panel-bottom)!important;display:flex!important;flex-direction:column;box-sizing:border-box;
    margin:0 auto!important;width:var(--dock-width)!important;height:auto!important;padding:0!important;overflow:hidden!important;
    max-height:calc(50dvh - var(--panel-bottom))!important;z-index:1020!important
 }
 #atlasUI #atlasExplore #dropdownLayers.open:not(.layers-expanded) #menuLayers{max-height:calc(50dvh - var(--panel-bottom))!important}
 #atlasUI #atlasExplore #dropdownLayers.open.layers-expanded #menuLayers,#atlasUI #atlasExplore #dropdownStation.open #menuStation.dock-expanded,
 #atlasUI :is(#routePanel,#projectPanel):popover-open.dock-expanded{
    inset:6px 0 var(--panel-bottom)!important;max-height:none!important
 }
 #atlasUI #menuStation>.top-dropdown-header{flex:none;margin:0;background:var(--panel)!important;border-bottom:1px solid var(--edge)}
 #atlasUI #menuStation>.top-dropdown-body{flex:1 1 auto;min-height:0;overflow:auto!important;overscroll-behavior:contain}
 #atlasUI #projectPanel:popover-open.dock-expanded{
    inset:auto 0 var(--panel-bottom)!important;max-height:calc(100dvh - var(--panel-bottom) - 6px)!important
 }
 #atlasUI #atlasCamera{bottom:var(--panel-bottom)!important}
 #atlasUI #legendPanel:popover-open{bottom:calc(var(--panel-bottom) + 50px)}
 .atlas-ready #world #scaleWidget{bottom:20px!important}
}
@media(min-width:621px) and (max-width:860px) and (not (pointer:coarse)){
 #atlasUI #atlasIdentity{flex-wrap:wrap}
 #atlasUI #atlasIdentity #terrainAdjust{order:5;flex:1 0 100%}
 #atlasIdentity .opacity-tube{height:20px}
 .atlas-ready #world #compassWidget{top:88px!important}
 .atlas-ready #world #scaleWidget{bottom:var(--panel-bottom)!important}
}
#world #locateDevice,#world #locationFeedback{position:absolute;z-index:815;right:12px;bottom:72px;background:var(--panel);color:var(--fg);border:1px solid var(--edge);border-radius:9px}
#world #locateDevice{width:44px;height:44px;padding:0;font:26px/1 system-ui;touch-action:manipulation}
#world #locateDevice:disabled{opacity:.7}
#world #locationFeedback{right:62px;max-width:min(340px,calc(100% - 80px));padding:8px 12px;pointer-events:none}
#locationFeedback:empty{display:none}
#world #locationOnTerrain{position:absolute;z-index:500;width:15px;height:15px;background:var(--ui-location);border:3px solid white;box-shadow:0 0 0 2px var(--ui-location-ring);border-radius:50%;transform:translate(-50%,-50%);pointer-events:none}
@media(max-width:620px),(pointer:coarse){
 #world :is(#locateDevice,#locationFeedback){bottom:calc(var(--base-bottom) + var(--dock-height) + 10px)!important}
}

.atlas-ready #world[data-mode=map] #gis .leaflet-top.leaflet-right{top:165px!important}

#world #locateDevice{display:grid;place-items:center;cursor:pointer}
#world #locateDevice::before{content:"";width:24px;height:24px;background:currentColor;mask:url("lucide/locate-fixed.svg") center/contain no-repeat}

#gpsDiagnostics{box-sizing:border-box;width:min(370px,calc(100vw - 24px));max-height:85dvh;overflow:auto;margin:auto;padding:16px!important;border:1px solid var(--edge)!important;border-radius:12px;background:var(--panel)!important;color:var(--fg);font:14px/1.45 system-ui}
#gpsDiagnostics .gps-heading{display:flex;align-items:center;justify-content:space-between}
#gpsDiagnostics h2{margin:0;font-size:18px}
#gpsDiagnostics button{min-height:44px;color:var(--fg)}
#closeGps{min-width:44px;font-size:23px}
#gpsDiagnostics dt{color:var(--dim);font-size:12px}
#gpsDiagnostics dd{margin:2px 0 9px;font:600 15px/1.5 monospace}
#gpsStatus{color:var(--accent)}
#gpsDiagnostics dl{display:grid;grid-template-columns:minmax(68px,auto) minmax(0,1fr);align-items:baseline;gap:5px 10px;margin:10px 0 0}
#gpsDiagnostics dd{margin:0;font:600 13px/1.4 monospace;overflow-wrap:anywhere}
#gpsDiagnostics dt small{font-size: var(--font-xs)}
#gpsStatus{margin:6px 0}
#gpsStatus:empty{display:none}

#gpsDiagnostics{padding:8px 12px 12px!important}
:is(#gpsDiagnostics,#aboutDialog) :is(#closeGps,#closeAbout,#closeAbout span){
 appearance:none;border:0!important;box-shadow:none!important;background:transparent!important;border-radius:0!important
}
:is(#closeGps,#closeAbout):focus:not(:focus-visible){outline:none}
:is(#gpsDiagnostics,#aboutDialog) :is(#closeGps,#closeAbout):focus-visible{outline:1px dashed currentColor;outline-offset:-5px}
#gpsTitle{margin-right:auto!important}
#gpsDiagnostics :is(#gpsLink,#gpsConnect){display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;background:transparent;box-shadow:none;color:var(--fg)}
#gpsDiagnostics :is(#gpsLink,#gpsConnect) svg{width:18px;height:18px}
#gpsLink:not(.external) .gps-unplug,#gpsLink.external .gps-plug{display:none}
#gpsDiagnostics #gpsLink.external{color:var(--accent)}
#gpsEndpointRow:not([hidden]){display:flex;align-items:center}
#gpsDiagnostics #gpsEndpoint{min-width:0;flex:1;padding:6px 8px;font-size:16px}
#gpsDiagnostics :is(#gpsLink,#gpsConnect){touch-action:manipulation}
#gpsSatellites{white-space:pre-line}

@media(min-width:621px) and (not (pointer:coarse)){
 #atlasUI #desktopZoom{right:14px;top:165px;display:grid;gap:0;padding:2px}
 #atlasUI #desktopZoom button{width:38px;min-height:36px;padding:0!important}
 .atlas-ready #gis .leaflet-control-zoom,.atlas-ready #world[data-mode=map] #scaleWidget,
 .atlas-ready:has(#world[data-mode=map]) #atlasUI #atlasCamera{display:none!important}
 #atlasUI #legendPanel:popover-open{inset:auto 0 var(--panel-bottom);margin-inline:auto;width:var(--dock-width)}
 .atlas-ready:has(#world[data-mode=map]) #legendPanel :is(#openRuler,.legend,#depthLegend){display:none!important}
}

/* Desktop larg: inspectorul devine sertar lateral andocat pe dreapta, pe toată înălțimea dintre
   bara de sus și dock, ca scena 3D să rămână liberă și stația centrată să nu fie acoperită. */
@media(min-width:1100px) and (not (pointer:coarse)){
 #atlasUI #atlasExplore #dropdownStation.open #menuStation:not(.dock-expanded){
    inset:var(--drawer-top) var(--drawer-gap) var(--panel-bottom) auto!important;
    margin:0!important;width:var(--drawer-width)!important;height:auto!important;max-height:none!important;
    animation:drawer-in var(--duration-normal) var(--ease-out-expo)
 }
}
@keyframes drawer-in{from{transform:translateX(calc(100% + var(--drawer-gap)));opacity:0}}
@media(prefers-reduced-motion:reduce){#atlasUI #menuStation{animation:none!important}}

/* Controale dublate de segmentul Ortofoto / Topo / LiDAR și de panoul Galerii: rămân în DOM pentru sincronizare. */
#menuLayers .dup-control{display:none!important}
/* În 3D textura e aleasă din segment; în 2D overlay-urile rămân independente (poți avea fond curat). */
.atlas-ready:has(#world:not([data-mode=map])) #menuLayers .raster-toggle{display:none!important}

/* Setări avansate pentru fondul 2D, în Proiect. */
#advancedMap{border-top:1px solid var(--edge);margin-top:6px;padding-top:4px}
#advancedMap summary{cursor:pointer;min-height:40px;display:flex;align-items:center;font:600 13px/1.3 system-ui;color:var(--dim)}
#advancedMap summary:hover,#advancedMap[open] summary{color:var(--fg)}
#advancedMap .basemap-select-group{display:grid;gap:4px;margin:4px 0 8px}
#advancedMap select{min-height:40px;font-size:14px}
#advancedMap #mapStatus{margin:4px 0;font:12px/1.4 system-ui;color:var(--dim)}
#advancedMap #mapStatus:empty{display:none}

/* Legenda planului 2D: diferența potecă / galerie. */
#planLegend{display:none}
.atlas-ready #world[data-mode=map] #planLegend{
  display:flex;flex-direction:column;gap:3px;position:absolute;z-index:700;pointer-events:none;
  left:14px;top:60px;padding:6px 10px;border-radius:9px;background:var(--panel);border:1px solid var(--edge);
  color:var(--fg);font:600 12px/1.3 system-ui;box-shadow:0 2px 10px var(--shadow-legend)
}
#planLegend span::before{content:"";display:inline-block;width:18px;height:3px;border-radius:2px;margin-right:7px;vertical-align:middle}
#planLegend .pl-path::before{background:var(--ui-legend-path)}
#planLegend .pl-gallery::before{background:var(--ui-legend-gallery);box-shadow:0 0 0 1px var(--ui-legend-gallery-ring)}
@media(max-width:620px),(pointer:coarse){
  .atlas-ready #world[data-mode=map] #planLegend{top:calc(env(safe-area-inset-top) + 62px);left:7px;font-size: var(--font-xs)}
}

/* Mobil: procentul terenului rămâne vizibil lângă glisor. */
@media(max-width:620px),(pointer:coarse){
  #atlasUI #atlasIdentity #terrainAdjust{position:relative!important}
  #atlasIdentity #terrainAdjust:not(.adjusting)::after{
    content:attr(data-pct);position:absolute;right:6px;top:50%;transform:translateY(-50%);
    font:700  var(--font-xs)/1 system-ui;font-variant-numeric:tabular-nums;color:var(--fg);
    padding:2px 5px;border-radius:6px;background:var(--panel);pointer-events:none
  }
}

/* Mobil: profil compact, graficul primește spațiul. */
@media(max-width:620px),(pointer:coarse){
  .atlas-ready #profileContainer .profile-title label{display:flex;align-items:center;gap:6px;font-size:12px;margin:0}
  .atlas-ready #profileContainer .profile-title select{min-height:36px;max-width:62vw}
  .atlas-ready #profileContainer .profile-title small{flex-basis:100%;font-size: var(--font-xs)}
  .atlas-ready #profileContainer .profile-legend{gap:10px!important;font-size: var(--font-xs)!important;padding:2px 14px!important}
  #atlasUI #profileContainer:not([hidden]){--sheet-limit:calc(58dvh - var(--base-bottom) - var(--dock-height) - 5px)}
  .atlas-ready #profileContainer .profile-header{padding-block:6px!important;min-height:0!important}
  .atlas-ready #profileContainer #profileSvg{height:clamp(120px,20dvh,170px)!important}
  #atlasUI #profileContainer .profile-body{padding-top:4px;height:auto!important}
}

/* Profil pe desktop: grafic mai înalt, legenda nu se mai rupe pe rânduri. */
.atlas-ready #profileContainer .profile-legend span{white-space:nowrap}
@media(min-width:621px) and (not (pointer:coarse)){
  #atlasUI #profileContainer .profile-body{height:auto!important}
  .atlas-ready #profileContainer #profileSvg{height:clamp(150px,22dvh,220px)!important}
}
/* Mobil 2D: atribuirea furnizorului de hartă nu mai stă sub butonul de localizare. */
@media(max-width:620px),(pointer:coarse){
  .atlas-ready #world[data-mode=map] #gis .leaflet-bottom.leaflet-right{right:58px!important}
}

/* Antet profil: titlul e redundant cu butonul activ din dock; selectorul și lungimea încap pe un rând. */
.atlas-ready #profileContainer .profile-title .icon,.atlas-ready #profileContainer .profile-title strong{display:none!important}
.atlas-ready #profileContainer .profile-title{display:flex!important;flex-wrap:wrap;align-items:center;gap:4px 12px}
.atlas-ready #profileContainer .profile-title label{display:flex;align-items:center;gap:6px;margin:0}
.atlas-ready #profileContainer .profile-title select{min-width:200px}
.atlas-ready #profileContainer .profile-title small{white-space:nowrap}

/* Drone vs LiDAR disagreement flag in the station inspector */
.station-comparison.dz-warn #cmpDeltaZ{color:var(--warn)}
.station-comparison .dz-flag{display:block;margin-top:3px;padding:3px 7px;border-left:2px solid var(--warn);border-radius:3px;background:var(--warn-bg);color:var(--warn-text);white-space:normal;font-size: var(--font-xs)}
.station-comparison .dz-flag[hidden]{display:none}
.atlas-ready[data-atlas-theme=light] .station-comparison .dz-flag{color:var(--warn-text-light);background:var(--warn-bg-light)}
.atlas-ready[data-atlas-theme=light] .station-comparison.dz-warn #cmpDeltaZ{color:var(--warn-light)}


/* Lucide icons as masks, so they follow the label colour like the dock icons do */
.lx{display:inline-block;width:15px;height:15px;flex:none;vertical-align:-3px;margin-right:2px;background:currentColor;-webkit-mask:var(--lx) center/contain no-repeat;mask:var(--lx) center/contain no-repeat}
.lx-camera{--lx:url("lucide/camera.svg")}
.lx-tag{--lx:url("lucide/tag.svg")}
.lx-scan{--lx:url("lucide/scan-line.svg")}
.lx-mountain{--lx:url("lucide/mountain.svg")}
.lx-pin{--lx:url("lucide/map-pin.svg")}

/* Guided tour */
#projectPanel .tour-start{font-weight:700;color:var(--accent)!important;border-color:var(--accent)!important}
.tour-bar{position:fixed;z-index:60;left:50%;bottom:76px;transform:translateX(-50%);width:min(440px,calc(100vw - 32px));box-sizing:border-box;padding:12px 14px;border:1px solid var(--edge);border-left:3px solid var(--accent);border-radius:10px;background:var(--panel);color:var(--fg);box-shadow:0 12px 32px var(--shadow-float);font:13px/1.45 system-ui,sans-serif;animation:tour-in .22s ease-out}
.tour-bar[hidden]{display:none}
.tour-head{display:flex;align-items:center;gap:8px}
.tour-head strong{flex:1;font-size:15px}
.tour-step{font:600  var(--font-xs)/1 monospace;color:var(--accent);padding:3px 6px;border:1px solid currentColor;border-radius:4px}
.tour-close{border:0;background:none;color:var(--dim);font-size:20px;line-height:1;width:32px;height:32px;cursor:pointer;border-radius:6px}
.tour-close:hover,.tour-close:focus-visible{background:var(--inset);color:var(--fg)}
.tour-bar p{margin:6px 0 10px;color:var(--fg)}
.tour-nav{display:flex;justify-content:flex-end;gap:8px}
.tour-nav button{min-height:36px;padding:0 14px;border-radius:6px;border:1px solid var(--edge);background:var(--inset);color:var(--fg);font:600 13px system-ui;cursor:pointer}
.tour-nav button:disabled{opacity:.45;cursor:default}
.tour-nav .tour-primary{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.atlas-ready[data-atlas-theme=light] .tour-nav .tour-primary{color:var(--on-accent-light)}
.tour-nav button:not(:disabled):hover{filter:brightness(1.08)}
.tour-nav button:focus-visible,.tour-close:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@keyframes tour-in{from{opacity:0;transform:translate(-50%,8px)}}
@media(prefers-reduced-motion:reduce){.tour-bar{animation:none}}
@media(max-width:620px){.tour-bar{bottom:calc(var(--base-bottom,8px) + var(--dock-height,60px) + 10px)}}
.tour-bar{z-index:1000;backdrop-filter:blur(10px)}
@media(max-width:620px){
  .tour-bar{bottom:calc(76px + env(safe-area-inset-bottom))}
  /* The floating locate button sits where the tour's buttons are; the tour hides it while running */
  html.touring #locateDevice{visibility:hidden}
}

/* Desktop: Straturi opens at its full height (no inner scroll) whenever the window has room;
   it only scrolls when the space between the top bar and the dock is too short. */
@media(min-width:621px) and (not (pointer:coarse)){
 #atlasUI #atlasExplore #dropdownLayers.open #menuLayers,
 #atlasUI #atlasExplore #dropdownLayers.open:not(.layers-expanded) #menuLayers{max-height:calc(100dvh - var(--panel-bottom) - 64px)!important}
}

/* Straturi shows only what acts on the current view */
.atlas-ready:has(#world[data-mode=map]) #menuLayers .only-3d,
.atlas-ready:has(#world:not([data-mode=map])) #menuLayers .only-2d{display:none!important}
#terrainStops[hidden]{display:none!important}

/* Station inspector: survey details folded under one summary */
#menuStation .station-tech{margin:6px 0 2px;border-top:1px solid var(--edge)}
#menuStation .station-tech>summary{display:flex;align-items:center;gap:6px;min-height:40px;cursor:pointer;list-style:none;font:600 12px system-ui;color:var(--dim)}
#menuStation .station-tech>summary::-webkit-details-marker{display:none}
#menuStation .station-tech>summary::before{content:'›';display:inline-block;width:12px;font-size:15px;color:var(--accent);transition:transform .15s}
#menuStation .station-tech[open]>summary::before{transform:rotate(90deg)}
#menuStation .station-tech>summary:hover,#menuStation .station-tech>summary:focus-visible{color:var(--fg)}
#menuStation .station-tech>summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
#menuStation .station-tech>*:not(summary){margin-top:6px}
#menuStation>.top-dropdown-body>.dz-flag{display:block;margin:4px 0 6px}
#menuStation>.top-dropdown-body>.dz-flag[hidden]{display:none}
#cmpFlag.dz-flag{padding:4px 8px;border-left:2px solid var(--warn);border-radius:3px;background:var(--warn-bg);color:var(--warn-text);font: var(--font-xs)/1.4 system-ui}
.atlas-ready[data-atlas-theme=light] #cmpFlag.dz-flag{color:var(--warn-text-light);background:var(--warn-bg-light)}

/* Topo source selector: shown only while the topographic layer is on */
#menuLayers .topo-source{display:flex;align-items:center;gap:4px;margin:6px 0 8px;font:12px system-ui;color:var(--dim)}
#menuLayers .topo-source>span{margin-right:4px}
#menuLayers .topo-source button{flex:1;min-height:32px;padding:0 8px!important;border:1px solid var(--edge)!important;border-radius:6px;background:var(--inset)!important;color:var(--dim)!important;font:600 12px system-ui!important;cursor:pointer}
#menuLayers .topo-source button[aria-pressed=true]{background:var(--accent)!important;border-color:var(--accent)!important;color:var(--panel)!important}
#menuLayers .topo-source button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
#menuLayers .atlas-terrain:not(:has(#texTopo.active)) .topo-source-3d,
#menuLayers:not(:has(#topoOn:checked)) .topo-source-2d{display:none!important}

/* Each 2D raster layer shows its own opacity slider only while it is switched on */
#menuLayers:not(:has(#orthoOn:checked)) .layer-opacity[data-for=orthoOn],
#menuLayers:not(:has(#topoOn:checked)) .layer-opacity[data-for=topoOn],
#menuLayers:not(:has(#lidarOn:checked)) .layer-opacity[data-for=lidarOn],
#menuLayers:not(:has(#demOn:checked)) .layer-opacity[data-for=demOn]{display:none!important}
#advancedMap #atlasResolution{display:grid!important;gap:4px;margin:8px 0 4px;font:12px system-ui;color:var(--dim)}
#advancedMap #atlasResolution select{min-height:36px}
#menuLayers .topo-source[hidden]{display:none!important}

/* Selected survey shot (viză) */
.shot-card{position:fixed;z-index:999;left:14px;bottom:150px;width:min(330px,calc(100vw - 28px));box-sizing:border-box;padding:10px 12px;border:1px solid var(--edge);border-left:3px solid var(--shot-color);border-radius:10px;background:var(--panel);color:var(--fg);box-shadow:0 12px 32px var(--shadow-float-soft);font:12px/1.4 system-ui,sans-serif}
.shot-card[hidden]{display:none}
.shot-head{display:flex;align-items:flex-start;gap:8px}
.shot-head>div{flex:1;display:grid;gap:1px}
.shot-head strong{font:700 14px/1.25 system-ui;font-variant-numeric:tabular-nums}
.shot-head small{color:var(--dim)}
#shotDetails{display:grid;grid-template-columns:auto 1fr;gap:3px 12px;margin:8px 0}
#shotDetails>div{display:contents}
#shotDetails dt{color:var(--dim)}
#shotDetails dd{margin:0;text-align:right;font-variant-numeric:tabular-nums;font-weight:600}
.shot-nav{display:flex;gap:6px}
.shot-nav button{min-height:34px;padding:0 10px;border:1px solid var(--edge);border-radius:6px;background:var(--inset);color:var(--fg);font:600 12px system-ui;cursor:pointer}
.shot-nav #shotFrom,.shot-nav #shotTo{flex:1}
.shot-nav button:disabled{opacity:.4;cursor:default}
.shot-nav button:not(:disabled):hover{border-color:var(--shot-color)}
.shot-nav button:focus-visible{outline:2px solid var(--shot-color);outline-offset:1px}
@media(max-width:620px),(pointer:coarse){
  .shot-card{left:7px;right:7px;width:auto;bottom:calc(76px + env(safe-area-inset-bottom))}
  html.touring .shot-card{display:none}
}
:root{--shot-color:#22e4ff;--drawer-width:380px;--drawer-top:64px;--drawer-gap:14px;--duration-normal:220ms;--ease-out-expo:cubic-bezier(.16,1,.3,1)}

/* ===== Track palette: the single source for every survey colour in 3D and 2D =====
   Read by the runtime through TRACK (work/stereo.js); change colours here only. */
:root{
  --track-surface:#ffd23f;           /* measured surface traverse, spring → portal (+ return, dashed) */
  --track-surface-casing:#3d2f00;
  --track-gallery:#ddd4bf;           /* underground gallery (+ return gallery, dashed): warm limestone white */
  --track-gallery-covered:#9a9384;   /* the same gallery where it is seen through the terrain, muted */
  --track-projection:#c04dff;        /* gallery projected onto the surface (derived GPX), always dashed */
  --track-projection-casing:#2a0a3d;
  --track-history:#ffba84;           /* 2013 survey network */
  --track-shot:#22e4ff;              /* selected survey shot */
  --track-shot-casing:#032a33;
  --track-measure:#ff1846;           /* 2D ruler */
  --track-measure-casing:#ffffff;
  --track-selected:#fff261;          /* selected station ring on the 2D map */
  --landmark-entrance:#00ffd5;
  --landmark-spring:#56d3c7;
  --landmark-end:#c39aff;
  --shot-color:var(--track-shot);
  /* other 3D / map colours */
  --scene-grid-major:#385155; --scene-grid-minor:#263b40;
  --scene-station:#e4ff9b; --scene-station-ring:#ffda65; --scene-label-text:#ffffff; --scene-label-background:rgba(10,24,28,.9);
  --scene-lrud:#b58962; --scene-water:#269cff; --scene-drape-empty:#465758;
  --scene-guide-near:#e8fb8b; --scene-guide-far:#ffae6c;
  --scene-cursor:#ffcc50; --scene-imported:#ffa66c;
  --gps-accuracy:#237ae1; --gps-dot:#126ad0; --gps-casing:#ffffff;
  /* station dots coloured by rock cover above them */
  --depth-unknown:#aab5b6; --depth-above:#f085e1; --depth-shallow:#ff9638; --depth-mid:#ffe676; --depth-deep:#72dad4;
  /* 2013 survey categories */
  --history-diverticole:#c88852; --history-main:#ffca88; --history-sifon:#e46b6f; --history-maruta:#e39876; --history-shaft:#edb94c; --history-other:#ffbc79;
}
/* Longitudinal profile SVG (was inline fill attributes) */
#profileSvg .profile-axis-label{fill:var(--profile-axis);font: var(--font-xs) monospace}
#profileSvg .profile-node{fill:var(--landmark-spring)}
/* Imported track rows (were inline styles) */
.imported-track-item{display:flex;align-items:center;justify-content:space-between;padding:6px 8px;margin-top:6px;background:var(--inset);border:1px solid var(--edge);border-radius:4px;color:var(--fg);font: var(--font-xs) monospace}
.imported-track-actions{display:flex;gap:4px}

/* Former inline style attributes from layout.html (generated classes; colours of track swatches use the palette) */
.ls-28f3cf{color:var(--track-projection)!important}
.ls-3d8896{color:var(--ui-swatch-green)!important}
.ls-438de1{color:var(--ui-swatch-sand)!important}
.ls-e9f9d6{color:var(--ui-swatch-teal)!important}
.ls-73cf99{color:var(--ui-swatch-amber)!important}
.ls-bc2e20{color:var(--ui-muted-teal)!important}
.ls-c01100{color:var(--ui-lime)!important}
.ls-b87e65{font:  var(--font-xs) monospace!important;color: var(--lime)!important;letter-spacing: 0.8px!important;margin: 6px 0 4px!important;font-weight: bold!important}
.ls-7e3ec6{color:var(--track-gallery)!important}
.ls-29ab8a{color:var(--track-surface)!important}
.ls-f47be5{color:var(--track-history)!important}
.ls-a21c36{color:var(--ui-accent-soft)!important}
.ls-d2b300{color:var(--scene-grid-major)!important}
.ls-c0f9fb{color:var(--lime)!important;font-family:monospace!important}
.ls-d0eaf6{width:100%!important;margin-top:8px!important}
.ls-cb4589{display:none!important}
.ls-c59ad0{display:flex!important;align-items:center!important;gap:6px!important}
.ls-26a015{background:var(--track-gallery)!important;box-shadow:0 0 6px var(--track-gallery)!important}
.ls-bd0e39{background:var(--track-surface)!important}
.ls-27f582{background:var(--track-history)!important}
.ls-f5a643{background:var(--ui-accent-soft)!important}
.ls-7cfda3{padding:4px 14px!important;font-size: var(--font-xs)!important}
.ls-834563{margin-left:auto!important}
.ls-ff425c{width:80px!important;margin-left:6px!important}
.ls-b3876d{margin-top:16px!important;padding:14px!important;background:var(--ui-badge-bg)!important;border:1px solid var(--ui-badge-border)!important;border-radius:10px!important}
.ls-9f5304{display:flex!important;justify-content:space-between!important;align-items:center!important;flex-wrap:wrap!important;gap:8px!important}
.ls-40f9e3{font-size: var(--font-xs)!important;font-weight:700!important;letter-spacing:1px!important;color:var(--ui-accent-soft)!important;text-transform:uppercase!important}
.ls-2c7f80{margin:2px 0 0!important;font-size:15px!important;color:var(--on-accent-light)!important}
.ls-9c6869{display:flex!important;gap:8px!important}
.ls-f780f5{font-size: var(--font-xs)!important;padding:6px 12px!important;cursor:pointer!important}
.ls-9bdb0c{margin:8px 0 6px!important;font-size:12px!important;color:var(--ui-muted)!important;line-height:1.4!important}
.ls-0c2a6d{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(210px,1fr))!important;gap:8px!important;font-size: var(--font-xs)!important;font-family:monospace!important;background:var(--ui-well-bg)!important;padding:8px 10px!important;border-radius:6px!important;border:1px solid var(--ui-well-border)!important}
.ls-484cb9{margin-top:8px!important;font-size: var(--font-xs)!important;color:var(--ui-muted-2)!important}
.ls-711512{color:var(--on-accent-light)!important;background:var(--ui-well-bg-strong)!important;padding:2px 6px!important;border-radius:3px!important}
/* Swatch glyphs keep 3:1 against either theme thanks to a thin outline in the text colour */
#menuLayers .layer-item b[class*=ls-],#surveyPillbar .sp-dot{-webkit-text-stroke:.6px var(--fg);paint-order:stroke fill}

/* Former SVG colour attributes (compass, profile) */
:root{--profile-ground:#c5f484;--profile-lidar:#ffae6c;--profile-gallery:var(--track-gallery)}
.ps-c9beca{fill:var(--compass-face);stroke:var(--compass-rim)}
.ps-878a62{stroke:var(--compass-ticks)}
.ps-9aa592{fill:var(--compass-north)}
.ps-7bd086{fill:var(--compass-letters)}
.ps-6d4a6d{fill:var(--compass-needle-north)}
.ps-fca26f{fill:var(--compass-needle-south)}
.ps-f5949f{fill:var(--compass-hub)}
.ps-08f494{stop-color:var(--profile-gallery)}
.ps-af9582{stop-color:var(--ui-gradient-stop)}
.ps-c3a504{stroke:var(--ui-rule)}
.ps-a9c44c{stroke:var(--profile-ground)}
.ps-1cd450{stroke:var(--profile-lidar)}
.ps-aeaded{stroke:var(--profile-gallery)}
.ps-caf0b6{stroke:var(--track-selected)}
.ps-6725f1{fill:var(--track-selected)}
.ps-7ccdc0{fill:var(--profile-ground)}
/* Profile legend: readable text in both themes, only the line symbol carries the series colour */
#profileContainer :is(.pl-surf,.pl-cave,.pl-lidar){display:inline-block;color:var(--fg)!important}
#profileContainer .pl-surf::first-letter{color:var(--profile-ground)}
#profileContainer .pl-cave::first-letter{color:var(--profile-gallery)}
#profileContainer .pl-lidar::first-letter{color:var(--profile-lidar)}
/* 2D plan legend follows the track palette; the projection is dashed like on the map */
#planLegend .pl-path::before{background:var(--track-surface)!important;box-shadow:0 0 0 1px var(--track-surface-casing)}
#planLegend .pl-gallery::before{background:repeating-linear-gradient(90deg,var(--track-projection) 0 6px,var(--track-projection-casing) 6px 9px)!important;box-shadow:0 0 0 1px var(--track-projection-casing)!important}
/* WCAG fixes */
#atlasUI #aboutCavus .brand-title,#atlasIdentity .brand-title{color:var(--fg)!important}
#atlasUI .close-dropdown-btn{min-width:32px!important;min-height:32px!important}
.atlas-ready #world #pin{min-height:24px;display:flex;align-items:center}
.atlas-ready a:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
/* 2D ruler: hide-names toggle (tag icon, struck through while names are hidden) */
#gis .plan-ruler .names-icon::before{content:"";display:inline-block;width:18px;height:18px;background:currentColor;-webkit-mask:url("lucide/tag.svg") center/contain no-repeat;mask:url("lucide/tag.svg") center/contain no-repeat;vertical-align:middle}
#gis .plan-ruler .names-icon[aria-pressed=true]{background:var(--inset);color:var(--accent);position:relative}
#gis .plan-ruler .names-icon[aria-pressed=true]::after{content:"";position:absolute;left:9px;right:9px;top:50%;height:2px;background:currentColor;transform:rotate(-35deg)}
html.map-names-hidden #planLegend,html.map-names-hidden #gis .leaflet-tooltip{display:none!important}
#menuLayers .layer-item b.sw-lrud{color:var(--scene-lrud);-webkit-text-stroke:.6px var(--fg);paint-order:stroke fill}

/* Ținte de atingere: 48 px pe ecrane tactile (Material/Apple), 40 px cu mouse — peste minimul WCAG 2.2 AA de 24 px. */
:root{--target-touch:48px;--target-mouse:40px}
html.atlas-ready :is(#reset,#tab3d,#tabMap,#full,#plus,#minus),#atlasUI #menuStation .top-dropdown-header :is(#prev,#next){
  min-width:var(--target-mouse)!important;min-height:var(--target-mouse)!important}
@media(pointer:coarse){
  html.atlas-ready :is(#reset,#tab3d,#tabMap,#full,#plus,#minus),#atlasUI #menuStation .top-dropdown-header :is(#prev,#next){
    min-width:var(--target-touch)!important;min-height:var(--target-touch)!important}
}

/* Salt rapid la reperele peșterii, deasupra căutării din inspector. */
#menuStation .station-pills{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 6px}
#menuStation .station-pill{min-height:32px;padding:4px 10px!important;border:1px solid var(--edge)!important;border-radius:999px!important;
  background:var(--inset)!important;color:var(--fg)!important;font:600 12px/1.2 system-ui;font-variant-numeric:tabular-nums}
#menuStation .station-pill:hover{border-color:var(--accent)!important}
#menuStation .station-pill:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media(pointer:coarse){#menuStation .station-pill{min-height:var(--target-touch)}}

/* Secțiunea transversală LRUD din inspector. */
#menuStation .lrud-section{margin:8px 0;padding:6px;border-radius:6px;background:var(--inset)}
#menuStation .lrud-section[hidden]{display:none}
#menuStation .lrud-section svg{display:block;width:100%;height:auto;max-height:150px}
#menuStation .lrud-section figcaption{font: var(--font-xs)/1.4 system-ui;color:var(--dim);margin-top:4px}
.lrud-shape{fill:color-mix(in srgb,var(--track-gallery) 35%,transparent);stroke:var(--track-gallery);stroke-width:2}
.lrud-axis{stroke:var(--dim);stroke-width:1;stroke-dasharray:3 3}
.lrud-station{fill:var(--accent)}
.lrud-label{fill:var(--fg);font:600  var(--font-xs) system-ui;font-variant-numeric:tabular-nums}

/* Cardurile din arhivă sunt butoane reale. */
button.preset-cave-card{display:block;width:100%;text-align:left;font:inherit;color:inherit;cursor:pointer}
button.preset-cave-card:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.layer-hint{display:block;font: var(--font-xs)/1.3 system-ui;color:var(--dim);margin-top:2px}
.layer-hint[hidden]{display:none}
html[data-atlas-theme=light] .ls-7e3ec6{-webkit-text-stroke:.7px var(--fg)}

/* ===== Inspectorul de stație: ierarhie clară, înălțime după conținut, mutabil pe desktop ===== */
:root{--shadow-lifted:0 18px 40px rgb(0 0 0 / .35);--st-pad:18px;--st-gap:18px;--st-inner:14px;--st-label:12px;--st-value:15px;--st-hero:26px;--st-head:20px;--st-icon:20px;--st-btn:36px}
#atlasUI #menuStation .top-dropdown-header{gap:2px;padding:14px 12px 12px var(--st-pad);cursor:default}
#atlasUI #menuStation .station-heading{gap:1px}
#atlasUI #menuStation .station-heading>span{font:600 var(--st-label)/1.2 system-ui;letter-spacing:.06em;text-transform:uppercase;color:var(--dim)}
#atlasUI #menuStation .station-heading strong{font:700 var(--st-head)/1.15 system-ui!important;color:var(--fg)}
#atlasUI #menuStation .station-kind{font:12px/1.3 system-ui!important;color:var(--dim)!important;white-space:normal}
#atlasUI #menuStation .top-dropdown-header button{width:var(--st-btn);height:var(--st-btn);min-width:var(--st-btn);border-radius:8px;color:var(--fg)}
#atlasUI #menuStation .top-dropdown-header button:hover{background:var(--inset)!important}
#atlasUI #menuStation .top-dropdown-header svg{width:var(--st-icon);height:var(--st-icon);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#atlasUI #menuStation .station-nav-btns{display:flex;gap:0}
#atlasUI #menuStation .top-dropdown-body{padding:var(--st-pad);display:flex;flex-direction:column;gap:var(--st-gap)}
#atlasUI #menuStation .top-dropdown-body>*{margin:0}
/* Cifra principală: cât de adânc e stația sub teren. */
#menuStation .st-hero{background:var(--inset);border-radius:10px;padding:var(--st-inner) calc(var(--st-inner) + 2px)}
#menuStation .st-label,#menuStation .st-block h3{display:block;font:600 var(--st-label)/1.2 system-ui;letter-spacing:.04em;text-transform:uppercase;color:var(--dim);margin:0 0 10px}
#menuStation .st-hero-main strong{display:block;font:700 var(--st-hero)/1.1 system-ui;color:var(--fg);font-variant-numeric:tabular-nums}
#menuStation .st-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:var(--st-inner) 0 0;padding-top:var(--st-inner);border-top:1px solid var(--edge)}
#menuStation .st-facts dt{font:var(--st-label)/1.25 system-ui;color:var(--dim)}
#menuStation .st-facts dd{margin:3px 0 0;font:600 var(--st-value)/1.2 system-ui;color:var(--fg);font-variant-numeric:tabular-nums;white-space:nowrap}
#menuStation .st-hero .dz-flag{display:block;margin-top:10px}
#menuStation .st-hero .dz-flag[hidden]{display:none}
/* Vize legate ca jetoane: stația vecină + lungimea. */
#menuStation #shots{display:flex;flex-wrap:wrap;gap:8px;font:14px system-ui;color:var(--dim)}
#atlasUI #menuStation .st-chip{display:inline-flex;align-items:baseline;gap:8px;min-height:36px;padding:6px 12px!important;border:1px solid var(--edge)!important;border-radius:8px!important;background:var(--panel)!important;color:var(--fg)!important;font:14px system-ui}
#atlasUI #menuStation .st-chip strong{font-weight:700}
#atlasUI #menuStation .st-chip span{color:var(--dim);font-variant-numeric:tabular-nums}
#atlasUI #menuStation .st-chip:hover{border-color:var(--accent)!important}
/* Coordonate. */
#menuStation .station-location{display:flex;align-items:center;justify-content:space-between;gap:10px;border:0;padding:0}
#menuStation .st-coords{display:grid;grid-template-columns:auto 1fr;gap:2px 10px;margin:0}
#menuStation .st-coords>div{display:contents}
#menuStation .st-coords dt{font:600 13px/1.4 system-ui;color:var(--dim)}
#menuStation .st-coords dd{margin:0;font:600 15px/1.4 ui-monospace,monospace;color:var(--fg);font-variant-numeric:tabular-nums}
#atlasUI #menuStation #showEnds{min-height:36px;padding:6px 12px!important;border:1px solid var(--edge)!important;border-radius:8px!important;font:600 13px system-ui}
/* Teren și surse (pliat). */
#menuStation .station-tech{margin:0;border-top:1px solid var(--edge);padding-top:6px}
#menuStation .station-tech[open]{padding-bottom:4px}
#menuStation .station-tech>summary{font:600 13px system-ui;min-height:36px}
#menuStation .st-compare{margin-top:6px;padding:var(--st-inner);border:0;border-radius:10px;background:var(--inset)}
#menuStation #stationSource{display:block;margin-top:10px;font:12px/1.45 system-ui;color:var(--dim)}
/* Navigare și unelte. */
#menuStation .st-find{display:flex;flex-direction:column;gap:10px;border-top:1px solid var(--edge);padding-top:var(--st-gap)}
#menuStation .st-find h3{margin:0}
#menuStation .st-find .station-pills{margin:0}
#atlasUI #menuStation :is(#stationSearch,#stations,#shallow){width:100%;min-height:38px;font:14px system-ui!important;border-radius:8px}
#menuStation .st-tools{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#atlasUI #menuStation .st-tools button{min-height:40px;padding:8px 10px!important;font:600 13px system-ui!important;border:1px solid var(--edge)!important;border-radius:8px!important;background:var(--panel)!important;color:var(--fg)!important;width:100%;margin:0}
#atlasUI #menuStation .st-tools button:hover{border-color:var(--accent)!important}
#menuStation .lrud-section figcaption{font-size:12px}
@media(pointer:coarse){:root{--st-btn:44px}}
@media(max-width:420px){#menuStation .st-facts{grid-template-columns:1fr 1fr}#menuStation .st-tools{grid-template-columns:1fr}}

/* Desktop: înălțime după conținut (fără spațiu gol), plafonată la ecran. */
@media(min-width:1100px) and (not (pointer:coarse)){
 #atlasUI #atlasExplore #dropdownStation.open #menuStation:not(.dock-expanded){
    inset:var(--drawer-top) var(--drawer-gap) auto auto!important;
    max-height:calc(100dvh - var(--drawer-top) - var(--panel-bottom))!important;
    max-width:calc(100vw - 2 * var(--drawer-gap))!important
 }
 #atlasUI #menuStation .top-dropdown-header{cursor:grab}
 #atlasUI #menuStation.dragging .top-dropdown-header{cursor:grabbing}
 /* Mutat de utilizator: poziția vine din --drag-x / --drag-y. */
 #atlasUI #atlasExplore #dropdownStation.open #menuStation.dragged:not(.dock-expanded){
    inset:var(--drag-y) auto auto var(--drag-x)!important;
    max-height:calc(100dvh - var(--drag-y) - 12px)!important;animation:none
 }
 #atlasUI #menuStation.dragging{user-select:none;box-shadow:var(--shadow-lifted)}
}
/* Punctele de suprafață: coordonate, copiere și traseu în Google Maps. */
#menuStation .st-points{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
#menuStation .st-point{display:flex;flex-direction:column;gap:10px;padding:var(--st-inner);border-radius:10px;background:var(--inset)}
#menuStation .st-point-text{display:flex;flex-direction:column;gap:2px}
#menuStation .st-point-text strong{font:600 14px/1.3 system-ui;color:var(--fg)}
#menuStation .st-point-hint{font:var(--st-label)/1.3 system-ui;color:var(--dim)}
#menuStation .st-point-coords{margin-top:4px;font:13px/1.45 ui-monospace,monospace;color:var(--fg);font-variant-numeric:tabular-nums}
#menuStation .st-point-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#atlasUI #menuStation .st-act{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px;padding:6px 10px!important;border:1px solid var(--edge)!important;border-radius:8px!important;background:var(--panel)!important;color:var(--fg)!important;font:600 13px system-ui;text-decoration:none}
#atlasUI #menuStation .st-act:hover{border-color:var(--accent)!important}
#atlasUI #menuStation .st-act:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
#menuStation .st-act svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#menuStation #stSurface[hidden]{display:none}
@media(pointer:coarse){#atlasUI #menuStation .st-act{min-height:var(--target-touch)}}

/* Lizibilitate: nicio etichetă de text sub --font-xs (12 px) în panouri și pe hartă.
   Regulile vechi din viewer.css / Leaflet aveau 9–11 px; aici sunt aduse la scara comună. */
html.atlas-ready :is(#menuExport .top-dropdown-header strong,#menuExport .export-dropdown-item small,
  #profileContainer label,#profileSubtitle,#profileContainer :is(.pl-surf,.pl-cave,#plLidarLeg),
  .dropdown-label,#compassHeading,#scaleLabel,#gis .poi-text,#gis .leaflet-control-scale-line,
  #dynCredit,#gis .leaflet-control-attribution){font-size:var(--font-xs)!important}
html.atlas-ready #gis .poi-sub{font-size:var(--font-xs)!important;opacity:.9}
html.atlas-ready #profileActiveLabel{font-size:12px}
html.atlas-ready #menuExport .export-dropdown-item{padding:10px 12px!important;gap:10px}
html.atlas-ready #menuExport .top-dropdown-header{padding:12px 14px!important}

/* Galerii și campanii: trei grupe clare, aerisite. */
#routePanel #surveyPillbar{display:flex!important;flex-direction:column;gap:18px;padding:4px 2px 2px}
#routePanel .rp-group h3{margin:0 0 10px;font:600 var(--font-xs)/1.2 system-ui;letter-spacing:.04em;text-transform:uppercase;color:var(--dim)}
#routePanel .rp-segment{display:grid;grid-template-columns:repeat(3,1fr);gap:0;border:1px solid var(--edge);border-radius:10px;overflow:hidden}
#atlasUI #routePanel .rp-segment button{border:0!important;border-radius:0!important;margin:0!important;min-height:40px;font:600 var(--font-sm) system-ui!important;background:var(--panel)!important;color:var(--dim)!important}
#atlasUI #routePanel .rp-segment button+button{border-left:1px solid var(--edge)!important}
#atlasUI #routePanel .rp-segment button.active{background:var(--selected)!important;color:var(--fg)!important}
#routePanel .rp-pills{display:flex;flex-wrap:wrap;gap:8px}
#atlasUI #routePanel .rp-pills .survey-pill{min-height:38px;padding:6px 12px!important;margin:0!important;font:var(--font-sm) system-ui!important;border-radius:999px!important}
#atlasUI #routePanel .rp-action{width:100%;min-height:40px;margin:0!important;border:1px solid var(--edge)!important;border-radius:10px!important;font:600 var(--font-sm) system-ui!important}
#atlasUI #routePanel .rp-action.active{border-color:var(--accent)!important;color:var(--fg)!important}
#atlasUI #routePanel{padding:16px 18px 18px!important}
#atlasUI #routePanel>h2{margin:0 0 14px!important}
#routePanel #surveyPillbar{align-items:stretch!important}
#routePanel .rp-group{width:100%}
#routePanel .rp-segment{width:100%}

/* Proiect: acțiuni grupate pe teme. */
#atlasUI #projectPanel{padding:16px 18px 18px!important}
#atlasUI #projectPanel>h2{margin:0 0 12px!important}
#projectPanel .pj-group+.pj-group{margin-top:16px;padding-top:14px;border-top:1px solid var(--edge)}
#projectPanel .pj-group h3{margin:0 0 8px;font:600 var(--font-xs)/1.2 system-ui;letter-spacing:.04em;text-transform:uppercase;color:var(--dim)}
#projectPanel .pj-list{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#atlasUI #projectPanel .pj-list button{margin:0!important;min-height:40px;padding:8px 12px!important;text-align:left;font:600 var(--font-sm) system-ui!important;border:1px solid var(--edge)!important;border-radius:8px!important;background:var(--panel)!important;color:var(--fg)!important}
#atlasUI #projectPanel .pj-list button:hover{border-color:var(--accent)!important}
#projectPanel .pj-list #fieldStatus{grid-column:1/-1}
#projectPanel #advancedMap{margin-top:16px}
@media(max-width:330px){#projectPanel .pj-list{grid-template-columns:1fr}}
#projectPanel .pj-group,#projectPanel #advancedMap{margin-inline:12px}
#atlasUI #atlasIdentity:has(.top-dropdown.open){z-index:1050!important}   /* its menus (Export) above the zoom column */
#profileSvg .profile-axis-label{fill:var(--fg);opacity:.75}

/* Link în text care deschide alt dialog (Deschide o peșteră → Importă date GIS). */
.link-btn{display:inline;padding:0!important;border:0!important;background:none!important;color:var(--accent)!important;font:inherit;text-decoration:underline;cursor:pointer;min-height:0!important}
.link-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:2px}

/* Telefon: aceeași ierarhie, margini mai strânse ca să încapă mai mult în foaia de jos. */
@media(max-width:620px){
 :root{--st-pad:14px;--st-gap:14px;--st-inner:12px;--st-hero:24px}
 #atlasUI #menuStation .top-dropdown-header{padding:10px 8px 10px var(--st-pad)}
 #projectPanel .pj-group,#projectPanel #advancedMap{margin-inline:4px}
 #atlasUI #projectPanel .pj-list button{min-height:var(--target-touch);font-size:var(--font-sm)!important}
}

/* Straturi · „Relief 3D” și fondul reliefului online din afara zonei. */
#menuLayers .dem-source{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px}
#menuLayers .dem-source[hidden]{display:none}
#menuLayers .dem-source label{font:600 var(--font-sm)/1.3 system-ui;color:var(--fg)}
#menuLayers .dem-source select{width:100%;min-height:36px;padding:4px 8px;border:1px solid var(--edge);border-radius:8px;background:var(--inset);color:var(--fg);font:var(--font-sm)/1.2 system-ui}
#menuLayers .dem-source select:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media(pointer:coarse){#menuLayers .dem-source select{min-height:var(--target-touch)}}
#aboutDialog .about-note{margin:4px 0 8px;font:var(--font-xs)/1.45 system-ui;color:var(--dim)}
