:root {
  color-scheme: dark;
  --page: #10141c;
  --panel: #191f2a;
  --raised: #222a37;
  --input: #111823;
  --line: #343d4b;
  --text: #f3eee5;
  --muted: #a9b2c1;
  --accent: #ffb29d;
  --accent-ink: #2e1b17;
  --mint: #b5e4d2;
  font: 14px/1.5 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--text); }
button, input, select { font: inherit; }
button, .download-link { min-height: 36px; border: 1px solid var(--line); border-radius: 7px; background: var(--raised); color: var(--text); padding: 7px 12px; cursor: pointer; font-weight: 600; transition: background .12s, border-color .12s; }
button:hover:not(:disabled), .download-link:hover { background: #303b4c; border-color: #657287; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.primary:hover:not(:disabled) { background: #ffc8b8; border-color: #ffc8b8; }
button.quiet { background: transparent; border-color: transparent; color: var(--muted); }
button:disabled { opacity: .42; cursor: default; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
input:not([type='checkbox'], [type='range'], [type='color']), select { width: 100%; min-width: 0; min-height: 35px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; background: var(--input); color: var(--text); }
input[type='checkbox'], input[type='range'] { accent-color: var(--accent); }
input[type='checkbox'] { width: 16px; height: 16px; margin: 0; flex-shrink: 0; }
input[type='range'] { min-width: 50px; cursor: pointer; }
input[type='color'] { width: 100%; height: 35px; border: 1px solid var(--line); border-radius: 6px; background: var(--input); padding: 3px; }
label { display: grid; gap: 5px; font-size: 12px; color: #c6cddd; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-size: 16px; font-weight: 650; letter-spacing: -.02em; }
h3 { font-size: 13px; font-weight: 650; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 9px; font-weight: 650; font-size: 12px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; height: 1px; width: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.muted, .hint { color: var(--muted); }
.hint { font-size: 11px; line-height: 1.6; }
.eyebrow { display: block; color: var(--muted); font-size: 9px; letter-spacing: .15em; font-weight: 700; }
.app-header { min-height: 89px; display: flex; align-items: center; gap: 30px; padding: 16px 24px; border-bottom: 1px solid var(--line); background: #151a23; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-size: 10px; letter-spacing: .16em; flex-shrink: 0; }
.brand strong { display: block; font-size: 13px; letter-spacing: -.01em; margin-top: 1px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 36px; border: 1px solid var(--accent); border-radius: 9px 9px 2px 9px; font-size: 23px; font-weight: 750; color: var(--accent); }
.production-heading { flex: 1; min-width: 160px; }
.title-form { display: flex; align-items: center; }
.title-form input:not([type]) { border-color: transparent; background: transparent; padding-left: 0; font-size: 19px; font-weight: 600; max-width: 410px; }
.title-form button { font-size: 11px; white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
#save-indicator { color: var(--mint); font-size: 11px; max-width: 170px; margin-right: 8px; }
#save-indicator.problem { color: var(--accent); }
.header-actions button { font-size: 11px; }
.notice-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 24px; gap: 15px; color: #ffe4d9; background: #402922; border-bottom: 1px solid #805142; }
.notice-bar p { overflow-wrap: anywhere; font-size: 13px; }
.notice-bar button { min-width: 32px; padding: 2px 8px; background: transparent; border: 0; font-size: 22px; }
.workspace { display: grid; grid-template-columns: 254px minmax(360px, 1fr) 316px; gap: 16px; padding: 20px; align-items: start; max-width: 2300px; margin: auto; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.library-panel, .inspector-panel { padding: 19px 16px; max-height: calc(100vh - 130px); overflow: auto; scrollbar-width: thin; scrollbar-color: #455166 transparent; }
.panel-heading, .section-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.panel-heading .eyebrow { margin-bottom: 4px; }
.intro { font-size: 12px; margin-top: 8px; }
.local-tag, .tag { color: var(--mint); font-size: 9px; border: 1px solid #415e56; border-radius: 4px; padding: 2px 5px; letter-spacing: .08em; }
.import-actions { display: grid; gap: 7px; margin: 19px 0 9px; }
.import-actions button { font-size: 12px; }
.library-section { margin-top: 24px; }
.section-heading { margin-bottom: 12px; }
.section-heading h2 { font-size: 13px; }
.count { min-width: 20px; padding: 1px 6px; border-radius: 5px; background: #2e3746; color: var(--muted); text-align: center; font-size: 10px; }
.item-list { display: grid; gap: 7px; }
.library-item { display: flex; gap: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 7px; align-items: center; min-width: 0; }
.library-item.selected { background: #302c2c; border-color: #bc8b79; }
.item-icon { display: grid; place-items: center; background: #303b4c; color: var(--mint); border-radius: 5px; width: 29px; height: 32px; flex-shrink: 0; font-size: 12px; }
.item-copy { flex: 1; min-width: 0; }
.item-copy strong, .item-copy small { display: block; overflow-wrap: anywhere; }
.item-copy strong { font-size: 12px; font-weight: 600; }
.item-copy small { color: var(--muted); font-size: 10px; }
.library-item button { font-size: 11px; min-height: 30px; padding: 4px 7px; }
button.actor-select { background: transparent; border: 0; padding: 0; text-align: left; width: 100%; }
button.actor-select:hover:not(:disabled) { background: transparent; color: var(--accent); }
.empty-copy { color: var(--muted); padding: 10px 0; font-size: 12px; line-height: 1.7; }
.library-footer { font-size: 11px; line-height: 1.7; color: #8995a7; padding-top: 22px; margin-top: 24px; border-top: 1px solid var(--line); }
.stage-column { min-width: 0; }
.stage-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 2px 15px; }
.stage-toolbar strong { font-size: 15px; display: block; overflow-wrap: anywhere; }
.preview-switches { display: flex; gap: 16px; align-items: center; }
.check-label { display: flex; align-items: center; gap: 7px; font-size: 11px; cursor: pointer; }
.viewport { aspect-ratio: 16 / 9; width: 100%; position: relative; background: #121b27; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: 0 15px 45px #0003; }
.viewport canvas { display: block; width: 100%; height: 100%; object-fit: contain; }
.stage-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 10px; padding: 30px; background: radial-gradient(ellipse at 50% 75%, #263348 0, #161e2c 45%, #121925 80%); }
.stage-placeholder::before { content: ''; position: absolute; width: 70%; height: 35%; left: 15%; bottom: 0; background-image: linear-gradient(#66758c20 1px, transparent 1px), linear-gradient(90deg, #66758c20 1px, transparent 1px); background-size: 35px 25px; transform: perspective(120px) rotateX(35deg); transform-origin: bottom; pointer-events: none; }
.stage-emblem { display: grid; place-items: center; height: 54px; width: 54px; border: 1px solid #64748a; border-radius: 50%; color: var(--accent); margin-bottom: 7px; }
.stage-placeholder h2 { font-size: 21px; font-weight: 500; }
.stage-placeholder p { font-size: 12px; color: var(--muted); line-height: 1.8; max-width: 430px; z-index: 1; }
.stage-caption { position: absolute; bottom: 13px; left: 16px; right: 16px; display: flex; justify-content: space-between; color: #e3eaf4; text-shadow: 0 1px 4px #000; font-size: 9px; letter-spacing: .08em; pointer-events: none; }
.transport { display: flex; align-items: center; gap: 8px; padding: 14px 1px 20px; }
.transport button { font-size: 11px; }
.transport .play-button { min-width: 77px; }
.transport select { width: 105px; font-size: 11px; padding: 6px; }
.transport input { flex: 1; }
.time-label { font-size: 11px; font-variant-numeric: tabular-nums; color: #c7d1e2; white-space: nowrap; padding: 0 4px; }
.sequence { padding: 17px; }
.sequence-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sequence-heading h2 { font-size: 16px; margin-top: 3px; }
.sequence-heading button { font-size: 11px; }
#sequence-duration { font-size: 11px; font-weight: 400; margin-left: 9px; }
.shot-list { display: flex; gap: 9px; overflow-x: auto; padding: 14px 1px 6px; scrollbar-width: thin; scrollbar-color: #455166 transparent; }
.shot-card { min-width: 145px; max-width: 220px; flex: 1 0 145px; border: 1px solid var(--line); border-radius: 7px; background: #121923; overflow: hidden; }
.shot-card.selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.shot-select { display: block; width: 100%; text-align: left; min-height: 86px; border: 0; border-radius: 0; padding: 10px 12px; background: transparent; }
.shot-select .eyebrow { font-size: 9px; color: var(--mint); }
.shot-select strong { display: block; font-size: 13px; margin: 4px 0; overflow-wrap: anywhere; }
.shot-select small { display: block; font-size: 10px; color: var(--muted); font-weight: 400; }
.shot-order { display: flex; border-top: 1px solid var(--line); justify-content: space-between; padding: 3px 6px; align-items: center; }
.shot-order button { min-height: 24px; padding: 0 7px; border: 0; background: transparent; font-size: 12px; }
.shot-order span { font-size: 9px; color: var(--muted); }
.export-bar { margin-top: 16px; padding: 16px; display: flex; align-items: center; gap: 14px; justify-content: space-between; flex-wrap: wrap; }
.export-bar strong { font-size: 13px; }
.export-actions { display: flex; gap: 7px; }
.export-actions button { font-size: 11px; }
.export-progress { flex-basis: 100%; display: flex; align-items: center; gap: 12px; font-size: 11px; }
.export-progress progress { flex: 1; min-width: 30px; accent-color: var(--accent); }
.download-link { font-size: 12px; color: var(--mint); text-decoration: none; }
.inspector-panel > .panel-heading { margin-bottom: 20px; }
.inspector-form, .pose-fields { display: grid; gap: 12px; }
.inspector-form button[type='submit'] { font-size: 12px; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.vector { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.vector label { font-size: 9px; text-transform: uppercase; letter-spacing: .06em; color: #b3bece; }
.vector input:not([type='checkbox']) { font-size: 11px; padding: 6px; }
.field-group { display: grid; gap: 7px; }
.field-group > span { font-size: 11px; color: #c6cddd; }
details { padding-top: 11px; border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; font-size: 12px; padding: 3px 0; }
details[open] summary { margin-bottom: 12px; }
.shot-actions { display: flex; justify-content: space-between; gap: 7px; margin-top: 12px; }
.shot-actions button { font-size: 10px; padding: 6px 9px; }
.actor-section, .audio-section { border-top: 1px solid var(--line); margin-top: 23px; padding-top: 19px; }
.selected-actor { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.selected-actor h3 { overflow-wrap: anywhere; }
.pose-block { border: 1px solid var(--line); padding: 12px; border-radius: 6px; }
.pose-block legend { padding: 0 5px; color: var(--mint); font-size: 11px; margin: 0; }
.pose-fields { gap: 9px; }
.copy-pose { font-size: 10px; justify-self: start; min-height: 27px; padding: 4px 8px; }
.inline-checks { display: flex; gap: 16px; }
.audio-cue { border: 1px solid var(--line); border-radius: 7px; padding: 11px; margin-top: 12px; }
.audio-cue h3 { font-size: 12px; overflow-wrap: anywhere; margin-bottom: 10px; }
.audio-cue form { display: grid; gap: 10px; }
.audio-cue .two-columns label { font-size: 10px; }
.audio-cue button { font-size: 10px; }
.cues-empty { margin-top: 7px; }
dialog { max-width: 420px; width: calc(100vw - 32px); color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 24px; box-shadow: 0 25px 100px #0008; }
dialog::backdrop { background: #080d16c9; }
dialog form { display: grid; gap: 18px; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; }
.dialog-heading button { font-size: 22px; padding: 0 8px; }
.no-script { padding: 20px; background: #402922; }
@media (min-width: 1750px) { .workspace { grid-template-columns: 275px minmax(500px, 1fr) 340px; gap: 22px; padding: 24px; } }
@media (max-width: 1240px) { .workspace { grid-template-columns: 215px minmax(300px, 1fr) 285px; gap: 12px; padding: 14px; } .app-header { gap: 18px; padding: 14px; } .header-actions { flex-wrap: wrap; justify-content: flex-end; max-width: 240px; } .preview-switches { flex-direction: column; gap: 5px; align-items: flex-start; } .export-actions { flex-wrap: wrap; } .title-form button { display: none; } }
@media (max-width: 1030px) { .workspace { grid-template-columns: 210px minmax(350px, 1fr); } .inspector-panel { grid-column: 2; max-height: none; } .library-panel { grid-row: 1 / 3; } .header-actions #save-indicator { flex-basis: 100%; } }
@media (max-width: 700px) { .app-header { flex-wrap: wrap; gap: 12px; } .brand { flex: 1; } .production-heading { order: 3; flex-basis: 100%; } .header-actions { max-width: 205px; gap: 3px; } .header-actions button { font-size: 10px; padding: 5px 7px; } .title-form button { display: block; } .workspace { display: flex; flex-direction: column; gap: 14px; padding: 12px; } .workspace > * { width: 100%; } .stage-column { order: 1; } .library-panel { order: 2; max-height: none; } .inspector-panel { order: 3; } .stage-toolbar { padding-top: 3px; } .transport { flex-wrap: wrap; } .transport input { flex-basis: 100%; margin-top: 6px; } .sequence-heading { align-items: flex-start; } .sequence-heading button { max-width: 145px; } .stage-placeholder h2 { font-size: 16px; } .stage-placeholder { gap: 5px; padding: 12px; } .stage-emblem { width: 34px; height: 34px; margin: 0; } .stage-placeholder p { font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Keep production file actions usable beside the studio controls. */
.app-header{flex-wrap:wrap}.header-actions{flex-wrap:wrap}.production-heading{min-width:180px}
.help-link{color:var(--muted);font-size:12px}
