@charset "UTF-8";
:root{--ink:#18294d;--muted:#607698;--surface:#fffdf3;--surface2:#eef0ff;--line:#2e4974;--sky1:#bbdef5;--sky2:#eef7fd;--grid:#426eae12;--gold:#ffdc48;--mint:#56cfbc;--shadow:#253e7340;--button-shadow:#294271;--night-display:none;--day-display:block;font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif;color:var(--ink);color-scheme:light}
:root[data-theme="night"]{--ink:#202947;--muted:#606b95;--surface:#e7e5ff;--surface2:#d4d5f7;--line:#7786c1;--sky1:#111b46;--sky2:#263661;--grid:#8092ed12;--shadow:#070b254d;--button-shadow:#080c2a;--night-display:block;--day-display:none;color-scheme:dark}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{background:var(--sky2)}button,input{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:var(--ink)}button:disabled{cursor:default;opacity:.55}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #e37e64;outline-offset:5px}button svg,svg.icon{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:square;stroke-linejoin:miter;flex-shrink:0}button[hidden],[hidden]{display:none!important}.icon-library{position:absolute;width:0;height:0;overflow:hidden}.game-shell{position:relative;width:100%;height:100svh;isolation:isolate;overflow:hidden}.sky{position:absolute;inset:0;z-index:-2;background:radial-gradient(ellipse at 55% 40%,#ffffff30,transparent 65%),linear-gradient(var(--sky1),var(--sky2));transition:background .5s}.sky:after{content:"";position:absolute;inset:0;background-image:radial-gradient(var(--grid) 1px,transparent 1px);background-size:13px 13px}.sky-orb{position:absolute;width:70px;height:70px;right:19%;top:18%;background:#fff4cb;box-shadow:0 0 65px #fff5c060;clip-path:polygon(25% 0,75% 0,75% 12%,88% 12%,88% 25%,100% 25%,100% 75%,88% 75%,88% 88%,75% 88%,75% 100%,25% 100%,25% 88%,12% 88%,12% 75%,0 75%,0 25%,12% 25%,12% 12%,25% 12%)}[data-theme="night"] .sky-orb{background:#e9ebc7;clip-path:polygon(25% 0,75% 0,50% 18%,38% 40%,42% 64%,64% 83%,88% 80%,75% 100%,25% 100%,0 75%,0 25%)}.cloud{position:absolute;width:180px;height:60px;background:#ffffff90;clip-path:polygon(0 65%,15% 65%,15% 35%,32% 35%,32% 0,57% 0,57% 20%,72% 20%,72% 48%,90% 48%,90% 65%,100% 65%,100% 100%,0 100%);animation:cloud-drift 60s linear infinite alternate}.cloud-a{top:33%;left:9%;opacity:.7}.cloud-b{top:52%;right:7%;transform:scale(.72);animation-delay:-30s}.cloud-c{bottom:12%;left:19%;transform:scale(.5);opacity:.35}.star-field{display:var(--night-display);position:absolute;inset:0;background-image:radial-gradient(#fff4b2 1px,transparent 2px),radial-gradient(#c6deff 1px,transparent 2px);background-position:40px 30px,130px 80px;background-size:177px 163px,251px 237px;opacity:.55}[data-theme="night"] .cloud{background:#7184c42b}.topbar{position:absolute;z-index:4;top:28px;left:40px;right:40px;display:flex;align-items:center;gap:32px}.brand{display:block;text-decoration:none;color:var(--ink);width:224px;flex-shrink:0}.brand-cn{font-size:30px;line-height:1;font-weight:1000;letter-spacing:2px;text-shadow:2px 0 var(--ink),0 3px #7a9ed6;white-space:nowrap}.brand-spark{font-size:20px;color:#edc22e;vertical-align:top;margin-left:5px;text-shadow:none}.brand-en{font-family:ui-monospace,monospace;display:flex;font-size:9px;font-weight:900;letter-spacing:1px;white-space:nowrap;margin-top:10px;align-items:center;gap:8px}.brand-en i{display:block;width:25px;height:6px;background:repeating-linear-gradient(90deg,#192d55 0 5px,#f5cc45 5px 10px)}[data-theme="night"] .brand{color:#f9dd77}[data-theme="night"] .brand-cn{text-shadow:2px 0 #ffe28b,0 3px #070c27}.header-caption{border-left:1px solid #637d983f;padding-left:25px;font-size:13px;font-weight:700;line-height:1.8;letter-spacing:1px}.header-caption span{display:block;font-size:11px;font-weight:400;color:var(--muted)}[data-theme="night"] .header-caption{color:#d0daf3}[data-theme="night"] .header-caption span{color:#a7b6d6}.top-controls{display:flex;align-items:center;gap:16px;margin-left:auto}.theme-switch{display:flex;border:2px solid var(--ink);padding:3px;background:#29355b;border-radius:7px;gap:3px;box-shadow:2px 2px 0 var(--shadow)}.theme-switch button{background:none;border:0;width:38px;height:30px;border-radius:3px;color:#b5c7ed;display:grid;place-items:center}.theme-switch svg{width:20px;height:20px}.theme-switch button[aria-pressed="true"]{background:var(--gold);color:#17264b}.settings-button{display:flex;align-items:center;gap:8px;background:var(--surface);border:2px solid var(--line);padding:10px 13px;box-shadow:2px 3px 0 var(--shadow);border-radius:3px;font-size:12px;font-weight:700}.pixel-panel{background:var(--surface);border:1.5px solid var(--line);border-radius:4px;box-shadow:3px 4px 0 var(--shadow)}.player-card{position:absolute;z-index:3;top:139px;left:40px;width:240px;padding:16px;display:grid;grid-template-columns:43px 1fr;gap:12px}.player-avatar{position:relative;display:grid;place-items:center;background:var(--surface2);border:1px solid var(--line);height:46px}.player-avatar svg{width:27px;height:27px;fill:#f1cf65;stroke:var(--ink);stroke-width:1.3}.player-avatar span{position:absolute;bottom:-8px;right:-6px;padding:1px 3px;background:var(--ink);font-family:monospace;color:#fff;font-size:10px}.player-identity h1{font-size:15px;letter-spacing:.4px;margin:0 0 7px}.player-identity p{font-size:11px;color:var(--muted);margin:0}.player-identity b{color:var(--ink);margin-left:5px}.player-identity p>span{display:block;margin-top:4px;font-size:10px}.experience{grid-column:1/-1}.experience p{font:10px ui-monospace,monospace;display:flex;justify-content:space-between;margin:0 0 7px;color:var(--muted)}.experience b{font-weight:500;color:var(--ink)}.xp-track{height:11px;background:#a6afc835;border:1px solid var(--line);overflow:hidden;position:relative}.xp-track:after{content:"";position:absolute;inset:0;background:repeating-linear-gradient(90deg,transparent 0 calc(10% - 2px),var(--surface) calc(10% - 2px) 10%)}.xp-track i{height:100%;display:block;width:0;background:var(--mint);transition:width .6s}.shortcuts{position:absolute;top:320px;left:40px;display:flex;gap:20px;z-index:4}.shortcut{position:relative;display:flex;flex-direction:column;align-items:center;gap:10px;background:none;border:0;padding:0 8px;font-size:12px;font-weight:700}.shortcut svg{background:var(--surface);border:1.5px solid var(--line);padding:9px;box-shadow:2px 3px 0 var(--shadow);width:48px;height:48px;border-radius:3px}.shortcut:first-child svg{fill:#e8bd7290}.shortcut:last-child svg{fill:#89bded60}.shortcut b{position:absolute;right:7px;top:-4px;width:8px;height:8px;background:#ee6a6e;box-shadow:0 0 0 2px var(--surface)}[data-theme="night"] .shortcut{color:#e5e9ff}.quest-peek{position:absolute;z-index:3;right:40px;top:139px;display:flex;align-items:center;gap:12px;width:248px;padding:16px;text-align:left}.peek-icon svg{width:27px;height:27px;fill:#ffdb6670}.quest-peek>span:nth-child(2){min-width:0}.quest-peek small{display:block;font-size:9px;color:var(--muted);letter-spacing:1px;margin-bottom:7px}.quest-peek b{font-size:12px;font-weight:700;display:block;line-height:1.6}.quest-peek em{font-size:10px;font-style:normal;display:block;color:var(--muted);margin-top:5px}.quest-peek .peek-arrow{margin-left:auto;width:13px}.scene-framing{position:absolute;left:50%;top:51%;width:min(62vw,760px);height:min(76vh,690px);transform:translate(-50%,-50%);z-index:1}.model-composite{position:absolute;inset:0;animation:island-float 6s ease-in-out infinite}.island-sprite{position:absolute;width:100%;height:auto;bottom:0;left:0;pointer-events:none;image-rendering:auto;filter:drop-shadow(0 25px 30px #37639316);transition:filter .5s}.building-hit{position:absolute;bottom:43%;left:50%;height:50%;width:65%;transform:translateX(-50%);border:0;background:none;padding:0;z-index:2;outline-offset:-15px}.building-sprite{width:100%;height:100%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 9px 7px #28394d35);transition:filter .5s}.building-hit:hover .building-sprite{filter:drop-shadow(0 0 8px #ffe18a90)}[data-theme="night"] .island-sprite{filter:brightness(.68) saturate(.8) drop-shadow(0 12px 22px #16234250)}[data-theme="night"] .building-sprite{filter:brightness(.82) saturate(.88) drop-shadow(0 0 14px #ffcf6d27)}.shop-marker{position:absolute;left:61%;top:44%;z-index:4;display:flex;align-items:center;gap:7px;white-space:nowrap;background:var(--surface);border:1.5px solid var(--line);padding:7px 10px;border-radius:3px;font-size:10px;box-shadow:2px 3px 0 var(--shadow);pointer-events:none}.shop-marker svg{width:15px;height:15px;fill:none;stroke:var(--ink);stroke-width:1.5}.shop-marker>span{color:var(--muted);margin-left:4px}.scene-caption{position:absolute;bottom:-22px;left:0;right:0;text-align:center;font:10px ui-monospace,monospace;color:var(--muted);letter-spacing:1.5px;pointer-events:none}.scene-caption span{padding:0 5px}[data-theme="night"] .scene-caption{color:#94a5cc}.home-decorations{position:absolute;inset:0;z-index:3;pointer-events:none}.home-decor{position:absolute;width:60px;height:50px;transform:translate(-50%,-50%)}.decor-sprite{display:block;background-image:url('game/decorations.png');background-size:300% 200%;background-repeat:no-repeat;aspect-ratio:1.5;filter:drop-shadow(0 3px 1px #18294d20)}.decor-ufo{background-position:0 0}.decor-ramen{background-position:50% 0}.decor-flowers{background-position:100% 0}.decor-telescope{background-position:0 100%}.decor-windmill{background-position:50% 100%}.decor-cat{background-position:100% 100%}.micro-guide{position:absolute;bottom:43px;left:40px;display:flex;align-items:center;gap:9px;color:var(--muted);font-size:10px;max-width:220px;line-height:1.6}.guide-dot{display:grid;place-items:center;width:20px;height:20px;flex-shrink:0;font-family:monospace;border:1px solid var(--muted);background:var(--surface);color:var(--ink)}[data-theme="night"] .micro-guide{color:#a6b6d8}.main-actions{position:absolute;z-index:4;bottom:55px;left:50%;transform:translateX(-50%);display:flex;align-items:stretch;gap:13px}.action-primary,.action-secondary{border:2px solid var(--ink);border-radius:4px;box-shadow:3px 4px 0 var(--button-shadow);display:flex;align-items:center;justify-content:center;gap:13px;transition:transform .12s,box-shadow .12s}.action-primary{background:var(--gold);color:#16274a;min-width:245px;min-height:70px;padding:12px 20px}.action-primary b{display:block;font-size:21px;letter-spacing:1px;font-weight:900}.action-primary small{display:block;font-size:9px;margin-top:5px;opacity:.8;font-weight:400}.action-primary>svg{width:16px;height:16px;margin-left:5px}.play-pixel{font-size:22px;line-height:1}.action-secondary{background:var(--surface);min-width:126px;padding:12px 14px;font-size:12px;font-weight:700}.action-secondary svg{width:21px;height:21px}.action-primary:active,.action-secondary:active,.small-button:active{transform:translate(2px,3px);box-shadow:1px 1px 0 var(--button-shadow)}.save-footer{position:absolute;bottom:19px;right:40px;display:flex;align-items:center;gap:6px;color:var(--muted);font-size:9px;z-index:4;max-width:370px;line-height:1.5}.save-footer>svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.5}.save-footer button{font-size:9px;background:var(--surface);border:1px solid var(--line);padding:4px}.save-footer.warning{color:#a36a16}[data-theme="night"] .save-footer{color:#adbbdf}.drawer{position:absolute;z-index:10;top:110px;right:28px;bottom:125px;width:380px;display:flex;flex-direction:column;box-shadow:6px 7px 0 var(--shadow);animation:drawer-in .22s ease-out}.drawer-header{display:flex;align-items:center;justify-content:space-between;padding:24px 24px 18px;border-bottom:1px solid #6883a72b}.drawer-header small{font:9px ui-monospace,monospace;letter-spacing:2px;color:var(--muted)}.drawer-header h2{font-size:22px;margin:7px 0 0}.icon-button{border:1px solid var(--line);background:var(--surface2);width:32px;height:32px;display:grid;place-items:center}.icon-button svg{width:16px;height:16px}.drawer-body{padding:20px 24px 26px;overflow-y:auto;overscroll-behavior:contain;flex:1;scrollbar-width:thin}.panel-tabs{display:flex;border-bottom:1px solid #6b7c9730;margin-bottom:24px;gap:24px}.panel-tabs button{border:0;background:none;padding:0 0 12px;font-size:12px;color:var(--muted)}.panel-tabs button.active{color:var(--ink);font-weight:800;box-shadow:0 2px 0 var(--ink)}.eyebrow{font:9px ui-monospace,monospace;letter-spacing:1px;color:var(--muted)}.quest-heading{font-size:18px;line-height:1.6;margin:10px 0}.quest-question{font-size:13px;line-height:1.9;margin:18px 0;color:var(--ink)}.quest-options{display:grid;gap:10px}.quest-option{display:flex;align-items:center;gap:12px;border:1px solid #7f91ab60;padding:14px 12px;line-height:1.65;text-align:left;font-size:12px;background:transparent}.quest-option .choice-key{font:11px monospace;color:var(--muted)}.quest-option.selected{background:#69b8c522;border:2px solid #507f9f;padding:13px 11px}.quest-feedback{margin:18px 0 10px;padding:12px;background:#dca94016;border-left:3px solid #d7aa48;font-size:12px;line-height:1.8}.quest-feedback.success{border-color:#4fa08a;background:#59b6a218}.quest-reward{font-size:11px;display:flex;gap:10px;color:var(--muted);margin-top:20px}.small-button{border:1.5px solid var(--ink);background:var(--surface2);padding:10px 14px;box-shadow:2px 2px 0 var(--shadow);font-size:12px;border-radius:2px;min-height:40px}.small-button.gold{background:var(--gold);color:#16274a;font-weight:800}.quest-submit{width:100%;margin-top:18px}.muted-note{font-size:11px;line-height:1.8;color:var(--muted)}.quest-row{display:flex;width:100%;align-items:center;gap:12px;padding:14px 0;border:0;border-bottom:1px solid #7e91ad30;text-align:left;background:none}.quest-row .row-icon{height:36px;width:40px;flex-shrink:0}.quest-row .row-text{flex:1;min-width:0}.quest-row b{font-size:12px;display:block}.quest-row small{display:block;font-size:10px;color:var(--muted);margin-top:6px}.quest-row>span:last-child{font-size:10px;color:var(--muted)}.inventory-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-top:18px}.inventory-item{border:1px solid #6e86a340;background:var(--surface2);padding:13px 9px;text-align:center;position:relative}.inventory-item .decor-sprite{height:80px;width:100%}.inventory-item b{display:block;font-size:12px;margin-top:8px}.inventory-item small{font-size:9px;display:block;color:var(--muted);margin:7px 0}.inventory-item.locked{opacity:.5}.inventory-item button{font-size:10px;border:1px solid var(--line);padding:6px 10px;background:var(--surface);margin-top:5px}.stage-item{display:flex;align-items:center;gap:14px;padding:15px 0;border-bottom:1px solid #7e91ad30}.stage-item img{width:75px;height:80px;object-fit:contain}.stage-item>div{flex:1}.stage-item b{font-size:13px}.stage-item p{font-size:10px;line-height:1.7;color:var(--muted)}.stage-item.current{background:#6bb6a715;margin:0 -8px;padding-left:8px;padding-right:8px}.stage-item .stage-state{font-size:10px;color:var(--muted)}.setting-field{margin:22px 0}.field-label{font-size:11px;color:var(--muted);margin:0 0 10px}.setting-field label{display:block;margin:0 0 10px;font-size:12px}.setting-field input{width:100%;border:1px solid var(--line);padding:12px;background:var(--surface2);color:var(--ink);font-size:13px}.setting-actions{display:flex;gap:8px}.setting-actions button{flex:1}.setting-actions button[aria-pressed=true]{background:var(--gold)}.toast{position:absolute;z-index:25;bottom:143px;left:50%;transform:translate(-50%,12px);background:var(--surface);border:1px solid var(--line);padding:12px 18px;font-size:12px;box-shadow:3px 4px 0 var(--shadow);max-width:min(85vw,440px);text-align:center;line-height:1.8;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s}.toast.show{opacity:1;transform:translate(-50%,0)}.toast.upgrade{background:var(--gold);font-size:15px;font-weight:800}.completed-banner{text-align:center;padding:25px 0}.completed-banner svg{width:45px;height:45px;fill:#e8bf44;stroke:var(--ink)}.completed-banner h3{font-size:20px}.completed-banner p{line-height:1.9;font-size:12px;color:var(--muted)}
@keyframes island-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-8px)}}@keyframes cloud-drift{to{translate:45px 0}}@keyframes drawer-in{from{opacity:0;translate:12px 0}to{opacity:1;translate:0 0}}
@media(min-width:1600px){.topbar{left:65px;right:65px}.player-card,.shortcuts{left:65px}.quest-peek{right:65px}.scene-framing{width:840px;height:730px;top:52%}}
@media(max-width:1100px) and (min-width:701px){.header-caption{display:none}.scene-framing{width:68vw;top:53%}.player-card{width:200px;padding:12px;left:25px;top:125px}.player-identity p>span{display:none}.quest-peek{right:25px;width:205px;top:125px;padding:12px}.shortcuts{left:25px;top:285px}.topbar{left:25px;right:25px}.micro-guide{display:none}.main-actions{bottom:53px}.action-primary{min-width:220px}.action-secondary{min-width:110px}.drawer{top:100px;right:20px;bottom:135px;width:355px}.stage-item img{width:65px}.scene:has(.building-hit[data-stage="5"]){--max-height:1}}
@media(max-width:700px){.topbar{top:24px;left:21px;right:21px;gap:10px}.brand{width:auto}.brand-cn{font-size:30px;letter-spacing:1px}.brand-en{font-size:8px;letter-spacing:2px;margin-top:7px}.brand-en i{width:18px;height:4px}.brand-spark{font-size:15px;margin-left:3px}.header-caption{display:none}.top-controls{gap:8px}.theme-switch{padding:2px;gap:2px;border-width:1.5px}.theme-switch button{width:28px;height:25px}.theme-switch svg{width:16px;height:16px}.settings-button{width:32px;height:32px;padding:6px;border-width:1.5px}.settings-button svg{width:18px;height:18px}.settings-button span{display:none}.player-card{top:100px;left:21px;right:21px;width:auto;padding:12px;grid-template-columns:36px 1fr 1fr;gap:10px;align-items:center;box-shadow:2px 3px 0 var(--shadow)}.player-avatar{height:36px}.player-avatar svg{width:24px;height:24px}.player-avatar span{font-size:8px}.player-identity h1{font-size:12px;margin-bottom:6px}.player-identity p{font-size:9px}.player-identity p>span{display:none}.player-identity b{margin-left:3px}.experience{grid-column:auto;border-left:1px solid #7c95b333;padding-left:11px}.experience p{font-size:8px;gap:5px}.xp-track{height:9px}.shortcuts{left:auto;right:21px;top:184px;gap:15px}.shortcut{font-size:9px;gap:6px;padding:0}.shortcut svg{width:36px;height:36px;padding:7px}.shortcut b{right:-2px}.scene-framing{top:49%;width:106vw;height:61vh;max-height:620px}.scene-caption{font-size:8px;bottom:0;letter-spacing:1px}.quest-peek{bottom:167px;top:auto;left:21px;right:21px;width:auto;padding:11px 13px;gap:11px}.quest-peek small{font-size:8px;margin-bottom:4px}.quest-peek b{font-size:11px}.quest-peek em{display:none}.peek-icon svg{width:23px;height:23px}.main-actions{left:21px;right:21px;bottom:75px;transform:none;gap:8px;display:grid;grid-template-columns:1fr 1.8fr 1fr}.action-primary,.action-secondary{min-width:0;min-height:65px;padding:10px 6px;gap:7px;border-width:1.5px;box-shadow:2px 3px 0 var(--button-shadow)}.action-primary{grid-column:2;grid-row:1}.action-secondary:first-child{grid-column:1;grid-row:1}.action-secondary:last-child{grid-column:3;grid-row:1}.action-primary b{font-size:17px;letter-spacing:0}.action-primary small{display:none}.action-primary>svg{display:none}.play-pixel{font-size:14px}.action-secondary{font-size:9px;flex-direction:column;gap:7px}.action-secondary svg{width:19px;height:19px}.save-footer{left:21px;right:21px;bottom:max(26px,env(safe-area-inset-bottom));max-width:none;justify-content:center;font-size:8px;gap:5px}.save-footer>svg{width:12px;height:12px}.micro-guide{display:none}.sky-orb{width:43px;height:43px;top:25%;right:24%}.cloud{width:110px;height:40px}.cloud-a{top:30%;left:0}.cloud-b{top:64%;right:-20px}.cloud-c{bottom:8%}.drawer{top:175px;left:14px;right:14px;bottom:15px;width:auto;max-height:none}.drawer-header{padding:18px 20px 14px}.drawer-header h2{font-size:20px}.drawer-body{padding:18px 20px 24px}.toast{bottom:285px;font-size:11px;width:max-content;max-width:86vw}.stage-item img{width:65px}}
@media(max-width:370px){.topbar{left:15px;right:15px;top:18px}.brand-cn{font-size:27px}.player-card{top:91px;left:15px;right:15px;padding:10px;grid-template-columns:28px 1fr 1fr;gap:8px}.player-avatar{height:30px}.player-avatar svg{width:20px;height:20px}.player-identity h1{font-size:11px}.experience{padding-left:8px}.shortcuts{right:15px;top:168px}.scene-framing{top:47%;height:58vh}.quest-peek{left:15px;right:15px;bottom:153px}.main-actions{left:15px;right:15px;bottom:69px;gap:7px}.action-primary b{font-size:15px}.action-primary,.action-secondary{min-height:60px}.save-footer{bottom:23px}.shop-marker{font-size:7px;gap:4px;padding:5px}.drawer{top:157px}}
@media(max-height:720px) and (min-width:701px){.topbar{top:18px}.player-card{top:110px}.quest-peek{top:110px}.shortcuts{top:280px}.scene-framing{top:51%;height:72vh;width:55vw}.main-actions{bottom:42px}.action-primary{min-height:60px}.save-footer{bottom:12px}.scene-caption{bottom:-7px}.drawer{top:100px;bottom:115px}.micro-guide{bottom:30px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.building-sprite,.island-sprite{image-rendering:pixelated}
.scene-caption{bottom:10px}
@media(max-width:700px){.scene-framing{width:96vw;top:46%}.building-hit{bottom:35%;max-height:58%}.scene-caption{display:none}}

.shortcut svg{color:var(--ink)}
html,body,.game-shell{overflow:clip}
body{position:fixed;inset:0}
.home-canvas{position:absolute;inset:0;cursor:grab;touch-action:none}
.home-canvas canvas{width:100%;height:100%;display:block}

.scene:has(.scene-loader:not([hidden])) .scene-caption{visibility:hidden}
.scene-loader{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:6;text-align:center;gap:13px;color:var(--ink)}
.scene-loader>svg{width:45px;height:45px;stroke:currentColor;fill:var(--gold);stroke-width:1.4;margin-bottom:6px}
.scene-loader>b{font-size:17px;letter-spacing:2px}.scene-loader>p{font-size:11px;color:var(--muted);margin:0;line-height:1.8}
.loading-pixels{display:flex;gap:6px;margin-top:9px}.loading-pixels i{width:9px;height:9px;background:var(--mint);border:1px solid var(--line);animation:loading-pixel 1.3s infinite ease-in-out}.loading-pixels i:nth-child(2){animation-delay:.12s}.loading-pixels i:nth-child(3){animation-delay:.24s}.loading-pixels i:nth-child(4){animation-delay:.36s}.loading-pixels i:nth-child(5){animation-delay:.48s}
[data-theme="night"] .scene-loader{color:#e7e5ff}[data-theme="night"] .scene-loader>p{color:#b5c2e2}.scene-loader[data-state="error"] .loading-pixels{display:none}
@keyframes loading-pixel{0%,70%,100%{opacity:.3;transform:translateY(0)}35%{opacity:1;transform:translateY(-5px)}}
@media(prefers-reduced-motion:reduce){.loading-pixels i{animation:none;opacity:.7}}



@media(max-width:700px){}

/* 背包浮在原场景上，旋转与拖拽始终使用同一个模型。 */
.home-canvas:active{cursor:grabbing}.backpack{width:310px;top:140px;bottom:auto;max-height:calc(100vh - 270px)}
.backpack .drawer-header{padding:15px 18px 12px}.backpack .drawer-header small{font-size:8px;letter-spacing:1px}.backpack .drawer-header h2{font-size:18px;margin-top:4px}.backpack .drawer-body{padding:14px 18px 16px}
.bag-tabs{display:flex;gap:5px}.bag-tabs button{flex:1;border:1px solid transparent;background:var(--surface2);padding:9px 4px;font-size:11px}.bag-tabs button[aria-pressed=true]{background:var(--gold);border-color:var(--ink);font-weight:700}
.bag-hint{font-size:10px;line-height:1.7;color:var(--muted);min-height:34px;margin:12px 0}.paint-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.paint-item{background:var(--surface2);border:1px solid #7285a440;padding:12px 5px 9px;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.paint-item[aria-pressed=true]{border-color:var(--ink);box-shadow:inset 0 -3px 0 var(--gold)}.paint-item b,.bag-decor b{display:block;font-size:10px;margin:8px 0 5px}.paint-item small,.bag-decor small{display:block;font-size:8px;color:var(--muted)}.paint-sample{display:block;width:44px;height:35px;margin:auto;background:var(--paint);border:2px solid #263350;box-shadow:3px 3px 0 #18294d20}.sample-wall{background:linear-gradient(transparent 46%,#26335030 47% 51%,transparent 52%),var(--paint)}.sample-roof{clip-path:polygon(18% 0,82% 0,100% 100%,0 100%);border-bottom-width:5px}.sample-sign{height:25px;margin-top:5px;margin-bottom:5px;box-shadow:inset 0 0 0 2px #fff4cd70,3px 3px 0 #18294d20}
.bag-footer{margin-top:15px;padding-top:12px;border-top:1px solid #7285a430;display:flex;align-items:center;justify-content:space-between;font-size:9px;color:var(--muted)}.bag-footer button,.bag-tools button{background:transparent;border:1px solid #7285a450;padding:6px;font-size:9px}.bag-tools{display:flex;align-items:center;gap:5px;margin-top:12px;flex-wrap:wrap}.bag-tools b{font-size:10px;width:100%}.bag-decor-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.bag-decor{padding:7px 2px;background:var(--surface2);border:1px solid #7285a440}.bag-decor .decor-sprite{width:100%;height:40px}.bag-decor.locked{opacity:.5}
.paint-ghost{position:fixed;z-index:40;pointer-events:none;transform:translate(-50%,-115%);display:flex;align-items:center;gap:8px;padding:8px 10px;background:var(--surface);border:2px solid var(--line);box-shadow:3px 4px 0 var(--shadow);white-space:nowrap}.paint-ghost span{width:25px;height:25px;border:1px solid var(--line)}.paint-ghost b{font-size:10px}.paint-ghost.valid{border-color:#2ca45c;background:#e4fbe9}.painting{user-select:none}.painting .paint-item{cursor:grabbing}
@media(max-width:700px){.backpack{left:14px;right:14px;top:auto;bottom:max(15px,env(safe-area-inset-bottom));width:auto;max-height:270px}.backpack .drawer-header{padding:10px 14px}.backpack .drawer-header small{display:none}.backpack .drawer-header h2{margin:0;font-size:15px}.backpack .drawer-header .icon-button{width:28px;height:28px}.backpack .drawer-body{padding:10px 14px}.bag-tabs button{padding:7px 4px;font-size:10px}.bag-hint{min-height:0;margin:8px 0;font-size:9px}.paint-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}.paint-item{padding:9px 2px 7px}.paint-sample{width:32px;height:25px}.sample-sign{height:19px;margin-top:3px;margin-bottom:3px}.paint-item b{font-size:9px;margin:6px 0 4px}.paint-item small{font-size:7px}.bag-footer{margin-top:9px;padding-top:8px;font-size:8px}.bag-decor-grid{grid-template-columns:repeat(3,1fr)}.backpack:has(.bag-decor-grid){max-height:310px}.paint-ghost{max-width:90vw;transform:translate(-50%,-130%);padding:6px}.paint-ghost b{font-size:9px}.paint-ghost span{width:20px;height:20px}}

.scene[data-loading] .home-canvas{visibility:hidden;pointer-events:none}
/* 阿策的入口与消息跟随岛屿角色，保留中央场景。 */
.scene-framing{top:46%}.main-actions{bottom:111px}.copilot-dock{position:absolute;z-index:8;left:50%;bottom:25px;transform:translateX(-50%);width:min(510px,calc(100vw - 42px));display:grid;grid-template-columns:1fr 44px;gap:9px}.copilot-status{grid-column:1/-1;margin:0 2px -3px;font-size:9px;color:var(--muted);min-height:14px}.copilot-dock form{display:flex;align-items:center;gap:11px;border:1.5px solid var(--line);background:var(--surface);padding:5px 6px 5px 12px;box-shadow:2px 3px 0 var(--shadow);min-width:0}.copilot-dock form>svg{width:18px;height:18px;fill:none;stroke:var(--muted);stroke-width:1.6;flex-shrink:0}.copilot-dock input{width:100%;min-width:0;border:0;outline:none;background:transparent;color:var(--ink);font-size:12px;padding:7px 0}.copilot-dock input::placeholder{color:var(--muted)}.copilot-dock input:disabled{opacity:.55}.copilot-dock form:focus-within{outline:2px solid #e1b332;outline-offset:2px}.copilot-dock button{display:grid;place-items:center;border:1px solid var(--line);background:var(--gold);width:32px;height:32px;flex-shrink:0}.copilot-dock button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7}.copilot-dock button.copilot-history{width:44px;height:44px;background:var(--surface);box-shadow:2px 3px 0 var(--shadow)}.npc-unavailable .copilot-status{color:#987034}[data-theme="night"] .copilot-status{color:#b7c5e6}[data-theme="night"] .npc-unavailable .copilot-status{color:#e3c68e}
.npc-anchor{position:fixed;z-index:7;width:1px;height:1px;pointer-events:none;--cloud-fill:rgb(255 253 243 / .82);--cloud-edge:rgb(255 255 255 / .82)}
.npc-interact{pointer-events:auto;position:absolute;top:-23px;left:-27px;width:54px;height:55px;border:0;background:transparent;padding:0;white-space:nowrap;display:flex;justify-content:center;align-items:flex-start}
.npc-interact>span{background:rgb(255 253 243 / .86);color:var(--ink);border:1px solid #ffffff90;border-radius:12px;padding:3px 9px;box-shadow:0 2px 6px #18294d18;font-size:10px;line-height:1.25}
.npc-interact:hover>span,.npc-interact:focus-visible>span{background:var(--gold)}
.npc-bubble{position:absolute;bottom:52px;width:270px;background:transparent;border:0;box-shadow:none;padding:31px 30px 28px;transform:translateX(-50%);pointer-events:auto;animation:npc-speech-in .18s ease-out;isolation:isolate}
.npc-cloud{position:absolute;inset:0;width:100%;height:100%;z-index:-1;overflow:visible;pointer-events:none;filter:drop-shadow(0 4px 9px #18294d1a)}
.npc-cloud path{fill:var(--cloud-fill);stroke:var(--cloud-edge);stroke-width:1;vector-effect:non-scaling-stroke}
.npc-bubble:after,.npc-bubble:before{content:"";position:absolute;border:1px solid var(--cloud-edge);border-radius:50%;background:var(--cloud-fill);transform:none;pointer-events:none}
.npc-bubble:after{bottom:-8px;left:var(--tail-x,calc(50% - 5px));width:9px;height:9px}
.npc-bubble:before{bottom:-21px;left:calc(var(--tail-x,calc(50% - 5px)) + 4px);width:5px;height:5px}
.npc-bubble header{display:flex;align-items:center;gap:7px;position:relative}
.npc-bubble header b{font-size:11px}.npc-bubble header small{font-size:8px;color:var(--muted)}
.npc-bubble header button{margin-left:auto;background:#ffffff45;border:0;border-radius:50%;width:24px;height:24px;font-size:17px;color:var(--muted);padding:0;line-height:1;display:grid;place-items:center}
.npc-bubble header button:hover{background:#ffffff90}
.npc-bubble p{font-size:11px;line-height:1.8;margin:5px 0 7px;max-height:165px;overflow:auto;overflow-wrap:anywhere}
.npc-continue{font-size:9px;padding:4px 0;border:0;background:transparent;color:var(--muted)}.npc-continue:hover{color:var(--ink)}
[data-theme="night"] .npc-anchor{--cloud-fill:rgb(231 229 255 / .83);--cloud-edge:rgb(241 240 255 / .70)}
[data-theme="night"] .npc-interact>span{background:rgb(231 229 255 / .86);border-color:#f1f0ff80}
.chat-log{display:flex;flex-direction:column;gap:17px;margin-top:18px}.chat-message{max-width:94%;padding:11px 13px;background:var(--surface2);border:1px solid #7385a33b;align-self:flex-start}.chat-message.user{background:#6aa59218;align-self:flex-end}.chat-message header{display:flex;align-items:center;gap:8px}.chat-message b{font-size:11px}.chat-message small{font-size:8px;color:var(--muted)}.chat-message p{font-size:12px;line-height:1.8;margin:8px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}.chat-empty{font-size:12px;line-height:2;color:var(--muted);padding:35px 0;text-align:center}.drawer:has(.chat-log){bottom:110px}
@keyframes npc-speech-in{from{opacity:0;translate:0 5px}to{opacity:1;translate:0 0}}
@media(max-width:700px){.scene-framing{top:42%;height:58vh}.main-actions{bottom:111px}.action-primary,.action-secondary{min-height:58px}.quest-peek{bottom:186px}.copilot-dock{left:21px;right:21px;bottom:calc(max(15px,env(safe-area-inset-bottom)) + var(--keyboard-offset,0px));transform:none;width:auto;grid-template-columns:1fr 40px;gap:7px}.copilot-status{font-size:8px;margin-bottom:-3px;min-height:13px}.copilot-dock form{padding:4px 5px 4px 10px;gap:7px;min-height:40px}.copilot-dock input{font-size:16px;padding:4px 0}.copilot-dock input::placeholder{font-size:11px}.copilot-dock form>svg{width:15px;height:15px}.copilot-dock button{width:29px;height:29px}.copilot-dock button.copilot-history{width:40px;height:40px}.save-footer{bottom:87px;font-size:7px}.npc-bubble{width:230px;padding:28px 27px 25px}.npc-bubble p{font-size:10px;max-height:var(--npc-text-max,135px);scrollbar-width:thin}.npc-bubble header small{font-size:7px}.npc-interact{top:-22px;left:-24px;width:48px;height:48px;padding:0}.npc-interact>span{font-size:9px;padding:3px 8px}.backpack{bottom:103px;max-height:263px}.backpack:has(.bag-decor-grid){max-height:285px}.drawer:has(.chat-log){bottom:100px}.keyboard-open .scene-framing{top:30%;height:46vh}.keyboard-open .main-actions,.keyboard-open .quest-peek,.keyboard-open .save-footer{visibility:hidden}.toast{bottom:285px}}
@media(max-width:370px){.main-actions{bottom:108px}.quest-peek{bottom:180px}.copilot-dock{left:15px;right:15px}.save-footer{bottom:85px}}
@media(max-height:720px) and (min-width:701px){.main-actions{bottom:98px}.copilot-dock{bottom:18px}.scene-framing{top:43%;height:62vh}.copilot-status{font-size:8px}}

.bag-decor{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
@media(max-width:700px){.main-actions{grid-template-columns:1fr 2.1fr}.action-primary{grid-column:2}.action-secondary:first-child{grid-column:1}}
.scene-caption{display:none}
@media(min-width:701px){.save-footer{bottom:7px;right:25px}}
@media(max-width:370px){.npc-bubble{width:200px;padding:26px 24px 24px}}

/* 画布铺满视口；隐形参考框只负责保持初始构图，不裁切任何三维资源。 */
.scene{position:absolute;inset:0;width:100%;height:100%;max-height:none;transform:none;z-index:1}
.scene-framing{visibility:hidden;pointer-events:none}
.scene-framing-content{position:absolute;inset:-15% -13% -10%}
@media(max-width:700px){.scene-framing-content{inset:-8% -5% -5%}}
/* 连续的本地昼夜天空：所有图层铺满页面，日月轨迹不创建独立窗口。 */
.sky{background:radial-gradient(ellipse at 55% 40%,#ffffff20,transparent 65%),linear-gradient(var(--sky-top,#bbdef5),var(--sky-middle,#d4eaf8) 55%,var(--sky-bottom,#eef7fd));overflow:hidden}
.sky-horizon{position:absolute;inset:0;background:radial-gradient(ellipse 80% 46% at var(--sun-x,80%) 72%,#ffb76bb0 0,#f39c9c55 38%,transparent 76%);opacity:var(--sky-glow,0);pointer-events:none}
.celestial{position:absolute;width:70px;height:70px;transform:translate(-50%,-50%);opacity:0;pointer-events:none;transition:left .9s linear,top .9s linear,opacity .9s ease}
.celestial:before{content:"";position:absolute;inset:-70%;background:radial-gradient(circle,#ffe3a750,transparent 67%);border-radius:50%}
.celestial.moon:before{background:radial-gradient(circle,#d4e0ff28,transparent 66%)}
.celestial .sky-orb{display:block;inset:0;width:100%;height:100%;box-shadow:none;animation:celestial-sway 9s ease-in-out infinite}
.celestial.sun .sky-orb{background:var(--sun-fill,#ffe5a2);clip-path:polygon(25% 0,75% 0,75% 12%,88% 12%,88% 25%,100% 25%,100% 75%,88% 75%,88% 88%,75% 88%,75% 100%,25% 100%,25% 88%,12% 88%,12% 75%,0 75%,0 25%,12% 25%,12% 12%,25% 12%)}
.celestial.moon .sky-orb{background:#ecedce;clip-path:polygon(25% 0,75% 0,50% 18%,38% 40%,42% 64%,64% 83%,88% 80%,75% 100%,25% 100%,0 75%,0 25%);animation-delay:-4s}
.sky .cloud{background:var(--sky-cloud,#ffffff);animation:sky-cloud-drift 90s ease-in-out infinite alternate;will-change:translate}
.sky .cloud-b{animation-duration:120s;animation-delay:-45s;animation-direction:alternate-reverse}
.sky .cloud-c{animation-duration:150s;animation-delay:-70s}
.star-field{display:block;opacity:var(--sky-stars,0);animation:sky-star-breathe 8s ease-in-out infinite alternate}
@keyframes celestial-sway{0%,100%{transform:translateY(-2px) rotate(-3deg)}50%{transform:translateY(3px) rotate(3deg)}}
@keyframes sky-cloud-drift{from{translate:-4vw 0}50%{translate:4vw -.6vh}to{translate:11vw 0}}
@keyframes sky-star-breathe{from{opacity:calc(var(--sky-stars,0)*.82)}to{opacity:var(--sky-stars,0)}}
@media(max-width:700px){.celestial{width:44px;height:44px}.theme-switch button{width:27px}}
@media(prefers-reduced-motion:reduce){.celestial{transition:none}.sky .cloud{will-change:auto}}

.sky .cloud-a{opacity:calc(.22 + var(--sky-daylight,1)*.40)}
.sky .cloud-b{opacity:calc(.16 + var(--sky-daylight,1)*.50)}
.sky .cloud-c{opacity:calc(.10 + var(--sky-daylight,1)*.20)}

/* 对话云边固定弧度，文字与操作留在中间安全区。 */
.npc-anchor{--cloud-fill:rgb(255 253 243 / .92)}
[data-theme="night"] .npc-anchor{--cloud-fill:rgb(231 229 255 / .92)}
.npc-bubble{padding:39px 32px 34px}
.npc-bubble header{gap:6px;min-height:24px}
.npc-bubble header small{font-size:9px;line-height:1.5}
.npc-bubble header button{flex:none;width:24px;height:24px;background:transparent}
.npc-bubble p{font-size:12px;line-height:22px;max-height:154px;margin:9px 0 12px;white-space:pre-wrap;scrollbar-width:thin;padding-right:3px}
.npc-bubble-actions{display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:28px}
.npc-bubble-actions>small{font-size:10px;line-height:1.4;color:var(--muted);white-space:nowrap}
.npc-continue{display:block;margin-left:auto;min-height:28px;padding:4px 9px;border-radius:12px;background:#ffffff50;font-size:12px;font-weight:600;line-height:20px;text-decoration:none;white-space:nowrap;color:var(--ink)}
.npc-continue:hover{background:#ffffffa0}
@media(max-width:700px){
  .npc-bubble{bottom:40px;padding:30px 27px 26px}
  .npc-bubble header{min-height:20px}
  .npc-bubble header small{font-size:8px}
  .npc-bubble header button{width:20px;height:20px;font-size:16px}
  .npc-bubble p{font-size:11px;line-height:20px;margin:6px 0 8px;max-height:var(--npc-text-max,100px)}
  .npc-continue{font-size:11px;padding:4px 7px}
  .npc-bubble:after{bottom:-5px;width:8px;height:8px}
  .npc-bubble:before{bottom:-15px;width:5px;height:5px}
}
@media(max-width:370px){.npc-bubble{padding:30px 24px 26px}}

/* 新物品红点按入口、分类、物品汇总；仅查看具体物品时清除。 */
.bag-tabs>button,.paint-item,.bag-decor{position:relative}
.bag-new-dot{position:absolute;top:5px;right:5px;width:8px;height:8px;background:#ef6468;border:1.5px solid var(--surface);box-shadow:0 0 0 1px #c34f5940;pointer-events:none}
.paint-item>.bag-new-dot,.bag-decor>.bag-new-dot{top:7px;right:7px;width:9px;height:9px}
.audio-settings{border-top:1px solid #7e91ad30;padding-top:20px}.audio-row{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:12px;margin-top:16px}.audio-row button{min-width:74px}.audio-row button[aria-pressed=true]{background:var(--gold);color:#16274a}.setting-field .audio-volume{margin:12px 0 18px}.audio-volume>span{display:flex;justify-content:space-between;color:var(--muted);font-size:11px}.setting-field .audio-volume input{accent-color:var(--ink);min-height:36px;padding:0;border:0;background:transparent;box-shadow:none}
.npc-interact>span{flex-shrink:0;max-width:152px;overflow:hidden;text-overflow:ellipsis}.npc-bubble header b{min-width:0;max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.npc-bubble header small{flex-shrink:0}#partnerNameError:not(:empty){color:var(--ink);border-left:3px solid #d7aa48;padding-left:8px}
