/* Presentation-only phone refinement. Keep map, incident and data logic untouched. */
.tabIcon{display:none}
@media(max-width:700px){
 .fieldAtlas{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#f2f2f7;color:#153c5b}
 .fieldAtlas header{height:calc(64px + env(safe-area-inset-top));padding:env(safe-area-inset-top) max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left));border-bottom:2px solid #f3cb20;gap:8px}
 .fieldAtlas .brand{min-width:0;gap:7px;flex-shrink:1}.fieldAtlas .brandLogo{width:34px;height:44px;flex-shrink:0}
 .fieldAtlas .brand strong{font-size:12px;letter-spacing:.015em;white-space:nowrap}.fieldAtlas .brand small{font-size:8px;letter-spacing:.045em}
 .fieldAtlas .headerRight{gap:4px}.fieldAtlas .headerRight button{min-width:44px;min-height:44px;padding:5px;border-radius:14px;background:#ffffff18;border-color:#ffffff35}
 .fieldAtlas #profileButton::after,.fieldAtlas #about::after{font-size:11px}.fieldAtlas #notificationsButton{font-size:21px}
 .fieldAtlas #network{top:calc(1px + env(safe-area-inset-top));right:15px;font-size:7px}
 .fieldAtlas main{height:calc(100dvh - 64px - env(safe-area-inset-top));min-height:0}
 .fieldAtlas .maptop{left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));top:12px}
 .fieldAtlas .scopeLabel{border-radius:15px;box-shadow:0 3px 18px #153c5b20;background:#fffffff5;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
 .fieldAtlas .scopeLabel select{font-size:16px;min-height:48px;padding:12px;border-radius:15px}
 .fieldAtlas .maptitle{top:60px;max-width:calc(100% - 126px);border-radius:10px;padding:8px 10px;background:#fffffff2}.fieldAtlas .maptitle p{font-size:11px;line-height:1.4}
 .fieldAtlas .maptools button{width:116px;border-radius:14px;font-size:12px;min-height:48px}
 .fieldAtlas #locate{top:60px}.fieldAtlas #pinMode{top:116px}.fieldAtlas #home{top:172px}.fieldAtlas #home::after{font-size:12px}
 .fieldAtlas .mapbottom{left:12px;right:12px;bottom:24px}.fieldAtlas .mapbottom span{font-size:10px;border-radius:9px;padding:6px 8px}
 .fieldAtlas .leaflet-control-zoom{margin:0 12px 86px 0!important;border:0;box-shadow:0 3px 14px #153c5b22;border-radius:14px;overflow:hidden}
 .fieldAtlas .leaflet-control-zoom a{width:44px;height:44px;line-height:44px}.fieldAtlas .leaflet-control-scale{margin-bottom:78px!important}
 .fieldAtlas #pinHint{top:72px;right:140px;border-radius:12px}.fieldAtlas #pinHint button{min-height:44px}
 .fieldAtlas #toolSheet{flex-basis:40%;height:40%;min-height:196px;padding-bottom:0;border-radius:24px 24px 0 0;background:#f2f2f7;box-shadow:0 -4px 24px #153c5b1f}
 .fieldAtlas #toolSheet[data-state=expanded]{flex-basis:78%;height:78%}
 .fieldAtlas #sheetToggle{order:0;min-height:44px;height:44px;gap:10px;font-size:12px;color:#526476;background:transparent}
 .fieldAtlas .sheetGrip{width:32px;height:4px;background:#b5bdc7}
 .fieldAtlas #sheetContent{order:1;scroll-padding:16px 0 24px}
 .fieldAtlas #toolSheet nav{order:2;padding:7px max(8px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));gap:4px;border-bottom:0;border-top:1px solid #d4dae2;background:#ffffffed;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}
 .fieldAtlas #toolSheet nav button{min-height:54px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;padding:5px 2px;font-size:11px;font-weight:600;border-radius:13px;background:transparent;color:#596c7c;box-shadow:none}
 .fieldAtlas #toolSheet nav button.active{background:#800c2c0d;color:#800c2c;box-shadow:inset 0 -2px #f3cb20}
 .fieldAtlas .tabIcon{display:block;width:23px;height:23px}
 .fieldAtlas .panel{padding:8px max(16px,env(safe-area-inset-right)) 24px max(16px,env(safe-area-inset-left))}
 .fieldAtlas .panel h2{font-size:24px;letter-spacing:-.035em;margin:5px 0 10px}.fieldAtlas .panel .eyebrow{font-size:10px;letter-spacing:.09em}
 .fieldAtlas #origin{font-size:13px}.fieldAtlas .badge{font-size:11px;padding:6px 10px}
 .fieldAtlas label{font-size:14px;font-weight:600;line-height:1.45}
 .fieldAtlas input:not([type=checkbox]),.fieldAtlas select{font-size:16px;min-height:48px;border-radius:12px;background:white;padding:12px}
 .fieldAtlas .filters{align-items:stretch;gap:8px;flex-direction:column}.fieldAtlas .filters select{width:100%;font-size:16px}.fieldAtlas .filters label{font-size:13px;min-height:44px;display:flex;align-items:center;gap:8px}
 .fieldAtlas .asset,.fieldAtlas .snapshot{border-radius:16px;padding:15px;border-color:#e0e4e9;background:#fff;box-shadow:0 2px 7px #153c5b04}.fieldAtlas .asset h3{font-size:16px}.fieldAtlas .asset p{font-size:13px}.fieldAtlas .asset .kind{font-size:11px}.fieldAtlas .asset .status{font-size:12px;padding:4px 8px;border-radius:6px}
 .fieldAtlas .fine,.fieldAtlas .muted,.fieldAtlas .callout,.fieldAtlas .warning,.fieldAtlas .error{font-size:13px;line-height:1.55}
 .fieldAtlas .callout,.fieldAtlas .warning,.fieldAtlas .error,.fieldAtlas .ergSearchBox,.fieldAtlas #substanceReference{border-radius:12px}
 .fieldAtlas .row{flex-wrap:wrap}.fieldAtlas .row>*{flex-basis:130px}.fieldAtlas .row button{font-size:13px;min-height:48px;border-radius:12px}
 .fieldAtlas .check{min-height:48px;padding:10px 0;font-size:14px}.fieldAtlas .check input{width:22px;height:22px;margin-right:6px}
 .fieldAtlas .subhead{flex-wrap:wrap}.fieldAtlas .subhead h3{font-size:17px}.fieldAtlas .subhead button{font-size:13px}
 .fieldAtlas .layeritem{padding:12px 0;min-height:52px;gap:12px}.fieldAtlas .layeritem label{font-size:14px}.fieldAtlas .layeritem input{width:22px;height:22px}
 .fieldAtlas .referenceLinks a,.fieldAtlas .ergSearchBox a,.fieldAtlas .doclink{display:block;min-height:44px;padding:10px 0;font-size:14px}
 .fieldAtlas dialog{width:calc(100% - 16px);max-width:660px;max-height:calc(100dvh - env(safe-area-inset-top) - 16px);margin:auto auto 0;padding:24px 20px calc(24px + env(safe-area-inset-bottom));border-radius:24px 24px 0 0;background:#f8f9fc;scroll-padding:20px;overflow-wrap:anywhere}
 .fieldAtlas dialog p,.fieldAtlas dialog li{font-size:14px}.fieldAtlas dialog button{min-height:44px;border-radius:12px}.fieldAtlas dialog::backdrop{background:#102e4966;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
 .fieldAtlas .leaflet-popup-content{font-size:13px;max-width:min(260px,calc(100vw - 80px))}.fieldAtlas .leaflet-popup-content a{min-height:44px;padding:10px 0}
 .fieldAtlas main:has(aside[data-state=expanded]) #locate,.fieldAtlas main:has(aside[data-state=expanded]) #pinMode{top:60px}
 .fieldAtlas main:has(aside[data-state=expanded]) #pinHint{top:116px}
}
@media(max-width:350px){.fieldAtlas .brandLogo{width:28px}.fieldAtlas .brand strong{font-size:10px}.fieldAtlas .brand small{font-size:6px}.fieldAtlas .brand{gap:4px}.fieldAtlas .headerRight{gap:2px}.fieldAtlas header{padding-left:8px;padding-right:8px}}
@media(max-width:700px) and (max-height:600px){
 .fieldAtlas #toolSheet{flex-basis:42%;height:42%;min-height:156px}.fieldAtlas #toolSheet[data-state=expanded]{flex-basis:100%;height:100%}
 .fieldAtlas main:has(aside[data-state=expanded]) #mapPane{display:none}
 .fieldAtlas #home,.fieldAtlas .maptitle,.fieldAtlas .mapbottom{display:none}
 .fieldAtlas #locate{top:60px;left:0;right:auto}.fieldAtlas #pinMode{top:60px;right:0}
 .fieldAtlas .leaflet-control-zoom{margin-bottom:24px!important}.fieldAtlas #sheetToggle{height:44px}
}
@media(prefers-reduced-motion:reduce){.fieldAtlas *{scroll-behavior:auto!important}}
@media(max-width:700px){.fieldAtlas .maptools .scopeLabel{font-size:0;margin:0;padding:0}.fieldAtlas .maptools .scopeLabel select{margin:0;font-size:16px}}
@media(max-width:700px){.fieldAtlas #home{left:0;right:auto}}
@media(max-width:700px){.fieldAtlas #notificationsButton{min-width:44px;min-height:44px}}

/* Focused phone navigation: forms are screens, not a tiny drawer under a map. */
@media(max-width:700px){
 .fieldAtlas header{height:calc(56px + env(safe-area-inset-top));gap:6px;padding-left:max(12px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right))}
 .fieldAtlas .brandLogo{width:30px;height:38px}.fieldAtlas .brand strong{font-size:12px;letter-spacing:.02em}.fieldAtlas .brand small{display:none}
 .fieldAtlas .headerRight{gap:0}.fieldAtlas .headerRight button{width:44px;min-width:44px;height:44px;padding:0;border:0;background:transparent;border-radius:12px}
 .fieldAtlas #profileButton::after{content:'◉';font-size:22px}.fieldAtlas #about::after{content:'ⓘ';font-size:23px}.fieldAtlas #network{display:none}
 .fieldAtlas main{height:calc(100dvh - 56px - env(safe-area-inset-top))}
 .fieldAtlas .maptop{top:10px;left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right))}
 .fieldAtlas .maptitle{display:none!important}
 .fieldAtlas .maptools{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) 44px;gap:6px;max-width:none;pointer-events:auto}
 .fieldAtlas .maptools .scopeLabel{position:static;grid-column:1/-1;order:0;width:100%;border-radius:12px;box-shadow:0 2px 9px #153c5b12}
 .fieldAtlas .maptools .scopeLabel select{min-height:44px;height:44px;font-size:16px;padding:8px 10px;border-radius:12px;white-space:nowrap}
 .fieldAtlas .maptools button,.fieldAtlas main:has(aside[data-state=expanded]) .maptools button{position:static!important;width:auto!important;min-height:44px;height:44px;padding:6px;font-size:13px;line-height:1.15;border-radius:12px;box-shadow:0 2px 8px #153c5b17}
 .fieldAtlas #locate{order:1}.fieldAtlas #pinMode{order:2}.fieldAtlas #home{display:block!important;order:3;font-size:0!important}
 .fieldAtlas #home::after{content:'⌂';font-size:25px;line-height:1}
 .fieldAtlas .mapbottom{bottom:24px;left:10px;right:64px}.fieldAtlas .mapbottom #gpsStatus{font-size:11px;max-width:100%;padding:5px 8px;background:#fffffff2;color:#153c5b;border:1px solid #d5dde4}.fieldAtlas #cacheStatus{display:none}
 .fieldAtlas .leaflet-control-zoom{margin:0 10px 25px 0!important}.fieldAtlas .leaflet-control-scale{margin-bottom:62px!important}.fieldAtlas .leaflet-control-attribution{font-size:8px}
 .fieldAtlas #pinHint,.fieldAtlas main:has(aside[data-state=expanded]) #pinHint{top:108px;left:10px;right:10px;padding:8px 12px;font-size:13px;z-index:610}
 .fieldAtlas #pinHint button{min-height:44px;margin:0 0 0 8px}
 .fieldAtlas #toolSheet{flex-basis:29%;height:29%;min-height:176px;border-radius:20px 20px 0 0}
 .fieldAtlas #toolSheet[data-state=expanded]{flex-basis:78%;height:78%}
 .fieldAtlas #sheetToggle{height:44px;min-height:44px;font-size:13px}
 .fieldAtlas #toolSheet nav{gap:0;padding-top:4px;padding-bottom:calc(4px + env(safe-area-inset-bottom));padding-left:max(4px,env(safe-area-inset-left));padding-right:max(4px,env(safe-area-inset-right))}
 .fieldAtlas #toolSheet nav button{min-width:0;min-height:56px;height:auto;font-size:11px;padding:5px 0;gap:3px;line-height:1.2;white-space:nowrap}
 .fieldAtlas #toolSheet nav .tabIcon{width:22px;height:22px;flex-shrink:0}
 .fieldAtlas .panel{padding-top:14px}.fieldAtlas .panel h2{font-size:25px;line-height:1.2}.fieldAtlas .panel .eyebrow{font-size:10px}
 .fieldAtlas .sectionhead{align-items:flex-start}.fieldAtlas input[type=file]{max-width:100%;padding:10px;font-size:14px}
 .fieldAtlas #trainingForm{margin-top:20px}.fieldAtlas #trainingForm label{margin-top:18px}.fieldAtlas #trainingUpload{margin-top:10px}.fieldAtlas #refreshTraining{width:100%;margin-top:10px}
 /* This is driven by the visible panel itself, independent of sheet state or timing. */
 .fieldAtlas:has(#incident:not([hidden]),#layers:not([hidden]),#saved:not([hidden]),#training:not([hidden])) #mapPane{display:none!important}
 .fieldAtlas:has(#incident:not([hidden]),#layers:not([hidden]),#saved:not([hidden]),#training:not([hidden])) #toolSheet{flex:1 1 100%!important;height:100%!important;min-height:0;border-radius:0;box-shadow:none}
 .fieldAtlas:has(#incident:not([hidden]),#layers:not([hidden]),#saved:not([hidden]),#training:not([hidden])) #sheetToggle{display:none!important}
 .fieldAtlas:has(#incident:not([hidden]),#layers:not([hidden]),#saved:not([hidden]),#training:not([hidden])) #sheetContent{min-height:0;flex:1;overflow:auto}
 .fieldAtlas .mobileMapReturn{display:flex;gap:8px;margin:0 0 18px}.fieldAtlas .mobileMapReturn button{min-height:44px;font-size:14px;border-radius:12px;flex:1}
}
.mobileMapReturn{display:none}
@media(max-width:700px){.fieldAtlas .mobileMapReturn{display:flex}}
.headerIcon{display:none}
@media(max-width:700px){.fieldAtlas #profileButton::after{content:none}.fieldAtlas #profileButton .headerText{display:none}.fieldAtlas .headerIcon{display:inline-block;width:22px;height:22px;vertical-align:middle}.fieldAtlas .brand{flex:1}.fieldAtlas #notificationsButton{font-size:20px}}

@media(max-width:700px) and (max-height:600px){.fieldAtlas #toolSheet[data-state=expanded]{flex-basis:100%;height:100%}}

/* Mobile v17: one task at a time, persistent navigation, map-first arrival. */
@media(max-width:700px){
 .fieldAtlas #toolSheet{flex:0 0 auto;height:auto;min-height:0;border-radius:18px 18px 0 0}
 .fieldAtlas:has(#nearby:not([hidden])) #toolSheet[data-state=compact] #sheetContent{display:none}
 .fieldAtlas:has(#nearby:not([hidden])) #toolSheet[data-state=expanded]{flex:1 1 100%;height:100%;min-height:0}
 .fieldAtlas:has(#nearby:not([hidden])):has(#toolSheet[data-state=expanded]) #mapPane{display:none!important}
 .fieldAtlas #sheetToggle{justify-content:center;font-weight:650;min-height:48px;height:48px;border-bottom:1px solid #dce3e9}
 .fieldAtlas #sheetToggle .sheetGrip{display:none}
 .fieldAtlas #toolSheet nav button{font-size:12px;min-height:60px;white-space:normal;line-height:1.2}
 .fieldAtlas #toolSheet nav button[hidden]{display:none!important}
 .fieldAtlas .panel{padding-bottom:28px}
 .fieldAtlas #sheetContent{overscroll-behavior:contain}
 .fieldAtlas #nearby .sectionhead .eyebrow{display:none}
 .fieldAtlas #nearby #origin{margin:8px 0 16px}
 .fieldAtlas #nearby .search{position:sticky;top:0;z-index:1;background:#f2f2f7;padding:8px 0}
 .fieldAtlas #sharedList .snapshot button,.fieldAtlas #trainingFiles button{min-height:44px;margin:4px 4px 4px 0}
 .fieldAtlas #saved>.row{gap:8px}.fieldAtlas #saved>.row button{flex:1 1 140px}
}
