:root{font-family:Trebuchet MS,system-ui,sans-serif;color:#fff;background:#10251d;--safe-top: env(safe-area-inset-top, 0px);--safe-bottom: env(safe-area-inset-bottom, 0px)}*{box-sizing:border-box}html,body,#game{width:100%;height:100%;margin:0;overflow:hidden;overscroll-behavior:none}body{display:grid;place-items:center;background:radial-gradient(circle at 50% 30%,#315c3e,#10251d 75%);touch-action:none}#game{position:relative;max-width:540px;max-height:900px;box-shadow:0 24px 80px #06181199}canvas{display:block;margin:0 auto;touch-action:none}.pause-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10;display:grid;place-items:center;padding:calc(20px + var(--safe-top)) 20px calc(20px + var(--safe-bottom));background:#0b2019d9;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);touch-action:manipulation}.pause-overlay[hidden]{display:none}.pause-card{width:min(100%,360px);padding:28px 24px 26px;text-align:center;background:#173b2f;border:2px solid #e3c879;border-radius:18px;box-shadow:0 18px 55px #07150fc9,inset 0 1px #ffffff24}.pause-emblem{font-size:35px;line-height:1;color:#ffe298}.pause-card h1{margin:12px 0 8px;font-size:28px;letter-spacing:.06em;color:#ffe7a9}.pause-card p{margin:0 0 26px;font-size:16px;line-height:1.45;color:#dcebdc}.field-guide-button{width:100%;min-height:52px;margin-bottom:10px;border:2px solid #e3d28b;border-radius:10px;background:#315c46;color:#fff1be;font:800 16px Trebuchet MS,system-ui,sans-serif;cursor:pointer;touch-action:manipulation}.field-guide-button:focus-visible{outline:3px solid #ffe298;outline-offset:3px}.resume-button{width:100%;min-height:56px;border:2px solid #c9edb0;border-radius:10px;background:#427d52;color:#fff;font:800 18px Trebuchet MS,system-ui,sans-serif;cursor:pointer;touch-action:manipulation}.resume-button:active{background:#589967}.resume-button:focus-visible{outline:3px solid #ffe298;outline-offset:3px}.wave-retry-button,.home-button{width:100%;min-height:48px;margin-bottom:10px;border:2px solid #e3d28b;border-radius:10px;background:#315c46;color:#fff1be;font:800 15px Trebuchet MS,system-ui,sans-serif;cursor:pointer;touch-action:manipulation}.wave-retry-button{background:#47644c}.wave-retry-button:disabled{opacity:.48;cursor:default}.retry-count{color:#ffe298}.retry-note{color:#bfd9c9;font-size:12px;line-height:1.3;margin:-5px 0 13px}.home-button{border-color:#b9c9ad;color:#e5f0de;background:#294639}.home-button:focus-visible,.wave-retry-button:focus-visible{outline:3px solid #ffe298;outline-offset:3px}.start-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:12;display:grid;place-items:center;overflow-y:auto;padding:calc(18px + var(--safe-top)) 18px calc(18px + var(--safe-bottom));background:linear-gradient(180deg,#10291fea,#0b211beb);backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);touch-action:pan-y}.start-overlay.is-library-open{padding:0}.start-card{width:min(100%,390px);padding:18px 20px;text-align:center;background:linear-gradient(165deg,#24503e,#122f27 70%);border:2px solid #e5c979;border-radius:20px;box-shadow:0 20px 70px #06140ebf,inset 0 1px #ffffff30}.start-kicker{color:#f8dc93;font-size:13px;font-weight:900;letter-spacing:.2em}.start-portrait{width:112px;height:110px;margin:2px auto 1px;background-image:var(--hero-sheet);background-size:448px 435px;background-position:left top;background-repeat:no-repeat;filter:drop-shadow(0 12px 12px #0618119c)}.start-card h1{margin:7px 0 12px;color:#ffe7a5;font-size:clamp(24px,7vw,31px);line-height:1.1}.start-title{min-height:30px;color:#fff9e8;font-size:20px;font-weight:900}.hero-choice-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.hero-choice{min-width:0;min-height:105px;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:56px auto auto;justify-items:center;align-items:center;gap:1px;padding:6px 4px;border:1.5px solid #91b59d;border-radius:12px;background:#102d24;color:#fff;font-family:inherit;text-align:center;cursor:pointer;touch-action:manipulation}.hero-choice.is-selected{border:2px solid #ffe28e;background:#315b40;box-shadow:0 0 0 2px #f8dc9330}.hero-choice.is-locked{color:#bfd0c3;cursor:default}.hero-choice:focus-visible{outline:3px solid #ffe298;outline-offset:2px}.hero-choice-portrait{width:56px;height:56px;align-self:end;background-image:var(--hero-sheet);background-size:224px 218px;background-position:left top;background-repeat:no-repeat;filter:drop-shadow(0 4px 4px #0618119c)}.library-choice-icon{align-self:end;height:56px;color:#f5dc91;font-size:43px;font-weight:900;line-height:1.15;text-shadow:0 3px 5px #061811}.hero-choice.is-locked .hero-choice-portrait{filter:grayscale(1) brightness(.55);opacity:.7}.hero-choice-name{align-self:end;overflow:hidden;font-size:14px;font-weight:900;white-space:nowrap;text-overflow:ellipsis}.hero-choice-state{align-self:start;min-height:13px;margin-top:2px;color:#e5d59e;font-size:8px;font-weight:900;letter-spacing:.025em;line-height:1.25}.hero-detail{margin:8px 0 6px}.start-class{color:#b7e0bd;font-size:11px;font-weight:900;letter-spacing:.09em}.hero-description{max-width:300px;min-height:29px;margin:4px auto 0;color:#e0ecdc;font-size:12px;line-height:1.3}.player-rank{padding-top:7px;border-top:1px solid #d8c47e66}.player-rank>strong{display:block;color:#ffe7a5;font-size:15px;letter-spacing:.07em}.player-rank .start-title{min-height:auto;margin-top:2px;font-size:14px}.start-progress{height:13px;margin-top:9px;overflow:hidden;background:#0c251d;border:2px solid #d8c47e;border-radius:20px}.start-progress span{display:block;height:100%;background:linear-gradient(90deg,#7bd599,#f7e18a);border-radius:inherit;transition:width .2s}.start-xp{margin:6px 0 12px;color:#d5e7d5;font-size:11px;font-weight:800;letter-spacing:.04em}.start-button{width:100%;min-height:54px;border:2px solid #eff4bb;border-radius:12px;background:#508e58;color:#fff;font:900 17px Trebuchet MS,system-ui,sans-serif;cursor:pointer;touch-action:manipulation}.start-button:active{background:#69a46a}.start-button:focus-visible{outline:3px solid #ffe298;outline-offset:3px}.start-note{margin-top:10px;color:#b9d3ba;font-size:11px;line-height:1.4}.start-main[hidden],.character-library[hidden]{display:none}.character-library{max-height:min(72vh,650px);overflow-y:auto;padding:4px 2px 2px;text-align:left}.start-card.is-library-open{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;max-width:none;overflow-y:auto;padding:calc(22px + var(--safe-top)) clamp(18px,4vw,44px) calc(22px + var(--safe-bottom));border:0;border-radius:0;box-shadow:none;background:linear-gradient(160deg,#1d4938,#102a22 74%);text-align:left}.start-card.is-library-open .character-library{max-height:none;overflow:visible;padding:0}.library-header{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:10px;margin-bottom:7px}.library-back{min-height:38px;padding:4px 8px;border:1px solid #b4d2ae;border-radius:8px;background:#14352a;color:#e9efcf;font:900 10px Trebuchet MS,system-ui,sans-serif;cursor:pointer;touch-action:manipulation}.library-back:focus-visible{outline:3px solid #ffe298;outline-offset:2px}.library-header h2{margin:0;color:#ffe7a5;font-size:clamp(20px,5vw,27px);text-align:left}.library-intro{margin:0 0 16px;color:#d8e7d6;font-size:13px;line-height:1.35;text-align:left}.library-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.library-card{min-width:0;padding:9px;border:1px solid #8aa992;border-radius:12px;background:linear-gradient(160deg,#1a4032,#102b23)}.library-card.is-selectable{cursor:pointer;transition:border-color .15s,background-color .15s,box-shadow .15s}.library-card.is-selectable:hover{border-color:#e5cf7a}.library-card.is-selectable:focus-visible{outline:3px solid #ffe298;outline-offset:3px}.library-card.is-selected{border:2px solid #ffe28e;background:#315b40;box-shadow:0 0 0 2px #f8dc9330}.library-card.library-future{cursor:pointer;transition:border-color .15s,box-shadow .15s}.library-card.library-future:focus-visible{outline:3px solid #ffe298;outline-offset:3px}.library-card.library-future.is-coming-soon-feedback{animation:library-coming-soon-feedback .85s ease;border-color:#ffe28e}.library-status.is-coming-soon-feedback{animation:library-status-feedback .85s ease}@keyframes library-coming-soon-feedback{0%,to{transform:translateY(0);box-shadow:0 0 #ffe28e00}25%,65%{transform:translateY(-3px);box-shadow:0 0 0 3px #ffe28e55}45%,85%{transform:translateY(0);box-shadow:0 0 0 1px #ffe28eaa}}@keyframes library-status-feedback{0%,to{color:#f5d788;text-shadow:none}30%,70%{color:#fff5c2;text-shadow:0 0 10px #ffe28e}}@media(prefers-reduced-motion:reduce){.library-card.library-future.is-coming-soon-feedback,.library-status.is-coming-soon-feedback{animation-duration:.01ms}}.library-art{width:100%;aspect-ratio:1;margin-bottom:8px;border-radius:8px;background-color:#f4eedf;background-image:url(/assets/generated/future-hero-concepts.png);background-size:300% 200%;background-position:var(--concept-x) var(--concept-y);background-repeat:no-repeat}.library-profile-art{background-color:#18352b;background-image:var(--hero-sheet),url(/assets/generated/library-current-backdrops.png);background-size:400% 400%,200% 100%;background-position:left top,var(--hero-backdrop-position) center}.library-current.is-locked .library-profile-art{filter:grayscale(.9) brightness(.58)}.library-card-top{display:flex;align-items:center;justify-content:space-between;gap:4px}.library-status{color:#f5d788;font-size:7px;font-weight:900;letter-spacing:.04em;white-space:nowrap}.library-status.is-unlocked{color:#a8e0a5}.library-status.is-locked{color:#e8bb8f}.library-card h3{margin:7px 0 1px;color:#fff5d7;font-size:18px}.library-role{color:#b8dba9;font-size:8px;font-weight:900;letter-spacing:.055em}.library-card p{margin:8px 0 0;color:#d6e3d5;font-size:11px;line-height:1.35}.library-card p.library-tradeoff{color:#f2d6a5}.dev-scenario{margin-top:18px;padding:10px;border:1px dashed #a7c6b0;border-radius:10px;text-align:left;background:#0b241caa}.dev-scenario summary{padding:5px 2px;color:#d9e9c5;font-size:12px;font-weight:900;letter-spacing:.04em;cursor:pointer;touch-action:manipulation}.dev-scenario-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:12px}.dev-scenario-fields label{min-width:0;color:#bde0c8;font-size:11px;font-weight:800}.dev-scenario-fields input{display:block;width:100%;min-height:42px;margin-top:5px;padding:5px 7px;border:1px solid #b8d7b6;border-radius:7px;background:#173e30;color:#fff;font:800 16px Trebuchet MS,system-ui,sans-serif}.dev-scenario p{margin:10px 0;color:#c4d9c8;font-size:11px;line-height:1.35}.dev-start-button{width:100%;min-height:48px;border:1.5px solid #f1db99;border-radius:8px;background:#6b5732;color:#fff4d4;font:900 14px Trebuchet MS,system-ui,sans-serif;cursor:pointer;touch-action:manipulation}.hero-skills-button{width:100%;min-height:46px;margin:0 0 9px;border:1.5px solid #a7e6d0;border-radius:9px;background:linear-gradient(#2d6b57,#214c41);color:#e7fff4;font:900 14px Trebuchet MS,system-ui,sans-serif;cursor:pointer;touch-action:manipulation}.hero-skills-button:focus-visible{outline:3px solid #ffe298;outline-offset:2px}.hero-skill-panel{position:absolute;z-index:20;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;padding:calc(12px + var(--safe-top)) 12px calc(12px + var(--safe-bottom));background:#091a14ed;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);touch-action:pan-y}.hero-skill-panel-card{width:min(100%,520px);max-height:100%;overflow:auto;padding:16px;border:2px solid #dfca80;border-radius:16px;background:linear-gradient(160deg,#204c3a,#112a22 78%);box-shadow:0 14px 44px #06140fbd;overscroll-behavior:contain}.hero-skill-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.hero-skill-heading small{color:#c7dcae;font-size:10px;font-weight:900;letter-spacing:.1em}.hero-skill-heading h2{margin:3px 0 4px;color:#ffe8a7;font-size:clamp(20px,5vw,26px);line-height:1.1}.hero-skill-heading p{margin:0;color:#d5e9d8;font-size:12px}.skill-panel-close{flex:0 0 auto;width:36px;height:36px;border:1px solid #b8d0ae;border-radius:50%;background:#315847;color:#fff;font-size:25px;line-height:1;cursor:pointer}.skill-panel-energy{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px;margin:13px 0;color:#c9f4e1;font-size:10px;font-weight:900}.skill-panel-energy div{height:8px;overflow:hidden;border:1px solid #bdd3be;border-radius:8px;background:#081912}.skill-panel-energy i{display:block;height:100%;background:linear-gradient(90deg,#54cce0,#92f3d1)}.skill-loadout,.skill-branch{margin-top:12px;padding:10px;border:1px solid #d7cb8b66;border-radius:11px;background:#173a2d99}.skill-loadout-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.skill-loadout-heading h3{flex:0 0 auto;margin:0;color:#ffe7a5;font-size:14px}.skill-branch h3{margin:0 0 8px;color:#ffe7a5;font-size:14px}.skill-loadout-heading small{min-width:0;max-width:70%;color:#c5d8bc;font-size:9px;font-weight:900;text-align:right;line-height:1.2}.skill-loadout-slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.skill-loadout-slot{min-width:0;min-height:76px;display:grid;grid-template-rows:auto 1fr;gap:5px;padding:7px;border:1px dashed #90ac927a;border-radius:8px;background:#0e281f}.skill-loadout-slot.filled{border-style:solid;border-color:#e4d38e}.skill-loadout-slot.locked{align-content:center;justify-items:center;border-color:#80918855;background:#0a1e18}.skill-slot-top{min-width:0;display:flex;align-items:center;gap:5px}.skill-slot-number{color:#d2dfce;font-size:10px;font-weight:900}.skill-slot-icon{color:#ffe59b;font-size:19px;line-height:1}.skill-slot-copy{min-width:0;display:grid;align-content:start;gap:3px}.skill-loadout-slot strong{min-width:0;overflow:hidden;color:#f2f5e4;font-size:10px;line-height:1.1;text-overflow:ellipsis;white-space:normal;overflow-wrap:anywhere}.skill-loadout-slot small,.skill-slot-empty{color:#b9d2bd;font-size:9px;font-weight:900}.skill-loadout-slot button{flex:0 0 auto;width:24px;height:24px;margin-left:auto;border:1px solid #c9967d;border-radius:50%;background:#603d35;color:#fff1df;font-size:16px;line-height:1;cursor:pointer}.skill-branch-tabs{display:flex;gap:7px;margin-top:12px;overflow-x:auto;padding:2px 1px 8px;scrollbar-width:thin}.skill-branch-tab{flex:0 0 124px;min-height:60px;display:grid;grid-template-columns:31px 1fr;align-items:center;gap:4px;padding:7px;border:1px solid #8fa78b;border-radius:10px;background:#102b22;color:#ebf2dd;font:800 11px Trebuchet MS,system-ui,sans-serif;text-align:left;cursor:pointer;touch-action:manipulation}.skill-branch-tab span{grid-row:span 2;color:#ffe29c;font-size:23px;text-align:center}.skill-branch-tab strong{line-height:1.15}.skill-branch-tab small{color:#a7e6bd;font-size:7px}.skill-branch-tab.selected{border-color:#ffe097;background:#31553b;box-shadow:inset 0 0 0 1px #ffe097}.skill-branch-tab:focus-visible{outline:3px solid #ffe097}.skill-tree-branches{display:grid;grid-template-columns:1fr;gap:7px}.skill-point-summary{margin-left:9px;color:#ffe39a;font-size:10px;font-weight:900}.skill-tree-card{min-width:0;padding:9px;border:1px solid #d7cb8b66;border-radius:11px;background:#173a2d99}.skill-tree-card>header{min-height:28px;display:flex;align-items:baseline;justify-content:space-between;gap:6px;margin-bottom:7px}.skill-tree-card h3{min-width:0;overflow:hidden;margin:0;color:#ffe7a5;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.skill-tree-card>header small{flex:0 0 auto;color:#b9d9c4;font-size:7px;font-weight:900;letter-spacing:.04em}.skill-tree-step{margin-top:9px}.skill-tree-step>small{display:block;margin-bottom:5px;color:#b7d2b8;font-size:9px;font-weight:900;letter-spacing:.09em}.skill-tree-step+.skill-tree-step{border-top:1px solid #a5bf9650;padding-top:9px}.skill-tree-track{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.skill-tree-track:has(.skill-node-tile:only-child){grid-template-columns:1fr}.skill-node-tile{position:relative;min-width:0;min-height:100px;padding:9px 6px 8px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:1.5px solid #829d8b;border-radius:9px;background:linear-gradient(160deg,#173529,#10271f);color:#f3f4df;font-family:Trebuchet MS,system-ui,sans-serif;cursor:pointer;touch-action:manipulation}.skill-node-tile.ready{border-color:#e5cf7d;background:linear-gradient(160deg,#315337,#173527)}.skill-node-tile.learned{border-color:#81d4a5;background:linear-gradient(160deg,#245641,#11372b)}.skill-node-tile.selected,.skill-node-tile:focus-visible{outline:3px solid #ffe69a;outline-offset:1px}.skill-tile-icon{width:34px;height:34px;display:grid;place-items:center;border:1px solid #e2d38e99;border-radius:8px;color:#ffe59b;font-size:22px;line-height:1}.skill-node-tile strong{width:100%;overflow:hidden;color:#fff2c8;font-size:12px;line-height:1.15;text-align:center;text-overflow:ellipsis}.skill-tile-rank{color:#c3d9c6;font-size:9px;font-weight:900;letter-spacing:.04em}.skill-tile-status{max-width:100%;overflow:hidden;color:#d8dfcf;font-size:9px;font-weight:900;text-overflow:ellipsis;white-space:nowrap}.skill-node-tile.ready .skill-tile-status{color:#ffe292}.skill-node-tile.learned .skill-tile-status{color:#9cf0bd}.skill-tile-cost{position:absolute;top:4px;right:4px;padding:2px 4px;border-radius:5px;background:#745534;color:#fff1c5;font-size:9px;font-weight:900}.skill-node-tile:not(.ready):not(.learned) .skill-tile-cost{background:#39483c;color:#bbc4b6}.skill-detail-backdrop{position:absolute;z-index:25;top:0;right:0;bottom:0;left:0;display:flex;align-items:flex-end;justify-content:center;padding:10px 10px calc(10px + var(--safe-bottom));background:#06140fc9}.skill-detail-backdrop[hidden]{display:none}.skill-detail-sheet{width:min(520px,100%);max-height:min(78dvh,690px);overflow:auto;padding:17px;border:1.5px solid #e3ce82;border-radius:18px;background:linear-gradient(155deg,#24523f,#102a22 78%);box-shadow:0 12px 38px #03100bd9;overscroll-behavior:contain}.skill-detail-sheet>header{display:flex;align-items:center;justify-content:space-between;gap:12px}.skill-detail-identity{min-width:0;display:flex;align-items:center;gap:10px}.skill-detail-icon{width:48px;height:48px;flex:0 0 auto;display:grid;place-items:center;border:1.5px solid #e3d18b;border-radius:13px;background:#173b2d;color:#ffe69a;font-size:29px}.skill-detail-identity>div{min-width:0}.skill-detail-identity small{color:#bce2cd;font-size:9px;font-weight:900;letter-spacing:.05em}.skill-detail-identity h3{margin:3px 0 0;overflow-wrap:anywhere;color:#ffe8a8;font-size:21px;line-height:1.1}.skill-detail-close{width:36px;height:36px;flex:0 0 auto;border:1px solid #b8d0ae;border-radius:50%;background:#315847;color:#fff;font-size:24px;line-height:1;cursor:pointer}.skill-detail-description{margin:13px 0;color:#e1eddf;font-size:14px;line-height:1.4}.skill-detail-effect{display:grid;gap:4px;padding:10px;border:1px solid #c6db9c66;border-radius:9px;background:#173d2d}.skill-detail-effect small,.skill-detail-meta small{color:#c9dcae;font-size:9px;font-weight:900;letter-spacing:.07em}.skill-detail-effect strong{color:#fff3cf;font-size:13px;line-height:1.35}.skill-detail-meta{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:9px}.skill-detail-meta>div{min-width:0;display:grid;align-content:start;gap:4px;padding:9px;border-radius:8px;background:#112e24}.skill-detail-meta strong{overflow-wrap:anywhere;color:#e8eedf;font-size:11px;line-height:1.3}.skill-detail-actions{display:grid;gap:8px;margin-top:13px}.skill-detail-buy,.skill-detail-equip{width:100%;min-height:48px;padding:7px 12px;border:1.5px solid #f1dc98;border-radius:10px;background:linear-gradient(#98683d,#70462d);color:#fff5d6;font:900 14px Trebuchet MS,system-ui,sans-serif;cursor:pointer;touch-action:manipulation}.skill-detail-buy:disabled{border-color:#879187;background:#35463c;color:#bfc9bc;cursor:default}.skill-detail-equip{border-color:#b8dbad;background:linear-gradient(#447b53,#315e42)}.skill-detail-equip.is-equipped{border-color:#d0a38c;background:linear-gradient(#714d42,#57382f)}.skill-detail-learned{padding:12px;border:1px solid #82d3a1;border-radius:9px;color:#a6f0c2;font-size:12px;font-weight:900;text-align:center}.skill-replace{display:grid;gap:7px}.skill-replace>strong{color:#fff0c4;font-size:12px}.skill-replace>small{margin-top:-4px;color:#cadbc8;font-size:10px}.skill-replace-option{min-height:40px;padding:7px 9px;border:1px solid #dfd08c;border-radius:8px;background:#375b42;color:#fff3d1;font:800 11px Trebuchet MS,system-ui,sans-serif;cursor:pointer}.skill-panel-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px}.skill-panel-footer p{margin:0;color:#c4d9c6;font-size:9px}.skill-panel-footer>div{display:flex;align-items:center;gap:8px}.skill-panel-footer>div>small{color:#c4d9c6;font-size:8px;font-weight:900;white-space:nowrap}.skill-respec-button{min-height:34px;padding:0 10px;border:1px solid #e2c79a;border-radius:7px;background:#66463a;color:#fff0d7;font:900 10px Trebuchet MS,system-ui,sans-serif;cursor:pointer}.start-main[hidden]{display:none}.dev-start-button:focus-visible,.dev-scenario-fields input:focus-visible{outline:3px solid #ffe298;outline-offset:2px}@media(max-width:650px){#game{max-width:none;max-height:none;box-shadow:none}}@media(max-width:500px){.library-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.library-card{padding:7px}.skill-tree-branches{grid-template-columns:1fr}}.hud-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:5;pointer-events:none;font-family:Trebuchet MS,system-ui,sans-serif;color:#f7f7e9;-webkit-font-smoothing:antialiased}.hud-overlay[hidden],.hud-overlay [hidden]{display:none!important}.hud-overlay.learning-paused:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:6;background:#07140b66;pointer-events:auto}.hud-header{position:absolute;top:calc(14px + var(--safe-top));left:14px;right:14px;min-height:66px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) 38px;align-items:center;gap:3px;padding:6px 7px 6px 14px;border:1.5px solid #d6c889ab;border-radius:12px;background:#112b22ed;box-shadow:0 5px 22px #07180f70,inset 0 1px #ffffff1f;pointer-events:auto}.hud-stat{min-width:0}.hud-stat .hud-primary{font-size:clamp(14px,4vw,20px);font-weight:900;line-height:1.2;white-space:nowrap}.hud-stat .hud-secondary{margin-top:2px;font-size:10px;font-weight:800;white-space:nowrap}.hud-gold .hud-primary{color:#ffe38b}.hud-gold .hud-secondary{color:#f4b0a1}.hud-health{text-align:center}.hud-health .hud-primary{color:#9bf1ad}.hud-health .hud-secondary,.hud-wave .hud-secondary{color:#f6dc98}.hud-wave{text-align:right}.hud-gear{width:40px;height:40px;border:1.5px solid #e6d289;border-radius:50%;background:#23493b;color:#ffe9a6;font-size:25px;line-height:1;cursor:pointer;touch-action:manipulation}.hud-actions{position:absolute;top:calc(94px + var(--safe-top));left:12px;right:12px;display:flex;justify-content:space-between;pointer-events:none}.hud-actions button{width:min(156px,43%);min-height:52px;border:1.5px solid #ead491;border-radius:9px;box-shadow:0 4px 13px #09191075,inset 0 1px #ffffff30;color:#fff7e5;cursor:pointer;pointer-events:auto;touch-action:manipulation}.hud-actions strong{display:block;font-size:13px;font-weight:900;white-space:nowrap}.hud-actions small{display:block;margin-top:3px;font-size:10px;font-weight:800;color:#ffe28b;white-space:nowrap}.hud-next{background:#986237}.hud-train{background:#275343}.hud-actions button:active,.hud-option:active,.hud-gear:active{filter:brightness(1.2);transform:translateY(1px)}.hud-focus{position:absolute;top:calc(154px + var(--safe-top));right:12px;z-index:3;min-height:42px;padding:0 13px;border:1.5px solid #ead491;border-radius:9px;background:#235343ef;box-shadow:0 4px 13px #09191075;color:#fff7df;font:900 12px Trebuchet MS,system-ui,sans-serif;letter-spacing:.02em;cursor:pointer;pointer-events:auto;touch-action:manipulation}.hud-minimap{position:absolute;left:12px;bottom:calc(12px + var(--safe-bottom));width:132px;padding:8px;border:1.5px solid #d8c990;border-radius:13px;background:#112b22f2;box-shadow:0 5px 18px #07170f80;pointer-events:auto;transition:bottom .15s ease}.hud-skills{position:absolute;z-index:2;right:12px;bottom:calc(12px + var(--safe-bottom));width:min(350px,calc(100% - 160px));padding:8px;border:1.5px solid #d8c990;border-radius:12px;background:#112b22f2;box-shadow:0 5px 18px #07170f80;pointer-events:auto;transition:bottom .15s ease}.hud-skills[data-count="1"]{width:min(190px,calc(100% - 160px))}.hud-skills[data-count="2"]{width:min(270px,calc(100% - 160px))}.hud-skills[hidden]{display:none}.hud-energy-label{margin-bottom:4px;color:#f5e4a2;font-size:10px;font-weight:900;text-align:right}.hud-energy-track{height:6px;margin-bottom:7px;overflow:hidden;border:1px solid #b9d6c3;border-radius:6px;background:#071a16}.hud-energy-track i{display:block;height:100%;background:linear-gradient(90deg,#54cce0,#92f3d1);transition:width .12s linear}.hud-skill-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.hud-skill-buttons button{min-width:0;min-height:66px;padding:4px 2px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:2px;border:1px solid #d6c889;border-radius:8px;background:#29503e;color:#fff4d4;cursor:pointer;touch-action:manipulation}.hud-skill-buttons button:disabled{opacity:.55;cursor:default}.hud-skill-icon{font-size:20px;line-height:1;color:#ffe494}.hud-skill-buttons strong{width:100%;overflow:hidden;color:#fff;font-size:10px;line-height:1.1;text-align:center;text-overflow:ellipsis;white-space:nowrap}.hud-skill-buttons small{color:#cbe6d4;font-size:8px;font-weight:900;white-space:nowrap}.hud-skills button:focus-visible{outline:3px solid #ffe298;outline-offset:2px}.hud-overlay.prompt-open .hud-minimap,.hud-overlay.prompt-open .hud-skills{bottom:calc(var(--prompt-height, 112px) + 28px + var(--safe-bottom))}.hud-minimap strong{display:block;margin:0 0 5px;font-size:11px;font-weight:900;color:#e7f3dc;letter-spacing:.02em;white-space:nowrap}.hud-minimap strong.incoming{color:#ffb3a4}.hud-minimap canvas{display:block;width:112px;height:112px;border:1px solid #b4d09f;border-radius:3px;touch-action:none;cursor:move}.learning-coach,.learning-guide{position:absolute;z-index:8;left:50%;width:min(460px,calc(100% - 28px));padding:18px 20px;border:1.5px solid #e4cd7c;border-radius:12px;background:#15372dec;box-shadow:0 8px 28px #07170f99,inset 0 1px #ffffff24;transform:translate(-50%);pointer-events:auto}.learning-coach{top:calc(220px + var(--safe-top));display:grid;grid-template-columns:78px minmax(0,1fr);align-items:start;gap:16px}.learning-coach-art{width:78px;height:78px;display:grid;place-items:center;border:2px solid #f1d98b;border-radius:22px;background:radial-gradient(circle at 35% 28%,#628b55,#284f3a 70%);box-shadow:inset 0 1px #fff5,0 4px 12px #07170f66;font-size:46px;line-height:1}.learning-coach-art img,.learning-guide-icon img,.wave-intel-art img{max-width:100%;max-height:100%;object-fit:contain;filter:drop-shadow(0 4px 5px #06140ca8)}.learning-coach-art img{width:72px;height:72px}.learning-coach-copy{min-width:0}.learning-coach-heading,.learning-guide-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.learning-coach-heading strong,.learning-guide-heading strong{color:#ffe7a5;font-size:20px;font-weight:900;line-height:1.2}.learning-coach-heading button,.learning-guide-heading button{width:30px;height:30px;border:1px solid #a9c6a7;border-radius:50%;background:#315847;color:#fff;font:700 21px/1 Trebuchet MS,system-ui,sans-serif;cursor:pointer}.learning-coach p{margin:9px 0 10px;color:#edf4e4;font-size:17px;line-height:1.45}.learning-coach-copy>small{display:inline-block;padding:5px 8px;border:1px solid #c5d9a57a;border-radius:20px;color:#d9e9c4;font-size:10px;font-weight:900;letter-spacing:.08em}.learning-coach-continue,.wave-intel-continue{display:block;min-height:42px;margin-top:12px;padding:0 18px;border:1px solid #ffe69b;border-radius:9px;background:linear-gradient(#a9703b,#80502e);box-shadow:inset 0 1px #fff4,0 3px 8px #06140c66;color:#fff8df;font:900 14px Trebuchet MS,system-ui,sans-serif;letter-spacing:.04em;cursor:pointer}.learning-coach[data-required=true]{width:min(620px,calc(100% - 28px));grid-template-columns:100px minmax(0,1fr);padding:22px 24px;border-width:2px;box-shadow:0 12px 36px #07170fc2,inset 0 1px #ffffff30}.learning-coach[data-required=true] .learning-coach-art{width:100px;height:100px;border-radius:25px}.learning-coach[data-required=true] .learning-coach-art img{width:94px;height:94px}.learning-coach[data-required=true] .learning-coach-heading strong{font-size:24px}.learning-coach[data-required=true] .learning-coach-heading button{width:36px;height:36px;font-size:25px}.learning-coach[data-required=true] .learning-coach p{font-size:19px;line-height:1.45}.learning-guide{top:calc(220px + var(--safe-top));max-height:calc(100% - 242px - var(--safe-top));overflow:auto}.learning-guide-intro{margin:10px 0 2px;color:#dbe9d7;font-size:13px;line-height:1.4}.learning-guide-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 0;border-top:1px solid #ffffff20}.learning-guide-icon{width:38px;height:38px;display:grid;place-items:center;flex:0 0 auto;border:1px solid #e4cf8c88;border-radius:11px;background:#254735;font-size:23px}.learning-guide-copy{display:grid;gap:3px;min-width:0}.learning-guide-copy strong{color:#f2f2df;font-size:14px}.learning-guide-copy small{color:#b9d3ad;font-size:9px;font-weight:900;letter-spacing:.06em}.learning-guide-row button{flex:0 0 auto;min-height:34px;padding:0 10px;border:1px solid #ddcf8e;border-radius:7px;background:#385f47;color:#fff5d8;font:900 10px Trebuchet MS,system-ui,sans-serif;cursor:pointer}.learning-guide-icon img{width:34px;height:34px}.wave-intel{position:absolute;z-index:9;top:calc(220px + var(--safe-top));left:50%;width:min(520px,calc(100% - 28px));padding:16px 18px 18px;border:2px solid #f0d783;border-radius:16px;background:linear-gradient(145deg,#173f30f5,#102b23f5);box-shadow:0 12px 36px #06150fd4,inset 0 1px #ffffff30;transform:translate(-50%);pointer-events:auto;animation:wave-intel-in .24s cubic-bezier(.2,.8,.2,1) both}.wave-intel-kicker{color:#f8dc93;font-size:12px;font-weight:900;letter-spacing:.15em}.wave-intel>button{position:absolute;top:10px;right:11px;width:34px;height:34px;border:1px solid #b7cba8;border-radius:50%;background:#315847;color:#fff;font:800 23px/1 Trebuchet MS,system-ui,sans-serif;cursor:pointer}.wave-intel-content{display:grid;grid-template-columns:96px minmax(0,1fr);align-items:center;gap:17px;margin-top:12px}.wave-intel-art{width:96px;height:96px;display:grid;place-items:center;overflow:hidden;border:2px solid #e8d38f;border-radius:20px;background:radial-gradient(circle at 40% 30%,#6d8e51,#244633 72%)}.wave-intel-art img{width:90px;height:90px}.wave-intel-title{display:block;padding-right:32px;color:#ffe7a5;font-size:22px;font-weight:900;line-height:1.15}.wave-intel-body{margin:8px 0 9px;color:#f1f4e6;font-size:16px;line-height:1.4}.wave-intel-content small{color:#c8ddb8;font-size:9px;font-weight:900;letter-spacing:.09em}.wave-intel-continue{min-height:38px;padding:0 14px}@keyframes wave-intel-in{0%{opacity:0;transform:translate(-50%,8px) scale(.98)}to{opacity:1;transform:translate(-50%) scale(1)}}@media(max-width:420px){.learning-coach{grid-template-columns:56px minmax(0,1fr);gap:12px;padding:14px}.learning-coach[data-required=true]{grid-template-columns:64px minmax(0,1fr);gap:12px;padding:16px}.learning-coach[data-required=true] .learning-coach-art{width:64px;height:64px;border-radius:17px}.learning-coach[data-required=true] .learning-coach-art img{width:60px;height:60px}.learning-coach[data-required=true] .learning-coach-heading strong{font-size:19px}.learning-coach[data-required=true] .learning-coach p{font-size:16px}.learning-coach-art{width:56px;height:56px;border-radius:16px;font-size:34px}.learning-coach-heading strong{font-size:17px}.learning-coach p{font-size:15px}.wave-intel{padding:14px}.wave-intel-content{grid-template-columns:68px minmax(0,1fr);gap:11px}.wave-intel-art{width:68px;height:68px;border-radius:15px}.wave-intel-art img{width:64px;height:64px}.wave-intel-title{font-size:18px}.wave-intel-body{font-size:14px}}.hud-prompt{position:absolute;left:12px;right:12px;bottom:calc(12px + var(--safe-bottom));max-width:516px;z-index:4;margin:0 auto;padding:12px;border:2px solid #e1cc86;border-radius:16px;background:linear-gradient(165deg,#21493a,#10281f 78%);box-shadow:0 14px 34px #07150ec7,inset 0 1px #ffffff25;pointer-events:auto;touch-action:manipulation}.hud-prompt-heading{min-height:35px;display:flex;align-items:center;justify-content:center;padding:0 38px;margin-bottom:10px}.hud-prompt-heading strong{text-align:center;font-size:clamp(14px,4vw,18px);line-height:1.2;font-weight:900;color:#fff7df}.hud-prompt-heading button{position:absolute;top:8px;right:8px;width:36px;height:36px;border:1.5px solid #b6d3b4;border-radius:50%;background:#355847;color:#fff;font-size:24px;line-height:1;cursor:pointer}.hud-prompt-rows{display:grid;gap:7px;max-height:min(42vh,360px);overflow-y:auto;overscroll-behavior:contain}.hud-prompt-row{display:grid;gap:7px}.hud-option{min-width:0;min-height:56px;padding:6px 3px;border:1.5px solid #96d69b;border-radius:8px;background:#315d46;color:#fff;cursor:pointer;touch-action:manipulation}.hud-option strong{display:block;font:900 clamp(11px,3.3vw,15px)/1.1 "Trebuchet MS",system-ui,sans-serif;overflow-wrap:anywhere}.hud-option small{display:block;margin-top:4px;font:800 10px/1.15 Trebuchet MS,system-ui,sans-serif;color:#ffe38e;overflow-wrap:anywhere}.hud-option.danger{background:#805044;border-color:#e8ae87}.hud-option:disabled{background:#344940;border-color:#74877a;color:#bac7ba;cursor:default}.hud-option:disabled small{color:#c4c6a6}.end-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:11;display:grid;place-items:center;padding:calc(16px + var(--safe-top)) 16px calc(16px + var(--safe-bottom));background:#0a211ae9;backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);overflow-y:auto;touch-action:pan-y}.end-card{width:min(100%,390px);padding:24px 20px 20px;border:2px solid #e5c979;border-radius:20px;background:linear-gradient(165deg,#214a39,#122e25 76%);box-shadow:0 20px 70px #06140ebf,inset 0 1px #ffffff30;font-family:Trebuchet MS,system-ui,sans-serif}.end-card h1{margin:0 0 20px;color:#ffe29a;font-size:clamp(25px,7vw,31px);line-height:1.1;text-align:center}.end-stats{display:grid;grid-template-columns:1fr auto;gap:9px 10px;margin:0 0 24px;font-size:14px}.end-stats dt{color:#bcd8c2}.end-stats dd{margin:0;color:#fff5df;font-weight:900;text-align:right}.end-card button{width:100%;min-height:58px;border:2px solid #d8edb4;border-radius:10px;background:#508e58;color:#fff;font:900 17px Trebuchet MS,system-ui,sans-serif;cursor:pointer;touch-action:manipulation}.end-card button:active{background:#69a46a}.end-card .end-retry-button{margin-bottom:10px;border-color:#e3d28b;background:#376b55;color:#ffe8a6}.hud-banner{position:absolute;top:calc(151px + var(--safe-top));left:18px;right:18px;max-width:480px;margin:0 auto;white-space:pre-line;text-align:center;font:900 clamp(16px,5vw,22px)/1.2 "Trebuchet MS",system-ui,sans-serif;text-shadow:0 2px 0 #173126,0 0 7px #092019,2px 0 #173126,-2px 0 #173126;pointer-events:none}.hud-banner.show{animation:banner-appear .22s ease-out both}@keyframes banner-appear{0%{opacity:0;transform:translateY(7px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}
