@import url('assets/fonts.css');

:root{color-scheme:dark;--ink:#101e30;--ink-deep:#081521;--panel:#14273b;--panel-light:#1c344b;--panel-hover:#24425a;--line:#38536a;--gold:#ffcd62;--gold-light:#ffe3a5;--orange:#ef9d4f;--cream:#fff7e7;--muted:#b6c9d4;--green:#a0d897;--mint:#78c7b7;--red:#ef7d79;--radius:18px;--shadow:0 14px 35px #020c1c50;font-family:Nunito,'Noto Sans TC',sans-serif;font-synthesis:none}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{background:var(--ink-deep);color:var(--cream);font-size:16px;-webkit-tap-highlight-color:transparent}button,a,input{font:inherit}button{cursor:pointer}button,a{-webkit-user-select:none;user-select:none}button{border:0;color:inherit}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--gold-light);outline-offset:5px}::selection{color:var(--ink);background:var(--gold)}::-webkit-scrollbar{width:7px}::-webkit-scrollbar-track{background:var(--ink)}::-webkit-scrollbar-thumb{background:var(--line);border-radius:9px}.hidden{display:none!important}.svg-symbols{position:absolute;width:0;height:0;overflow:hidden}.icon{width:24px;height:24px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle}.icon-fill{fill:currentColor;stroke:none}#app,.screen{width:100%;height:100%;min-height:0}.screen{position:absolute;inset:0}.home-screen{isolation:isolate;display:flex;flex-direction:column;overflow:hidden;background:linear-gradient(90deg,#091a2af5 0%,#0c2030e6 26%,#102733a8 49%,#10273333 76%,#10273345 100%),url('assets/village-meadow.webp') center center/cover no-repeat}
.home-screen::before{content:'';position:absolute;z-index:-1;inset:0;opacity:1;background:linear-gradient(180deg,#06142666 0%,transparent 23%,transparent 65%,#081c2bba 100%);pointer-events:none}.home-screen::after{content:'';position:absolute;z-index:-1;left:35%;right:-15%;bottom:-45%;height:85%;border-radius:50%;background:radial-gradient(ellipse at 50% 0%,#64774d35 0,transparent 65%);transform:rotate(-9deg);pointer-events:none}
.lobby-header{height:100px;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(25px,4vw,68px);flex:none}.brand{display:flex;align-items:center;gap:12px;font-size:18px;font-weight:900;letter-spacing:.03em}.brand-mark{width:42px;height:42px;background:var(--gold);border-radius:14px;color:var(--ink);display:grid;place-items:center;transform:rotate(-8deg)}.brand-mark .icon{width:26px;height:26px}.header-controls{display:flex;align-items:center;gap:10px}.resource-counter{height:43px;display:flex;align-items:center;gap:10px;padding:0 17px;margin-right:11px;background:#0b18297a;border:1px solid #4a66585c;border-radius:14px;font-size:17px;font-weight:900;font-variant-numeric:tabular-nums}.resource-counter .icon{color:var(--gold);width:21px;height:21px}.resource-name{font-size:12px;font-weight:700;color:var(--muted)}.icon-button{width:43px;height:43px;display:grid;place-items:center;border:1px solid var(--line);border-radius:13px;background:var(--panel);color:#d9e6e9;transition:background .16s ease,transform .16s ease}.icon-button:hover{background:var(--panel-hover);transform:translateY(-2px)}.icon-button:active{transform:translateY(1px)}
.lobby-content{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:28px;flex:1;min-height:0;width:min(1170px,calc(100% - 100px));margin:0 auto;padding:0 0 12px}.lobby-story{position:relative;z-index:3;padding-left:15px}.lobby-story h1{font-weight:900;font-size:clamp(50px,5.3vw,77px);line-height:1.18;margin:0 0 13px;letter-spacing:-.03em;color:var(--gold-light);position:relative;text-shadow:0 4px 10px #050c1660;white-space:nowrap}.lobby-story h1 span{color:var(--gold)}.title-paw{position:absolute;width:29px;height:29px;top:-16px;right:35px;color:var(--gold);transform:rotate(20deg)}.lobby-subtitle{margin:0 0 31px;font-size:20px;font-weight:700;color:#d4e2df;letter-spacing:.08em}.adventure-panel{width:min(440px,100%);padding:24px 25px 22px;border:1px solid #45616c;background:linear-gradient(135deg,#1a3142f0,#142839f5);border-radius:21px;box-shadow:var(--shadow)}.adventure-heading{display:flex;align-items:center;gap:13px}.location-icon{width:45px;height:45px;border-radius:13px;background:#375744;color:#c0e2a2;display:grid;place-items:center}.location-icon .icon{width:27px;height:27px}.adventure-heading h2{font-size:23px;line-height:1.25;letter-spacing:.02em;font-weight:900;margin:0 0 3px}.adventure-heading p{font-size:12px;font-weight:700;letter-spacing:.04em;color:var(--muted);margin:0}.chapter-badge{font-size:26px;font-weight:900;color:#7c9ba787;align-self:flex-start;margin-left:auto;line-height:1}.adventure-meta{display:flex;flex-wrap:wrap;align-items:center;gap:13px;margin:21px 0 14px;padding-bottom:15px;border-bottom:1px solid #3c53654f;color:#c1d3db;font-size:12px;font-weight:800}.adventure-meta>span{display:flex;align-items:center;gap:6px}.adventure-meta .icon{width:15px;height:15px;color:var(--mint)}.adventure-meta .best-record .icon{color:var(--gold);width:14px;height:14px}.adventure-description{font-size:14px;font-weight:600;line-height:1.8;letter-spacing:.025em;color:#c5d6db;margin:0 0 20px}.btn-primary{display:flex;align-items:center;justify-content:center;gap:10px;min-height:49px;border:1px solid #ffde8f;border-radius:13px;background:linear-gradient(#ffda7d,#f5bf51);color:#3d2c16;box-shadow:0 5px 13px #000a1830;font-weight:900;letter-spacing:.025em;transition:filter .15s ease,transform .15s ease,box-shadow .15s ease}.btn-primary:hover{filter:brightness(1.08);transform:translateY(-2px);box-shadow:0 8px 20px #060c2240}.btn-primary:active{transform:translateY(1px)}.btn-primary:disabled,.btn-secondary:disabled{cursor:not-allowed;filter:saturate(.2);opacity:.5;transform:none}.start-button{width:100%;height:57px;font-size:20px;padding:0 22px}.start-button>.icon:first-child{width:18px;height:18px}.button-arrow{margin-left:auto;width:20px;height:20px}.start-button>span{margin-left:auto}
.character-stage{position:relative;align-self:stretch;display:flex;align-items:center;justify-content:center;min-height:430px;z-index:1;padding-bottom:60px}.character-halo{position:absolute;width:490px;max-width:110%;height:490px;max-height:110%;background:radial-gradient(ellipse,#d5cd8c1c,transparent 65%);bottom:-3%;left:50%;transform:translateX(-50%);pointer-events:none}.stage-ground{position:absolute;bottom:52px;left:50%;transform:translateX(-50%) rotate(-7deg);width:430px;max-width:100%;height:155px;border-radius:50%;background:radial-gradient(ellipse,#84a15a50 0,#69894b28 30%,#2b493e0f 65%,transparent 70%);box-shadow:0 35px 55px #020d1a30}.wangwang-portrait{position:relative;z-index:2;display:block;max-width:115%;width:555px;height:clamp(340px,40vh,490px);object-fit:contain;object-position:center bottom;filter:drop-shadow(0 17px 13px #030f2159);transform:translateY(-9px);animation:dog-breathe 4.5s ease-in-out infinite;pointer-events:none}.character-name{position:absolute;z-index:3;bottom:113px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:8px;padding:9px 17px;background:#112532dc;border:1px solid #6c897659;border-radius:12px;white-space:nowrap;box-shadow:0 5px 17px #03132040}.character-name strong{font-size:17px;font-weight:900;letter-spacing:.09em}.character-name>span:last-child{font-size:11px;font-weight:700;color:#b3d2bf;padding-left:8px;border-left:1px solid #3a5b58}.ready-dot{width:6px;height:6px;border-radius:100%;background:#a3df88;box-shadow:0 0 8px #a3df8855}.starting-skill{position:absolute;z-index:4;bottom:26px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:13px;min-width:260px;padding:11px 14px;border:1px solid #71816572;border-radius:15px;background:#132735d9;box-shadow:0 8px 20px #06162133}.skill-medallion{display:grid;place-items:center;flex:none;width:42px;height:42px;border-radius:11px;background:#776348;color:#ffe0a5}.skill-medallion .icon{width:25px;height:25px}.starting-skill small{display:block;font-size:10px;font-weight:700;line-height:1.2;color:#a7bec7;margin-bottom:4px}.starting-skill strong{font-size:14px;font-weight:900;letter-spacing:.025em;white-space:nowrap}.skill-level{margin-left:auto;align-self:end;padding-bottom:3px;font-size:11px;white-space:nowrap;font-weight:900;color:#b9c8bd}.lobby-atmosphere{position:absolute;inset:0;z-index:-1;pointer-events:none}.lobby-atmosphere span{position:absolute;width:3px;height:3px;background:#f3e6ae;border-radius:50%;box-shadow:0 0 9px #ffdc8a8c;animation:firefly 5s ease-in-out infinite}.lobby-atmosphere span:nth-child(1){left:50%;top:24%;animation-delay:-1s}.lobby-atmosphere span:nth-child(2){left:88%;top:35%;animation-delay:-3s}.lobby-atmosphere span:nth-child(3){left:69%;top:17%;animation-delay:-2s}.lobby-atmosphere span:nth-child(4){left:58%;top:73%;animation-delay:-4s}.lobby-atmosphere span:nth-child(5){left:92%;top:69%}
.lobby-footer{width:min(1170px,calc(100% - 100px));margin:0 auto;padding:0 0 23px;flex:none}.lobby-navigation{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.nav-button{min-height:83px;display:flex;align-items:center;gap:14px;text-align:left;padding:14px 20px;border-radius:16px;background:#142939d9;border:1px solid #3e5b66;transition:background .16s ease,transform .16s ease,border-color .16s ease}.nav-button:hover{background:var(--panel-hover);transform:translateY(-3px);border-color:#6e8b8c}.nav-button>span:nth-child(2){font-size:16px;letter-spacing:.035em;font-weight:900;white-space:nowrap}.nav-button small{display:block;font-size:10px;font-weight:600;color:#abc0c7;letter-spacing:.03em;margin-top:4px}.nav-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:11px;flex:none;background:#2f4c4c;color:#b5d4b1}.nav-button:nth-child(2) .nav-icon{background:#4f453b;color:#edc98a}.nav-button:nth-child(3) .nav-icon{background:#33465b;color:#b3cfe3}.nav-arrow{margin-left:auto;width:17px;height:17px;color:#7e9ba8}.lobby-bottomline{display:flex;align-items:center;justify-content:space-between;gap:15px;padding-top:20px;color:#8fa8b2;font-size:10px;font-weight:700}.desktop-controls{display:flex;align-items:center;gap:5px;margin:0}.desktop-controls>span{margin-left:5px}.desktop-controls .control-separator{margin:0 5px;color:#556f7b}kbd,.keycap{display:inline-grid;place-items:center;min-width:20px;height:21px;font:800 10px Nunito,'Noto Sans TC',sans-serif;color:#b3c8d1;border:1px solid #46616e;background:#152d3b;border-radius:5px;padding:0 5px}.mobile-controls{display:none;margin:0}.version-label{letter-spacing:.08em;white-space:nowrap;color:#728d96}
.game-screen{background:#466747;touch-action:none}.game-screen #game-canvas{position:absolute;inset:0;width:100%;height:100%}#game-canvas canvas{display:block;max-width:100%;touch-action:none}.xp-bar{position:absolute;top:0;left:0;right:0;z-index:2;height:7px;background:#081a2bcc;box-shadow:0 2px 5px #04132160}.xp-bar>div{width:0;height:100%;background:linear-gradient(90deg,#68b8b6,#c6efb5);transition:width .15s ease}.battle-hud{position:absolute;top:max(25px,env(safe-area-inset-top));left:29px;right:29px;z-index:3;display:flex;align-items:flex-start;justify-content:space-between;pointer-events:none}.battle-hud button{pointer-events:auto}.player-hud{display:flex;align-items:center;gap:12px;min-width:250px;padding:9px 14px 9px 9px;border:1px solid #78908b80;border-radius:18px;background:#102535e8;box-shadow:0 5px 20px #03162333}.hud-avatar{position:relative;width:56px;height:56px;flex:none;border-radius:14px;background:#33554d;display:grid;place-items:center;overflow:visible}.hud-avatar img{width:65px;height:65px;object-fit:contain;transform:translateY(-4px);filter:drop-shadow(0 4px 3px #061e2b50)}.hud-avatar>span{position:absolute;bottom:-5px;right:-5px;display:grid;place-items:center;width:23px;height:23px;background:var(--gold);border:2px solid #142b3c;border-radius:8px;color:#423016;font-size:12px;font-weight:900}.hud-vitals{flex:1;min-width:0}.hud-player-name{display:flex;align-items:center;justify-content:space-between;gap:15px;font-size:14px;font-weight:900;margin-bottom:7px}.hud-player-name>span{display:flex;align-items:center;gap:4px;color:#d0dde0;font-size:10px;font-variant-numeric:tabular-nums}.hud-player-name .icon{width:11px;height:11px;color:#f89185}.health-track{height:9px;background:#091a28;border-radius:6px;overflow:hidden}.health-track>div{width:100%;height:100%;background:linear-gradient(90deg,#ec8273,#f2b596);border-radius:6px;transition:width .16s ease}.wave-label{display:block;font-size:10px;color:#a8c2c9;font-weight:800;letter-spacing:.03em;margin-top:6px}.run-hud{position:absolute;left:50%;transform:translateX(-50%);display:flex;align-items:center;border:1px solid #78908b66;border-radius:13px;background:#102535e8;box-shadow:0 5px 20px #03162333;font-weight:900;font-variant-numeric:tabular-nums}.run-hud>span{display:flex;align-items:center;gap:8px;padding:11px 16px}.run-hud .icon{width:17px;height:17px}.time-display{font-size:21px;min-width:112px}.time-display>.icon{color:#d5e7d2}.kills-display{font-size:15px;border-left:1px solid #47606980;color:#ffdaa0;min-width:73px}.battle-pause{background:#102535e8;border-color:#78908b80;width:45px;height:45px}.boss-hud{position:absolute;top:108px;left:50%;transform:translateX(-50%);width:min(380px,70%);z-index:3;text-align:center;font-size:13px;font-weight:900;text-shadow:0 2px 4px #081b35}.boss-track{margin-top:7px;height:12px;border:2px solid #243d4a;background:#0b1f2ee6;border-radius:7px;overflow:hidden}.boss-track>div{height:100%;width:100%;background:linear-gradient(90deg,#bf677d,#f0908b);transition:width .16s ease}.hud-skills{position:absolute;z-index:3;bottom:26px;left:29px;display:flex;gap:9px;pointer-events:none}.hud-skill,.skill-slot{position:relative;width:50px;height:50px;border:1px solid #80958d99;border-radius:13px;background:#122c3be8;display:grid;place-items:center;color:var(--gold-light);box-shadow:0 5px 14px #051a2c26}.hud-skill .icon,.skill-slot .icon{width:26px;height:26px}.hud-skill>span,.hud-skill>small,.skill-slot>span,.skill-slot>small{position:absolute;bottom:-5px;right:-4px;border-radius:5px;background:#314e4b;font-size:9px;padding:2px 5px;line-height:1.2;color:#e4f3dd}.battle-controls{position:absolute;inset:0;pointer-events:none}.dash-button{position:absolute;right:32px;bottom:29px;z-index:3;width:74px;height:74px;border-radius:22px;border:2px solid #ffdc91;background:#e9ba54e6;color:#302c1b;box-shadow:0 5px 18px #0a223940;display:flex;align-items:center;justify-content:center;flex-direction:column;pointer-events:auto;touch-action:none;font-size:11px;font-weight:900;gap:2px}.dash-button>.icon{width:27px;height:27px}.dash-button kbd{position:absolute;bottom:-10px;left:50%;transform:translateX(-50%);background:#193241;border-color:#708a8a;white-space:nowrap}.dash-button:active{background:#fff0ba;transform:scale(.95)}.dash-button.cooldown,.dash-button:disabled{background:#47686ad9;border-color:#829c94;color:#b0c6c5;cursor:default}.joystick{display:none;position:absolute;bottom:35px;left:34px;z-index:3;width:112px;height:112px;pointer-events:auto;touch-action:none;background:#112b424f;border:2px solid #dbecd75e;border-radius:50%;box-shadow:0 5px 20px #06202c24}.joystick>div{position:absolute;left:33px;top:33px;width:42px;height:42px;border-radius:50%;background:#e1e7c6b0;border:1px solid #fff2c578;box-shadow:0 2px 10px #102c3930;pointer-events:none}
.modal-layer{position:fixed;z-index:20;inset:0;padding:25px;display:flex;justify-content:center;align-items:center;background:#041221c9;backdrop-filter:blur(5px);overflow-y:auto}.modal-content{position:relative;width:min(560px,100%);max-height:calc(100dvh - 50px);overflow:auto;background:var(--ink);border:1px solid #52697b;border-radius:23px;box-shadow:0 25px 80px #000e2466;animation:modal-in .2s ease-out}.modal-content.modal-wide,.modal-content.upgrade-modal{width:min(900px,100%)}.modal-header{padding:25px 27px 19px;display:flex;align-items:center;justify-content:space-between;gap:15px;border-bottom:1px solid #334c5d70}.modal-title{font-size:24px;line-height:1.3;font-weight:900;margin:0;color:var(--gold-light);letter-spacing:.02em}.modal-header p{font-size:12px;color:var(--muted);margin:6px 0 0}.modal-close{display:grid;place-items:center;width:35px;height:35px;background:#21384b;border:1px solid #426073;border-radius:10px;color:#c1d5de;flex:none}.modal-close:hover{background:#31516a}.modal-close .icon{width:18px;height:18px}.modal-body{padding:24px 27px;color:#c5d9e1;font-size:14px;line-height:1.8}.modal-body h3{color:var(--cream);font-size:16px;margin:20px 0 8px}.modal-body h3:first-child{margin-top:0}.modal-body p{margin:0 0 14px}.modal-body p:last-child{margin-bottom:0}.modal-body ul{padding-left:20px;margin:8px 0}.modal-body li{padding:3px 0}.modal-actions{padding:0 27px 25px;display:flex;justify-content:center;gap:12px}.modal-actions>button{flex:1;min-width:0}.btn-secondary{display:flex;align-items:center;justify-content:center;gap:8px;min-height:49px;padding:10px 20px;border-radius:13px;border:1px solid #46647a;background:#213b51;color:#d2e4e9;font-weight:900;transition:background .15s ease,transform .15s ease}.btn-secondary:hover{background:#2d4c63;transform:translateY(-1px)}.btn-secondary:active{transform:translateY(1px)}.text-accent{color:var(--gold-light)}.muted{color:var(--muted)}
.upgrade-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:2px 0}.upgrade-card{position:relative;display:flex;flex-direction:column;align-items:flex-start;min-width:0;text-align:left;padding:21px 18px 18px;min-height:245px;background:#1a3248;border:1px solid #4b6679;border-radius:16px;color:var(--cream);transition:transform .16s ease,border-color .16s ease,background .16s ease}.upgrade-card:hover{transform:translateY(-6px);border-color:var(--gold);background:#233d51}.upgrade-card:focus-visible{outline-offset:3px}.upgrade-icon{width:53px;height:53px;display:grid;place-items:center;background:#5b5540;color:var(--gold-light);border-radius:14px;margin-bottom:17px;font-size:28px}.upgrade-icon .icon{width:30px;height:30px}.upgrade-label{font-size:10px;letter-spacing:.05em;color:#b3cfbd;font-weight:800;margin-bottom:5px}.upgrade-title{font-size:18px;font-weight:900;margin:0 0 9px;color:var(--gold-light);line-height:1.4}.upgrade-description{font-size:12px;line-height:1.8;color:#c0d1dc;margin:0 0 17px;flex:1}.upgrade-level{font-size:11px;color:#9db8c8;font-weight:900;display:flex;justify-content:space-between;width:100%;padding-top:12px;border-top:1px solid #45607366}.upgrade-level .icon{width:15px;height:15px;color:var(--gold)}.stat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:5px 0 20px}.stat-item{background:#193248;border:1px solid #354f63;border-radius:13px;padding:15px;text-align:center}.stat-value{font-size:27px;line-height:1.3;color:var(--gold-light);font-weight:900;font-variant-numeric:tabular-nums}.stat-label{font-size:11px;line-height:1.4;color:#adc4d0;font-weight:700;margin-top:5px}.result-hero{text-align:center;margin:0 0 18px}.result-hero .icon{width:53px;height:53px;color:var(--gold);margin-bottom:10px}.result-hero h3{font-size:25px;color:var(--gold-light);margin:0 0 7px}.result-hero p{color:#b4cbd3;font-size:13px}.settings-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 0;border-bottom:1px solid #354e604f}.settings-row:first-child{padding-top:0}.settings-row:last-child{border-bottom:0;padding-bottom:0}.settings-row strong{font-size:15px;color:#e3edf0}.settings-row p{font-size:11px;line-height:1.6;color:var(--muted);margin:4px 0 0}.switch-button{width:48px;height:28px;border-radius:20px;background:#3c5261;border:1px solid #6c8491;position:relative;flex:none;transition:background .16s ease}.switch-button::after{content:'';position:absolute;width:20px;height:20px;top:3px;left:3px;background:#c3d1d9;border-radius:50%;transition:transform .16s ease,background .16s ease}.switch-button.on{background:#668f67;border-color:#a6cc95}.switch-button.on::after{transform:translateX(19px);background:#e5f5cb}.help-keys{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:9px 0 15px}.help-keys .keycap{font-size:11px;height:28px;min-width:28px;padding:0 8px}.help-keys>span:last-child:not(.keycap){margin-left:6px;font-size:12px}.companion-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.companion-card{text-align:center;min-width:0;padding:16px 9px;border:1px solid #426174;background:#1c3548;border-radius:14px;color:#e8f1e9}.companion-card .icon{width:35px;height:35px;color:var(--gold-light);margin:3px 0 9px}.companion-card img{width:90px;height:90px;object-fit:contain}.companion-card strong{display:block;font-size:14px}.companion-card p{font-size:11px;line-height:1.6;margin:6px 0 0;color:#b4ccd3}.companion-card.locked{opacity:.58}.growth-list{display:flex;flex-direction:column;gap:13px}.growth-row{display:flex;align-items:center;gap:13px;padding:15px;background:#1b3348;border:1px solid #3e5b6f;border-radius:14px}.growth-row>.icon{color:var(--gold-light);width:27px;height:27px}.growth-row>div{flex:1;min-width:0}.growth-row h3,.growth-row strong{font-size:14px;color:var(--cream);margin:0 0 4px}.growth-row p{font-size:11px;color:#acc5cf;margin:0;line-height:1.6}.growth-row button{font-size:12px;min-height:38px;padding:6px 11px;flex:none}.progress-track{height:6px;border-radius:5px;background:#071b2c;margin-top:8px;overflow:hidden}.progress-track>div{height:100%;background:var(--mint);border-radius:5px}.toast{pointer-events:none;position:fixed;z-index:40;left:50%;bottom:30px;transform:translateX(-50%);padding:14px 22px;border-radius:13px;background:#263d4df2;border:1px solid #8aa59b;color:#fff0c8;box-shadow:0 8px 30px #03132666;font-size:13px;font-weight:800;text-align:center;width:max-content;max-width:calc(100% - 36px);animation:modal-in .18s ease-out}.loading-overlay{position:fixed;z-index:50;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:20px;background:#0d1e2d;color:#c3d8d8}.loading-paw{width:70px;height:70px;border-radius:24px;display:grid;place-items:center;background:#263d43;color:var(--gold);animation:loading-breathe 1.4s ease-in-out infinite}.loading-paw .icon{width:39px;height:39px}.loading-overlay p{font-size:14px;font-weight:800;letter-spacing:.06em;margin:0}
@keyframes dog-breathe{0%,100%{transform:translateY(-9px)}50%{transform:translateY(-15px)}}@keyframes firefly{0%,100%{opacity:.1;transform:translateY(0)}50%{opacity:.9;transform:translateY(-14px)}}@keyframes modal-in{from{opacity:.4;translate:0 9px}to{opacity:1;translate:0 0}}@keyframes loading-breathe{0%,100%{transform:scale(1);opacity:.7}50%{transform:scale(1.07);opacity:1}}
@media(min-height:950px) and (min-width:900px){.lobby-header{height:115px}.lobby-content{padding-bottom:30px}.lobby-subtitle{margin-bottom:42px}.character-stage{padding-bottom:90px}.character-name{bottom:143px}.starting-skill{bottom:48px}.stage-ground{bottom:80px}.lobby-footer{padding-bottom:32px}.wangwang-portrait{height:490px}}
@media(max-height:760px) and (min-width:761px){.lobby-header{height:80px}.lobby-content{gap:15px;padding-bottom:2px}.lobby-story h1{font-size:57px;margin-bottom:8px}.lobby-subtitle{font-size:17px;margin-bottom:20px}.adventure-panel{padding:19px 22px 18px}.adventure-meta{margin:16px 0 10px;padding-bottom:10px}.adventure-description{font-size:13px;line-height:1.65;margin-bottom:15px}.adventure-heading h2{font-size:21px}.start-button{height:51px}.character-stage{min-height:350px;padding-bottom:60px}.wangwang-portrait{height:340px}.character-name{bottom:102px}.starting-skill{bottom:18px}.stage-ground{bottom:47px}.lobby-footer{padding-bottom:16px}.nav-button{min-height:72px;padding:10px 17px}.lobby-bottomline{padding-top:14px}}
@media(max-width:1050px) and (min-width:761px){.lobby-content,.lobby-footer{width:calc(100% - 64px)}.lobby-story{padding-left:0}.lobby-story h1{font-size:58px}.title-paw{right:5px;top:-22px}.lobby-subtitle{font-size:17px}.adventure-panel{padding:21px}.adventure-meta{gap:9px;font-size:11px}.nav-button{padding:13px;gap:10px}.nav-icon{width:34px;height:38px}.nav-icon .icon{width:23px;height:23px}.nav-button>span:nth-child(2){font-size:14px}.nav-button small{font-size:9px}.nav-arrow{display:none}.starting-skill{min-width:230px}.wangwang-portrait{width:460px;max-width:120%}}
@media(max-width:760px){.home-screen{overflow-y:auto;overflow-x:hidden;min-height:100%;height:auto;position:relative;background:linear-gradient(180deg,#0c2030ed 0%,#10252b85 24%,#142c314d 40%,#0d2234ed 70%,#102232 100%),url('assets/village-meadow.webp') 62% center/cover no-repeat}.lobby-header{height:77px;padding:0 21px;align-items:center}.brand{gap:9px;font-size:14px}.brand-mark{width:32px;height:32px;border-radius:11px}.brand-mark .icon{width:21px;height:21px}.header-controls{gap:7px}.resource-counter{padding:0 10px;gap:6px;margin:0 2px 0 0;height:34px;font-size:14px;border-radius:11px}.resource-counter .icon{width:16px;height:16px}.resource-name{display:none}.icon-button{width:34px;height:34px;border-radius:11px}.icon-button .icon{width:18px;height:18px}.lobby-content{display:flex;flex-direction:column;gap:0;width:100%;flex:none;margin:0;padding:0 22px;position:relative}.lobby-story{padding:0;width:100%;display:contents}.lobby-story h1{order:0;font-size:39px;line-height:1.25;letter-spacing:-.025em;margin:7px 0 9px;text-align:center;white-space:nowrap}.title-paw{width:19px;height:19px;right:-16px;top:-7px}.lobby-subtitle{order:1;text-align:center;font-size:13px;letter-spacing:.1em;margin:0}.character-stage{order:2;width:100%;height:249px;min-height:0;flex:none;padding-bottom:16px;margin-top:-4px}.character-halo{height:320px;width:370px;max-height:none;bottom:-28px}.stage-ground{width:310px;height:92px;bottom:22px}.wangwang-portrait{height:235px;width:320px;max-width:100%;object-fit:contain;transform:translateY(-5px);animation:dog-breathe-mobile 4.5s ease-in-out infinite}.character-name{bottom:15px;padding:6px 12px;gap:6px;border-radius:9px}.character-name strong{font-size:13px}.character-name>span:last-child{font-size:9px;padding-left:7px}.ready-dot{width:5px;height:5px}.starting-skill{display:none}.adventure-panel{order:3;width:100%;max-width:460px;padding:17px 18px 16px;border-radius:17px;margin:7px auto 0;background:#142b3cf2}.adventure-heading{gap:10px}.location-icon{width:34px;height:34px;border-radius:10px}.location-icon .icon{width:22px;height:22px}.adventure-heading h2{font-size:18px;margin-bottom:2px}.adventure-heading p{font-size:10px}.chapter-badge{font-size:22px}.adventure-meta{margin:13px 0 13px;padding:0;border:0;gap:10px;justify-content:space-between;font-size:10px}.adventure-meta .icon{width:13px;height:13px}.adventure-description{display:none}.start-button{font-size:17px;height:49px;min-height:49px;border-radius:11px}.start-button>.icon:first-child{width:15px;height:15px}.lobby-footer{flex:none;width:100%;padding:17px 22px 22px;margin:0}.lobby-navigation{gap:8px;width:min(460px,100%);margin:auto}.nav-button{min-height:72px;padding:10px 4px;gap:7px;flex-direction:column;justify-content:center;border-radius:13px;background:#17303ec9}.nav-icon{width:27px;height:26px;background:none!important;border-radius:0;color:#c9dbbc}.nav-icon .icon{width:22px;height:22px}.nav-button>span:nth-child(2){font-size:11px;letter-spacing:.01em}.nav-button small,.nav-arrow{display:none}.lobby-bottomline{padding-top:17px;justify-content:center;gap:0;font-size:9px;text-align:center}.desktop-controls,.version-label{display:none}.mobile-controls{display:block;letter-spacing:.03em}.modal-layer{padding:18px}.modal-content{max-height:calc(100dvh - 36px);border-radius:18px}.modal-header{padding:20px 19px 16px}.modal-title{font-size:21px}.modal-body{padding:19px;font-size:13px}.modal-actions{padding:0 19px 20px;gap:10px}.modal-actions .btn-primary,.modal-actions .btn-secondary{font-size:13px;padding:10px;min-height:45px}.upgrade-grid{grid-template-columns:1fr;gap:10px}.upgrade-card{min-height:120px;padding:15px 16px 14px 80px;display:block}.upgrade-icon{position:absolute;top:18px;left:15px;width:46px;height:46px;margin:0;border-radius:12px}.upgrade-icon .icon{width:26px;height:26px}.upgrade-label{font-size:9px;margin-bottom:2px}.upgrade-title{font-size:16px;margin-bottom:5px}.upgrade-description{font-size:11px;line-height:1.7;margin-bottom:10px}.upgrade-level{font-size:10px;padding-top:8px}.stat-grid{gap:9px}.stat-item{padding:13px 8px}.stat-value{font-size:24px}.stat-label{font-size:10px}.growth-row{padding:12px;gap:10px}.growth-row>.icon{width:23px;height:23px}.growth-row h3,.growth-row strong{font-size:12px}.growth-row p{font-size:10px}.growth-row button{font-size:10px;min-height:34px;padding:5px 8px}.companion-grid{gap:8px}.companion-card{padding:13px 6px}.companion-card img{width:65px;height:65px}.companion-card strong{font-size:12px}.companion-card p{font-size:10px}.battle-hud{top:max(21px,env(safe-area-inset-top));left:14px;right:14px}.player-hud{min-width:177px;padding:7px 9px 7px 6px;gap:8px;border-radius:13px}.hud-avatar{width:40px;height:40px;border-radius:10px}.hud-avatar img{width:47px;height:47px}.hud-avatar>span{width:20px;height:20px;font-size:10px;border-radius:6px;bottom:-4px;right:-4px}.hud-player-name{font-size:12px;gap:10px;margin-bottom:5px}.hud-player-name>span{font-size:8px;gap:3px}.hud-player-name .icon{width:9px;height:9px}.health-track{height:7px}.wave-label{font-size:9px;margin-top:4px}.run-hud{top:78px;left:0;transform:none;border-radius:10px}.run-hud>span{padding:7px 10px;gap:5px}.run-hud .icon{width:13px;height:13px}.time-display{min-width:87px;font-size:16px}.kills-display{min-width:57px;font-size:12px}.battle-pause{width:37px;height:37px;border-radius:11px}.battle-pause .icon{width:18px;height:18px}.boss-hud{top:165px;width:calc(100% - 80px);font-size:12px}.boss-track{height:11px;margin-top:5px}.hud-skills{left:14px;bottom:181px;gap:7px}.hud-skill,.skill-slot{width:39px;height:39px;border-radius:11px}.hud-skill .icon,.skill-slot .icon{width:21px;height:21px}.hud-skill>span,.hud-skill>small,.skill-slot>span,.skill-slot>small{font-size:8px;padding:2px 4px}.dash-button{right:29px;bottom:max(47px,calc(env(safe-area-inset-bottom) + 25px));width:70px;height:70px;border-radius:24px;font-size:11px}.dash-button .icon{width:26px;height:26px}.dash-button kbd{display:none}.joystick{display:block;left:27px;bottom:max(28px,calc(env(safe-area-inset-bottom) + 12px))}.toast{font-size:12px;bottom:22px}.loading-overlay p{font-size:12px}.loading-paw{width:62px;height:62px;border-radius:20px}}
@media(max-width:380px){.lobby-header{padding:0 16px}.brand{font-size:12px}.header-controls{gap:6px}.lobby-content{padding:0 18px}.lobby-story h1{font-size:35px}.lobby-footer{padding-left:18px;padding-right:18px}.resource-counter{padding:0 8px}.character-stage{height:227px}.wangwang-portrait{height:215px}.character-name{bottom:11px}.adventure-panel{margin-top:4px}.lobby-bottomline{font-size:8px}.modal-layer{padding:12px}.modal-content{max-height:calc(100dvh - 24px)}.growth-row{flex-wrap:wrap}.growth-row button{margin-left:auto}.companion-grid{grid-template-columns:1fr}.companion-card{display:flex;align-items:center;gap:9px;text-align:left}.companion-card img{height:55px;width:55px}.companion-card strong{display:inline}.companion-card p{margin:0}.companion-card>.icon{width:27px;height:27px;margin:0 5px}}
@media(max-height:690px) and (max-width:760px){.lobby-header{height:65px}.lobby-story h1{font-size:34px;margin-top:2px;margin-bottom:7px}.lobby-subtitle{font-size:12px}.character-stage{height:191px;margin-top:-5px}.wangwang-portrait{height:190px}.character-name{bottom:6px}.adventure-panel{padding:14px 16px;margin-top:3px}.adventure-meta{margin:10px 0 11px}.lobby-footer{padding-top:13px;padding-bottom:15px}.nav-button{min-height:63px;gap:5px}.lobby-bottomline{padding-top:12px}}
@media(hover:none) and (min-width:761px){.joystick{display:block}.hud-skills{bottom:180px}.dash-button kbd{display:none}}
@keyframes dog-breathe-mobile{0%,100%{transform:translateY(-5px)}50%{transform:translateY(-10px)}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

@media(max-width:760px){body:has(#game-screen:not(.hidden)) .toast{top:210px;bottom:auto}}

/* Partner collection, daily quests, and the bone economy. */
.collection-navigation{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.collection-navigation .nav-button{min-height:92px;padding:12px 8px;gap:7px;flex-direction:column;justify-content:center;text-align:center}
.collection-navigation .nav-icon{width:31px;height:29px;background:none!important;color:#c4dcc3;border-radius:0}
.collection-navigation .nav-icon .icon{width:27px;height:27px}
.collection-navigation .nav-button>span:nth-child(2){font-size:13px;letter-spacing:.025em}
.collection-navigation .nav-button small{font-size:9px;letter-spacing:0;margin-top:4px;color:#a8c2ca}
.collection-navigation .nav-arrow{display:none}
.collection-navigation .nav-summon{border-color:#95805a;background:#2c3a39e8}
.collection-navigation .nav-summon .nav-icon{color:var(--gold)}
.collection-navigation .nav-summon:hover{background:#404c40;border-color:var(--gold)}

/* First-play help and voluntary support stay within the existing game lobby. */
.beginner-guide-button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:36px;width:100%;padding:7px 4px;margin-top:6px;background:transparent;color:#d7e7e1;font-size:12px;font-weight:800;border-radius:7px;text-decoration:underline;text-decoration-color:#8ba99a;text-underline-offset:4px}
.beginner-guide-button .icon{width:16px;height:16px;color:var(--mint)}
.beginner-guide-button:hover{color:var(--gold-light)}
.coffee-button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:8px 13px;border:1px solid #8d7952;border-radius:10px;background:#263a3be8;color:var(--gold-light);font-size:12px;font-weight:900;white-space:nowrap;transition:background .16s ease,border-color .16s ease}
.coffee-button .icon{width:18px;height:18px}
.coffee-purpose{font-size:10px;font-weight:700;color:#c6d8cc}
.coffee-button:hover{background:#354b43;border-color:var(--gold)}
.beginner-steps{list-style:none;margin:0;padding:0;counter-reset:beginner}
.beginner-steps>li{counter-increment:beginner;position:relative;padding:0 0 19px 43px;margin:0 0 18px;border-bottom:1px solid #355267}
.beginner-steps>li::before{content:counter(beginner);position:absolute;top:0;left:0;display:grid;place-items:center;width:29px;height:29px;background:#314c49;color:var(--gold-light);border-radius:9px;font-size:14px;font-weight:900}
.beginner-steps>li:last-child{border-bottom:0;padding-bottom:0;margin-bottom:20px}
.beginner-steps h3,.modal-body .beginner-steps h3{margin:0 0 7px;font-size:16px;color:var(--cream);line-height:1.5}
.beginner-steps p{margin:0;color:#c8dce0;line-height:1.8}
.beginner-steps .help-keys{margin:8px 0}
.support-intro{display:flex;align-items:flex-start;gap:15px;margin-bottom:22px}
.support-intro>.icon{width:36px;height:36px;flex:none;color:var(--gold)}
.support-intro h3,.modal-body .support-intro h3{font-size:23px;line-height:1.5;margin:0 0 10px;color:var(--gold-light)}
.support-intro p{margin:0;color:#d4e4df;line-height:1.9}
.support-details{margin:0 0 20px}
.support-details>div{padding:13px 0;border-bottom:1px solid #355267}
.support-details dt{color:var(--mint);font-size:11px;font-weight:900;margin:0 0 6px}
.support-details dd{margin:0;color:#dfebe4;line-height:1.8}
.support-pending{margin:0;padding:13px 15px;background:#263c48;border-radius:12px;color:#d3e0dc;line-height:1.8;font-size:12px}
.modal-actions .support-link{display:inline-flex;align-items:center;justify-content:center;gap:8px;text-align:center}
@media(max-width:760px){.home-screen{height:100dvh;min-height:0}.home-screen::after{display:none}.beginner-guide-button{font-size:11px;min-height:34px;margin-top:4px}.lobby-bottomline{flex-wrap:wrap;gap:11px}.lobby-bottomline .mobile-controls{width:100%;order:1}.coffee-button{min-height:42px;padding:9px 14px;gap:9px;font-size:12px}.coffee-purpose{font-size:10px}.beginner-steps>li{padding-left:36px;padding-bottom:16px;margin-bottom:15px}.beginner-steps>li::before{width:25px;height:25px;font-size:12px}.beginner-steps h3,.modal-body .beginner-steps h3{font-size:14px}.beginner-steps p{font-size:12px}.support-intro{gap:11px;margin-bottom:18px}.support-intro>.icon{width:27px;height:27px}.support-intro h3,.modal-body .support-intro h3{font-size:20px}.support-intro p,.support-details dd{font-size:12px}.support-pending{font-size:11px;padding:12px}.modal-actions:has(.support-link){flex-wrap:wrap}}
#hud-name{font:inherit;font-weight:900;color:var(--cream)}
.modal-content.collection-modal,.modal-content.summon-modal{width:min(1000px,100%)}
.collection-tabs{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-bottom:20px}
.tab-button{display:flex;align-items:center;justify-content:center;gap:7px;border:1px solid #456278;border-radius:11px;min-height:39px;padding:8px 17px;background:#1a3349;color:#bfd2dc;font-size:13px;font-weight:900;transition:background .15s ease,border-color .15s ease}
.tab-button:hover{background:#28465c}
.tab-button.active{border-color:var(--gold);background:#5c5139;color:#ffdf9a}
.tab-button .icon{width:18px;height:18px}
.roster-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;align-items:stretch}
.roster-card{--rarity:#9ac9aa;position:relative;min-width:0;display:flex;flex-direction:column;align-items:stretch;padding:15px 14px 14px;border:1px solid #4a6575;border-radius:16px;background:#193247;color:#d4e4e8;overflow:hidden}
.roster-card.rarity-r,.rarity-r{--rarity:#a1d6ad}
.roster-card.rarity-sr,.rarity-sr{--rarity:#9ec8f1}
.roster-card.rarity-ssr,.rarity-ssr{--rarity:#ffda81}
.roster-card.rarity-sr{border-color:#638bb0;background:#1b344e}
.roster-card.rarity-ssr{border-color:#a99056;background:#343c3c}
.roster-card.selected{border-color:var(--gold);outline:2px solid #ffcd625e;outline-offset:-4px}
.roster-card.locked{background:#172d3e;border-color:#344c60}
.roster-card.locked .roster-art{opacity:.46;filter:saturate(.35)}
.roster-card.locked .ability-description{color:#9db6c5}
.roster-art{height:139px;display:flex;align-items:center;justify-content:center;position:relative;flex:none;margin:6px -4px 9px;border-radius:12px;background:radial-gradient(ellipse at center,#a4d0a413,transparent 70%)}
.roster-art img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 6px 6px #07172855)}
.roster-art>.icon{width:66px;height:66px;color:var(--rarity);stroke-width:1.3}
.roster-card h3,.modal-body .roster-card h3{font-size:16px;line-height:1.35;font-weight:900;color:var(--cream);margin:7px 0 5px;letter-spacing:.02em}
.roster-card p{margin:0}
.rarity-label{display:inline-flex;align-items:center;align-self:flex-start;gap:5px;color:var(--rarity);font-size:11px;font-weight:900;line-height:1;letter-spacing:.065em}
.rarity-label .icon{height:13px;width:13px}
.role-label{display:block;color:#afc7cf;font-size:10px;font-weight:800;line-height:1.5;margin-bottom:10px}
.ability-description{color:#c1d4dd;font-size:11px;line-height:1.75;flex:1;min-height:56px}
.ability-description strong{color:var(--rarity);display:block;font-size:11px;font-weight:900;margin-bottom:4px}
.card-action{margin-top:15px;display:flex;align-items:center;gap:7px;min-height:39px}
.card-action button,.roster-card>button{width:100%;min-height:38px;font-size:12px;font-weight:900;border-radius:10px;padding:8px 10px}
.equip-tag{display:flex;align-items:center;justify-content:center;gap:5px;min-height:38px;width:100%;padding:8px 9px;color:#def0c8;background:#355343;border-radius:10px;font-size:11px;font-weight:900}
.equip-tag .icon{width:15px;height:15px}
.wallet-summary{display:flex;align-items:center;justify-content:space-between;gap:15px;flex-wrap:wrap;margin:0 0 20px;padding:14px 17px;border-radius:13px;background:#233a4c;color:#c3d6df;font-size:12px;font-weight:800}
.wallet-summary>span,.wallet-summary>strong{display:flex;align-items:center;gap:8px}
.wallet-summary strong{font-weight:900;color:var(--gold-light);font-size:17px;font-variant-numeric:tabular-nums}
.wallet-summary .icon{color:var(--gold);width:22px;height:22px}
.daily-list{display:flex;flex-direction:column;gap:12px}
.quest-row{display:flex;align-items:center;gap:15px;padding:17px;border:1px solid #405b70;border-radius:14px;background:#193247}
.quest-row>.icon{width:30px;height:30px;color:#b3d8b8;flex:none}
.quest-copy{flex:1;min-width:0}
.quest-copy h3,.modal-body .quest-copy h3{font-size:15px;line-height:1.4;margin:0 0 5px;color:var(--cream);font-weight:900}
.quest-copy p{font-size:11px;color:#acc6d1;line-height:1.6;margin:0}
.quest-progress{display:flex;align-items:center;gap:10px;font-size:10px;font-variant-numeric:tabular-nums;color:#a9c7ce;margin-top:9px}
.quest-progress .progress-track{margin:0;min-width:0;flex:1;max-width:230px}
.quest-progress progress{width:100%;max-width:230px;height:6px;accent-color:var(--mint)}
.quest-reward{color:var(--gold-light);font-size:13px;font-weight:900;display:flex;align-items:center;gap:5px;white-space:nowrap}
.quest-reward .icon{width:17px;height:17px}
.claim-button{min-height:38px;font-size:12px;min-width:81px;padding:8px 12px;border-radius:10px;flex:none}
.claim-button:disabled{background:#243e50;color:#91adbb;border:1px solid #3e5b6f;opacity:1;cursor:default}
.summon-stage{padding:25px 24px 23px;text-align:center;border:1px solid #65726b;border-radius:18px;background:radial-gradient(ellipse at 50% 0%,#b8b3731a,transparent 68%),#1b3345;margin-bottom:18px}
.summon-stage>.icon{width:62px;height:62px;color:var(--gold-light);stroke-width:1.25;margin-bottom:12px}
.summon-heading,.modal-body .summon-heading{font-size:24px;font-weight:900;line-height:1.35;color:var(--gold-light);margin:0 0 10px}
.summon-stage p{max-width:510px;margin:0 auto 14px;color:#bacfd8;font-size:12px;line-height:1.8}
.summon-cost{display:flex;justify-content:center;align-items:center;gap:7px;color:var(--gold-light);font-weight:900;font-size:15px;margin-bottom:17px}
.summon-cost .icon{width:20px;height:20px}
.pity-track{display:flex;justify-content:center;flex-wrap:wrap;gap:9px 20px;color:#c4d4da;font-size:11px;font-weight:800;line-height:1.7;margin:16px 0}
.pity-track strong{color:var(--gold-light);font-variant-numeric:tabular-nums}
.pity-track .progress-track{width:100%;margin:6px 0 0;height:5px}
.summon-actions{display:flex;gap:12px;justify-content:center;max-width:510px;margin:18px auto 0}
.summon-actions button{flex:1;min-height:49px;font-size:14px;padding:10px 16px}
.rate-table{border-collapse:collapse;width:100%;font-size:12px;line-height:1.65;color:#c2d4dd;margin:10px 0 16px}
.rate-table th{text-align:left;font-size:10px;letter-spacing:.03em;color:#93b1c1;font-weight:900;padding:8px 10px;border-bottom:1px solid #456174}
.rate-table td{padding:11px 10px;border-bottom:1px solid #304b60}
.rate-table th:last-child,.rate-table td:last-child{text-align:right;font-variant-numeric:tabular-nums}
.rate-table tr:last-child td{border-bottom:0}
.summon-results{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:8px 0 20px}
.summon-result{--rarity:#a1d6ad;display:flex;flex-direction:column;align-items:center;min-width:0;position:relative;text-align:center;padding:14px 10px 12px;border:1px solid #587566;border-radius:14px;background:#1d3844}
.summon-result.rarity-sr{--rarity:#9ec8f1;border-color:#638bb0;background:#203a51}
.summon-result.rarity-ssr{--rarity:#ffda81;border-color:#b69a57;background:#3d433d}
.summon-result .roster-art{width:100%;height:95px;margin:0 0 10px}
.summon-result .roster-art>.icon{width:49px;height:49px}
.summon-result .rarity-label{align-self:center;font-size:10px;margin-bottom:8px}
.summon-result strong{font-size:13px;color:var(--cream);line-height:1.4;font-weight:900;display:block;margin-bottom:9px}
.summon-result p{font-size:10px;color:#b4cad2;line-height:1.6;margin:0}
.new-tag,.refund-tag{font-size:10px;font-weight:900;line-height:1.3;display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:24px;padding:4px 7px;border-radius:7px;margin-top:auto}
.new-tag{background:#4a653d;color:#e2f6c6}
.refund-tag{background:#304a58;color:#c5dce0;font-variant-numeric:tabular-nums}
.refund-tag .icon{width:12px;height:12px;color:var(--gold)}

.status-note{display:flex;align-items:flex-start;gap:10px;padding:13px 15px;border-radius:12px;background:#263c48;color:#d3e0dc;font-size:12px;line-height:1.75;margin:0 0 18px}
.status-note .icon{width:21px;height:21px;color:#c0dab1;margin-top:1px;flex:none}
.status-note p{margin:0}
.ledger-list{display:flex;flex-direction:column;gap:0;padding:0;list-style:none;margin:6px 0 0}
.ledger-row{display:flex;align-items:center;justify-content:space-between;gap:13px;padding:12px 0;border-bottom:1px solid #334e63;font-size:12px;line-height:1.6;color:#c4d9df}
.ledger-row:last-child{border-bottom:0}
.ledger-row small{display:block;font-size:10px;color:#8eafbf}
.ledger-row>strong{font-weight:900;color:var(--gold-light);font-variant-numeric:tabular-nums;white-space:nowrap}
@media(max-width:1100px) and (min-width:761px){.collection-navigation{gap:9px}.collection-navigation .nav-button{min-height:86px;padding:10px 5px}.collection-navigation .nav-button>span:nth-child(2){font-size:12px}.collection-navigation .nav-button small{font-size:8px}.roster-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.summon-results{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:760px){
  .collection-navigation{grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
  .collection-navigation .nav-button{grid-column:span 2}
  .collection-navigation .nav-button:nth-last-child(-n+2){grid-column:span 3}
  .collection-navigation .nav-button{min-height:65px;padding:9px 4px;gap:6px}
  .collection-navigation .nav-icon{width:25px;height:24px}
  .collection-navigation .nav-icon .icon{width:23px;height:23px}
  .collection-navigation .nav-button>span:nth-child(2){font-size:11px}
  .collection-navigation .nav-button small{display:none}
  .character-stage{height:220px}
  .wangwang-portrait{height:210px}
  .character-name{bottom:12px}
  .lobby-footer{padding-top:14px;padding-bottom:18px}
  .lobby-bottomline{padding-top:13px}
  .collection-tabs{gap:7px;margin-bottom:16px}
  .tab-button{flex:1;font-size:12px;min-height:37px;padding:7px 11px}
  .roster-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .roster-card{padding:12px 11px;border-radius:13px}
  .roster-art{height:114px;margin:3px -3px 7px}
  .roster-art>.icon{width:55px;height:55px}
  .roster-card h3,.modal-body .roster-card h3{font-size:14px;margin:5px 0}
  .role-label{font-size:9px;margin-bottom:8px}
  .rarity-label{font-size:10px}
  .ability-description{font-size:10px;line-height:1.7;min-height:65px}
  .ability-description strong{font-size:10px}
  .card-action{margin-top:12px;min-height:36px}
  .card-action button,.roster-card>button{min-height:36px;font-size:11px;padding:7px 8px}
  .equip-tag{min-height:36px;padding:7px 6px;font-size:10px}
  .wallet-summary{padding:12px 13px;margin-bottom:16px;font-size:11px;gap:10px}
  .wallet-summary strong{font-size:15px}
  .wallet-summary .icon{width:19px;height:19px}
  .quest-row{padding:13px 12px;gap:10px;flex-wrap:wrap}
  .quest-row>.icon{width:25px;height:25px}
  .quest-copy{flex:1;min-width:150px}
  .quest-copy h3,.modal-body .quest-copy h3{font-size:13px}
  .quest-copy p{font-size:10px}
  .quest-progress{font-size:10px;gap:8px}
  .quest-reward{font-size:12px;margin-left:35px}
  .claim-button{margin-left:auto;font-size:11px;min-height:36px;min-width:75px;padding:7px 10px}
  .summon-stage{padding:21px 14px 18px;border-radius:15px;margin-bottom:15px}
  .summon-stage>.icon{width:52px;height:52px;margin-bottom:10px}
  .summon-heading,.modal-body .summon-heading{font-size:21px}
  .summon-stage p{font-size:11px;line-height:1.75}
  .summon-cost{font-size:13px;margin-bottom:14px}
  .pity-track{gap:7px 14px;font-size:10px;margin:13px 0}
  .summon-actions{gap:9px;margin-top:15px}
  .summon-actions button{font-size:12px;min-height:44px;padding:9px 10px}
  .rate-table{font-size:11px}
  .rate-table th{font-size:9px;padding:7px 6px}
  .rate-table td{padding:9px 6px}
  .summon-results{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:16px}
  .summon-result{padding:13px 9px 11px;border-radius:12px}
  .summon-result .roster-art{height:100px;margin-bottom:8px}
  .summon-result strong{font-size:12px}

  .status-note{font-size:11px;padding:12px 13px;gap:8px;margin-bottom:15px}
  .status-note .icon{width:19px;height:19px}
  .ledger-row{font-size:11px;padding:10px 0}
}
@media(max-height:690px) and (max-width:760px){.character-stage{height:174px}.wangwang-portrait{height:173px}.collection-navigation .nav-button{min-height:59px;gap:4px}.collection-navigation .nav-icon{height:22px}.collection-navigation .nav-icon .icon{height:21px;width:21px}.lobby-footer{padding-top:12px}.lobby-bottomline{padding-top:11px}}
@media(max-width:360px){.roster-card{padding:11px 9px}.roster-art{height:105px}.roster-card h3,.modal-body .roster-card h3{font-size:13px}.quest-copy{min-width:135px}}
.summon-results:has(>.summon-result:only-child){grid-template-columns:minmax(0,240px);justify-content:center}
.summon-results:has(>.summon-result:only-child) .roster-art{height:155px}

/* Collection component alignment. */
.roster-copy{display:flex;flex-direction:column;flex:1;min-width:0}.roster-copy .ability-description{flex:1}.roster-copy .card-action{width:100%;font-size:12px;padding:8px 10px;min-height:39px}.roster-art>.rarity-label{position:absolute;top:3px;right:4px}.quest-emblem{display:grid;place-items:center;flex:none;color:#b3d8b8;width:30px}.quest-emblem .icon{width:27px;height:27px}.quest-copy>small{font-size:10px;color:#b9ccd6}.quest-reward{flex-direction:column;gap:9px;align-items:center}.quest-reward>strong{display:flex;align-items:center;gap:4px}.summon-emblem>.icon{width:62px;height:62px;color:var(--gold-light);margin-bottom:12px}.summon-result h3,.modal-body .summon-result h3{font-size:15px;line-height:1.4;color:var(--cream);margin:0 0 6px}.summon-result .new-tag,.summon-result .refund-tag{margin-top:12px}.collection-navigation .has-reward{border-color:#b39b57}.collection-navigation .has-reward .nav-icon{color:var(--gold-light)}
@media(max-width:760px){.roster-copy .card-action{font-size:11px}.quest-reward{flex-direction:row;margin-left:40px;justify-content:space-between;width:calc(100% - 40px)}.summon-result h3,.modal-body .summon-result h3{font-size:13px}.summon-emblem>.icon{width:48px;height:48px}}

.inline-status{margin:16px 27px 0;padding:11px 14px;border-radius:11px;background:#2d4846;color:#e5f0d2;font-size:12px;line-height:1.7;font-weight:700}@media(max-width:760px){.inline-status{margin:13px 19px 0;padding:10px 12px;font-size:11px}}

/* Preserve a valid WebGL surface while the lobby is visible; rendering sleeps in stop(). */
#game-screen.hidden{display:block!important;visibility:hidden;pointer-events:none}

/* Keep the next encounter readable while the arena remains the focal surface. */
.run-objective{position:absolute;top:80px;left:50%;transform:translateX(-50%);z-index:3;max-width:calc(100% - 28px);color:#f4ecd0;font-size:11px;font-weight:900;font-variant-numeric:tabular-nums;line-height:1.5;white-space:nowrap;text-shadow:0 2px 4px #081b35;pointer-events:none}
.run-objective.surge{color:#ffcf91}
.boss-hud.elite{color:#ffe0a2}
.boss-hud.elite .boss-track>div{background:linear-gradient(90deg,#bd9047,#f4cf7f)}
@media(max-width:760px){.run-objective{top:calc(max(21px,env(safe-area-inset-top)) + 121px);left:14px;transform:none;font-size:10px}.wave-label{letter-spacing:0}.boss-hud{top:calc(max(21px,env(safe-area-inset-top)) + 147px)}body:has(#game-screen:not(.hidden)) .toast{top:calc(max(21px,env(safe-area-inset-top)) + 189px)}}

/* The rescue route sits inside the existing adventure choice. */
.chapter-route-button{display:flex;align-items:center;gap:9px;width:100%;min-height:36px;margin-top:10px;padding:6px 2px;background:transparent;color:var(--cream);font-size:12px;font-weight:800;text-align:left;border-radius:6px}.chapter-route-button>span:nth-child(2){margin-left:auto;color:var(--mint);font-variant-numeric:tabular-nums}.chapter-route-button>.icon{width:16px;height:16px;color:var(--gold)}.chapter-route-button:hover{color:var(--gold-light)}
.chapter-list{display:flex;flex-direction:column;gap:13px}.chapter-row{display:grid;grid-template-columns:132px minmax(0,1fr);gap:19px;padding:15px;border:1px solid #39556b;border-radius:14px;background:#142a3b}.chapter-row.chapter-selected{border-color:var(--gold)}.chapter-art{position:relative;display:grid;place-items:center;align-self:stretch;min-height:128px;overflow:hidden;border-radius:10px;background:#355a46}.chapter-theme-market .chapter-art{background:#315b70}.chapter-theme-alley .chapter-art{background:#754946}.chapter-theme-mountain .chapter-art{background:#536d83}.chapter-art::after{content:'';position:absolute;left:0;right:0;bottom:0;height:24px;background:#142a3b55;pointer-events:none}.chapter-number{position:absolute;left:8px;top:5px;color:#fff8df;font-size:13px;font-weight:900}.chapter-art img{width:116px;height:116px;object-fit:contain;filter:drop-shadow(0 5px 5px #071c2733)}.chapter-rescue-state{position:absolute;z-index:1;bottom:5px;left:0;right:0;text-align:center;color:#fff7e7;font-size:10px;font-weight:900}.chapter-copy{min-width:0}.chapter-copy h3{margin:0 0 4px;font-size:19px;line-height:1.35;color:var(--cream)}.chapter-copy p{margin:6px 0;color:#c8d8de;font-size:12px;line-height:1.7}.chapter-copy .chapter-monsters{color:#d6e5cf;font-size:11px}.chapter-select{min-height:37px;margin-top:9px;padding:7px 13px;font-size:12px;box-shadow:none}.chapter-locked .chapter-art img{opacity:.55}.chapter-locked .chapter-select{color:#b5c9d3;border-color:#3b5669;cursor:default}.chapter-locked .chapter-rescue-state{color:#e0e8e7}.chapter-selected .chapter-select{color:var(--gold-light);opacity:1}
.rescue-result{display:flex;align-items:center;justify-content:center;gap:20px;padding:0 0 13px}.rescued-dog{width:155px;height:155px;flex:none;object-fit:contain;filter:drop-shadow(0 7px 7px #06152440)}.rescue-result>div{max-width:300px}.rescue-result-status{display:block;margin-bottom:7px;font-size:11px;font-weight:900;color:var(--mint);font-variant-numeric:tabular-nums}.rescue-result h3{font-size:25px;line-height:1.3;margin:0 0 9px;color:var(--gold-light)}.rescue-result p{margin:0;font-size:13px;line-height:1.8;color:#ccdce0}.rescue-reunion{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0 0 18px}.rescue-reunion figure{margin:0;text-align:center;color:#e3ecdf;font-size:11px;font-weight:800}.rescue-reunion img{display:block;width:100%;height:85px;object-fit:contain;margin-bottom:4px}
@media(max-width:760px){.chapter-route-button{font-size:11px;min-height:31px;margin-top:6px}.chapter-row{grid-template-columns:88px minmax(0,1fr);padding:11px;gap:12px}.chapter-art{min-height:126px}.chapter-art img{width:85px;height:105px}.chapter-copy h3{font-size:16px}.chapter-copy p{font-size:11px;line-height:1.65;margin:5px 0}.chapter-copy .chapter-monsters{font-size:10px}.chapter-select{font-size:10px;min-height:35px;margin-top:6px;padding:6px 9px}.rescue-result{gap:11px;align-items:center;padding-bottom:16px}.rescued-dog{width:108px;height:122px}.rescue-result h3{font-size:20px;margin-bottom:6px}.rescue-result p{font-size:11px;line-height:1.7}.rescue-result-status{font-size:10px;margin-bottom:5px}.rescue-reunion{gap:3px;margin-bottom:15px}.rescue-reunion img{height:64px}.rescue-reunion figure{font-size:10px}.adventure-heading>div{min-width:0}.chapter-badge{flex:none}}

/* All learned abilities remain visible without taking over the arena. */
.hud-skills{flex-wrap:wrap;align-content:flex-end;max-width:min(65vw,700px);row-gap:12px}.hud-skill{flex:none}.ability-list{list-style:none;margin:0;padding:0}.ability-row{display:flex;align-items:flex-start;gap:14px;padding:16px 0;border-bottom:1px solid #334f6266}.ability-row:first-child{padding-top:0}.ability-row:last-child{border-bottom:0;padding-bottom:0}.ability-emblem{display:grid;place-items:center;flex:none;width:42px;height:42px;color:var(--gold-light);background:#28434c;border-radius:10px}.ability-emblem>.icon{width:25px;height:25px}.ability-row>div{flex:1;min-width:0}.ability-row h3{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 6px;color:var(--cream);font-size:16px;line-height:1.5}.ability-row h3>span{flex:none;color:var(--mint);font-size:10px;font-weight:800;font-variant-numeric:tabular-nums}.ability-row p{margin:0;color:#c8dce0;font-size:12px;line-height:1.8}
@media(max-width:760px){.hud-skills{width:min(246px,calc(100% - 100px));max-width:calc(100% - 100px);gap:6px;row-gap:10px;bottom:181px}.hud-skills .hud-skill{width:31px;height:31px;border-radius:9px}.hud-skills .hud-skill .icon{width:18px;height:18px}.hud-skills .hud-skill>span{font-size:7px;padding:2px 4px;right:-2px;bottom:-4px}.ability-row{gap:11px;padding:14px 0}.ability-emblem{width:35px;height:35px;border-radius:9px}.ability-emblem>.icon{width:22px;height:22px}.ability-row h3{font-size:14px;gap:8px;margin-bottom:4px}.ability-row h3>span{font-size:9px}.ability-row p{font-size:11px;line-height:1.75}}

/* Home is the reward: a saved family rests in the tree-root alcove. */
.modal-content.homecoming-modal{width:min(760px,100%)}.homecoming-modal .modal-body{padding-top:18px;padding-bottom:18px}.homecoming-stage{position:relative;width:100%;aspect-ratio:3/2;margin:0;overflow:hidden;border-radius:14px;background:#4e5148}.homecoming-scene{position:relative;width:88.8889%;height:100%;margin-inline:auto;background:#8c7c61}.homecoming-house{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;user-select:none;pointer-events:none}.homecoming-house.image-unavailable{opacity:0}.homecoming-dog{position:absolute;z-index:1;display:block;left:var(--dog-left);bottom:var(--dog-bottom);width:var(--dog-width);height:auto;transform:translateX(-50%);transform-origin:50% 88%;animation:homecoming-breathe var(--breath-duration,3.8s) ease-in-out infinite;user-select:none;pointer-events:none}.homecoming-puppy{z-index:2}.homecoming-new{animation:homecoming-arrive .65s ease-out both,homecoming-breathe var(--breath-duration,3.8s) .65s ease-in-out infinite}.homecoming-caption{text-align:center;padding:15px 8px 0}.homecoming-caption .rescue-result-status{margin-bottom:4px;font-size:11px}.homecoming-caption h3{font-size:24px;line-height:1.35;color:var(--gold-light);margin:0 0 6px}.homecoming-caption p{margin:0!important;color:#c7d9de;font-size:12px;line-height:1.8}.homecoming-modal .stat-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:15px 0 0;padding-top:11px;border-top:1px solid #334c5d70}.homecoming-modal .stat-item{padding:5px 2px;background:transparent;border:0;border-radius:0}.homecoming-modal .stat-value{font-size:22px}.homecoming-modal .stat-label{font-size:10px;margin-top:3px}
@keyframes homecoming-breathe{0%,100%{transform:translateX(-50%) scale(1)}50%{transform:translateX(-50%) scale(1.004,1.018)}}@keyframes homecoming-arrive{from{opacity:0}to{opacity:1}}
@media(max-width:760px){.homecoming-modal .modal-body{padding:15px}.homecoming-stage{border-radius:10px}.homecoming-caption{padding:12px 3px 0}.homecoming-caption h3{font-size:20px;margin-bottom:5px}.homecoming-caption p{font-size:11px;line-height:1.7}.homecoming-caption .rescue-result-status{font-size:10px}.homecoming-modal .stat-grid{gap:4px;margin-top:13px;padding-top:9px}.homecoming-modal .stat-value{font-size:18px}.homecoming-modal .stat-label{font-size:9px}.homecoming-modal .modal-actions{padding-left:15px;padding-right:15px;gap:8px}}
@media(prefers-reduced-motion:reduce){.homecoming-dog,.homecoming-new{animation:none!important;transform:translateX(-50%);opacity:1}}

/* The final reward is a journey together, followed by a safe adopted home. */
.ending-stage{position:relative;width:100%;aspect-ratio:3/2;margin:0;overflow:hidden;border-radius:14px;background:#627460}.ending-background{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none}.ending-background.image-unavailable{opacity:0}.ending-family{position:absolute;inset:0;pointer-events:none}.ending-dog{position:absolute;display:block;left:var(--dog-left);bottom:var(--dog-bottom);width:var(--dog-width);height:auto;transform:translateX(-50%);transform-origin:50% 90%;pointer-events:none;user-select:none}.ending-adult{z-index:1}.ending-puppy{z-index:2}.ending-stage[data-scene="escape"] .ending-family{animation:ending-travel 3.2s ease-in-out both}.ending-stage[data-scene="escape"] .ending-dog{animation:ending-step .42s var(--dog-delay,0s) ease-in-out infinite}.ending-stage[data-scene="adoption"] .ending-dog{animation:homecoming-breathe 3.8s var(--dog-delay,0s) ease-in-out infinite}.ending-modal .homecoming-caption p{max-width:48ch;margin-inline:auto!important}.ending-replay{display:block;min-height:35px;margin-top:8px;font-size:11px;padding:6px 10px}
@keyframes ending-travel{from{transform:translateX(-12%)}to{transform:translateX(6%)}}@keyframes ending-step{0%,100%{transform:translateX(-50%) translateY(0)}50%{transform:translateX(-50%) translateY(-3px)}}
@media(max-width:760px){.ending-stage{border-radius:10px}.ending-modal .modal-actions .btn-primary,.ending-modal .modal-actions .btn-secondary{font-size:12px}.ending-modal .homecoming-caption p{font-size:11px}}
@media(prefers-reduced-motion:reduce){.ending-family,.ending-dog{animation:none!important}.ending-family{transform:none}.ending-dog{transform:translateX(-50%)}}

/* Read the environment while keeping the arena and warnings in view. */
.home-terrain-hint{margin:8px 0 12px;color:#c6dfd3;font-size:11px;font-weight:700;line-height:1.65}.chapter-copy .chapter-terrain{color:#bbd4d0;font-size:11px}.run-terrain{position:absolute;top:104px;left:50%;transform:translateX(-50%);z-index:3;max-width:min(620px,calc(100% - 44px));overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#dbebd7;font-size:11px;font-weight:900;font-variant-numeric:tabular-nums;line-height:1.5;text-shadow:0 2px 4px #081b35;pointer-events:none}.run-terrain.chilled{color:#d0f3ff}.boss-hud{top:134px}.field-guide-section+.field-guide-section{margin-top:27px;padding-top:24px;border-top:1px solid #334f6270}.field-guide-section h3{margin:0 0 12px;color:var(--gold-light);font-size:21px;line-height:1.4}.field-guide-terrain{margin-bottom:17px}.field-guide-terrain>strong{color:var(--mint);font-size:13px}.field-guide-terrain p{margin:6px 0 0;font-size:12px;line-height:1.85;color:#c9dcdf}.enemy-guide-list{margin:0}.enemy-guide-row+.enemy-guide-row{margin-top:15px}.enemy-guide-row dt{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px}.enemy-guide-row dt>strong{color:var(--cream);font-size:15px}.enemy-guide-row dt>span{color:#b7d5ca;font-size:10px;font-weight:800}.enemy-guide-row dd{margin:5px 0 0}.enemy-guide-row p{margin:0;font-size:12px;line-height:1.85;color:#c9dcdf}.enemy-guide-row p.enemy-counterplay{margin-top:3px;color:#d9e7c9}
@media(max-width:760px){.home-terrain-hint{display:block;margin:5px 0 11px;font-size:10px;line-height:1.6}.chapter-copy .chapter-terrain{font-size:10px}.run-terrain{top:calc(max(21px,env(safe-area-inset-top)) + 143px);left:14px;transform:none;max-width:calc(100% - 28px);font-size:10px}.boss-hud{top:calc(max(21px,env(safe-area-inset-top)) + 171px)}body:has(#game-screen:not(.hidden)) .toast{top:calc(max(21px,env(safe-area-inset-top)) + 221px)}.field-guide-section+.field-guide-section{margin-top:22px;padding-top:20px}.field-guide-section h3{font-size:18px;margin-bottom:10px}.field-guide-terrain>strong{font-size:12px}.field-guide-terrain p,.enemy-guide-row p{font-size:11px}.enemy-guide-row dt>strong{font-size:14px}.enemy-guide-row dt>span{font-size:9px}.modal-actions:has([data-action="field-guide"]){gap:7px}.modal-actions:has([data-action="field-guide"]) button{font-size:11px;padding-inline:7px}}
