/* Desktop uses the phone components and colors, with room for the map. */
@media(min-width:761px), (min-width:600px) and (hover:hover) and (pointer:fine){
 body .app-header{height:82px;padding:12px 26px;background:linear-gradient(#081e2af2,#081e2ac9);border-bottom:1px solid #83b5c42b;backdrop-filter:blur(16px)}
 body .identity{font-size:25px;letter-spacing:-.7px}.identity small{display:none}
 body .app-header #explore-nearby{position:absolute;top:12px;left:50%;transform:translateX(-50%);display:grid;place-items:center;width:56px;height:56px;padding:0;border:1px solid #86afc16b!important;border-radius:50%!important;background:linear-gradient(145deg,#24495d,#102a3e)!important;color:#e8faff;box-shadow:inset 0 1px #c7eaff1c;line-height:1.1;text-align:center}
 body .app-header #explore-nearby>span{font:600 11px/1.15 system-ui}body .app-header #explore-nearby[aria-expanded=true]{background:#35627a;border-color:#c0eaff}
 body #my-transit{flex-direction:column;gap:3px;min-width:76px;height:56px;padding:5px 12px}body #my-transit>span{font-size:10px}
 body #install{min-height:48px;border-radius:12px}body #about{min-height:44px}
 body .app-nav{left:50%;right:auto;top:94px;transform:translateX(-50%);width:min(760px,calc(100vw - 48px));display:grid;grid-template-columns:.75fr 1.1fr .8fr 1.5fr 1fr 1fr;gap:4px;padding:5px;border-radius:14px;background:#0b2335ec;backdrop-filter:blur(16px)}
 body .app-nav>button,body .app-nav #bike-trails{display:block;min-width:0;min-height:46px;font-size:12px;line-height:1.2;padding:6px;border-radius:9px;white-space:normal}
 body .app-nav>button[aria-pressed=true]{background:#294e64;border:1px solid #7299b34d}
 body .explore-tools.city-radar-console[data-radar-minimized=true]{display:none!important}
 body .explore-tools.city-radar-console[data-radar-active=true]:not([data-radar-minimized=true]){position:fixed;top:158px!important;left:50%!important;right:auto!important;transform:translateX(-50%);width:min(580px,calc(100vw - 48px))!important;max-height:calc(100dvh - 204px)!important;overflow:auto;overscroll-behavior:contain;padding:12px;border-radius:16px;background:#102a3ef5;border:1px solid #527888;box-shadow:0 20px 60px #0005;z-index:290}
 .city-radar-console .city-scan-types{gap:7px}.city-radar-console .city-scan-types button{min-height:66px;border-radius:10px}.city-radar-console .city-scan-types img{width:26px;height:26px}
 body #mode-toolbar{top:158px;left:24px;max-width:calc(100vw - 48px);border-radius:14px;background:#0b2335ec}
 body[data-mode=city] #phone-local-navigation{display:block}body:has(.explore-tools[data-illinois-map=true]) #phone-local-navigation{display:none}
 #phone-local-navigation #city-navigation-hud{position:fixed;z-index:280;right:24px;bottom:48px;top:auto;width:310px;max-width:calc(100vw - 48px);max-height:60dvh;overflow:auto;background:linear-gradient(145deg,#102a3ef5,#091e2cf5);color:#d6edf1;border:1px solid #527888;border-radius:14px;box-shadow:0 8px 30px #0006;backdrop-filter:blur(12px)}
 #phone-local-navigation #city-navigation-hud summary,#phone-local-navigation #city-navigation-hud button{min-height:44px}
 #phone-local-navigation #city-navigation-hud[data-expanded=true]{width:440px;padding:14px}
 #phone-local-navigation #city-navigation-hud[data-fullscreen=true]{inset:24px;width:calc(100vw - 48px);max-width:none;height:calc(100dvh - 48px);max-height:none;z-index:600;padding:18px;background:#0b2433}
 #phone-local-navigation #city-navigation-hud[data-fullscreen=true] canvas{height:calc(100dvh - 330px);min-height:180px}
 #phone-local-navigation #city-navigation-hud[data-fullscreen=true] .nav-expand{display:none}
 body :is(.cta-fleet,.rail-panel) input,body :is(.cta-fleet,.rail-panel) select{min-height:44px;font-size:14px;border-radius:9px}
 body :is(.cta-fleet,.rail-panel) .rail-card-actions>button{min-height:44px;border-radius:8px}
 body .map-footer{background:#081e2acc;font-size:10px;padding:7px 24px}
}
/* Same phone panel stack, centered beneath the shared navigation on wide screens. */
@media(min-width:761px), (min-width:600px) and (hover:hover) and (pointer:fine){
 body:is([data-mode=bus],[data-mode=rail]) #mode-toolbar{left:50%;transform:translateX(-50%);width:min(760px,calc(100vw - 48px));max-width:none}
 body :is(.cta-fleet,.rail-panel):not([data-ride-screen=true]):not([data-ride-collapsed=true]){position:fixed!important;left:50%!important;right:auto!important;transform:translateX(-50%);top:var(--citylink-transit-top,224px)!important;bottom:24px!important;width:min(760px,calc(100vw - 48px))!important;max-width:none!important;height:calc(100dvh - var(--citylink-transit-top,224px) - 24px)!important;max-height:calc(100dvh - var(--citylink-transit-top,224px) - 24px)!important;min-height:0;overflow:hidden!important;display:flex;flex-direction:column;padding:12px;border-radius:14px;background:var(--rail-panel-ink)!important;font:12px/1.45 system-ui}
 body :is(.cta-fleet-content,.rail-content){flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:contain}
 body :is(.cta-fleet,.rail-panel) :is(input,select){font-size:16px}
 body:is([data-mode=bus],[data-mode=rail]):has(:is(.cta-fleet,.rail-panel):not([hidden]):not([data-ride-collapsed=true])) .map-footer{display:none}
 body [data-ride-screen=true]:not([hidden]){transform:none!important}
}


/* Desktop workspace: shared features, independently sized from the phone. */
@media (min-width:600px) and (hover:hover) and (pointer:fine){
 body{--desktop-gutter:clamp(12px,1vw,20px);--desktop-panel:clamp(300px,25vw,360px)}
 body .app-header{height:56px;padding:6px var(--desktop-gutter)}
 body .app-header #explore-nearby{top:7px}
 body .app-nav{top:64px;width:min(680px,calc(100vw - 2 * var(--desktop-gutter)));gap:4px}
 body .app-nav>button,body .app-nav #bike-trails{font-size:12px;height:34px!important;min-height:34px!important;padding:6px!important}
 body #mode-toolbar{top:112px}
 body:is([data-mode=bus],[data-mode=rail]) #mode-toolbar{top:112px;left:var(--desktop-gutter);right:auto;transform:none;width:var(--desktop-panel);max-width:calc(100vw - 2 * var(--desktop-gutter));box-sizing:border-box}
 body :is(.cta-fleet,.rail-panel):not([data-ride-screen=true]):not([data-ride-collapsed=true]){left:var(--desktop-gutter)!important;transform:none;bottom:var(--desktop-gutter)!important;width:var(--desktop-panel)!important;height:calc(100dvh - var(--citylink-transit-top,224px) - var(--desktop-gutter))!important;max-height:calc(100dvh - var(--citylink-transit-top,224px) - var(--desktop-gutter))!important;padding:12px;font-size:12px;box-shadow:0 16px 48px #0006}
 body :is(.cta-fleet-content,.rail-content){scrollbar-gutter:stable;scrollbar-width:thin}
 body :is(.cta-fleet,.rail-panel) :is(input,select){font-size:14px}
 body .explore-tools.city-radar-console[data-radar-active=true]:not([data-radar-minimized=true]){top:112px!important;width:min(480px,calc(100vw - 48px))!important;max-height:calc(100dvh - 136px)!important}
 body:not(.transit-phone-full-map):has([data-ride-screen=true]:not([hidden]))>:is(.cta-bus-companion,.rail-panel)[data-ride-screen=true]:not([hidden]){padding:12px 20px 18px!important;scrollbar-gutter:stable}
 body [data-ride-screen=true]:not([hidden])>.ride-panel-toolbar:has(>.ride-audio-control--speaker){position:relative;flex-direction:row;justify-content:center;min-height:76px;padding:0 0 10px;margin:0 auto 12px;max-width:1080px;border-bottom:1px solid var(--rail-panel-edge,#446078)}
 body [data-ride-screen=true]:not([hidden])>.ride-panel-toolbar:has(>.ride-audio-control--speaker):before{position:absolute;left:0;font-size:16px;letter-spacing:.02em}
 body [data-ride-screen=true]>.ride-panel-toolbar>.ride-audio-control--speaker{width:auto;flex:0 0 auto}
 body [data-ride-screen=true]>.ride-panel-toolbar .ride-audio-speaker{width:68px;min-height:76px!important}
 body [data-ride-screen=true]:not([hidden])>:is(header,.cta-companion-mast,.cta-ride-along,.rail-ride-along){max-width:1080px;margin-left:auto!important;margin-right:auto!important}
 body [data-ride-screen=true]:not([hidden]) :is(.cta-ride-along,.rail-ride-content){display:grid!important;grid-template-columns:minmax(0,1.35fr) minmax(280px,1fr);gap:8px 16px;align-items:start}
 body [data-ride-screen=true]:not([hidden]) :is(.cta-ride-along,.rail-ride-content)>*{grid-column:2;min-width:0}
 body [data-ride-screen=true]:not([hidden]) :is(.cta-ride-along,.rail-ride-content)>.ride-map-card{grid-column:1;grid-row:1/span 12;margin:0;position:sticky;top:12px;border-radius:14px}
 body [data-ride-screen=true]:not([hidden]) .ride-map-card .ride-map-preview{height:clamp(200px,34dvh,360px)!important}
 body [data-ride-screen=true]:not([hidden]) .ride-map-card .ride-mini-note{display:block;font-size:11px;padding:8px 12px}
 body [data-ride-screen=true]:not([hidden]) .ride-map-card .ride-map-styles button{font-size:12px;min-height:34px}
 body [data-ride-screen=true]:not([hidden]) :is(.ride-along-next,.ride-along-exit,.rail-ride-next){margin:0;min-height:60px;padding:10px}
 body [data-ride-screen=true]:not([hidden]) :is(.ride-along-status,.rail-ride-status){font-size:12px;line-height:1.5}
 body [data-ride-screen=true] .ride-along-actions{margin:0;gap:10px}
 body [data-ride-screen=true] .ride-along-actions>button{font-size:12px;min-height:36px}
 body dialog.community-board{width:min(760px,calc(100vw - 40px));height:min(760px,calc(100dvh - 40px));max-height:calc(100dvh - 40px);margin:auto;border:1px solid var(--edge,#456b5b);border-radius:20px}
 body .community-board .community-header{padding:16px 18px 12px}
 body .community-board .community-content{padding:0 18px 18px}
 body .community-board .community-icon-picker{grid-template-columns:repeat(6,minmax(0,1fr))}
 body .community-board .community-content>.community-pick-map-card img{max-height:190px}
 body .ride-studio{width:min(1120px,calc(100vw - 40px));height:min(820px,calc(100dvh - 40px));max-height:calc(100dvh - 40px)}
 body .trip-radio-page:not([data-layout-locked=true]){inset:112px var(--desktop-gutter) var(--desktop-gutter);max-width:1200px;margin-left:auto;margin-right:auto}
 body .cta-passenger-dialog{width:min(620px,calc(100vw - 48px));max-height:calc(100dvh - 48px)}
 body .ride-map-dialog.ride-map-fullscreen{padding:10px 16px 8px}
 body .ride-map-fullscreen>header h2{font-size:18px}
 body .ride-map-fullscreen>.ride-map-styles{max-width:380px}

 body .identity{font-size:20px}body .identity img{width:30px;height:30px}
 body .app-header #explore-nearby{width:40px;height:40px}body .app-header #explore-nearby>span{font-size:9px}
 body #my-transit{height:40px;min-height:36px;min-width:70px;flex-direction:row;gap:6px;padding:6px 10px}body #my-transit>span{font-size:11px}
 body #install,body #about{min-height:36px;padding:7px 11px;font-size:12px}
 body :is(.cta-fleet,.rail-panel):not([data-ride-screen=true]) h2{font-size:20px}
 body :is(.cta-fleet,.rail-panel) :is(input,select,button){min-height:34px;padding:7px 9px}
 body :is(.cta-fleet,.rail-panel) .rail-card-actions>button{min-height:34px}
 body .transit-browse-controls :is(button,select){min-height:34px!important;font-size:11px;padding:5px 7px}
 body #mode-toolbar :is(button,select){min-height:34px!important;padding:6px 9px;font-size:12px}
 body .city-radar-console .city-scan-types button{min-height:52px;padding:6px}body .city-radar-console .city-scan-types img{width:22px;height:22px}
 body #phone-local-navigation #city-navigation-hud{width:260px;right:14px;bottom:36px}
 body #phone-local-navigation #city-navigation-hud[data-expanded=true]{width:360px}
 body #phone-local-navigation #city-navigation-hud[data-fullscreen=true]{width:calc(100vw - 48px)}
 body #phone-local-navigation #city-navigation-hud summary,body #phone-local-navigation #city-navigation-hud button{min-height:34px}
 body:not(.transit-phone-full-map):has([data-ride-screen=true]:not([hidden]))>#city-canvas{display:block!important}
 body:not(.transit-phone-full-map):has([data-ride-screen=true]:not([hidden]))>:is(.cta-bus-companion,.rail-panel)[data-ride-screen=true]:not([hidden]){inset:20px 0!important;width:min(1080px,calc(100vw - 40px))!important;height:min(840px,calc(100dvh - 40px))!important;max-height:calc(100dvh - 40px)!important;margin:0 auto!important;border:1px solid var(--rail-panel-edge,#446078)!important;border-radius:16px!important;box-shadow:0 18px 70px #0009!important}
 body [data-ride-screen=true]:not([hidden]) .ride-panel-toolbar button{min-height:34px!important}
 body [data-ride-screen=true]:not([hidden]) .ride-map-card .ride-map-open{min-width:34px;min-height:34px}
 body [data-ride-screen=true]:not([hidden]) .ride-map-card .ride-map-terminal{min-height:34px}
 body [data-ride-screen=true]:not([hidden]) .ride-map-card .ride-map-feed{padding:5px 8px}
 body [data-ride-screen=true]:not([hidden]) .ride-map-card .ride-mini-note{font-size:10px;padding:5px 9px}
 body .community-board .community-content>.community-pick-map-card img{height:170px;object-fit:cover}
 body [data-ride-screen=true]:not([hidden])>.ride-panel-toolbar:has(>.ride-audio-control--speaker){min-height:68px;margin-bottom:8px;padding-bottom:6px}
 body [data-ride-screen=true]>.ride-panel-toolbar .ride-audio-speaker{width:58px;min-height:66px!important}
 body [data-ride-screen=true] .ride-speaker-image{width:52px;height:52px}
 body .rail-panel[data-ride-screen=true]>header{min-height:28px;margin:0 auto 6px!important;padding:0!important}
 body .rail-panel[data-ride-screen=true]>header h2{margin:0;font-size:18px}
 body [data-ride-screen=true]:not([hidden]) .ride-along-actions{grid-row:1}
 body [data-ride-screen=true]:not([hidden]) .rail-ride-content>.ride-along-actions{grid-row:2}
 body .trip-radio-page[data-layout-locked=true]{max-width:none;margin:0}
 body .community-board .community-pin-preview{height:170px}
 body .community-board .community-icon-picker button{min-height:68px;padding:8px 4px}
 body .community-board .community-icon-disc{width:34px;height:34px}body .community-board .community-icon-disc img{width:23px;height:23px}
 body .community-board .community-header h2{font-size:22px}body .community-board .community-intro p{font-size:19px}
 body .ride-studio .ride-header{padding:14px 18px 8px}body .ride-studio .ride-header h2{font-size:22px}
 body .ride-studio .ride-tabs{padding:0 18px 10px}
 body .trip-radio-page:where(:not([data-layout-locked=true])){top:112px!important;grid-template-columns:290px minmax(0,1fr);grid-template-rows:48px minmax(0,1fr)}
 body .trip-radio-page .tr-page-head{padding:8px 14px}body .trip-radio-page .tr-map-wrap{min-height:200px;flex:1 1 0}
 body .trip-radio-page .tr-field{width:min(340px,calc(100% - 24px))}
}
/* Narrow desktop windows retain every control without squeezing two columns. */
@media (min-width:600px) and (max-width:1000px) and (hover:hover) and (pointer:fine){
 body [data-ride-screen=true]:not([hidden]) :is(.cta-ride-along,.rail-ride-content){grid-template-columns:minmax(0,1fr)}
 body [data-ride-screen=true]:not([hidden]) :is(.cta-ride-along,.rail-ride-content)>*,body [data-ride-screen=true]:not([hidden]) :is(.cta-ride-along,.rail-ride-content)>.ride-map-card{grid-column:1;grid-row:auto;position:static}
}

/* A narrow mouse-driven window remains a desktop radio workspace. */
@media (min-width:600px) and (max-width:760px) and (hover:hover) and (pointer:fine){
 body .trip-radio-page:not([data-layout-locked=true]){display:grid;grid-template-columns:240px minmax(0,1fr);grid-template-rows:54px minmax(0,1fr);overflow:hidden}
 body .trip-radio-page:not([data-layout-locked=true])>.tr-page-head{position:relative;min-height:0;padding:6px 10px;gap:8px}
 body .trip-radio-page .tr-mobile-switch{display:none}
 body .trip-radio-page .tr-page-head h2{font-size:16px}
 body .trip-radio-page:not([data-layout-locked=true])>.tr-map-side{display:flex;grid-column:2;grid-row:2;min-height:0;padding:10px;overflow:auto}
 body .trip-radio-page:not([data-layout-locked=true]):not([data-radio-collapsed=true]) #tr-radio-console{display:block;width:auto;min-width:0;min-height:0;margin:10px 0 10px 10px;max-height:none;overflow:auto}
 body .trip-radio-page:not([data-layout-locked=true]) #tr-radio-console .tr-tabs{top:0}
 body .trip-radio-page:not([data-layout-locked=true]) .tr-map-wrap{height:auto;min-height:200px;max-height:none;flex:1 1 0}
 body .trip-radio-page:not([data-layout-locked=true])[data-radio-collapsed=true]{grid-template-columns:0 minmax(0,1fr)}
 body .trip-radio-page:not([data-layout-locked=true])[data-map-collapsed=true]{grid-template-columns:minmax(0,1fr)}
 body .trip-radio-page:not([data-layout-locked=true])[data-map-collapsed=true] #tr-radio-console{width:min(420px,calc(100% - 70px));margin:10px auto}
 body .trip-radio-page:not([data-layout-locked=true])[data-map-collapsed=true]>.tr-map-side{display:none}
 body .trip-radio-page:not([data-layout-locked=true])>.tr-field{position:absolute;left:16px;right:auto;top:62px;bottom:12px;width:min(340px,calc(100% - 32px));max-width:calc(100% - 32px)}
 body .trip-radio-page[data-layout-locked=true]:is([data-map-layout=companion],[data-map-layout=swap])>.tr-radio{inset:10px auto 10px 10px;width:240px;margin:0;min-height:0;overflow:auto}
 body .trip-radio-page[data-layout-locked=true][data-map-layout=companion]>.tr-map-side{inset:0 0 0 260px}
 body .trip-radio-page[data-layout-locked=true][data-map-layout=swap]>.tr-radio{left:auto;right:10px}
 body .trip-radio-page[data-layout-locked=true][data-map-layout=swap]>.tr-map-side{inset:0 260px 0 0}
 body .trip-radio-page[data-layout-locked=true]:is([data-map-layout=companion],[data-map-layout=swap])>.tr-field{bottom:12px}
}

@media(min-width:1001px) and (hover:hover) and (pointer:fine){body .ride-studio .ride-content{grid-template-columns:220px minmax(200px,1fr) 230px}}

/* The phone fleet rule is more specific than the shared panel selector. */
@media(min-width:600px) and (hover:hover) and (pointer:fine){
 body[data-mode=bus]>.cta-fleet:not([data-route-guide=true]):not([data-ride-collapsed=true]):not([data-ride-screen=true]){left:var(--desktop-gutter)!important;right:auto!important;width:var(--desktop-panel)!important;top:var(--citylink-transit-top,188px)!important;bottom:var(--desktop-gutter)!important;height:calc(100dvh - var(--citylink-transit-top,188px) - var(--desktop-gutter))!important;max-height:calc(100dvh - var(--citylink-transit-top,188px) - var(--desktop-gutter))!important}
}

/* Keep the descriptive map title readable beside the app controls. */
body .app-header .identity{min-width:0;max-width:calc(100% - 170px);gap:9px}
body .app-header .identity img{flex:none}
body .app-header .identity>span{display:block;font-size:clamp(16px,2.4vw,22px);line-height:1.15;max-width:210px}
@media(max-width:599px){body .app-header .identity{max-width:calc(50vw - 42px);gap:7px}body .app-header .identity img{width:30px;height:30px}body .app-header .identity>span{min-width:0;max-width:145px;font-size:clamp(14px,4vw,16px);letter-spacing:-.3px}}
