.origin-plane, .world-clusters, .world-group { position: absolute; inset: 0; pointer-events: none; }
.origin-plane, .world-group { transform-origin: center; }
.orbit-tile { pointer-events: auto; touch-action: none; }
.loading-scene {
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center; gap: clamp(10px, 2.4vw, 22px);
  background: #1b1524;
  color: var(--paper); font-size: clamp(2.6rem, 7.5vw, 6rem); font-weight: 760; letter-spacing: -.055em;
  transform-origin: top center;
  transition: transform .66s cubic-bezier(.36,.03,.22,1), opacity .50s ease .14s, visibility .66s;
}
.loading-scene.is-ready {
  visibility: hidden; opacity: 0; pointer-events: none;
  transform: perspective(1050px) rotateX(-77deg) translateY(-9vh);
}
.loading-continue {
  position: absolute; inset: 0; width: 100%; height: 100%;
  padding: 0; border: 0; background: transparent;
  color: var(--muted); font-size: .88rem; font-weight: 500;
}
.loading-continue span {
  position: absolute; top: calc(50% + clamp(47px, 8vh, 85px)); left: 50%;
  transform: translateX(-50%); white-space: nowrap;
}
.loading-continue:hover span { color: var(--paper); }
.loading-continue:focus-visible { outline: none; }
.loading-continue:focus-visible span { outline: 1px solid var(--accent); outline-offset: 7px; }
.peg-definition { position: absolute; }
.loading-pegs { display: flex; align-items: center; gap: clamp(5px, 1.3vw, 10px); }
.loading-pegs svg { width: auto; height: clamp(25px, 5vh, 46px); filter: drop-shadow(0 1px 5px #bc8e3d42); }
.loading-pegs svg:nth-child(1) { animation: first-peg 1.65s steps(1, end) infinite; }
.loading-pegs svg:nth-child(2) { animation: second-peg 1.65s steps(1, end) infinite; }
.loading-pegs svg:nth-child(3) { animation: third-peg 1.65s steps(1, end) infinite; }
@keyframes first-peg { 0% { opacity: 1; } 75%, 100% { opacity: 0; } }
@keyframes second-peg { 0% { opacity: 0; } 25% { opacity: 1; } 75%, 100% { opacity: 0; } }
@keyframes third-peg { 0% { opacity: 0; } 50% { opacity: 1; } 75%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .loading-pegs svg { animation: none !important; }
  .loading-scene.is-ready { transform: none; }
}
.world-piece {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: grab;
  color: inherit;
  pointer-events: auto;
  touch-action: none;
}
.world-piece img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  box-shadow: 0 11px 29px #100a1ba6;
  -webkit-user-drag: none;
  user-select: none;
}
.world-piece:not(.is-focus):hover img, .world-piece:not(.is-focus):focus-visible img {
  outline: 1px solid #e5d7f0a8;
  outline-offset: 3px;
}
.world-piece.is-focus:focus-visible { outline: none; }
.world-piece.is-focus:focus-visible::after {
  content: ""; position: absolute; top: -8px; left: -8px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--accent);
}
.world-piece.is-focus img { box-shadow: 0 17px 36px #100a1bd4; }
.world-piece.is-neighbor img { filter: grayscale(.88) brightness(.77); opacity: .70; transition: filter .2s, opacity .2s; }
.world-piece.is-neighbor:hover img, .world-piece.is-neighbor:focus-visible img { filter: grayscale(.3); opacity: 1; }
.work-tile.is-missing img, .world-piece.is-missing img { visibility: hidden; }
.world-piece.is-missing { background: #322540; }
.world-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  height: 24px;
  transform-origin: left center;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: none;
}
.world-link::before {
  content: ""; height: 1px; background: #c2ace87c;
  position: absolute; inset-inline: 0; top: 50%; pointer-events: none;
}
.world-link:not(:disabled) { pointer-events: auto; cursor: pointer; touch-action: manipulation; }
.world-link:not(:disabled):hover::before, .world-link:not(:disabled):focus-visible::before { background: var(--accent); height: 2px; }
.shared-focus {
  position: fixed;
  z-index: 20;
  pointer-events: none;
  object-fit: contain;
  transform-origin: top left;
}
.scene.is-spreading :is(.world-piece, .world-group, .world-link) {
  transition: transform .48s cubic-bezier(.22,.72,.23,1), width .48s cubic-bezier(.22,.72,.23,1);
}
.scene.is-dragging .world-piece { cursor: grabbing; }
.exhibition.has-gallery:not(.has-detail) .scene { cursor: zoom-out; }
.exhibition.has-gallery .gesture-hint, .exhibition.has-gallery .orbit-controls { display: none; }
.world-toolbar {
  z-index: 1250;
  pointer-events: none;
  position: absolute;
  bottom: 18px;
  inset-inline: var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
}
.world-toolbar button, .world-toolbar details { pointer-events: auto; }
.world-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.world-actions button { background: #211728dc; touch-action: manipulation; }
.world-actions .icon-button { min-width: 43px; }
.world-caption {
  flex: 0 1 auto;
  max-width: min(450px, 68vw);
  background: linear-gradient(90deg, #1a1424ed, #1a1424d9 82%, #1a142400);
  padding: 5px 16px 3px 0;
}
.world-caption p { line-height: 1.3; }
.world-caption p + p { color: var(--muted); font-size: .83rem; margin-top: 3px; }
#world-title { font-size: 1.1rem; font-weight: 720; }
#world-position { margin-left: 9px; color: var(--lavender); font-size: .82rem; white-space: nowrap; }
.world-note { color: var(--muted); font-size: .84rem; margin-top: 3px; }
.world-note summary { width: max-content; cursor: pointer; }
.world-note > div {
  position: absolute; bottom: calc(100% + 6px); left: 0; width: min(360px, 88vw);
  padding: 12px; background: var(--surface); border: 1px solid var(--line); line-height: 1.4;
}

@media (max-width: 520px) {
  .world-toolbar { bottom: 15px; }
  .world-caption { max-width: 53vw; padding-right: 4px; }
  #world-title { font-size: .98rem; }
  #world-position { font-size: .76rem; margin-left: 6px; }
  .world-actions .line-button { padding-inline: 8px; min-height: 39px; }
}
