:root{color-scheme:light;font-family:"Microsoft JhengHei","PingFang TC",system-ui,sans-serif;--ink:#344e50;--paper:#f9f5e9;--glass:#fffff0e8;--gold:#d5ad65}*{box-sizing:border-box}html,body,#app{width:100%;height:100%;margin:0;overflow:hidden}body{background:#d6e6df;color:var(--ink);font-size:13px}button{font:inherit;cursor:pointer;min-height:44px;border:1px solid #fff8;background:#fff7;color:inherit;border-radius:16px;padding:10px 16px;backdrop-filter:blur(14px);transition:background .2s}button:hover{background:#ffffef}button:disabled{opacity:.45;cursor:default}button:focus-visible,a:focus-visible{outline:3px solid #bd853b;outline-offset:3px}h1,h2,h3,p{margin:0}h2{font-size:23px;line-height:1.5}p{line-height:1.8}.primary{background:#496b68;color:#fffdf0;border-color:#496b68}.primary:hover{background:#355956}.hint{font-size:11px;line-height:1.8;color:#7c8981}.small{font-size:11px;padding:7px 11px}.world-layer{position:fixed;inset:0}.world-layer canvas{display:block;width:100%;height:100%;touch-action:none}.vignette{pointer-events:none;position:fixed;inset:0;box-shadow:inset 0 0 110px #5c808917;background:linear-gradient(#e9f1e51f,transparent 18%,transparent 80%,#2a555819)}.hud{position:fixed;inset:0;pointer-events:none}.hud button,.hud a,.hud .sheet,.hud .overlay{pointer-events:auto}.topbar{position:absolute;top:max(22px,env(safe-area-inset-top));left:30px;right:30px;display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.brand h1{font-size:24px;letter-spacing:5px;color:#fdf9e9;text-shadow:0 2px 12px #285a5970;font-weight:500}.brand span{font-size:10px;letter-spacing:3px;color:#fcf9e3;text-shadow:0 1px 8px #42655c}.nav{display:flex;gap:8px}.nav button{background:#ffffefbb;box-shadow:0 5px 25px #3b67530c;font-size:12px}.chapter{position:absolute;top:107px;left:30px;max-width:340px;padding:17px 20px;border-left:2px solid #ffffde;background:linear-gradient(90deg,#f9f7e0d9,#f9f7e040);border-radius:0 18px 18px 0;color:#415e54;backdrop-filter:blur(6px)}.chapter .number{font-size:10px;letter-spacing:2px;color:#718673;margin-bottom:4px}.chapter h2{font-size:18px;letter-spacing:1px}.chapter p{font-size:11px;margin-top:6px;max-width:290px}.chapter .progress{display:flex;gap:6px;margin-top:12px}.progress i{width:24px;height:3px;background:#a1b4a770;border-radius:2px}.progress i.done{background:#658566}.place-label{position:absolute;left:50%;top:24px;transform:translateX(-50%);font-size:11px;letter-spacing:2px;color:#ffffeb;text-shadow:0 1px 7px #3c6b67;white-space:nowrap}.world-controls{position:absolute;bottom:26px;left:30px;font-size:10px;letter-spacing:.5px;color:#fffde8;text-shadow:0 1px 6px #294e47;max-width:460px}.talk-button{position:absolute;bottom:38px;left:50%;transform:translateX(-50%);background:#fffdeedc;color:#496853;border:1px solid #fffde7;box-shadow:0 0 30px #fffad244;padding:12px 25px;font-size:13px;letter-spacing:1px;white-space:nowrap}.talk-button.hidden{opacity:0;pointer-events:none}.label{position:absolute;transform:translate(-50%,-100%);color:#fffef0;font-size:12px;text-shadow:0 1px 8px #456c4b;letter-spacing:2px;pointer-events:none}.label span{display:block;text-align:center;font-size:20px;line-height:1.3}.joystick{position:absolute;bottom:72px;left:32px;width:105px;height:105px;border-radius:50%;background:#fff3;border:1px solid #fff8;pointer-events:auto;touch-action:none;display:none;box-shadow:0 0 18px #fff2}.joystick-knob{position:absolute;left:33px;top:33px;width:39px;height:39px;border-radius:50%;background:#ffffefab;box-shadow:0 3px 14px #3c74612b;pointer-events:none}.jump{position:absolute;bottom:76px;right:30px;width:58px;height:58px;border-radius:50%;font-size:21px;display:none}.screen-note{position:absolute;bottom:11px;right:20px;font-size:9px;color:#fffbe7;text-shadow:0 1px 6px #294e47}.sheet{position:absolute;top:95px;right:25px;bottom:28px;width:350px;background:var(--glass);border:1px solid #fff;border-radius:24px;box-shadow:0 18px 80px #30524e25;padding:22px;overflow:auto;backdrop-filter:blur(24px);scrollbar-width:thin;overscroll-behavior:contain}.sheet-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.sheet h2{font-size:19px}.sheet h3{font-size:13px;margin:14px 0 7px}.sheet-close{border:0;background:#e7ecdf;font-size:17px;border-radius:50%;padding:0;width:44px;height:44px;min-height:44px}.agent-tabs{display:flex;gap:7px;margin:10px 0}.agent-tabs button{flex:1;font-size:11px;padding:8px 4px}.agent-tabs .active{background:#dce8cc;border-color:#94ab81}.signal{padding:12px;text-align:center;font-size:30px;letter-spacing:12px;background:#edf0e1;border-radius:13px;min-height:65px;color:#5a7765;margin:12px 0}.glyphs{display:grid;grid-template-columns:repeat(6,1fr);gap:5px}.glyphs button{font-size:23px;padding:7px 2px;border:1px solid #dce3cf;min-height:45px;background:#fffdf3}.row{display:flex;gap:7px;margin-top:10px}.row button{flex:1;font-size:11px;padding:9px 5px}.demo-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px}.demo-actions button{font-size:11px;padding:9px 6px;background:#edf0e3;border-color:#dce3cc;min-height:49px}.demo-actions b{display:block;font-size:19px;font-weight:400}.preview{margin-top:13px;padding:13px;background:#f4ecd7;border:1px solid #e6d9b9;border-radius:14px}.preview strong{font-size:13px;display:block;line-height:1.8}.preview p{font-size:10px;margin-top:4px}.listen{margin-top:15px;border-top:1px dashed #ccd6c2;padding-top:4px}.incoming{padding:12px;background:#f6eedf;border-radius:13px;margin-top:10px}.incoming .sign{font-size:25px;text-align:center;letter-spacing:8px;margin:5px 0}.respond{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-top:9px}.respond button{font-size:10px;padding:7px 3px;background:#fffaf0}.last-event{margin-top:14px;padding:10px 12px;border-left:2px solid #b7c59e;background:#eef1e3;font-size:11px;line-height:1.7}.context-note{font-size:10px;color:#88947d;margin-top:9px}.location-links{display:grid;gap:8px;margin:15px 0}.location-links button{text-align:left;border:1px solid #dbe1cc;background:#eef2e0;font-size:12px;display:flex;justify-content:space-between;align-items:center}.location-links small{font-size:9px;color:#8a957e}.goals{list-style:none;padding:0;margin:10px 0 16px}.goals li{display:flex;gap:8px;font-size:11px;line-height:1.7;margin:7px 0}.goals li:before{content:'○';color:#8d9c80}.goals li.done:before{content:'●';color:#668a5c}.memory{padding:10px 0;border-bottom:1px solid #e5e9d9;font-size:11px;line-height:1.8}.memory strong{font-size:22px;letter-spacing:5px;margin-right:12px;font-weight:400}.memory small{font-size:9px;color:#89947c}.memory-evidence{font-size:9px;color:#8a9680}.overlay{position:fixed;inset:0;background:#173d3855;backdrop-filter:blur(12px);display:grid;place-items:center;padding:25px}.modal{max-width:510px;width:100%;background:#ffffefeF;border:1px solid #fff;border-radius:25px;padding:30px;box-shadow:0 20px 90px #1d443435;max-height:88vh;overflow:auto}.modal h2{margin-bottom:15px;font-size:27px;white-space:pre-line;letter-spacing:2px}.modal p{font-size:12px;line-height:1.9;margin-bottom:10px}.modal .row{margin-top:20px}.intro{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:auto;background:linear-gradient(90deg,#507a7340,transparent 60%)}.intro-copy{position:absolute;left:10%;top:50%;transform:translateY(-50%);max-width:470px;padding:30px 35px;background:linear-gradient(120deg,#fffce9e8,#fffce98a);border:1px solid #fff9;border-radius:4px 40px 40px 40px;box-shadow:0 20px 80px #476b6612;backdrop-filter:blur(9px)}.intro .eyebrow{letter-spacing:4px;font-size:10px;color:#8a9475}.intro h1{font-size:clamp(30px,4vw,50px);letter-spacing:5px;font-weight:400;margin:18px 0;line-height:1.5}.intro p{font-size:13px;margin-bottom:22px;line-height:1.9;color:#738476}.intro button{font-size:13px;padding:13px 25px}.intro small{display:block;font-size:10px;color:#8e997e;margin-top:15px}.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);z-index:100;background:#304f49ed;color:#fffbea;border:1px solid #ffffda40;border-radius:16px;padding:12px 20px;font-size:12px;max-width:min(90vw,500px);pointer-events:none;box-shadow:0 10px 40px #27484020}.loading{position:fixed;inset:0;display:grid;place-items:center;font-size:15px;letter-spacing:3px;color:#547967;background:linear-gradient(#bfdbdc,#eff1dd)}.graphics-error{max-width:510px;padding:30px;background:#fff9;border-radius:25px}.graphics-error a{display:inline-block;margin-top:18px;color:#355d55}.ready-button{width:100%;margin-top:12px}.fps{display:none}
@media(max-width:760px){.topbar{top:max(18px,env(safe-area-inset-top));left:18px;right:18px}.brand h1{font-size:20px;letter-spacing:3px}.brand span{font-size:8px;letter-spacing:1px}.nav{gap:5px}.nav button{font-size:10px;min-height:44px;padding:6px 10px}.nav .sound,.nav .lang{display:none}.chapter{top:91px;left:18px;max-width:260px;padding:12px 15px}.chapter h2{font-size:15px}.chapter p{font-size:10px;max-width:220px}.chapter .progress{margin-top:8px}.place-label{top:auto;bottom:24px;font-size:10px}.world-controls{bottom:10px;left:18px;max-width:220px;font-size:8px}.joystick,.jump{display:block}.joystick{left:22px;bottom:76px;width:94px;height:94px}.joystick-knob{left:28px;top:28px;width:38px;height:38px}.talk-button{bottom:55px;padding:10px 17px;font-size:11px}.screen-note{display:none}.sheet{top:auto;bottom:0;left:0;right:0;width:100%;max-height:58svh;border-radius:24px 24px 0 0;padding:18px 20px calc(18px + env(safe-area-inset-bottom));box-shadow:0 -8px 50px #284f3f15}.sheet h2{font-size:17px}.sheet h3{font-size:12px;margin-top:10px}.signal{min-height:52px;padding:7px;margin:8px 0;font-size:25px}.glyphs button{font-size:22px}.sheet .demo-actions button{min-height:45px}.demo-actions b{display:inline;margin-right:8px;font-size:17px}.sheet .hint{font-size:10px}.intro-copy{left:7%;right:7%;top:auto;bottom:12%;transform:none;padding:25px 26px;max-width:450px;border-radius:4px 30px 30px 30px}.intro h1{font-size:33px;margin:14px 0}.intro p{font-size:12px;margin-bottom:16px}.intro small{font-size:9px}.modal{padding:25px}.modal h2{font-size:24px}.chapter.suspended{opacity:.4}.world-controls.suspended,.joystick.suspended,.jump.suspended,.talk-button.suspended{display:none}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

.world-controls.suspended,.joystick.suspended,.jump.suspended,.talk-button.suspended{display:none}

@media(max-width:760px){.chapter.suspended{display:none}}

.simple-route button{width:100%;margin-top:10px}
.world-dialogue{position:absolute;inset:0;pointer-events:none}.speech-bubble{position:absolute;width:230px;transform:translateX(-50%);background:#fffff2ec;border:1px solid #fff;border-radius:22px;padding:8px 14px 14px;box-shadow:0 6px 24px #35594c1c;backdrop-filter:blur(8px)}.speech-bubble:after{content:'';position:absolute;bottom:-9px;left:calc(50% - 9px);width:18px;height:18px;background:#fffff2ec;transform:rotate(45deg);border-radius:0 0 4px 0}.bubble-heading{display:flex;align-items:center;justify-content:space-between;font-size:10px;color:#7c8976;letter-spacing:2px}.bubble-close{pointer-events:auto;width:44px;height:44px;padding:0;min-height:44px;background:transparent;border:0;font-size:18px;letter-spacing:0}.speech-bubble p{font-size:13px;line-height:1.6}.speech-bubble small{display:block;font-size:10px;color:#929779;margin-top:5px}.gesture-dock{position:absolute;left:50%;bottom:max(32px,env(safe-area-inset-bottom));transform:translateX(-50%);width:max-content;max-width:calc(100vw - 24px);text-align:center}.natural-actions{display:flex;justify-content:center;gap:18px}.gesture-button{width:98px;min-height:91px;border-radius:25px;background:#fffdf0df;box-shadow:0 6px 24px #315b4829;padding:10px 6px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px}.gesture-button svg{width:32px;height:32px;fill:none;stroke:#52756a;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.gesture-button span{font-size:11px;white-space:nowrap}.gesture-button:hover{background:#fffdeb;transform:translateY(-2px)}.gesture-dock .agent-tabs{justify-content:center;margin:0 0 12px}.gesture-dock .agent-tabs button{flex:none;min-width:75px;background:#fffdf0c9}.gesture-dock .agent-tabs .active{background:#dce8cc}.dialogue-route:empty{display:none}.dialogue-route button{margin-top:12px;min-height:44px;font-size:11px;border-radius:24px;padding:8px 20px;background:#496b68e8;color:#fffdf0}.world-dialogue~.screen-note{display:none}@media(max-width:760px){.speech-bubble{width:220px}.gesture-dock{bottom:max(24px,env(safe-area-inset-bottom))}.gesture-button{width:92px;min-height:88px}.gesture-dock .agent-tabs{margin-bottom:8px}.dialogue-route button{margin-top:8px}}
