/* Transit Finder 1.0.8 – consistent map markers, floating sheets and mobile UI.
   Loaded last intentionally to supersede legacy prototype styles. */
#mapViewport #mapMarkers .airMark{width:auto!important;height:44px!important;min-height:44px!important;max-width:180px!important;display:flex!important;align-items:center!important;gap:5px!important;transform:translate(-18px,-22px)!important;padding:5px!important;overflow:visible!important;background:none!important;box-shadow:none!important}
#mapViewport #mapMarkers .airMark>svg,#mapViewport #mapMarkers .airMark>img,#mapViewport #mapMarkers .airMark>.tf18MapGlyph,#mapViewport #mapMarkers .tf18MapGlyph>svg{display:block!important;width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;max-width:34px!important;max-height:34px!important;flex:0 0 34px!important;object-fit:contain!important;overflow:visible!important;position:relative!important;inset:auto!important}
#mapViewport #mapMarkers .airMark .planeText{width:auto!important;max-width:116px!important;font-size:12px!important;white-space:nowrap!important;text-overflow:ellipsis!important;overflow:hidden!important;border-radius:7px!important;box-shadow:0 3px 10px #0008!important}
#mapViewport #mapMarkers .airMark .planeText small{font-size:12px!important}
#mapViewport #mapMarkers .observer{width:23px!important;height:23px!important;z-index:10!important;cursor:default;pointer-events:auto!important}
body.tf18PinMoving #mapViewport #mapMarkers .observer{cursor:grab!important;touch-action:none!important;outline:2px solid #9fedac;outline-offset:6px;box-shadow:0 0 0 9px #39d28f55,0 0 0 24px #39d28f16!important}
body.tf18PinMoving #mapViewport #mapMarkers .observer:active{cursor:grabbing!important}
#tf18PinControls{position:absolute;bottom:max(20px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);z-index:70;width:min(470px,calc(100vw - 24px));padding:14px 18px;background:#122335f5;border:1px solid #73c2b8;border-radius:17px;box-shadow:0 20px 60px #000c;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center}
#tf18PinControls[hidden],#tf18Search[hidden]{display:none!important}
#tf18PinControls span{font-size:13px;color:#c4dae9;font-variant-numeric:tabular-nums}
#tf18PinControls>div{display:flex;gap:8px;width:100%}
#tf18PinControls button{height:48px;min-width:44px;flex:1;border-radius:10px;border:1px solid #6380a1;background:#24374a;color:white;font-size:14px}
#tf18PinConfirm{background:#18699f!important;border-color:#57b7f4!important;font-weight:700}
#tf18DragPin{display:block;width:calc(100% - 28px);margin:12px 14px 16px;min-height:48px!important}
/* Fix double-filtered night map, opaque overlay and unreadable markers. */
body.tf15-night .map-vignette{background:transparent!important;background-color:transparent!important}
body.tf15-night #mapTiles,body.tf15-night #terrainFallback{filter:grayscale(1) brightness(.48) sepia(1) saturate(4) hue-rotate(315deg)!important}
body.tf15-night #mapTiles img,body.tf15-night #mapViewport .maptile{filter:none!important}
body.tf15-night #mapMarkers .airMark{filter:none!important}
body.tf15-night #mapMarkers .airMark svg{filter:none!important}
body.tf15-night #mapMarkers .airMark svg path{fill:#ff3737!important;stroke:#4d1010!important}
body.tf15-night #mapMarkers .observer{background:#ff3333!important;filter:none!important}
body.tf15-night #r10MobileNav{background:#150505ee!important}
/* Desktop: a compact, styled floating aircraft card. No fixed/footer overlay. */
#aircraftPanel:not([hidden]){width:min(510px,calc(100vw - 28px))!important;max-width:min(510px,calc(100vw - 28px))!important;max-height:calc(100dvh - 105px)!important;height:auto!important;top:90px!important;right:15px!important;left:auto!important;bottom:auto!important;overflow-y:auto!important;overflow-x:hidden!important;padding:0 14px 14px!important;border-radius:18px!important;border:1px solid #719cb6!important;background:#2d3e50f5!important;box-shadow:0 14px 55px #0009!important;gap:6px!important;display:flex!important;flex-direction:column!important;overscroll-behavior:contain!important}
#aircraftPanel>.panelHeading{order:0!important;position:relative!important;padding:18px 104px 4px 12px!important;display:block!important;background:transparent!important;min-height:74px!important}
#aircraftPanel>.panelHeading>div{display:block!important}
#aircraftPanel #aircraftTitle{font-size:clamp(21px,3.1vw,28px)!important;line-height:1.15!important;overflow-wrap:anywhere!important}
#aircraftPanel #aircraftName,#aircraftPanel #aircraftSource{display:block!important;font-size:12px!important;line-height:1.3!important;overflow-wrap:anywhere!important;white-space:normal!important}
#aircraftPanel>.panelHeading .closePanel{top:7px!important;right:6px!important;min-width:44px!important;min-height:44px!important;color:#effaff!important;background:transparent!important}
#aircraftPanel #tfHero{order:6!important;margin:2px 0!important;overflow:visible!important;flex:0 0 auto!important}
#aircraftPanel #tfHeroStage{width:100%!important;min-height:140px!important;height:auto!important;max-height:none!important;aspect-ratio:16 / 9!important;overflow:hidden!important}
#aircraftPanel #tfHeroIdentity{padding:6px 3px!important;gap:4px!important}
#aircraftPanel #tfHeroCallsign{font-size:20px!important}
#aircraftPanel #tfHeroTypeLine,#aircraftPanel #tfHeroRoute{font-size:13px!important}
#aircraftPanel #tfDataGrid{order:7!important;display:none!important;max-height:none!important;overflow:visible!important;grid-template-columns:auto minmax(0,1fr)!important;padding:12px!important;margin:0!important;background:#11203299;border-radius:12px}
#aircraftPanel.tf18Expanded #tfDataGrid{display:grid!important}
#aircraftPanel .transitArea{order:3!important;display:grid!important;grid-template-columns:minmax(0,49%) minmax(0,51%)!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;min-height:206px!important;max-height:none!important;overflow:visible!important;container-type:normal!important;margin:0!important;padding:8px!important;gap:8px!important}
#aircraftPanel #astrodisc,#aircraftPanel .astrodisc{width:min(100%,210px)!important;height:auto!important;max-width:210px!important;max-height:none!important;min-width:0!important;min-height:0!important;aspect-ratio:1!important;overflow:hidden!important;flex:0 0 auto!important;align-self:center!important;justify-self:center!important}
#aircraftPanel #transitCanvas{width:100%!important;height:100%!important;aspect-ratio:1!important;display:block!important}
#aircraftPanel .transitStats{display:flex!important;flex-direction:column!important;gap:7px!important;max-height:none!important;overflow:visible!important;padding:6px!important;min-height:0!important}
#aircraftPanel #transitETA{font-size:clamp(19px,3vw,28px)!important;white-space:normal!important}
#aircraftPanel #transitDesc{font-size:12px!important;max-height:none!important;overflow:visible!important}
#aircraftPanel #r12Footer,#r12Footer{order:10!important;position:static!important;inset:auto!important;margin:10px 2px 0!important;transform:none!important;z-index:1!important;box-shadow:none!important;display:flex!important;flex-wrap:wrap!important;gap:8px!important;padding:9px 0 0!important;border-top:1px solid #687c90!important;background:transparent!important;flex:0 0 auto!important}
#aircraftPanel #r12Footer button{min-height:44px!important;flex:1 1 80px!important;font-size:12px!important}
#aircraftPanel #r12Extra{order:8!important;max-height:none!important;overflow:visible!important}
#aircraftPanel #tf18ExpandSheet,#aircraftPanel #tf18HeroToggle{position:absolute;right:56px;top:10px;min-width:44px;min-height:44px;padding:6px 9px;font-size:12px;border-radius:9px;background:#182b3e;color:white;border:1px solid #698398}
#aircraftPanel #tf18HeroToggle{position:static!important;display:block!important;order:5!important;align-self:flex-end!important;min-height:40px!important;margin-right:10px!important}
#aircraftPanel #tfHero{display:none!important}
#aircraftPanel.tf18ShowHero #tfHero{display:flex!important}
#aircraftPanel #r11Hero{order:2!important;display:flex!important;flex-wrap:wrap!important;min-height:0!important;max-height:none!important;overflow:visible!important;padding:4px 8px!important;gap:5px!important}
#aircraftPanel .stats3{order:1!important;display:grid!important;max-height:none!important;overflow:visible!important;flex:0 0 auto!important}
#aircraftPanel #r11Kinematics{order:11!important;display:none!important}
#aircraftPanel.tf18Expanded #r11Kinematics{display:block!important;max-height:none!important;overflow:visible!important}
#aircraftPanel #modelStatusLine,#aircraftPanel #transitActions,#aircraftPanel #r13QuickActions{display:none!important}
#aircraftPanel #transitVisualCaption,#aircraftPanel .minor,#aircraftPanel figcaption{font-size:12px!important;white-space:normal!important;overflow:visible!important}
#aircraftPanel button,.rightDrawer button,.leftDrawer button{min-height:44px}
#aircraftPanel small,#aircraftPanel span,#aircraftPanel strong,#aircraftPanel figcaption,.panelFoot,.routeRow small,#mapAttribution{font-size:max(12px,1em)}
/* Side panels use the same surface as cards. */
#routesPanel,#profilePanel,#settingsPanel,#locationPanel,#feedPanel,#r11AircraftList{background:#202b38f2!important;border:1px solid #74899b!important;border-radius:18px!important;box-shadow:0 15px 55px #000a!important}
#routesPanel .panelHeading,#profilePanel .panelHeading,#settingsPanel .panelHeading,#locationPanel .panelHeading,#feedPanel .panelHeading,#r11AircraftList .panelHeading{background:transparent!important}
#routesPanel .tabs button,#routesPanel .routeRow,.tf18SearchRow{font-size:13px!important;min-height:44px!important}
#routesPanel .tf18ExampleRoute{display:none!important}
#routesPanel.tf18TrainingVisible .tf18ExampleRoute{display:flex!important}
.tf18Samples{display:block;margin:6px 18px 0;font-size:12px;color:#c6dbe7}
.tf18Samples input{width:18px;height:18px;vertical-align:middle}
#tf18FeedHealth{padding:13px 15px;margin:10px 12px;background:#102536;border:1px solid #4f788e;border-radius:12px;font-size:12px}
#tf18FeedHealth>strong{font-size:13px;color:#91c8eb}
.tf18HealthRow{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid #3d576c;font-size:12px}
.tf18HealthRow b{text-align:right;font-size:12px}
#tf18FeedHealth p{font-size:12px;line-height:1.4;color:#b8cbdc}
#tf18Search{position:absolute;z-index:46;top:92px;left:50%;transform:translateX(-50%);width:min(560px,calc(100vw - 24px));max-height:min(60dvh,560px);overflow:auto;background:#26323ff5;border:1px solid #738ea3;border-radius:17px;box-shadow:0 15px 50px #000a;padding:14px;color:#fff}
.tf18SearchHead{display:flex;align-items:center;justify-content:space-between;padding:0 2px 12px}
.tf18SearchHead strong{font-size:19px}
#tf18SearchClose{height:44px;width:44px;border:0;background:transparent;color:#fff;font-size:26px}
#tf18SearchInput{width:100%;height:50px;border:1px solid #8495a9;border-radius:12px;padding:12px;background:#1e2935;color:#fff;font-size:16px}
#tf18SearchResults{max-height:36dvh;overflow:auto;margin-top:10px}
.tf18SearchRow{display:block;width:100%;text-align:left;min-height:44px;margin:2px 0;padding:9px;background:#142635;border:1px solid #405c73;border-radius:8px;color:#e8f5ff;font-size:13px}
/* New iPhone/Android navigation replaces the legacy four-button bar. */
#r10MobileNav.tf18Nav{display:none}
@media (max-width:760px){
 .topbar{display:none!important}
 #app,#workarea{height:100dvh!important;min-height:100dvh!important}
 #mapScreen,#mapViewport{inset:0!important}
 #r10MobileNav.tf18Nav{display:flex!important;position:fixed!important;left:12px!important;right:12px!important;top:calc(max(12px,env(safe-area-inset-top)) + 7px)!important;bottom:auto!important;width:auto!important;height:58px!important;max-height:58px!important;z-index:110!important;gap:2px!important;align-items:center!important;justify-content:space-around!important;padding:5px 7px!important;background:#24272bee!important;border:1px solid #5a626c!important;border-radius:17px!important;box-shadow:0 7px 20px #0009!important;overflow:visible!important}
 #r10MobileNav.tf18Nav button{border:0!important;background:transparent!important;color:#edf4fc!important;border-radius:10px!important;height:46px!important;min-width:40px!important;min-height:44px!important;padding:3px 6px!important;font-size:13px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:3px!important;flex:1 1 auto!important;white-space:nowrap!important}
 #r10MobileNav.tf18Nav [data-tf18-open=locationBtn]{background:#29564288!important;color:#8fe6b5!important}
 #r10MobileNav.tf18Nav button span{font-size:17px!important}
 #r10MobileNav.tf18Nav #tf18SearchOpen{font-size:23px!important;flex:0 0 35px!important}
 .map-label{top:calc(79px + env(safe-area-inset-top))!important;left:18px!important;pointer-events:none!important}
 .mapTools{bottom:calc(25px + env(safe-area-inset-bottom))!important}
 #aircraftPanel:not([hidden]){position:absolute!important;inset:auto 12px auto 12px!important;top:calc(88px + env(safe-area-inset-top))!important;bottom:auto!important;left:12px!important;right:12px!important;width:calc(100% - 24px)!important;max-width:none!important;max-height:calc(100dvh - 108px - env(safe-area-inset-top))!important;height:auto!important;overflow-y:auto!important;border-radius:18px!important;padding:4px 12px 12px!important;z-index:65!important;background:#304151f7!important}
 #aircraftPanel>.panelHeading{order:0!important;min-height:0!important;padding:10px 52px 6px 6px!important}
 #aircraftPanel>.panelHeading>div{display:block!important}
 #aircraftPanel #aircraftTitle{font-size:25px!important}
 #aircraftPanel #tfHero{display:none!important}
 #aircraftPanel .transitArea{order:3!important;min-height:190px!important;max-height:none!important;flex:0 0 auto!important;display:grid!important;grid-template-columns:47% 53%!important;overflow:visible!important;padding:6px 0!important}
 #aircraftPanel #astrodisc,#aircraftPanel .astrodisc{width:min(100%,188px)!important;height:auto!important;max-height:none!important;aspect-ratio:1!important}
 #aircraftPanel .transitStats{gap:6px!important;overflow:visible!important}
 #aircraftPanel .stats3{order:1!important;margin:0!important;padding:6px 0!important}
 #aircraftPanel #r11Hero{order:2!important;max-height:none!important;display:flex!important;overflow:visible!important;min-height:0!important;padding:5px!important}
 #aircraftPanel #r12Footer{position:static!important;order:10!important;display:flex!important;flex-wrap:wrap!important;margin-top:6px!important;z-index:0!important}
 #aircraftPanel #r12Extra,#aircraftPanel #tfDataGrid{display:none!important}
 #aircraftPanel.tf18Expanded #r12Extra,#aircraftPanel.tf18Expanded #tfDataGrid{display:grid!important;max-height:none!important;overflow:visible!important}
 #aircraftPanel #transitPlayback{display:none!important}
 #aircraftPanel #tf18HeroToggle{order:5!important}
 #aircraftPanel #tf18ExpandSheet{right:49px!important;top:6px!important;min-width:44px!important;min-height:44px!important;font-size:12px!important}
 .leftDrawer:not([hidden]),.rightDrawer:not([hidden]){position:absolute!important;inset:auto 10px auto 10px!important;top:calc(88px + env(safe-area-inset-top))!important;bottom:auto!important;max-height:calc(100dvh - 106px - env(safe-area-inset-top))!important;height:auto!important;width:calc(100% - 20px)!important;max-width:none!important;overflow-y:auto!important;border-radius:18px!important;z-index:64!important}
 #tf18Search{top:calc(88px + env(safe-area-inset-top))!important}
 #autoTransitTab:not([hidden]){bottom:16px!important;left:10px!important;right:10px!important;max-width:calc(100vw - 20px)!important;max-height:24dvh!important;z-index:20!important}
 body:has(#aircraftPanel:not([hidden])) #autoTransitTab{display:none!important}
 .bottomBar{display:none!important}
 #mapAttribution{font-size:12px!important;z-index:8!important}
}
@media (max-width:760px) and (orientation:landscape), (max-height:500px) and (orientation:landscape){
 #r10MobileNav.tf18Nav{height:50px!important;max-height:50px!important;top:max(4px,env(safe-area-inset-top))!important}
 #aircraftPanel:not([hidden]){position:absolute!important;left:auto!important;right:8px!important;top:calc(59px + env(safe-area-inset-top))!important;bottom:8px!important;inset:auto 8px 8px auto!important;width:min(490px,58vw)!important;max-width:min(490px,58vw)!important;max-height:calc(100dvh - 67px - env(safe-area-inset-top))!important;height:auto!important;overflow-y:auto!important;padding:8px!important}
 #aircraftPanel>.panelHeading{padding:3px 54px 2px 4px!important}
 #aircraftPanel #aircraftTitle{font-size:19px!important}
 #aircraftPanel .transitArea{min-height:150px!important;max-height:none!important;flex:0 0 auto!important;grid-template-columns:42% 58%!important}
 #aircraftPanel #astrodisc,#aircraftPanel .astrodisc{width:min(100%,38dvh,160px)!important;max-height:none!important}
 #aircraftPanel #r12Footer{order:20!important;position:static!important;margin-top:6px!important}
 .leftDrawer:not([hidden]),.rightDrawer:not([hidden]){top:calc(59px + env(safe-area-inset-top))!important;right:8px!important;left:auto!important;bottom:8px!important;width:min(490px,58vw)!important;max-width:min(490px,58vw)!important;max-height:calc(100dvh - 67px)!important}
 #autoTransitTab:not([hidden]){left:8px!important;right:auto!important;bottom:8px!important;max-width:min(300px,38vw)!important}
 #tf18Search{top:calc(60px + env(safe-area-inset-top))!important}
}
/* Override inherited rules that hide the mobile nav whenever a card is open. */
@media(max-width:760px){
 body:has(#aircraftPanel:not([hidden])) #r10MobileNav.tf18Nav,
 body:has(#locationPanel:not([hidden])) #r10MobileNav.tf18Nav,
 body:has(#routesPanel:not([hidden])) #r10MobileNav.tf18Nav,
 body:has(#settingsPanel:not([hidden])) #r10MobileNav.tf18Nav,
 body:has(#profilePanel:not([hidden])) #r10MobileNav.tf18Nav{display:flex!important}
 body:has(#authModal:not([hidden])) #r10MobileNav.tf18Nav{display:none!important}
}
@media(max-height:500px) and (orientation:landscape){
 #aircraftPanel>.stats3,#aircraftPanel #r11Hero{display:none!important}
 #aircraftPanel .transitArea{order:2!important;min-height:140px!important}
 #aircraftPanel #tf18HeroToggle{order:3!important}
 #aircraftPanel #r12Footer{order:5!important}
}
@media(max-height:500px) and (orientation:landscape){
 .topbar{display:none!important}
 #app,#workarea{height:100dvh!important;min-height:100dvh!important}
 #mapScreen,#mapViewport{inset:0!important}
 #r10MobileNav.tf18Nav,
 body:has(#aircraftPanel:not([hidden])) #r10MobileNav.tf18Nav,
 body:has(#settingsPanel:not([hidden])) #r10MobileNav.tf18Nav,
 body:has(#locationPanel:not([hidden])) #r10MobileNav.tf18Nav{display:flex!important;position:fixed!important;left:12px!important;right:12px!important;top:max(4px,env(safe-area-inset-top))!important;bottom:auto!important;height:50px!important;width:auto!important;min-height:50px!important;z-index:110!important;background:#24272bee!important;border:1px solid #5a626c!important;border-radius:14px!important;align-items:center!important;justify-content:space-around!important;padding:2px 8px!important;gap:3px!important}
 #r10MobileNav.tf18Nav button{min-width:40px!important;min-height:44px!important;padding:2px 8px!important;border:0!important;background:transparent!important;color:#fff!important;display:flex!important;gap:4px!important;align-items:center!important;justify-content:center!important;font-size:13px!important}
 body:has(#authModal:not([hidden])) #r10MobileNav.tf18Nav{display:none!important}
}
/* The older #app universal night rule has ID specificity; explicitly beat it. */
body.tf15-night #app .map-vignette{background:transparent!important;background-color:transparent!important;background-image:none!important}

#tf18DesktopSearch{min-width:90px;min-height:44px!important;font-size:13px!important}
@media(max-width:760px),(max-height:500px) and (orientation:landscape){#tf18DesktopSearch{display:none!important}}
