/* The Treachery of Sanctuary — 재현
   전시장 룩: 어두운 방 + 백색 라이트박스 3면 + 바닥 반사 */

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%; overflow: hidden;
  background: #07070a;
  color: #e9e6df;
  font-family: "Pretendard", "Noto Sans KR", -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  cursor: default;
}

#stage { display: block; width: 100vw; height: 100vh; }

/* MediaPipe 입력 전용. 화면에서는 숨김 */
#cam {
  position: fixed; left: -10000px; top: 0;
  width: 640px; height: 480px;
}

/* ── 인트로 ─────────────────────────────────────────────── */
#intro {
  position: fixed; inset: 0; z-index: 30;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 40%, #16161c 0%, #07070a 70%);
  transition: opacity .6s ease;
}
#intro.gone { opacity: 0; pointer-events: none; }

.intro-box { max-width: 720px; padding: 0 32px; text-align: center; }

.kicker {
  font-size: 11px; letter-spacing: .34em; text-transform: uppercase;
  color: #6f6a60; margin-bottom: 26px;
}

#intro h1 {
  margin: 0; font-size: clamp(34px, 6.2vw, 74px); line-height: 1.02;
  font-weight: 300; letter-spacing: .12em; color: #f4f1ea;
}

.sub {
  margin-top: 18px; font-size: 13px; letter-spacing: .18em;
  color: #8d867a; text-transform: uppercase;
}

.blurb {
  margin: 34px auto 30px; max-width: 560px;
  font-size: 14px; line-height: 2; color: #a49d90;
}
.blurb b { color: #ddd7ca; font-weight: 500; letter-spacing: .06em; }

.btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

button {
  font: inherit; font-size: 13px; letter-spacing: .08em;
  padding: 13px 26px; border-radius: 2px; cursor: pointer;
  border: 1px solid #3a3730; background: transparent; color: #cdc6b8;
  transition: all .18s ease;
}
button:hover { border-color: #8d867a; color: #fff; }
button.primary { background: #eae5da; color: #14140f; border-color: #eae5da; }
button.primary:hover { background: #fff; border-color: #fff; }

.hint {
  margin-top: 34px; font-size: 11.5px; line-height: 2; color: #605a51;
}
.hint b { color: #8d867a; }

/* ── 상태 / 도움말 / 디버그 ─────────────────────────────── */
#status {
  position: fixed; left: 18px; bottom: 14px; z-index: 20;
  font-size: 11px; letter-spacing: .1em; color: #4d4841;
  pointer-events: none; white-space: pre;
}

#help {
  position: fixed; right: 18px; top: 18px; z-index: 25;
  background: rgba(10,10,13,.92); border: 1px solid #26241f;
  padding: 18px 22px; font-size: 12px; color: #9c9488;
  max-width: 380px;
}
#help h3 { margin: 0 0 12px; font-size: 11px; letter-spacing: .22em; color: #6f6a60; font-weight: 400; }
#help table { border-collapse: collapse; }
#help td { padding: 3px 0; vertical-align: top; }
#help td:first-child { color: #ddd7ca; width: 108px; font-weight: 500; }

#debug {
  position: fixed; left: 18px; top: 18px; z-index: 25;
  background: rgba(10,10,13,.9); border: 1px solid #26241f; padding: 10px;
}
#dbg-mask {
  width: 200px; height: 150px; image-rendering: pixelated;
  background: #000; display: block;
}
#dbg-text { margin: 8px 0 0; font-size: 10.5px; line-height: 1.7; color: #7d7669;
  font-family: "Cascadia Mono", Consolas, monospace; white-space: pre; }

.hidden { display: none !important; }

/* 원작 영상으로 가는 줄 — 재현물 옆에 항상 원작이 있어야 한다 */
.refline {
  margin: 18px 0 0;
  font-family: "IBM Plex Mono", Consolas, "Malgun Gothic", monospace;
  font-size: 10.5px; letter-spacing: .04em; color: #605a51;
}
.refline a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(96,90,81,.45); }
.refline a:hover { color: #a89f92; border-bottom-color: currentColor; }
