/* Mobile listening refinement; the Observation Deck palette and assets are unchanged. */
.player {height:auto!important;min-height:0;align-items:center}
.audio-track {display:grid;grid-template-columns:max-content minmax(80px,1fr) max-content;gap:10px;font-size:12px;font-variant-numeric:tabular-nums}
.audio-track span {max-width:none!important;overflow:visible!important;white-space:nowrap}
.audio-track input {height:44px;min-height:44px;margin:0;min-width:0}
.player button {flex-shrink:0}
.mobile-setting {display:flex;flex-direction:column;align-items:flex-start;text-align:left;background:none;color:var(--text);border:0;border-left:1px solid var(--gold);padding:4px 0 4px 12px;margin:0 0 14px;gap:4px;max-width:100%;min-height:48px}
.mobile-setting strong {font:22px/1.25 'Baskerville','Palatino Linotype',Georgia,serif;font-weight:400;overflow-wrap:break-word;word-break:normal}
.mobile-setting strong span {font:13px var(--mono);color:var(--muted)}
.schematic-label {position:absolute;top:0;left:0;z-index:6;display:block!important;min-height:44px;padding:8px 0;font:10px/1.4 var(--mono);letter-spacing:.2px;color:#c5d2d0;background:none;border:0;pointer-events:auto}
.atlas-schematic {position:static;padding:4px 0}
.scene-map-top {top:45px!important}
.scene-map-top .eyebrow {display:none}
.nonspatial-label {position:absolute;top:31%;left:6%;right:6%;text-align:center;color:var(--muted);font:13px/1.6 var(--mono);z-index:2}
.nonspatial-label:empty {display:none}
.nonspatial-setting .narrative-lens,.nonspatial-setting .lens-coordinate {display:none}
.kind-unknown .star-core {border-radius:0;background:transparent;border:1px solid currentColor;box-shadow:none!important}
.kind-planet .star-core {background:transparent;border:2px solid currentColor;box-shadow:none!important}
.kind-habitat .star-core {border-radius:0;transform:rotate(45deg);box-shadow:none!important}
.star-node {min-width:44px;min-height:44px}
.journey-view .world {transition:opacity .2s ease!important}
.scene-arrives .narrative-lens {animation:none!important}
.journey-view .journey-map-caption {gap:4px}
.journey-map-caption .map-caption-note {font-size:10px;line-height:1.4}
.journey-map-caption .lens-explore {display:flex!important;min-height:44px!important}
.scene-evidence {margin:0 0 24px;display:grid;gap:14px}
.scene-evidence div {padding-bottom:12px;border-bottom:1px solid var(--line)}
.scene-evidence dt {font:10px/1.5 var(--mono);text-transform:uppercase;letter-spacing:.5px;color:var(--muted)}
.scene-evidence dd {margin:5px 0 0;font-size:14px;line-height:1.65;color:var(--text)}
.scene-evidence small {display:block;color:var(--muted)}
.scene-evidence button,.location-observations button {min-height:44px}
.location-observations {display:grid;gap:14px}
.location-observations article {display:flex;flex-direction:column;align-items:flex-start;padding:14px 0;border-bottom:1px solid var(--line);gap:6px;font-size:13px;line-height:1.5}
.location-observations small,.location-observations span {color:var(--muted)}
.place-kind {font:11px/1.5 var(--mono);color:var(--gold)}
.distance-reading {padding:18px 0;margin:12px 0;border-block:1px solid var(--line);display:flex;flex-direction:column;gap:9px}
.distance-reading strong {font:28px/1.2 Georgia,serif;color:var(--text)}
.distance-reading p {margin:0;font-size:14px}
.distance-reading small {line-height:1.6;color:var(--muted)}
.distance-reading a {display:inline-flex;align-items:center;min-height:44px;color:var(--gold);font-size:12px;line-height:1.5}
.journey-view #space {touch-action:pan-y!important}
body[data-view=atlas] #space {touch-action:none}
.mobile-notes {display:inline-flex!important;align-items:center;gap:8px}
.mobile-notes span {font-size:12px;white-space:nowrap}
#dialog {max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow:auto}
@media(max-width:760px) {
 :root {--player:176px}
 .journey-view #main {padding:6px 18px 20px!important;min-height:0}
 .journey-stage {grid-template-columns:1fr!important;grid-template-rows:auto auto auto!important;gap:0!important}
 .journey-topline {min-height:36px!important;padding:0!important;border:0;align-items:center}
 .journey-book-switch {min-height:36px;gap:6px}
 .journey-book-switch .book-index {font-size:14px;width:24px;height:auto}
 .journey-book-switch .book-index:after,.journey-book-switch small {display:none}
 .journey-book-switch strong {font-size:11px}
 .journey-left {padding:4px 0 0!important;grid-column:1!important;grid-row:2!important}
 .journey-handoff {font-size:10px!important;line-height:1.5;letter-spacing:.1px;margin:0!important;max-width:100%;overflow-wrap:break-word}
 .journey-heading h1 {margin:4px 0!important;line-height:1}
 .journey-heading h1 .heading-lead {display:none}
 .journey-heading h1 em {font-size:clamp(42px,12vw,56px)!important;line-height:1.05;letter-spacing:-1.6px;overflow-wrap:break-word;word-break:normal}
 .mobile-setting {display:flex!important;min-height:48px;margin:2px 0 4px!important;padding:3px 0 3px 10px!important;gap:2px}
 .mobile-setting .eyebrow {font-size:9px!important;letter-spacing:.6px}
 .mobile-setting strong {font-size:21px!important;line-height:1.2!important;overflow-wrap:break-word!important}
 .chapter-name {font-size:12px!important;line-height:1.45!important;margin:2px 0!important;max-width:100%}
 .chapter-name>span {font-size:10px!important;display:inline!important;margin-right:8px;letter-spacing:.4px}
 .journey-scene-date {font-size:12px!important;line-height:1.5!important;margin-top:0}
 .journey-primary-actions {margin-top:3px!important;min-height:44px;gap:8px}
 .mobile-notes {width:auto!important;min-width:44px!important;padding:0 8px 0 0!important}
 .mobile-notes span {display:inline!important}
 .mobile-orientation {display:none!important}
 .journey-map {grid-column:1!important;grid-row:3!important;min-height:250px!important;margin:0!important}
 .narrative-lens {width:180px!important;height:180px!important;top:39%;opacity:.65}
 .lens-coordinate-bottom {display:none}
 .journey-map-caption {top:auto!important;bottom:0!important;left:0!important;right:0!important;gap:2px!important}
 .journey-map-caption strong {font-size:21px!important;line-height:1.2!important}
 .journey-map-caption small {font-size:10px!important;line-height:1.4!important}
 .journey-map-caption .map-follow-state {display:none!important}
 .journey-map-caption .map-caption-note {font-size:10px!important}
 .journey-map-caption .lens-explore {font-size:10px!important;min-height:44px!important;padding:8px 0!important}
 .schematic-label {font-size:10px;min-height:44px}
 .setting-origin {font-size:9px}
 .journey-view .journey-lower {margin-top:12px!important}
 .player {grid-template-columns:minmax(0,1fr) 44px!important;grid-template-rows:52px auto!important;gap:3px 8px!important;padding:6px max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important;align-content:start}
 .player-track {grid-column:1;grid-row:1;height:52px!important;min-width:0;gap:8px}
 .mini-cover {width:28px;min-width:28px;height:44px}
 .track-copy {position:relative;flex:1;height:52px;min-width:0}
 .track-copy .eyebrow {position:absolute;top:0;left:0;right:0;display:block;font-size:9px!important;line-height:12px;letter-spacing:.1px;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .track-copy strong {position:absolute;top:12px;left:0;right:0;font-size:12px!important;line-height:16px;margin:0;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .chapter-button {position:absolute;inset:0;width:100%;height:52px!important;min-height:52px!important;padding:27px 0 0!important;text-align:left;font-size:11px!important;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .player-extras {grid-column:2;grid-row:1;min-width:44px!important;height:52px!important;padding:0!important}
 .player-extras .follow-reader {width:44px!important;height:44px!important;min-height:44px!important;padding:8px!important}
 .playback {grid-column:1/-1;grid-row:2!important;display:grid!important;grid-template-rows:52px 44px!important;gap:2px!important;min-width:0}
 .playback-buttons {display:grid!important;grid-template-columns:repeat(5,minmax(44px,1fr))!important;gap:0!important;height:52px!important;width:100%}
 .playback-buttons>button {width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important}
 .playback-buttons>.play-button {width:52px!important;height:52px!important}
 .audio-track {height:44px!important;grid-template-columns:max-content minmax(60px,1fr) max-content!important;gap:8px!important;font-size:12px!important;line-height:1.5}
 .audio-track input {height:44px!important;min-height:44px!important}
 .audio-track span {min-width:3.5ch!important;max-width:none!important;overflow:visible!important}
 .audio-track input:focus-visible {outline:2px solid var(--gold);outline-offset:0}
 .return-journey {min-height:44px}
}
@media(max-width:370px) {
 .journey-view #main {padding-inline:14px!important}
 .journey-map {min-height:220px!important}
 .chapter-name {font-size:11px!important}
 .mobile-setting strong {font-size:20px!important}
}
@media(max-height:500px) and (orientation:landscape) {
 .journey-view #main {overflow-y:auto!important}
 .journey-stage {grid-template-columns:minmax(0,1fr) minmax(200px,1fr)!important;grid-template-rows:auto auto!important}
 .journey-topline {grid-column:1!important;grid-row:1!important}
 .journey-left {grid-column:1!important;grid-row:2!important}
 .journey-map {grid-column:2!important;grid-row:1 / span 2!important;min-height:245px!important}
 .journey-context,.journey-memory {display:none!important}
 .journey-heading h1 em {font-size:40px!important}
 .player {padding-top:4px!important;padding-bottom:max(4px,env(safe-area-inset-bottom))!important;grid-template-columns:minmax(140px,.65fr) minmax(260px,1fr) 44px!important;grid-template-rows:auto!important;gap:8px!important}
 .player-track {grid-column:1;grid-row:1}
 .playback {grid-column:2!important;grid-row:1!important}
 .player-extras {grid-column:3!important;grid-row:1!important}
}
@media(prefers-reduced-motion:reduce) {
 *,*::before,*::after {scroll-behavior:auto!important}
 .world,.journey-stage,.narrative-lens {animation:none!important;transition:none!important}
}
.mobile-notes {flex-direction:row!important}
@media(max-height:500px) and (orientation:landscape) {
 .journey-view #main {padding:6px 16px 20px!important}
 .journey-stage {min-height:0!important;flex:none!important;grid-template-rows:auto!important;align-items:start}
 .journey-topline {display:none!important}
 .journey-left {grid-row:1!important;min-height:0!important;padding:0!important;justify-content:flex-start!important;gap:0!important}
 .journey-heading {display:block!important;min-height:0!important}
 .journey-heading h1 {margin:2px 0!important;line-height:1!important}
 .journey-heading h1 .heading-lead {display:none!important}
 .journey-heading h1 em {font-size:34px!important;line-height:1.05;letter-spacing:-1px}
 .journey-handoff {font-size:10px!important;line-height:1.4;letter-spacing:0}
 .mobile-setting {min-height:44px!important;margin:3px 0!important;padding:1px 0 1px 8px!important}
 .mobile-setting .eyebrow {font-size:8px!important;line-height:1.2}
 .mobile-setting strong {font-size:19px!important;line-height:1.2}
 .chapter-name {margin:0!important;font-size:11px!important;line-height:1.4!important;max-width:none}
 .chapter-name>span {display:inline!important;font-size:9px!important;line-height:1.4;margin-right:6px}
 .journey-scene-date {font-size:11px!important;line-height:1.4;margin:2px 0!important}
 .journey-primary-actions {margin:3px 0 0!important;min-height:44px!important}
 .time-jump,.mobile-orientation {display:none!important}
 .journey-map {min-height:225px!important}
}

/* Dense cumulative maps: text stays in screen pixels, never scales with camera zoom. */
#space[data-map-layout] {z-index:0;isolation:isolate}
#space[data-map-layout] .world {inset:56px 12px 56px!important;transform:none!important;transition:none!important;will-change:auto}
#space[data-map-layout] #star-nodes {overflow:hidden;pointer-events:none}
#space[data-map-layout] #orbital-grid {opacity:.35;pointer-events:none}
#space[data-map-layout] #trails {pointer-events:none;overflow:hidden}
#space[data-map-layout] .star-node {position:absolute;display:block;width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;padding:0!important;transform:translate(-50%,-50%);z-index:2;pointer-events:auto;transition:none;text-shadow:none;opacity:1!important;color:#bed0d3;overflow:visible}
#space[data-map-layout] .star-node .star-core {position:absolute;left:19px;top:19px;width:6px;height:6px;margin:0}
#space[data-map-layout] .star-node .star-core:before {inset:-8px;box-shadow:none}
#space[data-map-layout] .star-node .star-core:after {display:none}
#space[data-map-layout] .star-node.selected {z-index:3;color:var(--gold)}
#space[data-map-layout] .star-node.selected .star-core {width:8px;height:8px;left:18px;top:18px}
#space[data-map-layout] .star-node.selected .star-core:before {inset:-10px}
#space[data-map-layout] .star-node:focus-visible {outline-offset:-2px;border-radius:50%;z-index:4}
#space[data-map-layout] .star-label,.map-label-measure {box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:max-content;max-width:180px;min-height:44px;margin:0;padding:5px 8px;background:#09171ff2;border:1px solid #88aab32b;border-radius:4px;font:12px/16px 'Avenir Next','Segoe UI',Arial,sans-serif;font-weight:500;letter-spacing:0;white-space:normal!important;overflow-wrap:anywhere;text-align:center;color:#c6d8dc;text-shadow:none}
#space[data-map-layout] .star-label {position:absolute;visibility:visible}
#space[data-map-layout] .star-label[hidden] {display:none!important}
#space[data-map-layout] .star-node.selected .star-label {color:#ecd4aa;border-color:#ddbb735a}
#space[data-map-layout] .map-label-measure {position:absolute;visibility:hidden;pointer-events:none;inset:0 auto auto 0}
.map-cluster-count {position:absolute;inset:6px;display:grid;place-items:center;border:1px solid #9eb6bd77;border-radius:50%;background:#142b37;color:#d9e2de;font:11px/1 var(--mono)}
.map-cluster-count[hidden] {display:none!important}
.selected .map-cluster-count {border-color:var(--gold);color:var(--gold);background:#1d292c}
.dense-map-controls {position:absolute;top:4px;left:12px;right:12px;display:flex;align-items:center;gap:8px;z-index:8;pointer-events:auto}
.dense-map-controls button {min-width:44px;min-height:44px;padding:7px 10px;background:#0c1d27ed;border:1px solid #819da447;border-radius:4px;font:11px/1.3 var(--mono);color:#c7d8d6;white-space:nowrap}
.dense-map-controls button:hover {border-color:#e2c387; background:#17303d}
.dense-map-controls button:disabled {opacity:.4}
.dense-map-zoom {display:flex;gap:2px;margin-left:auto}
.dense-map-zoom button {padding:4px;width:44px;font-size:16px}
.dense-map-zoom [data-action=reset-map] {font-size:11px}
.journey-view .dense-map-controls {left:auto;right:0;top:0}
.journey-view .dense-map-zoom,.journey-view .map-listen-button {display:none}
.journey-view .schematic-label {max-width:calc(100% - 106px);white-space:normal}
.journey-view .scene-map-top,.journey-view .lens-coordinate {display:none!important}
.journey-view .journey-map-caption>strong,.journey-view .journey-map-caption>small,.journey-view .journey-map-caption>.map-follow-state,.journey-view .journey-map-caption>.map-caption-note {display:none!important}
.journey-view .journey-map-caption {bottom:0!important;top:auto!important}
.journey-view .narrative-lens {opacity:.26;pointer-events:none}
.journey-view .nonspatial-label {top:38%;z-index:5;background:#0a1723dd;padding:8px;pointer-events:none}
.map-place-results {display:grid;margin-top:12px;gap:0}
.map-place-row {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;border-bottom:1px solid var(--line)}
.map-place-row button {min-height:48px;text-align:left;padding:10px 4px;font-size:12px;color:var(--gold)}
.map-place-row strong {display:block;overflow-wrap:anywhere;font-size:14px;font-weight:500;color:var(--text)}
.map-place-row small {display:block;color:var(--muted);font-size:11px;line-height:1.5;margin-top:4px}
#map-place-search {width:100%;min-height:44px;font-size:16px}
body[data-view=atlas] #main {overflow:hidden}
body[data-view=atlas] .map-tools {display:none!important}
body[data-view=atlas] .map-heading {top:12px;left:24px;right:24px;height:68px}
body[data-view=atlas] .map-heading h1 {font-size:22px;line-height:1.3;margin:5px 0;letter-spacing:-.5px}
body[data-view=atlas] .map-heading h1 br,body[data-view=atlas] .map-heading p,body[data-view=atlas] .series-path {display:none}
body[data-view=atlas] #space {inset:86px 318px 148px 286px!important}
body[data-view=atlas] .roster {top:94px;bottom:160px;max-height:none;left:24px;width:242px}
body[data-view=atlas] .inspector {top:94px;bottom:160px;max-height:none;right:24px;width:274px}
body[data-view=atlas] .map-footnote {bottom:8px;left:24px;right:24px;min-height:44px;display:flex;justify-content:flex-end;z-index:6}
body[data-view=atlas] .map-footnote>span {display:none}
body[data-view=atlas] #space .world {bottom:8px!important}
body[data-view=atlas] #timeline {left:24px;right:24px;bottom:52px;height:90px;min-height:90px;padding:10px 16px}
body[data-view=atlas] .time-footer {display:none}
body[data-view=atlas].reading #space {left:16px!important;right:16px!important}
body[data-view=atlas].reading .roster,body[data-view=atlas].reading .inspector {display:none!important}
@media(max-width:1180px) {
 body[data-view=atlas] #space {left:16px!important;right:16px!important}
 body[data-view=atlas] .roster,body[data-view=atlas] .inspector {display:none!important}
}
@media(max-width:760px) {
 .journey-map {min-height:290px!important}
 #space[data-map-layout] .world {left:0!important;right:0!important}
 body[data-view=atlas] #space {left:10px!important;right:10px!important;top:72px!important;bottom:138px!important}
 body[data-view=atlas] .map-heading {left:18px;right:18px;top:10px;height:58px}
 body[data-view=atlas] .map-heading h1 {font-size:21px;white-space:nowrap}
 body[data-view=atlas] #timeline {left:12px;right:12px;bottom:44px;height:86px;min-height:86px}
 body[data-view=atlas] .map-footnote {left:12px;right:12px;bottom:0}
 body[data-view=atlas] .dense-map-controls {left:0;right:0;gap:4px}
 .dense-map-controls button {padding:6px;letter-spacing:-.2px;font-size:10px}
 .dense-map-zoom button {font-size:15px}
}
@media(max-height:540px) {
 body[data-view=atlas] .map-heading,body[data-view=atlas] #timeline,body[data-view=atlas] .roster,body[data-view=atlas] .inspector {display:none!important}
 body[data-view=atlas] #space {top:0!important;bottom:44px!important;left:10px!important;right:10px!important}
 body[data-view=atlas] .map-footnote {bottom:0;left:12px;right:12px}
}
@media(max-height:500px) and (orientation:landscape) {
 .journey-map {min-height:290px!important}
}

body[data-view=atlas] .map-heading h1 span {display:inline-block;margin-left:.2em}
/* Landscape uses a side control rail instead of consuming the map's scarce height. */
@media(max-height:540px) and (orientation:landscape) {
 body[data-view=atlas] #space {bottom:0!important}
 body[data-view=atlas] #space[data-map-layout] .world {top:8px!important;bottom:8px!important;left:154px!important;right:8px!important}
 body[data-view=atlas] .dense-map-controls {left:0;right:auto;top:4px;width:140px;flex-wrap:wrap;gap:4px}
 body[data-view=atlas] .dense-map-controls .map-places-button {width:80px;padding:4px}
 body[data-view=atlas] .dense-map-zoom {margin-left:0;gap:2px;order:1}
 body[data-view=atlas] .map-listen-button {display:block;width:56px;min-width:56px;padding:3px}
 body[data-view=atlas] .map-footnote {left:10px;right:auto;width:140px;justify-content:flex-start}
 body[data-view=atlas] .atlas-schematic {font-size:9px;line-height:1.4;max-width:140px;text-align:left}
}
