/* Read-only top-right panel. It cannot capture driving touches. */
#drive-debug-overlay{position:absolute;z-index:8;top:var(--hud-top,68px);right:max(12px,env(safe-area-inset-right));margin:0;padding:7px 9px;max-width:calc(100% - 24px);box-sizing:border-box;border:1px solid #b7dfd93d;border-radius:6px;background:#071a24dd;color:#e1f5ec;font:11px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere;pointer-events:none;font-variant-numeric:tabular-nums}
#drive-debug-overlay[hidden]{display:none}
#park-modal-actions .drive-debug-toggle{border:1px solid #8aada3;min-height:44px}
#park-modal-actions .drive-debug-toggle[aria-pressed=true]{background:#235246;color:#f0fff5}
#park-modal-actions .drive-debug-toggle:focus-visible{outline:3px solid #ffe08a;outline-offset:3px}
/* Keep diagnostics separate from the route HUD in narrow portrait views. */
@media(max-width:650px) and (orientation:portrait){
 #drive-debug-overlay{left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));font-size:10px;line-height:1.4;padding:5px 7px}
 .road-mode #parking-app[data-debug=true][data-state=playing] .park-hud{top:calc(var(--hud-top) + 160px)}
 .road-mode #parking-app[data-debug=true]:has(#park-camera-tools[open]) #drive-debug-overlay{visibility:hidden}
}
@media(max-height:560px) and (orientation:landscape){#drive-debug-overlay{font-size:10px;line-height:1.35;max-width:calc(100% - 240px)}}
/* Popovers must stay unobstructed even when open over diagnostics. */
#parking-app:has(#drive-music-controls[open]) #drive-debug-overlay{visibility:hidden}

.drive-recording-controls{display:flex;flex-wrap:wrap;gap:.5rem}.drive-recording-controls p{flex-basis:100%;font-size:.78rem;line-height:1.4}.drive-recording-controls button{min-height:44px}

#park-pause[data-recording=true]::after{content:'● REC';color:#ff867b;font-size:.65rem;margin-left:.3rem}
