/* The application owns the viewport; only its content pane scrolls. */
html,body{width:100%;min-width:0;max-width:100%;overflow-x:hidden;overscroll-behavior-x:none}
#app{width:100%;min-width:0}
.app-layout{height:100dvh;min-height:0;overflow:hidden;padding:env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left)}
.main{height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.topbar{flex-shrink:0;min-width:0}
.content{flex:1;min-height:0;min-width:0;width:100%;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;scrollbar-gutter:stable;padding-bottom:max(26px,env(safe-area-inset-bottom))}
:is(.home-grid,.profile-grid,.form-grid,.module-row,.base-metrics,.experience-ratings)>*{min-width:0}
:is(.panel,.field,.hero-copy,.air-card-body,.base-identity,.docs-shortcut,.document-toolbar,.page-title,.panel-top,.card-title,.card-bottom){min-width:0;overflow-wrap:anywhere}
:is(input,select,textarea){max-width:100%}
:is(.panel-top,.page-title,.base-identity,.document-toolbar,.form-actions,.card-bottom){flex-wrap:wrap}
.map-content{display:flex;flex-direction:column;overflow:hidden;gap:0}
.map-content>.map-toolbar,.map-content>.map-search-row{flex-shrink:0}
.map-content .flight-shell{flex:1;min-height:0!important;height:auto!important;width:100%}
.map-search-row .search{min-width:0}
.map-search-row select{min-width:0}
.weather-tabs{flex-wrap:wrap}
.weather-table{table-layout:fixed;overflow-wrap:anywhere}
dialog{overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
.auth-shell,.offline-workspace{padding-top:max(20px,env(safe-area-inset-top));padding-right:max(20px,env(safe-area-inset-right));padding-bottom:max(20px,env(safe-area-inset-bottom));padding-left:max(20px,env(safe-area-inset-left));overflow-wrap:anywhere}
@media(max-width:800px){
 .main{padding-bottom:calc(72px + env(safe-area-inset-bottom))}
 .sidebar{height:calc(72px + env(safe-area-inset-bottom));padding:5px max(4px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(4px,env(safe-area-inset-left));left:0;right:0;width:auto}
 .nav{gap:0;width:100%;height:62px}
 .nav button{min-width:0;flex:1 1 0;padding:7px 2px;gap:4px;font-size:9px;line-height:1.15;justify-content:flex-start}
 .nav button span{max-width:100%;overflow-wrap:anywhere;text-align:center}
 .topbar{height:auto;min-height:62px;padding:8px 12px;gap:8px;flex-wrap:wrap}
 .mobile-brand{font-size:11px;letter-spacing:.4px;flex:1 1 95px}
 .mobile-brand small{font-size:7px;letter-spacing:.8px}
 .top-actions{gap:5px;min-width:0;flex-wrap:wrap}
 .top-actions .lang{max-width:100px;padding:8px 5px}
 .top-actions .theme-toggle{padding:6px 8px}
 .top-actions .auth-signout{padding:8px 7px}
 .content{scrollbar-gutter:auto}
 .map-content{padding:8px}
 .flight-toolbar{margin-bottom:7px;gap:5px}
 .flight-toolbar .btn{padding:7px 8px;min-height:34px;font-size:10px}
 .map-search-row{margin-bottom:7px;gap:5px}
 .map-search-row .search{flex:1 1 100%;max-width:none}
 .map-search-row #baseSelect,.map-search-row #atmosphereSelect{flex:1 1 0;max-width:none;width:0;padding:9px 6px}
 .map-search-row .search input{font-size:16px;padding-top:9px;padding-bottom:9px}
 .flight-shell .wind-panel,.flight-shell .atmosphere-panel{max-height:calc(100% - 78px)}
 .flight-shell .route-panel{top:65px!important;max-height:calc(100% - 78px)}
 .flight-shell:has(.wind-panel:not(.hidden)) .route-panel{top:65px!important}
 .flight-shell .map-tools{gap:6px}.flight-shell .circle{width:34px;height:34px}
 .flight-shell .map-ribbon{left:8px;top:8px;max-width:calc(100% - 55px)}
 .flight-shell .compact-status{max-width:100%}
 .flight-shell .gps-readout{bottom:65px;max-width:145px;padding:5px 8px}
 .flight-legend{padding:6px!important;gap:5px!important;bottom:23px!important;font-size:8px!important}
 .auth-header{flex-wrap:wrap}.auth-header .top-actions{margin-left:auto}
 .field input,.field select,.field textarea,.auth-card .field input,.document-filters input,.document-filters select{font-size:16px}
 .maintenance-label{overflow-wrap:anywhere}
}
@media(max-width:380px){.topbar .mobile-brand{flex-basis:100%}.topbar .top-actions{width:100%;justify-content:flex-end}.panel{padding:16px}.aircraft-home{grid-template-columns:minmax(0,1fr)}.country-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-height:500px) and (orientation:landscape){
 .topbar{min-height:40px;padding-top:4px;padding-bottom:4px}.mobile-brand small{display:none}
 .map-content{overflow-y:auto}.map-content .flight-shell{flex:0 0 max(240px,65dvh)}
}

@media(max-width:380px){.nav button{font-size:8px}}
.company-footer{padding:18px 12px;text-align:center;font-size:10px;color:var(--sub);line-height:1.7}.company-footer nav{display:flex;justify-content:center;gap:14px;flex-wrap:wrap;margin-top:7px}.company-footer button,.company-footer a{font-size:11px;color:var(--teal);padding:3px}.main>.company-footer{flex-shrink:0;padding:5px 10px;font-size:9px}.main>.company-footer nav{margin:0;gap:12px}.auth-aircraft{border-radius:24px;max-height:440px;object-fit:contain}.auth-brand img,.brand img{border-radius:10px}.auth-story{min-width:0}.auth-shell{background:radial-gradient(ellipse at 30% 50%,#dbe4ed,transparent 60%),var(--bg)}
@media(max-width:800px){.main>.company-footer p{font-size:8px}.main>.company-footer nav{gap:10px}.main>.company-footer a,.main>.company-footer button{font-size:9px}.auth-aircraft{height:230px}.map-content .flight-shell{min-height:180px!important}.map-content{overflow-y:auto}}
/* 0.15: transparent login artwork; app icon retains its opaque blue background. */
.auth-story .auth-aircraft{width:min(100%,440px);height:auto;max-height:none;aspect-ratio:1;margin:28px auto 0;border-radius:0;filter:none;box-shadow:none}
@media(max-width:800px){.auth-story .auth-aircraft{width:min(100%,280px);height:auto;margin-top:14px}}

/* 0.18: contain date controls and prevent focus zoom on mobile. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
.field,.search,fieldset{min-inline-size:0}
.field input,.field select,.field textarea{box-sizing:border-box;min-width:0;width:100%;max-width:100%}
.maintenance-form{grid-template-columns:repeat(2,minmax(0,1fr))}
.maintenance-form fieldset{margin:0;min-inline-size:0;max-width:100%}
input[type=date],input[type=datetime-local],input[type=time]{display:block;min-inline-size:0;max-inline-size:100%;-webkit-appearance:none;appearance:none;min-height:46px}
input::-webkit-date-and-time-value{min-width:0;text-align:left}
.dialog-top h2{min-width:0;overflow-wrap:anywhere}
.dialog-top button{flex-shrink:0}
@media(max-width:700px){.maintenance-form{grid-template-columns:minmax(0,1fr)}}
@media(max-width:1024px),(pointer:coarse){
 input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),select,textarea{font-size:16px!important}
 .hours-command input{font-size:48px!important}
 .experience-secondary input,.experience-ratings input{font-size:25px!important}
 .search{min-width:0;max-width:100%}
 .maintenance-labels{grid-template-columns:repeat(2,minmax(0,1fr))}
 .maintenance-label{min-width:0;max-width:100%}
 .toolbar,.hangar-panel,.hangar-record{min-width:0;max-width:100%}
 dialog{max-width:calc(100% - 24px);padding:20px;scroll-padding:20px}
 .form-actions{gap:12px}.form-actions .btn{white-space:normal;max-width:100%}
 .top-actions .lang{max-width:132px}
}
@media(max-width:360px){.maintenance-labels{grid-template-columns:minmax(0,1fr)}}
/* 0.19: map workspace, compact persistent panels and independent map interaction. */
.map-workspace-bar{display:flex;justify-content:flex-end;gap:8px;flex-shrink:0;margin-bottom:6px}
.map-workspace-bar button,.panel-restore{border:1px solid var(--line);border-radius:18px;padding:7px 12px;background:var(--white);color:var(--ink);font-size:12px}
[data-map-window]{padding-top:40px!important}
.panel-minimize{position:absolute;right:42px;top:5px;width:32px;height:32px;border:1px solid var(--line);border-radius:50%;background:var(--white);color:var(--ink);font-size:22px;z-index:2}
.map-window-minimized{display:none!important}
.map-panel-tray{position:absolute;left:8px;right:52px;bottom:49px;display:flex;gap:5px;flex-wrap:wrap;z-index:60;pointer-events:none}
.panel-restore{pointer-events:auto;max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:var(--shadow)}
.map-sheet{position:fixed;inset:auto 20px 25px auto;margin:0;width:min(430px,calc(100vw - 24px));max-height:55dvh;z-index:1000;padding:18px;background:var(--white);overscroll-behavior:contain}
.map-sheet .dialog-top{margin-bottom:10px}.map-sheet .dialog-top h2{font-size:16px}.map-sheet .dialog-copy{font-size:11px;margin-bottom:12px}
.map-sheet .weather-raw{font-size:12px;padding:10px;margin:10px 0}.map-sheet .detail-specs{gap:7px;margin:10px 0}.map-sheet .detail-specs>div{padding:8px}
.map-sheet .weather-tabs{margin:10px 0}.map-sheet .credit{font-size:10px}
.map-point-sheet{position:absolute;z-index:50;left:8px;right:8px;bottom:84px;max-height:43%;overflow:auto;padding:14px;border-radius:17px;border:1px solid var(--line);background:var(--white);box-shadow:var(--shadow);font-size:12px;overflow-wrap:anywhere}
.point-sheet-close{position:absolute;top:5px;right:6px;width:32px;height:32px;border-radius:50%;font-size:22px;background:var(--white)}
.map-point-sheet h3{font-size:17px;margin:5px 0}.map-point-sheet p{font-size:11px;margin:6px 0}
.map-point-sheet .popup-data{gap:6px}.map-point-sheet .popup-actions{gap:6px}.map-point-sheet .btn{font-size:11px;padding:8px 10px}
@media(max-width:800px){
 .main:has(.map-content)>.company-footer{display:none}
 .main:has(.map-content) .topbar{min-height:46px;padding:5px 10px}.main:has(.map-content) .mobile-brand small{display:none}
 .map-content{padding:4px!important;overflow:hidden!important;position:relative}
 .map-workspace-bar{margin-bottom:4px}.map-workspace-bar button{font-size:11px;padding:5px 10px;min-height:30px}
 .flight-toolbar{flex-wrap:nowrap!important;overflow-x:auto;max-width:100%;gap:5px;margin-bottom:5px;scrollbar-width:none;padding-bottom:2px}
 .flight-toolbar .btn{flex-shrink:0;white-space:nowrap;padding:7px 10px;font-size:11px;min-height:34px}
 .flight-toolbar .region-btn{margin-left:0!important}
 .map-settings-collapsed .map-search-row>:not(.search):not(.airport-results){display:none}
 .map-search-row{margin-bottom:5px!important}.map-search-row .search input{padding-top:8px;padding-bottom:8px}
 .map-search-row:has(.airport-results:not(.hidden)){z-index:80}
 .airport-results{max-height:45dvh}
 .map-content .flight-shell{min-height:0!important;border-radius:16px;flex:1 1 0!important;height:auto!important}
 .flight-shell .route-panel,.flight-shell .wind-panel,.flight-shell .atmosphere-panel,.flight-shell .atmosphere-panel:has(~.wind-panel:not(.hidden)),.flight-shell:has(.wind-panel:not(.hidden)) .route-panel{left:8px!important;right:8px!important;top:auto!important;bottom:84px!important;width:auto!important;max-height:43%!important;z-index:45;padding:12px;padding-top:40px;overscroll-behavior:contain}
 .flight-shell .panel-top{margin-bottom:8px}.flight-shell .panel-top h3{font-size:14px;margin:0}
 .flight-shell .wind-value{margin-top:8px}.flight-shell .wind-value strong{font-size:18px}.flight-shell .credit{font-size:10px;line-height:1.4;margin:7px 0}
 .flight-shell .wind-details{font-size:10px;margin-top:6px}
 .flight-shell .route-row{margin:8px 0}.flight-shell .route-totals{margin-top:8px;padding-top:8px}
 .flight-shell .map-notices{left:8px;right:52px;bottom:85px;font-size:9px;max-height:40px;overflow:auto;pointer-events:auto;opacity:.93}
 .flight-shell:has([data-map-window]:not(.hidden):not(.map-window-minimized)) .map-notices{display:none}
 .flight-shell .map-tools{right:6px!important;left:auto!important;top:8px!important;gap:5px}
 .flight-shell .circle{width:32px;height:32px}.flight-shell .gps-readout{bottom:26px;left:8px;font-size:9px;max-width:135px}
 .flight-shell .flight-legend{left:auto!important;right:5px;bottom:24px!important;max-width:calc(100% - 10px);font-size:8px!important;padding:4px 6px!important;gap:5px!important}
 .flight-shell .compact-status{max-width:calc(100% - 55px)}.compact-status summary{padding:6px 9px;font-size:9px}
 .map-sheet{left:8px;right:8px;bottom:calc(82px + env(safe-area-inset-bottom));width:auto;max-height:42dvh;border-radius:18px;padding:14px}
 .map-sheet .detail-specs{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.map-focus .app-layout{position:fixed;inset:0;z-index:900;height:100dvh;padding-bottom:env(safe-area-inset-bottom)}
 body.map-focus .sidebar,body.map-focus .topbar,body.map-focus .company-footer{display:none!important}
 body.map-focus .main{padding-bottom:0!important}
 body.map-focus .map-sheet{bottom:max(8px,env(safe-area-inset-bottom));z-index:1100}
 body.map-focus .map-workspace-bar{justify-content:space-between}
}

@media(min-width:801px){.map-workspace-bar{display:none}}

/* 0.20: window-based sizing for resizable iPhone, iPad and safe areas. */
:root{--af-window-height:100dvh}
.app-layout{height:var(--af-window-height);min-height:0;padding-bottom:env(safe-area-inset-bottom)}
.sidebar{height:100%;min-height:0;overflow-y:auto}
.content.map-content{max-width:none}
.topbar{flex-wrap:wrap;height:auto;min-height:64px;padding:10px 20px}
.top-actions{flex-wrap:wrap;justify-content:flex-end}
.hero-copy{max-width:45%}.hero-art{object-fit:contain}
dialog{max-height:calc(var(--af-window-height) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);max-width:calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right) - 24px)}
@media(min-width:801px) and (max-width:1100px){
 .app-layout{grid-template-columns:88px minmax(0,1fr)}
 .sidebar{padding:14px 5px}.brand{justify-content:center}.brand-text,.nav-label,.side-note,.side-user>div,.side-user>.icon{display:none}
 .nav{margin-top:24px;gap:8px}.nav button{flex-direction:column;gap:5px;text-align:center;padding:10px 3px;font-size:10px;border-radius:14px}.nav button.active:after{display:none}
 .side-user{justify-content:center}.content{padding:20px}.breadcrumb{display:none}
 .home-grid,.profile-grid{grid-template-columns:minmax(0,1fr)}
 .fleet-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:800px){
 .app-layout{padding-bottom:0}.sidebar{height:calc(72px + env(safe-area-inset-bottom));overflow:visible}
 .hero{display:grid;grid-template-columns:minmax(0,1fr);padding:24px;gap:18px;min-height:0}
 .hero-copy{max-width:100%}.hero-art{position:relative;inset:auto;width:100%;height:auto;max-height:300px;margin:0 auto}.hero-coordinate{display:none}
 .hero .fly{right:24px;bottom:24px}.hero h2{font-size:clamp(26px,6vw,39px)}
 .docs-shortcut{flex-wrap:wrap}.docs-shortcut>div{flex:1;min-width:160px}
 .map-sheet{left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right))}
 body.map-focus .app-layout{height:var(--af-window-height)}
}
@media(min-width:801px){
 .map-workspace-bar{display:flex}.map-workspace-bar #mapOptions{display:none}
 body.map-focus .app-layout{position:fixed;inset:0;z-index:900;grid-template-columns:minmax(0,1fr);height:var(--af-window-height)}
 body.map-focus .sidebar,body.map-focus .topbar,body.map-focus .company-footer{display:none!important}
 .map-point-sheet{max-width:420px;right:16px;left:auto}
 .flight-shell .wind-panel,.flight-shell .atmosphere-panel,.flight-shell .route-panel{max-width:min(380px,48%);max-height:65%;overflow:auto}
}
@media(max-height:500px){
 .main:has(.map-content) .topbar{display:none}.map-content .flight-shell{flex:1 1 0!important;min-height:0!important}
 .main:has(.map-content)>.company-footer{display:none}.map-sheet{max-height:65dvh}
}

/* Full product name stays within compact headers. */
.brand-text{overflow-wrap:break-word;}
.mobile-brand{min-width:0;white-space:normal;overflow-wrap:break-word;max-width:100%;}
.breadcrumb{min-width:0;overflow-wrap:break-word;}

/* Matching current app identity on login and workspace. */
.auth-brand img,.brand img{aspect-ratio:1;height:auto;object-fit:contain;flex-shrink:0;border-radius:12px;}
.auth-story .auth-aircraft{border-radius:24px;}
.hero-art{border-radius:24px;filter:none;}
