/*
 * Canonical in-match mobile shell.
 *
 * mobile-fixes.css still owns the authentication and launcher layouts. During an
 * active mobile match game.js disables that legacy sheet and enables this scope,
 * so the arena has one predictable responsive system instead of cumulative fixes.
 */

body.mobile-game-v2 {
  --mg-safe-top: max(8px, env(safe-area-inset-top));
  --mg-safe-right: max(8px, env(safe-area-inset-right));
  --mg-safe-bottom: max(8px, env(safe-area-inset-bottom));
  --mg-safe-left: max(8px, env(safe-area-inset-left));
  --mg-bg: #040908;
  --mg-surface: #091410;
  --mg-surface-high: #10201a;
  --mg-surface-soft: rgba(9, 20, 16, 0.94);
  --mg-line: rgba(137, 180, 158, 0.24);
  --mg-line-strong: rgba(99, 230, 220, 0.5);
  --mg-text: #fff8e8;
  --mg-muted: #9fb4aa;
  --mg-gold: #f4c95d;
  --mg-cyan: #63e6dc;
  --mg-green: #77d18a;
  --mg-danger: #ff6b6b;
  --mg-hud-height: 100px;
  --mg-dock-height: 68px;
  --mg-dock-gap: 8px;
  --mg-sheet-height: min(40dvh, 420px);
  --mg-radius-sm: 10px;
  --mg-radius: 14px;
  --mg-radius-lg: 18px;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  min-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--mg-bg);
  color: var(--mg-text);
  -webkit-tap-highlight-color: transparent;
}

/* Mobile browser chrome / PWA hand-off ------------------------------------- */

.mobile-fullscreen-prompt[hidden],
.mobile-fullscreen-menu-button[hidden] {
  display: none !important;
}

@media (hover: none), (pointer: coarse), (max-width: 1100px) {
  body.game-fullscreen-active {
    min-height: 100dvh;
    min-height: -webkit-fill-available;
  }

  .mobile-fullscreen-menu-button:not([hidden]) {
    display: block;
    border-color: rgba(99, 230, 220, 0.5) !important;
    color: #b8fff3 !important;
  }

  .mobile-fullscreen-prompt {
    box-sizing: border-box;
    position: fixed;
    z-index: 180;
    top: max(10px, env(safe-area-inset-top));
    left: 50%;
    width: min(520px, calc(100vw - max(24px, env(safe-area-inset-left)) - max(24px, env(safe-area-inset-right))));
    max-height: calc(100dvh - max(20px, env(safe-area-inset-top)) - max(20px, env(safe-area-inset-bottom)));
    padding: 12px 48px 12px 14px;
    overflow: auto;
    color: #f4fff9;
    border: 1px solid rgba(99, 230, 220, 0.58);
    border-radius: 14px;
    background:
      radial-gradient(circle at 8% 0%, rgba(99, 230, 220, 0.16), transparent 42%),
      linear-gradient(145deg, rgba(5, 18, 14, 0.985), rgba(5, 12, 10, 0.97));
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(226, 255, 247, 0.08);
    transform: translateX(-50%);
    isolation: isolate;
  }

  .mobile-fullscreen-prompt[data-mode="install"] {
    border-color: rgba(242, 184, 75, 0.65);
    background:
      radial-gradient(circle at 8% 0%, rgba(242, 184, 75, 0.17), transparent 44%),
      linear-gradient(145deg, rgba(19, 16, 8, 0.99), rgba(5, 12, 10, 0.975));
  }

  .mobile-fullscreen-close {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 34px;
    height: 34px;
    padding: 0;
    color: #dcebe5;
    font: 700 22px/1 system-ui, sans-serif;
    border: 1px solid rgba(218, 245, 235, 0.18);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.055);
    touch-action: manipulation;
  }

  .mobile-fullscreen-eyebrow {
    display: block;
    margin: 0 0 2px;
    color: #63e6dc;
    font: 800 9px/1.2 system-ui, sans-serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .mobile-fullscreen-prompt[data-mode="install"] .mobile-fullscreen-eyebrow {
    color: #f2c65d;
  }

  .mobile-fullscreen-prompt > strong {
    display: block;
    font: 800 clamp(15px, 2.6vw, 20px)/1.12 system-ui, sans-serif;
  }

  .mobile-fullscreen-prompt > p {
    margin: 4px 0 8px;
    color: #b8c9c2;
    font: 600 clamp(10px, 1.7vw, 12px)/1.3 system-ui, sans-serif;
  }

  .mobile-fullscreen-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin: 8px 0;
  }

  .mobile-fullscreen-steps[hidden] {
    display: none;
  }

  .mobile-fullscreen-steps span {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 5px;
    padding: 6px 7px;
    color: #e9f4ef;
    font: 700 clamp(9px, 1.55vw, 11px)/1.15 system-ui, sans-serif;
    border: 1px solid rgba(242, 184, 75, 0.18);
    border-radius: 8px;
    background: rgba(242, 184, 75, 0.055);
  }

  .mobile-fullscreen-steps b {
    display: grid;
    flex: 0 0 19px;
    width: 19px;
    height: 19px;
    place-items: center;
    color: #171205;
    border-radius: 50%;
    background: #f2c65d;
    font-size: 10px;
  }

  .mobile-fullscreen-actions {
    display: flex;
    gap: 7px;
  }

  .mobile-fullscreen-actions button {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 11px;
    touch-action: manipulation;
  }

  .mobile-fullscreen-prompt[data-mode="install"] .mobile-fullscreen-actions .primary-button {
    border-color: #f2c65d;
    color: #171205;
    background: linear-gradient(180deg, #f6d77e, #d7a94a);
  }
}

@media (hover: none) and (max-height: 360px) {
  .mobile-fullscreen-prompt {
    top: max(6px, env(safe-area-inset-top));
    width: min(620px, calc(100vw - 20px));
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .mobile-fullscreen-prompt > p {
    margin-bottom: 5px;
  }

  .mobile-fullscreen-steps {
    margin: 5px 0;
  }

  .mobile-fullscreen-steps span {
    padding-block: 4px;
  }
}

body.mobile-game-v2::before,
body.mobile-game-v2::after {
  display: none !important;
  content: none !important;
  pointer-events: none !important;
}

body.mobile-game-v2,
body.mobile-game-v2 button,
body.mobile-game-v2 input,
body.mobile-game-v2 select {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.mobile-game-v2 button {
  touch-action: manipulation;
}

body.mobile-game-v2 > .shell {
  position: fixed !important;
  inset: 0 !important;
  display: block !important;
  width: 100vw !important;
  max-width: none !important;
  height: 100dvh !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: var(--mg-bg) !important;
}

body.mobile-game-v2 #gameArea:not([hidden]) {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1 !important;
  display: block !important;
  width: 100vw !important;
  height: 100dvh !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--mg-bg) !important;
}

/* Arena: full-bleed and interactive in the supported landscape orientation. */
body.mobile-game-v2 .canvas-wrap {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1 !important;
  display: block !important;
  width: 100vw !important;
  height: 100dvh !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: auto !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
  opacity: 1 !important;
  filter: none !important;
  pointer-events: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #06100d !important;
  scrollbar-width: none;
}

body.mobile-game-v2 .canvas-wrap::-webkit-scrollbar {
  display: none;
}

body.mobile-game-v2 #gameCanvas,
body.mobile-game-v2 .tower-game-canvas,
body.mobile-game-v2 .dynamic-game-canvas,
body.mobile-game-v2 .placement-preview-canvas {
  opacity: 1 !important;
  filter: none !important;
  pointer-events: auto !important;
}

body.mobile-game-v2 .hintbar,
body.mobile-game-v2 .round-widget,
body.mobile-game-v2 .desktop-trait-rail,
body.mobile-game-v2 .minimap-panel,
body.mobile-game-v2 #gameMenuButton,
body.mobile-game-v2 .mobile-scoreboard-toggle,
body.mobile-game-v2 .mobile-bench-toggle {
  display: none !important;
}

body.mobile-game-v2 .chat-panel.is-collapsed {
  display: none !important;
}

body.mobile-game-v2 .chat-panel:not(.is-collapsed):not([hidden]) {
  position: fixed !important;
  top: calc(var(--mg-safe-top) + var(--mg-hud-height) + 8px) !important;
  right: var(--mg-safe-right) !important;
  bottom: calc(var(--mg-safe-bottom) + var(--mg-dock-height) + 8px) !important;
  left: var(--mg-safe-left) !important;
  z-index: 70 !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  width: auto !important;
  max-width: 420px !important;
  height: auto !important;
  max-height: 360px !important;
  margin-left: auto !important;
  padding: 10px !important;
  overflow: hidden !important;
  border: 1px solid var(--mg-line-strong) !important;
  border-radius: var(--mg-radius-lg) !important;
  background: #08130f !important;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.58) !important;
}

body.mobile-game-v2 .chat-panel:not(.is-collapsed) .chat-toggle-button,
body.mobile-game-v2 .chat-panel:not(.is-collapsed) #chatSendButton {
  min-width: 44px !important;
  min-height: 44px !important;
}

body.mobile-game-v2 .board-visibility-toggle {
  position: fixed !important;
  top: calc(var(--mg-safe-top) + var(--mg-hud-height) + 8px) !important;
  right: var(--mg-safe-right) !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 34 !important;
  display: grid !important;
  place-items: center !important;
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  margin: 0 !important;
  opacity: 0.76 !important;
  border: 1px solid var(--mg-line) !important;
  border-radius: 12px !important;
  background: rgba(6, 15, 12, 0.88) !important;
}

/* Quiet persistent HUD. */
body.mobile-game-v2 .mobile-top-bar {
  position: fixed !important;
  top: var(--mg-safe-top) !important;
  right: var(--mg-safe-right) !important;
  left: var(--mg-safe-left) !important;
  z-index: 40 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-areas:
    "player actions"
    "stats stats" !important;
  gap: 6px 8px !important;
  width: auto !important;
  min-width: 0 !important;
  height: var(--mg-hud-height) !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 7px !important;
  overflow: visible !important;
  contain: layout paint !important;
  pointer-events: none !important;
  border: 1px solid var(--mg-line) !important;
  border-radius: var(--mg-radius) !important;
  background: linear-gradient(135deg, rgba(7, 17, 14, 0.97), rgba(12, 29, 23, 0.94)) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.34) !important;
  color: var(--mg-text) !important;
}

body.mobile-game-v2 .mobile-player-chip {
  grid-area: player !important;
  display: flex !important;
  align-items: center !important;
  min-width: 0 !important;
  height: 36px !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 4px !important;
  pointer-events: auto !important;
  background: transparent !important;
  border: 0 !important;
}

body.mobile-game-v2 .mobile-player-chip > div:last-child {
  display: grid !important;
  min-width: 0 !important;
  gap: 1px !important;
}

body.mobile-game-v2 .mobile-player-chip strong {
  max-width: 180px !important;
  overflow: hidden !important;
  color: var(--mg-text) !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.mobile-game-v2 .mobile-player-chip > div:last-child > span {
  color: var(--mg-muted) !important;
  font-size: 11px !important;
  line-height: 1.1 !important;
}

body.mobile-game-v2 .mobile-status-buttons {
  display: none !important;
}

body.mobile-game-v2 .mobile-hud-stats {
  grid-area: stats !important;
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 4px !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 42px !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: auto !important;
}

body.mobile-game-v2 .mobile-stat {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  place-content: center !important;
  min-width: 0 !important;
  min-height: 42px !important;
  gap: 1px !important;
  margin: 0 !important;
  padding: 3px 2px !important;
  text-align: center !important;
  border: 1px solid rgba(137, 180, 158, 0.16) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.035) !important;
  color: var(--mg-text) !important;
  box-shadow: none !important;
}

body.mobile-game-v2 button.mobile-stat {
  cursor: pointer !important;
  border-color: rgba(244, 201, 93, 0.42) !important;
  background: rgba(244, 201, 93, 0.1) !important;
}

body.mobile-game-v2 .mobile-stat > span {
  color: var(--mg-muted) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: 0.03em !important;
  text-transform: uppercase !important;
}

body.mobile-game-v2 .mobile-stat strong {
  min-width: 0 !important;
  overflow: hidden !important;
  color: var(--mg-text) !important;
  font-size: 12px !important;
  line-height: 1.05 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.mobile-game-v2 .mobile-stat--gold strong,
body.mobile-game-v2 .mobile-stat--xp strong {
  color: var(--mg-gold) !important;
}

body.mobile-game-v2 .mobile-stat--income strong {
  color: var(--mg-green) !important;
}

body.mobile-game-v2 .mobile-stat--timer {
  border-color: rgba(99, 230, 220, 0.28) !important;
}

body.mobile-game-v2 .mobile-top-actions {
  position: static !important;
  grid-area: actions !important;
  z-index: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  width: auto !important;
  min-width: 0 !important;
  height: 36px !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: auto !important;
}

body.mobile-game-v2 .mobile-arena-mode-button,
body.mobile-game-v2 .mobile-menu-button {
  position: relative !important;
  z-index: 2 !important;
  display: grid !important;
  place-items: center !important;
  min-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  margin: -4px 0 0 !important;
  padding: 0 10px !important;
  color: var(--mg-text) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  border: 1px solid var(--mg-line) !important;
  border-radius: 10px !important;
  background: var(--mg-surface-high) !important;
  box-shadow: none !important;
}

body.mobile-game-v2 .mobile-arena-mode-button[aria-pressed="true"] {
  color: #04110e !important;
  border-color: var(--mg-cyan) !important;
  background: var(--mg-cyan) !important;
}

/* Bottom action dock: five clear intentions, no hidden tabs. */
body.mobile-game-v2 .mobile-bottom-nav {
  position: fixed !important;
  right: var(--mg-safe-right) !important;
  bottom: var(--mg-safe-bottom) !important;
  left: var(--mg-safe-left) !important;
  z-index: 55 !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 5px !important;
  width: auto !important;
  height: var(--mg-dock-height) !important;
  margin: 0 !important;
  padding: 5px !important;
  overflow: visible !important;
  contain: layout paint !important;
  pointer-events: auto !important;
  border: 1px solid var(--mg-line) !important;
  border-radius: var(--mg-radius-lg) !important;
  background: rgba(6, 15, 12, 0.98) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.48) !important;
}

body.mobile-game-v2 .mobile-bottom-nav .mobile-action-button {
  position: relative !important;
  display: grid !important;
  grid-template-rows: 24px 14px !important;
  place-content: center !important;
  place-items: center !important;
  min-width: 0 !important;
  width: auto !important;
  height: 56px !important;
  min-height: 56px !important;
  gap: 2px !important;
  margin: 0 !important;
  padding: 4px 2px !important;
  color: var(--mg-muted) !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

body.mobile-game-v2 .mobile-bottom-nav .mobile-action-button::before,
body.mobile-game-v2 .mobile-bottom-nav .mobile-action-button::after {
  display: none !important;
  content: none !important;
}

body.mobile-game-v2 .mobile-nav-glyph {
  display: grid !important;
  place-items: center !important;
  width: 24px !important;
  height: 24px !important;
  color: currentColor !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

body.mobile-game-v2 .mobile-nav-label {
  display: block !important;
  color: currentColor !important;
  font-size: 10.5px !important;
  font-weight: 750 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.mobile-game-v2 .mobile-nav-badge {
  position: absolute !important;
  top: 3px !important;
  right: max(3px, calc(50% - 26px)) !important;
  display: grid !important;
  place-items: center !important;
  min-width: 17px !important;
  height: 17px !important;
  padding: 0 4px !important;
  color: #08110e !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  border: 1px solid rgba(4, 9, 8, 0.5) !important;
  border-radius: 999px !important;
  background: var(--mg-gold) !important;
}

body.mobile-game-v2 .mobile-bottom-nav .mobile-action-button.is-active {
  color: var(--mg-text) !important;
  border-color: rgba(99, 230, 220, 0.56) !important;
  background: linear-gradient(180deg, rgba(99, 230, 220, 0.18), rgba(99, 230, 220, 0.07)) !important;
}

body.mobile-game-v2 .mobile-bottom-nav .mobile-action-button:active {
  transform: scale(0.96) !important;
}

/* One bottom sheet. Every other contextual surface closes before it opens. */
body.mobile-game-v2 > .shell > .sidebar {
  position: fixed !important;
  right: var(--mg-safe-right) !important;
  bottom: calc(var(--mg-safe-bottom) + var(--mg-dock-height) + var(--mg-dock-gap)) !important;
  left: var(--mg-safe-left) !important;
  z-index: 50 !important;
  display: block !important;
  width: auto !important;
  max-width: none !important;
  height: var(--mg-sheet-height) !important;
  max-height: calc(100dvh - var(--mg-safe-top) - var(--mg-safe-bottom) - var(--mg-dock-height) - 20px) !important;
  margin: 0 !important;
  padding: 0 10px 12px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scroll-behavior: smooth !important;
  touch-action: pan-y !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(calc(100% + 24px)) !important;
  transition: transform 200ms ease, opacity 160ms ease, visibility 0s linear 200ms !important;
  contain: layout paint !important;
  border: 1px solid rgba(137, 180, 158, 0.3) !important;
  border-radius: var(--mg-radius-lg) !important;
  background: var(--mg-surface-soft) !important;
  box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.46) !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(99, 230, 220, 0.35) transparent !important;
}

body.mobile-game-v2.mobile-sheet-open > .shell > .sidebar {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
  transition: transform 200ms ease, opacity 160ms ease !important;
}

body.mobile-game-v2.mobile-sheet-expanded > .shell > .sidebar {
  height: min(68dvh, 620px) !important;
}

body.mobile-game-v2 > .shell > .sidebar > * {
  display: none !important;
}

body.mobile-game-v2.mobile-sheet-open > .shell > .sidebar > .mobile-bottom-sheet-header:not([hidden]) {
  position: sticky !important;
  top: 0 !important;
  z-index: 3 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 53px !important;
  gap: 12px !important;
  margin: 0 -10px 8px !important;
  padding: 4px 10px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--mg-line) !important;
  background: rgba(8, 19, 15, 0.99) !important;
}

body.mobile-game-v2.mobile-ui.match-active.mobile-sheet-open .mobile-bottom-sheet-header > div:first-child {
  display: grid !important;
  min-width: 0 !important;
  gap: 1px !important;
}

body.mobile-game-v2.mobile-ui.match-active.mobile-sheet-open #mobileSheetEyebrow {
  display: block !important;
  color: var(--mg-cyan) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

body.mobile-game-v2.mobile-ui.match-active.mobile-sheet-open #mobileSheetTitle {
  display: block !important;
  color: var(--mg-text) !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
}

body.mobile-game-v2 .mobile-sheet-actions {
  display: flex !important;
  gap: 8px !important;
}

body.mobile-game-v2 .mobile-close-button {
  display: grid !important;
  place-items: center !important;
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--mg-text) !important;
  font-size: 20px !important;
  line-height: 1 !important;
  border: 1px solid var(--mg-line) !important;
  border-radius: 10px !important;
  background: var(--mg-surface-high) !important;
}

/* Legacy mobile rules target these ids directly; keep the canonical sheet controls visible. */
body.mobile-game-v2.mobile-ui.match-active.mobile-sheet-open #mobileSheetExpandButton,
body.mobile-game-v2.mobile-ui.match-active.mobile-sheet-open #mobileSheetCloseButton {
  display: grid !important;
}

body.mobile-game-v2[data-mobile-panel="towers"] > .shell > .sidebar > .tower-panel,
body.mobile-game-v2[data-mobile-panel="towers"] > .shell > .sidebar > .bench-panel,
body.mobile-game-v2[data-mobile-panel="monsters"] > .shell > .sidebar > .barracks-panel,
body.mobile-game-v2[data-mobile-panel="augments"] > .shell > .sidebar > .mobile-augments-panel,
body.mobile-game-v2[data-mobile-panel="players"] > .shell > .sidebar > .mobile-players-panel {
  display: block !important;
}

body.mobile-game-v2 > .shell > .sidebar .panel {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.mobile-game-v2 > .shell > .sidebar .panel-title,
body.mobile-game-v2 > .shell > .sidebar .tower-shop-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 44px !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 2px 0 6px !important;
}

body.mobile-game-v2 > .shell > .sidebar .panel-title h2 {
  margin: 0 !important;
  color: var(--mg-text) !important;
  font-size: 13px !important;
  line-height: 1.15 !important;
}

body.mobile-game-v2 .shop-actions {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
}

body.mobile-game-v2 .shop-actions .shop-action,
body.mobile-game-v2 .shop-actions .mode-button,
body.mobile-game-v2 #batchButtons {
  display: grid !important;
  place-items: center !important;
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 3px !important;
  color: var(--mg-text) !important;
  font-size: 12px !important;
  border: 1px solid var(--mg-line) !important;
  border-radius: 10px !important;
  background: var(--mg-surface-high) !important;
}

body.mobile-game-v2 .shop-actions .action-cost {
  font-size: 10px !important;
  line-height: 1 !important;
}

body.mobile-game-v2 .odds-preview {
  display: none !important;
}

/* Shop cards swipe horizontally instead of shrinking five columns below legibility. */
body.mobile-game-v2 .tower-list,
body.mobile-game-v2 .barracks {
  display: grid !important;
  grid-auto-flow: column !important;
  grid-auto-columns: minmax(148px, 42vw) !important;
  grid-template-columns: none !important;
  align-items: stretch !important;
  gap: 8px !important;
  width: 100% !important;
  min-height: 132px !important;
  margin: 0 !important;
  padding: 1px 2px 8px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  overscroll-behavior-x: contain !important;
  scroll-snap-type: x proximity !important;
  scrollbar-width: none !important;
  touch-action: pan-x !important;
}

body.mobile-game-v2 .tower-list::-webkit-scrollbar,
body.mobile-game-v2 .barracks::-webkit-scrollbar,
body.mobile-game-v2 .bench-list::-webkit-scrollbar {
  display: none !important;
}

body.mobile-game-v2 .tower-list > .choice-button,
body.mobile-game-v2 .barracks > .choice-button,
body.mobile-game-v2 .shop-card {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  grid-template-rows: minmax(48px, auto) auto !important;
  align-content: center !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 124px !important;
  min-height: 124px !important;
  gap: 5px 8px !important;
  margin: 0 !important;
  padding: 10px !important;
  overflow: hidden !important;
  scroll-snap-align: start !important;
  text-align: left !important;
  color: var(--mg-text) !important;
  border-width: 1px !important;
  border-style: solid !important;
  border-color: var(--mg-line) !important;
  border-radius: var(--mg-radius) !important;
  background: linear-gradient(145deg, rgba(17, 34, 27, 0.98), rgba(7, 16, 13, 0.98)) !important;
  box-shadow: none !important;
  transform: none !important;
}

body.mobile-game-v2 .shop-card:active {
  transform: scale(0.98) !important;
}

body.mobile-game-v2 .shop-card.active,
body.mobile-game-v2 .shop-card.is-buy-pulse {
  border-color: var(--mg-cyan) !important;
  box-shadow: inset 0 0 0 1px rgba(99, 230, 220, 0.24) !important;
}

body.mobile-game-v2 .shop-card:disabled {
  opacity: 0.5 !important;
}

body.mobile-game-v2 .shop-card .choice-icon {
  position: relative !important;
  inset: auto !important;
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  display: grid !important;
  place-items: center !important;
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  margin: 0 !important;
  overflow: hidden !important;
  border-radius: 10px !important;
  background: rgba(0, 0, 0, 0.24) !important;
}

body.mobile-game-v2 .shop-card .choice-icon img,
body.mobile-game-v2 .shop-card .choice-icon canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

body.mobile-game-v2 .shop-card .choice-main {
  position: static !important;
  grid-column: 2 !important;
  grid-row: 1 / span 2 !important;
  display: grid !important;
  align-content: center !important;
  min-width: 0 !important;
  height: auto !important;
  max-height: 72px !important;
  gap: 5px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  transform: none !important;
}

body.mobile-game-v2.mobile-ui.match-active.mobile-sheet-open[data-mobile-panel="towers"] .shop-card .choice-name,
body.mobile-game-v2.mobile-ui.match-active.mobile-sheet-open[data-mobile-panel="monsters"] .shop-card .choice-name {
  position: static !important;
  display: -webkit-box !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: var(--mg-text) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis !important;
  white-space: normal !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  transform: none !important;
}

body.mobile-game-v2 .shop-card .tower-stat-grid,
body.mobile-game-v2 .shop-card .unit-shop-details,
body.mobile-game-v2 .shop-card .choice-description {
  display: none !important;
}

body.mobile-game-v2 .shop-card .tower-shop-floating-badges {
  position: absolute !important;
  top: 7px !important;
  left: 7px !important;
  z-index: 2 !important;
  display: flex !important;
  width: calc(100% - 14px) !important;
  justify-content: space-between !important;
  pointer-events: none !important;
}

body.mobile-game-v2 .shop-card .choice-cost {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  min-height: 24px !important;
  padding: 2px 7px !important;
  color: var(--mg-gold) !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  border-radius: 999px !important;
  background: rgba(4, 9, 8, 0.78) !important;
}

body.mobile-game-v2 .shop-card .shop-cost-exact {
  display: none !important;
}

body.mobile-game-v2 .shop-card .shop-cost-compact {
  display: inline !important;
}

body.mobile-game-v2 .shop-card .mobile-shop-rarity {
  position: absolute !important;
  bottom: 7px !important;
  left: 8px !important;
  display: block !important;
  max-width: calc(100% - 16px) !important;
  overflow: hidden !important;
  color: var(--mg-muted) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.mobile-game-v2 .shop-card .shop-decision-row,
body.mobile-game-v2 .shop-card .unit-shop-floating-stats,
body.mobile-game-v2 .shop-card .tower-trait-list,
body.mobile-game-v2 .shop-card .choice-details,
body.mobile-game-v2 .shop-card .shop-card-details {
  max-width: 100% !important;
  overflow: hidden !important;
  color: var(--mg-muted) !important;
  font-size: 10px !important;
  line-height: 1.15 !important;
}

body.mobile-game-v2 .shop-card .shop-decision-badge,
body.mobile-game-v2 .shop-card .tower-trait-pill,
body.mobile-game-v2 .shop-card .unit-stat-pill {
  min-height: 18px !important;
  padding: 3px 5px !important;
  font-size: 10px !important;
  line-height: 1 !important;
}

/* Bench is a second horizontal tray, never six compressed columns. */
body.mobile-game-v2 .bench-panel {
  scroll-margin-top: 58px !important;
}

body.mobile-game-v2 .bench-list {
  display: grid !important;
  grid-auto-flow: column !important;
  grid-auto-columns: 96px !important;
  grid-template-columns: none !important;
  gap: 8px !important;
  width: 100% !important;
  min-height: 92px !important;
  margin: 0 !important;
  padding: 1px 2px 8px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-snap-type: x proximity !important;
  scrollbar-width: none !important;
  touch-action: pan-x !important;
}

body.mobile-game-v2 .bench-slot {
  position: relative !important;
  display: grid !important;
  place-items: center !important;
  width: 96px !important;
  min-width: 96px !important;
  height: 84px !important;
  min-height: 84px !important;
  margin: 0 !important;
  padding: 7px !important;
  overflow: hidden !important;
  scroll-snap-align: start !important;
  color: var(--mg-text) !important;
  border: 1px solid var(--mg-line) !important;
  border-radius: 12px !important;
  background: var(--mg-surface-high) !important;
  box-shadow: none !important;
}

body.mobile-game-v2 .bench-slot.active {
  border-color: var(--mg-cyan) !important;
  box-shadow: inset 0 0 0 1px rgba(99, 230, 220, 0.28) !important;
}

body.mobile-game-v2 .bench-slot .choice-icon {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
}

body.mobile-game-v2 .bench-slot .bench-title,
body.mobile-game-v2 .bench-slot .bench-main,
body.mobile-game-v2 .bench-slot .bench-empty {
  max-width: 100% !important;
  overflow: hidden !important;
  color: var(--mg-muted) !important;
  font-size: 10px !important;
  line-height: 1.1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.mobile-game-v2 .mobile-augments-panel {
  display: grid !important;
  gap: 8px !important;
}

body.mobile-game-v2 .mobile-augments-panel > .mode-button {
  width: 100% !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  color: var(--mg-text) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  border: 1px solid var(--mg-line) !important;
  border-radius: 12px !important;
  background: var(--mg-surface-high) !important;
}

body.mobile-game-v2 .mobile-augments-panel .mini-log {
  margin: 4px 0 0 !important;
  color: var(--mg-muted) !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
}

/* Drawer scoreboard: hidden by default and mutually exclusive with the sheet. */
body.mobile-game-v2 #scoreboard {
  position: fixed !important;
  top: calc(var(--mg-safe-top) + var(--mg-hud-height) + 8px) !important;
  right: var(--mg-safe-right) !important;
  bottom: calc(var(--mg-safe-bottom) + var(--mg-dock-height) + 8px) !important;
  left: auto !important;
  z-index: 48 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  width: min(82vw, 320px) !important;
  max-width: calc(100vw - var(--mg-safe-left) - var(--mg-safe-right) - 24px) !important;
  height: auto !important;
  max-height: none !important;
  gap: 7px !important;
  margin: 0 !important;
  padding: 8px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateX(0) !important;
  transition: transform 190ms ease, opacity 150ms ease, visibility 0s !important;
  border: 1px solid var(--mg-line) !important;
  border-radius: var(--mg-radius-lg) !important;
  background: rgba(7, 17, 14, 0.98) !important;
  box-shadow: -10px 12px 28px rgba(0, 0, 0, 0.46) !important;
  scrollbar-width: thin !important;
}

body.mobile-game-v2.mobile-scoreboard-collapsed #scoreboard {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateX(calc(100% + 24px)) !important;
  transition: transform 190ms ease, opacity 150ms ease, visibility 0s linear 190ms !important;
}

body.mobile-game-v2 #scoreboard .score-card,
body.mobile-game-v2 #scoreboard .score-card.is-local {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 22px 44px minmax(0, 1fr) !important;
  grid-template-rows: 52px !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 64px !important;
  min-height: 64px !important;
  max-height: 64px !important;
  gap: 7px !important;
  margin: 0 !important;
  padding: 6px !important;
  color: var(--mg-text) !important;
  border: 1px solid var(--mg-line) !important;
  border-radius: 12px !important;
  background: var(--mg-surface-high) !important;
  box-shadow: none !important;
}

body.mobile-game-v2 #scoreboard .score-card.is-local,
body.mobile-game-v2 #scoreboard .score-card.is-observed {
  border-color: var(--mg-line-strong) !important;
}

body.mobile-game-v2 #scoreboard .score-index {
  position: static !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
  display: grid !important;
  place-items: center !important;
  width: 22px !important;
  height: 22px !important;
  color: var(--mg-muted) !important;
  font-size: 11px !important;
  text-align: center !important;
}

body.mobile-game-v2 #scoreboard .score-avatar {
  position: relative !important;
  grid-column: 2 !important;
  grid-row: 1 !important;
  display: grid !important;
  place-items: center !important;
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  overflow: hidden !important;
  border: 2px solid var(--player-color, var(--mg-line-strong)) !important;
  border-radius: 50% !important;
  background: rgba(3, 9, 7, 0.82) !important;
  box-shadow: none !important;
  transform: none !important;
}

body.mobile-game-v2 #scoreboard .score-rank-frame,
body.mobile-game-v2 #scoreboard .score-rank-division {
  display: none !important;
}

body.mobile-game-v2 #scoreboard .score-avatar-initial {
  position: static !important;
  grid-area: 1 / 1 !important;
  color: var(--mg-text) !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  transform: none !important;
}

body.mobile-game-v2 #scoreboard .score-avatar-level {
  position: absolute !important;
  right: 1px !important;
  bottom: 1px !important;
  display: grid !important;
  place-items: center !important;
  width: 14px !important;
  height: 14px !important;
  color: #06100d !important;
  font-size: 8px !important;
  font-style: normal !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: var(--mg-gold) !important;
}

body.mobile-game-v2 #scoreboard .score-main {
  grid-column: 3 !important;
  grid-row: 1 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  align-content: center !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  gap: 4px !important;
}

body.mobile-game-v2 #scoreboard .score-header,
body.mobile-game-v2 #scoreboard .score-values {
  display: flex !important;
  align-items: center !important;
  min-width: 0 !important;
  width: 100% !important;
  gap: 5px !important;
  margin: 0 !important;
}

body.mobile-game-v2 #scoreboard .score-header {
  justify-content: space-between !important;
}

body.mobile-game-v2 #scoreboard .score-values {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 3px !important;
}

body.mobile-game-v2 #scoreboard .score-name {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: var(--mg-text) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.mobile-game-v2 #scoreboard .score-game-level,
body.mobile-game-v2 #scoreboard .score-value,
body.mobile-game-v2 #scoreboard .score-value * {
  color: var(--mg-muted) !important;
  font-size: 10px !important;
  line-height: 1 !important;
}

body.mobile-game-v2 #scoreboard .score-game-level {
  flex: 0 0 auto !important;
  min-height: 18px !important;
  padding: 2px 5px !important;
}

body.mobile-game-v2 #scoreboard .score-value,
body.mobile-game-v2 #scoreboard .score-value .icon-value {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  gap: 2px !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.mobile-game-v2 #scoreboard .score-value svg,
body.mobile-game-v2 #scoreboard .score-value .coin-icon {
  width: 11px !important;
  min-width: 11px !important;
  height: 11px !important;
}

/* Camera controls return after years of being hard-hidden. */
body.mobile-game-v2 .mobile-camera-controls:not([hidden]) {
  position: fixed !important;
  right: var(--mg-safe-right) !important;
  bottom: calc(var(--mg-safe-bottom) + var(--mg-dock-height) + 10px) !important;
  z-index: 35 !important;
  display: grid !important;
  grid-template-columns: repeat(3, 44px) auto !important;
  align-items: center !important;
  width: auto !important;
  height: 48px !important;
  gap: 4px !important;
  margin: 0 !important;
  padding: 2px !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  border: 1px solid var(--mg-line) !important;
  border-radius: 13px !important;
  background: rgba(6, 15, 12, 0.94) !important;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.34) !important;
}

body.mobile-game-v2 .mobile-camera-button {
  display: grid !important;
  place-items: center !important;
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--mg-text) !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: var(--mg-surface-high) !important;
}

body.mobile-game-v2 .mobile-zoom-readout {
  display: block !important;
  min-width: 42px !important;
  padding: 0 6px !important;
  color: var(--mg-muted) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  text-align: center !important;
}

body.mobile-game-v2.mobile-sheet-open .mobile-camera-controls,
body.mobile-game-v2.selected-tower-panel-floating:has(#selectedTowerPanel:not([hidden])) .mobile-camera-controls,
body.mobile-game-v2:has(.mobile-placement-toolbar:not([hidden])) .mobile-camera-controls {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Placement and selected-unit actions replace, rather than stack over, the tray. */
body.mobile-game-v2 .mobile-placement-toolbar:not([hidden]) {
  position: fixed !important;
  top: auto !important;
  right: var(--mg-safe-right) !important;
  bottom: calc(var(--mg-safe-bottom) + var(--mg-dock-height) + 8px) !important;
  left: var(--mg-safe-left) !important;
  z-index: 60 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  width: auto !important;
  height: auto !important;
  min-height: 56px !important;
  max-height: 72px !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 6px 7px 6px 13px !important;
  color: var(--mg-text) !important;
  border: 1px solid rgba(244, 201, 93, 0.52) !important;
  border-radius: 14px !important;
  background: rgba(14, 22, 15, 0.98) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.44) !important;
}

body.mobile-game-v2.mobile-sheet-open .mobile-placement-toolbar {
  display: none !important;
}

body.mobile-game-v2 .mobile-placement-toolbar > span {
  min-width: 0 !important;
  overflow: hidden !important;
  color: var(--mg-gold) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.mobile-game-v2 .mobile-placement-toolbar .mobile-action-button {
  min-width: 92px !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 8px 12px !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  border: 1px solid rgba(255, 107, 107, 0.62) !important;
  border-radius: 10px !important;
  background: rgba(150, 39, 45, 0.82) !important;
}

body.mobile-game-v2.selected-tower-panel-floating #selectedTowerPanel:not([hidden]) {
  position: fixed !important;
  top: auto !important;
  right: var(--mg-safe-right) !important;
  bottom: calc(var(--mg-safe-bottom) + var(--mg-dock-height) + 8px) !important;
  left: var(--mg-safe-left) !important;
  z-index: 62 !important;
  display: grid !important;
  grid-template-columns: 58px minmax(0, 1fr) repeat(3, minmax(70px, 1fr)) !important;
  grid-template-rows: auto auto !important;
  align-items: center !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: min(34dvh, 132px) !important;
  min-height: 116px !important;
  gap: 6px 8px !important;
  margin: 0 !important;
  padding: 10px !important;
  overflow: hidden !important;
  color: var(--mg-text) !important;
  border: 1px solid var(--mg-line-strong) !important;
  border-radius: var(--mg-radius-lg) !important;
  background: rgba(7, 17, 14, 0.98) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5) !important;
}

body.mobile-game-v2 #selectedTowerPanel .panel-title {
  display: none !important;
}

body.mobile-game-v2 #selectedTowerPanel .selected-tower-visual {
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  width: 54px !important;
  height: 54px !important;
  margin: 0 !important;
}

body.mobile-game-v2 #selectedTowerPanel #placedTowerName {
  grid-column: 2 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: var(--mg-text) !important;
  font-size: 13px !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.mobile-game-v2 #selectedTowerPanel #placedTowerStats {
  grid-column: 2 !important;
  grid-row: 2 !important;
  min-width: 0 !important;
  max-height: 32px !important;
  margin: 0 !important;
  overflow: hidden !important;
  color: var(--mg-muted) !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
}

body.mobile-game-v2 #selectedTowerPanel > button {
  align-self: stretch !important;
  min-width: 0 !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 6px 8px !important;
  color: var(--mg-text) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  border: 1px solid var(--mg-line) !important;
  border-radius: 11px !important;
  background: var(--mg-surface-high) !important;
}

body.mobile-game-v2 #selectedTowerPanel #sellTowerButton {
  border-color: rgba(255, 107, 107, 0.5) !important;
  background: rgba(122, 32, 38, 0.64) !important;
}

body.mobile-game-v2 #selectedTowerPanel > button:nth-of-type(1) { grid-column: 3 !important; grid-row: 1 / span 2 !important; }
body.mobile-game-v2 #selectedTowerPanel > button:nth-of-type(2) { grid-column: 4 !important; grid-row: 1 / span 2 !important; }
body.mobile-game-v2 #selectedTowerPanel > button:nth-of-type(3) { grid-column: 5 !important; grid-row: 1 / span 2 !important; }

/* Menus and blocking overlays stay within safe areas and remain scrollable. */
body.mobile-game-v2 .topbar {
  position: static !important;
  display: contents !important;
  width: auto !important;
  height: auto !important;
  pointer-events: none !important;
}

body.mobile-game-v2 .toolbar {
  display: contents !important;
}

body.mobile-game-v2 .game-menu:not([hidden]) {
  position: fixed !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  left: 50% !important;
  z-index: 82 !important;
  display: grid !important;
  width: min(92vw, 420px) !important;
  max-height: calc(100dvh - var(--mg-safe-top) - var(--mg-safe-bottom) - 24px) !important;
  gap: 9px !important;
  margin: 0 !important;
  padding: 16px !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translate(-50%, -50%) !important;
  border: 1px solid var(--mg-line-strong) !important;
  border-radius: var(--mg-radius-lg) !important;
  background: #08130f !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7) !important;
}

body.mobile-game-v2 .game-menu .menu-action,
body.mobile-game-v2 .game-menu summary,
body.mobile-game-v2 .game-menu select,
body.mobile-game-v2 .game-menu input[type="range"] {
  min-height: 44px !important;
  font-size: 12px !important;
}

body.mobile-game-v2.game-menu-open::after {
  display: none !important;
  content: none !important;
  pointer-events: none !important;
}

/* Keep the scrim and menu in #gameArea's stacking context. A body-level
 * scrim sits above that whole context and makes the otherwise visible menu
 * impossible to touch. */
body.mobile-game-v2.game-menu-open #gameArea::after {
  position: fixed !important;
  inset: 0 !important;
  z-index: 80 !important;
  display: block !important;
  content: "" !important;
  pointer-events: auto !important;
  background: rgba(2, 7, 5, 0.72) !important;
}

body.mobile-game-v2 .tutorial-coach {
  position: fixed !important;
  top: calc(var(--mg-safe-top) + var(--mg-hud-height) + 8px) !important;
  right: var(--mg-safe-right) !important;
  bottom: auto !important;
  left: var(--mg-safe-left) !important;
  z-index: 76 !important;
  width: auto !important;
  max-width: none !important;
  max-height: min(42dvh, 330px) !important;
  margin: 0 !important;
  padding: 12px !important;
  overflow-y: auto !important;
  pointer-events: auto !important;
  border: 1px solid rgba(244, 201, 93, 0.55) !important;
  border-radius: var(--mg-radius) !important;
  background: rgba(9, 17, 11, 0.97) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5) !important;
}

body.mobile-game-v2 .tutorial-coach h2 {
  font-size: 16px !important;
}

body.mobile-game-v2 .tutorial-coach p,
body.mobile-game-v2 .tutorial-requirement {
  font-size: 12px !important;
  line-height: 1.35 !important;
}

body.mobile-game-v2 .tutorial-coach button {
  min-height: 44px !important;
  font-size: 12px !important;
}

body.mobile-game-v2 .augment-overlay:not([hidden]),
body.mobile-game-v2 .augment-book-overlay:not([hidden]),
body.mobile-game-v2 .power-book-overlay:not([hidden]),
body.mobile-game-v2 .traits-overlay:not([hidden]),
body.mobile-game-v2 .power-reveal-overlay:not([hidden]),
body.mobile-game-v2 #endOverlay:not([hidden]),
body.mobile-game-v2 #surrenderOverlay:not([hidden]) {
  position: fixed !important;
  inset: 0 !important;
  z-index: 84 !important;
  display: grid !important;
  place-items: center !important;
  width: 100vw !important;
  height: 100dvh !important;
  padding: calc(var(--mg-safe-top) + 8px) calc(var(--mg-safe-right) + 8px) calc(var(--mg-safe-bottom) + 8px) calc(var(--mg-safe-left) + 8px) !important;
  overflow: hidden !important;
  pointer-events: auto !important;
  background: rgba(2, 7, 5, 0.82) !important;
}

body.mobile-game-v2 .augment-panel,
body.mobile-game-v2 .augment-book-panel,
body.mobile-game-v2 .power-book-panel,
body.mobile-game-v2 .traits-panel,
body.mobile-game-v2 .power-reveal-panel,
body.mobile-game-v2 .end-modal,
body.mobile-game-v2 .surrender-modal {
  width: min(94vw, 720px) !important;
  max-width: none !important;
  max-height: calc(100dvh - var(--mg-safe-top) - var(--mg-safe-bottom) - 20px) !important;
  margin: 0 !important;
  padding: 14px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  color: var(--mg-text) !important;
  border: 1px solid var(--mg-line-strong) !important;
  border-radius: var(--mg-radius-lg) !important;
  background: #08130f !important;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.68) !important;
}

body.mobile-game-v2 .augment-panel button,
body.mobile-game-v2 .augment-book-panel button,
body.mobile-game-v2 .power-book-panel button,
body.mobile-game-v2 .traits-panel button,
body.mobile-game-v2 .power-reveal-panel button,
body.mobile-game-v2 .end-modal button,
body.mobile-game-v2 .surrender-modal button {
  min-height: 44px !important;
  font-size: 11px !important;
}

body.mobile-game-v2 .map-effect-toast,
body.mobile-game-v2 .battle-feed,
body.mobile-game-v2 .power-alert-feed,
body.mobile-game-v2 .round-countdown {
  z-index: 32 !important;
}

body.mobile-game-v2 .map-effect-toast {
  top: calc(var(--mg-safe-top) + var(--mg-hud-height) + 8px) !important;
  right: var(--mg-safe-right) !important;
  left: var(--mg-safe-left) !important;
  max-width: 360px !important;
  margin: 0 auto !important;
  font-size: 11px !important;
}

body.mobile-game-v2 .battle-feed,
body.mobile-game-v2 .power-alert-feed {
  top: calc(var(--mg-safe-top) + var(--mg-hud-height) + 8px) !important;
  max-width: min(72vw, 300px) !important;
  font-size: 11px !important;
}

/* Landscape is a compact variant of the same shell, not a separate product. */
@media (orientation: landscape) and (max-width: 980px) {
  body.mobile-game-v2 {
    --mg-hud-height: 52px;
    --mg-dock-height: 58px;
    --mg-sheet-height: clamp(174px, 48dvh, 220px);
  }

  body.mobile-game-v2 > .shell > .sidebar {
    top: calc(var(--mg-safe-top) + var(--mg-hud-height) + 8px) !important;
    bottom: auto !important;
    max-height: calc(
      100dvh - var(--mg-safe-top) - var(--mg-hud-height) - 8px -
      var(--mg-safe-bottom) - var(--mg-dock-height) - var(--mg-dock-gap)
    ) !important;
  }

  body.mobile-game-v2 .mobile-top-bar {
    grid-template-columns: 128px minmax(0, 1fr) 108px !important;
    grid-template-areas: "player stats actions" !important;
    gap: 6px !important;
    padding: 4px 5px !important;
  }

  body.mobile-game-v2 .mobile-player-chip {
    height: 44px !important;
    padding: 0 4px !important;
  }

  body.mobile-game-v2 .mobile-player-chip strong {
    max-width: 116px !important;
    font-size: 11px !important;
  }

  body.mobile-game-v2 .mobile-player-chip > div:last-child > span {
    font-size: 10px !important;
  }

  body.mobile-game-v2 .mobile-hud-stats {
    height: 44px !important;
  }

  body.mobile-game-v2 .mobile-stat {
    min-height: 44px !important;
    padding: 2px 1px !important;
  }

  body.mobile-game-v2 .mobile-stat > span {
    font-size: 10px !important;
  }

  body.mobile-game-v2 .mobile-stat strong {
    font-size: 11px !important;
  }

  body.mobile-game-v2 .mobile-top-actions {
    height: 42px !important;
    gap: 4px !important;
  }

  body.mobile-game-v2 .mobile-arena-mode-button,
  body.mobile-game-v2 .mobile-menu-button {
    min-width: 50px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 7px !important;
    font-size: 10px !important;
  }

  body.mobile-game-v2 .mobile-bottom-nav {
    right: auto !important;
    left: 50% !important;
    width: min(560px, calc(100vw - var(--mg-safe-left) - var(--mg-safe-right) - 16px)) !important;
    height: var(--mg-dock-height) !important;
    padding: 4px !important;
    transform: translateX(-50%) !important;
  }

  body.mobile-game-v2 .mobile-bottom-nav .mobile-action-button {
    grid-template-rows: 20px 12px !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 2px !important;
  }

  body.mobile-game-v2 .mobile-nav-glyph {
    width: 20px !important;
    height: 20px !important;
    font-size: 16px !important;
  }

  body.mobile-game-v2 .mobile-nav-label {
    font-size: 10px !important;
  }

  body.mobile-game-v2 > .shell > .sidebar {
    right: max(var(--mg-safe-right), calc((100vw - min(760px, calc(100vw - 16px))) / 2)) !important;
    left: max(var(--mg-safe-left), calc((100vw - min(760px, calc(100vw - 16px))) / 2)) !important;
  }

  body.mobile-game-v2 .tower-list,
  body.mobile-game-v2 .barracks {
    grid-auto-columns: 132px !important;
    min-height: 112px !important;
  }

  body.mobile-game-v2[data-mobile-panel="augments"] .mobile-augments-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: start !important;
    gap: 6px !important;
  }

  body.mobile-game-v2[data-mobile-panel="augments"] .mobile-augments-panel > .panel-title {
    display: none !important;
  }

  body.mobile-game-v2[data-mobile-panel="augments"] .mobile-augments-panel > .mode-button {
    width: auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.mobile-game-v2[data-mobile-panel="augments"] .mobile-augments-panel > .mini-log {
    grid-column: 1 / -1 !important;
    margin: 0 !important;
    text-align: center !important;
  }

  body.mobile-game-v2 .tower-list > .choice-button,
  body.mobile-game-v2 .barracks > .choice-button,
  body.mobile-game-v2 .shop-card {
    grid-template-columns: 40px minmax(0, 1fr) !important;
    height: 104px !important;
    min-height: 104px !important;
    padding: 7px !important;
  }

  body.mobile-game-v2 .shop-card .choice-icon {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
  }

  body.mobile-game-v2 #scoreboard {
    top: calc(var(--mg-safe-top) + var(--mg-hud-height) + 6px) !important;
    bottom: calc(var(--mg-safe-bottom) + var(--mg-dock-height) + 6px) !important;
    width: min(46vw, 300px) !important;
  }

  body.mobile-game-v2 .mobile-camera-controls:not([hidden]) {
    bottom: calc(var(--mg-safe-bottom) + var(--mg-dock-height) + 8px) !important;
  }

  body.mobile-game-v2 .mobile-placement-toolbar:not([hidden]),
  body.mobile-game-v2.selected-tower-panel-floating #selectedTowerPanel:not([hidden]) {
    right: max(var(--mg-safe-right), calc((100vw - min(680px, calc(100vw - 16px))) / 2)) !important;
    bottom: calc(var(--mg-safe-bottom) + var(--mg-dock-height) + 7px) !important;
    left: max(var(--mg-safe-left), calc((100vw - min(680px, calc(100vw - 16px))) / 2)) !important;
  }

  body.mobile-game-v2.selected-tower-panel-floating #selectedTowerPanel:not([hidden]) {
    min-height: 100px !important;
    grid-template-columns: 48px minmax(90px, 1fr) repeat(3, minmax(76px, 0.7fr)) !important;
    padding: 8px !important;
  }

  body.mobile-game-v2 .tutorial-coach {
    top: calc(var(--mg-safe-top) + var(--mg-hud-height) + 6px) !important;
    right: auto !important;
    bottom: calc(var(--mg-safe-bottom) + var(--mg-dock-height) + 6px) !important;
    left: var(--mg-safe-left) !important;
    width: min(42vw, 360px) !important;
    max-height: none !important;
  }
}

@media (orientation: landscape) and (max-width: 620px) {
  body.mobile-game-v2 .mobile-top-bar {
    grid-template-columns: 92px minmax(0, 1fr) 52px !important;
  }

  body.mobile-game-v2 .mobile-player-chip strong {
    max-width: 84px !important;
  }

  body.mobile-game-v2 .mobile-arena-mode-button {
    display: none !important;
  }

  body.mobile-game-v2 .mobile-stat--level {
    display: none !important;
  }

  body.mobile-game-v2 .mobile-hud-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.mobile-game-v2 *,
  body.mobile-game-v2 *::before,
  body.mobile-game-v2 *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* The mobile match is deliberately landscape-only. Portrait remains a clean,
   non-interactive orientation gate so an accidental rotation cannot place or
   sell units underneath the prompt. */
@media (orientation: portrait) and (max-width: 980px) {
  body.mobile-game-v2.mobile-portrait::after {
    content: "" !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 2000 !important;
    display: block !important;
    background:
      radial-gradient(circle at 50% 38%, rgba(99, 230, 220, 0.16), transparent 34%),
      rgba(3, 8, 6, 0.9) !important;
    pointer-events: auto !important;
  }

  body.mobile-game-v2.mobile-portrait::before {
    content: "↻\A PASSE EN PAYSAGE\A\ALe plateau et toutes les actions sont optimisés pour jouer à l'horizontale." !important;
    position: fixed !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    left: 50% !important;
    z-index: 2001 !important;
    display: block !important;
    width: min(330px, calc(100vw - 40px)) !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 24px 20px !important;
    box-sizing: border-box !important;
    transform: translate(-50%, -50%) !important;
    color: var(--mg-text) !important;
    font-size: 14px !important;
    font-weight: 750 !important;
    line-height: 1.45 !important;
    letter-spacing: 0.01em !important;
    text-align: center !important;
    white-space: pre-line !important;
    border: 1px solid rgba(99, 230, 220, 0.46) !important;
    border-radius: 20px !important;
    background:
      linear-gradient(155deg, rgba(244, 201, 93, 0.08), transparent 48%),
      rgba(9, 20, 16, 0.98) !important;
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.56) !important;
    pointer-events: none !important;
  }

  body.mobile-game-v2.mobile-portrait .canvas-wrap,
  body.mobile-game-v2.mobile-portrait .mobile-top-bar,
  body.mobile-game-v2.mobile-portrait .mobile-bottom-nav,
  body.mobile-game-v2.mobile-portrait .mobile-camera-controls,
  body.mobile-game-v2.mobile-portrait > .shell > .sidebar,
  body.mobile-game-v2.mobile-portrait #scoreboard {
    pointer-events: none !important;
  }
}

body.mobile-game-v2[data-render-quality="low"] .mobile-top-bar,
body.mobile-game-v2[data-render-quality="low"] .mobile-bottom-nav,
body.mobile-game-v2[data-render-quality="low"] > .shell > .sidebar,
body.mobile-game-v2[data-render-quality="low"] #scoreboard,
body.mobile-game-v2[data-render-quality="low"] #selectedTowerPanel {
  box-shadow: none !important;
}

/* Mobile tactical HUD v3 --------------------------------------------------
 * Landscape is built around the arena, not around modal sheets:
 * - one compact status line;
 * - one vertical action rail;
 * - one permanent named bench;
 * - narrow contextual drawers on the right.
 */
body.mobile-game-v2 #gameCanvas {
  pointer-events: auto !important;
}

body.mobile-game-v2 .tower-game-canvas,
body.mobile-game-v2 .dynamic-game-canvas,
body.mobile-game-v2 .placement-preview-canvas {
  pointer-events: none !important;
}

@media (orientation: landscape) and (max-width: 980px) {
  body.mobile-game-v2.mobile-landscape {
    --mg-hud-height: 48px;
    --mg-bench-height: 54px;
    --mg-bench-reserved-height: var(--mg-bench-height);
    --mg-action-rail-width: 58px;
    --mg-drawer-width: clamp(206px, calc(13vw + 132px), 252px);
    --mg-dock-height: 0px;
    --mg-dock-gap: 0px;
  }

  body.mobile-game-v2.mobile-landscape.mobile-bench-empty {
    --mg-bench-reserved-height: 48px;
  }

  body.mobile-game-v2.mobile-landscape.selected-panel-open {
    --mg-bench-reserved-height: var(--mg-bench-height);
  }

  /* Compact one-line status. */
  body.mobile-game-v2.mobile-landscape .mobile-top-bar {
    top: var(--mg-safe-top) !important;
    right: var(--mg-safe-right) !important;
    left: var(--mg-safe-left) !important;
    grid-template-columns: minmax(82px, 0.72fr) minmax(340px, 4fr) 48px !important;
    grid-template-areas: "player stats actions" !important;
    width: auto !important;
    height: var(--mg-hud-height) !important;
    min-height: var(--mg-hud-height) !important;
    gap: 5px !important;
    padding: 2px 4px !important;
    border-radius: 11px !important;
    background: linear-gradient(90deg, rgba(5, 14, 11, 0.96), rgba(10, 25, 20, 0.9)) !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-player-chip {
    height: 44px !important;
    min-height: 44px !important;
    gap: 5px !important;
    padding: 0 3px !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-player-chip strong {
    max-width: 112px !important;
    font-size: 11px !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-player-chip > div:last-child > span {
    font-size: 9px !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-hud-stats {
    height: 44px !important;
    gap: 3px !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-stat {
    min-height: 44px !important;
    height: 44px !important;
    grid-template-columns: auto auto !important;
    grid-template-rows: 1fr !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 2px 4px !important;
    border-radius: 7px !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-stat > span {
    font-size: 8px !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-stat strong {
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-top-actions {
    height: 44px !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-arena-mode-button {
    display: none !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-menu-button {
    display: grid !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 5px !important;
    font-size: 9px !important;
  }

  /* Five primary intentions live in a slim left rail. */
  body.mobile-game-v2.mobile-landscape .mobile-bottom-nav {
    top: calc(var(--mg-safe-top) + var(--mg-hud-height) + 5px) !important;
    right: auto !important;
    bottom: calc(var(--mg-safe-bottom) + var(--mg-bench-reserved-height) + 5px) !important;
    left: var(--mg-safe-left) !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: repeat(5, minmax(44px, 1fr)) !important;
    width: var(--mg-action-rail-width) !important;
    height: auto !important;
    gap: 2px !important;
    padding: 2px !important;
    transform: none !important;
    border-radius: 14px !important;
    background: rgba(5, 15, 12, 0.94) !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-bottom-nav .mobile-action-button {
    grid-template-rows: 20px 10px !important;
    width: 48px !important;
    min-width: 48px !important;
    height: auto !important;
    min-height: 44px !important;
    gap: 1px !important;
    padding: 2px !important;
    border-radius: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-nav-glyph {
    width: 20px !important;
    height: 20px !important;
    font-size: 16px !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-nav-label {
    max-width: 46px !important;
    overflow: hidden !important;
    font-size: 8px !important;
    text-overflow: ellipsis !important;
  }

  body.mobile-game-v2.mobile-landscape #mobileDockBenchCount {
    display: none !important;
  }

  /* The bench is a persistent gameplay surface, mounted directly in gameArea. */
  body.mobile-game-v2.mobile-landscape #gameArea > .bench-panel {
    position: fixed !important;
    top: auto !important;
    right: auto !important;
    bottom: var(--mg-safe-bottom) !important;
    left: calc(var(--mg-safe-left) + var(--mg-action-rail-width) + 6px) !important;
    z-index: 54 !important;
    display: grid !important;
    grid-template-columns: 50px minmax(0, 1fr) !important;
    align-items: center !important;
    width: fit-content !important;
    max-width: min(600px, calc(100vw - var(--mg-safe-left) - var(--mg-safe-right) - var(--mg-action-rail-width) - 12px)) !important;
    height: var(--mg-bench-reserved-height) !important;
    min-height: var(--mg-bench-reserved-height) !important;
    gap: 3px !important;
    margin: 0 !important;
    padding: 2px !important;
    overflow: hidden !important;
    pointer-events: auto !important;
    border: 1px solid rgba(137, 180, 158, 0.34) !important;
    border-radius: 13px !important;
    background: linear-gradient(180deg, rgba(8, 20, 16, 0.97), rgba(4, 12, 9, 0.97)) !important;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.38) !important;
  }

  body.mobile-game-v2.mobile-landscape #gameArea > .bench-panel > .panel-title {
    display: grid !important;
    place-content: center !important;
    min-width: 0 !important;
    min-height: 0 !important;
    width: 50px !important;
    height: 44px !important;
    gap: 2px !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
  }

  body.mobile-game-v2.mobile-landscape #gameArea > .bench-panel > .panel-title h2 {
    margin: 0 !important;
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape #gameArea > .bench-panel > .panel-title span {
    color: var(--mg-gold) !important;
    font-size: 9px !important;
    font-weight: 800 !important;
  }

  body.mobile-game-v2.mobile-landscape #gameArea > .bench-panel .bench-list {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: 104px !important;
    grid-template-columns: none !important;
    width: max-content !important;
    max-width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    gap: 3px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    touch-action: pan-x !important;
  }

  body.mobile-game-v2.mobile-landscape #gameArea > .bench-panel .bench-slot {
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) !important;
    grid-template-rows: 1fr !important;
    align-items: center !important;
    place-items: initial !important;
    width: 104px !important;
    min-width: 104px !important;
    height: 44px !important;
    min-height: 44px !important;
    gap: 3px !important;
    margin: 0 !important;
    padding: 3px !important;
    border-radius: 8px !important;
  }

  body.mobile-game-v2.mobile-landscape #gameArea > .bench-panel .bench-slot .choice-icon {
    position: relative !important;
    grid-column: 1 !important;
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-radius: 7px !important;
  }

  body.mobile-game-v2.mobile-landscape #gameArea > .bench-panel .bench-slot .choice-icon > img,
  body.mobile-game-v2.mobile-landscape #gameArea > .bench-panel .bench-slot .tower-rendered-icon > img,
  body.mobile-game-v2.mobile-landscape #gameArea > .bench-panel .bench-slot .tower-premium-icon > img {
    position: absolute !important;
    inset: 2px !important;
    box-sizing: border-box !important;
    width: calc(100% - 4px) !important;
    height: calc(100% - 4px) !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
  }

  body.mobile-game-v2.mobile-landscape #gameArea > .bench-panel .bench-main {
    grid-column: 2 !important;
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) 14px !important;
    min-width: 0 !important;
    height: 36px !important;
    gap: 1px !important;
    overflow: hidden !important;
  }

  body.mobile-game-v2.mobile-landscape #gameArea > .bench-panel .bench-title {
    display: grid !important;
    min-width: 0 !important;
    gap: 1px !important;
  }

  body.mobile-game-v2.mobile-landscape #gameArea > .bench-panel .bench-title span,
  body.mobile-game-v2.mobile-landscape #gameArea > .bench-panel .bench-title strong {
    display: block !important;
    min-width: 0 !important;
    overflow: hidden !important;
    font-size: 9px !important;
    line-height: 1.05 !important;
    text-align: left !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.mobile-game-v2.mobile-landscape #gameArea > .bench-panel .bench-title span {
    color: var(--mg-text) !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
  }

  body.mobile-game-v2.mobile-landscape #gameArea > .bench-panel .bench-title strong {
    color: var(--mg-gold) !important;
    font-size: 8px !important;
  }

  body.mobile-game-v2.mobile-landscape #gameArea > .bench-panel .bench-badges,
  body.mobile-game-v2.mobile-landscape #gameArea > .bench-panel .tower-trait-list {
    display: none !important;
  }

  body.mobile-game-v2.mobile-landscape #gameArea > .bench-panel .bench-tags--corner-meta {
    position: static !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-width: 0 !important;
    height: 14px !important;
    gap: 3px !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  body.mobile-game-v2.mobile-landscape #gameArea > .bench-panel .bench-target-badge {
    display: block !important;
    min-width: 0 !important;
    max-width: 39px !important;
    height: 13px !important;
    padding: 0 3px !important;
    overflow: hidden !important;
    font-size: 7px !important;
    font-weight: 850 !important;
    line-height: 13px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    border-radius: 4px !important;
  }

  body.mobile-game-v2.mobile-landscape #gameArea > .bench-panel .bench-element-badge {
    display: grid !important;
    flex: 0 0 14px !important;
    place-items: center !important;
    width: 14px !important;
    min-width: 14px !important;
    height: 14px !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid color-mix(in srgb, var(--shop-tag-color, #63e6dc) 62%, rgba(255, 255, 255, 0.12)) !important;
    border-radius: 4px !important;
    background: color-mix(in srgb, var(--shop-tag-color, #63e6dc) 14%, rgba(3, 10, 8, 0.94)) !important;
  }

  body.mobile-game-v2.mobile-landscape #gameArea > .bench-panel .bench-element-icon,
  body.mobile-game-v2.mobile-landscape #gameArea > .bench-panel .bench-element-icon img,
  body.mobile-game-v2.mobile-landscape #gameArea > .bench-panel .bench-element-icon svg {
    display: block !important;
    width: 10px !important;
    height: 10px !important;
    max-width: 10px !important;
    max-height: 10px !important;
    object-fit: contain !important;
  }

  body.mobile-game-v2.mobile-landscape #gameArea > .bench-panel .bench-slot.empty {
    display: none !important;
  }

  body.mobile-game-v2.mobile-landscape #gameArea > .bench-panel .bench-slot.active {
    border-color: var(--mg-cyan) !important;
    background:
      radial-gradient(circle at 22% 50%, rgba(99, 230, 220, 0.2), transparent 48%),
      rgba(12, 34, 28, 0.98) !important;
    box-shadow:
      inset 0 0 0 1px rgba(99, 230, 220, 0.34),
      0 0 14px rgba(99, 230, 220, 0.14) !important;
  }

  body.mobile-game-v2.mobile-landscape.mobile-bench-empty #gameArea > .bench-panel {
    grid-template-columns: 50px 0 !important;
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
  }

  body.mobile-game-v2.mobile-landscape.mobile-bench-empty #gameArea > .bench-panel .bench-list {
    display: none !important;
  }

  /* Contextual drawers slide from the right and never cover the arena centre. */
  body.mobile-game-v2.mobile-landscape > .shell > .sidebar {
    top: calc(var(--mg-safe-top) + var(--mg-hud-height) + 5px) !important;
    right: var(--mg-safe-right) !important;
    bottom: calc(var(--mg-safe-bottom) + var(--mg-bench-reserved-height) + 5px) !important;
    left: auto !important;
    width: var(--mg-drawer-width) !important;
    max-width: var(--mg-drawer-width) !important;
    height: auto !important;
    max-height: none !important;
    padding: 0 7px 7px !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    transform: translateX(calc(100% + 18px)) !important;
    border-radius: 14px !important;
    background: rgba(6, 16, 12, 0.97) !important;
  }

  body.mobile-game-v2.mobile-landscape.mobile-sheet-open > .shell > .sidebar {
    transform: translateX(0) !important;
  }

  body.mobile-game-v2.mobile-landscape.mobile-sheet-expanded > .shell > .sidebar {
    height: auto !important;
  }

  body.mobile-game-v2.mobile-landscape.mobile-sheet-open > .shell > .sidebar > .mobile-bottom-sheet-header:not([hidden]) {
    min-height: 44px !important;
    height: 44px !important;
    gap: 6px !important;
    margin: 0 -7px 4px !important;
    padding: 2px 5px 2px 8px !important;
  }

  body.mobile-game-v2.mobile-landscape #mobileSheetEyebrow,
  body.mobile-game-v2.mobile-landscape #mobileSheetExpandButton {
    display: none !important;
  }

  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape.mobile-sheet-open #mobileSheetEyebrow,
  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape.mobile-sheet-open #mobileSheetExpandButton {
    display: none !important;
  }

  body.mobile-game-v2.mobile-landscape #mobileSheetTitle {
    font-size: 13px !important;
  }

  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape.mobile-sheet-open #mobileSheetTitle {
    font-size: 11px !important;
  }

  body.mobile-game-v2.mobile-landscape #mobileSheetCloseButton {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    font-size: 16px !important;
  }

  body.mobile-game-v2.mobile-landscape[data-mobile-panel="towers"] > .shell > .sidebar > .bench-panel {
    display: none !important;
  }

  body.mobile-game-v2.mobile-landscape > .shell > .sidebar .panel {
    margin: 0 !important;
  }

  body.mobile-game-v2.mobile-landscape[data-mobile-panel="towers"] > .shell > .sidebar > .tower-panel,
  body.mobile-game-v2.mobile-landscape[data-mobile-panel="monsters"] > .shell > .sidebar > .barracks-panel {
    height: calc(100% - 48px) !important;
    min-height: 0 !important;
  }

  body.mobile-game-v2.mobile-landscape > .shell > .sidebar .panel-title,
  body.mobile-game-v2.mobile-landscape > .shell > .sidebar .tower-shop-header {
    min-height: 44px !important;
    height: 44px !important;
    padding: 0 0 4px !important;
  }

  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape[data-mobile-panel="towers"] .tower-panel > .tower-shop-header,
  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape[data-mobile-panel="monsters"] .barracks-panel > .panel-title {
    position: absolute !important;
    top: -49px !important;
    right: 49px !important;
    z-index: 5 !important;
    display: flex !important;
    width: auto !important;
    min-width: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    pointer-events: auto !important;
  }

  body.mobile-game-v2.mobile-landscape[data-mobile-panel="towers"] .tower-panel > .tower-shop-header > h2,
  body.mobile-game-v2.mobile-landscape[data-mobile-panel="monsters"] .barracks-panel > .panel-title > h2,
  body.mobile-game-v2.mobile-landscape[data-mobile-panel="monsters"] #mobileSheetTitle {
    display: none !important;
  }

  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape[data-mobile-panel="towers"] .tower-panel > .tower-shop-header,
  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape[data-mobile-panel="monsters"] .barracks-panel > .panel-title {
    position: static !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    pointer-events: none !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-sheet-actions {
    flex: 0 0 auto !important;
    gap: 3px !important;
  }

  body.mobile-game-v2.mobile-landscape #mobileSheetHeader > div:first-child {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-sheet-context-actions:not([hidden]),
  body.mobile-game-v2.mobile-landscape .mobile-sheet-context-actions:not([hidden]) > .shop-actions {
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    gap: 3px !important;
  }

  body.mobile-game-v2.mobile-landscape.mobile-sheet-has-context-actions #mobileSheetHeader > div:first-child {
    overflow: hidden !important;
  }

  body.mobile-game-v2.mobile-landscape.mobile-sheet-has-context-actions #mobileSheetTitle {
    max-width: 64px !important;
    overflow: hidden !important;
    font-size: 11px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.mobile-game-v2.mobile-landscape > .shell > .sidebar .panel-title h2 {
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape .shop-actions {
    gap: 3px !important;
  }

  body.mobile-game-v2.mobile-landscape .shop-actions .shop-action,
  body.mobile-game-v2.mobile-landscape .shop-actions .mode-button,
  body.mobile-game-v2.mobile-landscape #batchButtons {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 8px !important;
  }

  body.mobile-game-v2.mobile-landscape.match-active .game-loader:not([hidden]) {
    top: calc(var(--mg-safe-top) + var(--mg-hud-height) + 7px) !important;
    right: auto !important;
    bottom: auto !important;
    left: calc(var(--mg-safe-left) + var(--mg-action-rail-width) + 14px) !important;
    z-index: 34 !important;
    display: block !important;
    width: min(270px, calc(100vw - var(--mg-action-rail-width) - var(--mg-drawer-width) - 34px)) !important;
    height: auto !important;
    padding: 0 !important;
    pointer-events: none !important;
    background: transparent !important;
    backdrop-filter: none !important;
  }

  body.mobile-game-v2.mobile-landscape.match-active .game-loader-card {
    width: 100% !important;
    padding: 7px 10px !important;
    border: 1px solid rgba(99, 230, 220, 0.3) !important;
    border-radius: 10px !important;
    background: rgba(5, 16, 13, 0.92) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24) !important;
  }

  body.mobile-game-v2.mobile-landscape.match-active .game-loader-card .eyebrow,
  body.mobile-game-v2.mobile-landscape.match-active .game-loader-card > p,
  body.mobile-game-v2.mobile-landscape.match-active .game-loader-card .loader-bar {
    display: none !important;
  }

  body.mobile-game-v2.mobile-landscape.match-active .game-loader-card h2 {
    margin: 0 !important;
    color: var(--mg-text) !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
  }

  body.mobile-game-v2.mobile-landscape .tower-list,
  body.mobile-game-v2.mobile-landscape .barracks {
    display: grid !important;
    grid-auto-flow: row !important;
    grid-auto-columns: initial !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: none !important;
    align-content: start !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    gap: 5px !important;
    padding: 0 1px 4px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scroll-snap-type: y proximity !important;
    touch-action: pan-y !important;
  }

  body.mobile-game-v2.mobile-landscape .tower-list > .choice-button,
  body.mobile-game-v2.mobile-landscape .barracks > .choice-button,
  body.mobile-game-v2.mobile-landscape .shop-card {
    grid-template-columns: 40px minmax(0, 1fr) !important;
    grid-template-rows: 1fr !important;
    width: 100% !important;
    height: 58px !important;
    min-height: 58px !important;
    gap: 5px !important;
    padding: 5px 7px !important;
    scroll-snap-align: start !important;
    border-color: color-mix(in srgb, var(--rarity-color, var(--mg-line)) 54%, var(--mg-line)) !important;
    border-radius: 10px !important;
    background:
      radial-gradient(circle at 22px 50%, color-mix(in srgb, var(--rarity-color, #9fb4a6) 18%, transparent), transparent 40px),
      linear-gradient(105deg, rgba(15, 31, 25, 0.99), rgba(5, 13, 10, 0.99)) !important;
    box-shadow:
      inset 3px 0 0 var(--rarity-color, #9fb4a6),
      inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  }

  body.mobile-game-v2.mobile-landscape .shop-card:focus-visible {
    outline: 2px solid var(--mg-cyan) !important;
    outline-offset: -2px !important;
  }

  body.mobile-game-v2.mobile-landscape .shop-card:active {
    transform: scale(0.985) !important;
  }

  body.mobile-game-v2.mobile-landscape .shop-card:disabled {
    opacity: 0.68 !important;
  }

  body.mobile-game-v2.mobile-landscape .shop-card.is-pending .choice-main,
  body.mobile-game-v2.mobile-landscape .shop-card.is-pending .choice-cost,
  body.mobile-game-v2.mobile-landscape .shop-card.is-buy-pulse .choice-main,
  body.mobile-game-v2.mobile-landscape .shop-card.is-buy-pulse .choice-cost {
    opacity: 0.72 !important;
    transform: none !important;
  }

  body.mobile-game-v2.mobile-landscape .shop-card--pending-refill .shop-card-pending-copy {
    position: absolute !important;
    top: 50% !important;
    right: 7px !important;
    left: 43px !important;
    z-index: 9 !important;
    display: grid !important;
    min-width: 0 !important;
    gap: 2px !important;
    overflow: hidden !important;
    text-align: left !important;
    transform: translateY(-50%) !important;
  }

  body.mobile-game-v2.mobile-landscape .shop-card--pending-refill .shop-card-pending-copy strong,
  body.mobile-game-v2.mobile-landscape .shop-card--pending-refill .shop-card-pending-copy small {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.mobile-game-v2.mobile-landscape .shop-card--pending-refill .shop-card-pending-copy strong {
    color: var(--mg-text) !important;
    font-size: 9px !important;
    line-height: 1.05 !important;
  }

  body.mobile-game-v2.mobile-landscape .shop-card--pending-refill .shop-card-pending-copy small {
    color: var(--mg-muted) !important;
    font-size: 8px !important;
    line-height: 1 !important;
  }

  body.mobile-game-v2.mobile-landscape .shop-card--pending-refill .shop-card-loader {
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    left: 10px !important;
    width: 26px !important;
    height: 26px !important;
    transform: translateY(-50%) !important;
  }

  body.mobile-game-v2.mobile-landscape .shop-card--pending-refill .shop-card-loader::before {
    width: 22px !important;
    height: 22px !important;
    border-width: 1px !important;
    box-shadow: 0 0 12px rgba(255, 204, 84, 0.22) !important;
  }

  body.mobile-game-v2.mobile-landscape .shop-card--pending-refill .shop-card-loader::after {
    width: 4px !important;
    height: 4px !important;
    box-shadow:
      -9px -6px 0 -1px rgba(98, 234, 208, 0.9),
      9px -5px 0 -1px rgba(255, 202, 87, 0.92),
      -7px 8px 0 -1px rgba(255, 248, 232, 0.78),
      8px 8px 0 -1px rgba(98, 184, 255, 0.86) !important;
  }

  body.mobile-game-v2.mobile-landscape .shop-card .choice-icon {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    border: 1px solid color-mix(in srgb, var(--rarity-color, #9fb4a6) 56%, rgba(255, 255, 255, 0.08)) !important;
    border-radius: 8px !important;
    background:
      radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--rarity-color, #9fb4a6) 18%, transparent), transparent 62%),
      rgba(2, 8, 6, 0.82) !important;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.35) !important;
  }

  body.mobile-game-v2.mobile-landscape .shop-card .choice-main {
    grid-column: 2 !important;
    grid-row: 1 !important;
    max-height: 48px !important;
    gap: 2px !important;
    padding-right: 34px !important;
  }

  body.mobile-game-v2.mobile-landscape.mobile-sheet-open[data-mobile-panel="towers"] .shop-card .choice-name,
  body.mobile-game-v2.mobile-landscape.mobile-sheet-open[data-mobile-panel="monsters"] .shop-card .choice-name {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    font-size: 10px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    -webkit-line-clamp: 1 !important;
  }

  body.mobile-game-v2.mobile-landscape .shop-card .choice-cost {
    position: absolute !important;
    top: 50% !important;
    right: 4px !important;
    bottom: auto !important;
    left: auto !important;
    display: inline-flex !important;
    min-height: 22px !important;
    padding: 2px 4px !important;
    font-size: 9px !important;
    border: 1px solid rgba(244, 201, 93, 0.4) !important;
    background: linear-gradient(180deg, rgba(48, 39, 12, 0.9), rgba(12, 13, 8, 0.94)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 240, 190, 0.1) !important;
    transform: translateY(-50%) !important;
  }

  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape[data-mobile-panel="towers"] .shop-card .choice-cost,
  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape[data-mobile-panel="monsters"] .unit-shop-card .choice-cost {
    position: absolute !important;
    inset: 50% 4px auto auto !important;
    grid-area: auto !important;
    align-self: auto !important;
    justify-self: auto !important;
    transform: translateY(-50%) !important;
  }

  body.mobile-game-v2.mobile-landscape .shop-card .tower-shop-floating-badges {
    top: auto !important;
    right: auto !important;
    bottom: 4px !important;
    left: 48px !important;
    align-items: center !important;
    width: 54px !important;
    height: 16px !important;
    justify-content: flex-start !important;
    gap: 3px !important;
    overflow: hidden !important;
    flex-wrap: nowrap !important;
  }

  body.mobile-game-v2.mobile-landscape .shop-card .mobile-shop-rarity {
    display: none !important;
  }

  body.mobile-game-v2.mobile-landscape .shop-card .shop-decision-badge,
  body.mobile-game-v2.mobile-landscape .shop-card .tower-trait-pill,
  body.mobile-game-v2.mobile-landscape .shop-card .unit-stat-pill {
    min-height: 16px !important;
    padding: 2px 4px !important;
    font-size: 9px !important;
  }

  /* Tower cards have exactly two readable rows: name, then element/target/effect. */
  body.mobile-game-v2.mobile-landscape.mobile-sheet-open[data-mobile-panel="towers"] .shop-card .choice-main {
    grid-template-rows: minmax(14px, 22px) !important;
    align-content: start !important;
    height: 48px !important;
    padding: 3px 36px 18px 0 !important;
  }

  body.mobile-game-v2.mobile-landscape.mobile-sheet-open[data-mobile-panel="towers"] .shop-card .choice-name {
    display: -webkit-box !important;
    max-height: 22px !important;
    line-height: 1.05 !important;
    white-space: normal !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
  }

  body.mobile-game-v2.mobile-landscape.mobile-sheet-open[data-mobile-panel="towers"] .shop-card .tower-trait-list,
  body.mobile-game-v2.mobile-landscape.mobile-sheet-open[data-mobile-panel="towers"] .shop-card .tower-tags {
    display: none !important;
  }

  body.mobile-game-v2.mobile-landscape.mobile-sheet-open[data-mobile-panel="towers"] .shop-card .tower-shop-floating-badge {
    display: inline-flex !important;
    min-width: 0 !important;
    height: 16px !important;
    overflow: hidden !important;
  }

  body.mobile-game-v2.mobile-landscape.mobile-sheet-open[data-mobile-panel="towers"] .shop-card .tower-shop-floating-badge--element {
    flex: 0 0 16px !important;
  }

  body.mobile-game-v2.mobile-landscape.mobile-sheet-open[data-mobile-panel="towers"] .shop-card .tower-shop-floating-badge--target {
    flex: 1 1 auto !important;
  }

  body.mobile-game-v2.mobile-landscape.mobile-sheet-open[data-mobile-panel="towers"] .shop-card .tower-shop-floating-badge .shop-decision-badge {
    width: 100% !important;
    min-width: 0 !important;
    height: 16px !important;
    min-height: 16px !important;
    padding: 1px 3px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.mobile-game-v2.mobile-landscape.mobile-sheet-open[data-mobile-panel="towers"] .shop-card .tower-shop-floating-badge--element .shop-decision-badge {
    justify-content: center !important;
    padding: 1px !important;
  }

  body.mobile-game-v2.mobile-landscape.mobile-sheet-open[data-mobile-panel="towers"] .shop-card .tower-shop-floating-badge--element .shop-decision-icon {
    width: 13px !important;
    height: 13px !important;
  }

  body.mobile-game-v2.mobile-landscape.mobile-sheet-open[data-mobile-panel="towers"] .shop-card .shop-decision-row--combat {
    position: absolute !important;
    right: 38px !important;
    bottom: 4px !important;
    left: 105px !important;
    z-index: 3 !important;
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    height: 16px !important;
    min-height: 16px !important;
    gap: 0 !important;
    overflow: hidden !important;
    flex-wrap: nowrap !important;
  }

  body.mobile-game-v2.mobile-landscape.mobile-sheet-open[data-mobile-panel="towers"] .shop-card .shop-decision-row--combat > .shop-decision-badge {
    display: none !important;
  }

  body.mobile-game-v2.mobile-landscape.mobile-sheet-open[data-mobile-panel="towers"] .shop-card .shop-decision-row--combat > .shop-decision-badge:first-child {
    display: inline-flex !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 16px !important;
    min-height: 16px !important;
    padding: 1px 3px !important;
    overflow: hidden !important;
    font-size: 9px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  /* Tower offer = icon, name/price, then a compact metadata row. Keeping the
   * price in its own grid cell prevents five-digit costs from covering effects. */
  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape.mobile-sheet-open[data-mobile-panel="towers"] .tower-list > .shop-card:not(.power-box-card):not(.shop-card--pending-refill) {
    grid-template-columns: 40px minmax(0, 1fr) minmax(38px, auto) !important;
    grid-template-rows: 22px 18px !important;
    align-content: center !important;
    column-gap: 5px !important;
    row-gap: 3px !important;
    height: 58px !important;
    min-height: 58px !important;
    padding: 5px 6px !important;
  }

  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape.mobile-sheet-open[data-mobile-panel="towers"] .shop-card:not(.power-box-card) .choice-icon {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
    align-self: center !important;
  }

  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape.mobile-sheet-open[data-mobile-panel="towers"] .shop-card:not(.power-box-card) .choice-main {
    display: contents !important;
  }

  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape.mobile-sheet-open[data-mobile-panel="towers"] .shop-card:not(.power-box-card) .choice-name {
    position: static !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: center !important;
    display: block !important;
    width: 100% !important;
    max-height: 22px !important;
    overflow: hidden !important;
    font-size: 11px !important;
    line-height: 1.05 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape.mobile-sheet-open[data-mobile-panel="towers"] .shop-card:not(.power-box-card) .choice-cost {
    position: static !important;
    inset: auto !important;
    grid-column: 3 !important;
    grid-row: 1 !important;
    align-self: center !important;
    justify-self: end !important;
    max-width: 58px !important;
    min-height: 22px !important;
    padding: 2px 4px !important;
    overflow: hidden !important;
    font-size: 9px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    transform: none !important;
  }

  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape.mobile-sheet-open[data-mobile-panel="towers"] .shop-card:not(.power-box-card) .tower-shop-floating-badges {
    position: static !important;
    inset: auto !important;
    grid-column: 2 !important;
    grid-row: 2 !important;
    align-self: center !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    height: 18px !important;
    gap: 3px !important;
    overflow: hidden !important;
  }

  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape.mobile-sheet-open[data-mobile-panel="towers"] .shop-card:not(.power-box-card) .shop-decision-row--combat {
    position: static !important;
    inset: auto !important;
    grid-column: 3 !important;
    grid-row: 2 !important;
    align-self: center !important;
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 18px !important;
    min-height: 18px !important;
    gap: 0 !important;
    overflow: hidden !important;
  }

  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape.mobile-sheet-open[data-mobile-panel="towers"] .shop-card:not(.power-box-card) .shop-decision-row--combat > .shop-decision-badge:first-child {
    width: 100% !important;
    min-width: 0 !important;
    height: 18px !important;
    min-height: 18px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  /* Unit cards reserve a real price column. Large late-game prices used to be
   * absolutely positioned over the name, badges and HP/eco values. */
  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape.mobile-sheet-open[data-mobile-panel="monsters"] .barracks > .unit-shop-card {
    grid-template-columns: 40px minmax(0, 1fr) minmax(48px, auto) !important;
    grid-template-rows: 1fr !important;
    height: 64px !important;
    min-height: 64px !important;
    padding: 5px 6px !important;
  }

  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape.mobile-sheet-open[data-mobile-panel="monsters"] .unit-shop-card .choice-icon {
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: center !important;
  }

  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape.mobile-sheet-open[data-mobile-panel="monsters"] .unit-shop-card .choice-main {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: stretch !important;
    align-content: start !important;
    width: 100% !important;
    height: 54px !important;
    max-height: 54px !important;
    gap: 3px !important;
    padding: 2px 0 18px !important;
  }

  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape.mobile-sheet-open[data-mobile-panel="monsters"] .unit-shop-card .choice-name {
    display: block !important;
    max-height: 12px !important;
    overflow: hidden !important;
    font-size: 10px !important;
    line-height: 1.08 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape.mobile-sheet-open[data-mobile-panel="monsters"] .unit-shop-card .unit-shop-decision-row {
    display: flex !important;
    min-width: 0 !important;
    min-height: 16px !important;
    gap: 3px !important;
    overflow: hidden !important;
    flex-wrap: nowrap !important;
  }

  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape.mobile-sheet-open[data-mobile-panel="monsters"] .unit-shop-card .unit-shop-decision-row > .shop-decision-badge {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    min-height: 16px !important;
    padding: 2px 4px !important;
    overflow: hidden !important;
    font-size: 8px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape.mobile-sheet-open[data-mobile-panel="monsters"] .unit-shop-card .unit-shop-decision-row > .shop-decision-badge:nth-child(n + 3) {
    display: none !important;
  }

  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape.mobile-sheet-open[data-mobile-panel="monsters"] .unit-shop-card .unit-shop-floating-stats {
    position: absolute !important;
    top: auto !important;
    right: 58px !important;
    bottom: 5px !important;
    left: 48px !important;
    z-index: 4 !important;
    display: flex !important;
    align-items: center !important;
    width: auto !important;
    max-width: none !important;
    height: 16px !important;
    min-height: 16px !important;
    gap: 3px !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }

  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape.mobile-sheet-open[data-mobile-panel="monsters"] .unit-shop-card .unit-shop-floating-stats .unit-shop-pill {
    flex: 0 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    height: 16px !important;
    min-height: 16px !important;
    gap: 2px !important;
    padding: 1px 3px !important;
    overflow: hidden !important;
    font-size: 8px !important;
    white-space: nowrap !important;
  }

  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape.mobile-sheet-open[data-mobile-panel="monsters"] .unit-shop-card .unit-shop-floating-stats .heart-icon,
  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape.mobile-sheet-open[data-mobile-panel="monsters"] .unit-shop-card .unit-shop-floating-stats .income-icon {
    flex: 0 0 9px !important;
    width: 9px !important;
    height: 9px !important;
  }

  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape.mobile-sheet-open[data-mobile-panel="monsters"] .unit-shop-card .choice-cost {
    position: static !important;
    inset: auto !important;
    grid-column: 3 !important;
    grid-row: 1 !important;
    align-self: center !important;
    justify-self: end !important;
    max-width: 68px !important;
    min-height: 24px !important;
    padding: 2px 5px !important;
    overflow: hidden !important;
    font-size: 9px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    transform: none !important;
  }

  /* Camera mode owns a dedicated strip above the bench: no overlapping taps. */
  body.mobile-game-v2.mobile-landscape.mobile-camera-mode .mobile-camera-controls:not([hidden]) {
    top: auto !important;
    right: auto !important;
    bottom: calc(var(--mg-safe-bottom) + var(--mg-bench-reserved-height) + 7px) !important;
    left: calc(var(--mg-safe-left) + var(--mg-action-rail-width) + 7px) !important;
    z-index: 64 !important;
    display: grid !important;
    grid-template-columns: repeat(5, 44px) minmax(112px, auto) 42px !important;
    width: auto !important;
    max-width: calc(100vw - var(--mg-safe-left) - var(--mg-safe-right) - var(--mg-action-rail-width) - 18px) !important;
    height: 48px !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-board-readout {
    display: block !important;
    min-width: 0 !important;
    max-width: 170px !important;
    overflow: hidden !important;
    padding: 0 7px !important;
    color: var(--mg-text) !important;
    font-size: 9px !important;
    font-weight: 750 !important;
    line-height: 48px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-zoom-readout {
    min-width: 38px !important;
    padding: 0 3px !important;
    font-size: 8px !important;
  }

  /* Placement or tower actions replace the bench instead of stacking above it. */
  body.mobile-game-v2.mobile-landscape.selected-panel-open #gameArea > .bench-panel {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-placement-toolbar:not([hidden]) {
    top: auto !important;
    right: var(--mg-safe-right) !important;
    bottom: calc(var(--mg-safe-bottom) + var(--mg-bench-reserved-height) + 6px) !important;
    left: calc(var(--mg-safe-left) + var(--mg-action-rail-width) + 6px) !important;
    width: min(330px, calc(100vw - var(--mg-safe-left) - var(--mg-safe-right) - var(--mg-action-rail-width) - 12px)) !important;
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    border-radius: 13px !important;
  }

  body.mobile-game-v2.mobile-landscape.mobile-sheet-open .mobile-placement-toolbar:not([hidden]) {
    display: grid !important;
  }

  body.mobile-game-v2.mobile-landscape.mobile-sheet-open.mobile-placement-active[data-mobile-panel="towers"] .mobile-placement-toolbar:not([hidden]) {
    right: auto !important;
    width: min(330px, calc(100vw - var(--mg-safe-left) - var(--mg-safe-right) - var(--mg-action-rail-width) - var(--mg-drawer-width) - 18px)) !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    grid-template-columns: minmax(0, 1fr) 72px !important;
    gap: 5px !important;
    padding: 2px 2px 2px 10px !important;
  }

  body.mobile-game-v2.mobile-landscape.mobile-sheet-open.mobile-placement-active[data-mobile-panel="towers"] .mobile-placement-toolbar > span {
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape.mobile-sheet-open.mobile-placement-active[data-mobile-panel="towers"] .mobile-placement-toolbar .mobile-action-button {
    width: 72px !important;
    min-width: 72px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 4px 6px !important;
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape.mobile-sheet-open.mobile-placement-active[data-mobile-panel="towers"] #mobileSheetTitle {
    overflow: hidden !important;
    color: var(--mg-gold) !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.mobile-game-v2.mobile-landscape.selected-tower-panel-floating #selectedTowerPanel:not([hidden]) {
    top: auto !important;
    right: var(--mg-safe-right) !important;
    bottom: var(--mg-safe-bottom) !important;
    left: calc(var(--mg-safe-left) + var(--mg-action-rail-width) + 6px) !important;
    grid-template-columns: 44px minmax(86px, 1fr) repeat(3, minmax(68px, 0.72fr)) !important;
    grid-template-rows: 1fr !important;
    width: min(660px, calc(100vw - var(--mg-safe-left) - var(--mg-safe-right) - var(--mg-action-rail-width) - 12px)) !important;
    height: var(--mg-bench-height) !important;
    min-height: var(--mg-bench-height) !important;
    max-height: var(--mg-bench-height) !important;
    gap: 5px !important;
    padding: 5px !important;
    border-radius: 13px !important;
  }

  body.mobile-game-v2.mobile-landscape #selectedTowerPanel .selected-tower-visual {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 44px !important;
    height: 44px !important;
  }

  body.mobile-game-v2.mobile-landscape #selectedTowerPanel #placedTowerName {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: start !important;
    padding-top: 7px !important;
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape #selectedTowerPanel #placedTowerStats {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: end !important;
    max-height: 22px !important;
    padding-bottom: 5px !important;
    font-size: 9px !important;
  }

  body.mobile-game-v2.mobile-landscape #selectedTowerPanel > button {
    min-height: 48px !important;
    height: 48px !important;
    padding: 4px 5px !important;
    font-size: 9px !important;
  }

  body.mobile-game-v2.mobile-landscape #selectedTowerPanel > button:nth-of-type(1) { grid-column: 3 !important; grid-row: 1 !important; }
  body.mobile-game-v2.mobile-landscape #selectedTowerPanel > button:nth-of-type(2) { grid-column: 4 !important; grid-row: 1 !important; }
  body.mobile-game-v2.mobile-landscape #selectedTowerPanel > button:nth-of-type(3) { grid-column: 5 !important; grid-row: 1 !important; }

  body.mobile-game-v2.mobile-landscape #selectedTowerPanel[data-kind="creep"] {
    grid-template-columns: 44px minmax(86px, 116px) minmax(0, 1fr) !important;
  }

  body.mobile-game-v2.mobile-landscape #selectedTowerPanel[data-kind="creep"] #placedTowerName {
    grid-column: 2 !important;
    align-self: center !important;
    padding: 0 !important;
  }

  body.mobile-game-v2.mobile-landscape #selectedTowerPanel[data-kind="creep"] #placedTowerStats {
    grid-column: 3 / -1 !important;
    grid-row: 1 !important;
    align-self: stretch !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    max-height: none !important;
    gap: 4px !important;
    padding: 2px 1px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    touch-action: pan-x !important;
    scrollbar-width: thin !important;
  }

  body.mobile-game-v2.mobile-landscape #selectedTowerPanel[data-kind="creep"] .selected-stat-row {
    flex: 0 0 auto !important;
    align-items: center !important;
    min-height: 32px !important;
    gap: 4px !important;
    padding: 4px 6px !important;
    font-size: 9px !important;
    white-space: nowrap !important;
    border: 1px solid rgba(137, 180, 158, 0.25) !important;
    border-radius: 8px !important;
    background: rgba(17, 34, 27, 0.74) !important;
  }

  body.mobile-game-v2.mobile-landscape #selectedTowerPanel[data-kind="creep"] .selected-stat-row > span:last-child {
    display: block !important;
    overflow: visible !important;
    white-space: nowrap !important;
  }

  /* Players use the same narrow drawer as shops. */
  body.mobile-game-v2.mobile-landscape #scoreboard {
    top: calc(var(--mg-safe-top) + var(--mg-hud-height) + 5px) !important;
    right: var(--mg-safe-right) !important;
    bottom: calc(var(--mg-safe-bottom) + var(--mg-bench-reserved-height) + 5px) !important;
    width: var(--mg-drawer-width) !important;
    max-width: var(--mg-drawer-width) !important;
    gap: 5px !important;
    padding: 6px !important;
  }

  body.mobile-game-v2.mobile-landscape #scoreboard .score-card,
  body.mobile-game-v2.mobile-landscape #scoreboard .score-card.is-local {
    grid-template-columns: 20px 34px minmax(0, 1fr) !important;
    grid-template-rows: 58px !important;
    height: 68px !important;
    min-height: 68px !important;
    max-height: 68px !important;
    gap: 5px !important;
    padding: 5px !important;
  }

  body.mobile-game-v2.mobile-landscape #scoreboard .score-index {
    width: 20px !important;
    height: 20px !important;
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape #scoreboard .score-avatar {
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
  }

  body.mobile-game-v2.mobile-landscape #scoreboard .score-main {
    grid-template-rows: 18px 37px !important;
    align-content: center !important;
    gap: 3px !important;
  }

  body.mobile-game-v2.mobile-landscape #scoreboard .score-header {
    gap: 4px !important;
  }

  body.mobile-game-v2.mobile-landscape #scoreboard .score-values {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, 17px) !important;
    align-content: center !important;
    gap: 3px 5px !important;
  }

  body.mobile-game-v2.mobile-landscape #scoreboard .score-value,
  body.mobile-game-v2.mobile-landscape #scoreboard .score-value .icon-value {
    justify-content: flex-start !important;
    overflow: hidden !important;
    font-size: 9px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  /* Reference books and synergies are consultative side drawers, not blockers. */
  body.mobile-game-v2.mobile-landscape .augment-book-overlay:not([hidden]),
  body.mobile-game-v2.mobile-landscape .power-book-overlay:not([hidden]),
  body.mobile-game-v2.mobile-landscape .traits-overlay:not([hidden]) {
    display: block !important;
    padding: 0 !important;
    pointer-events: none !important;
    background: transparent !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-book-panel,
  body.mobile-game-v2.mobile-landscape .power-book-panel,
  body.mobile-game-v2.mobile-landscape .traits-panel {
    position: fixed !important;
    top: calc(var(--mg-safe-top) + var(--mg-hud-height) + 5px) !important;
    right: var(--mg-safe-right) !important;
    bottom: calc(var(--mg-safe-bottom) + var(--mg-bench-reserved-height) + 5px) !important;
    left: auto !important;
    width: clamp(250px, 38vw, 330px) !important;
    max-width: 330px !important;
    max-height: none !important;
    padding: 10px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    pointer-events: auto !important;
    border-radius: 14px !important;
    background: rgba(6, 16, 12, 0.98) !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-book-panel,
  body.mobile-game-v2.mobile-landscape .power-book-panel,
  body.mobile-game-v2.mobile-landscape .traits-panel,
  body.mobile-game-v2.mobile-landscape .augment-book-panel *,
  body.mobile-game-v2.mobile-landscape .power-book-panel *,
  body.mobile-game-v2.mobile-landscape .traits-panel * {
    box-sizing: border-box !important;
    max-width: 100% !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-book-head,
  body.mobile-game-v2.mobile-landscape .power-book-head,
  body.mobile-game-v2.mobile-landscape .traits-panel-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 6px !important;
    min-height: 44px !important;
    margin: 0 0 7px !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-book-head > div,
  body.mobile-game-v2.mobile-landscape .power-book-head > div,
  body.mobile-game-v2.mobile-landscape .traits-panel-header > div:first-child {
    min-width: 0 !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-book-head .eyebrow,
  body.mobile-game-v2.mobile-landscape .power-book-head .eyebrow,
  body.mobile-game-v2.mobile-landscape .traits-panel-header .eyebrow {
    margin: 0 0 2px !important;
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape #augmentBookTitle,
  body.mobile-game-v2.mobile-landscape #powerBookTitle,
  body.mobile-game-v2.mobile-landscape #traitsPanelTitle {
    margin: 0 !important;
    overflow: hidden !important;
    font-size: 15px !important;
    line-height: 1.1 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.mobile-game-v2.mobile-landscape #augmentBookCloseButton,
  body.mobile-game-v2.mobile-landscape #powerBookCloseButton,
  body.mobile-game-v2.mobile-landscape #traitsPanelCloseButton {
    width: auto !important;
    min-width: 68px !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 5px 8px !important;
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-book-list,
  body.mobile-game-v2.mobile-landscape .power-book-list {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    max-height: none !important;
    gap: 6px !important;
    overflow: visible !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-book-entry {
    min-height: 0 !important;
    gap: 4px !important;
    padding: 8px !important;
    border-radius: 9px !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-book-entry .augment-rarity {
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-book-entry h3 {
    font-size: 12px !important;
    line-height: 1.15 !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-book-entry p,
  body.mobile-game-v2.mobile-landscape .augment-book-empty {
    font-size: 10px !important;
    line-height: 1.3 !important;
  }

  body.mobile-game-v2.mobile-landscape .traits-panel-content {
    display: grid !important;
    width: 100% !important;
    min-width: 0 !important;
    max-height: calc(100% - 51px) !important;
    gap: 8px !important;
    padding: 0 2px 0 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body.mobile-game-v2.mobile-landscape .traits-section {
    width: 100% !important;
    min-width: 0 !important;
    gap: 6px !important;
    contain: none !important;
  }

  body.mobile-game-v2.mobile-landscape .traits-section h3 {
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape .traits-element-tools,
  body.mobile-game-v2.mobile-landscape .element-resonance-panel,
  body.mobile-game-v2.mobile-landscape .traits-card-grid,
  body.mobile-game-v2.mobile-landscape .element-resistance-overview-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 6px !important;
  }

  body.mobile-game-v2.mobile-landscape .element-resonance-column,
  body.mobile-game-v2.mobile-landscape .element-resistance-overview,
  body.mobile-game-v2.mobile-landscape .element-resonance-card {
    width: 100% !important;
    min-width: 0 !important;
    padding: 5px !important;
  }

  body.mobile-game-v2.mobile-landscape .element-resonance-head,
  body.mobile-game-v2.mobile-landscape .element-resistance-overview-head {
    flex-wrap: wrap !important;
    gap: 4px !important;
    font-size: 9px !important;
  }

  body.mobile-game-v2.mobile-landscape .element-power-row {
    grid-template-columns: 14px minmax(0, 1fr) 30px minmax(24px, 0.7fr) 2em !important;
    min-height: 28px !important;
    gap: 3px !important;
    padding: 2px 4px !important;
    font-size: 9px !important;
  }

  body.mobile-game-v2.mobile-landscape .element-power-icon,
  body.mobile-game-v2.mobile-landscape .element-resonance-icon {
    width: 14px !important;
    height: 14px !important;
  }

  body.mobile-game-v2.mobile-landscape .trait-card-toggle {
    min-height: 44px !important;
    gap: 5px !important;
    padding: 6px !important;
  }

  body.mobile-game-v2.mobile-landscape .trait-icon {
    flex-basis: 28px !important;
    width: 28px !important;
    height: 28px !important;
  }

  body.mobile-game-v2.mobile-landscape .trait-summary-preview {
    max-width: 100% !important;
    font-size: 9px !important;
  }

  body.mobile-game-v2.mobile-landscape[data-mobile-panel="augments"] .mobile-augments-panel {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 5px !important;
  }

  body.mobile-game-v2.mobile-landscape[data-mobile-panel="augments"] .mobile-augments-panel > .mode-button {
    min-height: 44px !important;
    height: 44px !important;
    padding: 6px 8px !important;
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape[data-mobile-panel="augments"] .mobile-augments-panel > .mini-log {
    display: none !important;
  }

  /* Nonessential canvas overlays stay clear of the permanent controls. */
  body.mobile-game-v2.mobile-landscape .board-visibility-toggle {
    top: calc(var(--mg-safe-top) + var(--mg-hud-height) + 6px) !important;
    right: calc(var(--mg-safe-right) + 2px) !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-player-main {
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: inherit !important;
    font: inherit !important;
    text-align: left !important;
    border: 0 !important;
    background: transparent !important;
    appearance: none !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-player-main:focus-visible {
    outline: 2px solid var(--mg-cyan) !important;
    outline-offset: 2px !important;
  }

  body.mobile-game-v2.mobile-landscape #keybindSettings {
    display: none !important;
  }

  body.mobile-game-v2.mobile-landscape.tutorial-active .tutorial-coach {
    top: calc(var(--mg-safe-top) + var(--mg-hud-height) + 6px) !important;
    right: calc(var(--mg-safe-right) + 6px) !important;
    bottom: auto !important;
    left: auto !important;
    width: min(300px, 38vw) !important;
    max-height: calc(100dvh - var(--mg-safe-top) - var(--mg-safe-bottom) - var(--mg-hud-height) - var(--mg-bench-reserved-height) - 18px) !important;
    z-index: 96 !important;
    pointer-events: none !important;
  }

  body.mobile-game-v2.mobile-landscape.tutorial-active .tutorial-coach button,
  body.mobile-game-v2.mobile-landscape.tutorial-active .tutorial-coach a,
  body.mobile-game-v2.mobile-landscape.tutorial-active .tutorial-coach input {
    pointer-events: auto !important;
  }

  body.mobile-game-v2.mobile-landscape #endOverlay .end-modal {
    display: block !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
  }

  body.mobile-game-v2.mobile-landscape #endOverlay .end-recap {
    max-height: none !important;
    overflow: visible !important;
  }

  body.mobile-game-v2.mobile-landscape #endOverlay .end-actions {
    position: sticky !important;
    z-index: 2 !important;
    bottom: -14px !important;
    padding: 8px 0 calc(8px + var(--mg-safe-bottom)) !important;
    background: linear-gradient(180deg, rgba(8, 19, 15, 0.76), rgba(8, 19, 15, 0.99) 24%) !important;
  }

  body.mobile-game-v2.mobile-landscape .map-effect-toast:not([hidden]) {
    top: calc(var(--mg-safe-top) + var(--mg-hud-height) + 6px) !important;
    right: auto !important;
    left: calc(var(--mg-safe-left) + var(--mg-action-rail-width) + 7px) !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    width: min(270px, calc(100vw - var(--mg-action-rail-width) - 90px)) !important;
    max-width: 270px !important;
    max-height: 58px !important;
    gap: 2px 7px !important;
    margin: 0 !important;
    padding: 6px 8px !important;
    overflow: hidden !important;
    border-radius: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape .map-effect-toast .map-toast-eyebrow {
    align-self: center !important;
    font-size: 8px !important;
  }

  body.mobile-game-v2.mobile-landscape .map-effect-toast strong {
    min-width: 0 !important;
    overflow: hidden !important;
    font-size: 10px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.mobile-game-v2.mobile-landscape .map-effect-toast p {
    grid-column: 1 / -1 !important;
    display: block !important;
    min-width: 0 !important;
    overflow: hidden !important;
    font-size: 8px !important;
    line-height: 1.2 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.mobile-game-v2.mobile-landscape .runtime-notice-region {
    top: calc(var(--mg-safe-top) + var(--mg-hud-height) + 6px) !important;
    right: var(--mg-safe-right) !important;
    left: auto !important;
    width: min(280px, 38vw) !important;
  }

  body.mobile-game-v2.mobile-landscape .runtime-notice[data-runtime-notice="runtime-compat-warning"] {
    min-height: 44px !important;
    gap: 5px !important;
    padding: 3px 4px 3px 8px !important;
    border-radius: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape .runtime-notice[data-runtime-notice="runtime-compat-warning"] .runtime-notice__copy strong {
    overflow: hidden !important;
    font-size: 10px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.mobile-game-v2.mobile-landscape .runtime-notice[data-runtime-notice="runtime-compat-warning"] .runtime-notice__copy span {
    display: none !important;
  }

  body.mobile-game-v2.mobile-landscape .runtime-notice[data-runtime-notice="runtime-compat-warning"] .runtime-notice__close {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }

  body.mobile-game-v2.mobile-landscape.mobile-sheet-open .runtime-notice[data-runtime-notice="runtime-compat-warning"] {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  body.mobile-game-v2.mobile-landscape:has(.mobile-placement-toolbar:not([hidden])) .runtime-notice[data-runtime-notice="runtime-compat-warning"],
  body.mobile-game-v2.mobile-landscape:has(.augment-book-overlay:not([hidden])) .runtime-notice[data-runtime-notice="runtime-compat-warning"],
  body.mobile-game-v2.mobile-landscape:has(.power-book-overlay:not([hidden])) .runtime-notice[data-runtime-notice="runtime-compat-warning"],
  body.mobile-game-v2.mobile-landscape:has(.traits-overlay:not([hidden])) .runtime-notice[data-runtime-notice="runtime-compat-warning"],
  body.mobile-game-v2.mobile-landscape.selected-panel-open .runtime-notice[data-runtime-notice="runtime-compat-warning"],
  body.mobile-game-v2.mobile-landscape.mobile-camera-mode .runtime-notice[data-runtime-notice="runtime-compat-warning"],
  body.mobile-game-v2.mobile-landscape:not(.mobile-scoreboard-collapsed) .runtime-notice[data-runtime-notice="runtime-compat-warning"],
  body.mobile-game-v2.mobile-landscape.game-menu-open .runtime-notice[data-runtime-notice="runtime-compat-warning"] {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

/* iPhone landscape polish: safe traits, TFT-scale augments and opt-in telemetry. */
@media (orientation: landscape) and (max-width: 980px) {
  body.mobile-game-v2.mobile-landscape .desktop-trait-rail {
    position: fixed !important;
    top: calc(var(--mg-safe-top) + var(--mg-hud-height) + 6px) !important;
    right: auto !important;
    bottom: auto !important;
    left: calc(var(--mg-safe-left) + var(--mg-action-rail-width) + 5px) !important;
    z-index: 53 !important;
    display: grid !important;
    width: 27px !important;
    max-height: calc(100dvh - var(--mg-safe-top) - var(--mg-safe-bottom) - var(--mg-hud-height) - var(--mg-bench-reserved-height) - 14px) !important;
    gap: 2px !important;
    overflow: visible !important;
    pointer-events: none !important;
  }

  body.mobile-game-v2.mobile-landscape .desktop-trait-item {
    display: grid !important;
    width: 25px !important;
    min-width: 25px !important;
    height: 25px !important;
    min-height: 25px !important;
    place-items: center !important;
    padding: 0 !important;
    border-radius: 6px !important;
    pointer-events: auto !important;
  }

  body.mobile-game-v2.mobile-landscape .desktop-trait-item > .trait-icon {
    display: grid !important;
    width: 18px !important;
    min-width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    place-items: center !important;
    margin: 0 !important;
    transform: none !important;
  }

  body.mobile-game-v2.mobile-landscape .desktop-trait-item > .trait-icon img,
  body.mobile-game-v2.mobile-landscape .desktop-trait-item > .trait-icon svg {
    width: 15px !important;
    height: 15px !important;
    object-fit: contain !important;
  }

  body.mobile-game-v2.mobile-landscape .desktop-trait-badge {
    right: -3px !important;
    bottom: -3px !important;
    min-width: 11px !important;
    height: 11px !important;
    padding: 0 2px !important;
    font-size: 6px !important;
    line-height: 11px !important;
  }

  body.mobile-game-v2.mobile-landscape .desktop-trait-page-button {
    width: 25px !important;
    min-width: 25px !important;
    height: 18px !important;
    min-height: 18px !important;
    font-size: 7px !important;
    pointer-events: auto !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-trait-popover {
    top: calc(var(--mg-safe-top) + var(--mg-hud-height) + 5px) !important;
    right: auto !important;
    bottom: auto !important;
    left: calc(var(--mg-safe-left) + var(--mg-action-rail-width) + 38px) !important;
    width: min(286px, calc(100vw - var(--mg-safe-left) - var(--mg-safe-right) - var(--mg-action-rail-width) - 52px)) !important;
    max-height: calc(100dvh - var(--mg-safe-top) - var(--mg-safe-bottom) - var(--mg-hud-height) - var(--mg-bench-reserved-height) - 12px) !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-overlay:not([hidden]) {
    padding: calc(var(--mg-safe-top) + 6px) calc(var(--mg-safe-right) + 40px) calc(var(--mg-safe-bottom) + 6px) calc(var(--mg-safe-left) + 40px) !important;
    background: rgba(2, 7, 5, 0.48) !important;
    backdrop-filter: blur(2px) !important;
  }

  body.mobile-game-v2.mobile-landscape.augment-choice-active .runtime-notice-region,
  body.mobile-game-v2.mobile-landscape.augment-choice-active .mobile-fullscreen-prompt {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-overlay:not([hidden]) .augment-panel {
    width: min(680px, calc(100vw - var(--mg-safe-left) - var(--mg-safe-right) - 80px)) !important;
    max-height: calc(100dvh - var(--mg-safe-top) - var(--mg-safe-bottom) - 12px) !important;
    padding: 9px !important;
    overflow: hidden !important;
    border-radius: 13px !important;
    background:
      radial-gradient(circle at 50% 0%, rgba(244, 201, 93, 0.09), transparent 42%),
      rgba(6, 16, 12, 0.965) !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-panel-head {
    align-items: center !important;
    min-height: 30px !important;
    gap: 8px !important;
    margin-bottom: 5px !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-panel-head .eyebrow {
    margin: 0 0 1px !important;
    font-size: 8px !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-panel-head h2 {
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1 !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-hide-button {
    width: 32px !important;
    min-width: 32px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-hide-label {
    display: none !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-timer {
    min-height: 27px !important;
    margin: 0 0 5px !important;
    padding: 4px 7px !important;
    gap: 3px 8px !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-timer span,
  body.mobile-game-v2.mobile-landscape .augment-status {
    font-size: 8px !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-status {
    min-height: 25px !important;
    margin: 0 0 5px !important;
    padding: 5px 7px !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-choice-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-card {
    min-width: 0 !important;
    min-height: 148px !important;
    max-height: calc(100dvh - var(--mg-safe-top) - var(--mg-safe-bottom) - 68px) !important;
    gap: 4px !important;
    padding: 7px !important;
    overflow: hidden !important;
    border-radius: 9px !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-card-head {
    gap: 4px !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-card .augment-rarity,
  body.mobile-game-v2.mobile-landscape .augment-selected-badge {
    padding: 2px 5px !important;
    font-size: 7px !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-card h3 {
    min-width: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    font-size: 10px !important;
    line-height: 1.1 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-card > p {
    display: -webkit-box !important;
    min-height: 30px !important;
    margin: 0 !important;
    overflow: hidden !important;
    font-size: 8px !important;
    line-height: 1.25 !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-tower-preview-list {
    display: grid !important;
    gap: 3px !important;
    overflow: hidden !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-tower-preview {
    grid-template-columns: 24px minmax(0, 1fr) 20px !important;
    min-height: 28px !important;
    gap: 3px !important;
    padding: 2px 3px !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-tower-preview-icon,
  body.mobile-game-v2.mobile-landscape .augment-tower-preview-icon .choice-icon {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-tower-preview-element {
    width: 20px !important;
    height: 20px !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-actions {
    gap: 4px !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-actions > button,
  body.mobile-game-v2.mobile-landscape .augment-panel button {
    min-height: 30px !important;
    height: 30px !important;
    padding: 3px 6px !important;
    font-size: 8px !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-actions > .augment-reroll-button {
    flex-basis: 30px !important;
    min-width: 30px !important;
    padding: 0 !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-perf-menu-button {
    display: block !important;
    min-height: 36px !important;
    color: #b8fff3 !important;
    border-color: rgba(99, 230, 220, 0.32) !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-perf-menu-button.active {
    color: #05130f !important;
    border-color: var(--mg-cyan) !important;
    background: var(--mg-cyan) !important;
  }

  body.mobile-game-v2.mobile-landscape .perf-debug-overlay.is-mobile-compact {
    top: auto !important;
    right: var(--mg-safe-right) !important;
    bottom: calc(var(--mg-safe-bottom) + var(--mg-bench-reserved-height) + 6px) !important;
    left: auto !important;
    width: min(310px, calc(100vw - var(--mg-safe-left) - var(--mg-safe-right) - var(--mg-action-rail-width) - 14px)) !important;
    min-width: 0 !important;
    max-width: 310px !important;
    max-height: calc(100dvh - var(--mg-safe-top) - var(--mg-safe-bottom) - var(--mg-hud-height) - var(--mg-bench-reserved-height) - 14px) !important;
    padding: 6px 8px !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    background: rgba(4, 12, 15, 0.91) !important;
  }

  body.mobile-game-v2.mobile-landscape .perf-debug-overlay.is-mobile-compact .perf-debug-title {
    margin-bottom: 3px !important;
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape .perf-debug-overlay.is-mobile-compact .perf-debug-body {
    overflow: hidden !important;
    font-size: 10px !important;
    line-height: 1.25 !important;
    white-space: pre-wrap !important;
  }

  body.mobile-game-v2.mobile-landscape:has(.convergence-dossier-overlay:not([hidden])) .perf-debug-overlay.is-mobile-compact,
  body.mobile-game-v2.mobile-landscape:has(.augment-book-overlay:not([hidden])) .perf-debug-overlay.is-mobile-compact {
    right: auto !important;
    left: calc(var(--mg-safe-left) + var(--mg-action-rail-width) + 6px) !important;
    width: min(210px, calc(48vw - var(--mg-safe-left) - var(--mg-safe-right) - var(--mg-action-rail-width) - 12px)) !important;
    max-width: none !important;
    max-height: min(92px, calc(100dvh - var(--mg-safe-top) - var(--mg-safe-bottom) - var(--mg-hud-height) - var(--mg-bench-reserved-height) - 14px)) !important;
  }

  body.mobile-game-v2.mobile-landscape.tutorial-active[data-tutorial-coach="reference"]:has(.convergence-dossier-overlay:not([hidden])) .perf-debug-overlay.is-mobile-compact {
    display: none !important;
  }

  body.mobile-game-v2.mobile-landscape .game-menu:not([hidden]) {
    width: min(380px, calc(100vw - var(--mg-safe-left) - var(--mg-safe-right) - 36px)) !important;
    max-height: calc(100dvh - var(--mg-safe-top) - var(--mg-safe-bottom) - 12px) !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    padding: 10px !important;
    border-radius: 12px !important;
  }

  body.mobile-game-v2.mobile-landscape .game-menu > strong,
  body.mobile-game-v2.mobile-landscape .game-menu > .setting-row,
  body.mobile-game-v2.mobile-landscape .game-menu > details {
    grid-column: 1 / -1 !important;
  }

  body.mobile-game-v2.mobile-landscape .game-menu .menu-action,
  body.mobile-game-v2.mobile-landscape .game-menu summary,
  body.mobile-game-v2.mobile-landscape .game-menu select,
  body.mobile-game-v2.mobile-landscape .game-menu input[type="range"] {
    min-height: 36px !important;
    font-size: 9px !important;
  }
}

@media (orientation: landscape) and (max-width: 820px) {
  body.mobile-game-v2.mobile-ui.match-active.mobile-landscape.mobile-sheet-has-context-actions[data-mobile-panel="monsters"] #mobileSheetTitle {
    display: none !important;
  }
}

@media (orientation: landscape) and (max-width: 720px) {
  body.mobile-game-v2.mobile-landscape {
    --mg-drawer-width: clamp(206px, calc(13vw + 132px), 252px);
  }

  body.mobile-game-v2.mobile-landscape .mobile-top-bar {
    grid-template-columns: 82px minmax(280px, 1fr) 44px !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-stat--level {
    display: none !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-hud-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  body.mobile-game-v2.mobile-landscape.mobile-camera-mode .mobile-camera-controls:not([hidden]) {
    grid-template-columns: repeat(5, 44px) minmax(90px, auto) !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-zoom-readout {
    display: none !important;
  }
}

@media (orientation: landscape) and (max-width: 720px) and (max-height: 350px) {
  body.mobile-game-v2.mobile-landscape {
    --mg-action-rail-width: 104px;
  }

  body.mobile-game-v2.mobile-landscape .mobile-bottom-nav {
    right: auto !important;
    bottom: auto !important;
    grid-template-columns: repeat(2, 48px) !important;
    grid-template-rows: repeat(3, 44px) !important;
    width: var(--mg-action-rail-width) !important;
    height: 140px !important;
    align-content: start !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-bottom-nav .mobile-action-button {
    width: 48px !important;
    height: 44px !important;
    min-height: 44px !important;
  }
}

/* Convergence HUD: one compact active, one contextual threat cell, no board occlusion. */
body.mobile-game-v2 .mobile-stat--threat[hidden],
body.mobile-game-v2 .mobile-ascension-ability[hidden] {
  display: none !important;
}

@media (orientation: landscape) and (max-width: 980px) {
  body.mobile-game-v2.mobile-landscape.convergence-active .mobile-top-bar {
    grid-template-columns: minmax(82px, 0.72fr) minmax(310px, 4fr) 122px !important;
  }

  body.mobile-game-v2.mobile-landscape.convergence-active .mobile-top-actions {
    display: grid !important;
    grid-template-columns: 74px 44px !important;
    gap: 3px !important;
  }

  body.mobile-game-v2.mobile-landscape.convergence-active .mobile-menu-button {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-ascension-ability {
    display: grid !important;
    width: 74px !important;
    min-width: 74px !important;
    height: 44px !important;
    min-height: 44px !important;
    grid-template-columns: 25px minmax(0, 1fr) !important;
    gap: 3px !important;
    margin: 0 !important;
    padding: 4px !important;
    place-items: center !important;
    border-radius: 8px !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-ascension-ability[hidden] {
    display: none !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-ascension-ability-copy {
    display: grid !important;
    min-width: 0 !important;
    gap: 1px !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-ascension-ability-copy strong {
    overflow: hidden !important;
    font-size: 9px !important;
    line-height: 1 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-ascension-ability-copy small {
    font-size: 9px !important;
    line-height: 1 !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-ascension-ability .ascension-ability-glyph {
    width: 24px !important;
    height: 24px !important;
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape.convergence-active .mobile-stat--level {
    display: none !important;
  }

  body.mobile-game-v2.mobile-landscape.convergence-active .mobile-stat--threat:not([hidden]) {
    display: grid !important;
    border-color: rgba(177, 124, 255, 0.46) !important;
    background: linear-gradient(180deg, rgba(177, 124, 255, 0.16), rgba(17, 13, 29, 0.64)) !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-stat--threat strong {
    color: #e2c8ff !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-stat--threat.is-imminent {
    border-color: rgba(255, 115, 106, 0.7) !important;
    background: linear-gradient(180deg, rgba(255, 115, 106, 0.2), rgba(42, 11, 17, 0.66)) !important;
  }

  body.mobile-game-v2.mobile-landscape .mobile-stat--threat.is-imminent strong {
    color: #ffd0cb !important;
  }

  body.mobile-game-v2.mobile-landscape.convergence-pressure-active .mobile-stat--threat:not([hidden]) {
    border-color: rgba(255, 178, 93, 0.64) !important;
    background: linear-gradient(180deg, rgba(255, 151, 76, 0.2), rgba(43, 21, 12, 0.7)) !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-pressure-copy {
    max-height: 28px !important;
    overflow: hidden !important;
    padding: 3px 5px !important;
    font-size: 7px !important;
    line-height: 1.15 !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-overlay[data-choice-kind="ascension"] .augment-panel {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-rows: auto auto auto minmax(0, 1fr) !important;
    width: min(790px, calc(100vw - var(--mg-safe-left) - var(--mg-safe-right) - 48px)) !important;
    height: calc(100dvh - var(--mg-safe-top) - var(--mg-safe-bottom) - 8px) !important;
    max-height: calc(100dvh - var(--mg-safe-top) - var(--mg-safe-bottom) - 8px) !important;
    background:
      radial-gradient(circle at 50% -10%, rgba(159, 247, 255, 0.14), transparent 44%),
      rgba(4, 12, 14, 0.98) !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-overlay[data-choice-kind="ascension"] .augment-status {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-card {
    min-height: 100% !important;
    height: auto !important;
    max-height: none !important;
    gap: 4px !important;
    padding: 6px !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-overlay[data-choice-kind="ascension"] .augment-choice-grid {
    min-height: 0 !important;
    height: 100% !important;
    padding: 1px 2px 3px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-card-title {
    grid-template-columns: 25px minmax(0, 1fr) !important;
    gap: 5px !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-card-title .ascension-mark {
    width: 25px !important;
    height: 25px !important;
    font-size: 9px !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-card-title h3 {
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-card-title small {
    margin: 0 !important;
    overflow: hidden !important;
    font-size: 7px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-passive {
    display: -webkit-box !important;
    min-height: 28px !important;
    overflow: hidden !important;
    font-size: 7.5px !important;
    line-height: 1.2 !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-passive strong {
    display: inline !important;
    margin-right: 4px !important;
    font-size: 7px !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-anchor {
    grid-template-columns: 28px minmax(0, 1fr) auto !important;
    min-height: 34px !important;
    gap: 4px !important;
    padding: 2px 4px !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-anchor-icon,
  body.mobile-game-v2.mobile-landscape .ascension-anchor-icon .choice-icon {
    width: 27px !important;
    height: 27px !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-anchor small,
  body.mobile-game-v2.mobile-landscape .ascension-anchor em {
    font-size: 6px !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-anchor strong {
    font-size: 7.5px !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-fit-reasons {
    gap: 2px !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-fit-reasons > span {
    grid-template-columns: 10px minmax(0, 1fr) !important;
    gap: 2px !important;
    overflow: hidden !important;
    font-size: 6.8px !important;
    line-height: 1.15 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-active-preview {
    gap: 2px !important;
    padding: 3px 4px !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-active-preview strong,
  body.mobile-game-v2.mobile-landscape .ascension-active-preview em {
    font-size: 6.5px !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-active-preview p {
    display: -webkit-box !important;
    overflow: hidden !important;
    font-size: 7px !important;
    line-height: 1.15 !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-opponent-read {
    display: none !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-actions,
  body.mobile-game-v2.mobile-landscape .ascension-actions .primary-button {
    min-height: 30px !important;
    height: 30px !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-overlay[data-ascension-stage="evolution"] .augment-panel {
    width: min(700px, calc(100vw - var(--mg-safe-left) - var(--mg-safe-right) - 48px)) !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-overlay[data-ascension-stage="evolution"] .augment-choice-grid[data-offer-count="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    justify-content: center !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-evolution-card {
    min-height: 0 !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-evolution-source {
    grid-template-columns: 18px minmax(0, 1fr) !important;
    gap: 3px !important;
    min-height: 24px !important;
    padding: 2px 4px !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-evolution-source .ascension-mark {
    width: 18px !important;
    height: 18px !important;
    font-size: 7px !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-evolution-source small,
  body.mobile-game-v2.mobile-landscape .ascension-evolution-source strong {
    overflow: hidden !important;
    font-size: 6px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-evolution-deltas {
    min-height: 0 !important;
    gap: 3px !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-evolution-deltas p {
    display: -webkit-box !important;
    min-height: 28px !important;
    max-height: 34px !important;
    overflow: hidden !important;
    padding: 3px 5px !important;
    font-size: 7px !important;
    line-height: 1.15 !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-evolution-deltas strong {
    display: inline !important;
    margin-right: 3px !important;
    font-size: 7px !important;
  }

  body.mobile-game-v2.mobile-landscape .round-countdown[data-mode="convergence"] {
    width: min(420px, calc(100vw - var(--mg-safe-left) - var(--mg-safe-right) - 90px)) !important;
    padding: 10px 14px !important;
  }

  body.mobile-game-v2.mobile-landscape .round-countdown[data-mode="convergence"] strong {
    font-size: 18px !important;
  }

  body.mobile-game-v2.mobile-landscape .round-countdown[data-mode="convergence"] small {
    font-size: 8px !important;
  }
}

@media (orientation: landscape) and (max-width: 720px) {
  body.mobile-game-v2.mobile-landscape.convergence-active .mobile-top-bar {
    grid-template-columns: 82px minmax(280px, 1fr) 122px !important;
  }

  body.mobile-game-v2.mobile-landscape.convergence-active .mobile-hud-stats {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }
}

@media (orientation: landscape) and (max-height: 350px) and (max-width: 980px) {
  body.mobile-game-v2.mobile-landscape .ascension-card {
    min-height: 0 !important;
    height: 100% !important;
    max-height: none !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-passive {
    min-height: 20px !important;
    -webkit-line-clamp: 2 !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-fit-reasons > span:first-child,
  body.mobile-game-v2.mobile-landscape .ascension-opponent-read {
    display: none !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-evolution-source {
    display: none !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-evolution-deltas p {
    min-height: 22px !important;
    max-height: 26px !important;
    -webkit-line-clamp: 2 !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-active-preview p {
    -webkit-line-clamp: 1 !important;
  }
}

/* Persistent Convergence reference: readable without covering the board. */
@media (orientation: landscape) and (max-width: 980px) {
  body.mobile-game-v2.mobile-landscape .convergence-dossier-overlay:not([hidden]) {
    display: block !important;
    z-index: 95 !important;
    padding: 0 !important;
    pointer-events: none !important;
    background: transparent !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-dossier-panel {
    position: fixed !important;
    top: calc(var(--mg-safe-top) + var(--mg-hud-height) + 5px) !important;
    right: var(--mg-safe-right) !important;
    bottom: calc(var(--mg-safe-bottom) + var(--mg-bench-reserved-height) + 5px) !important;
    left: auto !important;
    width: clamp(278px, 48vw, 380px) !important;
    max-width: calc(100vw - var(--mg-safe-left) - var(--mg-safe-right) - 12px) !important;
    max-height: none !important;
    pointer-events: auto !important;
    border-radius: 13px !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-dossier-head {
    min-height: 48px !important;
    gap: 6px !important;
    padding: 5px 7px !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-dossier-head .eyebrow {
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-dossier-head h2 {
    font-size: 13px !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-dossier-head button {
    width: auto !important;
    min-width: 64px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 5px 7px !important;
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-dossier-head-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(58px, auto)) !important;
    gap: 4px !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-dossier-content {
    gap: 7px !important;
    padding: 7px !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-section-title {
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-section-title strong {
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-timeline-step {
    min-height: 54px !important;
    gap: 2px !important;
    padding: 5px !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-timeline-step > span,
  body.mobile-game-v2.mobile-landscape .convergence-timeline-step strong {
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-timeline-step small {
    font-size: 10px !important;
    line-height: 1.2 !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-dossier-grid,
  body.mobile-game-v2.mobile-landscape .convergence-dossier-column,
  body.mobile-game-v2.mobile-landscape .convergence-choice-summary,
  body.mobile-game-v2.mobile-landscape .convergence-boss-card {
    gap: 5px !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-choice-summary,
  body.mobile-game-v2.mobile-landscape .convergence-boss-card,
  body.mobile-game-v2.mobile-landscape .convergence-board-outcomes {
    padding: 7px !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-choice-summary > span,
  body.mobile-game-v2.mobile-landscape .convergence-choice-summary > em,
  body.mobile-game-v2.mobile-landscape .convergence-choice-summary > div,
  body.mobile-game-v2.mobile-landscape .convergence-choice-summary > small {
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-choice-summary > strong,
  body.mobile-game-v2.mobile-landscape .convergence-boss-head strong {
    font-size: 11px !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-choice-summary p,
  body.mobile-game-v2.mobile-landscape .convergence-boss-card p {
    font-size: 10px !important;
    line-height: 1.28 !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-open-book {
    min-height: 44px !important;
    margin: 0 !important;
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-boss-head {
    grid-template-columns: 30px minmax(0, 1fr) !important;
    gap: 5px !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-boss-mark {
    width: 28px !important;
    height: 28px !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-boss-head small,
  body.mobile-game-v2.mobile-landscape .convergence-boss-stats small,
  body.mobile-game-v2.mobile-landscape .convergence-boss-adaptation small,
  body.mobile-game-v2.mobile-landscape .convergence-boss-tags b,
  body.mobile-game-v2.mobile-landscape .convergence-board-outcomes > strong {
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-boss-stats > span,
  body.mobile-game-v2.mobile-landscape .convergence-boss-adaptation > span {
    padding: 5px !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-boss-stats strong,
  body.mobile-game-v2.mobile-landscape .convergence-boss-adaptation strong,
  body.mobile-game-v2.mobile-landscape .convergence-boss-tags span,
  body.mobile-game-v2.mobile-landscape .convergence-board-outcomes em {
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-book-head-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(62px, auto)) !important;
    gap: 4px !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-book-head-actions > button {
    width: auto !important;
    min-width: 62px !important;
    min-height: 44px !important;
    padding: 5px !important;
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-book-entry {
    grid-column: 1 !important;
  }

  body.mobile-game-v2.mobile-landscape .augment-book-entry p,
  body.mobile-game-v2.mobile-landscape .augment-book-empty,
  body.mobile-game-v2.mobile-landscape .ascension-book-context,
  body.mobile-game-v2.mobile-landscape .ascension-book-evolution p {
    font-size: 10px !important;
    line-height: 1.32 !important;
  }

  body.mobile-game-v2.mobile-landscape .ascension-book-entry .ascension-card-title small,
  body.mobile-game-v2.mobile-landscape .ascension-book-entry .ascension-anchor small,
  body.mobile-game-v2.mobile-landscape .ascension-book-entry .ascension-anchor strong,
  body.mobile-game-v2.mobile-landscape .ascension-book-entry .ascension-anchor em,
  body.mobile-game-v2.mobile-landscape .ascension-book-entry .ascension-active-preview strong,
  body.mobile-game-v2.mobile-landscape .ascension-book-entry .ascension-active-preview em,
  body.mobile-game-v2.mobile-landscape .ascension-book-entry .ascension-book-context strong,
  body.mobile-game-v2.mobile-landscape .ascension-book-entry .ascension-book-evolution > small,
  body.mobile-game-v2.mobile-landscape .ascension-book-entry .ascension-book-evolution > strong,
  body.mobile-game-v2.mobile-landscape .ascension-book-entry .ascension-book-evolution b,
  body.mobile-game-v2.mobile-landscape .ascension-book-entry .ascension-book-badge {
    font-size: 10px !important;
    line-height: 1.25 !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-phase-rules {
    gap: 5px !important;
    padding-top: 5px !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-phase-rules-head,
  body.mobile-game-v2.mobile-landscape .convergence-phase-rule-list {
    gap: 4px !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-phase-rules-head strong,
  body.mobile-game-v2.mobile-landscape .convergence-phase-rules-head small,
  body.mobile-game-v2.mobile-landscape .convergence-phase-rule-index,
  body.mobile-game-v2.mobile-landscape .convergence-phase-rule > div > strong,
  body.mobile-game-v2.mobile-landscape .convergence-phase-rule > div > small,
  body.mobile-game-v2.mobile-landscape .convergence-phase-rule > div > p,
  body.mobile-game-v2.mobile-landscape .convergence-boss-core-rules > span {
    font-size: 10px !important;
    line-height: 1.25 !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-phase-rule {
    grid-template-columns: 24px minmax(0, 1fr) !important;
    gap: 5px !important;
    padding: 5px !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-phase-rule-index {
    width: 24px !important;
    height: 24px !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-boss-core-rules > span {
    padding: 4px 5px !important;
  }

  body.mobile-game-v2.mobile-landscape.tutorial-active[data-tutorial-coach="reference"] .tutorial-coach {
    top: calc(var(--mg-safe-top) + var(--mg-hud-height) + 6px) !important;
    right: auto !important;
    bottom: auto !important;
    left: calc(var(--mg-safe-left) + var(--mg-action-rail-width) + 6px) !important;
    width: min(270px, calc(48vw - var(--mg-safe-left) - var(--mg-safe-right) - var(--mg-action-rail-width) - 12px)) !important;
    max-height: calc(100dvh - var(--mg-safe-top) - var(--mg-safe-bottom) - var(--mg-hud-height) - var(--mg-bench-reserved-height) - 18px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    pointer-events: auto !important;
  }

  body.mobile-game-v2.mobile-landscape.tutorial-active[data-tutorial-coach="reference"] .tutorial-coach-header {
    position: sticky !important;
    z-index: 3 !important;
    top: -7px !important;
    padding-block: 3px !important;
    background: rgba(9, 17, 11, 0.98) !important;
  }

  body.mobile-game-v2.mobile-landscape.tutorial-active[data-tutorial-coach="reference"] .tutorial-coach-header button {
    width: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 4px !important;
  }

  body.mobile-game-v2.mobile-landscape .tutorial-details {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
    margin-top: 6px !important;
  }

  body.mobile-game-v2.mobile-landscape .tutorial-details > span {
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 4px 5px !important;
  }

  body.mobile-game-v2.mobile-landscape .tutorial-details strong,
  body.mobile-game-v2.mobile-landscape .tutorial-details small {
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape.tutorial-active[data-tutorial-coach="reference"] .tutorial-coach-actions {
    position: sticky !important;
    z-index: 2 !important;
    bottom: -6px !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px !important;
    padding-top: 5px !important;
    background: linear-gradient(180deg, transparent, rgba(5, 12, 10, 0.98) 28%) !important;
  }

  body.mobile-game-v2.mobile-landscape.tutorial-active[data-tutorial-coach="reference"] .tutorial-coach-actions > button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    padding: 4px !important;
    font-size: 10px !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-resource-rules > span {
    grid-template-columns: 58px minmax(0, 1fr) !important;
    gap: 5px !important;
    padding: 5px !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-resource-rules b,
  body.mobile-game-v2.mobile-landscape .convergence-resource-rules small {
    font-size: 10px !important;
    line-height: 1.25 !important;
  }
}

@media (orientation: landscape) and (max-height: 350px) and (max-width: 980px) {
  body.mobile-game-v2.mobile-landscape .convergence-dossier-guide {
    display: none !important;
  }

  body.mobile-game-v2.mobile-landscape .convergence-dossier-panel {
    width: clamp(278px, 52vw, 360px) !important;
  }

  body.mobile-game-v2.mobile-landscape.tutorial-active[data-tutorial-coach="reference"] .tutorial-coach {
    padding: 8px !important;
    scroll-padding-block: 48px !important;
  }

  body.mobile-game-v2.mobile-landscape.tutorial-active[data-tutorial-coach="reference"] .tutorial-coach-header {
    top: -3px !important;
  }

  body.mobile-game-v2.mobile-landscape.tutorial-active[data-tutorial-coach="reference"] .tutorial-coach h2 {
    margin: 5px 0 4px !important;
    font-size: 13px !important;
    line-height: 1.15 !important;
  }

  body.mobile-game-v2.mobile-landscape.tutorial-active[data-tutorial-coach="reference"] .tutorial-coach p,
  body.mobile-game-v2.mobile-landscape.tutorial-active[data-tutorial-coach="reference"] .tutorial-requirement {
    font-size: 10px !important;
    line-height: 1.25 !important;
  }

  body.mobile-game-v2.mobile-landscape.tutorial-active[data-tutorial-coach="reference"] .tutorial-coach-actions {
    bottom: -3px !important;
    margin-top: 6px !important;
  }
}
