:root{--hud-height:218px;--top-height:48px;--status-height:23px}
html,body{width:100%;height:100%;overflow:hidden;background:#101914}
body{display:grid;grid-template-rows:var(--top-height) minmax(0,1fr) var(--hud-height) var(--status-height);font-size:12px}
.topbar{height:auto;min-height:0;padding:0 18px;gap:16px;background:linear-gradient(#333c32,#19221c);border-bottom:3px ridge #797457;box-shadow:0 2px 10px #0008;z-index:3}
.brand{gap:9px}.palace-brand{font-size:28px}h1{font-size:16px;letter-spacing:3px}.brand div>span{font-size:7px;letter-spacing:3px;margin-top:1px}.prototype{display:none}
.resources{gap:30px}.resources>div{gap:8px}.resources small{font-size:8px;margin:0 0 1px;letter-spacing:1px}.resources strong{font-size:17px}.resources em{font-size:10px}.resource-icon{font-size:18px}.icon-button{font-size:13px}.icon-button span{font-size:10px}
.game-layout{display:block;position:relative;width:100%;max-width:none;min-height:0;margin:0;padding:0;overflow:hidden}
.battlefield{position:absolute;inset:0}.board-wrap{position:absolute;inset:0;max-width:none;width:100%;height:100%;margin:0;aspect-ratio:auto;border:0;border-radius:0;box-shadow:none;overflow:hidden;background:#31452b}.board-wrap canvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none}
.map-heading{position:absolute;top:14px;left:18px;right:18px;z-index:1;margin:0;pointer-events:none;align-items:flex-start}.map-heading>div:first-child{background:#132119bd;border:1px solid #82916a55;padding:9px 13px;border-radius:2px;box-shadow:0 3px 10px #0003}.map-heading .eyebrow{font-size:7px}.map-heading h2{font-size:15px;margin-top:3px;text-shadow:0 2px #000}.map-controls{pointer-events:auto;gap:5px}.small-button{background:#18271deb;border-color:#767759;padding:7px 9px;color:#c4ccb4;font-size:10px;box-shadow:inset 0 0 0 1px #0c150e}.board-label{left:18px;top:auto;bottom:15px;z-index:1;padding:6px 9px;font-size:8px}.map-footer{position:absolute;right:18px;bottom:16px;padding:0;pointer-events:none;color:#d4dac0;text-shadow:0 1px 3px #000}.map-footer>span:first-child{display:none}.map-footer>span:last-child{display:flex;font-size:9px;background:#122017b8;padding:5px 8px;border-radius:2px}.toast{bottom:55px;z-index:3}
.command-deck{display:grid;grid-template-columns:188px minmax(210px,1fr) 240px 294px;gap:8px;padding:9px 10px 7px;background:repeating-linear-gradient(120deg,#ffffff02 0 2px,transparent 2px 7px),linear-gradient(#353c30,#19231c 14%,#202a21);border-top:5px ridge #8e8661;border-bottom:2px solid #080f0a;box-shadow:0 -5px 22px #0008;z-index:2;min-width:0;min-height:0}
.command-deck>section{min-width:0;min-height:0;border:2px ridge #6b6e50;border-radius:2px;background:linear-gradient(140deg,#19271c,#111b15);box-shadow:inset 0 0 18px #0005;margin:0}
.minimap-panel{display:flex;flex-direction:column;align-items:center;padding:5px;gap:4px}.minimap-panel .eyebrow{font-size:7px;letter-spacing:1px}#minimap{width:150px;height:150px;max-width:100%;max-height:calc(100% - 31px);aspect-ratio:1;object-fit:contain;cursor:crosshair;border:1px solid #8b8e60;background:#31492b;box-shadow:0 0 0 2px #080f0b}.camera-hint{font-size:8px;color:#9eac91;white-space:nowrap}
.details{padding:12px 15px;overflow:auto;min-height:0}.details .eyebrow{font-size:8px}.details h3{font-size:18px;margin:6px 0}.details p{font-size:10px;line-height:1.5;max-width:540px}.stat-row{max-width:330px;padding:7px 0;margin-bottom:7px}.stat-row strong{font-size:16px}.stat-row>span{font-size:8px}.detail-actions{margin-top:9px;max-width:390px}.upgrade-button,.sell-button{padding:8px;font-size:10px}.build-hint{margin-top:10px;font-size:9px}
.arsenal{padding:9px 10px;order:4;overflow:hidden}.arsenal h2{font-size:15px;margin:4px 0 7px}.arsenal .section-intro{display:none}.arsenal .eyebrow{font-size:7px}.arsenal .muted{font-size:8px}#tower-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.tower-option{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:1px;margin:0;padding:3px 2px;min-height:66px;border:2px ridge #647054;background:linear-gradient(#33432c,#1c2a1c);border-radius:2px;box-shadow:inset 0 0 8px #0005}.tower-option img{width:34px;height:34px}.tower-option .tower-name{font-size:9px;text-align:center;margin:0;white-space:nowrap}.tower-role{display:none}.tower-price{font-size:9px;margin:0;line-height:1.2}.shortcut{font-size:8px;top:2px;right:4px}.tower-option.selected{border-color:#e3c777;background:linear-gradient(#595d32,#303e24);box-shadow:inset 0 0 8px #ddbe5844,0 0 6px #e2c46e22}
.wave-card{padding:11px 12px;order:3;overflow:auto;display:flex;flex-direction:column}.wave-card .eyebrow{font-size:8px}.wave-card h3{font-size:17px;margin:10px 0 6px}.wave-card p{font-size:10px}.wave-progress{margin:10px 0}.wave-card .primary{margin-top:auto;padding:10px 11px}.wave-hint{font-size:8px!important;margin-top:7px!important}.tag{font-size:7px}
.bottom-bar{max-width:none;margin:0;padding:0 13px;gap:15px;background:#101911;font-size:8px;color:#91a184;min-height:0}.bottom-bar>span:nth-child(2){display:block}.bottom-bar button{font-size:9px;padding:0}.end-screen{z-index:5}.end-card{background:#18251de8;border:2px ridge #92875e;max-width:420px;padding:30px}
@media(min-width:1600px) and (min-height:900px){:root{--hud-height:242px}.command-deck{grid-template-columns:214px minmax(250px,1fr) 280px 336px;gap:12px;padding:10px 13px}.tower-option{min-height:76px}.tower-option img{width:43px;height:43px}.tower-option .tower-name{font-size:10px}#minimap{width:174px;height:174px}.details h3{font-size:22px}.details p{font-size:12px}.wave-card h3{font-size:21px}.details,.wave-card{padding:15px 18px}}
@media(max-width:1100px){:root{--hud-height:210px}.command-deck{grid-template-columns:145px minmax(170px,1fr) 197px 234px;gap:6px;padding:7px}#minimap{width:126px;height:126px}.minimap-panel{justify-content:center}.camera-hint{font-size:7px}.details{padding:9px}.details h3{font-size:15px}.details p{font-size:9px}.wave-card{padding:9px}.wave-card h3{font-size:15px}.arsenal{padding:8px 6px}.tower-option .tower-name{font-size:8px}.arsenal h2{font-size:13px}.tower-option{min-height:65px}.tower-option img{width:32px;height:32px}.bottom-bar>span:nth-child(2){font-size:7px}}
@media(max-width:800px){.command-deck{grid-template-columns:118px minmax(155px,1fr) 166px 210px;gap:4px;padding:5px}.map-heading h2{font-size:12px}.map-controls{gap:3px}.small-button{font-size:9px;padding:6px}.resources{gap:16px}.details h3{font-size:14px}.details p{font-size:8px}.details .eyebrow{font-size:7px}.stat-row strong{font-size:13px}.detail-actions{gap:3px}.upgrade-button,.sell-button{font-size:8px;padding:6px}.wave-card h3{font-size:13px}.wave-card p{font-size:8px}.wave-card .primary{font-size:10px;padding:8px}.wave-card .primary span{font-size:7px}.wave-card .eyebrow{font-size:7px}.tower-option img{width:30px;height:30px}.tower-option{min-height:64px}.tower-option .tower-name{font-size:7px}#minimap{width:100px;height:100px}.minimap-panel .eyebrow{font-size:6px}.camera-hint{font-size:6px}.topbar{padding:0 10px}.bottom-bar>span:nth-child(2){display:none}}
@media(max-height:650px){:root{--hud-height:176px;--top-height:40px;--status-height:20px}.command-deck{padding-top:5px}.tower-option{min-height:51px}.tower-option img{width:24px;height:24px}.arsenal h2{margin:3px 0 4px;font-size:12px}.details h3{font-size:14px}.details p{font-size:9px}.stat-row{padding:3px 0;margin-bottom:4px}.stat-row strong{font-size:13px}.detail-actions{margin-top:5px}.wave-card h3{margin:5px 0;font-size:14px}.wave-hint{font-size:7px!important}#minimap{width:120px;height:120px}.map-heading{top:9px}.details{padding:8px 10px}}
@media(max-width:650px){.command-deck{grid-template-columns:98px 1fr 190px}.wave-card{position:absolute;right:8px;top:60px;width:160px;height:auto;max-height:210px;z-index:3}.minimap-panel{padding:3px}#minimap{width:86px;height:86px}.map-heading>div:first-child{display:none}.map-controls{margin-left:auto}.brand div>span{display:none}.resources{gap:10px}.resources strong{font-size:13px}.resources small{font-size:6px}h1{font-size:12px}.topbar .icon-button span{display:none}.details p{font-size:8px}.map-footer{display:none}}
.details{padding-top:10px;padding-bottom:10px}.details h3{margin-top:4px;margin-bottom:4px}.details .stat-row{padding-top:5px;padding-bottom:5px}.details .detail-actions{margin-top:7px}
