:root {
  font-family: Inter, "Microsoft YaHei UI", "PingFang SC", sans-serif;
  color: #1b2232;
  background: #f6f7fa;
  font-synthesis: none;
  --green: #3d4c72;
  --accent: #4958ab;
  --accent-hover: #3c4995;
  --accent-soft: #eef0fb;
  --muted: #5f687a;
  --line: #e0e4ec;
  --surface: #fff;
  --studio-teal: var(--accent);
  --studio-ink: #1b2232;
  --studio-line: var(--line);
  --shadow-soft: 0 1px 2px #22325708;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button, a, input, select, textarea { outline-offset: 3px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); }
button { border: 1px solid var(--line); border-radius: 8px; padding: 9px 13px; background: white; font-weight: 600; }
button:hover:not(:disabled) { background: #f1f3f8; }
button:disabled { opacity: .56; cursor: default; }
.primary, [data-astryx-submit] button[type="submit"] { background: var(--accent); border-color: var(--accent); color: white; }
.primary:hover:not(:disabled), [data-astryx-submit] button[type="submit"]:hover:not(:disabled) { background: var(--accent-hover); }
input, select, textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  width: 100%;
}
input[type="file"] { padding: 7px; font-size: .87rem; }
textarea { line-height: 1.55; resize: vertical; }
label { display: grid; gap: 7px; font-weight: 650; font-size: .9rem; }
label small { font-weight: 400; color: var(--muted); }
h1, h2, p { margin: 0; }
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-form { width: min(100%, 410px); padding: 32px; display: grid; gap: 19px; box-shadow: 0 14px 44px #22325712; }
.login-form h1 { font-size: 1.45rem; margin-bottom: 3px; }
.workspace { display: grid; grid-template-columns: 212px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; gap: 30px; height: 100dvh; background: var(--surface); padding: 24px 14px; border-inline-end: 1px solid var(--line); }
.sidebar > .brand { margin-inline: 8px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 750; font-size: 1.13rem; letter-spacing: -.025em; }
.brand-mark { display: grid; place-items: center; flex: 0 0 36px; background: #26334f; color: #fff; width: 36px; height: 36px; border-radius: 10px; font-size: 1.1rem; }
.brand small { display: block; margin-top: 2px; font-size: .72rem; color: var(--muted); letter-spacing: .04em; }
.sidebar nav, .sidebar-footer { display: grid; gap: 5px; }
.sidebar nav button, .sidebar .quiet { text-align: left; color: var(--muted); background: transparent; border-color: transparent; font-size: .89rem; }
.sidebar nav button:hover, .sidebar .quiet:hover { background: #f3f5f9; }
.sidebar nav [aria-current="page"] { background: var(--accent-soft); color: #384688; font-weight: 750; }
.sidebar-footer { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
#signed-in { padding: 8px 13px; font-size: .82rem; font-weight: 650; overflow-wrap: anywhere; }
.content { width: 100%; min-width: 0; max-width: 1480px; margin: 0 auto; padding: 36px 36px 55px; }
.page-header { display: flex; gap: 18px; align-items: center; justify-content: space-between; margin-bottom: 21px; }
.page-header h1 { color: #1b2232; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.2; letter-spacing: -.035em; }
.page-header p { color: var(--muted); margin-top: 8px; font-size: .87rem; }
.connection { display: flex; align-items: center; gap: 7px; }
.connection span { width: 8px; height: 8px; border-radius: 50%; background: #d69834; }
.connection.live span { background: #3a9c62; }
#dashboard { --dash-ink: #1b2232; --dash-muted: var(--muted); --dash-line: var(--line); }
.dashboard-header { flex-wrap: wrap; gap: 8px 18px; margin-bottom: 24px; }
.dashboard-header p { margin: 0; font-variant-numeric: tabular-nums; }
.dashboard-content { display: grid; gap: 20px; color: var(--dash-ink); }
.dashboard-section-title { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.dashboard-section-title h2 { font-size: 1.05rem; font-weight: 750; }
.dashboard-section-title > span, .dashboard-feedback { font-size: .85rem; }
.dashboard-feedback { padding: 14px 0; color: var(--dash-muted); }
.dashboard-feedback button { margin-inline-start: 8px; }
.dashboard-overview { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }
.dashboard-dispatch { display: flex; flex-direction: column; min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-soft); }
.dashboard-dispatch .dashboard-section-title > span { color: var(--muted); }
.dashboard-dispatch-body { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; gap: 18px; flex: 1; margin-top: 17px; }
.dashboard-availability { margin: 0; padding: 4px 0; color: var(--muted); }
.dashboard-availability dt { font-size: .9rem; }
.dashboard-availability dd { margin: 5px 0 0; color: var(--accent); font-size: clamp(2.75rem, 5vw, 4.3rem); font-weight: 720; letter-spacing: -.055em; line-height: 1; }
.dashboard-stats { display: grid; gap: 0; margin: 0; }
.dashboard-stats > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 35px; border-bottom: 1px solid var(--line); }
.dashboard-stats > div:last-child { border-bottom: 0; }
.dashboard-stats > [data-metric="uncertain"][data-nonzero="true"] { color: #8b5317; }
.dashboard-stats dt { font-size: .85rem; }
.dashboard-stats dd { margin: 0; font-size: 1.2rem; font-weight: 720; }
.dashboard-availability dd, .dashboard-stats dd, .dashboard-tier-list dd, .dashboard-production dd, .dashboard-table td { font-variant-numeric: tabular-nums; }
.dashboard-output { display: grid; gap: 10px; }
.dashboard-output > .dashboard-section-title { min-height: 38px; }
.dashboard-output [role="radiogroup"], #task-scope [role="radiogroup"] { background: #edf0f6; }
.dashboard-output [role="radiogroup"] button[role="radio"], #task-scope button[role="radio"] { min-height: 32px; padding-inline: 12px; border-color: transparent; background: transparent; color: var(--muted); }
.dashboard-output [role="radiogroup"] button[aria-checked="true"], #task-scope button[aria-checked="true"] { border-color: var(--line); background: #fff; color: #384688; }
.dashboard-panel { min-width: 0; border: 1px solid var(--dash-line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-soft); }
.dashboard-pool { padding: 20px; }
.dashboard-pool .dashboard-section-title > span { color: var(--dash-muted); }
.dashboard-tier-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(106px, 100%), 1fr)); gap: 12px; margin: 16px 0 0; }
.dashboard-tier-list > div { padding: 10px 12px 4px 0; border-top: 1px solid var(--line); }
.dashboard-tier-list dt { font-size: .82rem; font-weight: 750; }
.dashboard-tier-list dd { margin: 4px 0 0; color: var(--muted); font-size: .78rem; }
.dashboard-tier-list strong { color: var(--dash-ink); font-size: 1.8rem; line-height: 1.1; }
.dashboard-tier-list .dashboard-tier-slots { margin-top: 4px; }
.dashboard-production { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.35fr); margin: 0; }
.dashboard-production > div { padding: 14px 16px; }
.dashboard-production > div + div { border-inline-start: 1px solid var(--dash-line); }
.dashboard-production dt { color: var(--dash-muted); font-size: .85rem; }
.dashboard-production dd { margin: 5px 0 0; font-size: clamp(1.1rem, 2.6vw, 1.65rem); line-height: 1.25; font-weight: 720; }
.dashboard-production [data-series="completed"] dd, .dashboard-emphasis { color: var(--accent); }
.dashboard-trend { padding: 17px 18px 8px; }
.dashboard-legend { display: flex; flex-wrap: wrap; gap: 12px; color: var(--dash-muted); font-size: .82rem; }
.dashboard-legend span::before { display: inline-block; content: ""; width: 9px; height: 9px; border-radius: 2px; margin-inline-end: 5px; background: var(--series); }
.dashboard-content [data-series="submitted"] { --series: #a2afc5; }
.dashboard-content [data-series="completed"] { --series: var(--accent); }
.dashboard-content [data-series="failed"] { --series: #a96664; }
.dashboard-trend-detail { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; padding: 8px 10px; background: #f4f6fa; border-radius: 8px; color: var(--dash-muted); font-size: .86rem; }
.dashboard-trend-detail :is(strong, b) { color: var(--dash-ink); }
.dashboard-chart { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; margin-top: 16px; padding-bottom: 22px; }
.dashboard-axis { display: flex; flex-direction: column; justify-content: space-between; text-align: end; color: var(--dash-muted); font-size: .74rem; line-height: 1; margin-block: -5px; }
.dashboard-plot { display: flex; height: 138px; border-block-end: 1px solid var(--dash-line); background: repeating-linear-gradient(to top, transparent 0 calc(25% - 1px), var(--dash-line) calc(25% - 1px) 25%); }
.dashboard-day { position: relative; flex: 1 1 0; min-width: 0; height: 100%; border: 0; border-radius: 4px 4px 0 0; padding: 0; background: transparent; }
.dashboard-day[data-highlighted="true"], .dashboard-day:hover:not(:disabled) { background: var(--accent-soft); }
.dashboard-bars { display: flex; justify-content: center; align-items: flex-end; gap: 1px; width: 100%; height: 100%; }
.dashboard-bars > span { width: 24%; max-width: 25px; background: var(--series); border-radius: 2px 2px 0 0; }
.dashboard-day-label { position: absolute; top: calc(100% + 5px); left: 50%; transform: translateX(-50%); color: var(--dash-muted); font-size: .73rem; font-weight: 500; white-space: nowrap; }
.dashboard-plot[data-days="30"] .dashboard-day:first-child .dashboard-day-label { left: 0; transform: none; }
.dashboard-plot[data-days="30"] .dashboard-day:last-child .dashboard-day-label { left: auto; right: 0; transform: none; }
.dashboard-table .dashboard-section-title, .dashboard-empty { padding: 14px 16px; }
.dashboard-table thead th { color: var(--dash-muted); }
:is(.dashboard-table, .management-table) tbody th { background: transparent; color: inherit; white-space: normal; min-width: 90px; overflow-wrap: anywhere; }
:is(.dashboard-table, .management-table) tbody :is(th, td) { vertical-align: middle; font-size: .9rem; }
:is(.dashboard-table, .management-table) tr:last-child th[scope="row"] { border-bottom: 0; }
.management-table { overflow: hidden; }
.management-table tbody button { padding: 5px 10px; font-size: .82rem; }
.management-table td { font-variant-numeric: tabular-nums; }
.dashboard-table .dashboard-emphasis { font-weight: 750; }
.dashboard-account-status { display: grid; justify-items: start; gap: 4px; }
.dashboard-account-status small { max-width: 220px; color: var(--dash-muted); overflow-wrap: anywhere; }
.dashboard-empty { color: var(--dash-muted); font-size: .88rem; }
@media (max-width: 900px) {
  .dashboard-overview { grid-template-columns: 1fr; gap: 12px; }
  .dashboard-production { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .dashboard-production > div { grid-column: span 2; padding: 12px 10px; }
  .dashboard-production > div:nth-child(n+4) { grid-column: span 3; border-block-start: 1px solid var(--dash-line); }
  .dashboard-production > div:nth-child(4) { border-inline-start: 0; }
  :is(.dashboard-table, .management-table) :is(table, tbody) { display: block; }
  :is(.dashboard-table, .management-table) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  :is(.dashboard-table, .management-table) tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; padding: 14px 16px; border-top: 1px solid var(--line); }
  .management-table tbody tr:first-child { border-top: 0; }
  :is(.dashboard-table, .management-table) tbody :is(th, td) { padding: 0; border: 0; }
  :is(.dashboard-table, .management-table) tbody th { grid-column: 1 / -1; }
  :is(.dashboard-table, .management-table) tbody td:not(:empty)::before { display: block; content: attr(data-label); margin-bottom: 3px; color: var(--muted); font-size: .75rem; font-weight: 500; }
}
@media (max-width: 540px) {
  .dashboard-dispatch, .dashboard-pool { padding: 15px; }
  .dashboard-plot[data-days="30"] .dashboard-day:not(:first-child):not(:last-child) .dashboard-day-label { display: none; }
}
.task-overview { display: flex; flex-wrap: wrap; width: fit-content; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.task-overview > div { display: flex; align-items: center; gap: 14px; padding: 8px 13px; }
.task-overview > div + div { border-inline-start: 1px solid var(--line); }
.task-overview dt { color: var(--muted); font-size: .83rem; }
.task-overview dd { margin: 0; font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.task-overview > div:last-child dd { color: var(--studio-teal, #08777d); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-soft); }
.toolbar { display: flex; justify-content: space-between; gap: 16px; padding: 14px 17px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.filters { display: flex; align-items: center; gap: 6px; }
.filters select { width: auto; }
.filters input { width: min(230px, 48vw); }
.filters input, .filters select { font-size: .86rem; }
.advanced { position: relative; font-size: .86rem; }
.advanced summary { cursor: pointer; padding: 8px 11px; white-space: nowrap; border: 1px solid var(--studio-line); border-radius: 8px; background: #fff; font-weight: 550; }
.advanced summary:hover, .advanced[open] summary { background: #f5f6f7; border-color: #dadddf; }
.advanced summary:focus-visible { outline: 2px solid var(--studio-teal); outline-offset: 3px; }
.advanced-content { position: absolute; z-index: 4; right: 0; top: calc(100% + 7px); display: grid; gap: 10px; background: white; width: 230px; padding: 12px; border: 1px solid var(--studio-line); border-radius: 16px; box-shadow: 0 8px 26px #1d262b26; }
.advanced-content input, .advanced-content select { width: 100%; }
.table-scroll { overflow-x: auto; }
.panel > .table-scroll, .panel.table-scroll { border-radius: inherit; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .87rem; }
th { font-size: .8rem; color: var(--muted); font-weight: 650; background: #f7f8fb; white-space: nowrap; }
td, th { padding: 13px 16px; border-bottom: 1px solid #edf0f5; }
tr:last-child td { border-bottom: 0; }
td { vertical-align: top; }
.task-name { padding: 0; border: 0; background: transparent; text-align: left; display: block; width: min(24vw, 300px); min-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-name:hover:not(:disabled) { background: transparent; text-decoration: underline; }
.meta, .message { color: var(--muted); font-size: .77rem; margin-top: 5px; line-height: 1.4; }
.message { max-width: 240px; }
.badge { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.running, .badge.submitting, .badge.downloading { color: #365685; }
.badge.succeeded { color: #236344; }
.badge.failed { color: #9c3c30; }
.badge.uncertain, .badge.queued { color: #80581d; }
.progress { display: flex; align-items: center; gap: 5px; margin-top: 6px; font-size: .74rem; }
.progress progress { width: 69px; height: 7px; accent-color: #4b8e67; }
.time { white-space: nowrap; }
.actions { display: flex; flex-wrap: wrap; gap: 5px; min-width: 113px; }
.actions button, .actions a { padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; text-decoration: none; color: var(--green); background: #fff; font-size: .78rem; font-weight: 650; white-space: nowrap; }
.actions a:hover { background: #edf3eb; }
.empty { color: var(--muted); padding: 38px 16px; text-align: center; font-size: .9rem; }
.pagination { text-align: center; padding: 13px; border-top: 1px solid var(--line); }
#page-tasks { min-height: calc(100dvh - 90px); display: flex; flex-direction: column; }
.task-panel > .toolbar { align-items: center; padding: 10px 12px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.task-selection { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 9px 12px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: .85rem; }
.select-loaded { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.select-loaded input, .card-selection input { width: 16px; height: 16px; margin: 0; accent-color: var(--studio-teal); cursor: pointer; }
#selection-count { color: var(--muted); font-variant-numeric: tabular-nums; }
#delete-selected { margin-inline-start: auto; }
#select-tasks[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: #cdd3ec; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 174px), 1fr)); gap: 12px; align-items: start; }
.video-card { position: relative; isolation: isolate; width: 100%; max-width: 260px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; }
.card-selection { position: absolute; z-index: 3; top: 7px; right: 7px; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #ffffffa6; border-radius: 9px; background: #172521d9; cursor: pointer; }
.card-selection:focus-within { outline: 2px solid #96eff1; outline-offset: 2px; }
#tasks .video-card.is-selected { outline: 2px solid var(--studio-teal); outline-offset: 1px; }
.is-selecting .card-preview :is(.preview-top, .preview-bottom) { display: none; }
.is-selecting .preview-open:disabled { cursor: default; opacity: 1; }
.card-preview { aspect-ratio: 9 / 16; position: relative; overflow: hidden; background: #e7ede6; }
.card-preview video { display: block; width: 100%; height: 100%; object-fit: contain; background: #161d19; }
.video-card.has-video { border-color: #00000014; border-radius: 13px; }
.has-video .card-preview { isolation: isolate; }
.has-video .card-preview video { object-fit: cover; }
.preview-open { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; border-radius: 0; background: transparent; }
.preview-open:hover:not(:disabled) { background: transparent; }
.preview-open:focus-visible { outline-offset: -3px; }
.preview-mode, .preview-length { position: absolute; left: 8px; border-radius: 999px; background: #17191abf; color: #fff; padding: 4px 8px; font-size: .71rem; font-weight: 650; line-height: 1.2; pointer-events: none; }
.preview-mode { top: 8px; }
.preview-length { bottom: 8px; font-variant-numeric: tabular-nums; }
.preview-top, .preview-bottom { position: absolute; inset-inline: 0; display: flex; gap: 4px; padding: 7px; justify-content: flex-end; visibility: hidden; opacity: 0; transition: opacity .14s ease; }
.preview-top { top: 0; background: linear-gradient(#0008, transparent); }
.preview-bottom { bottom: 0; justify-content: space-between; background: linear-gradient(transparent, #0008); }
.preview-bottom { flex-wrap: wrap; }
.preview-top :is(button,a), .preview-bottom :is(button,a) { padding: 5px 7px; border: 0; border-radius: 999px; background: #17191ad1; color: #fff; font-size: .68rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.preview-top button:hover:not(:disabled), .preview-bottom :is(button,a):hover:not(:disabled) { background: #111; }
.has-video .preview-top { justify-content: flex-start; gap: 3px; padding: 10px 8px 20px; background: linear-gradient(#0007, transparent); }
.has-video .preview-bottom { flex-wrap: nowrap; align-items: center; gap: 8px; padding: 20px 10px 10px; background: linear-gradient(transparent, #0006); }
.has-video .preview-top .preview-icon { width: 30px; height: 30px; padding: 5px; background: transparent; border-radius: 50%; }
.has-video .preview-icon svg, .preview-view svg { width: 20px; height: 20px; flex-shrink: 0; display: block; }
.has-video .preview-top button:hover:not(:disabled) { background: #ffffff26; }
.has-video .preview-bottom .preview-icon { display: grid; place-items: center; width: 36px; height: 36px; padding: 8px; flex-shrink: 0; background: #242424b3; border-radius: 50%; }
.has-video .preview-bottom .preview-view { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 7px 12px; background: #242424b3; font-size: 12px; font-weight: 500; }
.has-video .preview-view svg { width: 16px; height: 16px; }
.has-video .preview-mode { font-size: 11px; font-weight: 500; padding: 4px 7px; }
.has-video .preview-length { font-size: 12px; padding: 4px 8px; }
.card-preview:is(:hover,:focus-within) :is(.preview-top,.preview-bottom) { visibility: visible; opacity: 1; }
.video-grid:not(.is-selecting) .card-preview:is(:hover,:focus-within) :is(.preview-mode,.preview-length) { opacity: 0; }
@media (hover: none) {
  .preview-bottom { visibility: visible; opacity: 1; }
  .preview-length { bottom: 39px; }
}
.video-card:has(.card-pending) { border-color: #00000014; border-radius: 13px; }
.card-pending { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 34px 12px; text-align: center; background: #f1f2f3; color: #25282a; }
.card-pending strong { font-size: .86rem; font-weight: 650; }
.card-pending p { font-size: .74rem; line-height: 1.45; color: #62686c; overflow-wrap: anywhere; max-height: 5em; overflow: hidden; }
.generation-loading { gap: 5px; color: var(--accent); background: #edf0f8; }
.generation-loading::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 45% 50%, #fff, transparent 70%); animation: generation-glow 5s ease-in-out infinite alternate; }
.generation-loading > * { position: relative; }
.generation-percent { font-size: 16px; font-weight: 500; }
.generation-loading .generation-message { color: #405172; font-size: 14px; line-height: 18px; white-space: pre-line; }
.generation-dots { display: flex; align-items: center; gap: 5px; height: 20px; }
.generation-dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: generation-dot 1.15s ease-in-out infinite alternate; }
.generation-dots i:nth-child(2) { animation-delay: .16s; }
.generation-dots i:nth-child(3) { animation-delay: .32s; }
.video-card:has(.official-generation) { border-color: transparent; border-radius: 16px; }
.official-generation { gap: 8px; color: #fff; background: radial-gradient(ellipse at 0% 46%, #b5b7ed 0%, transparent 65%), radial-gradient(ellipse at 100% 100%, #b6b7ed 0%, transparent 60%), linear-gradient(135deg, #a6c8e9, #95dcdf); }
.official-generation::before { display: none; }
.official-generation .generation-percent { color: #fff; font-size: 16px; font-weight: 700; line-height: 20px; }
.official-generation .generation-dots { color: #ffffff80; height: 12px; gap: 4px; }
.official-generation .generation-dots i { width: 5px; height: 5px; }
.official-generation .generation-message { max-width: 160px; margin: 0; color: #fff; font-size: 14px; font-weight: 400; line-height: 18px; }
.official-generation ~ .pending-mode, .official-generation ~ .pending-time { display: none; }
@keyframes generation-dot { from { opacity: .42; } to { opacity: 1; transform: translateY(-3px); } }
@keyframes generation-glow { from { opacity: .35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .generation-loading::before, .generation-dots i { animation: none; } }
.preview-mode.pending-mode, .preview-length.pending-time { background: #e2e5e7; color: #4a5054; }
.preview-bottom.pending-actions { background: none; }
.pending-reuse { position: absolute; top: 10px; right: 10px; z-index: 1; padding: 6px 9px; border: 0; border-radius: 999px; background: #ffffffd9; color: #283149; font-size: 11px; font-weight: 500; box-shadow: 0 1px 4px #0000000d; }
.pending-reuse:hover:not(:disabled) { background: #fff; }
.pending-mode { max-width: calc(100% - 110px); }
.is-selecting .pending-reuse { display: none; }
.composer-dock { position: sticky; bottom: 0; z-index: 2; margin: auto -8px -16px; padding: 26px 8px 18px; background: linear-gradient(transparent, #f6f7fa 35%); pointer-events: none; }
.composer {
  position: relative;
  width: min(100%, 820px);
  margin: 0 auto;
  padding: 12px;
  display: grid;
  gap: 9px;
  color: var(--studio-ink);
  background: #fff;
  border: 1px solid #d9dfe0;
  border-radius: 16px;
  box-shadow: 0 6px 22px #22325713;
  pointer-events: auto;
}
.composer:focus-within, .composer.dragging { border-color: var(--accent); box-shadow: 0 6px 22px #2232571a; }
.submission-status { margin: 0; color: var(--accent); font-size: 12px; line-height: 18px; }
.composer[aria-busy="true"] .send { cursor: progress; }
.composer.dragging { background: #f4fbfb; }
.composer-media, .attachments, .composer-controls { display: flex; align-items: center; gap: 8px; min-width: 0; }
.composer-media small { font-size: .78rem; color: #687075; }
.attachments { overflow-x: auto; padding-block: 1px; }
.add-images, .attachment { flex: 0 0 60px; width: 60px; height: 60px; border-radius: 8px; }
.add-images { color: #596168; background: #f1f2f3; border: 0; font-size: 1.45rem; font-weight: 400; padding: 0; }
.add-images:hover:not(:disabled) { background: #e8edef; }
.attachment { position: relative; overflow: hidden; background: #eff1f2; }
.attachment :is(img, video) { width: 100%; height: 100%; object-fit: cover; display: block; }
.attachment span { position: absolute; bottom: 4px; left: 4px; font-size: .65rem; color: #fff; background: #121315b8; border-radius: 3px; padding: 1px 4px; }
.attachment-remove { position: absolute; right: 3px; top: 3px; padding: 0; width: 18px; height: 18px; color: #fff; background: #121315b8; border: 0; border-radius: 50%; font-size: .85rem; }
.attachment-remove:hover:not(:disabled) { color: #fff; background: #202629; }
.attachment .attachment-status { position: absolute; inset: auto 0 0; min-height: 17px; padding: 1px 2px; border: 0; border-radius: 0; background: #18212bd9; color: #fff; font-size: 8px; line-height: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.attachment:has(.attachment-status) > span { bottom: 19px; }
.storage-summary { display: grid; grid-template-columns: 1fr auto; gap: 10px 20px; margin-block: 20px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.storage-summary dt { color: var(--muted); }
.storage-summary dd { margin: 0; font-variant-numeric: tabular-nums; }
.composer textarea { field-sizing: content; min-height: 70px; max-height: 26vh; border: 0; border-radius: 5px; padding: 0 1px; line-height: 1.5; resize: vertical; font-size: .92rem; outline-offset: 0; }
.composer textarea:focus { outline: none; }
.composer textarea::placeholder { color: #6c7378; }
.prompt-editor { min-height: 70px; max-height: 26vh; overflow-y: auto; padding: 0 1px; border: 0; outline: none; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .92rem; line-height: 1.8; cursor: text; }
.prompt-editor:empty::before { content: attr(data-placeholder); color: #6c7378; pointer-events: none; }
.prompt-editor[aria-disabled="true"] { cursor: progress; opacity: .7; }
.prompt-mention { display: inline-flex; align-items: center; vertical-align: middle; gap: 8px; height: 28px; margin: 0 2px; padding: 2px 8px 2px 4px; border-radius: 8px; background: #eeeafe; color: #6c5ce7; line-height: 16px; white-space: nowrap; cursor: pointer; user-select: all; }
.prompt-mention:hover, .prompt-mention:focus-visible { background: #e8e2ff; outline: 1px solid #ccc0ff; outline-offset: 1px; }
.prompt-mention :is(img,video) { width: 24px; height: 24px; object-fit: cover; border-radius: 6px; background: #dde2e9; pointer-events: none; }
.prompt-mention > span { pointer-events: none; font-size: 14px; line-height: 16px; }
.prompt-reference-preview { position: fixed; z-index: 30; width: 220px; padding: 6px; border: 1px solid #e2e5eb; border-radius: 10px; background: #fff; box-shadow: 0 8px 28px #17233926; }
.prompt-reference-preview :is(img,video) { display: block; width: 100%; height: 220px; object-fit: contain; border-radius: 6px; background: #f2f3f6; }
.prompt-reference-preview > span { display: block; padding: 6px 4px 2px; color: #4e596b; font-size: 12px; }
.composer .form-error { padding-inline: 1px; }
.composer-controls { flex-wrap: wrap; }
.composer-controls select { width: auto; max-width: 100%; background: #fff; padding: 5px 7px; font-size: .78rem; }
.composer-select { position: relative; min-width: 0; max-width: 100%; }
.composer-select-trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid var(--studio-line);
  border-radius: 999px;
  color: var(--studio-ink);
  background: #fff;
  font-size: .77rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}
.composer-select-trigger::after {
  content: "";
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  margin: -3px 1px 0 0;
  border: solid #5c6267;
  border-width: 0 1px 1px 0;
  transform: rotate(45deg);
}
.composer-select-trigger:hover:not(:disabled), .composer-select-trigger[aria-expanded="true"] { background: #f5f6f7; border-color: #dadddf; }
.composer-select-trigger:focus-visible, .composer-select-menu button:focus-visible { outline: 2px solid var(--studio-teal); outline-offset: -2px; }
.composer-select-trigger[aria-expanded="true"]::after { transform: translateY(3px) rotate(225deg); }
.composer-select-menu, .reference-menu {
  position: absolute;
  z-index: 3;
  padding: 4px;
  color: var(--studio-ink);
  background: #fff;
  border: 1px solid #e7e9ea;
  border-radius: 9px;
  box-shadow: 0 8px 26px #1d262b26;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.composer-select-menu {
  bottom: calc(100% + 5px);
  left: 0;
  width: var(--composer-menu-width, max-content);
  min-width: 100%;
  max-width: calc(100vw - 32px);
  max-height: min(380px, 55dvh);
  border-radius: 16px;
  padding: 4px;
}
.composer-select:has(select[name="mode"]) { --composer-menu-width: 322px; }
.composer-select:has(select[name="model"]) { --composer-menu-width: 400px; }
.composer-select:has(select[name="duration"]) { --composer-menu-width: 350px; }
.composer-select.form-select .composer-select-trigger { padding: 8px 11px; font-size: .85rem; }
.form-select .composer-select-menu { top: calc(100% + 6px); bottom: auto; width: max-content; max-width: min(320px, calc(100vw - 38px)); }
.filters > .form-select { z-index: 4; }
.select-field { display: grid; gap: 7px; min-width: 0; font-size: .9rem; font-weight: 650; }
.select-field .composer-select-trigger { width: 100%; justify-content: space-between; }
.advanced-content .form-select .composer-select-menu { width: 100%; }
.dialog-content .form-select .composer-select-menu { position: relative; top: 4px; width: 100%; max-width: none; }
.composer-select-menu button, .reference-menu button { width: 100%; border: 0; border-radius: 5px; padding: 7px 9px; text-align: left; color: inherit; background: transparent; font-size: .79rem; font-weight: 500; }
.composer-select-menu button { display: block; border-radius: 12px; padding: 9px 8px; font-size: .875rem; font-weight: 400; }
.composer-select-menu button:hover:not(:disabled), .composer-select-menu button[aria-selected="true"] { background: var(--accent-soft); }
.reference-menu button:hover:not(:disabled), .reference-menu button[aria-selected="true"], .reference-menu button.active { background: #eef1f2; }
.composer-menu-title { display: block; padding: 8px 8px 9px; color: #6b7074; font-size: .76rem; font-weight: 550; }
.composer-option-name, .composer-option-description { display: block; }
.composer-option-name:has(.option-eta) { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; }
.option-eta, .tier-badge, .task-eta { display: inline-flex; align-items: center; border-radius: 5px; background: #eef1f6; color: #405172; padding: 2px 7px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.account-estimates { margin-top: 5px; color: var(--accent); font-size: .76rem; }
.account-estimates summary { cursor: pointer; white-space: nowrap; }
.account-estimates p { margin-top: 5px; line-height: 1.4; }
.composer-option-description { color: #6b7074; font-size: .78rem; line-height: 1.32; margin-top: 2px; }
.composer-option-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.composer-option-tags span { padding: 2px 6px; background: #eee; border-radius: 999px; color: #666b6e; font-size: .73rem; line-height: 1.15; }
.composer-select-menu button[aria-selected="true"] .composer-option-tags span { background: #e2e6f6; color: #384688; }
.composer-duration-row { display: grid; grid-template-columns: max-content minmax(60px, 1fr) minmax(46px, auto); align-items: center; gap: 12px; padding: 4px 8px 8px; }
.composer-duration-row > :is(label, span) { font-size: .875rem; font-weight: 400; }
.composer-duration-row input { width: 100%; min-width: 0; margin: 0; padding: 0; accent-color: var(--studio-teal); }
.composer-duration-row output { justify-self: end; min-width: 46px; padding: 7px 9px; text-align: center; border: 1px solid var(--studio-line); border-radius: 999px; font-size: .82rem; white-space: nowrap; }
.composer-duration-setting { display: flex; justify-content: space-between; gap: 12px; padding: 8px; color: #72787b; font-size: .8rem; }
.reference-menu { position: fixed; bottom: auto; left: 12px; width: min(280px, calc(100vw - 24px)); max-height: min(230px, 38dvh); z-index: 20; }
.reference-menu :is(p, .reference-empty, .reference-heading) { padding: 6px 8px; font-size: .75rem; color: #686f74; }
.reference-menu button { display: flex; align-items: center; gap: 8px; padding: 4px 6px; }
.reference-menu button :is(img, video) { flex: 0 0 30px; width: 30px; height: 30px; object-fit: cover; border-radius: 4px; background: #eff1f2; }
.credit-estimate { margin-left: auto; white-space: nowrap; color: #60676c; font-size: .76rem; }
.queue-estimate { margin-left: auto; color: var(--accent); white-space: nowrap; font-size: .76rem; }
.queue-estimate:not([hidden]) + .credit-estimate { margin-left: 0; }
.composer .send { width: 32px; height: 32px; flex: 0 0 32px; border: 0; border-radius: 50%; padding: 0; background: var(--studio-teal); color: #fff; font-size: 1.22rem; line-height: 1; }
.composer .send:hover:not(:disabled) { background: var(--accent-hover); }
@media (max-width: 1050px) {
  .composer-controls { position: relative; }
  .composer-controls .composer-select { position: static; }
  .composer-controls .composer-select-menu { width: min(var(--composer-menu-width, 240px), 100%); min-width: 0; }
}
@media (max-width: 520px) {
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .composer-dock { padding-bottom: 10px; }
  .composer { padding: 9px; }
  .composer-controls { gap: 5px; }
  .composer-controls select, .composer-select-trigger { font-size: .72rem; }
  .composer-select-trigger { padding: 5px 7px; }
}
.notice { position: fixed; z-index: 3; right: 20px; bottom: 20px; background: #26334f; color: white; padding: 12px 16px; border-radius: 9px; max-width: min(380px, calc(100vw - 40px)); line-height: 1.45; box-shadow: 0 9px 30px #22325726; }
.notice.error { background: #7f352a; }
.download-notices { position: fixed; right: 20px; bottom: 20px; z-index: 4; display: grid; gap: 8px; width: min(292px,calc(100vw - 40px)); }
.download-notices:empty { display: none; }
.download-notice { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 8px 30px #182c2426; font-size: .84rem; }
.download-notice p { margin: 5px 0; color: var(--muted); }
.download-notice progress { display: block; width: 100%; height: 6px; accent-color: var(--studio-teal,#08777d); }
.download-notice progress[hidden] { display: none; }
.download-error p { color: #a5362a; }
dialog { width: min(560px, calc(100vw - 28px)); border: 1px solid var(--line); border-radius: 15px; padding: 0; max-height: 90dvh; overflow: auto; color: inherit; box-shadow: 0 24px 75px #22325735; }
dialog::backdrop { background: #202b465e; }
.dialog-header, .dialog-footer { display: flex; align-items: center; gap: 8px; padding: 14px 19px; }
.dialog-header { justify-content: space-between; border-bottom: 1px solid var(--line); }
.dialog-header h2 { font-size: 1.12rem; }
.dialog-header button { font-size: 1.2rem; padding: 3px 9px; border-color: transparent; }
.dialog-content { display: grid; gap: 14px; padding: 19px; }
.dialog-content > p { font-size: .9rem; line-height: 1.55; }
.dialog-footer { justify-content: flex-end; border-top: 1px solid var(--line); }
button.danger { color: #971c31; border-color: #ebc2c8; background: #fff4f5; }
button.danger:hover:not(:disabled) { background: #ffe2e6; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-error { color: #a5362a; font-size: .84rem; white-space: pre-wrap; overflow-wrap: anywhere; }
#detail dl { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 12px; font-size: .87rem; }
#detail dt { color: var(--muted); }
#detail dd { margin: 0; overflow-wrap: anywhere; }
#detail video { display: block; margin: 0 auto; max-width: 100%; height: min(40dvh, 320px); background: #14251f; border-radius: 8px; }
#detail pre { font: inherit; font-size: .85rem; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 220px; overflow: auto; background: #f4f6f2; padding: 12px; border-radius: 8px; }
@media (max-width: 820px) {
  .workspace { grid-template-columns: 155px minmax(0, 1fr); }
  .content { padding: 23px 17px 45px; }
  td, th { padding-inline: 12px; }
}
@media (max-width: 570px) {
  .workspace { display: block; }
  .sidebar { position: static; height: auto; gap: 12px; padding: 12px; border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .sidebar > .brand { margin-inline: 0; }
  .sidebar nav, .sidebar-footer { display: flex; align-items: center; flex-wrap: wrap; }
  .sidebar nav button, .sidebar .quiet { padding: 6px 8px; }
  #signed-in { padding: 0 8px; }
  .sidebar-footer { padding-top: 6px; }
  .content { padding-inline: 12px; }
  .page-header button { white-space: nowrap; }
  .toolbar { padding: 11px; }
  .filters { flex-wrap: wrap; }
  .advanced-content { right: auto; left: 0; }
  .field-row { grid-template-columns: 1fr; }
}

