.learning-trigger,.priority-trigger{position:fixed;z-index:25;right:20px;bottom:188px;min-height:44px;border:1px solid #ffffff50;border-radius:14px;padding:10px 16px;background:#18332fec;color:#eff5ed;font:600 13px system-ui;cursor:pointer;backdrop-filter:blur(18px)}
.learning-panel,.priority-panel{position:fixed;z-index:70;right:18px;top:100px;width:min(430px,calc(100vw - 36px));max-height:calc(100dvh - 125px);overflow:auto;border:1px solid #d9ede966;border-radius:24px;padding:22px;background:linear-gradient(145deg,#24403af7,#101f25f7);backdrop-filter:blur(24px);box-shadow:0 20px 70px #0006;color:#eff4ea;font:14px/1.55 system-ui}
.learning-panel header{display:flex;align-items:center;justify-content:space-between;gap:10px}.learning-panel h2{font-size:20px}.learning-panel button,.priority-panel button{border:1px solid #abc6ba80;background:#334e45;color:#f1f5ed;border-radius:12px;padding:10px 14px;min-height:44px;cursor:pointer;font:600 13px system-ui}.learning-panel details{border-top:1px solid #ffffff28;padding:12px 0}.learning-panel summary{cursor:pointer}.learning-panel p{color:#cbdcd3}.learning-latest{border-radius:12px;background:#ffffff0b;padding:12px}
.learning-trigger[hidden],.learning-panel[hidden],.priority-trigger[hidden],.priority-panel[hidden]{display:none!important}
/* Roadside guidance is collected in Leerpunten, never across the windshield. */
#hint,#toast{display:none!important}
@media(max-width:700px){.learning-trigger{right:12px;bottom:calc(242px + env(safe-area-inset-bottom))}.learning-panel,.priority-panel{top:14px;right:12px;width:calc(100vw - 24px);max-height:calc(100dvh - 28px);padding:18px}.learning-panel header{align-items:flex-start}}
.priority-trigger{right:20px;bottom:242px;background:#d9e6cb;color:#20372e}.priority-panel{left:50%;right:auto;transform:translateX(-50%);width:min(560px,calc(100vw - 28px));top:24px;max-height:calc(100dvh - 48px)}.priority-panel h2{margin:5px 0 10px;font-size:24px}.priority-panel p{color:#d0ddd3}.priority-panel svg{display:block;width:100%;max-height:260px}.priority-choices{display:flex;flex-wrap:wrap;gap:8px}.priority-choices button{flex:1;min-width:110px}.priority-choices button:disabled{opacity:.45}.priority-panel footer{display:flex;justify-content:space-between;gap:10px;margin-top:18px}.priority-panel a{color:#c4e6b2}.priority-order{font-size:22px;font-weight:700}.priority-blink{animation:indicator .7s steps(1) infinite}@keyframes indicator{50%{opacity:.15}}@media(prefers-reduced-motion:reduce){.priority-blink{animation:none}}@media(max-width:700px){.priority-trigger{right:12px;bottom:calc(294px + env(safe-area-inset-bottom))}.priority-panel{top:12px;max-height:calc(100dvh - 24px)}.priority-panel svg{max-height:205px}}
/* An expanded mirror row owns its touch area; other optional prompts wait. */
body:has(.mirror-dock.revealed) .learning-trigger,body:has(.mirror-dock.revealed) .priority-trigger{visibility:hidden;pointer-events:none}
.priority-panel footer{position:sticky;bottom:-22px;background:#182e2c;padding:12px 0;margin-bottom:-8px}
/* Learning opens from the edge, with a clear heading and an anchored exit. */
.learning-panel,.priority-panel{box-sizing:border-box;animation:learning-arrive .25s ease-out}.learning-panel{top:18px;max-height:calc(100dvh - 36px)}.priority-panel{inset:18px 18px 18px auto;left:auto;right:18px;transform:none;margin:0;width:min(580px,calc(100vw - 36px));max-width:none;max-height:calc(100dvh - 36px);height:fit-content;overflow:auto}.priority-panel:not([open]){display:none}.priority-panel::backdrop{background:#07171555;backdrop-filter:blur(3px)}.priority-panel header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.priority-panel header h2{font-size:22px}.priority-intents{display:flex;flex-wrap:wrap;gap:6px}.priority-intents span{background:#ffffff0d;border:1px solid #ffffff14;padding:7px 10px;border-radius:11px;font-size:11px;flex:1}.priority-intents b{color:#d3e9ae}.priority-playback{margin-top:15px;border-top:1px solid #ffffff24;padding-top:12px}.priority-playback[hidden]{display:none}.priority-comment{padding:12px 15px;background:#ecffce0b;border-left:3px solid #dae9ba;border-radius:0 12px 12px 0}.priority-participants{display:flex;flex-direction:column;gap:5px}.priority-participants button{font-weight:400;text-align:left;font-size:12px}.priority-playback input[type=range]{display:block;width:100%;height:40px;accent-color:#dcebc1}.priority-playback output{float:right}.priority-play-controls{display:flex;align-items:center;gap:12px;margin:8px 0}.priority-play-controls button{background:#dceac6;color:#204030;flex:1}.priority-play-controls select{background:#233b34;border:1px solid #c4dac57a;border-radius:10px;padding:10px;color:#eff7e9;font-size:14px;min-height:44px}.priority-playback>small{color:#afc8b8}.learning-panel header{position:sticky;top:-22px;background:#1d3935ee;backdrop-filter:blur(20px);padding:8px 0;z-index:1}.learning-panel .ride-event{padding:12px 0}.learning-panel .ride-event small{display:block;color:#aec8bb;font-size:11px}.learning-panel .ride-event a{color:#d2e4b3}.learning-panel .ride-event img{max-width:100%;border-radius:12px}.priority-panel button:focus-visible,.learning-panel button:focus-visible{outline:3px solid #c7e0b6;outline-offset:3px}@keyframes learning-arrive{from{opacity:0;translate:20px 0}to{opacity:1;translate:0 0}}@media(prefers-reduced-motion:reduce){.learning-panel,.priority-panel{animation:none}}@media(max-width:700px){.learning-panel,.priority-panel{inset:10px 10px auto;max-height:calc(100dvh - 20px);width:calc(100vw - 20px);padding:16px}.priority-panel svg{max-height:220px}.priority-panel header h2{font-size:20px}.priority-panel footer{bottom:-16px}.learning-panel header{top:-16px}}
.graphics-recovery{position:fixed;right:18px;top:18px;z-index:150;width:min(360px,calc(100vw - 36px));box-sizing:border-box;padding:22px;border-radius:22px;background:#243a34f5;color:#edf7e8;border:1px solid #c1d3a87a;font:14px/1.5 system-ui;box-shadow:0 15px 50px #0005}.graphics-recovery button{background:#e0ebca;border:0;border-radius:12px;min-height:44px;padding:10px 16px;color:#1e392b;font-weight:600}
.priority-panel header{height:auto;min-height:0;padding:0;background:transparent;border:0}.priority-panel footer{height:auto;min-height:64px}.priority-panel output{font-size:12px}.priority-panel [data-lesson-id]{cursor:pointer}
.learning-panel,.priority-panel{backdrop-filter:none;-webkit-backdrop-filter:none}
/* During playback, keep the moving scene and its explanation together. */
.priority-reviewing>.priority-intents,.priority-reviewing>.priority-choices,.priority-reviewing>p,.priority-reviewing .priority-explanation>p{display:none}.priority-reviewing .priority-explanation{margin-top:10px}.priority-reviewing .priority-explanation>a{display:block;font-size:11px;margin-top:3px}.priority-reviewing .priority-participants{flex-direction:row}.priority-reviewing .priority-participants button{flex:1;min-width:0;font-size:11px;padding:8px}.priority-reviewing .priority-playback{margin-top:8px;padding-top:0;border:0}.priority-reviewing .priority-comment{margin:8px 0}.priority-reviewing>header{margin-bottom:12px}@media(max-width:700px){.priority-reviewing svg{max-height:190px}.priority-reviewing h2{font-size:18px}}
/* Native top-layer dialogs cover the driving HUD, including nested replays. */
.learning-panel:not([open]){display:none}.learning-panel{inset:16px 16px 16px auto;margin:0;width:min(660px,calc(100vw - 32px));max-height:calc(100dvh - 32px);height:auto}
.learning-panel::backdrop,.priority-panel::backdrop{background:#071513d9;backdrop-filter:blur(8px)}
.priority-panel{inset:16px;margin:auto;width:min(1100px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:26px}
.priority-panel .priority-scene svg{max-height:none;height:clamp(270px,46dvh,510px)}.priority-panel .priority-comment{font-size:17px;line-height:1.6}.priority-panel h2{font-size:27px}.priority-panel .priority-participants{flex-direction:row}.priority-panel .priority-participants button{flex:1}
@media(min-width:901px){.priority-panel{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(260px,1fr);gap:12px 28px}.priority-panel:not([open]){display:none}.priority-panel>header,.priority-panel>footer{grid-column:1/-1}.priority-scene{grid-column:1;grid-row:2/9;align-self:center}.priority-panel>:not(header):not(footer):not(.priority-scene){grid-column:2}.priority-reviewing>.priority-intents,.priority-reviewing>.priority-choices,.priority-reviewing>p{display:none}}
@media(max-width:700px){.learning-panel{inset:8px;width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}.priority-panel{inset:8px;width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:16px}.priority-panel .priority-scene svg{height:36dvh;min-height:260px}.priority-panel .priority-comment{font-size:15px}.priority-panel header h2{font-size:22px}.priority-panel footer{bottom:-16px}}
