/* Calm passenger mode; a visible pause button remains available throughout. */
.view-tools button[aria-pressed="true"]{background:#403b32;border-color:#403b32;color:#fbf9f5}   /* the one choice that is on (Eric 2026-09-26: highlighted) */
.view-tools{top:144px;left:20px;right:20px;justify-content:flex-end;max-width:none;gap:6px}
.view-tools #recenterButton{min-width:44px;padding:8px 4px;background:none;border-color:transparent;box-shadow:none;color:#403b32;text-decoration:underline;text-underline-offset:3px;text-shadow:0 0 5px #fbf9f5}   /* a text link, not a fourth pill: only while no choice is on and the look is off-centre (app.mjs) */
.passenger-options{display:flex;justify-content:space-between;gap:8px;margin-top:10px}
.passenger-options button{min-height:44px;padding:9px 12px;border-radius:24px;border:1px solid var(--line);color:var(--muted);background:#fbf9f5b8;font-size:11px}
.passenger-options button:active{background:#eee3cb}
.restore-controls{position:absolute;z-index:5;bottom:max(20px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);min-height:44px;min-width:132px;padding:10px 20px;border:1px solid #ddd3c2;border-radius:30px;background:#fbf9f5e8;color:#403b32;font-size:12px;box-shadow:0 3px 20px #302d2817}
.phone[data-immersive="true"] .controls,.phone[data-immersive="true"] .view-caption,.phone[data-immersive="true"] .topbar .identity,.phone[data-immersive="true"] #infoButton{display:none}
.phone[data-immersive="true"] .topbar{justify-content:flex-end;background:transparent;pointer-events:none}
.phone[data-immersive="true"] #pauseButton,.phone[data-immersive="true"] #musicButton{pointer-events:auto}
.phone[data-immersive="true"] #musicButton{margin-right:49px}   /* while riding, the ⋯ restore button takes the slot left of pause (#restoreControlsButton right 63/68 px) */
.phone[data-immersive="true"] .vignette{background:linear-gradient(transparent 82%,#302d2815)}
[data-mode="driver"] .passenger-options{display:none}
.detail-dialog{width:min(430px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;border-radius:22px;overscroll-behavior:contain}
.detail-heading{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;padding:12px 18px 6px;background:#fbf9f5f5;gap:8px}
.detail-heading .eyebrow{margin:0}
.detail-tabs{display:flex;padding:0 18px 12px;gap:8px;overflow-x:auto}
.detail-tabs button{min-width:75px;min-height:44px;flex:1;border-radius:22px;padding:8px;font-size:12px;border:1px solid var(--line);background:transparent;color:var(--muted)}
.detail-tabs button[aria-pressed="true"]{background:#efe5d0;border-color:#b49b66;color:#55411e;font-weight:600}
.detail-photo{position:relative;overflow:hidden;width:100%;background:#ece3d3;aspect-ratio:1.53}
.detail-photo img{position:absolute;max-width:none;object-fit:fill}
.detail-copy{padding:16px 22px 22px}
.detail-copy h2{margin:0 0 8px;font-size:22px;line-height:1.5}
.detail-copy>p{margin:8px 0 0;font-size:14px;line-height:1.8}
.detail-copy .detail-note{font-size:11px;line-height:1.8;color:#81745f}
.detail-copy .primary-button{margin-top:14px}
.detail-dialog::backdrop{background:#30281c59;backdrop-filter:blur(3px)}
.service-link{text-decoration:none;margin-top:18px}
.finish-overlay .site-link{display:block;margin-top:16px;padding:8px 0;text-align:center;font-size:12px;color:var(--muted);text-decoration:underline;text-underline-offset:3px}
.finish-overlay .restart-button{margin-top:12px;width:100%;min-height:46px;background:transparent;border:1px solid var(--line);border-radius:12px;color:var(--muted);font-size:12px}
.phone[data-paused="true"] .restore-controls{display:none}
.phone[data-finish-stage="parked"] .view-tools{visibility:visible}
.parked-panel{position:absolute;z-index:4;bottom:0;left:0;right:0;padding:36px 20px max(18px,env(safe-area-inset-bottom));background:linear-gradient(transparent,#fbf9f5f2 24%,var(--cream) 60%);color:var(--ink)}
.parked-panel .eyebrow{font-size:11px;margin:0 0 5px}
.parked-panel h2{font:400 27px/1.45 "Songti TC","Noto Serif TC",serif;letter-spacing:.04em;margin:0 0 5px}
.parked-panel>p:not(.eyebrow){font-size:11px;line-height:1.7;margin:0 0 13px;color:var(--muted)}
.parked-actions{display:flex;gap:9px}.parked-actions .light-button{flex:1}.parked-actions .primary-button{flex:1.6;min-height:48px;padding:12px;font-size:12px;gap:6px}
.finish-overlay .overlay-card{max-height:100%;overflow-y:auto;overscroll-behavior:contain;padding:4px}
@media(max-height:710px) and (orientation:portrait){.parked-panel{padding:27px 16px 14px}.parked-panel h2{font-size:24px}.parked-panel>p:not(.eyebrow){margin-bottom:9px}.finish-overlay .overlay-card h2{font-size:29px;margin:10px 0}.finish-overlay .overlay-card>.primary-button{margin-top:16px}.finish-overlay .overlay-card .scope-note{margin-top:13px}}
@media(orientation:landscape) and (max-height:600px){.parked-panel{left:58%;top:0;padding:22px;display:flex;flex-direction:column;justify-content:center;background:var(--cream)}.parked-panel h2{font-size:25px}.parked-actions{flex-direction:column}.parked-actions .primary-button{min-height:46px}.finish-overlay .overlay-card h2{font-size:25px}.finish-overlay .overlay-card>p{font-size:11px;line-height:1.6}.finish-overlay .overlay-card>.primary-button{margin-top:10px}.finish-overlay .restart-button{margin-top:7px;min-height:44px}.finish-overlay .overlay-card .scope-note{margin-top:10px;font-size:11px}}
@media(max-height:710px) and (orientation:portrait){.passenger-options{margin-top:5px}.passenger-options button{padding:8px 11px}.view-tools{top:123px}.detail-copy{padding:13px 18px 18px}.detail-copy h2{font-size:21px}.detail-copy>p{font-size:13px}.detail-copy .detail-note{font-size:11px}}
@media(orientation:landscape) and (max-height:600px){.view-tools{left:12px;right:44%;top:auto;bottom:12px}.phone[data-immersive="true"] .view-tools{bottom:48px}.passenger-options{flex-direction:column}.restore-controls{left:29%;bottom:15px}.phone[data-immersive="true"] .view{right:0}.phone[data-immersive="true"] .topbar{right:0}.phone[data-immersive="true"] .restore-controls{left:50%}.detail-dialog{width:min(720px,calc(100vw - 24px))}.detail-photo{display:none}.detail-tabs{padding-bottom:4px}.detail-copy{padding-top:10px}.detail-copy h2{font-size:20px}.detail-copy .primary-button{margin-top:10px}.detail-copy .detail-note{font-size:11px}}
/* After departure (Eric 2026-09-26): immersive by default. The guide line and the trip line live
   outside .controls/.view-caption, so the immersive mode never hides them; pause stays top right. */
.phone[data-mode="passenger"] .telemetry,.phone[data-mode="passenger"] .seat-label{display:none}
/* No metre counter anywhere; the rail shows progress. km/h stays only in the driving toy (README: the one exception). */
.guide-line{position:absolute;z-index:6;top:max(78px,calc(env(safe-area-inset-top) + 60px));left:16px;right:16px;width:fit-content;max-width:calc(100% - 32px);margin:0 auto;padding:9px 14px;border-radius:12px;background:#fbf9f5eb;color:#302d28;font-size:15px;line-height:1.6;box-shadow:0 2px 14px #32281a1c;pointer-events:none;animation:seat-welcome .3s ease-out both}   /* z 6: above the seat overlay (5) so the guide's introduction shows; under pause (7) */
.guide-speaker{margin-right:8px;font-size:11px;font-weight:600;letter-spacing:.12em;color:#866315}
.phone:has(#guideLine:not([hidden])) .view-caption{visibility:hidden}
/* A two-line subtitle ends at ~144 px: the view choices move below it while it shows, and below the driving caption. */
@media(orientation:portrait){.phone:has(#guideLine:not([hidden])) .view-tools,.phone[data-mode="driver"] .view-tools{top:156px}}
.trip-line{position:absolute;z-index:4;left:20px;right:20px;bottom:max(18px,env(safe-area-inset-bottom));display:flex;align-items:center;gap:10px;font-size:11px;color:#403b32;pointer-events:none}
.trip-line>span:not(.trip-rail){padding:3px 8px;border-radius:6px;background:#fbf9f5e0;white-space:nowrap}
.trip-rail{position:relative;flex:1;height:2px;border-radius:2px;background:#fbf9f5d9;box-shadow:0 1px 3px #0003}
#tripDot{position:absolute;top:50%;left:0;width:10px;height:10px;margin:-5px 0 0 -5px;border-radius:50%;background:#f7c009;border:1.5px solid #74603a;transition:left .3s linear}
#restoreControlsButton{top:max(18px,env(safe-area-inset-top));right:68px;bottom:auto;left:auto;transform:none;width:44px;min-width:44px;height:44px;padding:0;border-radius:50%;font-size:20px;line-height:1}
@media(max-width:850px){#restoreControlsButton{right:63px}}
/* The seat is a frame of the same 3D cabin until the live cabin has drawn, then it cross-fades. */
.seat-still{position:absolute;inset:0;z-index:1;width:100%;height:100%;object-fit:cover;pointer-events:none;transition:opacity .6s ease}
.vignette{z-index:1}
.phone[data-live-cabin="true"] .seat-still{opacity:0}
.ride-veil{position:absolute;inset:0;z-index:2;background:var(--cream);pointer-events:none}   /* v17 fade while rolling: app.mjs sets opacity from video time; above the seat still, under the UI */
.city-recovery-status{position:absolute;inset:0;z-index:3;padding:24px;pointer-events:none}
@media(prefers-reduced-motion:reduce){.guide-line{animation:none}#tripDot{transition:none}}
/* Short visitor lines: no one-character last line (叫/我。) on narrow phones. */
.guide-line{text-wrap:balance;word-break:keep-all;overflow-wrap:anywhere}   /* break at the comma, not inside 中文導遊 */
/* Landscape seat: the seat card fills the right 42%; the guide's introduction stays over the cabin half. */
@media(orientation:landscape) and (max-height:600px){.phone[data-seated="true"] .guide-line{right:calc(42% + 16px)}}
.overlay-card p,.detail-copy p,dialog p,.arrival-copy p,.intro-copy p,.parked-panel p{text-wrap:pretty}
