/* Deep Space stays the interactive scene. Album layers sit above its canvas. */
.space-album { height: 100vh; height: 100svh; min-height: 460px; }
.space-album .space-preview { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.space-album .space-view, .space-album .space-still { position: absolute; inset: 0; width: 100%; height: 100%; }
.space-album .space-still { background: url('./assets/ark/ark-07-render.png?v=engines-3') center / 90% auto no-repeat; }
.space-album .space-view { opacity: 0; cursor: grab; touch-action: none; outline-offset: -4px; transition: opacity 1s; }
.space-album .space-view:active { cursor: grabbing; }
@media (any-hover: hover) and (any-pointer: fine) {
  .space-album .space-view, .space-album .space-view:active { cursor: default; }
}
.space-album .space-ready .space-view { opacity: 1; }
.space-album .cosmos { display: block; }
.space-album.has-space3d .cosmos { display: none; }
/* Quiet still compositions for TVs, reduced motion and unavailable WebGL. */
.space-album[data-scene="7"]:not(.has-space3d) .cosmos::before {
  content: ''; position: absolute; inset: 0; z-index: 1; background: rgba(0, 0, 0, .64);
}
.space-album[data-scene="7"]:not(.has-space3d) .cosmos::after {
  content: ''; position: absolute; inset: 0; z-index: 2;
  background: url('./assets/remnants-still.svg?v=debris-field-1') center / auto 100% no-repeat;
}
@media (max-width: 600px) {
  .space-album[data-scene="7"]:not(.has-space3d) .cosmos::after {
    background-size: 130% auto; background-position: 70% 35%;
  }
}
.space-album[data-scene="4"]:not(.has-space3d) .cosmos::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 12% 42%, rgba(87, 151, 164, .22), transparent 48%), radial-gradient(ellipse at 89% 70%, rgba(128, 103, 78, .19), transparent 44%);
}
.space-album[data-scene="8"]:not(.has-space3d) .cosmos::before {
  content: ''; position: absolute; inset: 0; z-index: 1; background: rgba(0, 0, 0, .82);
}
.space-album[data-scene="8"]:not(.has-space3d) .cosmos::after {
  content: ''; position: absolute; z-index: 2; left: 65%; top: 41%;
  width: 58vmin; height: 58vmin; transform: translate(-50%, -50%);
  background: url('./assets/solar-contact-still.png') center / contain no-repeat;
}
@media (max-width: 600px) {
  .space-album[data-scene="8"]:not(.has-space3d) .cosmos::after { left: 62%; top: 38%; width: 84vmin; height: 84vmin; }
}
.space-album .vignette { z-index: 0; }
.space-album .stardust { z-index: 1; }
.space-album .stardust { transition: opacity 1.9s ease; }
.space-album[data-scene="10"] .stardust,
.space-album[data-scene="11"] .stardust { opacity: 0; }
/* Orbit is also readable as a still on TVs and without WebGL. */
.space-album[data-scene="10"]:not(.has-space3d) .nebula,
.space-album[data-scene="11"]:not(.has-space3d) .nebula {
  background-image: url('./assets/orbit/blue-world.png?v=orbit-1');
  background-position: center !important;
  filter: none !important;
}
.space-album[data-scene="10"]:not(.has-space3d) .nebula {
  background-image: url('./assets/orbit/aurora-still.svg'), url('./assets/orbit/blue-world-distant.png?v=distant-1');
  background-color: #000;
  background-size: auto 62%;
  background-size: 62vmin auto;
  background-position: 56% 47% !important;
  transform: none !important;
}
.space-album[data-scene="11"]:not(.has-space3d) .nebula {
  background-size: cover;
  transform: scale(1.78) !important;
  transform-origin: center 80%;
}
.space-album .track-title-text {
  filter: drop-shadow(0 2px 1px #000) drop-shadow(0 0 5px #000) drop-shadow(0 4px 12px rgba(0,0,0,.9));
}
.space-album .title-ray { filter: drop-shadow(0 2px 3px #000) drop-shadow(0 0 6px rgba(0,0,0,.8)); }
.space-album .timeline-heading, .space-album .timeline-start-label,
.space-album .timeline-label, .space-album .track-times,
.space-album .player-status, .space-album .space-help, .space-album .space-mode-tools a, .space-album .album-copyright {
  text-shadow: 0 2px 2px #000, 0 0 8px #000, 0 3px 16px #000;
}
.is-tv .space-album .track-title-text {
  filter: none;
  text-shadow: 0 2px 2px #000, 0 0 8px #000;
}
.is-tv .space-album .stardust { transition: none; }
@media (prefers-reduced-motion: reduce) { .space-album .stardust { transition: none; } }
.space-album .brand { z-index: 1; pointer-events: none; }
.space-mode-tools { position: absolute; right: 30px; bottom: 22px; z-index: 4; }
.space-mode-tools a { color: #c2ac8a; text-decoration: none; font-size: 10px; letter-spacing: .14em; min-height: 44px; display: inline-flex; align-items: center; }
.album-copyright { position: absolute; left: 30px; left: max(30px, env(safe-area-inset-left)); bottom: 22px; bottom: max(22px, env(safe-area-inset-bottom)); z-index: 4; display: flex; align-items: center; min-height: 44px; margin: 0; color: #c2ac8a; font-size: 10px; line-height: 1.4; letter-spacing: .1em; pointer-events: none; }
.space-album .space-help { position: absolute; left: 30px; bottom: 70px; max-width: 340px; color: #bda88a; font-size: 10px; pointer-events: none; }
.space-album .space-status { position: absolute; left: 30px; top: 140px; color: #c6af8c; font-size: 12px; }
.space-album .space-status:empty { display: none; }
.space-album .intro-actions { bottom: 55px; }
.space-album .music-player { bottom: 72px; }
@media (max-width: 600px) {
  .space-mode-tools { right: 16px; bottom: 10px; }
  .album-copyright { left: 16px; left: max(16px, env(safe-area-inset-left)); bottom: 10px; bottom: max(10px, env(safe-area-inset-bottom)); font-size: 9px; }
  .space-album .space-help { display: none; }
  .space-album .music-player, .space-album .intro-actions { bottom: 90px; }
  .space-album.has-audio { padding-bottom: 175px; }
  .space-album[data-scene="0"] { padding-bottom: 145px; }
}
@media (max-height: 600px) and (min-width: 601px) {
  .space-album .music-player { bottom: 70px; }
  .space-album .intro-actions { bottom: 65px; }
  .space-album .space-help { display: none; }
}
.is-tv .space-album .space-mode-tools, .is-tv .space-album .space-help { display: none; }
.space-mode-tools :focus-visible { outline: 2px solid #e9c084; outline-offset: 3px; }

.fullscreen-tools { position: absolute; top: max(18px, env(safe-area-inset-top)); right: max(20px, env(safe-area-inset-right)); z-index: 4; }
.fullscreen-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 11px;
  border: 1px solid #b69c654d; border-radius: 4px;
  background: #0c0905b3; color: #dcc49b; cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
}
.fullscreen-toggle:hover { color: #ffe7b9; background: #302314b3; border-color: #d6af70a6; }
.fullscreen-toggle:focus-visible { outline: 2px solid #e9c084; outline-offset: 4px; }
.fullscreen-toggle:disabled { cursor: wait; opacity: .6; }
.fullscreen-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fullscreen-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.fullscreen-status { position: absolute; top: 48px; right: 0; width: 260px; margin: 0; color: #ead1a5; font-size: 12px; line-height: 1.5; text-align: right; text-shadow: 0 1px 4px #000, 0 0 10px #000; }
.fullscreen-status:empty { display: none; }
@media (min-width: 901px) {
  .has-fullscreen-control .journey-navigation { width: calc(100% - 144px); }
}
@media (prefers-reduced-motion: reduce) { .fullscreen-toggle { transition: none; } }

/* Logo and timeline form one centred navigation group. */
.space-album .emblem-spacer { visibility: hidden; animation: none !important; }
.space-album .emblem-spacer::before { content: ''; display: block; padding-top: 100%; }
.journey-navigation { position: absolute; top: 28px; top: max(28px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: calc(100% - 80px); max-width: 1200px; display: flex; align-items: flex-start; gap: 24px; z-index: 2; pointer-events: none; }
.space-album .corner-logo { position: relative; flex: 0 0 112px; pointer-events: none; }
.space-album .corner-logo { transform-origin: 0 0; visibility: hidden; }
.space-album.launch-ready .corner-logo { visibility: visible; }
.space-album .corner-logo .emblem-entrance { animation: none; }
.space-album:not(.flight-launched) .space-still,
.space-album:not(.flight-launched) .space-help { visibility: hidden; }
.space-album.intro .corner-logo .emblem-entrance { width: 112px; max-width: none; }
.space-album .timeline { position: relative; top: auto; bottom: auto; left: auto; transform: none; width: auto; max-width: none; flex: 1; min-width: 0; pointer-events: auto; }
@media (max-width: 600px) {
  .journey-navigation { top: 16px; top: max(16px, env(safe-area-inset-top)); bottom: 64px; bottom: max(64px, calc(env(safe-area-inset-bottom) + 54px)); left: 10px; left: max(10px, env(safe-area-inset-left)); width: 64px; max-width: none; transform: none; flex-direction: column; align-items: center; gap: 12px; }
  .space-album .corner-logo { flex: 0 0 48px; align-self: flex-start; }
  .space-album.intro .corner-logo .emblem-entrance { width: 48px; }
  .space-album .timeline { width: 64px; flex: 1; min-height: 0; }
  /* The rail overlays the scene; it never reserves a left-hand content column. */
  .space-album { padding-left: 40px; padding-right: 40px; }
  .space-album .timeline-label { display: none; }
  .space-album .brand { --brand-x: 0px; --brand-y: 0px; }
  .space-album .intro-actions { left: 40px; right: 40px; }
  .space-album:not([data-scene="0"]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto auto;
    align-items: stretch;
    row-gap: 24px;
    padding-bottom: max(90px, calc(env(safe-area-inset-bottom) + 74px));
  }
  .space-album:not([data-scene="0"]) .brand {
    grid-row: 2;
    width: 100%;
    max-width: 430px;
    justify-self: center;
  }
  .space-album:not([data-scene="0"]) .emblem-spacer { display: none; }
  .space-album:not([data-scene="0"]) .track-title { min-height: 0; margin: 0; }
  .space-album:not([data-scene="0"]) .music-player {
    position: relative;
    grid-row: 3;
    justify-self: center;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    max-width: 430px;
    transform: none;
  }
}
@media (max-height: 500px) and (min-width: 601px) {
  .journey-navigation { top: 16px; gap: 18px; }
  .space-album .corner-logo { flex-basis: 82px; }
  .space-album.intro .corner-logo .emblem-entrance { width: 82px; }
}
