/* NexluneAI — Studio shell CSS.
 *
 * v34.3.1 — dashboard-home dark-theme card fix. Same defect as the
 * v34.2.1 home fix: style.css:816-819 puts white card backgrounds
 * for .cc-card/.kpi inside @media(prefers-color-scheme:light) with
 * NO data-theme gate, so on a light OS with the site toggled dark
 * (data-theme="dark") the Nexlune Command Center cards stay white
 * while --text goes near-white (#F2F4FA) — 1.06:1, unreadable.
 * This block restores the intended dark glass backgrounds (the
 * style.css:564 gradient) under html[data-theme="dark"]. Only
 * `background` is overridden; border/box-shadow stay as-is (the
 * light border left behind is ~invisible on the dark card).
 * Specificity (1,2,1) beats the (0,1,0) media rule; this file loads
 * after style.css (linked in pages/studio.php).
 * Light mode untouched: data-theme="light" still gets the white
 * cards from style.css:808/818.
 */
html[data-theme="dark"] #page-team .cc-card,
html[data-theme="dark"] #page-team .kpi{
  background:linear-gradient(160deg,rgba(255,255,255,.055),rgba(255,255,255,.02));
}

/* v34.3.2 — BG Remover mobile clearance. #tool-bgremove is a <div>,
 * so the #page-team section{padding-bottom:130px} rule in style.css
 * does NOT apply to it — its last content (the status/progress text
 * and the Cancel button) could sit under the fixed bottom nav
 * (~74px tall, ≤899px). The video repro showed the status text
 * clipped behind the nav. 120px matches the codebase's own mobile
 * clearance values (ms-main/ts-main/canva-main use 110px). The
 * auto-scroll in tools-new.js (bgScrollPanelIntoView) is the
 * primary visibility fix; this padding is the backstop so the
 * bottom of the view always clears the nav. */
@media(max-width:899px){
  #page-team #tool-bgremove{padding-bottom:120px}
}

/* v34.3.2 — one-time model download panel. Reuses the loading
 * panel's own pieces (nx-prog bar, mini-btn, hint) so it matches
 * the tool's look; only the shell + row layout are new. */
.bg12-onetime{border:1px solid var(--line);border-radius:14px;padding:14px 16px;margin:12px 0;background:var(--surface)}
.bg12-onetime-row{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}

/* v34.3.2 — compact the one-time panel on small phones (<=480px).
 * v41 finding (verify_v59, real Chromium via CDP): the full panel
 * pushed the Upload CTA half below the fold at 390x844 in BOTH
 * themes (~60px of scroll to reach it). The compact form saves
 * ~75px: tighter padding/margin, the redundant title hidden (the
 * hint carries the same message — "Ek dafa download hoga…"), and
 * the progress bar + Download button share one row instead of two.
 * All controls stay visible and clickable — nothing is removed,
 * only tightened (v41 pins the failing set, so no NEW unclickable
 * primary action is allowed). The !important margins override the
 * panel's inline margin-top styles at this width only. */
@media(max-width:480px){
  /* v41 fold fix (verify_v59): the one-time panel pushed the Upload
     CTA below the fold at 390px. Measured 23 Nov: the panel was
     245px (3-line hint row + full-width prog with a 4-line failure
     meta + the button wrapped to its own row) and the CTA bottom sat
     at 895px (fold 844, nav top 771). These rules + the short
     failure meta bring the panel to ~135px and the CTA fully above
     the nav (~735px) in every panel state. */
  .bg12-onetime{padding:8px 12px;margin:8px 0;display:flex;flex-wrap:wrap;align-items:center}
  .bg12-onetime-row{flex:1 1 100%}
  .bg12-onetime-row strong{display:none}
  .bg12-onetime-row .hint{font-size:13px;line-height:1.35}
  .bg12-onetime .nx-prog{flex:1 1 0;margin-top:8px!important;min-width:140px}
  .bg12-onetime #bgOneTimeMeta{margin-top:4px!important}
  .bg12-onetime #bgOneTimeBtn{margin-top:8px!important;margin-left:10px;flex:0 0 auto}
  /* The hero's 56px top padding + 24px title + 22px title margin
     cost ~100px above the CTA on a phone — tighten for mobile. */
  #page-team .bg12-hero{padding:20px 16px 24px}
  #page-team .bg12-hero-title{font-size:1.25rem;margin-bottom:12px}
}

/* v34.3.2 — Studio one-time FULL AI model download gate. Same
 * geometry as the site's .ms-modal (fixed, centred card) but
 * z-index 300 — above the modal (200), the header (80) and the
 * bottom nav — because the gate covers the whole Studio until the
 * download finishes or the user skips. Hidden by default (the
 * overlay div carries style="display:none"); studio-download.js
 * shows it on first Studio open only. Reuses nx-prog / mini-btn /
 * hint so it matches the Studio's look in both themes. */
.nx-dl{position:fixed;inset:0;background:rgba(3,5,12,.72);display:flex;align-items:center;justify-content:center;z-index:300;padding:16px}
.nx-dl-card{position:relative;background:var(--surface);border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow);max-width:480px;width:100%;padding:28px 24px;max-height:calc(100vh - 32px);overflow:auto}
.nx-dl-card h2{margin:0 0 8px;font-size:20px}
.nx-dl-sub{margin:0 0 16px;font-size:14px;color:var(--muted);line-height:1.6}
.nx-dl-rows{list-style:none;margin:16px 0 0;padding:0}
.nx-dl-rows li{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-top:1px solid var(--line);font-size:14px}
.nx-dl-rows li b{font-weight:700;white-space:nowrap}
.nx-dl-err{color:#e5484d;font-size:14px;line-height:1.5;margin:12px 0 0}
.nx-dl-btns{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}
