/* Maya mobile polish layer (Oct 16 2026). Loaded from index.html; overrides app CSS without a rebuild.
   Phones: iPhone Safari 320-430 wide, plus landscape. Uses !important because app CSS is injected after this file. */
:root{--maya-nav-h:0px;--maya-fab-b:0px}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;-webkit-tap-highlight-color:transparent}
a,button,[role=button],[role=tab],select,summary,label,input[type=range],input[type=checkbox],.nav-tab,.filter-tab,.section-tab,.studio-cell{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
html.maya-modal{overflow:hidden}
.modal-sheet,.msx-body,#msx-mp3 .msx-mbox{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}

/* feature flags stay off: never let the layout rules above re-show hidden Artists / link-import entries */
html body:not(#maya-x) [data-maya-artists],html body:not(#maya-x) [data-maya-linkimport],html body:not(#maya-x) a[href^="#/artists"],html body:not(#maya-x) a[href*="artist-agreement"],html body:not(#maya-x) .ad-banner,html body:not(#maya-x) ins.adsbygoogle,html body:not(#maya-x) .ad-demo-placeholder{display:none!important}

/* ---------- touch devices: 44px targets, 16px inputs ---------- */
@media (pointer:coarse){
  html body .app :is(button,select,summary,[role=button]):not(.nav-tab):not(.studio-cell):not(.track-main):not(.dj-knob-dial),
  html body .app input:not([type=range]):not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]){min-height:44px!important}
  html body .app .top-nav .nav-tab{min-height:44px!important}
  html body .app :is(.perf-pad,.btn.icon,.entitlement-badge,.more-btn,.toast-dismiss,.preview-btn,.remove,.export-btn){min-width:44px!important;min-height:46px!important}
  html body .app .ds-iso{min-width:44px!important}
  html body:not(#maya-x) .app .perf-pad.perf-xf,html body:not(#maya-x) .app .perf-pad.perf-tempo{min-height:48px!important}
  html body .app .btn.ghost.bar-lib-link{min-height:44px!important;padding:0 16px!important}
  html body .app :is(.filter-tab,.section-tab){min-height:44px!important;align-items:center;justify-content:center;white-space:nowrap}
  html body .app .linkish{display:inline-flex;align-items:center;min-height:44px!important;padding:0 2px!important}
  html body .app .studio-cell{min-height:44px!important;min-width:44px!important;height:44px!important}
  html body .app .studio-row{grid-template-columns:96px!important;grid-auto-flow:column!important;grid-auto-columns:44px!important}
  html body .app .studio-row>:first-child{position:sticky;left:0;z-index:2;background:#12163a;padding-right:6px}
  html body :is(input,select,textarea):not([type=range]):not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]),
  html body .app :is(input,select,textarea):not([type=range]):not([type=checkbox]):not([type=radio]){font-size:16px!important}
  html body .app input[type=checkbox],html body .app input[type=radio]{width:24px!important;height:24px!important;min-height:0!important;flex:none}
  html body .app label:has(>input[type=checkbox]),html body .app label:has(>input[type=radio]){display:flex!important;align-items:center;gap:10px;min-height:44px}
  /* sliders: 44px hit area, same slim visual track */
  html body .app input[type=range]{box-sizing:border-box!important;height:44px!important;min-height:44px!important;padding:19px 0!important;background-clip:content-box!important;background-origin:content-box!important;border-radius:0!important}
  html body .app input[type=range]::-webkit-slider-thumb{width:24px!important;height:24px!important;margin-top:-9px}
  html body .app .ds-vu{height:44px}
  html body .app .site-footer-links :is(a,button),html body .app .site-footer :is(a,button){display:inline-flex;align-items:center;min-height:44px!important;padding:0 8px!important}
  html body .app .site-footer-links{gap:0 6px!important}
  html body .app a.credit-license,html body .app a.credit-source{display:inline-flex;align-items:center;min-height:44px;min-width:44px}
  html body #maya-info :is(.mi-nav a,.mi-foot nav a){display:inline-flex;align-items:center;min-height:44px;padding:0 4px}
  html body .msx-track a,html body .msx-vcred a,html body .msx-vmeta a{display:inline-flex;align-items:center;min-height:44px}
}

/* ---------- phones (portrait / narrow) ---------- */
@media (max-width:760px){
  /* readable micro-labels */
  html body .app :is(.stream-badge,.pro-pill,.ds-isolate-title,.learn-tab-free,.learn-free-tag,.sound-cat,.plan-save,.stripe-test-badge,.dj-limit-tag,.ds-lock,.dj-knob-value-text,.dj-knob-label,.eyebrow){font-size:11.5px!important}
  /* top-of-app: respect the notch / Dynamic Island when installed to the home screen */
  html body .app{padding-top:max(12px,env(safe-area-inset-top,0px))!important;padding-left:max(12px,env(safe-area-inset-left,0px))!important;padding-right:max(12px,env(safe-area-inset-right,0px))!important;padding-bottom:calc(var(--maya-nav-h,66px) + 76px + env(safe-area-inset-bottom,0px))!important}
  html body .app .topbar .top-nav{padding-left:max(6px,env(safe-area-inset-left,0px))!important;padding-right:max(6px,env(safe-area-inset-right,0px))!important}
  html body .app .topbar .top-nav .nav-tab.ni{font-size:.72rem!important;min-height:52px;min-width:0}
  /* toast to the top so it never sits on the floating button / mini player / nav */
  html body .import-toast,html body .app.has-ads .import-toast{top:calc(10px + env(safe-area-inset-top,0px))!important;bottom:auto!important;max-width:calc(100vw - 24px)!important;opacity:.97!important}
  /* big modal sheets: dynamic viewport, scroll inside, leave the notch / home bar free */
  html body .modal-backdrop{padding:max(12px,env(safe-area-inset-top,0px)) max(12px,env(safe-area-inset-right,0px)) max(12px,env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px))!important;align-items:end!important}
  html body .modal-sheet{max-height:calc(100vh - 24px)!important;max-height:calc(100dvh - 24px - env(safe-area-inset-top,0px))!important;width:100%!important;border-radius:22px!important;padding:18px 16px calc(18px + env(safe-area-inset-bottom,0px))!important}
  html body .library-panel,html body .composition-panel,html body .playlist-panel{max-height:none!important}
  /* compact, tidy entry banners (AI Mixer / Free music videos) */
  html body #msx-videntry,html body #msx-djentry{margin:6px 0!important;padding:10px 12px!important;min-height:56px!important;font-size:16px!important}
  html body #msx-videntry small,html body #msx-djentry small{font-size:12.5px!important;line-height:1.3}
  /* floating "Sounds & AI Mix" button: above the nav and the mini player, shrinks to an icon while scrolling */
  html body #msx-fab{right:max(12px,env(safe-area-inset-right,0px))!important;bottom:calc(var(--maya-fab-b,84px) + env(safe-area-inset-bottom,0px))!important;min-height:52px;transition:bottom .2s ease,width .2s ease,padding .2s ease;z-index:45!important}
  html body #msx-fab.msx-min{width:52px;padding:0!important;overflow:hidden;font-size:0!important;white-space:nowrap;letter-spacing:0}
  html body #msx-fab.msx-min::before{content:'\1F39B';font-size:24px;line-height:52px;display:block;text-align:center}
  html body #msx.open{z-index:2147483001}
  /* mini player: stays reachable while you scroll a long list (only while a track is loaded) */
  html body .app .player-bar:has(.seek:not(:disabled)){position:sticky!important;bottom:calc(var(--maya-nav-h,66px) + 8px + env(safe-area-inset-bottom,0px));z-index:35;padding:8px 12px 6px!important;gap:0!important;background:rgba(10,13,36,.97)!important;border:1px solid rgba(148,163,255,.35)!important;border-radius:18px!important;box-shadow:0 10px 28px rgba(2,6,24,.6);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
  html body .app .player-bar:has(.seek:not(:disabled)) .volume{display:none!important}
  html body .app .player-bar:has(.seek:not(:disabled)) .bar-lib-link{display:none!important}
  html body .app .player-bar:has(.seek:not(:disabled)) .player-bar-meta{min-height:20px}
  html body .app .player-bar:has(.seek:not(:disabled)) .controls{gap:0!important}
  html body .app .player-bar:has(.seek:not(:disabled)) .transport{gap:6px!important}
  html body .app .player-bar:has(.seek:not(:disabled)) .btn.play{width:52px;height:52px;min-height:52px!important}
  html body .app .player-bar .transport{flex-wrap:nowrap}
  html.maya-kb body .app .top-nav,html.maya-kb body #msx-fab{display:none!important}
  html.maya-kb body .app .player-bar{position:static!important}
}
@media (max-width:360px){
  html body .app .topbar .top-nav .nav-tab.ni{font-size:.7rem!important;padding-left:0!important;padding-right:0!important}
  html body .app .topbar .top-nav{gap:0!important}
  html body .app .topbar .brand-hook{font-size:.8rem}
  html body #msx-fab:not(.msx-min){padding:0 14px!important;font-size:15px!important}
  html body .app .btn.icon{margin:0}
  html body .app .transport{gap:2px!important}
}

/* ---------- phone landscape: short screens ---------- */
@media (max-height:500px) and (orientation:landscape){
  html body .app{padding-left:max(12px,env(safe-area-inset-left,0px))!important;padding-right:max(12px,env(safe-area-inset-right,0px))!important;padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))!important}
  html body .app .player-bar:has(.seek:not(:disabled)){position:static!important}
  html body #msx-fab{right:max(12px,env(safe-area-inset-right,0px))!important;bottom:calc(12px + env(safe-area-inset-bottom,0px))!important}
  html body #msx header{padding-top:6px!important;padding-bottom:4px!important;padding-left:max(14px,env(safe-area-inset-left,0px))!important;padding-right:max(14px,env(safe-area-inset-right,0px))!important}
  html body #msx .msx-tabs{padding:6px 12px!important}
  html body #msx .msx-tabs button{min-height:44px!important}
  html body #msx .msx-stopall{left:auto!important;right:max(12px,env(safe-area-inset-right,0px))!important;width:auto!important;min-height:48px!important;padding:0 22px!important;font-size:16px!important;border-radius:24px!important;bottom:calc(10px + env(safe-area-inset-bottom,0px))!important}
  html body #msx .msx-body{padding-bottom:calc(70px + env(safe-area-inset-bottom,0px))!important}
  html body #msx .msx-body{padding-left:max(12px,env(safe-area-inset-left,0px))!important;padding-right:max(12px,env(safe-area-inset-right,0px))!important}
  html body .modal-sheet{max-height:calc(100dvh - 24px)!important}
  html body .modal-backdrop{align-items:center!important}
  html body .import-toast{max-width:60vw!important;left:max(12px,env(safe-area-inset-left,0px))!important;right:auto!important;transform:none!important;top:auto!important;bottom:calc(12px + env(safe-area-inset-bottom,0px))!important}
  html body .app .topbar{padding-top:8px!important;padding-bottom:8px!important}
  html body #msx-videntry,html body #msx-djentry{margin:4px 0!important;padding:6px 12px!important;min-height:44px!important}
  html body #msx-videntry>span:first-child,html body #msx-djentry>span:first-child{font-size:22px!important}
}
@media (max-width:760px) and (max-height:500px){
  html body .app .topbar .top-nav{padding-top:2px!important;padding-bottom:calc(2px + env(safe-area-inset-bottom,0px))!important}
  html body .app .topbar .top-nav .nav-tab.ni{flex-direction:row!important;min-height:44px!important;padding:4px 6px!important;gap:6px!important}
}

/* ---------- safe areas for the sounds panel and dialogs (all sizes) ---------- */
html body #msx header{padding-left:max(14px,env(safe-area-inset-left,0px));padding-right:max(14px,env(safe-area-inset-right,0px))}
html body #msx .msx-tabs{padding-left:max(12px,env(safe-area-inset-left,0px));padding-right:max(12px,env(safe-area-inset-right,0px))}
html body #msx .msx-body{padding-left:max(12px,env(safe-area-inset-left,0px));padding-right:max(12px,env(safe-area-inset-right,0px))}
html body #msx-mp3 .msx-mbox{max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px)}
html body #msx .msx-stopall{left:max(12px,env(safe-area-inset-left,0px));right:max(12px,env(safe-area-inset-right,0px))}
html body #msx-vplayer.on{top:-12px}
html body #msx .msx-tabs button{font-size:13.5px!important;min-height:48px}
html body #msx select,html body #msx input:not([type=range]):not([type=checkbox]):not([type=file]),html body #msx textarea{font-size:16px}

@media (prefers-reduced-motion:reduce){html body #msx-fab{transition:none}}
