
/* Mobile V2 UI: simplified + reliable (uses real desktop buttons, reparented) */
@media (max-width: 768px){
  body.mobile-v2{
    overflow: hidden;
    height: 100vh;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
  }
  body.mobile-v2 #leftCol,
  body.mobile-v2 #treeCol{
    display:none !important;
  }
  body.mobile-v2 #notation-wrapper{
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 86px;
    max-height: 34vh;
    z-index: 60;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 50px rgba(0,0,0,.45);
  }
  body.mobile-v2 #visCol{
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  body.mobile-v2 #visWrap{
    height: calc(100vh - 52px) !important;
    border-radius: 0 !important;
  }

  /* Top header */
  #mV2Header{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    background: rgba(8,10,16,.72);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  #mV2Header .mV2Left,
  #mV2Header .mV2Right{
    display:flex;
    align-items:center;
    gap:10px;
    min-width: 64px;
  }
  #mV2Header .mV2Title{
    font-weight: 800;
    letter-spacing: .08em;
    font-size: 14px;
    opacity: .95;
    text-transform: uppercase;
  }
  #mV2Header button,
  #mV2Header .iconBtn{
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.92);
    display:flex;
    align-items:center;
    justify-content:center;
  }
  #mV2Header button:active{
    transform: scale(.98);
  }

  /* Track pill (reuses existing trackbar, just floats) */
  #mV2TrackPill{
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 70;
    max-width: calc(100vw - 24px);
    overflow: auto;
    border-radius: 999px;
    background: rgba(8,10,16,.55);
    border: 1px solid rgba(255,255,255,.10);
    backdrop-filter: blur(14px);
    padding: 6px 8px;
  }
  #mV2TrackPill::-webkit-scrollbar{ display:none; }

  /* Transport bar */
  #mV2Transport{
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 92px;
    height: 56px;
    z-index: 75;
    display:flex;
    align-items:center;
    justify-content: space-between;
    padding: 8px 10px;
    background: rgba(8,10,16,.62);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 18px;
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 40px rgba(0,0,0,.35);
  }
  #mV2Transport .mV2TransportLeft{
    display:flex;
    align-items:center;
    gap:10px;
  }
  body.mobile-v2 #playBtn{
    width: 54px !important;
    height: 54px !important;
    border-radius: 18px !important;
    font-size: 18px !important;
    background: rgba(0,255,210,.14) !important;
    border: 1px solid rgba(0,255,210,.28) !important;
    box-shadow: 0 0 0 1px rgba(0,255,210,.08) inset;
  }
  body.mobile-v2 #stopBtn, body.mobile-v2 #followBtn{
    width: 44px !important;
    height: 44px !important;
    border-radius: 14px !important;
  }
  #mV2Bpm{
    padding: 8px 10px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.05);
    font-weight: 700;
    font-size: 13px;
    opacity: .9;
  }

  /* Bottom sheet (collapsed) */
  #mV2Sheet{
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 82px;
    z-index: 90;
    padding: 10px 12px 14px;
    background: rgba(8,10,16,.78);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255,255,255,.10);
    box-shadow: 0 -18px 50px rgba(0,0,0,.35);
  }
  #mV2Sheet .mV2Handle{
    width: 46px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255,255,255,.20);
    margin: 0 auto 10px;
  }
  body.mobile-v2 #generateBtn{
    width: 100% !important;
    height: 46px !important;
    border-radius: 16px !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    letter-spacing: .03em !important;
  }
  body.mobile-v2 .mV2Hidden{ display:none !important; }

  /* Expanded sheet */
  body.mobile-v2.sheet-open #mV2Sheet{
    height: 64vh;
    overflow: hidden;
  }
  body.mobile-v2.sheet-open #mV2SheetContent{
    display:block;
    height: calc(64vh - 86px);
    overflow: auto;
    padding: 0 6px 10px;
  }
  #mV2SheetContent{ display:none; }

  body.mobile-v2.sheet-open #leftCol{
    display:block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 6px 0 0 !important;
  }
}
