@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Inter:wght@300;400;500;600&display=swap");

:root {
  --ink: #0a0a0c;
  --surface: rgba(11, 11, 13, 0.86);
  --surface-solid: #0d0d10;
  --alabaster: #f2ede4;
  --alabaster-soft: rgba(242, 237, 228, 0.78);
  --ash: #9a948a;
  --brass: #c4a46b;
  --brass-bright: #dec28c;
  --brass-hair: rgba(196, 164, 107, 0.34);
  --hairline: rgba(242, 237, 228, 0.14);
  --hairline-strong: rgba(242, 237, 228, 0.28);
  --spectral: #94c7da;
  --sage: #8bb89f;
  --terracotta: #cc7b6c;
  --font-serif: "Cormorant Garamond", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--ink);
  color: var(--alabaster);
  font-family: var(--font-sans);
  font-weight: 400;
  font-feature-settings: "cv02", "cv03", "cv04";
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* === 3D VIEWPORT === */
#stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  cursor: grab;
  transition: filter 0.45s var(--ease-out);
}
#stage:active {
  cursor: grabbing;
}
body.drawer-open #stage {
  filter: brightness(0.74);
}

#gl-canvas,
#particle-canvas {
  position: absolute;
  inset: 0;
  display: block;
}
#particle-canvas {
  pointer-events: none;
}

#hotspot-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.4s ease;
}

body.hud-hidden #hotspot-layer,
body.hud-hidden #hud,
body.hud-hidden #dialogue-bar {
  opacity: 0;
  pointer-events: none !important;
}

/* === MINIMALIST PRELOADER === */
#loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #08080a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  transition: opacity 0.75s var(--ease-out), visibility 0.75s ease;
}
#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-rule {
  width: 48px;
  height: 1px;
  background: var(--brass);
}
.loader-title {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-size: clamp(1.1rem, 2.2vw, 1.55rem);
  color: var(--alabaster);
  text-align: center;
}
.loader-bar-wrap {
  width: min(240px, 65vw);
  height: 1px;
  background: rgba(242, 237, 228, 0.14);
  overflow: hidden;
}
.loader-bar {
  width: 0%;
  height: 100%;
  background: var(--brass-bright);
  transition: width 0.25s ease;
}
.loader-status {
  font-size: 0.72rem;
  color: var(--ash);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

/* === EDITORIAL TITLE OVERLAY (Leaves entrance facade unobstructed) === */
#title-screen {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 40px 44px;
  background: linear-gradient(
    to bottom,
    rgba(8, 8, 10, 0.56) 0%,
    rgba(8, 8, 10, 0.0) 24%,
    rgba(8, 8, 10, 0.0) 68%,
    rgba(8, 8, 10, 0.88) 100%
  );
  transition: opacity 0.7s var(--ease-out), visibility 0.7s ease;
}
#title-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.title-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(242, 237, 228, 0.12);
  padding-bottom: 16px;
}
.title-edition {
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--alabaster-soft);
}
.title-top-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.title-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 22px;
  max-width: 640px;
  margin: 0 auto;
}
.title-lead {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.1rem, 1.8vw, 1.38rem);
  line-height: 1.55;
  color: var(--alabaster);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.85);
}
.title-cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

/* === ARCHITECTURAL BUTTONS === */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 28px;
  border-radius: 2px;
  background: var(--alabaster);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background 0.25s ease, transform 0.25s var(--ease-out);
}
.btn-primary:hover {
  background: #ffffff;
  transform: translateY(-1px);
}
.btn-primary:disabled {
  opacity: 0.32;
  pointer-events: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 2px;
  background: rgba(10, 10, 12, 0.56);
  border: 1px solid var(--hairline-strong);
  color: var(--alabaster);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
  transition: border-color 0.25s ease, background 0.25s ease;
}
.btn-secondary:hover {
  border-color: var(--brass-bright);
  background: rgba(196, 164, 107, 0.12);
}

.btn-brass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 2px;
  background: var(--brass);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background 0.25s ease;
}
.btn-brass:hover {
  background: var(--brass-bright);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--alabaster-soft);
  padding: 6px 2px;
  position: relative;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease-out);
}
.nav-link:hover,
.nav-link.active {
  color: var(--alabaster);
}
.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}
.nav-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.35;
  fill: none;
}

/* === FULL-BLEED CINEMATIC VIDEO LAYER === */
#video-layer {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: #060608;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}
#video-layer.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
#cinema-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cinema-caption {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(680px, 86vw);
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.05rem, 1.7vw, 1.36rem);
  letter-spacing: 0.02em;
  color: var(--alabaster);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.95);
  padding: 10px 24px;
  transition: opacity 0.4s ease;
}
#btn-skip-video {
  position: absolute;
  top: 26px;
  right: 36px;
}

/* === MAIN ARCHITECTURAL HUD === */
#hud {
  position: fixed;
  inset: 0;
  z-index: 25;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: opacity 0.4s ease;
}
#hud.hidden {
  opacity: 0;
  visibility: hidden;
}

.hud-top {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 18px 34px 26px;
  background: linear-gradient(to bottom, rgba(8, 8, 10, 0.78) 0%, rgba(8, 8, 10, 0.34) 65%, rgba(8, 8, 10, 0) 100%);
}

.hud-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.hud-rule-v {
  width: 1px;
  height: 28px;
  background: var(--brass);
  flex-shrink: 0;
}
.hud-location-wrap {
  min-width: 0;
}
.location-chapter {
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 2px;
}
.location-name {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--alabaster);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-objective {
  text-align: center;
  max-width: 440px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.98rem;
  color: var(--alabaster-soft);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.85);
}

.hud-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
}

.coherence-meter {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 14px;
  border-right: 1px solid var(--hairline);
}
.coherence-label {
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ash);
}
.coherence-track {
  width: 56px;
  height: 1.5px;
  background: rgba(242, 237, 228, 0.18);
  position: relative;
}
.coherence-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 12%;
  background: var(--brass-bright);
  transition: width 0.6s var(--ease-out);
}
.coherence-pct {
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  color: var(--alabaster);
  min-width: 30px;
  text-align: right;
}

.hud-bottom {
  pointer-events: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 20px 34px 20px;
  background: linear-gradient(to top, rgba(8, 8, 10, 0.72) 0%, rgba(8, 8, 10, 0) 100%);
}
.controls-hint {
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(242, 237, 228, 0.52);
}
.quick-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

#btn-exit-photo {
  position: fixed;
  bottom: 22px;
  right: 34px;
  z-index: 45;
  display: none;
}
body.hud-hidden #btn-exit-photo {
  display: inline-flex;
}

/* === THEATRICAL CHAPTER ANNOUNCEMENT === */
#chapter-banner {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 40;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  padding: 20px 44px;
}
#chapter-banner.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.chapter-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--brass-bright);
  margin-bottom: 8px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
}
.chapter-heading {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.55rem, 3.2vw, 2.55rem);
  letter-spacing: 0.08em;
  color: var(--alabaster);
  text-shadow: 0 4px 32px rgba(0, 0, 0, 0.95);
}

/* === EDITORIAL CURATOR NARRATION BAR WITH LIVE AGENT PORTRAIT === */
#dialogue-bar {
  position: fixed;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%) translateY(14px);
  z-index: 32;
  width: min(780px, 92vw);
  min-height: 112px;
  background: rgba(10, 10, 12, 0.88);
  border-top: 1px solid var(--brass-hair);
  border-bottom: 1px solid var(--hairline);
  border-right: 1px solid var(--hairline);
  padding: 18px 26px 18px 172px;
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  cursor: pointer;
  transition: opacity 0.42s var(--ease-out), transform 0.42s var(--ease-out), visibility 0.42s ease;
}
#dialogue-bar.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.agent-portrait-wrap {
  position: absolute;
  left: 10px;
  bottom: 0;
  width: 154px;
  height: 176px;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: visible;
}
.agent-portrait {
  width: 158px;
  height: auto;
  max-height: 182px;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.72));
  transform-origin: bottom center;
  transition: transform 0.5s var(--ease-out), opacity 0.45s ease;
}
#dialogue-bar.speaking .agent-portrait {
  animation: agentSpeak 2.8s ease-in-out infinite;
}
.dialogue-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.dialogue-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.dialogue-speaker-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.dialogue-speaker {
  font-size: 0.64rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brass);
}
.voice-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 11px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
#dialogue-bar.speaking .voice-eq {
  opacity: 1;
}
.voice-eq i {
  display: block;
  width: 1.5px;
  height: 4px;
  background: var(--brass-bright);
  animation: eqPulse 0.9s ease-in-out infinite;
}
.voice-eq i:nth-child(2) {
  animation-delay: 0.18s;
  height: 9px;
}
.voice-eq i:nth-child(3) {
  animation-delay: 0.36s;
  height: 6px;
}
.dialogue-next {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ash);
}
.dialogue-text {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  line-height: 1.48;
  color: var(--alabaster);
}

@keyframes agentSpeak {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2.5px) scale(1.012); }
}
@keyframes eqPulse {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1.15); }
}

/* === WHISPER-QUIET ARCHITECTURAL HOTSPOT RETICLES === */
.hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  z-index: 12;
  display: flex;
  align-items: center;
  padding: 8px;
  transition: opacity 0.25s ease;
}
.hotspot:hover {
  z-index: 24;
}

.hs-reticle {
  width: 22px;
  height: 22px;
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-out);
}
.hotspot:hover .hs-reticle {
  transform: scale(1.22);
}

/* Subtle architectural ring */
.hs-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(242, 237, 228, 0.72);
  background: rgba(10, 10, 12, 0.34);
  backdrop-filter: blur(3px);
  transition: border-color 0.25s ease, background 0.25s ease;
}
.hs-core {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--alabaster);
  transition: background 0.25s ease, transform 0.25s ease;
}

/* Real Fact reticle: hairline rotated diamond */
.hotspot.type-fact .hs-ring,
.hotspot.type-portal_exhibit .hs-ring {
  border-radius: 0;
  transform: rotate(45deg) scale(0.84);
  border-color: rgba(222, 194, 140, 0.84);
}
.hotspot.type-fact .hs-core,
.hotspot.type-portal_exhibit .hs-core {
  background: var(--brass-bright);
}
.hotspot.discovered .hs-ring {
  border-color: var(--sage);
  background: rgba(139, 184, 159, 0.16);
}
.hotspot.discovered .hs-core {
  background: var(--sage);
}

/* Future Memory reticle: twin architectural circles in spectral slate -> brass when stabilized */
.hotspot.type-future .hs-reticle,
.hotspot.type-future_portal .hs-reticle {
  width: 28px;
  height: 28px;
}
.hotspot.type-future .hs-ring,
.hotspot.type-future_portal .hs-ring {
  border-color: var(--spectral);
  box-shadow: 0 0 0 4px rgba(148, 199, 218, 0.14);
}
.hotspot.type-future .hs-core,
.hotspot.type-future_portal .hs-core {
  background: var(--spectral);
  width: 5px;
  height: 5px;
}
.hotspot.restored .hs-ring {
  border-color: var(--brass-bright);
  box-shadow: 0 0 0 5px rgba(222, 194, 140, 0.18);
}
.hotspot.restored .hs-core {
  background: var(--brass-bright);
}

/* Epilogue, Video entrance & 3D Studio subtle double ring */
.hotspot.type-video_portal .hs-reticle,
.hotspot.type-epilogue_video .hs-reticle,
.hotspot.type-studio_3d .hs-reticle {
  width: 30px;
  height: 30px;
}
.hotspot.type-video_portal .hs-ring,
.hotspot.type-epilogue_video .hs-ring,
.hotspot.type-studio_3d .hs-ring {
  border-color: var(--brass-bright);
  box-shadow: 0 0 0 5px rgba(196, 164, 107, 0.15);
}

/* Subtle breathing halo only on unexamined targets */
.hs-halo {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(242, 237, 228, 0.45);
  animation: quietPulse 3.2s ease-out infinite;
  pointer-events: none;
}
.hotspot.type-future .hs-halo,
.hotspot.type-future_portal .hs-halo {
  border-color: rgba(148, 199, 218, 0.6);
}

/* Museum Placard Callout — Hidden at rest so photography stays pure; reveals smoothly on hover! */
.hs-callout {
  position: absolute;
  left: calc(100% - 2px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  display: flex;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s var(--ease-out), transform 0.28s var(--ease-out);
}
.hotspot.align-left .hs-callout {
  left: auto;
  right: calc(100% - 2px);
  flex-direction: row-reverse;
  transform: translateY(-50%) translateX(4px);
}
.hotspot:hover .hs-callout,
.hotspot:focus-visible .hs-callout,
.hotspot.always-hint .hs-callout {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
.hs-leader {
  width: 22px;
  height: 1px;
  background: var(--brass-hair);
  flex-shrink: 0;
}
.hs-placard {
  background: rgba(10, 10, 12, 0.88);
  border: 1px solid var(--hairline-strong);
  border-left: 2px solid var(--brass);
  padding: 7px 13px;
  backdrop-filter: blur(14px);
  white-space: nowrap;
  text-align: left;
}
.hotspot.align-left .hs-placard {
  border-left: 1px solid var(--hairline-strong);
  border-right: 2px solid var(--brass);
  text-align: right;
}
.hs-cat {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 2px;
}
.hotspot.type-future .hs-cat,
.hotspot.type-future_portal .hs-cat {
  color: var(--spectral);
}
.hotspot.restored .hs-cat {
  color: var(--brass-bright);
}
.hs-title {
  font-family: var(--font-serif);
  font-size: 0.96rem;
  color: var(--alabaster);
  line-height: 1.2;
}

/* === RIGHT-HAND SLIDE-OVER CURATORIAL DOSSIER === */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(6, 6, 8, 0.38);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.dossier-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(490px, 100vw);
  background: rgba(12, 12, 14, 0.95);
  border-left: 1px solid var(--hairline);
  backdrop-filter: blur(26px);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.45s var(--ease-out);
  overflow-y: auto;
}
.drawer-backdrop.open .dossier-panel {
  transform: translateX(0);
}

.dossier-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 26px;
  border-bottom: 1px solid var(--hairline);
}
.dossier-kicker {
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
}
.close-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  color: var(--alabaster-soft);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.close-btn:hover {
  border-color: var(--brass);
  color: var(--alabaster);
}
.close-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.4;
}

.study-3d-wrap {
  position: relative;
  background: radial-gradient(circle at 50% 48%, rgba(28, 27, 25, 0.65), #09090b 78%);
  border-bottom: 1px solid var(--hairline);
}
#artifact-canvas,
#dossier-glb-canvas {
  width: 100%;
  height: 245px;
  display: block;
  cursor: grab;
}
#artifact-canvas:active,
#dossier-glb-canvas:active {
  cursor: grabbing;
}
.study-3d-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 26px;
  border-top: 1px solid rgba(242, 237, 228, 0.06);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ash);
}
.study-mode-btn {
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  padding: 3px 0;
  border-bottom: 1px solid transparent;
}
.study-mode-btn:hover {
  border-bottom-color: var(--brass);
}

.dossier-body {
  padding: 26px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}
.dossier-tags {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.tag-chip {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--hairline);
  color: var(--alabaster-soft);
}
.tag-chip.fact {
  border-color: var(--brass-hair);
  color: var(--brass-bright);
}
.tag-chip.future {
  border-color: rgba(148, 199, 218, 0.42);
  color: var(--spectral);
}
.tag-chip.restored {
  border-color: rgba(139, 184, 159, 0.5);
  color: var(--sage);
}

.dossier-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.75rem;
  line-height: 1.18;
  color: var(--alabaster);
}
.dossier-subtitle {
  font-size: 0.8rem;
  color: var(--ash);
  letter-spacing: 0.04em;
}
.dossier-prose {
  font-size: 0.92rem;
  line-height: 1.7;
  color: rgba(242, 237, 228, 0.88);
}
.citation-block {
  padding: 14px 16px;
  border-left: 1px solid var(--brass);
  background: rgba(242, 237, 228, 0.03);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ash);
}
.citation-block strong {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 4px;
  font-weight: 500;
}

.dossier-actions {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* === TEMPORAL ANCHORING PROTOCOL (Editorial Refinement) === */
.trial-panel {
  border: 1px solid var(--hairline);
  background: rgba(242, 237, 228, 0.025);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.trial-step-label {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
}
.trial-question {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  line-height: 1.45;
  color: var(--alabaster);
}
.trial-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.trial-option {
  text-align: left;
  padding: 11px 14px;
  border: 1px solid var(--hairline);
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--alabaster-soft);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.trial-option:hover {
  border-color: var(--brass);
  color: var(--alabaster);
  background: rgba(196, 164, 107, 0.08);
}
.trial-option.correct {
  border-color: var(--sage);
  color: var(--alabaster);
  background: rgba(139, 184, 159, 0.14);
}
.trial-option.wrong {
  border-color: var(--terracotta);
  background: rgba(204, 123, 108, 0.12);
}
.trial-feedback {
  font-size: 0.78rem;
  min-height: 18px;
}
.trial-feedback.ok { color: var(--sage); }
.trial-feedback.err { color: var(--terracotta); }

#wave-canvas {
  width: 100%;
  height: 68px;
  background: #08080a;
  border: 1px solid var(--hairline);
  display: block;
}
.freq-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  background: var(--hairline-strong);
  outline: none;
}
.freq-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--alabaster);
  border: 2px solid var(--brass);
  cursor: pointer;
}
.freq-readout {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--ash);
}

/* === FULL-PLATE EDITORIAL MODALS (FLOORPLAN / CATALOGUE / CERTIFICATE) === */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 75;
  background: rgba(6, 6, 8, 0.78);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.modal-plate {
  width: min(980px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface-solid);
  border: 1px solid var(--hairline);
  padding: 34px 38px;
  position: relative;
  transform: translateY(10px);
  transition: transform 0.38s var(--ease-out);
}
.modal-backdrop.open .modal-plate {
  transform: translateY(0);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hairline);
}
.modal-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  color: var(--alabaster);
  letter-spacing: 0.03em;
}
.modal-sub {
  font-size: 0.82rem;
  color: var(--ash);
  margin-top: 4px;
}

/* === ARCHITECTURAL FLOORPLAN === */
.map-board {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9.4;
  margin-top: 22px;
  background: #08080a;
  border: 1px solid var(--hairline);
  overflow: hidden;
}
.map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.map-wing-title {
  position: absolute;
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(196, 164, 107, 0.72);
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.map-node-btn {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 4;
}
.map-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #141418;
  border: 1.5px solid var(--brass);
  transition: transform 0.2s ease, background 0.2s ease;
}
.map-node-btn:hover .map-dot {
  transform: scale(1.4);
  background: var(--brass-bright);
}
.map-node-btn.current .map-dot {
  background: var(--alabaster);
  border-color: var(--alabaster);
  box-shadow: 0 0 0 5px rgba(242, 237, 228, 0.2);
  transform: scale(1.25);
}
.map-node-label {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--alabaster-soft);
  background: rgba(8, 8, 10, 0.88);
  padding: 2px 6px;
  white-space: nowrap;
  border: 1px solid rgba(242, 237, 228, 0.1);
}
.map-node-btn.current .map-node-label {
  color: var(--alabaster);
  border-color: var(--brass);
}

/* === CATALOGUE GRID === */
.tabs-row {
  display: flex;
  gap: 24px;
  margin: 18px 0 22px;
  border-bottom: 1px solid var(--hairline);
}
.tab-btn {
  padding: 10px 0;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ash);
  border-bottom: 1.5px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.tab-btn.active,
.tab-btn:hover {
  color: var(--alabaster);
  border-bottom-color: var(--brass);
}
.codex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.codex-card {
  padding: 16px 18px;
  border: 1px solid var(--hairline);
  background: rgba(242, 237, 228, 0.015);
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.codex-card.unlocked {
  border-color: var(--brass-hair);
  background: rgba(196, 164, 107, 0.04);
}
.codex-card.unlocked:hover {
  border-color: var(--brass-bright);
}
.codex-card.saved {
  border-color: rgba(139, 184, 159, 0.45);
}
.codex-card h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.08rem;
  color: var(--alabaster);
}
.codex-card p {
  font-size: 0.78rem;
  color: var(--ash);
  line-height: 1.5;
}

/* === CERTIFICATE === */
.certificate-sheet {
  margin-top: 22px;
  padding: 28px;
  border: 1px solid var(--brass-hair);
  background: linear-gradient(160deg, rgba(22, 21, 19, 0.9), rgba(10, 10, 12, 0.98));
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.cert-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.cert-stat {
  padding: 16px;
  text-align: center;
  border-right: 1px solid var(--hairline);
}
.cert-stat:last-child {
  border-right: none;
}
.cert-stat-val {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  color: var(--brass-bright);
  font-variant-numeric: tabular-nums;
}
.cert-stat-lbl {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ash);
  margin-top: 4px;
}

/* === SUBTLE TOAST === */
#toast {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  z-index: 85;
  padding: 9px 20px;
  background: rgba(10, 10, 12, 0.92);
  border: 1px solid var(--brass-hair);
  color: var(--alabaster);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* === IN-ROOM LIVE 3D GLB STAGE (espace_memory / shots/3.jpeg) === */
#room-glb-stage {
  position: absolute;
  left: 54.5%;
  top: 46.5%;
  width: min(44vw, 660px);
  height: min(36vw, 500px);
  transform: translate(-50%, -50%);
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.65s var(--ease-out), visibility 0.65s ease;
}
#room-glb-stage.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.room-glb-aura {
  position: absolute;
  inset: 4% 2%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at 50% 52%,
    rgba(8, 12, 22, 0.96) 0%,
    rgba(10, 14, 24, 0.88) 42%,
    rgba(12, 16, 26, 0.52) 64%,
    rgba(12, 16, 26, 0) 80%
  );
  pointer-events: none;
}
.room-glb-aura::after {
  content: "";
  position: absolute;
  inset: 12% 18%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at 48% 42%,
    rgba(196, 164, 107, 0.20) 0%,
    rgba(148, 199, 218, 0.10) 48%,
    rgba(0, 0, 0, 0) 75%
  );
  animation: quietGlow 5.5s ease-in-out infinite;
}
#room-glb-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  z-index: 2;
}
#room-glb-canvas:active {
  cursor: grabbing;
}

/* === FULL-VIEWPORT 3D DETAIL INSPECTION STUDIO === */
.studio-overlay {
  position: fixed;
  inset: 0;
  z-index: 88;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(196, 164, 107, 0.13) 0%, rgba(15, 18, 28, 0.55) 45%, #07080b 84%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.45s var(--ease-out), visibility 0.45s ease;
}
.studio-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
#studio-glb-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}
#studio-glb-canvas:active {
  cursor: grabbing;
}
.studio-pins-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}
.studio-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px;
}
.studio-pin-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(242, 237, 228, 0.65);
  background: rgba(10, 10, 12, 0.55);
  display: grid;
  place-items: center;
  font-size: 0.56rem;
  font-variant-numeric: tabular-nums;
  color: var(--alabaster);
  transition: all 0.25s var(--ease-out);
}
.studio-pin:hover .studio-pin-dot,
.studio-pin.active .studio-pin-dot {
  border-color: var(--brass-bright);
  background: var(--brass);
  color: var(--ink);
  transform: scale(1.16);
}
.studio-pin-label {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--alabaster);
  background: rgba(10, 10, 12, 0.84);
  border: 1px solid var(--hairline);
  border-left: 1.5px solid var(--brass);
  padding: 4px 10px;
  white-space: nowrap;
  opacity: 0.78;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}
.studio-pin:hover .studio-pin-label,
.studio-pin.active .studio-pin-label {
  opacity: 1;
  border-color: var(--brass-hair);
}

.studio-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 34px;
  background: linear-gradient(to bottom, rgba(7, 8, 11, 0.84), rgba(7, 8, 11, 0));
  pointer-events: none;
}
.studio-top > * {
  pointer-events: auto;
}

.studio-detail-card {
  position: absolute;
  left: 34px;
  top: 96px;
  z-index: 10;
  width: min(330px, 86vw);
  background: rgba(10, 10, 12, 0.82);
  border: 1px solid var(--hairline);
  backdrop-filter: blur(18px);
}
.studio-detail-list {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--hairline);
}
.studio-sub-btn {
  text-align: left;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(242, 237, 228, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ash);
  transition: all 0.2s ease;
}
.studio-sub-btn:last-child {
  border-bottom: none;
}
.studio-sub-btn:hover,
.studio-sub-btn.active {
  color: var(--alabaster);
  background: rgba(196, 164, 107, 0.08);
  border-left: 2px solid var(--brass);
}
.studio-detail-active {
  padding: 16px 18px 18px;
}
.studio-detail-active h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--alabaster);
  margin-bottom: 6px;
}
.studio-detail-active p {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--alabaster-soft);
}

.studio-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 20px 34px 24px;
  background: linear-gradient(to top, rgba(7, 8, 11, 0.88), rgba(7, 8, 11, 0));
}
.studio-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.studio-sep {
  width: 1px;
  height: 16px;
  background: var(--hairline-strong);
}

/* === WING ROOM SWITCHER STRIP === */
.wing-strip-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wing-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.wing-room-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ash);
  background: rgba(10, 10, 12, 0.64);
  border: 1px solid rgba(242, 237, 228, 0.10);
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}
.wing-room-btn:hover {
  color: var(--alabaster);
  border-color: var(--brass-hair);
}
.wing-room-btn.active {
  color: var(--alabaster);
  border-color: var(--brass);
  background: rgba(196, 164, 107, 0.14);
}
.wing-room-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(242, 237, 228, 0.22);
}
.wing-room-btn.visited .wing-room-dot {
  background: var(--sage);
}
.wing-room-btn.active .wing-room-dot {
  background: var(--brass-bright);
}

/* === AUTO-TOUR RIBBON === */
#autotour-bar {
  position: fixed;
  top: 74px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  z-index: 42;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 18px;
  background: rgba(10, 10, 12, 0.90);
  border: 1px solid var(--brass-hair);
  backdrop-filter: blur(14px);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.35s var(--ease-out);
}
#autotour-bar.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.autotour-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brass-bright);
  animation: quietGlow 1.8s infinite;
}

/* === THEMATIC WING PUZZLE WIDGETS === */
.dna-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.dna-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 6px;
  border: 1px solid var(--hairline);
  background: rgba(8, 8, 10, 0.7);
  font-variant-numeric: tabular-nums;
}
.dna-slot.current {
  border-color: var(--brass);
  background: rgba(196, 164, 107, 0.10);
}
.dna-slot.done {
  border-color: var(--sage);
}
.dna-top, .dna-bot {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--alabaster);
}
.dna-bond {
  font-size: 0.72rem;
  color: var(--brass);
}
.dna-choices {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.dna-btn {
  padding: 9px;
  border: 1px solid var(--hairline-strong);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--alabaster);
  transition: all 0.2s ease;
}
.dna-btn:hover {
  border-color: var(--brass-bright);
  background: rgba(196, 164, 107, 0.14);
}

.bio-sliders {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bio-row {
  display: grid;
  grid-template-columns: 145px 1fr 42px;
  align-items: center;
  gap: 12px;
  font-size: 0.76rem;
  color: var(--alabaster-soft);
}
.bio-row em {
  font-style: normal;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.mesh-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mesh-node-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--hairline-strong);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--alabaster-soft);
  transition: all 0.2s ease;
}
.mesh-node-btn:hover {
  border-color: var(--spectral);
  color: var(--alabaster);
}
.mesh-node-btn.linked {
  border-color: var(--brass-bright);
  background: rgba(196, 164, 107, 0.14);
  color: var(--alabaster);
}
.mesh-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid var(--spectral);
}
.mesh-node-btn.linked .mesh-dot {
  background: var(--brass-bright);
  border-color: var(--brass-bright);
}

/* === TIMELINE & SEARCH === */
.timeline-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 12px;
}
.timeline-filters {
  display: flex;
  gap: 20px;
}
.editorial-input {
  background: #08080a;
  border: 1px solid var(--hairline-strong);
  color: var(--alabaster);
  font-family: inherit;
  font-size: 0.82rem;
  padding: 9px 13px;
  outline: none;
  min-width: 240px;
  transition: border-color 0.2s ease;
}
.editorial-input:focus {
  border-color: var(--brass);
}
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 58vh;
  overflow-y: auto;
  padding-right: 4px;
}
.timeline-row {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  background: rgba(242, 237, 228, 0.015);
}
.timeline-row.unlocked {
  border-color: var(--brass-hair);
}
.tl-year {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--brass-bright);
  font-variant-numeric: tabular-nums;
}
.tl-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.tl-wing {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ash);
}
.tl-check {
  color: var(--sage);
  font-size: 0.78rem;
}
.tl-content h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--alabaster);
}
.tl-content p {
  font-size: 0.76rem;
  color: var(--ash);
  margin-top: 2px;
}
.tl-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* === 2046 MEMORY WALL === */
.wall-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--hairline);
}
.wall-form-row {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 10px;
}
.wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.wall-plaque {
  padding: 18px;
  border: 1px solid var(--hairline);
  border-top: 2px solid var(--brass-hair);
  background: rgba(242, 237, 228, 0.02);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wall-plaque.mine {
  border-color: var(--brass);
  background: rgba(196, 164, 107, 0.07);
}
.wall-plaque-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
}
.wall-plaque p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.06rem;
  line-height: 1.5;
  color: var(--alabaster);
}

/* === ACCESSIBILITY PANEL & MODES === */
.a11y-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}
.a11y-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  cursor: pointer;
}
.a11y-row-title {
  font-size: 0.86rem;
  color: var(--alabaster);
  margin-bottom: 2px;
}
.a11y-row-desc {
  font-size: 0.74rem;
  color: var(--ash);
}
.a11y-check {
  width: 18px;
  height: 18px;
  accent-color: var(--brass);
  cursor: pointer;
}

/* Accessibility body overrides */
body.a11y-show-labels .hotspot .hs-callout {
  opacity: 0.94;
  transform: translateY(-50%) translateX(0);
}
body.a11y-contrast {
  --surface: rgba(0, 0, 0, 0.95);
  --surface-solid: #000000;
  --alabaster: #ffffff;
  --alabaster-soft: #f0f0f0;
  --ash: #cfcfcf;
  --hairline: rgba(255, 255, 255, 0.38);
  --hairline-strong: rgba(255, 255, 255, 0.65);
}
body.a11y-large-text {
  font-size: 18px;
}
body.a11y-large-text .dialogue-text {
  font-size: 1.32rem;
}
body.a11y-large-text .dossier-prose {
  font-size: 1.06rem;
}
body.a11y-reduced-motion *,
body.a11y-reduced-motion *::before,
body.a11y-reduced-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

@keyframes quietGlow {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

@keyframes quietPulse {
  0% { transform: scale(0.95); opacity: 0.55; }
  100% { transform: scale(1.75); opacity: 0; }
}

@media (max-width: 960px) {
  .hud-top {
    grid-template-columns: 1fr auto;
    padding: 14px 18px;
  }
  .hud-objective {
    display: none;
  }
  .coherence-label,
  .controls-hint {
    display: none;
  }
  .hud-bottom {
    padding: 14px 18px;
  }
  .modal-plate {
    padding: 22px 18px;
  }
  .cert-stats {
    grid-template-columns: 1fr;
  }
  .cert-stat {
    border-right: none;
    border-bottom: 1px solid var(--hairline);
  }
  .cert-stat:last-child {
    border-bottom: none;
  }
  .studio-detail-card {
    top: auto;
    bottom: 84px;
    left: 16px;
    width: calc(100vw - 32px);
  }
  .studio-detail-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  #dialogue-bar {
    padding: 14px 16px 14px 104px;
    bottom: 22px;
  }
  .agent-portrait-wrap {
    width: 92px;
    height: 112px;
    left: 4px;
  }
  .agent-portrait {
    width: 94px;
    max-height: 114px;
  }
}


/* === ROTUNDA COMPLETED-WING ARCHWAY SEALS === */
.hotspot.wing-sealed .hs-ring {
  border-color: var(--brass-bright);
  box-shadow: 0 0 14px rgba(196, 164, 107, 0.36);
}
.hotspot.wing-sealed .hs-core {
  background: var(--brass-bright);
  transform: rotate(45deg);
  border-radius: 1px;
  width: 7px;
  height: 7px;
}
.hotspot.wing-sealed .hs-seal-badge {
  display: inline-block;
  margin-left: 6px;
  color: var(--brass-bright);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
}

/* === HUD EDITORIAL AUDIO MIXER POPOVER === */
.audio-mixer {
  position: fixed;
  top: 64px;
  right: 26px;
  width: 264px;
  z-index: 65;
  padding: 16px 18px;
  background: rgba(10, 10, 12, 0.94);
  border: 1px solid var(--brass-hair);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.24s var(--ease-out);
  pointer-events: none;
}
.audio-mixer.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.mixer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass-bright);
}
.mixer-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.72rem;
  color: var(--alabaster-soft);
  letter-spacing: 0.04em;
}
.mixer-row input[type="range"] {
  width: 100%;
  accent-color: var(--brass);
  cursor: pointer;
  height: 3px;
}

/* === SECRET CRYPT A1 BLOCK & ARCHITECT EMBLEM === */
.secret-crypt-block {
  margin: 18px 0;
  padding: 16px 18px;
  border: 1px solid var(--brass-hair);
  background: rgba(196, 164, 107, 0.06);
}
.secret-crypt-kicker {
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass-bright);
  margin-bottom: 6px;
}
.secret-crypt-text {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--alabaster-soft);
}
.emblem-secret {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 7px 14px;
  border: 1px solid var(--brass);
  background: rgba(196, 164, 107, 0.12);
  color: var(--brass-bright);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* === JURY CREDITS & HONESTY CHARTER MODAL === */
.credits-body {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.credits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.credits-card {
  padding: 16px 18px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.018);
}
.credits-card-kicker {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass-bright);
  margin-bottom: 8px;
}
.credits-card p {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--alabaster-soft);
}
.charter-rule {
  padding: 16px 18px;
  border-left: 2px solid var(--brass);
  background: rgba(196, 164, 107, 0.05);
}
.charter-rule strong {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass-bright);
  margin-bottom: 6px;
}
.charter-rule p {
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--alabaster);
}

/* === MOBILE TOUCH ERGONOMICS & BOTTOM-SHEET DOSSIER === */
#gl-canvas {
  touch-action: none;
}
.mobile-edge-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 26;
  width: 38px;
  height: 54px;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 12, 0.68);
  border: 1px solid rgba(242, 237, 228, 0.18);
  color: var(--alabaster);
  backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, opacity 0.2s ease;
}
.mobile-edge-nav svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}
.mobile-edge-nav.prev { left: 10px; }
.mobile-edge-nav.next { right: 10px; }
.mobile-edge-nav.visible { display: flex; }
.mobile-edge-nav:active {
  border-color: var(--brass);
  color: var(--brass-bright);
}

@media (max-width: 760px) {
  .credits-grid {
    grid-template-columns: 1fr;
  }
  .drawer-backdrop {
    align-items: flex-end;
    justify-content: center;
  }
  .dossier-panel {
    width: 100vw;
    max-width: 100vw;
    height: 82vh;
    border-left: none;
    border-top: 1px solid var(--brass-hair);
    transform: translateY(100%);
  }
  .drawer-backdrop.open .dossier-panel {
    transform: translateY(0);
  }
  .study-3d-wrap {
    height: 205px;
  }
  .hud-actions .nav-link span {
    display: none;
  }
  .audio-mixer {
    right: 12px;
    top: 58px;
    width: calc(100vw - 24px);
    max-width: 300px;
  }
}
