:root{color-scheme:dark;font-family:Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;background:#060a13;color:#f9f4e9}
*{box-sizing:border-box}html,body{margin:0;overflow:hidden}button,a,input{font:inherit}button,a{color:inherit;-webkit-tap-highlight-color:transparent}button{background:none;border:0;cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid #f5c47a;outline-offset:5px}button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}button svg circle{fill:#111725}#theatre{position:relative;height:100vh;height:100dvh;isolation:isolate;overflow:hidden;touch-action:none;background:radial-gradient(ellipse at 60% 35%,#18334a,#0b1421 57%,#05080f);outline:none}#stage{position:absolute;left:50%;top:50%;width:100%;aspect-ratio:16/9;transform:translate(-50%,-50%);overflow:hidden}#stage canvas,#passage{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}#orbital,#passage{opacity:0}.home #stage{width:max(100vw,177.77778dvh)}#veil{pointer-events:none;position:absolute;inset:0;background:linear-gradient(90deg,#060b13bf,transparent 59%),linear-gradient(0deg,#050a12a8,transparent 38%);opacity:0;transition:opacity .6s}.home #veil{opacity:1}
.top{position:absolute;top:0;left:0;width:100%;padding:clamp(16px,2.6vw,44px) 4.5vw;display:flex;align-items:center;justify-content:space-between;z-index:3;pointer-events:none}.identity,.tools{display:flex;align-items:center;gap:12px}.identity{font-size:clamp(12px,1vw,17px);letter-spacing:.05em;text-shadow:0 1px 9px #07131e}.identity img{width:35px}.identity span{border-left:1px solid #ffffff55;padding-left:12px;color:#dddfe4}.round{pointer-events:auto;display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:#08101ba6;border:1px solid #d4e3f344;backdrop-filter:blur(12px)}.round:hover,.pill:hover{border-color:#f7d3a1}.tools,.identity{transition:opacity .3s}.quiet:not(.home) .top{opacity:0}.quiet:not(.home) .top:focus-within{opacity:1}.quiet{cursor:none}.quiet button,.quiet a{cursor:pointer}
#intro{position:absolute;left:6%;bottom:11.5%;z-index:2}h1{margin:0;font-family:"Songti SC","Noto Serif CJK SC",SimSun,serif;font-size:clamp(50px,6.2vw,110px);font-weight:650;line-height:1.13;letter-spacing:-.05em;text-shadow:0 4px 42px #0a1116}h1 em{font-style:normal;color:#fcdda7}
.pill{border:1px solid #fff6;padding:.75em 1.45em;min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:1.1em;border-radius:99px;background:#0c1420b8;backdrop-filter:blur(14px);font-size:clamp(14px,1.1vw,18px);font-weight:550;text-decoration:none;transition:transform .18s,border-color .18s}.pill:hover{transform:translateY(-2px)}.pill.light{margin-top:2em;color:#25201a;background:#f9e6c8;border-color:#f9e6c8}#titleAction{position:absolute;bottom:max(4.7%,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);z-index:3;white-space:nowrap}#endTitle{position:absolute;bottom:7%;width:100%;text-align:center;color:#182237;pointer-events:none;animation:rise .8s both}#endTitle h2{font-size:clamp(16px,2.9vw,55px);letter-spacing:.05em;margin:0}#stage{transition:margin-top .8s ease}.ended #stage{margin-top:-3.5vh}.ended #theatre,.ended{background:#e3e6ee!important}.ended .identity{color:#273448;text-shadow:none}.ended .identity img{filter:invert(1)}.ended .identity span{color:#344255;border-color:#26344655}
#panel{position:absolute;z-index:5;right:4.5vw;top:clamp(70px,8.1vw,130px);width:min(390px,92vw);max-height:calc(100dvh - 115px);overflow:auto;overscroll-behavior:contain;padding:22px;border-radius:20px;background:#101824f2;border:1px solid #ffffff33;box-shadow:0 15px 80px #0005;backdrop-filter:blur(18px)}.panelHead,.timeline,.switches{display:flex;align-items:center;justify-content:space-between;gap:10px}.panelHead h2{margin:0;font-size:17px}.panelHead button{font-size:24px;color:#c7d4df}#chapters{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:17px 0}#chapters button,.switches button{color:#dadfe6;background:#ffffff09;border:1px solid #ffffff18;border-radius:8px;padding:9px;font-size:14px}#chapters button[aria-current="step"],.switches button[aria-pressed="true"]{background:#f4d5a5;color:#302719}.timeline{font-size:12px;color:#b8c1cf;font-variant-numeric:tabular-nums}.timeline input{width:100%;accent-color:#f0c68c}.switches{margin-top:14px;gap:5px}.switches button{flex:1;padding:7px 4px;font-size:12px}#panel p{margin:16px 0 0;color:#c0c8cf;font-size:11px}#error{position:absolute;top:14%;left:50%;transform:translateX(-50%);z-index:6;color:#fff;background:#15202e;padding:8px 14px;border-radius:12px}[hidden]{display:none!important}
@keyframes rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media(max-width:600px) and (orientation:portrait){.home #stage{width:155vw;top:36%}.home #veil{background:linear-gradient(0deg,#070d17 3%,#070d17ad 20%,transparent 64%)}.top{padding:18px 5%}.identity{gap:7px;font-size:11px}.identity img{width:28px}.identity span{padding-left:7px}.tools{gap:6px}.round{width:34px;height:34px}#intro{left:8%;bottom:11%}h1{font-size:clamp(45px,11vw,68px)}#panel{right:4%;top:66px}#endTitle h2{font-size:14px}}
@media(max-height:500px) and (orientation:landscape){.top{padding:10px 4vw}.round{width:32px;height:32px}#intro{bottom:6%}h1{font-size:48px}.pill.light{margin-top:.8em}#panel{top:48px;max-height:calc(100dvh - 55px);overflow:auto}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

.credits{margin-top:14px;border-top:1px solid #ffffff21;padding-top:12px;color:#c5ced8;font-size:12px}.credits summary{cursor:pointer}.credits a{display:block;margin-top:9px;text-underline-offset:3px}.pill:disabled{opacity:.65;cursor:progress}

.warmup.home:not(.scene-preview) #stage::after{content:"";position:absolute;inset:0;pointer-events:none;background:#0a1018 url("./prologue-assets/germination.webp") center/auto 100% no-repeat}
.home.scene-preview #stage{transition:opacity .35s ease}
.home.scene-preview.warmup #stage{opacity:0}

/* The opening title is printed into the same ink-and-paper palette as the set. */
.home:not(.scene-preview) #veil{background:linear-gradient(90deg,rgba(10,22,24,.17),transparent 53%)}
.home:not(.scene-preview) h1{color:#f3e5c5;text-shadow:0 2px 12px #14242344}
.home:not(.scene-preview) h1 em{color:#e4c490}
.home:not(.scene-preview) #start{background:#eedab1;color:#16343a;border-color:transparent;border-radius:2px;clip-path:polygon(0 0,calc(100% - .72em) 0,100% .72em,100% 100%,0 100%);backdrop-filter:none}
.home:not(.scene-preview) #start span{color:#ad442d}
.home:not(.scene-preview) #start:focus-visible{outline:0;box-shadow:inset 0 0 0 3px #ae412c}
@media(max-width:600px) and (orientation:portrait){
  .home:not(.scene-preview) #veil{background:linear-gradient(0deg,#101d23 0%,#101d23 14%,transparent 56%)}
}
@media(min-width:601px) and (min-height:501px){
  .home:not(.scene-preview) #intro{bottom:19%}
}

/* Landscape projection opens the horizontal field of view as the screen widens. */
@media(min-aspect-ratio:16/9){
  #stage,.home #stage{inset:0;width:100%;height:100%;aspect-ratio:auto;transform:none}
  .ended #stage{margin-top:0}
  #theatre{--end-gap:clamp(10px,2.5dvh,32px);--end-button:clamp(36px,5.8dvh,60px)}
  #titleAction{bottom:max(var(--end-gap),env(safe-area-inset-bottom))}
  #titleAction a{min-height:var(--end-button);height:var(--end-button);padding-block:0}
  #endTitle{bottom:calc(max(var(--end-gap),env(safe-area-inset-bottom)) + var(--end-button) + .9dvh)}
  #endTitle h2{font-size:clamp(16px,4.35dvh,55px)}
}
@media(min-aspect-ratio:8/3){
  .warmup.home:not(.scene-preview) #stage::after{background-size:cover}
}
.quiz-screen{position:absolute;inset:0;z-index:8;width:100%;height:100%;display:block;border:0;background:#11121a}
.quiz-standby { visibility:hidden; pointer-events:none }
.quiz-screen { opacity:1; transition:opacity .64s cubic-bezier(.33,0,.24,1) }
.quiz-screen.quiz-standby { opacity:0 }
.presenting > .top, .presenting > #titleAction { visibility:hidden }
@media(prefers-reduced-motion: reduce){ .quiz-screen { transition:none } }
