/* Keep the page in the viewport; only equipment and note grids pan. */
html,body{max-width:100%;overflow-x:clip}body{min-width:0}button,input,select{max-width:100%}dialog{max-width:100vw;overflow-x:hidden;overscroll-behavior:contain}dialog[open]{margin:auto}dialog .instrument-shell{min-width:0;max-width:100%}.instrument-top{flex-wrap:wrap}.instrument-top>div{min-width:0}.instrument-top h2{overflow-wrap:anywhere}.instrument-top button{min-height:44px;flex-shrink:0}.beginner-guide{position:relative;top:auto;z-index:5;width:100%;min-width:0}.beginner-guide-content{grid-template-columns:minmax(0,1fr)}.beginner-guide-head{flex-wrap:wrap}.beginner-actions{display:grid;grid-template-columns:auto minmax(0,1fr) auto;width:100%}.beginner-actions button{min-width:0;white-space:normal;padding:10px 8px}.beginner-guide p,.beginner-guide h3{overflow-wrap:anywhere}.beginner-target{scroll-margin:20px!important}
#boothRoom{width:98vw;max-width:98vw;height:96dvh;max-height:96dvh;overflow-x:hidden;overflow-y:auto}#boothRoom .instrument-shell{padding:clamp(12px,2vw,24px)}#boothRoom .booth-tools{display:flex;flex-wrap:wrap;max-width:100%}#boothRoom .booth-tools button{min-height:44px;font-size:13px}#boothRoom .booth-orientation-help{white-space:normal;line-height:1.6;font-size:13px;max-width:100%}.booth-view-nav{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.booth-view-nav button{min-height:44px;flex:1 1 100px;font-size:13px}.booth-scroll-window{width:100%;max-width:100%;min-width:0;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;border:1px solid #57585c;border-radius:8px;padding-bottom:12px;scrollbar-color:#a181c1 #17131d;scrollbar-width:auto}.booth-scroll-window:focus-visible{outline:2px solid #7de4ec}.booth-scroll-window #hardwareBooth{min-width:0;width:max(1810px,100%);grid-template-columns:330px 330px 438px 330px 330px;gap:10px;border:0}.booth-scroll-window #hardwareBooth>*{scroll-margin-inline:12px}.booth-scroll-window.overview #hardwareBooth{width:100%;grid-template-columns:1fr 1fr 1.327fr 1fr 1fr;gap:3px;padding:6px}.booth-scroll-window.overview .cdj-player,.booth-scroll-window.overview .v10-mixer{pointer-events:none}.booth-scroll-window.overview{overflow:hidden}.booth-view-hint{font:13px/1.6 Arial;color:#c8b4d9;margin:6px 0 14px}
#boothRoom .booth-bottom,.booth-tempo-controls,.studio-performance{width:100%;max-width:100%;min-width:0}.tempo-control-grid,.performance-decks{grid-template-columns:repeat(4,minmax(0,1fr));overflow:visible}.tempo-control-grid fieldset,.performance-decks fieldset{min-width:0;max-width:100%}.tempo-control-grid input{box-sizing:border-box}.booth-tempo-controls label{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.booth-tempo-controls>label{margin:10px 0}.booth-tempo-controls>label input,.booth-tempo-controls>label select{min-height:44px;min-width:100px;font-size:16px}.manual-player-controls button{font-size:13px}.manual-player-controls output{overflow-wrap:anywhere}.booth-help p{overflow-wrap:anywhere}.instrument-layout,.dj-layout,.store-layout,.production-layout{min-width:0}.play-area,.instrument-sidebar,.dj-sidebar{min-width:0;max-width:100%}.piano-scroll,.sequence-scroll{max-width:100%;overflow:auto}
@media(min-width:1900px){.booth-scroll-window #hardwareBooth{width:100%;grid-template-columns:1fr 1fr 1.327fr 1fr 1fr}}
@media(max-width:1200px){.tempo-control-grid,.performance-decks{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){header{height:auto;min-height:76px;flex-wrap:wrap;padding:14px;gap:12px}.build-stage{white-space:normal;line-height:1.6}.room-heading,.below-scene{flex-wrap:wrap;gap:14px}main{padding:20px 12px 0}dialog,#boothRoom{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0;inset:0;margin:0}.instrument-shell{padding:14px}.instrument-layout,.dj-layout,.production-layout,.store-layout{grid-template-columns:minmax(0,1fr)!important}.instrument-top h2,#boothRoom .instrument-top h2{font-size:26px}.tempo-control-grid,.performance-decks{grid-template-columns:minmax(0,1fr)}.tempo-control-grid fieldset{min-width:0}.booth-tools>*{flex:1 1 140px}.booth-tools .auto-tempo-status{flex-basis:100%;line-height:1.5}.booth-bottom{display:flex;flex-wrap:wrap;gap:12px}.booth-record{display:flex;flex-wrap:wrap;gap:10px}.beginner-guide-head strong{font-size:11px}.beginner-guide h3{font-size:18px!important}.beginner-guide p{font-size:14px!important}.beginner-guide{padding:12px;margin:10px 0 16px}.beginner-guide-head button{margin-left:auto}.booth-view-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.booth-view-nav button{padding:10px 5px}.booth-scroll-window #hardwareBooth{width:calc(4 * var(--deck-width) + var(--mixer-width) + 64px);--deck-width:clamp(280px,calc(100vw - 52px),330px);--mixer-width:calc(var(--deck-width) * 1.327);grid-template-columns:var(--deck-width) var(--deck-width) var(--mixer-width) var(--deck-width) var(--deck-width)}.booth-scroll-window.overview #hardwareBooth{width:100%;grid-template-columns:1fr 1fr 1.327fr 1fr 1fr}.journey{grid-template-columns:1fr;gap:20px}.journey ol{grid-template-columns:1fr}.store-filters{display:flex;flex-wrap:wrap}.store-filters>*{min-width:0;max-width:100%}.store-filters label{flex:1 1 140px}input[type=number],input[type=text],input[type=search],select{font-size:16px}.booth-tempo-controls{padding:12px}.beginner-arrow{max-width:120px}}
@media(max-height:550px) and (orientation:landscape){.beginner-guide{position:relative}.beginner-guide-content{grid-template-columns:minmax(0,1fr)}#boothRoom .instrument-top h2{font-size:24px}.booth-view-nav{display:flex}.booth-view-nav button{flex:1 1 70px}.booth-scroll-window{max-height:none}}
@supports(padding:max(0px)){#boothRoom .instrument-shell{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right));padding-bottom:max(24px,env(safe-area-inset-bottom))}}
.booth-scroll-window.overview .cdj-player>:not(.hardware-face),.booth-scroll-window.overview .v10-mixer>:not(.hardware-face){visibility:hidden}.dj-decks{max-width:100%;overflow-x:auto}.keyboard-scroll,.piano-keyboard,.fretboard-scroll{max-width:100%;overflow-x:auto}.beginner-guide-content>*{min-width:0}

/* Full-size controls supplement the original booth; no deck is disabled by this panel. */
.large-booth-controls{margin:14px 0;padding:14px;border:1px solid #9d7ac2;border-radius:8px;background:#17131e;color:#eee9f4;min-width:0}
.large-booth-controls summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font:700 15px/1.4 Arial;list-style:revert}
.large-booth-controls p{font:14px/1.6 Arial;color:#d3c4e0;overflow-wrap:anywhere}
.large-player-grid,.large-mixer-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.large-player-grid fieldset,.large-mixer-grid fieldset{min-width:0;margin:0;padding:12px;border:1px solid #675272;border-radius:6px}
.large-booth-controls legend{font:700 14px Arial;color:#d0b1ef;padding:0 5px}
.large-booth-controls label{display:flex;flex-direction:column;gap:6px;margin:12px 0;font:13px Arial}
#boothRoom .large-booth-controls button,#boothRoom .large-booth-controls select,#boothRoom .large-booth-controls input{box-sizing:border-box;min-height:48px;width:100%;font:15px Arial;padding:8px;border:1px solid #806399;border-radius:5px;background:#24202d;color:#eee9f4;touch-action:manipulation}
#boothRoom .large-booth-controls input[type=range]{accent-color:#7de4ec;padding:0;touch-action:pan-y}
#boothRoom .large-booth-controls button[aria-pressed=true],#boothRoom .large-booth-controls button.saved{border-color:#7de4ec;background:#26434a}
.large-button-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.large-hotcues{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:12px}.large-booth-controls .large-player-status{min-height:44px}
@media(max-width:1100px){.large-player-grid,.large-mixer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.large-player-grid,.large-mixer-grid{grid-template-columns:minmax(0,1fr)}.large-booth-controls{padding:10px}.large-hotcues{grid-template-columns:repeat(4,minmax(0,1fr))}}
.studio-projects{margin:16px 0;padding:16px;background:#19151f;border:1px solid #8663a3;border-radius:8px;min-width:0}.studio-projects label{display:flex;flex-direction:column;gap:8px;margin:12px 0}.studio-projects input,.studio-projects select,.studio-projects textarea{box-sizing:border-box;width:100%;min-width:0;min-height:48px;padding:10px;font:16px Arial;color:#eee9f4;background:#24202d;border:1px solid #806399;border-radius:5px}.studio-projects textarea{min-height:90px;resize:vertical}.project-fields,.project-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.studio-projects button{min-height:48px;white-space:normal;overflow-wrap:anywhere}.studio-projects ul{padding:0;list-style:none}.studio-projects li{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;margin:10px 0}.studio-projects p{overflow-wrap:anywhere}@media(max-width:600px){.project-fields,.project-actions,.studio-projects li{grid-template-columns:minmax(0,1fr)}.studio-projects{padding:12px}}

.studio-project-badge{color:#c9afe1;font-size:14px;overflow-wrap:anywhere;margin:10px 0}
.arrange-lane{min-width:0;margin:16px 0;padding:12px;border:1px solid #806399;border-radius:6px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.arrange-lane legend{overflow-wrap:anywhere;max-width:100%}.arrange-lane label{margin:0}.arrange-lane input[type=checkbox]{width:24px;min-height:24px;align-self:flex-start}.arrange-lane button{align-self:end}@media(max-width:600px){.arrange-lane{grid-template-columns:minmax(0,1fr)}}
.arrangement-timeline{min-width:0;margin:18px 0;padding:14px;border:1px solid #806399;border-radius:8px;background:#121018}.arrangement-timeline h4{font-size:18px;margin:0 0 12px}.timeline-scroll{max-width:100%;overflow-x:auto}.timeline-chart{min-width:280px}.timeline-axis{display:flex;justify-content:space-between;color:#d3c4e0;font-size:12px;padding-bottom:10px;border-bottom:1px solid #675272}.timeline-row{margin:14px 0}.timeline-row button{width:100%;text-align:left;min-height:48px;overflow-wrap:anywhere}.timeline-row small{display:block;margin:8px 0;color:#d3c4e0}.timeline-rail{position:relative;height:26px;background:repeating-linear-gradient(90deg,#29232f 0,#29232f 1px,transparent 1px,transparent 20%);border-bottom:1px solid #675272;overflow:hidden}.timeline-block{position:absolute;top:3px;height:20px;background:#72d7df;border:1px solid #b1f0f4;box-sizing:border-box}.timeline-block.muted{background:#554361;border:1px dashed #c9afe1}.timeline-rail-head{position:absolute;top:0;height:26px;border-left:2px solid #f5efff;pointer-events:none}.timeline-rail-head[hidden]{display:none}
.timeline-rail{height:48px;overflow:visible}.timeline-block{top:3px;height:42px;touch-action:none;cursor:grab}.timeline-block:active{cursor:grabbing}.timeline-block:focus-visible{outline:3px solid #cfaff3;outline-offset:3px}.timeline-rail-head{height:48px}.timeline-scroll{padding:4px}

.timeline-rail{overflow:hidden}
.original-waveform{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;fill:#082a34;stroke:#d5fbff;stroke-width:.35}.timeline-block.muted .original-waveform{fill:#34283e;stroke:#d2bfdf}#timelineWaves{min-height:48px;width:100%;margin:10px 0}#timelineWaveStatus{font-size:13px;color:#d3c4e0}
#projectBackupDownload{display:flex;align-items:center;min-height:48px;box-sizing:border-box;padding:12px;border:1px solid #7de4ec;border-radius:5px;background:#273d43;color:#e7fbff;overflow-wrap:anywhere}#projectBackupDownload[hidden]{display:none}
#stringStrength,#stringBrightness,#stringMute,#stringPosition{min-height:48px;touch-action:pan-y}.string-control-help{font-size:13px;line-height:1.5;color:#c9b9d7}

#stringPreset{width:100%;max-width:100%;min-height:48px;font-size:16px;box-sizing:border-box}

#stringPickup{width:100%;max-width:100%;min-height:48px;font-size:16px;box-sizing:border-box}

#originalTakeName{box-sizing:border-box;width:100%;max-width:100%;min-height:48px;margin:8px 0;font:16px Arial;padding:10px;color:#eee9f4;background:#24202d;border:1px solid #806399;border-radius:5px}#renameOriginalTake{min-height:48px;margin-bottom:12px;padding:10px 14px;touch-action:manipulation}

#takeSearch{box-sizing:border-box;width:100%;min-height:48px;margin:8px 0;padding:10px;font:16px Arial;color:#eee9f4;background:#24202d;border:1px solid #806399;border-radius:5px}#takeDetails,#takeSearchCount{overflow-wrap:anywhere;font:14px/1.6 Arial;color:#d3c4e0}
