*{-webkit-tap-highlight-color:transparent}html,body{height:100%;overflow:hidden}button,select,input{font-size:14px!important}button{min-height:42px}input[type=range]{min-height:36px}button[aria-pressed=true]{background:#13566b;border-color:#76f6ff}body>header{display:none}.mobileNav{height:52px;display:flex;align-items:center;gap:8px;padding:5px 10px;background:#122237;border-bottom:1px solid #31566e}.mobileNav strong{margin-right:auto;font-size:15px;letter-spacing:.06em}.mobileNav small{display:block;font-size:8px;color:#80dfe9}.mobileNav button{padding:6px 12px}main{display:block!important;height:calc(100dvh - 52px)!important;min-height:0!important}aside{display:none!important}body.mobileTools aside{display:block!important;position:absolute;inset:52px 0 0;z-index:10;width:100%;max-width:100%;height:auto;overflow:auto}article{display:flex!important;flex-direction:column;height:100%!important;width:100%;padding:6px!important;min-width:0;overflow:hidden}.workflowGuide{padding:5px}.workflowGuide span,#focusEditor,#studioPlaytest,.report,.bottom p{display:none!important}.toolbar{display:flex;flex-wrap:nowrap;overflow:auto;min-height:46px;flex-shrink:0;margin:2px 0;align-items:center}.toolbar>*{flex-shrink:0}.toolbar label{display:flex;align-items:center;gap:4px}.toolbar select{width:auto;min-width:75px;margin:0}.toolbar button{padding:5px 10px;white-space:nowrap}#noteCount{display:none}.transport{display:flex;flex-wrap:nowrap;overflow:auto;gap:5px;flex-shrink:0;margin:0!important;padding:2px 0}.transport>*{flex-shrink:0}.transport #seek{min-width:65px;width:25vw}.transport #clock{font-size:10px}.soundToolbar,.keyRecord{display:none!important}#status{font-size:11px;max-height:32px;overflow:auto;margin:1px 0;padding:3px 6px;flex-shrink:0}.canvasWrap{flex:1;min-height:100px!important;width:100%;max-width:620px;overflow:hidden}#chart{height:100%!important;min-height:0!important;width:100%;touch-action:none}.bottom{height:38px;padding:0;flex-shrink:0;width:100%}.mobileNavigation{display:flex;gap:5px;align-items:center;padding:3px 0;flex-shrink:0}.mobileNavigation span{font-size:10px;color:#9ab2c6}.mobileNavigation button{min-height:36px;padding:4px 8px}.studioDialog{width:100vw!important;max-width:none!important;height:100dvh!important;max-height:none!important;padding:0!important;border:0!important;margin:0!important}.studioDialog iframe{height:calc(100dvh - 52px)!important;width:100%!important}.studioDialog header{height:52px!important;padding:5px 10px!important}.studioDialog header span{display:none}
.mobilePlaytest main{height:100dvh!important;padding:3px}.mobilePlaytest .simulator{padding:4px}.mobilePlaytest .gameStage{width:100%;border-radius:8px}.mobilePlaytest .gameStage canvas{width:100%;max-width:520px}.mobilePlaytest .gameInfo{height:45px;padding:4px}.mobilePlaytest .gameBrand{display:none}.mobilePlaytest .gameInfo select{min-width:85px}.mobilePlaytest .gameTrack strong{font-size:13px}.mobilePlaytest .gameHud{position:static;flex:none;display:flex;background:#0b1528;padding:4px 10px}.mobilePlaytest .gameHud>div{min-width:0}.mobilePlaytest .gameHud small{display:none}.mobilePlaytest .gameHud strong{font-size:20px}.mobilePlaytest .gameHud span{font-size:11px}.mobilePlaytest .gameGauge{height:7px;margin:0 6px}.mobilePlaytest #simResult{font-size:10px;min-height:14px;margin:2px}.mobilePlaytest .simulator>.hint{font-size:10px}.mobilePlaytest .playAdvanced[open],.mobilePlaytest .mobileSound[open]{max-height:32vh;overflow:auto}.mobilePlaytest .touchPads{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;padding:5px;background:#080f1e;flex:none;height:84px;touch-action:none}.touchPads button{touch-action:none;user-select:none;border:1px solid #e66aaf;background:linear-gradient(#69244b,#251c39);color:#ffd8ed;border-radius:9px;font-size:20px!important}.touchPads button:nth-child(2),.touchPads button:nth-child(3){border-color:#53d9ee;background:linear-gradient(#205269,#132536);color:#b6f6ff}.touchPads button.pressed{background:#dfffff;box-shadow:0 0 18px #8effff;color:#152033}.mobilePlaytest .mobileSound summary{padding:7px;cursor:pointer}.mobilePlaytest .transport{flex-wrap:wrap;overflow:visible}.mobilePlaytest .inputSettings .keyBindings{display:none}@media(orientation:landscape) and (max-height:600px){.workflowGuide,.mobileNavigation span{display:none}.mobileNav{height:42px}main{height:calc(100dvh - 42px)!important}.mobilePlaytest .gameInfo{height:34px}.mobilePlaytest .touchPads{height:60px}.mobilePlaytest .simulator>.hint{display:none}.mobilePlaytest .gameStage{margin:0}.mobilePlaytest .transport button{min-height:34px}.mobilePlaytest .gameHud{padding:1px 8px}.mobilePlaytest .gameTrack img{width:28px;height:28px}}
/* Tablet landscape: persistent tools, full-height editor and aligned play keys. */
@media(min-width:960px) and (orientation:landscape){
 body:not(.mobilePlaytest) main{display:grid!important;grid-template-columns:270px minmax(0,1fr)}
 body:not(.mobilePlaytest) aside,body.mobileTools aside{display:block!important;position:static;inset:auto;z-index:auto;width:270px;height:100%;overflow:auto;padding:10px;border-right:1px solid #31566e}
 #mobileTools{display:none}article{max-width:none!important}.canvasWrap{max-width:900px}.toolbar{flex-wrap:wrap;overflow:visible;height:auto;min-height:46px}.mobileNavigation span{display:inline}.workflowGuide{display:flex}
}
.mobilePlaytest .gameStage canvas,.mobilePlaytest .touchPads{width:100%;max-width:620px;align-self:center}.mobilePlaytest .gameStage canvas{margin:0 auto!important}.mobilePlaytest .gameGauge b{display:none}
@media(min-width:760px) and (orientation:landscape){
 .mobilePlaytest .simulator{display:grid;grid-template-columns:210px minmax(0,1fr);grid-template-rows:1fr;gap:8px;padding:6px}
 .mobilePlaytest .simulator>.transport{grid-column:1;grid-row:1;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap;overflow:auto;padding:3px;min-height:0}
 .mobilePlaytest .simulator>.hint{display:none}.mobilePlaytest .gameStage{grid-column:2;grid-row:1;height:100%;min-height:0;margin:0}
 .mobilePlaytest .gameStage canvas{max-width:620px}.mobilePlaytest .touchPads{height:82px;max-width:620px}
 .mobilePlaytest .gameSoundControls{display:flex;flex-direction:column;align-items:stretch;width:100%;padding:5px}.mobilePlaytest .playAdvanced[open],.mobilePlaytest .mobileSound[open]{max-height:none;overflow:visible;flex-basis:auto}
 .mobilePlaytest .simulator .noteSpeed{display:flex;flex-wrap:wrap;align-items:center;gap:3px}.mobilePlaytest .gameInfo{height:44px}.mobilePlaytest .gameHud{padding:4px 10px}
}
.mobilePlaytest #simCanvas{max-width:620px;width:100%;height:0;min-height:0;margin:0 auto!important}.mobilePlaytest .gameStage{max-width:none}.mobilePlaytest .touchPads{padding:5px 2px;gap:4px}
@media(min-width:960px) and (orientation:landscape){body:not(.mobilePlaytest) .toolbar{flex-wrap:nowrap;overflow:auto}.canvasWrap{max-width:900px}}
#recordStart,#recordStop{display:none!important}.tabletTools[hidden]{display:none!important}.tabletTools label{margin-bottom:14px}.tabletTools .zoomControl{display:flex;flex-wrap:wrap;gap:4px}.tabletTools #zoom{width:90px}.tabletTools .noteWidthControl{display:flex;flex-wrap:wrap;gap:5px}.tabletTools #noteWidth{max-width:160px}

body:not(.mobilePlaytest) .editorStage{min-height:80px}
aside .soundSettings[open] .soundToolbar{display:flex!important}
aside .keyRecord:not([data-workspace-hidden]){display:block!important}

/* Reopen offscreen details reliably on touch WebView after a tab change. */
.studioFold[open]::details-content{content-visibility:visible}
@media(min-width:960px) and (orientation:landscape){
 body:not(.mobilePlaytest) article:has(.editorStage){grid-template-columns:168px minmax(0,1fr);padding:6px!important;gap:4px 8px}
 body:not(.mobilePlaytest) article>.toolbar:has(#difficulties){width:52%}
 body:not(.mobilePlaytest) article>.mobileNavigation span{display:none}
 body:not(.mobilePlaytest) article>.toolbar:has(#tapTool){flex-wrap:nowrap!important;overflow-y:auto!important}
 body:not(.mobilePlaytest) article>.transport #seek{width:100%}
}
@media(min-width:960px) and (orientation:landscape){
 body.compactInspector:not(.mobilePlaytest) main{grid-template-columns:54px minmax(0,1fr)!important}
}

/* Separate Android layout, independent of the desktop/Desk workspace grid. */
body:not(.mobilePlaytest) article:has(.editorStage){display:flex!important;flex-direction:column;gap:4px;padding:6px!important}
body:not(.mobilePlaytest) article>.workflowGuide{display:flex!important;flex:none;min-height:22px;margin:0;padding:3px 6px}
body:not(.mobilePlaytest) article>.toolbar:has(#difficulties){width:auto;min-height:0;margin:0}
body:not(.mobilePlaytest) article>.mobileEditTools{display:flex!important;flex-flow:row wrap!important;overflow:visible!important;height:auto;flex:none;gap:4px;margin:0;min-height:0;padding:0}
.mobileEditTools button,.mobileEditTools select,.mobileNavigation button,.mobileEditTools summary{min-height:44px}
.mobileEditTools label,.mobileEditTools .zoomControl{display:flex!important;align-items:center;white-space:nowrap;margin:0;gap:3px}
.mobileEditTools #snap,.mobileEditTools #zoom{min-width:56px;padding-inline:3px}
.mobileEditTools :is(#zoomIn,#zoomOut){min-width:44px}
.mobileEditTools .spacer,.mobileEditTools .displayCommands:has(.displayCommandBody:empty){display:none!important}
.mobileEditTools .selectionCommands{position:relative;z-index:5;min-width:0}
.mobileEditTools .selectionCommands summary{display:flex;align-items:center;cursor:pointer;padding:4px 7px}
.mobileEditTools .selectionCommands[open]>:last-child{position:absolute;top:100%;right:0;min-width:146px;background:#142a40;border:1px solid #54748b;border-radius:8px;padding:6px;box-shadow:0 4px 14px #0008}
.mobileEditTools .selectionCommands[open]>.displayCommandBody{right:auto;left:0;min-width:170px}
body:not(.mobilePlaytest) .editorStage{flex:1;min-height:125px}
body:not(.mobilePlaytest) .editorStage>.canvasWrap{width:100%;max-width:none;margin:auto;height:100%}
body:not(.mobilePlaytest) article>.mobileNavigation{display:flex;flex:none;padding:0}
#mobileCancelHold[hidden]{display:none!important}
#chart.timePan{cursor:ns-resize;outline:2px solid #65c9dd;outline-offset:-2px}
body:not(.mobilePlaytest) article>.transport #seek{flex:1 1 88px;min-width:65px;width:0}
body:not(.mobilePlaytest) article>.transport #clock{white-space:nowrap;font-size:11px}
body:not(.mobilePlaytest) article>.bottom{height:34px}
body:not(.mobilePlaytest) article>#status{min-height:20px;max-height:26px;padding:2px 5px;margin:0}
@media(min-width:760px) and (orientation:landscape){
 body.tabletEditor main{display:grid!important;grid-template-columns:clamp(216px,23vw,288px) minmax(0,1fr)}
 body.tabletEditor aside,body.tabletEditor.mobileTools aside{display:block!important;position:static;inset:auto;z-index:auto;width:auto;height:100%;overflow:auto;padding:8px;border-right:1px solid #31566e}
 body.tabletEditor #mobileTools{display:none}
 body.tabletEditor.compactInspector main{grid-template-columns:58px minmax(0,1fr)!important}
 body.tabletEditor.compactInspector aside{width:58px!important;padding:4px!important;overflow:hidden}
 body.tabletEditor.compactInspector aside>:not(.workspaceCollapse){display:none!important}
}
@media(max-width:650px){
 body:not(.mobilePlaytest) .mobileEditTools :is(#tapTool,#holdTool,#selectTool,#undo,#redo){font-size:12px!important;padding:4px 5px}
 body:not(.mobilePlaytest) article>.transport #clock{font-size:9px}
}

@media(orientation:landscape) and (max-height:640px){
 body:not(.mobilePlaytest) article>.workflowGuide{display:none!important}
 body:not(.mobilePlaytest) article>.bottom{display:none}
 body:not(.mobilePlaytest) article>.mobileEditTools{gap:3px}
 body:not(.mobilePlaytest) .mobileEditTools :is(button,summary,select){padding-inline:6px}
}
.mobileEditTools>.mobileNavigation{display:contents}

/* Override desktop rail styles: Android uses short, wrapping horizontal rows. */
body:not(.focusEditor):not(.mobilePlaytest) article>.mobileEditTools{
 flex-direction:row;align-items:center;align-content:flex-start;justify-content:flex-start;padding:3px;
}
body:not(.focusEditor):not(.mobilePlaytest) article>.mobileEditTools>button{
 width:auto;min-width:48px;min-height:44px;flex:0 0 auto;text-align:center;order:0;
}
body:not(.focusEditor):not(.mobilePlaytest) article>.mobileEditTools>label{
 flex:0 0 auto;flex-wrap:nowrap;order:0;min-height:44px;
}
body:not(.focusEditor):not(.mobilePlaytest) article>.mobileEditTools label.zoomControl>span{width:auto}
body:not(.focusEditor):not(.mobilePlaytest) article>.mobileEditTools button{min-height:44px}
body:not(.focusEditor):not(.mobilePlaytest) article>.transport{
 display:flex;align-items:center;flex-flow:row nowrap;padding:2px 4px;gap:4px;
}
body:not(.focusEditor):not(.mobilePlaytest) article>.transport>*{width:auto;flex:0 0 auto}
body:not(.focusEditor):not(.mobilePlaytest) article>.transport>button{min-height:44px;padding-inline:6px}
body:not(.focusEditor):not(.mobilePlaytest) article>.transport>#seek{width:0;flex:1 1 65px}
body.tabletEditor .workspaceNav{grid-template-columns:1fr 1fr}
body.tabletEditor .workspaceNav button{min-height:44px}
@media(max-width:640px){
 body:not(.mobilePlaytest) .mobileEditTools .selectionCommands[open]>:last-child{right:auto;left:0}
}

body:not(.mobilePlaytest) article>.toolbar.mobileEditTools:has(#tapTool){
 display:flex!important;flex-flow:row wrap!important;overflow:visible!important;align-items:center;align-content:flex-start;
}
body:not(.mobilePlaytest) article>.toolbar.mobileEditTools:has(#tapTool)>button{
 width:auto;min-width:48px;flex:0 0 auto;order:0;text-align:center;
}
body:not(.mobilePlaytest) article>.toolbar.mobileEditTools:has(#tapTool)>label{
 order:0;flex-wrap:nowrap;justify-content:flex-start;
}
body:not(.mobilePlaytest) article>.toolbar.mobileEditTools:has(#tapTool)>label.zoomControl>span{width:auto}

body:not(.mobilePlaytest) .mobileEditTools{position:relative;z-index:2}
body:not(.mobilePlaytest) .mobileEditTools .selectionCommands{position:static}
body:not(.mobilePlaytest) .mobileEditTools .selectionCommands[open]>:last-child{top:100%;left:auto;right:0}
@media(max-height:480px){
 body:not(.mobilePlaytest) .mobileEditTools .selectionCommands[open]>:last-child{max-height:48vh;overflow:auto}
}

.tabletModeHint{margin:0;padding:0 3px;min-height:18px;color:#b1c9db;font-size:11px;line-height:1.45;flex:none}
body:not(.mobilePlaytest) .mobileEditTools.panActive :is(#tapTool,#holdTool,#selectTool){background:#213b54;border-color:#4b7091}
@media(orientation:landscape) and (max-height:550px){
 body:not(.mobilePlaytest) article>.tabletModeHint{min-height:16px;font-size:10px}
}

body:not(.mobilePlaytest) .mobileEditTools :is(#snap,#zoom){min-width:66px!important}

body:not(.mobilePlaytest) .editorStage>.canvasWrap{width:100%;min-width:0}


body:not(.mobilePlaytest) :is(.mobileEditTools,.transport,.mobileNav,.workspaceNav) :is(button,summary){touch-action:manipulation}

/* Tablet landscape: chart first, with a separate right-hand tool tray. */
.tabletSide[hidden]{display:none!important}
body.tabletEditor:not(.mobilePlaytest) main{display:block!important}
body.tabletEditor:not(.mobilePlaytest) #mobileTools{display:inline-flex;align-items:center}
body.tabletEditor:not(.mobilePlaytest) aside{display:none!important}
body.tabletEditor.mobileTools:not(.mobilePlaytest) main>aside{
 display:block!important;position:fixed;inset:52px 0 0;z-index:12;width:100%!important;max-width:none!important;
 height:auto!important;padding:10px!important;overflow:auto!important;background:#111d2d;
}
body.tabletEditor:not(.mobilePlaytest) article:has(.editorStage){
 display:grid!important;grid-template-columns:minmax(0,1fr) clamp(214px,23vw,290px);
 grid-template-rows:minmax(0,1fr);gap:8px;padding:6px!important;
}
body.tabletEditor:not(.mobilePlaytest) article>.workflowGuide,
body.tabletEditor:not(.mobilePlaytest) article>.report{display:none!important}
body.tabletEditor:not(.mobilePlaytest) article>.editorStage{
 grid-column:1;grid-row:1;min-width:0;min-height:0;height:100%;margin:0;
}
body.tabletEditor:not(.mobilePlaytest) .tabletSide{
 grid-column:2;grid-row:1;display:flex;flex-direction:column;gap:6px;min-height:0;
 overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;touch-action:pan-y;
 background:#101c2c;border:1px solid #345067;border-radius:10px;padding:7px;
 scrollbar-width:thin;
}
body.tabletEditor:not(.mobilePlaytest) .tabletSide>*{flex:none;min-width:0;margin:0!important}
body.tabletEditor:not(.mobilePlaytest) .tabletSide .toolbar{min-height:0;padding:0}
.tabletSide .toolbar:has(#difficulties){display:block;overflow:visible}
.tabletSide #difficulties{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;width:100%}
.tabletSide #difficulties button{font-size:10px!important;min-height:42px;padding:4px 2px;min-width:0}
body.tabletEditor .tabletSide .tabletChartMeta{margin-top:4px;width:100%;color:#c4d9e7;font-size:12px!important;min-height:36px;padding:3px 5px}
body.tabletEditor:not(.mobilePlaytest) .tabletSide .transport{
 display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;padding:0;overflow:visible
}
.tabletSide .transport button{min-height:44px;padding:4px 2px;min-width:0}
.tabletSide .transport #seek,.tabletSide .transport #clock{grid-column:1/-1;width:100%;min-width:0;}
.tabletSide .transport #seek{margin:0;min-height:22px}
.tabletSide .transport #clock{font-variant-numeric:tabular-nums;text-align:center}
body.tabletEditor:not(.mobilePlaytest) .tabletSide .mobileEditTools{
 display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px;padding:0;
 align-items:stretch;overflow:visible!important;
}
.tabletSide .mobileEditTools>button,.tabletSide .mobileNavigation button{padding:3px;min-width:0;font-size:12px!important;min-height:44px}
.tabletSide #selectTool,.tabletSide #mobileCancelHold,.tabletSide .mobileEditTools>label,
.tabletSide .mobileEditTools>details{grid-column:1/-1}
.tabletSide .mobileEditTools>label{justify-content:space-between;padding:0 2px;min-height:42px}
.tabletSide .zoomControl>span{width:auto!important}
.tabletSide .zoomControl>button{padding:0;min-width:35px!important}
body:not(.mobilePlaytest) .tabletSide .mobileEditTools .selectionCommands[open]>:last-child{
 position:static;max-height:none;min-width:0;width:100%;overflow:visible;box-shadow:none
}
.tabletSide .editorCue{display:none}
.tabletSide .tabletModeHint{color:#c2d8eb}
.tabletSide #status{min-height:18px;max-height:40px}
.tabletSide .bottom{height:auto;min-height:34px}
.tabletSide .bottom label{width:100%;font-size:11px;display:flex;align-items:center;gap:4px;white-space:nowrap}
.tabletSide .bottom #viewStart{width:0;min-width:0;flex:1}
@media(orientation:landscape) and (max-height:600px){
 body.tabletEditor.mobileTools:not(.mobilePlaytest) main>aside{top:42px}
}


.tabletSide .transport #metronomeToggle{font-size:0!important}
.tabletSide .transport #metronomeToggle::after{content:"♪ OFF";font-size:11px}
.tabletSide .transport #metronomeToggle[aria-pressed=true]::after{content:"♪ ON"}

/* Give the menu room without taking height from the chart. */
body.mobileTools:not(.mobilePlaytest) #productionMenu {padding:10px max(10px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));overscroll-behavior:contain}
body.mobileTools:not(.mobilePlaytest) #productionMenu>* {width:min(100%,48rem);margin-inline:auto}
body.mobileTools:not(.mobilePlaytest) #productionMenu .workspaceNav {margin-inline:auto}
@media(min-width:640px) and (orientation:landscape) {
  body.mobileTools:not(.mobilePlaytest) #productionMenu .workspaceNav {grid-template-columns:repeat(4,minmax(0,1fr))}
  .workspaceActions {grid-template-columns:repeat(3,minmax(0,1fr))}
}
