:root {
  color-scheme: dark;
  --base: #0f1319;
  --surface: #1a2029;
  --surface-subtle: #222c38;
  --ink: #f0f5fa;
  --muted: #b7c3d2;
  --line: #354253;
  --control: #6e839a;
  --accent: #4af1ce;
  --accent-strong: #86ffe0;
  --accent-soft: #193745;
  --error: #ffabb7;
  --radius: 17px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: var(--base); color: var(--ink); font: 1rem/1.52 system-ui, -apple-system, BlinkMacSystemFont, sans-serif; }
::selection { background: #e1e1e1; color: #313131; }
a { color: var(--accent); text-underline-offset: 3px; }
button, select, summary { cursor: pointer; }
button, input, textarea, select { font: inherit; }
button:disabled { opacity: .52; cursor: wait; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
#workspace-main:focus, #active-job:focus { outline: none; }
.skip-link { z-index: 20; position: fixed; inset: 10px auto auto 10px; transform: translateY(-160%); padding: 9px 15px; color: #fff; background: var(--accent); border-radius: 8px; }
.skip-link:focus { transform: none; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1410px; margin: auto; padding: 0 clamp(16px, 3.2vw, 42px); min-height: 64px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; white-space: nowrap; font-size: 1.1rem; font-weight: 730; letter-spacing: -.04em; }
.brand small { color: var(--muted); font-size: .88rem; font-weight: 550; letter-spacing: -.015em; }
.brand-mark { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-strong); color: #fbfbfb; }
.brand-mark::before { content: ''; width: 13px; height: 13px; border: 1.5px solid currentColor; border-radius: 4px; transform: rotate(-12deg); }
.brand-mark::after { content: ''; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.workspace-nav { justify-self: center; display: flex; align-items: stretch; gap: clamp(6px, 1.55vw, 22px); min-width: 0; }
.workspace-nav a { display: grid; align-items: center; position: relative; min-height: 64px; padding: 0 4px; color: var(--muted); text-decoration: none; font-size: .91rem; font-weight: 620; white-space: nowrap; }
.workspace-nav a:hover, .workspace-nav a[aria-current="page"] { color: var(--accent); }
.workspace-nav a[aria-current="page"]::after { content: ''; position: absolute; height: 3px; inset: auto 4px 0; border-radius: 2px 2px 0 0; background: var(--accent); }
.mode-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .84rem; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #616161; }
main { max-width: 1410px; min-width: 0; margin: 0 auto; padding: clamp(23px, 2.9vw, 42px) clamp(16px, 3.2vw, 42px) 60px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.05rem, 3.35vw, 3.05rem); line-height: 1.04; font-weight: 680; letter-spacing: -.06em; overflow-wrap: anywhere; }
h2 { font-size: 1.24rem; letter-spacing: -.025em; line-height: 1.22; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 640; }
.intro { margin-bottom: 20px; }
.intro p { margin-top: 9px; max-width: 65ch; color: var(--muted); }
.intro p:empty { display: none; }
.intro-actions, .button-row, .inline-controls, .editor-heading, .panel-heading, .form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.intro-actions, .editor-heading, .panel-heading { justify-content: space-between; }
.intro-actions { align-items: end; }
.form-actions { justify-content: flex-end; }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--muted); text-decoration: none; font-size: .88rem; font-weight: 620; }
.back-link::before { width: 6px; height: 6px; border: solid currentColor; border-width: 0 0 1.5px 1.5px; transform: rotate(45deg); content: ''; }
.back-link:hover { color: var(--accent); }
.hint { color: var(--muted); font-size: .875rem; font-weight: 440; }
.panel { min-width: 0; padding: clamp(17px, 2.6vw, 31px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel h2 + form, .panel h2 + div, .panel > .hint { margin-top: 13px; }
form, .form-step { display: grid; gap: 16px; min-width: 0; }
label { display: grid; gap: 6px; min-width: 0; color: var(--ink); font-weight: 640; font-size: .9rem; }
.label-row { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
input:not([type="checkbox"]), textarea, select {
  display: block; width: 100%; min-width: 0; min-height: 44px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--control); border-radius: 9px; padding: 10px 12px; font-size: 1rem; line-height: 1.4; font-weight: 460;
}
input:not([type="checkbox"]):hover, textarea:hover, select:hover { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: #9eafc3; opacity: 1; }
input:disabled, textarea:disabled, select:disabled { background: var(--surface-subtle); color: var(--muted); cursor: default; }
textarea { resize: vertical; }
select { appearance: none; padding-right: 33px; text-overflow: ellipsis; background-image: linear-gradient(45deg, transparent 50%, #4b4b4b 50%), linear-gradient(135deg, #4b4b4b 50%, transparent 50%); background-position: calc(100% - 17px) 51%, calc(100% - 12px) 51%; background-size: 5px 5px; background-repeat: no-repeat; }
input[type="color"] { height: 44px; padding: 6px; cursor: pointer; }
input[type="file"] { max-width: 100%; padding: 6px; font-size: .88rem; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; width: fit-content; max-width: 100%; min-height: 44px; padding: 8px 16px; border-radius: 9px; font-size: .9rem; font-weight: 650; line-height: 1.28; text-align: center; text-decoration: none; transition: background-color .16s, border-color .16s, color .16s; }
.primary { color: #fff; border: 1px solid var(--accent); background: var(--accent); }
.primary:hover { color: #fff; background: var(--accent-strong); border-color: var(--accent-strong); }
.secondary { color: var(--ink); background: var(--surface); border: 1px solid var(--control); }
.secondary:hover, .secondary[aria-pressed="true"] { color: var(--accent-strong); background: var(--accent-soft); border-color: var(--accent); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.wide { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 7px; min-height: 34px; font-weight: 550; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
details { min-width: 0; color: var(--muted); }
summary { width: fit-content; color: var(--accent); font-size: .9rem; font-weight: 630; }
details[open] > summary { margin-bottom: 10px; }
pre { color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; font: .85rem/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; }
hr { border: 0; border-top: 1px solid var(--line); margin-block: 23px; }
.pill { display: inline-flex; align-items: center; width: fit-content; min-height: 25px; padding: 2px 9px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); background: var(--surface-subtle); font-size: .81rem; font-weight: 630; white-space: nowrap; }
.pill.ready { color: var(--accent-strong); background: var(--accent-soft); border-color: #cbcbcb; }
#notice { position: fixed; z-index: 5; bottom: 18px; right: 18px; max-width: min(390px, calc(100vw - 36px)); padding: 11px 15px; color: #fff; background: var(--accent-strong); border-radius: 9px; box-shadow: 0 7px 23px #22222235; font-size: .91rem; pointer-events: none; }
#notice.error { background: var(--error); }

.task-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin-top: 27px; }
.task-card { display: flex; align-items: center; gap: 13px; min-width: 0; min-height: 89px; padding: 15px 18px; color: #fff; background: linear-gradient(115deg, var(--task-start), var(--task-end) 87%); border: 1px solid var(--task-line); border-radius: 13px; text-decoration: none; transition: border-color .16s; }
.task-card:hover { border-color: var(--task-accent); }
.channel-task { --task-start: #343694; --task-end: #1a234c; --task-line: #6265d2; --task-accent: #b5b8ff; --task-ink: #23245c; --task-copy: #e0e3ff; }
.style-task { --task-start: #832c48; --task-end: #471c38; --task-line: #bb5876; --task-accent: #ff9ca9; --task-ink: #521e32; --task-copy: #ffe2e8; }
.task-card h2 { font-size: 1.03rem; }
.task-card p { color: var(--task-copy); margin-top: 3px; font-size: .875rem; }
.task-icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 13px; background: var(--task-accent); color: var(--task-ink); }
.task-icon .icon { width: 23px; height: 23px; }
.icon { position: relative; display: inline-block; flex: none; width: 17px; height: 17px; color: inherit; }
.icon::before, .icon::after { position: absolute; content: ''; }
.icon[data-icon="play"]::before { inset: 12% 5%; border: 1.5px solid currentColor; border-radius: 4px; }
.icon[data-icon="play"]::after { top: 31%; left: 43%; border-left: 6px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.icon[data-icon="stack"]::before { inset: 11% 11% 29%; border: 1.5px solid currentColor; border-radius: 4px; transform: rotate(-9deg); }
.icon[data-icon="stack"]::after { inset: 29% 6% 11% 24%; border: 1.5px solid currentColor; border-radius: 4px; background: var(--task-accent); }
.icon[data-icon="text"]::before { inset: 1px 2px; border: 1.5px solid currentColor; border-radius: 3px; }
.icon[data-icon="text"]::after { top: 5px; left: 5px; width: 7px; height: 1px; background: currentColor; box-shadow: 0 3px currentColor, 0 6px currentColor; }
.icon[data-icon="spark"]::before { inset: 1px; background: currentColor; clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.icon[data-icon="spark"]::after { inset: 4px; background: var(--task-accent); clip-path: polygon(50% 0%, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0 50%, 37% 37%); }
.focused-workspace { max-width: 740px; margin: 0 auto; }
.focused-workspace .intro h1, #channels[data-channel-view="editor"] h1 { font-size: clamp(2.2rem, 4vw, 3.46rem); }
.composer, .job-panel { box-shadow: 0 6px 20px #26262609; }
.composer-steps, .setup-list { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; list-style: none; margin: 0 0 20px; padding: 0 0 13px; border-bottom: 1px solid var(--line); }
.composer-steps li, .setup-list li { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .875rem; font-weight: 610; }
.composer-steps li span, .setup-list li span { display: grid; place-items: center; width: 24px; height: 24px; color: var(--muted); border: 1px solid var(--control); border-radius: 50%; font-size: .75rem; }
.composer-steps li[aria-current="step"], .setup-list li[aria-current="step"] { color: var(--accent-strong); }
.composer-steps li[aria-current="step"] span, .setup-list li[aria-current="step"] span { color: #fff; background: var(--accent); border-color: var(--accent); }
.form-step textarea[name="preparedPrompt"] { font: .88rem/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; }
.job-heading { font-size: 1.3rem; overflow-wrap: anywhere; }
.job-meta { margin-top: 3px; color: var(--muted); font-size: .85rem; }
#job-action { margin-top: 0; }
#job-detail { margin-top: 9px; }
#job-trello { display: grid; gap: 4px; margin-top: 14px; }
.steps { padding: 0; margin: 16px 0 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: baseline; gap: 7px; padding: 7px 0; font-size: .9rem; }
.steps li + li { border-top: 1px solid var(--line); }
.step-mark, .step-state { color: var(--muted); font-size: .84rem; }
.step-mark { text-align: center; }
.steps .done .step-mark, .steps .current .step-mark, .steps .current b { color: var(--accent); }
.job-additional { display: grid; gap: 11px; margin-top: 15px; }
.job-additional form { margin-top: 9px; }
.job-additional .ticket-status { margin-bottom: 8px; }
.takes { margin: 8px 0 12px; padding-left: 22px; }
.takes li { margin: 6px 0; }
.takes span { color: var(--muted); }
.take-row { margin-bottom: 9px; border-bottom: 1px solid var(--line); padding: 0 0 9px; }
.take-row legend { margin-bottom: 4px; }
.take-placement { grid-template-columns: 1fr 1fr; }
.take-playback { max-width: 26rem; margin-block: 8px; }
.button-link { display: inline-flex; align-items: center; padding: .55rem .85rem; border: 1px solid var(--line); border-radius: 8px; }
video { display: block; width: 100%; border-radius: 10px; background: #262626; }
.jobs-section { margin-top: 36px; }
.jobs-section h2 { margin-bottom: 11px; }
#job-list { display: grid; gap: 4px; }
.job-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 59px; text-align: left; padding: 8px 13px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface); }
.job-row:hover, .job-row[aria-pressed="true"] { background: var(--accent-soft); border-color: #b1b1b1; }
a.job-row { text-decoration: none; }
.job-row strong, .job-row small { display: block; overflow-wrap: anywhere; }
.job-row strong { font-size: .9rem; }
.job-row small { color: var(--muted); font-size: .82rem; }
.job-icon, .preset-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 8px; color: var(--accent); background: var(--accent-soft); }
.status-tag { color: var(--accent-strong); background: var(--accent-soft); border: 1px solid #c8c8c8; border-radius: 16px; padding: 3px 8px; font-size: .82rem; text-align: center; }
.status-tag[data-state="error"] { color: var(--error); background: #f0f0f0; border-color: #e5b6ba; }

#channels[data-channel-view="directory"] { max-width: 920px; margin-inline: auto; }
.channel-directory { --cell-padding: clamp(9px, 1.8vw, 20px); overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.channel-directory table { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: left; font-size: .9rem; }
.channel-directory th, .channel-directory td { padding: 11px var(--cell-padding); overflow-wrap: anywhere; }
.channel-directory thead th { background: var(--base); color: var(--muted); font-size: .83rem; font-weight: 620; }
.channel-directory thead th:first-child { width: 34%; }
.channel-directory thead th:last-child { width: 24%; }
.registry-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px var(--cell-padding); border-bottom: 1px solid var(--line); }
.registry-bar p { margin: 0; }
.registry-issues { margin: 0 0 8px; padding: 0 var(--cell-padding) 0 calc(var(--cell-padding) + 16px); color: var(--muted); font-size: .8rem; font-weight: 400; }
.registry-archived { padding: 10px var(--cell-padding); border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.registry-archived ul { margin: 8px 0 0; padding-left: 18px; }
.channel-directory tbody tr { border-top: 1px solid var(--line); }
.channel-directory tbody tr:focus-within, .channel-directory tbody tr:hover { background: var(--surface-subtle); }
.channel-directory tbody th { padding: 0; }
.channel-directory td { color: var(--muted); }
.channel-name { display: block; width: 100%; min-height: 54px; padding: 10px var(--cell-padding); border: 0; border-radius: 4px; background: transparent; color: var(--ink); text-align: left; text-decoration: underline; text-decoration-color: var(--control); text-underline-offset: 3px; font-weight: 650; overflow-wrap: anywhere; }
.channel-name:hover { text-decoration-color: currentColor; }
.channel-name:focus-visible { outline-offset: -3px; }
.channel-grid { display: grid; grid-template-columns: minmax(165px, 210px) minmax(0, 1fr); gap: 17px; align-items: start; }
.channel-grid.compact-workflow { grid-template-columns: minmax(0, 710px); }
.channel-sidebar { display: grid; gap: 14px; padding: 15px; }
.channel-sidebar h2 { font-size: .96rem; }
.setup-list { display: grid; gap: 10px; margin: 11px 0 0; padding: 0; border: 0; }
#channel-steps { display: grid; gap: 5px; padding: 0; margin: 9px 0 0; list-style: none; }
#channel-steps li button { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 6px; width: 100%; padding-inline: 9px; text-align: left; }
#channel-steps li button[aria-current="step"] { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
#channel-steps .hint { font-size: .78rem; }
.editor-heading { padding-bottom: 11px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
fieldset { display: grid; gap: 14px; margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 10px; color: var(--ink); font-weight: 650; }
.inline-controls { align-items: end; }
.inline-controls > label { flex: 1; min-width: 130px; }
#team-review video { max-width: 540px; margin-top: 10px; }
#team-review pre { max-height: 18rem; overflow: auto; }
.style-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.style-workspace:has(.style-conversation[hidden]) { grid-template-columns: minmax(0, 1fr); }
.style-conversation, .style-viewer { display: grid; gap: 9px; min-width: 0; padding: 11px; background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 11px; }
.style-viewer .button-row { justify-content: space-between; }
#style-preview { display: grid; gap: 8px; }
#style-preview video { aspect-ratio: 16 / 9; }
.preview-empty { display: grid; justify-items: center; align-content: center; aspect-ratio: 16 / 9; min-height: 107px; gap: 6px; padding: 10px; border: 1px dashed #9a9a9a; border-radius: 9px; color: var(--muted); background: #fafcfb; font-size: .83rem; text-align: center; }
#style-messages { display: grid; gap: 7px; max-height: 21rem; overflow: auto; scrollbar-color: #999999 transparent; }
#style-messages:empty { display: none; }
.style-message { padding: 8px 9px; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; font-size: .88rem; }
.style-message[data-role="va"] { background: var(--accent-soft); border-color: #cecece; }
.style-message[data-role="studio"] { background: var(--surface); }
.style-message strong { color: var(--accent-strong); font-size: .82rem; }
.style-message p { margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }
.style-message .button-row { margin-top: 7px; }
.style-suggestions { display: flex; flex-wrap: wrap; gap: 5px; }
.style-suggestions .secondary, .style-message .secondary { min-height: 37px; padding: 5px 9px; font-size: .81rem; }
.style-controls { padding: 9px 11px; background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 9px; }

.preset-layout { grid-template-columns: minmax(222px, 282px) minmax(0, 1fr); }
.preset-list { display: grid; gap: 9px; padding: 13px; }
#library-members { display: grid; gap: 3px; max-height: 27rem; overflow: auto; scrollbar-color: #999999 transparent; }
.preset-item { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 8px; padding: 7px; width: 100%; min-width: 0; color: var(--ink); background: var(--surface); border: 1px solid transparent; border-radius: 9px; text-align: left; }
.preset-item:hover { background: var(--surface-subtle); }
.preset-item[aria-pressed="true"] { background: var(--accent-soft); border-color: #a8a8a8; }
.preset-item strong, .preset-item small { display: block; overflow-wrap: anywhere; }
.preset-item strong { font-size: .89rem; font-weight: 640; }
.preset-item small { font-size: .82rem; color: var(--muted); }
.library-empty { padding: 10px; }
.preset-detail { display: grid; gap: 13px; }
.preset-detail h2 { font-size: clamp(1.46rem, 2.4vw, 2.1rem); overflow-wrap: anywhere; }
#preset-summary { margin: 0; color: var(--accent); }
.preset-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; margin: 0; background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 10px; }
.preset-facts div { padding: 9px 11px; min-width: 0; }
.preset-facts div:nth-child(even) { border-left: 1px solid var(--line); }
.preset-facts div:nth-child(n + 3) { border-top: 1px solid var(--line); }
.preset-facts dt { color: var(--muted); font-size: .82rem; }
.preset-facts dd { margin: 1px 0 0; font-size: .9rem; font-weight: 600; overflow-wrap: anywhere; }
.preset-raw { padding-top: 11px; border-top: 1px solid var(--line); }
.preset-raw pre { max-height: 22rem; overflow: auto; padding: 10px; background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 9px; }
#preset-source { width: fit-content; color: var(--muted); font-size: .88rem; }

.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
#admin-approval-list:empty { display: none; }
#admin-approval-list { display: grid; gap: 8px; margin-block: 12px; }
#admin-channels-summary { margin: 8px 0 14px; }
.inline-form { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; align-items: end; padding: 14px; margin-bottom: 16px; }
.inline-form details label { margin-top: 8px; }
.board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.column { min-width: 0; padding: 0 12px 12px; background: var(--base); }
.column h2 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin: 0 -12px 12px; padding: 12px; border-bottom: 1px solid var(--line); background: var(--surface); font-size: .94rem; }
.count { color: var(--muted); font-size: .82rem; }
.lane-empty { padding: 4px 0 8px; color: var(--muted); font-size: .84rem; }
.card { display: grid; gap: 6px; padding: 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.card + .card { margin-top: 8px; }
.card-title, .card .hint { overflow-wrap: anywhere; }
.card-title { font-size: .9rem; font-weight: 640; }
.card-label { overflow-wrap: anywhere; color: var(--muted); font-size: .82rem; }
.card .secondary { margin-top: 2px; padding-inline: 10px; }
.card:focus { outline: 2px solid var(--accent); outline-offset: 3px; }
.card form { gap: 7px; }
.card .card-issue { color: var(--error); }

@media (max-width: 990px) {
  .style-workspace, .style-workspace:has(.style-conversation[hidden]) { grid-template-columns: minmax(0, 1fr); }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; min-height: auto; gap: 6px 10px; padding-top: 11px; }
  .brand-mark { width: 30px; height: 30px; border-radius: 8px; }
  .workspace-nav { grid-row: 2; grid-column: 1 / -1; justify-self: stretch; gap: 12px; max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
  .workspace-nav a { min-height: 43px; font-size: .83rem; padding-inline: 2px; }
  .workspace-nav a[aria-current="page"]::after { inset-inline: 2px; }
  main { padding-top: 28px; padding-bottom: 43px; }
  .intro { margin-bottom: 19px; }
  .task-grid { gap: 9px; }
  .task-card { min-height: 151px; padding: 14px; gap: 14px; }
    .task-icon { width: 38px; height: 38px; border-radius: 10px; }
  .task-card p { font-size: .87rem; }
  .channel-grid, .preset-layout, .admin-grid { grid-template-columns: minmax(0, 1fr); }
  #channel-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #channel-steps li button { justify-content: flex-start; font-size: .82rem; }
  .setup-list { display: flex; gap: 7px 11px; }
  .setup-list li { font-size: .82rem; }
  #library-members { max-height: 13rem; }
}
@media (max-width: 420px) {
  .workspace-nav { gap: 8px; }
  .mode-label { font-size: .77rem; }
  .fields, .inline-form, .board { grid-template-columns: minmax(0, 1fr); }
  .take-placement { grid-template-columns: 1fr 1fr; }
  .form-actions .primary { flex: 1 1 auto; }
  .job-row { grid-template-columns: 27px minmax(0, 1fr) auto; gap: 6px; }
  .job-row .job-icon { width: 25px; height: 25px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

.start-work { display: grid; grid-template-columns: minmax(0, .96fr) minmax(0, 1.04fr); gap: clamp(24px, 4.3vw, 64px); align-items: center; padding: clamp(22px, 3.4vw, 50px); border: 1px solid #376369; border-radius: 21px; background: radial-gradient(ellipse at 6% 4%, #13484a, transparent 68%), linear-gradient(128deg, #102b32 28%, #1c2550); }
.start-content h1 { font-size: clamp(2.45rem, 4.65vw, 4.25rem); }
.start-content h1 span { color: var(--accent); }
.start-content p { max-width: 38ch; margin: 14px 0 22px; color: #d0e5e8; font-size: 1.05rem; }
.start-content .secondary { color: #e4fff7; background: #153c43; border-color: #699394; }
.start-content .secondary:hover { background: #205056; border-color: var(--accent); }
.start-frame { margin: 0; min-width: 0; }
.start-frame img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid #638584; border-radius: 16px; background: var(--surface); box-shadow: 0 14px 35px #070d1890; }
.start-frame figcaption { margin-top: 7px; color: #c5d5eb; font-size: .81rem; }
#channels[data-channel-view="setup"] { max-width: 800px; margin-inline: auto; }
#channels[data-channel-view="setup"] h1 { font-size: clamp(2.3rem, 4vw, 3.25rem); }
#channels[data-channel-view="setup"] .compact-workflow { grid-template-columns: minmax(0, 1fr); }
#new-channel-form, #new-style-form { gap: 19px; }
#new-channel-form [data-create-pane] > h2, #new-channel-form [data-create-pane] > div > h2 { font-size: clamp(1.35rem, 2vw, 1.68rem); }
#new-channel-form [data-create-pane] > div > .hint { margin-top: 5px; }
#new-channel-form [data-create-pane] h2:focus { outline: none; }
#base-details label + label { margin-top: 10px; }
.onboarding-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; padding: 0; margin: 0; list-style: none; }
.onboarding-steps li { padding-top: 5px; border-top: 3px solid #dddde1; color: var(--muted); font-size: .86rem; font-weight: 620; }
.onboarding-steps li[aria-current="step"] { color: var(--ink); border-color: var(--ink); }
.style-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.style-choice { min-width: 0; display: grid; align-content: start; text-align: left; padding: 0; border: 1px solid var(--control); color: var(--ink); background: var(--surface); border-radius: 11px; overflow: hidden; }
.style-choice:hover { border-color: var(--ink); background: var(--surface-subtle); }
.style-choice[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.style-choice img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.style-choice > span { display: grid; gap: 3px; padding: 8px 9px 10px; }
.style-choice small { font-size: .8rem; color: var(--muted); line-height: 1.35; }
#setup-preset-text { max-height: 14rem; overflow: auto; padding: 9px; background: var(--surface-subtle); border-radius: 7px; }
.prompt-edit-notice, #style-copy-fields { padding: 10px 12px; background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 9px; }
.prompt-edit-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 7px; }
.prompt-edit-notice button { min-height: 38px; }
.launch-summary { display: grid; grid-template-columns: minmax(170px, .9fr) minmax(140px, 1fr); gap: 13px; align-items: center; }
.launch-summary video { max-width: 400px; }
.launch-summary dl { margin: 0; display: grid; gap: 9px; }
.launch-summary dt { font-size: .81rem; color: var(--muted); }
.launch-summary dd { margin: 2px 0 0; font-weight: 620; }
@media (max-width: 700px) {
  .start-work { grid-template-columns: 1fr; gap: 17px; padding: clamp(12px, 3.2vw, 22px); }
  .start-content p { margin: 8px 0 13px; }
  .task-grid { margin-top: 17px; }
  .task-card { min-height: 83px; flex-wrap: wrap; gap: 6px; }
}
@media (max-width: 500px) {
  .style-choices { grid-template-columns: 1fr; }
  .style-choice { grid-template-columns: 104px minmax(0, 1fr); align-items: center; }
  .launch-summary { grid-template-columns: 1fr; }
}
.prompt-facts { display: flex; flex-wrap: wrap; gap: 9px 22px; margin: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-subtle); }
.prompt-facts div { display: grid; gap: 1px; min-width: 82px; }
.prompt-facts dt { color: var(--muted); font-size: .8rem; }
.prompt-facts dd { margin: 0; font-size: .88rem; font-weight: 630; }

/* Workspace surfaces and interactive states. */
::selection { background: #275866; color: #f0ffff; }
.site-header { background: #151a22; border-color: #303a49; }
.brand-mark { color: #092834; background: linear-gradient(145deg, #66ffd7, #20c9b8); }
.mode-label { padding: 3px 8px; border: 1px solid #364452; border-radius: 16px; }
.status-dot { background: #4cdebb; }
.skip-link { color: #07252d; }
.panel { box-shadow: 0 8px 20px #070b1126; }
.primary { color: #082a28; border-color: #78ffe3; background: linear-gradient(178deg, #58f9d3, #25d6bd 94%); box-shadow: inset 0 1px #c0ffef75, 0 3px 12px #2ce3bc34; }
.primary:hover { color: #082a28; background: var(--accent-strong); border-color: #afffe9; }
.secondary { background: #263240; border-color: #566b82; }
.secondary:hover, .secondary[aria-pressed="true"] { color: #defbff; background: #234252; border-color: #79dce6; }
input:not([type="checkbox"]), textarea, select { background-color: #121922; }
input:disabled, textarea:disabled, select:disabled { background-color: #222a34; }
select { background-image: linear-gradient(45deg, transparent 50%, #c3d1e0 50%), linear-gradient(135deg, #c3d1e0 50%, transparent 50%); }
.composer { background: linear-gradient(145deg, #1c2935 0%, #1a2029 50%); border-color: #3c5b6d; }
.composer-steps li[aria-current="step"] span, .setup-list li[aria-current="step"] span { color: #092835; }
#notice { color: #dbfcff; background: #1c424f; border: 1px solid #4e8796; }
#notice.error { color: #ffe1e6; background: #4a2736; border-color: #975d72; }
.pill { background: #263340; }
.pill.ready { color: #9ff8d8; background: #204235; border-color: #487e68; }
.card .card-issue { color: #ffb1c0; }

.job-icon, .preset-icon { color: #b0f6fb; background: #25414e; }
.job-row:hover, .job-row[aria-pressed="true"] { background: #203741; border-color: #50778a; }
.status-tag { border-color: #3e6578; }
.status-tag[data-state="script"], .status-tag[data-state="script_review"] { color: #ffdb9b; background: #423326; border-color: #785d3e; }
.status-tag[data-state="video"], .status-tag[data-state="rendering"] { color: #bddeff; background: #253954; border-color: #4b6b96; }
.status-tag[data-state="review"] { color: #aaf6d8; background: #234338; border-color: #4d7967; }
.status-tag[data-state="recording"], .status-tag[data-state="error"] { color: #ffc4d2; background: #472a36; border-color: #835365; }

#trello .intro, #prompts .intro { margin-bottom: 17px; }
#trello-status { margin-bottom: 13px; }

#prompts .preset-layout { grid-template-columns: minmax(210px, 300px) minmax(0, 1fr); }
.preset-list { background: #171f29; }
.preset-item:hover { background: #23313f; }
.preset-item[aria-pressed="true"] { border-color: #69b8cb; background: #253d4a; }
.preset-item[data-format="Listicle"] .preset-icon { color: #c0d8ff; background: #304570; }
.preset-item[data-format="Documentary"] .preset-icon { color: #ffdeb3; background: #523c2b; }
.preset-item[data-format="Explainer"] .preset-icon { color: #b5fae5; background: #285044; }
.preset-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.preset-facts div:nth-child(n) { border-top: 0; border-left: 0; }
.preset-facts div + div:nth-child(n) { border-left: 1px solid var(--line); }

.preview-empty { background: #15202b; border-color: #536c83; }
.style-message[data-role="va"] { border-color: #3d7680; }
.style-message[data-role="studio"] { background: #1b242e; }
.onboarding-steps li[aria-current="step"] { color: var(--accent); border-color: var(--accent); }
.onboarding-steps li { border-top-color: var(--line); }
.style-choice[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

@media (max-width: 850px) {
  .preset-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preset-facts div:nth-child(odd) { border-left: 0; }
  .preset-facts div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 700px) {
  #prompts .preset-layout { grid-template-columns: minmax(0, 1fr); }
}

/* Spokesperson ticket: status and actions first, then one compact row per take. */
.ticket { margin: 6px 0 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--base); }
.ticket-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ticket-title { margin: 0; font-size: 1.02rem; }
.ticket-head .hint { margin: 2px 0 0; }
.ticket-state.is-ready { color: #0d2a22; background: var(--accent); border-color: var(--accent); }
.ticket-state.is-waiting { color: #ffe0a3; background: #3a2f17; border-color: #6b5626; }
.ticket-state.is-muted { color: var(--muted); }
.ticket-progress { height: 6px; margin: 12px 0 2px; overflow: hidden; border-radius: 6px; background: var(--surface-subtle); }
.ticket-progress span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .3s; }
.ticket-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.ticket-actions .skip-button { margin-left: auto; }
.ticket-hint { margin: 8px 0 12px; }
.ticket-footer { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ghost-button { min-height: 40px; padding: 6px 12px; border: 1px solid transparent; border-radius: 9px; color: var(--muted); background: transparent; font-size: .88rem; font-weight: 600; }
.ghost-button:hover { color: var(--ink); border-color: var(--line); }
.link-button { display: inline-flex; align-items: center; min-height: 30px; padding: 0; border: 0; color: var(--accent); background: none; font-size: .84rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.take-list { max-height: min(62vh, 640px); overflow: auto; margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.take-list.is-compact { max-height: 360px; margin-top: 8px; }
.take-item { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 12px; border-top: 1px solid var(--line); }
.take-item:first-child { border-top: 0; }
.take-item.is-received { box-shadow: inset 3px 0 0 var(--accent); }
.take-item.is-retake { box-shadow: inset 3px 0 0 #ffb35c; }
.take-num { display: grid; place-items: center; width: 26px; height: 26px; margin-top: 1px; border-radius: 50%; background: var(--surface-subtle); color: var(--muted); font-size: .78rem; font-weight: 700; }
.take-item.is-received .take-num { color: #0d2a22; background: var(--accent); }
.take-main { min-width: 0; }
.take-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--muted); font-size: .78rem; font-weight: 600; }
.take-time { color: var(--ink); font-variant-numeric: tabular-nums; }
.take-status { margin-left: auto; }
.take-item.is-received .take-status { color: var(--accent); }
.take-item.is-retake .take-status { color: #ffb35c; }
.take-line { margin: 3px 0 0; font-size: .93rem; line-height: 1.42; }
.take-warning { margin: 4px 0 0; color: #ffcf8a; }
.take-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 4px; }
.take-clip summary { color: var(--muted); font-size: .84rem; }
.take-clip .take-playback { display: block; max-width: min(26rem, 100%); margin: 6px 0; border-radius: 8px; }
.take-fixed { padding-top: 3px; color: var(--muted); font-size: .76rem; }
.icon-button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid transparent; border-radius: 8px; color: var(--muted); background: transparent; font-size: .85rem; }
.icon-button:hover, .icon-button:focus-visible { color: var(--error); border-color: var(--line); background: var(--surface-subtle); }
.reason { padding: 1px 8px; border-radius: 20px; font-size: .74rem; font-weight: 650; text-transform: capitalize; }
.reason-opening { color: #0d2a22; background: var(--accent); }
.reason-reveal { color: #ffe0a3; background: #3d3115; }
.reason-topic-shift { color: #b9d6ff; background: #1c2f4d; }
.reason-emotional-moment { color: #ffc4dc; background: #4a2236; }
.reason-strong-opinion { color: #dccbff; background: #33264f; }

/* ---------- Channels: list, channel page, new channel ---------- */
.ch-page { max-width: 1040px; margin-inline: auto; }
#ch-directory { max-width: 1240px; margin-inline: auto; }
.ch-sync { margin: -8px 0 16px; }
.ch-sync:empty { display: none; }
.thumb { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: var(--surface-subtle); }
.thumb-empty { display: grid; place-items: center; color: var(--muted); font-size: 1.6rem; font-weight: 700;
  background: linear-gradient(135deg, var(--surface-subtle), var(--accent-soft)); }
.thumb-lg { width: 200px; flex: none; }
.ch-grid, .look-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.ch-card, .look-card { display: grid; align-content: start; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--ink); text-align: left; transition: border-color .15s, transform .15s; }
.ch-card:hover, .look-card:hover, .ch-card:focus-visible, .look-card:focus-visible { border-color: var(--accent); transform: translateY(-1px); }
.look-card[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.ch-card-body { display: grid; gap: 2px; padding: 0 4px 4px; }
.ch-card-body strong { font-size: .98rem; }
.ch-card-body .hint { font-size: .8rem; overflow-wrap: anywhere; }
.ch-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag { padding: 1px 8px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); font-size: .74rem; font-weight: 640; white-space: nowrap; }
.tag-host { color: #ffc4dc; border-color: #6b3550; background: #3a1d2c; }
.tag-ok { color: var(--accent-strong); border-color: #2a6a5c; background: var(--accent-soft); }
.tag-warn { color: #ffe0a3; border-color: #6b5626; background: #3a2f17; }
.ch-archived { margin-top: 26px; color: var(--muted); }
.ch-archived ul { display: grid; gap: 4px; margin: 10px 0 0; padding: 0; list-style: none; }
.ch-archived li { display: flex; justify-content: space-between; align-items: center; max-width: 420px; }

.ch-head { display: flex; align-items: center; gap: 20px; margin-bottom: 18px; }
.ch-head-text { flex: 1; min-width: 0; }
.ch-head-text h1 { font-size: clamp(1.8rem, 2.6vw, 2.4rem); }
.ch-head-text .hint { margin-top: 4px; }
.ch-head-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ch-section { margin-bottom: 16px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.section-head + .hint { margin: -6px 0 12px; }

.conn-list, .issue-list { margin: 0; padding: 0; list-style: none; }
.conn { display: grid; grid-template-columns: 12px 130px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.conn:first-child { border-top: 0; padding-top: 0; }
.conn-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.conn.is-bad .conn-dot { background: #ffb35c; }
.conn-name { font-weight: 650; font-size: .9rem; }
.conn-value { display: grid; min-width: 0; font-size: .9rem; overflow-wrap: anywhere; }
.conn-value .hint { font-size: .8rem; }
.issue-list { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #2c2514; color: #ffe0a3; font-size: .85rem; }
.issue-list li + li { margin-top: 4px; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; align-items: start; }
.settings-grid .span-2 { grid-column: 1 / -1; }
.settings-grid label .hint { font-size: .78rem; font-weight: 440; }
.toggle-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 16px; }
.toggle { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--base); cursor: pointer; }
.toggle:has(input:checked) { border-color: #2a6a5c; background: var(--accent-soft); }
.toggle input { margin-top: 3px; accent-color: var(--accent); }
.toggle span { display: grid; gap: 2px; }
.toggle small { color: var(--muted); font-size: .78rem; font-weight: 440; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.danger { color: var(--error); }
.danger:hover { color: var(--error); border-color: var(--error); }

.prompt-list { display: grid; margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.prompt-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.prompt-row:first-child, .prompt-edit:first-child { border-top: 0; }
.prompt-row > div:first-child { display: grid; gap: 2px; min-width: 0; }
.prompt-row .tag { justify-self: start; }
.prompt-row .hint { font-size: .8rem; }
.prompt-actions { display: flex; gap: 6px; flex: none; }
.prompt-edit { padding: 16px 14px; border-top: 1px solid var(--line); background: var(--base); }
.prompt-edit textarea { font: .84rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }

.eyebrow { color: var(--accent) !important; font-size: .8rem !important; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 6px !important; }
.picked { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.picked > div { display: grid; }
.setup-list { display: grid; gap: 8px; margin: 18px 0 0; padding: 14px; border: 1px solid var(--line); border-radius: 11px; }
.setup-list legend { padding: 0 6px; color: var(--muted); font-size: .85rem; font-weight: 650; }
.setup-list .check { display: flex; align-items: center; gap: 8px; font-weight: 500; }

@media (max-width: 720px) {
  .ch-head { flex-wrap: wrap; }
  .thumb-lg { width: 100%; }
  .ch-head-actions { flex-direction: row; align-items: center; }
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .conn { grid-template-columns: 12px minmax(0, 1fr); }
  .conn .secondary, .conn-value { grid-column: 2; }
  .picked { grid-template-columns: 100px minmax(0, 1fr); }
}

/* ---------- Simple VA flow: home list, Make a video, video page ---------- */
.big-button { min-height: 54px; padding: 12px 26px; font-size: 1.05rem; border-radius: 12px; }
.home-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.home-head h1 { margin: 0 0 4px; }
#home-summary { margin: 0; font-size: 1.05rem; }
.task-group { margin-bottom: 30px; }
.task-group h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 1.15rem; }
.task-group > .hint { margin: 0 0 12px; }
.task-group .count { padding: 0 9px; border-radius: 20px; background: var(--surface-subtle); color: var(--muted); font-size: .85rem; }
.group-needs h2 { color: #ffd479; }
.group-needs .count { background: #3a2f17; color: #ffe0a3; }
.task-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 12px 16px 12px 12px; margin-bottom: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.task-row.is-needs { border-color: #8a6d2a; box-shadow: inset 4px 0 #ffc44d; }
.task-row.is-done { opacity: .82; }
.row-thumb { display: grid; place-items: center; width: 112px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: var(--surface-subtle); color: var(--muted); font-weight: 700; }
.task-text { min-width: 0; }
.task-text strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.02rem; }
.task-text .hint { font-size: .84rem; }
.task-text p { margin: 4px 0 0; font-size: .95rem; }
.task-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.empty-home { padding: 50px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }
@media (max-width: 720px) {
  .task-row { grid-template-columns: 80px minmax(0, 1fr); }
  .row-thumb { width: 80px; }
  .task-actions { grid-column: 1 / -1; justify-content: stretch; }
  .task-actions > * { flex: 1; }
}

.compose { display: grid; gap: 22px; max-width: 980px; }
.compose-step { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.compose-step h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font-size: 1.2rem; }
.compose-step > label, .compose-step > fieldset, .compose-step > details { display: block; margin-bottom: 16px; }
.step-num { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--accent); color: #082a28; font-weight: 800; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.pick-card { display: grid; gap: 8px; padding: 8px 8px 12px; text-align: left; color: var(--ink); background: var(--surface-subtle); border: 2px solid transparent; border-radius: 12px; }
.pick-card img, .pick-empty { display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: var(--base); color: var(--muted); font-size: 1.5rem; font-weight: 700; }
.pick-card strong { padding: 0 4px; font-size: .95rem; }
.pick-card:hover { border-color: var(--line); }
.pick-card[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.pick-card[aria-pressed="true"] strong::before { content: '✓ '; color: var(--accent); }
.big-field input { width: 100%; min-height: 58px; padding: 12px 16px; font-size: 1.2rem; }
.type-choice { padding: 0; border: 0; }
.type-choice legend { margin-bottom: 8px; font-weight: 650; }
#compose-type-list { display: flex; flex-wrap: wrap; gap: 10px; }
.type-option { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-subtle); cursor: pointer; }
.type-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

.status-box { margin: 20px 0; padding: 20px 22px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-subtle); }
.status-box .status-label { margin: 0 0 4px; color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.status-box .status-text { margin: 0; font-size: 1.15rem; font-weight: 600; }
.status-box .button-row { margin-top: 14px; }
.status-box.is-needs { border-color: #8a6d2a; background: #2c2414; }
.status-box.is-needs .status-label { color: #ffd479; }
.status-box.is-done { border-color: #2a6a5c; background: var(--accent-soft); }
.status-box.is-done .status-label { color: var(--accent-strong); }
.more-details { margin-top: 18px; }
.more-details > summary { color: var(--muted); font-weight: 600; }

/* ---------- New channel wizard ---------- */
.wizard-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; counter-reset: step; }
.wizard-steps li { counter-increment: step; display: flex; align-items: center; gap: 8px; padding: 5px 14px 5px 6px; border-radius: 20px; background: var(--surface); color: var(--muted); font-size: .88rem; font-weight: 600; }
.wizard-steps li::before { content: counter(step); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-subtle); font-size: .78rem; }
.wizard-steps li.done::before { content: '✓'; background: var(--accent-soft); color: var(--accent); }
.wizard-steps li.current { color: #082a28; background: var(--accent); }
.wizard-steps li.current::before { background: #082a2826; }
.wizard-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.start-choices { margin-bottom: 26px; }
.start-card { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; width: min(100%, 420px); padding: 16px 20px;
  text-align: left; color: var(--ink); background: var(--surface); border: 2px dashed var(--line); border-radius: 14px; }
.start-card:hover { border-color: var(--accent); }
.start-icon { grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: 1.6rem; }
.sub-head { margin: 0 0 12px; font-size: 1.05rem; }
.copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; font-weight: 600; }
.copy-row select { min-width: 260px; }
.voice-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.voice-card { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); }
.voice-card.is-picked { border-color: var(--accent); background: var(--accent-soft); }
.voice-pick { flex: 1; display: grid; gap: 2px; padding: 4px 0; text-align: left; color: var(--ink); background: none; border: 0; }
.voice-pick strong { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.voice-card.is-picked .voice-pick strong::before { content: '✓'; color: var(--accent); }
.play-button { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%; border: 1px solid var(--accent); background: var(--base); color: var(--accent); font-size: .95rem; }
.play-button:hover { background: var(--accent); color: #082a28; }
.with-play { display: flex; align-items: center; gap: 8px; }
.with-play select { flex: 1; }
.summary-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.summary-item { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.summary-item .thumb { width: 80px; }
.summary-item > div { display: grid; }
.summary-item .hint { font-size: .78rem; }
.progress-steps { display: flex; flex-wrap: wrap; gap: 8px 4px; margin: 16px 0 0; padding: 0; list-style: none; }
.progress-steps li { display: flex; align-items: center; gap: 7px; padding-right: 14px; color: var(--muted); font-size: .9rem; font-weight: 600; }
.progress-steps li + li::before { content: ''; width: 18px; height: 2px; margin-right: 4px; background: var(--line); }
.progress-steps .dot { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--control); border-radius: 50%; font-size: .75rem; }
.progress-steps .done { color: var(--ink); }
.progress-steps .done .dot { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.progress-steps .current { color: var(--accent-strong); }
.progress-steps .current .dot { color: #082a28; background: var(--accent); border-color: var(--accent); }
.job-heading { margin: 0; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.2; }
.type-option { grid-auto-flow: column; white-space: nowrap; font-weight: 600; }
.type-option input { width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: var(--accent); }

/* ---------- Login ---------- */
.login-page { display: grid; place-items: center; padding: 20px; }
.login-box { width: min(100%, 400px); padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.login-box .brand { margin: 0 0 18px; }
.login-box h1 { margin: 0 0 18px; }
.login-box form { display: grid; gap: 14px; }
.login-box .big-button { width: 100%; }
.login-error { margin: 0; padding: 10px 12px; border-radius: 9px; background: #3a1d24; color: var(--error); }
.login-box #login-error, .login-done { margin: 0 0 14px; }
.login-done { padding: 10px 12px; border-radius: 9px; background: var(--accent-soft); }
.google-button { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 16px; border-radius: 9px;
  background: #fff; color: #1f1f1f; font-weight: 600; text-decoration: none; border: 1px solid #dadce0; }
.google-button:hover { background: #f3f4f6; }
.google-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.login-or { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; color: var(--muted); font-size: .9em; }
.login-or::before, .login-or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.login-box [hidden] { display: none !important; }
.user-chip { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .86rem; white-space: nowrap; }

/* New look */
.look-pending { display: grid; gap: 8px; margin: 0 0 12px; }
.look-pending-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 14px; border: 1px solid var(--line, #2a3340); border-radius: 10px; }
.look-pending-row .hint { flex: 1; }
.look-form { max-width: 640px; }
.look-form textarea, .look-form input, .look-form select { width: 100%; }
.look-grid + .sub-head { margin-top: 32px; }
.look-form { display: grid; gap: 14px; margin-bottom: 8px; }
.look-form label { display: grid; gap: 6px; }
.look-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.error-detail { max-height: 220px; overflow: auto; white-space: pre-wrap; font-size: .78rem; }

.look-refs { display: grid; gap: 10px; margin: 4px 0 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; }
.look-refs legend { padding: 0 6px; font-weight: 700; }
.ref-drop { display: grid; gap: 4px; place-items: center; text-align: center; padding: 22px 16px; border: 2px dashed var(--line); border-radius: 12px; cursor: pointer; }
.ref-drop:hover { border-color: var(--accent); }
.ref-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ref-pick { display: grid; gap: 6px; font-weight: 600; }
.ref-pick img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #000; }
.error-text { color: var(--error); }

/* Admin → Team */
.team-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.team-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; }
.team-who { display: grid; flex: 1; min-width: 0; }
.team-who strong, .team-who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-who small { color: var(--muted); }
.team-request { border-color: var(--accent) !important; background: var(--accent-soft); flex-wrap: wrap; }
.team-removed { opacity: .7; }
.team-add { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: end; }
.team-list select { width: auto; flex: none; }
.team-list button { flex: none; }

/* Feedback on a finished video */
.feedback { border: 1px solid var(--line, #d9e2ec); border-radius: 12px; padding: 14px 16px; background: var(--surface, #fff); }
.feedback h2 { font-size: 1.05rem; margin: 0 0 6px; }
.feedback form { display: grid; gap: 8px; margin-top: 10px; }
.feedback label { font-weight: 600; }
.feedback-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.feedback-list li { border-top: 1px solid var(--line, #d9e2ec); padding-top: 10px; }
.feedback-meta { color: var(--muted); font-size: .8rem; margin: 0; }
.feedback-text { margin: 4px 0 0; white-space: pre-wrap; }
.feedback-result { margin: 6px 0 0; font-size: .9rem; color: var(--accent-strong); }
.feedback-result.is-pending { color: var(--muted); }

/* The link to Thumbnail Studio (its own page, amber) so nobody mixes thumbnails with videos */
.workspace-nav a.nav-thumbs { color: #ffc566; }
.workspace-nav a.nav-thumbs:hover { color: #ffd08a; }

/* Voice anchor scripts in the prompt editor: one box per script */
.anchor-set { margin: 14px 0 0; padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 10px; min-width: 0; }
.anchor-set legend { padding: 0 6px; font-weight: 700; }
.anchor-set > .hint { margin: 0; }
.anchor-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.anchor-box { display: grid; gap: 6px; padding: 10px; background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 10px; }
.anchor-head { display: flex; align-items: center; gap: 10px; }
.anchor-head .anchor-words { margin-right: auto; font-size: .8rem; }
.anchor-box textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.anchor-set [data-add-anchor] { justify-self: start; }
.anchor-count { margin: 0; font-size: .85rem; }

/* Prompt editor: one field per script setting, each with a small (i) explanation */
#prompt-form { display: grid; gap: 14px; }
.pf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; align-items: start; }
.pf-grid .span-2 { grid-column: 1 / -1; }
.pf-field { display: grid; gap: 6px; min-width: 0; }
.pf-field[hidden] { display: none; }
.pf-label { display: flex; align-items: center; gap: 7px; font-weight: 640; font-size: .9rem; color: var(--ink); }
.pf-label label { display: inline; }
.pf-head { margin: 4px 0 -4px; font-size: 1rem; }
.pf-auto { display: grid; gap: 6px; padding: 9px 12px; border: 1px dashed var(--line); border-radius: 9px; }
.pf-auto .pf-label { font-weight: 440; color: var(--muted); }
.pf-auto b { color: var(--ink); font-weight: 640; }
.pf-minutes { font-size: .8rem; }
.pf-field input, .pf-field select, .pf-field textarea { width: 100%; box-sizing: border-box; }
.info-button { display: inline-grid; place-items: center; width: 20px; height: 20px; min-height: 0; padding: 0; flex: none;
  border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted);
  font: italic 700 .72rem/1 Georgia, 'Times New Roman', serif; cursor: pointer; }
.info-button:hover, .info-button[aria-expanded="true"] { color: var(--ink); border-color: var(--accent); background: var(--surface-subtle); }
.info-text { margin: 0; padding: 8px 10px; border-left: 3px solid var(--accent); background: var(--surface-subtle); border-radius: 0 8px 8px 0;
  color: var(--ink); font-size: .84rem; font-weight: 440; line-height: 1.45; }
.anchor-set legend .pf-label { font-weight: 700; }
@media (max-width: 640px) { .pf-grid { grid-template-columns: minmax(0, 1fr); } }
.pf-field textarea, .anchor-box textarea { font: inherit; font-size: .92rem; line-height: 1.5; }
.pf-range { display: flex; align-items: center; gap: 8px; }
.pf-range input { width: 0; flex: 1 1 0; min-width: 0; }
.pf-range span { color: var(--muted); font-size: .88rem; flex: none; }
