:root {
  --ink: #253735;
  --muted: #687976;
  --paper: #f4f6f5;
  --card: #ffffff;
  --line: #e1e8e5;
  --teal: #236d60;
  --teal-soft: #e9f3ee;
  --terracotta: #bc5b2d;
  --shadow: 0 3px 14px rgba(31, 55, 46, .035);
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; background: var(--paper); }
button, input, textarea, select { font: inherit; }
#image-model-select { width: 100%; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--ink); font-size: 12px; }
button { cursor: pointer; }

.auth-pending > .topbar, .auth-pending > .workspace { visibility: hidden; }
.auth-gate { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 28px; background: var(--paper); }
.auth-gate[hidden] { display: none; }
.auth-card { width: min(390px, calc(100vw - 40px)); padding: 34px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 22px 70px rgba(31, 38, 39, .13); }
.auth-brand-mark { margin-bottom: 22px; }
.auth-card h1 { margin-top: 7px; }
.auth-card p { margin-top: 11px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.auth-card label { margin-top: 24px; }
.auth-card input { width: 100%; margin-top: 7px; padding: 12px; color: var(--ink); background: #fbfaf6; border: 1px solid #c9c6bd; border-radius: 9px; outline: none; }
.auth-card input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(33,108,105,.11); }
.auth-card .primary-button { width: 100%; margin-top: 12px; }
.auth-status { min-height: 18px; margin-top: 10px; color: var(--muted); font-size: 10px; line-height: 1.4; text-align: center; }
.auth-status.error { color: #a84235; }

.topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; min-height: 70px; padding: 0 28px; background: var(--card); border-bottom: 1px solid var(--line); }
.topbar-start { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: white; background: var(--teal); border-radius: 9px; font: 700 19px "Fraunces", serif; }
.brand strong, .brand small { display: block; }.brand strong { font: 700 19px "Fraunces", serif; }.brand small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.sidebar-toggle-button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; color: var(--teal); background: #fbfaf6; border: 1px solid var(--line); border-radius: 8px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.sidebar-toggle-button:hover, .sidebar-toggle-button[aria-expanded="true"] { background: var(--teal-soft); border-color: #9fc6bf; }
.sidebar-toggle-icon { font-size: 13px; line-height: 1; }
.project-context { position: relative; }
.project-menu-button { display: grid; grid-template-columns: 1fr auto; min-width: 230px; padding: 7px 30px 7px 10px; color: var(--ink); background: #fbfaf6; border: 1px solid var(--line); border-radius: 8px; text-align: left; position: relative; }
.project-menu-button > span:first-child { color: var(--muted); font: 500 8px "DM Mono", monospace; letter-spacing: .06em; text-transform: uppercase; }
.project-menu-button strong { grid-column: 1; margin-top: 2px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.project-menu-caret { position: absolute; top: 50%; right: 10px; color: var(--teal); transform: translateY(-50%); transition: transform .15s; }.project-menu-button[aria-expanded="true"] .project-menu-caret { transform: translateY(-50%) rotate(180deg); }
.project-menu-button:hover, .project-menu-button[aria-expanded="true"] { border-color: #9fc6bf; background: var(--teal-soft); }
.project-menu-button:disabled { cursor: wait; opacity: .65; }
.project-menu { position: absolute; z-index: 20; top: calc(100% + 8px); left: 50%; width: min(460px, calc(100vw - 32px)); padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 20px 60px rgba(31,38,39,.18); transform: translateX(-50%); }
.project-menu[hidden] { display: none; }
.project-menu-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 3px 3px 10px; border-bottom: 1px solid var(--line); }
.project-menu-heading span, .project-menu-heading strong { display: block; }.project-menu-heading span { color: var(--teal); font: 500 8px "DM Mono", monospace; letter-spacing: .06em; text-transform: uppercase; }.project-menu-heading strong { margin-top: 3px; font-size: 11px; }
.project-menu-list { display: grid; gap: 7px; max-height: 360px; margin-top: 10px; overflow-y: auto; }
.project-menu-empty { padding: 20px 12px; color: var(--muted); text-align: center; font-size: 10px; }
.project-menu-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px; background: #f7f5ef; border: 1px solid var(--line); border-radius: 8px; }
.project-menu-item.active { background: var(--teal-soft); border-color: #9fc6bf; }
.project-menu-item strong, .project-menu-item code, .project-menu-item span { display: block; }.project-menu-item strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.project-menu-item code { margin-top: 3px; color: var(--muted); font: 500 8px "DM Mono", monospace; }.project-menu-item span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.project-menu-actions { display: flex; gap: 6px; }.project-resume-button, .project-delete-button { padding: 7px 9px; border-radius: 7px; font-size: 9px; font-weight: 700; }.project-resume-button { color: var(--teal); background: white; border: 1px solid #9fc6bf; }.project-resume-button:disabled { cursor: default; opacity: .6; }.project-delete-button { color: #a84235; background: #fff8f6; border: 1px solid #dfb7af; }.project-delete-button:hover { background: #f6e3df; }
.new-project-button { padding: 8px 10px; color: var(--teal); background: var(--teal-soft); border: 0; border-radius: 8px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.new-project-button:hover { background: #cce6e1; }.new-project-button:disabled { cursor: wait; opacity: .65; }
.sign-out-button { justify-self: end; padding: 8px 10px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 8px; font-size: 9px; font-weight: 700; }
.sign-out-button:hover { color: #a84235; background: #fff8f6; border-color: #dfb7af; }

.workspace { display: grid; grid-template-columns: minmax(540px, 1fr); gap: 20px; width: min(1280px, calc(100% - 40px)); margin: 20px auto 40px; align-items: start; }
.workspace.sidebar-open { grid-template-columns: 330px minmax(540px, 1fr); }
.input-stack { display: grid; gap: 20px; min-width: 0; }
.input-sidebar { align-self: start; padding: 0 0 18px; }
.input-sidebar[hidden] { display: none; }
.input-sidebar-close { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 8px; font-size: 20px; line-height: 1; }
.input-sidebar-close:hover { color: var(--teal); background: var(--teal-soft); border-color: #9fc6bf; }
.output-stack { display: grid; gap: 16px; min-width: 0; }
.scenario-nav { padding: 13px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow); }
.scenario-nav-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.scenario-nav-meta { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.scenario-nav-meta > span:last-child { color: var(--muted); font-size: 9px; }
.snapshot-toolbar { display: grid; gap: 6px; margin-top: 10px; padding: 10px; background: #f7f5ef; border: 1px solid var(--line); border-radius: 9px; }
.snapshot-toolbar label { color: var(--muted); font: 500 8px "DM Mono", monospace; letter-spacing: .06em; text-transform: uppercase; }
.snapshot-controls { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto; gap: 7px; }
.snapshot-controls select { min-width: 0; padding: 8px 28px 8px 9px; color: var(--ink); background: white; border: 1px solid #c9c6bd; border-radius: 7px; outline: none; font: 500 10px "DM Sans", sans-serif; transition: border-color .15s, box-shadow .15s; }
.snapshot-controls select:focus { border-color: #65a99f; box-shadow: 0 0 0 3px rgba(33,108,105,.11); }
.snapshot-controls option.active-snapshot { color: #174f4c; background: var(--teal-soft); font-weight: 700; }
.snapshot-button { padding: 8px 10px; color: var(--teal); background: white; border: 1px solid #9fc6bf; border-radius: 7px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.snapshot-button.primary { color: white; background: var(--teal); border-color: var(--teal); }
.snapshot-button.danger { color: #a84235; background: #fff8f6; border-color: #dfb7af; }
.snapshot-button.danger:not(:disabled):hover { background: #f6e3df; }
.snapshot-button:disabled, .snapshot-controls select:disabled { cursor: default; opacity: .5; }
.snapshot-status { min-height: 13px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.snapshot-status.success { color: var(--teal); }.snapshot-status.error { color: #a84235; }
.scenario-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; margin-top: 9px; }
.scenario-empty { margin: 0; padding: 12px; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; background: #fffefa; }
.scenario-tab { min-width: 0; padding: 11px; color: var(--muted); background: #f7f5ef; border: 1px solid var(--line); border-radius: 9px; text-align: left; transition: border-color .15s, background .15s, box-shadow .15s; }
.scenario-tab-heading { display: flex; align-items: baseline; gap: 7px; color: var(--ink); }.scenario-tab-heading strong { font-size: 11px; line-height: 1.3; }.scenario-index { flex: 0 0 auto; color: var(--teal); font: 500 8px "DM Mono", monospace; }
.scenario-tab-description { display: block; margin-top: 7px; font-size: 9px; font-weight: 500; line-height: 1.4; }
.scenario-tab:hover { border-color: #9fc6bf; }.scenario-tab.active { background: var(--teal-soft); border-color: #7db9ae; box-shadow: inset 3px 0 0 var(--teal); }
.scenario-details { padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow); }
.scenario-details[hidden] { display: none; }
.scenario-details-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.scenario-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 15px 0 0; }
.scenario-facts > div { padding: 10px; background: #f7f5ef; border: 1px solid var(--line); border-radius: 8px; }
.scenario-facts > div.wide { grid-column: 1 / -1; }
.scenario-facts dt { color: var(--teal); font: 500 8px "DM Mono", monospace; letter-spacing: .06em; text-transform: uppercase; }
.scenario-facts dd { margin: 5px 0 0; color: var(--ink); font-size: 10px; font-weight: 600; line-height: 1.45; }
.scenario-flow { display: grid; gap: 5px; margin: 0; padding-left: 18px; }.scenario-flow li { padding-left: 2px; }
.scenario-evidence-list { margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); }
.scenario-evidence-list h3 { margin: 0 0 8px; font-size: 11px; }
.scenario-evidence { margin: 7px 0 0; padding: 9px 11px; background: #fbfaf6; border: 0; border-left: 3px solid var(--terracotta); border-radius: 0 7px 7px 0; }
.scenario-evidence strong { color: var(--terracotta); font: 500 8px "DM Mono", monospace; text-transform: uppercase; }
.scenario-evidence p { margin-top: 4px; color: #566164; font-size: 10px; line-height: 1.45; }
.scenario-detail-empty { color: var(--muted); font-size: 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.transcript-card { position: relative; padding: 22px; }
.transcript-card > .input-sidebar-close { position: absolute; top: 9px; right: 10px; }
.transcript-card > .section-kicker { padding-right: 32px; min-height: 20px; }
.storyboard-section { padding: 22px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.section-kicker { color: var(--teal); font: 500 9px/1.2 "DM Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, p { margin: 0; } h1 { margin-top: 7px; font: 700 25px/1.05 "Fraunces", serif; } h2 { margin-top: 5px; font: 700 21px/1.1 "Fraunces", serif; }
.section-intro { margin-top: 11px; color: var(--muted); font-size: 12px; line-height: 1.5; }
label { display: block; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.audio-upload { margin-top: 18px; padding: 12px; background: #f7f5ef; border: 1px solid var(--line); border-radius: 9px; }
.audio-file-input { width: 100%; margin-top: 7px; color: var(--muted); font-size: 10px; }
.audio-file-input::file-selector-button { margin-right: 8px; padding: 7px 9px; color: var(--teal); background: white; border: 1px solid #9fc6bf; border-radius: 7px; font: 700 10px "DM Sans", sans-serif; cursor: pointer; }
.audio-file-input:disabled::file-selector-button { cursor: not-allowed; opacity: .65; }
.audio-transcribe-button { width: 100%; margin-top: 10px; }
.audio-help { margin-top: 8px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.audio-status { margin-top: 8px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.audio-status.success { color: #1b5754; }.audio-status.warning { color: #89451f; }.audio-status.error { color: #a84235; }.audio-status.busy { color: var(--teal); }
.input-divider { display: flex; align-items: center; gap: 9px; margin-top: 16px; color: var(--muted); font: 500 8px "DM Mono", monospace; letter-spacing: .06em; text-transform: uppercase; }
.input-divider::before, .input-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.transcript-label-row { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: 18px; }
.transcript-view-button { padding: 0; color: var(--teal); background: transparent; border: 0; font-size: 10px; font-weight: 700; }.transcript-view-button:hover { text-decoration: underline; }.transcript-view-button:disabled { cursor: wait; opacity: .6; }
textarea { width: 100%; min-height: 310px; margin-top: 7px; padding: 12px; resize: vertical; color: var(--ink); background: #fbfaf6; border: 1px solid #c9c6bd; border-radius: 9px; outline: none; font: 400 11px/1.55 "DM Mono", monospace; }
textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(33,108,105,.11); }
.chat-view { display: flex; flex-direction: column; gap: 10px; min-height: 310px; max-height: 520px; margin-top: 7px; padding: 12px; overflow-y: auto; background: #fbfaf6; border: 1px solid #c9c6bd; border-radius: 9px; }
.chat-view[hidden] { display: none; }
.chat-turn { display: flex; flex-direction: column; align-items: flex-start; max-width: 88%; }.chat-turn.side-right { align-self: flex-end; align-items: flex-end; }
.chat-speaker { margin: 0 7px 4px; color: var(--speaker-ink); font: 700 9px "DM Mono", monospace; }
.chat-bubble { padding: 9px 11px; color: var(--speaker-ink); background: var(--speaker-bg); border: 1px solid var(--speaker-border); border-radius: 5px 12px 12px 12px; font-size: 11px; line-height: 1.48; white-space: pre-wrap; overflow-wrap: anywhere; }.side-right .chat-bubble { border-radius: 12px 5px 12px 12px; }
.chat-status { margin-top: 7px; color: var(--muted); font-size: 9px; line-height: 1.4; }.chat-status.success { color: var(--teal); }.chat-status.warning { color: #89451f; }.chat-status.error { color: #a84235; }
.scenario-count-control { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.scenario-count-control input { width: 92px; padding: 7px 9px; color: var(--ink); background: #fbfaf6; border: 1px solid #c9c6bd; border-radius: 7px; outline: none; font: 500 10px "DM Mono", monospace; text-transform: lowercase; }
.scenario-count-control input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(33,108,105,.11); }
.scenario-count-control input:disabled { cursor: not-allowed; opacity: .65; }
.scenario-count-help { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.4; }.scenario-count-help strong { color: var(--teal); font-family: "DM Mono", monospace; }
.primary-button, .secondary-button, .stage-button { border: 0; border-radius: 8px; font-weight: 700; transition: background .15s, transform .1s; }.primary-button:active, .secondary-button:active, .stage-button:active { transform: translateY(1px); }
.primary-button { width: 100%; margin-top: 10px; padding: 11px; color: white; background: var(--teal); }.primary-button:hover { background: #185956; }
.pipeline-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 8px; }
.pipeline-actions .stage-button { width: 100%; }
.secondary-button { padding: 9px 11px; color: var(--teal); background: var(--teal-soft); font-size: 11px; }.secondary-button:hover { background: #cce6e1; }
.stage-button { padding: 9px 12px; color: white; background: var(--teal); font-size: 11px; }.stage-button:hover { background: #185956; }
.primary-button:disabled, .secondary-button:disabled, .stage-button:disabled { cursor: not-allowed; opacity: .65; }
.output-card-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.output-card-actions .text-link { padding: 5px 0; }
.status { display: flex; align-items: center; gap: 7px; min-height: 34px; margin-top: 9px; padding: 8px 9px; color: var(--muted); background: #f7f5ef; border: 1px solid var(--line); border-radius: 7px; font-size: 10px; font-weight: 600; line-height: 1.4; }
.status::before { content: ""; flex: 0 0 auto; width: 7px; height: 7px; background: #9da3a5; border-radius: 50%; }.status.busy { color: #1b5754; background: var(--teal-soft); }.status.busy::before, .status.success::before { background: var(--teal); }.status.success { color: #1b5754; background: #e3f1e9; }.status.warning { color: #89451f; background: #f7dfcd; }.status.warning::before { background: var(--terracotta); }.status.error { color: #a84235; background: #f6e3df; }.status.error::before { background: #a84235; }
.helper { margin-top: 10px; color: var(--muted); font-size: 10px; line-height: 1.45; }.helper code { color: var(--teal); font-family: "DM Mono", monospace; }
.text-link { color: var(--teal); font-size: 10px; font-weight: 700; text-decoration: none; }.text-link:hover { text-decoration: underline; }
.scenario-summary { max-width: 680px; margin-top: 9px; color: var(--muted); font-size: 11px; line-height: 1.45; }

.image-output { overflow: hidden; margin-top: 17px; background: #f0eee8; border: 1px solid var(--line); border-radius: 10px; }
.image-output img { display: block; width: 100%; height: auto; object-fit: contain; }.image-placeholder { display: grid; place-items: center; min-height: 105px; padding: 20px; color: var(--muted); text-align: center; font-size: 11px; line-height: 1.5; }
.image-status { min-height: 16px; margin-top: 7px; color: var(--muted); font-size: 10px; }.image-status.error { color: #a84235; }.image-status.warning { color: #89451f; }.image-status.success { color: var(--teal); }
.storyboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 9px; margin-top: 14px; }
.panel { min-width: 0; padding: 11px; background: #fbfaf6; border: 1px solid var(--line); border-radius: 9px; }.panel-number { color: var(--teal); font: 500 9px "DM Mono", monospace; }.panel h3 { margin: 7px 0 0; font-size: 12px; line-height: 1.25; }.panel p { margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.5; }

.project-dialog { width: min(430px, calc(100% - 32px)); padding: 0; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 80px rgba(31, 38, 39, .22); }
.project-dialog::backdrop { background: rgba(34, 41, 44, .42); backdrop-filter: blur(2px); }
.project-dialog form { padding: 24px; }.project-dialog h2 { margin-top: 7px; }.project-dialog p { margin-top: 10px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.project-dialog label { margin-top: 18px; }
.project-dialog input { width: 100%; margin-top: 7px; padding: 10px 11px; color: var(--ink); background: #fbfaf6; border: 1px solid #c9c6bd; border-radius: 8px; outline: none; font: 500 12px "DM Sans", sans-serif; }
.project-dialog input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(33,108,105,.11); }
.project-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.dialog-cancel-button { padding: 9px 12px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 8px; font-size: 11px; font-weight: 700; }
.dialog-status { min-height: 16px; margin-top: 8px; color: #a84235; font-size: 10px; }

@media (max-width: 980px) { body { min-width: 680px; }.workspace { grid-template-columns: minmax(380px, 1fr); }.workspace.sidebar-open { grid-template-columns: 280px minmax(380px, 1fr); }.topbar { padding: 0 18px; }.project-menu-button { min-width: 190px; } }
@media (max-width: 760px) { .snapshot-controls { grid-template-columns: 1fr 1fr; }.snapshot-controls select { grid-column: 1 / -1; } }

/* A quiet workspace with clear hierarchy and comfortable reading sizes. */
.topbar { min-height: 80px; padding: 12px 32px; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; }
.brand strong { font-family: "DM Sans", sans-serif; letter-spacing: -.6px; font-size: 21px; }
.brand small { font-size: 11px; }
.workspace { width: min(1480px, calc(100% - 24px)); gap: 12px; margin: 12px auto 20px; }
.workspace.sidebar-open { grid-template-columns: 360px minmax(0, 1fr); }
.input-sidebar { min-height: 0; }
.input-stack { gap: 10px; }
.card, .scenario-nav, .scenario-details { border-radius: 16px; }
.scenario-nav, .scenario-details, .storyboard-section { padding: 16px; }
.transcript-card { padding: 18px; }
.output-stack { gap: 12px; }
h1, h2 { font-family: "DM Sans", sans-serif; font-weight: 650; letter-spacing: -.6px; line-height: 1.25; }
h1 { font-size: 23px; } h2 { font-size: 22px; }
.section-kicker { font-size: 10px; letter-spacing: .1em; }
.section-intro, .scenario-summary { font-size: 13px; line-height: 1.65; }
.audio-upload { padding: 16px; background: #f7faf8; border-radius: 12px; }
.audio-section-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.audio-section-heading h3 { margin: 0; font-size: 13px; font-weight: 650; }
.audio-section-heading p { margin-top: 3px; font-size: 10px; color: var(--muted); }
.audio-icon { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; background: var(--teal-soft); color: var(--teal); border-radius: 10px; }
#record-audio-button { width: 100%; min-height: 38px; background: var(--teal); color: white; }
.audio-help { font-size: 10px; line-height: 1.6; }
.audio-upload-divider { height: 1px; margin: 18px 0; background: var(--line); }
.audio-file-input { font-size: 11px; padding: 8px 0; }
.audio-transcribe-button { background: white; border: 1px solid #ceded5; margin-top: 4px; }
textarea, .chat-view { background: #fcfdfc; border-color: var(--line); border-radius: 12px; }
textarea { font-size: 12px; line-height: 1.7; }
.chat-bubble { font-size: 12px; line-height: 1.65; }
.primary-button, .stage-button, .secondary-button { min-height: 38px; font-size: 12px; border-radius: 9px; }
.primary-button { margin-top: 16px; }
.status { font-size: 11px; padding: 12px; font-weight: 500; }
.snapshot-toolbar { background: #f8faf9; padding: 14px; margin-top: 16px; border-radius: 11px; }
.snapshot-controls select { font-size: 12px; border-color: var(--line); min-height: 36px; }
.snapshot-button { font-size: 11px; }
.snapshot-status:empty { display: none; }
.scenario-tabs { gap: 8px; margin-top: 10px; }
.scenario-tab { padding: 10px; background: white; border-radius: 12px; }
.scenario-tab:hover { background: #f8fbf9; transform: translateY(-1px); }
.scenario-tab-heading strong { font-size: 13px; line-height: 1.5; }
.scenario-index { font-size: 10px; }
.scenario-tab-description { margin-top: 4px; font-size: 12px; line-height: 1.6; font-weight: 400; }
.scenario-tab.active { background: #edf6f0; border-color: #9cc4ac; }
.scenario-facts { gap: 8px; margin-top: 10px; }
.scenario-facts > div { padding: 9px 10px; background: #f8faf9; border-color: #edf1ee; }
.scenario-facts dt { font-size: 10px; }
.scenario-facts dd { margin-top: 3px; font-size: 12px; line-height: 1.7; font-weight: 400; }
.scenario-details .scenario-summary { margin-top: 6px; }
.scenario-evidence-list { margin-top: 10px; padding-top: 9px; }
.scenario-evidence { margin-top: 5px; background: #faf9f6; padding: 8px 10px; }
.scenario-evidence p { font-size: 12px; line-height: 1.7; }
.scenario-evidence strong { font-size: 10px; }
.image-placeholder { min-height: 230px; font-size: 13px; }
.image-output { background: #f8faf9; border-radius: 12px; }
.panel { background: #fbfcfb; padding: 16px; border-radius: 12px; }
.panel h3 { font-size: 13px; line-height: 1.5; }.panel p { font-size: 12px; line-height: 1.65; }
.project-menu-button { background: white; min-width: 260px; padding-top: 10px; padding-bottom: 10px; }
.project-menu-button strong { font-size: 12px; }
button:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #83b5a1; outline-offset: 3px; }
@media (max-width: 1100px) {
  body { min-width: 320px; }
  .workspace.sidebar-open { grid-template-columns: 310px minmax(0, 1fr); }
  .workspace { width: calc(100% - 24px); gap: 12px; }
  .scenario-nav, .scenario-details, .storyboard-section { padding: 18px; }
}
@media (max-width: 760px) {
  .topbar { grid-template-columns: 1fr auto; padding: 14px 16px; gap: 12px; }
  .project-context { grid-row: 2; grid-column: 1 / -1; }
  .project-menu-button { width: 100%; }
  .workspace, .workspace.sidebar-open { grid-template-columns: minmax(0, 1fr); }
  .input-sidebar { position: static; max-height: none; overflow: visible; padding: 0; }
  .scenario-facts { grid-template-columns: 1fr; }
  .section-heading { flex-wrap: wrap; }
  .project-menu { width: min(460px, calc(100vw - 32px)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
