/* Route profiles and continuation controls; independent of map/phone chrome. */
.profile-departure{margin:.45rem 0;font-size:1rem;font-weight:600}
.navigation-continuation{padding:.5rem 0}
.navigation-continuation p{margin:.5rem 0}
.navigation-continuation button{background:var(--accent,#ffbc00);color:var(--brand,#900027);border:1px solid currentColor;border-radius:1rem;padding:.7rem 1rem;font:inherit;font-weight:700}

/* Touch browsers retain :hover after a tap. Only the active page stays yellow. */
@media(hover:none){.view-button[aria-pressed=false]:hover{background:#fff;border-color:#e1d9d5}}

/* Instructions start at the panel edge, including short walking routes. */
body.results-view:not(.route-map-view):not(.network-results-view) #navigator-panel{padding-top:0}
.journey-updated{font-size:1rem;line-height:1.4}

/* One inline control starts, pauses and resumes the itinerary readout. */
#navigation-controls #voice-tools{margin:10px 0 0;padding:0;border:0;background:none}
#navigation-controls #voice-tools:not([hidden]){display:flex;gap:8px}
#navigation-controls #voice-tools button{flex:1;min-width:0;font:inherit;font-weight:750;color:#651020;background:#fff3c9;border:1px solid #e0c56b;border-radius:22px}
#navigation-controls #voice-tools button[hidden]{display:none}
body.instructions-reading #voice-toggle,body.results-view:not(.route-map-view):not(.network-results-view) #voice-toggle{display:none}

/* The guided assistant is a separate view of search, not a second form. */
body.search-view.assistant-active #navigator-panel>:not(#assistant):not(dialog){display:none!important}
body.assistant-active #search-tabs{display:none!important}
body.assistant-active #voice-toggle{display:none}
.assistant-head .assistant-actions{display:flex;flex:1;gap:.5rem;align-items:stretch}
.assistant-head .assistant-actions button{flex:1;min-width:0;margin:0;white-space:normal;font:inherit;font-weight:750;border-radius:22px}
.assistant-head #assistant-cancel{background:#fff3c9;color:#651020;border:1px solid #e0c56b}
.assistant-summary{background:none;border:0;border-radius:0;padding:0 0 0 1.3rem;margin:1rem 0;list-style:disc;white-space:normal;font-size:1rem}
.assistant-summary li{margin:.4rem 0}
.assistant-summary button{background:none;border:0;padding:0;color:inherit;text-align:left;font:inherit;text-decoration:underline;text-underline-offset:3px}
.assistant-question{white-space:normal;overflow:visible;text-overflow:clip;height:auto;max-height:none;margin:.8rem 0 .4rem}
@media(max-width:400px){.assistant-reply{flex-wrap:wrap}.assistant-reply input{flex:1;min-width:120px}.assistant-reply button[type=submit]{flex-basis:100%}}

/* Long select menus scroll inside the available panel instead of escaping it. */
.language-options,.line-direction-options{box-sizing:border-box;max-height:min(45dvh,320px);min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;scrollbar-width:thin;scrollbar-color:#a77516 #fff4d6;-webkit-overflow-scrolling:touch}
.language-options,.language-options *,.line-direction-options,.line-direction-options *{touch-action:pan-y!important}

/* Playback controls replace Listen in a stable row; destination stays below. */
.landmark-actions{display:grid;grid-template-columns:minmax(0,1fr)}
.landmark-reading-controls{display:flex;gap:8px;min-width:0;height:44px}
.landmark-reading-controls button{flex:1;min-width:0;height:44px;white-space:nowrap}
.landmark-reading-controls button[hidden]{display:none}

/* Relative delay and absolute clock are adjacent, mutually exclusive choices. */
#departure-delay{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:start}
.departure-relative{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;align-items:center}
.departure-relative>label{grid-column:1/-1}
.departure-clock-row{display:flex;flex-direction:column;gap:6px;align-items:stretch;min-width:0}
#departure-delay label{display:flex;align-items:center;gap:7px;font:inherit;font-weight:650;min-height:32px}
#departure-delay input[type=radio]{appearance:auto;flex:none;width:20px;height:20px;min-width:20px;min-height:20px;padding:0;margin:0;accent-color:#8e001c}
#departure-wheel{display:flex;width:96px;height:44px;padding:0 32px;background:linear-gradient(to right,#fff9ec 0 32px,#ffe49a 32px 64px,#fff9ec 64px);border-radius:12px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;touch-action:pan-x!important}
#departure-wheel .departure-wheel-value{flex:0 0 32px;width:32px;height:44px;line-height:44px;font-size:18px;touch-action:pan-x!important}
.departure-relative>span{font-size:16px;font-weight:600}
#departure-wheel[aria-disabled=true]{opacity:.45;pointer-events:none}
#departure-clock{box-sizing:border-box;width:100%;max-width:100%;padding:7px 4px;font-size:16px}
#departure-clock:disabled{opacity:.45}

/* Cost/settings choices fit more rows without shrinking their text. */
#navigator-settings .line-direction-options{gap:2px;padding:4px;margin-top:4px;border-radius:14px;max-height:min(60dvh,400px)}
#navigator-settings .line-direction-options button{box-sizing:border-box;min-height:44px;padding:6px 10px;gap:8px}
#map-style[hidden],#transfer-margin[hidden],#departure-window[hidden]{display:none!important}
#search #status[hidden]{display:none!important}
#search button.go{white-space:normal;overflow-wrap:anywhere}

/* Shared vocal actions: yellow primary pills and quiet secondary controls. */
.assistant-head .assistant-actions button,#assistant-send,#navigation-controls #voice-tools button,.landmark-reading-controls button{min-height:48px;border:1px solid #e4ba43;border-radius:24px;background:#ffb900;color:#8e001c;font:700 16px/1.25 system-ui;text-decoration:none}
.assistant-head #assistant-cancel,#navigation-controls #stop-reading,.landmark-reading-controls #landmark-stop{background:#fff4d6}
.landmark-reading-controls{height:48px}
#assistant-mic{display:grid;place-items:center;flex:0 0 48px;width:48px;height:48px;padding:10px;border:1px solid #e4ba43;border-radius:50%;background:#ffb900;color:#8e001c}
#assistant-mic>svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#assistant-start{position:relative;padding-bottom:17px}
#assistant-start.voice-speaking::after,#listen.voice-speaking::after{content:'';position:absolute;bottom:5px;left:calc(50% - 16px);width:32px;height:9px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 10'%3E%3Cpath d='M2 4v2M7 2v6M12 0v10M17 2v6M22 0v10M27 2v6M31 4v2' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat;animation:assistant-speaking .6s ease-in-out infinite alternate}
@keyframes assistant-speaking{from{transform:scaleY(.35)}to{transform:scaleY(1)}}
@media(prefers-reduced-motion:reduce){#assistant-start.voice-speaking::after,#listen.voice-speaking::after{animation:none}}

/* Instruction playback keeps one main action and a compact circular close. */
#navigation-controls #voice-tools #stop-reading{flex:0 0 48px;width:48px;height:48px;padding:12px;border-radius:50%;align-self:center;display:grid;place-items:center}
#navigation-controls #voice-tools #stop-reading[hidden]{display:none}
#stop-reading svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round}
#navigation-controls #voice-tools #listen{position:relative;display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 16px;box-sizing:border-box}
#navigation-controls #voice-tools #listen.voice-speaking::after{position:static;flex:0 0 32px;height:12px}
#navigation-controls #voice-tools #stop-reading{flex-basis:44px;width:44px;height:44px;min-height:44px;padding:10px}
#assistant{background:none;border:0;box-shadow:none;padding:0}

#assistant .assistant-actions #assistant-cancel{flex:0 0 48px;width:48px;height:48px;min-width:48px;padding:12px;border-radius:50%;align-self:center;display:grid;place-items:center}
#assistant .assistant-actions #assistant-cancel[hidden]{display:none}
#assistant-cancel svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round}
body.assistant-active #assistant .assistant-title{display:none}
body.assistant-active #assistant .assistant-head{padding-right:0}

#assistant .assistant-actions{width:100%;box-sizing:border-box}
body.assistant-active #assistant-answer{display:none!important}
#assistant-summary{list-style:none;padding:0}
#assistant-summary li{margin:12px 0}
#assistant-summary form{margin:0;padding:0;border:0;box-shadow:none;background:none}
#assistant-summary label{display:block;margin-bottom:6px;font-weight:700}
#assistant-summary .field{margin:0}
#assistant-summary input{min-width:0;width:100%;font:inherit;padding:12px;border:0;background:transparent;box-sizing:border-box}
#assistant-listening{display:none}
#assistant-listening.mic-wave-button{display:block;width:64px;height:40px;margin:8px 0;color:#8e001c;background:#ffb900;border-radius:20px}

/* Navigation owns a single pause/resume action and a circular close in its card. */
#navigation-controls #navigation-stop{flex:0 0 44px;width:44px;height:44px;padding:10px;border-radius:50%;display:grid;place-items:center;background:#fff4d6;border:1px solid #e4ba43}
#navigation-stop svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round}

#home-destination::-webkit-search-cancel-button{display:none}
