/* Compact controller web layout only; desktop geometry remains unchanged. */
@media (max-width: 980px), (pointer: coarse) and (max-width: 1100px) {
/* APK controller mode only. Touch layouts remain owned by mobile-driving.css. */
html.controller-active.phone-hud-ready.is-driving{--pad-edge:8px;--pad-map:min(22vw,210px);--pad-market:min(27vw,260px);--pad-map-height:min(26vh,155px);--touch-reserve:0px}
html.controller-active.phone-hud-ready.is-driving #hud#hud .map{position:fixed!important;top:auto!important;bottom:8px!important;left:8px!important;right:auto!important;width:var(--pad-map)!important;height:var(--pad-map-height)!important;--gps-width:var(--pad-map)!important;transform:none!important}
html.controller-active.phone-hud-ready.is-driving #hud#hud>.speed{position:fixed!important;top:auto!important;bottom:8px!important;left:auto!important;right:8px!important;width:110px!important;height:32px!important;min-height:0!important;padding:4px 8px!important;display:flex!important;align-items:baseline!important;gap:5px!important;transform:none!important;box-sizing:border-box}
html.controller-active.phone-hud-ready.is-driving #hud#hud>.speed strong{font-size:22px!important}
html.controller-active.phone-hud-ready.is-driving #hud#hud>.speed small{font-size:8px!important;display:block!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html.controller-active.phone-hud-ready.is-driving #hud#hud>.speed .revbar{display:none!important}
html.controller-active.phone-hud-ready.is-driving .drive-left-stack.drive-left-stack{display:flex!important;position:fixed!important;top:auto!important;bottom:calc(var(--pad-map-height) + 16px)!important;left:8px!important;width:var(--pad-map)!important;max-height:85px!important;overflow:auto!important}
html.controller-active.phone-hud-ready.is-driving .drive-right-stack.drive-right-stack{position:fixed!important;top:auto!important;bottom:48px!important;right:8px!important;left:auto!important;width:var(--pad-market)!important;max-width:none!important;max-height:calc(100dvh - max(80px,var(--drive-header-bottom,80px)) - 48px)!important;overflow:visible!important;transform:none!important}
html.controller-active.phone-hud-ready.is-driving #market-hud#market-hud{display:flex!important;flex-direction:column!important;max-height:calc(100dvh - max(80px,var(--drive-header-bottom,80px)) - 48px);overflow:auto!important;overscroll-behavior:contain}
html.controller-active.phone-hud-ready.is-driving #market-hud#market-hud .market-portfolio{display:flex!important;flex-direction:column!important;align-items:stretch!important;padding:7px!important;gap:3px!important}
html.controller-active.phone-hud-ready.is-driving #market-hud#market-hud .market-top{display:flex!important;align-items:center!important;gap:4px!important}
html.controller-active.phone-hud-ready.is-driving #market-hud#market-hud .market-live{display:block!important;font-size:7px!important}
html.controller-active.phone-hud-ready.is-driving #market-hud#market-hud .market-minimize{width:auto!important;min-width:0!important;min-height:28px!important;font-size:9px!important;padding:3px!important}
html.controller-active.phone-hud-ready.is-driving #market-hud#market-hud .market-brand{font-size:15px!important}
html.controller-active.phone-hud-ready.is-driving #market-hud#market-hud :is(.market-gain,.market-stamp){display:block!important;font-size:9px!important;line-height:1.25!important;margin:0!important}
html.controller-active.phone-hud-ready.is-driving #market-hud#market-hud .market-value{display:block!important;margin:0!important}
html.controller-active.phone-hud-ready.is-driving #market-hud#market-hud .market-value .pv-number{font-size:23px!important}
html.controller-active.phone-hud-ready.is-driving #market-hud#market-hud .market-graph{display:block!important;height:65px!important;min-height:0!important;overflow:hidden}
html.controller-active.phone-hud-ready.is-driving #market-hud#market-hud .market-graph svg{height:65px!important;width:100%!important}
html.controller-active.phone-hud-ready.is-driving #market-hud#market-hud .market-periods{display:flex!important;gap:2px!important}
html.controller-active.phone-hud-ready.is-driving #market-hud#market-hud .market-periods button{flex:1;min-width:0!important;min-height:28px!important;padding:3px!important;font-size:9px!important}
html.controller-active.phone-hud-ready.is-driving #market-hud#market-hud[data-compact="false"] :is(.market-picker,.market-open){display:block!important;min-height:28px!important;font-size:10px!important;padding:3px!important}
html.controller-active.phone-hud-ready.is-driving #market-hud#market-hud .market-alert{order:-1;flex-shrink:0}
html.controller-active.phone-hud-ready.is-driving #market-hud#market-hud .market-alert-message{display:block!important;font-size:9px!important}
html.controller-active.phone-hud-ready.is-driving :is(#duber-card,#duber-progress){position:fixed!important;left:calc(var(--pad-map) + 20px)!important;right:calc(var(--pad-market) + 20px)!important;top:max(65px,var(--drive-header-bottom,65px))!important;bottom:auto!important;width:auto!important;max-height:calc(100dvh - max(65px,var(--drive-header-bottom,65px)) - 135px)!important;overflow:auto!important;box-sizing:border-box;transform:none!important}
html.controller-active.phone-hud-ready.is-driving #duber-card .duber-actions{display:flex!important;gap:8px!important}
html.controller-active.phone-hud-ready.is-driving #duber-card .duber-actions button{flex:1!important;min-width:0!important;min-height:36px!important;font-size:0!important;padding:4px!important}
html.controller-active.phone-hud-ready.is-driving #duber-card .duber-accept:before{content:'\2713';font-size:20px}
html.controller-active.phone-hud-ready.is-driving #duber-card .duber-decline:before{content:'\00d7';font-size:20px}
html.controller-active.phone-hud-ready.is-driving #duber-card .duber-key{font-size:12px!important;margin-left:8px}
html.controller-active.phone-hud-ready.is-driving #radio-mini.drive-radio{display:flex!important;position:fixed!important;left:calc(var(--pad-map) + 20px)!important;right:calc(var(--pad-market) + 20px)!important;bottom:8px!important;top:auto!important;width:auto!important;max-width:none!important;transform:none!important;height:38px!important}
html.controller-active.phone-hud-ready.is-driving #xbox-guide{left:calc(var(--pad-map) + 20px)!important;right:calc(var(--pad-market) + 20px)!important;bottom:52px!important;top:auto!important;width:auto!important;max-height:70px!important;overflow:auto!important;transform:none!important}
html.controller-active.phone-hud-ready.is-driving #destination-hud{left:calc(var(--pad-map) + 20px)!important;right:calc(var(--pad-market) + 20px)!important;top:max(65px,var(--drive-header-bottom,65px))!important;bottom:auto!important;width:auto!important;transform:none!important}
html.controller-active.phone-hud-ready.is-driving.duber-offer #destination-hud{visibility:hidden!important}
html.controller-active.phone-hud-ready.is-driving.driving-widgets-hidden :is(#market-hud#market-hud,#vibe-hud#vibe-hud){display:none!important}

html.controller-active.phone-hud-ready.is-driving :is(#market-hud#market-hud[hidden],.market-portfolio[hidden],.market-alert[hidden],.market-symbols[hidden],.drive-left-stack[hidden],.drive-right-stack[hidden]){display:none!important}

html.controller-active.phone-hud-ready.is-driving:has(#duber-progress:not([hidden])) #destination-hud{top:calc(max(65px,var(--drive-header-bottom,65px)) + 80px)!important;max-height:45px!important;overflow:auto!important}
html.controller-active.phone-hud-ready.is-driving #hud#hud #recover{left:calc(var(--pad-map) + 20px)!important;bottom:130px!important;top:auto!important}

html.controller-active.phone-hud-ready.is-driving #market-hud#market-hud .market-symbols:not([hidden]){display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));padding:4px!important;gap:2px!important}
html.controller-active.phone-hud-ready.is-driving #market-hud#market-hud .market-stock{min-width:0!important;min-height:32px!important;padding:3px!important;font-size:9px!important}
html.controller-active.phone-hud-ready.is-driving #market-hud#market-hud .market-stock :is(strong,em,span){font-size:9px!important}
html.controller-active.phone-hud-ready.is-driving #market-hud#market-hud .market-value>small{display:inline!important;font-size:8px!important}
html.controller-active.phone-hud-ready.is-driving #duber-card .duber-actions button:before{display:inline-block;width:12px;height:12px;content:'';border:0;box-sizing:border-box}
html.controller-active.phone-hud-ready.is-driving #duber-card .duber-accept:before{width:12px;height:7px;border-left:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);vertical-align:3px}
html.controller-active.phone-hud-ready.is-driving #duber-card .duber-decline:before{background:linear-gradient(45deg,transparent 43%,currentColor 44%,currentColor 56%,transparent 57%),linear-gradient(-45deg,transparent 43%,currentColor 44%,currentColor 56%,transparent 57%)}
html.controller-active.phone-hud-ready.is-driving #market-hud#market-hud>.market-portfolio{flex:none!important;min-height:0!important;overflow:visible!important}
html.controller-active.phone-hud-ready.is-driving #market-hud#market-hud .market-portfolio>*{flex-shrink:0!important}
html.controller-active.phone-hud-ready.is-driving #duber-card:not([hidden]){display:block!important}
html.controller-active.phone-hud-ready.is-driving #duber-card .duber-head{display:flex!important;padding:3px!important}
html.controller-active.phone-hud-ready.is-driving #duber-card .duber-legs{display:block!important;padding:3px!important}
html.controller-active.phone-hud-ready.is-driving #duber-card .duber-leg{display:flex!important;gap:5px!important;font-size:10px!important}
html.controller-active.phone-hud-ready.is-driving #duber-card .duber-who{display:block!important}
html.controller-active.phone-hud-ready.is-driving #duber-card .duber-actions{padding:4px 0 0!important}
html.controller-active.phone-hud-ready.is-driving .drive-left-stack #vibe-hud:not([hidden]){display:block!important;padding:7px!important;font-size:10px!important}
html.controller-active.phone-hud-ready.is-driving.driving-widgets-hidden .drive-left-stack #vibe-hud:not([hidden]){display:none!important}
html.controller-active.phone-hud-ready.is-driving #duber-card .duber-actions button.duber-accept:before{width:12px;height:7px;border-left:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);vertical-align:3px}
html.controller-active.phone-hud-ready.is-driving #duber-card .duber-actions button.duber-decline:before{background:linear-gradient(45deg,transparent 43%,currentColor 44%,currentColor 56%,transparent 57%),linear-gradient(-45deg,transparent 43%,currentColor 44%,currentColor 56%,transparent 57%)}
/* One contained radio surface: title yields space to four persistent controls. */
html.controller-active.phone-hud-ready.is-driving:has(#hud .map) #radio-mini#radio-mini.drive-radio:not([hidden]){display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;left:calc(var(--pad-map) + 20px)!important;right:calc(var(--pad-market) + 20px)!important;transform:none!important;width:auto!important;max-width:none!important;height:40px!important;min-height:40px!important;padding:3px 5px!important;gap:4px!important;box-sizing:border-box!important;overflow:hidden!important;border-radius:20px!important;--radio-button-size:30px;--radio-button-gap:2px}
html.controller-active.phone-hud-ready.is-driving #radio-mini#radio-mini #radio-mini-open{display:flex!important;align-items:center!important;gap:5px!important;width:100%!important;min-width:0!important;min-height:0!important;height:32px!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;overflow:hidden!important}
html.controller-active.phone-hud-ready.is-driving #radio-mini#radio-mini #radio-mini-open img{width:26px!important;height:26px!important;flex:none;object-fit:cover;border-radius:5px}
html.controller-active.phone-hud-ready.is-driving #radio-mini#radio-mini #radio-mini-title{min-width:0!important;max-width:100%!important;overflow:hidden!important;font-size:10px!important;white-space:nowrap!important}
html.controller-active.phone-hud-ready.is-driving #radio-mini#radio-mini .drive-radio-controls{display:grid!important;grid-template-columns:repeat(4,30px)!important;width:126px!important;min-width:126px!important;gap:2px!important;padding:0!important;margin:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
html.controller-active.phone-hud-ready.is-driving #radio-mini#radio-mini .drive-radio-controls button{width:30px!important;min-width:30px!important;max-width:30px!important;height:30px!important;min-height:30px!important;padding:5px!important;margin:0!important;border:0!important;border-radius:50%!important;background:transparent!important;box-shadow:none!important;outline-offset:-2px}
html.controller-active.phone-hud-ready.is-driving #radio-mini#radio-mini .drive-radio-controls button:focus-visible{outline:2px solid #57e8c1!important}
html.controller-active.phone-hud-ready.is-driving #radio-mini#radio-mini .drive-radio-controls svg{width:18px!important;height:18px!important}
/* Navigation belongs to the map column; no duplicate central floating label. */
html.controller-active.phone-hud-ready.is-driving #destination-hud#destination-hud:not([hidden]){display:flex!important;visibility:visible!important;position:fixed!important;left:8px!important;right:auto!important;top:auto!important;bottom:calc(var(--pad-map-height) + 105px)!important;width:var(--pad-map)!important;max-width:var(--pad-map)!important;max-height:74px!important;min-width:0!important;box-sizing:border-box!important;padding:6px!important;gap:5px!important;transform:none!important;overflow:auto!important;font-size:10px!important;line-height:1.25!important}
html.controller-active.phone-hud-ready.is-driving #destination-hud#destination-hud>div{flex:1;min-width:0;overflow:hidden}
html.controller-active.phone-hud-ready.is-driving #destination-hud#destination-hud :is(strong,span,small){font-size:10px!important;line-height:1.25!important;overflow-wrap:anywhere}
html.controller-active.phone-hud-ready.is-driving #destination-hud#destination-hud #destination-arrow{display:block!important;font-size:20px!important;flex:none}
html.controller-active.phone-hud-ready.is-driving #destination-hud#destination-hud button{width:26px!important;min-width:26px!important;height:30px!important;min-height:30px!important;padding:0!important;flex:none}
html.controller-active.phone-hud-ready.is-driving :is(#drive-direction,#drive-destination-label){display:none!important}
html.controller-active.phone-hud-ready.is-driving #radio-mini#radio-mini :is(.drive-radio-help,#drive-radio-shuffle-state,#radio-mini-state){display:none!important}
html.controller-active.phone-hud-ready.is-driving #radio-mini#radio-mini .drive-radio-controls button{color:#e7f4f5!important}
html.controller-active.phone-hud-ready.is-driving #radio-mini#radio-mini .drive-radio-controls button[aria-pressed="true"]{color:#57e8c1!important;background:#57e8c119!important}

/* Compact incoming ride: essentials in one small card, actions beside the route. */
html.controller-active.phone-hud-ready.is-driving #duber-card#duber-card:not([hidden]){display:grid!important;grid-template-columns:minmax(0,1fr) 58px!important;column-gap:6px!important;left:calc(var(--pad-map) + 20px)!important;right:auto!important;width:min(290px,calc(100vw - var(--pad-map) - var(--pad-market) - 40px))!important;padding:6px!important;border-radius:10px!important;overflow:hidden!important}
html.controller-active.phone-hud-ready.is-driving #duber-card#duber-card .duber-timer{grid-column:1/-1;height:2px!important;margin:-6px -6px 4px!important}
html.controller-active.phone-hud-ready.is-driving #duber-card#duber-card .duber-head{grid-column:1/-1;padding:0 0 4px!important;gap:6px!important}
html.controller-active.phone-hud-ready.is-driving #duber-card#duber-card .duber-who{display:flex!important;align-items:baseline;gap:5px;min-width:0}
html.controller-active.phone-hud-ready.is-driving #duber-card#duber-card .duber-kicker{display:block!important;font-size:8px!important;letter-spacing:.04em!important;white-space:nowrap}
html.controller-active.phone-hud-ready.is-driving #duber-card#duber-card .duber-rider{font-size:11px!important;line-height:1.2!important}
html.controller-active.phone-hud-ready.is-driving #duber-card#duber-card .duber-fare{font-size:20px!important;line-height:1!important}
html.controller-active.phone-hud-ready.is-driving #duber-card#duber-card .duber-legs{grid-column:1;padding:0!important;min-width:0}
html.controller-active.phone-hud-ready.is-driving #duber-card#duber-card .duber-leg{padding:3px 0!important;gap:4px!important;align-items:start!important}
html.controller-active.phone-hud-ready.is-driving #duber-card#duber-card .duber-leg>div{min-width:0}
html.controller-active.phone-hud-ready.is-driving #duber-card#duber-card .duber-leg strong{font-size:11px!important;line-height:1.2!important}
html.controller-active.phone-hud-ready.is-driving #duber-card#duber-card .duber-leg small{font-size:9px!important;line-height:1.2!important;margin-top:1px!important}
html.controller-active.phone-hud-ready.is-driving #duber-card#duber-card .duber-dot{width:6px!important;height:6px!important;flex:none!important;margin-top:3px!important}
html.controller-active.phone-hud-ready.is-driving #duber-card#duber-card :is(.duber-meta,.duber-reason){display:none!important}
html.controller-active.phone-hud-ready.is-driving #duber-card#duber-card .duber-actions{grid-column:2;grid-row:3;display:flex!important;flex-direction:column!important;gap:4px!important;padding:0!important;align-self:center}
html.controller-active.phone-hud-ready.is-driving #duber-card#duber-card .duber-actions button{height:30px!important;min-height:30px!important;padding:3px!important;gap:3px!important;border-radius:6px!important;flex:none!important}
html.controller-active.phone-hud-ready.is-driving #duber-card#duber-card .duber-key{font-size:10px!important;margin:0!important;min-width:14px!important;height:16px!important;padding:0 2px!important}
html.controller-active.phone-hud-ready.is-driving #duber-card#duber-card .duber-leg small{display:block!important}
html.controller-active.phone-hud-ready.is-driving #duber-card#duber-card .duber-actions .duber-key{display:grid!important}

}
@media (max-width:980px), (pointer:coarse) and (max-width:1100px){
 html.controller-active.phone-hud-ready.is-driving{--pad-edge:max(8px,env(safe-area-inset-left),env(safe-area-inset-right))}
 html.controller-active.phone-hud-ready.is-driving #hud#hud .map{left:var(--pad-edge)!important;bottom:max(8px,env(safe-area-inset-bottom))!important}
 html.controller-active.phone-hud-ready.is-driving .drive-left-stack.drive-left-stack{left:var(--pad-edge)!important;bottom:calc(var(--pad-map-height) + 8px + max(8px,env(safe-area-inset-bottom)))!important;max-height:60px!important}
 html.controller-active.phone-hud-ready.is-driving #destination-hud#destination-hud:not([hidden]){left:var(--pad-edge)!important;bottom:calc(var(--pad-map-height) + 76px + max(8px,env(safe-area-inset-bottom)))!important;max-height:50px!important}
 html.controller-active.phone-hud-ready.is-driving .drive-right-stack.drive-right-stack{right:var(--pad-edge)!important;max-height:calc(100dvh - var(--web-header,90px) - 60px)!important;overflow:auto!important}
 html.controller-active.phone-hud-ready.is-driving #hud#hud>.speed{right:var(--pad-edge)!important;bottom:max(8px,env(safe-area-inset-bottom))!important}
 html.controller-active.phone-hud-ready.is-driving #duber-card#duber-card .duber-actions button{height:44px!important;min-height:44px!important}
 html.controller-active.phone-hud-ready.is-driving #duber-card#duber-card:not([hidden]){top:calc(var(--web-header,90px) + 6px)!important;max-height:140px!important;overflow:auto!important}
 html.controller-active.phone-hud-ready.is-driving:has(#hud .map) #radio-mini#radio-mini.drive-radio:not([hidden]){bottom:max(8px,env(safe-area-inset-bottom))!important}
}
@media (orientation:portrait) and (max-width:600px){
 html.controller-active.phone-hud-ready.is-driving{--pad-map:42vw;--pad-market:42vw;--pad-map-height:100px}
 html.controller-active.phone-hud-ready.is-driving:has(#hud .map) #radio-mini#radio-mini.drive-radio:not([hidden]){left:var(--pad-edge)!important;right:var(--pad-edge)!important;bottom:calc(112px + env(safe-area-inset-bottom))!important}
 html.controller-active.phone-hud-ready.is-driving .drive-left-stack.drive-left-stack{top:calc(var(--web-header,116px) + 6px)!important;bottom:auto!important}
 html.controller-active.phone-hud-ready.is-driving #destination-hud#destination-hud:not([hidden]){top:calc(var(--web-header,116px) + 70px)!important;bottom:auto!important}
 html.controller-active.phone-hud-ready.is-driving .drive-right-stack.drive-right-stack{top:calc(var(--web-header,116px) + 6px)!important;bottom:auto!important;max-height:140px!important}
 html.controller-active.phone-hud-ready.is-driving #duber-card#duber-card:not([hidden]){top:auto!important;bottom:calc(162px + env(safe-area-inset-bottom))!important;left:var(--pad-edge)!important;right:var(--pad-edge)!important;width:auto!important;max-height:120px!important}
 html.controller-active.phone-hud-ready.is-driving #xbox-guide:not([hidden]){display:block!important;left:var(--pad-edge)!important;right:var(--pad-edge)!important;bottom:calc(162px + env(safe-area-inset-bottom))!important;max-height:126px!important}
 html.controller-active.phone-hud-ready.is-driving.xbox-guide-visible #retail-hud-2084{bottom:calc(170px + var(--guide-height,0px) + env(safe-area-inset-bottom))}
}

/* Persistent HUD cleanup: radio remains in the bottom player and Phone app. */
html body header .tools #open-radio#open-radio,
html body #hud#hud .controls #horn#horn{display:none!important}
@media (max-width:600px), (max-width:980px) and (max-height:560px), (pointer:coarse) and (max-width:1100px){
 html.phone-hud-ready.is-driving header .tools{grid-template-columns:repeat(5,minmax(44px,1fr))!important}
}
@media (orientation:landscape) and (max-height:560px){
 html.phone-hud-ready.is-driving header .tools{width:234px!important;flex-basis:234px!important}
}
