@font-face {
  font-family:Manrope;
  src:url("./fonts/manrope-cyrillic.woff2") format("woff2");
  font-weight:400 700;
  font-display:swap;
  unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family:Manrope;
  src:url("./fonts/manrope-latin.woff2") format("woff2");
  font-weight:400 700;
  font-display:swap;
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* Graphite surfaces from Prosvet account-theme.css, with the studio action accent. */
:root {
  color-scheme:dark;
  font-family:Manrope, "SF Pro Text", system-ui, sans-serif;
  font-size:16px;
  line-height:1.5;
  --canvas:#141715;
  --surface:#1d211e;
  --field-bg:#161a17;
  --soft:#262c27;
  --ink:#f1f4ef;
  --ink-hover:#d8dfd7;
  --muted:#a9b5ac;
  --line:#343e36;
  --line-strong:#6f7e72;
  --accent:#c0e987;
  --accent-hover:#d6f5aa;
  --accent-bg:#2e3927;
  --accent-text:#1b2616;
  --focus:#dbf5b0;
  --success-bg:#293025;
  --success-ink:#cedcc8;
  --warning-bg:#393127;
  --warning-ink:#edd2a4;
  --error-bg:#392622;
  --error-ink:#f3b6a6;
  --info-bg:#26333d;
  --info-ink:#c2dced;
  --motion:cubic-bezier(.22,1,.36,1);
  color:var(--ink);
  background:var(--canvas);
}

*,*::before,*::after {box-sizing:border-box}
[hidden] {display:none!important}
body {margin:0; min-width:320px}
button, input, select, textarea {font:inherit}
button, a, input, select, textarea { -webkit-tap-highlight-color:transparent }
button, summary, a {touch-action:manipulation}
button {cursor:pointer}
a {color:var(--accent); text-underline-offset:4px}
a:hover {color:var(--accent-hover)}
:focus-visible {outline:2px solid var(--focus); outline-offset:2px}
input:focus-visible, select:focus-visible, textarea:focus-visible {outline-offset:1px}
button:disabled, input:disabled, select:disabled {opacity:.52;cursor:not-allowed}
h1,h2,h3,p {margin:0}
h1,h2,h3 {text-wrap:balance}
p {text-wrap:pretty}
h1 {font-size:2.25rem; line-height:2.5rem; letter-spacing:-.045em}
h2 {font-size:1.125rem; line-height:1.75rem; letter-spacing:-.025em}
h3 {font-size:1rem; line-height:1.5rem; letter-spacing:-.012em}
small,.small-text {font-size:.75rem;line-height:1rem}
.muted {color:var(--muted)}
svg {flex:none;vertical-align:middle}
.visually-hidden,.skip:not(:focus) {position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip:focus {position:fixed;z-index:50;top:12px;left:12px;padding:8px 12px;background:var(--surface);color:var(--accent);border-radius:8px}
.actions,.form-actions {display:flex;align-items:center; flex-wrap:wrap;gap:8px}
.button {display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--field-bg);color:var(--ink);border:1px solid var(--line-strong);border-radius:8px;padding:8px 12px;min-height:40px;font-size:1rem;line-height:1.5rem;font-weight:600;text-decoration:none;white-space:nowrap;transition:background 240ms var(--motion),color 240ms var(--motion),transform 240ms var(--motion)}
.button:hover:not(:disabled) {background:var(--soft);color:var(--accent-hover)}
.button:active:not(:disabled) {transform:translateY(1px)}
.button.primary {background:var(--accent);color:var(--accent-text);border-color:var(--accent)}
.button.primary:hover:not(:disabled) {background:var(--accent-hover);color:var(--accent-text)}
.button.small {font-size:.875rem;line-height:1.25rem;padding:4px 8px;min-height:32px}
.button.ghost {background:transparent;border-color:transparent;color:var(--accent)}
.button[aria-pressed="true"] {background:var(--accent-bg);border-color:var(--line-strong);color:var(--accent-hover)}
.icon-button {min-height:32px;width:32px;padding:4px}
.icon-button span {display:none}
.small-action {display:inline-flex;color:var(--accent);font-size:.875rem;font-weight:600;line-height:1.25rem;text-decoration:none}
.small-action:hover {text-decoration:underline}
.setup-link svg {display:none}
.menu-toggle {display:none}
.external-icon {text-decoration:none}
.badge {display:inline-flex;align-items:center;gap:4px;padding:4px 8px;border-radius:9999px;white-space:nowrap;font-size:.75rem;line-height:1rem;font-weight:700}
.badge i,.date-line i {display:block;width:8px;height:8px;flex:none;border-radius:50%;background:currentColor;opacity:.72}
.badge.neutral {background:var(--soft);color:var(--ink-hover)}
.badge.good {background:var(--success-bg);color:var(--success-ink)}
.badge.warn {background:var(--warning-bg);color:var(--warning-ink)}
.badge.bad {background:var(--error-bg);color:var(--error-ink)}
.badge.blue {background:var(--info-bg);color:var(--info-ink)}

.shell {min-height:100vh; display:grid;grid-template-columns:224px minmax(0,1fr)}
.sidebar {position:sticky;top:0;align-self:start;height:100dvh;overflow:auto;display:flex;flex-direction:column;background:var(--surface);border-right:1px solid var(--line);padding:20px 12px 16px}
.brand {display:flex;align-items:center;gap:12px;color:var(--ink);text-decoration:none;margin:0 8px 32px}
.brand img {flex:none;border-radius:12px}
.sidebar .brand {margin-bottom:26px}
.brand strong,.brand small {display:block}
.brand strong {font-size:1rem;line-height:1.5rem;font-weight:700;letter-spacing:-.025em}
.brand small {font-size:.75rem;line-height:1rem;color:var(--muted)}
.sidebar nav {display:grid;gap:12px}
.nav-group {display:grid;gap:2px}
.nav-group-name {padding:0 12px 4px;color:var(--muted);font-size:.72rem;font-weight:700;line-height:1.25}
.nav-workspace {padding-top:10px;border-top:1px solid var(--line)}
.nav-link {display:flex;align-items:center;gap:10px;padding:8px 11px;min-height:40px;color:var(--ink-hover);text-decoration:none;font-size:.875rem;line-height:1.25rem;font-weight:600;border:1px solid transparent;border-radius:8px;transition:background 240ms var(--motion),color 240ms var(--motion)}
.nav-link:hover {background:var(--soft);color:var(--accent)}
.nav-link.selected {background:var(--accent-bg);color:var(--accent-hover);border-color:#495a39;font-weight:700}
.sidebar-foot {margin-top:auto;padding:16px 8px 0}
.sidebar-chip {display:flex;align-items:center;gap:8px;color:var(--muted);font-size:.75rem;line-height:1rem;font-weight:600}
.sidebar-chip svg {color:var(--accent)}
.workspace {min-width:0;background:radial-gradient(ellipse at 42% 0%,#1d241d 0,transparent 58rem),var(--canvas)}
.workspace-top {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 32px;background:var(--surface);border-bottom:1px solid var(--line);min-height:64px}
.crumbs,.top-actions {display:flex;align-items:center;gap:12px;font-size:.875rem;line-height:1.25rem;color:var(--muted)}
.crumbs strong {font-weight:600;color:var(--ink)}
.top-actions .button.icon-button {width:38px;min-height:38px;color:var(--muted)}
.top-actions .button.icon-button:hover {color:var(--ink)}
.content {padding:32px;max-width:1440px;margin:auto}
.state-connection {display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin:16px 32px 0}
.state-connection .button {color:var(--ink)}
.content > * + * {margin-top:24px}
.content > .date-line {margin:0}
.content > .date-line + .page-title {margin-top:8px}
.date-line {display:flex;align-items:center;gap:8px;font-size:.875rem;line-height:1.25rem;font-weight:600;color:var(--muted)}
.page-title {display:flex;align-items:center;justify-content:space-between;gap:24px}
.page-title h1 {max-width:680px;overflow-wrap:anywhere}
.page-title p {color:var(--muted);margin-top:8px;font-size:.875rem;line-height:1.25rem}

.stat-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.stat {background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:16px}
.stat-top {display:flex;align-items:center;gap:8px;color:var(--muted)}
.stat-top h2 {font-size:.875rem;line-height:1.25rem;font-weight:650;letter-spacing:-.012em}
.stat-icon,.campaign-icon,.empty-icon,.cal-icon,.item-glyph,.step-icon {display:grid;place-items:center;flex:none;width:40px;height:40px;border-radius:8px;background:var(--soft);color:var(--accent)}
.stat-icon.green {background:var(--success-bg);color:var(--success-ink)}
.stat-icon.blue {background:var(--info-bg);color:var(--info-ink)}
.stat-icon.lime {background:var(--accent-bg);color:var(--accent)}
.stat-icon.amber {background:var(--warning-bg);color:var(--warning-ink)}
.stat-number {display:block;margin-top:16px;font-size:1.875rem;line-height:2.25rem;letter-spacing:-.04em;font-weight:700;font-variant-numeric:tabular-nums}
.stat p {margin-top:4px;color:var(--muted);font-size:.75rem;line-height:1rem}
.split {display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:16px}
.panel {min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:16px;overflow:hidden}
.panel-title {min-height:56px;padding:12px 16px;display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line)}
.panel-title h2 {flex:1 1 8rem;min-width:0;overflow-wrap:anywhere}
.panel-title > .button {flex:none;max-width:100%;white-space:normal;text-align:center}
.panel-body {padding:16px}
.panel-body p + p {margin-top:12px}
.campaign-card {margin:16px;padding:16px;background:var(--accent-bg);border-radius:8px}
.campaign-icon {width:36px;height:36px;background:var(--surface);color:var(--accent);margin-bottom:8px}
.campaign-card h3 {font-size:1.25rem;line-height:1.75rem}
.campaign-card p {margin-top:4px;color:var(--ink-hover);font-size:.875rem;line-height:1.25rem}
.campaign-meta {display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.campaign-detail {margin:0 16px;padding:8px 0;display:flex;justify-content:space-between;gap:8px;font-size:.875rem;line-height:1.25rem;color:var(--muted)}
.campaign-detail + .campaign-detail {border-top:1px solid var(--line);margin-bottom:8px}
.campaign-detail b {color:var(--ink)}
.empty {display:grid;justify-items:center;text-align:center;padding:32px 16px;gap:8px}
.empty .empty-icon {margin-bottom:4px;width:48px;height:48px;border-radius:12px}
.empty p {max-width:38ch;color:var(--muted);font-size:.875rem;line-height:1.25rem}
.empty .button {margin-top:4px}
.calendar-cards {list-style:none;margin:0;padding:4px 16px}
.calendar-cards li {display:flex;align-items:center;gap:8px;padding:12px 0;font-size:.875rem;line-height:1.25rem}
.calendar-cards li+li {border-top:1px solid var(--line)}
.calendar-cards li > div {min-width:0;flex:1}
.calendar-cards small,.setup-steps small {display:block;color:var(--muted);overflow-wrap:anywhere}
.cal-icon {width:32px;height:32px}
.table-wrap {overflow:auto}
table {width:100%;border-collapse:collapse;text-align:left;font-size:.875rem;line-height:1.25rem}
th {padding:12px 16px;color:var(--muted);font-size:.75rem;font-weight:700;background:var(--soft);white-space:nowrap}
td {padding:12px 16px;border-top:1px solid var(--line);vertical-align:middle;min-width:0}
td:first-child {max-width:52ch;overflow-wrap:anywhere}
tbody tr:hover {background:var(--soft)}
.item-link {display:flex;align-items:center;gap:8px;text-decoration:none;color:var(--ink);min-width:128px}
.item-link:hover {text-decoration:underline}
.item-glyph {width:32px;height:32px}
.cell-note {display:block;margin-top:4px;font-size:.75rem;line-height:1rem;color:var(--muted);max-width:52ch;overflow-wrap:anywhere}
.toolbar {padding:12px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line)}
.toolbar form {display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.selection-bar {border-top:1px solid var(--line);border-bottom:0}
.search-input {display:flex;align-items:center;gap:8px;border:1px solid var(--line-strong);border-radius:8px;padding-left:8px;color:var(--muted)}
.search-input {min-width:0;max-width:100%}
.search-input input {border:0;background:transparent;min-width:0;max-width:100%}

.back-link {display:inline-flex;align-items:center;gap:8px;text-decoration:none;font-size:.875rem;line-height:1.25rem;font-weight:600}
.back-link + .page-title {margin-top:12px}
.editor-grid {display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,384px);gap:16px;align-items:start}
.editor-main {min-width:0;display:grid;gap:16px}
.player-panel .panel-title {flex-wrap:wrap}
.video-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:12px 16px 0}
.video-col {min-width:0}
.video-label {display:flex;align-items:center;justify-content:space-between;gap:4px;margin-bottom:8px;font-size:.875rem;line-height:1.25rem;min-height:24px}
.video-label .small-action {font-size:.75rem;line-height:1rem}
#source-copy-controls p,#result-copy-controls p {margin:8px 0}
#source-copy-controls .button,#result-copy-controls .button {max-width:100%;white-space:normal;text-align:left}
#result-copy-controls button {margin-top:8px}
#result-draft-note,.result-brand-window {margin-top:8px}
.result-brand-window p + p {margin-top:4px}
.result-brand-window .button {margin-top:6px;max-width:100%;white-space:normal;text-align:left}
#edit-plan [name=brand_start] {scroll-margin-top:84px}
.video-stage {position:relative;display:grid;place-items:center;min-width:0;height:clamp(240px,44vh,480px);border-radius:8px;background:#181818;color:var(--ink);overflow:hidden}
#source-stage,#editor-operations-heading,#output-fields input,[data-action="inspect-source"],[data-action="pick-mask"] {scroll-margin-top:84px}
#source-inspection {display:grid;min-width:0;gap:4px;margin-top:8px}
#source-inspection .button,#source-mask-status .button {white-space:normal;text-align:left}
#source-mask-status {margin-top:8px}
#source-inspection p {margin:4px 0}
.inspection-layer {position:absolute;inset:0;pointer-events:none}
.inspection-box {position:absolute;border:2px solid #85dcff;box-shadow:0 0 0 1px #111, inset 0 0 0 1px #111}
.inspection-box.estimated {border-style:dashed}
.video-stage video {position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain}
.video-placeholder {display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:12px;gap:8px;color:var(--muted);font-size:.875rem;line-height:1.25rem;overflow-wrap:anywhere}
.video-placeholder svg {opacity:.72}
.mask-layer {position:absolute;inset:0;cursor:crosshair;touch-action:none;z-index:1}
.mask-box {position:absolute;pointer-events:none;background:#c8f08d45;border:2px solid #daf4a3;box-shadow:0 0 0 1px #273922;min-width:2px;min-height:2px}
.timeline {padding:12px 16px 16px}
.timeline-head,.timeline-actions {display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;color:var(--muted);font-size:.875rem;line-height:1.25rem}
.timeline-head span {display:flex;align-items:center;gap:8px}
.timeline-head output {font-variant-numeric:tabular-nums;white-space:nowrap}
.timeline input[type="range"] {display:block;width:100%;margin:8px 0 4px;accent-color:var(--accent)}
.timeline-track {position:relative;min-height:8px;border-radius:4px;background:var(--soft)}
.timeline-mark {position:absolute;top:0;bottom:0;min-width:4px;padding:0;background:var(--accent);border:1px solid var(--accent);border-radius:4px}
.timeline-mark:hover {background:var(--accent-hover)}
.timeline-actions {justify-content:flex-start;margin-top:12px}
.evidence summary,.editor-part summary {cursor:pointer;font-weight:700;font-size:.875rem;line-height:1.25rem}
.evidence {padding:12px 16px}
.source-analysis-status:not(:empty) {padding:12px 16px 0}
.details-body {display:grid;gap:12px;margin-top:12px}
.qc-summary {display:flex;align-items:center;flex-wrap:wrap;gap:8px;color:var(--muted);font-size:.875rem;line-height:1.25rem}
.qc-summary code {overflow-wrap:anywhere}
.qc-summary ul {margin:4px 0 0;padding-left:24px}
.editor-controls {align-self:start}
.editor-form {display:grid}
.editor-part {padding:12px 16px}
.editor-part + .editor-part {border-top:1px solid var(--line)}
.editor-heading {display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.editor-heading h3 {font-size:.875rem;line-height:1.25rem}
.editor-part #brand-fields,.editor-part #operation-fields {display:grid;gap:8px}
.operation {display:grid;gap:8px;margin:0;padding:8px 12px 12px;min-width:0;border:1px solid var(--line-strong);border-radius:8px;background:var(--field-bg)}
.operation legend {padding:0 4px;color:var(--muted);font-size:.75rem;line-height:1rem}
.op-top {display:flex;align-items:end;gap:4px}
.op-top .field {flex:1;min-width:0}
.op-tools,.keyframes {display:flex;gap:4px;flex-wrap:wrap}
.profile-rule-action {margin-top:8px}
.external-replacement {margin-top:12px;align-items:start}
.external-replacement input {flex:none;margin-top:2px}
.external-evidence {padding:8px 0}
.native-sponsor-proof {display:grid;gap:8px}
.native-sponsor-proof td {font-variant-numeric:tabular-nums}
.submit-part .button {font-size:.875rem;line-height:1.25rem}
.submit-part .form-actions {gap:4px;justify-content:space-between}
.submit-part .form-result,.submit-part p {margin-top:8px}
.account-checks {display:grid;gap:4px}

.field {display:grid;gap:4px;min-width:0;color:var(--ink-hover);font-size:.875rem;line-height:1.25rem;font-weight:650}
.field small {color:var(--muted);font-weight:400}
.field :where(input,select,textarea) {width:100%;min-width:0}
.fields {display:grid;gap:8px}
.fields.two {grid-template-columns:repeat(2,minmax(0,1fr))}
.fields.three {grid-template-columns:repeat(3,minmax(0,1fr))}
.fields.four {grid-template-columns:repeat(4,minmax(0,1fr))}
input:not([type=checkbox],[type=range]),select,textarea {min-height:36px;padding:8px;border:1px solid var(--line-strong);border-radius:8px;color:var(--ink);background:var(--field-bg);font-size:.875rem;line-height:1.25rem;font-weight:500}
input::placeholder {color:var(--muted)}
select {text-overflow:ellipsis}
input[type=checkbox] {width:16px;height:16px;margin:0;accent-color:var(--accent)}
input[type=file] {max-width:100%;overflow:hidden}
.check-inline {display:flex;align-items:center;gap:8px;color:var(--muted);font-size:.875rem;line-height:1.25rem}
.form-result {font-size:.875rem;line-height:1.25rem;color:var(--success-ink);overflow-wrap:anywhere}
.form-result:empty {display:none}
.inline-error {margin-top:4px;padding:8px 12px;border-radius:8px;background:var(--error-bg);color:var(--error-ink);font-size:.875rem;line-height:1.25rem;overflow-wrap:anywhere}
.wide-form {display:grid;grid-template-columns:minmax(0,1fr);gap:12px;padding:16px;max-width:920px}
.wide-form p:not(.inline-error) {color:var(--muted)}
.diagnostic {margin:0;padding:16px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 16px}
.diagnostic div {padding:8px;background:var(--soft);border-radius:8px}
.diagnostic dt {font-size:.75rem;line-height:1rem;color:var(--muted)}
.diagnostic dd {margin:4px 0 0;font-size:.875rem;line-height:1.25rem;font-weight:600;overflow-wrap:anywhere}
.diagnostic.funnel {grid-template-columns:repeat(4,minmax(0,1fr))}
.setup-steps {margin:0;padding:4px 16px;list-style:none}
.setup-steps li {display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:12px 0}
.setup-steps li+li {border-top:1px solid var(--line)}

dialog {width:min(560px,calc(100% - 24px));max-height:calc(100vh - 24px);border:1px solid var(--line-strong);border-radius:16px;padding:0;background:var(--surface);color:var(--ink);box-shadow:0 20px 60px #0009}
dialog::backdrop {background:#111a;backdrop-filter:blur(2px)}
.dialog-content {padding:16px}
.auth-card input:not([type=checkbox]) {min-height:48px}
.dialog-title {display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}
.dialog-content form {display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
.dialog-content .button {max-width:100%;white-space:normal;text-align:center}
.dialog-content .button span {min-width:0;overflow-wrap:anywhere}
.dialog-content .check-inline {align-items:start}
.dialog-content .check-inline input {flex:none;margin-top:2px}
.dialog-content form + form {margin-top:16px;padding-top:16px;border-top:1px solid var(--line)}
.calibration-result,.calibration-trial {display:grid;gap:8px;margin-bottom:12px}
.calibration-result {border:1px solid var(--line);border-radius:8px;padding:8px}
.calibration-media {border:0;display:grid;gap:12px;margin:0;min-width:0;padding:0}
.calibration-result code {overflow-wrap:anywhere}
.calibration-result summary {cursor:pointer;font-size:.875rem;line-height:1.25rem}
.calibration-video {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.calibration-video video {display:block;width:100%;max-height:280px;background:#181818;border-radius:8px}
.drop-file {display:grid;justify-items:center;text-align:center;gap:8px;border:1px dashed var(--line-strong);border-radius:8px;padding:16px;cursor:pointer;background:var(--field-bg)}
.drop-file:hover,.drop-file.over {background:var(--accent-bg)}
.drop-file small {color:var(--muted);overflow-wrap:anywhere}
.notification {position:fixed;z-index:4;right:24px;bottom:24px;display:flex;align-items:start;gap:8px;padding:12px 16px;border:1px solid var(--line-strong);background:var(--success-bg);border-radius:12px;color:var(--success-ink);font-size:.875rem;line-height:1.25rem;font-weight:600;box-shadow:0 8px 24px #0006;max-width:min(560px,calc(100% - 48px))}
.notification.error {color:var(--error-ink);background:var(--error-bg);border-color:var(--error-ink)}
.notification span {overflow-wrap:anywhere}
.auth,.boot {min-height:100vh;display:grid;place-items:center;padding:24px}
.auth-card {background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:32px;width:min(440px,100%);box-shadow:0 16px 40px #0005}
.auth-card h1 {font-size:1.875rem;line-height:2.25rem;margin-top:12px}
.auth-card p {color:var(--muted);margin-top:8px;font-size:.875rem;line-height:1.25rem}
.auth-card form {display:grid;gap:12px;margin-top:24px}
.auth-card > .button {margin-top:12px}
.auth-brand {margin:0}
.boot {align-content:center;gap:12px}
.brand-mark {display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:var(--accent);color:var(--accent-text);font-size:1.25rem;line-height:1.75rem;font-weight:700}
.skeleton {height:12px;width:240px;border-radius:8px;background:var(--soft)}
.skeleton.short {width:128px}

@media (max-width:1200px) {
  .shell {grid-template-columns:208px minmax(0,1fr)}
  .content {padding:24px}
  .workspace-top {padding-inline:24px}
  .editor-grid {grid-template-columns:minmax(0,1fr) 336px}
}
@media (max-width:1024px) {
  .stat-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  .editor-grid {grid-template-columns:minmax(0,1fr)}
  .editor-main,.editor-controls {grid-column:1}
  .editor-controls {grid-row:auto}
  .video-stage {height:clamp(240px,50vh,480px)}
}
@media (max-width:800px) {
  .shell {grid-template-columns:minmax(0,1fr)}
  .sidebar {display:none}
  .sidebar.mobile-open {display:flex;position:fixed;inset:64px auto 0 0;width:min(264px,calc(100vw - 24px));height:calc(100dvh - 64px);z-index:5;overflow:auto;box-shadow:12px 0 32px #0008}
  .menu-toggle {display:inline-flex;width:40px;min-height:40px;padding:4px}
  .menu-toggle span {position:absolute;clip-path:inset(100%)}
  .workspace-top {position:sticky;top:0;z-index:3;gap:8px;padding:12px 16px}
  .content {padding:16px}
  .state-connection {margin-inline:16px}
}
@media (max-width:560px) {
  .workspace-top {padding-inline:12px}
  .crumbs {gap:8px;min-width:0}
  .crumbs > span,.crumbs > svg {display:none}
  .crumbs strong {min-width:0;line-height:1.1;overflow-wrap:anywhere}
  .top-actions {gap:8px;flex:none}
  .setup-link {width:40px;height:40px;align-items:center;justify-content:center}
  .setup-link svg {display:block}
  .setup-link span {display:none}
  .split {grid-template-columns:minmax(0,1fr)}
  .page-title {align-items:start;flex-direction:column;gap:12px}
  .page-title h1 {font-size:1.875rem;line-height:2.25rem}
  .stat-grid {gap:8px}
  .stat {padding:12px}
  .stat-icon {width:32px;height:32px}
  .stat-top h2 {font-size:.75rem;line-height:1rem}
  .video-grid {gap:4px;padding-inline:8px}
  :is(.reviewing-source,.drawing-mask) .video-grid {grid-template-columns:minmax(0,1fr)}
  :is(.reviewing-source,.drawing-mask) #result-column {display:none}
  .video-stage {height:clamp(192px,36vh,320px)}
  .video-label {align-items:start;flex-direction:column}
  .video-label strong {overflow-wrap:anywhere}
  .diagnostic {grid-template-columns:repeat(2,minmax(0,1fr))}
  .diagnostic.funnel {grid-template-columns:repeat(2,minmax(0,1fr))}
  .fields.four {grid-template-columns:repeat(2,minmax(0,1fr))}
  .toolbar {align-items:start;flex-direction:column}
  .setup-steps li {grid-template-columns:auto 1fr}
  .setup-steps li > .button {grid-column:2;justify-self:start}
}
@media (max-width:380px) {
  #campaign-form .fields.two {grid-template-columns:minmax(0,1fr)}
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after {animation-duration:0s !important;transition-duration:0s !important}
}

.scope-choices{border:0;padding:0;margin:12px 0}.scope-choices legend{margin-bottom:8px}.choice-list{display:flex;gap:8px 18px;flex-wrap:wrap}.choice-list label{display:inline-flex;align-items:center;gap:5px}.choice-list input{width:auto}

.creation-index {align-items:start}
.creation-stack {display:grid;gap:16px}
.panel-body.creation-stack > p,.creation-source-details p + p {margin-top:0}
.creation-source-details {display:grid;gap:8px}
.clipping-source-video {display:block;width:min(100%,720px);max-height:65vh;background:#000}
.creation-rights {align-items:start}
.creation-rights input {flex:none;margin-top:2px}
.creation-project-list,.creation-comments {list-style:none;padding:0 16px}
.creation-project-list li,.creation-comments li {display:flex;align-items:center;gap:12px;padding:12px 0}
.creation-project-list li {justify-content:space-between}
.creation-project-list li + li,.creation-comments li + li {border-top:1px solid var(--line)}
.creation-project-list a {min-width:0;overflow-wrap:anywhere}
.creation-project-list .badge {flex:none}
.creation-brief-detail summary {cursor:pointer;font-weight:650}
.brief-scene {display:grid;grid-template-columns:minmax(0,1.3fr) minmax(100px,.7fr);gap:8px;min-width:0;margin:0;padding:8px 10px 10px;border:1px solid var(--line);border-radius:8px}
.brief-scene legend {padding:0 4px;color:var(--ink);font-size:.875rem}
.brief-scene select,.brief-scene input {min-width:0;width:100%}
.creation-brief-detail dl,.creation-hooks {display:grid;gap:8px;margin:12px 0 0}
.creation-brief-detail dt {color:var(--muted);font-size:.875rem}
.creation-brief-detail dd,.creation-hooks dd {margin:0;overflow-wrap:anywhere}
.creation-hooks div {display:grid;grid-template-columns:24px minmax(0,1fr);gap:8px}
.creation-hooks dt {font-weight:700;color:var(--accent)}
.creation-candidates {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:16px}
.creation-candidate {display:grid;align-content:start;min-width:0;gap:8px;padding:16px;border:1px solid var(--line);border-radius:8px}
.creation-candidate-top {display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.creation-candidate-top h3 {overflow-wrap:anywhere}
.creation-time {white-space:nowrap;font-variant-numeric:tabular-nums;color:var(--muted);font-size:.875rem}
.creation-candidate p,.creation-candidate blockquote,.creation-comments span {overflow-wrap:anywhere;font-size:.875rem}
.creation-candidate blockquote {max-height:7.5rem;overflow:auto;margin:0;padding:4px 8px;border-left:2px solid var(--line-strong)}
.selection-fields {display:grid;gap:12px;padding:12px 0 0;margin:0;border:0;min-width:0}

.creation-selection {padding:0}
.creation-profile-list {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0;margin:0;padding:0;border:0}
.creation-profile-list legend {padding:0;margin-bottom:7px;color:var(--ink);font-size:.875rem;font-weight:650}
.creation-profile-choice {display:grid;grid-template-columns:auto minmax(0,1fr);align-content:start;gap:7px;min-width:0;padding:9px;border:1px solid var(--line);border-radius:8px;background:var(--field-bg);cursor:pointer}
.creation-profile-choice:hover {border-color:var(--line-strong)}
.creation-profile-choice:has(input:checked) {background:var(--accent-bg);border-color:var(--accent)}
.creation-profile-choice:has(input:focus-visible) {outline:2px solid var(--accent);outline-offset:2px}
.creation-profile-choice input[type=radio] {width:1rem;height:1rem;min-height:0;margin:1px 0 0;padding:0;accent-color:var(--accent)}
.creation-profile-choice span {display:grid;gap:3px;overflow-wrap:anywhere}
.creation-profile-choice strong {color:var(--ink);font-size:.875rem;line-height:1.2}
.creation-profile-choice small {color:var(--muted);font-size:.75rem;line-height:1.3}
.creation-candidate-form {display:grid;gap:8px;margin-top:4px}
.creation-workspace {display:grid;grid-template-columns:minmax(300px,.85fr) minmax(0,1.15fr);gap:16px;align-items:start}
.creation-workspace > * {min-width:0}
.creation-project-toolbar .creation-stack {display:flex;align-items:center;gap:8px 18px;flex-wrap:wrap;padding:10px 16px}
.creation-project-toolbar .creation-stack > .actions {margin:0}
.creation-project-toolbar .creation-stack > .actions .button {padding-inline:6px}
.creation-project-toolbar .creation-work-status {margin:0}
.creation-project-heading .page-title {gap:12px;margin-bottom:16px}
.creation-project-heading h1 {font-size:clamp(1.5rem,2.4vw,2rem);line-height:1.2}
.creation-project-toolbar .creation-brief-detail {margin:0 0 0 auto;max-width:100%}
.creation-project-toolbar .creation-brief-detail[open] {flex-basis:100%;margin-left:0}
.creation-project-toolbar :is(.inline-error,[role=alert]) {flex-basis:100%}
.creation-result-actions {padding-top:10px}
.creation-poster-play {position:absolute;inset:0;display:grid;place-items:center;padding:0;border:0;border-radius:inherit;background:#080b09;cursor:pointer;color:#fff;overflow:hidden}
.creation-poster-play img {position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain}
.creation-poster-icon {position:relative;display:grid;place-items:center;width:68px;height:68px;border:1px solid #ffffff80;border-radius:50%;background:#080b09b8;backdrop-filter:blur(8px);transition:transform .15s,background .15s}
.creation-poster-play:hover .creation-poster-icon {transform:scale(1.07);background:#080b09e8}
.creation-poster-caption {position:absolute;inset:auto 0 0;padding:40px 12px 16px;background:linear-gradient(transparent,#080b09e8);font-size:.875rem}
.creation-workspace > [data-creation-preview] {position:sticky;top:20px}
.creation-workspace .creation-preview {grid-template-columns:repeat(2,minmax(0,1fr));padding-bottom:12px;gap:16px}
.creation-workspace .creation-preview.single {grid-template-columns:minmax(0,1fr)}
.creation-workspace .video-stage {width:min(100%,360px,calc((100dvh - 260px) * 9 / 16));height:auto;aspect-ratio:9/16;margin-inline:auto;background:#080b09}
.creation-workspace .video-label {gap:8px;align-items:start;min-height:36px;margin-bottom:8px;white-space:normal}
.creation-workspace .video-label strong {line-height:1.35}
.creation-workspace .creation-edits {display:block}
.creation-workspace.is-comparing {grid-template-columns:minmax(0,1fr)}
.creation-workspace.is-comparing > [data-creation-preview] {position:static}
.creation-workspace.is-comparing .creation-edits {display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)}
.creation-workspace:has([data-creation-preview][hidden]) {display:none}
.creation-output-details {border-top:1px solid var(--line);margin-top:12px;padding-top:10px;font-size:.8rem}
.creation-output-details > summary,.creation-notes > summary {cursor:pointer;color:var(--muted)}
.creation-output-details .details-body {display:grid;gap:8px}
.creation-notes {border-top:1px solid var(--line);padding:16px}
.creation-notes > summary {font-weight:600;font-size:.875rem}
.creation-notes > div {margin-inline:-16px}
.creation-preview video {object-fit:contain}
.creation-time-input {display:flex;align-items:end;gap:8px;flex-wrap:wrap}
.creation-time-input .field {max-width:100px}
.creation-comments li {align-items:flex-start}
.creation-comments .button {font-variant-numeric:tabular-nums}
.creation-edits {gap:0}
.creation-edits > div {border-left:1px solid var(--line)}
@media (max-width:1050px) {
  .creation-workspace {grid-template-columns:minmax(0,1fr)}
  .creation-workspace > [data-creation-preview] {position:static}
  .creation-workspace .video-stage {width:min(100%,360px);height:auto}
  .creation-workspace.is-comparing .creation-edits {display:block}
}
@media (max-width:560px) {
  .creation-project-toolbar .creation-stack {gap:8px 12px;padding:8px 12px}
  .creation-project-toolbar .creation-stack > .actions {width:100%;gap:4px}
  .creation-project-toolbar .creation-brief-detail {margin-left:0;font-size:.8rem}
  .creation-project-toolbar .creation-brief-detail > summary {font-size:.8rem}
  .creation-workspace .creation-preview:not(.single) .video-stage {width:100%;height:auto;aspect-ratio:9/16}
}
@media (max-width:900px) {
  .creation-index,.creation-candidates {grid-template-columns:minmax(0,1fr)}
}
@media (max-width:560px) {
  .creation-preview,.creation-edits {grid-template-columns:minmax(0,1fr)}
  .creation-edits > div {border-left:0;border-top:1px solid var(--line)}
  .creation-index .fields.two,.creation-index .fields.three {grid-template-columns:minmax(0,1fr)}
  .creation-index .fields.creation-clip-controls {grid-template-columns:minmax(0,1.35fr) minmax(0,1fr)}
  .creation-profile-choice {padding:8px}
  .creation-candidate-top {align-items:start;flex-direction:column}
}

[data-creation-proposals]:empty,[data-creation-history]:empty,[data-creation-revision]:empty {display:none}

.creation-mobile-jumps {display:none}
[data-creation-anchor] {scroll-margin-top:84px}
[data-creation-summary]:empty,[data-creation-connection]:empty {display:none}
.creation-contact {display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.creation-source-link {max-width:100%;white-space:normal;overflow-wrap:anywhere}
.creation-history tr.creation-tracked {background:var(--accent-bg)}
.creation-history .creation-track-label {color:var(--accent);font-weight:650}
.creation-preview .video-label strong {overflow-wrap:anywhere}
.creation-preview .video-stage .video-placeholder {position:static}
.creation-work-status {font-size:.875rem}
.campaign-scope {width:min(100%,360px)}
.campaign-picker {max-width:100%}
.editor-campaign {display:grid;gap:8px}
.editor-campaign > .button {justify-self:start}
.clip-ranges,.clip-ranges-options {display:grid;min-width:0;gap:8px}
.clip-ranges-list {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;list-style:none;padding:0;margin:0}
.clip-ranges-list .button {display:grid;justify-items:start;width:100%;min-height:44px;gap:2px;text-align:left;white-space:normal;font-variant-numeric:tabular-nums}
.clip-ranges-list .button[aria-pressed=true] {border-color:var(--accent);background:var(--accent-bg);color:var(--ink)}
.clip-ranges-options .actions .button {min-height:36px;white-space:normal}
.clip-range-history {margin:3px 0 6px;padding-inline-start:1.55em;font-size:.75rem;font-variant-numeric:tabular-nums}
.clip-trim {display:grid;min-width:0;gap:12px;padding:12px;border:1px solid var(--line);border-radius:8px;background:var(--field-bg)}
.trim-edge {display:grid;gap:6px;min-width:0}
.trim-nudges {display:flex;gap:4px;flex-wrap:wrap}
.trim-nudges .button {font-variant-numeric:tabular-nums}
.trim-edge input[aria-invalid=true] {border-color:var(--error-ink)}
.trim-interval,.trim-scale {font-size:.75rem;line-height:1rem;font-variant-numeric:tabular-nums}
.trim-timeline {display:grid;gap:4px}
.trim-scale {display:flex;align-items:center;justify-content:space-between;gap:4px;color:var(--muted)}
.trim-scale strong {color:var(--accent);white-space:nowrap}
.trim-ruler {position:relative;display:grid;align-items:center;min-height:28px}
.trim-track {position:absolute;inset:calc(50% - 3px) 0 auto;height:6px;background:var(--line);border-radius:4px;overflow:hidden}
.trim-track i {position:absolute;inset:0 auto 0 0;background:var(--accent);opacity:.85}
.trim-track .trim-invalid {background:var(--error-ink)}
.trim-ruler input {position:relative;width:100%;margin:0;appearance:none;background:transparent;height:22px;cursor:pointer}
.trim-ruler input::-webkit-slider-runnable-track {background:transparent}
.trim-ruler input::-moz-range-track {background:transparent}
.trim-ruler input::-webkit-slider-thumb {appearance:none;width:14px;height:20px;border-radius:4px;background:var(--ink);border:2px solid var(--accent-text)}
.trim-ruler input::-moz-range-thumb {width:12px;height:18px;border-radius:4px;background:var(--ink);border:2px solid var(--accent-text)}
.clip-trim video {display:block;width:100%;max-height:300px;background:#181818;border-radius:8px}
.trim-transcript summary {cursor:pointer;font-size:.875rem;font-weight:650}
.trim-transcript ul {display:grid;gap:6px;list-style:none;padding:0;margin:8px 0}
.trim-transcript li {display:flex;gap:6px;align-items:baseline;font-size:.875rem;overflow-wrap:anywhere}
.trim-transcript li .button {flex:none;font-variant-numeric:tabular-nums}
.trim-transcript [data-trim-caption-help]:empty {display:none}
.trim-transcript .actions .button {white-space:normal;text-align:center}
.clip-crop {display:grid;min-width:0;gap:8px;margin:0;padding:8px 12px 12px;border:1px solid var(--line);border-radius:8px}
.clip-crop legend {padding:0 4px;color:var(--ink);font-weight:650;font-size:.875rem}
.clip-crop input[aria-invalid=true] {border-color:var(--error-ink)}
.clip-crop .actions .button {white-space:normal;text-align:center}
.clip-crop-stage {display:grid;place-items:center;min-width:0;overflow:hidden;border-radius:8px;background:#141414}
.clip-crop-frame {position:relative;width:min(100%,calc(var(--crop-ratio) * 320px));aspect-ratio:var(--crop-ratio);overflow:hidden;touch-action:none;cursor:crosshair}
.clip-crop-frame video {position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}
.clip-crop-outline {position:absolute;border:2px solid #65e8ff;box-shadow:0 0 0 100vmax #0008,inset 0 0 0 1px #171717;cursor:move}
.clip-crop-outline.full-frame {cursor:crosshair}
.clip-result-edges {margin:4px 0}
.clip-caption-review {padding:2px 0 6px}
.release-status {display:grid;gap:8px}
.release-checks {display:grid;gap:6px;margin:0}
.release-checks:empty {display:none}
.release-checks div {display:flex;align-items:center;gap:4px 12px;flex-wrap:wrap}
.release-checks dt {color:var(--muted);font-size:.875rem}
.release-checks dd {margin:0;overflow-wrap:anywhere}
[data-manual-publishing] {scroll-margin-top:84px}
[data-manual-connection]:empty {display:none}
[data-manual-connection] {margin:12px 16px}
.manual-tasks {display:grid;list-style:none;padding:0 16px;margin:0}
.manual-tasks > li {display:grid;gap:8px;padding:12px 0;border-top:1px solid var(--line);overflow-wrap:anywhere;scroll-margin-top:84px}
.manual-task-title {display:flex;align-items:start;justify-content:space-between;gap:8px;flex-wrap:wrap}
.manual-task-description,.publication-caption-preview {white-space:pre-wrap;color:var(--ink-hover);font-size:.875rem;line-height:1.25rem}
.publication-caption-preview {padding:8px 12px;border-left:2px solid var(--accent);overflow-wrap:anywhere}
.manual-receipt {background:var(--field-bg);border-radius:8px;border:1px solid var(--line)}
@media (max-width:560px) {
  [data-manual-publishing] .fields.two {grid-template-columns:minmax(0,1fr)}
}
@media (max-width:900px) {
  .creation-mobile-jumps {display:flex}
}
@media (max-width:560px) {
  [data-mobile-records] table,[data-mobile-records] tbody {display:block}
  [data-mobile-records] thead {position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  [data-mobile-records] tr {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;padding:12px 16px}
  [data-mobile-records] tr + tr {border-top:1px solid var(--line)}
  [data-mobile-records] td {padding:0;border:0;overflow-wrap:anywhere}
  [data-mobile-records] td:first-child,[data-mobile-records] td:last-child {grid-column:1 / -1}
  [data-mobile-records] td:empty {display:none}
  [data-mobile-records] .badge {white-space:normal}
  #library-table tr {grid-template-columns:24px repeat(2,minmax(0,1fr))}
  #library-table td:first-child {grid-column:1;grid-row:1}
  #library-table td:nth-child(2) {grid-column:2 / -1;grid-row:1}
  #library-table td:nth-child(3) {grid-column:2;grid-row:2}
  #library-table td:nth-child(4) {grid-column:3;grid-row:2}
  #library-table td:nth-child(5) {grid-column:2;grid-row:3;align-self:center}
  #library-table td:last-child {grid-column:3;grid-row:3;justify-self:end}
  #library-table .item-link {min-width:0;align-items:start}
  [data-column-label]::before {content:attr(data-column-label);display:block;color:var(--muted);font-size:.75rem;line-height:1rem}
  .creation-history .table-wrap {overflow:visible}
  .creation-history table,.creation-history tbody {display:block}
  .creation-history thead {position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .creation-history tbody tr {display:grid;grid-template-columns:minmax(0,1fr) max-content;gap:6px;padding:12px 16px}
  .creation-history tbody tr + tr {border-top:1px solid var(--line)}
  .creation-history td {padding:0;border:0}
  .creation-history td:nth-child(3),.creation-history td:nth-child(4) {grid-column:1 / -1}
  .creation-history td:empty {display:none}
  .creation-preview:not(.single) {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .creation-preview:not(.single) .video-stage {height:clamp(155px,54vw,250px)}
  .creation-preview .video-label strong {white-space:normal}
}

.overview-lead,.schedule-summary {grid-template-columns:repeat(2,minmax(0,1fr))}
.workflow-status {background:linear-gradient(145deg,#283327,var(--surface) 75%);border-color:#455241}
.workflow-status-copy {display:grid;gap:10px}
.workflow-status-copy p, .workflow-status-copy p + p {margin:0}
.workflow-status-copy p:first-child {font-size:clamp(1.05rem,2vw,1.3rem);line-height:1.3;letter-spacing:-.02em}
.workflow-status-copy p:nth-child(2) {color:var(--ink-hover);font-size:.86rem}
.workflow-status-copy .actions {margin-top:5px}
.workflow-status-copy .button {white-space:normal;text-align:center}
.overview-metrics .stat {padding:13px 15px}
.overview-metrics .stat-icon {width:32px;height:32px}
.overview-metrics .stat-number {margin-top:8px}
.attention-tail {margin:4px 16px 14px}
.attention-list li .button {flex:none}
.source-collection {grid-template-columns:repeat(2,minmax(0,1fr))}
.source-card {display:flex;flex-direction:column}
.source-card.needs-attention {border-color:#746143}
.source-card-actions {margin-top:auto;border-top:1px solid var(--line)}
.source-facts {margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.source-facts div {min-width:0}
.source-facts dt {color:var(--muted);font-size:.75rem}
.source-facts dd {margin:3px 0 0;overflow-wrap:anywhere;font-size:.875rem}
.schedule-summary .diagnostic {padding:13px 16px}
#upcoming-slots {scroll-margin-top:120px}
.source-card .source-error {padding:8px 12px;border-radius:0;margin:0}
.source-card details.source-error-detail {padding-inline:13px;border:0}
.source-card .source-error-detail p {margin:8px 0;white-space:pre-wrap;overflow-wrap:anywhere}
.schedule-history {scroll-margin-top:78px}

.library-tabs {display:flex;flex-wrap:wrap;gap:5px;background:var(--field-bg);padding:10px 12px;border-bottom:1px solid var(--line)}
.library-tab {min-height:38px;display:inline-flex;align-items:center;gap:7px;padding:5px 9px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--muted);font-size:.8rem;font-weight:700}
.library-tab:hover {color:var(--ink);background:var(--soft)}
.library-tab[aria-pressed=true] {color:var(--accent-hover);background:var(--accent-bg);border-color:#495a39}
.library-tab span {display:inline-block;padding:1px 5px;border-radius:6px;background:#ffffff0b;font-size:.72rem;font-variant-numeric:tabular-nums}
.library-toolbar form {flex:1}
.library-toolbar .search-input {flex:1 1 11rem;max-width:23rem;background:var(--field-bg)}
.library-toolbar .search-input input {width:100%;height:38px;padding-inline:0 10px;border:0;border-radius:0;box-shadow:none}
.library-toolbar .search-input:focus-within {border-color:var(--focus)}
.library-toolbar .search-input input:focus-visible {outline:none;box-shadow:none}
.library-count {font-variant-numeric:tabular-nums;white-space:nowrap;scroll-margin-top:80px}
.library-identity {min-width:0;display:grid;grid-template-columns:minmax(0,1fr);align-content:start}
.library-identity .item-link {align-items:center;min-width:0}
.library-identity small,.library-identity .cell-note {margin:2px 0 0 40px;color:var(--muted);overflow-wrap:anywhere}
.library-format {display:grid;gap:2px;font-variant-numeric:tabular-nums;white-space:nowrap}
.library-format small {color:var(--muted)}
.library-panel .selection-bar {flex-wrap:wrap}
.library-pager {margin-left:auto}
#library-table td:first-child {width:42px}
#library-table input[type=checkbox] {width:17px;height:17px;accent-color:var(--accent);cursor:pointer}

.setting-delivery {display:flex;flex-wrap:wrap;align-items:center;gap:10px;background:var(--field-bg)}
.storage-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(158px,100%),1fr));gap:10px}
.storage-tile {min-width:0;display:grid;gap:5px;padding:12px;border:1px solid var(--line);border-radius:8px;background:var(--field-bg)}
.storage-tile > span {color:var(--muted);font-size:.78rem}
.storage-tile strong {font-variant-numeric:tabular-nums;font-size:1.15rem;line-height:1.4}
.storage-tile small {color:var(--muted)}
.storage-tile.storage-alert {border-color:#746143}
.storage-tile.storage-alert strong {color:var(--warning-ink)}
.settings-limits {margin:0 16px}
.settings-limits > summary {cursor:pointer;font-size:.88rem;font-weight:650;padding:7px 0;color:var(--ink-hover)}
.settings-limits .wide-form {padding:8px 0 0}

.creation-candidates {align-items:start}
.creation-candidate {padding:0;background:var(--field-bg);overflow:hidden}
.creation-candidate:has([open]) {border-color:#526649}
.creation-candidate-disclosure {display:block}
.creation-candidate-summary {position:relative;display:grid;gap:5px;padding:13px 38px 13px 13px;cursor:pointer}
.creation-candidate-summary::-webkit-details-marker {display:none}
.creation-candidate-summary::after {content:"";position:absolute;right:17px;top:19px;width:7px;height:7px;border:solid var(--accent);border-width:0 2px 2px 0;transform:rotate(45deg)}
.creation-candidate-disclosure[open] .creation-candidate-summary::after {transform:rotate(225deg);top:22px}
.creation-candidate-name {font-weight:700;overflow-wrap:anywhere}
.creation-candidate-meta {display:flex;flex-wrap:wrap;align-items:center;gap:5px 10px}
.creation-candidate-excerpt {color:var(--muted);font-size:.8rem;line-height:1.4;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.creation-candidate-summary:has(.creation-scene-picture) {grid-template-columns:112px minmax(0,1fr);align-items:start;gap:12px}
.creation-candidate-copy {display:grid;min-width:0;gap:5px}
.creation-scene-picture {display:block;width:112px;height:84px;overflow:hidden;border-radius:5px;background:#101411}
.creation-scene-picture img {display:block;width:100%;height:100%;object-fit:contain}
@media(max-width:480px) {
  .creation-candidate-summary:has(.creation-scene-picture) {grid-template-columns:80px minmax(0,1fr);gap:10px}
  .creation-scene-picture {width:80px;height:72px}
}
.creation-candidate-editor {display:grid;gap:9px;padding:13px;border-top:1px solid var(--line);background:var(--surface)}
.creation-preview-actions {border-top:1px solid var(--line)}
.trim-playback {padding:6px 0}
@media (max-width:800px) {
  .overview-lead,.schedule-summary,.source-collection {grid-template-columns:minmax(0,1fr)}
  .source-card .button,.library-tab,.library-panel .button {min-height:38px}
}
@media (max-width:560px) {
  .library-tabs {gap:3px;padding:8px}
  .library-tab {gap:4px;padding-inline:6px;font-size:.77rem}
  .library-toolbar {padding:9px 12px;flex-wrap:wrap}
  .library-toolbar form {gap:6px}
  .library-toolbar select {max-width:100%}
  #library-table td:last-child .button {max-width:100%;white-space:normal}
  .library-identity small,.library-identity .cell-note {margin-left:0}
  .overview-metrics .stat {padding:10px}
  .overview-metrics .stat-top {align-items:start}
  .storage-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  .storage-grid > .storage-tile:first-child {grid-column:1 / -1}
  .creation-candidates {padding:10px;gap:10px}
}

@media (max-width:440px) {
  .library-tabs {display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .library-tab {justify-content:space-between}
  .library-tab span {margin-left:auto}
}

.studio-modes {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.studio-mode {
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:12px;
  align-items:center;
  text-align:left;
  min-height:86px;
  padding:12px 15px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface);
  color:var(--ink);
  cursor:pointer;
}
.studio-mode:hover {border-color:var(--accent);background:var(--field-bg)}
.studio-mode[aria-selected="true"] {border-color:var(--accent);background:var(--accent-bg)}
.studio-mode-icon {
  display:grid;
  place-items:center;
  inline-size:40px;
  block-size:40px;
  border-radius:9px;
  color:var(--accent-hover);
  background:var(--field-bg);
}
.studio-mode strong,.studio-mode small {display:block}
.studio-mode strong {font-size:1rem}
.studio-mode small {margin-top:4px;color:var(--muted);font-size:.82rem;line-height:1.4}
.studio-source-entry {display:grid;gap:12px;padding:16px;border-bottom:1px solid var(--line)}
.studio-source-entry .actions {align-items:center}
.studio-url-entry {display:grid;grid-template-columns:minmax(0,1fr) max-content;gap:8px;align-items:end}
.studio-url-entry .form-result {grid-column:1/-1}
.studio-url-entry .form-result:empty {display:none}
.studio-process-entry {display:grid;gap:16px}
.studio-process-entry p {margin:0;color:var(--muted);max-width:49ch}
.studio-archive {margin:0 12px 12px;border-top:1px solid var(--line)}
.studio-archive summary {padding:12px 4px;cursor:pointer;font-weight:650}
@media (max-width:530px) {
  .studio-modes {grid-template-columns:1fr;gap:8px}
  .studio-mode {min-height:70px;padding:9px 12px}
  .studio-source-entry {padding:12px}
  .studio-url-entry {grid-template-columns:minmax(0,1fr)}
  .studio-url-entry > button {justify-self:start}
}
.studio-clips-options {display:grid;min-width:0;gap:12px;padding:0;border:0}
.studio-batch-list {display:grid;min-width:0;gap:6px;margin:0;padding:0;border:0}
.studio-batch-list legend {margin-bottom:6px;font-weight:650}
.studio-batch-list label {gap:9px;padding:8px 10px;border:1px solid var(--line);border-radius:8px}
.studio-batch-list label:has(input:checked) {background:var(--field-bg);border-color:var(--line-strong)}
.studio-batch-list strong,.studio-batch-list small {display:block;overflow-wrap:anywhere}
.studio-batch-list small {color:var(--muted);margin-top:3px}

.creation-analysis-progress {display:block;width:100%;height:5px;margin-top:8px;accent-color:var(--accent)}
