.rotezi-route-panel{position:fixed;inset:0;z-index:1200;background:var(--page-bg,#f4f7fb);color:var(--ink,#13223a);overflow:auto}
.route-resume{position:sticky;top:0;z-index:1100;display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:max(10px,env(safe-area-inset-top)) 12px 10px;background:var(--card,#fff);color:var(--ink,#13223a);border-bottom:2px solid #126bd5}
.route-resume[hidden]{display:none!important}.route-resume span{flex:1 1 180px;font-size:.9rem;overflow-wrap:anywhere}.route-resume button{min-height:44px}.route-resume [data-route-discard]{min-width:44px}
.route-navigation{margin-bottom:14px;padding:14px;border:1px solid currentColor;border-radius:16px;overflow-wrap:anywhere}
.route-navigation[hidden],.route-navigation button[hidden],.route-map-position[hidden]{display:none!important}
.route-navigation>strong{display:block;font-size:1.05rem}.route-navigation .route-panel-actions{margin:12px 0}
.route-navigation-instruction{font-size:1.2rem;font-weight:800;line-height:1.4}.route-navigation small{display:block;line-height:1.45}
.route-map-position circle{fill:#126bd5;stroke:white;stroke-width:4}.route-map-position text{fill:#10233e;stroke:#fff;stroke-width:4;paint-order:stroke;font-size:15px;font-weight:800}
.route-map-world{position:absolute;inset:0;transform-origin:50% 50%;will-change:transform}
.route-map-world .route-map-overlay{overflow:visible}
.route-map-arrow{fill:#126bd5;stroke:#fff;stroke-width:3;stroke-linejoin:round;paint-order:stroke}
.route-map-arrow[hidden],.route-map-compass[hidden],.route-compass-status[hidden]{display:none!important}
.route-map-compass{position:absolute;top:10px;right:10px;z-index:2;display:flex;align-items:center;gap:9px;min-height:44px;max-width:calc(100% - 20px);padding:9px 12px;border:1px solid #bccbdc;border-radius:14px;background:#fff;color:#10233e;box-shadow:0 2px 12px #10233e26;font:inherit;font-size:.8rem;font-weight:700;cursor:pointer}
.route-map-compass:focus-visible{outline:3px solid #126bd5;outline-offset:3px}
.route-map-compass[aria-pressed="true"]{background:#eaf3ff;border-color:#126bd5}
.route-map-north{display:inline-block;color:#a02529;font-size:1rem;white-space:nowrap}
.route-compass-status{margin:10px 0 0}
.rotezi-route-panel.is-navigating .route-panel-form{display:none}.rotezi-route-panel.is-navigating .route-panel-grid{grid-template-columns:1fr}
.rotezi-route-panel.is-navigating .route-panel-status{display:none}
.rotezi-route-panel[hidden]{display:none}.route-panel-shell{width:min(1120px,100%);min-height:100%;margin:auto;padding:max(16px,env(safe-area-inset-top)) 16px max(20px,env(safe-area-inset-bottom))}
.route-panel-head{display:flex;align-items:center;gap:14px;margin-bottom:14px}.route-panel-head h2{margin:2px 0 0}.route-panel-back{min-width:44px;min-height:44px}.route-panel-grid{display:grid;grid-template-columns:minmax(280px,360px) 1fr;gap:16px}
.route-panel-form,.route-panel-map-card{border-radius:22px;background:var(--card,#fff);box-shadow:0 12px 34px rgba(18,36,62,.12);padding:18px}.route-panel-form label{display:grid;gap:6px;margin-bottom:13px;font-weight:700}.route-panel-form input{width:100%;min-height:46px;border:1px solid #a9b4c4;border-radius:12px;padding:10px 12px;background:transparent;color:inherit}.route-panel-actions{display:flex;flex-wrap:wrap;gap:9px}.route-panel-actions button{flex:1 1 145px}.route-panel-note{font-size:.83rem;line-height:1.45;color:var(--muted,#58677c)}
.route-panel-status{min-height:48px;margin:0 0 12px;padding:12px;border-radius:12px;background:#eef4f8}.route-panel-status[data-kind="error"]{background:#fff0ed;color:#7c2519}.route-panel-status[data-kind="success"]{background:#e8f7ef;color:#145d3b}
.route-map{position:relative;height:min(62vh,620px);min-height:360px;overflow:hidden;overflow:clip;border-radius:16px;background:#dbe7e8}.route-map-tiles{position:absolute;inset:0}.route-map-tiles img{position:absolute;width:256px;height:256px;user-select:none}.route-map-overlay{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.route-map-overlay polyline{fill:none;stroke:#126e82;stroke-width:6;stroke-linecap:round;stroke-linejoin:round}.route-map-marker{fill:#fff;stroke:#0b5362;stroke-width:5}.route-panel-summary{margin:12px 0 0;font-weight:700}
@media(max-width:760px){.route-panel-grid{grid-template-columns:1fr}.route-panel-map-card{padding:10px}.route-map{height:48vh;min-height:310px}.route-panel-shell{padding-inline:10px}.route-panel-form{padding:15px}}
html[data-theme="dark"] .rotezi-route-panel{background:#081428;color:#edf5ff}html[data-theme="dark"] .route-panel-form,html[data-theme="dark"] .route-panel-map-card{background:#10223a}html[data-theme="dark"] .route-panel-status{background:#1b334d}html[data-theme="dark"] .route-panel-note{color:#c2cede}html[data-theme="dark"] .route-panel-form input{border-color:#71839a}html[data-theme="dark"] .route-panel-status[data-kind="success"]{background:#123e31;color:#c9f8df}html[data-theme="dark"] .route-panel-status[data-kind="error"]{background:#4b211e;color:#ffe0da}
@media(prefers-color-scheme:dark){html:not([data-theme="light"]) .rotezi-route-panel{background:#081428;color:#edf5ff}html:not([data-theme="light"]) .route-panel-form,html:not([data-theme="light"]) .route-panel-map-card{background:#10223a}html:not([data-theme="light"]) .route-panel-status{background:#1b334d}html:not([data-theme="light"]) .route-panel-note{color:#c2cede}html:not([data-theme="light"]) .route-panel-form input{border-color:#71839a}html:not([data-theme="light"]) .route-panel-status[data-kind="success"]{background:#123e31;color:#c9f8df}html:not([data-theme="light"]) .route-panel-status[data-kind="error"]{background:#4b211e;color:#ffe0da}}

/* Visible attribution stays outside the rotating map; disclosure keeps the user in the app. */
.route-map-attribution{position:absolute;right:6px;bottom:5px;z-index:3;display:flex;align-items:center;gap:0;max-width:calc(100% - 12px);padding-left:2px;border-radius:3px;background:rgba(255,255,255,.94);color:#10233e;font-size:clamp(9px,2.4vw,11px);line-height:1.3}
.route-map-credit-names{white-space:nowrap}
.route-map-credit-disclosure{flex:none}
.route-map-attribution summary{display:grid;place-items:center;width:24px;height:24px;cursor:pointer;list-style:none;border-radius:3px;font:16px/1 Arial,sans-serif;color:#174f85}
.route-map-attribution summary::-webkit-details-marker{display:none}
.route-map-credit-panel{position:absolute;right:0;bottom:calc(100% + 6px);width:100%;max-height:min(320px,calc(max(310px,48vh) - 96px));overflow:auto;border:1px solid #bccbdc;border-radius:9px;background:#fff;box-shadow:0 2px 10px #10233e1a;font-size:12px;line-height:1.4}
.map-credits h3{margin:0 0 8px;font-size:1rem}.map-credits p{margin:0 0 10px;line-height:1.5}.map-credits ul{list-style:none;margin:0;padding:0}.map-credits li+li{margin-top:8px}.map-credits li>span{display:block;font-size:.85em;line-height:1.5}.map-credits a{display:inline-flex;align-items:center;min-height:44px;color:inherit;text-decoration:underline;font-weight:700}
.route-map-attribution .map-credits{padding:12px}.route-map-attribution .map-credits a{color:#174f85}
.route-map-credits-close{display:block;flex:none;min-height:36px;margin:0;padding:6px 9px;border:1px solid #a9b4c4;border-radius:9px;background:#eef4fa;color:#10233e;font:inherit;font-weight:700;cursor:pointer}
.route-map-attribution summary:focus-visible,.route-map-attribution a:focus-visible,.route-map-credits-close:focus-visible{outline:3px solid #126bd5;outline-offset:-3px}

.route-map-credit-toolbar{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px;background:#fff;border-bottom:1px solid #dae2ec}
.route-map-credit-toolbar h3{margin:0;font-size:14px;line-height:1.3}

/* Compact alternatives stay in the map panel and keep each mode explicit. */
.route-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:12px}
.route-choices[hidden],.route-choice-notice[hidden]{display:none!important}
.route-choices h3{grid-column:1/-1;margin:0 0 2px;text-align:center;font-size:1rem}
.route-choice{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:78px;padding:10px;border:1px solid #829bb3;border-radius:12px;background:transparent;color:inherit;text-align:center;font:inherit;cursor:pointer}
.route-choice:only-of-type{grid-column:1/-1}
.route-choice strong{font-size:.95rem;text-wrap:balance}.route-choice span{font-size:.82rem;line-height:1.4;text-wrap:pretty}.route-choice small{font-size:.76rem;line-height:1.4}
.route-choice[aria-pressed="true"]{border:2px solid #368de9;background:#368de918;padding:9px}
.route-choice:focus-visible{outline:3px solid #368de9;outline-offset:2px}
.route-choice:disabled{cursor:default}.route-choice-notice{font-size:.85rem;line-height:1.5;text-align:center;margin:8px 0 12px;padding:10px 6px;border-block:1px solid #829bb35c;text-wrap:pretty}
.route-reception-walk{display:block;margin:10px auto 0;min-height:44px}.route-map[data-mode="boat"] polyline{stroke-dasharray:9 8;stroke:#1567bc}
.rotezi-route-panel.is-navigating .route-choices{display:none}
@media(max-width:760px){.route-panel-shell{padding-inline:8px}.route-panel-form{padding:12px}.route-panel-head h2{font-size:1.25rem}.route-panel-note{margin-block:8px}.route-choices{grid-template-columns:1fr}.route-choice{min-height:68px}.route-navigation{padding:10px}.route-panel-map-card{padding:8px}}

.route-choice-overview{margin:0 0 6px;font-weight:650}.route-choice-notice summary{cursor:pointer;min-height:32px}.route-choice-notice details p{margin:8px 0 0}

.route-map-expand{position:absolute;top:10px;left:10px;z-index:3;min-height:44px;padding:8px 12px;border:1px solid #bccbdc;border-radius:12px;background:#fff;color:#10233e;font:inherit;font-size:12px;font-weight:700;cursor:pointer;}
.route-map-expanded-header[hidden]{display:none;}
.route-map-expanded-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;flex:none;}
.route-map-expanded-header button{min-height:44px;}
.rotezi-route-panel.is-map-expanded{overflow:hidden;}
.is-map-expanded .route-panel-head,.is-map-expanded .route-panel-form,.is-map-expanded #route-choices,.is-map-expanded .route-map-expand{display:none!important;}
.is-map-expanded .route-panel-shell{width:100%;height:100dvh;padding:0;min-height:0;}
.is-map-expanded .route-panel-grid{display:block;height:100%;}
.is-map-expanded .route-panel-map-card{display:flex;flex-direction:column;width:100%;height:100%;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px);box-sizing:border-box;border-radius:0;}
.is-map-expanded .route-map{flex:1;min-height:180px;height:auto;border-radius:0;}
.is-map-expanded .route-map-context{flex:none;max-height:38dvh;overflow-y:auto;padding:0 12px;overscroll-behavior:contain;}
.is-map-expanded .route-navigation{margin:10px 0;padding:10px;}
.is-map-expanded .route-navigation-instruction{font-size:1.05rem;}
.route-map:has(.route-map-expand) .route-map-compass{top:62px;}

/* The expanded view uses the same live engine, route and consent controls. */
.route-turn-card,.route-live-stats{display:none}
.route-turn-card[hidden],.route-live-stats[hidden],.route-turn-icon[hidden],.route-turn-next[hidden]{display:none!important}
.is-map-expanded .route-panel-map-card{position:relative;background:var(--card,#fff)}
.is-map-expanded .route-map{position:absolute;inset:0;width:100%;height:100%;min-height:0}
.is-map-expanded .route-map-expanded-header{position:absolute;z-index:7;left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));top:max(10px,env(safe-area-inset-top));padding:0;pointer-events:none}
.is-map-expanded .route-map-expanded-header>*{pointer-events:auto;background:#fff;color:#133455;border:1px solid #cbd7e5;box-shadow:0 3px 15px #06152b20;border-radius:12px}
.is-map-expanded .route-map-expanded-header>strong{font-size:11px;padding:10px;letter-spacing:.04em}
.is-map-expanded .route-map-expanded-header button{width:44px;min-width:44px;min-height:44px;padding:6px;font-size:17px;line-height:1}
.is-map-expanded .route-turn-card{display:block;position:absolute;z-index:6;top:max(65px,calc(env(safe-area-inset-top) + 55px));left:max(12px,env(safe-area-inset-left));width:min(380px,calc(100% - 24px));max-height:28dvh;overflow:auto;background:#0b315f;color:#fff;border:1px solid #487bab;border-radius:17px;box-shadow:0 7px 28px #02122730;animation:route-card-enter .25s ease-out}
.route-turn-main{display:flex;align-items:center;gap:12px;padding:12px 14px}.route-turn-main>div:last-child{min-width:0}
.route-turn-icon{flex:none;width:31px;height:31px;display:grid;place-items:center;color:#fff}.route-turn-icon svg{width:100%;height:100%}
.route-turn-distance{display:block;font-size:12px;line-height:1.3;color:#cce4ff;margin-bottom:3px}
.route-turn-instruction{display:block;font-size:18px;line-height:1.18;letter-spacing:-.02em;overflow-wrap:anywhere;text-wrap:pretty}
.route-turn-next{padding:7px 14px;background:#ffffff12;border-top:1px solid #ffffff1f;color:#dfefff;font-size:11px;line-height:1.3;overflow-wrap:anywhere}
.is-map-expanded .route-map-context{position:absolute;z-index:6;left:max(12px,env(safe-area-inset-left));bottom:max(34px,calc(env(safe-area-inset-bottom) + 28px));width:min(380px,calc(100% - 24px));max-height:32dvh;padding:11px 13px;overflow:auto;overscroll-behavior:contain;background:#fff;color:#13223a;border:1px solid #d9e3ef;border-radius:18px;box-shadow:0 8px 34px #03132c33;box-sizing:border-box;animation:route-card-enter .25s ease-out}
.is-map-expanded .route-live-stats{display:grid;grid-template-columns:1fr 1fr 1.2fr;gap:7px;text-align:center;padding:0 0 8px;margin:0 0 8px;border-bottom:1px solid #d9e3ef}
.route-live-stats>div{display:flex;flex-direction:column;gap:2px;min-width:0}.route-live-stats strong{font-size:21px;line-height:1.15;letter-spacing:-.025em}.route-live-stats span{font-size:10px;line-height:1.3;color:#58677c}
.is-map-expanded .route-navigation{border:0;padding:0;margin:0}
.is-map-expanded #route-navigation-destination{font-size:13px;line-height:1.4;color:#58677c;text-align:center}
.is-map-expanded .route-navigation .route-panel-actions{margin:8px 0 0;gap:8px;flex-wrap:nowrap}
.is-map-expanded .route-navigation .route-panel-actions button{min-height:44px;min-width:0;flex:1 1 0;font-size:13px;border-radius:12px;padding:8px 10px}
.is-map-expanded .route-choice-notice{font-size:12px;border:0;margin:0 0 10px;padding:0}
.is-map-expanded.has-walking-hud #route-panel-summary,.is-map-expanded.has-walking-hud #route-navigation-instruction,.is-map-expanded.has-walking-hud #route-navigation-progress,.is-map-expanded.has-walking-hud #route-navigation-status{display:none}
.is-map-expanded #route-panel-status[data-kind="success"],.is-map-expanded #route-compass-status[data-phase="ready"],.is-map-expanded #route-compass-status[data-phase="idle"]{display:none}
.is-map-expanded #route-panel-status[data-kind="error"]{display:block;min-height:0;margin:8px 0 0;padding:8px;font-size:12px}
.is-map-expanded #route-navigation-note:empty{display:none}
.is-map-expanded #route-navigation-note,.is-map-expanded #route-compass-status{font-size:12px;margin:6px 0}
.is-map-expanded #route-navigation>small{font-size:11px;margin-top:8px}
.is-map-expanded.has-live-guidance .route-map-context{display:grid;grid-template-columns:1fr 44px;align-items:center;gap:9px;padding:12px;max-height:27dvh}
.is-map-expanded.has-live-guidance .route-live-stats{padding:0;margin:0;border:0;gap:6px}
.is-map-expanded.has-live-guidance .route-navigation{margin:0;min-width:0}
.is-map-expanded.has-live-guidance .route-navigation .route-panel-actions{margin:0}
.is-map-expanded.has-live-guidance #route-navigation-destination,.is-map-expanded.has-live-guidance #route-navigation-note,.is-map-expanded.has-live-guidance #route-navigation>small,.is-map-expanded.has-live-guidance #route-choice-notice{display:none}
.is-map-expanded.has-live-guidance #route-compass-status,.is-map-expanded.has-live-guidance #route-panel-status{grid-column:1/-1;grid-row:2}
.is-map-expanded.is-navigating .route-navigation [data-route-panel="stop"]{width:44px;min-width:44px;min-height:44px;flex:none;padding:0;font-size:0;border-radius:50%;color:#9e292c;background:#feecee;border:1px solid #eebcbf}
.is-map-expanded.is-navigating .route-navigation [data-route-panel="stop"]::after{content:'✕';font-size:17px}
#rotezi-route-panel.is-map-expanded .route-map-compass{top:45%;right:max(12px,env(safe-area-inset-right));left:auto;max-width:150px;box-shadow:0 4px 20px #06152b24}
.is-map-expanded .route-map-attribution{bottom:max(4px,env(safe-area-inset-bottom));z-index:8}
.is-map-expanded .route-map-credit-panel{max-height:min(320px,65dvh)}
.is-map-expanded .route-map-overlay polyline{stroke:#126bd5;stroke-width:7;filter:drop-shadow(0 0 2px #fff)}
html[data-theme="dark"] .is-map-expanded .route-map-context,html[data-theme="dark"] .is-map-expanded .route-map-expanded-header>*{background:#10243d;color:#edf5ff;border-color:#5a7591}
html[data-theme="dark"] .route-live-stats span,html[data-theme="dark"] .is-map-expanded #route-navigation-destination{color:#c2cede}
html[data-theme="dark"] .is-map-expanded .route-live-stats{border-color:#365371}
html[data-theme="dark"] .is-map-expanded.is-navigating .route-navigation [data-route-panel="stop"]{background:#552c37;color:#ffdade;border-color:#976173}
@media(prefers-color-scheme:dark){html:not([data-theme="light"]) .is-map-expanded .route-map-context,html:not([data-theme="light"]) .is-map-expanded .route-map-expanded-header>*{background:#10243d;color:#edf5ff;border-color:#5a7591}html:not([data-theme="light"]) .route-live-stats span,html:not([data-theme="light"]) .is-map-expanded #route-navigation-destination{color:#c2cede}html:not([data-theme="light"]) .is-map-expanded .route-live-stats{border-color:#365371}html:not([data-theme="light"]) .is-map-expanded.is-navigating .route-navigation [data-route-panel="stop"]{background:#552c37;color:#ffdade;border-color:#976173}}
@media(max-height:550px) and (min-width:600px){.is-map-expanded .route-turn-card{max-width:280px;max-height:calc(100dvh - 100px)}.is-map-expanded .route-map-context{left:auto;right:max(12px,env(safe-area-inset-right));width:min(310px,48%);max-height:46dvh}}
@media(max-width:350px){.route-live-stats strong{font-size:19px}}
@keyframes route-card-enter{from{transform:translateY(8px);opacity:0}to{transform:translateY(0);opacity:1}}
@media(prefers-reduced-motion:reduce){.is-map-expanded .route-turn-card,.is-map-expanded .route-map-context{animation:none}}
.route-turn-scope{padding:0 14px 9px;font-size:11px;line-height:1.3;color:#dfefff}.route-turn-scope[hidden]{display:none!important}
.is-map-expanded.has-live-guidance .route-live-stats{grid-column:1;grid-row:1}
.is-map-expanded.has-live-guidance .route-navigation{grid-column:2;grid-row:1}
.is-map-expanded.has-walking-hud #route-navigation-destination{display:none}
/* Existing global theme button rules use !important. Keep the compact controls legible. */
#rotezi-route-panel.is-map-expanded .route-map-expanded-header button{background:#fff!important;color:#133455!important;border:1px solid #cbd7e5!important}
#rotezi-route-panel.is-map-expanded.is-navigating [data-route-panel="stop"]{background:#feecee!important;color:#9e292c!important;border:1px solid #eebcbf!important}
html[data-theme="dark"] #rotezi-route-panel.is-map-expanded .route-map-expanded-header button{background:#10243d!important;color:#edf5ff!important;border-color:#5a7591!important}
html[data-theme="dark"] #rotezi-route-panel.is-map-expanded.is-navigating [data-route-panel="stop"]{background:#552c37!important;color:#ffdade!important;border-color:#976173!important}
@media(prefers-color-scheme:dark){html:not([data-theme="light"]) #rotezi-route-panel.is-map-expanded .route-map-expanded-header button{background:#10243d!important;color:#edf5ff!important;border-color:#5a7591!important}html:not([data-theme="light"]) #rotezi-route-panel.is-map-expanded.is-navigating [data-route-panel="stop"]{background:#552c37!important;color:#ffdade!important;border-color:#976173!important}}

/* Text remains accessible through the button name even under legacy button typography. */
.route-stop-icon{display:none}
#rotezi-route-panel.is-map-expanded.is-navigating [data-route-panel="stop"]{width:44px!important;min-width:44px!important;max-width:44px!important;min-height:44px!important;flex:none!important;padding:0!important;font-size:17px!important;line-height:1!important}
#rotezi-route-panel.is-map-expanded.is-navigating [data-route-panel="stop"] .route-stop-label{display:none!important}
#rotezi-route-panel.is-map-expanded.is-navigating [data-route-panel="stop"] .route-stop-icon{display:inline!important}
#rotezi-route-panel.is-map-expanded.is-navigating [data-route-panel="stop"]::after{content:none!important}
