.production-stage{position:relative;display:grid;place-items:center;aspect-ratio:9/16;width:min(100%,300px);margin:12px auto;overflow:hidden;border-radius:18px;border:1px solid #8651c8;background:radial-gradient(ellipse at 50% 43%,#322049,#151022 66%,#0e0916)}
.production-stage canvas,.production-stage img{display:block;width:100%;height:100%;object-fit:contain}
.production-stage [hidden],.production-tools [hidden]{display:none}
.production-empty{text-align:center;padding:14px;display:grid;justify-items:center;gap:10px}
.production-empty strong{font-size:1.2rem}
.production-gem{position:relative;display:grid;place-items:center;width:100px;height:112px;margin:6px 0 14px;filter:drop-shadow(0 0 20px #ad5cff88)}
.production-gem::before{content:"";position:absolute;inset:5px 10px 9px;clip-path:polygon(50% 0,90% 21%,100% 58%,50% 100%,0 58%,10% 21%);background:linear-gradient(145deg,#f7d9ff 0%,#b877ff 24%,#7433cf 55%,#2d125a 100%);box-shadow:inset 0 0 12px #fff8}
.production-gem::after{content:"";position:absolute;inset:12px 18px 18px;clip-path:polygon(50% 0,100% 23%,83% 62%,50% 100%,17% 62%,0 23%);background:linear-gradient(120deg,#eecaff99 0%,#9d57e555 42%,#3c176eaa 75%);border:1px solid #ffffff33}
.production-gem-core{position:absolute;z-index:1;inset:17px 25px 26px;clip-path:polygon(50% 0,100% 30%,50% 100%,0 30%);background:linear-gradient(135deg,#ffffffa8,#bc7aff88 35%,#6d24bf66 70%,#f3caff44)}
.production-empty strong{max-width:230px;line-height:1.35}
@media(prefers-reduced-motion:no-preference){.production-gem{animation:production-gem-float 5s ease-in-out infinite}@keyframes production-gem-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}}
.production-tools,.production-empty{overflow-wrap:anywhere}
.production-tools button,.production-tools select,.production-empty button,.production-card button{min-height:44px;max-width:100%}
.production-tools .tools{display:flex;flex-wrap:wrap}
.production-card{display:grid;grid-template-columns:72px minmax(0,1fr);gap:12px;padding:12px 0;border-bottom:1px solid #553a78;overflow-wrap:anywhere}
.production-card img{width:72px;aspect-ratio:9/16;object-fit:cover;border-radius:8px;background:#1b122c}
.production-card video{width:100%;max-height:60vh}
.production-card p{margin:6px 0}
.production-step{border:1px solid #573b79;border-radius:12px;margin:8px 0;padding:10px;min-width:0}
.production-step summary{cursor:pointer;min-height:44px;display:list-item;padding:10px 4px}


/* Studio Nova: mobile-first AI Director visual refresh. Presentation only. */
section[data-view="director"]{
  --nova-line:#634785;--nova-violet:#bd79ff;
  background:radial-gradient(ellipse at 80% 0%,#3c245b 0%,transparent 38%),#191427;
  border:1px solid #644688;border-radius:22px;
  padding:clamp(14px,4vw,26px);
  box-shadow:0 18px 44px #07040f45;
  overflow:hidden;
}
section[data-view="director"]>h2{
  display:flex;align-items:center;gap:10px;
  font-size:clamp(23px,6vw,30px);letter-spacing:-.035em;margin-bottom:7px;
}
section[data-view="director"]>h2:before{
  content:"";width:27px;height:27px;flex:none;display:block;
  background:linear-gradient(145deg,#f4c7ff,#b66bf7 52%,#6432c5);
  clip-path:polygon(50% 0,95% 35%,84% 78%,50% 100%,16% 78%,5% 35%);
  filter:drop-shadow(0 0 7px #b268ff);
}
section[data-view="director"]>.hint{font-size:13px;line-height:1.55;color:#c3b4d7;margin:0 0 19px}
section[data-view="director"] .production-step{
  border:1px solid var(--nova-line);border-radius:17px;
  background:linear-gradient(150deg,#292039,#211a30);
  margin:12px 0;padding:0 14px 15px;min-width:0;
}
section[data-view="director"] .production-step[open]{border-color:#9663c6;box-shadow:inset 0 1px 0 #d3a6ff18}
section[data-view="director"] .production-step summary{
  display:list-item;list-style-position:inside;font-weight:750;
  font-size:16px;letter-spacing:-.015em;line-height:1.4;
  padding:16px 0;cursor:pointer;color:#f6edff;
}
section[data-view="director"] .production-step summary::marker{color:#ce9dff}
section[data-view="director"] label{display:flex;flex-direction:column;gap:7px;min-width:0;max-width:100%;font-size:13px;font-weight:650;color:#dfcfee;margin:12px 0}
section[data-view="director"] .gp-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px;align-items:start}
section[data-view="director"] .gp-settings>label{margin:9px 0}
section[data-view="director"] input,section[data-view="director"] select,section[data-view="director"] textarea{
  width:100%;min-width:0;max-width:100%;background:#120f1e;
  border:1px solid #765a9c;color:#f8f1ff;border-radius:11px;
  padding:12px;font-size:16px;line-height:1.4;
  box-shadow:none;appearance:auto;
}
section[data-view="director"] input,section[data-view="director"] select{min-height:46px}
section[data-view="director"] textarea{height:auto;min-height:115px;resize:vertical}
section[data-view="director"] #dpNarration{min-height:175px}
section[data-view="director"] input:focus-visible,section[data-view="director"] textarea:focus-visible,section[data-view="director"] select:focus-visible{
  outline:2px solid #c58bff;outline-offset:2px;border-color:#c58bff;
}
section[data-view="director"] button{
  min-height:46px;max-width:100%;white-space:normal;
  border-radius:12px;padding:11px 14px;font-weight:650;
  background:#49345f;border:1px solid #8865ac;color:#f8f1ff;
}
section[data-view="director"] button:hover{background:#594075}
section[data-view="director"] #dpDraft,section[data-view="director"] #dpGenerate,section[data-view="director"] #dpApply,section[data-view="director"] #dpPreview{
  background:linear-gradient(135deg,#8751d5,#6333ad);
  border-color:#b17af0;box-shadow:0 5px 16px #8c42da24;
}
section[data-view="director"] #dpDraft{width:100%;margin:9px 0 4px}
section[data-view="director"] .tools{display:flex;flex-wrap:wrap;gap:9px}
section[data-view="director"] .tools>button{flex:1 1 170px}
section[data-view="director"] #dpNarrationStatus,section[data-view="director"] #dpStatus{
  font-size:13px;line-height:1.5;color:#d5b6f4;overflow-wrap:anywhere;
}
section[data-view="director"] .smart-panel{
  background:#21192f;border:1px solid #684d88;border-radius:12px;
  padding:12px;min-width:0;overflow-wrap:anywhere;
}
section[data-view="director"] #dpScenes:empty:after{
  content:"No footage selected yet. Match your Vault clips to begin.";
  display:block;color:#b7a7ca;font-size:13px;padding:13px 0;
}
@media(max-width:430px){
  section[data-view="director"]{padding:13px}
  section[data-view="director"] .production-step{padding:0 12px 14px}
  section[data-view="director"] .gp-settings{grid-template-columns:minmax(0,1fr)}
  section[data-view="director"] .tools>button{flex:1 1 100%}
}
@media(prefers-reduced-motion:no-preference){
  section[data-view="director"] button{transition:background .15s,box-shadow .15s}
}


/* Nova Diamond: decorative preview only, never included in rendered exports. */
.production-nova{position:relative;display:block;width:160px;height:172px;margin:8px auto 12px;isolation:isolate;filter:drop-shadow(0 0 13px #a734f9b0)}
.production-nova-crystal{position:absolute;z-index:2;inset:0;width:100%;height:100%;overflow:visible;filter:drop-shadow(0 0 9px #c367ff99)}
.production-nova-orbit{position:absolute;left:-15%;top:31%;width:130%;height:37%;border-radius:50%;transform:rotate(-26deg);pointer-events:none}
.production-nova-orbit-back{z-index:1;border:4px solid #8436ecaa;border-right-color:#2879ffbd;border-top-color:#315aff9e;box-shadow:0 0 12px #8b32ff,0 0 24px #6235f766,inset 0 0 9px #8934f988}
.production-nova-orbit-front{z-index:3;clip-path:inset(51% -20% -20% -20%);border:3px solid #e073ff;border-left-color:#bd46ff;border-bottom-color:#b04cff;box-shadow:0 0 10px #d35bff,0 0 20px #a63eff88}
.production-nova-spark{position:absolute;z-index:4;left:86%;top:42%;width:7px;height:7px;border-radius:50%;background:#fff3ff;box-shadow:0 0 8px 4px #edb3ff}
@media(prefers-reduced-motion:no-preference){
.production-nova{animation:nova-float 4.8s ease-in-out infinite}
.production-nova-crystal{animation:nova-tilt 7s ease-in-out infinite}
.production-nova-orbit-back,.production-nova-orbit-front{animation:nova-orbit-pulse 4.2s ease-in-out infinite}
.production-nova-glint{animation:nova-glint 3.6s ease-in-out infinite}
.production-nova-spark{animation:nova-spark 4.2s ease-in-out infinite}
@keyframes nova-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-7px)}}
@keyframes nova-tilt{0%,100%{transform:rotate(-2deg) scale(1)}50%{transform:rotate(2deg) scale(1.025)}}
@keyframes nova-orbit-pulse{0%,100%{filter:brightness(1);opacity:.8}50%{filter:brightness(1.5);opacity:1}}
@keyframes nova-glint{0%,100%{opacity:.18}50%{opacity:.7}}
@keyframes nova-spark{0%,100%{opacity:.4;transform:scale(.65)}50%{opacity:1;transform:scale(1.3)}}
}


/* Nova orbit upgrade: preserve the proven CSS crystal and its fallback. */
.production-gem{isolation:isolate;overflow:visible;width:126px;height:146px;margin:8px auto 16px;filter:drop-shadow(0 0 17px #b047ffb0)}
.production-gem::before{z-index:2;inset:8px 14px 12px;clip-path:polygon(50% 0,100% 47%,50% 100%,0 47%);background:linear-gradient(145deg,#fbeaff 0%,#ce8dff 19%,#8b35db 48%,#471178 77%,#b64cff 100%);box-shadow:inset 0 0 16px #fff8}
.production-gem::after{z-index:3;inset:16px 24px 23px;clip-path:polygon(50% 0,100% 47%,50% 100%,0 47%);background:linear-gradient(122deg,#fff6ffb8 0%,#d9a1ff80 27%,#7c28cd55 54%,#37115a88 75%,#e6b6ff80 100%);border:0}
.production-gem-core{z-index:4;inset:24px 39px 38px;clip-path:polygon(50% 0,100% 42%,50% 100%,0 42%);background:linear-gradient(140deg,#fff9ffdd,#b75cf5bb 38%,#5b159aaa 70%,#e3a1ff88)}
.production-gem .production-orbit{position:absolute;z-index:1;left:-28%;top:32%;width:156%;height:35%;border:3px solid #ab53ff;border-right-color:#3387ff;border-top-color:#7b4eff;border-radius:50%;transform:rotate(-27deg);box-shadow:0 0 12px #a945ff,0 0 20px #623aff66;pointer-events:none}
.production-gem .production-orbit-front{z-index:5;clip-path:inset(52% -20% -20% -20%);border-color:#e178ff;border-right-color:#448cff;box-shadow:0 0 12px #b85bff}
@media(prefers-reduced-motion:no-preference){.production-gem .production-orbit{animation:production-orbit-glow 3.8s ease-in-out infinite}@keyframes production-orbit-glow{0%,100%{opacity:.68;filter:brightness(.9)}50%{opacity:1;filter:brightness(1.45)}}}
#productionDiagnostics pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:.85rem;color:#e4d1f8}
#productionDiagnostics audio{display:none}

.production-control-card{min-width:0;padding:14px;margin:12px 0;border:1px solid #533878;border-radius:13px;background:#1d152d}
.production-control-card h3{margin:0 0 10px}
.production-control-card :is(button,select){min-height:44px;max-width:100%}
#productionQuality,#productionExport,#productionCancelExport,#productionPlay{display:block;width:100%;min-width:0;margin:8px 0}
#productionCancelExport[hidden],.production-control-card[hidden]{display:none}
.production-transport{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.production-transport button{margin:0;padding-inline:4px}
#productionSupport,#productionStatus{overflow-wrap:anywhere}
.production-decode-video{position:fixed!important;top:0;left:0;width:2px!important;height:2px!important;opacity:.01;pointer-events:none;z-index:0}

#productionMediaReport pre{white-space:pre-wrap;overflow-wrap:anywhere}
:is(#vaultRightsDialog,#docuforgeReview){color:#f7e8ff;background:#211331;border:1px solid #ac70e2;border-radius:14px;box-sizing:border-box;width:min(calc(100% - 24px),480px);max-height:85dvh;overflow:auto;color-scheme:dark}
:is(#vaultRightsDialog,#docuforgeReview) label{display:grid;gap:4px;margin:9px 0}
:is(#vaultRightsDialog,#docuforgeReview) :is(input:not([type=checkbox]), select, textarea){width:100%;box-sizing:border-box;min-height:44px}
:is(#vaultRightsDialog,#docuforgeReview) button,.vault-rights-link{min-height:44px}
