/* Brass controls, readable surfaces, one consistent command-room visual language. */
:root{--ui-gold:#efd38b;--ui-gold-dim:#9f8248;--ui-ink:#081713;--ui-edge:#6d897d;--ui-surface:#18372c;--ui-text:#f0f0da}
button{border-radius:13px;border:1px solid #739081;border-bottom:3px solid #1c352b;background:linear-gradient(165deg,#587566 0%,#365649 38%,#233f33 100%);color:var(--ui-text);box-shadow:inset 0 2px 0 #c4dfce50,inset 1px 0 0 #d4e9dc25,0 5px 0 #091c15,0 8px 14px #0005;font-weight:750;transition:transform .12s,box-shadow .12s,filter .12s;cursor:pointer}
button:not(:disabled):active{transform:translateY(3px);box-shadow:inset 0 1px #c4dfce33,0 2px 0 #091c15,0 4px 7px #0005}button:focus-visible{outline:3px solid #fff0b5;outline-offset:3px}button:disabled{opacity:.48;cursor:default;filter:saturate(.55)}
button.action,#quickPlay,#shopBuy,#squadLaunch,#continueCampaign,.chosen:not([data-build]),button[aria-pressed=true]{color:#25301e;background:linear-gradient(165deg,#fff0bc 0%,#e1c17a 39%,#b08b44 100%);border-color:#f4dba0;border-bottom-color:#80622c;box-shadow:inset 0 2px #fff9dfb0,inset 1px 0 #fff1bb77,0 5px 0 #705222,0 9px 17px #0006;text-shadow:0 1px #fff1c655}
.app:not(.in-combat){background:linear-gradient(145deg,#132d23,#081b15 70%);color:var(--ui-text)}
.app:not(.in-combat)>header{background:linear-gradient(110deg,#142f25,#263f31);border-bottom:1px solid #9e8a5366;padding:12px 18px}.app:not(.in-combat)>header h1{letter-spacing:.025em;color:#efdfb1;text-shadow:0 3px 2px #0008}
.app:not(.in-combat) .stats{background:linear-gradient(#274635,#193829);border-bottom:1px solid #8f895b77;padding:9px 12px;box-shadow:inset 0 1px #9cb59625}.stats small{color:#b7cbb9;letter-spacing:.035em}.stats b{color:#f1d68c}.page-heading{background:linear-gradient(100deg,#173c2e,#11291f);border-bottom:1px solid #7d875f66;padding:12px 16px}.page-heading strong{letter-spacing:.01em}.page-heading small{color:#9bbba7;font-size:11px}.page-heading button{font-size:12px;min-height:42px;padding:7px 13px}
.app:not(.in-combat)>.nav{gap:9px;padding:12px;background:#0a2119;border-top:1px solid #7b865b66}.app:not(.in-combat)>.nav button{min-height:48px;font-size:14px}.app:not(.in-combat)>.notice{font-size:11px;color:#c8d2b8;background:#193527;border-block:1px solid #71806444;padding:7px 14px}
.polished-home.command-menu:not(.hidden){padding:clamp(16px,3vw,28px)!important;gap:12px!important;background:radial-gradient(ellipse at 70% 10%,#7f6a2933,transparent 50%),linear-gradient(110deg,#0b231df5,#102e25df),url('assets/battle-city-v2.webp') center/cover;border:0;box-shadow:inset 0 1px #c1b57f55}
.polished-home .command-intro{order:0!important;margin:0;padding:2px 0 10px;border-bottom:1px solid #c9b67555}.polished-home .command-intro small{display:block!important;font-size:11px!important;letter-spacing:.25em;color:#e4c989}.polished-home .command-intro h2{font-size:clamp(25px,5vw,34px)!important;margin:8px 0 4px!important;line-height:1.25;color:#fff1c8;text-shadow:0 3px 3px #0008}.polished-home .command-intro p{display:block!important;font-size:12px;color:#b6cbbb;margin:0}
.polished-home .home-play-footer{order:1!important;margin:0!important;padding:0!important;gap:0}.polished-home #quickPlay{min-height:62px!important;font-size:20px!important;letter-spacing:.02em;border-radius:14px}.polished-home .reward-supply{display:none!important}.home-pager-retired{display:none!important}
.polished-home .command-links{order:2!important;flex:1;display:grid!important;grid-template-columns:1fr 1fr;gap:12px!important;margin:0!important;min-height:130px}.polished-home .command-links button{position:relative;overflow:hidden;min-height:128px!important;padding:15px 10px!important;border-radius:17px;background:radial-gradient(ellipse at 50% 15%,#6b896a88,transparent 70%),linear-gradient(150deg,#294d3d,#17382a);border:1px solid #9eac7d;border-bottom:4px solid #223b25}.polished-home .menu-image{height:70px!important;width:90px!important;filter:drop-shadow(0 8px 4px #0007)}.polished-home .menu-image img{max-height:100%;max-width:100%;object-fit:contain}.polished-home .command-links strong{font-size:18px!important;color:#f7e6b4;margin-top:9px!important;display:block}.polished-home .command-links em{display:block!important;color:#b6cbb5;font-size:11px!important;font-style:normal;line-height:1.5;margin-top:4px}
.polished-home .command-status{order:3!important;margin:0!important;padding:11px!important;background:#0b221acc;border:1px solid #6f8a6355;border-radius:12px}.polished-home .command-status>strong{font-size:11px;letter-spacing:.03em;color:#b4c5a8}.polished-home .command-status>div{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px!important;margin-top:8px!important}.polished-home .command-status span{display:flex;flex-direction:column;gap:3px;font-size:9px;text-align:center;border-right:1px solid #91a17f44}.polished-home .command-status span:last-child{border:0}.polished-home .command-status b{font-size:20px;color:#f3d489}
.polished-home #menuGuide{order:4!important;margin:0!important;min-height:42px;font-size:12px}.polished-home .menu-footnote{order:5!important;text-align:center;font-size:10px;margin:0!important;color:#9fb4a3}
.shop-top h2{color:#f5dfad}.shop-quantity{gap:7px}.shop-quantity button{min-width:76px;border-radius:10px}.shop-card{background:radial-gradient(ellipse at 15% 50%,#65835555,transparent 65%),linear-gradient(135deg,#2a4a37,#102b20);border:1px solid #a3945e99!important;border-radius:20px!important;box-shadow:inset 0 1px #d8e4b233,0 10px 22px #0005}.shop-card h3{color:#ffe4a5;font-size:24px!important;letter-spacing:.015em}.shop-art{filter:drop-shadow(0 12px 6px #0008)}.shop-role{color:#c2d4bc}.shop-price{color:#f4cf79!important;font-weight:800}.shop-owned{color:#c3d1b9}.purchase-summary{border:1px solid #b59e6099!important;border-radius:16px!important;background:linear-gradient(130deg,#254431,#122e22)!important;box-shadow:inset 0 1px #d5e4b333}.purchase-counts>span,.purchase-counts>div{border:1px solid #958b5c88;border-radius:9px;background:#0b271c77}.purchase-counts strong{color:#ffe1a1!important}
.base-console,.strategy-sheet,.squad-dialog,#resultCard,.modal{background:radial-gradient(ellipse at 80% 0,#6f75492b,transparent 60%),linear-gradient(145deg,#244434,#10291f)!important;border:1px solid #b6a166aa!important;border-radius:21px!important;box-shadow:inset 0 1px #d1ddae33,0 18px 50px #0007}.base-mission-card,.fort-card,.strategy-card,.squad-row{background:linear-gradient(130deg,#3d5d4380,#1c392acc)!important;border:1px solid #77916a88!important;border-radius:14px!important;box-shadow:inset 0 1px #bed5a825,0 5px 13px #0003}.base-tabs,.strategy-tabs{gap:7px}.base-tabs button,.strategy-tabs button{border-radius:11px;font-size:12px}.base-console h2,.strategy-sheet h2,.squad-head h2,#resultHeading{color:#f8dfaa}.squad-dialog .routes button{min-height:50px;font-size:14px;border-radius:12px}.quick-counts span{background:#0b291f99;border:1px solid #84916a77;border-radius:10px;padding:7px!important}.quick-counts b{color:#f3d28a}.squad-summary{border-block:1px solid #9b9b6766;background:#102d2088}.squad-controls button{min-height:44px;border-radius:11px}.squad-review-list>div{border-radius:9px;background:#112d2199;border-color:#7c8b5a77}.menu-pager{gap:10px;border-top-color:#8a956144!important}.menu-pager button{min-height:40px;border-radius:11px;font-size:12px}.menu-pager span{color:#d2cba3;font-size:11px}.game-banner{background:#071b14;border-top-color:#71815a44}.game-banner #gameBannerMount{border-color:#63785c55;color:#84997e}
@media(orientation:landscape){.polished-home.command-menu:not(.hidden){display:grid!important;grid-template-columns:1fr 1.15fr;grid-template-rows:auto auto 1fr auto;gap:12px!important;padding:18px 24px!important}.polished-home .command-intro{grid-column:1;grid-row:1}.polished-home .home-play-footer{grid-column:1;grid-row:2}.polished-home .command-links{grid-column:2;grid-row:1/4}.polished-home .command-status{grid-column:1;grid-row:3;align-self:center}.polished-home #menuGuide{grid-column:2;grid-row:4}.polished-home .menu-footnote{grid-column:1;grid-row:4;align-self:center}.polished-home .command-links button{min-height:100px!important}.polished-home .command-links em{font-size:10px!important}.polished-home .menu-image{height:70px!important}.polished-home #quickPlay{min-height:54px!important;font-size:18px!important}}
@media(max-height:430px){.polished-home.command-menu:not(.hidden){padding:10px 14px!important;gap:8px!important}.polished-home .command-intro{padding-bottom:5px}.polished-home .command-intro h2{font-size:23px!important;margin:3px 0!important}.polished-home .command-intro p{display:none!important}.polished-home #quickPlay{min-height:44px!important;font-size:16px!important}.polished-home .command-status{padding:7px!important}.polished-home .command-status b{font-size:17px}.polished-home .menu-image{height:48px!important}.polished-home .command-links strong{font-size:16px!important}.polished-home #menuGuide{min-height:36px}.shop-card h3{font-size:19px!important}}

/* Visibility must win over the landscape layout when launching or leaving home. */
#commandMenu.hidden{display:none!important;pointer-events:none!important}
.polished-home #menuWorld{display:none!important}
@media(orientation:landscape){
.app.base-building-page:not(.menu-open):not(.in-combat){max-width:none;width:100%;height:100dvh;display:grid;grid-template-columns:minmax(0,1.35fr) minmax(300px,1fr);grid-template-rows:36px 44px minmax(0,1fr);overflow:hidden}
.base-building-page:not(.menu-open)>header,.base-building-page:not(.menu-open)>.notice,.base-building-page:not(.menu-open)>.nav,.base-building-page:not(.menu-open)>.game-banner{display:none!important}
.base-building-page:not(.menu-open)>.stats{grid-column:1/-1;grid-row:1;padding:3px 10px!important;align-items:center;font-size:12px}.base-building-page>.stats small{display:inline;margin-right:5px;font-size:10px}
.base-building-page:not(.menu-open)>.page-heading{grid-column:1/-1;grid-row:2;display:flex!important;padding:3px 12px!important}.base-building-page .page-heading small{display:none}.base-building-page .page-heading strong{font-size:17px}.base-building-page .page-heading button{min-height:32px;padding:3px 12px}
.base-building-page:not(.menu-open)>.field{grid-column:1;grid-row:3;min-height:0!important;min-width:0;border-right:1px solid #9b976455}.base-building-page .mapTitle{top:6px;left:6px;padding:5px 7px;max-width:80%}.base-building-page .mapTitle b{font-size:11px}.base-building-page .mapTitle span{font-size:9px}.base-building-page .hpbar{display:none}
.base-building-page:not(.menu-open)>#panel{grid-column:2;grid-row:3;display:flex;flex-direction:column;justify-content:space-between;min-height:0;max-height:none!important;overflow:hidden;padding:9px!important;gap:6px}
.base-building-page #panel .base-tabs{display:flex;gap:5px;margin:0}.base-building-page .base-tabs button{flex:1;min-height:33px;padding:4px;font-size:10px}.base-building-page #panel h3{font-size:12px;margin:0}.base-building-page #panel h3 span{font-size:9px}.base-building-page #panel .cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.base-building-page #panel .cards button{padding:6px 2px;min-height:75px;font-size:10px}.base-building-page #panel .construction-art{height:36px!important;width:45px}.base-building-page #panel .cards small{font-size:9px;margin-top:4px}.base-building-page #panel p{font-size:10px;margin:0;line-height:1.4}.base-building-page #panel .planning-link{min-height:31px;font-size:10px;margin:0;padding:4px}.base-building-page #panel .menu-pager{display:none}
}
@media(orientation:landscape) and (max-height:340px){.app.base-building-page:not(.menu-open):not(.in-combat){grid-template-rows:28px 37px minmax(0,1fr)}.base-building-page #panel{gap:3px!important;padding:5px!important}.base-building-page #panel .construction-art{height:26px!important}.base-building-page #panel .cards button{min-height:60px}.base-building-page .base-tabs button{min-height:28px}.base-building-page #panel p{font-size:9px}}
