:root {
  --paper: #eef2f7;
  --surface: #ffffff;
  --ink: #142033;
  --muted: #657286;
  --line: #d8e0ea;
  --dark: #071522;
  --teal: #087f8c;
  --teal-soft: #def3f1;
  --coral: #176fe6;
  --gold: #15a88b;
  --danger: #c43f56;
  --purple: #7246e8;
  --shadow: 0 18px 50px rgba(19, 37, 61, .13);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { width: 100%; max-width: 100%; margin: 0; min-height: 100%; overflow-x: hidden; }
button, input, textarea, select { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.app-shell { width: 100%; max-width: 100vw; min-height: 100vh; display: grid; grid-template-columns: 264px minmax(0, 1fr); overflow-x: hidden; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--dark); color: #f3f7fc; padding: 22px 18px 18px; display: flex; flex-direction: column; z-index: 20; border-right: 1px solid #183248; }
.brand-row { min-height: 54px; display: flex; align-items: center; gap: 11px; padding: 2px 5px 20px; }
.brand-logo { width: 82px; height: 25px; flex: 0 0 auto; object-fit: contain; object-position: left center; display: block; }
.brand-copy { min-width: 0; padding-left: 11px; border-left: 1px solid rgba(151,190,221,.28); }
.brand-row strong { display: block; color: #f4f7fb; font-size: 15px; line-height: 1.2; white-space: nowrap; }
.brand-row small { display: block; margin-top: 4px; color: #7f9cb4; font-size: 7px; line-height: 1.2; letter-spacing: 1px; white-space: nowrap; }

.primary-button, .secondary-button, .quiet-button, .icon-button, .menu-button { border: 0; border-radius: 5px; min-height: 38px; padding: 0 16px; font-weight: 650; }
.primary-button { background: var(--coral); color: white; box-shadow: 0 5px 14px rgba(23, 111, 230, .2); }
.primary-button:hover { background: #0d5fcb; }
.secondary-button { background: var(--teal-soft); color: var(--teal); }
.quiet-button { background: transparent; color: inherit; }
.quiet-button:hover { background: rgba(128,128,128,.12); }
.create-button { width: 100%; justify-content: center; display: flex; align-items: center; gap: 7px; }
.sidebar-section { min-height: 150px; flex: 1 1 auto; padding-top: 28px; overflow: hidden; }
.section-label { color: #829798; font-size: 11px; font-weight: 700; text-transform: uppercase; display: flex; justify-content: space-between; padding: 0 7px 10px; }
.section-label > span { color: #829798; }
.section-label b { color: #d3dfdd; margin-left: 5px; }
.section-label button { border: 0; padding: 0; color: #e6a18f; background: transparent; font-size: 10px; font-weight: 700; }
.section-label button:disabled { color: #536668; cursor: default; }
.project-list { display: grid; gap: 4px; max-height: 100%; overflow: auto; }
.project-row { display: grid; grid-template-columns: 19px minmax(0,1fr) 25px; align-items: center; border-left: 3px solid transparent; border-radius: 3px; }
.project-row:hover { background: rgba(255,255,255,.05); }
.project-row.active { background: #102b40; border-left-color: #2d8cff; }
.project-delete-select { width: 13px; height: 13px; margin-left: 5px; accent-color: var(--coral); }
.project-delete { width: 24px; height: 28px; padding: 0; border: 0; color: #8ea1a2; background: transparent; font-size: 18px; }
.project-delete:hover { color: #ff9c82; }
.project-item { position: relative; width: 100%; padding: 11px 12px; border: 0; border-left: 3px solid transparent; border-radius: 3px; background: transparent; color: #cad6d4; text-align: left; }
.project-item:hover { background: rgba(255,255,255,.05); }
.project-row.active .project-item { color: white; }
.project-item strong, .project-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-item strong { font-size: 13px; }
.project-item small { color: #8ea1a2; font-size: 11px; margin-top: 5px; }
.sidebar-ledger-button { width: 100%; min-height: 52px; margin: 12px 0; padding: 8px 9px; display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 9px; border: 1px solid #203b50; border-left: 3px solid transparent; border-radius: 4px; background: #0b2030; color: #d8e4ed; text-align: left; }
.sidebar-ledger-button:hover,.sidebar-ledger-button.active { border-left-color: #2d8cff; background: #102b40; }
.sidebar-ledger-button > span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 4px; background: #173d55; color: #65b7ff; font-weight: 800; }
.sidebar-ledger-button strong,.sidebar-ledger-button small { display: block; }
.sidebar-ledger-button strong { font-size: 12px; }
.sidebar-ledger-button small { margin-top: 3px; color: #7e98aa; font-size: 9px; }
.sidebar-ledger-button > b { color: #83d6c3; font-size: 12px; font-variant-numeric: tabular-nums; }
.task-log-section { flex: 0 1 230px; min-height: 130px; padding: 15px 0 13px; border-top: 1px solid #20384a; overflow: hidden; }
.task-log-list { height: calc(100% - 24px); display: grid; align-content: start; gap: 2px; overflow: auto; scrollbar-width: thin; }
.task-log-empty { padding: 16px 8px; color: #678093; font-size: 11px; line-height: 1.6; }
.task-log-item { position: relative; padding: 8px 7px 8px 19px; border-radius: 3px; color: #a9bac8; }
.task-log-item:hover { background: rgba(255,255,255,.035); }
.task-log-item::before { content: ""; position: absolute; left: 7px; top: 13px; width: 5px; height: 5px; border-radius: 50%; background: #5387ae; }
.task-log-item.success::before { background: #22b894; }
.task-log-item.error::before { background: #ef6c7d; }
.task-log-item strong, .task-log-item span { display: block; }
.task-log-item strong { overflow: hidden; color: #d8e3ec; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.task-log-item p { margin: 3px 0 0; font-size: 10px; line-height: 1.45; }
.task-log-item time { display: block; margin-top: 4px; color: #60788b; font: 9px Consolas,monospace; }
.sidebar-footer { border-top: 1px solid #314347; padding-top: 13px; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #a9b8b7; }
.connection { display: flex; align-items: center; gap: 7px; }
.connection i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.connection i.online { background: #73b485; }

.workspace { width: 100%; max-width: 100%; min-width: 0; overflow-x: hidden; }
.topbar { height: 64px; padding: 0 34px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.9); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); }
.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.breadcrumb b { color: #b6b6b0; }
.breadcrumb strong { color: var(--ink); }
.topbar-actions { display: flex; gap: 10px; align-items: center; }
.mode-badge { padding: 5px 9px; border: 1px solid #afd9d5; border-radius: 999px; background: var(--teal-soft); color: var(--teal); font-size: 11px; font-weight: 700; }
.menu-button { display: none; background: transparent; padding: 0; min-width: 38px; }
.mobile-brand { display: none; min-width: 0; align-items: center; gap: 8px; color: var(--ink); }
.mobile-brand-logo { width: 64px; height: 20px; flex: 0 0 auto; object-fit: contain; object-position: left center; }
.mobile-brand strong { padding-left: 8px; border-left: 1px solid var(--line); font-size: 13px; line-height: 1.2; white-space: nowrap; }
.api-alert { min-height: 48px; padding: 7px 34px; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: #6f3a2d; background: #f6e2d7; border-bottom: 1px solid #e9c5b4; font-size: 12px; }
.api-alert strong { margin-right: 5px; }
.api-alert .secondary-button { min-height: 32px; flex-shrink: 0; background: #fff7f1; color: #873e2d; }

.empty-view { min-height: calc(100vh - 64px); display: flex; align-items: center; flex-direction: column; text-align: center; padding: 70px 24px 35px; overflow: hidden; }
.empty-art { width: 360px; height: 205px; position: relative; margin-bottom: 28px; }
.frame { position: absolute; width: 150px; aspect-ratio: 9/11; border: 8px solid #fcfbf8; box-shadow: var(--shadow); display: flex; align-items: end; justify-content: flex-end; padding: 10px; color: rgba(255,255,255,.75); font-weight: 800; }
.frame-a { left: 25px; top: 20px; transform: rotate(-8deg); background: linear-gradient(150deg,#17373b,#397b7d 60%,#e8b861); }
.frame-b { left: 108px; top: 0; z-index: 2; background: linear-gradient(155deg,#551d31,#9b4450 55%,#e5c77f); }
.frame-c { right: 17px; top: 28px; transform: rotate(8deg); background: linear-gradient(145deg,#24304a,#5c7183 55%,#d86645); }
.play-symbol { position: absolute; z-index: 4; left: 157px; top: 74px; width: 58px; height: 58px; display: grid; place-items: center; padding-left: 3px; border-radius: 50%; color: var(--dark); background: #fff; box-shadow: 0 12px 35px rgba(20,30,30,.28); }
.eyebrow { margin: 0 0 8px; color: var(--coral); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.8px; }
.empty-view h1 { margin: 0; max-width: 650px; font-family: Georgia, "Songti SC", serif; font-size: 44px; line-height: 1.18; font-weight: 700; }
.empty-copy { max-width: 540px; margin: 18px auto 24px; color: var(--muted); line-height: 1.75; }
.workflow-strip { display: flex; align-items: center; gap: 18px; margin-top: 55px; color: var(--muted); font-size: 12px; }
.workflow-strip span { display: flex; gap: 7px; align-items: center; }
.workflow-strip b { color: var(--coral); }
.workflow-strip i { width: 45px; height: 1px; background: var(--line); }

.project-view { padding-bottom: 70px; }
.project-header { padding: 38px 42px 30px; display: flex; justify-content: space-between; gap: 30px; align-items: flex-start; border-bottom: 1px solid var(--line); background: var(--surface); }
.project-header h1 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: 34px; line-height: 1.25; }
.project-premise { color: var(--muted); max-width: 760px; margin: 10px 0 0; line-height: 1.7; }
.project-actions { display: flex; gap: 8px; flex-shrink: 0; }
.danger-text { color: var(--danger); }
.production-status { padding: 19px 42px 17px; border-bottom: 1px solid var(--line); }
.status-heading, .status-heading > div { display: flex; align-items: center; }
.status-heading { justify-content: space-between; margin-bottom: 11px; }
.status-heading > div { gap: 9px; }
.status-heading small { color: var(--muted); margin-left: 3px; }
.status-heading > b { color: #176fe6; font-size: 18px; font-variant-numeric: tabular-nums; }
.status-dot { width: 7px; height: 7px; background: #2d83ed; border-radius: 50%; box-shadow: 0 0 0 4px rgba(45,131,237,.1); }
.progress-track { height: 5px; border-radius: 5px; background: #e2e8ef; overflow: hidden; }
.progress-track > div { width: 0; height: 100%; border-radius: inherit; background: #2180ed; transition: width .35s ease; }
.stage-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 14px; }
.stage-grid > div { min-width: 0; display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 8px; align-items: center; color: #8b96a4; position: relative; }
.stage-grid > div:not(:last-child)::after { content: ""; height: 1px; background: #dce3eb; position: absolute; right: -12px; left: 100%; top: 11px; }
.stage-grid > div > span { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid #cbd4df; border-radius: 50%; font-size: 9px; font-weight: 750; }
.stage-grid strong, .stage-grid small { display: block; }
.stage-grid strong { color: inherit; font-size: 12px; }
.stage-grid small { overflow: hidden; font-size: 9px; margin-top: 1px; text-overflow: ellipsis; white-space: nowrap; }
.stage-grid > div.done, .stage-grid > div.active { color: #176fe6; }
.stage-grid > div.done > span { background: #2180ed; color: white; border-color: #2180ed; }
.stage-grid > div.active > span { border: 2px solid #2180ed; color: #176fe6; background: white; box-shadow: 0 0 0 3px rgba(33,128,237,.09); }
.content-tabs { padding: 0 42px; border-bottom: 1px solid var(--line); display: flex; gap: 26px; }
.content-tabs button { border: 0; border-bottom: 2px solid transparent; padding: 17px 0 14px; background: transparent; color: var(--muted); font-weight: 650; }
.content-tabs button.active { color: var(--ink); border-color: var(--coral); }
.content-tabs span { color: var(--muted); margin-left: 4px; }

.credits-view { min-height: calc(100vh - 64px); padding-bottom: 56px; background: #f5f7fa; }
.credits-header { padding: 34px 42px 27px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); background: #fff; }
.credits-header h1 { margin: 0; font-family: Georgia,"Songti SC",serif; font-size: 32px; }
.credits-header p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); }
.credits-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-bottom: 1px solid var(--line); background: #fff; }
.credits-summary > div { padding: 20px 24px; border-right: 1px solid var(--line); }
.credits-summary > div:last-child { border-right: 0; }
.credits-summary span,.credits-summary strong,.credits-summary small { display: block; }
.credits-summary span { color: var(--muted); font-size: 10px; }
.credits-summary strong { margin-top: 6px; font-size: 25px; font-variant-numeric: tabular-nums; }
.credits-summary small { margin-top: 2px; color: #8591a0; font-size: 9px; }
.credits-toolbar { min-height: 62px; padding: 12px 42px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.credits-filters { display: flex; gap: 4px; }
.credits-filters button { min-height: 32px; padding: 0 12px; border: 1px solid #cbd6e0; border-radius: 4px; background: #fff; color: #596878; font-size: 11px; font-weight: 700; }
.credits-filters button.active { border-color: #287fe6; background: #eaf3ff; color: #176fe6; }
.credits-toolbar > span { color: var(--muted); font-size: 10px; }
.credits-table-wrap { margin: 0 42px; overflow: auto; border: 1px solid var(--line); background: #fff; }
.credits-table { width: 100%; min-width: 920px; border-collapse: collapse; table-layout: fixed; }
.credits-table th,.credits-table td { padding: 13px 14px; border-bottom: 1px solid #e6ebf0; text-align: left; vertical-align: middle; }
.credits-table th { color: #758394; background: #f3f6f8; font-size: 10px; }
.credits-table th:nth-child(1) { width: 150px; }.credits-table th:nth-child(2) { width: 280px; }.credits-table th:nth-child(3) { width: 210px; }.credits-table th:nth-child(4) { width: 150px; }.credits-table th:nth-child(5),.credits-table th:nth-child(6) { width: 95px; }
.credits-table td { font-size: 11px; }
.credits-table td strong,.credits-table td small,.credits-table td time,.credits-table td code { display: block; }
.credits-table td small { margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.credits-table td code { margin-top: 4px; overflow: hidden; color: #476379; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.credits-table td b { font-size: 13px; font-variant-numeric: tabular-nums; }
.credits-table tr.debit td:nth-child(5) b { color: #c1485b; }
.credits-table tr.credit td:nth-child(5) b { color: #13806a; }
.credits-muted { color: #8995a2; }
.credits-empty { padding: 44px !important; color: var(--muted); text-align: center !important; }

.shots-panel { padding: 26px 42px; display: grid; grid-template-columns: repeat(auto-fill,minmax(270px,1fr)); gap: 17px; }
.shot-card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; min-width: 0; }
.shot-preview { aspect-ratio: 16/10; background: #d9dad5; position: relative; overflow: hidden; display: grid; place-items: center; }
.portrait .shot-preview { aspect-ratio: 4/3; }
.shot-preview img, .shot-preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot-preview::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 58%,rgba(10,16,17,.5)); pointer-events: none; }
.shot-number { position: absolute; z-index: 2; left: 10px; top: 10px; color: white; background: rgba(19,29,31,.7); padding: 4px 7px; border-radius: 3px; font-size: 10px; font-weight: 800; }
.shot-state { position: absolute; z-index: 2; right: 10px; top: 10px; color: #162224; background: rgba(255,255,255,.9); padding: 4px 7px; border-radius: 3px; font-size: 10px; font-weight: 800; }
.shot-state.failed { color: var(--danger); }
.preview-placeholder { color: #697474; text-align: center; z-index: 1; }
.preview-placeholder b { display: block; font-size: 24px; margin-bottom: 7px; }
.preview-placeholder small { font-size: 11px; }
.shot-body { padding: 15px; }
.shot-body h3 { font-size: 14px; margin: 0 0 7px; }
.shot-body p { margin: 0; min-height: 42px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.dialogue { margin-top: 12px; padding: 9px 10px; border-left: 2px solid var(--gold); background: #f1eee5; color: #4f5656; font-family: Georgia,"Songti SC",serif; font-size: 12px; line-height: 1.55; }
.shot-meta { display: flex; justify-content: space-between; margin-top: 14px; border-top: 1px solid #e3e1db; padding-top: 10px; font-size: 10px; color: #858a89; }
.mini-progress { height: 3px; background: #deded9; margin-top: 10px; }
.mini-progress div { height: 100%; background: var(--coral); }
.script-panel { padding: 30px 42px; }
.script-layout { display: grid; grid-template-columns: 1fr 290px; gap: 45px; }
.script-copy h2 { font-family: Georgia,"Songti SC",serif; font-size: 28px; margin: 0 0 6px; }
.script-copy > p { color: var(--muted); line-height: 1.7; }
.script-scene { border-top: 1px solid var(--line); padding: 20px 0; }
.script-scene h3 { margin: 0 0 8px; font-size: 14px; }
.script-scene p { color: var(--muted); line-height: 1.7; font-size: 13px; }
.script-scene blockquote { margin: 10px 0 0; border-left: 2px solid var(--coral); padding-left: 12px; font-family: Georgia,"Songti SC",serif; }
.character-list h3 { margin-top: 0; font-size: 12px; text-transform: uppercase; color: var(--muted); }
.character { border-bottom: 1px solid var(--line); padding: 14px 0; }
.character strong { display: block; }
.character p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

dialog { border: 0; padding: 0; width: min(620px,calc(100vw - 28px)); max-height: calc(100vh - 28px); border-radius: 7px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
#projectDialog { width: min(920px,calc(100vw - 28px)); }
dialog::backdrop { background: rgba(13,23,25,.62); backdrop-filter: blur(3px); }
.dialog-form { padding: 25px; overflow: auto; max-height: calc(100vh - 28px); }
.dialog-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; }
.dialog-header h2 { margin: 0; font-family: Georgia,"Songti SC",serif; font-size: 25px; }
.icon-button { width: 36px; min-height: 36px; padding: 0; background: transparent; font-size: 24px; color: var(--muted); }
.dialog-form > label, .form-grid label { display: grid; gap: 7px; color: #454b4b; font-size: 12px; font-weight: 700; margin-bottom: 15px; }
.dialog-form label small { color: var(--muted); font-weight: 400; }
input, textarea, select { width: 100%; border: 1px solid #cacbc6; border-radius: 4px; padding: 10px 11px; background: white; color: var(--ink); outline: none; }
textarea { resize: vertical; min-height: 105px; }
input:focus, textarea:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(28,93,98,.1); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.provider-params-panel { margin: 4px 0 18px; padding: 13px 15px; border: 1px solid #d6e0e8; border-left: 3px solid #2388dc; border-radius: 4px; background: #f6f9fc; }
.cost-estimate { margin: 4px 0 14px; padding: 12px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; border-left: 3px solid #25aa9c; background: #edf7f5; color: #315b58; font-size: 11px; }
.cost-estimate strong { color: #173d3a; }
.cost-estimate span { padding: 4px 7px; border-radius: 3px; background: #fff; font-weight: 700; }
.cost-estimate small { flex-basis: 100%; color: #607b79; }
.provider-params-panel summary { color: #24465f; font-size: 12px; font-weight: 800; cursor: pointer; }
.provider-params-panel > p { margin: 9px 0 13px; color: #687b8a; font-size: 10px; line-height: 1.6; }
.provider-params-panel textarea { min-height: 78px; font: 10px/1.5 Consolas,monospace; }
.provider-params-panel .form-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
#settingsDialog { width: min(900px,calc(100vw - 28px)); }
.model-catalog-summary { margin: 2px 0 14px; padding: 11px 13px; border-left: 3px solid #2d83ed; color: #36556f; background: #edf5ff; font-size: 11px; font-weight: 700; }
.model-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-bottom: 18px; padding: 16px 0 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.model-field { min-width: 0; display: grid !important; align-content: start; gap: 7px !important; margin: 0 !important; }
.model-field > span { display: flex; align-items: center; justify-content: space-between; color: var(--ink); font-size: 12px; }
.model-field > span b { min-width: 28px; padding: 3px 6px; border-radius: 3px; color: #1764b8; background: #e8f2ff; text-align: center; font: 700 10px Consolas,monospace; }
.model-search-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; }
.model-search-row input, .model-field > select, .model-field > input { min-width: 0; padding: 9px; font-size: 11px; }
.model-search-row button { min-width: 62px; padding: 0 8px; border: 1px solid #a9c5e6; border-radius: 4px; color: #1b64b7; background: #edf5ff; font-size: 10px; font-weight: 750; }
.model-field > small { min-height: 30px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.script-source-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 17px; background: #e9e8e2; border-radius: 5px; }
.script-source-switch label { margin: 0; }
.script-source-switch input { position: absolute; width: 1px; height: 1px; padding: 0; opacity: 0; pointer-events: none; }
.script-source-switch span { display: grid; place-items: center; min-height: 38px; border-radius: 3px; color: var(--muted); font-size: 12px; font-weight: 750; cursor: pointer; }
.script-source-switch input:checked + span { color: var(--teal); background: white; box-shadow: 0 1px 5px rgba(23,27,29,.1); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.toggle-row { display: flex !important; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.toggle-row span strong, .toggle-row span small { display: block; }
.toggle-row input { appearance: none; width: 42px; height: 23px; border-radius: 999px; padding: 2px; background: #c9cbc7; transition: .2s; }
.toggle-row input::before { content: ""; display: block; width: 17px; height: 17px; border-radius: 50%; background: white; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle-row input:checked { background: var(--teal); }
.toggle-row input:checked::before { transform: translateX(17px); }
.limit-note { padding: 13px; border-left: 3px solid var(--gold); background: #f1ede1; display: grid; gap: 4px; font-size: 11px; line-height: 1.5; margin-bottom: 18px; }
.limit-note span { color: var(--muted); }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; max-width: min(360px,calc(100vw - 48px)); padding: 12px 15px; border-radius: 5px; background: var(--dark); color: white; box-shadow: var(--shadow); transform: translateY(20px); opacity: 0; pointer-events: none; transition: .2s; font-size: 13px; }
.toast.show { opacity: 1; transform: translateY(0); }
.mobile-scrim { display: none; }

/* Production matrix */
.workspace { background-color: #eef1ef; background-image: linear-gradient(rgba(28,93,98,.035) 1px, transparent 1px), linear-gradient(90deg,rgba(28,93,98,.035) 1px, transparent 1px); background-size: 24px 24px; }
.project-header, .production-status, .content-tabs { background: rgba(255,255,255,.94); }
.shots-panel, .assets-panel { width: 100%; max-width: 100%; min-width: 0; padding: 24px 42px 42px; display: block; }
.production-toolbar { min-height: 64px; padding: 12px 14px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #193e5b; border-left: 4px solid #24b8a6; border-radius: 5px; background: #0b2132; color: #f4f8fc; box-shadow: 0 10px 24px rgba(9,31,48,.14); }
.production-toolbar > div:first-child { display: flex; align-items: center; gap: 12px; }
.selection-note { color: #91aaab; font-size: 11px; }
.toolbar-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.compact-field { display: flex; align-items: center; gap: 7px; color: #9eb3b4; font-size: 11px; font-weight: 700; }
.compact-field select { width: 105px; padding: 8px; border-color: #416064; color: white; background: #203a3e; }
.check-label { display: flex !important; align-items: center; gap: 7px; margin: 0 !important; cursor: pointer; }
.check-label input { width: 15px; height: 15px; accent-color: var(--coral); }
.shot-table-wrap { width: 100%; max-width: 100%; min-width: 0; overflow: auto; border: 1px solid #cbd4d1; background: rgba(251,250,247,.96); }
.shot-table { width: 100%; min-width: 1540px; border-collapse: collapse; table-layout: fixed; }
.shot-table th { padding: 11px 10px; background: #203438; color: #b9cdcc; border-right: 1px solid #385055; font-size: 10px; text-align: left; text-transform: uppercase; letter-spacing: .8px; }
.shot-table th:nth-child(1) { width: 38px; }.shot-table th:nth-child(2) { width: 210px; }.shot-table th:nth-child(3) { width: 270px; }.shot-table th:nth-child(4) { width: 720px; }.shot-table th:nth-child(5) { width: 190px; }
.shot-table td { padding: 12px 10px; border-right: 1px solid #dce2df; border-bottom: 1px solid #d5ddda; vertical-align: top; font-size: 12px; }
.shot-table tbody tr:hover { background: #f2f7f5; }
.shot-table td > p { margin: 0 0 9px; color: #505b5b; line-height: 1.6; }
.shot-table blockquote { margin: 0 0 10px; padding-left: 9px; border-left: 2px solid var(--gold); color: #384244; font-family: Georgia,"Songti SC",serif; line-height: 1.55; }
.shot-table td > small { color: #7f8988; }
.table-shot-title { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.table-shot-title b { color: #5ac3c5; background: #173136; padding: 4px 5px; font: 700 9px Consolas,monospace; }
.table-shot-title input { min-width: 0; padding: 6px 7px; font-size: 11px; font-weight: 700; }
.table-preview { height: 105px; position: relative; overflow: hidden; border-radius: 3px; background: #d7dfdc; }
.table-preview img, .table-preview video, .asset-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.table-preview > button, .asset-media > button { position: absolute; right: 6px; bottom: 6px; z-index: 2; min-height: 27px; padding: 0 8px; border: 0; border-radius: 3px; color: white; background: rgba(18,35,39,.78); font-size: 10px; }
.mock-media { position: absolute; inset: 0; }
.media-empty { width: 100%; height: 100%; display: grid; place-content: center; text-align: center; color: #315d60; font: 800 25px Consolas,monospace; }
.media-empty small { display: block; margin-top: 4px; color: #798c8b; font: 10px Inter,sans-serif; }
.grid-prompt-list { display: grid; grid-template-columns: 1fr; gap: 8px; max-height: 560px; overflow: auto; padding: 2px 3px 2px 0; }
.grid-prompt-list.grid-count-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.grid-prompt-list.grid-count-6, .grid-prompt-list.grid-count-9 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.grid-prompt-card { min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid #cfdae7; border-top: 3px solid #2e83ed; border-radius: 4px; background: #f7faff; }
.grid-prompt-card > span { color: #245c9e; font: 800 10px Consolas,monospace; }
.grid-prompt { min-height: 98px; padding: 7px; resize: vertical; border-color: #d7e0eb; background: white; font-size: 10px; line-height: 1.5; }
.grid-count-1 .grid-prompt { min-height: 88px; }
.prompt-mentions { display: flex; gap: 4px; flex-wrap: wrap; }
.prompt-mentions span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; padding: 3px 5px; border: 1px solid #bce5df; border-radius: 3px; color: #0b736a; background: #e4f7f3; font-size: 9px; font-weight: 700; white-space: nowrap; }
.reference-plan { margin-bottom: 9px; padding: 8px; border: 1px solid #c6d7e7; border-left: 3px solid #2180ed; background: #f3f8fd; }
.reference-plan > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.reference-plan b { color: #175fae; font-size: 10px; }
.reference-plan small { color: #6f8294; font-size: 9px; }
.reference-assets { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.reference-assets span { max-width: 180px; overflow: hidden; padding: 3px 5px; border-radius: 3px; color: #226a68; background: #dff1ed; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.reference-assets span.missing { color: #a3374c; background: #f9e3e8; }
.reference-assets em { color: #7d8d9b; font-size: 9px; font-style: normal; }
.inline-editor { display: grid; gap: 4px; margin-bottom: 8px; color: #657171; font-size: 10px; font-weight: 700; }
.inline-editor textarea { min-height: 58px; padding: 7px; background: #f7f8f5; font-size: 11px; line-height: 1.5; }
.advanced-prompts { margin-top: 8px; border: 1px solid #cbd8d5; background: #edf4f1; }
.advanced-prompts summary { padding: 8px 10px; color: #315e60; cursor: pointer; font-size: 10px; font-weight: 800; }
.advanced-prompts label { display: grid; gap: 4px; padding: 0 9px 8px; color: #5d6c6b; font-size: 10px; font-weight: 700; }
.advanced-prompts textarea { min-height: 62px; padding: 7px; font-size: 10px; line-height: 1.45; }
.status-stack { display: grid; gap: 5px; margin-bottom: 9px; }
.state-chip { padding: 5px 7px; color: #436364; background: #e1ece9; border-left: 2px solid #5ebdbd; font-size: 10px; }
.table-action { width: 100%; min-height: 31px; margin: 0 0 6px; border: 1px solid #7ca3a1; border-radius: 3px; color: #275b5e; background: transparent; font-size: 11px; font-weight: 700; }
.table-action.primary { color: white; border-color: var(--coral); background: var(--coral); }
.table-action:disabled { opacity: .4; cursor: not-allowed; }
.asset-select-all { width: fit-content; margin: 15px 0 !important; color: #465656; font-size: 12px; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 14px; }
.asset-card { border: 1px solid #cbd4d1; border-top: 3px solid #3f888b; border-radius: 5px; overflow: hidden; background: rgba(251,250,247,.97); }
.asset-media { height: 180px; position: relative; overflow: hidden; background: #d7dfdc; }
.asset-media > span { position: absolute; left: 8px; top: 8px; padding: 4px 7px; color: #a9e4e3; background: #173136; font: 700 9px Consolas,monospace; }
.asset-body { padding: 13px; }
.asset-body > p { min-height: 36px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.prompt-editor { display: grid; gap: 6px; color: #536363; font-size: 10px; font-weight: 700; }
.prompt-editor textarea { min-height: 100px; font-size: 11px; line-height: 1.5; background: #f6f7f4; }
.asset-ratio-field { display: grid; grid-template-columns: auto minmax(90px,120px) minmax(0,1fr); align-items: center; gap: 7px; margin: 10px 0; color: #536363; font-size: 10px; font-weight: 700; }
.asset-ratio-field select, .asset-ratio-field input { padding: 7px 8px; font-size: 11px; }
.asset-ratio-field input[hidden] { display: none; }
.asset-ratio-field small { grid-column: 1 / -1; color: #7b8987; font-weight: 400; }
.asset-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.asset-actions span { color: #618080; font-size: 10px; }
.asset-actions .table-action { width: auto; min-width: 88px; margin: 0; }
.download-button { min-height: 36px; padding: 0 12px; border: 1px solid #6da5a5; border-radius: 4px; color: #d5f1ef; background: #24464a; font-size: 11px; font-weight: 750; }
.download-button:disabled { opacity: .35; cursor: not-allowed; }
.media-links { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 4px 0 8px; }
.media-links a, .media-links button { min-height: 28px; display: grid; place-items: center; padding: 4px; border: 1px solid #9ab6b2; border-radius: 3px; color: #315f61; background: #eef5f2; text-decoration: none; font-size: 10px; font-weight: 700; }
.asset-empty { padding: 60px 24px; border: 1px dashed #9db2b0; text-align: center; color: #6f8180; background: rgba(251,250,247,.65); }
.asset-empty b { color: #2e696b; font: 800 18px Consolas,monospace; }
.preview-dialog { width: min(1100px,calc(100vw - 28px)); background: #0d181b; }
.preview-shell { min-height: 70vh; display: flex; flex-direction: column; }
.preview-topbar { height: 52px; padding: 0 14px 0 18px; display: flex; align-items: center; justify-content: space-between; color: #dce8e6; border-bottom: 1px solid #294044; }
.preview-content { min-height: 0; flex: 1; display: grid; place-items: center; padding: 18px; }
.preview-content img, .preview-content video { max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; }
.preview-mock { width: min(800px,100%); aspect-ratio: 16/9; }
.video-preview-stage { width: 100%; min-height: 65vh; display: grid; grid-template-columns: minmax(0,1fr) 260px; align-items: center; gap: 18px; color: #dce8e6; }
.video-preview-stage video { width: 100%; max-height: calc(100vh - 130px); background: #050809; }
.video-preview-stage > div { align-self: stretch; padding: 24px 18px; border-left: 1px solid #294044; }
.video-preview-stage strong, .video-preview-stage span { display: block; }
.video-preview-stage span { margin-top: 8px; color: #82a4a3; font-size: 11px; }
.video-preview-stage p { margin-top: 22px; color: #b8cac8; line-height: 1.7; }
.script-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.script-toolbar .eyebrow { margin-bottom: 3px; }
.script-copy > label, .script-scene label, .character label { display: grid; gap: 6px; margin-bottom: 12px; color: #53605f; font-size: 11px; font-weight: 700; }
.script-copy textarea, .script-scene textarea, .character textarea { min-height: 76px; font-size: 12px; line-height: 1.6; }
.script-scene h3 { color: var(--coral); font: 800 11px Consolas,monospace; }
.character input, .character textarea { margin-top: 2px; font-size: 11px; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; transform: translateX(-105%); transition: transform .22s; width: 270px; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .mobile-scrim.show { display: block; position: fixed; inset: 0; z-index: 15; background: rgba(14,22,23,.45); }
  .menu-button { display: inline-grid; place-items: center; }
  .mobile-brand { display: flex; }
  .topbar { justify-content: flex-start; gap: 12px; padding: 0 18px; }
  .api-alert { padding: 8px 18px; }
  .breadcrumb { min-width: 0; margin-right: auto; }
  .breadcrumb strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-actions .quiet-button { display: none; }
  .project-header { padding: 28px 22px 24px; flex-direction: column; }
  .project-actions { width: 100%; }
  .project-actions button { flex: 1; }
  .production-status { padding: 23px 22px; }
  .stage-grid { grid-template-columns: repeat(2,1fr); gap: 16px 10px; }
  .stage-grid > div::after { display: none; }
  .content-tabs { padding: 0 22px; }
  .shots-panel, .script-panel { padding: 20px 22px; }
  .assets-panel { padding: 20px 22px; }
  .production-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-actions { width: 100%; justify-content: flex-start; }
  .script-layout { grid-template-columns: 1fr; }
  .video-preview-stage { grid-template-columns: 1fr; }
  .video-preview-stage > div { border-left: 0; border-top: 1px solid #294044; }
  .model-grid { grid-template-columns: 1fr; }
  .provider-params-panel .form-grid { grid-template-columns: 1fr; }
  .credits-header { padding: 27px 22px 22px; }
  .credits-summary { grid-template-columns: repeat(2,1fr); }
  .credits-summary > div:nth-child(2) { border-right: 0; }
  .credits-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .credits-toolbar { padding: 10px 22px; }
  .credits-table-wrap { margin: 0 22px; }
}

@media (max-width: 560px) {
  .api-alert span { line-height: 1.45; }
  .api-alert .secondary-button { padding: 0 10px; }
  .empty-view { padding-top: 45px; }
  .empty-art { width: 290px; height: 170px; transform: scale(.86); margin-bottom: 12px; }
  .empty-view h1 { font-size: 32px; }
  .workflow-strip { gap: 8px; margin-top: 40px; width: 100%; justify-content: center; }
  .workflow-strip i { width: 15px; }
  .workflow-strip span { display: grid; gap: 2px; }
  .project-header h1 { font-size: 28px; }
  .status-heading small { display: none; }
  .shots-panel { grid-template-columns: 1fr; }
  .shots-panel, .assets-panel { padding: 15px 12px 28px; }
  .production-toolbar > div:first-child { align-items: flex-start; flex-direction: column; gap: 5px; }
  .toolbar-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .toolbar-actions .compact-field { grid-column: 1 / -1; }
  .toolbar-actions button { padding: 0 8px; }
  .form-grid { grid-template-columns: 1fr; }
  .dialog-form { padding: 19px; }
  .mode-badge { display: none; }
  .topbar { gap: 9px; padding: 0 12px; }
  .menu-button { min-width: 32px; }
  .mobile-brand { margin-right: auto; gap: 6px; }
  .mobile-brand-logo { width: 54px; height: 17px; }
  .mobile-brand strong { padding-left: 6px; font-size: 12px; }
  .breadcrumb { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Commercial account surfaces */
.auth-view { min-height: 100vh; display: grid; grid-template-columns: minmax(280px,1fr) minmax(360px,520px); background: #071522; color: #f4f8fb; }
.auth-brand { padding: clamp(32px,7vw,96px); display: flex; align-items: flex-start; gap: 18px; background-image: linear-gradient(rgba(40,153,174,.08) 1px,transparent 1px),linear-gradient(90deg,rgba(40,153,174,.08) 1px,transparent 1px); background-size: 32px 32px; }
.auth-brand img { width: 118px; height: 38px; object-fit: contain; object-position: left; }
.auth-brand > div { padding-left: 18px; border-left: 1px solid #29465a; }
.auth-brand strong,.auth-brand small { display: block; white-space: nowrap; }
.auth-brand strong { font-size: 22px; }
.auth-brand small { margin-top: 6px; color: #6f91a6; font: 10px Consolas,monospace; }
.auth-panel { align-self: center; margin: 28px; padding: clamp(30px,5vw,58px); color: var(--ink); background: #fff; border-radius: 7px; box-shadow: 0 30px 80px rgba(0,0,0,.28); }
.auth-panel h1 { margin: 0; font-family: Georgia,"Songti SC",serif; font-size: 32px; }
.auth-panel > p:not(.eyebrow) { margin: 10px 0 28px; color: var(--muted); }
.auth-panel label { display: grid; gap: 7px; margin: 0 0 16px; color: #475052; font-size: 12px; font-weight: 700; }
.auth-panel .primary-button { width: 100%; margin-top: 8px; }
.auth-switch { width: 100%; margin-top: 14px; border: 0; background: transparent; color: #176fe6; font-weight: 700; }
.auth-error { min-height: 20px; display: block; margin-top: 12px; color: var(--danger); text-align: center; font-size: 12px; }
.points-badge,.account-button { min-height: 34px; border: 1px solid #cbd8e4; border-radius: 4px; background: #fff; color: #3b4d5b; }
.points-badge { padding: 0 11px; font-size: 11px; }
.points-badge b { color: #176fe6; font-size: 13px; }
.account-button { padding: 3px 9px 3px 4px; display: flex; align-items: center; gap: 7px; }
.account-button span,.account-summary > div > span { display: grid; place-items: center; border-radius: 4px; color: #fff; background: #1c5d62; font-weight: 800; }
.account-button span { width: 26px; height: 26px; font-size: 11px; }
.account-button b { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.account-dialog { min-width: min(620px,calc(100vw - 28px)); }
.account-summary { padding: 16px 0 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.account-summary > div { display: flex; align-items: center; gap: 12px; }
.account-summary > div > span { width: 42px; height: 42px; }
.account-summary strong,.account-summary small { display: block; }
.account-summary small { margin-top: 3px; color: var(--muted); }
.account-summary > b { color: #176fe6; font-size: 18px; }
.recharge-form { padding: 18px 0 10px; display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.recharge-form label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
.commerce-note { margin: 0 0 18px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.wallet-section { border-top: 1px solid var(--line); padding-top: 17px; }
.account-pricing { max-height: 210px; overflow: auto; border: 1px solid #dbe3e7; }
.account-pricing > div { padding: 8px 10px; display: grid; grid-template-columns: 110px minmax(0,1fr) auto; gap: 10px; border-bottom: 1px solid #e5eaed; align-items: center; font-size: 10px; }
.account-pricing > div:last-child { border-bottom: 0; }
.account-pricing span { color: #71808a; }
.account-pricing strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-pricing b { color: #157363; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.section-heading small { color: var(--muted); }
.ledger-list { max-height: 280px; overflow: auto; }
.ledger-row { display: grid; grid-template-columns: minmax(0,1fr) auto 72px; align-items: center; gap: 12px; padding: 10px 3px; border-bottom: 1px solid #ecece8; }
.ledger-row strong,.ledger-row small { display: block; }
.ledger-row small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.ledger-row b { color: #15846b; }
.ledger-row.usage b { color: #bf5b44; }
.ledger-row > span { color: var(--muted); font-size: 10px; text-align: right; }
.empty-ledger { color: var(--muted); text-align: center; padding: 24px; }
#adminDialog { width: min(1120px,calc(100vw - 28px)); }
.admin-stats { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.admin-stats > div { padding: 15px 12px; border-right: 1px solid var(--line); }
.admin-stats > div:last-child { border-right: 0; }
.admin-stats span,.admin-stats b { display: block; }
.admin-stats span { color: var(--muted); font-size: 10px; }
.admin-stats b { margin-top: 6px; font-size: 20px; }
.admin-toolbar { padding: 15px 0; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.admin-toolbar strong,.admin-toolbar small { display: block; }
.admin-toolbar small { margin-top: 4px; color: var(--muted); }
.admin-section { padding: 19px 0; border-bottom: 1px solid var(--line); }
.pricing-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; }
.pricing-grid label { padding: 10px; border-left: 2px solid #28a999; background: #f0f6f5; }
.pricing-grid label > span { display: block; min-height: 30px; color: #405152; font-size: 11px; font-weight: 700; }
.pricing-grid label > div { display: flex; align-items: center; gap: 4px; }
.pricing-grid input { min-width: 0; padding: 7px; }
.pricing-grid button { min-height: 30px; padding: 0 7px; color: #176fe6; }
.table-scroll { overflow: auto; }
.admin-section table { width: 100%; border-collapse: collapse; font-size: 11px; }
.admin-section th,.admin-section td { padding: 10px 8px; border-bottom: 1px solid #e8e9e5; text-align: left; white-space: nowrap; }
.admin-section th { color: var(--muted); font-size: 10px; }
.admin-section td strong,.admin-section td small { display: block; }
.admin-section td small { margin-top: 3px; color: var(--muted); }
.admin-section td button { margin-right: 4px; border: 1px solid #c9d4dc; border-radius: 3px; background: #fff; color: #3e617a; }
.status-tag { padding: 3px 6px; border-radius: 3px; color: #805e20; background: #f5e9ca; }
.status-tag.active { color: #16715e; background: #dff2ed; }

@media (max-width: 900px) {
  .auth-view { grid-template-columns: 1fr; align-content: center; }
  .auth-brand { padding: 28px; }
  .auth-panel { margin-top: 0; }
  .admin-stats { grid-template-columns: repeat(3,1fr); }
  .pricing-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 560px) {
  .auth-brand { justify-content: center; }
  .auth-panel { margin: 14px; padding: 26px 20px; }
  .topbar-actions { gap: 4px; }
  .points-badge { padding: 0 6px; }
  .account-button b { display: none; }
  .recharge-form { grid-template-columns: 1fr 1fr; }
  .recharge-form button { grid-column: 1 / -1; }
  .admin-stats { grid-template-columns: repeat(2,1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .credits-header { padding: 24px 15px 20px; flex-direction: column; }
  .credits-header button { width: 100%; }
  .credits-summary > div { padding: 15px; }
  .credits-summary strong { font-size: 21px; }
  .credits-toolbar { padding: 10px 15px; align-items: flex-start; flex-direction: column; }
  .credits-filters { width: 100%; }
  .credits-filters button { flex: 1; padding: 0 6px; }
  .credits-table-wrap { margin: 0 15px; }
}
