@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=DM+Sans:wght@400;500;600;700&display=swap');
:root{color-scheme:dark;font-family:"DM Sans",sans-serif;color:#f4eede;background:#111b22}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer;border:1px solid #ffffff25;color:#f4eede;background:#21313b;border-radius:8px;padding:10px 15px;font-weight:600;transition:background .15s,transform .15s}button:hover{background:#354952;transform:translateY(-1px)}button:disabled{opacity:.42;cursor:default;transform:none}button:focus-visible,select:focus-visible{outline:2px solid #f5c75d}#game{height:100dvh;min-height:600px;position:relative;overflow:hidden}canvas{width:100%;height:100%;display:block}header{position:absolute;top:0;left:0;right:0;padding:24px 30px;display:flex;justify-content:space-between;align-items:center;background:linear-gradient(#101c25cf,transparent);pointer-events:none}header>*{pointer-events:auto}#brand{display:flex;gap:12px;color:#f6ce71;text-decoration:none;align-items:center;font-size:40px}#brand span{font:800 28px "Barlow Condensed";letter-spacing:2px}small{display:block;font-size:10px;letter-spacing:1.5px;color:#bac5c4}#brand small{font:600 9px "DM Sans";margin-top:2px}.stats{display:flex;gap:40px}.stats strong{font:700 30px "Barlow Condensed";font-variant-numeric:tabular-nums}.stats small{font-size:9px;margin-bottom:2px}#gold{color:#f5cc69}#status{position:absolute;left:30px;top:120px;width:240px}#diffBadge,.eyebrow{font-size:10px;letter-spacing:2px;color:#efb782;font-weight:700}h1,h2,p{margin:0}#status h1{font:700 36px "Barlow Condensed";margin:8px 0}#status p{font-size:12px;color:#d4ded6;margin-bottom:14px}.health{height:7px;background:#172c2fcc;border-radius:8px;overflow:hidden}.health i{display:block;height:100%;background:#8bde9d;width:100%;transition:width .15s}#healthText{font-size:10px;display:block;margin-top:6px;color:#dce4d7}#upgrades{position:absolute;right:28px;top:112px;width:265px;padding:17px;background:#14242cf2;border:1px solid #ffffff12;border-radius:13px;box-shadow:0 15px 40px #10181b33}.panelHead{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}h2{font:600 22px "Barlow Condensed"}.panelHead button{padding:2px 9px}.upgrade{width:100%;text-align:left;display:grid;grid-template-columns:1fr auto;gap:2px;padding:10px 11px;margin-top:5px;border-color:#6c8b8b22;background:#25383b}.upgrade .name{font-size:12px}.upgrade .cost{color:#f3cb70;font-size:12px}.upgrade small{grid-column:1/-1;font-size:10px;letter-spacing:0;color:#c1cfca;font-weight:400}.upgrade .level{color:#85c6b3;font-size:10px}.upgrade.selected{background:#334e45;border-color:#bfce7b}.health,.upgrade,button{user-select:none}#decisions{position:absolute;left:30px;bottom:100px;max-width:390px;background:#14242cdc;padding:14px 18px;border-radius:10px;border:1px solid #ffffff12}#decisions b{font-size:9px;letter-spacing:1.8px;color:#addbbd}.liveDot{display:inline-block;width:6px;height:6px;background:#a5eab6;border-radius:50%;margin-right:8px}#decisions p{font-size:12px;line-height:1.6;margin-top:5px;color:#e0e8df}footer{position:absolute;bottom:0;left:0;right:0;padding:22px 30px;display:flex;justify-content:space-between;align-items:center;background:linear-gradient(transparent,#101c25ed)}.controls{display:flex;gap:7px}.controls button{font-size:11px;padding:9px 12px}.help{font-size:10px;color:#ced7d2}#waveBtn,.primary{background:#f0c364;color:#252c24;border-color:#f5d790;box-shadow:0 4px 0 #8b6a35}#waveBtn:hover,.primary:hover{background:#ffda87}#veil{position:absolute;inset:0;background:#0a1727a8;backdrop-filter:blur(8px);display:flex;align-items:center;justify-content:center}.modal{width:480px;max-height:95%;overflow:auto;background:#162a34f5;border:1px solid #5c777e;border-radius:20px;padding:34px 40px;box-shadow:0 20px 100px #07141f99}.modal>h1{font:800 74px/.95 "Barlow Condensed";letter-spacing:-1px;margin:12px 0 16px}.modal>h1 span{color:#efc56b}.intro{color:#ced9d2;font-size:14px;line-height:1.6}.menuOptions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:22px 0}.menuOptions label{font-size:10px;color:#bac8c9}.menuOptions label:last-child{grid-column:1/-1}select,input{display:block;width:100%;padding:9px;background:#263e48;color:#f5efdf;border:1px solid #65808666;border-radius:6px;margin-top:5px}.modal>button{display:block;width:100%;margin-top:11px}.hint{font-size:11px;line-height:1.65;color:#afc3c4;margin-top:22px}details{margin-top:18px;color:#bbceca;font-size:11px}summary{cursor:pointer}.admin{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0}.admin button{font-size:10px}details p{line-height:1.6}#menuMessage{font-size:11px;color:#e8ca85;margin-top:10px}#resultTime{color:#f1c770}#resultStats{color:#dce7df}#best{font-size:12px;color:#a7c7bb;margin:12px 0}#recap{font-size:11px;line-height:1.8;color:#c4d2cc;max-height:130px;overflow:auto}[hidden]{display:none!important}.hudOff header,.hudOff footer,.hudOff #status,.hudOff #upgrades,.hudOff #decisions{display:none}@media(max-width:1000px){.help{display:none}.stats{gap:20px}#upgrades{width:230px;right:16px}header{padding:16px}#status{left:18px;width:180px}.stats strong{font-size:25px}#brand span{font-size:23px}footer{padding:15px}#decisions{left:18px;max-width:300px}}@media(max-width:680px){#brand small{display:none}.stats{gap:10px}#brand span{font-size:17px}#brand{font-size:26px;gap:5px}.stats strong{font-size:21px}.stats small{font-size:7px}#status{top:85px;width:140px}#status h1{font-size:26px}#upgrades{top:205px;width:190px;max-height:43%;overflow:auto;padding:10px}.upgrade{padding:7px}.upgrade small{font-size:9px}#decisions{bottom:108px;max-width:175px;padding:10px}footer{align-items:end}.controls{flex-wrap:wrap;max-width:180px}.modal{width:94%;padding:26px}.modal>h1{font-size:60px}#game{min-height:620px}}

/* Readable game HUD at 1920 x 1080. */
#status{padding:16px;background:#14242cde;border:1px solid #ffffff15;border-radius:12px;width:260px}#status p,#healthText{font-size:13px}.upgrade .name,.upgrade .cost{font-size:14px}.upgrade small{font-size:12px}.upgrade .level{font-size:12px}#decisions p{font-size:14px}.controls button,.menuOptions label,.hint,details{font-size:13px}.help{font-size:12px}.stats small{font-size:12px}.intro{font-size:16px}

/* Prototype 02 — the last bastion. */
:root{background:#101c25;color:#f2e9d5}button{border-radius:5px;background:#20323c;border-color:#69818b55}button:hover{background:#36515c;border-color:#a2b7ab}header{padding:22px 30px;background:linear-gradient(#0a1722f5,#0a1722a8,transparent)}#brand{gap:13px}#brand span{font-size:30px;letter-spacing:2.5px}#brand small{color:#a4bab7;letter-spacing:1.6px;font-size:10px}.stats{gap:32px}.stats strong{font-size:32px}.stats small{font-size:10px;color:#b6c5bd}#alive{color:#ed997c}#status{top:124px;width:248px;background:#11242ae8;box-shadow:0 10px 30px #101b2230;border-radius:7px;border-left:3px solid #d0ac66;padding:19px}#status h1{font-size:34px}#status p{color:#c0cdbf;font-size:13px;line-height:1.5}#upgrades{top:124px;width:255px;background:#11242af0;border-radius:7px;padding:15px;border-top:2px solid #bca471}h2{font-size:24px}.panelHead{margin-bottom:13px}.upgrade{padding:10px 9px;border-radius:4px;margin-top:5px;background:#21363c}.upgrade .name{font-size:13px}.upgrade .cost{font-size:13px}.upgrade small{font-size:11px;color:#b4c7ba}.upgrade:disabled{opacity:.66}.upgrade .level{font-size:11px;color:#9ab7aa}#decisions{border-radius:5px;border-left:2px solid #85ad95;background:#10252be8;max-width:390px}#decisions p{font-size:13px}footer{padding:22px 30px;background:linear-gradient(transparent,#0c1c26ef)}#waveBtn,.primary{background:#d8b873;border-color:#f2d59c;color:#202f32;box-shadow:0 3px 0 #6a593d}#veil{background:#0a1825bb;backdrop-filter:blur(5px)}.modal{width:510px;border-radius:10px;border-color:#7b8f83;background:linear-gradient(140deg,#233b43f8,#102631fa);box-shadow:0 25px 100px #030f18aa;padding:38px}.modal>h1{font-size:78px;letter-spacing:1px}.eyebrow{color:#d7b883}.intro{font-size:16px}.menuOptions label{font-size:12px}.hint,details{font-size:12px;line-height:1.7}.admin button{font-size:12px}#hordeBtn{border-color:#b68d59;color:#f1ce8b}#renderStats{color:#a4beb2;font-variant-numeric:tabular-nums}
@media(max-width:1000px){.stats{gap:14px}.stats strong{font-size:26px}#brand span{font-size:23px}.stats small{font-size:8px}}
@media(max-width:680px){.stats>div:last-child{display:none}#status{top:90px;left:12px;width:170px;padding:12px}#status h1{font-size:26px}#upgrades{top:90px;right:12px;width:190px;max-height:55%}.upgrade .name,.upgrade .cost{font-size:12px}#brand span{font-size:17px}.stats strong{font-size:22px}#decisions{max-width:220px}header{padding:12px}}

#pauseBadge{position:absolute;bottom:98px;left:50%;transform:translateX(-50%);background:#11242af2;border:1px solid #bba675;padding:12px 24px;border-radius:5px;color:#f0d59b;pointer-events:none;font-size:14px;letter-spacing:.5px}#bossHud{position:absolute;top:105px;left:50%;transform:translateX(-50%);width:360px;padding:12px 18px;background:#281e2bec;border:1px solid #a36d79;border-radius:5px}#bossHud span{font-size:11px;letter-spacing:2px;color:#e0a0a3}#bossHealth{float:right;font-size:11px;color:#dbc4bf}#bossHud .health{height:5px;margin-top:10px}#bossFill{background:#d1878b}#dangerVignette{position:absolute;inset:0;pointer-events:none;transition:box-shadow .2s}#dangerVignette.danger{box-shadow:inset 0 0 100px #b02d3470}button[aria-pressed="true"]{border-color:#b4d4ae;background:#37584e}input[aria-invalid="true"]{border-color:#e18573}.hudOff #bossHud,.hudOff #pauseBadge,.hudOff #dangerVignette{display:none}@media(max-width:1000px){#bossHud{top:83px;width:270px}}

/* Arcane Arsenal: one earned point per cleared wave. */
.techCounter{padding:0 14px;text-align:left;border:1px solid #91b9c34d;background:#1b374150;min-width:92px}.techCounter strong{color:#a9e5ee}.techCounter.hasPoints{border-color:#e9cb82;box-shadow:0 0 16px #e1bd4d22}.stats{gap:24px}#weaponsHud{position:absolute;left:30px;top:345px;width:248px;padding:16px 18px;background:#10252bea;border:1px solid #9ab0a32b;border-radius:6px}#weaponsHud>small{font-size:10px;color:#a9caca}#weaponsHud h2{font-size:25px;margin-top:5px}#weaponCount{font-size:12px;color:#b3c7b9;line-height:1.5;margin:7px 0}#weaponIcons{display:flex;flex-wrap:wrap;gap:9px;font-size:24px;min-height:10px}#researchBtn{margin-top:10px;width:100%;font-size:12px;padding:8px}.hudOff #weaponsHud{display:none}#techPanel{width:1180px;max-width:95vw;max-height:91dvh;padding:28px 32px;background:linear-gradient(130deg,#192f3afc,#0f202bfc);border-color:#779a9e}#techPanel .techTop{display:flex;align-items:center;justify-content:space-between;gap:25px}#techPanel h1{font:700 42px "Barlow Condensed";margin:5px 0;color:#f5e5bf}.techBank{text-align:right}.techBank>strong{font:700 38px "Barlow Condensed";color:#b0ebed}.techBank>span{font-size:11px;letter-spacing:1px;margin-left:10px;color:#b8d0c7}.techBank>small{font-size:11px;letter-spacing:0;color:#a8beb7}.techTop button{align-self:flex-start;font-size:12px}#researchHelp{font-size:14px;line-height:1.6;color:#b5cbc6;margin:16px 0 20px;max-width:940px}.techLayout{display:grid;grid-template-columns:290px 1fr;gap:28px}#techModes{display:grid;gap:5px;align-content:start}.treeTab{display:grid;grid-template-columns:36px 1fr 28px;gap:9px;align-items:center;text-align:left;padding:9px 10px;background:#19343d;border-color:#97b1ae1c;font-size:14px}.treeTab small{font-size:11px;letter-spacing:0;color:#9bb7ac;line-height:1.5;margin-top:2px}.treeTab b{font-size:11px;color:#a7bfb4}.schoolIcon{color:var(--school);font-size:28px;text-align:center}.treeTab.selected{border-color:var(--school);background:#2a424b}.treeTab.learned b{color:var(--school)}#treeHeader{position:static;display:flex;align-items:center;justify-content:start;gap:18px;padding:15px 20px;background:#243d4866;border-bottom:2px solid var(--school);pointer-events:auto;margin-bottom:20px}#treeIcon{font-size:46px;color:var(--school)}#treeHeader h2{font:700 32px "Barlow Condensed";color:#f0e5cc}#treeRole{font-size:13px;color:#b4cbbd;margin-top:4px}#techNodes{display:grid;grid-template-columns:1fr 1fr;gap:18px;position:relative}.techNode{position:relative;display:flex;flex-direction:column;gap:8px;text-align:left;min-height:152px;padding:17px;background:#243944;border:1px solid #68848b77;border-top:3px solid var(--school);border-radius:6px}.techNode.unlock{grid-column:1/-1;min-height:115px}.techNode small{font-size:10px;letter-spacing:1.5px;color:#a8c6c4}.techNode strong{font:600 23px "Barlow Condensed";color:#e9e2cf}.techNode p{font-size:13px;color:#b6c9c3;line-height:1.5}.techNode>span{font-size:10px;letter-spacing:.5px;margin-top:auto;padding-top:7px;color:#b9c7b9}.techNode:disabled{opacity:.65}.techNode.learned{opacity:1;background:#2a4547;border-color:var(--school)}.techNode.learned>span{color:var(--school)}.techNode.available{box-shadow:inset 0 0 22px #b3dab40c;border-color:var(--school)}.techNode.power:before,.techNode.control:before,.techNode.overload:before,.techNode.dominion:before{content:"";position:absolute;top:-19px;height:16px;width:1px;background:#88a3a0;left:50%}.treeFoot{font-size:12px;line-height:1.6;color:#9db9b1;margin:15px 0 0}.labLabel{display:block;width:100%;font-size:12px}.labLabel select{font-size:12px;padding:8px}#labBtn{border-color:#8f8bc5;color:#d4c7f3}
@media(max-width:1100px){.stats{gap:10px}.stats strong{font-size:27px}.techCounter{min-width:75px;padding:0 8px}.techLayout{grid-template-columns:230px 1fr;gap:18px}#techPanel{padding:22px}.treeTab{font-size:12px;grid-template-columns:28px 1fr 24px}#weaponsHud{left:18px;width:205px}}@media(max-width:760px){#weaponsHud{top:auto;bottom:200px;left:12px;width:175px;padding:10px}#weaponsHud h2{font-size:20px}.techLayout{grid-template-columns:1fr}#techModes{grid-template-columns:1fr 1fr}.treeTab small{display:none}#techPanel .techTop{gap:10px;flex-wrap:wrap}#techPanel h1{font-size:32px}.techBank>strong{font-size:30px}.techNode{padding:12px;min-height:160px}.techNode p{font-size:12px}.stats>div:last-child{display:none}.techCounter small{font-size:7px!important}.techCounter{min-width:58px}.techCounter strong{font-size:22px}}

#weaponTelemetry{font-size:12px;color:#aac8bf;line-height:1.6;margin:-8px 0 16px;font-variant-numeric:tabular-nums}

/* Ranked builds keep foundations and both deep branches readable. */
#techPanel .techLayout>article{max-height:calc(91dvh - 200px);overflow:auto;padding-right:8px}#techNodes{gap:14px}.techNode{min-height:132px;padding:13px 16px}.techNode.unlock,.techNode.mastery,.techNode.keystone{grid-column:1/-1;min-height:105px}.techNode.mastery{border-top-width:4px}.techNode.keystone{background:#3a3346;border-color:#c0a0d3}.techNode.maxed{box-shadow:inset 0 0 20px #a6d6b014}.techNode small{font-size:11px}.techNode>span{font-size:10px;line-height:1.5}.techNode.velocity:before,.techNode.tempo:before,.techNode.mastery:before,.techNode.keystone:before{content:"";position:absolute;top:-15px;height:12px;width:1px;background:#88a3a0;left:50%}@media(max-width:760px){#techPanel .techLayout>article{max-height:none;overflow:visible}.techNode{min-height:160px}}

/* Combat feedback and commander planning. */
#damageLayer{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:4}.damageNumber{position:absolute;left:0;top:0;font:800 18px 'DM Sans',sans-serif;color:#fff2ce;text-shadow:0 2px 2px #111,1px 0 #111,-1px 0 #111;will-change:transform;white-space:nowrap}.damageNumber.dot{color:#c1e799;font-size:15px}.damageNumber.shield{color:#82dcff}.damageNumber.heal{color:#82f5aa}
#decisions{width:370px;max-width:calc(100vw - 40px);bottom:96px;padding:15px 18px;border-left:3px solid #8fbea0}#planTitle{font:600 22px 'Barlow Condensed';margin:7px 0 3px}#decisions #decision{font-size:12px;line-height:1.5}#planFunds{font-size:10px;letter-spacing:.4px;margin-top:10px;color:#e2c58c}.planMeter{height:4px;background:#081c2580;border-radius:4px;margin-top:6px;overflow:hidden}.planMeter i{display:block;height:100%;width:0;background:#dcc27f;transition:width .2s}#decisions #planResearch{font-size:11px;color:#9bd9df;line-height:1.5;margin-top:9px}
#upgradeAlerts{position:absolute;right:310px;top:125px;width:290px;display:flex;flex-direction:column;gap:9px;pointer-events:none;z-index:8}.upgradeAlert{background:linear-gradient(120deg,#203a3ff5,#112630f5);border:1px solid #d8bf784d;border-left:4px solid #dec47d;border-radius:6px;padding:13px 16px;box-shadow:0 6px 25px #0005;animation:alertIn .25s ease-out}.upgradeAlert small{font-size:9px;letter-spacing:1.6px;color:#e3c785}.upgradeAlert strong{display:block;margin-top:4px;font:700 24px 'Barlow Condensed'}.upgradeAlert p{font-size:11px;color:#c7d7cf;margin-top:4px}.upgradeAlert.research{border-left-color:#8bdae7}.upgradeAlert.research small{color:#8bdae7}@keyframes alertIn{from{opacity:0;transform:translateX(24px)}to{opacity:1;transform:none}}.hudOff #damageLayer,.hudOff #upgradeAlerts{display:none}@media(max-width:1000px){#upgradeAlerts{right:255px;top:100px;width:230px}#decisions{width:300px}}@media(max-width:680px){#upgradeAlerts{right:16px;top:82px;width:210px}.upgradeAlert{padding:9px 12px}.upgradeAlert strong{font-size:19px}#decisions{width:220px;bottom:110px}#decisions #planResearch{font-size:10px}}

#game>header,#status,#upgrades,#weaponsHud,#decisions,footer,#bossHud,#pauseBadge{z-index:6}#veil{z-index:20}

.damageNumber.incoming{color:#ff9b87;font-size:20px}

#treeGold{color:#f1ca74;font-weight:700;margin:5px 0;font-size:19px}#upgrades{width:255px}.techNode>span{color:#e7ca86}#planTitle{font-size:20px;line-height:1.2}

.treeTab{grid-template-columns:34px 1fr 58px}.treeTab b{text-align:right;font-size:10px}#techSpent{max-width:250px;line-height:1.5}

/* Three independent paths, with shared foundations above them. */
#techNodes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:start}.treeFoundation{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:12px}.treeFoundation .unlock{grid-column:1/-1}.branchColumn{display:flex;flex-direction:column;gap:14px;border:1px solid #6e929844;border-radius:7px;padding:10px;background:#0a192350;min-width:0}.branchColumn h3{font:600 16px 'Barlow Condensed';color:#c7d9d1;min-height:36px;letter-spacing:.5px}.branchColumn.committed{border-color:#d8c38b99;background:#31424355}.branchColumn.locked{background:#11182088;border-color:#555e6555}.branchColumn.locked h3{color:#909b9c}.branchColumn .techNode{min-height:215px;width:100%;padding:12px;grid-column:auto}.branchColumn .techNode strong{font-size:22px}.branchColumn .techNode small{font-size:9px;letter-spacing:.6px}.branchColumn .techNode p{font-size:12px}.techNode:before{display:none!important}.seedToggle{display:flex;align-items:center;gap:8px;font-size:12px}.seedToggle input{width:16px;height:16px}.menuOptions{flex-wrap:wrap}@media(max-width:760px){#techNodes{grid-template-columns:1fr}.treeFoundation{grid-column:auto}.branchColumn .techNode{min-height:145px}}

#techPanel{display:flex;flex-direction:column;height:91dvh;overflow:hidden}#techPanel .techTop,#researchHelp{flex-shrink:0}#techPanel .techLayout{min-height:0;flex:1}#techPanel .techLayout>article{max-height:none;min-height:0;overflow:auto}#techModes{overflow:auto;min-height:0}.branchColumn h3{margin:0;padding:4px 0;min-height:25px}.treeFoot{padding-bottom:8px}@media(max-width:760px){#techPanel .techLayout{overflow:auto;display:block}#techPanel .techLayout>article{overflow:visible}}

.workshopHint{font-size:11px;line-height:1.45;color:#a9c6bf;margin:2px 0 9px}

#result{width:580px;max-width:94vw}#resultStats{font-size:14px;line-height:1.6}#resultBuild{display:grid;gap:7px;margin:16px 0}.resultSchool{padding:10px 12px;border-left:3px solid var(--school);background:#263d4566;border-radius:3px}.resultSchool strong{font:600 20px 'Barlow Condensed';color:var(--school)}.resultSchool p{font-size:12px;color:#c7d6cf;margin-top:4px;line-height:1.5}#recap{max-height:100px}
@media(min-width:761px) and (max-width:1400px){#weaponsHud{top:auto;bottom:95px;left:18px;width:210px;padding:12px}#weaponsHud h2{font-size:22px}#decisions{left:246px;bottom:95px;width:300px;max-width:300px;padding:12px}#decisions p{font-size:12px}#planTitle{font-size:18px}}

@media(min-width:761px) and (max-width:1400px){#pauseBadge{top:180px;bottom:auto}}

@media(min-width:761px) and (max-width:1400px){#upgradeAlerts{top:auto;bottom:95px;right:28px;width:230px}#upgradeAlerts .upgradeAlert:not(:first-child){display:none}.upgradeAlert{padding:10px 12px}.upgradeAlert strong{font-size:21px}}

/* Purchase HCI: selection, ownership and spending have separate signals. */
.wallet{position:relative}.walletGold strong{color:#f1ca74}.walletTech strong{color:#9be6ed}.spendDelta{position:absolute;top:100%;right:0;opacity:0;white-space:nowrap;font:700 12px 'DM Sans';background:#14262f;border:1px solid #b2c6c666;padding:3px 7px;border-radius:4px;pointer-events:none;z-index:2}.walletGold .spendDelta{color:#ffda86}.walletTech .spendDelta{color:#a5f2ff}.spendDelta.spent{animation:spendReceipt 1.8s ease-out forwards}@keyframes spendReceipt{0%,65%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(7px)}}
#techPanel{width:1400px;padding:24px 28px}#techPanel .techLayout{grid-template-columns:250px 1fr;gap:20px}.techBank{display:grid;grid-template-columns:1fr 1fr;gap:12px 14px;min-width:340px}.techBank .wallet{border:1px solid #72909766;border-radius:6px;padding:9px 16px;text-align:left;background:#0c202b}.techBank .walletGold{border-color:#ab8f5266}.techBank .walletTech{border-color:#72bcc566}.techBank .wallet small{font-size:10px;letter-spacing:1px}.techBank .wallet strong,#treeGold{display:block;font:700 28px 'Barlow Condensed';margin:2px 0 0}.techBank #techSpent{grid-column:1/-1;max-width:none;font-size:11px;padding-top:5px}#researchHelp{margin:12px 0;font-size:13px}.treeFoundation{grid-template-columns:repeat(3,minmax(0,1fr))}.treeFoundation .unlock{grid-column:auto}#techNodes .techNode{min-height:170px;padding:12px;gap:6px}#techNodes .techNode strong{font-size:23px}#techNodes .techNode p{font-size:12px;line-height:1.4}#techNodes .nodeBadge{font-size:10px;letter-spacing:.7px;color:#c6cfce}#techNodes .learned .nodeBadge{color:#a3e3be}#techNodes .rankPill{display:block;padding:0;margin:0;font-size:12px;font-weight:700;color:#edf2e6;letter-spacing:.8px}#techNodes .nodePrice{padding:4px 6px;margin-top:auto;border-radius:3px;align-self:flex-start;font-size:11px;letter-spacing:0}#techNodes .nodePrice.gold{color:#ffda85;background:#72542338}#techNodes .nodePrice.tech{color:#a1eaf5;background:#2b646f40}#techNodes [data-purchase-state='unaffordable'] .nodePrice{color:#ffc0a8;background:#82452f55}#techNodes [data-purchase-state='locked'],#techNodes [data-purchase-state='prerequisite']{opacity:.65}#techNodes .nodeSelected{outline:2px solid #f5e8bc;outline-offset:1px;background:#35535a;opacity:1;box-shadow:0 0 0 5px #e8cf8120}#techNodes .maxed{border-color:#77b493}#techNodes .nodeSelected:after{content:'SELECTED';position:absolute;right:8px;top:-9px;font-size:9px;letter-spacing:1px;background:#f4df9f;color:#24323c;padding:3px 6px;border-radius:3px;font-weight:800}.branchColumn.committed h3{color:#a7e4bd}.branchColumn.locked h3{color:#c3aaa2}
.purchaseDock{display:grid;grid-template-columns:1fr 290px;gap:6px 22px;flex-shrink:0;margin-top:14px;padding:14px 18px;background:#0b1c27;border:1px solid #708d9677;border-radius:7px}.purchaseDetails small{font-size:10px;color:#b2d4ca;letter-spacing:1px}.purchaseDetails h2{font-size:27px;margin:3px 0}.purchaseDetails p{font-size:12px;line-height:1.5;color:#ccd9d2}#branchWarning{color:#f0cb80;font-weight:600;margin-top:3px}.purchaseAction{align-self:center}.purchaseAction button{width:100%;min-height:54px;font-size:16px;line-height:1.4;background:#b99548;color:#15232c;border-color:#f0cf86}.purchaseAction button[data-currency='tech']{background:#7ec7d5;border-color:#b9eef4}.purchaseAction button:disabled{background:#273944;color:#c0cbc9;border-color:#6b808955;opacity:1;font-size:12px}.purchaseAction p{font-size:12px;text-align:center;color:#c8d3ca;margin-top:6px}.purchaseReceipt{grid-column:1/-1;min-height:18px;font-size:11px!important;line-height:1.5!important;color:#ade4be!important;letter-spacing:.2px;margin:2px 0 0!important;padding-top:6px;border-top:1px solid #8fb9a133}.purchaseFlash{animation:boughtFlash 1.2s ease-out}@keyframes boughtFlash{0%,30%{box-shadow:inset 0 0 0 3px #b4efc5,0 0 22px #a1e9ba44}100%{box-shadow:none}}
#upgrades{display:flex;flex-direction:column;max-height:calc(100dvh - 320px);border-radius:7px}#upgrades .panelHead,#workshopHint{flex-shrink:0}#upgradeList{min-height:65px;overflow:auto;flex:1}#upgradeList .upgrade{grid-template-columns:1fr auto;min-height:61px;padding:9px 10px;gap:4px}#upgradeList .upgrade small{display:none}#upgradeList .upgrade .name{font-size:13px}#upgradeList .upgrade .level{display:block;font-size:10px;color:#b6ddc4;margin-top:3px}#upgradeList .upgrade .cost{align-self:center;font-size:14px}#upgradeList .upgrade.selected{outline:2px solid #f4df9f;outline-offset:-2px;background:#3b514b}#upgradeList .upgrade[data-purchase-state='unaffordable'] .cost{color:#ffc1ab}.bastionDetail{padding:12px 0 0;flex-shrink:0}.bastionDetail>strong{font-size:14px;color:#ecdfbc}.bastionDetail>p{font-size:12px;line-height:1.5;margin:6px 0;color:#c7d6ce}.bastionDetail button{width:100%;font-size:13px;min-height:43px;background:#d0ac5e;color:#1a2930}.bastionDetail button:disabled{background:#293c45;color:#c1cfce;opacity:1}.bastionDetail .purchaseReceipt{font-size:10px!important;max-height:70px;overflow:auto}.treeTab.selected{box-shadow:inset 4px 0 var(--school)}.treeTab.learned b{color:#a8e1bb}.treeTab b{font-size:9px}
@media(max-width:1100px){#techPanel .techLayout{grid-template-columns:200px 1fr}.techBank{min-width:285px}#techNodes .techNode strong{font-size:20px}.purchaseDock{grid-template-columns:1fr 235px;padding:10px}#techNodes .techNode{min-height:190px}.purchaseDetails p{font-size:11px}.techBank .wallet{padding:7px 12px}}
@media(max-width:760px){.purchaseDock{grid-template-columns:1fr}.techBank{min-width:0}.treeFoundation{grid-template-columns:1fr}#techPanel .techLayout{display:block}#techPanel{padding:12px}#upgrades{max-height:45vh}.purchaseDetails p{max-height:60px;overflow:auto}}
@media(prefers-reduced-motion:reduce){.purchaseFlash,.spendDelta.spent{animation:none}.spendDelta.spent{opacity:1}button{transition:none}}

.techBank{row-gap:22px}#techSpent{padding-top:6px}.shopScrollHint{display:none;color:#b8cbbd;font-size:10px;letter-spacing:.2px;margin:0 0 5px}#upgradeList{scrollbar-width:thin;scrollbar-color:#9bb8a5 #142730;scrollbar-gutter:stable}@media(min-width:761px) and (max-width:1400px){.shopScrollHint{display:block;flex-shrink:0}}

/* Keep wave controls readable after adding the auto-start toggle. */
footer{gap:18px}.controls{flex-shrink:0}#waveBtn{min-width:165px;white-space:nowrap}footer .help{text-align:center;max-width:400px;line-height:1.5}@media(min-width:1001px) and (max-width:1400px){footer .help{display:none}}
