:root{color-scheme:light;--paper:#f8f6ef;--ink:#26392f;--muted:#5d685e;--line:#dfdfd1;--green:#355744;--serif:"Songti SC","Noto Serif CJK SC",STSong,SimSun,serif;--sans:"PingFang SC","Microsoft YaHei",system-ui,sans-serif}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--paper);color:var(--ink);font:14px/1.65 var(--sans)}
button,a,textarea{font:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}
:focus-visible{outline:2px solid #ab694e;outline-offset:4px}
.symbols{position:absolute;width:0;height:0;overflow:hidden}
.top{border-bottom:1px solid var(--line);background:#faf8f1}
.top-inner,.wrap{width:min(1120px,calc(100% - 64px));margin-inline:auto}
.top-inner{height:72px;display:flex;align-items:center;justify-content:space-between}
.brand{display:flex;gap:12px;align-items:center;font:700 23px/1.05 var(--serif);letter-spacing:.08em}
.brand-icon{display:grid;place-items:center;background:var(--green);color:#f9f5e7;width:37px;height:37px;border-radius:9px}
.brand svg,.lesson-icon svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.45;stroke-linejoin:round;stroke-linecap:round}
.brand small{display:block;font:700 8px var(--sans);letter-spacing:.17em;margin-top:5px;color:var(--muted)}
nav{display:flex;gap:34px;color:var(--muted)}
nav a:hover{color:var(--ink);text-decoration:underline;text-underline-offset:5px}
.role{border:1px solid #dce1d2;background:#edf0e6;border-radius:40px;padding:5px 13px;white-space:nowrap;font-size:12px}
.role span{margin-right:4px;color:#637659}
.eyebrow,.kicker{font-weight:700;font-size:10px;letter-spacing:.2em;color:#536952;display:flex;gap:10px;align-items:center;margin:0}
.eyebrow span{display:inline-block;width:19px;height:1px;background:#82907a}
h1,h2{font-family:var(--serif);margin:0;line-height:1.18}
.primary{display:inline-flex;gap:20px;align-items:center;border:0;border-radius:7px;padding:11px 17px;background:var(--green);color:#fffdf4;font-weight:650}
.primary:hover{background:#264434}
.close{border:0;color:var(--green);background:#edf0e6;border-radius:5px;padding:5px 9px;font-weight:650}
progress{width:100%;height:8px;display:block;appearance:none;margin:7px 0;border:0;border-radius:10px;overflow:hidden;background:#d9dfd0;accent-color:var(--green)}
progress::-webkit-progress-bar{background:#d9dfd0}
progress::-webkit-progress-value{background:var(--green)}
progress::-moz-progress-bar{background:var(--green)}
footer{padding:20px 0 24px;color:var(--muted);font-size:11px;gap:10px}
dialog{width:min(520px,calc(100% - 28px));max-height:calc(100% - 32px);border:1px solid var(--line);border-radius:15px;background:#fffdf7;color:var(--ink);padding:24px 27px;box-shadow:0 15px 75px #19251d33}
dialog::backdrop{background:#202e26a0}
.dialog-head{display:flex;justify-content:space-between;align-items:center}
dialog h2{margin:5px 0 15px;font-size:33px}
dialog p{margin:10px 0}
.close{font-size:20px;line-height:1}
dialog blockquote{margin:0 0 12px;padding:10px 15px;border-left:2px solid #869578;background:#eff1e7;font:700 20px/1.65 var(--serif)}
dialog fieldset{border:1px solid var(--line);margin:14px 0;padding:8px 12px}
dialog label{display:block;margin:6px 0}
textarea{display:block;width:100%;padding:10px;margin:8px 0 14px;border:1px solid #9fae9b;border-radius:6px;background:#fffefa;color:inherit;resize:vertical}
.timer{display:grid;place-items:center;border-radius:50%;width:100px;height:100px;background:#edf0e6;margin:12px auto;font-size:27px;font-variant-numeric:tabular-nums}
.timer-guide{text-align:center}
#feedback:empty{display:none}
body{overflow:hidden}
.top{position:relative;z-index:1}
.top-inner{height:62px;width:calc(100% - 48px)}
.world-status{color:var(--muted);letter-spacing:.25em;font-family:var(--serif)}
.world{position:relative;height:calc(100dvh - 63px);isolation:isolate;background:#dce1cd;overflow:hidden}
#temple-scene{position:absolute;inset:0;display:block;width:100%;height:100%;touch-action:none;cursor:grab;outline-offset:-4px}
#temple-scene:active{cursor:grabbing}
.world-heading{position:absolute;top:25px;left:26px;pointer-events:none;text-shadow:0 1px 12px #f2efe1}
.world-heading h1{font-size:clamp(40px,6vw,76px);letter-spacing:.04em;margin-top:3px}
.world-heading>p:last-child{margin:3px 0;color:#3a4b40}
.landmarks{position:absolute;inset:0;pointer-events:none}
.waypoint{position:absolute;transform:translate(-50%,-100%);pointer-events:auto;white-space:nowrap;background:#faf7e8;color:#2e4637;border:1px solid #899681;border-radius:5px;padding:6px 12px;box-shadow:0 4px 15px #1e382f38;font-family:var(--serif);font-weight:700}
.waypoint::before{content:"◇";margin-right:5px;color:#865135}
.waypoint::after{content:"";position:absolute;left:50%;top:100%;height:9px;width:1px;background:#faf7e8}
.waypoint:hover{background:#fff;color:#172b1e}
.waypoint.completed::before{content:"✓";color:#46694e}
.world-controls,.world-progress{position:absolute;bottom:18px;background:#f9f7e9ef;border:1px solid #bcc7b0;border-radius:8px;box-shadow:0 4px 20px #273b2929}
.world-controls{left:18px;display:flex;align-items:center;gap:10px;padding:8px;color:var(--muted);font-size:11px}
.world-controls button{background:#e5ecdf;color:var(--green);border:0;border-radius:4px;padding:5px 8px}
.world-progress{right:18px;width:min(220px,42vw);padding:10px 12px}
.world-progress div{display:flex;justify-content:space-between;gap:5px}
.world-progress h2{font-size:16px}
.world-progress strong{font-size:12px;white-space:nowrap}
.world-progress p{font-size:10px;margin:0;color:var(--muted)}
.scene-error{position:absolute;inset:45% 15% auto;text-align:center}
.world.fallback .landmarks{display:flex;justify-content:center;align-items:center;gap:10px}
.world.fallback .waypoint{position:relative;transform:none}
[hidden]{display:none!important}
button:disabled{opacity:.62;cursor:default}
@media(max-width:650px){.top-inner{width:calc(100% - 26px)}.world-heading{left:15px;top:15px}.world-heading>p:last-child{font-size:12px}.world-controls{bottom:12px;left:10px;flex-direction:column;align-items:start;gap:4px}.world-controls span{font-size:9px}.world-progress{bottom:12px;right:10px}.waypoint{font-size:12px;padding:4px 6px}}
.waypoint{pointer-events:none}
.world.fallback .waypoint{pointer-events:auto}
.reticle{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);color:#fffbe7;font-size:21px;text-shadow:0 0 5px #26392f;pointer-events:none}
.practice-prompt{position:absolute;left:50%;top:57%;transform:translateX(-50%);background:#243f33;color:#fffae9;border:1px solid #a3ac8e;border-radius:6px;padding:8px 13px;white-space:nowrap}
.touch-controls{display:none}
.world.fallback .reticle,.world.fallback .practice-prompt,.world.fallback .touch-controls{display:none}
@media(pointer:coarse){
  .touch-controls{position:absolute;bottom:88px;left:12px;display:grid;grid-template-columns:repeat(3,44px);gap:3px}
  .touch-controls button{height:44px;border:1px solid #bcc7b0;border-radius:6px;background:#f9f7e9e8;color:var(--green);touch-action:none}
  .touch-controls button:first-child{grid-column:2}
  .touch-controls button:nth-child(2){grid-column:1}
}
.gate{display:grid;min-height:100dvh;place-items:center;overflow:auto;padding:24px;background:radial-gradient(ellipse at 70% 80%,#b5c3a9,#f7f4eb 75%)}
.gate-panel{width:min(100%,440px);padding:clamp(26px,7vw,54px);border:1px solid var(--line);border-radius:12px;background:#faf8f1;box-shadow:0 15px 60px #29372b1f}
.gate-panel h1{margin:12px 0;font-size:clamp(48px,11vw,74px)}
.gate-panel p:not(.eyebrow){margin:0 0 22px;color:var(--muted)}
.gate-panel label{display:grid;gap:3px;margin:10px 0}
.gate-panel input{min-width:0;width:100%;padding:8px;border:1px solid var(--line);border-radius:5px;background:#fffdf5;font:inherit}
.gate-actions{display:flex;gap:8px;flex-wrap:wrap}
.gate-panel .gate-message{margin:9px 0 0}
.gate-message:empty{display:none}
