.mobile-action-dock{flex:none;padding:9px 11px;background:#e8efd9;border:1px solid #bdccab;border-radius:7px;margin:3px 0 8px}.mobile-action-dock>strong{display:block;font-size:11px;color:#245655;margin-bottom:7px}.mobile-action-dock .tower-actions{display:grid!important;grid-template-columns:1.25fr 1fr;gap:9px;margin:0!important}.mobile-action-dock .tower-actions button{min-height:46px!important;border-radius:6px!important;font-size:13px!important;font-weight:800;padding:8px 9px!important;line-height:1.3;touch-action:manipulation}.mobile-action-dock #upgrade{background:#206d5e!important;color:#fffce8!important;border:1px solid #145647!important;box-shadow:0 3px 0 #164d43}.mobile-action-dock #sell{background:#f5dfca!important;color:#864a2f!important;border:1px solid #ce9673!important;box-shadow:0 3px 0 #d1ad8b}.mobile-action-dock #upgrade::before{content:'↑';font-size:19px;margin-right:6px}.mobile-action-dock #sell::before{content:'↶';font-size:18px;margin-right:6px}.mobile-action-dock button:disabled{box-shadow:none!important;opacity:.5}.mobile-action-dock button:not(:disabled):active{transform:translateY(2px);box-shadow:none!important}.mobile-action-dock button:focus-visible{outline:3px solid #e3aa4e;outline-offset:3px}.has-mobile-actions .inspect-heading .eyebrow{font-size:11px!important;color:#205d53}
.orientation-help{position:absolute;z-index:260;top:max(84px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);width:min(350px,calc(100% - 28px));padding:18px 20px;background:#fbf6df;border:1px solid #d2bd81;border-radius:10px;color:#194b50;box-shadow:0 12px 50px #061f35aa;text-align:center}.orientation-help .rotate-symbol{display:block;font-size:30px;color:#347867;margin-bottom:7px}.orientation-help h2{font-size:21px;line-height:1.2;margin:0 0 10px}.orientation-help p{font-size:11px;line-height:1.65;margin:0 0 12px;color:#587268}.orientation-help button{width:100%;min-height:42px;border:1px solid #b5c6a7;border-radius:5px;font-size:12px;font-weight:700;padding:8px;background:#e8efd9;color:#245b50;touch-action:manipulation}.orientation-help #orientation-dismiss{background:#21665c;color:#fff9dc;border-color:#21665c;margin-top:8px}.orientation-help small{display:block;font-size:10px;line-height:1.5;margin-top:10px;color:#6b7966}
@media(max-width:700px) and (orientation:portrait){
 .game-shell.is-viewport .game-top{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:5px 8px;padding:7px 10px;flex-shrink:0}
 .game-shell.is-viewport .map-label{display:flex!important;grid-column:1;grid-row:1;font-size:10px;min-width:0}.game-shell.is-viewport .map-label .mode-label{display:none}.game-shell.is-viewport .game-tools{grid-column:1/-1;grid-row:2;display:flex;width:100%;justify-content:space-between;margin:0;gap:5px}
 .game-shell.is-viewport .game-top>#fullscreen{grid-column:2;grid-row:1;min-height:39px;min-width:107px;padding:7px 10px;font-size:12px;font-weight:800;background:#edce83;color:#164e4b;border-color:#f3d692;box-shadow:0 2px 0 #977d47}.game-top>#fullscreen .fullscreen-label{font-size:12px;margin-left:5px}.game-shell.is-viewport .game-tools .icon-button{min-height:34px;font-size:10px;padding:5px 9px}
 .mobile-action-dock{padding:7px 8px;margin:2px 0 6px}.mobile-action-dock>strong{font-size:10px;margin-bottom:6px}.mobile-action-dock .tower-actions button{min-height:44px!important;font-size:12px!important}.game-shell.is-viewport .command.has-mobile-actions{gap:4px}.game-shell.is-viewport .command.has-mobile-actions .command-status{margin-top:2px}
}
@media(max-width:520px) and (max-height:740px) and (orientation:portrait){
 #play .overlay.intro-overlay{inset:52px 0 0;padding:8px 10px}
 #play .intro-overlay.expanded .modal{padding:10px 14px;gap:7px}
 .intro-overlay .intro-head .eyebrow,.intro-overlay .intro-head>p:last-child,.intro-overlay .intro-play-options,.intro-overlay .island-medals{display:none!important}
 #play .intro-overlay .intro-head h2{font-size:22px;margin:0}
 .intro-overlay .intro-grid,.intro-overlay .intro-settings{gap:7px}
 .intro-overlay .map-choice,.intro-overlay .difficulty-choice,.intro-overlay .contract-choice{padding:6px 8px}
 .intro-overlay .island-preview svg{width:76px;max-height:52px}.intro-overlay .island-preview p{font-size:9px!important;line-height:1.35!important}.intro-overlay .island-preview small{font-size:8px!important}
 .intro-overlay .difficulty-choice p{font-size:9px!important;line-height:1.35!important;margin:4px 0 0!important}
 .intro-overlay .intro-actions{padding-top:7px;gap:6px}.intro-overlay .intro-actions .primary,.intro-overlay .intro-fullscreen{min-height:44px!important}
 #play .overlay.expedition-intro{inset:52px 0 0;padding:8px 10px}
 #play .overlay.expedition-intro .modal{padding:12px 15px}
 .expedition-intro .expedition-heading .eyebrow{font-size:8px;margin-bottom:4px}.expedition-intro .expedition-heading h2{font-size:23px!important;margin-bottom:6px}.expedition-intro .expedition-heading>p:last-child{font-size:10px!important;line-height:1.35;margin-bottom:8px}
 .expedition-intro .expedition-map{padding:6px;gap:9px;margin:8px 0}.expedition-intro .expedition-map img{width:85px;height:58px}.expedition-intro .expedition-map p{font-size:10px!important;margin:4px 0!important}.expedition-intro .expedition-map small{font-size:8px!important}
 .expedition-intro .expedition-steps{gap:5px;margin:8px 0}.expedition-intro .expedition-steps li{padding:6px}.expedition-intro .expedition-steps b{font-size:18px}.expedition-intro .expedition-steps span{font-size:10px;margin:3px 0}.expedition-intro .expedition-steps small{font-size:8px!important;line-height:1.3}
 .expedition-intro .expedition-note,.expedition-intro .expedition-storage{font-size:8px!important;line-height:1.35;margin:7px 0!important}.expedition-intro .expedition-best{font-size:10px!important;margin:7px 0!important}.expedition-intro .expedition-actions{margin-top:8px}
}
@media(max-height:550px) and (orientation:landscape){
 #play .overlay .modal:has(#confirm-sell){padding:12px 20px;max-width:550px}
 .modal:has(#confirm-sell) h2{font-size:23px!important;margin:5px 0!important}.modal:has(#confirm-sell) .eyebrow{font-size:8px!important;margin:0 0 5px!important}.modal:has(#confirm-sell) p{font-size:10px!important;line-height:1.4!important;margin:6px 0!important}
 #play .modal:has(#confirm-sell) .primary{min-height:44px;margin-top:8px!important;font-size:11px}.modal:has(#confirm-sell) .sell-confirm{margin-top:7px;font-size:11px}
}
@media(max-height:340px) and (orientation:landscape){#play .overlay.expedition-intro{inset:52px 0 0;padding:6px 12px}}
@media(max-height:550px) and (orientation:landscape){.game-shell.is-viewport #fullscreen{background:#edce83;color:#164e4b;border-color:#f3d692;font-size:11px;min-height:36px}.game-shell.is-viewport #fullscreen .fullscreen-label{font-size:11px}.mobile-action-dock{padding:7px 8px;margin:2px 0 6px}.mobile-action-dock>strong{font-size:10px;margin-bottom:5px}.mobile-action-dock .tower-actions{gap:7px}.mobile-action-dock .tower-actions button{min-height:42px!important;font-size:11px!important;padding:6px!important}.orientation-help{top:55px}}
@media(prefers-reduced-motion:reduce){.mobile-action-dock button:not(:disabled):active{transform:none}}
@media(display-mode:standalone),(display-mode:fullscreen){.game-shell.is-viewport{padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}}

.mobile-action-dock{padding:0!important;margin:5px 0 8px!important;border:0;background:none;border-radius:0}.mobile-action-dock>strong[hidden]{display:none!important}
@media(max-width:700px) and (orientation:portrait){.game-shell.is-viewport .command.has-mobile-actions:not([data-expanded=true]){height:202px!important}.game-shell.is-viewport .command.has-mobile-actions[data-expanded=true]:has(.inspect[data-view=stats]) .control-heading,.game-shell.is-viewport .command.has-mobile-actions[data-expanded=true]:has(.inspect[data-view=branches]) .control-heading{display:none}.game-shell.is-viewport .game-top>#fullscreen{min-height:44px}}
@media(max-width:700px) and (orientation:portrait){.has-mobile-actions .inspect[data-view=stats] .overdrive-hint{display:none!important}}
@media(max-height:550px) and (orientation:landscape){.game-shell.is-viewport .command.has-mobile-actions:has(.inspect[data-view=stats]) .control-heading,.game-shell.is-viewport .command.has-mobile-actions:has(.inspect[data-view=branches]) .control-heading{display:none}.has-mobile-actions .inspect[data-view=stats] .overdrive-hint{display:none!important}.mobile-action-dock .tower-actions button{min-height:44px!important}}
@media(max-height:360px) and (orientation:landscape){
 .intro-overlay.expanded .modal{padding:12px 16px;gap:7px}.intro-overlay .intro-head .eyebrow,.intro-overlay .intro-head>p:last-child,.intro-overlay .intro-play-options,.intro-overlay .island-preview svg,.intro-overlay .island-medals,.intro-overlay .difficulty-choice p,.intro-overlay .intro-actions .text-button{display:none!important}
 .intro-overlay .intro-head h2{font-size:22px!important;margin:0!important}.intro-overlay .intro-grid{gap:10px}.intro-overlay .map-choice,.intro-overlay .difficulty-choice,.intro-overlay .contract-choice{padding:6px 8px}.intro-overlay .intro-settings{gap:6px}.intro-overlay .map-choice select,.intro-overlay .difficulty-choice select,.intro-overlay .contract-choice select{min-height:32px;padding:5px 7px;font-size:10px}.intro-overlay .island-preview{margin-top:5px}.intro-overlay .island-preview p{font-size:9px!important;line-height:1.35!important;margin:0!important}.intro-overlay .island-preview small{font-size:8px!important;margin-top:3px}.intro-overlay .intro-actions{padding-top:6px;gap:8px}.intro-overlay .intro-actions .primary,.intro-overlay .intro-fullscreen{min-height:40px;font-size:11px;padding:7px}.intro-overlay .contract-choice p{font-size:9px!important;line-height:1.35!important;margin:4px 0!important}
 .overlay .modal:has(#confirm-sell){padding:14px 20px;max-width:550px}.modal:has(#confirm-sell) h2{font-size:23px!important;margin:5px 0!important}.modal:has(#confirm-sell) .eyebrow{font-size:8px!important;margin:0 0 5px!important}.modal:has(#confirm-sell) p{font-size:10px!important;line-height:1.4!important;margin:6px 0!important}.modal:has(#confirm-sell) .primary{min-height:44px;margin-top:8px!important;font-size:11px}.modal:has(#confirm-sell) .sell-confirm{min-height:44px;margin-top:7px;font-size:11px}
}
.game-shell.is-viewport.landscape-stage .game-layout{grid-template-columns:minmax(0,1fr) 280px!important}.landscape-stage .battle-column{position:relative}.game-shell.is-viewport.landscape-stage .hud{position:absolute;z-index:4;top:0;left:0;right:0;height:48px;background:#173f41ed;border-radius:0 0 6px 6px;padding:2px 6px}.game-shell.is-viewport.landscape-stage .gold-wallet{min-width:128px;padding:3px 7px;gap:6px}.game-shell.is-viewport.landscape-stage #gold{font-size:25px}.landscape-stage .gold-wallet>.hud-icon{font-size:20px}.landscape-stage .gold-wallet small{font-size:7px!important}.landscape-stage .gold-context{font-size:8px}.landscape-stage .hud>div:not(.gold-wallet){gap:5px}.landscape-stage .hud>div:not(.gold-wallet) .hud-icon{display:none}.landscape-stage .hud strong{font-size:18px}.landscape-stage #round-clock{display:none!important}.game-shell.is-viewport.landscape-stage .mission-tip{display:none!important}.game-shell.is-viewport.landscape-stage .board{padding-bottom:33px}.game-shell.is-viewport.landscape-stage .battle-footer{position:absolute;z-index:5;bottom:0;left:0;right:0;min-height:30px;padding:2px 8px;justify-content:flex-end;background:#173f41}.landscape-stage .battle-footer>span:first-child{display:none}.landscape-stage .battle-footer .coverage-toggle,.landscape-stage .battle-footer .text-button{font-size:9px;min-height:26px;padding:4px 7px}
.game-shell.is-viewport.landscape-stage .command{padding:6px;gap:4px;overflow:visible}.game-shell.is-viewport.landscape-stage .tower-dock{padding:0;background:none;border:0;flex:none}.game-shell.is-viewport.landscape-stage .tower-dock .tower-shop{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px}.game-shell.is-viewport.landscape-stage .tower-dock .tower-card{display:grid;grid-template-columns:18px minmax(0,1fr);min-height:44px;padding:4px;gap:2px 4px}.game-shell.is-viewport.landscape-stage .tower-dock .tower-icon{width:18px;height:21px;font-size:16px;grid-row:1/3;margin:0}.game-shell.is-viewport.landscape-stage .tower-dock .tower-copy strong{font-size:9px;line-height:1.1}.game-shell.is-viewport.landscape-stage .tower-dock .tower-copy small,.landscape-stage .tower-dock kbd{display:none!important}.game-shell.is-viewport.landscape-stage .tower-dock .price{font-size:9px}.landscape-stage .tower-shortfall{font-size:7px;right:2px;bottom:2px;padding:1px 2px}.landscape-stage .control-heading{gap:4px;align-items:center}.landscape-stage .control-tabs{gap:4px}.game-shell.is-viewport.landscape-stage .control-tabs button{font-size:9px;min-height:26px;padding:4px}.landscape-stage .control-heading .site-selector{flex:none;position:relative}.landscape-stage .control-heading .site-selector summary{font-size:8px;min-height:26px;padding:4px}.landscape-stage .control-heading .site-selector summary span{display:none}.game-shell.is-viewport.landscape-stage .wave-control{display:none!important}.landscape-stage .dock-actions{position:static!important;order:20;flex:none;display:flex;gap:4px;margin:0!important;padding:0;min-height:34px}.game-shell.is-viewport.landscape-stage .dock-actions .pulse-button,.game-shell.is-viewport.landscape-stage .dock-actions .snare-button,.game-shell.is-viewport.landscape-stage .dock-actions #quick-wave{min-height:34px;padding:4px;min-width:0;flex:1;gap:3px}.game-shell.is-viewport.landscape-stage .dock-actions .pulse-button>span:first-child,.game-shell.is-viewport.landscape-stage .dock-actions .snare-button>span:first-child{font-size:15px}.landscape-stage .dock-actions strong,.landscape-stage .dock-actions #quick-wave b{font-size:8px!important}.landscape-stage .dock-actions small,.landscape-stage .dock-actions .early-bonus,.landscape-stage .dock-actions #round-recap{display:none!important}.landscape-stage .dock-actions #quick-time{font-size:13px!important}.landscape-stage .dock-actions #aim-info{position:absolute!important;left:8px;bottom:38px;right:8px;max-width:none;background:#edf2dc;z-index:6}
.game-shell.is-viewport.landscape-stage:not(.is-practicing) .command[data-expanded=true]:has(.inspect[data-occupied=true]) .tower-dock,.game-shell.is-viewport.landscape-stage .command[data-panel=intel] .tower-dock{display:none!important}.landscape-stage .command[data-expanded=false] .inspect-tabs{margin-bottom:0}.landscape-stage .command[data-expanded=false] .inspect-tabs button{min-height:26px}.game-shell.is-viewport.landscape-stage .inspect:not([data-occupied=true])>p:not(.eyebrow){display:none}.landscape-stage .inspect[data-occupied=true] .inspect-heading .eyebrow{font-size:10px!important;margin-bottom:4px}.landscape-stage .mobile-action-dock{margin:4px 0 6px!important}.landscape-stage .inspect [data-inspect-panel=stats]>p:first-child:not(.weapon-note){display:none}.landscape-stage .inspect .upgrade-comparison{padding:6px;margin:5px 0}.landscape-stage .tower-live{padding:5px 0;margin-bottom:4px}.landscape-stage .tower-live p{margin-top:3px!important}.landscape-stage .command-status .command-nudge{display:none!important}

.map-label #expedition-tactics{pointer-events:auto;flex:none;background:#315953;border:1px solid #789179;border-radius:4px;padding:4px 7px;color:#ffe5a4;font-size:10px;min-height:30px;white-space:nowrap}.board-badge:has(#board-caption[hidden]){display:none!important}.landscape-stage .board-badge{display:none!important}.landscape-stage .mobile-action-dock{margin:3px 0!important}
@media(max-width:700px) and (orientation:portrait){.map-label #expedition-tactics{font-size:8px;min-height:28px;padding:4px}.map-label #map-title{white-space:nowrap;letter-spacing:0}}
.landscape-stage .upgrade-comparison dl{margin:3px 0 0;gap:5px}.landscape-stage .upgrade-comparison dl>div{margin-top:0;gap:2px}.landscape-stage .upgrade-comparison dt{font-size:8px;line-height:1.2}.landscape-stage .upgrade-comparison dd{font-size:9px;line-height:1.2}.landscape-stage .upgrade-comparison>strong{font-size:9px;line-height:1.2}.landscape-stage .tower-live p{display:none!important}.landscape-stage .tower-live>div{margin-top:3px}
.landscape-stage .inspect[data-view=stats]:has(.upgrade-comparison) .stat-line,.landscape-stage .tower-live>span{display:none!important}
@media(max-height:360px) and (orientation:landscape){
 .overlay.expedition-intro .modal{padding:12px 18px;gap:6px 16px}.expedition-intro .expedition-steps small{display:none}.expedition-intro .expedition-steps b{font-size:15px}.expedition-intro .expedition-steps li{padding:4px}.expedition-intro .expedition-heading h2{font-size:21px!important}.expedition-intro .expedition-map{padding:6px;gap:8px}.expedition-intro .expedition-map img{width:76px;height:48px}.expedition-intro .expedition-map strong{font-size:13px}.expedition-intro .expedition-map p{font-size:9px!important;margin:3px 0!important}.expedition-intro .expedition-map small{font-size:8px!important;line-height:1.2}.expedition-intro .expedition-actions .primary,.expedition-intro .expedition-actions .text-button{min-height:40px!important}.expedition-intro .expedition-storage{font-size:8px!important;margin:2px 0!important}
 .overlay.draft-overlay .modal{padding:12px 18px;gap:6px 16px}.draft-overlay .expedition-heading h2{font-size:20px!important}.draft-overlay .doctrine-grid{gap:5px}.draft-overlay .doctrine-card{padding:6px 8px;gap:2px 7px}.draft-overlay .doctrine-card strong{font-size:11px}.draft-overlay .doctrine-card p{font-size:9px!important}.draft-overlay .expedition-actions .primary{min-height:40px!important}
 .overlay.brief-overlay .modal{padding:12px 18px;gap:5px 16px}.brief-overlay .modal>.eyebrow{grid-column:1;grid-row:1;font-size:8px!important}.brief-overlay .modal>h2{grid-column:1;grid-row:2;font-size:21px!important}.brief-overlay .pause-context{grid-column:1;grid-row:3;font-size:9px!important;line-height:1.4!important}.brief-overlay .pause-ledger{grid-column:1;grid-row:4;margin:3px 0;padding:4px 0}.brief-overlay .pause-ledger dd{font-size:18px;margin-top:3px}.brief-overlay .pause-field-note{grid-column:2;grid-row:1/4;grid-template-columns:40px minmax(0,1fr)}.brief-overlay .pause-field-note>img{width:40px;height:40px}.brief-overlay .pause-field-note p:last-child{font-size:10px!important;line-height:1.35!important}.brief-overlay .pause-limit{display:none}.brief-overlay .checkpoint-pause-status{grid-column:2;grid-row:4;font-size:9px!important;margin:0!important;align-self:center}.overlay.brief-overlay .modal .primary{grid-column:1;grid-row:5;min-height:40px}.brief-overlay .modal .pause-focus{grid-column:2;grid-row:5;min-height:40px}.brief-overlay #pause-guide{grid-column:1/-1;grid-row:6;min-height:26px!important}
}
@media(max-height:360px) and (orientation:landscape){.expedition-intro .expedition-map{margin:0!important}}
@media(max-height:360px) and (orientation:landscape){
 .overlay.checkpoint-overlay .modal{padding:12px 18px;gap:6px 16px}.checkpoint-heading h2{font-size:21px!important;margin-bottom:5px}.checkpoint-heading>.eyebrow{font-size:8px!important;margin-bottom:4px}.checkpoint-heading>p:last-child{font-size:9px!important;line-height:1.3;margin:0}.checkpoint-overview{gap:10px}.checkpoint-map{height:100px}.checkpoint-summary h3{font-size:16px}.checkpoint-summary dl{gap:5px;margin-top:5px}.checkpoint-summary>p:not(.eyebrow){line-height:1.3}.checkpoint-loadout{padding:7px 9px!important}.checkpoint-actions{flex-direction:row;gap:8px;align-items:stretch}.checkpoint-actions .primary,.checkpoint-actions .text-button{flex:1;min-width:0;min-height:40px!important;margin:0!important;padding:6px!important;font-size:10px!important;line-height:1.3}.checkpoint-overlay .modal>small{font-size:8px!important;line-height:1.2}
 .draft-overlay .doctrine-preview{display:grid;grid-template-columns:1fr 1fr;gap:3px 8px;padding:6px 9px}.draft-overlay .doctrine-preview>strong{grid-column:1;grid-row:1;font-size:10px;line-height:1.3}.draft-overlay .doctrine-preview>p{grid-column:2;grid-row:1;font-size:9px!important;line-height:1.3!important;margin:0!important}.draft-overlay .doctrine-preview dl{grid-column:1/-1;grid-row:2;margin:3px 0 0;gap:5px}.draft-overlay .doctrine-preview dt{font-size:8px;line-height:1.2}.draft-overlay .doctrine-preview dd{font-size:11px;line-height:1.2;margin-top:1px}.draft-overlay .doctrine-card:disabled p{display:none}.draft-overlay .doctrine-card small{line-height:1.3}
 .expedition-overlay #modal-content:has(#close-expedition-loadout){padding:12px 18px}.expedition-overlay #modal-content:has(#close-expedition-loadout)>h2{font-size:21px;margin-bottom:6px}.expedition-overlay #modal-content:has(#close-expedition-loadout) .doctrine-summary{margin:8px 0}.expedition-overlay #modal-content:has(#close-expedition-loadout) .doctrine-summary article{padding:7px}.expedition-overlay #modal-content:has(#close-expedition-loadout) .doctrine-summary p{font-size:9px!important;line-height:1.4}.expedition-overlay #modal-content:has(#close-expedition-loadout)>.primary{min-height:40px;margin-top:6px}
 .expedition-overlay #modal-content:has(#expedition-retry){padding:12px 18px;gap:5px 16px}.expedition-overlay #modal-content:has(#expedition-retry)>h2{font-size:21px!important;line-height:1.2}.expedition-overlay #modal-content:has(#expedition-retry)>.eyebrow{font-size:8px!important;line-height:1.2}.expedition-overlay #modal-content:has(#expedition-retry) .result-stats{margin:4px 0}.expedition-overlay #modal-content:has(#expedition-retry) .result-stats strong{font-size:20px;line-height:1.1}.expedition-overlay #modal-content:has(#expedition-retry) .result-stats span{font-size:8px;line-height:1.2}.expedition-overlay #modal-content:has(#expedition-retry) .doctrine-summary article{padding:6px 8px}.expedition-overlay #modal-content:has(#expedition-retry) .doctrine-summary strong{font-size:10px;line-height:1.2}.expedition-overlay #modal-content:has(#expedition-retry) .doctrine-summary p{font-size:9px!important;line-height:1.3;margin-top:3px!important}
}
@media(max-height:360px) and (orientation:landscape){.overlay.brief-overlay .modal{padding:10px 18px;gap:4px 16px}}

/* Explain the real action inside its existing touch target. */
.tower-actions .action-detail{display:none}
.mobile-action-dock .tower-actions button.has-action-detail{display:grid!important;grid-template-columns:15px minmax(0,1fr);grid-template-rows:auto auto;align-content:center;column-gap:4px;row-gap:2px;padding:5px 6px!important}
.mobile-action-dock .tower-actions button.has-action-detail::before{grid-column:1;grid-row:1/3;align-self:center;margin:0!important}
.mobile-action-dock .action-name{grid-column:2;grid-row:1}
.mobile-action-dock .action-detail{display:block;grid-column:2;grid-row:2;font-size:9px;line-height:1.2;font-weight:600;overflow-wrap:anywhere}
.mobile-action-dock button:disabled{opacity:.8!important}
.mobile-action-dock #upgrade[data-action-state=shortfall]{background:#e5e8d9!important;color:#4d6154!important;border-color:#a7b3a1!important}
.mobile-action-dock #upgrade[data-action-state=shortfall] .action-detail{color:#87502d}
.mobile-action-dock .tower-actions:has(>#mobile-build){grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) 60px!important;gap:6px}
.mobile-action-dock .tower-actions #mobile-build{background:#efd28b!important;color:#174b48!important;border:1px solid #c7a85f!important;box-shadow:0 3px 0 #baa16a;font-size:11px!important;padding:5px 4px!important;white-space:normal;line-height:1.3}

/* Browser tabs need the same notch / Home-indicator protection as installed apps.
   Constrain the entire stage so its absolute dialogs share the usable rectangle. */
:root{--tg-safe-top:env(safe-area-inset-top,0px);--tg-safe-right:env(safe-area-inset-right,0px);--tg-safe-bottom:env(safe-area-inset-bottom,0px);--tg-safe-left:env(safe-area-inset-left,0px)}
@media(any-pointer:coarse),(pointer:coarse){
 body.game-page{background:#173f49}
 #play.game-shell.is-viewport:not(.compat-horizontal){inset:var(--tg-safe-top) var(--tg-safe-right) var(--tg-safe-bottom) var(--tg-safe-left)!important;width:calc(100% - var(--tg-safe-left) - var(--tg-safe-right))!important;height:calc(100vh - var(--tg-safe-top) - var(--tg-safe-bottom))!important;height:calc(100dvh - var(--tg-safe-top) - var(--tg-safe-bottom))!important;padding:0!important;border:0;border-radius:0}
 #play.game-shell.is-viewport .game-top{position:relative!important;inset:auto!important;padding-left:10px;padding-right:10px}
 #play.game-shell.is-viewport .overlay.expanded{position:absolute}
 #play.game-shell.is-viewport .overlay.expanded .modal{max-height:100%}
 #play #confirm-sell,#play #cancel-sell{min-height:44px}
 #play canvas,#play [data-tower],#play button{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
}
