/* Short landscape gameplay chrome. World/canvas transforms remain unchanged.
   Tower strips scroll within their own touch region; the battlefield never scrolls. */
@media (orientation: landscape) and (max-height: 700px) and (max-width: 1400px) {
  #app.game, #app.online-screen { --battle-left: max(6px, var(--safe-left, 0px)); --battle-right: max(6px, var(--safe-right, 0px)); --battle-top: max(6px, var(--safe-top, 0px)); --battle-bottom: max(6px, var(--safe-bottom, 0px)); min-height: 0; height: 100%; overflow: hidden; }
  #app.game canvas, #app.online-screen canvas { touch-action: none; }
  #app.game button, #app.online-screen button { user-select: none; -webkit-user-select: none; }
  #app.game > .hud { font-size: 12px; }
  #app.game > .hud > .top-left { left: var(--battle-left); top: var(--battle-top); gap: 5px; }
  #app.game > .hud > .top-left button { min-height: 44px; padding: 7px 10px; font-size: 12px; }
  #app.game > .hud > .top-center { left: 50%; top: var(--battle-top); transform: translateX(-50%); min-height: 40px; padding: 10px; font-size: 12px; }
  #app.game > .hud > .currency-hud { top: var(--battle-top); right: var(--battle-right); gap: 4px; flex-wrap: nowrap; }
  #app.game > .hud > .currency-hud > span,
  #app.game > .hud > .currency-hud > .top-right { min-height: 36px; padding: 6px 8px; font-size: 12px; }
  #app.game > .hud > .currency-hud svg, #app.game > .hud > .currency-hud .ruby-icon { width: 18px; height: 18px; }
  #app.game > .hud > .wave-chip { top: 53px; right: var(--battle-right); padding: 6px 9px; font-size: 11px; }
  #app.game > .hud > .speed { top: 54px; left: var(--battle-left); display: flex; flex-direction: row; gap: 4px; }
  #app.game > .hud > .speed button { width: 44px; min-width: 44px; min-height: 44px; padding: 5px; font-size: 12px; }
  #app.game > .hud > .countdown { top: 100px; font-size: 15px; }
  #app.game > .hud > .tower-storage { top: auto; left: var(--battle-left); bottom: calc(76px + var(--battle-bottom)); width: 58px; min-height: 44px; height: 44px; padding: 3px; }
  #app.game > .hud > .tower-storage span { font-size: 17px; line-height: 16px; }
  #app.game > .hud > .tower-storage small { font-size: 8px; line-height: 9px; }
  #app.game:not([data-mode="deltaBase"]) > .hud > .tower-bar {
    left: var(--battle-left); right: var(--battle-right); bottom: var(--battle-bottom); width: auto; max-width: none; height: 70px;
    display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: 5px; padding: 2px;
    overflow-x: auto; overflow-y: hidden; touch-action: pan-x; overscroll-behavior: contain;
    scrollbar-width: thin; -webkit-overflow-scrolling: touch;
  }
  #app.game > .hud > .tower-bar > .tower-card { flex: 0 0 82px; width: 82px; min-width: 82px; height: 62px; padding: 4px; font-size: 10px; }
  #app.game > .hud > .tower-bar .tower-thumb { width: 34px; height: 34px; max-height: 34px; }
  #app.game > .hud > .tower-bar .campaign-unlock-overlay { padding-left: 35%; gap: 2px; }
  #app.game > .hud > .tower-bar .campaign-unlock-overlay small { font-size: 8px; }
  #app.game .mission-premium-actions { right: var(--battle-right); bottom: calc(76px + var(--battle-bottom)); width: 145px; gap: 5px; }
  #app.game .hud:has(.tower-panel:not([hidden])) .mission-premium-actions { right: calc(241px + var(--battle-right)); }
  #app.game .mission-premium-actions > button { min-height: 44px; padding: 5px 8px; font-size: 11px; }
  #app.game .mission-premium-actions > button small { font-size: 9px; }
  #app.game .mission-premium-actions > button span,
  #app.game .mission-premium-actions > button b,
  #app.game .mission-premium-actions > button .ruby-ad-reward { font-size: 10px; line-height: 1.15; }
  #app.game > .ruby-bomb { top: 98px; right: var(--battle-right); width: 44px; height: 50px; }
  #app.game > .ruby-bomb > img { width: 26px; height: 26px; }
  #app.game > .ruby-bomb > span { gap: 3px; font-size: 10px; }
  #app.game > .ruby-bomb .inline-ruby { width: 13px; height: 13px; }
  #app.game .tower-panel, #app.game .endless-tower-panel { top: 96px; right: var(--battle-right); bottom: calc(76px + var(--battle-bottom)); width: min(235px, 45%); max-width: none; max-height: none; overflow-y: auto; padding: 10px; font-size: 12px; }
  #app.game .tower-panel button, #app.game .endless-tower-panel button { min-height: 44px; padding: 7px; font-size: 12px; }
  #app.game .tower-panel h3 { font-size: 14px; }
  #app.game .tower-panel p { font-size: 12px; }
  #app.game .toast { bottom: 80px; max-width: 65%; font-size: 12px; }
  #app.game .endless-hud { top: var(--battle-top); left: var(--battle-left); right: var(--battle-right); padding: 4px 6px; gap: 5px 6px; font-size: 11px; box-sizing: border-box; }
  #app.game .endless-hud .endless-map-name { flex: 1 1 100px; min-width: 0; max-width: 28%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #app.game .endless-hud > span { white-space: nowrap; font-variant-numeric: tabular-nums; }
  #app.game .endless-hud button { flex: 0 0 auto; min-width: 44px; min-height: 44px; padding: 6px 8px; font-size: 11px; line-height: 1.15; }
  #app.game .endless-tower-bar { left: var(--battle-left); right: var(--battle-right); bottom: var(--battle-bottom); justify-content: flex-start; gap: 5px; padding: 4px; height: 72px; overflow-x: auto; overflow-y: hidden; touch-action: pan-x; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  #app.game .endless-tower-bar button { flex: 0 0 82px; min-width: 82px; height: 62px; min-height: 62px; padding: 3px; font-size: 10px; line-height: 1.15; }
  #app.game .endless-tower-bar img { width: 30px; height: 30px; }
  #app.game .endless-feedback { bottom: 80px; font-size: 11px; }
  #app.game[data-mode="deltaBase"] > .hud { padding: var(--battle-top) var(--battle-right) var(--battle-bottom) var(--battle-left); gap: 5px; }
  #app.game[data-mode="deltaBase"] > .hud > .top-left { position: static; }
  #app.game[data-mode="deltaBase"] > .hud > .currency-hud { position: static; }
  #app.game[data-mode="deltaBase"] .delta-camera-controls { top: 55px; right: var(--battle-right); padding: 3px; gap: 4px; }
  #app.game[data-mode="deltaBase"] .delta-camera-controls button { min-height: 44px; min-width: 44px; padding: 5px 7px; font-size: 11px; }
  #app.game[data-mode="deltaBase"] .delta-placement-bar { height: 76px; }
  #app.game[data-mode="deltaBase"] .delta-placement-bar button { height: 66px; min-height: 66px; }
  #app.game[data-mode="deltaBase"] .delta-ownership { font-size: 9px; }
  #app.game[data-mode="deltaBase"] .delta-watch-ad { bottom: calc(80px + var(--battle-bottom)); right: var(--battle-right); width: 145px; min-height: 44px; height: auto; padding: 5px; font-size: 11px; }
  #app.game[data-mode="deltaBase"] .delta-watch-ad span, #app.game[data-mode="deltaBase"] .delta-watch-ad b { font-size: 10px; line-height: 1.15; }
  .training-battle .minigame-hud { display: flex; top: var(--battle-top); left: var(--battle-left); right: var(--battle-right); max-width: none; gap: 3px 8px; padding: 5px 7px; font-size: 11px; box-sizing: border-box; }
  .training-battle .mini-title { flex: 1 1 120px; min-width: 0; margin: 0; font-size: 13px; line-height: 1.2; order: 0; }
  .training-battle .mini-score, .training-battle .mini-time, .training-battle .mini-accuracy, .training-battle .mini-targets { order: 1; flex: 0 0 auto; font-size: 11px; }
  .training-battle .mini-eligibility { order: 2; flex: 1 0 100%; font-size: 10px; line-height: 1.2; text-align: left; }
  .training-battle .minigame-hud button { order: 3; flex: 1 1 60px; width: auto; min-width: 44px; min-height: 44px; padding: 5px; margin: 0; font-size: 11px; line-height: 1.15; text-align: center; }
  .training-battle .mini-instructions { display: none; top: calc(var(--battle-top) + 100px); bottom: auto; left: 8px; right: 8px; max-width: none; min-height: 0; margin: 0; font-size: 12px; }
  .training-battle .mini-instructions.expanded { display: block; max-height: calc(100% - 190px); overflow-y: auto; pointer-events: auto; }
  .training-battle .mini-tool-bar { bottom: var(--battle-bottom); padding: 4px; gap: 4px; max-width: calc(100% - var(--safe-left, 0px) - var(--safe-right, 0px) - 12px); touch-action: pan-x; overscroll-behavior: contain; }
  .training-battle .mini-tool-bar button { min-height: 48px; min-width: 122px; padding: 4px; font-size: 11px; }
  .training-battle .mini-tool-bar button span { min-width: 0; white-space: normal; overflow-wrap: normal; word-break: normal; text-align: left; font-size: 10px; line-height: 1.1; }
  .training-battle .mini-end-panel { box-sizing: border-box; max-width: calc(100% - var(--safe-left, 0px) - var(--safe-right, 0px) - 12px); max-height: calc(100% - var(--safe-top, 0px) - var(--safe-bottom, 0px) - 12px); overflow-y: auto; overscroll-behavior: contain; padding: 14px; }
  .training-battle .mini-end-panel h2 { margin: 4px 0; font-size: 17px; }
  .training-battle .mini-end-panel > strong { font-size: 30px; }
  .training-battle .mini-end-panel > div { margin-top: 12px; }
  .training-battle .mini-end-panel button { min-height: 44px; }

  #app.game .campaign-terminal { box-sizing: border-box; max-width: calc(100% - var(--safe-left, 0px) - var(--safe-right, 0px) - 12px); max-height: calc(100% - var(--safe-top, 0px) - var(--safe-bottom, 0px) - 12px); overflow-y: auto; overscroll-behavior: contain; padding: 16px; }
  #app.game .campaign-terminal h2 { margin: 4px 0 10px; font-size: 19px; }
  #app.game .campaign-terminal button { min-height: 44px; font-size: 12px; }

}
