@font-face{font-family:'Noto Sans TC';src:url('assets/ui-font.woff') format('woff');font-weight:100 900;font-display:swap}
:root{color-scheme:dark;--bg:#171526;--cream:#f7e8c9;--muted:#aaa1a9;--orange:#f2b066}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 65% 0,#352638 0,transparent 52%),var(--bg);color:var(--cream);font-family:'Noto Sans TC',system-ui,sans-serif}button,a,input{touch-action:manipulation}button{font:inherit;cursor:pointer;color:inherit;background:#ffffff09;border:1px solid #ffffff1b;border-radius:7px;padding:9px 14px}button:hover{background:#ffffff18;border-color:#f2b06680}button:focus-visible,canvas:focus-visible{outline:2px solid var(--orange);outline-offset:3px}header{height:78px;max-width:1320px;margin:auto;padding:0 38px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #ffffff10}.brand{font-weight:900;font-size:15px;letter-spacing:2px;text-decoration:none;color:var(--cream)}.paw{font-size:26px;color:var(--orange);margin-right:12px}.edition{font-size:9px;font-weight:500;color:#ab9296;border-left:1px solid #69505b;margin-left:18px;padding-left:18px;letter-spacing:2px}.top-actions{display:flex;gap:8px}.top-actions button{font-size:12px}main{max-width:1200px;margin:0 auto;padding:34px 36px 20px}.eyebrow{font-size:10px;letter-spacing:3px;color:var(--orange);font-weight:700}.heading{display:flex;align-items:baseline;justify-content:space-between;margin:7px 0 20px}h1{font-size:30px;letter-spacing:4px;margin:0}.heading>span{font-size:12px;letter-spacing:2px;color:var(--muted)}i{font-style:normal;margin:0 12px;color:#6a5261}.stage{position:relative;aspect-ratio:16/9;background:#241d2e;border:1px solid #775240;border-radius:10px;overflow:hidden;box-shadow:0 20px 70px #0007}canvas{width:100%;height:100%;display:block;image-rendering:pixelated;touch-action:none}.overlay{position:absolute;inset:0;background:linear-gradient(90deg,#171421ec,#201923c9 48%,#20192312);display:flex;align-items:center;padding:5% 7%;z-index:3}.hidden{display:none!important}.menu-card{max-width:650px}.chapter{font-size:10px;letter-spacing:3px;color:#ebbd7c}.menu-card h2{font-size:clamp(28px,4.4vw,56px);line-height:1.15;letter-spacing:4px;margin:20px 0}.menu-card h2 em{font-style:normal;color:#f0b66f}.menu-card p{color:#d0bfc0;font-size:13px;line-height:1.9}.pills{display:flex;gap:8px;margin:20px 0}.pills span{font-size:10px;border:1px solid #d2b28c33;padding:5px 9px;border-radius:3px;color:#d4b999}.menu-buttons{display:flex;gap:10px}.primary{background:#efb36e;color:#302432;border-color:#efb36e;font-weight:900;padding:12px 24px;box-shadow:0 4px 0 #996042;border-radius:4px}.primary:hover{background:#ffd094;color:#251b2a}.primary b{padding-left:22px}.secondary{font-size:12px}.assist{display:flex;align-items:center;gap:7px;font-size:11px;color:#c4aead;margin-top:20px}.assist small{font-size:10px;color:#8f838e}input{accent-color:#e8a764}#loading{font-size:10px;color:#ab9f9f;margin-top:12px}.under{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:13px;font-size:10px;color:#9b929f}.under b{color:#d1bca6;font-size:10px;font-weight:500}.under button{font-size:11px;padding:7px 12px}.field-guide{display:grid;grid-template-columns:1fr 1fr;gap:45px;margin-top:35px;padding-top:25px;border-top:1px solid #ffffff12}.field-guide article{display:flex;gap:17px}.guide-number{font-size:24px;color:#79535a;font-weight:900}.field-guide h3{font-size:13px;margin:0 0 8px;font-weight:600;letter-spacing:1px}.field-guide p{font-size:11px;line-height:1.9;color:#aaa0ac;margin:0}footer{font-size:10px;color:#746976;margin-top:28px;padding-top:18px;display:flex;justify-content:space-between;border-top:1px solid #ffffff0b}.dialog-card{max-width:630px;width:100%;background:#211e32ed;border:1px solid #806247;border-radius:8px;padding:28px;margin:auto}.dialog-card h2{font-size:23px;color:#efb36e}.dialog-card p{font-size:13px;line-height:1.9;color:#d0c3c2}.dialog-card .primary{margin-top:12px}.dialog-card table{width:100%;font-size:12px;border-collapse:collapse}.dialog-card td{padding:6px;border-bottom:1px solid #fff1}.overlay:has(.dialog-card){background:#15111bba;padding:4%}#touch{display:none;position:absolute;bottom:12px;left:12px;right:12px;justify-content:space-between;pointer-events:none;z-index:2}#touch button{pointer-events:auto;width:48px;height:45px;padding:0;background:#231d39a8;border:1px solid #ddc1a35c;user-select:none;-webkit-user-select:none;font-size:12px}.touch-act{display:flex;gap:7px}.touch-move{display:flex;gap:8px}.stage:fullscreen{border-radius:0;max-width:none;width:100vw;height:100vh;background:#181322}.stage:fullscreen canvas{object-fit:contain} @media(pointer:coarse){#touch{display:flex}.under>span{display:none}}@media(max-width:700px){header{padding:0 16px;height:59px}.edition{display:none}.brand{font-size:12px}.top-actions button{padding:7px;font-size:10px}main{padding:22px 12px}.heading{margin-bottom:15px}h1{font-size:23px}.heading>span{font-size:9px;letter-spacing:0}.eyebrow{font-size:8px}.menu-card h2{margin:10px 0;font-size:28px}.menu-card p{font-size:10px;margin:6px 0}.pills{margin:10px 0;gap:4px}.pills span{font-size:8px;padding:3px 5px}.primary{padding:9px 14px;font-size:12px}.assist{margin-top:12px;font-size:9px}.assist small{display:none}.chapter{font-size:8px}#loading{display:none}.field-guide{gap:18px;margin-top:24px}.field-guide p{font-size:10px}.guide-number{font-size:18px}.field-guide h3{font-size:11px}footer{line-height:1.8;display:block}footer span{display:block}.dialog-card{padding:15px}.dialog-card h2{font-size:17px}.dialog-card p{font-size:11px}#touch button{width:38px;height:35px;font-size:10px}.touch-act{gap:4px}.overlay{padding:4% 6%}}@media(max-height:550px) and (orientation:landscape){header,.eyebrow,.heading,.under,.field-guide,footer{display:none}main{padding:0;max-width:100vw}.stage{height:100dvh;width:100%;aspect-ratio:auto;border:0;border-radius:0}canvas{object-fit:contain}}

/* Thumb zones: independent touch targets with room for safe-area insets. */
.audio-panel{position:fixed;top:70px;right:max(16px,env(safe-area-inset-right));width:280px;padding:18px;background:#242033f5;border:1px solid #91704c;border-radius:12px;z-index:20;box-shadow:0 12px 45px #0008}.audio-panel[hidden]{display:none}.audio-title{display:flex;align-items:center;justify-content:space-between;font-weight:700}.audio-title button{padding:4px 12px;font-size:22px}.audio-panel label{display:flex;justify-content:space-between;font-size:13px;margin:18px 0 6px}.audio-panel input{width:100%;height:28px}.audio-panel output{color:#efb36e}.audio-panel #muteAudio{width:100%;margin-top:12px}
#touch{left:max(18px,env(safe-area-inset-left));right:max(18px,env(safe-area-inset-right));bottom:max(10px,env(safe-area-inset-bottom));height:142px;align-items:flex-end;touch-action:none}#touch button{touch-action:none;-webkit-touch-callout:none;min-width:48px;min-height:48px;border-radius:50%;background:#211b32c9;box-shadow:0 3px 0 #0d0b19a0;backdrop-filter:blur(3px);font-weight:700;font-size:12px}#touch button.held{background:#edb976e8;color:#241d30;transform:translateY(2px);box-shadow:0 1px 0 #0d0b19a0;border-color:#ffe2a8}.touch-left{display:flex;flex-direction:column;gap:12px}.touch-tools{display:flex;gap:14px;justify-content:center}.touch-tools button{width:49px!important;height:49px!important;color:#e5c59d}.touch-move{gap:12px}.touch-move button{width:65px!important;height:65px!important;border-radius:18px!important;font-size:22px!important}.touch-act{position:relative;display:block;width:210px;height:142px}.touch-act button{position:absolute}.touch-act [data-key=attack]{width:70px!important;height:70px!important;right:72px;bottom:54px;background:#88613bcf!important;border-color:#efbe80!important}.touch-act [data-key=jump]{width:67px!important;height:67px!important;right:0;bottom:0;background:#345c60d9!important;border-color:#a1d5c4!important}.touch-act [data-key=dash]{width:53px!important;height:53px!important;right:102px;bottom:0}.touch-act [data-key=skill]{width:50px!important;height:50px!important;right:8px;bottom:86px}#touch #touchPause{position:absolute;left:50%;bottom:0;transform:translateX(-50%);min-width:44px;width:44px;height:44px;min-height:44px;font-size:14px;opacity:.8}
@media(pointer:coarse) and (orientation:portrait){.stage{aspect-ratio:auto}.stage canvas{height:auto;aspect-ratio:16/9}#touch{position:relative;left:auto;right:auto;bottom:auto;height:172px;padding:16px 12px 14px;background:#201b2f;border-top:1px solid #e6bb7626}#touch #touchPause{bottom:auto;top:8px}.overlay{padding:20px 6%}.menu-card h2{font-size:34px}.dialog-card{max-height:95%;overflow:auto}}
@media(pointer:coarse) and (orientation:landscape){#touch{display:flex}.audio-panel{top:8px}.stage{isolation:isolate}}
@media(max-width:420px){.touch-act{width:177px}.touch-move button{width:58px!important;height:62px!important}.touch-move{gap:9px}.touch-tools{gap:10px}}

@media(max-width:360px) and (orientation:portrait){#touch{padding-left:8px;padding-right:8px}.touch-move button{width:50px!important}.touch-tools{gap:7px}.touch-act{width:155px}.touch-act [data-key=attack]{right:66px;width:62px!important;height:62px!important}.touch-act [data-key=dash]{right:88px}.touch-act [data-key=jump]{width:60px!important;height:60px!important}#touch #touchPause{top:3px;left:49%}}

/* A self-contained game surface: Safari gestures must not compete with play. */
.stage,.stage *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
.stage{touch-action:manipulation;overscroll-behavior:contain}
.stage.is-playing,.stage.is-ending{touch-action:none}
.stage button,.stage canvas{-webkit-user-drag:none}
#touch{left:max(24px,calc(env(safe-area-inset-left) + 12px));right:max(24px,calc(env(safe-area-inset-right) + 12px));bottom:max(18px,calc(env(safe-area-inset-bottom) + 8px))}
.stage.is-ending #touch{visibility:hidden;pointer-events:none}.stage.is-ending #touch button{pointer-events:none}
.reunion-film{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;image-rendering:pixelated;pointer-events:none;z-index:1;background:#241d2e}
.reunion-film[hidden],.ending-actions[hidden]{display:none}
.ending-actions{position:absolute;bottom:22px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:10px;z-index:2;white-space:nowrap}
.ending-actions button{background:#302438ed;border:1px solid #b28864;border-radius:2px;font-size:12px;padding:9px 15px;box-shadow:0 3px 0 #1b1422}
.ending-actions .primary{background:#e8b477;color:#302432;border-color:#f8d6a5}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(pointer:coarse) and (orientation:landscape){header,.eyebrow,.heading,.under,.field-guide,footer{display:none}main{padding:0;max-width:100vw}.stage{width:100%;aspect-ratio:auto;border:0;border-radius:0}.stage canvas{object-fit:contain}.stage{height:100dvh}.stage:fullscreen{height:100dvh}.ending-actions{bottom:max(10px,env(safe-area-inset-bottom))}.ending-actions button{padding:8px 12px}}
@media(pointer:coarse) and (orientation:portrait){.reunion-film{height:auto;aspect-ratio:16/9;bottom:auto}#touch{left:auto;right:auto;bottom:auto}.ending-actions{bottom:58px;gap:7px}.ending-actions button{padding:9px 10px;font-size:11px}}

/* v0.3.1: lock the surface to the visible viewport, never to a scrolled page. */
@media(pointer:coarse) and (orientation:landscape){
 html,body{overflow:hidden;overscroll-behavior:none}
 .stage{position:fixed;top:0;left:0;width:100vw;height:100dvh;margin:0;box-shadow:none;z-index:5}
 html.game-landscape .stage{top:var(--game-top,0px);left:var(--game-left,0px);width:var(--game-width,100vw);height:var(--game-height,100dvh)}
 .stage canvas{width:100%;height:100%;object-fit:contain;object-position:center}
 .overlay{padding:max(8px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));overflow:auto;overscroll-behavior:contain;touch-action:pan-y}
 .menu-card,.dialog-card{max-height:100%;overflow:auto;overscroll-behavior:contain;flex-shrink:0}
 .menu-card h2{font-size:clamp(25px,8dvh,48px);margin:8px 0}
 .menu-card p{margin:6px 0}.pills{margin:8px 0}.assist{margin-top:8px}#loading{margin-top:6px}
}
