/* Match the existing desktop toolbar in the mobile horizontal scroll strip.
   Presentation only: original controls/handlers and touch scrolling are reused. */
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar{
 box-sizing:border-box!important;display:flex!important;align-items:center!important;
 flex:0 0 78px!important;width:100%!important;max-width:100%!important;
 height:78px!important;min-height:78px!important;
 padding:5px 8px!important;gap:8px!important;
 border:1px solid #323a42!important;border-radius:0!important;
 background:linear-gradient(#252b31,#11181e)!important;
 overflow-x:auto!important;overflow-y:hidden!important;
 overscroll-behavior-x:contain!important;touch-action:pan-x!important;
 -webkit-overflow-scrolling:touch;scrollbar-width:thin;
 scrollbar-color:#64717a #182128;scroll-snap-type:none
}
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar::-webkit-scrollbar{height:5px}
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar::-webkit-scrollbar-thumb{background:#64717a;border-radius:3px}
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar>*{
 flex-shrink:0!important;margin-top:0!important;margin-bottom:0!important;
 box-sizing:border-box!important
}
/* Mode buttons: same paired SHUFFLE / SPOT / SLIP / GRID matrix. */
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar>.edit-mode-bar{
 order:0;display:flex!important;flex:0 0 108px!important;
 width:108px!important;min-width:108px!important;height:62px!important;
 min-height:62px!important;max-height:62px!important;
 padding:2px!important;margin:0!important;align-items:stretch!important;
 border:1px solid #39464f!important;border-radius:3px;background:#18222a!important
}
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar .edit-mode-picker,
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar #mobileCommandPair{display:none!important}
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar .mode-cells{
 display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
 grid-template-rows:repeat(2,minmax(0,1fr))!important;
 width:100%!important;flex:1 1 auto!important;min-width:0!important;gap:2px!important
}
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar .mode-button{
 width:100%!important;min-height:0!important;height:auto!important;padding:1px!important;
 border:1px solid #4c5d65!important;border-radius:2px!important;
 background:linear-gradient(#46535a,#26313a)!important;
 color:#c5d4dc!important;font:700 9px/1.1 system-ui,sans-serif!important
}
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar .mode-button.active{
 color:#d2ffe6!important;border-color:#579677!important;
 background:linear-gradient(#398364,#205944)!important
}
/* Compact two-level zoom presets, as in the desktop header. */
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar>.desktop-zoom-group{
 order:1;display:block!important;flex:0 0 112px!important;
 width:112px!important;min-width:112px!important
}
/* Desktop artwork and two-row tool selection; do not launch a modal to choose a cursor. */
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar>.edit-bottom-tools{
 order:2;position:static!important;display:grid!important;
 grid-template-columns:repeat(7,30px)!important;
 grid-template-rows:repeat(2,27px)!important;
 align-content:center!important;justify-content:start!important;
 gap:1px!important;flex:0 0 216px!important;width:216px!important;
 min-width:216px!important;height:62px!important;min-height:62px!important;
 max-height:62px!important;margin:0!important;padding:2px!important;
 background:#0d151d!important;border:1px solid #364550!important;
 border-radius:3px!important;overflow:hidden!important
}
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar .tool-choice{
 display:grid!important;place-items:center!important;flex:none!important;
 width:30px!important;min-width:30px!important;height:27px!important;
 min-height:27px!important;max-height:27px!important;
 padding:2px!important;font-size:15px!important;line-height:1!important;
 border:1px solid #495660!important;border-radius:2px!important;
 background:linear-gradient(#4a555e,#232d36)!important;
 color:#e0e8ed!important;box-shadow:inset 0 1px #ffffff16
}
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar .tool-choice.active{
 background:linear-gradient(#356280,#1a3a50)!important;
 border-color:#77b3d6!important;color:#c4edff!important
}
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar .tool-choice span{display:none!important}
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar .tool-choice svg{
 display:block!important;max-width:18px;max-height:20px;width:18px;height:20px;
 fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round
}
/* Same BAR BEAT TICK counter and START/END/LENGTH panel as the desktop. */
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar>.counter-bar{
 order:3;display:flex!important;flex:0 0 282px!important;
 width:282px!important;min-width:282px!important;height:62px!important;
 min-height:62px!important;max-height:62px!important;
 margin:0!important;padding:3px 5px!important;gap:5px!important;
 background:#050c0e!important;border:1px solid #34434b!important;
 border-radius:3px!important;overflow:hidden!important
}
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar .counter-big{
 flex:0 0 120px!important;width:120px!important;min-width:120px!important;
 background:transparent!important;padding:0!important;border:0!important
}
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar .counter-big strong{
 color:#75dfaa!important;font:700 18px/26px ui-monospace,monospace!important;
 white-space:nowrap;letter-spacing:-.9px
}
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar .counter-big small{
 display:block!important;color:#b7d0c3!important;font-size:8px!important;
 letter-spacing:.3px!important
}
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar .counter-side,
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar .bzdr-live-input-bar{
 display:none!important
}
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar .desktop-selection-counter{
 display:flex!important;flex-direction:column;align-items:stretch;justify-content:center;
 flex:1 1 auto;min-width:110px;gap:3px;color:#9db7ac;
 font:9px/1 ui-monospace,monospace
}
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar .desktop-selection-counter span{
 display:flex;justify-content:space-between;gap:4px
}
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar .desktop-selection-counter b{
 font-weight:600;color:#8fdbab
}
/* Matching GRID/NUDGE, transport, count-off, tempo/meter and output meter. */
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar>.desktop-grid-group{
 order:4;display:grid!important;flex:0 0 160px!important;
 width:160px!important;min-width:160px!important
}
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar>.transport-dock{
 order:5;display:flex!important;position:relative!important;
 flex:0 0 200px!important;width:200px!important;min-width:200px!important;
 height:62px!important;min-height:62px!important;max-height:62px!important;
 flex-direction:column!important;justify-content:center!important;
 margin:0!important;padding:2px 2px 10px!important;
 border:0!important;background:transparent!important;overflow:visible!important
}
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar .transport-buttons{
 display:grid!important;grid-template-columns:repeat(4,32px) repeat(2,24px)!important;
 grid-template-rows:25px 25px!important;column-gap:3px!important;row-gap:3px!important;
 flex:none!important;width:191px!important;max-width:191px!important;
 height:53px!important;min-height:53px!important;align-items:center!important;justify-content:start!important
}
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar .transport-buttons button{
 display:grid!important;place-items:center!important;
 flex:none!important;width:100%!important;height:25px!important;
 min-height:25px!important;padding:0!important;font-size:15px!important;
 border:1px solid #485762!important;border-radius:2px!important;
 background:linear-gradient(#46515a,#202a32)!important;color:#e7eff4!important
}
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar .transport-buttons button:disabled{opacity:.4}
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar>.desktop-session-group{
 order:6;display:grid!important;flex:0 0 148px!important;
 width:148px!important;min-width:148px!important;
 height:62px!important;grid-template-rows:repeat(3,18px);gap:1px;padding:2px 3px!important
}
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar .desktop-session-group button,
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar .desktop-session-group select{
 height:18px!important;min-height:18px!important;font-size:10px!important
}
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar>.desktop-output-meter{
 order:7;flex:0 0 58px!important;width:58px!important;min-width:58px!important;
 height:62px!important;min-height:62px!important;
 background:#070d11!important;border:1px solid #3e535e!important;
 padding:5px!important;color:#afc2c9!important;font:9px/1 ui-monospace,monospace!important
}
/* Preserve gestures, do not convert touch swipes to tool clicks. */
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar button,
body.bzdr-reference-toolbar:not(.bzdr-desktop) .mobile-ref-toolbar select{touch-action:manipulation}
