/* v1.0.15: compact, usable aircraft and account sheets on narrow iPhones */
#mapScreen>#aircraftPanel:not([hidden]),#mapScreen>#profilePanel:not([hidden]),#mapScreen>#settingsPanel:not([hidden]){overflow-y:auto!important;overscroll-behavior:contain!important;scrollbar-gutter:stable;z-index:90!important}
#mapScreen>#aircraftPanel>.panelHeading,#mapScreen>#profilePanel>.panelHeading{position:sticky;top:0;z-index:4;background:#0b1d30f5;backdrop-filter:blur(8px);border-bottom:1px solid #37526b}
#tfHero{order:0;margin:7px 10px 12px!important;max-height:300px!important;overflow:hidden}
#tfHeroCanvas{width:100%;height:auto;max-height:280px;object-fit:contain}
#profilePanel .r11AvatarField input[type=file]{width:100%!important;min-width:0!important;max-width:100%!important;text-overflow:clip!important;overflow-wrap:anywhere}
#profilePanel .r11AvatarField{display:grid!important;min-width:0!important;overflow-wrap:anywhere}
#profilePanel .r11AvatarField label{display:grid;gap:8px;min-width:0;overflow-wrap:anywhere}
#profilePanel .notice,#profilePanel .muted{line-height:1.5;overflow-wrap:anywhere}
#profilePanel .profileExtras{display:grid;gap:9px}
#profilePanel .profileEntry button{white-space:normal;min-width:0;overflow-wrap:anywhere}
#tf114GroupInvites label{display:grid;gap:6px;font-size:12px}
#tf114GroupInvites input,#tf114GroupInvites button{min-height:42px;max-width:100%;}
.tf114Invite{padding:10px;display:flex;gap:6px;align-items:center;flex-wrap:wrap;background:#0c263d;border-radius:8px;margin:8px 0}
.tf114Invite button{width:auto!important;flex:none!important}
.tf114AvatarReview{display:flex;align-items:center;flex-wrap:wrap;gap:8px;background:#0c2134;border:1px solid #4b7797;padding:10px;border-radius:10px}
.tf114AvatarReview img{width:80px;height:80px;border-radius:50%;object-fit:cover;flex:0 0 80px}
.tf114AvatarReview button{min-height:42px;width:auto;flex:1}
#locationChoices .tf114Rename{min-width:68px!important;max-width:86px!important;flex:0 0 76px!important;font-size:11px}
.tf114Planner{padding:12px;margin:8px 10px 12px;border:1px solid #477492;background:#092337f0;border-radius:10px;color:#e3f3ff;display:grid;gap:8px}
.tf114PlannerTop{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.tf114PlannerTop strong{font-size:13px}.tf114PlannerTop span{font-size:11px;color:#aacadd}
#tf114PlannerStatus{margin:0;font-size:11px;line-height:1.4}
#tf114PlannerBody{display:grid;gap:7px}.tf114PlannerRow{display:grid;gap:5px;border-left:3px solid #ffd25b;padding:6px 9px;background:#102c43;border-radius:4px;font-size:11px;line-height:1.45}
.tf114PlannerRow.moon{border-left-color:#82dfff}.tf114PlannerRow strong{font-size:12px}.tf114PlannerRow a{color:#8fdaff;font-weight:650;display:inline-block;padding:5px 0;text-decoration:underline}
.tf114PlannerCaveat{margin:0;font-size:10px;line-height:1.5;color:#b7c7da}
#tf114PlannerBody:empty{display:none}
.tf114Audio{display:grid!important;gap:10px}.tf114Audio select{max-width:100px;background:#102338;color:#fff;border:1px solid #56708a;border-radius:8px;padding:8px}.tf114Audio label{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
#mapPaths [data-capture-line]{pointer-events:none}
/* Do not show blank centerline placeholders when no crossing value is computed. */
#r11Hero[hidden],#r11Kinematics[hidden]{display:none!important}
#mapScreen>.map-label:not([hidden]){pointer-events:none}
@media(max-width:760px){
 #r10MobileNav.tf18Nav{top:calc(72px + env(safe-area-inset-top,0px))!important;bottom:auto!important;min-height:53px!important;max-height:60px!important;z-index:125!important}
 #mapScreen>.bottomBar{top:calc(134px + env(safe-area-inset-top,0px))!important;bottom:auto!important;left:7px!important;right:7px!important;max-width:calc(100% - 14px)!important;z-index:56!important;pointer-events:auto!important;}
 #mapScreen>.bottomBar .mapSwitch{max-width:100%;overflow:auto!important}
 #mapScreen>.mapTools{top:calc(192px + env(safe-area-inset-top,0px))!important;bottom:auto!important;left:8px!important;right:auto!important;z-index:45!important}
 #mapScreen>.map-label{display:none!important}
 #mapScreen>#profilePanel:not([hidden]),#mapScreen>#aircraftPanel:not([hidden]),#mapScreen>#settingsPanel:not([hidden]),#mapScreen>#locationPanel:not([hidden]),#mapScreen>#routesPanel:not([hidden]),#mapScreen>#feedPanel:not([hidden]){
 position:fixed!important;top:calc(138px + env(safe-area-inset-top,0px))!important;bottom:calc(8px + env(safe-area-inset-bottom,0px))!important;left:7px!important;right:7px!important;width:auto!important;max-width:none!important;min-width:0!important;max-height:none!important;height:auto!important;overflow-y:auto!important;border-radius:13px!important;z-index:100!important;}
 #mapScreen>#aircraftPanel .panelHeading,#mapScreen>#profilePanel .panelHeading{padding:12px 14px!important;min-height:71px!important}
 #mapScreen>#aircraftPanel #tfHero{max-height:245px!important;order:initial!important}
 #mapScreen>#aircraftPanel #tfHeroCanvas{max-height:240px!important}
 #mapScreen>#aircraftPanel #transitPlayback{flex-wrap:wrap!important}
 #mapScreen>#profilePanel .panelHeading h2{font-size:21px!important}
 #mapScreen>.bottomBar:has(~ #profilePanel:not([hidden])){display:none!important}
 #mapScreen>#tf110Rail:not([hidden]){z-index:38!important}
 #mapScreen #tf114Planner{margin:8px!important}
 #mapViewport{touch-action:pan-x pan-y!important}
}
@media(min-width:761px){#autoTransitTab{left:52px!important;bottom:12px!important}}
#mapScreen>.bottomBar .statusMini{overflow:visible!important;white-space:normal!important;max-width:240px!important;font-size:9px!important;line-height:1.3}
@media(max-width:760px){#mapScreen>.bottomBar .statusMini{display:none!important}}

/* Profile and photo actions remain legible in the mobile safe area. */
@media(max-width:760px){
 #toast{top:auto!important;bottom:calc(16px + env(safe-area-inset-bottom,0px))!important;max-width:calc(100vw - 24px)!important;pointer-events:none!important}
 #mapScreen>#aircraftPanel #tfHero{max-height:178px!important}
 #mapScreen>#aircraftPanel #tfHeroCanvas{max-height:175px!important}
 #mapScreen>#profilePanel .profileExtras{margin-top:8px!important}
 #mapScreen>#profilePanel .r11AvatarField input[type=file]{font-size:14px!important}
}

/* v1.0.35: distinct degraded-terrain planner status */
.tfTerrainDegradedBadge[hidden]{display:none!important}
.tfTerrainDegradedBadge{display:inline-block;padding:3px 7px;border:1px solid #e3a34c;border-radius:5px;background:#46351a;color:#ffd997;font-weight:700;}

/* v1.0.39: keep the selected-aircraft type and countdown clear of the mobile bar. */
@media(max-width:760px){#mapScreen>#aircraftPanel:not([hidden]){top:auto!important;bottom:calc(4px + env(safe-area-inset-bottom))!important;max-height:min(70dvh,calc(100dvh - 82px - env(safe-area-inset-top) - env(safe-area-inset-bottom)))!important;overflow-y:auto!important}#mapScreen>#aircraftPanel .panelHeading{position:sticky!important;top:0!important;z-index:6!important;min-height:76px!important;padding-top:14px!important;background:#0b1d30!important}#mapScreen>#aircraftPanel #aircraftTitle{white-space:normal!important;overflow-wrap:anywhere!important}}
