/* SoulOne LIVE 51: mobile operational recovery. No WebAudio changes.
   Guarantees stage/mixer remain visible on iPhone while exposing fullscreen. */
@media(max-width:1100px) and (pointer:coarse){
  html:not(.soulone-ipad-classic) body>.app.soul-mobile-console{
    --sl51-height:100dvh;
    height:var(--sl51-height)!important;
    max-height:var(--sl51-height)!important;
    min-height:0!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
  }
  body>.app.soul-mobile-console>.sl-mobile-view-nav:not([hidden]){
    display:flex!important;
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
    position:relative!important;
    z-index:2!important;
    flex:0 0 44px!important;
    min-height:44px!important;
    max-height:44px!important;
  }
  body>.app.soul-mobile-console .sl-mobile-preset{
    pointer-events:auto!important;
    touch-action:manipulation!important;
    cursor:pointer!important;
    -webkit-tap-highlight-color:transparent;
  }
  body>.app.soul-mobile-console.slmv-show-stage.slmv-hide-repertoire:not(.soul-mobile-mix-screen)>.main-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:minmax(0,1fr)!important;
    flex:1 1 0%!important;
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    overflow:hidden!important;
  }
  body>.app.soul-mobile-console.slmv-show-stage.slmv-hide-repertoire>.main-grid>.live-workspace{
    display:flex!important;
    flex-direction:column!important;
    grid-column:1 / -1!important;
    grid-row:1!important;
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-width:100%!important;
    overflow:hidden!important;
  }
  body>.app.soul-mobile-console.slmv-show-stage.slmv-hide-repertoire>.main-grid>.live-workspace>.timeline{
    display:flex!important;
    flex:1 1 0%!important;
    width:100%!important;
    min-height:0!important;
    overflow:hidden!important;
  }
  body>.app.soul-mobile-console.slmv-show-stage.slmv-hide-repertoire>.main-grid>.live-workspace>.progress-panel{
    display:flex!important;
    flex:0 0 56px!important;
    width:100%!important;
    max-width:100%!important;
  }
  body>.app.soul-mobile-console.soul-mobile-mix-screen>.main-grid{
    display:none!important;
  }
  body>.app.soul-mobile-console.soul-mobile-mix-screen>.meter-title{
    display:flex!important;
    visibility:visible!important;
    flex:0 0 34px!important;
    height:34px!important;
    min-height:34px!important;
    max-height:34px!important;
  }
  body>.app.soul-mobile-console.soul-mobile-mix-screen>#mixer.mixer.clean-mixer,
  body>.app.soul-mobile-console.soul-mobile-mix-screen>#mixer.mixer.clean-mixer[hidden]{
    display:grid!important;
    visibility:visible!important;
    opacity:1!important;
    flex:1 1 0%!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    position:relative!important;
    overflow:hidden!important;
    grid-template-columns:minmax(148px,178px) minmax(0,1fr) minmax(104px,116px)!important;
    grid-template-rows:minmax(0,1fr)!important;
    padding:6px!important;
    gap:6px!important;
  }
  body>.app.soul-mobile-console.soul-mobile-mix-screen #mixer .clean-group{
    display:flex!important;
    flex-direction:column!important;
    min-height:0!important;
    height:100%!important;
    overflow:hidden!important;
  }
  body>.app.soul-mobile-console.soul-mobile-mix-screen #mixer .clean-group--master{
    grid-column:3!important;
    grid-row:1!important;
  }
  body>.app.soul-mobile-console.soul-mobile-mix-screen #mixer .clean-group--master>.sl-music-output-mini{
    display:none!important;
  }
  body>.app.soul-mobile-console.soul-mobile-mix-screen #mixer .clean-group--master .clean-rail{
    flex:1 1 0%!important;
    display:flex!important;
    width:100%!important;
    min-height:0!important;
  }
  body>.app.soul-mobile-console.soul-mobile-mix-screen #mixer .clean-group--master .strip.master,
  body>.app.soul-mobile-console.soul-mobile-mix-screen #mixer .clean-group--master .strip.master .faderbox{
    display:flex!important;
    min-height:0!important;
    width:100%!important;
    max-height:100%!important;
  }
  body>.app.soul-mobile-console .stage-actions #fullscreenToggle{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:35px!important;
    min-width:35px!important;
    max-width:35px!important;
    height:35px!important;
    min-height:35px!important;
    max-height:35px!important;
    padding:0!important;
    background:#243e52!important;
    border:1px solid #436276!important;
    border-radius:8px!important;
    color:#dcecf6!important;
    font-size:20px!important;
    line-height:1!important;
    touch-action:manipulation!important;
    cursor:pointer!important;
  }
  body>.app.soul-mobile-console .stage-actions #fullscreenToggle .short-label{
    display:none!important;
  }
  body>.app.soul-mobile-console>.top.stage-header{
    grid-template-columns:minmax(0,1fr) minmax(275px,340px) 77px!important;
    gap:8px!important;
  }
  body>.app.soul-mobile-console .stage-actions{
    display:flex!important;
    justify-content:flex-end!important;
    align-items:center!important;
    gap:5px!important;
    min-width:77px!important;
    width:77px!important;
    overflow:visible!important;
  }
  body>.app.soul-mobile-console.sl51-focus-mode>.top.stage-header{
    grid-template-columns:minmax(0,1fr) 77px!important;
    height:40px!important;
    min-height:40px!important;
    max-height:40px!important;
    padding:2px 8px!important;
  }
  body>.app.soul-mobile-console.sl51-focus-mode>.top.stage-header .stage-center,
  body>.app.soul-mobile-console.sl51-focus-mode>.top.stage-header .stage-identity{
    display:none!important;
  }
  body>.app.soul-mobile-console.sl51-focus-mode>.top.stage-header .stage-actions{
    grid-column:2!important;
    grid-row:1!important;
  }
}
@media(max-width:1100px) and (pointer:coarse) and (orientation:portrait){
  body>.app.soul-mobile-console>.top.stage-header{
    grid-template-columns:minmax(0,1fr) 77px!important;
    grid-template-rows:auto auto!important;
  }
  body>.app.soul-mobile-console .stage-center{
    grid-row:2!important;
    grid-column:1/-1!important;
    min-width:0!important;
  }
  body>.app.soul-mobile-console .stage-actions{
    grid-row:1!important;
    grid-column:2!important;
  }
  body>.app.soul-mobile-console.soul-mobile-mix-screen>#mixer.mixer.clean-mixer{
    grid-template-columns:minmax(0,1fr) 105px!important;
    grid-template-rows:minmax(120px,1fr) minmax(170px,1.2fr)!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
  }
  body>.app.soul-mobile-console.soul-mobile-mix-screen #mixer .clean-group--monitor{
    grid-column:1!important;grid-row:1!important;
  }
  body>.app.soul-mobile-console.soul-mobile-mix-screen #mixer .clean-group--master{
    grid-column:2!important;grid-row:1!important;
  }
  body>.app.soul-mobile-console.soul-mobile-mix-screen #mixer .clean-group--music{
    grid-column:1/-1!important;grid-row:2!important;
  }
}
