/* Keep the existing observatory layout; give reading and touch more room. */
.cos-label{font-size:13px;font-weight:400;line-height:20px;letter-spacing:.025em;color:#d2dfdd;padding:5px 10px;background:linear-gradient(100deg,#07131de0,#07131d70);border:1px solid #acc9ca18;border-radius:5px;text-shadow:0 1px 3px #0008;transform:none;white-space:nowrap;pointer-events:none}
.cos-label.is-selected{color:#ecfff8;border-color:#abd8c84d;background:#0c201ee8}
.leader-line{display:none}
#target-indicator{padding:6px 11px;min-width:0;font-size:12px;line-height:20px;border:1px solid #b1d1ce30;border-radius:5px;background:#091821cc;transform:translate(16px,-50%)}
.journey-image{height:145px}
.journey-image img{opacity:.95}
.journey-image::after{background:linear-gradient(180deg,transparent 45%,#12232a)}
.journey-option:has(img[src$="webb-deep-field.jpg"]) .journey-image img{object-position:50% 36%}
@media(max-width:520px){.journey-image{height:auto;align-self:stretch}.journey-image::after{background:linear-gradient(90deg,transparent,#12232a)}}
.tour-card,.cinema .tour-card{height:min(560px,calc(100dvh - 140px));max-height:none;overflow:auto;overflow-anchor:none}
.tour-card:not([hidden]){display:flex;flex-direction:column}
.tour-card>*{flex:0 0 auto}
.cinema .tour-card{left:32px;right:auto;top:110px;bottom:auto;transform:none;width:370px;padding:20px}
.tour-card #tour-text,.cinema .tour-subtitle{flex:1 1 0;min-height:0;max-height:none;margin:8px 0;font-size:16px;line-height:1.65;overflow:auto;overscroll-behavior:contain;overflow-anchor:none;scrollbar-gutter:stable}
.tour-audio-slot{height:20px;overflow:hidden}
.tour-card #tour-audio-state{min-height:0;height:20px;font-size:14px;line-height:20px;color:var(--gold);margin:0}
.cinema .tour-preferences{float:none;margin:8px 0;gap:12px}
.cinema .tour-actions{justify-content:space-between;margin-top:8px;gap:12px}
.tour-card .passage-controls{margin:4px 0 8px}
@media(max-width:800px){
 .passage-controls .text-button,.tour-actions .icon-button,.tour-card .compact{min-width:44px;min-height:44px}
 .tour-actions .button,.tour-preferences .text-button,.cinema-exit{min-height:44px}
 .tour-preferences label{min-height:44px;font-size:14px}
 .cinema .tour-subtitle,.tour-card #tour-text{font-size:16px;line-height:1.65}
 .tour-card{height:min(500px,68dvh,calc(100dvh - 100px));max-height:none}
 .cinema .tour-card{left:12px;top:auto;bottom:calc(14px + env(safe-area-inset-bottom,0px));width:min(370px,calc(100% - 24px));height:min(500px,68dvh,calc(100dvh - 100px - env(safe-area-inset-bottom,0px)));max-height:none;padding:14px 17px}
 .cinema-exit{top:calc(12px + env(safe-area-inset-top,0px));right:calc(12px + env(safe-area-inset-right,0px))}
 .modal-heading .icon-button{flex-shrink:0;min-width:44px;min-height:44px}
 .modal-heading>div{min-width:0}
 .settings-grid select,.travel-toolbar select{font-size:16px}
}
@media(max-width:800px) and (max-height:500px){
 .cinema .tour-card{top:calc(64px + env(safe-area-inset-top,0px));bottom:auto;height:calc(100dvh - 80px - env(safe-area-inset-top,0px));width:min(370px,calc(100% - 24px))}
 .tour-card #tour-text,.cinema .tour-subtitle{flex:0 0 96px}
}
/* The reader stays anchored; collapsing it is an explicit user action. */
.tour-card .panel-heading{flex-wrap:wrap;gap:4px 8px}
#journey-compact{order:2;margin-left:auto;min-height:36px;color:#bad8d1;font-size:12px}
#tour-close{margin-left:auto}
.tour-card.listening,.cinema .tour-card.listening{height:auto;max-height:calc(100dvh - 140px)}
.tour-card.listening #tour-text,.tour-card.listening #tour-subtitle,.tour-card.listening .passage-controls,.tour-card.listening .tour-preferences{display:none!important}
.tour-card.listening #tour-title{font-size:21px;margin:5px 0 10px}
.journey-extras{display:flex;flex-direction:column;align-items:flex-start;gap:5px;margin:8px 0;font-size:12px}
.journey-extras label{display:flex;align-items:center;gap:7px;min-height:28px;color:#adc1be}
#journey-deepen{font-size:13px;line-height:1.4;text-align:left;min-height:32px}
.journey-dialog,.journey-finish{color:#e8f1ed;background:#0d1b23f5;border:1px solid #a9c7bd33;border-radius:16px;padding:26px;box-shadow:0 25px 100px #0006;max-height:calc(100dvh - 48px);overflow:auto;overscroll-behavior:contain}
.journey-dialog{width:min(420px,calc(100vw - 36px));margin:auto auto auto 32px}
.journey-finish{width:min(620px,calc(100vw - 36px))}
.journey-dialog::backdrop{background:#01080e32}.journey-finish::backdrop{background:#01080e99;backdrop-filter:blur(5px)}
.journey-dialog h2,.journey-finish h2{font-size:clamp(23px,3vw,30px);line-height:1.2;margin:14px 0 20px}
.journey-dialog p,.journey-finish p{font-size:16px;line-height:1.7;color:#c5d6d2}
#moment-estimate{margin:22px 0}#moment-estimate label{font-size:14px}#moment-range{width:100%;margin:18px 0 0;accent-color:#d8b882;min-height:32px}
.estimate-ends{display:flex;justify-content:space-between;color:#849c99;font-size:12px}
#moment-result:not([hidden]){animation:journey-reveal .4s ease-out}#moment-answer{white-space:pre-line}
#moment-scale:not([hidden]){display:grid;grid-template-columns:repeat(10,1fr);gap:8px;margin-top:20px}
#moment-scale span{width:16px;height:16px;border-radius:50%;background:radial-gradient(circle at 30% 30%,#b7ded7,#458298 60%,#17373d)}
.moment-footer,.finish-actions{display:flex;flex-direction:column;align-items:flex-start;gap:10px;margin-top:24px}
.moment-footer button,.finish-actions button{min-height:44px;text-align:left}
#moment-listen{color:#9fb3b0;font-size:12px}#finish-places,.completed-places{color:#92b5ad;line-height:1.8;font-size:14px}
.journal-completion{border:1px solid #789d8938;border-radius:12px;padding:18px;margin:14px 0;background:#12302a30}.journal-completion h3{margin:0}.journal-completion p{line-height:1.7}
@keyframes journey-reveal{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
@media(max-width:800px){.journey-dialog{margin:auto auto calc(14px + env(safe-area-inset-bottom,0px));padding:22px}.tour-card.listening,.cinema .tour-card.listening{max-height:calc(100dvh - 90px)}#journey-compact,#journey-deepen,.journey-extras label{min-height:44px}}
@media(prefers-reduced-motion:reduce){#moment-result:not([hidden]){animation:none}}

/* A stable reading area across paragraphs and station titles. */
.tour-card #tour-title{min-height:2.4em;margin:8px 0;line-height:1.2}
.tour-card #tour-count{min-width:0;flex:1;line-height:1.5}
.tour-card #tour-text,.cinema .tour-subtitle{min-height:112px;flex:1 0 112px}
.journey-options{margin:6px 0 0;border-top:1px solid #acc9ca22}
.journey-options>summary{min-height:40px;padding:10px 0;cursor:pointer;color:#b8cdc8;font-size:14px}
.journey-options .tour-preferences{display:flex;float:none;margin:4px 0 8px;flex-wrap:wrap}
.journey-options .journey-extras{margin:4px 0 12px}
#journey-compact,#journey-deepen,.journey-extras label{font-size:14px}
.tour-card.listening #tour-title{min-height:0}
.tour-card.listening .journey-options .tour-preferences{display:flex!important}
@media(max-width:800px){
 .journey-options>summary{min-height:44px;padding:12px 0}
 .tour-card #tour-text,.cinema .tour-subtitle{min-height:96px;flex-basis:96px}
 .tour-card .tour-actions{position:sticky;bottom:-14px;background:#0c1924;z-index:1;padding:8px 0;margin-bottom:-6px}
}

#cosmos-continuous{min-height:0}
