/* Transit Finder v1.0.17 — mobile-first field workspace. Original APIs remain.
   Our own gold + blue identity; no third-party UI assets. */
:root{--tf117-gold:#ffd25b;--tf117-blue:#82dfff;--tf117-ink:#0b121c;--tf117-edge:#42546a}
#tf117Shell[hidden],#tf117Dropdown[hidden],#tf117Expanded[hidden],#tf117More[hidden],#tf117Loading[hidden]{display:none!important}
body:has(#tf117Shell:not([hidden])) .topbar{display:none!important}
body:has(#tf117Shell:not([hidden])) #workarea{height:100dvh!important;min-height:100dvh!important}
body:has(#tf117Shell:not([hidden])) #mapScreen{height:100dvh!important;min-height:100dvh!important;position:relative!important}
body:has(#tf117Shell:not([hidden])) #r10MobileNav,body:has(#tf117Shell:not([hidden])) #mapScreen>.bottomBar,body:has(#tf117Shell:not([hidden])) #tf110Rail,body:has(#tf117Shell:not([hidden])) #autoTransitTab,body:has(#tf117Shell:not([hidden])) #mapScreen>.map-label{display:none!important}
#tf117Shell{position:absolute;inset:0;z-index:104;pointer-events:none;font-family:Inter,'Segoe UI',system-ui,sans-serif;color:#f1f5fb}
#tf117Shell>*{pointer-events:auto}
#tf117Bar{position:absolute;left:50%;top:calc(env(safe-area-inset-top,0px) + 14px);transform:translateX(-50%);display:flex;align-items:center;justify-content:space-between;gap:2px;padding:5px 6px;width:min(720px,calc(100% - 20px));min-height:58px;border:1px solid #51617790;border-radius:19px;background:#131a24f2;backdrop-filter:blur(14px);box-shadow:0 9px 26px #0007;z-index:120}
#tf117Bar button{display:flex;align-items:center;justify-content:center;gap:6px;min-width:46px;min-height:46px;border:0;border-radius:12px;background:transparent;color:#e0e8f4;padding:7px 11px;font-size:14px;font-weight:650;cursor:pointer;white-space:nowrap;touch-action:manipulation}
#tf117Bar button:hover,#tf117Bar button.active{background:#293749;color:#ffffff}
#tf117Bar button.live{background:#19463785;outline:1px solid #46b589;color:#92ecc1}
#tf117Bar svg{width:19px;height:19px;fill:currentColor;stroke:currentColor}
#tf117Settings svg{fill:none;stroke-width:2.2}
#tf117Feed{color:#9ed3f7!important}#tf117Feed span{font-size:23px;line-height:1}#tf117PlaneN{font-variant-numeric:tabular-nums}
#tf117Friends small{align-self:flex-start;font-size:11px;color:#8dccff;min-width:8px}
#tf117Avatar{display:grid;place-items:center}
.tf117AvatarImage{position:relative;display:grid;place-items:center;flex:none;background:#365777;color:#fff;font-size:12px;font-weight:800;overflow:hidden;border-radius:50%;border:1px solid #8ba8c3}
.tf117AvatarImage img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:inherit}
#tf117Dropdown{position:absolute;top:calc(env(safe-area-inset-top,0px) + 80px);left:50%;transform:translateX(-50%);z-index:121;max-height:min(74dvh,600px);overflow:auto;overscroll-behavior:contain;width:min(480px,calc(100% - 20px));border-radius:18px;border:1px solid #4f6073;background:#20252cf5;backdrop-filter:blur(15px);box-shadow:0 17px 55px #000b;padding:12px}
#tf117DropdownHead{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #435063;margin-bottom:8px;padding:4px 2px 12px}
#tf117DropdownHead strong{font-size:16px}#tf117MenuClose{font-size:24px!important;border:0!important;background:transparent!important;color:white!important;min-height:44px!important;min-width:44px!important}
#tf117MenuContent{display:grid;gap:6px;max-height:calc(74dvh - 85px);overflow:auto}
#tf117MenuContent button{min-height:44px;border-radius:11px;border:1px solid #516273;background:#2b3440;color:#eff6ff;text-align:left;padding:10px 13px;cursor:pointer}
#tf117MenuContent button:focus-visible,#tf117Shell button:focus-visible{outline:3px solid #82dfff;outline-offset:1px}
#tf117MenuContent input{background:#141d29;color:#f1f8ff;border:1px solid #59697d;border-radius:8px;padding:13px;min-height:44px;width:100%}
.tf117Sub{font-size:12px;color:#b9c9d6;line-height:1.5;margin:4px 0 8px}.tf117Primary{background:#164268!important;border-color:#5689af!important}.tf117Result{text-align:left}.tf117FeedLine{padding:9px 7px;font-size:13px;margin:0;border-bottom:1px solid #36424f}
.tf117FriendHead{display:flex;align-items:center;gap:12px;font-size:17px;padding:9px 4px}.tf117Safety{font-size:12px;line-height:1.5;border:1px solid #6c5e45;border-radius:12px;padding:12px;background:#352e25}
.tf117Segment{display:grid;gap:5px;font-size:12px;color:#c6d0de}.tf117Segments{display:flex;gap:4px}.tf117Segments button{flex:1;text-align:center!important;padding:6px!important;font-size:12px;min-height:44px}.tf117Segments button.selected{background:#275f9b!important;color:#fff!important;border-color:#8cc8fa!important}
.tf117Switch{display:flex;gap:11px;align-items:center;padding:9px 5px;min-height:44px;font-size:13px}.tf117Switch input{width:19px!important;height:19px!important;min-height:0!important}
#tf117Alerts{position:absolute;top:calc(env(safe-area-inset-top,0px) + 81px);left:50%;transform:translateX(-50%);width:min(720px,calc(100% - 20px));display:grid;gap:7px;pointer-events:none;z-index:118}
#tf117Alerts>*{pointer-events:auto}
.tf117Compact{display:grid;grid-template-columns:58px minmax(0,1fr) auto;align-items:center;gap:12px;width:100%;min-height:76px;padding:9px 13px;border:2px solid #bb9644;border-radius:15px;background:#27262beD;backdrop-filter:blur(12px);box-shadow:0 4px 18px #0008;text-align:left;color:#fff;cursor:pointer}
.tf117Compact.moon{border-color:#7fbfe3;background:#242b37ec}
.tf117Compact:hover{background:#35343bf2}.tf117Compact strong{font-size:16px;font-weight:780;color:#ffdfa3}.tf117Compact.moon strong{color:#c0dbff}
.tf117Disc{display:grid;place-items:center;width:52px;height:52px;border-radius:50%;position:relative;background:radial-gradient(circle at 34% 30%,#fff8d0,#ffcf6b 60%,#b9651d 100%);box-shadow:0 0 9px #d69e3b70;overflow:hidden}
.tf117Disc.moon{background:#a7b5c0 url('/assets/moon-full.webp') center/cover;box-shadow:0 0 8px #9acbff65}
.tf117MiniShape{width:28px;height:28px;display:grid;place-items:center;transform:rotate(-25deg)}.tf117MiniShape img{max-width:100%;max-height:100%;filter:brightness(0)}
.tf117AlertInfo{display:grid;gap:3px;min-width:0}.tf117AlertInfo small{font-size:12px;color:#c7c7d2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tf117AlertRight{display:grid;gap:4px;text-align:right;min-width:94px}.tf117Clock{font-size:23px;line-height:1.12;font-variant-numeric:tabular-nums;white-space:nowrap}.tf117AlertRight small{font-size:12px;color:#ffdb90;white-space:nowrap}
.tf117Compact.moon .tf117AlertRight small{color:#c7e6ff}
.tf117NoCandidates{display:none} .tf117MoreToggle{min-height:43px;justify-self:start;background:#131a24eb;border:1px solid #668099;border-radius:24px;padding:8px 16px;color:#e9f5ff;font-weight:700}
#tf117More{position:absolute;top:calc(env(safe-area-inset-top,0px) + 260px);left:50%;transform:translateX(-50%);width:min(440px,calc(100% - 30px));max-height:48dvh;overflow:auto;z-index:119;padding:7px;background:#171f2bf2;border-radius:14px;border:1px solid #4c647e;display:grid;gap:6px}
#tf117More button{min-height:44px;border:1px solid #38536c;background:#243748;color:#fff;text-align:left;border-radius:8px;padding:9px}
#tf117Expanded{position:absolute;top:calc(env(safe-area-inset-top,0px) + 81px);left:50%;transform:translateX(-50%);width:min(600px,calc(100% - 22px));max-height:calc(88dvh - env(safe-area-inset-top,0px));overflow:auto;overscroll-behavior:contain;border:2px solid #d5a447;background:#28262cef;border-radius:18px;box-shadow:0 17px 50px #000c;z-index:117;padding:15px}
.tf117ExpandedHead{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.tf117Identity{display:grid;gap:4px;min-width:0}.tf117Identity strong{font-size:24px;color:#f5d887}.tf117Identity span{font-size:13px;color:#d0cbd3}.tf117Identity small{font-size:12px;color:#bdbac2}
.tf117ExpandedRight{display:grid;text-align:right;gap:5px;flex:none}.tf117BigClock{font-size:29px;white-space:nowrap;font-variant-numeric:tabular-nums}.tf117ExpandedRight small{font-size:12px;color:#e0c382}
.tf117ExpandedBody{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:14px;margin:13px 0}
.tf117LargeDisc{display:grid;gap:9px;place-items:center;min-width:0}.tf117RealDisc{position:relative;aspect-ratio:1;width:min(100%,240px);border-radius:50%;background:radial-gradient(circle at 38% 28%,#ffe6a8 6%,#ffc458 52%,#e38224 82%,#99501f 100%);box-shadow:inset 0 0 20px #f6d18080,0 0 7px #e4b24d50;overflow:hidden}
.tf117LargeDisc.sun .tf117RealDisc{background:#e6ad45 url('/assets/sun-full.jpg') center/cover}
.tf117LargeDisc.moon .tf117RealDisc{background:#d1d6d9 url('/assets/moon-full.webp') center/cover}
.tf117AircraftSilhouette{position:absolute;top:50%;left:50%;max-width:74%;max-height:74%;filter:brightness(0);transform-origin:center;translate:-50% -50%}
.tf117DiscNote{font-size:11px;color:#cdd4dc;text-align:center}
.tf117ExpandedDetails{display:grid;gap:9px;font-size:12px}.tf117ExpandedDetails strong{font-size:16px}.tf117ExpandedDetails small{color:#ced5df;line-height:1.4}
.tf117Actions{display:flex;gap:6px}.tf117Actions button{flex:1;border-radius:10px;min-height:44px;border:1px solid #4b779c;color:#fff;background:#243b50}
.tf117RouteBox{min-height:44px!important;background:#473955;border:1px solid #8b6b9b;border-radius:10px;padding:9px;color:#f9edff;text-align:center}
.tf117Dismiss{display:block;margin:8px auto 0;min-height:44px;padding:10px 24px;background:#121820;color:#f9fbfe;border:1px solid #8496a8;border-radius:25px;font-weight:700}
#tf117Loading{position:absolute;left:50%;top:40%;transform:translate(-50%,-50%);display:grid;justify-items:center;gap:8px;pointer-events:none}
#tf117Loading img{width:58px;height:58px;border-radius:14px}#tf117Loading strong{font-size:13px}
.tf117Pulse{display:block;width:64px;height:64px;border-radius:50%;border:2px dashed #7fbaf5;animation:tf117Turn 1.4s linear infinite}@keyframes tf117Turn{to{transform:rotate(360deg)}}
/* Existing profile is a modal; route browser and settings remain available for power users. */
body:has(#tf117Shell:not([hidden])) #mapScreen>#profilePanel:not([hidden]),body:has(#tf117Shell:not([hidden])) #mapScreen>#settingsPanel:not([hidden]),body:has(#tf117Shell:not([hidden])) #mapScreen>#locationPanel:not([hidden]),body:has(#tf117Shell:not([hidden])) #mapScreen>#historyPanel:not([hidden]),body:has(#tf117Shell:not([hidden])) #mapScreen>#routesPanel:not([hidden]),body:has(#tf117Shell:not([hidden])) #mapScreen>#feedPanel:not([hidden]){position:absolute!important;z-index:130!important;left:50%!important;right:auto!important;top:calc(env(safe-area-inset-top,0px) + 80px)!important;bottom:auto!important;transform:translateX(-50%);width:min(480px,calc(100% - 18px))!important;max-width:480px!important;max-height:calc(90dvh - env(safe-area-inset-top,0px))!important;overflow:auto!important;border-radius:16px!important;background:#111d2ded!important}
body:has(#tf117Shell:not([hidden])) #mapScreen>#aircraftPanel:not([hidden]){top:calc(env(safe-area-inset-top,0px) + 90px)!important;bottom:auto!important;max-height:calc(82dvh - env(safe-area-inset-top,0px))!important;z-index:105!important}
body.tf117ExpandedMode #aircraftPanel{display:none!important}
#mapScreen>.mapTools{left:12px!important;top:auto!important;bottom:15px!important;z-index:52!important}
#mapScreen #mapAttribution{position:fixed;bottom:4px;right:12px;font-size:10px;pointer-events:none;background:#0818259c;padding:3px 8px;border-radius:5px}
@media(max-width:760px){
 #tf117Bar{top:calc(env(safe-area-inset-top,0px) + 9px);width:calc(100% - 16px);min-height:58px;border-radius:17px;padding:4px 4px;gap:0}
 #tf117Bar button{font-size:12px;padding:4px 5px;min-width:44px;min-height:49px}
 #tf117Bar #tf117Routes,#tf117Bar #tf117Location{font-size:12px}
 #tf117Dropdown{top:calc(env(safe-area-inset-top,0px) + 73px);width:calc(100% - 16px);max-height:74dvh}
 #tf117Alerts{top:calc(env(safe-area-inset-top,0px) + 76px);width:calc(100% - 16px);gap:7px}
 .tf117Compact{grid-template-columns:48px minmax(0,1fr) auto;gap:8px;padding:8px 9px;min-height:71px}
 .tf117Disc{width:45px;height:45px}.tf117AlertInfo strong{font-size:16px}.tf117AlertInfo small{font-size:11px}
 .tf117AlertRight{min-width:80px}.tf117Clock{font-size:22px}.tf117AlertRight small{font-size:10px}
 #tf117Expanded{top:calc(env(safe-area-inset-top,0px) + 76px);width:calc(100% - 16px);padding:12px;max-height:min(64dvh,510px);border-radius:16px}
 .tf117ExpandedHead{gap:7px}.tf117Identity strong{font-size:21px}.tf117BigClock{font-size:24px}.tf117Identity span{font-size:12px}
 .tf117ExpandedBody{gap:8px}.tf117RealDisc{width:min(100%,170px)}.tf117ExpandedDetails{font-size:11px;gap:7px}.tf117ExpandedDetails strong{font-size:14px}
 .tf117Actions{flex-direction:column}.tf117Actions button{min-height:39px}
 body:has(#tf117Shell:not([hidden])) #mapScreen>#aircraftPanel:not([hidden]){position:fixed!important;top:auto!important;bottom:calc(env(safe-area-inset-bottom,0px) + 6px)!important;left:8px!important;right:8px!important;transform:none!important;width:calc(100% - 16px)!important;max-height:42dvh!important;overflow:auto!important;z-index:105!important}
 body:has(#tf117Shell:not([hidden])) #mapScreen>#profilePanel:not([hidden]),body:has(#tf117Shell:not([hidden])) #mapScreen>#settingsPanel:not([hidden]),body:has(#tf117Shell:not([hidden])) #mapScreen>#locationPanel:not([hidden]),body:has(#tf117Shell:not([hidden])) #mapScreen>#routesPanel:not([hidden]),body:has(#tf117Shell:not([hidden])) #mapScreen>#historyPanel:not([hidden]){position:fixed!important;top:calc(env(safe-area-inset-top,0px) + 72px)!important;max-height:calc(100dvh - env(safe-area-inset-top,0px) - 90px)!important;bottom:auto!important;left:8px!important;right:8px!important;width:calc(100% - 16px)!important;transform:none!important}
 #mapScreen>.mapTools{bottom:calc(env(safe-area-inset-bottom,0px) + 7px)!important;top:auto!important;left:8px!important}
 body.tf117ExpandedMode #mapScreen>.mapTools{bottom:calc(env(safe-area-inset-bottom,0px) + 8px)!important}
}
@media(prefers-reduced-motion:reduce){#tf117Shell *{animation:none!important;transition:none!important}}

.tf117ElevationShade{position:fixed;inset:0;z-index:900;background:#061018c9;display:grid;place-items:center;padding:16px}.tf117ElevationCard{background:#162638;border:1px solid #6787a0;border-radius:16px;padding:24px;width:min(420px,100%);display:grid;gap:13px;color:#eef7ff}.tf117ElevationCard h2{margin:0;font-size:20px}.tf117ElevationCard p{font-size:13px;line-height:1.5;margin:0}.tf117ElevationCard input{background:#0f1b2a;border:1px solid #65849d;color:#fff;border-radius:8px;min-height:44px;padding:10px}.tf117ElevationActions{display:flex;gap:8px}.tf117ElevationActions button{min-height:44px;flex:1;background:#24405d;color:white;border-radius:8px;border:1px solid #668fae}

/* v1.0.19 fold/cover-size accessibility: retain visible map and reachable dismissal. */
@media (max-height:640px){
 #tf117Expanded{max-height:60dvh!important;overflow-y:auto!important;overscroll-behavior:contain!important;padding-bottom:64px!important;}
 #tf117Expanded .tf117Dismiss{position:sticky!important;bottom:0!important;z-index:4!important;background:#101a27!important;}
 .tf117ExpandedBody{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;}
 .tf117RealDisc{width:min(100%,120px)!important;}
}
@media (max-width:430px) and (max-height:640px){#tf117Expanded{top:calc(env(safe-area-inset-top,0px) + 69px)!important;max-height:58dvh!important;}.tf117ExpandedBody{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;}#tf117Bar{min-height:53px!important;}}

.tf117RealDisc .tf117MoonCanvas{position:absolute;inset:0;width:100%;height:100%;border-radius:50%;z-index:0}.tf117RealDisc .tf117AircraftSilhouette{z-index:1;max-width:none!important;max-height:none!important}.tf117Preview{min-height:44px;border-radius:9px;background:#283b4d;border:1px solid #6084a3;color:#fff;padding:9px;}

.tf18Icon{vertical-align:-.18em;display:inline-block;stroke:currentColor;fill:none;flex-shrink:0;}

.tf117RealDisc .tf18MeshDisc{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:2}

/* v1.0.19: the Dismiss action is in normal flow, never over the Moon or buttons. */
@media (max-height:640px){#tf117Expanded{padding-bottom:20px!important;}#tf117Expanded .tf117Dismiss{position:static!important;bottom:auto!important;z-index:auto!important;margin-top:14px!important;}}
@media (max-width:760px){#tf117Expanded{scroll-padding-bottom:65px;}.tf117ExpandedBody{padding-bottom:14px;}.tf117Dismiss{position:static!important;margin:12px auto 0!important;}}
.tf117Updating{padding:12px 18px;background:#172435ee;color:#b9dbef;border:1px solid #5688a8;border-radius:12px;font-size:13px;}
.tf117Online{display:grid;gap:5px;border-top:1px solid #4d6074;padding-top:10px}.tf117GroupNames{padding:5px 0;color:#e4f0fc;font-size:13px}

/* Aircraft whose geometric centre is beyond the limb may still graze it. */
#tf117Expanded .tf117RealDisc{overflow:visible!important}
#tf117Expanded .tf117LargeDisc{overflow:visible}

/* v1.0.23: keep the Settings dropdown above map zoom controls on narrow, short devices. */
@media (max-width:430px){
 #tf117Dropdown[data-menu="settings"],#tf117Dropdown.tf117SettingsOpen{bottom:calc(env(safe-area-inset-bottom,0px) + 92px)!important;max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 180px)!important;overflow-y:auto!important;overscroll-behavior:contain!important;}
 body:has(#tf117Dropdown:not([hidden])) #mapScreen>.mapTools{z-index:35!important;pointer-events:none!important;opacity:.38!important;}
}

/* v1.0.23: one scroll container on narrow settings panels. */
@media(max-width:476px){#tf117Dropdown[data-menu="settings"]{overflow-y:auto!important}#tf117Dropdown[data-menu="settings"] #tf117MenuContent{overflow:visible!important;max-height:none!important}}
/* The sky-disc motion overlay and its licensed mesh may extend past the limb. */
#tf117Expanded .tf117RealDisc .tf18MeshDisc{pointer-events:none;z-index:2}#tf117Expanded .tf117RealDisc .tf117AircraftSilhouette{z-index:3} 

/* v1.0.24 compact/fold controls: allow internal scrolling without overlaying map tools. */
@media (max-height:660px){
 #tf117Expanded{max-height:min(59dvh,420px)!important;overflow-y:auto!important;scroll-padding-bottom:18px!important;padding-bottom:16px!important;}
 #tf117Expanded .tf117Dismiss{position:static!important;margin:14px auto 0!important;}
 #tf117Expanded .tf117RouteBox,#tf117Expanded .tf117Preview,#tf117Expanded .tf117Actions button,#tf117Expanded .tf117Dismiss{min-height:44px!important;position:relative;z-index:1;}
}
@media(min-width:760px) and (max-height:660px){
 #tf117Expanded{top:76px!important;max-height:58dvh!important;}
 #tf117Dropdown:not([hidden])~#tf117Alerts{pointer-events:none;}
}
@media(max-width:520px) and (max-height:660px){
 #mapScreen>.mapTools{z-index:50!important;}
 #tf117Expanded{z-index:118!important;max-height:58dvh!important;}
}
#tf117Settings button,#tf117Dropdown button,#tf117Settings input,#tf117Dropdown input[type=checkbox]{min-height:44px;min-width:28px;}
