:root {
  font-family: Inter, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  --canvas: #f5ede3;
  --ink: #3d2925;
  --surface: #fffaf2;
  --surface-soft: #f3e8dc;
  --input-bg: #fffdf9;
  --line: #e3cfc0;
  --muted: #705d54;
  --accent: #a4472d;
  --accent-deep: #85351f;
  --on-accent: #ffffff;
  --teal: #477854;
  --yellow: #aa6500;
  --danger: #ab2934;
  --positive-bg: #eaf1e7;
  --positive-ink: #315b3d;
  --warning-bg: #fff3d6;
  --warning-ink: #6d4600;
  --warning-line: #d5a84d;
  --shadow: rgba(61,41,37,.10);
}
html[data-creative-theme="editorial"] {
  --canvas: #f7f6f1;
  --ink: #17223c;
  --surface: #fffdf9;
  --surface-soft: #f0efea;
  --input-bg: #ffffff;
  --line: #d8d7d0;
  --muted: #626877;
  --accent: #ae2154;
  --accent-deep: #901742;
  --on-accent: #ffffff;
  --teal: #087c79;
  --yellow: #a66c09;
  --danger: #a8243c;
  --positive-bg: #eaf2ee;
  --positive-ink: #265c4a;
  --warning-bg: #fff4d8;
  --warning-ink: #6e4900;
  --warning-line: #d8ae59;
  --shadow: rgba(23,34,60,.08);
}
html[data-creative-theme="midnight"] {
  color-scheme: dark;
  --canvas: #101322;
  --ink: #f7f3e9;
  --surface: #191d2f;
  --surface-soft: #242a3d;
  --input-bg: #111625;
  --line: #444a60;
  --muted: #b9bdca;
  --accent: #ff8066;
  --accent-deep: #ffae95;
  --on-accent: #20121a;
  --teal: #e5c878;
  --yellow: #e5c878;
  --danger: #ff9ba5;
  --positive-bg: #1b3b34;
  --positive-ink: #b9f1cf;
  --warning-bg: #403416;
  --warning-ink: #ffe1a0;
  --warning-line: #9b7c3f;
  --shadow: rgba(0,0,0,.28);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink); }
.skip-link { position: absolute; left: 14px; top: -48px; z-index: 60; padding: 10px 14px; border-radius: 7px; color: var(--surface); background: var(--ink); font-weight: 800; text-decoration: none; }
.skip-link:focus { top: 14px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.shell { max-width: 1180px; margin: 0 auto; padding: 34px 22px 118px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.brand { display: flex; align-items: center; min-height: 58px; font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-weight: 700; color: var(--ink); }
.brand img { display: block; width: min(310px, 52vw); height: 58px; object-fit: contain; object-position: left center; }
.brand small { display: block; color: var(--muted); font: 500 12px/1.4 Inter, "Segoe UI", sans-serif; margin-top: 4px; }
.actions, .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn, .dock-button { min-height: 38px; border: 1px solid var(--line); border-radius: 7px; padding: 9px 13px; color: var(--ink); background: var(--surface); font-weight: 700; text-decoration: none; }
.btn:hover, .dock-button:hover { border-color: var(--accent); color: var(--accent-deep); }
.btn.primary { color: var(--on-accent); border-color: var(--accent); background: var(--accent); }
.btn.primary:hover { background: var(--accent-deep); }
.btn.danger { color: var(--danger); }
.btn:focus-visible, .dock-button:focus-visible, .tab:focus-visible, .input:focus-visible, .command-project > summary:focus-visible, .project-context-panel > summary:focus-visible, .project-context-link:focus-visible, .theme-choice select:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.hero, .card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 20px; box-shadow: 0 10px 30px var(--shadow); }
.hero { margin-bottom: 15px; border-top: 4px solid var(--accent); }
.project-header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .78fr); gap: 14px 20px; align-items: start; }
.project-header-copy { min-width: 0; }
.project-header .title { margin-bottom: 6px; font-size: 30px; overflow-wrap: anywhere; }
.project-header .project-status { margin-top: 9px; }
.project-details-row { grid-column: 1 / -1; margin-top: 2px; padding-top: 12px; border-top: 1px solid var(--line); }
.eyebrow { color: var(--accent-deep); font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.title { max-width: 760px; font-family: Georgia, "Times New Roman", serif; font-size: 34px; line-height: 1.08; margin: 9px 0; color: var(--ink); }
.muted { color: var(--muted); font-size: 13px; line-height: 1.55; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 15px 0; border-bottom: 1px solid var(--line); }
.tab { min-height: 40px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); padding: 8px 13px; font-weight: 750; }
.tab.on { color: var(--accent-deep); border-color: var(--accent); }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin-bottom: 10px; }
.field label { font-size: 11px; color: var(--muted); font-weight: 700; }
.input { width: 100%; min-width: 0; max-width: 100%; color: var(--ink); background: var(--input-bg); border: 1px solid var(--line); border-radius: 7px; padding: 10px; outline: none; }
.input:focus { border-color: var(--teal); }
textarea.input { min-height: 110px; resize: vertical; }
.section { font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.chapter { padding: 14px 0; border-top: 1px solid var(--line); }
.chapter:first-child { border-top: 0; }
.chapter[data-chapter-card] { cursor: grab; transition: background .15s ease, box-shadow .15s ease, transform .15s ease; }
.chapter[data-chapter-card]:active { cursor: grabbing; }
.chapter[data-chapter-card].is-dragging { opacity: .55; }
.chapter[data-chapter-card].is-drop-target { background: color-mix(in srgb, var(--accent) 10%, transparent); box-shadow: inset 0 0 0 2px var(--accent); transform: translateY(2px); }
.chapter h3 { margin: 0 0 5px; font-size: 15px; }
.row .input { flex: 1; min-width: 160px; }
#standaloneMakeImageMode, #standaloneMakeAspect { flex: 1 1 calc(50% - 4px); width: calc(50% - 4px); min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
[data-collaboration-member] > .row > div, [data-collaboration-member] .row { min-width: 0; max-width: 100%; }
[data-collaboration-member] .row .input { min-width: 0; }
.draft { white-space: pre-wrap; line-height: 1.65; color: var(--ink); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 7px; padding: 13px; margin-top: 10px; }
.stat { display: inline-block; border-left: 3px solid var(--yellow); padding: 5px 9px; color: var(--muted); font-size: 11px; margin: 3px 3px 3px 0; }
.project-status { display: flex; flex-wrap: wrap; gap: 3px; }
.project-next-action { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center; min-height: 100%; padding: 13px; border-left: 4px solid var(--teal); border-radius: 6px; background: var(--positive-bg); color: var(--ink); }
.project-next-action-copy { display: grid; gap: 4px; min-width: 0; }
.project-next-action-label { color: var(--positive-ink); font-size: 11px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.project-next-action strong { font-size: 14px; line-height: 1.45; }
.project-next-action-button { align-self: center; white-space: nowrap; }
.project-workspace-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(250px,310px); gap: 16px; align-items: start; }
.project-panel { min-width: 0; }
.project-context { min-width: 0; }
.project-context-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 10px 30px var(--shadow); }
.project-context-panel > summary { display: grid; gap: 3px; padding: 13px 14px; color: var(--ink); font-weight: 800; cursor: pointer; list-style-position: inside; }
.project-context-count { color: var(--muted); font-size: 11px; font-weight: 650; }
.project-context-body { display: grid; gap: 0; padding: 0 14px 12px; }
.project-context-section { padding: 12px 0; border-top: 1px solid var(--line); }
.project-context-section h2 { margin: 0 0 7px; font: 800 12px/1.3 Inter, "Segoe UI", sans-serif; letter-spacing: .04em; text-transform: uppercase; }
.project-context-section p, .project-context-empty { display: block; margin: 0 0 7px; color: var(--muted); font-size: 12px; line-height: 1.48; overflow-wrap: anywhere; }
.project-context-constraint { color: var(--warning-ink) !important; }
.project-context-link { min-height: 32px; padding: 4px 0; border: 0; color: var(--accent-deep); background: transparent; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.project-start { display: grid; gap: 18px; padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 10px 30px var(--shadow); }
.project-start-copy { max-width: 720px; }
.project-start-copy h2 { margin: 6px 0; font: 700 26px/1.15 Georgia, "Times New Roman", serif; }
.project-start-copy p { margin: 0; color: var(--muted); line-height: 1.6; }
.project-format-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.project-format-choice { display: grid; gap: 7px; min-height: 132px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface-soft); text-align: left; }
.project-format-choice span { color: var(--accent-deep); font: 750 20px/1.15 Georgia, "Times New Roman", serif; }
.project-format-choice small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.project-format-choice:hover { border-color: var(--accent); }
.project-format-choice[aria-pressed="true"] { border: 2px solid var(--teal); background: var(--positive-bg); box-shadow: inset 0 0 0 1px var(--surface); }
.project-format-choice:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.project-sample-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px dashed var(--teal); border-radius: 8px; background: var(--positive-bg); }
.project-sample-card > div { display: grid; gap: 4px; min-width: 0; }
.project-sample-card b { color: var(--positive-ink); font-size: 14px; }
.project-sample-card span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.project-sample-card .btn { flex: 0 0 auto; }
.project-start-boundaries { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.project-start-boundaries article { display: grid; gap: 5px; padding: 13px; border-left: 3px solid var(--yellow); background: var(--surface-soft); }
.project-start-boundaries b { font-size: 13px; }
.project-start-boundaries span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.project-start-existing { padding-top: 2px; }
.dock-button:disabled, .btn:disabled { cursor: not-allowed; opacity: .55; }
.notice { color: var(--warning-ink); background: var(--warning-bg); border: 1px solid var(--warning-line); border-radius: 7px; padding: 10px; font-size: 12px; margin-top: 10px; }
.empty { color: var(--muted); padding: 18px 0; font-size: 13px; }
.guided-empty { display: grid; gap: 8px; margin-top: 14px; padding: 18px; border: 1px dashed color-mix(in srgb, var(--accent) 42%, var(--line)); border-radius: 16px; background: color-mix(in srgb, var(--accent) 5%, var(--panel)); color: var(--ink); }
.guided-empty .eyebrow { margin: 0; }
.guided-empty h3 { margin: 0; font-size: clamp(17px, 2vw, 21px); line-height: 1.18; }
.guided-empty p { margin: 0; max-width: 68ch; color: var(--muted); font-size: 13px; line-height: 1.55; }
.guided-empty .guided-empty-example { color: var(--ink); font-style: italic; }
.guided-empty .btn { justify-self: start; margin-top: 4px; }
.creative-avatar-panel { margin-top: 16px; border: 1px solid var(--line); border-radius: 8px; padding: 12px; min-height: 120px; background: var(--surface-soft); }
.creative-avatar-video { display: block; width: 100%; max-height: 420px; object-fit: cover; border-radius: 7px; }
.creative-avatar-status { margin-top: 8px; color: var(--muted); font-size: 12px; }
.creative-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.shot { overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.shot img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.shot .ov { display: flex; gap: 8px; padding: 9px; }
.production-meter { height: 8px; margin: 14px 0 10px; overflow: hidden; border-radius: 999px; background: var(--surface-soft); }
.production-meter-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--teal)); }
.production-progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.production-step { display: flex; gap: 7px; align-items: center; min-width: 0; padding: 8px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: 11px; line-height: 1.3; }
.production-step.complete { color: var(--positive-ink); border-color: var(--teal); background: var(--positive-bg); }
.production-shot { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.production-shot-head { justify-content: space-between; margin-bottom: 10px; }
.production-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
.production-fields .full { grid-column: 1 / -1; }
.production-fields textarea.input { min-height: 72px; }
.audiobook-chapter, .audiobook-chapter .production-fields, .audiobook-chapter .field { min-width: 0; max-width: 100%; overflow: hidden; }
.audiobook-chapter > summary { overflow-wrap: anywhere; }
.audiobook-chapter .input { width: 100%; min-width: 0; max-width: 100%; }
.production-new-shot { border-style: dashed; }
.creative-start-card { border-top: 4px solid var(--teal); margin-bottom: 14px; }
.creative-start-card .eyebrow { color: var(--teal); }
.creative-scene-card { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.creative-compass { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.creative-route-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.creative-route { display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); font-size: 12px; line-height: 1.45; }
.creative-route.selected { border-color: var(--teal); background: var(--positive-bg); }
.creative-route-head { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.creative-route h3 { margin: 0; font-size: 14px; }
.creative-route .btn { align-self: flex-start; margin-top: auto; }
.canon-card { border-top: 4px solid var(--teal); }
.creative-reference-form { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.reference-row h3 { margin: 0; font-size: 14px; }
.audio-envelope { margin-top: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
.audio-envelope svg { display: block; width: min(100%, 420px); height: 66px; overflow: visible; }
.audio-envelope-axis { stroke: var(--muted); stroke-width: 1; opacity: .5; }
.audio-envelope-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.audio-envelope-point { fill: var(--surface); stroke: var(--accent-deep); stroke-width: 2; }
.audio-waveform-editor { margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
.audio-waveform-editor > svg { display: block; width: 100%; height: 96px; margin-bottom: 6px; border-radius: 6px; background: color-mix(in srgb, var(--surface) 82%, transparent); }
.audio-waveform-bar { fill: var(--muted); opacity: .62; }
.audio-waveform-automation { stroke-width: 4; filter: drop-shadow(0 1px 0 var(--surface)); }
.device-mix-result { display: grid; gap: 8px; align-items: start; }
.device-mix-result audio, .device-mix-result video { display: block; width: min(100%, 640px); }
.device-mix-result video { max-height: 520px; border: 1px solid var(--line); border-radius: 9px; background: #071321; object-fit: contain; }
.device-mix-result .btn { width: fit-content; }
.continuity-drift-figure { display: grid; grid-template-columns: minmax(112px, 164px) minmax(0, 1fr); gap: 12px; align-items: center; margin: 10px 0 0; }
.continuity-drift-map { display: block; width: 100%; aspect-ratio: 1; color: var(--accent, #b60050); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); image-rendering: pixelated; }
.continuity-drift-figure figcaption { color: var(--muted); font-size: 12px; line-height: 1.45; }
.continuity-drift-breakdown { margin-top: 8px; }
.continuity-review-history { margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
.continuity-review-history > summary { cursor: pointer; font-weight: 700; }
.continuity-review-history ol { display: grid; gap: 8px; margin: 10px 0 0; padding-left: 24px; }
.continuity-review-history li { padding-left: 2px; overflow-wrap: anywhere; }
.continuity-review-field { align-content: start; gap: 6px; }
.continuity-field-note { min-width: 0; }
.waveform-controls { margin-top: 10px; }
.waveform-controls input[type="range"] { width: 100%; min-height: 34px; padding: 0; accent-color: var(--accent); }
.waveform-controls output { color: var(--ink); font-weight: 700; }
.capability-card { border-top: 4px solid var(--accent); }
.capability-status-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.capability-status-summary span { padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--muted); font-size: 11px; line-height: 1.25; }
.capability-status-summary b { display: block; color: var(--accent-deep); font-size: 18px; line-height: 1; margin-bottom: 3px; }
.capability-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 16px 0; }
.capability-metrics > div { padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
.capability-metrics strong { display: block; font: 700 24px/1 Georgia, "Times New Roman", serif; color: var(--accent-deep); }
.capability-metrics span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.3; }
.capability-list { display: grid; gap: 8px; }
.capability-row { padding: 13px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font-size: 13px; line-height: 1.5; }
.capability-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.capability-row h3 { margin: 0; font-size: 15px; }
.capability-gates { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.release-gate-list { display: grid; gap: 8px; margin-top: 10px; }
.release-gate { padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); font-size: 12px; line-height: 1.45; }
.release-campaigns, .release-campaigns details, .release-campaigns .card { min-width: 0; max-width: 100%; }
.release-campaigns summary { cursor: pointer; overflow-wrap: anywhere; }
.capability-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface-soft); font-size: 11px; font-weight: 800; white-space: nowrap; }
.capability-badge.done { color: var(--positive-ink); border-color: var(--teal); background: var(--positive-bg); }
.capability-badge.beta { color: var(--warning-ink); border-color: var(--warning-line); background: var(--warning-bg); }
.capability-badge.planned { color: var(--muted); border-style: dashed; }
.capability-badge.human { color: var(--accent-deep); border-color: var(--accent); background: var(--surface-soft); }
.capability-next { line-height: 1.5; }
.cost-reconciliation { margin: 14px 0; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
.cost-reconciliation-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cost-reconciliation .capability-status-summary { margin-bottom: 10px; }
.cost-reconciliation-table { margin-top: 12px; overflow-x: auto; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.rights-evidence-reference { overflow-wrap: anywhere; white-space: normal; }
.cost-reconciliation-table table { width: 100%; border-collapse: collapse; min-width: 650px; font-size: 12px; }
.cost-reconciliation-table th, .cost-reconciliation-table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.cost-reconciliation-table th { color: var(--accent-deep); background: var(--surface-soft); font-size: 11px; }
.cost-reconciliation-table tr:last-child td { border-bottom: 0; }
.evaluation-task-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.evaluation-task-grid > .card { min-width: 0; padding: 12px; }
.evaluation-task-grid textarea { min-width: 0; resize: vertical; }
.keep-thread-pass-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.keep-thread-pass { min-width: 0; padding: 12px; }
.keep-thread-pass .section { font-size: 17px; }
.keep-thread-pass textarea { min-width: 0; resize: vertical; }
.checkline { display: flex; align-items: flex-start; gap: 9px; color: var(--ink); font-size: 13px; line-height: 1.45; }
.checkline input { flex: 0 0 auto; margin-top: 3px; }
.command-dock { position: fixed; z-index: 20; left: 50%; bottom: 16px; width: min(1120px, calc(100vw - 28px)); transform: translateX(-50%); display: flex; justify-content: space-between; gap: 10px; padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 16px 42px var(--shadow); }
.command-dock-heading, .tabs-label { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.command-dock-heading { align-self: center; white-space: nowrap; }
.tabs-label { margin-top: 15px; }
.command-group { display: flex; gap: 5px; min-width: 0; }
.command-main { overflow-x: auto; scrollbar-width: thin; }
.dock-button { white-space: nowrap; }
.theme-choice { display: grid; gap: 3px; flex: 0 0 auto; align-content: center; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.theme-choice select { min-height: 38px; max-width: 176px; padding: 7px 27px 7px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--input-bg); font-size: 12px; font-weight: 700; letter-spacing: normal; text-transform: none; }
.command-main .dock-button:first-child { color: var(--on-accent); border-color: var(--accent); background: var(--accent); }
.command-project { position: relative; flex: 0 0 auto; }
.command-project > summary { display: block; list-style: none; user-select: none; }
.command-project > summary::-webkit-details-marker { display: none; }
.command-project > summary::after { content: ' ▴'; font-size: 10px; color: var(--muted); }
.command-project[open] > summary { border-color: var(--accent); color: var(--accent-deep); }
.command-menu { position: absolute; right: 0; bottom: calc(100% + 10px); width: min(280px, calc(100vw - 28px)); display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 16px 42px var(--shadow); }
.command-menu .dock-button { width: 100%; text-align: left; }
.conflict-dialog { width: min(520px, calc(100vw - 28px)); padding: 0; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 24px 70px rgba(20,36,74,.28); }
.conflict-dialog::backdrop { background: rgba(20,36,74,.58); backdrop-filter: blur(3px); }
.conflict-card { padding: 24px; background: var(--surface); }
.conflict-card h2 { margin: 7px 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: 25px; }
.conflict-card p { margin: 0 0 8px; line-height: 1.55; }
.conflict-actions { justify-content: flex-end; margin-top: 20px; }
.visual-comparison-dialog { width: min(980px, calc(100vw - 28px)); }
.visual-comparison-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.visual-comparison-figure { min-width: 0; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--input-bg); }
.visual-comparison-image { display: block; width: 100%; max-height: min(58vh, 520px); object-fit: contain; border-radius: 5px; background: var(--surface); }
.visual-comparison-figure figcaption { margin-top: 8px; overflow-wrap: anywhere; font-size: 12px; font-weight: 700; }
.visual-comparison-missing { min-height: 160px; display: grid; place-items: center; text-align: center; }
@media (max-width: 640px) { .visual-comparison-grid { grid-template-columns: 1fr; } }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
html[data-creative-theme="atelier"] body { background-image: radial-gradient(#a9764515 1px,transparent 1px); background-size: 10px 10px; }
html[data-creative-theme="atelier"] .hero, html[data-creative-theme="atelier"] .card { border-radius: 20px; }
html[data-creative-theme="atelier"] .btn, html[data-creative-theme="atelier"] .dock-button { border-radius: 22px; }
html[data-creative-theme="atelier"] .hero { box-shadow: 0 7px 0 #e8d9c8; }
html[data-creative-theme="atelier"] .title { font-style: italic; }
html[data-creative-theme="editorial"] .hero, html[data-creative-theme="editorial"] .card { border-radius: 3px; box-shadow: none; }
html[data-creative-theme="editorial"] .card { border-width: 0 0 1px; }
html[data-creative-theme="editorial"] .btn, html[data-creative-theme="editorial"] .dock-button, html[data-creative-theme="editorial"] .input { border-radius: 3px; }
html[data-creative-theme="editorial"] .section { letter-spacing: -.02em; }
html[data-creative-theme="midnight"] .brand img, html[data-creative-theme="midnight"] .gate-logo { background: #fffaf2; border-radius: 7px; padding: 3px 9px; }
html[data-creative-theme="midnight"] .hero, html[data-creative-theme="midnight"] .card { border-radius: 4px; }
html[data-creative-theme="midnight"] .hero { border-top-width: 6px; }
html[data-creative-theme="midnight"] .title, html[data-creative-theme="midnight"] .section { font-family: "Arial Narrow", Impact, "Segoe UI", sans-serif; font-weight: 850; text-transform: uppercase; letter-spacing: -.02em; }
html[data-creative-theme="midnight"] .eyebrow, html[data-creative-theme="midnight"] .command-dock-heading, html[data-creative-theme="midnight"] .tabs-label { font-family: ui-monospace, monospace; }
html[data-creative-theme="midnight"] .btn, html[data-creative-theme="midnight"] .dock-button, html[data-creative-theme="midnight"] .input { border-radius: 3px; }
@media (max-width: 900px) { .command-dock { justify-content: flex-start; } .command-main { flex: 1 1 auto; } .project-header { grid-template-columns: 1fr; } .project-details-row { grid-column: auto; } .project-workspace-layout { grid-template-columns: 1fr; } .project-context { grid-row: 1; } .project-panel { grid-row: 2; } .project-format-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .shell { padding: 20px 14px 122px; } .grid { grid-template-columns: 1fr; } .top { align-items: flex-start; flex-direction: column; } .brand img { width: min(300px, 86vw); height: 52px; } .title, .project-header .title { font-size: 28px; } .hero, .card { padding: 16px; } }
@media (max-width: 700px) { .production-progress { grid-template-columns: repeat(2, minmax(0, 1fr)); } .production-fields { grid-template-columns: 1fr; } .production-fields .full { grid-column: auto; } .creative-route-list, .evaluation-task-grid, .keep-thread-pass-grid { grid-template-columns: 1fr; } .capability-metrics, .capability-status-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } .project-start-boundaries { grid-template-columns: 1fr; } .cost-reconciliation-head { align-items: stretch; flex-direction: column; } }
@media (max-width: 640px) {
  .shell { padding-bottom: 24px; }
  .command-dock { position: sticky; top: 8px; bottom: auto; left: auto; transform: none; margin: 0 auto 12px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 7px; }
  .command-dock-heading { grid-column: 1 / -1; }
  .theme-choice { grid-column: 1 / -1; grid-row: 2; }
  .theme-choice select { max-width: none; width: 100%; }
  .command-main { grid-column: 1; grid-row: 3; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); overflow: visible; width: 100%; }
  .command-main .dock-button { min-width: 0; padding-inline: 7px; text-align: center; }
  .command-project { grid-column: 2; grid-row: 3; align-self: start; display: block; }
  .command-project > summary { display: flex; align-items: center; justify-content: center; gap: 3px; min-height: 38px; }
}
@media (max-width: 520px) {
  .conflict-actions { align-items: stretch; flex-direction: column; }
  .conflict-actions .btn { width: 100%; }
  .row > .btn, .row > .input { flex: 1 1 100%; }
  .row > select.input { flex: 0 0 100%; width: 100%; min-width: 0; max-width: 100%; }
  #standaloneMakeImageMode, #standaloneMakeAspect { flex: 0 0 100%; width: 100%; min-width: 0; max-width: 100%; }
  .project-next-action { grid-template-columns: 1fr; }
  .project-next-action-button { width: 100%; }
  .project-format-grid { grid-template-columns: 1fr; }
  .project-format-choice { min-height: 0; }
  .project-sample-card { align-items: stretch; flex-direction: column; }
  .project-sample-card .btn { width: 100%; }
  .guided-empty .btn { justify-self: stretch; width: 100%; }
  [data-collaboration-member] > .row { align-items: stretch; flex-direction: column; }
  [data-collaboration-member] > .row > .row, [data-collaboration-member] .row > .btn { width: 100%; }
  .release-gate .capability-row-head { align-items: flex-start; flex-direction: column; }
  .release-gate .capability-badge { max-width: 100%; white-space: normal; }
}
@media (max-width: 360px) {
  .shell { padding-inline: 10px; }
  /* At narrow widths the dock is sticky inside .shell. 100vw includes the
     desktop scrollbar in Chromium/Electron and can create a small horizontal
     overflow; size it to its containing block instead. */
  .command-dock { width: 100%; max-width: 100%; padding: 6px; }
  .dock-button { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media (forced-colors: active) {
  .btn.primary, .command-main .dock-button:first-child { border: 2px solid ButtonText; }
  .notice, .stat, .project-context-panel, .project-context-section, .project-start, .project-format-choice, .project-sample-card, .project-start-boundaries article, .guided-empty { border-color: CanvasText; }
  .audio-envelope-line, .audio-envelope-point, .audio-envelope-axis { stroke: CanvasText; }
  .audio-envelope-point { fill: Canvas; }
  .audio-waveform-editor, .audio-waveform-editor > svg { border-color: CanvasText; background: Canvas; }
  .audio-waveform-bar { fill: CanvasText; opacity: .7; }
  .continuity-drift-map { color: CanvasText; border-color: CanvasText; background: Canvas; }
}

@media (max-width: 520px) {
  .continuity-drift-figure { grid-template-columns: minmax(96px, 128px) minmax(0, 1fr); }
}

/* Sign-in gate (standalone studio) */
.gate-account{display:block;width:min(100%,360px);margin:18px auto 0;justify-content:center}
.creative-gate-actions{justify-content:center;margin-top:12px}
.creative-full-width{width:100%;margin-top:12px}
.creative-section-heading{margin-top:18px}
.creative-project-type{margin-top:12px}
.creative-adapt-option{display:flex;gap:10px;align-items:flex-start;margin-top:14px}
.creative-adapt-option input{margin-top:4px}
.gate { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; background: rgba(20, 36, 74, .55); backdrop-filter: blur(4px); }
.gate[hidden] { display: none; }
.gate-card { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px 26px 22px; text-align: center; box-shadow: 0 24px 60px rgba(20, 36, 74, .25); }
.gate-logo { width: 220px; height: 44px; object-fit: contain; }
.gate-card h1 { font-family: Georgia, "Times New Roman", serif; font-size: 30px; margin: 14px 0 6px; }
.gate-card p { color: var(--muted); margin: 0 0 16px; line-height: 1.5; }
.gate-google { display: flex; justify-content: center; min-height: 44px; }
.gate-note { font-size: 12px; margin-top: 12px; }
.creative-toasts { position: fixed; right: 18px; top: 18px; z-index: 50; display: grid; gap: 8px; max-width: min(360px, calc(100vw - 36px)); }
.creative-toast { padding: 11px 14px; border: 1px solid rgba(255,255,255,.16); border-radius: 12px; background: #090f1e; box-shadow: 0 10px 30px rgba(0,0,0,.28); color: #eaf2ff; font: 600 13px/1.35 Segoe UI, Arial, sans-serif; }
.creative-toast-bad { border-color: #ff7676; }
.creative-toast-good { border-color: #55d6b0; }

/* Proposal actions remain visibly inactive once applied or stale. */
[data-director-panel] button:disabled { opacity: .5; cursor: not-allowed; }
[data-director-panel] summary { cursor: pointer; padding: 10px 0; }
[data-director-panel] summary:focus-visible { outline: 2px solid var(--accent, #b60050); outline-offset: 3px; }

/* Marketing Studio — a guided path and a professional control room share one project state. */
.marketing-studio{display:grid;gap:16px}.marketing-studio-head{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,240px);gap:24px;align-items:end;padding:24px;border:1px solid var(--line);border-radius:12px;background:linear-gradient(135deg,var(--surface),var(--surface-soft))}.marketing-studio-head h2{margin:0 0 8px;font:700 clamp(28px,4vw,46px)/1.05 Georgia,"Times New Roman",serif}.marketing-studio-head p{max-width:720px;margin:0;color:var(--muted);line-height:1.6}.marketing-mode{display:grid;gap:6px;font-weight:800}.marketing-boundary{border-left:5px solid var(--warning-line)}.marketing-subnav{display:flex;gap:8px;overflow-x:auto;padding:3px 1px 8px}.marketing-subnav .btn{flex:0 0 auto}.marketing-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.marketing-grid>.card{margin:0}.marketing-span{grid-column:1/-1}.marketing-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:14px 0}.marketing-metrics span{display:grid;gap:3px;min-height:74px;padding:12px;border:1px solid var(--line);border-radius:8px;background:var(--surface-soft);font-size:12px;color:var(--muted)}.marketing-metrics b{font-size:22px;color:var(--ink)}.marketing-paths{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}.marketing-paths div{display:grid;gap:5px;padding:14px;border:1px solid var(--line);border-radius:8px}.marketing-paths span,.marketing-row span,.marketing-content-head span,.marketing-template span,.marketing-agent span{color:var(--muted);font-size:12px;line-height:1.45}.marketing-fieldset{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0;padding:12px;border:1px solid var(--line);border-radius:8px}.marketing-fieldset legend{padding:0 6px;font-weight:800}.marketing-check{display:flex;gap:6px;align-items:center;padding:7px 9px;border-radius:6px;background:var(--surface-soft)}.marketing-row,.marketing-content{border-top:1px solid var(--line);padding:13px 0}.marketing-row{display:flex;justify-content:space-between;align-items:center;gap:12px}.marketing-row>div,.marketing-content-head>div{display:grid;gap:4px}.marketing-content-head{display:flex;justify-content:space-between;gap:14px;align-items:start}.marketing-content p{white-space:pre-wrap;line-height:1.55}.marketing-content small{display:block;margin-top:9px;color:var(--muted)}.marketing-agent-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}.marketing-agent,.marketing-template{display:grid;gap:4px;width:100%;padding:13px;text-align:left;color:inherit;border:1px solid var(--line);border-radius:8px;background:var(--surface);cursor:pointer}.marketing-agent:hover,.marketing-template:hover{border-color:var(--accent)}.marketing-template{margin-top:8px}.marketing-brief{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:13px;line-height:1.55;color:var(--ink)}
@media(max-width:760px){.marketing-studio-head,.marketing-grid{grid-template-columns:1fr}.marketing-span{grid-column:auto}.marketing-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.marketing-paths,.marketing-agent-grid{grid-template-columns:1fr}.marketing-row,.marketing-content-head{align-items:stretch;flex-direction:column}.marketing-row>.btn,.marketing-content-head>.btn{width:100%}}
.marketing-edit-fields{margin-top:14px}.marketing-edit-fields textarea{min-height:150px}.marketing-brief-edit{width:100%;min-height:240px;margin:10px 0}
.marketing-mode-controls{display:grid;gap:12px;min-width:0}.marketing-language-note{font-size:13px;line-height:1.5}
.marketing-subnav-guided [data-step-state="done"]{border-color:var(--success-line,#65a881)}.marketing-subnav-guided [aria-current="step"]{box-shadow:inset 0 -3px var(--accent)}.marketing-subnav-extra{opacity:.78}.marketing-stage-intro{padding:16px 20px;border:1px solid var(--line);border-left:5px solid var(--accent);border-radius:8px;background:var(--surface-soft)}.marketing-stage-intro b{font-size:16px}.marketing-stage-intro p{margin:6px 0 0;color:var(--muted);line-height:1.5}.marketing-journey-list{display:grid;gap:8px;margin:14px 0;padding:0;list-style:none}.marketing-journey-list li{display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px;border:1px solid var(--line);border-radius:8px}.marketing-journey-list li>span{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--surface-soft);font-weight:800}.marketing-journey-list li.done>span{background:#d9f0e3;color:#14532d}.marketing-journey-list li>div{display:grid;gap:3px;min-width:0}.marketing-journey-list small{color:var(--muted)}
.marketing-studio{min-width:0;grid-template-columns:minmax(0,1fr)}.marketing-subnav{min-width:0}
@media(max-width:760px){.marketing-studio-head{grid-template-columns:minmax(0,1fr)}.marketing-studio-head>div{min-width:0}.marketing-studio-head h2,.marketing-studio-head p{overflow-wrap:anywhere}}
.marketing-mode-controls{overflow-x:hidden}.marketing-mode{grid-template-columns:minmax(0,1fr);min-width:0}.marketing-mode .input{box-sizing:border-box;width:100%;max-width:100%;min-width:0}
@media(max-width:360px){.marketing-journey-list li{grid-template-columns:28px minmax(0,1fr)}.marketing-journey-list li>.btn{grid-column:2;justify-self:start}}
@media(max-width:360px){.marketing-metrics{grid-template-columns:1fr}.marketing-studio-head{padding:16px}.marketing-subnav{margin-inline:-4px}}
/* Curriculum-led lesson workspace */
.lesson-studio{display:grid;gap:16px;min-width:0}
.lesson-studio .card{min-width:0;margin:0}
.lesson-studio h2{font-size:clamp(1.5rem,3vw,2.4rem);line-height:1.12;max-width:26ch}
.lesson-studio p{line-height:1.6;max-width:85ch}
.lesson-studio summary{cursor:pointer;display:flex;flex-wrap:wrap;align-items:center;gap:12px;min-height:44px}
.lesson-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:18px 0}
.lesson-fields .field,.lesson-studio .input{min-width:0;max-width:100%;width:100%;box-sizing:border-box}
.lesson-fields .field{display:grid;gap:8px}
.lesson-wide{grid-column:1/-1}
.lesson-studio textarea{resize:vertical;min-height:120px}
.lesson-studio .actions{flex-wrap:wrap;gap:10px;margin:14px 0}
.lesson-studio .btn{white-space:normal;overflow-wrap:anywhere;min-height:44px}
.lesson-progress{display:flex;flex-wrap:wrap;gap:16px}
.lesson-state{font-size:.85rem;padding:4px 10px;border:1px solid currentColor;border-radius:20px}
.lesson-checks{border:1px solid var(--line,#98a0ad);border-radius:12px;padding:14px;min-width:0}
.lesson-check{display:flex;align-items:flex-start;gap:10px;min-height:44px;padding:6px 0}
.lesson-check input{flex:none;width:20px;height:20px;margin-top:2px}
.lesson-suggestion{border-left:3px solid var(--accent,#d14d90);padding:12px 20px;margin:18px 0;background:var(--panel,transparent)}
.lesson-suggestion pre{font:inherit;white-space:pre-wrap;overflow-wrap:anywhere}
#lessonNotice{overflow-wrap:anywhere;font-weight:600}
@media(max-width:600px){.lesson-fields{grid-template-columns:minmax(0,1fr)}.lesson-studio .card{padding:16px}.lesson-studio .actions .btn{width:100%}.lesson-state{max-width:100%;box-sizing:border-box}}
