/* Mobile host UI only. Shared project, controls, DSP and file formats. */
.perform{display:none}
.mobile-head[hidden],.mobile-context[hidden],.mobile-nav[hidden],.mobile-home[hidden],.mobile-edit-tools[hidden],.mobile-more-actions[hidden]{display:none!important}
.mobile-more-actions,.mobile-library-tools,.mobile-library-filters{display:none}
:root[data-layout=mobile]{--mobile-head:44px;--mobile-nav:58px;--mobile-transport:54px}
[data-layout=mobile] body{min-width:0;width:100%;height:100dvh;height:var(--app-height,100dvh);overflow:hidden;overscroll-behavior:none;font-size:16px;-webkit-text-size-adjust:100%}
[data-layout=mobile] button,[data-layout=mobile] select{min-height:44px;min-width:44px;font-size:16px;touch-action:manipulation}
[data-layout=mobile] input:not([type=checkbox]):not([type=range]),[data-layout=mobile] select{font-size:16px}
[data-layout=mobile] input[type=range]{height:44px;touch-action:pan-y}
[data-layout=mobile] input[type=checkbox]{width:22px;height:22px}
[data-layout=mobile] button{box-shadow:none;background:#354249;border-color:#52626c;border-radius:7px}
[data-layout=mobile] button.active{background:#385449;border-color:#93cba3;color:#d1f8d3}
[data-layout=mobile] .topbar,[data-layout=mobile] body>footer{display:none}
[data-layout=mobile] .mobile-head{min-height:calc(var(--mobile-head) + env(safe-area-inset-top));height:calc(var(--mobile-head) + env(safe-area-inset-top));padding:env(safe-area-inset-top) max(6px,env(safe-area-inset-right)) 0 max(6px,env(safe-area-inset-left));flex-shrink:0;display:flex;align-items:center;gap:8px;background:#202c32;border-bottom:1px solid #53636b}
[data-layout=mobile] .mobile-head>button{background:transparent;border:0;font-size:23px}
[data-layout=mobile] .mobile-head>button:last-child{color:#f29391;font-size:17px}
[data-layout=mobile] .mobile-project{flex:1;min-width:0}
[data-layout=mobile] .mobile-project .project-title{width:100%;padding:0;display:block}
[data-layout=mobile] .mobile-project strong{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:14px;font-weight:600}
[data-layout=mobile] .mobile-project .project-title:before{content:'VITAL · MOBILE';display:block;font-size:8px;letter-spacing:1.5px;line-height:12px;color:#a4c0bd}
[data-layout=mobile] .mobile-project .eyebrow,[data-layout=mobile] .mobile-project #formatBadge{display:none}
[data-layout=mobile] .mobile-context{position:absolute;top:calc(var(--mobile-head) + env(safe-area-inset-top));left:8px;right:8px;z-index:60;height:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end;gap:12px;padding:12px;background:#293a42;border:1px solid #718c86;border-radius:8px;box-shadow:0 8px 24px #0008}
[data-layout=mobile] .mobile-context .mobile-project{grid-column:1/-1;max-width:100%;font-size:16px}
[data-layout=mobile] .mobile-context .project-title:before{display:none}
[data-layout=mobile] .mobile-context .project-title strong{font-size:16px}
[data-layout=mobile] .mobile-context-field{display:flex;flex-direction:column;gap:7px;font-size:14px;min-width:0}
[data-layout=mobile] .mobile-context .mobile-pattern{min-width:0}
[data-layout=mobile] .pattern-picker{display:flex;align-items:center;gap:4px;margin:0;min-width:0}
[data-layout=mobile] .pattern-picker .eyebrow{display:none}
[data-layout=mobile] .pattern-picker select{height:44px;max-width:none;min-width:0;width:100%;padding:5px;flex:1;font-size:16px}
[data-layout=mobile] .pattern-picker .mini{height:44px;width:44px}
[data-layout=mobile] .mobile-channel{width:100%;max-width:none;min-width:0}
[data-layout=mobile] .mobile-head .mobile-context-toggle{flex:1;min-width:0;display:flex;align-items:center;gap:8px;justify-content:flex-start;padding:0 8px;font-size:16px;font-weight:600;text-align:left;background:transparent;border:0}
[data-layout=mobile] .mobile-context-toggle>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
[data-layout=mobile] .mobile-context-toggle .mobile-icon{width:18px;flex-shrink:0}
[data-layout=mobile] .mobile-head>button{flex-shrink:0;height:44px}
[data-layout=mobile] .mobile-head>button:nth-last-child(2){font-size:14px;color:#c0e6bb;padding:0 8px}
[data-layout=mobile] .mobile-icon{width:24px;height:24px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
[data-layout=mobile] main{padding:0;gap:0;position:relative;overflow:hidden;min-width:0;flex:1}
[data-layout=mobile] .workspace{display:contents}
[data-layout=mobile] main>.browser,[data-layout=mobile] main>.workspace>.panel{display:none;width:100%;min-width:0;min-height:0;border:0;border-radius:0;box-shadow:none}
[data-layout=mobile] main>.browser.mobile-current,[data-layout=mobile] main>.workspace>.panel.mobile-current{position:relative;display:flex;flex:1;max-width:100%;overflow:hidden}
[data-layout=mobile] .panel-title{min-height:44px;height:44px;padding:0 8px;gap:6px;flex-wrap:nowrap;overflow-x:auto}
[data-layout=mobile] .panel-title strong{font-size:15px}
[data-layout=mobile] .panel-title .hint,[data-layout=mobile] .panel-title .micro,[data-layout=mobile] .detach-panel{display:none}
[data-layout=mobile] .piano-title,[data-layout=mobile] .playlist>.panel-title,[data-layout=mobile] .browser>.panel-title{display:none}
[data-layout=mobile] .piano-title>strong,[data-layout=mobile] .piano-title #pianoChannel{display:none}
[data-layout=mobile] .piano-title label{font-size:11px;white-space:nowrap;flex-shrink:0}
[data-layout=mobile] .piano-title select{max-width:88px;padding:4px;font-size:14px}
[data-layout=mobile] .piano-title .velocity-control{margin:0}
[data-layout=mobile] .piano-title .velocity-control input{width:78px}
[data-layout=mobile] .mobile-edit-tools{display:flex;gap:4px;flex-shrink:0;padding:4px 7px;background:#202e34;border-bottom:1px solid #4a5c64}
[data-layout=mobile] .mobile-edit-tools button{padding:4px;min-width:44px;width:44px;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:16px}
[data-layout=mobile] .mobile-more-actions{display:flex;flex-direction:column;position:absolute;top:4px;left:8px;right:8px;z-index:20;padding:8px;background:#202f36;border:1px solid #81998f;border-radius:9px;box-shadow:0 8px 24px #0009;max-height:calc(100% - 8px);overflow:auto}
[data-layout=mobile] .mobile-action-heading{position:sticky;top:-8px;z-index:1;background:#202f36;display:flex;justify-content:space-between;align-items:center;margin-bottom:6px;font-size:16px;flex-shrink:0}
[data-layout=mobile] .mobile-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
[data-layout=mobile] .mobile-action-grid button{min-width:0;white-space:normal}
[data-layout=mobile] .mobile-note-settings{display:flex;gap:6px;flex-wrap:wrap;border-top:1px solid #506168;padding-top:8px;margin-top:8px;align-items:center}
[data-layout=mobile] .mobile-note-settings .velocity-control{width:100%;display:flex;align-items:center;font-size:14px;margin:0;min-height:44px}
[data-layout=mobile] .mobile-note-settings .velocity-control input{flex:1;width:160px;min-height:52px}
[data-layout=mobile] #pianoCanvas,[data-layout=mobile] #playlistCanvas,[data-layout=mobile] #keysCanvas{touch-action:none}
[data-layout=mobile] .piano-scroll,[data-layout=mobile] .playlist-scroll{overscroll-behavior:contain;scrollbar-width:thin}
[data-layout=mobile][data-touch-tool=pan] #pianoCanvas,[data-layout=mobile][data-touch-tool=pan] #playlistCanvas{cursor:grab}
[data-layout=mobile] .velocity-lane{height:84px;min-height:60px}
[data-layout=mobile] .velocity-lane canvas{height:83px;touch-action:none}
[data-layout=mobile] .velocity-lane>span{width:58px;font-size:10px}
[data-layout=mobile] .panel-bottom{height:24px;min-height:24px;font-size:10px;overflow:hidden;white-space:nowrap}
[data-layout=mobile] .piano .panel-bottom>span:last-child{display:none}
[data-layout=mobile] .mobile-nav{height:calc(var(--mobile-nav) + env(safe-area-inset-bottom));flex-shrink:0;display:flex;order:5;padding:2px max(4px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(4px,env(safe-area-inset-left));background:#1c292f;border-top:1px solid #495c65;z-index:5}
[data-layout=mobile] .mobile-nav button{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;background:transparent;border-color:transparent;border-radius:6px;color:#a7bac2;padding:2px}
[data-layout=mobile] .mobile-nav button.active{color:#bcf2c3;background:#334b44;border-color:transparent}
[data-layout=mobile] .mobile-nav span{font-size:22px;line-height:24px}
[data-layout=mobile] .mobile-nav small{font-size:12px}
[data-layout=mobile] .compact-transport{order:4;height:var(--mobile-transport);min-height:var(--mobile-transport);padding:4px max(7px,env(safe-area-inset-right)) 4px max(7px,env(safe-area-inset-left));gap:5px;display:grid;grid-template-columns:44px 44px 68px minmax(0,1fr);background:#26363c;z-index:5}
[data-layout=mobile] .compact-transport .icon{width:44px;height:44px;padding:0;font-size:20px}
[data-layout=mobile] .compact-transport .tempo{height:44px;padding:0 3px;gap:0;position:relative}
[data-layout=mobile] .compact-transport .tempo input{width:100%;min-width:0;font-size:22px;padding:0 0 7px;text-align:center;height:42px;font-family:var(--font-data)}
[data-layout=mobile] .compact-transport .tempo span{position:absolute;bottom:1px;left:24px;font-size:11px;pointer-events:none}
[data-layout=mobile] .compact-transport .clock{height:44px;min-width:0;width:100%;padding:1px 4px;justify-content:center;align-items:center}
[data-layout=mobile] .compact-transport .clock strong{font-size:22px;line-height:23px;letter-spacing:0}
[data-layout=mobile] .compact-transport .clock span{font-size:10px;line-height:12px}
[data-layout=mobile] .mobile-home{position:absolute;top:calc(var(--mobile-head) + env(safe-area-inset-top));bottom:calc(var(--mobile-nav) + var(--mobile-transport) + env(safe-area-inset-bottom));left:0;right:0;z-index:90;background:#26343b;padding:8px 12px;overflow:auto;overscroll-behavior:contain}
[data-layout=mobile] .mobile-home-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
[data-layout=mobile] .mobile-home-title strong{font-size:19px}
[data-layout=mobile] .mobile-home-content{display:flex;flex-direction:column;gap:14px}
[data-layout=mobile] .mobile-home-content nav,[data-layout=mobile] .mobile-home-content .engine-bar,[data-layout=mobile] .mobile-home-content .topbar-tools{display:flex;flex-wrap:wrap;position:static;height:auto;min-height:0;gap:7px;margin:0;padding:0;border:0}
[data-layout=mobile] .mobile-home-content .engine-bar label{min-height:44px;display:flex;align-items:center;gap:8px;padding:0 8px}
[data-layout=mobile] .mobile-home-content .toolbar-description,[data-layout=mobile] .mobile-home-content .local-indicator{display:none}
[data-layout=mobile] .mobile-home-content .undo{margin:0;gap:7px}
[data-layout=mobile] .mobile-home-content .mode-switch{flex-direction:row;gap:7px}
[data-layout=mobile] .layout-label{display:flex;align-items:center;gap:8px}
[data-layout=mobile] .mobile-help{color:#a5b8c1;font-size:13px;line-height:1.6}
[data-layout=mobile] .floating-window{left:max(0px,env(safe-area-inset-left))!important;top:env(safe-area-inset-top)!important;width:calc(100% - env(safe-area-inset-left) - env(safe-area-inset-right))!important;height:calc(var(--app-height,100dvh) - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;min-width:0;min-height:0;border-radius:0;max-width:100%;max-height:none}
[data-layout=mobile] .floating-window.hidden{display:none!important}
[data-layout=mobile] .window-titlebar{height:48px;min-height:48px;padding:0 8px;touch-action:pan-y}
[data-layout=mobile] .window-caption{font-size:15px;overflow:hidden;text-overflow:ellipsis}
[data-layout=mobile] .window-actions button{min-width:44px;width:44px;height:44px}
[data-layout=mobile] .window-actions button:not(:last-child),[data-layout=mobile] .window-resize{display:none}
[data-layout=mobile] .window-body{min-width:0;overflow:auto;overscroll-behavior:contain;padding:12px;touch-action:pan-y}
[data-layout=mobile] .window-body input:not([type=range]):not([type=checkbox]),[data-layout=mobile] .window-body select{max-width:100%;min-height:44px}
[data-layout=mobile] .window-body form{min-width:0;max-width:100%}
[data-layout=mobile] .window-body .file-drop{min-height:64px}
[data-layout=mobile] .window-body .instrument-control{grid-template-columns:minmax(75px,1fr) minmax(70px,1.3fr) 58px;font-size:13px;min-width:0}
[data-layout=mobile] .recording-row{flex-wrap:wrap;gap:8px}
[data-layout=mobile] .recording-row>*{min-width:0;max-width:100%}
[data-layout=mobile] .recording-field input,[data-layout=mobile] .recording-field select{min-width:0;width:100%}
[data-layout=mobile] .window-tray{display:none}
[data-layout=mobile] .windows-menu{right:8px;left:8px;top:52px;max-width:none;width:auto;max-height:70dvh;overflow:auto}
[data-layout=mobile] #toast{max-width:calc(100% - 20px);left:10px;right:10px;bottom:calc(var(--mobile-nav) + var(--mobile-transport) + 8px);transform:none;font-size:13px;max-height:35dvh;overflow:auto;pointer-events:none}
[data-layout=mobile] .browser .browser-help{display:none}
[data-layout=mobile] .browser .library-list{padding:0 8px}
[data-layout=mobile] .library-item{height:56px;min-height:56px;gap:8px;border-bottom:1px solid #3e4d55}
[data-layout=mobile] .library-item .library-name{font-size:16px}
[data-layout=mobile] .library-item button{opacity:1;padding:4px;font-size:18px;flex-shrink:0}
[data-layout=mobile] .library-item .mobile-audio-add{display:block;font-size:12px}
.mobile-audio-add{display:none}
[data-layout=mobile] .browser-tabs{margin:4px 8px;gap:4px}
[data-layout=mobile] .search{margin:4px 8px}
[data-layout=mobile] .search input{min-height:42px}
[data-layout=mobile] .pack-controls{min-height:44px;margin:3px 8px;gap:5px}
[data-layout=mobile] .pack-controls select{min-width:0}
[data-layout=mobile] .rack .rack-rows{padding:4px;overflow:auto;scrollbar-gutter:auto}
[data-layout=mobile] .rack .rack-row{display:grid;grid-template-columns:44px minmax(100px,1fr) 88px 44px;grid-template-rows:44px 48px;height:100px;min-width:0;gap:3px;padding:3px 5px;margin:3px 0;border-left:3px solid var(--channel);background:#303f46}
[data-layout=mobile] .rack .rack-row .mute-dot{width:44px;height:44px;border:0;box-shadow:none;background:radial-gradient(circle,#afd78c 0 5px,#658452 6px,transparent 7px)}
[data-layout=mobile] .rack .rack-row .mute-dot.muted{background:radial-gradient(circle,#606e74 0 5px,#39494f 6px,transparent 7px)}
[data-layout=mobile] .rack .rack-levels,[data-layout=mobile] .rack .rack-route{display:none}
[data-layout=mobile] .rack .channel-name{height:44px;min-width:0;width:100%;flex-basis:auto;font-size:15px;padding:5px 8px}
[data-layout=mobile] .rack .rack-actions{flex-direction:row;width:88px;gap:0;height:44px;display:flex}
[data-layout=mobile] .rack .rack-actions .sample-btn,[data-layout=mobile] .rack .rack-view{width:44px;height:44px;min-width:44px;font-size:19px}
[data-layout=mobile] .rack .steps,[data-layout=mobile] .rack .rack-notes{grid-column:1/-1;width:100%;height:46px;min-width:0;margin:0;overflow-x:auto}
[data-layout=mobile] .rack .steps{display:flex;gap:2px}
[data-layout=mobile] .rack .step{min-width:44px;width:44px;height:44px;flex-shrink:0;padding:0;border-radius:3px;font-size:0}
[data-layout=mobile] .rack .step:after{content:attr(data-step-label);font-size:11px;color:#d6e0e5}
[data-layout=mobile] .rack .step.on:after{color:#213129}
[data-layout=mobile] .rack .rack-notes svg{height:38px;width:100%}
[data-layout=mobile] .mixer-body{overflow:auto;min-height:0}
[data-layout=mobile] .mixer .sound-info{display:none}
[data-layout=mobile] .mixer-strips{overflow:visible;min-width:max-content;flex:1}
[data-layout=mobile] .mix-strip{width:152px;min-width:152px;padding:10px 8px;gap:10px}
[data-layout=mobile] .mix-title{min-height:44px;display:flex;align-items:center;font-size:14px;cursor:pointer}
[data-layout=mobile] .mix-title strong{font-size:14px}
[data-layout=mobile] .mix-buttons{gap:4px;flex-wrap:wrap}
[data-layout=mobile] .mix-buttons button{width:44px;min-height:44px;font-size:15px}
[data-layout=mobile] .mix-strip input{width:100%;flex-shrink:0}
[data-layout=mobile] .master-strip{width:94px;padding:10px 6px;gap:12px}
[data-layout=mobile] .master-controls{flex:none;margin-top:20px}
/* Compact browser: tabs/search/import share one row on short wide screens. */
[data-layout=mobile] .mobile-library-tools{display:flex;align-items:center;gap:5px;flex-shrink:0;padding:2px 6px;min-height:48px;border-bottom:1px solid #50636b}
[data-layout=mobile] .mobile-library-tools .browser-tabs{margin:0;flex-shrink:0;gap:2px}
[data-layout=mobile] .mobile-library-tools .browser-tabs button{font-size:14px;padding:4px 8px}
[data-layout=mobile] .mobile-library-tools .search{margin:0;flex:1;min-width:72px}
[data-layout=mobile] .mobile-library-tools>button{width:44px;padding:0;display:flex;align-items:center;justify-content:center;flex-shrink:0}
[data-layout=mobile] .mobile-library-tools .search input{font-size:16px}
[data-layout=mobile] .browser>.pack-controls:empty{display:none}
[data-layout=mobile] .browser>.library-header{height:24px;min-height:24px;padding:2px 10px;font-size:14px}
[data-layout=mobile] .library-load-status{font-size:14px;line-height:18px;min-height:20px;padding:2px 8px}
[data-layout=mobile] .mobile-library-filters{display:flex;flex-wrap:wrap;align-items:center;gap:8px;position:absolute;top:52px;left:8px;right:8px;z-index:30;background:#293b43;border:1px solid #81998f;border-radius:8px;box-shadow:0 8px 24px #0008;padding:10px}
[data-layout=mobile] .mobile-library-filters[hidden]{display:none!important}
[data-layout=mobile] .mobile-library-filters .pack-controls{flex:1;min-width:160px;max-width:100%;margin:0;display:flex;gap:8px}
[data-layout=mobile] .mobile-library-filters #packSelect{width:100%;min-width:0;font-size:16px}
[data-layout=mobile] .mobile-library-filters #addSampleBtn{font-size:22px;border:1px solid #52626c}
[data-layout=mobile] .mobile-note-settings>.inline{font-size:16px;min-height:44px;display:flex;gap:8px}
[data-layout=mobile] .mobile-note-settings select{font-size:16px;min-height:44px}
[data-layout=mobile] #velocity{appearance:none;background:transparent;min-height:52px;height:52px;min-width:140px;touch-action:none}
[data-layout=mobile] #velocity::-webkit-slider-thumb{appearance:none;margin-top:-10px;width:30px;height:30px;border:2px solid #e2f0d8;border-radius:50%;background:#abd18c;box-shadow:0 1px 4px #0007}
[data-layout=mobile] #velocity::-webkit-slider-runnable-track{height:10px;border-radius:6px;background:#536b64}
[data-layout=mobile] #velocity::-moz-range-thumb{width:28px;height:28px;border:2px solid #e2f0d8;border-radius:50%;background:#abd18c}
[data-layout=mobile] #velocity::-moz-range-track{height:10px;border-radius:6px;background:#536b64}
[data-layout=mobile] .velocity-lane small{display:none}
[data-layout=mobile] .velocity-lane strong{font-family:var(--font-ui);font-size:12px}
[data-layout=mobile] .velocity-lane output{font-size:14px}
/* Success messages temporarily use the title area, never the velocity lane. */
[data-layout=mobile] #toast:not(.error){top:calc(4px + env(safe-area-inset-top));bottom:auto;left:calc(58px + env(safe-area-inset-left));right:auto;width:calc(100% - 210px);max-width:calc(100% - 210px);height:36px;max-height:36px;padding:7px 8px;font-size:14px;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
[data-layout=mobile] body:has(.floating-window:not(.hidden)) #toast:not(.error){display:none}
@media(max-width:600px){
 [data-layout=mobile] .mobile-library-tools{flex-wrap:wrap}
 [data-layout=mobile] .mobile-library-tools .search{order:10;flex-basis:100%}
 [data-layout=mobile] .mobile-library-tools .browser-tabs{flex:1}
 [data-layout=mobile] .mobile-library-filters{top:100px}
 [data-layout=mobile] .mobile-context{grid-template-columns:minmax(0,1fr)}
 [data-layout=mobile] .compact-transport .clock strong{font-size:19px}
}
@media (orientation:landscape) and (max-height:600px){
 [data-layout=mobile]{--mobile-nav:54px}
 [data-layout=mobile] .mobile-nav{position:absolute;top:calc(var(--mobile-head) + env(safe-area-inset-top));bottom:0;left:env(safe-area-inset-left);width:62px;height:auto;flex-direction:column;padding:4px 2px;border-right:1px solid #495c65}
 [data-layout=mobile] main,[data-layout=mobile] .compact-transport{margin-left:calc(62px + env(safe-area-inset-left))}
 [data-layout=mobile] .compact-transport{grid-template-columns:44px 44px 80px 210px;height:54px}
 [data-layout=mobile] .mobile-home{left:62px;bottom:54px}
 [data-layout=mobile] .velocity-lane{height:72px}
 [data-layout=mobile] .velocity-lane canvas{height:71px}
 [data-layout=mobile] .piano .panel-bottom{display:none}
 [data-layout=mobile] .piano .mobile-more-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 [data-layout=mobile] .piano .mobile-action-heading{grid-column:1/-1;margin:0}
 [data-layout=mobile] .piano .mobile-action-grid{grid-column:2;grid-row:2;align-self:start}
 [data-layout=mobile] .piano .mobile-note-settings{grid-column:1;grid-row:2;align-content:start;padding:0;margin:0;border:0;min-width:0}
 [data-layout=mobile] #toast{bottom:62px;left:72px;right:10px;max-width:calc(100% - 82px)}
}
/* Wide phones have room for transport mode and editor tools in one top row. */
@media (orientation:landscape) and (max-height:600px) and (min-width:760px){
 [data-layout=mobile] .mobile-head .mobile-context-toggle{flex:0 1 150px;max-width:150px}
 [data-layout=mobile] .mobile-head>button:nth-last-child(2){margin-left:auto}
 [data-layout=mobile] .mobile-current>.mobile-edit-tools{position:fixed;top:env(safe-area-inset-top);left:calc(210px + env(safe-area-inset-left));right:calc(124px + env(safe-area-inset-right));z-index:8;height:44px;min-height:44px;padding:0;gap:2px;background:transparent;border:0;overflow:visible}
 [data-layout=mobile] #toast:not(.error){left:calc(58px + env(safe-area-inset-left));right:auto;bottom:auto;width:150px;max-width:150px}
}

/* Mobile performance instrument: full-size touch keys and independent pads. */
[data-layout=mobile] .perform{flex-direction:column;background:#1c2b31;gap:0}
[data-layout=mobile] .perform-toolbar,[data-layout=mobile] .perform-controls,[data-layout=mobile] .perform-info{display:flex;align-items:center;gap:6px;padding:5px 8px;flex-shrink:0;min-width:0;border-bottom:1px solid #41565e}
[data-layout=mobile] .perform-toolbar{background:#283b43}
[data-layout=mobile] .perform-channel{flex:1;min-width:0;max-width:100%;font-size:16px}
[data-layout=mobile] .perform-controls{flex-wrap:wrap}
[data-layout=mobile] .perform-controls button{padding:4px 9px;white-space:nowrap}
[data-layout=mobile] .perform-controls button:first-child{color:#ffbbb6}
[data-layout=mobile] .perform-controls .recording{background:#813f40;color:#fff4ef;border-color:#f19b8e}
[data-layout=mobile] .perform-controls button:last-child{margin-left:auto;color:#d1f5c2}
[data-layout=mobile] .perform-quantize{display:flex;align-items:center;gap:4px;min-height:44px;font-size:14px}
[data-layout=mobile] .perform-info{min-height:40px;padding-top:0;padding-bottom:0;gap:5px}
[data-layout=mobile] .perform-info>span:first-child{flex:1;min-width:0;font-size:14px;color:#bfd4cf;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
[data-layout=mobile] .perform-info button{min-height:40px;height:40px;padding:0;width:44px}
[data-layout=mobile] .perform-info>span:nth-last-child(2){font:14px var(--font-ui);white-space:nowrap}
[data-layout=mobile] .perform-surface{position:relative;flex:1;min-height:120px;margin:8px;border:1px solid #50636b;border-radius:9px;overflow:hidden;touch-action:none;user-select:none;-webkit-user-select:none;background:#17252b}
[data-layout=mobile] .perform-surface button{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
[data-layout=mobile] .perform-surface.is-pads{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:8px;padding:8px;border:0;background:transparent}
[data-layout=mobile] .perform-pad{min-width:44px;min-height:44px;font:600 20px var(--font-ui);background:linear-gradient(145deg,#375963,#293c47);border:1px solid #658690;border-radius:12px;color:#cfede5;box-shadow:inset 0 1px #a3c7c522,0 3px 5px #0003}
[data-layout=mobile] .perform-pad.pressed{background:#8dc79e;border-color:#d8f7ad;color:#173c2b;box-shadow:inset 0 0 12px #365b3177}
[data-layout=mobile] .perform-count{position:absolute;z-index:5;left:50%;top:45%;transform:translate(-50%,-50%);padding:8px 30px;border:1px solid #eaa29a;border-radius:16px;background:#7d3d3de8;color:#fff1de;font:600 64px var(--font-ui);pointer-events:none;box-shadow:0 8px 40px #0006}
[data-layout=mobile] .perform-count[hidden]{display:none}
[data-layout=mobile] .perform-hint{margin:0 10px 8px;font-size:13px;line-height:18px;color:#a5bcba}
[data-layout=mobile] .mobile-nav{overflow:auto}
@media (orientation:landscape) and (max-height:600px){
 [data-layout=mobile] .perform-toolbar{padding:0 8px;gap:6px}
 [data-layout=mobile] .perform-controls{position:absolute;top:0;right:8px;z-index:2;border:0;padding:0;background:#283b43}
 [data-layout=mobile] .perform-toolbar{padding-right:360px;min-height:48px}
 [data-layout=mobile] .perform-toolbar>button{font-size:14px;padding:3px 8px}
 [data-layout=mobile] .perform-controls button{font-size:14px}
 [data-layout=mobile] .perform-info{height:40px}
 [data-layout=mobile] .perform-hint{display:none}
 [data-layout=mobile] .perform-surface{margin:4px 8px}
 [data-layout=mobile] .perform-count{font-size:44px;top:55%}
 [data-layout=mobile] .mobile-nav button{flex-shrink:0}
}

/* Original interactive SVG piano. Keys are shaped ivory/ebony artwork. */
[data-layout=mobile] .real-piano{display:block;position:absolute;inset:0;width:100%;height:100%;touch-action:none}
[data-layout=mobile] .piano-note{cursor:pointer;outline:none;touch-action:none}
[data-layout=mobile] .piano-note .key-name{font-family:var(--font-ui);font-weight:500;user-select:none}
[data-layout=mobile] .piano-note .key-light{opacity:0}
[data-layout=mobile] .piano-note.pressed .key-face{fill:var(--pressed-fill)}
[data-layout=mobile] .piano-note.pressed .key-light{opacity:1}
[data-layout=mobile] .piano-note.pressed{transform:translateY(2px)}
[data-layout=mobile] .piano-note:focus-visible .key-face{stroke:#89b7a7;stroke-width:2;vector-effect:non-scaling-stroke}
