* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #000; color: #f3dfb4;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif; }

#stage { position: fixed; inset: 0; }
#stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 1.6s ease; }
#prologue { opacity: 0; }
#vignette { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.55) 100%); }

canvas { position: fixed !important; inset: 0; z-index: 5; pointer-events: none; }
video.cam { position: fixed; right: 20px; bottom: 20px; width: 192px; height: 144px; z-index: 8; transform: scaleX(-1);
  opacity: .55; border: 1px solid rgba(255,190,110,.55); object-fit: cover; transition: opacity .8s; }
video.cam.hide { opacity: 0; }

.panel { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(40,14,4,.72), rgba(0,0,0,.94)); opacity: 0; pointer-events: none; transition: opacity 1.2s ease; }
.panel.show { opacity: 1; pointer-events: auto; }
.seal { letter-spacing: .6em; font-size: 14px; color: #c9483a; border: 1px solid #c9483a; padding: 6px 14px; margin-bottom: 26px; }
.panel h1 { font-size: clamp(56px, 9vw, 120px); letter-spacing: .3em; font-weight: 700; color: #f7e3b5;
  text-shadow: 0 0 30px rgba(255,150,40,.55), 0 0 80px rgba(200,60,20,.35); padding-left: .3em; }
.sub { margin-top: 12px; letter-spacing: .5em; color: #d9b77a; }
.guide { list-style: none; margin: 34px 0 30px; text-align: center; line-height: 2.1; color: #e8cf9c; font-size: 17px; }
.guide b { color: #ffb35a; font-weight: 600; }
button { font-family: inherit; font-size: 18px; letter-spacing: .3em; color: #1a0b03; cursor: pointer;
  background: linear-gradient(180deg, #ffd48a, #d98a2b); border: none; padding: 14px 38px; border-radius: 2px;
  box-shadow: 0 0 24px rgba(255,160,60,.55); transition: transform .2s, box-shadow .2s; }
button:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(255,170,70,.85); }
button:disabled { filter: grayscale(.8) brightness(.6); cursor: wait; }
.hint { margin-top: 18px; font-size: 14px; color: #b89668; }
.tiny { margin-top: 10px; font-size: 12px; color: #7d6448; }

#caption { position: fixed; left: 50%; bottom: 13%; transform: translateX(-50%); z-index: 10; text-align: center;
  opacity: 0; transition: opacity .6s ease; pointer-events: none; }
#caption.show { opacity: 1; }
#capMain { display: block; font-size: clamp(22px, 2.6vw, 34px); letter-spacing: .35em; color: #fff0cc;
  text-shadow: 0 0 18px rgba(255,140,40,.9), 0 2px 6px #000; }
#capSub { display: block; margin-top: 10px; font-size: 15px; letter-spacing: .25em; color: #e2c08a; text-shadow: 0 2px 4px #000; }

#chapters { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); z-index: 10; display: flex; gap: 6px;
  opacity: 0; transition: opacity .8s; }
#chapters.show { opacity: 1; }
#chapters span { font-size: 13px; letter-spacing: .2em; padding: 5px 12px; color: rgba(240,210,160,.45);
  border-bottom: 1px solid rgba(240,210,160,.2); transition: all .5s; }
#chapters span.done { color: rgba(240,210,160,.8); border-color: rgba(255,170,80,.5); }
#chapters span.on { color: #fff2cf; border-color: #ff9d3c; text-shadow: 0 0 10px #ff8a2a; }
