/* SoulOne LIVE v63: final compact landscape navigation and dialog safety.
   No playback, WebAudio, routing or repertoire data changes. */
@media (max-width:1100px) and (pointer:coarse) {
  html:not(.soulone-ipad-classic) body>.app.soul-mobile-console {
    height:var(--sl51-height,100dvh)!important;
    max-height:var(--sl51-height,100dvh)!important;
  }
  body>.app.soul-mobile-console>.top.stage-header .stage-actions #status {
    /* Live status is still available in the repertoire; keep the global
       status node intact but free the two essential phone controls. */
    display:none!important;
  }
  body>.app.soul-mobile-console.sl51-focus-mode>.top.stage-header {
    grid-template-columns:minmax(0,1fr) 77px!important;
    grid-template-rows:minmax(0,1fr)!important;
  }
  body>.app.soul-mobile-console.sl51-focus-mode>.top.stage-header .stage-actions {
    grid-column:2!important;grid-row:1!important;
  }
  body>.app.soul-mobile-console .timeline .heading {
    box-sizing:border-box!important;
    min-width:0!important;max-width:100%!important;
    gap:5px!important;overflow:hidden!important;
  }
  body>.app.soul-mobile-console .timeline .heading>div:first-child {
    flex:1 1 0%!important;min-width:0!important;
    max-width:100%!important;overflow:hidden!important;
  }
  body>.app.soul-mobile-console .timeline .heading :is(.sl50-section-summary,.eyebrow,#songNote) {
    max-width:100%!important;overflow:hidden!important;
    text-overflow:ellipsis!important;white-space:nowrap!important;
  }
  body>.app.soul-mobile-console .timeline .heading .sl55-stage-edit {
    flex:0 0 auto!important;
    max-width:45%!important;
    margin-left:4px!important;
  }
  body>.app.soul-mobile-console .progress-panel,
  body>.app.soul-mobile-console .progress-panel .transport,
  body>.app.soul-mobile-console .progress-panel .length {
    min-width:0!important;max-width:100%!important;
  }
  body>.app.soul-mobile-console .right.live-library-panel .sl49-repertoire-header {
    min-width:0!important;width:100%!important;
    max-width:100%!important;
    gap:6px!important;overflow:hidden!important;
  }
  body>.app.soul-mobile-console .right.live-library-panel .sl49-repertoire-header>strong,
  body>.app.soul-mobile-console .right.live-library-panel .sl49-repertoire-status {
    min-width:0!important;max-width:100%!important;
    overflow:hidden!important;text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }
  body>.app.soul-mobile-console .right.live-library-panel .sl49-options {
    flex:0 0 32px!important;
    width:32px!important;min-width:32px!important;max-width:32px!important;
  }
  body>.app.soul-mobile-console.soul-mobile-mix-screen>#mixer.mixer.clean-mixer {
    grid-template-columns:clamp(146px,26%,180px) minmax(0,1fr) clamp(88px,16%,112px)!important;
    min-height:0!important;
    max-width:100%!important;
  }
  body>.app.soul-mobile-console.soul-mobile-mix-screen #mixer .clean-group--monitor .clean-rail {
    min-width:0!important;max-width:100%!important;gap:3px!important;
  }
  body>.app.soul-mobile-console.soul-mobile-mix-screen #mixer .clean-group--monitor .strip {
    flex:1 1 0%!important;width:0!important;
    min-width:0!important;max-width:50%!important;
    margin:0!important;
  }
  body>.app.soul-mobile-console.soul-mobile-mix-screen #mixer .clean-group--master {
    min-width:0!important;grid-column:3!important;grid-row:1!important;
  }
  body>.app.soul-mobile-console :is(.sl-mobile-audio-menu,.sl-mobile-windows-menu):not([hidden]) {
    position:fixed!important;
    z-index:2147483000!important;
    top:var(--sl63-menu-top,calc(env(safe-area-inset-top) + 100px))!important;
    left:auto!important;
    right:max(8px,env(safe-area-inset-right))!important;
    width:min(300px,calc(100vw - 18px))!important;
    min-width:0!important;
    max-width:calc(100vw - 18px)!important;
    max-height:calc(100dvh - var(--sl63-menu-top,100px) - 8px)!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior:contain!important;
  }
  body>.app.soul-mobile-console .stage-menu:not([hidden]) {
    top:var(--sl63-header-menu-top,calc(env(safe-area-inset-top) + 55px))!important;
    max-height:calc(100dvh - var(--sl63-header-menu-top,55px) - 8px)!important;
  }
  /* Native editors stay scrollable and centered. Editing controls, the
     final save row, and confirmation dialogs remain reachable on short phones. */
  .sl55-section-dialog,
  .sl60-bpm-dialog {
    box-sizing:border-box!important;
    width:min(1000px,calc(100vw - 16px))!important;
    max-width:calc(100vw - 16px)!important;
    max-height:calc(100dvh - 16px)!important;
    margin:auto!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior:contain!important;
  }
  .sl55-section-dialog :is(form,.sl56-wave-editor,.sl58-player,.sl55-editor-list) {
    min-width:0!important;max-width:100%!important;
  }
  .sl55-section-dialog :is(.sl55-dialog-actions,.sl55-dialog-header) {
    box-sizing:border-box!important;
    max-width:100%!important;
    min-width:0!important;
  }
  .sl55-section-dialog .sl56-wave-lanes,
  .sl55-section-dialog .sl55-editor-list {
    overflow-x:hidden!important;overflow-y:auto!important;
    overscroll-behavior:contain!important;
  }
  #sl52-access .sl52-panel {
    max-height:calc(var(--sl51-height,100dvh) - 18px)!important;
  }
}
@media (max-width:1100px) and (pointer:coarse) and (orientation:landscape) and (max-height:430px) {
  body>.app.soul-mobile-console .sl55-section-dialog .sl56-wave-lanes,
  .sl55-section-dialog .sl56-wave-lanes {
    max-height:clamp(66px,22dvh,112px)!important;
    min-height:55px!important;
  }
  .sl55-section-dialog .sl55-editor-list {
    max-height:clamp(80px,25dvh,140px)!important;
  }
  .sl55-section-dialog form {padding:8px!important;gap:5px!important}
  .sl55-section-dialog .sl55-dialog-actions {gap:5px!important}
  .sl55-section-dialog .sl58-player {padding:6px 8px!important}
}
/* iPhone in portrait is intentionally directed to rotate by the existing
   orientation screen. Do not force the desktop mixer into portrait. */
