/* Action labels have one line; descriptions and resources belong outside their hit surface. */
button .action-label,.plate-button>span:not(.price-badge),#command-page .game-action .action-label{white-space:nowrap;overflow-wrap:normal;word-break:normal}
#home-play.battle-button{display:flex;align-items:center;justify-content:center;gap:14px;min-height:76px;height:auto;padding:16px 13%;grid-template-rows:none;grid-template-columns:none;line-height:1.3;overflow:visible}
#home-play.battle-button>img{width:38px;height:38px;flex:none;grid-row:auto}#home-play.battle-button>span{font-size:clamp(21px,3.8vw,29px);white-space:nowrap;line-height:1.35;min-width:0}
.home-play-context{margin:5px 0 0;color:#b8d7dd;text-align:center;font-size:12px;line-height:1.5}.home-links{margin-top:8px}
.home-top{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 48px;align-items:start;gap:8px;left:max(14px,env(safe-area-inset-left));right:max(14px,env(safe-area-inset-right));max-width:560px;margin-inline:auto}
.home-resource{min-width:0;display:flex;flex-direction:column;align-items:stretch;gap:3px}.home-resource>.home-progress,.home-resource>.home-treasury{display:flex;align-items:center;justify-content:center;gap:7px;min-width:0;width:100%;height:56px;min-height:56px;padding:10px 15%;margin:0;background:var(--plate-resource) center/100% 100% no-repeat;border:0;border-radius:0;box-shadow:none;direction:rtl}
.home-resource>.home-progress img,.home-resource>.home-treasury img{position:static;width:30px;height:30px;flex:none;object-fit:contain;margin:0}.home-resource>.home-progress b,.home-resource>.home-treasury b{font:800 23px/1.15 Arial,sans-serif;font-variant-numeric:tabular-nums;color:#fff0b8}.home-resource-caption{display:block;text-align:center;font-size:11px;line-height:1.4;color:#dae7de;white-space:nowrap;text-shadow:0 1px 3px #071b2b}.home-top #home-settings{width:48px;height:48px;min-width:48px}
.hud-bottom .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.combat-action{display:flex;align-items:center;gap:4px;min-width:0}.combat-action.deploy-action{grid-column:1/-1;grid-row:2}.combat-action>.upgrade-button,.combat-action>.deploy-button{display:flex;flex-direction:row;align-items:center;justify-content:center;flex:1;gap:5px;width:auto;min-width:0;height:49px;min-height:49px;padding:9px 11%;margin:0;background:var(--plate-blue) center/100% 100% no-repeat;border:0;border-radius:0;box-shadow:none;font-size:14px;line-height:1.3;color:#fff1c6;text-shadow:0 2px 2px #173b53;white-space:nowrap}
.hud-bottom .combat-action .action-art{position:static;display:block;width:31px;height:31px;margin:0;transform:none;flex:none;object-fit:contain}.combat-action .combat-action-label{display:block;white-space:nowrap;font-size:14px;line-height:1.3;letter-spacing:0}.combat-action .combat-cost{display:flex;align-items:center;justify-content:center;gap:3px;width:52px;min-width:52px;height:37px;padding:6px 7px;background:var(--plate-resource) center/100% 100% no-repeat;color:#ffe9ac;direction:ltr;white-space:nowrap}.combat-cost img,.combat-cost .cost-coin{position:static;width:19px;height:19px;object-fit:contain;margin:0}.combat-cost b{font:800 14px/1 Arial,sans-serif}.combat-context{margin:2px 0 0;text-align:center;font-size:10px;line-height:1.4;color:#a8cdd8;min-height:14px}.combat-action .upgrade-button:disabled,.combat-action .deploy-button:disabled{filter:saturate(.25) brightness(.65)}
.building-panel .building-upgrade,.building-panel .reward-button{display:flex;align-items:center;justify-content:center;gap:9px;min-height:62px;padding:12px 18px;white-space:nowrap}.building-panel .building-upgrade .building-art,.building-panel .reward-button .reward-art{position:static;flex:none;width:37px;height:37px;object-fit:contain;margin:0;transform:none}.building-panel .building-upgrade .action-label,.building-panel .reward-button .action-label{font-size:17px;white-space:nowrap}.compact-cost{display:inline-flex;align-items:center;gap:4px;margin-inline-start:auto;color:#ffe4a0;font:800 16px/1 Arial,sans-serif}.compact-cost::before{content:'';width:23px;height:23px;background:url('assets/ui-v4/coin.png') center/contain no-repeat}.building-context{margin:3px 0 12px;text-align:center;font-size:11px;line-height:1.5;color:#aecbd5}
.plate-button{white-space:nowrap;line-height:1.35}.build-entry{bottom:180px}.tower-actions .plate-button,.placement-buttons .plate-button{white-space:nowrap}
@media(max-width:350px){.home-top{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 42px;gap:5px;left:10px;right:10px}.home-top #home-settings{width:42px;height:42px;min-width:42px}.home-resource>.home-progress,.home-resource>.home-treasury{height:49px;min-height:49px;gap:4px;padding-inline:12%}.home-resource>.home-progress img,.home-resource>.home-treasury img{width:25px;height:25px}.home-resource>.home-progress b,.home-resource>.home-treasury b{font-size:20px}.home-resource-caption{font-size:10px}.combat-action .combat-action-label{font-size:12px}.combat-action>.upgrade-button{padding-inline:9%}.hud-bottom .combat-action .action-art{width:25px;height:25px}.combat-action .combat-cost{width:45px;min-width:45px;padding-inline:5px}.combat-cost b{font-size:12px}.combat-cost img{width:17px;height:17px}}
@media(max-height:700px) and (max-width:540px){.home-command{bottom:116px}.home-route{bottom:24px}#home-play.battle-button{min-height:65px;padding-block:12px}.home-play-context{font-size:11px}.home-links button{min-height:50px}.home-links img{width:31px;height:31px}}
@media(max-height:550px) and (min-width:541px){.home-top{left:20px;right:auto;width:350px;max-width:44%;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 42px}.home-resource>.home-progress,.home-resource>.home-treasury{height:48px;min-height:48px}.home-resource-caption{font-size:10px}.home-top #home-settings{width:42px;height:42px}#home-play.battle-button{min-height:63px;padding:10px 13%;gap:9px}#home-play.battle-button>img{width:30px;height:30px}#home-play.battle-button>span{font-size:22px}.home-play-context{font-size:10px;margin-top:2px}.home-links{margin-top:4px}.home-command{bottom:20px}.hud-bottom .actions{gap:4px}.combat-action>.upgrade-button,.combat-action>.deploy-button{height:43px;min-height:43px;padding-block:7px}.combat-context{font-size:9px;min-height:12px}.build-entry{bottom:max(10px,env(safe-area-inset-bottom))}}
@media(prefers-reduced-motion:reduce){#home-play,.combat-action>button{transition:none;animation:none}}
/* Wallet controls contain only their icon and balance, matching other one-line controls. */
.battle-wallet-resource,.page-wallet-resource{display:flex;flex-direction:column;align-items:stretch;gap:2px;min-width:0;flex:none}.resource-caption{display:block;color:#c1d8da;text-align:center;font-size:10px;line-height:1.4;white-space:nowrap}#game[data-screen=battle] .battle-wallet-resource .wallet{display:flex;align-items:center;justify-content:center;gap:5px;padding:9px 15%;min-height:49px;height:49px;width:102px;min-width:102px}#game[data-screen=battle] .battle-wallet-resource .wallet .ui-art{position:static;width:27px;height:27px;margin:0}#game[data-screen=battle] .battle-wallet-resource .wallet #coins{position:static;font-size:20px;line-height:1.2;margin:0}.heading>.battle-wallet-resource{flex:none}
#command-page .page-wallet-resource{min-width:0}#command-page .page-wallet-resource .page-wallet{display:flex;align-items:center;justify-content:center;gap:5px;width:100%;min-width:0;padding:8px 12%;height:51px;min-height:51px}#command-page .page-wallet-resource .page-wallet>img{position:static;width:25px;height:25px;margin:0}#command-page .page-wallet-resource .page-wallet>b{position:static;font:800 20px/1.2 Arial,sans-serif;margin:0}#command-page .page-wallet-resource .resource-caption{font-size:10px}
@media(max-height:550px) and (min-width:541px){#game[data-screen=battle] .battle-wallet-resource .wallet{height:43px;min-height:43px;min-width:90px;width:90px}.battle-wallet-resource .resource-caption{font-size:9px}#game[data-screen=battle] .battle-wallet-resource .wallet #coins{font-size:18px}#command-page .page-wallet-resource .page-wallet{height:43px;min-height:43px}}
/* Retire the old raised-button geometry; the painted plate is the full action surface. */
.hud-bottom .combat-action>button::before,.hud-bottom .combat-action>button::after{content:none;display:none}
.building-panel .building-upgrade,.building-panel .reward-button{flex-direction:row}
#command-page .page-wallet-resource .page-wallet{max-width:none}
#game[data-screen=battle] .battle-wallet-resource .wallet{background:var(--plate-resource) center/100% 100% no-repeat;border:0;border-radius:0;box-shadow:none}

#command-page .page-wallet-resource .page-wallet{background:var(--plate-resource) center/100% 100% no-repeat;border:0;border-radius:0;box-shadow:none}
@media(max-height:550px) and (min-width:541px){.hud-bottom .combat-action .action-art{width:24px;height:24px}.combat-action .combat-action-label{font-size:12px}}
#command-page .command-resources .page-wallet-resource{width:116px;min-width:104px}
.upgrade-level,.tower-vitality>b{direction:ltr;unicode-bidi:isolate}
