/* Standalone opt-in debugging window, not an editor overlay or toast. */
.bzdr-debug-window{position:fixed;right:16px;top:105px;z-index:10030;width:min(430px,calc(100vw - 24px));height:min(340px,calc(100dvh - 150px));min-height:150px;display:flex;flex-direction:column;resize:both;overflow:hidden;border:1px solid #446176;border-radius:9px;background:#0d1720f5;box-shadow:0 12px 45px #000b;color:#d3e7f3;font:11px/1.4 ui-monospace,monospace}
.bzdr-debug-window[hidden]{display:none!important}
.bzdr-debug-top{height:39px;flex:none;display:flex;align-items:center;gap:6px;padding:5px 9px;background:#182b39;cursor:move;touch-action:none;user-select:none}
.bzdr-debug-top strong{flex:1;letter-spacing:.7px;font-size:10px}
.bzdr-debug-top button{padding:4px 8px;border:1px solid #506a7d;border-radius:4px;background:#213544;color:#deedf6;cursor:pointer}
.bzdr-debug-lines{flex:1;min-height:0;overflow:auto;padding:9px;user-select:text;white-space:pre-wrap;overflow-wrap:anywhere}
.bzdr-debug-entry{border-bottom:1px solid #ffffff0b;padding:3px 0;color:#a8c4d4}
.bzdr-debug-entry[data-level="warn"]{color:#f1cf85}.bzdr-debug-entry[data-level="error"]{color:#f7a8a8}
.bzdr-debug-foot{flex:none;padding:4px 9px;margin:0;border-top:1px solid #354958;color:#809bab;font-size:9px}
@media(max-width:899px){.bzdr-debug-window{top:70px;height:min(310px,calc(100dvh - 150px));resize:none}}
/* Desktop edit navigation: persistent zoom, a genuine timeline pan range, and
   independent vertical track scrolling. The native track headers stay pinned. */
body.bzdr-desktop #editView .timeline-viewport{position:relative!important;overflow:hidden!important}
body.bzdr-desktop #editView .timeline-viewport>.timeline-panel{overflow-x:hidden!important;overflow-y:scroll!important;scrollbar-width:auto!important;scrollbar-gutter:stable;scrollbar-color:#62859a #101c28;overscroll-behavior-y:contain}
body.bzdr-desktop #editView .timeline-viewport>.timeline-panel::-webkit-scrollbar{width:11px}
body.bzdr-desktop #editView .timeline-viewport>.timeline-panel::-webkit-scrollbar-thumb{border-radius:6px;background:#55758b}
.desktop-timeline-nav{display:none}
body.bzdr-desktop #editView .desktop-timeline-nav{position:absolute;z-index:8;display:flex;align-items:center;gap:5px;right:14px;bottom:10px;min-width:225px;max-width:min(420px,calc(100% - 22px));padding:5px 8px;border:1px solid #536c7e;border-radius:9px;background:#152534e8;box-shadow:0 6px 21px #0009;backdrop-filter:blur(7px)}
.desktop-timeline-nav button{flex:0 0 28px;height:27px;border:1px solid #627d90;border-radius:5px;background:#31485a;color:#ecf5ff;font:700 19px/1 system-ui;cursor:pointer}
.desktop-timeline-nav button:disabled{opacity:.45}
.desktop-timeline-nav input[type="range"]{flex:1;min-width:65px;accent-color:#81bbdf;cursor:ew-resize}
.desktop-timeline-nav label{font:9px/1 ui-monospace,monospace;color:#b5cbdb;white-space:nowrap}
@media(max-width:899px){
  /* Always anchored to the phone viewport, NOT to the scrollable track list. */
  body:not(.bzdr-desktop) #editView .mobile-zoom-dock{position:fixed!important;right:max(12px,env(safe-area-inset-right))!important;bottom:calc(66px + env(safe-area-inset-bottom))!important;z-index:1000!important;background:rgba(19,34,43,.77)!important;border-color:#536d7ecb!important;box-shadow:0 4px 14px #0007!important}
  body:not(.bzdr-desktop) #editView .mobile-zoom-dock button{background:rgba(38,60,76,.8)!important}
}

/* The full ruler lane sets the insertion/playhead position; left label buttons
   keep opening ruler/tempo settings, and session-marker buttons keep edit actions. */
#editView .timeline-ruler .ruler-measures,
#editView .markers .section-markers,
#editView #sessionRulerLanes .session-ruler>:not(button){cursor:crosshair;touch-action:pan-y}
#editView .timeline-viewport>.timeline-playhead{
  width:14px!important;margin-left:-7px!important;
  background:transparent!important;pointer-events:auto!important;
  cursor:ew-resize;touch-action:none;z-index:6!important
}
#editView .timeline-viewport>.timeline-playhead:before{
  content:'';display:block;width:2px;height:100%;margin:0 auto;
  background:linear-gradient(#e8faff,#aad6f0);
  box-shadow:0 0 4px #64bbef77;pointer-events:none
}
#editView .timeline-playhead-handle{
  position:absolute;left:90px;top:0;transform:translateX(-50%);z-index:9;
  width:35px;height:30px;display:grid;place-items:start center;
  padding:1px 0 0;border:0;border-radius:3px 3px 9px 9px;
  background:linear-gradient(#b5e6ff,#4a98c6);color:#071d2c;
  cursor:ew-resize;touch-action:none;font:700 22px/24px system-ui;
  box-shadow:0 2px 5px #000b
}
#editView .timeline-playhead-handle[hidden]{display:none!important}
#editView .timeline-playhead-handle:focus-visible{outline:2px solid #fff;outline-offset:3px}
@media(max-width:899px){
 #editView .timeline-playhead-handle{height:32px;width:36px}
 #editView .mobile-zoom-dock{position:fixed!important;right:max(12px,env(safe-area-inset-right))!important;bottom:calc(100px + env(safe-area-inset-bottom))!important;z-index:1000!important}
}
