:root{font-family:'Microsoft YaHei','PingFang SC','Noto Sans SC',system-ui,sans-serif}button:disabled{cursor:default}.topbar .icon-btn{width:42px;height:42px}.home{top:17%}.home h1{font-size:clamp(48px,5vw,72px);line-height:1.15;margin:16px 0}.home .intro{font-size:13px;line-height:1.8;margin-bottom:18px}.mode-picker{display:flex;gap:5px;margin:0 0 14px;width:100%;max-width:320px;padding:4px;border:1px solid #a5d6b82b;background:#07221f44;border-radius:6px}.mode-picker button{flex:1;background:transparent;border:0;border-radius:3px;padding:9px 8px;color:#8aafa0;font-size:11px;letter-spacing:1px}.mode-picker button.selected{background:#b7e8c31e;color:#ddf9e4}.home .biome-picker{margin-bottom:17px}.home .biome-picker button{min-width:97px;font-size:11px}.biome-picker button:disabled{opacity:.75}.biome-picker button:disabled.selected{opacity:1}.home .primary{padding:13px 23px;min-height:49px}.home .home-actions{gap:20px}.resume-meta{font-size:10px;color:#86aa96;line-height:1.7;letter-spacing:.4px;margin-top:11px;max-width:350px}.home-meta{margin-top:16px}.meta-button{padding:0;border:0;background:transparent;color:#9abea8;font-size:10px;letter-spacing:1px}.meta-button:hover{color:#daf4df}.record{margin-top:12px}.archive-btn{margin-top:10px;padding-top:10px}.journey-status{position:absolute;top:103px;left:50%;transform:translateX(-50%);text-align:center;letter-spacing:1px}.journey-status>span{font-size:9px;color:#83b19d}.journey-status>b{display:block;font-size:12px;font-weight:500;color:#bddbc6;margin-top:6px}.journey-status>div{display:flex;justify-content:center;gap:6px;margin-top:8px}.journey-status i{width:26px;height:2px;background:#577f6d55}.journey-status i.active{background:#b9e9c6}.journey-status i.done{background:#80c3a2}.boss-status{top:163px}.playing:has(.boss-status:not(.hidden)) .danger{top:273px}.target-guide{position:absolute;bottom:222px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:11px;color:#cfecd4;font-size:11px;letter-spacing:.6px;padding:10px 15px;background:#163730a6;border:1px solid #a0cdb52e;border-radius:25px;white-space:nowrap}.target-guide>span:first-child{display:inline-block;font-size:17px;color:#d5f9e2}.encounter-tip{bottom:280px}.mission>div{font-size:14px}.mission>small{font-size:11px;line-height:1.7;max-width:320px;display:block}.growth-head{font-size:14px}.growth-foot{font-size:10px}.traits span{font-size:10px}.challenge-panel b{font-size:12px}.challenge-panel p{font-size:11px;line-height:1.6}.challenge-panel small{font-size:9px}.challenge-panel{top:252px}.synergy-panel{top:420px}.synergy-panel #synergy-list>div{font-size:11px}.dialog>p{font-size:13px;line-height:1.9}.dialog h2{font-size:29px;line-height:1.5}.guide-grid p{font-size:12px}.evo-card p{font-size:12px;line-height:1.8}.evo-card small{font-size:10px}.recipe-preview>span{font-size:11px}.recipe-preview>b{font-size:11px!important}.recipe p,.species p{font-size:12px;line-height:1.8}.recipe>small,.species small{font-size:10px}.archive-card p{font-size:12px}.archive-card small{font-size:10px}.badge small{font-size:10px}.badge b{font-size:11px}.settings-grid small{font-size:11px}.resume-meta:empty{display:none}.journey-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:28px 0}.journey-cards>div{padding:22px 9px;border:1px solid #93c3aa2e;border-radius:6px;color:#709b87}.journey-cards>div.active{border-color:#b6e4c494;background:#a2d5b40c;color:#c9efd3}.journey-cards b{font:20px monospace;display:block;margin-bottom:12px}.journey-cards span{display:block;font-size:13px}.journey-cards small{display:block;margin-top:10px;font-size:11px;letter-spacing:1px}.chapter-note{border:1px solid #b0d3bd33;padding:20px;border-radius:6px;margin:25px 0;background:#9ec7ad08}.chapter-note b{font-size:15px;color:#cfebd5}.chapter-note p{font-size:13px;line-height:1.9;color:#91b3a0}.chapter-results{display:flex;justify-content:center;gap:15px;flex-wrap:wrap;margin:22px 0;color:#b3d5bd;font-size:12px}.difficulty-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:25px 0}.difficulty-cards button{padding:24px 15px;border:1px solid var(--line);background:#abd9b60b;border-radius:5px;text-align:left}.difficulty-cards button:hover:not(:disabled){border-color:#d2edcc;background:#a6d7b51a}.difficulty-cards button:disabled{opacity:.4}.difficulty-cards b{font-size:17px;color:#c6e9ce}.difficulty-cards p{font-size:12px;color:#8eb09a;line-height:1.9;margin-bottom:0}.ending-symbol{font-size:70px;color:#e8f5bf;text-shadow:0 0 50px #ddf6b0a1;margin:18px}.overlay.ending{backdrop-filter:blur(4px);background:#051c20a8}.overlay.ending .dialog{background:linear-gradient(135deg,#19372cd9,#0a222bd9);border-color:#c2daa258}.loading p{font-size:13px;letter-spacing:0;padding:0 24px;text-align:center}
@media(max-height:780px) and (min-width:801px){.home{top:16%}.home h1{font-size:50px;margin:13px 0}.home .intro{font-size:12px;margin-bottom:13px}.mode-picker{margin-bottom:12px}.mode-picker button{padding:8px}.home .biome-picker{margin-bottom:14px}.home .record{margin-top:11px}.home-meta{margin-top:13px}.growth-panel,.run-stats{top:111px}.challenge-panel{top:226px}.synergy-panel{top:388px}.journey-status{top:96px}.boss-status{top:153px}.playing:has(.boss-status:not(.hidden)) .danger{top:260px}.mission>div{font-size:13px}.mission>small{font-size:10px}.dialog{padding:30px}.dialog h2{font-size:26px}.encounter-tip{bottom:246px}.target-guide{bottom:191px}}
@media(max-width:600px){.topbar .brand{font-size:12px;gap:7px}.topbar nav{gap:4px}.topbar .icon-btn{width:39px;height:39px}.home{top:15%}.home h1{font-size:44px;margin:12px 0;line-height:1.12}.home .intro{font-size:11px;margin-bottom:13px}.mode-picker{padding:3px;gap:3px;margin-bottom:12px;max-width:305px}.mode-picker button{padding:9px 7px;font-size:10px}.home .biome-picker{gap:5px;margin-bottom:14px}.home .biome-picker button{min-width:0;padding:8px 10px;font-size:10px}.biome-picker button small{font-size:8px}.home .primary{font-size:12px;padding:12px 18px;min-height:48px}.home .home-actions{gap:17px}.resume-meta{font-size:9px;max-width:310px;margin-top:8px}.home-meta{margin-top:12px;gap:16px;font-size:8px}.meta-button{font-size:9px}.home .record{font-size:9px!important;margin-top:10px!important}.archive-btn{padding-top:9px;margin-top:8px}.journey-status{top:174px;left:6%;transform:none;text-align:left;display:flex;align-items:center;gap:8px;max-width:88%;flex-wrap:wrap}.journey-status>span{font-size:9px}.journey-status>b{margin:0;font-size:10px}.journey-status>div{margin-top:0;gap:4px}.journey-status i{width:15px}.challenge-panel{top:239px;width:180px;padding-top:10px}.challenge-panel b{font-size:11px}.challenge-panel p{font-size:10px}.challenge-panel small{font-size:8px}.challenge-panel #challenge-count{font-size:11px}.growth-head{font-size:12px}.growth-foot{font-size:9px}.traits span{font-size:9px}.synergy-panel{top:392px;width:170px}.synergy-panel #synergy-list>div{font-size:9px}.target-guide{top:202px;bottom:auto;left:6%;transform:none;padding:6px 10px;font-size:10px;max-width:88%;background:#16373077}.target-guide>span:first-child{font-size:14px}.danger,.playing:has(.boss-status:not(.hidden)) .danger{top:202px;font-size:10px}.playing:has(#danger:not(.hidden)) .target-guide{visibility:hidden}.boss-status{top:266px;right:6%;max-width:170px;padding:10px}.boss-status>b{font-size:12px}.boss-status>small{font-size:9px;line-height:1.8}.encounter-tip{bottom:321px;right:6%;max-width:155px}.encounter-tip>b{font-size:10px}.encounter-tip>small{font-size:9px}.mission{bottom:259px;max-width:77%}.mission>div{font-size:12px}.mission>small{font-size:10px;max-width:260px}.dialog{padding:24px 17px;max-height:92dvh}.dialog h2{font-size:23px;letter-spacing:1px}.dialog>p{font-size:12px}.guide-grid p{font-size:11px}.evo-card{padding:17px 10px}.evo-card b{font-size:13px;letter-spacing:0}.evo-card p{font-size:11px;min-height:88px}.evo-card small{font-size:9px;line-height:1.7}.recipe-preview>span{font-size:10px}.recipe-preview>b{font-size:10px!important}.journey-cards{gap:8px}.journey-cards>div{padding:17px 6px}.journey-cards span{font-size:11px}.journey-cards small{font-size:9px}.difficulty-cards{gap:8px}.difficulty-cards button{padding:18px 10px}.difficulty-cards p{font-size:11px}.difficulty-cards b{font-size:15px}.recipe p,.species p,.archive-card p{font-size:11px}.badge small{font-size:9px}.badge b{font-size:10px}.biome-records small{font-size:9px}.chapter-results{gap:10px;font-size:11px}.settings-grid small{font-size:11px}}
@media(max-height:720px) and (max-width:600px){.home{top:14%}.home h1{font-size:38px;margin:10px 0}.home .intro{margin-bottom:10px}.home .biome-picker{margin-bottom:11px}.mode-picker{margin-bottom:9px}.mode-picker button{padding:7px 6px}.home-meta{margin-top:9px}.home .record{margin-top:8px!important}.archive-btn{margin-top:6px;padding-top:7px}.resume-meta{font-size:8px}.journey-status{top:174px}.challenge-panel{top:236px}.synergy-panel{top:380px}.encounter-tip{display:none}.mission{bottom:235px}.mission>small{font-size:9px}.skill-panel{bottom:104px}.joystick{bottom:105px;width:100px;height:100px}.joystick>div{left:30px;top:30px}#minimap{bottom:179px;width:70px;height:70px}}
[hidden]{display:none!important}.save-tools{border-top:1px solid var(--line);padding-top:18px}.save-tools>label{display:block;margin-bottom:10px}.save-tools small{display:block;margin-top:10px}
@media(max-width:600px){.growth-panel .traits{position:fixed;top:168px;left:6%;width:88%;margin:0;gap:3px;flex-wrap:nowrap}.growth-panel .traits span{font-size:8px;padding:4px 5px;white-space:nowrap}.hud:has(.traits:not(:empty)) .journey-status{top:201px}.hud:has(.traits:not(:empty)) .target-guide,.playing:has(.traits:not(:empty)) .danger{top:228px}.hud:has(.traits:not(:empty)) .challenge-panel{top:265px}.hud:has(.traits:not(:empty)) .synergy-panel{top:420px}.hud:has(.traits:not(:empty)) .boss-status{top:292px;max-width:160px}.playing:has(.traits:not(:empty)):has(.boss-status:not(.hidden)) .danger{top:228px}}
.daily-note{max-width:340px;font-size:11px;line-height:1.8;color:#9ac4b0;margin-top:8px}.evo-card.specialization{border-color:#b3b8e775;background:#8b8eb615}.evo-card em{display:block;font-style:normal;font-size:10px;color:#b9bee3;margin-top:10px}.synergy-panel .branch-tag{color:#dfd6f6!important;border-color:#baa7e655!important}.rhythm-readout{display:none;align-items:center;gap:10px;width:165px;flex-shrink:0}.playing .rhythm-readout{display:flex}.rhythm-readout span{color:#b4d6bd;font-size:10px;white-space:nowrap}.rhythm-readout>div{flex:1}.rhythm-track{height:3px;margin-top:8px;background:#b7e4c322}.rhythm-track>div{width:0;height:100%;background:#b6eec7;transition:width .18s}#pulse-orb{width:23px;height:23px;border:1px solid #b6eec76b;border-radius:50%;background:#c1f6d00c;transition:background .1s,box-shadow .1s}#pulse-orb.on{background:#c1f6d09c;box-shadow:0 0 15px #a4ffb96b}.crescendo .rhythm-readout span{color:#ffe4a1}.crescendo .rhythm-track>div{background:#ffe4a1}.crescendo #pulse-orb{border-color:#ffe4a1;box-shadow:0 0 18px #ffe4a15e}.build-summary{color:#c5cae9!important;font-size:12px!important}@media(max-width:600px){.daily-note{font-size:10px;max-width:305px;line-height:1.7}.home:has(.daily-note:not(.hidden)) .home-meta{margin-top:8px}.playing .bottom-bar{justify-content:space-between;gap:12px}.playing .music-info{min-width:0;gap:10px}.playing .music-info>span{font-size:9px;white-space:nowrap}.playing .music-info small{font-size:8px;letter-spacing:0}.rhythm-readout{width:135px;gap:7px}.rhythm-readout span{font-size:9px}#pulse-orb{width:20px;height:20px}.evo-card em{font-size:9px;line-height:1.7}.build-summary{font-size:11px!important}}
/* Deep-water palette, quality picker and phone layout */
.home-meta{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px}
.home-meta .meta-button{min-height:34px}
.touch-mode body{overscroll-behavior:none;-webkit-tap-highlight-color:transparent;user-select:none}
.touch-mode #world canvas,.touch-mode .joystick{touch-action:none}
.touch-mode .topbar .icon-btn{min-width:42px;min-height:42px;font-size:16px;border-radius:14px}
.touch-mode .home{top:16%}
.touch-mode .home-meta{margin-top:16px;gap:8px}
.touch-mode .home-meta .meta-button{min-height:40px;padding:8px 12px;font-size:11px}
.touch-mode .mode-picker button,.touch-mode .biome-picker button,.touch-mode .home-actions button{min-height:46px}
.touch-mode .playing .joystick{display:block;bottom:calc(100px + env(safe-area-inset-bottom));left:calc(20px + env(safe-area-inset-left));width:124px;height:124px;border-width:2px}
.touch-mode .playing .joystick>div{left:34px;top:34px;width:54px;height:54px}
.touch-mode .playing .skill-panel{left:auto;right:calc(16px + env(safe-area-inset-right));bottom:calc(104px + env(safe-area-inset-bottom));transform:none;gap:10px}
.touch-mode .playing .skill{min-width:76px;min-height:76px;border-radius:22px}
.touch-mode .playing .skill span{font-size:23px}
.touch-mode .playing .skill small{font-size:8px}
.touch-mode .playing #minimap{right:calc(16px + env(safe-area-inset-right));bottom:calc(200px + env(safe-area-inset-bottom));width:92px;height:92px;opacity:.8}
.touch-mode .playing .bottom-bar{left:4%;right:4%;bottom:calc(6px + env(safe-area-inset-bottom));height:74px}
.touch-mode .playing .music-info,.touch-mode .playing .rhythm-readout{display:none}
.touch-mode .playing .growth-panel{top:calc(84px + env(safe-area-inset-top));left:4%;width:190px}
.touch-mode .playing .mission{left:4%;max-width:58%}
.touch-mode .dialog{max-height:82vh;overflow:auto}
.touch-mode .difficulty-cards,.touch-mode .settings-grid{grid-template-columns:1fr 1fr}
.touch-mode .settings-quality{flex-wrap:wrap}
.touch-mode .settings-quality button{min-height:40px;padding:8px 12px}
@media(max-width:520px){.touch-mode .playing .mission{display:none}.touch-mode .playing .growth-panel{width:170px}.touch-mode .playing .challenge-panel{display:none}.touch-mode .home h1{font-size:40px}.touch-mode .difficulty-cards,.touch-mode .settings-grid{grid-template-columns:1fr}}
.touch-mode .playing .skill-panel{position:fixed!important;left:auto!important;right:16px!important;bottom:104px!important;transform:none!important;display:flex!important;z-index:9!important}
.touch-mode .playing .skill{background:rgba(36,112,98,.98)!important;border-color:rgba(190,255,220,.8)!important;box-shadow:0 0 22px rgba(90,230,180,.32)!important}
.touch-mode .playing .skill>b,.touch-mode .playing .skill span,.touch-mode .playing .skill small{color:#f0fff6!important}
.mobile-actions{display:none;position:fixed;right:16px;bottom:104px;z-index:12;gap:10px;pointer-events:auto}
.touch-mode .playing .mobile-actions{display:flex}
.touch-mode .playing .skill-panel{display:none!important}
.mobile-actions button{width:78px;height:78px;border-radius:22px;background:rgba(36,112,98,.98);border:1px solid rgba(190,255,220,.85);color:#f0fff6;display:grid;place-items:center;gap:2px;font-size:22px;line-height:1;box-shadow:0 0 22px rgba(90,230,180,.3)}
.mobile-actions small{font-size:9px;letter-spacing:1px}
.touch-mode .perf-hud{top:calc(6px + env(safe-area-inset-top));font-size:9px;max-width:94%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* Notifications live on the right edge so they never cover the player avatar. */
.toast{position:fixed;top:auto;right:4.5%;left:auto;bottom:calc(250px + env(safe-area-inset-bottom));transform:none;width:min(300px,26vw);display:flex;flex-direction:column;align-items:flex-end;gap:8px;text-align:right;opacity:1;pointer-events:none;z-index:14}
.encounter-tip{left:4.5%;right:auto;bottom:calc(230px + env(safe-area-inset-bottom));transform:none;max-width:250px;text-align:left}
.toast-chip{max-width:100%;padding:9px 13px;border:1px solid rgba(165,225,202,.3);border-radius:14px;background:rgba(6,28,32,.86);backdrop-filter:blur(8px);color:#d8f6e4;font-size:12px;letter-spacing:.6px;line-height:1.5;box-shadow:0 8px 28px rgba(0,0,0,.25);opacity:0;transform:translateX(14px);transition:opacity .28s ease,transform .28s ease}
.toast-chip.in{opacity:1;transform:none}.toast-chip.out{opacity:0;transform:translateX(14px)}
.toast-chip.warn{border-color:rgba(242,164,133,.55);background:rgba(50,29,33,.9);color:#ffd4be}
.toast-chip.lineage{border-color:rgba(217,199,255,.5);background:rgba(28,24,48,.9);color:#e7dcff}
.lineage-tag{color:var(--lineage,#d9c7ff)!important;letter-spacing:.6px}
.lineage-path{margin-top:12px;padding-top:10px;border-top:1px solid rgba(190,220,255,.16);font-size:9px;color:#a9c7d9;line-height:1.6}
.lineage-chip{border-color:rgba(217,199,255,.45)!important;background:rgba(120,90,180,.14)!important;color:#e3d7ff!important}
.lineage-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:18px 0}
.lineage-card{padding:14px;border:1px solid rgba(160,190,210,.2);border-left:2px solid var(--lineage);border-radius:6px;background:rgba(120,150,180,.05);opacity:.55}
.lineage-card.discovered{opacity:1;background:color-mix(in srgb,var(--lineage) 10%,transparent)}
.lineage-card b{font-size:12px;color:var(--lineage)}
.lineage-card small{display:block;margin-top:8px;font-size:9px;line-height:1.7;color:#9ab5a8}
@media(max-width:600px){.toast{top:calc(212px + env(safe-area-inset-top));bottom:auto;right:6%;width:min(190px,48vw)}.encounter-tip{left:auto;right:6%;bottom:calc(321px + env(safe-area-inset-bottom));max-width:155px;text-align:center}.toast-chip{font-size:10px;padding:7px 10px;border-radius:11px}.lineage-grid{grid-template-columns:1fr}.lineage-path{font-size:8px}}
.touch-mode .mobile-actions button{transition:transform .12s,filter .12s}

/* Single-hand layout: controls cluster toward the chosen thumb side. */
.touch-mode.one-hand.hand-right .playing .joystick{left:auto;right:calc(24px + env(safe-area-inset-right))}
.touch-mode.one-hand.hand-right .playing .mobile-actions{right:auto;left:calc(16px + env(safe-area-inset-left))}
.touch-mode.one-hand.hand-left .playing .joystick{left:calc(124px + env(safe-area-inset-left))}
.touch-mode.one-hand.hand-left .playing .mobile-actions{right:calc(6px + env(safe-area-inset-right))}
.touch-mode.one-hand .playing #minimap{opacity:.55;width:76px;height:76px}

@media(max-width:480px){
  .music-debug{max-width:calc(100vw - 24px);overflow:hidden;text-overflow:ellipsis;font-size:9px;white-space:nowrap;bottom:calc(64px + env(safe-area-inset-bottom))}
}
