/* Phase 1: Luna only. All selectors are isolated from the main website. */
#world { --environment: 0; --depth-x: 0px; --depth-y: 0px; --travel: 0px; }
.depth-layer, .luna-cutout, .luna-contour {
  position: absolute; display: block; pointer-events: none; user-select: none;
}
.distant-opening {
  left: 38.277512%; top: 27.630181%; width: 23.564593%; height: 29.436769%;
  transform: translate(calc(var(--depth-x) * -1 + var(--travel) * -.55), calc(var(--depth-y) * -.65));
}
.foreground {
  left: 74.760766%; top: 70.56323%; width: 25.239234%; height: 29.436769%;
  transform: translate(calc(var(--depth-x) * .65 + var(--travel) * .45), calc(var(--depth-y) * .4));
}
.luna-environment {
  position: absolute; inset: 0; background: #251e18; opacity: var(--environment);
  pointer-events: none;
}
.luna-cutout, .luna-contour {
  left: 22.727273%; top: 26.992561%; width: 18.660287%; height: 55.260361%;
}
.luna-cutout { opacity: 0; }
.luna-cutout.is-decoded { opacity: 1; }
.luna-contour { opacity: 0; transition: opacity 480ms ease; }
body.luna-discovered .luna-contour { opacity: .32; }
body.luna-keyboard .luna-contour { opacity: .85; }
body.luna-discovered .luna-cutout { filter: brightness(1.025); }
body.luna-active .luna-contour { opacity: 0; }
body.luna-active .luna-cutout { filter: none; }
body.luna-active .dg-chrome-back { visibility: hidden; }
.hotspot[data-id="001"], .hotspot[data-id="001"]:hover, .hotspot[data-id="001"]:focus-visible {
  opacity: 1; border-radius: 0; background: transparent; box-shadow: none; cursor: zoom-in;
}
.hotspot[data-id="001"]::after { display: none; }
.luna-world-label {
  position: absolute; left: 31.6%; top: 83%; transform: translateX(-50%);
  font: 400 11px var(--font-mono); letter-spacing: .17em; text-transform: uppercase;
  color: #332921; padding: 7px 10px; background: rgba(248,239,219,.9);
  opacity: 0; transition: opacity 300ms; pointer-events: none; white-space: nowrap;
}
.luna-world-label span { margin-left: 10px; }
body.luna-discovered .luna-world-label { opacity: 1; }
body.luna-keyboard .luna-world-label { outline: 2px solid #3c2b1f; outline-offset: 4px; }
body.luna-active .luna-world-label, body.is-zoomed .luna-world-label { opacity: 0; }
/* Luna is re-composited above this local environment treatment, never blurred. */
body.luna-active #shade { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
body.luna-active #veils .veil { opacity: .72; transition: none; }
#luna-inspection {
  position: fixed; inset: 0; z-index: 40; color: #f7f3ec; pointer-events: none; outline: none;
}
#luna-inspection[hidden] { display: none; }
#luna-inspection::before {
  content: ""; position: absolute; inset: 0; width: min(480px,34vw);
  background: linear-gradient(90deg, rgba(20,16,12,.64), transparent);
  opacity: 0; transition: opacity 650ms ease; pointer-events: none;
}
#luna-inspection.has-caption::before { opacity: 1; }
#luna-return {
  pointer-events: auto; position: absolute; top: max(18px, env(safe-area-inset-top)); right: clamp(20px,3vw,44px);
  min-height: 44px; font: 400 10px var(--font-mono); text-transform: uppercase;
  letter-spacing: .16em; color: #fffaf2; border-bottom: 1px solid rgba(255,250,240,.6);
  text-shadow: 0 1px 8px rgba(0,0,0,.7); padding: 0 2px;
}
#luna-return span { margin-left: 18px; }
#luna-return:hover { border-color: #fffaf2; }
#luna-return:focus-visible, #luna-discovery button:focus-visible,
.dg-chrome a:focus-visible { outline: 2px solid #fffaf2; outline-offset: 5px; }
.luna-caption {
  position: absolute; left: clamp(28px,5vw,80px); bottom: clamp(48px,12vh,130px);
  width: min(290px,30vw); opacity: 0; transform: translateY(8px);
  transition: opacity 480ms ease, transform 650ms var(--ease-cine);
}
.has-caption .luna-caption { opacity: 1; transform: none; }
.luna-number { font-size: 9px; text-transform: uppercase; letter-spacing: .2em; margin-bottom: 22px; color: #eee2cf; }
.luna-caption h1 { font: 300 clamp(48px,5vw,74px)/1.05 var(--font-serif); letter-spacing: -.025em; margin-bottom: 17px; }
.luna-type { font-size: 9px; text-transform: uppercase; letter-spacing: .17em; margin-bottom: 23px; color: #eee2cf; }
.luna-caption > p:last-child { font-size: 13px; font-weight: 300; line-height: 1.85; max-width: 26ch; }
#luna-discovery { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.no-script { position: fixed; z-index: 99; left: 20px; bottom: 20px; background: #eee4d3; padding: 20px; }
@media (max-width: 900px) {
  .dg-chrome { gap: 12px; padding: max(17px,env(safe-area-inset-top)) 20px 22px; align-items: flex-start; }
  .dg-chrome-brand { gap: 8px; flex-shrink: 0; }
  .dg-chrome-wordmark { font-size: 13px; letter-spacing: .02em; white-space: nowrap; }
  .dg-chrome-back { font-size: 8px; letter-spacing: .1em; max-width: 127px; text-align: right; line-height: 1.8; opacity: .9; min-height: 44px; }
  #luna-discovery {
    position: fixed; inset: auto 0 0; display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 42px 24px max(24px,env(safe-area-inset-bottom)); z-index: 10;
    background: linear-gradient(transparent,rgba(22,17,13,.68)); color: #fff8ea; pointer-events: none;
  }
  #luna-discovery button { pointer-events: auto; min-height: 44px; }
  #luna-explore { font: 400 16px var(--font-serif); display: flex; gap: 12px; align-items: center; }
  #luna-explore .mono { font-size: 9px; letter-spacing: .1em; opacity: .75; }
  #gallery-framing { font: 400 9px var(--font-mono); text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid rgba(255,250,240,.5); }
  body.luna-active #luna-discovery, body.is-zoomed #luna-discovery { visibility: hidden; }
  .luna-world-label { display: none; }
  .luna-caption { left: 40px; bottom: 65px; width: 280px; }
  #luna-inspection::before { width: 100%; background: linear-gradient(0deg,rgba(20,16,12,.8),rgba(20,16,12,.2) 24%,transparent 40%); }
}
@media (max-width: 600px) {
  .dg-chrome-logo { width: 23px; height: 23px; }
  .dg-chrome { padding-left: 18px; padding-right: 18px; }
  .luna-caption { left: 28px; bottom: max(38px,env(safe-area-inset-bottom)); width: calc(100% - 56px); }
  .luna-number { margin-bottom: 14px; font-size: 8px; }
  .luna-caption h1 { font-size: 45px; margin-bottom: 11px; }
  .luna-type { margin-bottom: 14px; font-size: 8px; }
  .luna-caption > p:last-child { font-size: 12px; line-height: 1.7; max-width: 29ch; }
  #luna-return { right: 23px; font-size: 9px; }
}
@media (max-height: 600px) {
  .luna-caption { bottom: 24px; }
  .luna-caption h1 { font-size: 38px; }
  .luna-number, .luna-type { margin-bottom: 10px; }
}
body.reduce-motion .luna-caption, body.reduce-motion #luna-inspection::before,
body.reduce-motion .luna-contour, body.reduce-motion .luna-world-label { transition: none; }

@media (max-height: 600px) and (min-width: 601px) {
  #luna-inspection::before { width: 330px; background: linear-gradient(90deg,rgba(20,16,12,.64),transparent); }
}
