
:root{--bg:#0c0e12;--panel:#151820;--panel2:#1d2230;--line:#2a3040;--text:#f5f7fb;--muted:#99a2b2;--accent:#7c5cff;--good:#43c68b;--bad:#e66}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,system-ui,Arial,sans-serif}.hidden{display:none!important}
button,input,select,textarea{font:inherit}.app{min-height:100vh;display:grid;grid-template-columns:220px 1fr}.sidebar{border-right:1px solid var(--line);background:#101218;padding:22px 14px;display:flex;flex-direction:column}.logo{font-size:22px;font-weight:800;margin:2px 10px 28px}.logo.big{font-size:34px;margin:0 0 8px}.sidebar nav{display:grid;gap:8px}.nav{background:transparent;border:0;color:var(--muted);text-align:left;padding:12px 14px;border-radius:10px;cursor:pointer}.nav.active,.nav:hover{background:var(--panel2);color:#fff}.sidebar-footer{margin-top:auto;padding:12px;color:var(--muted);font-size:12px}.user{color:#fff;margin-bottom:5px}.main{padding:24px 28px}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.top-actions{display:flex;align-items:center;gap:12px}.sync{font-size:12px;color:var(--good)}.eyebrow{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}h1,h2,h3,p{margin-top:0}.card{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:18px}.primary,.secondary{border-radius:10px;padding:10px 14px;border:1px solid var(--line);cursor:pointer}.primary{background:var(--accent);color:white;border-color:var(--accent)}.secondary{background:#202431;color:white}.full{width:100%}.linkbtn{border:0;background:transparent;color:#aaa;cursor:pointer;padding:8px}.hero{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.grid{display:grid;gap:16px;margin-bottom:16px}.grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.brand-card h3{font-size:22px;margin-bottom:8px}.brand-card small,.muted{color:var(--muted)}.activity>div{display:flex;justify-content:space-between;padding:11px 0;border-bottom:1px solid var(--line)}.view{display:none}.view.active{display:block}.project-card{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.status-pill{font-size:12px;background:#222739;padding:6px 8px;border-radius:999px;color:#cfd5ff}.create-shell{max-width:850px;margin:auto}.create-shell textarea{width:100%;min-height:180px;background:#0f1218;color:white;border:1px solid var(--line);border-radius:14px;padding:16px;font-size:16px}.chips{display:flex;gap:8px;margin:12px 0}.chip{background:#202431;color:white;border:1px solid var(--line);border-radius:10px;padding:10px}.create-actions{display:flex;justify-content:space-between}.result{margin-top:14px;padding:14px;border-radius:12px;background:#11151c;border:1px solid var(--line)}
.auth-screen{min-height:100vh;display:grid;place-items:center;padding:24px}.auth-card{width:min(420px,100%);background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:26px}.auth-card input{width:100%;margin:6px 0;padding:12px;border:1px solid var(--line);border-radius:10px;background:#0f1218;color:white}.divider{text-align:center;color:var(--muted);margin:12px}.msg{margin-top:10px;font-size:12px;color:var(--bad)}
.modal{position:fixed;inset:0;background:#000a;display:grid;place-items:center;padding:20px;z-index:1000}.modal.modal-above-video{z-index:1100}.modal-card{width:min(460px,100%);background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:22px}.modal-card label{display:grid;gap:6px;margin:12px 0;color:var(--muted)}.modal-card input,.modal-card select{padding:11px;background:#0f1218;color:white;border:1px solid var(--line);border-radius:9px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}
@media(max-width:1000px){.app{grid-template-columns:160px 1fr}.grid.four{grid-template-columns:repeat(2,1fr)}}@media(max-width:720px){.app{grid-template-columns:1fr}.sidebar{position:sticky;top:0;z-index:10;display:block;padding:8px}.sidebar .logo,.sidebar-footer{display:none}.sidebar nav{display:flex;overflow:auto}.main{padding:16px}.grid.four,.grid.two{grid-template-columns:1fr}.topbar{align-items:flex-start}.sync{display:none}}

.producer-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.producer-summary{margin:14px 0;padding:12px;background:#171c26;border:1px solid var(--line);border-radius:10px}
.producer-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}
.producer-grid>div{display:grid;gap:4px;padding:10px;background:#11151c;border:1px solid var(--line);border-radius:9px}
.producer-grid span{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.result details{margin:8px 0;padding:10px;background:#11151c;border:1px solid var(--line);border-radius:9px}
.result summary{cursor:pointer;font-weight:700}.result ul{margin-bottom:0}.prompt-preview{white-space:pre-wrap;color:#d7dcea;font:12px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace}
.producer-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}.producer-actions button:disabled{opacity:.45;cursor:not-allowed}
.next-action{margin-top:10px;color:#bfc7d8}.job-history-card{margin-top:16px}.job-history{margin-top:10px}
.job-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:11px 0;border-bottom:1px solid var(--line)}
.job-row>div{display:grid;gap:4px}.job-row span{color:var(--muted);font-size:12px}
@media(max-width:760px){.producer-grid{grid-template-columns:1fr}}

.section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.reference-toolbar{display:flex;gap:10px;align-items:center;margin-bottom:16px}
.search-input{flex:1;background:#0f1218;color:#fff;border:1px solid var(--line);padding:11px 12px;border-radius:10px}
.reference-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.reference-card{padding:0;overflow:hidden}.reference-preview{height:180px;background:#0f1218;display:grid;place-items:center;overflow:hidden}
.reference-preview img{width:100%;height:100%;object-fit:cover}.reference-file-icon{font-weight:800;color:#697386;letter-spacing:.12em}
.reference-card-body{padding:14px}.reference-topline{display:flex;gap:6px}.master-badge,.locked-badge{font-size:10px;border-radius:999px;padding:4px 7px}
.master-badge{background:#3c2f72;color:#d6ccff}.locked-badge{background:#232a34;color:#b9c1cf}.reference-card h3{margin:10px 0 3px}
.reference-meta{display:flex;gap:6px;flex-wrap:wrap}.reference-meta span{background:#202431;border-radius:999px;padding:4px 7px;font-size:11px;color:#c6ccda}
.reference-notes{margin:10px 0 0;color:#b2bac8;font-size:12px}.master-modal-card{width:min(620px,100%)}
.modal-title-row{display:flex;justify-content:space-between;align-items:flex-start}.master-drop{position:relative;border:1px dashed #4b5365;border-radius:12px;padding:20px;background:#10141b;text-align:center}
.master-drop input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}.master-drop p{color:var(--muted);margin:5px 0 0}
.master-modal-card textarea{min-height:90px;padding:11px;background:#0f1218;color:white;border:1px solid var(--line);border-radius:9px;resize:vertical}
.master-rules{display:flex;gap:8px;margin:12px 0}.master-rules span{font-size:11px;background:#252a37;padding:6px 8px;border-radius:999px;color:#c9cfdb}
.upload-progress{margin:12px 0}.upload-progress .bar{height:7px;border-radius:999px;background:#202431;overflow:hidden}.upload-progress .bar i{display:block;height:100%;width:0;background:var(--accent)}
.upload-progress span{display:block;font-size:12px;color:var(--muted);margin-top:5px}
@media(max-width:1050px){.reference-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:700px){.reference-grid{grid-template-columns:1fr}.reference-toolbar{align-items:stretch;flex-direction:column}}

/* Milestone 2.2.1 — real resolved masters in AI Producer */
.reference-count{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;margin-left:6px;border-radius:999px;background:#272d3a;color:#cfd5e2;font-size:11px}
.resolved-reference-list{display:grid;gap:10px;margin-top:12px}
.resolved-reference-item{display:flex;gap:12px;align-items:center;padding:10px;border:1px solid var(--line);border-radius:10px;background:#10141b}
.resolved-reference-preview{width:72px;height:72px;flex:0 0 72px;border-radius:8px;overflow:hidden;background:#0b0e13;display:grid;place-items:center;color:#737d90;font-size:10px;font-weight:800;letter-spacing:.08em}
.resolved-reference-preview img{width:100%;height:100%;object-fit:cover}
.resolved-reference-copy{min-width:0;display:flex;flex-direction:column;gap:4px}
.resolved-reference-copy>b{font-size:14px}
.resolved-reference-copy small{color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:520px}
.resolved-reference-badges,.resolved-reference-meta{display:flex;gap:5px;flex-wrap:wrap}
.authoritative-badge{font-size:10px;border-radius:999px;padding:4px 7px;background:#18342c;color:#8ee2bd}
.resolved-reference-meta span{font-size:10px;padding:3px 6px;border-radius:999px;background:#202431;color:#aeb7c8}
.reference-empty{margin-top:10px;color:var(--muted);font-size:13px}

/* Milestone 2.3 — Connections Manager */
.connections-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:16px}
.connection-summary{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}
.connection-summary p{margin:4px 0 0}
.connection-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.connection-card h3{margin:8px 0 0}.connection-card-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.provider-badge{display:inline-flex;font-size:10px;padding:4px 7px;border-radius:999px;background:#262b38;color:#cbd2df}
.connection-status{font-size:10px;padding:5px 8px;border-radius:999px}.connection-status.connected{background:#17352c;color:#82e3b7}
.connection-status.attention{background:#3a3017;color:#f1d37a}.connection-status.disabled{background:#292d36;color:#939baa}
.connection-details{display:flex;gap:8px;flex-wrap:wrap;margin:13px 0}.connection-details span{font-size:11px;background:#202431;color:#b8c0cf;padding:5px 7px;border-radius:999px}
.connection-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}.danger{background:#3a2024;color:#ffc1c7;border:1px solid #61353b;border-radius:9px;padding:9px 11px}
.assignments-panel{height:max-content;position:sticky;top:18px}.assignments-panel h3{margin:4px 0}.assignment-row{display:grid;gap:7px;padding:12px 0;border-bottom:1px solid var(--line)}
.assignment-row:last-child{border-bottom:0}.assignment-row small{display:block;margin-top:2px}.assignment-row select{width:100%;background:#0f1218;color:white;border:1px solid var(--line);padding:9px;border-radius:9px}
.connection-modal-card textarea{min-height:85px;padding:11px;background:#0f1218;color:#fff;border:1px solid var(--line);border-radius:9px}
.mini{font-size:11px;margin-top:-5px}
@media(max-width:1000px){.connections-layout{grid-template-columns:1fr}.assignments-panel{position:static}.connection-grid{grid-template-columns:1fr}}

/* Milestone 2.3.1 — login-first connection UX */
.login-first-modal{width:min(620px,100%)}
.login-connection-panel{display:grid;gap:9px;margin-top:8px}
.provider-login-button{width:100%;display:flex;align-items:center;justify-content:center;gap:10px;padding:13px 16px;border-radius:11px;border:1px solid #424a5b;background:#f7f8fa;color:#111;font-weight:800;cursor:pointer}
.provider-login-button.unavailable{opacity:.72}
.provider-login-button.available{box-shadow:0 0 0 1px rgba(255,255,255,.05)}
.provider-login-icon{display:inline-grid;place-items:center;min-width:24px;height:24px;border-radius:7px;background:#eceef2;font-weight:900}
.provider-login-notice{font-size:11px;line-height:1.45;color:var(--muted);padding:0 4px}
.connection-divider{display:flex;align-items:center;gap:10px;margin:16px 0;color:#778092;font-size:11px}
.connection-divider:before,.connection-divider:after{content:"";height:1px;flex:1;background:var(--line)}
.credential-toggle{width:100%}
.credential-fallback{margin-top:12px;padding-top:4px}

/* Milestone 2.3.2 — disabled unsupported provider sign-in, no popup */
.provider-login-button:disabled{cursor:not-allowed;opacity:.52;filter:saturate(.6)}
.provider-login-button:disabled:hover{transform:none}
.provider-login-notice{padding-top:2px}

/* Milestone 2.3.3 — ChatGPT/Codex worker connection */
.codex-worker-panel{display:grid;gap:12px;margin-top:8px}
.worker-explainer{padding:12px;border:1px solid var(--line);border-radius:11px;background:#10141b}
.worker-explainer h3{margin:8px 0 5px}.worker-explainer p{margin:0}
.worker-pairing-result{padding:14px;border:1px solid #384154;border-radius:11px;background:#0d1118;text-align:center}
.pairing-code-label{font-size:10px;letter-spacing:.14em;color:#7e889b}
.pairing-code{font-size:32px;letter-spacing:.18em;font-weight:900;margin:7px 0 9px}
.worker-status-row{display:flex;justify-content:space-between;align-items:center;margin-top:12px;padding-top:10px;border-top:1px solid var(--line);font-size:12px}
.worker-status-row b{color:#8ee2bd}

/* Milestone 2.3.4 — UI-driven local Codex pairing */
.local-worker-status-card{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid var(--line);border-radius:11px;background:#0e1218}
.worker-status-main{display:flex;align-items:center;gap:10px;min-width:0}
.worker-status-main small{display:block;margin-top:3px}
.worker-dot{width:10px;height:10px;border-radius:999px;flex:0 0 auto;background:#697386}
.worker-dot.checking{box-shadow:0 0 0 4px rgba(105,115,134,.12)}
.worker-dot.online{background:#4dd19b;box-shadow:0 0 0 4px rgba(77,209,155,.11)}
.worker-dot.attention{background:#e3b64e;box-shadow:0 0 0 4px rgba(227,182,78,.11)}
.worker-dot.offline{background:#747d8e}
.worker-detected-actions{display:grid;gap:9px}
.worker-connect-button{width:100%}
.worker-install-help{padding:12px;border:1px dashed #485064;border-radius:11px;background:#10141b}
.worker-install-help p{margin:5px 0 0}
.worker-install-help code{font-size:11px}

/* Milestone 2.3.5 — isolated Codex multi-account profiles */
.codex-profiles-area{display:grid;gap:11px}
.profile-create-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.profile-create-row input{background:#0f1218;color:#fff;border:1px solid var(--line);padding:11px 12px;border-radius:10px}
.codex-profiles-list{display:grid;gap:9px}
.profile-empty{padding:14px;border:1px dashed #41495a;border-radius:10px;color:var(--muted);font-size:12px}
.codex-profile-card{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:11px;background:#0e1218}
.profile-main{min-width:0}.profile-name-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.profile-main small{display:block;margin-top:4px}
.profile-auth{font-size:10px;padding:4px 7px;border-radius:999px}
.profile-auth.signed-in{background:#17352c;color:#82e3b7}
.profile-auth.needs-login{background:#3a3017;color:#f1d37a}
.profile-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
@media(max-width:650px){.profile-create-row{grid-template-columns:1fr}.codex-profile-card{align-items:stretch;flex-direction:column}.profile-actions{justify-content:flex-start}}

/* Milestone 2.3.6 — live worker status and profile cleanup */
.connection-status.offline{background:#34272a;color:#ffb7be}
.connection-status.checking{background:#252b36;color:#b7bfcd}
.connection-runtime-detail{font-size:12px;color:#aeb7c8;margin:8px 0 0}
.profile-delete{background:transparent;color:#f2a4ad;border:1px solid #59343a;border-radius:9px;padding:9px 11px}
.profile-delete:disabled{opacity:.35;cursor:not-allowed}

/* Milestone 2.4 — Codex dispatch test */
.worker-test-panel{margin-top:14px}
.worker-test-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.worker-test-head h3{margin:4px 0 0}
.worker-test-output{margin:12px 0 0;padding:12px;min-height:72px;white-space:pre-wrap;background:#0b0f15;border:1px solid var(--line);border-radius:10px;color:#d7dce6;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px}

/* Milestone 2.5 — Higgsfield worker reuses local-profile components. */

/* Milestone 2.6 — provider-specific workspace routing */
.provider-routing-row{gap:10px}
.assignment-workspace-head{margin-bottom:2px}
.assignment-provider{display:grid;gap:5px;margin:0}
.assignment-provider>span{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}
.assignment-provider select:disabled{opacity:.65;cursor:wait}

/* Milestone 2.7 — real Execute */
.execution-panel{margin-top:14px;padding:14px;border:1px solid var(--border);border-radius:14px;background:rgba(255,255,255,.025)}
.execution-head{display:flex;justify-content:space-between;align-items:center;gap:10px}
.execution-route{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px;color:var(--muted);font-size:13px}
.execution-error{margin-top:10px;padding:10px 12px;border-radius:10px;background:rgba(255,80,80,.08);color:#ff9d9d}
.execution-result{margin-top:12px;display:grid;gap:10px}
.execution-result img{width:100%;max-height:520px;object-fit:contain;border-radius:12px;background:#090b0e}
.result-link{display:inline-flex;width:max-content;text-decoration:none}

/* Milestone 2.7.1 — Create agent selector */
#higgsfieldAgentSelect.hidden{display:none}


/* Milestone 3.5 — project/job navigation */
.project-card-button,
.clickable-job-row,
.project-job-row {
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.project-card-button {
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.project-card-button:hover,
.clickable-job-row:hover,
.project-job-row:hover {
  border-color: rgba(129, 92, 246, .55);
  transform: translateY(-1px);
}
.clickable-job-row {
  border:0;
  border-bottom:1px solid var(--line);
  background:transparent;
}
.project-job-list {
  padding:0;
  overflow:hidden;
}
.project-job-row {
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:center;
  padding:18px;
  background:transparent;
  border:0;
  border-bottom:1px solid var(--line);
}
.project-job-row:last-child { border-bottom:0; }
.project-job-row div:first-child {
  display:flex;
  flex-direction:column;
  gap:5px;
}
.project-job-row span,
.project-job-row small { color:var(--muted); }
.project-job-status {
  display:flex;
  align-items:flex-end;
  flex-direction:column;
  gap:7px;
}
.job-detail-status {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:18px;
}
.job-detail-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-bottom:18px;
}
.job-detail-grid > div {
  padding:14px;
  border:1px solid var(--line);
  border-radius:12px;
  display:flex;
  flex-direction:column;
  gap:5px;
}
.job-detail-grid span { color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.08em; }
.job-detail-result { margin-top:18px; }
.job-detail-result img { width:100%; max-height:720px; object-fit:contain; border-radius:14px; background:#090d13; }
.job-detail-result-actions { display:flex; align-items:center; gap:12px; margin-top:12px; }
.job-detail-reference-list { display:grid; gap:8px; margin-top:10px; }
.job-detail-reference-list > div {
  display:flex;
  justify-content:space-between;
  gap:14px;
  padding:10px 0;
  border-bottom:1px solid var(--line);
}
.job-detail-reference-list span { color:var(--muted); }
.job-detail-waiting {
  margin-top:18px;
  padding:18px;
  border:1px dashed var(--line);
  border-radius:14px;
}
@media (max-width: 900px) {
  .job-detail-grid { grid-template-columns:1fr 1fr; }
}


/* Milestone 3.6 — conversational image revisions */
.version-strip {
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding:4px 0 14px;
}
.version-chip {
  border:1px solid var(--line);
  background:var(--panel,#151a22);
  color:var(--muted);
  border-radius:999px;
  padding:8px 13px;
  cursor:pointer;
  white-space:nowrap;
}
.version-chip.active {
  color:white;
  border-color:rgba(129,92,246,.7);
  background:rgba(129,92,246,.16);
}
.revision-conversation {
  display:grid;
  gap:18px;
  margin:18px 0;
}
.revision-turn {
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
  background:rgba(255,255,255,.01);
}
.revision-user {
  padding:14px 16px;
  border-bottom:1px solid var(--line);
}
.revision-user span {
  color:var(--muted);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.revision-user p {
  margin:8px 0 0;
}
.revision-result {
  padding:14px;
}
.revision-result img {
  width:100%;
  max-height:720px;
  object-fit:contain;
  border-radius:12px;
  background:#090d13;
}
.revision-result > div {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding-top:10px;
}
.revision-result span { color:var(--muted); }
.revision-composer {
  display:grid;
  gap:12px;
  margin-top:20px;
  padding:18px;
  border:1px solid rgba(129,92,246,.35);
  border-radius:16px;
  background:rgba(129,92,246,.05);
}
.revision-composer > div:first-child {
  display:flex;
  flex-direction:column;
  gap:5px;
}
.revision-composer textarea {
  min-height:110px;
  resize:vertical;
}
.revision-composer-actions {
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:flex-end;
}
.job-detail-waiting.error {
  border-color:rgba(255,90,90,.35);
}

.precision-repair-panel{margin-top:14px;padding:16px 18px;border:1px solid rgba(91,196,255,.28);border-radius:16px;display:flex;align-items:center;justify-content:space-between;gap:18px;background:rgba(91,196,255,.04)}.precision-repair-panel>div{display:flex;flex-direction:column;gap:5px}.repair-helper-details{margin-top:12px;padding:12px;border:1px solid var(--line);border-radius:12px}.repair-helper-details img{display:block;width:min(100%,520px);max-height:520px;object-fit:contain;margin:10px 0;border-radius:10px;background:#090d13}@media(max-width:700px){.precision-repair-panel{align-items:stretch;flex-direction:column}}


/* Milestone 3.7.1 — Vertex AI repair diagnostics */
.vertex-repair-diagnostics {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin:10px 0 12px;
}
.vertex-repair-diagnostics > div {
  display:flex;
  flex-direction:column;
  gap:7px;
}
.vertex-repair-diagnostics img {
  width:100%;
  max-height:360px;
  object-fit:contain;
  border-radius:10px;
  background:#080b10;
  border:1px solid var(--line);
}
@media (max-width:700px) {
  .vertex-repair-diagnostics { grid-template-columns:1fr; }
}


/* 3.7.2A — Generic Precision Repair */
.repair-modal{z-index:50;align-items:center;overflow:auto}
.repair-modal-card{width:min(1040px,96vw);max-height:96vh;overflow:auto}
.repair-modal-card textarea{min-height:82px;padding:11px;background:#0f1218;color:#fff;border:1px solid var(--line);border-radius:9px;resize:vertical}
.repair-stage{height:min(58vh,650px);overflow:auto;background:#070a0f;border:1px solid var(--line);border-radius:14px;margin-top:14px;display:block}
.repair-media{position:relative;width:100%;flex:0 0 auto;line-height:0}
.repair-media img{display:block;width:100%;height:auto;user-select:none;-webkit-user-drag:none}
.repair-media canvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:crosshair}
.repair-toolbar{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}
.repair-toolbar button{border:1px solid var(--line);background:#10151e;color:#dce3ee;border-radius:9px;padding:9px 11px;cursor:pointer}
.repair-toolbar button.active{background:rgba(129,92,246,.22);border-color:rgba(129,92,246,.75);color:#fff}
.repair-sliders{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:10px}
.repair-sliders label{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:10px;font-size:12px;color:var(--muted)}
.repair-suggestions{display:flex;gap:8px;overflow-x:auto;padding:10px 0 2px}
.repair-suggestion{display:grid;grid-template-columns:1fr auto;gap:4px 10px;min-width:230px;text-align:left;background:#10151e;border:1px solid var(--line);border-radius:10px;padding:10px;color:#fff;cursor:pointer}
.repair-suggestion span{grid-column:1/3;color:var(--muted);font-size:11px}.repair-suggestion small{color:#8ee2bd}
.repair-preserve{display:flex;justify-content:space-between;gap:14px;padding:11px 12px;border:1px solid rgba(77,209,155,.25);border-radius:10px;background:rgba(77,209,155,.04);margin-top:10px}
.repair-status{min-height:18px;margin-top:10px}
.repair-review-panel{margin:20px 0;padding:18px;border:1px solid rgba(77,209,155,.34);border-radius:16px;background:rgba(77,209,155,.035)}
.repair-review-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.repair-review-head h3{margin:4px 0 3px}
.repair-compare{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}.repair-compare>div{display:grid;gap:7px}.repair-compare span{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.07em}.repair-compare img{display:block;width:100%;max-height:520px;object-fit:contain;background:#070a0f;border:1px solid var(--line);border-radius:12px}
.repair-review-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:13px}
@media(max-width:700px){.repair-modal{padding:0}.repair-modal-card{width:100vw;max-height:100vh;min-height:100vh;border-radius:0;padding:14px}.repair-stage{height:52vh}.repair-sliders{grid-template-columns:1fr}.repair-compare{grid-template-columns:1fr}.repair-preserve{flex-direction:column}.repair-toolbar{position:sticky;bottom:0;background:rgba(12,16,23,.95);padding:8px 0;z-index:2}}


/* 3.7.2B — AI Supervisor */
.supervisor-card{display:grid;gap:14px;margin:16px 0}
.supervisor-card-head,.supervisor-job-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.supervisor-card-head h3,.supervisor-settings-card h3{margin:5px 0 2px}
.supervisor-card-head p{margin:0}
.supervisor-budget-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.supervisor-budget-grid>div{display:grid;gap:4px;padding:11px 12px;border:1px solid var(--line);border-radius:10px;background:#0e1218}
.supervisor-budget-grid span{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.supervisor-budget-grid b{font-size:18px}
.supervisor-meter{height:7px;border-radius:99px;background:#252b35;overflow:hidden}
.supervisor-meter>span{display:block;height:100%;background:linear-gradient(90deg,#6176ff,#8b6cff);border-radius:inherit}
.supervisor-card-foot{display:flex;justify-content:space-between;gap:10px;color:var(--muted);font-size:11px}
.supervisor-settings-card{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:16px}
.supervisor-settings-card p{margin:4px 0 0}
.supervisor-budget-control{display:flex;align-items:end;gap:8px;min-width:330px}
.supervisor-budget-control label{flex:1;font-size:11px;color:var(--muted)}
.supervisor-budget-control input{width:100%;margin-top:6px;background:#0f1218;color:white;border:1px solid var(--line);padding:10px;border-radius:9px}
#supervisorSettingsStatus{grid-column:1/-1;width:100%;font-size:11px}
.supervisor-note{opacity:.72}
.supervisor-job-panel{margin:16px 0;padding:14px;border:1px solid #353d54;border-radius:14px;background:linear-gradient(180deg,rgba(93,103,255,.07),rgba(255,255,255,.018))}
.supervisor-job-head>div{display:grid;gap:4px;max-width:760px}
.supervisor-analysis{display:grid;gap:12px;margin-top:14px}
.supervisor-analysis.stale{opacity:.72}
.supervisor-analysis-summary{display:grid;gap:6px;padding:12px;border-radius:11px;background:#10141b;border:1px solid var(--line)}
.supervisor-analysis-summary .status-pill{width:max-content}
.supervisor-issues{display:grid;gap:8px}
.supervisor-issue{padding:11px 12px;border:1px solid var(--line);border-radius:11px;background:#0e1218}
.supervisor-issue>div{display:flex;justify-content:space-between;gap:10px}
.supervisor-issue p{margin:6px 0;color:#d9deea;font-size:13px}
.supervisor-issue small{color:var(--muted)}
.supervisor-severity{font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.supervisor-issue.major{border-color:#65373d}.supervisor-issue.moderate{border-color:#5a5130}
.supervisor-next{padding:10px 12px;border-radius:10px;background:#151b26}
.supervisor-error{margin-top:12px;padding:10px 12px;border-radius:10px;background:rgba(255,80,80,.08);color:#ffaaaa}
.supervisor-working,.supervisor-no-issues{margin-top:12px;padding:11px 12px;border-radius:10px;background:#10141b;color:var(--muted)}
@media(max-width:800px){
  .supervisor-budget-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .supervisor-settings-card{align-items:stretch;flex-direction:column}
  .supervisor-budget-control{min-width:0;width:100%}
  .supervisor-job-head{flex-direction:column}
  .supervisor-job-head button{width:100%}
}


/* 3.7.2C — Supervisor-Assisted Generation */
.supervisor-assist-toggle{display:flex;align-items:flex-start;gap:10px;margin-top:12px;padding:11px 12px;border:1px solid #30384c;border-radius:11px;background:rgba(97,118,255,.055);cursor:pointer}
.supervisor-assist-toggle input{margin-top:3px;accent-color:#7a65ff}
.supervisor-assist-toggle span{display:grid;gap:3px}
.supervisor-assist-toggle small{color:var(--muted);line-height:1.35}
.supervisor-plan-card{display:grid;gap:10px;margin:14px 0;padding:12px;border:1px solid #38415c;border-radius:12px;background:linear-gradient(180deg,rgba(97,118,255,.08),rgba(255,255,255,.015))}
.supervisor-plan-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.supervisor-plan-head>div{display:grid;gap:4px}
.supervisor-plan-card p{margin:0;color:#dce1ec}
.supervisor-direction-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.supervisor-direction-grid>div{display:grid;gap:3px;padding:8px 9px;border-radius:9px;background:#0e1218;border:1px solid var(--line)}
.supervisor-direction-grid span{font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}
.supervisor-direction-grid b{font-size:12px}
.supervisor-plan-cost{font-size:10px;color:var(--muted);text-align:right}
.supervisor-plan-card.failed,.supervisor-plan-card.skipped_budget{border-color:#5a5130}
@media(max-width:720px){.supervisor-direction-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* 3.7.2C Mobile-first UI pass — full OS responsiveness */
html,body{max-width:100%;overflow-x:hidden}.app,.main,.view,.card{min-width:0}.main{width:100%}img,video,canvas{max-width:100%}button,input,select,textarea{max-width:100%}

/* Quiet global Supervisor presence on Home */
.supervisor-strip{padding:8px 11px;margin:0 0 12px;border-radius:11px;background:#11151b;border-color:#252b36;gap:5px;box-shadow:none}
.supervisor-strip-main{display:flex;align-items:center;gap:7px;min-width:0;font-size:11px;line-height:1.2;color:var(--muted)}
.supervisor-strip-main b{font-size:11px;color:#dfe4ed;white-space:nowrap}.supervisor-strip-model{color:#b9c1cf;white-space:nowrap}.supervisor-strip-detail{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.supervisor-strip-status{margin-left:auto;font-size:10px;color:#75d8ad;white-space:nowrap}
.supervisor-dot{width:7px;height:7px;border-radius:99px;background:#697386;flex:0 0 7px}.supervisor-dot.connected{background:var(--good);box-shadow:0 0 0 3px rgba(67,198,139,.08)}.supervisor-dot.attention{background:#e7ad5f}.supervisor-dot.checking{background:#76829b}
.supervisor-strip-meter{height:2px;border-radius:99px;background:#202630;overflow:hidden}.supervisor-strip-meter>span{display:block;height:100%;background:#7567ff;border-radius:inherit}

/* Tablet */
@media(max-width:980px){
  .main{padding:18px 18px}.card{padding:15px}.topbar{margin-bottom:16px}.grid{gap:12px}
  .section-head{align-items:flex-start;flex-wrap:wrap}.section-head>.top-actions{width:100%;justify-content:flex-start}
  .chips{flex-wrap:wrap}.chip{min-width:160px;flex:1 1 180px}
  .job-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Phone layout: bottom navigation + one-column content */
@media(max-width:720px){
  :root{--mobile-nav-h:62px}
  body{padding-bottom:env(safe-area-inset-bottom,0px)}
  .app{display:block;min-height:100dvh}
  .sidebar{position:fixed!important;left:0;right:0;bottom:0;top:auto!important;z-index:100;display:block!important;padding:6px 7px calc(6px + env(safe-area-inset-bottom,0px));border-right:0;border-top:1px solid var(--line);background:rgba(16,18,24,.97);backdrop-filter:blur(16px)}
  .sidebar .logo,.sidebar-footer{display:none!important}.sidebar nav{display:flex!important;gap:4px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}.sidebar nav::-webkit-scrollbar{display:none}
  .nav{flex:0 0 auto;min-height:44px;padding:8px 12px!important;border-radius:9px;text-align:center;font-size:11px;white-space:nowrap}.nav.active{background:#252a36}
  .main{padding:0 12px calc(var(--mobile-nav-h) + 20px + env(safe-area-inset-bottom,0px))}
  .topbar{position:sticky;top:0;z-index:40;margin:0 -12px 12px;padding:10px 12px 9px;background:rgba(12,14,18,.94);backdrop-filter:blur(14px);border-bottom:1px solid rgba(42,48,64,.7);align-items:center;gap:10px}
  .topbar>div:first-child{min-width:0}.topbar .eyebrow{font-size:9px}.topbar h1{font-size:21px;line-height:1.05;margin:2px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:52vw}
  .top-actions{gap:7px;min-width:0;flex-wrap:wrap;justify-content:flex-end}.top-actions .primary,.top-actions .secondary{min-height:38px;padding:8px 10px;font-size:12px}.sync{display:none!important}
  .card{padding:13px;border-radius:13px}.hero{align-items:stretch;flex-direction:column;gap:10px;margin-bottom:12px}.hero .primary{width:100%}
  .grid{gap:10px;margin-bottom:10px}.grid.four,.grid.two,.reference-grid,.connection-grid,.producer-grid,.job-detail-grid,.vertex-repair-diagnostics,.repair-compare,.supervisor-budget-grid{grid-template-columns:1fr!important}
  .brand-card h3{font-size:19px}.project-card{width:100%;text-align:left}.project-card,.project-job-row,.job-row{align-items:stretch;flex-direction:column}.project-job-status{align-items:flex-start;flex-direction:row;flex-wrap:wrap}
  .activity>div{display:grid;grid-template-columns:1fr;gap:4px}.activity>div>*{min-width:0;overflow-wrap:anywhere}
  .section-head{display:flex;flex-direction:column;align-items:stretch;gap:8px;margin-bottom:12px}.section-head h2{margin-bottom:3px}.section-head p{margin-bottom:0}.section-head>button,.section-head>.primary{width:100%}.section-head .top-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%}.section-head .top-actions button{width:100%}
  .create-shell{max-width:none;width:100%;margin:0 0 10px}.create-shell textarea{min-height:130px;padding:13px}.chips{display:grid;grid-template-columns:1fr;gap:8px;margin:10px 0}.chip,.search-input{width:100%;min-width:0;min-height:44px}
  .create-actions,.producer-actions,.revision-composer-actions,.repair-review-actions{display:grid;grid-template-columns:1fr;gap:8px}.create-actions>span{display:none}.create-actions button,.producer-actions button,.revision-composer-actions button,.repair-review-actions button{width:100%}
  .supervisor-assist-toggle{padding:10px;font-size:13px}.supervisor-direction-grid{grid-template-columns:1fr!important}.supervisor-plan-head{flex-direction:column}.supervisor-plan-cost{text-align:left}
  .supervisor-strip{position:relative;margin-top:2px;padding:7px 9px}.supervisor-strip-main{font-size:10px;gap:5px}.supervisor-strip-main b{font-size:10px}.supervisor-strip-model{max-width:31vw;overflow:hidden;text-overflow:ellipsis}.supervisor-strip-detail{display:none}.supervisor-strip-status{font-size:9px}
  .reference-toolbar{padding:10px}.reference-preview{height:min(58vw,220px)}.resolved-reference-item{align-items:flex-start}.resolved-reference-preview{width:60px;height:60px;flex-basis:60px}.resolved-reference-copy small{max-width:calc(100vw - 130px)}
  .connections-layout{display:block}.assignments-panel{margin-top:10px;position:static}.connection-summary,.connection-card-top,.worker-test-head{align-items:flex-start;flex-direction:column}.connection-summary .status-pill{width:max-content}
  .supervisor-settings-card{align-items:stretch;flex-direction:column}.supervisor-budget-control{display:grid;grid-template-columns:1fr;min-width:0;width:100%}.supervisor-budget-control button{width:100%}
  .job-detail-status{align-items:flex-start;flex-direction:column;gap:8px}.job-detail-result img,.revision-result img{max-height:62vh}.job-detail-result-actions{display:grid;grid-template-columns:1fr;gap:8px}.job-detail-result-actions button{width:100%}.job-detail-reference-list>div{flex-direction:column;gap:5px}.revision-result>div{align-items:flex-start;flex-direction:column}.revision-composer{padding:13px}.revision-composer textarea{min-height:92px}
  .precision-repair-panel{align-items:stretch;flex-direction:column;padding:13px}.precision-repair-panel button{width:100%}
  .modal{padding:0;align-items:stretch;overflow:auto}.modal-card,.master-modal-card,.login-first-modal{width:100vw;max-width:none;min-height:100dvh;border-radius:0;padding:16px 14px calc(18px + env(safe-area-inset-bottom,0px));overflow:auto}.modal-actions{position:sticky;bottom:0;background:linear-gradient(180deg,transparent 0,#151820 30%);padding-top:20px;display:grid;grid-template-columns:1fr;gap:8px}.modal-actions button{width:100%;min-height:44px}
  .repair-modal-card{width:100vw;min-height:100dvh;max-height:100dvh;border-radius:0;padding:12px}.repair-stage{height:46dvh;min-height:300px}.repair-toolbar{display:flex;flex-wrap:nowrap;overflow-x:auto;position:sticky;bottom:0;padding:8px 0 calc(8px + env(safe-area-inset-bottom,0px));background:rgba(12,16,23,.96)}.repair-toolbar button{flex:0 0 auto;min-height:44px}.repair-sliders{grid-template-columns:1fr!important}.repair-preserve{flex-direction:column}.repair-suggestions{scroll-snap-type:x proximity}.repair-suggestion{min-width:78vw;scroll-snap-align:start}
  button,.primary,.secondary,input,select,textarea{min-height:44px}input,select,textarea{font-size:16px!important}textarea{line-height:1.4}
  h2{font-size:20px}h3{font-size:17px}.eyebrow{font-size:10px}
}

@media(max-width:420px){
  .main{padding-left:9px;padding-right:9px}.topbar{margin-left:-9px;margin-right:-9px;padding-left:9px;padding-right:9px}.topbar h1{max-width:45vw;font-size:19px}.top-actions .primary{font-size:11px;padding:7px 9px}
  .nav{padding-left:10px!important;padding-right:10px!important;font-size:10px}.card{padding:11px}.supervisor-strip-model{max-width:25vw}
  .section-head .top-actions{grid-template-columns:1fr}.repair-stage{height:43dvh;min-height:260px}.repair-suggestion{min-width:86vw}
}

/* Touch/pointer affordances */
@media(pointer:coarse){button,.nav,.chip,.version-chip,.repair-toolbar button{min-height:44px}.repair-media canvas{cursor:default}}

/* 3.7.3 — Production Workflow Foundation */
.needs-attention-card{margin-bottom:12px;padding:13px 15px}.needs-attention-queue{display:grid;gap:9px;margin-top:9px}.attention-summary{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px}.attention-summary>span{display:flex;align-items:center;gap:7px;white-space:nowrap;border:1px solid var(--line);background:#10141b;border-radius:999px;padding:7px 10px;color:var(--muted);font-size:11px}.attention-summary b{font-size:13px;color:#fff}.attention-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.attention-row{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;text-align:left;color:inherit;background:#10141b;border:1px solid var(--line);border-radius:10px;padding:10px;cursor:pointer}.attention-row>div{display:grid;gap:3px}.attention-row span,.attention-row small{color:var(--muted);font-size:11px}.attention-row small{white-space:nowrap}

.project-context-hint{margin:8px 0 12px;padding:9px 11px;border-radius:9px;background:#10141b;border:1px solid var(--line);font-size:12px}.shot-builder{display:grid;gap:9px;margin:14px 0}.builder-group{border:1px solid var(--line);border-radius:12px;background:#10141b;overflow:hidden}.builder-group>summary{cursor:pointer;padding:12px 14px;font-weight:750;list-style:none}.builder-group>summary::-webkit-details-marker{display:none}.builder-group[open]>summary{border-bottom:1px solid var(--line)}.builder-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;padding:12px}.builder-field{display:grid;gap:6px;color:var(--muted);font-size:11px}.field-control{display:grid;grid-template-columns:minmax(0,1fr) 38px;gap:6px}.builder-field input,.builder-field select{width:100%;min-height:42px;padding:9px 10px;border-radius:9px;border:1px solid var(--line);background:#0c1016;color:#fff}.lock-field{width:38px;height:42px;padding:0;border-radius:9px;border:1px solid var(--line);background:#171c25;color:#aeb8c8;cursor:pointer}.lock-field.locked{border-color:#8171ff;background:rgba(124,92,255,.18);color:#fff}.custom-create-fields{display:grid;gap:9px}.complete-shot-bar{display:flex;align-items:center;gap:12px;padding:12px 0}.complete-shot-bar .muted{font-size:11px;line-height:1.35}

.create-assets-panel{border:1px solid var(--line);border-radius:12px;background:#10141b;padding:12px;margin:4px 0 12px}.create-assets-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px}.create-assets-head p{margin:4px 0 0;font-size:11px}.create-asset-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}.create-asset-item{position:relative;display:grid;grid-template-columns:auto 56px minmax(0,1fr) auto;align-items:center;gap:8px;padding:8px;border:1px solid var(--line);border-radius:10px;background:#0d1117;cursor:pointer}.create-asset-item.selected{border-color:rgba(124,92,255,.65);background:rgba(124,92,255,.06)}.create-asset-item>input{accent-color:var(--accent)}.asset-thumb{width:56px;height:56px;display:grid;place-items:center;border-radius:8px;overflow:hidden;background:#070a0f;color:#697386;font-size:9px}.asset-thumb img{width:100%;height:100%;object-fit:cover}.asset-copy{min-width:0;display:grid;gap:3px}.asset-copy b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.asset-copy>span{font-size:10px;color:var(--muted)}.asset-tags{display:flex;gap:4px;overflow:hidden}.asset-tags small{flex:0 0 auto;padding:3px 5px;background:#222834;border-radius:999px;color:#bcc5d4;font-size:9px}.asset-lock{font-size:12px}

.project-production-card{margin-bottom:12px}.project-production-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}.project-production-head h3{margin:4px 0}.workflow-stage-strip{display:flex;gap:7px;overflow-x:auto;padding:10px 0 2px}.workflow-stage{flex:0 0 auto;border:1px solid var(--line);border-radius:999px;padding:6px 9px;color:var(--muted);font-size:10px;white-space:nowrap}.workflow-stage.done{border-color:rgba(67,198,139,.35);background:rgba(67,198,139,.06);color:#9be4c2}.project-deliverables{display:flex;gap:10px;align-items:flex-start;margin-top:10px;font-size:12px}.project-deliverables span{color:var(--muted)}.continuity-locks{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-top:9px}.continuity-locks>b{font-size:11px;margin-right:4px}.continuity-locks span{font-size:10px;padding:5px 7px;border:1px solid #3b3f53;border-radius:999px;background:#181c25}.video-preproduction-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px}.workflow-document-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}.workflow-document-head h3{margin:4px 0}.story-beats,.script-scenes{display:grid;gap:7px;margin-top:10px;max-height:420px;overflow:auto}.story-beats>div{display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:8px;padding:8px;border:1px solid var(--line);border-radius:9px;background:#0e1218}.story-beats small,.script-scenes small{color:var(--muted)}.script-scenes>div{display:grid;gap:4px;padding:8px;border-bottom:1px solid var(--line)}.storyboard-card{margin-bottom:12px}.storyboard-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:12px}.storyboard-shot{display:grid;align-content:start;gap:7px;border:1px solid var(--line);background:#0e1218;border-radius:11px;padding:10px}.storyboard-shot-num{font-size:9px;color:#9388ff;letter-spacing:.08em}.storyboard-shot h4{margin:0}.storyboard-shot p{margin:0;color:#cbd1dd;font-size:11px;line-height:1.4}.storyboard-shot-meta{display:flex;gap:5px;flex-wrap:wrap}.storyboard-shot-meta span{padding:4px 6px;border-radius:999px;background:#202631;color:#aeb8c8;font-size:9px}.storyboard-shot button{margin-top:auto}

.workspace-config-card{margin-bottom:16px}.workspace-config-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}.workspace-config-head h3{margin:4px 0}.workspace-config-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px}.workspace-config-grid.two-col{grid-template-columns:1fr 1fr}.workspace-config-card label{display:grid;gap:6px;color:var(--muted);font-size:11px}.workspace-config-card input,.workspace-config-card select,.workspace-config-card textarea,.custom-field-row input{width:100%;padding:10px;border-radius:9px;border:1px solid var(--line);background:#0e1218;color:#fff}.workspace-config-card textarea{min-height:100px;resize:vertical}.custom-field-config{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}.custom-field-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.custom-field-head p{font-size:11px;margin:4px 0 0}.custom-field-row{display:grid;grid-template-columns:1fr 2fr auto;gap:8px;margin-top:8px;align-items:center}.workspace-config-actions{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-top:14px}

.project-modal-card,.asset-modal-card{width:min(650px,100%)}.project-modal-card textarea,.asset-modal-card textarea{width:100%;min-height:90px;padding:11px;background:#0f1218;color:#fff;border:1px solid var(--line);border-radius:9px;resize:vertical}.modal-inline-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.inline-check{display:flex!important;grid-template-columns:none!important;align-items:center;gap:9px!important;color:#d8deea!important}.inline-check input{width:auto!important;min-height:0!important}

.approval-panel{display:grid;gap:12px;margin:16px 0;padding:14px;border:1px solid rgba(67,198,139,.28);background:rgba(67,198,139,.035);border-radius:13px}.approval-panel-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}.approval-panel-head h3{margin:4px 0}.approval-panel-head p{margin:0}.approval-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}.client-notes{padding:10px;border-radius:9px;background:#0e1218;border:1px solid var(--line)}.client-notes p{margin:5px 0}.client-notes span{font-size:10px;color:var(--muted)}.decision-note-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.decision-note-row input,.repair-memory-choice select{padding:10px;border-radius:9px;border:1px solid var(--line);background:#0e1218;color:#fff}.repair-memory-choice{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:end;margin-top:12px}.repair-memory-choice label{display:grid;gap:6px;color:var(--muted);font-size:11px}.repair-memory-choice>span{font-size:10px}

@media(max-width:980px){.storyboard-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.workspace-config-grid{grid-template-columns:1fr 1fr}.create-asset-list{grid-template-columns:1fr}}
@media(max-width:720px){
  .attention-items{grid-template-columns:1fr}.attention-row{flex-direction:column}.attention-row small{white-space:normal}.attention-summary{margin:0 -2px}
  .builder-grid{grid-template-columns:1fr;padding:10px}.builder-group>summary{padding:11px}.field-control{grid-template-columns:minmax(0,1fr) 44px}.lock-field{width:44px;height:44px}
  .complete-shot-bar{display:grid;grid-template-columns:1fr}.complete-shot-bar button{width:100%}.create-assets-head,.project-production-head,.workflow-document-head,.workspace-config-head,.custom-field-head,.approval-panel-head{flex-direction:column;align-items:stretch}.create-assets-head button,.project-production-head button,.workflow-document-head button,.custom-field-head button{width:100%}
  .create-asset-list{grid-template-columns:1fr}.create-asset-item{grid-template-columns:auto 52px minmax(0,1fr) auto}.asset-thumb{width:52px;height:52px}
  .video-preproduction-grid{grid-template-columns:1fr}.storyboard-grid{grid-template-columns:1fr}.storyboard-shot{min-height:0}.workflow-stage-strip{scroll-snap-type:x proximity}.workflow-stage{scroll-snap-align:start}
  .workspace-config-grid,.workspace-config-grid.two-col,.modal-inline-grid{grid-template-columns:1fr}.custom-field-row{grid-template-columns:1fr}.custom-field-row .linkbtn{text-align:left}.workspace-config-actions{display:grid;grid-template-columns:1fr}.workspace-config-actions button{width:100%}
  .approval-actions{display:grid;grid-template-columns:1fr}.approval-actions button{width:100%}.decision-note-row{grid-template-columns:1fr}.repair-memory-choice{grid-template-columns:1fr}
}
.correction-memory-config{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}.correction-memory-config p{margin:4px 0 9px;font-size:11px}.memory-config-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:9px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line)}.memory-config-row span{font-size:11px;color:#d5dbe6}.memory-config-row small{color:var(--muted)}.memory-config-row input{accent-color:var(--accent);width:auto}.memory-config-row button{font-size:10px}@media(max-width:720px){.memory-config-row{grid-template-columns:auto minmax(0,1fr)}.memory-config-row button{grid-column:2;width:max-content}}

/* 3.7.3 — workflow approval gates + continuity editor */
.workflow-doc-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.workflow-doc-status{display:inline-flex;width:max-content;margin-top:5px;padding:4px 7px;border-radius:999px;font-size:9px;text-transform:uppercase;letter-spacing:.06em;border:1px solid var(--line)}.workflow-doc-status.approved{color:#9be4c2;border-color:rgba(67,198,139,.36);background:rgba(67,198,139,.07)}.workflow-doc-status.draft{color:#e7ca8c;border-color:rgba(223,177,74,.34);background:rgba(223,177,74,.06)}.workflow-gate-note{margin:8px 0 10px;padding:8px 10px;border-radius:9px;border:1px solid rgba(223,177,74,.24);background:rgba(223,177,74,.045);color:#d8c18c;font-size:11px}.continuity-editor{margin-top:12px;padding-top:11px;border-top:1px solid var(--line)}.continuity-editor-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}.continuity-editor-head b{font-size:11px}.continuity-editor-head span{font-size:10px}.continuity-locks .continuity-remove{border:0;background:transparent;color:#9ba5b5;padding:0 0 0 4px;cursor:pointer;font-size:12px}.continuity-add-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin-top:8px}.continuity-add-row input{min-height:40px;padding:9px 10px;border:1px solid var(--line);border-radius:9px;background:#0e1218;color:#fff}
@media(max-width:720px){.workflow-doc-actions{display:grid;grid-template-columns:1fr;width:100%}.workflow-doc-actions button{width:100%}.continuity-add-row{grid-template-columns:1fr}.continuity-add-row button{width:100%}}
.review-queue-list{display:grid;gap:8px;margin-top:12px}
.retention-trash-card{margin-bottom:16px}.retention-trash-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.retention-trash-head h3{margin:4px 0}.retention-trash-head p{margin:3px 0 0}.trash-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}.trash-row>div{display:grid;gap:3px}.trash-row span,.trash-row small{color:var(--muted);font-size:10px}@media(max-width:720px){.retention-trash-head,.trash-row{flex-direction:column;align-items:stretch}.retention-trash-head button,.trash-row button{width:100%}}

/* 3.7.4A — video production + adaptive editor */
.storyboard-shot-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:4px}.storyboard-shot-actions .full-row{grid-column:1/-1}.shot-production-state{display:flex;gap:5px;flex-wrap:wrap;min-height:22px}.shot-state-pill{font-size:9px;padding:4px 6px;border-radius:999px;border:1px solid var(--line);color:var(--muted);background:#171c25}.shot-state-pill.approved{border-color:rgba(67,198,139,.35);color:#9be4c2;background:rgba(67,198,139,.06)}.shot-state-pill.pending{border-color:rgba(223,177,74,.26);color:#dfc98f;background:rgba(223,177,74,.05)}.shot-state-pill.missing{color:#9da5b3}.storyboard-total{margin-top:4px;font-size:10px;color:var(--muted)}
.video-shot-modal-card{width:min(760px,100%);max-height:92vh;overflow:auto}.video-shot-modal-card textarea{width:100%;min-height:120px;padding:11px;background:#0f1218;color:#fff;border:1px solid var(--line);border-radius:9px;resize:vertical}.video-shot-mode-tabs{display:flex;gap:6px;margin:12px 0}.video-shot-mode-tabs button,.editor-asset-tabs button{border:1px solid var(--line);background:#151a23;color:var(--muted);padding:8px 10px;border-radius:8px;cursor:pointer}.video-shot-mode-tabs button.active,.editor-asset-tabs button.active{background:#272d3a;color:#fff;border-color:#4a5266}.video-existing-takes{display:grid;gap:7px;margin-top:14px}.video-take-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;border-top:1px solid var(--line);padding-top:9px}.video-take-copy{display:grid;gap:3px}.video-take-copy small{color:var(--muted)}.video-take-actions{display:flex;gap:5px;flex-wrap:wrap}.video-take-actions button,.video-take-actions select{padding:7px 8px;border-radius:8px;border:1px solid var(--line);background:#171c25;color:#fff}.mini{font-size:10px}

.editor-page-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:10px}.editor-page-head h2{margin:3px 0}.editor-head-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.editor-status{margin-bottom:10px;padding:8px 10px;border:1px solid var(--line);border-radius:9px;background:#10141b}.editor-shell{display:grid;grid-template-columns:250px minmax(400px,1fr) 280px;grid-template-areas:"assets center inspector" "timeline timeline timeline";gap:10px;min-height:650px}.editor-panel{background:#11151c;border:1px solid var(--line);border-radius:12px;padding:10px;min-width:0}.editor-assets-panel{grid-area:assets}.editor-center{grid-area:center;display:grid;gap:10px;align-content:start}.editor-inspector{grid-area:inspector}.editor-timeline-panel{grid-area:timeline;padding:10px}.editor-panel-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:9px}.editor-asset-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin-bottom:8px}.editor-asset-tabs button{font-size:10px;padding:7px 5px}.editor-asset-list{display:grid;gap:6px;max-height:485px;overflow:auto}.editor-asset-row{display:grid;grid-template-columns:62px minmax(0,1fr);gap:8px;align-items:center;border:1px solid var(--line);background:#0e1218;border-radius:9px;padding:7px;cursor:pointer}.editor-asset-row:hover{border-color:#4a5266}.editor-asset-thumb{width:62px;height:42px;border-radius:6px;background:#090c10;display:grid;place-items:center;overflow:hidden;color:#6f7888;font-size:9px}.editor-asset-thumb img,.editor-asset-thumb video{width:100%;height:100%;object-fit:cover}.editor-asset-copy{min-width:0;display:grid;gap:3px}.editor-asset-copy b,.editor-asset-copy span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.editor-asset-copy b{font-size:11px}.editor-asset-copy span{font-size:9px;color:var(--muted)}
.editor-monitor{padding:10px}.editor-monitor-head{display:flex;justify-content:space-between;align-items:center;font-size:11px;margin-bottom:8px}.editor-monitor-stage{position:relative;aspect-ratio:16/9;background:#06080b;border:1px solid #262b35;border-radius:8px;overflow:hidden;display:grid;place-items:center}.editor-monitor-stage video{width:100%;height:100%;object-fit:contain;background:#05070a}.editor-monitor-placeholder{position:absolute;color:#5f6878;font-size:12px}.editor-transport{display:flex;gap:6px;align-items:center;margin-top:8px;flex-wrap:wrap}.editor-transport button,.editor-timeline-toolbar button{min-width:36px;height:34px;padding:0 9px;border:1px solid var(--line);border-radius:8px;background:#171c25;color:#fff;cursor:pointer}.editor-transport button:hover,.editor-timeline-toolbar button:hover{background:#222937}.editor-transport .muted{font-size:10px;margin-left:auto}.editor-inspector label{display:grid;gap:5px;margin:8px 0;color:var(--muted);font-size:10px}.editor-inspector input,.editor-inspector select{width:100%;padding:8px;border-radius:8px;border:1px solid var(--line);background:#0e1218;color:#fff}.inspector-row{display:grid;grid-template-columns:1fr 1fr;gap:7px}.assistant-editor-card{border-top:1px solid var(--line);padding-top:12px;margin-top:14px}.assistant-editor-result{display:grid;gap:6px;margin-top:8px;font-size:10px;line-height:1.45}.assistant-editor-issue{padding:7px;border-radius:8px;background:#0d1117;border:1px solid var(--line)}
.editor-timeline-toolbar{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:8px}.editor-timeline-toolbar>div{display:flex;gap:5px;align-items:center}.editor-timeline-toolbar label{display:flex;gap:6px;align-items:center;font-size:10px;color:var(--muted)}.editor-timeline-toolbar select{padding:7px;border:1px solid var(--line);border-radius:8px;background:#11151c;color:#fff}.editor-timeline-toolbar button.active{border-color:#8171ff;background:rgba(124,92,255,.18)}.editor-timeline{position:relative;overflow:auto;border:1px solid var(--line);border-radius:9px;background:#090c11;min-height:270px}.timeline-ruler{position:sticky;top:0;z-index:4;height:28px;border-bottom:1px solid var(--line);background:#0d1016;display:flex;align-items:end}.timeline-ruler span{position:absolute;bottom:4px;font-size:8px;color:#697386;transform:translateX(-50%)}.timeline-track{display:grid;grid-template-columns:54px minmax(900px,1fr);min-height:52px;border-bottom:1px solid #1e2330}.timeline-track-label{position:sticky;left:0;z-index:3;background:#0d1016;border-right:1px solid var(--line);display:grid;place-items:center;font-size:9px;color:#8c96a7}.timeline-lane{position:relative;min-height:52px}.timeline-clip{position:absolute;top:6px;height:40px;border:1px solid #535d75;background:#222a38;border-radius:6px;padding:5px 7px;overflow:hidden;cursor:pointer;min-width:16px}.timeline-clip.selected{outline:2px solid #8a77ff;outline-offset:1px}.timeline-clip.missing{border-style:dashed;background:#151820;color:#7d8797}.timeline-clip b,.timeline-clip small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.timeline-clip b{font-size:9px}.timeline-clip small{font-size:8px;color:#aeb7c6}.timeline-playhead{position:absolute;top:0;bottom:0;width:1px;background:#ff6f72;z-index:8;pointer-events:none}.timeline-marker{position:absolute;top:0;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:7px solid #f0c45c;z-index:7}.editor-mobile-stack{display:none}.editor-shot-stack-item{display:grid;grid-template-columns:76px minmax(0,1fr) auto;gap:9px;align-items:center;border:1px solid var(--line);border-radius:10px;padding:8px;margin-bottom:7px;background:#0e1218}.editor-shot-stack-thumb{width:76px;height:50px;border-radius:7px;background:#080b0f;overflow:hidden;display:grid;place-items:center;color:#6d7584;font-size:9px}.editor-shot-stack-thumb video{width:100%;height:100%;object-fit:cover}.editor-shot-stack-copy{min-width:0;display:grid;gap:3px}.editor-shot-stack-copy b{font-size:11px}.editor-shot-stack-copy span{font-size:9px;color:var(--muted)}.editor-stack-actions{display:grid;gap:5px}.editor-stack-actions button{padding:7px;border:1px solid var(--line);border-radius:8px;background:#171c25;color:#fff}.shortcuts-modal-card{width:min(720px,100%)}.shortcut-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.shortcut-grid span{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:9px;border:1px solid var(--line);border-radius:9px;background:#0e1218}.shortcut-grid kbd{font:10px ui-monospace,SFMono-Regular,Consolas,monospace;padding:4px 6px;border-radius:5px;background:#232936;border:1px solid #3c4457;color:#fff}

@media(max-width:1180px){.editor-shell{grid-template-columns:210px minmax(360px,1fr);grid-template-areas:"assets center" "inspector inspector" "timeline timeline"}.editor-inspector{display:grid;grid-template-columns:1fr 1fr;gap:12px}.assistant-editor-card{border-top:0;border-left:1px solid var(--line);padding-top:0;padding-left:12px;margin-top:0}}
@media(max-width:900px){.editor-page-head{flex-direction:column}.editor-head-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}.editor-head-actions select{grid-column:1/-1}.editor-shell{grid-template-columns:1fr;grid-template-areas:"center" "inspector" "assets" "timeline"}.editor-assets-panel{max-height:none}.editor-asset-list{max-height:230px;grid-template-columns:repeat(2,minmax(0,1fr))}.editor-inspector{display:block}.assistant-editor-card{border-left:0;border-top:1px solid var(--line);padding-left:0;padding-top:12px;margin-top:14px}.editor-timeline-panel{display:none}.editor-mobile-stack{display:block}.editor-monitor-stage{aspect-ratio:16/9}.storyboard-shot-actions{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.video-shot-modal-card{width:100vw;min-height:100vh;max-height:100vh;border-radius:0;padding:14px}.video-shot-mode-tabs{position:sticky;top:0;z-index:3;background:var(--panel);padding:4px 0}.video-take-row{grid-template-columns:1fr}.video-take-actions{display:grid;grid-template-columns:1fr 1fr}.editor-head-actions{grid-template-columns:1fr}.editor-head-actions select{grid-column:auto}.editor-asset-list{grid-template-columns:1fr}.editor-shot-stack-item{grid-template-columns:68px minmax(0,1fr);align-items:start}.editor-shot-stack-thumb{width:68px;height:46px}.editor-stack-actions{grid-column:1/-1;grid-template-columns:repeat(3,1fr)}.editor-stack-actions button{min-height:44px}.editor-monitor{padding:8px}.editor-transport{display:grid;grid-template-columns:repeat(6,1fr)}.editor-transport button{width:100%;padding:0}.editor-transport .muted{grid-column:1/-1;margin:0}.shortcut-grid{grid-template-columns:1fr}.storyboard-shot-actions{grid-template-columns:1fr}.storyboard-shot-actions .full-row{grid-column:auto}}

/* 3.7.4A monitor media support */
.editor-monitor-stage #editorPreviewImage{
  width:100%;height:100%;object-fit:contain;display:block;background:#05070a;
}
.editor-monitor-stage #editorPreviewImage.hidden{display:none}

.video-assets-box{margin:12px 0;padding:10px;border:1px solid var(--line);border-radius:10px;background:#0e1218}.video-assets-box .create-asset-list{max-height:230px;overflow:auto}.video-assets-box .create-assets-head{margin-bottom:8px}

.mini-file-input{margin-top:6px;font-size:10px;padding:7px!important}

/* ========================================================================== */
/* 3.7.4A.1 — ArtisThree Edit UI rebuild                                     */
/* CapCut-like clarity + Premiere-style desktop timeline, adaptive on touch. */
/* ========================================================================== */
body.editor-mode{overflow:hidden;background:#090b0f}
body.editor-mode .app{grid-template-columns:1fr;height:100vh;min-height:0}
body.editor-mode .sidebar,body.editor-mode .topbar{display:none!important}
body.editor-mode .main{padding:0!important;height:100vh;min-height:0;overflow:hidden}
body.editor-mode #view-edit.active{display:flex;flex-direction:column;height:100vh;min-height:0;background:#090b0f;overflow:hidden}

.editor-view{--editor-border:#252a34;--editor-panel:#11141a;--editor-panel-2:#151922;--editor-panel-3:#0c0f14;--editor-purple:#7c5cff;--editor-purple-2:#9a86ff;--editor-blue:#31548f;--editor-green:#245b50;color:#eef1f6}
.editor-view button,.editor-view select,.editor-view input{font-size:12px}
.editor-view button{cursor:pointer}
.editor-view button:focus-visible,.editor-view select:focus-visible,.editor-view input:focus-visible{outline:2px solid rgba(124,92,255,.8);outline-offset:1px}

.editor-appbar{height:46px;flex:0 0 46px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;padding:0 12px;border-bottom:1px solid var(--editor-border);background:#0e1116;z-index:30}
.editor-brandmark{display:flex;align-items:center;gap:4px;font-size:15px;letter-spacing:-.02em}.editor-brandmark span{color:var(--editor-purple-2);font-weight:800}.editor-brandmark b{font-weight:800}
.editor-workspace-nav{display:flex;align-items:center;gap:4px;height:100%}.editor-workspace-nav button{height:32px;padding:0 14px;border:0;border-radius:7px;background:transparent;color:#8790a1}.editor-workspace-nav button:hover{color:#e9edf5;background:#171b23}.editor-workspace-nav button.active{background:#1c212b;color:#fff}
.editor-appbar-actions{display:flex;justify-content:flex-end;align-items:center;gap:7px}.editor-save-btn,.editor-icon-btn{border:1px solid var(--editor-border);background:#171b23;color:#dce1ea;border-radius:7px;height:30px;padding:0 10px}.editor-save-btn:hover,.editor-icon-btn:hover{background:#202631}.editor-icon-btn{width:32px;padding:0;display:grid;place-items:center}

.editor-projectbar{height:48px;flex:0 0 48px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 12px;border-bottom:1px solid var(--editor-border);background:#0b0e13;z-index:25}
.editor-project-context{display:flex;align-items:center;min-width:0;gap:10px}.editor-project-context select{min-width:180px;max-width:290px;height:34px;border:1px solid var(--editor-border);border-radius:7px;background:#171b23;color:#fff;padding:0 28px 0 10px}.editor-project-context>span{font-size:10px;color:#7f899a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:52vw}
.editor-project-actions{display:flex;gap:6px}.editor-project-actions button{height:32px;padding:0 10px;border:1px solid var(--editor-border);border-radius:7px;background:#171b23;color:#dce1ea}.editor-project-actions button:hover{background:#212733}.editor-project-actions #createRoughCutBtn{border-color:rgba(124,92,255,.45);color:#c9c0ff}

.editor-shell{flex:1;min-height:0;display:grid;grid-template-columns:228px minmax(460px,1fr) 272px;grid-template-rows:minmax(280px,1fr) minmax(260px,34vh);grid-template-areas:"assets center inspector" "timeline timeline timeline";gap:0;background:#090b0f;overflow:hidden}
.editor-panel{min-width:0;background:var(--editor-panel);border:0;border-radius:0;padding:0}
.editor-assets-panel{grid-area:assets;border-right:1px solid var(--editor-border);overflow:hidden;display:flex;flex-direction:column}
.editor-inspector{grid-area:inspector;border-left:1px solid var(--editor-border);overflow:auto}
.editor-center{grid-area:center;min-width:0;min-height:0;display:flex;flex-direction:column;align-items:stretch;justify-content:center;background:#090b0f;position:relative;padding:12px 20px 8px;overflow:hidden}
.editor-timeline-panel{grid-area:timeline;min-width:0;min-height:0;border-top:1px solid var(--editor-border);background:#0b0e13;display:flex;flex-direction:column;overflow:hidden}

.editor-panel-head{height:48px;flex:0 0 48px;margin:0;padding:0 10px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--editor-border)}.editor-panel-head>div{min-width:0}.editor-panel-head b{display:block;font-size:11px}.editor-panel-head small{display:block;margin-top:2px;color:#697386;font-size:9px;font-weight:500}
.editor-asset-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:0;margin:0;border-bottom:1px solid var(--editor-border);padding:0 6px}.editor-asset-tabs button{height:34px;padding:0 4px;border:0!important;border-bottom:2px solid transparent!important;border-radius:0!important;background:transparent!important;color:#7f899a!important;font-size:10px!important}.editor-asset-tabs button.active{color:#fff!important;border-bottom-color:var(--editor-purple)!important}.editor-asset-tabs button:hover{color:#d9deea!important}
.editor-asset-list{display:block;max-height:none;overflow:auto;flex:1;padding:4px 0}.editor-asset-row{width:100%;display:grid;grid-template-columns:54px minmax(0,1fr);gap:8px;align-items:center;border:0;border-bottom:1px solid #1d222b;border-radius:0;background:transparent;padding:7px 8px;color:inherit;text-align:left}.editor-asset-row:hover{background:#191e27;border-color:#1d222b}.editor-asset-row:focus{background:#1d2230}.editor-asset-thumb{width:54px;height:36px;border-radius:5px;background:linear-gradient(135deg,#2c3340,#171b23);color:#7e8798;font-size:8px}.editor-asset-copy b{font-size:10px;line-height:1.2}.editor-asset-copy span{font-size:8px;color:#7b8596}.editor-rating{font-style:normal;padding:2px 4px;border-radius:4px;background:#252b36;color:#c4cad5;font-size:7px;text-transform:capitalize}.editor-rating.rating-best{background:#392b71;color:#d6cbff}.editor-rating.rating-good{background:#183d34;color:#9ce2c7}.editor-rating.rating-usable{background:#4b3715;color:#f0ce8e}.editor-rating.rating-reject{background:#4b2326;color:#f0a7ac}

.editor-monitor{width:min(860px,100%);margin:auto;background:transparent;border:0;border-radius:0;padding:0;min-height:0;display:flex;flex-direction:column}.editor-monitor-head{height:30px;display:flex;align-items:center;justify-content:space-between;margin:0;color:#8a94a4}.editor-monitor-head>div{display:flex;gap:7px;align-items:center;min-width:0}.editor-monitor-head b{font-size:10px;color:#bcc4d1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.editor-panel-kicker{font-size:8px;letter-spacing:.08em;color:#596273}.editor-timecode{font:10px ui-monospace,SFMono-Regular,Consolas,monospace;color:#8e98aa}
.editor-monitor-stage{width:100%;max-height:calc(100vh - 430px);min-height:190px;aspect-ratio:16/9;background:#05070a;border:1px solid #2a303b;border-radius:7px;box-shadow:0 18px 60px rgba(0,0,0,.32);overflow:hidden}.editor-monitor-stage video,.editor-monitor-stage #editorPreviewImage{width:100%;height:100%;object-fit:contain;background:#05070a}.editor-monitor-placeholder{position:absolute;inset:0;display:grid;place-items:center;align-content:center;gap:8px;color:#515a69;font-size:10px}.editor-monitor-placeholder span{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:#141820;color:#727c8d;font-size:15px}.editor-monitor-placeholder b{font-weight:600;color:#667080}
.editor-transport{height:40px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;margin:0;border:0;gap:8px}.editor-transport-primary,.editor-transport-marks{display:flex;align-items:center;gap:4px}.editor-transport-primary{justify-content:flex-start}.editor-transport-marks{justify-content:center}.editor-transport>span{justify-self:end;font-size:9px;color:#667080}.editor-transport button{min-width:28px;width:28px;height:28px;padding:0;border:0;border-radius:6px;background:transparent;color:#9ba5b5}.editor-transport button:hover{background:#1b2029;color:#fff}.editor-transport .editor-play-btn{width:34px;background:#1c212b;color:#fff}

.editor-action-dock{align-self:center;margin-top:2px;display:flex;align-items:center;gap:2px;padding:4px;border:1px solid #2a303b;border-radius:9px;background:rgba(18,22,29,.97);box-shadow:0 8px 22px rgba(0,0,0,.25)}.editor-action-dock button{height:28px;padding:0 10px;border:0;border-radius:6px;background:transparent;color:#aeb6c4;font-size:9px}.editor-action-dock button:hover{background:#242a35;color:#fff}.editor-action-dock button.ai{color:#c6bcff}.editor-action-dock button+button{border-left:1px solid #252b35;border-top-left-radius:0;border-bottom-left-radius:0}

.editor-inspector-body{padding:10px}.editor-inspector-body>b{display:block;margin-bottom:9px;font-size:11px}.editor-inspector label{display:grid;gap:5px;margin:7px 0;color:#788294;font-size:9px}.editor-inspector input,.editor-inspector select{height:32px;width:100%;padding:0 8px;border:1px solid #2a303b;border-radius:6px;background:#0b0f14;color:#e8ebf1}.inspector-row{gap:6px}.editor-inspector .secondary{height:32px;padding:0 9px;border-radius:6px;background:#1a1f28;font-size:9px}
.assistant-editor-card{margin:6px 10px 12px;padding:12px 0 0;border-top:1px solid var(--editor-border)}.assistant-editor-head>div{display:flex;align-items:center;gap:8px}.assistant-editor-head b{display:block;font-size:10px}.assistant-editor-head small{display:block;margin-top:2px;color:#687284;font-size:8px}.assistant-dot{width:7px;height:7px;border-radius:50%;background:#43c68b;box-shadow:0 0 0 3px rgba(67,198,139,.08)}.assistant-analyze-btn{width:100%;height:33px;margin:9px 0 8px;border:1px solid rgba(124,92,255,.55);border-radius:7px;background:rgba(124,92,255,.08);color:#cfc6ff;font-weight:650;font-size:9px}.assistant-analyze-btn:hover{background:rgba(124,92,255,.16)}.assistant-editor-result{display:grid;gap:6px;color:#798395;font-size:9px;line-height:1.45}.assistant-editor-issue{padding:7px;border:1px solid #252b35;border-radius:6px;background:#0c1016}

.editor-timeline-toolbar{height:38px;flex:0 0 38px;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:0 8px;margin:0;border-bottom:1px solid var(--editor-border);background:#0d1015}.editor-tool-group{display:flex;align-items:center;gap:3px}.editor-timeline-toolbar button{min-width:28px;width:auto;height:27px;padding:0 7px;border:0;border-radius:5px;background:transparent;color:#8f99aa}.editor-timeline-toolbar button:hover{background:#1d222c;color:#fff}.editor-timeline-toolbar button.active{background:rgba(124,92,255,.12);color:#cabfff;border:0}.editor-toolbar-divider{width:1px;height:18px;background:#282e39;margin:0 3px}.editor-timeline-toolbar label{font-size:8px;color:#697386}.editor-timeline-toolbar input[type=range]{width:100px;accent-color:var(--editor-purple)}.editor-timeline-toolbar select{height:27px;padding:0 7px;border:1px solid #292f39;border-radius:5px;background:#11151b;color:#909aaa;font-size:8px}
.editor-timeline{position:relative;flex:1;min-height:0;overflow:auto;border:0;border-radius:0;background:#090c11;--track-label-w:112px}.timeline-ruler{position:sticky;top:0;z-index:12;height:24px;border-bottom:1px solid #222832;background:#0c0f14}.timeline-ruler:before{content:"";position:sticky;left:0;display:block;width:112px;height:100%;background:#0c0f14;border-right:1px solid #242a34;z-index:13}.timeline-ruler span{bottom:5px;font-size:7px;color:#657083}.timeline-track{display:grid;grid-template-columns:112px minmax(900px,1fr);min-height:44px;border-bottom:1px solid #1d222b}.timeline-track-label{position:sticky;left:0;z-index:9;background:#0d1015;border-right:1px solid #252b35;display:flex;align-items:center;gap:6px;padding:0 8px;color:#98a2b3}.timeline-track-label b{font-size:9px;color:#abb4c3}.timeline-track-label span{font-size:8px;color:#647083;white-space:nowrap}.timeline-lane{min-height:44px;background-image:linear-gradient(90deg,rgba(255,255,255,.018) 1px,transparent 1px);background-size:50px 100%}.timeline-clip{top:5px;height:34px;border:1px solid #53607a;background:#3d4760;border-radius:5px;padding:5px 7px;box-shadow:inset 0 1px rgba(255,255,255,.07);transition:outline-color .12s,filter .12s}.timeline-clip:hover{filter:brightness(1.1)}.timeline-clip.selected{outline:2px solid #a993ff;outline-offset:1px}.timeline-clip.track-v4,.timeline-clip.track-v3{background:#553682;border-color:#7952af}.timeline-clip.track-v2{background:#2d4f82;border-color:#426da9}.timeline-clip.track-v1{background:#46516d;border-color:#62708f}.timeline-clip.audio-a1,.timeline-clip.audio-a2,.timeline-clip.audio-a3{background:#245347;border-color:#347464}.timeline-clip.missing{background:#151922;border:1px dashed #555f70;color:#7c8697}.timeline-clip b{font-size:8px}.timeline-clip small{font-size:7px;color:#c5ccd6;opacity:.8}.timeline-playhead{width:2px;background:#9a78ff;z-index:15;box-shadow:0 0 0 1px rgba(154,120,255,.15)}.timeline-playhead:before{content:"";position:absolute;top:0;left:-4px;width:10px;height:6px;background:#9a78ff;clip-path:polygon(0 0,100% 0,50% 100%)}.timeline-marker{border-top-color:#e8bc57;z-index:14}

.editor-mobile-stack{display:none}.editor-mobile-nav{display:none}

/* Tablet: keep a real monitor, but use panel tabs and a touch-first shot stack. */
@media(max-width:1024px){
  body.editor-mode{overflow:auto}.editor-shell{grid-template-columns:220px minmax(0,1fr);grid-template-rows:minmax(330px,1fr) 300px;grid-template-areas:"assets center" "timeline timeline"}.editor-inspector{display:none}.editor-center{padding:10px 14px}.editor-monitor-stage{max-height:none}.editor-timeline-panel{display:flex}.editor-project-context>span{max-width:38vw}
}

/* Phone + portrait tablet: purpose-built touch UI, not a squeezed desktop editor. */
@media(max-width:820px){
  body.editor-mode .main{height:100dvh;overflow:auto;padding:0!important}.editor-mode #view-edit.active{height:100dvh;overflow:auto;padding-bottom:66px}.editor-appbar{position:sticky;top:0;height:44px;flex-basis:44px;grid-template-columns:1fr auto;z-index:60}.editor-workspace-nav{display:none}.editor-brandmark{font-size:14px}.editor-projectbar{position:sticky;top:44px;height:auto;min-height:50px;flex-basis:auto;z-index:55;align-items:stretch;padding:6px 8px}.editor-project-context{min-width:0;flex:1;display:grid;gap:2px}.editor-project-context select{height:32px;min-width:0;max-width:100%;width:100%}.editor-project-context>span{max-width:100%;font-size:8px}.editor-project-actions{align-items:center}.editor-project-actions #createRoughCutBtn{display:none}.editor-project-actions button{height:32px;padding:0 8px;font-size:9px}
  .editor-shell{display:block;overflow:visible;min-height:0;background:#090b0f}.editor-assets-panel,.editor-center,.editor-inspector,.editor-timeline-panel{display:none!important;border:0}.editor-view[data-mobile-pane="preview"] .editor-center,.editor-view[data-mobile-pane="shots"] .editor-center{display:flex!important;min-height:calc(100dvh - 160px);justify-content:flex-start;padding:8px}.editor-view[data-mobile-pane="preview"] .editor-mobile-stack{display:none!important}.editor-view[data-mobile-pane="shots"] .editor-monitor{display:none}.editor-view[data-mobile-pane="shots"] .editor-action-dock{display:none}.editor-view[data-mobile-pane="shots"] .editor-mobile-stack{display:block!important;width:100%}.editor-view[data-mobile-pane="media"] .editor-assets-panel{display:flex!important;min-height:calc(100dvh - 160px)}.editor-view[data-mobile-pane="timeline"] .editor-timeline-panel{display:flex!important;height:calc(100dvh - 160px);min-height:420px}.editor-view[data-mobile-pane="inspector"] .editor-inspector{display:block!important;min-height:calc(100dvh - 160px);background:#11151b}
  .editor-monitor{width:100%}.editor-monitor-head{height:28px;padding:0 2px}.editor-monitor-stage{min-height:0;max-height:none;width:100%;aspect-ratio:16/9;border-radius:6px}.editor-transport{height:46px;grid-template-columns:1fr auto}.editor-transport-primary{justify-content:center}.editor-transport-marks{display:none}.editor-transport>span{display:none}.editor-transport button{min-width:40px;width:40px;height:38px}.editor-transport .editor-play-btn{width:46px}.editor-action-dock{width:100%;justify-content:space-around;border-radius:8px;margin-top:4px;box-shadow:none}.editor-action-dock button{flex:1;min-height:36px;padding:0 5px}.editor-action-dock button span{display:none}
  .editor-mobile-stack{border:0;background:transparent;padding:0}.editor-mobile-stack .editor-panel-head{height:44px;padding:0 2px;border-bottom:0}.editor-shot-stack-item{grid-template-columns:96px minmax(0,1fr);gap:10px;padding:9px;border:1px solid #252b35;border-radius:9px;background:#11151b;margin-bottom:8px}.editor-shot-stack-item.selected{border-color:#7663cd;background:#151826}.editor-shot-stack-thumb{width:96px;height:58px}.editor-shot-stack-copy b{font-size:11px}.editor-shot-stack-copy span{font-size:9px}.editor-stack-actions{grid-column:1/-1;display:grid;grid-template-columns:repeat(5,1fr);gap:4px}.editor-stack-actions button{height:36px;padding:0;border-radius:6px;background:#1b2029;border:1px solid #292f3a;font-size:9px}
  .editor-asset-tabs{position:sticky;top:0;background:#11141a;z-index:5}.editor-asset-list{padding-bottom:12px}.editor-asset-row{grid-template-columns:86px minmax(0,1fr);padding:10px}.editor-asset-thumb{width:86px;height:54px}.editor-asset-copy b{font-size:11px}.editor-asset-copy span{font-size:9px}.editor-inspector-body{padding:12px}.assistant-editor-card{margin:6px 12px 18px}.editor-inspector input,.editor-inspector select{height:42px;font-size:13px}.editor-inspector label{font-size:10px}.editor-inspector .secondary,.assistant-analyze-btn{height:42px;font-size:11px}
  .editor-timeline-toolbar{height:42px;overflow-x:auto}.editor-timeline-options select{display:none}.editor-timeline-toolbar input[type=range]{width:84px}.editor-timeline{min-height:0}.timeline-track{grid-template-columns:82px minmax(760px,1fr)}.timeline-track-label{padding:0 5px}.timeline-track-label span{display:none}.timeline-ruler:before{width:82px}.timeline-ruler span{font-size:7px}
  .editor-mobile-nav{position:fixed;left:0;right:0;bottom:0;z-index:100;display:grid;grid-template-columns:repeat(5,1fr);height:58px;padding:4px 5px calc(4px + env(safe-area-inset-bottom,0px));border-top:1px solid #282e38;background:rgba(13,16,21,.97);backdrop-filter:blur(16px)}.editor-mobile-nav button{display:grid;place-items:center;align-content:center;gap:2px;border:0;border-radius:7px;background:transparent;color:#737d8d;font-size:8px}.editor-mobile-nav button span{font-size:15px;line-height:1}.editor-mobile-nav button.active{background:#1d222c;color:#c8c0ff}
}

@media(max-width:520px){
  .editor-appbar-actions .editor-icon-btn{display:none}.editor-project-actions #editorUploadMediaBtn{font-size:0;width:34px;padding:0}.editor-project-actions #editorUploadMediaBtn:after{content:"+";font-size:18px}.editor-center{padding-left:6px!important;padding-right:6px!important}.editor-action-dock button{font-size:8px}.editor-shot-stack-item{grid-template-columns:82px minmax(0,1fr)}.editor-shot-stack-thumb{width:82px;height:50px}.editor-stack-actions{grid-template-columns:repeat(3,1fr)}.editor-stack-actions button:nth-child(1),.editor-stack-actions button:nth-child(2){display:none}
}

/* 3.7.4A.3 — CapCut-style timeline transport + direct edge trimming */
.timeline-clip .timeline-trim-handle{position:absolute;top:0;bottom:0;width:9px;z-index:4;cursor:ew-resize;opacity:0;transition:opacity .12s;background:linear-gradient(90deg,rgba(255,255,255,.16),transparent)}
.timeline-clip .timeline-trim-handle.trim-left{left:0;border-radius:5px 0 0 5px}
.timeline-clip .timeline-trim-handle.trim-right{right:0;transform:scaleX(-1);border-radius:5px 0 0 5px}
.timeline-clip:hover .timeline-trim-handle,.timeline-clip.selected .timeline-trim-handle{opacity:1}
.timeline-clip.selected .timeline-trim-handle{background:linear-gradient(90deg,rgba(185,165,255,.65),transparent)}
.timeline-playhead{cursor:ew-resize}
@media(max-width:900px){.timeline-clip .timeline-trim-handle{width:14px;opacity:.78}}

/* ================================================================
   3.7.4A.5 — Editor Completeness + CapCut-style mobile
   ================================================================ */
.editor-view{--ed-bg:#080b0f;--ed-panel:#10141a;--ed-panel2:#151a22;--ed-line:#262d38;--ed-muted:#7d8797;--ed-text:#e8ecf3;--ed-accent:#9a7bff;--ed-danger:#e36e78;--ed-green:#3eaa79;background:var(--ed-bg);color:var(--ed-text)}
.editor-sequence-tabs{display:flex;align-items:center;gap:2px;padding:3px;border:1px solid var(--ed-line);border-radius:8px;background:#0a0d12}.editor-sequence-tabs button{height:28px;padding:0 12px;border:0;border-radius:6px;background:transparent;color:#7f8999;font-size:10px;font-weight:700}.editor-sequence-tabs button.active{background:#202632;color:#fff;box-shadow:inset 0 0 0 1px #323b48}.editor-review-btn{height:30px;padding:0 12px;border:1px solid #6e5abe;border-radius:7px;background:#2a2145;color:#ded6ff;font-size:10px;font-weight:800}.editor-save-state{font-size:9px;color:#778292;min-width:44px;text-align:right}.editor-save-state[data-state="saving"]{color:#c4ad6f}.editor-save-state[data-state="error"]{color:#e27c83}.editor-save-state[data-state="dirty"]{color:#9c8fcc}.desktop-only{display:initial}
.editor-projectbar{background:#0b0e13;border-color:#202630}.editor-project-context select{background:#11161d;border-color:#2b333f}.editor-shell{background:#080b0f}.editor-panel{background:#0f1319;border-color:#242b35}.editor-center{background:#080b0f}.editor-monitor{background:#0b0e13;border-color:#232a34}.editor-monitor-stage{position:relative;isolation:isolate;overflow:hidden;background:#000}.editor-monitor-stage>video,.editor-monitor-stage>img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;z-index:1}.editor-overlay-stage{position:absolute;inset:0;z-index:3;pointer-events:none;overflow:hidden}.editor-composite-layer{position:absolute;inset:0;transform-origin:center center;pointer-events:none}.editor-composite-layer img,.editor-composite-layer video{width:100%;height:100%;object-fit:contain}.layer-v2{z-index:2}.layer-v3{z-index:3}.layer-v4{z-index:4}.editor-caption-overlay{position:absolute;z-index:8;left:6%;right:6%;text-align:center;color:#fff;line-height:1.14;text-shadow:0 2px 8px #000,0 1px 2px #000;pointer-events:none}.editor-caption-overlay.position-bottom{bottom:8%}.editor-caption-overlay.position-center{top:50%;transform:translateY(-50%)}.editor-caption-overlay.position-top{top:8%}.editor-caption-overlay.bg-box span{display:inline;padding:.08em .28em;border-radius:.18em;background:rgba(0,0,0,.72);box-decoration-break:clone;-webkit-box-decoration-break:clone}.editor-caption-overlay.bg-shadow{filter:drop-shadow(0 4px 7px rgba(0,0,0,.8))}.editor-caption-overlay.anim-fade{animation:captionFade .22s ease}.editor-caption-overlay.anim-pop{animation:captionPop .18s ease}@keyframes captionFade{from{opacity:0}to{opacity:1}}@keyframes captionPop{from{opacity:0;transform:scale(.94)}to{opacity:1;transform:scale(1)}}.mobile-timecode{display:none}
.editor-inspector{overflow:auto}.inspector-title{display:flex;justify-content:space-between;gap:10px;align-items:center;padding-bottom:10px;border-bottom:1px solid var(--ed-line);margin-bottom:10px}.inspector-title span{font-size:9px;padding:3px 6px;border-radius:5px;background:#1b212b;color:#96a0b0}.inspector-timecodes{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin-bottom:10px}.inspector-timecodes span{padding:7px;border:1px solid #242b35;border-radius:6px;background:#0a0e13;font-size:7px;color:#7b8594}.inspector-timecodes b{display:block;margin-top:2px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:8px;color:#d6dbe4}.inspector-switches{display:grid;gap:7px;margin:10px 0}.inspector-switches label{display:flex!important;align-items:center!important;gap:7px!important}.inspector-switches input{width:auto!important;height:auto!important}.inspector-action-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.timeline-track{grid-template-columns:126px minmax(900px,1fr)}.timeline-track-label{justify-content:space-between;place-items:initial;padding:0 6px;gap:4px}.timeline-track-label>div:first-child{display:flex;align-items:center;gap:6px;min-width:0}.timeline-track-label>div:first-child span{overflow:hidden;text-overflow:ellipsis}.timeline-track-controls{display:flex;gap:2px;align-items:center}.timeline-track-controls button{width:20px;height:20px;padding:0;border:0;border-radius:4px;background:transparent;color:#687384;font-size:8px;font-weight:900}.timeline-track-controls button:hover{background:#222833;color:#fff}.timeline-track-controls button.active{background:#3a304e;color:#d9cfff}.timeline-track.track-hidden .timeline-lane,.timeline-track.track-muted .timeline-lane{opacity:.36}.timeline-clip.disabled{opacity:.35;filter:saturate(.25)}.timeline-clip.dragging{z-index:30;opacity:.82;box-shadow:0 8px 22px rgba(0,0,0,.42)}.caption-clip{background:#7b5d2d!important;border-color:#aa8445!important}.audio-waveform{position:absolute;inset:5px 4px;opacity:.24;background:repeating-linear-gradient(90deg,transparent 0 2px,currentColor 2px 3px,transparent 3px 5px);mask-image:linear-gradient(180deg,transparent 0,black 20%,black 80%,transparent 100%)}.editor-drag-hud{position:fixed;z-index:9999;display:grid;gap:2px;padding:7px 9px;border:1px solid #6657a9;border-radius:7px;background:#171426;color:#fff;pointer-events:none;box-shadow:0 8px 30px rgba(0,0,0,.5)}.editor-drag-hud b{font:10px ui-monospace,SFMono-Regular,Consolas,monospace}.editor-drag-hud span{font-size:8px;color:#aaa0d6}.editor-snap-guide{position:absolute;top:24px;bottom:0;width:1px;background:#d8c7ff;z-index:25;pointer-events:none;box-shadow:0 0 8px rgba(188,164,255,.8)}
.editor-mobile-actionbar{display:none}
/* Sheets / drawers */
.editor-sheet{position:fixed;inset:0;z-index:300;background:rgba(4,6,9,.66);backdrop-filter:blur(5px);display:flex;justify-content:flex-end}.editor-sheet.hidden{display:none}.editor-sheet-card{width:min(620px,94vw);height:100%;overflow:auto;background:#10141a;border-left:1px solid #2a313c;padding:18px;box-shadow:-18px 0 50px rgba(0,0,0,.45)}.editor-sheet-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding-bottom:14px;border-bottom:1px solid #282f39}.editor-sheet-head h2{margin:3px 0 5px}.editor-sheet-close{width:34px;height:34px;border:1px solid #2d3541;border-radius:8px;background:#171c24;color:#aab2bf}.editor-sheet-tabs{position:sticky;top:-18px;z-index:4;display:flex;gap:3px;overflow-x:auto;margin:0 -18px 14px;padding:10px 18px;border-bottom:1px solid #282f39;background:#10141a}.editor-sheet-tabs button{white-space:nowrap;border:0;border-radius:6px;padding:8px 10px;background:transparent;color:#778292;font-size:9px}.editor-sheet-tabs button.active{background:#262e3a;color:#fff}.editor-sheet-body{display:grid;gap:10px}.editor-sheet label{display:grid;gap:6px;font-size:9px;color:#8993a2}.editor-sheet input,.editor-sheet textarea,.editor-sheet select{width:100%;border:1px solid #303845;border-radius:8px;background:#0b0f14;color:#fff;padding:10px;font:inherit}.editor-sheet textarea{resize:vertical}.editor-sheet .modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}.compact-sheet-card{height:auto;align-self:flex-end;width:min(520px,100%);border-radius:16px 16px 0 0;border:1px solid #2a313c;border-bottom:0}.mobile-more-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.mobile-more-grid button{min-height:44px;border:1px solid #303845;border-radius:9px;background:#171c24;color:#dce1ea}.mobile-more-grid button.danger{color:#ff9da3;border-color:#563039;background:#28171b}
/* Generate */
.generation-shot-grid{display:grid;gap:8px}.generation-shot-card{display:grid;grid-template-columns:88px minmax(0,1fr);gap:10px;padding:9px;border:1px solid #28303a;border-radius:10px;background:#0b0f14}.generation-shot-thumb{width:88px;height:56px;border-radius:7px;overflow:hidden;background:#05070a;display:grid;place-items:center;color:#788292}.generation-shot-thumb img,.generation-shot-thumb video{width:100%;height:100%;object-fit:cover}.generation-shot-card>div:nth-child(2){display:grid;align-content:center;gap:4px}.generation-shot-card b{font-size:10px}.generation-shot-card span{font-size:8px;color:#7e8998}.generation-card-actions{grid-column:1/-1;display:flex;gap:6px}.generation-card-actions button,.generation-missing-card button,.generation-take-row button{border:1px solid #343e4c;border-radius:7px;background:#1a2029;color:#dfe4ec;padding:7px 9px;font-size:9px}.generation-missing-card,.queue-row{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:10px;border:1px solid #29313c;border-radius:9px;background:#0c1015}.generation-missing-card>div,.queue-row>div{display:grid;gap:3px}.generation-missing-card span,.queue-row span{font-size:8px;color:#818b9a}.queue-row em{font-size:8px;color:#a69bcf;font-style:normal}.generation-take-row{display:grid;grid-template-columns:80px minmax(0,1fr) auto;gap:8px;align-items:center;padding:8px;border-bottom:1px solid #242b35}.generation-take-row video{width:80px;height:48px;object-fit:cover;border-radius:6px;background:#000}.generation-take-row>div{display:grid;gap:2px}.generation-take-row span{font-size:8px;color:#7c8695}.generate-here-card{display:grid;gap:12px}.success-callout{padding:12px;border:1px solid #255942;border-radius:9px;background:#0e261c;color:#8fd7b4}
/* Captions */
.caption-sheet-card{width:min(720px,96vw)}.caption-generator-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:14px 0}.caption-style-row{display:flex;gap:8px;flex-wrap:wrap;align-items:end;margin:10px 0}.caption-style-row label{min-width:120px}.caption-style-row label:first-child{display:flex;align-items:center;gap:6px;min-width:auto}.caption-style-row input[type=checkbox]{width:auto}.caption-actions{display:flex;gap:8px;margin:12px 0}.caption-segments{display:grid;gap:7px;margin-top:14px}.caption-segment{display:grid;grid-template-columns:150px minmax(0,1fr) auto;gap:8px;align-items:center;padding:8px;border:1px solid #29313c;border-radius:9px;background:#0b0f14}.caption-segment-time{display:grid;grid-template-columns:1fr auto 1fr;gap:3px;align-items:center}.caption-segment-time input{padding:7px;font-size:9px}.caption-segment textarea{min-height:48px;padding:7px;font-size:10px}.caption-segment-actions{display:grid;gap:3px}.caption-segment-actions button{border:0;border-radius:5px;background:#1b212b;color:#99a4b3;padding:5px 7px;font-size:8px}
/* AI edited / versions */
.ai-context-chips{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0}.ai-context-chips span{padding:5px 7px;border:1px solid #303746;border-radius:999px;background:#111621;color:#9da7b7;font-size:8px}.ai-editor-changes{margin-top:16px}.ai-edit-summary{padding:11px;border:1px solid #43376a;border-radius:9px;background:#151225}.ai-edit-summary p{margin:5px 0 0;color:#a89fc6;font-size:9px}.ai-change-list{display:grid;gap:5px;margin-top:8px}.ai-change-list>div{display:grid;grid-template-columns:22px 1fr;gap:7px;padding:8px;border:1px solid #29313c;border-radius:8px;background:#0b0f14;font-size:9px}.ai-change-list>div span{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#29203e;color:#c8baff;font-size:8px}.version-group{display:grid;gap:7px;margin-bottom:16px}.version-group h3{margin:0 0 3px;font-size:11px}.version-row{display:flex;width:100%;text-align:left;justify-content:space-between;padding:9px;border:1px solid #29313c;border-radius:8px;background:#0b0f14;color:#dfe4ec}.version-row>div{display:grid;gap:3px}.version-row span{font-size:8px;color:#7e8897}.button-row{cursor:pointer}.button-row:hover{border-color:#4a5668}
/* Review */
.editor-review-sheet{justify-content:center;align-items:center;padding:20px}.review-sheet-card{width:min(980px,96vw);height:auto;max-height:96vh;border:1px solid #2c3440;border-radius:14px;box-shadow:0 25px 90px rgba(0,0,0,.6)}.review-player-stage{position:relative;isolation:isolate;width:min(850px,100%);margin:16px auto 0;aspect-ratio:16/9;background:#000;border:1px solid #2a313a;border-radius:8px;overflow:hidden}.review-player-stage>video,.review-player-stage>img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;z-index:1}.review-transport{display:grid;grid-template-columns:42px auto minmax(100px,1fr) auto;gap:9px;align-items:center;margin:10px auto;width:min(850px,100%)}.review-transport button{height:36px;border:1px solid #343d49;border-radius:7px;background:#181e27;color:#fff}.review-transport span{font:9px ui-monospace,SFMono-Regular,Consolas,monospace;color:#a8b1be}.review-transport input{padding:0}.review-actions{display:flex;justify-content:center;gap:7px;flex-wrap:wrap}.review-notes-list{display:grid;gap:5px;width:min(850px,100%);margin:12px auto}.review-notes-list button{display:grid;grid-template-columns:80px 1fr;gap:8px;text-align:left;padding:8px;border:1px solid #29313c;border-radius:7px;background:#0b0f14;color:#dce2ea}.review-notes-list button b{font:9px ui-monospace,SFMono-Regular,Consolas,monospace;color:#cbbcff}.review-notes-list button span{font-size:9px}.review-footer{display:flex;justify-content:flex-end;gap:8px;width:min(850px,100%);margin:12px auto 0}

/* Tablet */
@media (min-width:768px) and (max-width:1100px){.editor-shell{grid-template-columns:190px minmax(0,1fr);grid-template-rows:minmax(360px,1fr) 320px;grid-template-areas:"assets center" "timeline timeline"}.editor-inspector{display:none}.editor-sequence-tabs button{padding:0 8px}.editor-timeline{touch-action:pan-x pan-y}.editor-sheet-card{width:min(560px,76vw)}}

/* Phone: CapCut-style preview + fixed playhead timeline + contextual bottom tools */
@media(max-width:767px){
  body.editor-mode{background:#07090d;overflow:hidden}.desktop-only{display:none!important}.editor-mode #view-edit.active{height:100dvh;overflow:hidden;padding:0 0 calc(108px + env(safe-area-inset-bottom,0px))!important;display:flex;flex-direction:column}.editor-appbar{position:relative;top:auto;display:grid;grid-template-columns:auto 1fr auto;height:44px;flex:0 0 44px;padding:0 8px;background:#090c10;border-bottom:1px solid #1d232b}.editor-brandmark span{display:none}.editor-brandmark b{font-size:13px}.editor-sequence-tabs{justify-self:center;max-width:48vw;border:0;background:transparent;padding:0}.editor-sequence-tabs button{display:none}.editor-sequence-tabs button.active{display:block;background:#171c24;height:30px;padding:0 10px;max-width:46vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.editor-appbar-actions{gap:5px}.editor-review-btn{width:34px;height:30px;padding:0;font-size:0}.editor-review-btn:after{content:'✓';font-size:14px}.editor-save-state{font-size:7px;min-width:34px}.editor-projectbar{position:relative;top:auto;display:block;flex:0 0 auto;min-height:38px;padding:4px 7px;background:#0a0d11;border-bottom:1px solid #1d232b}.editor-project-context{display:grid;grid-template-columns:minmax(0,1fr);gap:0}.editor-project-context select{height:30px;border:0;background:#0f1318;padding:0 7px;font-size:9px}.editor-project-context>span{display:none}.editor-shell{display:flex!important;flex-direction:column;flex:1;min-height:0;overflow:hidden}.editor-assets-panel,.editor-inspector{display:none!important}.editor-center{display:flex!important;flex:0 0 auto;padding:0!important;background:#05070a;gap:0}.editor-monitor{width:100%;border:0;border-radius:0;background:#000}.editor-monitor-stage{width:100%;aspect-ratio:16/9;max-height:32dvh;border-radius:0}.mobile-timecode{display:block;position:absolute;right:8px;bottom:6px;z-index:20;padding:3px 5px;border-radius:4px;background:rgba(0,0,0,.62);font:8px ui-monospace,SFMono-Regular,Consolas,monospace;color:#ddd}.editor-transport{height:38px;grid-template-columns:1fr;background:#090c10;border-top:1px solid #171c22}.editor-transport-primary{justify-content:center;gap:22px}.editor-transport button{width:34px!important;height:32px!important;min-width:34px!important;border:0;background:transparent}.editor-transport .editor-play-btn{font-size:15px}.editor-mobile-stack,.editor-action-dock{display:none!important}.editor-timeline-panel{display:flex!important;flex:1;min-height:0;height:auto;padding:0;border:0;background:#090c11;overflow:hidden}.editor-timeline{flex:1;min-height:0;border:0;border-radius:0;touch-action:pan-x pan-y;overscroll-behavior:contain;scrollbar-width:none}.editor-timeline::-webkit-scrollbar{display:none}.timeline-ruler{height:20px}.timeline-ruler:before{width:48px}.timeline-track{grid-template-columns:48px minmax(760px,1fr);min-height:40px}.timeline-track-label{padding:0 2px;display:grid;place-items:center}.timeline-track-label>div:first-child{display:grid;place-items:center;gap:0}.timeline-track-label>div:first-child span{display:none}.timeline-track-label b{font-size:8px}.timeline-track-controls{display:none}.timeline-lane{min-height:40px}.timeline-clip{top:4px;height:32px;padding:4px 6px;border-radius:4px;touch-action:none}.timeline-clip b{font-size:7px}.timeline-clip small{font-size:6px}.timeline-clip .timeline-trim-handle{width:16px;opacity:.75}.timeline-playhead{position:absolute!important;width:2px;background:#fff!important;box-shadow:0 0 0 1px rgba(0,0,0,.5);z-index:50}.timeline-playhead:before{background:#fff}.timeline-marker{z-index:48}.editor-mobile-actionbar{position:fixed;left:0;right:0;bottom:58px;z-index:102;display:grid;grid-template-columns:repeat(5,1fr);height:50px;border-top:1px solid #20262e;background:#0b0e13;padding:3px 4px}.editor-mobile-actionbar button{display:grid;place-items:center;align-content:center;gap:1px;border:0;border-radius:6px;background:transparent;color:#b3bbc8;font-size:14px}.editor-mobile-actionbar button span{font-size:7px;color:#737e8e}.editor-mobile-actionbar button:active{background:#1b212a}.editor-mobile-nav{height:58px;z-index:103;background:#080b0f}.editor-view[data-mobile-pane="media"] .editor-assets-panel{position:fixed!important;display:flex!important;inset:82px 0 108px 0;z-index:90;background:#0e1218;padding:10px;overflow:auto}.editor-view[data-mobile-pane="media"] .editor-center,.editor-view[data-mobile-pane="media"] .editor-timeline-panel{visibility:hidden}.editor-assets-panel .editor-asset-list{max-height:none;grid-template-columns:1fr}.editor-asset-row{grid-template-columns:90px minmax(0,1fr);padding:8px}.editor-asset-thumb{width:90px;height:56px}.editor-sheet{align-items:flex-end;background:rgba(0,0,0,.5)}.editor-sheet-card{width:100%;height:min(78dvh,720px);border:1px solid #2a313c;border-bottom:0;border-radius:16px 16px 0 0;padding:14px 12px calc(16px + env(safe-area-inset-bottom,0px));box-shadow:0 -18px 50px rgba(0,0,0,.5)}.editor-sheet-head{padding-bottom:10px}.editor-sheet-head h2{font-size:17px}.editor-sheet-tabs{top:-14px;margin:0 -12px 10px;padding:8px 12px}.caption-generator-grid{grid-template-columns:1fr 1fr}.caption-segment{grid-template-columns:1fr;gap:6px}.caption-segment-time{width:170px}.caption-segment-actions{display:flex}.caption-style-row{display:grid;grid-template-columns:1fr 1fr}.review-sheet-card{height:100dvh;max-height:none;border-radius:0;padding-top:calc(10px + env(safe-area-inset-top,0px))}.editor-review-sheet{padding:0}.review-player-stage{margin-top:10px;border-radius:5px}.review-transport{grid-template-columns:38px 62px 1fr 62px;gap:5px}.review-actions{display:grid;grid-template-columns:1fr 1fr}.review-actions button:first-child{grid-column:1/-1}.review-footer{position:sticky;bottom:0;background:#10141a;padding-top:8px}.generation-shot-card{grid-template-columns:76px minmax(0,1fr)}.generation-shot-thumb{width:76px;height:48px}.mobile-more-grid{grid-template-columns:1fr 1fr}
}
@media (min-width:768px) and (max-width:820px){
  .editor-mode #view-edit.active{height:100dvh;overflow:hidden;padding-bottom:0!important;display:flex;flex-direction:column}
  .editor-appbar{position:relative;top:auto}.editor-projectbar{position:relative;top:auto}
  .editor-shell{display:grid!important;overflow:hidden!important}.editor-assets-panel{display:flex!important}.editor-center{display:flex!important}.editor-timeline-panel{display:flex!important}.editor-inspector{display:none!important}
  .editor-mobile-nav{display:none!important}.editor-mobile-actionbar{display:none!important}
}

/* 3.7.4A.5 finishing pass — audio trim, mobile inspector and touch precision */
.mobile-more-section{display:grid;gap:8px;padding:8px 0;border-bottom:1px solid #242a34}.mobile-more-section:last-child{border-bottom:0}.mobile-more-section>b{font-size:10px;color:#d9dfe8}.mobile-more-fields{display:grid;gap:8px}.mobile-more-fields label{display:grid;grid-template-columns:1fr minmax(90px,1.4fr) auto;align-items:center;gap:8px;font-size:9px;color:#8f9aaa}.mobile-more-fields input[type="number"]{width:100%;min-width:0}.mobile-more-fields input[type="range"]{width:100%;min-width:0}.mobile-more-fields span{font:8px ui-monospace,SFMono-Regular,Consolas,monospace;color:#b8c0cd;min-width:42px;text-align:right}.timeline-clip[class*="audio-"] .timeline-trim-handle{opacity:.28}.timeline-clip[class*="audio-"].selected .timeline-trim-handle,.timeline-clip[class*="audio-"]:hover .timeline-trim-handle{opacity:.8}
@media(max-width:767px){
  .editor-view[data-mobile-pane="inspector"] .editor-inspector{position:fixed!important;display:block!important;inset:82px 0 108px 0;z-index:91;overflow:auto;background:#0e1218;border:0;padding:12px}
  .editor-view[data-mobile-pane="inspector"] .editor-center,.editor-view[data-mobile-pane="inspector"] .editor-timeline-panel{visibility:hidden}
  .editor-view[data-mobile-pane="inspector"] .editor-inspector .assistant-editor-card{display:none}
  .mobile-more-fields label{grid-template-columns:82px minmax(0,1fr) auto}
  .timeline-clip[class*="audio-"] .timeline-trim-handle{width:18px;opacity:.72}
  .timeline-lane{touch-action:pan-x}
  .timeline-clip{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
}

/* 3.7.4A.5 — Timeline + QC workflow fixes */
.editor-back-dashboard,.qc-back-btn{height:28px;padding:0 9px;border:1px solid #2b323d;border-radius:6px;background:#11161d;color:#c3cad5;font-size:9px;white-space:nowrap}.editor-back-dashboard:hover,.qc-back-btn:hover{background:#1a2029;color:#fff}.editor-appbar-left{display:flex;align-items:center;gap:8px}.linked-av-note{margin:8px 0;padding:8px 9px;border:1px solid #2d5a50;border-radius:7px;background:rgba(36,83,71,.18);font-size:9px;line-height:1.35;color:#9cc9bd}.timeline-clip.audio-a4{background:#5b3f2b;border-color:#815d3e}.timeline-lane.drop-target{outline:1px solid #9f88ff;outline-offset:-1px;background-color:rgba(124,92,255,.06)}.editor-asset-row[draggable="true"]{cursor:grab}.editor-asset-row.dragging{opacity:.48;cursor:grabbing}.actionable-suggestion{position:relative}.suggestion-actions{display:flex;gap:5px;margin-top:7px;flex-wrap:wrap}.suggestion-actions button{height:25px;padding:0 8px;border:1px solid #303846;border-radius:5px;background:#171c24;color:#bbc4d1;font-size:8px}.suggestion-actions button.primary{background:#6650d5;border-color:#806bf0;color:white}.ai-editor-plan{margin-top:12px;border:1px solid #343c4a;border-radius:10px;background:#0d1117;padding:11px}.ai-plan-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.ai-plan-head h3{margin:2px 0 4px;font-size:14px}.ai-plan-head p{margin:0;font-size:9px;color:#909baa;line-height:1.45}.ai-change-list{display:grid;gap:5px;margin-top:10px}.ai-change-list>div{display:grid;grid-template-columns:20px 1fr;gap:7px;align-items:start;padding:7px;border:1px solid #252c36;border-radius:6px;background:#11161d;font-size:9px}.ai-change-list>div>span:first-child{display:grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#302856;color:#d7cdff;font-size:8px}

/* Dedicated Frame.io-style QC workspace. */
body:has(#view-review.active){overflow:hidden;background:#080a0e}.qc-view.active{position:fixed;inset:0;z-index:120;background:#080a0e;padding:0!important;display:flex!important;flex-direction:column;max-width:none!important;margin:0!important}.qc-topbar{height:48px;flex:0 0 48px;display:flex;align-items:center;justify-content:space-between;padding:0 12px;border-bottom:1px solid #242a34;background:#0d1016}.qc-topbar-left{display:flex;align-items:center;gap:10px}.qc-topbar-left>div{display:grid;gap:1px}.qc-topbar-left .eyebrow{font-size:7px}.qc-topbar-left b{font-size:11px}.qc-topbar-actions{display:flex;gap:6px}.qc-topbar-actions button{height:28px;font-size:8px}.qc-shell{display:grid;grid-template-columns:210px minmax(0,1fr) 330px;flex:1;min-height:0;background:#080a0e}.qc-queue-panel,.qc-comments-panel{min-height:0;background:#10141a}.qc-queue-panel{border-right:1px solid #252b35;display:flex;flex-direction:column}.qc-comments-panel{border-left:1px solid #252b35;display:flex;flex-direction:column}.qc-panel-head,.qc-comments-head{height:50px;flex:0 0 50px;display:flex;align-items:center;justify-content:space-between;padding:0 11px;border-bottom:1px solid #252b35}.qc-panel-head>*,.qc-comments-head>div{display:grid;gap:2px}.qc-panel-head b,.qc-comments-head b{font-size:10px}.qc-panel-head small,.qc-comments-head small{font-size:8px;color:#748093}.qc-review-list{overflow:auto;padding:6px;display:grid;align-content:start;gap:5px}.qc-queue-item{display:grid;gap:5px;width:100%;padding:9px;text-align:left;border:1px solid transparent;border-radius:7px;background:#12171e;color:#c9d0db}.qc-queue-item:hover{background:#171d25}.qc-queue-item.active{border-color:#725ff0;background:#19172a}.qc-queue-item>div{display:grid;gap:2px}.qc-queue-item b{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.qc-queue-item span,.qc-queue-item small{font-size:7px;color:#7f8999}.qc-empty-list{padding:16px 9px;display:grid;gap:4px;color:#7e899a}.qc-empty-list b{font-size:10px}.qc-empty-list span{font-size:8px}.qc-player-column{min-width:0;min-height:0;display:flex;flex-direction:column;justify-content:center;overflow:auto;background:#05070a}.qc-empty-state{margin:auto;display:grid;place-items:center;gap:6px;color:#697483;text-align:center}.qc-empty-icon{display:grid;place-items:center;width:54px;height:54px;border-radius:50%;background:#12171e;color:#7664e5}.qc-empty-state h2{font-size:16px;margin:0}.qc-empty-state p{font-size:9px;margin:0}.qc-review-workspace{display:flex;flex-direction:column;min-height:100%;padding:10px 14px}.qc-review-titlebar{display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:42px}.qc-review-titlebar h2{font-size:13px;margin:1px 0 0}.qc-review-titlebar .status-pill{text-transform:capitalize}.qc-player-stage{width:min(1080px,100%);max-height:calc(100dvh - 190px);margin:auto;aspect-ratio:16/9;border-radius:4px;background:#000;border:1px solid #1f252d}.review-annotation-canvas{position:absolute;inset:0;z-index:30;width:100%;height:100%;pointer-events:none}.review-annotation-canvas.drawing{pointer-events:auto;cursor:crosshair}.qc-transport{width:min(1080px,100%);margin:8px auto 0;display:grid;grid-template-columns:38px 68px minmax(120px,1fr) 68px auto auto;gap:6px;align-items:center}.qc-transport button{height:30px;padding:0 8px}.qc-transport span{font:8px ui-monospace,SFMono-Regular,Consolas,monospace;color:#939eac;white-space:nowrap}.qc-transport input[type=range]{width:100%;accent-color:#745cff}.qc-review-footer{display:flex;justify-content:flex-end;gap:7px;width:min(1080px,100%);margin:10px auto 0;padding-bottom:2px}.qc-review-footer button{height:34px;padding:0 13px}.qc-notes-list{flex:1;min-height:0;overflow:auto;margin:0!important;width:auto!important;padding:8px;display:grid;align-content:start;gap:7px}.qc-comment-card{display:grid;grid-template-columns:66px minmax(0,1fr);gap:7px;padding:9px;border:1px solid #282f39;border-radius:8px;background:#12171e}.qc-comment-card.resolved{opacity:.55}.qc-comment-timecode{height:25px;padding:0 6px;border:0;border-radius:5px;background:#25213d;color:#cfc5ff;font:8px ui-monospace,SFMono-Regular,Consolas,monospace}.qc-comment-body{min-width:0;display:grid;gap:6px}.qc-comment-body p{margin:0;font-size:9px;line-height:1.45;color:#d2d8e1;white-space:pre-wrap}.qc-comment-body small{font-size:7px;color:#7d8796}.qc-annotation-badge{width:max-content;padding:2px 5px;border-radius:4px;background:#2a2540;color:#bfb2ef;font-size:7px}.qc-comment-actions{display:flex;flex-wrap:wrap;gap:4px}.qc-comment-actions button{height:24px;padding:0 7px;border:1px solid #313946;border-radius:5px;background:#181e26;color:#aeb7c4;font-size:7px}.qc-comment-actions button:hover{border-color:#6958c7;color:#fff}.qc-no-comments{display:grid;place-items:center;gap:5px;margin:auto;padding:30px 10px;text-align:center;color:#6f7988}.qc-no-comments b{font-size:10px}.qc-no-comments span{font-size:8px}.qc-comment-composer{flex:0 0 auto;border-top:1px solid #282f39;background:#0d1117;padding:9px}.qc-comment-time{display:flex;align-items:center;gap:7px;margin-bottom:6px}.qc-comment-time span:first-child{padding:3px 5px;border-radius:4px;background:#2b2612;color:#e2c64e;font:8px ui-monospace,SFMono-Regular,Consolas,monospace}.qc-comment-time span:last-child{font-size:8px;color:#7d8795}.qc-comment-composer textarea{width:100%;min-height:60px;resize:vertical;border:1px solid #303846;border-radius:7px;background:#11161d;color:#e5e9ef;padding:8px;font-size:9px;line-height:1.4}.qc-composer-actions{display:flex;justify-content:flex-end;gap:5px;margin-top:6px}.qc-composer-actions button{height:29px;padding:0 9px;font-size:8px}.qc-annotation-tools{display:flex;align-items:center;gap:5px;margin-top:6px;padding:6px;border-radius:6px;background:#171c24}.qc-annotation-tools button{height:25px}.qc-annotation-tools span{font-size:7px;color:#8d97a5}

@media(max-width:1100px){.qc-shell{grid-template-columns:170px minmax(0,1fr) 280px}.qc-player-stage{max-height:calc(100dvh - 210px)}}
@media(max-width:820px){body:has(#view-review.active){overflow:auto}.qc-view.active{position:fixed;overflow:hidden}.qc-topbar{height:44px;flex-basis:44px;padding:0 7px}.qc-topbar-left .eyebrow{display:none}.qc-back-btn{font-size:0;width:32px;padding:0}.qc-back-btn:before{content:'←';font-size:15px}.qc-shell{display:flex;flex-direction:column;overflow:hidden}.qc-queue-panel{display:none}.qc-player-column{flex:0 0 auto;overflow:visible}.qc-review-workspace{min-height:0;padding:6px}.qc-review-titlebar{min-height:34px}.qc-review-titlebar h2{font-size:11px}.qc-player-stage{width:100%;max-height:none;margin:0;aspect-ratio:16/9}.qc-transport{grid-template-columns:36px 54px minmax(80px,1fr) 54px;margin-top:5px}.qc-transport #qcPrevCommentBtn,.qc-transport #qcNextCommentBtn{display:none}.qc-review-footer{margin-top:6px}.qc-review-footer button{flex:1}.qc-comments-panel{flex:1;min-height:0;border-left:0;border-top:1px solid #252b35}.qc-comments-head{height:38px;flex-basis:38px}.qc-notes-list{padding:6px}.qc-comment-card{grid-template-columns:58px minmax(0,1fr);padding:7px}.qc-comment-composer{padding:7px calc(7px + env(safe-area-inset-right,0px)) calc(7px + env(safe-area-inset-bottom,0px))}.qc-comment-composer textarea{min-height:46px}.qc-composer-actions{display:grid;grid-template-columns:auto auto 1fr}.qc-composer-actions .primary{width:100%}.editor-back-dashboard{width:30px;font-size:0;padding:0}.editor-back-dashboard:before{content:'←';font-size:14px}.editor-appbar-left{gap:5px}.linked-av-note{font-size:8px}}

/* 3.7.4A.5.1 — editor load safety */
.editor-load-error{margin:8px 10px;padding:9px 11px;border:1px solid #6d3b46;border-radius:7px;background:#28151a;color:#ffd7de;display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:9px}.editor-load-error.hidden{display:none}.editor-load-error>div{display:grid;gap:2px}.editor-load-error b{font-size:10px}.editor-load-error span{color:#d9aab4}.editor-load-error button{height:27px;padding:0 10px;border:1px solid #82505b;border-radius:5px;background:#3a2027;color:#fff;font-size:8px}.editor-view.active>.editor-load-error{position:relative;z-index:8}

/* A.5.2 hotfix: desktop playhead is directly draggable; mobile keeps the fixed-center playhead model. */
.timeline-playhead.draggable{pointer-events:auto;cursor:ew-resize;touch-action:none}
.timeline-playhead.draggable::after{content:"";position:absolute;top:0;bottom:0;left:-7px;width:16px;cursor:ew-resize}
@media (max-width:767px){.timeline-playhead{pointer-events:none!important}.timeline-playhead.draggable::after{display:none}}


/* A5.2.1: batch-select Assistant Editor suggestions before creating one AI edit plan. */
.suggestion-select-list{display:grid;gap:6px}
.selectable-suggestion{display:grid!important;grid-template-columns:18px 1fr;gap:8px;align-items:start;cursor:pointer;transition:border-color .12s ease,background .12s ease}
.selectable-suggestion input{margin:2px 0 0;accent-color:#806bf0}
.selectable-suggestion>span{display:grid;gap:3px}
.selectable-suggestion.selected{border-color:#806bf0;background:rgba(124,92,255,.10)}
.suggestion-batch-actions{display:flex;align-items:center;gap:8px;margin-top:8px}
.suggestion-batch-actions .primary{height:29px;padding:0 10px;border:1px solid #806bf0;border-radius:6px;background:#6650d5;color:#fff;font-size:8px;font-weight:700}
.suggestion-batch-actions .primary:disabled{opacity:.42;cursor:not-allowed}
.suggestion-batch-actions small{color:#7f8999}


/* ================================================================
   3.7.4A.5.2.2 — Adaptive Mobile Editor pass
   Stable A5.2.1 baseline; mobile presentation only.
   ================================================================ */
.editor-mobile-top-more{display:none}
@media(max-width:767px){
  body.editor-mode{padding-top:env(safe-area-inset-top,0px)!important}
  body.editor-mode .main{height:100dvh!important;min-height:100dvh!important;overflow:hidden!important}
  .editor-mode #view-edit.active{height:100dvh!important;padding-bottom:calc(108px + env(safe-area-inset-bottom,0px))!important;overflow:hidden!important}

  .editor-appbar{height:46px!important;flex:0 0 46px!important;grid-template-columns:auto minmax(0,1fr) auto!important;padding:0 8px!important;padding-left:max(8px,env(safe-area-inset-left,0px))!important;padding-right:max(8px,env(safe-area-inset-right,0px))!important}
  .editor-appbar-left{min-width:34px;gap:0!important}
  .editor-brandmark{display:none!important}
  .editor-back-dashboard{width:34px!important;height:34px!important;border:0!important;background:transparent!important}
  .editor-sequence-tabs{justify-self:center!important;max-width:42vw!important}
  .editor-sequence-tabs button{display:none!important}
  .editor-sequence-tabs button.active{display:block!important;height:32px!important;max-width:42vw!important;padding:0 12px!important;font-size:10px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .editor-appbar-actions{justify-self:end;gap:7px!important}
  .editor-save-state{font-size:7px!important;min-width:30px!important}
  .editor-review-btn,.editor-appbar-actions .desktop-only{display:none!important}
  .editor-mobile-top-more{display:grid!important;place-items:center;width:34px;height:34px;padding:0;border:0;border-radius:8px;background:transparent;color:#c9d0da;font-size:16px;letter-spacing:1px}
  .editor-mobile-top-more:active{background:#1a2028}

  .editor-projectbar{min-height:40px!important;height:40px!important;flex:0 0 40px!important;padding:4px 8px!important}
  .editor-project-context select{height:32px!important;font-size:12px!important;font-weight:700!important;padding:0 10px!important;border:1px solid #242b35!important;border-radius:8px!important;background:#0e1217!important}
  .editor-project-context>span,.editor-project-actions{display:none!important}

  .editor-center{flex:0 0 auto!important;min-height:0!important;max-height:46dvh!important;overflow:hidden!important}
  .editor-monitor{display:flex!important;flex-direction:column!important;width:100%!important;padding:0!important}
  .editor-monitor-stage{width:100%!important;height:auto!important;min-height:0!important;max-height:36dvh!important;border-left:0!important;border-right:0!important;border-radius:0!important}
  .editor-monitor-stage[data-aspect-ratio="9:16"],.editor-monitor-stage[data-aspect-ratio="9 / 16"]{max-height:38dvh!important;width:auto!important;align-self:center!important;max-width:100%!important}
  .editor-transport{height:40px!important;flex:0 0 40px!important;margin:0!important;border-bottom:1px solid #171c23!important}
  .editor-transport-primary{gap:28px!important}

  .editor-shell{height:calc(100dvh - 86px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))!important;min-height:0!important;overflow:hidden!important}
  .editor-timeline-panel{flex:1 1 auto!important;min-height:170px!important;overflow:hidden!important}
  .editor-timeline{height:100%!important;min-height:0!important;overflow:auto!important}
  .timeline-ruler{height:22px!important}
  .timeline-ruler:before{width:42px!important}
  .timeline-track{grid-template-columns:42px minmax(760px,1fr)!important;min-height:42px!important;transition:min-height .12s ease}
  .timeline-track-label{padding:0!important;min-width:42px!important}
  .timeline-track-label b{font-size:8px!important}
  .timeline-lane{min-height:42px!important}
  .timeline-clip{top:4px!important;height:34px!important;padding:4px 7px!important}
  .timeline-track.track-empty{min-height:18px!important}
  .timeline-track.track-empty .timeline-lane{min-height:18px!important}
  .timeline-track.track-empty .timeline-track-label{opacity:.48!important}
  .timeline-track.track-empty .timeline-track-label b{font-size:7px!important}

  .editor-mobile-actionbar{bottom:calc(58px + env(safe-area-inset-bottom,0px))!important;height:50px!important;padding:3px 4px!important}
  .editor-mobile-nav{height:58px!important;padding-bottom:calc(4px + env(safe-area-inset-bottom,0px))!important}
  .editor-mobile-nav button{font-size:7px!important;min-width:0!important}
  .editor-mobile-nav button span{font-size:14px!important}
  .editor-mobile-nav button:last-child{font-size:6.5px!important}

  .editor-mobile-top-sheet-card{height:auto!important;max-height:72dvh!important}
  .editor-mobile-top-menu{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:4px 0 2px}
  .editor-mobile-top-menu button{height:44px;border:1px solid #29313c;border-radius:9px;background:#151a22;color:#d6dce5;font-size:10px;font-weight:700}
  .editor-mobile-top-menu button:first-child,.editor-mobile-top-menu button:last-child{grid-column:1/-1}
  .editor-mobile-top-menu button.primary{background:#6954db;border-color:#826ef0;color:#fff}

  .editor-view[data-mobile-pane="media"] .editor-assets-panel{inset:86px 0 calc(108px + env(safe-area-inset-bottom,0px)) 0!important}
  .editor-sheet-card{padding-left:max(12px,env(safe-area-inset-left,0px))!important;padding-right:max(12px,env(safe-area-inset-right,0px))!important}
}

@media(max-width:430px){
  .editor-sequence-tabs{max-width:36vw!important}.editor-sequence-tabs button.active{max-width:36vw!important;padding:0 9px!important}
  .editor-save-state{display:none!important}
  .editor-monitor-stage{max-height:32dvh!important}
  .timeline-track{grid-template-columns:38px minmax(720px,1fr)!important}.timeline-ruler:before{width:38px!important}.timeline-track-label{min-width:38px!important}
  .editor-mobile-actionbar button span,.editor-mobile-nav button{font-size:6.5px!important}
}

@media(min-width:768px) and (max-width:1024px) and (orientation:portrait){
  .editor-monitor-stage{max-height:34dvh}
  .editor-timeline-panel{min-height:300px}
}

@media(min-width:768px) and (max-width:1180px) and (orientation:landscape){
  .editor-shell{grid-template-columns:200px minmax(0,1fr);grid-template-rows:minmax(260px,1fr) minmax(260px,38vh);grid-template-areas:"assets center" "timeline timeline"}
  .editor-assets-panel{display:flex!important}.editor-center{display:flex!important}.editor-timeline-panel{display:flex!important}.editor-inspector{display:none!important}
  .editor-monitor-stage{max-height:42vh}
}

/* ================================================================
   3.7.4A.5.2.4 — Subtle ARTISTHREEHUB branding
   Branding only. No editor/auth/Firestore behavior changes.
   ================================================================ */
.logo-wordmark{margin:2px 10px 28px;display:flex;align-items:center;height:26px}
.logo-wordmark img{display:block;width:132px;max-width:100%;height:auto;object-fit:contain}
.editor-brandmark{height:26px;display:flex;align-items:center}
.editor-brandmark img{display:block;width:124px;height:auto;object-fit:contain}
@media(max-width:1000px) and (min-width:721px){
  .logo-wordmark img{width:112px}
  .editor-brandmark img{width:108px}
}
@media(max-width:720px){
  /* Keep phone header uncluttered; the wordmark remains desktop/tablet upper-left only. */
  .sidebar .logo-wordmark{display:none!important}
}
