/* =========================================================
   exhibition.css — the walkable room (Three.js) + its HTML overlays
   Loaded after base.css / vignette.css (tokens, .v-cta, fonts).
   ========================================================= */

html, body.exhibition {
  height: 100%; margin: 0; overflow: hidden;
  background: #000; color: var(--v-ink);
  font-family: var(--mono);
  -webkit-user-select: none; user-select: none;
  touch-action: none;
}
#stage { position: fixed; inset: 0; display: block; width: 100%; height: 100%; outline: none; }
#stage.grab { cursor: grab; }
#stage.grabbing { cursor: grabbing; }
#stage.point { cursor: zoom-in; }

/* ---- generic overlay bits ---- */
.ex-ui { position: fixed; z-index: 20; }
.ex-ui a, .ex-ui button {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(255,255,255,0.72); text-decoration: none;
  background: none; border: none; padding: 0.6rem 0.2rem; cursor: pointer;
}
.ex-ui a:hover, .ex-ui button:hover { color: #fff; }
.ex-ui button:focus-visible, .ex-ui a:focus-visible { outline: 1px solid var(--v-orange); outline-offset: 3px; }

.ex-top  { top: 1rem; left: 1.4rem; }
.ex-mute { top: 1rem; right: 1.4rem; }
/* Embedded in vignette.html: the overlay owns the top-right (Close) and the
   window was already the way in, so drop the second door and the back-link,
   and move the sound control to the free corner. */
.embedded .ex-enter { display: none; }
.embedded .ex-top   { display: none; }
.embedded .ex-mute  { right: auto; left: 1.4rem; }
/* the state class lives on the button, so the labels key off the button */
.ex-mute .on  { display: inline; }
.ex-mute .off { display: none; }
.ex-mute button.muted .on  { display: none; }
.ex-mute button.muted .off { display: inline; }

/* ---- entrance (before you step in) ---- */
.ex-enter {
  position: fixed; inset: 0; z-index: 40;
  background:
    radial-gradient(80% 60% at 50% 30%, rgba(142,15,15,0.28), transparent 70%),
    #060202;
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 2rem; transition: opacity 1.4s ease;
}
.ex-enter.hidden { opacity: 0; pointer-events: none; }
.ex-enter .inner { max-width: 640px; }
.ex-enter .v-label { color: var(--v-dim); margin-bottom: 1.2rem; }
.ex-enter h1 {
  font-family: var(--slab); font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.02; margin: 0 0 1.2rem;
}
.ex-enter h1 .dim { color: var(--v-dim); font-weight: 500; }
.ex-enter p { font-size: 0.86rem; line-height: 1.9; color: var(--v-muted); margin: 0 0 0.5rem; }
.ex-enter p.ja { font-family: "Noto Serif JP", serif; font-size: 0.84rem; color: var(--v-dim); }
.ex-enter .v-cta { margin-top: 2rem; width: auto; min-width: 280px; white-space: nowrap; }
.ex-enter .guide {
  margin-top: 2.2rem; display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap;
  font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--v-faint);
}
.ex-enter .guide b { display: block; color: var(--v-muted); letter-spacing: 0.08em; margin-top: 0.3rem; font-weight: 500; text-transform: none; }
.ex-enter .guide .pc { display: block; } .ex-enter .guide .touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .ex-enter .guide .pc { display: none; } .ex-enter .guide .touch { display: block; }
}
.ex-enter .fallback { margin-top: 1.6rem; font-size: 0.64rem; letter-spacing: 0.1em; color: var(--v-faint); }
.ex-enter .fallback a { color: var(--v-dim); }

/* ---- first-seconds hint ---- */
.ex-hint {
  left: 50%; top: 1.4rem; transform: translateX(-50%);
  font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(255,255,255,0.55); white-space: nowrap;
  opacity: 0; transition: opacity 0.8s;
}
.ex-hint.show { opacity: 1; }
/* On a phone the corners are taken by Sound and Close, so the hint drops
   below them and is allowed to wrap instead of running through them. */
@media (max-width: 860px) {
  .ex-hint {
    top: 3.6rem; white-space: normal; max-width: 82vw; text-align: center;
    font-size: 0.6rem; letter-spacing: 0.14em; line-height: 1.7;
    text-shadow: 0 1px 8px rgba(0,0,0,0.9);
  }
}

/* ---- proximity plate (museum label) ---- */
/* (no plate — the nav carries your position, nothing covers the work) */

/* ---- hotspots: a light-point over every work you can go to ---- */
#hotspots { position: fixed; inset: 0; z-index: 15; pointer-events: none; }
.hs {
  position: absolute; left: 0; top: 0;
  background: none; border: none; padding: 10px; cursor: pointer;
  opacity: 0; transition: opacity 0.25s;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.hs .dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 25%, rgba(255,240,220,0.85) 45%, rgba(255,240,220,0) 70%);
  box-shadow: 0 0 14px 4px rgba(255,214,170,0.35);
  animation: breathe 2.6s ease-in-out infinite;
}
@keyframes breathe { 0%,100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.25); opacity: 1; } }
.hs .lbl {
  order: -1;                       /* above the dot, so it never sits on the frame */
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.7); white-space: nowrap;
  background: rgba(8,3,3,0.6); padding: 3px 8px; border: 1px solid rgba(255,255,255,0.12);
  opacity: 0; transform: translateY(-4px); transition: opacity 0.2s, transform 0.2s;
}
.hs:hover .lbl, .hs:focus-visible .lbl { opacity: 1; transform: none; }
.hs:hover .dot { transform: scale(1.4); animation: none; }
.hs:focus-visible { outline: none; }
@media (hover: none) and (pointer: coarse) { .hs .lbl { opacity: 1; transform: none; } }

/* ---- station nav: ◀ ⌂ ▶ ---- */
.ex-nav {
  left: 50%; bottom: 1.6rem; transform: translateX(-50%);
  display: flex; align-items: center; gap: 0.4rem;
  background: rgba(8,3,3,0.62); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.14); border-radius: 999px; padding: 0.3rem 0.5rem;
}
.ex-nav button {
  width: 48px; height: 48px; border-radius: 50%; padding: 0 !important;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem !important; letter-spacing: 0 !important; color: rgba(255,255,255,0.85) !important;
  transition: background 0.2s, color 0.2s;
}
.ex-nav button:hover { background: rgba(255,255,255,0.08); color: #fff !important; }
.ex-nav button:active { background: rgba(194,20,20,0.45); }
.ex-nav button:disabled { opacity: 0.3; cursor: default; }
.ex-nav .pos {
  min-width: 7ch; text-align: center; font-family: var(--mono); font-size: 0.66rem;
  letter-spacing: 0.16em; color: rgba(255,255,255,0.6); font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media (hover: none) and (pointer: coarse) {
  .ex-nav { bottom: 1.2rem; }
  .ex-nav button { width: 56px; height: 56px; font-size: 1.2rem !important; }
}

/* ---- lightbox (face the work) ---- */
.lb {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(4,1,1,0.94);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.35s ease;
}
.lb.open { opacity: 1; pointer-events: auto; }
.lb img {
  max-width: 92vw; max-height: 76vh; display: block;
  box-shadow: 0 50px 120px -30px rgba(0,0,0,1);
  border: 1px solid rgba(255,255,255,0.12);
}
.lb .lb-cap { margin-top: 1.1rem; font-size: 0.7rem; letter-spacing: 0.14em; color: var(--v-muted); text-align: center; max-width: 60ch; line-height: 1.7; }
.lb .lb-cap b { font-family: var(--slab); font-size: 1rem; letter-spacing: 0.02em; color: var(--v-ink); display: block; margin-bottom: 0.25rem; }
.lb .lb-cap .ja { font-family: "Noto Serif JP", serif; color: var(--v-dim); font-weight: 400; font-size: 0.85em; }
.lb button {
  position: absolute; background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.7); font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.16em; text-transform: uppercase; padding: 1rem;
}
.lb button:hover { color: #fff; }
.lb .lb-close { top: 1rem; right: 1.2rem; }

/* ---- reduced motion: no fades, everything just appears ---- */
@media (prefers-reduced-motion: reduce) {
  .ex-enter, .ex-plate, .ex-hint, .lb { transition: none; }
}
