/* Unified layout and accessibility polish */
body,button,input,select{font-family:Consolas,"Courier New",monospace}
h1,h2,h3,.sub-tab b,.branch-tab,.tip-head b,.stat-row b,.hud b,.shop-money b,.synergy-card b{font-family:"Arial Narrow","Segoe UI",sans-serif!important}
.mobile-section-select{display:none}
.tree .node.major{color:#e4d6a4}.tree .node:not(.major):not(.ready):not(.owned){color:#dedcc8;border-color:#919784}
.tree .node .cost,.node-tooltip .tip-cost,.shop-tools b,.stats-summary b,.map-controls span,.wave-notice,.final-stats b,.menu-diagram span{font-family:"Segoe UI",sans-serif!important}
@media(max-width:700px){.shop-shell>#subTabs{display:block!important;max-height:none!important}.sub-tab{display:none!important}.mobile-section-select{display:block;width:100%;background:#dcd4bd;color:#30392e;border:1px solid #7e8772;padding:10px;font-size:13px;font-weight:bold}}
.shop-shell{width:calc(100% - 24px);height:calc(100% - 20px);grid-template-rows:auto auto auto auto auto minmax(0,1fr)}
.shop-shell>header{padding:10px 16px;gap:12px}.shop-shell h2{font-size:23px}.shop-shell>header .eyebrow{font-size:9px}
.shop-shell>#branchTabs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));overflow:visible;padding:6px 8px 0}.branch-tab{min-width:0;padding:9px 6px;font-size:11px;letter-spacing:0;line-height:1.3;white-space:normal}
.shop-shell>#subTabs{padding:6px 8px!important;gap:4px!important}.sub-tab{min-height:48px!important;padding:6px 8px!important}.sub-tab b{min-height:0!important;font-size:13px!important}.sub-tab small{font-size:10px!important}
.shop-tools{grid-template-columns:1fr auto;gap:8px;padding:8px 16px}.shop-tools b{font-size:21px}.shop-tools p{display:none}.shop-tools span{font-size:11px}.legend{gap:12px}
.tree-viewport{min-height:0;touch-action:none}.tree .node{animation:none!important}.tree .node:after{content:attr(data-label);position:absolute;top:85px;left:50%;transform:translateX(-50%);width:150px;text-align:center;color:#eee6cc;font:600 14px Oswald,sans-serif;line-height:1.25;text-shadow:1px 1px #171914;pointer-events:none}.tree .node.major:after{top:130px!important;width:180px!important}.tree .node.major .cost{top:100px!important}.tree .node b{font-size:25px!important}.tree .node.major b{font-size:38px!important}.tree .node.owned{opacity:.8}.tree .node:hover,.tree .node:focus-visible{filter:brightness(1.2);z-index:4}.tree-lines path{stroke-width:3;opacity:.65}.tree-lines path.live{stroke-width:4;opacity:1}
.node-tooltip{width:300px!important;right:12px!important;top:12px!important;max-height:calc(100% - 24px);overflow:auto;pointer-events:auto;padding:16px!important;cursor:default}.node-tooltip .tip-head{margin-top:10px}.node-tooltip .tip-head b{font-size:23px!important}.node-tooltip p{font-size:13px!important}.node-tooltip .tip-cost{font-size:27px!important}.node-tooltip .tip-cost small{color:#d8d1ba;display:block;margin-top:4px}.node-tooltip button{width:100%;margin-top:12px;background:#526a50;color:#fff4d5;font-size:13px;padding:12px}.node-tooltip button:disabled{background:#a5a494;color:#4d5146;cursor:default;transform:none;box-shadow:none}.map-controls{right:auto;left:16px;bottom:12px}.map-help{display:none}
.hud{height:94px;grid-template-columns:minmax(180px,1.4fr) .65fr .6fr .65fr .8fr auto auto;padding:8px}.hud>div{padding:4px 8px}.hud small{font-size:10px}.hud b{font-size:25px}.hud button{font-size:10px;padding:10px 8px;letter-spacing:0}.arena-wrap{height:calc(100% - 124px)}
.stats-shell{height:calc(100% - 24px);max-height:none}.stats-content{overflow:auto}.stats-content>section{overflow:visible}.stat-row{font-size:11px;min-height:34px}.stat-row b{font-size:14px}.synergy-card p{font-size:12px}.synergy-card small{font-size:11px}.synergy-card{background:#ddd5be;color:#42463c}.synergy-card b{font-size:17px}.synergy-card.active{background:#4e654d;color:#f0ead5}
@media(max-width:1000px){.shop-shell>header h2{font-size:19px}.shop-shell>header button{font-size:10px;padding:8px}.shop-shell>#branchTabs{grid-template-columns:repeat(3,minmax(0,1fr))}.hud{grid-template-columns:1.4fr .65fr .7fr auto auto}.hud>div:nth-child(3),.hud>div:nth-child(4){display:none}.hud button{display:block}.shop-shell>#subTabs{grid-template-columns:repeat(5,minmax(0,1fr))!important}.sub-tab b{font-size:12px!important}}
@media(max-width:700px){.mast{height:32px;padding:0 10px;font-size:10px}.screen{height:calc(100dvh - 32px)}.overlay{inset:32px 0 0}.shop-shell{width:100%;height:100%;border:0}.shop-shell>header{flex-wrap:wrap;gap:6px;padding:6px}.shop-shell>header>div:first-child{display:none}.shop-money{margin-left:0;margin-right:auto}.shop-money b{font-size:22px}.shop-view-tabs button{font-size:11px}.branch-tab small{display:none}.branch-tab{font-size:10px;padding:6px}.shop-tools{padding:5px 8px}.shop-tools b{font-size:17px}.legend{display:none}.shop-shell>#subTabs{grid-template-columns:repeat(2,minmax(0,1fr))!important;max-height:142px;overflow:auto!important}.sub-tab{min-height:40px!important}.sub-tab small{font-size:9px!important}.tree-viewport{margin-bottom:190px;overflow:visible}.tree{clip-path:inset(0)}.node-tooltip{top:calc(100% + 4px)!important;left:6px!important;right:6px!important;width:auto!important;height:180px;max-height:180px;padding:10px!important}.node-tooltip .tip-head{margin:0;padding:0;border:0}.node-tooltip .tip-head b{font-size:18px!important}.node-tooltip p{font-size:11px!important;margin:4px 0}.node-tooltip>small{display:none}.node-tooltip .tip-cost{display:inline-block;margin:4px 10px 0 0!important;padding:5px 9px!important;font-size:19px!important}.node-tooltip .tip-cost small{font-size:9px!important}.node-tooltip button{width:auto;min-width:125px;padding:10px;margin:0}.hud{height:90px;grid-template-columns:1.4fr .8fr auto;gap:0}.hud>div:nth-child(2){display:none}.hud button{font-size:9px;padding:6px}.hud #statsBtn{grid-column:3;grid-row:1}.hud #shopBtn{grid-column:3;grid-row:2}.hud .defense-hud,.hud .credits{grid-row:1/3}.hud b{font-size:21px}.hud small{font-size:8px}.arena-wrap{height:calc(100% - 120px);margin:0 6px}.stats-content .stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stat-row{font-size:10px}.menu-copy{padding:6%}.menu h1{font-size:65px}.menu-actions{margin:12px 0}.menu-copy>p:not(.eyebrow){font-size:13px}.menu-copy small{font-size:10px}.module-panel{padding:12px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
