/* Landscape menu content follows the same hierarchy in preparation and battle. */
body.mobile-layout #mobile-drawer {
  width: min(720px, calc(100vw - 24px - var(--rd-safe-area-left) - var(--rd-safe-area-right)));
  top: calc(var(--mobile-edge-top) + 50px);
  bottom: var(--mobile-edge-bottom);
}
body.mobile-layout #mobile-drawer > header { gap: 10px; }
body.mobile-layout #mobile-panel-title { flex: 1; font-size: 14px; }
body.mobile-layout #mobile-menu-back { font-size: 11px; }
body.mobile-layout #mobile-drawer [data-mobile-content] { padding: 8px 10px; }
body.mobile-layout #mobile-drawer [hidden] { display: none !important; }
body.mobile-layout #mobile-panel-more { display: flex; flex-direction: column; gap: 16px; }
body.mobile-layout #mobile-panel-more > * { margin: 0; min-width: 0; }
body.mobile-layout #mobile-menu-primary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (orientation: landscape) and (min-width: 600px) {
  body.mobile-layout #mobile-menu-primary[data-scene='battle'] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
body.mobile-layout [data-mobile-menu-item] { min-width: 0; }
body.mobile-layout [data-mobile-menu-item] button { width: 100%; min-height: 44px; padding: 8px 12px !important; text-align: left; font-size: 13px !important; }
body.mobile-layout #mobile-menu-footer { display: flex; justify-content: space-between; align-items: stretch; gap: 12px; padding-top: 12px; border-top: 1px solid var(--game-border, currentColor); }
body.mobile-layout #mobile-menu-footer > * { flex: 1; min-width: 0; }
body.mobile-layout #mobile-menu-footer button { min-height: 44px; font-size: 12px; }
body.mobile-layout #mobile-panel-options { display: flex; flex-direction: column; gap: 16px; }
body.mobile-layout .mobile-menu-section { min-width: 0; }
body.mobile-layout .mobile-menu-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
body.mobile-layout .mobile-menu-links button { width: 100%; min-height: 44px; text-align: left; font-size: 12px; }
body.mobile-layout #mobile-menu-gold { margin: 0 0 8px; font-size: 12px; }
body.mobile-layout #mobile-panel-options #fullscreen-controls,
body.mobile-layout #mobile-panel-options #btn-open-debug-panel { position: static; inset: auto; transform: none; width: 100%; box-sizing: border-box; }
body.mobile-layout #mobile-panel-options #fullscreen-toggle { width: 100%; }
body.mobile-layout #mobile-panel-options #fullscreen-status { max-width: none; margin-bottom: 0; }
body.mobile-layout #mobile-panel-options #top-disabled-container { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; }
body.mobile-layout #mobile-panel-options #fullscreen-controls > details { margin-top: 8px; }
body.mobile-layout #mobile-panel-settings > [data-audio-settings] { display: flex; flex-direction: column; gap: 12px; }
body.mobile-layout .mobile-controls-help { margin: 0; }
body.mobile-layout .mobile-controls-help summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
body.mobile-layout .mobile-help { font-size: 12px; line-height: 1.7; margin: 8px 0 0; }
body.mobile-layout .mobile-hero-tabs { display: flex; gap: 6px; position: sticky; top: -10px; z-index: 2; padding: 0 0 8px; }
body.mobile-layout .mobile-hero-tabs button { flex: 1; min-width: 0; font-size: 11px; padding: 6px !important; }
body.mobile-layout #mobile-hero-overview .console-left { gap: 14px; padding: 12px 0; }
body.mobile-layout #mobile-hero-overview #hero-portrait { width: 68px; height: 72px; }
body.mobile-layout #mobile-hero-overview #hero-portrait img { width: 100%; height: 100%; object-fit: cover; }
body.mobile-layout #mobile-hero-overview #hero-level-badge { font-size: 11px; }
body.mobile-layout #mobile-hero-overview .hero-bars-and-stats { width: min(380px, calc(100% - 85px)); gap: 10px; }
body.mobile-layout #mobile-hero-overview .hero-name { font-size: 17px; }
body.mobile-layout #mobile-hero-overview .bar-container { height: 18px; }
body.mobile-layout #mobile-hero-overview .bar-text { font-size: 11px; }
body.mobile-layout #mobile-hero-overview #hero-attr-type { display: inline-block; margin: 3px 0 8px; }
body.mobile-layout #mobile-hero-attributes .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 18px; margin: 12px 0; }
body.mobile-layout #mobile-hero-growth .hero-action-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
body.mobile-layout #mobile-hero-growth .hero-action-row button { min-width: 140px; font-size: 12px; }
body.mobile-layout #mobile-hero-growth .hero-talents-panel { min-height: 0; margin-top: 10px; }
body.mobile-layout #mobile-hero-growth .mobile-passives { padding: 8px 10px; border: 1px solid var(--game-border, currentColor); border-radius: 6px; }
body.mobile-layout #mobile-hero-growth .mobile-passives h3 { margin: 0 0 8px; font-size: 12px; }
body.mobile-layout #mobile-hero-growth #mobile-skill-note { font-size: 11px; line-height: 1.6; }
body.mobile-layout #mobile-hero-parts #hero-parts-container { display: block; width: 100%; }
body.mobile-layout #mobile-hero-parts .hero-part-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
body.mobile-layout #mobile-hero-parts .hero-part-help { margin-top: 10px; font-size: 12px; }
body.mobile-layout #mobile-hero-parts #hero-parts-status { font-size: 12px; }
body.mobile-layout #mobile-battle-summary { padding: 10px; margin-bottom: 10px; white-space: pre-line; line-height: 1.8; border-radius: 6px; font-size: 12px; }
body.mobile-layout #mobile-panel-meters #top-disabled-container { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; margin-top: 10px; font-size: 12px; }
body.mobile-layout #mobile-panel-map #camera-settings { padding-top: 10px; }
body.mobile-layout #mobile-panel-map #camera-settings > summary { display: none; }
body.mobile-layout #mobile-panel-map #camera-settings .camera-settings-content { display: flex; flex-direction: column; gap: 10px; }
body.mobile-layout .legacy-hidden { display: none !important; }
body.mobile-subpage-open #mobile-move-zone,
body.mobile-subpage-open #mobile-joystick,
body.mobile-subpage-open #mobile-attack,
body.mobile-subpage-open #item-active-dock,
body.mobile-subpage-open .command-grid > #skill-slot-q,
body.mobile-subpage-open .command-grid > #skill-slot-w,
body.mobile-subpage-open .command-grid > #skill-slot-r { visibility: hidden; pointer-events: none; }
body.mobile-layout #player-command-form[hidden],
body.mobile-layout #player-command-toggles[hidden],
body.mobile-layout #player-command-list[hidden] { display: none; }
body.mobile-layout #player-commands-dialog { width: min(680px, 100%); }
body.mobile-layout #player-command-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.mobile-layout #player-commands-overlay.automation-only #player-commands-dialog { width: min(520px, 100%); }
@media (max-width: 700px) and (orientation: landscape) {
  body.mobile-layout #mobile-menu-primary { gap: 6px; }
  body.mobile-layout [data-mobile-menu-item] button { font-size: 12px !important; }
}

/* Preserve the existing palette until the separate artwork task is approved. */
/* Landscape menu content follows the same hierarchy in preparation and battle. */
body.mobile-layout #mobile-drawer { border-color: #8d845c; background: #111d20fa; }
body.mobile-layout #mobile-drawer > header { background: #1e2c2e; }
body.mobile-layout .mobile-menu-section { background: #19282a; }
body.mobile-layout .mobile-menu-section h3 { color: #b2c9be; }
body.mobile-layout .mobile-menu-section .mobile-help { color: #b4c4c4; }
body.mobile-layout .mobile-hero-tabs { background: #111d20; }
body.mobile-layout .mobile-hero-tabs button[aria-pressed="true"] { background: #415548 !important; border-color: #b8c687 !important; color: #f5f2cd !important; }
body.mobile-layout #mobile-hero-overview #hero-attr-type { color: #a4b7a7; }
body.mobile-layout #mobile-hero-growth .hero-talents-panel { background: #19282a; border-color: #3b514e; }
body.mobile-layout #mobile-hero-growth .mobile-passives { background: #172528; }
body.mobile-layout #mobile-hero-growth #mobile-skill-note { color: #b7c9c4; }
body.mobile-layout #mobile-battle-summary { background: #1c2c2e; }
