/* Stage 2 extends, rather than replaces, the approved visual system. */
.hero-media .scene { object-position: var(--image-desktop, 50% 50%) !important; }
.hero[data-tone='memorial'] .hero-orbit,
.hero[data-tone='memorial'] .pulse { animation: none; }
.hero[data-tone='memorial'] .hero-orbit { opacity: .18; }
.hero[data-tone='memorial'] .scene { animation: none; }
.detail-image button.media-open { display: block; width: 100%; text-align: left; padding: 0; border-radius: 7px; overflow: hidden; position: relative; }
.media-open .view-label { position: absolute; right: 10px; bottom: 10px; padding: 9px 12px; background: #081719dc; backdrop-filter: blur(8px); color: #e5f5ef; border: 1px solid #ffffff3c; border-radius: 4px; font-size: 10px; }
.relationships { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 25px; }
.relationships > h3 { font-size: 17px; font-weight: 500; margin: 0 0 8px; }
.relationships > p { font-size: 11px; line-height: 1.8; color: #aec7c3; margin: 0 0 18px; }
.related-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.related-column > h4 { color: var(--accent); font-size: 10px; text-transform: uppercase; letter-spacing: 1.4px; margin: 5px 0 10px; }
.related-card { display: block; width: 100%; text-align: left; padding: 14px; border: 1px solid var(--line); background: #ffffff04; border-radius: 7px; margin-bottom: 8px; transition: background .2s, border-color .2s; }
.related-card:hover { border-color: var(--accent); background: #ffffff0a; }
.related-card span { font-size: 10px; color: var(--accent); display: block; margin-bottom: 5px; }
.related-card strong { font-size: 12px; font-weight: 600; line-height: 1.6; display: block; }
.proportional .time-stop { width: 124px; }
.proportional .time-stop .stop-dot { left: 59px; }
.proportional .time-stop::after { left: 62px; }
.proportional .time-stop .stop-year { font-size: 10px; top: calc(25px + var(--lane) * 47px); padding: 7px 3px; }
.proportional .time-stop::after { height: calc(13px + var(--lane) * 47px); }
.proportional .time-cluster .stop-year { background: color-mix(in srgb, var(--accent) 8%, var(--base)); border-radius: 6px; }
.cluster-amount { display: block; font-size: 9px; color: var(--accent); padding-top: 4px; }
.proportional .time-cluster .stop-dot { width: 11px; height: 11px; left: 57px; top: 0; border-color: var(--accent); background: var(--base); }
.cluster-list { display: grid; gap: 9px; margin: 22px 0; }
.cluster-item { display: flex; justify-content: space-between; gap: 16px; width: 100%; padding: 18px; background: #ffffff05; border: 1px solid var(--line); text-align: left; border-radius: 7px; }
.cluster-item span { color: var(--accent); font-size: 11px; min-width: 82px; }
.cluster-item strong { font-size: 13px; line-height: 1.6; flex: 1; font-weight: 500; }
.cluster-item:hover { border-color: var(--accent); }
.gallery-card img { object-position: var(--card-position, 50% 50%); }
.gallery-card.artifact img { object-fit: contain; padding: 12px; }
.gallery-section + .gallery-section { margin-top: 30px; }
.gallery-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; font-size: 16px; font-weight: 500; margin: 0 0 15px; }
.gallery-section-title small { color: #a4bfba; font-size: 11px; }
.image-viewer { background: #06161a; overflow: auto; height: min(60svh, 650px); width: 100%; touch-action: pan-x pan-y pinch-zoom; border: 1px solid var(--line); border-radius: 6px; display: grid; }
.image-viewer img { width: 100%; height: 100%; object-fit: contain; min-height: 0; display: block; align-self: center; justify-self: center; }
.image-viewer.zoomed { display: block; }
.image-viewer.zoomed img { width: 200%; height: auto; max-width: none; min-height: 100%; object-fit: contain; }
.viewer-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 15px; }
.viewer-caption { font-size: 11px; line-height: 1.8; color: #b6cbc8; margin: 14px 0 0; }
.viewer-caption a { color: var(--accent); text-decoration: underline; }
.scale-controls button { min-width: 30px; min-height: 30px; }
.track-meta { min-height: 30px; }
@media(max-width: 1100px) {
  .dock-top { align-items: flex-start; }
  .filter-tools { gap: 6px; }
  .category-filters { gap: 0; }
  .filter-chip { padding: 9px 8px; }
}
@media(max-width: 680px) {
  .hero-media .scene { object-position: var(--image-mobile, var(--image-desktop, 50% 50%)) !important; }
  .related-columns { grid-template-columns: 1fr; }
  .related-card { min-height: 64px; }
  .cluster-item { padding: 14px 12px; }
  .cluster-item span { min-width: 70px; }
  .gallery-section-title { font-size: 15px; }
  .scale-controls button { min-width: 36px; min-height: 36px; }
  .track-meta { gap: 8px; }
  .track-instructions { max-width: 150px; line-height: 1.5; }
  .filter-tools { width: 100%; }
  .category-filters { min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .filter-chip { flex: 0 0 auto; min-height: 39px; }
  .era-select { flex: 0 0 auto; max-width: 137px; }
  .image-viewer { height: 50svh; }
  .photo-caption { max-width: calc(100% - var(--gutter) * 2); }
}
.viewer-pages { display: flex; align-items: center; gap: 12px; font-size: 12px; }
.boot-failed { max-width: 620px; margin: 15vh auto; padding: 30px; }
.boot-failed h1 { font-size: 28px; margin-bottom: 20px; }
.boot-failed p { line-height: 1.8; margin-bottom: 24px; }
/* Full label hit targets, with stems anchored to their actual dates. */
.proportional .time-stop { top: calc(48px + var(--lane) * 47px); height: 43px; pointer-events: auto; }
.proportional .time-stop .stop-year { top: 0; min-height: 40px; display: grid; align-content: center; }
.proportional .time-stop .stop-dot { top: calc(-23px - var(--lane) * 47px); }
.proportional .time-stop::after { top: calc(-16px - var(--lane) * 47px); height: calc(16px + var(--lane) * 47px); pointer-events: none; }
