/* Setara producer app — shared structural base (Frame.io V4 direction).
   Colours come from the design-system tokens; this sheet never defines its own palette.
   It is also loaded standalone by the producer review room fixture, so it must not
   restyle bare controls (design-system.css owns those at :where() specificity) and must
   not add document-level height or overflow. Shared classes consumed by other modules:
   .panel .notice .badge .field .field-note .actions .details .error-text .check-label
   .two-fields .sr-only .events .brand .primary .danger .text-button. */
:root {
  color-scheme: dark;
  font-family: var(--ds-font, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  font-size: 13px;
  line-height: 1.45;
  --bg: var(--ds-bg, #0f0f12);
  --panel: var(--ds-bg-elevated, #141417);
  --raised: var(--ds-control, #1c1c21);
  --line: var(--ds-border, rgba(255,255,255,.08));
  --muted: var(--ds-muted, #a1a1aa);
  --accent: var(--ds-accent-text, var(--ds-accent-text));
  --error: var(--ds-danger-text, #f87171);
  --amber: var(--ds-warning-text, #fbbf24);
  color: var(--ds-fg, #f4f4f6);
  background: var(--ds-bg, #0f0f12);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { touch-action: manipulation; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
h2 { font-size: 15px; font-weight: 600; letter-spacing: -.005em; line-height: 1.3; }
h3 { font-size: 13px; font-weight: 600; line-height: 1.4; }
p { color: var(--ds-muted); }
small, .meta { font-size: 12px; color: var(--ds-muted); }
label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 500; color: var(--ds-muted); }
/* Form controls fill their field by default. Zero specificity (:where) so any module class rule that sets a width wins;
   the chained :not() selector alone would otherwise weigh (0,4,1) and silently override toolbar controls. */
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]), select, textarea) { width: 100%; }
textarea { resize: none; min-height: 96px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 12px; z-index: 100; padding: 8px 12px; border-radius: 6px; background: var(--ds-bg-elevated); border: var(--ds-hair) solid var(--ds-border); color: var(--ds-fg); }
.skip-link:focus { top: 12px; }
.boot { padding: 48px; color: var(--ds-muted); font-size: 13px; }
[hidden] { display: none !important; }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; font-size: 15px; font-weight: 650; letter-spacing: -.02em; line-height: 1; }
.brand:hover { text-decoration: none; }
.brand span:last-child small { display: block; margin-top: 3px; font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ds-subtle); }

/* Surfaces */
.panel { padding: 18px; background: var(--ds-surface); border: var(--ds-hair) solid var(--ds-border); border-radius: var(--ds-radius); box-shadow: var(--ds-shadow-card); }
.panel + .panel { margin-top: 12px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-heading > div { min-width: 0; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.eyebrow { margin-bottom: 8px; font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ds-subtle); }
.side-note { margin-top: 14px; font-size: 12px; line-height: 1.6; }

/* Badges (legacy class names kept for the modules that render them) */
.badge { display: inline-flex; align-items: center; gap: 5px; min-height: 20px; padding: 0 7px; border: var(--ds-hair) solid var(--ds-border); border-radius: var(--ds-radius-pill); background: var(--ds-surface-active); color: var(--ds-muted); font-size: 11px; font-weight: 500; line-height: 1.4; white-space: nowrap; }
.badge.live { color: var(--ds-success-text); background: var(--ds-success-soft); border-color: rgba(4,12,90,.3); }
.badge.simulation { color: var(--ds-warning-text); background: var(--ds-warning-soft); border-color: rgba(4,12,90,.3); }
.badge.muted { color: var(--ds-muted); }
.badge.job-attention { color: var(--ds-warning-text); background: var(--ds-warning-soft); border-color: rgba(4,12,90,.3); }

/* Notices: neutral banner with a coloured leading bar; amber only for warnings */
.notice { position: relative; margin-bottom: 12px; padding: 10px 12px 10px 16px; border: var(--ds-hair) solid var(--ds-border); border-radius: var(--ds-radius-control); background: var(--ds-surface); color: var(--ds-fg); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.notice::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 3px; border-radius: 6px 0 0 6px; background: var(--ds-warning); }
.notice p { color: var(--ds-muted); }
.notice strong { display: block; margin-bottom: 2px; font-weight: 600; }
.notice .actions { margin-top: 10px; }
.notice.info::before { background: var(--ds-accent); }
.notice.error::before { background: var(--ds-danger); }
.notice.error { border-color: rgba(4,12,90,.3); }
.notice.simulation { color: var(--ds-muted); }
.notice.simulation strong { color: var(--ds-warning-text); }
.error-text { margin: 8px 0; color: var(--ds-danger-text); font-size: 12px; line-height: 1.6; }
.error-text:empty { display: none; }
.connection { min-height: 0; font-size: 12px; color: var(--ds-warning-text); }
.connection:empty { display: none; }

/* Forms */
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field-note { margin-top: 6px; font-size: 12px; line-height: 1.6; color: var(--ds-muted); }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check-label { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-size: 13px; font-weight: 400; line-height: 1.55; color: var(--ds-fg); cursor: pointer; }
.check-label input { margin-top: 3px; }
.budget-amount { display: flex; align-items: center; gap: 8px; }
.budget-amount > span { font-size: 15px; color: var(--ds-muted); }
.budget-amount input { font-size: 16px; font-variant-numeric: tabular-nums; }
.start-row { display: grid; gap: 8px; margin-top: 16px; }
.start-row button { width: 100%; min-height: 34px; font-size: 13px; }
.start-row p { text-align: center; font-size: 12px; line-height: 1.6; }
.upload-box { position: relative; display: grid; justify-items: center; gap: 6px; padding: 26px 16px; text-align: center; border: 1px dashed var(--ds-border-strong); border-radius: var(--ds-radius); background: var(--ds-bg-elevated); transition: border-color var(--ds-fast) var(--ds-ease), background-color var(--ds-fast) var(--ds-ease); }
.upload-box:hover { border-color: var(--ds-border-accent); background: var(--ds-surface); }
.upload-box > strong { font-size: 13px; font-weight: 500; color: var(--ds-fg); }
.upload-box .meta { font-size: 12px; }
/* The native file input stays in the DOM (tests, change events, drop target) but covers the whole box invisibly:
   the entire drop zone is the hit area and the styled "Browse files" chip below stands in for the browser chrome. */
.upload-box input[type="file"] { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; max-width: none; min-height: 0; margin: 0; padding: 0; border: 0; background: transparent; opacity: 0; font-size: 0; cursor: pointer; }
.upload-box input[type="file"]:disabled { cursor: not-allowed; }
.upload-box:has(input[type="file"]:focus-visible) { border-color: var(--ds-border-accent); box-shadow: var(--ds-focus); }
.upload-browse { display: inline-flex; align-items: center; min-height: 28px; margin-top: 8px; padding: 0 12px; border: var(--ds-hair) solid var(--ds-border); border-radius: 6px; background: var(--ds-control); color: var(--ds-fg); font-size: 12px; font-weight: 500; line-height: 1.4; box-shadow: var(--ds-shadow-button); transition: background-color var(--ds-fast) var(--ds-ease), border-color var(--ds-fast) var(--ds-ease); }
.upload-box:hover .upload-browse { background: var(--ds-control-hover); border-color: var(--ds-border-hover); }
.upload-box[aria-busy="true"] .upload-browse, .upload-box:has(input:disabled) .upload-browse { opacity: .45; }
.upload-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-bottom: 4px; border-radius: 50%; background: var(--ds-accent-soft); color: var(--ds-accent-text); font-size: 18px; }
.source-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.source-heading strong { display: block; font-weight: 500; overflow-wrap: anywhere; }
.source-heading small { display: block; margin-top: 2px; }
.process-list { list-style: none; counter-reset: process; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.process-list li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; }
.process-list li::before { counter-increment: process; content: counter(process, decimal-leading-zero); padding-top: 2px; font-size: 10px; color: var(--ds-subtle); font-variant-numeric: tabular-nums; }
.process-list strong { display: block; font-size: 12px; font-weight: 500; }
.process-list p { margin-top: 2px; font-size: 12px; line-height: 1.55; }

/* Disclosure blocks */
.details { margin-top: 12px; padding-top: 12px; border-top: var(--ds-hair) solid var(--ds-border); }
.details summary { display: flex; align-items: center; gap: 6px; padding: 4px 0; font-size: 12px; font-weight: 500; color: var(--ds-muted); cursor: pointer; list-style: none; }
.details summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform var(--ds-fast) var(--ds-ease); flex: none; margin-right: 2px; }
.details[open] > summary::before { transform: rotate(45deg); }
.details summary::-webkit-details-marker { display: none; }
.details summary:hover { color: var(--ds-fg); }
.details pre { max-height: 320px; margin: 10px 0 0; padding: 12px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; border: var(--ds-hair) solid var(--ds-border); border-radius: 6px; background: var(--ds-bg-deep); color: var(--ds-muted); font-family: var(--ds-mono); font-size: 11px; line-height: 1.7; }

/* Activity timeline, findings, notes */
.events { list-style: none; margin: 0; padding: 0; max-height: 400px; overflow: auto; }
.events li { position: relative; margin-left: 4px; padding: 0 0 14px 14px; border-left: var(--ds-hair) solid var(--ds-border); }
.events li::before { content: ""; position: absolute; top: 6px; left: -3.5px; width: 6px; height: 6px; border-radius: 50%; background: var(--ds-success); }
.events li:last-child { padding-bottom: 0; }
.events time { display: block; margin-bottom: 2px; font-size: 11px; color: var(--ds-subtle); font-variant-numeric: tabular-nums; }
.events p { font-size: 12px; line-height: 1.55; color: var(--ds-fg); overflow-wrap: anywhere; }
.findings { list-style: none; margin: 0; padding: 0; }
.findings li { padding: 10px 0; border-top: var(--ds-hair) solid var(--ds-border); font-size: 12px; }
.findings li:first-child { border-top: 0; padding-top: 0; }
.findings strong { font-weight: 500; color: var(--ds-fg); }
.findings p { margin-top: 3px; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.finding-scope { display: block; margin-bottom: 3px; font-size: 11px; color: var(--ds-accent-text); }
.finding-total { margin-bottom: 8px; }
.finding-group { padding: 6px 0; border-top: var(--ds-hair) solid var(--ds-border); }
.finding-group summary { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 12px; color: var(--ds-fg); cursor: pointer; list-style: none; }
.finding-group summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--ds-muted); border-bottom: 1.5px solid var(--ds-muted); transform: rotate(-45deg); flex: none; transition: transform var(--ds-fast) var(--ds-ease); }
.finding-group[open] summary::before { transform: rotate(45deg); }
.finding-group summary > span:first-of-type { flex: 1; }
.finding-group summary::-webkit-details-marker { display: none; }
.finding-group .findings { margin-top: 8px; }
#run-findings { max-height: 380px; overflow: auto; scrollbar-gutter: stable; }
.saved-notes { list-style: none; margin: 12px 0 0; padding: 0; }
.saved-notes li { padding: 10px 0; border-top: var(--ds-hair) solid var(--ds-border); font-size: 12px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.saved-notes time { display: block; margin-bottom: 3px; font-size: 11px; color: var(--ds-subtle); }
.empty-list { padding: 6px 10px; font-size: 12px; color: var(--ds-subtle); }

/* Production progress */
.progress-panel { margin-bottom: 16px; }
.progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.progress-head p { margin-top: 3px; font-size: 12px; }
.progress-track { height: 4px; margin: 12px 0; border-radius: 4px; background: var(--ds-surface-active); overflow: hidden; }
.progress-track span { display: block; height: 100%; width: var(--progress, 0%); border-radius: 4px; background: var(--ds-accent); transition: width var(--ds-slow) var(--ds-ease); }
.progress-stage { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 12px 0 4px; padding: 0; }
.progress-stage li { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ds-subtle); }
.progress-stage li::before { content: ""; width: 14px; height: 14px; flex: none; border-radius: 50%; border: 1.5px solid var(--ds-border-strong); background: transparent; }
.progress-stage li.current { color: var(--ds-fg); font-weight: 500; }
.progress-stage li.current::before { border-color: var(--ds-accent); background: var(--ds-accent); box-shadow: 0 0 0 3px var(--ds-accent-soft); }
.progress-stage li.complete { color: var(--ds-muted); }
.progress-stage li.complete::before { border-color: var(--ds-success); background: var(--ds-success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 9px no-repeat; }
.spending { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0 0; padding-top: 12px; border-top: var(--ds-hair) solid var(--ds-border); }
.spending dt { font-size: 11px; color: var(--ds-muted); }
.spending dd { margin: 2px 0 0; font-size: 18px; font-weight: 550; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.concurrent-work { margin-top: 12px; padding-top: 12px; border-top: var(--ds-hair) solid var(--ds-border); }
.concurrent-work .section-heading { flex-wrap: wrap; margin-bottom: 4px; }
.job-list { list-style: none; max-height: 300px; margin: 8px 0 0; padding: 0; overflow: auto; }
.job-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: var(--ds-hair) solid var(--ds-border); font-size: 12px; }
.job-list li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.job-list .badge { flex: none; }

/* Player and source media */
.preview-stage { display: flex; align-items: center; justify-content: center; min-height: 320px; overflow: hidden; border: var(--ds-hair) solid var(--ds-border); border-radius: var(--ds-radius); background: var(--ds-stage); }
.preview-stage video { display: block; width: 100%; max-height: 68vh; object-fit: contain; background: var(--ds-stage); }
.preview-placeholder { max-width: 420px; padding: 36px 20px; text-align: center; }
.preview-placeholder .film-symbol { display: block; margin-bottom: 10px; font-size: 26px; color: var(--ds-faint); }
.preview-placeholder h3 { margin-bottom: 4px; font-weight: 500; }
.preview-placeholder p { font-size: 12px; line-height: 1.65; }
.preview-caption { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-top: 10px; }
.preview-caption p { font-size: 12px; font-variant-numeric: tabular-nums; }
.preview-caption a { font-size: 12px; }
.cancel-confirm { margin: 0 0 12px; padding: 14px; border: 1px solid rgba(4,12,90,.3); border-radius: var(--ds-radius-control); background: var(--ds-surface); }
.cancel-confirm p { margin-bottom: 10px; font-size: 12px; line-height: 1.6; color: var(--ds-fg); }
.spinner{ display: inline-block; width: 14px; height: 14px;     border:0;border-radius:0;background:var(--ds-loading-image,url("/static/brand-kit-20260911/tara/loader/tara-loader-cream.svg")) center/100% 100% no-repeat;animation:none;}
@keyframes spin { to { transform: rotate(360deg); } }
.extracted-shots { margin-top: 16px; }
.shot-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 12px; }
.shot-card { overflow: hidden; border: var(--ds-hair) solid var(--ds-border); border-radius: var(--ds-radius); background: var(--ds-surface); box-shadow: var(--ds-shadow-card); }
.shot-card video { display: block; width: 100%; height: 240px; object-fit: contain; background: var(--ds-stage); }
.shot-card-body { padding: 10px 12px 12px; }
.shot-card-body h3 { font-size: 12px; font-weight: 500; }
.shot-card-body p { margin: 3px 0 8px; font-size: 11px; overflow-wrap: anywhere; }
.shot-card-body .actions { margin-top: 8px; justify-content: space-between; }
.shot-card-body a, .shot-card-body button { font-size: 12px; }
.reference-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; margin-top: 12px; }
.reference-card { margin: 0; overflow: hidden; border: var(--ds-hair) solid var(--ds-border); border-radius: var(--ds-radius); background: var(--ds-surface); box-shadow: var(--ds-shadow-card); }
.reference-card img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: var(--ds-stage); }
.reference-card figcaption { padding: 9px 12px; font-size: 12px; color: var(--ds-fg); overflow-wrap: anywhere; }
.reference-lineage { display: block; margin-top: 3px; font-size: 11px; color: var(--ds-muted); }

/* Autorun and episode-length fieldsets */
#length-panel fieldset { min-width: 0; margin: 14px 0 0; padding: 12px 0 0; border: 0; border-top: var(--ds-hair) solid var(--ds-border); }
#length-panel legend { padding: 0 6px 0 0; font-size: 13px; font-weight: 600; color: var(--ds-fg); }
#length-panel fieldset > .field-note:first-of-type { margin-bottom: 12px; }
#save-lengths { margin-top: 8px; }
.autorun-panel h2 .badge { margin-left: 6px; vertical-align: middle; }
.autorun-summary { margin: 10px 0; font-size: 13px; color: var(--ds-fg); }
.autorun-drop { margin: 10px 0; }
.autorun-drop[aria-busy="true"] { opacity: .7; pointer-events: none; }
.manual-production > summary { display: flex; align-items: center; gap: 8px; padding: 12px 0; font-size: 13px; font-weight: 600; color: var(--ds-fg); cursor: pointer; list-style: none; }
.manual-production > summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--ds-muted); border-bottom: 1.5px solid var(--ds-muted); transform: rotate(-45deg); flex: none; transition: transform var(--ds-fast) var(--ds-ease); }
.manual-production[open] > summary::before { transform: rotate(45deg); }
.manual-production > summary::-webkit-details-marker { display: none; }
.manual-production[open] > summary { margin-bottom: 4px; }
#autorun-settings-form { margin-top: 10px; }
#autorun-settings-form > .field-note { margin-top: 10px; }

@media (max-width: 1050px) {
  .progress-stage { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .panel { padding: 14px; }
  .two-fields { grid-template-columns: 1fr; gap: 0; }
  .spending { gap: 8px; }
  .spending dd { font-size: 16px; }
  .preview-stage { min-height: 240px; }
  .progress-head { align-items: flex-start; }
  .progress-head .badge { white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 1.5s; }
  .progress-track span, .details summary::before, .finding-group summary::before, .manual-production > summary::before, .upload-box { transition: none; }
}
@media (forced-colors: active) {
  .badge, .notice, .panel, .upload-box, .shot-card, .reference-card, .cancel-confirm { border: 1px solid CanvasText; }
  .notice::before, .progress-track span, .events li::before, .progress-stage li::before { forced-color-adjust: none; }
  .progress-stage li.current::before, .progress-stage li.complete::before { background: Highlight; border-color: Highlight; }
}

/* Native portrait cuts, without a horizontal media well. */
#preview-stage:has(>video){position:relative;min-height:0;width:min(100%,calc(68dvh * var(--media-ratio,.5625)));margin-inline:auto;aspect-ratio:var(--media-ratio,.5625);background:var(--ds-stage)}
#preview-stage>video{width:100%;height:100%;max-height:none;object-fit:contain}
.shot-card video{height:auto;aspect-ratio:9/16;object-fit:contain}

/* Screenplay-first project setup: one changing tile, three decisions. */
.launch-dialog.ds-dialog{width:min(600px,calc(100vw - 32px));max-width:600px;padding:0;border-radius:28px;overflow:auto;max-height:calc(100dvh - 32px);background:linear-gradient(145deg,#252329,#19191c);border:1px solid #ffffff20;box-shadow:0 28px 100px #0009}
.launch-card{padding:24px 32px 28px;transition:box-shadow .18s}
.launch-card.is-dragover{box-shadow:inset 0 0 0 2px #d4aaf6}
.launch-top{display:flex;justify-content:space-between;align-items:center;color:var(--muted,#a3a3ad);font-size:13px}
.launch-credit{display:flex;gap:8px;align-items:center;font-size:13px;color:var(--muted,#a3a3ad);margin-top:12px}
.launch-credit strong{color:var(--text,#eee);font-weight:500;font-variant-numeric:tabular-nums}
.launch-drop{position:relative;display:flex;min-height:320px;align-items:center;justify-content:center;flex-direction:column;gap:15px;cursor:pointer;text-align:center;margin:24px 0 0;border:1px dashed #ffffff25;border-radius:20px;background:#ffffff02}
.launch-drop:hover,.launch-drop:focus-within,.launch-drop:focus-visible{border-color:#d4aaf6;background:#cfa6ff08;outline-offset:4px}
.launch-drop h2{font-size:30px;font-weight:500;margin:0;letter-spacing:-.8px}
.launch-drop small{color:var(--muted,#a3a3ad);font-size:12px}
.launch-drop-icon{display:grid;place-items:center;width:54px;height:54px;border:1px solid #ffffff1a;border-radius:16px;background:#ffffff08;margin-bottom:5px}
.launch-drop-icon svg{width:25px;height:25px}
.launch-drop input{position:absolute;opacity:0;width:1px;height:1px;bottom:16px;left:50%}
.launch-file{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:30px 0 24px;color:#b9b6c0;font-size:13px}
.launch-file>span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.launch-values{display:grid;grid-template-columns:1fr 1fr;gap:32px;padding-bottom:30px}
.launch-values label,.launch-label{display:block;font-size:13px;font-weight:400;color:#aaa7b2}
.launch-money{display:flex;align-items:center;margin-top:12px;color:#f1eff5;font-size:38px;font-variant-numeric:tabular-nums;letter-spacing:-1.2px}
.launch-money input{width:100%;min-width:0!important;font:inherit!important;color:inherit!important;background:transparent!important;border:0!important;padding:0 0 2px 4px!important;box-shadow:none!important;border-radius:0!important;border-bottom:1px solid #ffffff20!important;height:auto!important}
.launch-money input:focus{border-bottom-color:#cba5f0!important;outline:0!important}
.launch-values output{display:block;margin-top:12px;white-space:nowrap;font-size:38px;line-height:1.25;font-variant-numeric:tabular-nums;letter-spacing:-1.2px;color:#f1eff5}
.launch-quality{display:flex;gap:5px;border-radius:15px;padding:5px;background:#10101380;border:1px solid #ffffff0e}
.launch-quality button{flex:1;display:flex;flex-direction:column;align-items:center;padding:13px 8px;gap:5px;border:1px solid transparent;border-radius:11px;background:transparent;color:#96939f;font-size:14px}
.launch-quality button[aria-pressed="true"]{background:#ffffff0e;border-color:#d5b0f848;color:#f1eff5;box-shadow:0 2px 10px #0003}
.launch-quality strong{font-weight:500}.launch-quality small{font-size:11px;color:#aaa6b4}
.launch-reference-add{display:flex;align-items:center;gap:10px;width:100%;margin-top:18px;border:1px dashed #ffffff30;border-radius:12px;padding:13px 14px;background:transparent;color:#f2ecdd;text-align:left}
.launch-reference-add small{margin-left:auto;color:#aaa6b4}.launch-reference-add svg{width:18px;height:18px;flex:none}
.launch-reference-heading{display:flex;align-items:center;gap:10px;margin:24px 0 12px}.launch-reference-heading strong{font-size:16px;font-weight:500}.launch-reference-heading>span{margin-left:auto;font-size:12px;color:#aaa6b4}
.launch-reference-list{max-height:45dvh;overflow:auto;overscroll-behavior:auto;scrollbar-width:thin}
.launch-reference-row{padding:14px 0;border-bottom:1px solid #ffffff15}
.launch-reference-images{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.launch-reference-images>div{position:relative;width:64px;height:56px}.launch-reference-images img{width:64px;height:56px;object-fit:contain;border-radius:8px;background:#101014}.launch-reference-images button{position:absolute;right:-4px;top:-4px;width:20px;height:20px;min-height:20px;padding:3px;border-radius:50%;background:#29262e;border:1px solid #655b70}.launch-reference-images button svg{width:12px;height:12px}
.launch-reference-fields{display:grid;grid-template-columns:120px minmax(0,1fr);gap:12px}.launch-reference-fields label{min-width:0;font-size:12px;color:#aaa6b4}.launch-reference-fields label>span{display:block;margin-bottom:5px}.launch-reference-fields input,.launch-reference-fields select{width:100%;min-width:0;font-size:14px;padding:10px;background:#18171c;border:1px solid #ffffff25;border-radius:9px;color:#f2ecdd}
.launch-reference-angle{display:inline-flex;align-items:center;gap:5px;margin-top:10px;font-size:12px;color:#d0a9f8}.launch-reference-angle svg{width:14px;height:14px}
.startup-reference-chat{min-height:0;max-height:320px;overflow:auto;border-top:1px solid #ffffff20;padding-top:14px;scrollbar-width:thin}.startup-reference-chat header{font-weight:500;color:#f2ecdd}.startup-reference-chat article{padding:8px 0;font-size:14px;color:#d2cbdc;line-height:1.5}.startup-reference-chat article.is-user{color:#f2ecdd;padding-left:24px}.startup-reference-chat article p{margin:5px 0;white-space:pre-wrap}.startup-reference-chat article img{width:56px;height:56px;object-fit:contain;border-radius:8px;background:#111014}.startup-reference-chat .startup-reference-choices{font-size:12px;color:#aaa6b4}

@media(max-width:420px){.launch-reference-fields{grid-template-columns:100px minmax(0,1fr);gap:8px}.launch-reference-fields input,.launch-reference-fields select{font-size:16px;padding:8px}.launch-reference-angle{min-height:40px}.launch-reference-images>div,.launch-reference-images img{width:58px;height:56px}.startup-reference-chat{max-height:260px}}
.launch-caption{color:var(--muted,#a3a3ad);font-size:12px;text-align:center;margin:14px 0 0;line-height:1.5}
.launch-start.primary{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;font-size:16px;font-weight:500;min-height:52px;border-radius:14px;margin-top:22px}
.launch-retry{padding:56px 0;text-align:center}.launch-retry h2{font-weight:500}.launch-retry p{color:var(--muted)}
.launch-card .error-text:empty{display:none}.launch-card .error-text{margin-top:18px;font-size:13px}
.launch-spinner{display:block;width:24px;height:24px;border:0;border-radius:0;background:var(--ds-loading-image,url("/static/brand-kit-20260911/tara/loader/tara-loader-cream.svg")) center/100% 100% no-repeat;animation:none;}
@keyframes launch-spin{to{transform:rotate(360deg)}}
.account-credit-indicator{font-size:12px;color:var(--muted,#aaa);font-variant-numeric:tabular-nums;white-space:nowrap;padding:7px 11px;background:#ffffff06;border:1px solid #ffffff0d;border-radius:9px}
#pane-overview.is-first-production>.pane-toolbar,#pane-overview.is-first-production>.episode-workspace{display:none!important}
.first-production{max-width:950px;margin:clamp(12px,5vh,60px) auto;padding:clamp(20px,4vw,44px);border:1px solid #ffffff15;border-radius:24px;background:linear-gradient(145deg,#222126,#17171a);box-shadow:0 20px 50px #0002}
.first-production-heading{text-align:center}.launch-eyebrow{font-size:12px;color:#a9a4b3}.first-production h2{font-size:clamp(24px,3vw,36px);font-weight:500;letter-spacing:-.8px;margin:14px 0 8px}.first-production-heading p{font-size:14px;color:#aba6b4;min-height:21px;margin:0}
.first-production-steps{display:flex;justify-content:space-between;gap:10px;padding:0;margin:32px 0;list-style:none}.first-production-steps li{display:flex;align-items:center;gap:8px;font-size:12px;color:#77747f}.first-production-steps li>span{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;border:1px solid #ffffff18;font-size:11px}.first-production-steps li svg{width:13px;height:13px}.first-production-steps .is-current{color:#ead9fa}.first-production-steps .is-current>span{background:#bd8ceb20;border-color:#ca9de980}.first-production-steps .is-done{color:#b9b0c4}
.first-production-images{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.first-production-images.is-empty{height:200px;border-radius:16px;background:#ffffff03;display:grid;place-items:center}.first-production-images a{display:block;min-width:0;text-decoration:none}.first-production-images img{width:100%;aspect-ratio:16/9;object-fit:contain;background:#0e0e11;border:1px solid #ffffff12;border-radius:12px}.first-production-images a>span{display:block;font-size:11px;color:#b3aebc;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:8px 2px}
.first-production-actions{display:flex;justify-content:center;gap:12px;margin:30px 0 0}.first-production-actions button{border-radius:12px;min-height:44px}
@media(max-width:600px){.launch-dialog.ds-dialog{width:calc(100vw - 24px);border-radius:22px}.launch-card{padding:18px 22px 24px}.launch-drop{min-height:260px}.launch-drop h2{font-size:27px}.launch-values{gap:16px}.launch-money,.launch-values output{font-size:30px}.first-production{padding:22px 16px}.first-production-steps{gap:3px}.first-production-steps li{font-size:10px;flex-direction:column;gap:6px}.first-production-images{grid-template-columns:repeat(2,minmax(0,1fr))}.first-production-actions{flex-wrap:wrap}.account-credit-indicator{padding:6px;font-size:11px}.launch-quality small{font-size:10px}}
@media(prefers-reduced-motion:reduce){.launch-spinner{animation:none;border-right-color:#d3aaf7}.launch-card{transition:none}}
@media(max-width:380px){.launch-money,.launch-values output{font-size:25px;letter-spacing:-.6px}.launch-values label,.launch-label{font-size:12px}.launch-money input{font-variant-numeric:tabular-nums}}

/* Reference preparation is visible before the first paid image arrives. */
.launch-preparation{display:flex;align-items:center;justify-content:center;gap:8px;min-height:25px;margin:12px 0;color:#aaa3b5;font-size:12px}.launch-preparation svg{width:14px;height:14px}.launch-preparation .launch-spinner{width:14px;height:14px;border-width:1.5px}
.first-production-folders{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 22px}.first-production-folders button{display:flex;align-items:center;gap:12px;min-width:0;text-align:left;background:#ffffff04;border:1px solid #ffffff10;border-radius:14px;padding:16px;color:#d9d4e1}.first-production-folders button>svg:first-child{width:22px;height:22px;color:#c9a3ed;flex-shrink:0}.first-production-folders button>svg:last-child{width:14px;height:14px;margin-left:auto;color:#87838e}.first-production-folders button span{min-width:0}.first-production-folders strong,.first-production-folders small{display:block}.first-production-folders strong{font-size:13px;font-weight:500}.first-production-folders small{font-size:11px;color:#918b9b;margin-top:4px}
.startup-reference{min-width:0;animation:startup-tile-in .3s ease-out}.startup-reference>a{display:block}.startup-reference img{display:block}.startup-reference>strong,.startup-reference>small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.startup-reference>strong{margin:9px 2px 4px;font-size:12px;font-weight:500;color:#d7d0de}.startup-reference>small{margin:0 2px 10px;font-size:11px;color:#898392}.startup-reference[data-reference-state="generating"]>small{color:#ccade9}.startup-reference[data-reference-state="ready"]>small{color:#abbda8}
.startup-reference-placeholder{position:relative;overflow:hidden;aspect-ratio:16/9;border:1px solid #ffffff0d;border-radius:12px;background:#17161a;display:grid;place-items:center}.startup-reference-placeholder svg{width:27px;height:27px;color:#6d637b;z-index:1}.startup-reference-placeholder span{position:absolute;inset:0;background:linear-gradient(110deg,transparent 20%,#c8a6ef0b 48%,transparent 75%);transform:translateX(-100%);animation:startup-scan 2.6s ease-in-out infinite}.startup-reference-placeholder.is-paused span{animation:none}.startup-reference:nth-child(3n+2) .startup-reference-placeholder span{animation-delay:.2s}.startup-reference:nth-child(3n) .startup-reference-placeholder span{animation-delay:.4s}
.startup-reading{grid-column:1/-1;min-height:170px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:#9f95ae;font-size:12px}.startup-reading>svg{width:30px;height:30px}.startup-reading-lines{display:grid;gap:5px;width:110px}.startup-reading-lines i{height:3px;border-radius:4px;background:#cba7ef25;animation:startup-line 1.6s ease-in-out infinite}.startup-reading-lines i:nth-child(2){width:80%;animation-delay:.2s}.startup-reading-lines i:nth-child(3){width:60%;animation-delay:.4s}
.wm-generating-tile>small{display:block;color:var(--muted);font-size:11px;margin:6px 0 0}.wm-generating-tile[data-reference-state="planning"] .wm-generating-thumb{opacity:.65}
@keyframes startup-scan{to{transform:translateX(100%)}}@keyframes startup-line{50%{background:#cba7ef70}}@keyframes startup-tile-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:600px){.first-production-folders{gap:6px}.first-production-folders button{padding:12px 8px;gap:6px;flex-wrap:wrap}.first-production-folders button>svg:last-child{display:none}.first-production-folders strong{font-size:11px}.first-production-folders small{font-size:10px}.first-production-folders button>svg:first-child{width:18px;height:18px}}
@media(prefers-reduced-motion:reduce){.startup-reference,.startup-reference-placeholder span,.startup-reading-lines i{animation:none}}

.startup-reference-placeholder .startup-reference-time{position:absolute;bottom:9px;left:8px;right:8px;color:#b7adc3;font-size:10px;line-height:1.35;text-align:center;z-index:1}

/* Keep production context fixed while the growing reference library scrolls. */
.shell #page:has(#pane-overview.is-first-production:not([hidden])){display:flex;flex-direction:column;overflow:hidden;padding-bottom:16px}
#pane-overview.is-first-production:not([hidden]){display:flex;flex:1;min-height:0}
#pane-overview.is-first-production #startup-progress{display:flex;flex:1;min-height:0;min-width:0;padding:12px 0}
#pane-overview.is-first-production .first-production{display:grid;grid-template-rows:auto auto auto minmax(0,1fr) auto auto auto;flex:1;min-height:0;width:100%;margin:0 auto;padding:clamp(14px,2.5vh,28px)}
#pane-overview.is-first-production .first-production h2{margin:8px 0;font-size:clamp(22px,2.5vw,32px)}
#pane-overview.is-first-production .first-production-steps{margin:20px 0}
#pane-overview.is-first-production .first-production-folders{margin-bottom:14px}
#pane-overview.is-first-production .first-production-images{overflow:auto;min-height:0;align-content:start;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-gutter:stable;padding:3px 5px 3px 3px}
#pane-overview.is-first-production .first-production-images:focus-visible{outline:1px solid #cba7ef;outline-offset:2px;border-radius:8px}
#pane-overview.is-first-production .first-production-actions{margin-top:16px}
#pane-overview.is-first-production .launch-caption{margin:10px 0 0}
#startup-progress-error:empty{display:none}
@media(max-height:700px){
 #pane-overview.is-first-production #startup-progress{padding:4px 0}
 #pane-overview.is-first-production .first-production{padding:12px}
 #pane-overview.is-first-production .launch-eyebrow{display:none}
 #pane-overview.is-first-production .first-production h2{font-size:22px;margin:2px 0 5px}
 #pane-overview.is-first-production .first-production-steps{margin:10px 0}
 #pane-overview.is-first-production .first-production-folders{margin-bottom:8px}
 #pane-overview.is-first-production .first-production-folders button{padding:8px}
 #pane-overview.is-first-production .first-production-actions{margin-top:8px}
 #pane-overview.is-first-production .launch-caption{font-size:10px;margin-top:6px}
}

/* Tara stays beside the developing library; only the image grid scrolls. */
#pane-overview.is-first-production .first-production{max-width:1200px;gap:18px 28px;background:#111114;border-color:#ffffff12;border-radius:20px;grid-template-columns:235px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto auto;grid-template-areas:"heading folders" "steps images" "actions images" "caption error"}
#pane-overview.is-first-production .first-production-heading{grid-area:heading;text-align:left;align-self:start}
#pane-overview.is-first-production .tara-startup-identity{display:flex;align-items:center;gap:8px;color:#d2b0f1;margin-bottom:20px;font-size:15px}
#pane-overview.is-first-production .tara-startup-identity svg{width:20px;height:20px}
#pane-overview.is-first-production .first-production h2{font-size:25px;letter-spacing:-.7px;line-height:1.2;margin:10px 0}
#pane-overview.is-first-production .first-production-heading p{font-size:12px;line-height:1.55}
#pane-overview.is-first-production .first-production-steps{grid-area:steps;flex-direction:column;justify-content:flex-start;gap:18px;margin:8px 0;align-self:start}
#pane-overview.is-first-production .first-production-steps li{font-size:12px;gap:12px}
#pane-overview.is-first-production .first-production-folders{grid-area:folders;align-self:start;margin:0;gap:8px}
#pane-overview.is-first-production .first-production-folders button{padding:14px 12px;gap:8px}
#pane-overview.is-first-production .first-production-images{grid-area:images;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
#pane-overview.is-first-production .first-production-actions{grid-area:actions;flex-direction:column;margin:0;gap:8px}
#pane-overview.is-first-production .first-production-actions button{width:100%;font-size:12px}
#pane-overview.is-first-production .first-production>.launch-caption{grid-area:caption;text-align:left;font-size:11px;margin:0;line-height:1.5}
#pane-overview.is-first-production #startup-progress-error{grid-area:error;margin:0;align-self:end}
#pane-overview.is-first-production .first-production:has(.startup-reference-chat){grid-template-areas:"heading folders" "chat images" "actions images" "caption error"}
#pane-overview.is-first-production .first-production:has(.startup-reference-chat) .first-production-steps{display:none}
#pane-overview.is-first-production .startup-reference-chat{grid-area:chat;max-height:none;min-height:0;height:100%;border-top:0;padding-top:0}
#pane-overview.is-first-production .startup-reference-chat>header{display:none}
#pane-overview.is-first-production .startup-reference-chat{display:flex;flex-direction:column;overflow:hidden}
#pane-overview.is-first-production .startup-reference-chat>[role="log"]{min-height:0;flex:1;overflow:auto;scrollbar-width:thin;padding-bottom:8px}
@media(max-width:950px){
 #pane-overview.is-first-production .first-production{gap:10px;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto minmax(0,1fr) auto auto auto;grid-template-areas:"heading" "steps" "folders" "images" "actions" "caption" "error"}
 #pane-overview.is-first-production .first-production-heading{display:grid;grid-template-columns:1fr auto;column-gap:12px}
 #pane-overview.is-first-production .tara-startup-identity{grid-column:2;grid-row:1/4;margin:0;align-self:center}
 #pane-overview.is-first-production .launch-eyebrow{display:none}
 #pane-overview.is-first-production .first-production h2{font-size:22px;margin:0 0 4px}
 #pane-overview.is-first-production .first-production-steps{flex-direction:row;justify-content:space-between;gap:5px;margin:2px 0}
 #pane-overview.is-first-production .first-production-steps li{flex-direction:row;gap:6px;font-size:10px}
 #pane-overview.is-first-production .first-production-folders button{padding:9px;gap:6px}
 #pane-overview.is-first-production .first-production-actions{flex-direction:row;flex-wrap:nowrap;gap:8px}
 #pane-overview.is-first-production .first-production>.launch-caption{text-align:center;font-size:10px}
 #pane-overview.is-first-production .first-production:has(.startup-reference-chat){grid-template-rows:auto auto minmax(80px,.6fr) minmax(150px,1fr) auto auto auto;grid-template-areas:"heading" "folders" "images" "chat" "actions" "caption" "error"}
 #pane-overview.is-first-production .startup-reference-chat{border-top:1px solid #ffffff20;padding-top:8px}
}
@media(max-width:600px){
 #pane-overview.is-first-production .first-production-images{grid-template-columns:repeat(2,minmax(0,1fr))}
 #pane-overview.is-first-production .first-production-steps li{flex-direction:column}
 #pane-overview.is-first-production .first-production-heading p{font-size:11px}
}

/* Project-level Tara choice before creation. */
.launch-tara{margin-top:20px;padding:16px;border:1px solid #ffffff18;border-radius:15px;background:#10101360}
.launch-tara-heading,.launch-tara-heading label{display:flex;align-items:center;gap:8px}
.launch-tara-heading{justify-content:space-between;font-size:13px;color:#f1eff5}
.launch-tara-heading .tara-mark{width:22px;height:22px}.launch-tara-heading strong{font-weight:500;color:#d5b0f8}
.launch-tara input[type=range]{display:block;width:100%;height:6px;padding:0;margin:23px 0 15px;appearance:none;-webkit-appearance:none;cursor:pointer;border:0;border-radius:9px;background:linear-gradient(to right,#d5b0f8 0%,#f5e8b8 var(--tara-progress),#454149 var(--tara-progress),#454149 100%)}
.launch-tara input[type=range]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:22px;height:22px;border:1px solid #e8e0ee;border-radius:50%;background:#f5f2f7;box-shadow:0 2px 5px #0005}
.launch-tara input[type=range]::-moz-range-thumb{width:22px;height:22px;border:1px solid #e8e0ee;border-radius:50%;background:#f5f2f7}
.launch-tara input:focus-visible{outline:2px solid #d5b0f8;outline-offset:7px}.launch-tara input:disabled{cursor:default;opacity:.5}
.launch-tara-labels{display:flex;justify-content:space-between;font-size:11px;color:#c5c0cc}
.launch-tara p{margin:12px 0 0;font-size:12px;line-height:1.5;color:#eee9f2;min-height:36px}

/* Keep sign-in controls easy to tap without enlarging desktop forms. */
@media (hover: none) and (pointer: coarse) {
  #auth-form #access-token, #auth-form #sign-in { min-height: 44px; }
  #auth-form #access-token { font-size: 16px; }
}
