/* Two phases, one battlefield. Generated art is ornamental; labels stay real text. */
.research-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.research-card{padding:16px;border:1px solid #786443;border-radius:10px;background:#141c20;min-width:0}.research-card h3{margin:0;font-size:24px;color:#ebcd96}.research-card h3 small{display:block;font-family:system-ui,sans-serif;font-size:13px;color:#bfc4bd}.research-card dl{margin:16px 0}.research-card dl>div{margin:12px 0}.research-card dt{font-size:13px;color:#bfc4bd}.research-card dd{margin:4px 0;font-size:15px;color:#f2d6a7}.research-gates{font-size:14px!important}.research-card .action-reason{color:#e9b68b}.research-card .full{white-space:normal}@media(max-width:600px){.research-list{grid-template-columns:1fr}}
body[data-game-phase] [hidden]{display:none!important}
body[data-game-phase] main{grid-template-columns:minmax(0,1fr)}
body[data-game-phase] #buildAside{display:none}
body[data-game-phase].build-open #buildAside{display:block;position:fixed;z-index:12;right:16px;top:90px;bottom:110px;width:min(340px,calc(100% - 32px));height:auto;max-height:none;padding:16px;overflow:auto;border:1px solid #796442;border-radius:12px;background:#141c20;box-shadow:0 18px 60px #0008}
body[data-game-phase] .drawer-toolbar{background:#141c20;justify-content:space-between;padding-bottom:10px;border-bottom:1px solid #4e4434}
body[data-game-phase] .drawer-toolbar strong{font-size:20px;color:#ebcd96}
body[data-game-phase] .drawer-toolbar .aside-close{display:block}
body[data-game-phase] .prep-hint{font-size:14px;line-height:1.5;color:#b7bdbb}
body[data-game-phase] .prep-tools{display:flex;align-items:stretch;gap:6px;min-width:0}
body[data-game-phase] .prep-tools button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:52px;padding:5px 12px;background:#151d24;border-color:#5c4d37;font-size:14px;white-space:nowrap}
body[data-game-phase] .prep-tools button[aria-pressed=true]{background:#302a22;border-color:#d5b171;color:#f1d4a2}
body[data-game-phase] .prep-tools img{width:40px;height:40px;object-fit:contain;border-radius:6px}
body[data-game-phase] .wave-preparation{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-left:auto}
body[data-game-phase] .wave-preparation #waveBtn{min-width:170px;min-height:52px;background:#dcbb80;border-color:#dcbb80;color:#241c11}
body[data-game-phase] .repair-row{display:flex;width:100%;gap:12px;justify-content:space-between;align-items:center;text-align:left;margin-top:8px;min-height:56px}
body[data-game-phase] .repair-row small{display:block;color:#d5b98a;font-size:12px;margin-top:4px}
body[data-game-phase] .economy-details>summary{padding:14px 0;font-size:14px;color:#dfc292;cursor:pointer}
body[data-game-phase] .game-menu-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}
body[data-game-phase] #gameMenuDialog{max-height:calc(100dvh - 32px);overflow:auto}
body[data-game-phase] #infoDialog:has(.research-list){max-height:calc(100dvh - 32px);overflow:auto}
body[data-game-phase] #gameMenuTitle{font-size:32px;margin:0}
body[data-game-phase] #gameMenuBtn{min-height:44px;padding:6px 12px;font-size:14px;white-space:nowrap}
body[data-game-phase] #gameMenuDialog .utility-details>summary{padding:16px 0;color:#dfc292}
body[data-game-phase] #gameMenuDialog .full{font-size:14px;min-height:44px}
body[data-game-phase] #gameMenuDialog .menu-tools{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}
body[data-game-phase] #gameMenuDialog .menu-tools button{flex:1;max-width:none;min-width:70px;width:auto;min-height:44px;border-radius:6px;font-size:14px;padding:8px 12px}
body[data-game-phase] #gameMenuDialog #helpBtn{flex-basis:44px;flex-grow:0;min-width:44px}
body[data-game-phase] .context-card .context-status,body[data-game-phase] .context-card .context-note,body[data-game-phase] .context-option p{font-size:14px}
body[data-game-phase] .context-card .upgrade-comparison{font-size:13px}
body[data-game-phase] .prep-tools button:focus-visible{outline:2px solid #edce98;outline-offset:3px}
body[data-game-phase=combat] #buildAside,body[data-game-phase=combat] .context-card{display:none!important}
body[data-game-phase=combat] .resourcebar em{display:none!important}
body[data-game-phase=combat] #introPanel{display:none!important}
body[data-game-phase] #abilities{border:1px solid #796442;background:#141c20;border-radius:10px;padding:5px}
body[data-game-phase] #abilities button{background:#22272b;min-height:48px;font-size:14px;padding:6px 16px}
body[data-game-phase] #abilities small{font-size:12px}
body[data-game-phase].desktop-layout.immersive main{grid-template-columns:minmax(0,1fr);gap:0}
body[data-game-phase].desktop-layout.immersive .battle{grid-template-rows:52px minmax(0,1fr) auto auto auto}
body[data-game-phase].desktop-layout.immersive .battle .battlecontrols{background:#141c20;border-color:#796442;flex-wrap:wrap}
body[data-game-phase].desktop-layout.immersive .battle .battlecontrols>div{flex:0 1 auto}
body[data-game-phase].desktop-layout.immersive .battle .wave-preparation{flex:1 1 auto;margin-left:auto}
body[data-game-phase].desktop-layout.immersive .battle .ability-bar{position:absolute;grid-row:auto;bottom:14px;left:50%;right:auto;transform:translateX(-50%);max-width:calc(100% - 24px);z-index:4}
body[data-game-phase].desktop-layout.immersive .battle .ability-bar button{flex:0 1 auto;white-space:nowrap}
body[data-game-phase].desktop-layout.immersive .battle .context-card{position:absolute;top:12px;right:12px;left:auto;width:340px;height:auto;max-height:calc(100% - 100px);background:#141c20;border:1px solid #b99860;z-index:8}
body[data-game-phase].desktop-layout.immersive .battle .wave-preview{max-width:calc(100% - 370px)}
body[data-game-phase].desktop-layout.immersive .battle .battlecontrols #combatTools{margin-left:auto;flex:0 0 auto}
body[data-game-phase].desktop-layout.immersive.context-open .battle .minimap-panel{visibility:hidden}
@media(max-width:760px),(pointer:coarse){
 body[data-game-phase] #gameMenuBtn{font-size:12px;min-width:44px;padding:6px 9px}
 body[data-game-phase] .prep-tools{flex:1 1 auto;gap:4px}
 body[data-game-phase] .prep-tools button{flex:1;gap:4px;padding:4px 7px;font-size:14px;min-height:48px}
 body[data-game-phase] .prep-tools img{width:30px;height:30px}
 body[data-game-phase] .wave-preparation{gap:4px}
 body[data-game-phase].immersive .battle .battlecontrols{background:#141c20;border-color:#796442}
 body[data-game-phase].immersive .battle .battlecontrols>div{margin-left:0}
 body[data-game-phase].immersive #buildAside{top:calc(var(--hud-height,60px) + 8px);bottom:calc(var(--controls-height,100px) + 16px);right:8px;width:min(340px,calc(100% - 16px))}
 body[data-game-phase].immersive #combatTools{margin-left:auto!important}
}
@media(max-width:620px){
 body[data-game-phase] .battlecontrols{flex-wrap:wrap}
 body[data-game-phase] #prepTools{flex-basis:100%}
 body[data-game-phase] .prep-tools button{padding-inline:4px;font-size:13px}
 body[data-game-phase] .wave-preparation{width:100%;flex:1;justify-content:space-between}
 body[data-game-phase] .wave-preparation #waveBtn{flex:1;min-width:130px;min-height:44px;font-size:14px}
 body[data-game-phase] #perksBtn{display:none!important}
 body[data-game-phase].immersive .battle .ability-bar{bottom:calc(var(--controls-height,56px) + 16px)}
 body[data-game-phase=combat].immersive .battle .battlecontrols{min-height:54px}
 body[data-game-phase] header .brand{min-width:0}
}
@media(prefers-reduced-motion:reduce){body[data-game-phase] button{transition:none}}
@media(max-width:360px){body[data-game-phase].immersive>header .brand{display:none}body[data-game-phase].immersive>header .resourcebar{margin-left:0;gap:8px}body[data-game-phase] #gameMenuBtn{margin-left:auto}}
