/* Naghma mobile UX v1: isolated controls, no blanket layout or scroll overrides. */
.nm-player{position:fixed;inset:auto max(env(safe-area-inset-right),10px) max(env(safe-area-inset-bottom),10px) max(env(safe-area-inset-left),10px);z-index:1100;max-width:760px;margin-inline:auto;color:#f4f7ff;background:#10192a;border:1px solid #455c79;box-shadow:0 12px 35px #0008;border-radius:16px;padding:12px 14px;direction:rtl;box-sizing:border-box;font:14px/1.4 system-ui,Tajawal,sans-serif;contain:layout style}
.nm-player[hidden],.nm-voice[hidden]{display:none!important}
.nm-player-head,.nm-player-actions,.nm-player-timeline{display:flex;gap:10px;align-items:center;min-width:0}
.nm-player-head{margin-bottom:6px}.nm-player-title{font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1}.nm-player button,.nm-voice button{cursor:pointer;font:inherit;border:1px solid #64748b;background:#253650;color:white;border-radius:10px;min-width:38px;min-height:38px;padding:5px 10px;touch-action:manipulation}.nm-player button:focus-visible,.nm-voice button:focus-visible,.nm-player input:focus-visible{outline:3px solid #76e0dc;outline-offset:2px}
.nm-player-actions{justify-content:center}.nm-player .nm-primary{background:#5b55d6;font-weight:bold;min-width:54px}.nm-player-timeline{direction:ltr}.nm-player-timeline input{flex:1;min-width:40px;width:100%;accent-color:#68ddcb;min-height:30px;touch-action:pan-x;cursor:pointer}.nm-player-time{min-width:38px;font-variant-numeric:tabular-nums;text-align:center;color:#d3ddec}
.nm-player-note{font-size:12px;color:#edc0a4;margin-top:5px;min-height:0}.nm-voice{display:flex;flex-wrap:wrap;gap:9px;align-items:center;margin:12px 0;padding:10px;border-radius:12px;background:#19253b;border:1px solid #42577c;color:#ecf3ff}.nm-voice-status{font-size:12px;flex-basis:100%;min-height:0}
.nm-cover-art{position:relative;isolation:isolate;overflow:hidden;background:linear-gradient(137deg,var(--nm-a,#182852),var(--nm-b,#703c9d));display:grid;place-items:center;aspect-ratio:1;min-height:60px;box-shadow:inset 0 0 0 1px #ffffff18;border-radius:inherit}
.nm-cover-art::before{content:'';position:absolute;width:115%;height:80%;border:2px solid #ffffff42;border-radius:50%;transform:rotate(-31deg);box-shadow:0 0 0 12px #ffffff0b,0 0 0 30px #ffffff09;pointer-events:none}
.nm-cover-art::after{content:'♫';position:absolute;color:#fff9;font-size:clamp(24px,4vw,65px);font-weight:800;text-shadow:0 6px 22px #0008;pointer-events:none}.nm-cover-art > .cover-play{z-index:2}
@media(max-width:600px){.nm-player{padding:10px}.nm-player-head{font-size:13px}.nm-player button{min-width:36px;padding:4px 8px}.nm-cover-art{box-shadow:none}}
@media(prefers-reduced-motion:reduce){.nm-player *,.nm-cover-art *{animation:none!important;transition:none!important}}
/* Defer rendering only for the small recent-track list; preserve the surrounding layout. */
@supports(content-visibility:auto){#recentJobs .v14-track{content-visibility:auto;contain-intrinsic-size:auto 104px}}
.nm-cover-art > span:not(.cover-play){opacity:0}
/* Keep the existing mobile Create action accessible beneath the player. */
@media(max-width:700px){body:has(#v14Create) .nm-player{bottom:calc(82px + env(safe-area-inset-bottom))}}

/* Final cascade after legacy responsive sheets. A single compact player and native submit. */
#globalPlayer > audio{display:none!important}
#globalPlayer[hidden]{display:none!important}
#globalPlayer{box-sizing:border-box;display:grid;grid-template-columns:minmax(120px,1fr) minmax(300px,1.6fr) minmax(140px,1fr) 36px!important;gap:14px;align-items:center;min-height:94px;height:auto!important;padding:10px 16px!important;border:1px solid #31575c;border-radius:18px 18px 0 0;background:linear-gradient(115deg,#10282e,#111925 70%)!important;box-shadow:0 -8px 32px #0005;backdrop-filter:blur(16px);z-index:1500}
#globalPlayer .gp-song,#globalPlayer .gp-meta,#globalPlayer .gp-transport{min-width:0}
#globalPlayer .gp-song{display:flex;gap:10px;align-items:center}
#globalPlayer .gp-meta b,#globalPlayer .gp-meta small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#globalPlayer .gp-cover{width:42px;height:42px;flex:none;border-radius:12px;background:linear-gradient(135deg,#337670,#29355b)}
#globalPlayer .gp-cover img{width:100%;height:100%;object-fit:cover;border-radius:inherit}
#globalPlayer .gp-buttons{display:flex;align-items:center;justify-content:center;gap:8px;direction:ltr}
#globalPlayer .gp-buttons button{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:34px;font-size:14px;border-radius:50%}
#globalPlayer .gp-buttons .gp-play{width:40px;height:40px;background:#74ead2!important;color:#062d2a!important;box-shadow:0 3px 15px #70eed321}
#globalPlayer .gp-progress{display:flex!important;gap:9px;align-items:center;direction:ltr;margin-top:4px;width:100%}
#globalPlayer .gp-progress span{font:11px ui-monospace,monospace;min-width:30px;color:#d2e3e9}
#globalPlayer #gpSeek{display:block!important;min-width:30px;width:100%;height:24px!important;margin:0;accent-color:#74ead2;cursor:pointer;touch-action:pan-x}
#globalPlayer .gp-close{position:static!important;display:inline-flex!important;align-items:center;justify-content:center;width:36px;height:36px;border:1px solid #47626c;border-radius:50%;font-size:24px;color:#f2f8ff;background:#142c36;cursor:pointer}
#globalPlayer button:focus-visible,#globalPlayer input:focus-visible{outline:2px solid #a7ffee;outline-offset:3px}
html body[data-page="create"] > #naghmaCreateDock.nc-create-dock{position:fixed!important;box-sizing:border-box;left:var(--n190-left)!important;right:auto!important;bottom:var(--n190-bottom)!important;width:var(--n190-width)!important;min-height:0!important;margin:0!important;padding:6px 8px!important;z-index:1490!important;border:1px solid #355257!important;border-radius:14px!important;background:#101f2bf5!important;box-shadow:0 3px 18px #0004!important;transform:none!important}
html body[data-page="create"] > #naghmaCreateDock.nc-create-dock .generate-dock{display:flex!important;align-items:center!important;gap:10px!important;margin:0!important;padding:0!important;min-height:0!important;background:transparent!important;border:0!important;box-shadow:none!important}
html body[data-page="create"] > #naghmaCreateDock.nc-create-dock .engine-readiness{min-width:0;flex:1;padding:0!important;margin:0!important}
html body[data-page="create"] > #naghmaCreateDock.nc-create-dock .engine-readiness small{display:none!important}
html body[data-page="create"] > #naghmaCreateDock.nc-create-dock #generateMusicBtn{min-height:42px!important;height:42px!important;padding:0 18px!important;width:auto!important;max-width:100%!important;flex:0 0 auto!important;min-width:140px!important;margin:0!important;font-size:15px!important;border-radius:10px!important}
html body[data-page="create"] > #naghmaCreateDock.nc-create-dock #formMessage:empty{display:none!important}
html body[data-page="create"] > #naghmaCreateDock.nc-create-dock #formMessage{max-height:66px;overflow:auto;margin:0 0 5px!important;font-size:12px!important;line-height:1.4!important}
html body[data-page="create"] > #naghmaCreateDock.nc-create-dock #formMessage>*{margin:0!important;padding:5px!important}
body #v14Create .v14-creator{scroll-padding-bottom:var(--nc-reserve,160px)!important;padding-bottom:var(--nc-reserve,160px)!important}
body[data-page=create] #createForm{padding-bottom:16px!important}
body.nc-keyboard .nc-create-dock,body.nc-keyboard #globalPlayer{visibility:hidden!important;pointer-events:none!important}
@media(max-width:900px){
 #globalPlayer{grid-template-columns:minmax(0,1fr) auto 34px!important;gap:6px 10px!important;padding:8px 10px!important;min-height:0;border-radius:14px 14px 0 0;bottom:var(--nc-nav,calc(64px + env(safe-area-inset-bottom)))!important;left:0!important;right:0!important;width:100%!important}
 #globalPlayer .gp-song{grid-column:1;grid-row:1;gap:8px}
 #globalPlayer .gp-meta b{font-size:12px}#globalPlayer .gp-meta small{display:none}
 #globalPlayer .gp-cover{width:30px;height:30px;border-radius:9px}
 #globalPlayer .gp-transport{display:contents!important}
 #globalPlayer .gp-buttons{grid-column:2;grid-row:1;gap:4px}
 #globalPlayer .gp-buttons #gpPrev,#globalPlayer .gp-buttons #gpNext,#globalPlayer .gp-buttons #gpShuffle,#globalPlayer .gp-buttons #gpRepeat{display:none!important}
 #globalPlayer .gp-buttons #gpBack10,#globalPlayer .gp-buttons #gpForward10{display:inline-flex!important;min-width:34px;width:34px;height:36px}
 #globalPlayer .gp-buttons .gp-play{width:36px;height:36px;min-width:36px}
 #globalPlayer .gp-progress{grid-column:1/-1;grid-row:2;margin:0;gap:8px;height:26px}
 #globalPlayer .gp-close{grid-column:3;grid-row:1;width:32px;height:36px;border:0}
 #globalPlayer .gp-tools{display:none!important}
 html body[data-page="create"] > #naghmaCreateDock.nc-create-dock .engine-readiness{display:none!important}
 html body[data-page="create"] > #naghmaCreateDock.nc-create-dock #generateMusicBtn{flex:1 1 auto!important;width:100%!important;height:40px!important;min-height:40px!important;font-size:14px!important}
 html body[data-page="create"] > #naghmaCreateDock.nc-create-dock{padding:5px 6px!important}
 body.has-global-player{padding-bottom:160px!important}
}
