:root {
    --bg: #060a10;
    --bg-soft: #0a1018;
    --panel: #121923;
    --panel-2: #1b222d;
    --panel-3: #202833;
    --ink: #f5f8ff;
    --muted: #93a4bd;
    --muted-2: #6f7f96;
    --line: #283346;
    --line-soft: #1f2b3d;
    --brand: #4aa3ff;
    --brand-2: #2f8de8;
    --brand-soft: rgba(74, 163, 255, .13);
    --surface: rgba(18, 25, 35, .88);
    --surface-soft: rgba(13, 20, 31, .68);
    --surface-subtle: rgba(9, 15, 24, .46);
    --shadow-panel: 0 14px 38px rgba(0, 0, 0, .15);
    --shadow-card: 0 10px 26px rgba(0, 0, 0, .14);
    --success: #16a085;
    --danger: #ff6b7a;
    --sidebar-w: 236px;
    --content-max: 1480px;
    --compact-radius: 14px;
    --section-gap: 14px;
    --control-h: 40px;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); overflow-x: hidden; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 54% -12%, rgba(44, 112, 184, .28), transparent 34rem),
        linear-gradient(180deg, #060a10 0%, #05080d 100%);
}

body { overflow-x: hidden; max-width: 100vw; }

body.guest-page .app {
    display: block;
    min-height: 100dvh;
    background:
        radial-gradient(circle at 50% 10%, rgba(74, 163, 255, .18), transparent 28rem),
        linear-gradient(180deg, #070c13 0%, #05080d 100%);
}

body.guest-page {
    min-height: 100dvh;
    overflow: hidden;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: #86c5ff; }

.app { min-height: 100vh; display: flex; overflow-x: clip; }

.sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    min-height: 100vh;
    max-height: 100vh;
    padding: 14px 12px 12px;
    background: linear-gradient(180deg, #070c13 0%, #05080d 100%);
    border-right: 1px solid var(--line-soft);
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.sidebar::-webkit-scrollbar { width: 7px; }
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(125, 144, 171, .28);
    border-radius: 999px;
}
.sidebar::-webkit-scrollbar-track { background: transparent; }

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 0 10px;
}

.brand-mark {
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #38d5c4, #2477ff);
    color: #fff;
    font-weight: 900;
    letter-spacing: 0;
}

.brand strong { display: block; font-size: 18px; line-height: 1.15; }
.brand small, .sidebar small { color: var(--muted); }

.user-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(18, 25, 35, .9);
    padding: 12px;
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 10px;
    align-items: center;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .18);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #dceaff;
    border: 1px solid var(--line);
    background: var(--panel-3);
    font-weight: 900;
}

.user-info { min-width: 0; }
.user-card strong { display: block; font-size: 15px; line-height: 1.2; }
.user-card small { display: block; margin-top: 4px; font-size: 12px; overflow-wrap: anywhere; }
.user-meta {
    display: flex !important;
    gap: 6px;
    flex-wrap: wrap;
    overflow-wrap: normal !important;
    word-break: normal !important;
}
.user-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    border: 1px solid rgba(74, 163, 255, .2);
    border-radius: 999px;
    background: rgba(74, 163, 255, .08);
    color: #a8caef;
    padding: 3px 8px;
    line-height: 1;
    white-space: nowrap;
}
.user-card form { grid-column: 1 / -1; margin-top: 6px; }

.nav { display: grid; gap: 5px; }

.nav a {
    color: #a9b9d2;
    border-radius: 10px;
    min-height: 38px;
    padding: 8px 11px;
    display: flex;
    align-items: center;
    gap: 11px;
    font-weight: 800;
    line-height: 1.2;
}

.nav a::before {
    content: attr(data-icon);
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #8ea2bf;
    background: rgba(255, 255, 255, .035);
    text-align: center;
    font-weight: 900;
    font-size: 12px;
}

.nav a:hover,
.nav a.active {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.nav a.active::before {
    color: #d9ecff;
    border-color: rgba(74, 163, 255, .22);
    background: rgba(74, 163, 255, .14);
}

.sidebar-footer { margin-top: auto; display: grid; gap: 12px; }

.sidebar-footer,
.launch-card {
    display: none;
}

.launch-card {
    border: 1px solid #203956;
    border-radius: 18px;
    background: rgba(18, 29, 45, .92);
    padding: 16px;
}

.launch-card small { display: block; margin-bottom: 8px; }
.launch-card strong { display: block; font-size: 17px; margin-bottom: 8px; }
.launch-card p { margin: 0; color: var(--muted); line-height: 1.6; font-size: 13px; }

.main {
    flex: 1;
    min-width: 0;
    padding: 20px clamp(22px, 2.7vw, 40px);
    max-width: none;
    overflow-x: clip;
}

@media (min-width: 981px) {
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 20;
    }

    .main {
        width: calc(100% - var(--sidebar-w));
        margin-left: var(--sidebar-w);
    }
}

.main > .page-head,
.main > .panel,
.main > .columns,
.main > .grid,
.main > .cards,
.main > .workflow-grid,
.main > .workflow-capability-strip,
.main > .quota-overview,
.main > .work-metrics,
.main > .work-grid,
.main > .work-delivery,
.main > .work-toolbar,
.main > .delivery-checklist,
.main > .source-grid,
.main > .task-detail-grid,
.main > .script-metrics,
.main > .script-grid,
.main > .script-detail-grid,
.main > .script-pill-grid,
.main > .style-workspace,
.main > .provider-grid,
.main > .admin-metrics,
.home-shell,
.assets-shell,
.admin-shell,
.provider-shell,
.script-shell,
.style-shell,
.task-shell,
.work-shell {
    width: min(100%, var(--content-max));
    margin-left: auto;
    margin-right: auto;
}

.topbar {
    min-height: 52px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(18, 25, 35, .72);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 14px;
    margin-bottom: 16px;
}

.topbar small { display: block; color: var(--muted); margin-bottom: 3px; }

.quota-line { display: flex; gap: 10px; flex-wrap: wrap; }

.quota-line span,
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: var(--brand-soft);
    border: 1px solid rgba(74, 163, 255, .26);
    color: #9ccfff;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin: 0 auto var(--section-gap);
}

.page-head > div {
    min-width: 0;
}

.page-head > .ghost,
.page-head > .button,
.page-head > form,
.page-head > button {
    flex: 0 0 auto;
}

.page-head h1,
h1 {
    margin: 0 0 6px;
    font-size: 26px;
    line-height: 1.15;
    letter-spacing: 0;
}

.page-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
    max-width: 860px;
}

h2 { margin: 0 0 10px; font-size: 18px; }
h3 { margin: 0 0 8px; font-size: 15px; }

.panel,
.auth-card,
.card,
.metric {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--compact-radius);
    padding: 15px;
    box-shadow: var(--shadow-panel);
}

.panel { margin-bottom: var(--section-gap); }

.home-shell {
    width: min(100%, var(--content-max));
    margin: 0 auto;
    display: grid;
    gap: 14px;
}

.home-shell > .panel,
.home-shell > .columns {
    margin-bottom: 0;
}

.home-command {
    border: 1px solid rgba(74, 163, 255, .28);
    border-radius: var(--compact-radius);
    background: rgba(18, 25, 35, .92);
    box-shadow: 0 16px 54px rgba(0, 0, 0, .18);
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
}

.home-command h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

.home-command p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.home-readiness {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.home-readiness a {
    border: 1px solid var(--line);
    border-radius: var(--compact-radius);
    background: rgba(18, 25, 35, .78);
    padding: 14px 16px;
    display: grid;
    gap: 5px;
}

.home-readiness strong {
    color: var(--ink);
    font-size: 26px;
    line-height: 1;
}

.home-readiness span {
    color: var(--muted);
    font-weight: 900;
    font-size: 13px;
}

.home-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.home-work-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.home-work-strip a {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(11, 17, 27, .58);
    overflow: hidden;
}

.home-work-strip video,
.home-work-strip > a > span {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: grid;
    place-items: center;
    background: #03070c;
    color: #9ccfff;
    object-fit: contain;
}

.home-work-strip strong {
    display: block;
    color: var(--ink);
    padding: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.studio-hero {
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    border-color: #244b75;
    background:
        linear-gradient(180deg, rgba(18, 25, 35, .94), rgba(14, 20, 31, .94)),
        radial-gradient(circle at 88% 0%, rgba(74, 163, 255, .18), transparent 24rem);
}

.eyebrow {
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 5px;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 12px;
}

.prompt-box {
    border: 1px solid #24405d;
    border-radius: 14px;
    padding: 12px;
    margin-top: 14px;
    background: rgba(11, 17, 27, .58);
}

.prompt-box textarea {
    min-height: 94px;
    border-radius: 12px;
    font-size: 14px;
}

.prompt-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.segmented { display: flex; gap: 10px; flex-wrap: wrap; }
.segmented label {
    display: inline-flex;
    width: auto;
    cursor: pointer;
}
.segmented input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}
.segmented span {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel-2);
    color: var(--muted);
    padding: 7px 12px;
    font-size: 13px;
    transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}
.segmented input:checked + span {
    color: #d9ecff;
    border-color: var(--brand);
    background: var(--brand-soft);
    box-shadow: 0 0 0 3px rgba(74, 163, 255, .08);
}

.auth-shell {
    width: 100%;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(440px, calc(100vw - 32px));
    margin: 0;
}

.auth-card h1 { font-size: 30px; }

.stack { display: grid; gap: 9px; }

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.workflow-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(340px, 1fr));
    gap: 14px;
    align-items: stretch;
}

.workflow-card {
    margin-bottom: 0;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.workflow-card .section-note {
    min-height: 0;
    margin-bottom: 12px;
    line-height: 1.55;
}

.workflow-capability-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: -4px auto 14px;
    max-width: 100%;
}

.workflow-capability-strip span {
    border: 1px solid rgba(74, 163, 255, .28);
    border-radius: 999px;
    background: rgba(74, 163, 255, .1);
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    padding: 7px 10px;
}

.workflow-card form {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: none;
    width: 100%;
}

.creative-video-card form {
    max-width: none;
}

.workflow-card form > button {
    margin-top: auto;
}

.workflow-step {
    border: 1px solid rgba(40, 51, 70, .86);
    border-radius: 14px;
    background: rgba(10, 16, 24, .36);
    padding: 12px;
    display: grid;
    gap: 10px;
}

.workflow-step-head {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
}

.workflow-step-head > span {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #d9ecff;
    background: rgba(74, 163, 255, .18);
    border: 1px solid rgba(74, 163, 255, .38);
    font-weight: 900;
    font-size: 13px;
}

.workflow-step-head strong {
    display: block;
    color: var(--ink);
    font-size: 15px;
}

.workflow-step-head small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    line-height: 1.45;
    font-size: 12px;
}

.workflow-step-head em {
    color: #9ccfff;
    font-style: normal;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
    border: 1px solid rgba(74, 163, 255, .22);
    border-radius: 999px;
    padding: 5px 8px;
    background: rgba(74, 163, 255, .08);
}

.choice-card-list {
    display: grid;
    gap: 8px;
    max-height: 250px;
    overflow: auto;
    padding-right: 2px;
}

.choice-card-list::-webkit-scrollbar { width: 8px; }
.choice-card-list::-webkit-scrollbar-thumb {
    background: rgba(125, 144, 171, .28);
    border-radius: 999px;
}

.choice-card {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) minmax(82px, 110px);
    gap: 10px;
    align-items: center;
    min-height: 70px;
    border: 1px solid rgba(40, 51, 70, .86);
    border-radius: 12px;
    background: rgba(17, 24, 35, .72);
    padding: 9px 10px;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.choice-card:hover {
    border-color: rgba(74, 163, 255, .5);
    background: rgba(20, 33, 49, .86);
}

.choice-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    min-height: 0;
}

.choice-card-mark {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(155, 177, 206, .72);
    box-shadow: inset 0 0 0 3px rgba(10, 16, 24, .94);
}

.choice-card:has(input:checked) {
    border-color: var(--brand);
    background: rgba(74, 163, 255, .13);
    box-shadow: 0 0 0 3px rgba(74, 163, 255, .08);
}

.choice-card:has(input:checked) .choice-card-mark {
    background: var(--brand);
    border-color: #9ed0ff;
}

.choice-card.is-disabled {
    opacity: .52;
    cursor: not-allowed;
}

.choice-card.is-disabled:hover {
    border-color: rgba(40, 51, 70, .86);
    background: rgba(17, 24, 35, .72);
}

.choice-card-body {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.choice-card-body strong {
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.choice-card-body small {
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.choice-card audio {
    width: 100%;
    max-width: 110px;
    height: 34px;
}

.avatar-choice-card {
    grid-template-columns: 18px minmax(0, 1fr) 58px;
}

.avatar-choice-card video,
.avatar-choice-card img {
    width: 58px;
    height: 70px;
    border-radius: 10px;
    object-fit: contain;
    background: #05080d;
    border: 1px solid var(--line-soft);
}

.inline-empty {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px dashed rgba(125, 144, 171, .32);
    border-radius: 12px;
    color: var(--muted);
    padding: 10px 12px;
}

.inline-empty span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inline-empty a {
    color: #9ccfff;
    font-weight: 900;
    white-space: nowrap;
}

.workflow-route-note {
    display: grid;
    gap: 8px;
    border: 1px solid rgba(74, 163, 255, .24);
    border-radius: 14px;
    background: rgba(74, 163, 255, .08);
    color: #a8caef;
    padding: 10px 12px;
    line-height: 1.55;
    font-size: 13px;
}

.workflow-route-note span {
    display: block;
}

.workflow-prep {
    margin-bottom: 14px;
}

.workflow-prep-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.workflow-prep-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.prep-card {
    border: 1px solid rgba(74, 163, 255, .24);
    border-radius: 14px;
    background: rgba(74, 163, 255, .07);
    padding: 12px;
    display: grid;
    gap: 8px;
    min-width: 0;
}

.prep-kicker {
    color: #8dc8ff;
    font-size: 12px;
    font-weight: 900;
}

.prep-card strong {
    display: block;
    color: #dceaff;
    font-size: 15px;
}

.prep-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
    font-size: 13px;
}

.prep-list {
    display: grid;
    gap: 7px;
}

.prep-list form,
.prep-list div {
    min-height: 38px;
    border: 1px solid rgba(40, 51, 70, .82);
    border-radius: 10px;
    background: rgba(10, 16, 24, .46);
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.prep-list span {
    min-width: 0;
    color: #c9daf2;
    font-size: 13px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prep-list em {
    color: #9ccfff;
    font-style: normal;
    font-size: 12px;
    white-space: nowrap;
}

.workflow-card input,
.workflow-card select,
.workflow-card textarea,
.workflow-card .checks,
.creative-assets {
    min-height: 42px;
}

.workflow-card .checks {
    min-height: 0;
    max-height: 220px;
    overflow: auto;
}

.workflow-card textarea {
    resize: vertical;
    min-height: 96px;
}

.workflow-card .checks.compact {
    min-height: 92px;
}

.asset-picker {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(27, 34, 45, .72);
    overflow: hidden;
    margin-bottom: 14px;
}

.asset-picker summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    color: #dceaff;
    font-weight: 900;
    min-height: 48px;
}

.asset-picker summary::-webkit-details-marker { display: none; }

.asset-picker summary b {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.asset-picker-list {
    display: grid;
    gap: 8px;
    padding: 10px;
    max-height: 300px;
    overflow: auto;
    border-top: 1px solid var(--line-soft);
}

.asset-picker-list::-webkit-scrollbar { width: 8px; }
.asset-picker-list::-webkit-scrollbar-thumb {
    background: rgba(125, 144, 171, .32);
    border-radius: 999px;
}

.asset-pick-card {
    display: grid;
    grid-template-columns: auto minmax(72px, 130px) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 84px;
    padding: 8px 10px;
    border: 1px solid rgba(40, 51, 70, .84);
    border-radius: 12px;
    background: rgba(10, 16, 24, .48);
    cursor: pointer;
}

.asset-pick-card input {
    width: 16px;
    min-height: 0;
}

.asset-preview {
    width: 72px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(7, 12, 19, .82);
    display: grid;
    place-items: center;
    border: 1px solid var(--line-soft);
}

.asset-preview.is-image,
.asset-preview.is-video {
    width: 54px;
    height: 72px;
    justify-self: center;
}

.asset-preview.is-audio {
    width: 130px;
    height: 48px;
    justify-self: start;
}

.asset-preview img,
.asset-preview video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #05080d;
}

.asset-preview audio {
    width: 124px;
    height: 32px;
}

.asset-preview-fallback {
    color: var(--muted);
    font-weight: 900;
}

.asset-pick-body {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.asset-pick-body strong {
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-pick-body small {
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.duration-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.duration-options label {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 11px;
    background: rgba(30, 41, 59, .72);
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
}

.duration-options input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    min-height: 0;
}

.duration-options label:has(input:checked) {
    color: #d9ecff;
    border-color: var(--brand);
    background: var(--brand-soft);
    box-shadow: 0 0 0 3px rgba(74, 163, 255, .08);
}

.creative-duration-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.creative-duration-row > span {
    color: #a9b9d2;
    font-size: 14px;
    font-weight: 900;
}

.creative-duration-row small {
    flex-basis: 100%;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.creative-assets {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.creative-asset-group {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(27, 34, 45, .58);
    padding: 12px;
    min-width: 0;
}

.creative-asset-group.is-disabled {
    border-style: dashed;
    background: rgba(15, 23, 42, .36);
    opacity: .72;
}

.creative-asset-group strong {
    display: block;
    margin-bottom: 10px;
    color: #dceaff;
}

.creative-asset-group > div {
    display: grid;
    gap: 8px;
}

.creative-asset-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: rgba(11, 17, 27, .48);
    padding: 9px 10px;
    min-width: 0;
    cursor: pointer;
}

.creative-asset-group input {
    width: auto;
    min-height: 0;
    flex: 0 0 auto;
}

.creative-asset-group span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.creative-asset-group small {
    color: var(--muted);
}

.model-options label {
    align-items: center;
    gap: 6px;
}

.model-options span {
    color: #8dc8ff;
    font-size: 12px;
    font-weight: 900;
}

.task-center {
    margin-top: 16px;
}

.task-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.task-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 13px 14px;
    background: rgba(11, 17, 27, .54);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
    gap: 12px;
    align-items: center;
}

.task-card-main {
    min-width: 0;
}

.task-card-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 8px;
}

.task-card h3 {
    margin: 4px 0 0;
    font-size: 16px;
    overflow-wrap: anywhere;
}

.task-card p {
    color: var(--muted);
    line-height: 1.55;
    margin: 8px 0 0;
}

.task-next-step {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    border: 1px solid rgba(74, 163, 255, .2);
    border-radius: 12px;
    background: rgba(74, 163, 255, .07);
    color: #a8caef;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.45;
}

.task-next-step strong {
    color: #d9ecff;
    white-space: nowrap;
}

.task-next-step span {
    min-width: 0;
}

.task-inline-preview {
    margin-top: 12px;
    max-width: 220px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(4, 8, 13, .82);
    overflow: hidden;
}

.task-inline-preview video {
    display: block;
    width: 100%;
    max-height: 220px;
    background: #03070c;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--line);
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.status-pill.pending { color: #c7d7ec; background: rgba(255, 255, 255, .06); }
.status-pill.processing { color: #9ccfff; background: rgba(74, 163, 255, .12); border-color: rgba(74, 163, 255, .32); }
.status-pill.success { color: #83ffd9; background: rgba(22, 160, 133, .12); border-color: rgba(22, 160, 133, .32); }
.status-pill.failed { color: #ffadba; background: rgba(255, 107, 122, .12); border-color: rgba(255, 107, 122, .32); }
.status-pill.canceled { color: #c0cad8; background: rgba(111, 127, 150, .12); }

.task-progress {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.task-progress span {
    position: relative;
    border-radius: 999px;
    background: rgba(27, 34, 45, .78);
    color: var(--muted);
    padding: 8px 10px;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
}

.task-progress span.done {
    background: var(--brand-soft);
    color: #b9dcff;
    border: 1px solid rgba(74, 163, 255, .24);
}

.task-progress.large {
    margin: 18px 0;
}

.task-progress.large span {
    padding: 12px 14px;
    font-size: 14px;
}

.task-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
    margin-bottom: 20px;
}

.task-timeline {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.task-timeline div {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    background: rgba(27, 34, 45, .72);
}

.task-timeline span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 7px;
}

.task-timeline strong {
    display: block;
    word-break: break-word;
}

.task-progress-panel {
    display: grid;
    gap: 18px;
}

.task-progress-panel .task-actions {
    margin-top: 0;
}

.task-suggestion {
    border: 1px solid rgba(74, 163, 255, .24);
    border-radius: 18px;
    background: rgba(74, 163, 255, .08);
    padding: 16px;
}

.task-suggestion strong {
    display: block;
    margin-bottom: 8px;
    color: #dceaff;
}

.task-suggestion p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

label {
    display: grid;
    gap: 6px;
    color: #a9b9d2;
    font-size: 13px;
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #2b3545;
    border-radius: 10px;
    padding: 9px 11px;
    font: inherit;
    background: var(--panel-2);
    color: var(--ink);
}

input,
select {
    min-height: var(--control-h);
}

input::placeholder,
textarea::placeholder { color: #76859c; }

input:focus,
select:focus,
textarea:focus {
    outline: 0;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(74, 163, 255, .1);
}

textarea { min-height: 82px; resize: vertical; line-height: 1.55; }

button,
.button {
    border: 0;
    border-radius: 10px;
    background: var(--brand);
    color: #06111f;
    padding: 9px 15px;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--control-h);
    line-height: 1.2;
    white-space: nowrap;
    transition: background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

button,
.button,
.ghost,
.badge,
.status-pill {
    flex-shrink: 0;
}

button:hover,
.button:hover { background: #7fc0ff; color: #06111f; }

button:disabled,
button.is-loading {
    cursor: wait;
    opacity: .78;
}

button.is-loading::before {
    content: "";
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border-radius: 999px;
    border: 2px solid rgba(6, 17, 31, .32);
    border-top-color: #06111f;
    animation: spin .8s linear infinite;
}

button.ghost,
.ghost {
    background: rgba(74, 163, 255, .1);
    color: #8dc8ff;
    border: 1px solid rgba(74, 163, 255, .28);
}

a.ghost {
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    font-weight: 800;
    gap: 6px;
    line-height: 1.2;
    transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

a.ghost:hover,
button.ghost:hover {
    background: rgba(74, 163, 255, .17);
    border-color: rgba(74, 163, 255, .52);
    color: #d8ecff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-card);
}

.columns .panel {
    min-height: 112px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 0;
}

.columns .panel .section-note {
    flex: 1;
}

.full { width: 100%; }

.notice,
.success {
    background: rgba(22, 160, 133, .14);
    border: 1px solid rgba(22, 160, 133, .35);
    color: #94f3df;
    border-radius: var(--compact-radius);
    padding: 13px 16px;
    margin-bottom: var(--section-gap);
    line-height: 1.55;
}

.alert {
    background: rgba(255, 107, 122, .12);
    border: 1px solid rgba(255, 107, 122, .38);
    color: #ffadba;
    border-radius: var(--compact-radius);
    padding: 13px 16px;
    margin-bottom: var(--section-gap);
    line-height: 1.55;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    place-items: center;
    padding: 24px;
    background: rgba(3, 7, 12, .64);
    backdrop-filter: blur(10px);
}

body.is-generating .loading-overlay {
    display: grid;
}

.loading-card {
    width: min(420px, calc(100vw - 32px));
    border: 1px solid #244b75;
    border-radius: 22px;
    background: rgba(18, 25, 35, .96);
    box-shadow: 0 30px 120px rgba(0, 0, 0, .42);
    padding: 28px;
    text-align: center;
}

.loading-card strong {
    display: block;
    font-size: 22px;
    margin-top: 18px;
}

.loading-card p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.loading-spinner {
    width: 44px;
    height: 44px;
    display: inline-block;
    border-radius: 999px;
    border: 3px solid rgba(74, 163, 255, .22);
    border-top-color: var(--brand);
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.metric strong { display: block; font-size: 24px; margin-bottom: 4px; }
.metric span, small, .muted { color: var(--muted); }

.item {
    border-top: 1px solid var(--line);
    padding: 12px 0;
}

.item:first-child { border-top: 0; padding-top: 0; }

.item-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    min-width: 0;
}

.item-title h2,
.item-title h3,
.item-title b {
    min-width: 0;
}

.item-title > :first-child {
    min-width: 0;
}

.item p { color: var(--muted); line-height: 1.55; margin: 6px 0 0; }

.danger-text { color: #ffadba !important; }

.task-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    justify-content: flex-end;
    align-items: center;
}

.task-actions form { margin: 0; }

.primary-ghost {
    border-color: rgba(74, 163, 255, .46);
    background: rgba(74, 163, 255, .14);
    color: #d9ecff;
}

.empty {
    border: 1px dashed #2f4057;
    border-radius: 14px;
    padding: 16px;
    color: var(--muted);
    background: rgba(11, 17, 27, .52);
    text-align: center;
}

@media (max-width: 1320px) and (min-width: 981px) {
    .workflow-grid {
        grid-template-columns: repeat(2, minmax(320px, 1fr));
    }

    .creative-video-card {
        grid-column: 1 / -1;
    }

    .workflow-prep-grid {
        grid-template-columns: 1fr;
    }
}

pre {
    white-space: pre-wrap;
    overflow: auto;
    background: #0b111b;
    border: 1px solid var(--line);
    padding: 14px;
    border-radius: 14px;
    max-height: 360px;
    color: #b8c8dd;
}

.script-compose-panel {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding: 16px;
}

.script-compose-panel .item-title,
.script-library .item-title {
    align-items: flex-start;
    margin-bottom: 10px;
}

.script-compose-panel .item-title > div,
.script-library .item-title > div {
    min-width: 0;
}

.script-compose-panel .section-note,
.script-library .section-note {
    max-width: 920px;
}

.script-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: var(--section-gap);
}

.script-metrics div {
    border: 1px solid var(--line);
    border-radius: var(--compact-radius);
    background: var(--surface-soft);
    padding: 14px 16px;
    display: grid;
    gap: 4px;
}

.script-metrics strong {
    color: var(--ink);
    font-size: 26px;
    line-height: 1;
}

.script-metrics span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.script-preset-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 14px;
}

.script-preset-row button {
    width: auto;
    min-height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(74, 163, 255, .28);
    background: rgba(74, 163, 255, .09);
    color: #b9dcff;
    padding: 7px 11px;
    font-size: 13px;
}

.script-create-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.script-create-grid .wide {
    grid-column: span 2;
}

.script-create-grid button {
    grid-column: span 4;
}

.script-filter {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(150px, 180px) minmax(140px, 160px) minmax(96px, auto) auto;
    gap: 10px;
    align-items: end;
    margin: 12px 0 14px;
}

.script-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 12px;
}

.script-card {
    border: 1px solid var(--line);
    border-radius: var(--compact-radius);
    padding: 14px;
    background: rgba(11, 17, 27, .52);
    min-height: 158px;
    display: flex;
    flex-direction: column;
}

.script-card p {
    color: var(--muted);
    line-height: 1.58;
    margin: 6px 0 0;
}

.script-card .task-actions {
    margin-top: auto;
    padding-top: 10px;
    justify-content: flex-start;
}

.script-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.script-tags span,
.script-pill-grid div,
.script-section-list div {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(27, 34, 45, .72);
    color: #a9b9d2;
    padding: 8px 12px;
    font-size: 13px;
}

.script-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
    margin-bottom: 20px;
}

.script-main {
    min-height: 260px;
}

.script-content {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    color: #d5e3f5;
    background: rgba(27, 34, 45, .72);
    line-height: 1.9;
    white-space: pre-wrap;
}

.script-brief {
    position: sticky;
    top: 24px;
}

.script-pill-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.script-pill-grid div,
.script-section-list div {
    border-radius: 16px;
    line-height: 1.7;
}

.storyboard-list {
    display: grid;
    gap: 12px;
}

.storyboard-list article {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
    background: rgba(27, 34, 45, .72);
}

.storyboard-list span {
    display: inline-flex;
    border-radius: 999px;
    background: var(--brand-soft);
    color: #9ccfff;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 10px;
}

.storyboard-list p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.script-section-list {
    display: grid;
    gap: 12px;
}

.style-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: center;
}

.style-hero h2 {
    font-size: 34px;
    margin: 10px 0;
}

.style-hero p {
    color: var(--muted);
    line-height: 1.8;
    margin: 0;
}

.style-steps {
    display: grid;
    gap: 12px;
}

.style-steps span {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    background: rgba(27, 34, 45, .72);
    font-weight: 800;
    color: #dceaff;
}

.style-source-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.style-source-form .wide {
    grid-column: span 3;
}

.style-source-form button {
    grid-column: span 3;
}

.style-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(360px, .82fr);
    gap: 20px;
    align-items: start;
}

.style-channel {
    border-top: 1px solid var(--line);
    padding-top: 18px;
    margin-top: 18px;
}

.style-channel:first-of-type {
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
}

.style-channel .item-title p,
.style-url {
    color: var(--muted);
    margin: 8px 0 0;
    line-height: 1.7;
    word-break: break-all;
}

.sample-list {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.sample-card {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
    background: rgba(11, 17, 27, .52);
}

.sample-card textarea {
    min-height: 92px;
}

.sample-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.style-profile-refresh {
    margin-top: 14px;
}

.profile-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
    margin-top: 14px;
    background: rgba(27, 34, 45, .72);
}

.profile-card:first-of-type {
    margin-top: 0;
}

.profile-card p {
    color: var(--muted);
    line-height: 1.8;
}

.profile-grid {
    display: grid;
    gap: 12px;
}

.profile-grid div {
    border-radius: 16px;
    padding: 13px;
    background: rgba(11, 17, 27, .62);
}

.profile-grid span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.profile-grid strong,
.profile-grid em {
    display: block;
    color: var(--text);
    font-style: normal;
    line-height: 1.7;
}

.sample {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    border: 1px solid var(--line);
    padding: 12px;
    border-radius: 14px;
    margin-top: 10px;
    background: rgba(11, 17, 27, .52);
}

.checks {
    display: grid;
    gap: 6px;
    max-height: 180px;
    overflow: auto;
    border: 1px solid var(--line);
    padding: 10px;
    border-radius: 12px;
    background: var(--panel-2);
}

.checks label { display: flex; align-items: center; gap: 7px; font-weight: 500; }
.checks input { width: auto; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; margin-top: 10px; }

.work-toolbar {
    margin-bottom: 16px;
}

.work-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: var(--section-gap);
}

.work-metrics div {
    border: 1px solid var(--line);
    border-radius: var(--compact-radius);
    background: rgba(18, 25, 35, .8);
    padding: 14px 16px;
    display: grid;
    gap: 4px;
}

.work-metrics strong {
    color: var(--ink);
    font-size: 26px;
    line-height: 1;
}

.work-metrics span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.work-filter {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 220px 160px auto;
    gap: 10px;
    align-items: end;
}

.work-toolbar,
.script-library form.script-filter,
.voice-review-filter,
.provider-test-panel {
    border: 1px solid rgba(43, 53, 69, .72);
    border-radius: var(--compact-radius);
    background: var(--surface-subtle);
    padding: 10px;
}

.work-toolbar {
    margin-bottom: var(--section-gap);
}

.work-toolbar .work-filter,
.script-library form.script-filter {
    margin: 0;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    align-items: start;
}

.work-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(18, 25, 35, .94), rgba(13, 19, 28, .96)),
        rgba(18, 25, 35, .92);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .24);
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.work-card:hover {
    border-color: rgba(74, 163, 255, .38);
    transform: translateY(-2px);
    box-shadow: 0 22px 48px rgba(0, 0, 0, .3);
}

.work-thumb {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: clamp(180px, 16vw, 240px);
    min-height: 0;
    color: #9cc3ee;
    font-weight: 800;
    background:
        radial-gradient(circle at 50% 15%, rgba(74, 163, 255, .12), transparent 36%),
        linear-gradient(135deg, rgba(7, 12, 19, .96), rgba(2, 6, 11, .98));
    border-bottom: 1px solid rgba(43, 53, 69, .72);
    overflow: hidden;
}

.work-thumb img,
.work-thumb video {
    display: block;
    width: auto;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    background: transparent;
}

.work-thumb > span {
    border: 1px solid rgba(74, 163, 255, .25);
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(74, 163, 255, .1);
}

.work-thumb b {
    position: absolute;
    left: 12px;
    bottom: 12px;
    border: 1px solid rgba(74, 163, 255, .32);
    border-radius: 999px;
    background: rgba(3, 7, 12, .74);
    color: #d9ecff;
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 900;
}

.work-thumb em {
    position: absolute;
    right: 12px;
    bottom: 12px;
    border-radius: 999px;
    background: rgba(216, 236, 255, .12);
    color: #d9ecff;
    padding: 5px 9px;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .16s ease, transform .16s ease;
}

.work-card:hover .work-thumb em {
    opacity: 1;
    transform: translateY(0);
}

.work-body {
    padding: 13px 14px 14px;
    min-width: 0;
    display: grid;
    gap: 8px;
}

.work-body .item-title {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 0;
}

.work-body .item-title > b {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
}

.work-body p {
    color: var(--muted);
    margin: 0;
    line-height: 1.55;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.work-body p span {
    color: #87a4c5;
    font-weight: 900;
    margin-right: 8px;
}

.work-body .task-actions {
    justify-content: flex-start;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(43, 53, 69, .58);
}

.work-body .task-actions .ghost {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 13px;
}

.work-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 16px;
    align-items: start;
}

.work-meta dl {
    display: grid;
    gap: 14px;
    margin: 18px 0 0;
}

.work-meta dt {
    color: var(--muted);
    font-size: 13px;
}

.work-meta dd {
    margin: 4px 0 0;
    font-weight: 800;
    word-break: break-all;
}

.work-delivery {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
}

.delivery-player {
    padding: 16px;
}

.work-player-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.work-player-head h2 {
    margin: 8px 0 0;
}

.delivery-video-stage {
    width: min(100%, 760px);
    margin: 0 auto;
    min-height: min(65vh, 650px);
    border: 1px solid rgba(43, 53, 69, .72);
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 12%, rgba(74, 163, 255, .12), transparent 36%),
        #03070c;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.delivery-video-stage video {
    display: block;
    width: auto;
    max-width: 100%;
    height: min(65vh, 650px);
    max-height: min(65vh, 650px);
    border-radius: 0;
    background: transparent;
}

.delivery-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.delivery-actions.primary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.delivery-actions.primary button,
.delivery-actions.primary .ghost {
    width: 100%;
    min-height: 42px;
}

.delivery-note {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.55;
    font-size: 13px;
}

.delivery-card {
    position: sticky;
    top: 24px;
    background:
        linear-gradient(180deg, rgba(18, 25, 35, .94), rgba(13, 19, 28, .96)),
        rgba(18, 25, 35, .92);
}

.delivery-card h2 {
    margin-top: 8px;
}

.delivery-meta {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.delivery-meta div,
.source-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
    background: rgba(27, 34, 45, .66);
}

.delivery-meta span,
.source-card span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 7px;
}

.delivery-meta strong,
.source-card strong {
    display: block;
    color: var(--text);
    word-break: break-word;
}

.source-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.delivery-check-grid .source-card {
    min-height: 104px;
}

.delivery-check-grid .source-card span {
    color: #8dc8ff;
    font-weight: 900;
}

.table { display: grid; gap: 8px; overflow-x: auto; }

.row {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) minmax(110px, .8fr) minmax(150px, 1fr) repeat(4, minmax(88px, .8fr)) minmax(150px, 1.2fr) minmax(92px, .7fr);
    gap: 6px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px;
    min-width: 0;
    background: var(--panel-2);
}

.row small { display: block; margin-top: 4px; }

.row > * {
    min-width: 0;
    overflow-wrap: anywhere;
}

.row input,
.row select,
.row button,
.row .ghost {
    min-height: 34px;
}

.row .ghost {
    width: 100%;
}

.section-note {
    color: var(--muted);
    margin-top: -4px;
    margin-bottom: 12px;
    line-height: 1.55;
}

.inspiration-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.inspiration-grid span {
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px 10px;
    color: var(--muted);
}

.admin-shell {
    width: min(100%, var(--content-max));
    margin: 0 auto;
    display: grid;
    gap: 16px;
}

.admin-shell > .panel,
.admin-shell > .page-head {
    margin-bottom: 0;
}

.admin-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.admin-metrics .metric {
    min-height: 96px;
    display: grid;
    align-content: center;
    gap: 6px;
}

.admin-metrics strong {
    font-size: clamp(24px, 2.4vw, 34px);
    line-height: 1;
}

.admin-metrics span {
    color: var(--muted);
    font-weight: 800;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.help-grid div {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel-2);
    padding: 16px;
}

.help-grid b {
    display: block;
    margin-bottom: 8px;
}

.help-grid p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.admin-create {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.admin-users {
    display: grid;
    gap: 16px;
}

.admin-users-table {
    display: grid;
    gap: 14px;
}

.admin-user-row {
    border: 1px solid var(--line);
    border-radius: var(--compact-radius);
    background: var(--surface-soft);
    padding: 14px;
    display: grid;
    gap: 14px;
}

.admin-user-main,
.admin-user-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.admin-user-name small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
}

.admin-user-fields {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.admin-user-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-user-summary span {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(17, 24, 34, .76);
    color: var(--muted);
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 900;
}

.admin-user-actions {
    justify-content: flex-end;
}

.admin-user-actions .ghost {
    min-width: 120px;
    justify-content: center;
}

.admin-user-actions button {
    min-width: 160px;
}

.admin-user-card {
    border: 1px solid var(--line);
    border-radius: var(--compact-radius);
    background: var(--surface-soft);
    padding: 14px;
    display: grid;
    gap: 14px;
}

.admin-user-head,
.admin-user-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.admin-user-head small {
    display: block;
    margin-top: 5px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 11px;
    background: rgba(22, 160, 133, .14);
    border: 1px solid rgba(22, 160, 133, .34);
    color: #9af0dc;
    font-size: 12px;
    font-weight: 900;
}

.status-pill.off {
    background: rgba(255, 107, 122, .12);
    border-color: rgba(255, 107, 122, .34);
    color: #ffb4be;
}

.status-pill.success {
    background: rgba(22, 160, 133, .14);
    border-color: rgba(22, 160, 133, .34);
    color: #9af0dc;
}

.status-pill.canceled {
    background: rgba(255, 107, 122, .12);
    border-color: rgba(255, 107, 122, .34);
    color: #ffb4be;
}

.admin-user-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.admin-user-foot span {
    color: var(--muted);
}

.admin-quota-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.quota-box {
    border: 1px solid var(--line);
    border-radius: var(--compact-radius);
    background: var(--surface-soft);
    padding: 14px;
    display: grid;
    gap: 8px;
}

.quota-box small {
    color: var(--muted);
    font-weight: 800;
}

.quota-box b {
    font-size: 20px;
}

.admin-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.admin-detail-grid .panel {
    margin-bottom: 0;
}

.admin-detail-list {
    display: grid;
    gap: 10px;
}

.admin-detail-item {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(17, 24, 34, .7);
    padding: 13px 14px;
    display: grid;
    gap: 6px;
}

.admin-detail-item small {
    color: var(--muted);
}

.admin-empty {
    border: 1px dashed var(--line-strong);
    border-radius: 14px;
    padding: 14px;
    color: var(--muted);
    text-align: center;
}

.audit-list {
    display: grid;
    gap: 10px;
}

.audit-row {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(17, 24, 34, .7);
    padding: 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.audit-row small,
.audit-row p {
    color: var(--muted);
    margin: 3px 0 0;
}

.audit-list.detailed .audit-row {
    grid-template-columns: 1fr;
}

.audit-main {
    display: grid;
    gap: 10px;
}

.audit-changes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.audit-changes span {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(31, 41, 55, .86);
    color: var(--muted);
    padding: 6px 9px;
    font-size: 13px;
}

.admin-ops-list {
    display: grid;
    gap: 10px;
}

.admin-ops-row {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(17, 24, 34, .7);
    padding: 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.admin-ops-row h3 {
    margin: 4px 0;
    font-size: 16px;
}

.admin-ops-row p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.admin-ops-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-ops-meta .ghost {
    min-width: 112px;
    justify-content: center;
}

.admin-ops-meta form {
    margin: 0;
}

.admin-ops-meta button.ghost {
    width: 100%;
}

.admin-task-row {
    align-items: stretch;
}

.admin-task-main {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.admin-task-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-task-facts span {
    border: 1px solid rgba(72, 128, 190, .38);
    border-radius: 999px;
    background: rgba(20, 44, 68, .56);
    color: var(--muted);
    font-size: 13px;
    padding: 5px 9px;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.admin-task-preview {
    margin-top: 4px;
    border: 1px solid rgba(72, 128, 190, .42);
    border-radius: 12px;
    background: rgba(11, 18, 28, .58);
    padding: 8px;
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.admin-task-preview.muted {
    border-color: var(--line);
}

.admin-task-preview video {
    width: 132px;
    height: 74px;
    border-radius: 10px;
    background: #050a12;
    object-fit: cover;
}

.admin-task-preview strong {
    color: var(--text);
}

.admin-log-details {
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(7, 12, 20, .58);
    padding: 8px 10px;
}

.admin-log-details summary {
    cursor: pointer;
    color: var(--accent-2);
    font-weight: 700;
}

.admin-log-details label {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
}

.admin-log-details pre {
    margin: 6px 0 0;
    max-height: 220px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    color: #d7e7ff;
    font-size: 12px;
    line-height: 1.55;
}

.provider-form {
    display: grid;
    gap: 16px;
}

.provider-form .panel {
    margin-bottom: 0;
}

.provider-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.voice-review-shell {
    --voice-panel: rgba(17, 24, 34, .82);
}

.voice-review-head {
    max-width: 980px;
}

.voice-review-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.voice-review-metrics div {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(18, 34, 52, .9), rgba(15, 23, 34, .9));
    padding: 14px 16px;
    min-height: 76px;
    display: grid;
    align-content: center;
    gap: 6px;
}

.voice-review-metrics span {
    color: var(--muted);
    font-weight: 800;
}

.voice-review-metrics strong {
    font-size: 30px;
    line-height: 1;
}

.voice-review-guide {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.voice-review-guide div {
    border: 1px solid rgba(72, 164, 255, .28);
    border-radius: 14px;
    background: rgba(13, 31, 50, .52);
    padding: 14px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 4px 10px;
    align-items: start;
}

.voice-review-guide span {
    grid-row: span 2;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(72, 164, 255, .16);
    border: 1px solid rgba(72, 164, 255, .42);
    color: #bfdbfe;
    font-weight: 950;
}

.voice-review-guide strong {
    color: var(--text);
}

.voice-review-guide p {
    grid-column: 2;
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.voice-review-panel {
    display: grid;
    gap: 14px;
}

.voice-review-filter {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(150px, 220px) minmax(120px, 180px) auto;
    gap: 10px;
    align-items: center;
}

.voice-review-list {
    display: grid;
    gap: 14px;
}

.voice-review-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--voice-panel);
    padding: 14px;
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(320px, 430px);
    gap: 16px;
    align-items: stretch;
}

.voice-review-main,
.voice-review-form {
    min-width: 0;
}

.voice-review-main {
    display: grid;
    gap: 12px;
}

.voice-review-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.voice-review-title h2 {
    margin: 8px 0 0;
    font-size: 18px;
}

.voice-review-time {
    color: var(--muted);
    font-weight: 800;
    white-space: nowrap;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 4px 10px;
    border: 1px solid var(--line);
    background: rgba(31, 41, 55, .7);
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.status-cloning,
.status-processing {
    border-color: rgba(72, 164, 255, .45);
    color: #9dccff;
    background: rgba(23, 61, 102, .55);
}

.status-ready {
    border-color: rgba(45, 212, 191, .45);
    color: #99f6e4;
    background: rgba(13, 82, 73, .5);
}

.status-clone_failed {
    border-color: rgba(248, 113, 113, .45);
    color: #fecaca;
    background: rgba(127, 29, 29, .42);
}

.voice-review-user {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.voice-review-user div {
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(8, 13, 22, .34);
}

.voice-review-user span,
.voice-review-form label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.voice-review-user strong {
    display: block;
    margin-top: 4px;
    overflow-wrap: anywhere;
}

.voice-review-bound-id {
    border: 1px solid rgba(72, 164, 255, .35);
    border-radius: 12px;
    background: rgba(9, 23, 39, .68);
    padding: 11px 12px;
    display: grid;
    gap: 5px;
}

.voice-review-bound-id span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.voice-review-bound-id strong {
    color: #bfdbfe;
    overflow-wrap: anywhere;
}

.voice-review-audio {
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    padding: 12px;
    background: rgba(8, 13, 22, .38);
}

.voice-review-audio audio {
    width: 100%;
    max-width: 420px;
}

.voice-review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.voice-review-actions .ghost {
    min-width: 120px;
    justify-content: center;
}

.voice-review-form {
    border: 1px solid rgba(72, 164, 255, .25);
    border-radius: 14px;
    padding: 14px;
    background: rgba(13, 31, 50, .58);
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.voice-review-form-head {
    border-bottom: 1px solid var(--line-soft);
    padding-bottom: 12px;
}

.voice-review-form-head strong {
    display: block;
    font-size: 17px;
}

.voice-review-form-head span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.voice-review-form label {
    display: grid;
    gap: 7px;
}

.voice-review-form input,
.voice-review-form select {
    width: 100%;
}

.voice-review-form .voice-id-field {
    color: #bfdbfe;
}

.voice-review-form .voice-id-field input {
    border-color: rgba(72, 164, 255, .55);
    background: rgba(9, 23, 39, .94);
    font-weight: 900;
    color: var(--text);
}

.voice-review-form small {
    color: #93c5fd;
    font-size: 12px;
    line-height: 1.45;
}

.voice-review-form button {
    min-height: 48px;
}

.shooting-guide {
    border: 1px solid rgba(72, 164, 255, .28);
    border-radius: 14px;
    background: rgba(13, 31, 50, .52);
    overflow: hidden;
}

.shooting-guide summary {
    cursor: pointer;
    list-style: none;
    padding: 13px 15px;
    color: #bfdbfe;
    font-weight: 900;
}

.shooting-guide summary::-webkit-details-marker {
    display: none;
}

.shooting-guide summary::after {
    content: "展开";
    float: right;
    color: var(--muted);
    font-size: 12px;
}

.shooting-guide[open] summary::after {
    content: "收起";
}

.shooting-guide div {
    border-top: 1px solid var(--line-soft);
    padding: 12px 15px 15px;
    display: grid;
    gap: 8px;
}

.shooting-guide span {
    color: var(--muted);
    line-height: 1.55;
}

.workflow-shooting-guide {
    margin-top: 14px;
}

@media (max-width: 1180px) {
    .voice-review-card {
        grid-template-columns: 1fr;
    }

    .voice-review-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: end;
    }

    .voice-review-form-head,
    .voice-review-form .voice-id-field,
    .voice-review-form button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 820px) {
    .voice-review-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .voice-review-guide {
        grid-template-columns: 1fr;
    }

    .voice-review-filter {
        grid-template-columns: 1fr 1fr;
    }

    .voice-review-filter input {
        grid-column: 1 / -1;
    }

    .voice-review-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .voice-review-head {
        max-width: none;
    }

    .voice-review-metrics,
    .voice-review-guide,
    .voice-review-filter,
    .voice-review-user {
        grid-template-columns: 1fr;
    }

    .voice-review-card {
        padding: 12px;
    }

    .voice-review-title {
        display: grid;
    }

    .voice-review-time {
        white-space: normal;
    }

    .voice-review-actions .ghost,
    .voice-review-filter button,
    .voice-review-filter .ghost {
        width: 100%;
    }

    .voice-review-audio audio {
        max-width: 100%;
    }
}

.provider-grid .wide {
    grid-column: 1 / -1;
}

.provider-actions {
    display: flex;
    justify-content: flex-end;
}

.provider-actions button {
    min-width: 180px;
}

.provider-test-form {
    margin-top: 14px;
}

.provider-test-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.provider-test-grid .provider-test-form {
    margin-top: 0;
}

.provider-test-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.provider-test-panel button {
    min-width: 180px;
    flex: 0 0 auto;
}

.home-shell > .panel:not(.studio-hero),
.home-shell > .columns {
    width: 100%;
}

.assets-shell {
    width: min(100%, var(--content-max));
    margin: 0 auto;
    display: grid;
    gap: 16px;
    min-width: 0;
}

.assets-shell > .page-head,
.assets-shell > .panel {
    margin-bottom: 0;
}

.model-readiness {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.model-readiness div {
    border: 1px solid rgba(74, 163, 255, .24);
    border-radius: 16px;
    background: rgba(18, 25, 35, .78);
    padding: 14px 16px;
    display: grid;
    gap: 5px;
}

.model-readiness span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.model-readiness strong {
    color: var(--ink);
    font-size: 24px;
    line-height: 1.15;
}

.model-readiness small {
    color: #9ccfff;
    line-height: 1.45;
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
    min-width: 0;
}

.model-workbench {
    border: 1px solid rgba(74, 163, 255, .22);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(16, 25, 37, .92), rgba(10, 16, 26, .82));
    padding: 16px;
    display: grid;
    gap: 16px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, .18);
}

.model-section-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.model-section-head h2 {
    margin: 3px 0 6px;
    font-size: 24px;
}

.model-section-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.admin-model-tools {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.admin-model-tools details,
.resource-edit {
    border: 1px solid rgba(74, 163, 255, .22);
    border-radius: 14px;
    background: rgba(11, 20, 32, .62);
    overflow: hidden;
}

.admin-model-tools summary,
.resource-edit summary {
    list-style: none;
    cursor: pointer;
    color: #bfdbfe;
    font-weight: 900;
    padding: 12px 14px;
}

.admin-model-tools summary::-webkit-details-marker,
.resource-edit summary::-webkit-details-marker {
    display: none;
}

.admin-model-tools summary::after,
.resource-edit summary::after {
    content: "展开";
    float: right;
    color: var(--muted);
    font-size: 12px;
}

.admin-model-tools details[open] summary,
.resource-edit[open] summary {
    border-bottom: 1px solid var(--line-soft);
}

.admin-model-tools details[open] summary::after,
.resource-edit[open] summary::after {
    content: "收起";
}

.model-form.compact {
    width: 100%;
    padding: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.model-form.compact button {
    grid-column: 1 / -1;
}

.model-card {
    margin-bottom: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto minmax(56px, 1fr);
    gap: 14px;
    min-width: 0;
}

.model-card.refined {
    border-radius: 16px;
    background: rgba(14, 22, 33, .76);
    grid-template-rows: auto minmax(0, 1fr);
    align-content: start;
}

.model-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.model-card-head h2 {
    margin-bottom: 4px;
}

.model-form {
    width: min(100%, 480px);
    display: grid;
    grid-auto-rows: min-content;
    gap: 10px;
    align-content: start;
    height: auto;
}

.model-form button {
    align-self: stretch;
    margin-top: 0;
}

.model-guide-card {
    border: 1px solid rgba(74, 163, 255, .24);
    border-radius: 14px;
    background: rgba(74, 163, 255, .08);
    padding: 13px;
    display: grid;
    gap: 8px;
}

.model-guide-card strong {
    color: #dceaff;
}

.model-guide-card span {
    color: var(--muted);
    line-height: 1.55;
    font-size: 13px;
}

.model-guide-card .ghost {
    justify-self: start;
}

.model-list {
    min-height: 56px;
    display: grid;
    align-content: start;
    gap: 10px;
}

.model-list.refined {
    gap: 12px;
}

.model-resource-card {
    border: 1px solid rgba(74, 163, 255, .2);
    border-radius: 16px;
    background: rgba(9, 15, 25, .62);
    padding: 13px;
    display: grid;
    gap: 12px;
    min-width: 0;
}

.resource-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.resource-card-head h3 {
    margin: 8px 0 4px;
    font-size: 17px;
    overflow-wrap: anywhere;
}

.resource-card-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
    font-size: 13px;
}

.resource-player {
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: rgba(11, 18, 28, .72);
    padding: 10px;
}

.resource-player audio {
    width: 100%;
}

.resource-empty-media {
    border: 1px dashed rgba(148, 163, 184, .34);
    border-radius: 14px;
    color: var(--muted);
    padding: 13px;
    font-weight: 800;
}

.resource-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.resource-meta-grid div {
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: rgba(17, 24, 34, .58);
    padding: 9px 10px;
    min-width: 0;
}

.resource-meta-grid span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.resource-meta-grid strong {
    display: block;
    margin-top: 4px;
    color: #dceaff;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resource-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.resource-actions form {
    margin: 0;
}

.resource-actions .ghost,
.resource-actions button.ghost {
    min-width: 116px;
    justify-content: center;
}

.resource-edit .asset-edit-form {
    padding: 12px;
    margin-top: 0;
}

.visual-list {
    max-height: 650px;
    overflow: auto;
    padding-right: 4px;
}

.visual-resource-card {
    grid-template-columns: 148px minmax(0, 1fr);
    align-items: stretch;
}

.resource-visual {
    min-width: 0;
}

.resource-visual video,
.resource-visual img {
    width: 100%;
    height: 100%;
    min-height: 196px;
    max-height: 260px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #050a12;
    object-fit: cover;
    display: block;
}

.resource-visual video {
    object-fit: contain;
}

.resource-visual-body {
    display: grid;
    align-content: start;
    gap: 10px;
    min-width: 0;
}

.model-empty-state {
    border: 1px dashed rgba(148, 163, 184, .34);
    border-radius: 16px;
    background: rgba(11, 18, 28, .5);
    min-height: 180px;
    display: grid;
    place-items: center;
    justify-items: center;
    text-align: center;
    gap: 8px;
    padding: 18px;
}

.model-empty-state strong {
    color: var(--text);
    font-size: 17px;
}

.model-empty-state span {
    color: var(--muted);
    line-height: 1.6;
}

.model-list .empty {
    width: 100%;
}

.asset-panel {
    display: grid;
    gap: 16px;
    overflow: hidden;
}

.asset-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.asset-panel-head .section-note {
    margin-bottom: 0;
}

.asset-upload-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
    min-width: 0;
}

.asset-upload-card,
.asset-list-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(27, 34, 45, .72);
    padding: 14px;
    min-width: 0;
}

.asset-upload-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-content: start;
}

.asset-upload-card p {
    margin: 0;
    min-height: 0;
    color: var(--muted);
    line-height: 1.55;
    font-size: 13px;
}

.asset-format-hint {
    display: inline-flex;
    width: fit-content;
    margin-top: 8px;
    border: 1px solid rgba(72, 164, 255, .3);
    border-radius: 999px;
    background: rgba(15, 45, 72, .5);
    color: #bfdbfe;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
}

.asset-kicker {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 6px;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--brand-soft);
    border: 1px solid rgba(74, 163, 255, .26);
    color: #9ccfff;
    font-size: 12px;
    font-weight: 900;
}

.asset-field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.asset-upload-card textarea {
    min-height: 78px;
}

.asset-upload-card button {
    margin-top: auto;
}

.file-picker {
    position: relative;
    border: 1px solid #2b3545;
    border-radius: 12px;
    background: var(--panel-2);
    padding: 10px 12px;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.file-picker input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-picker span {
    flex: 0 0 auto;
    border-radius: 999px;
    border: 1px solid rgba(74, 163, 255, .32);
    background: rgba(74, 163, 255, .12);
    color: #9ccfff;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
}

.file-picker em {
    min-width: 0;
    color: #dceaff;
    font-style: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-upload-feedback {
    min-width: 280px;
    max-width: 460px;
    border: 1px solid rgba(74, 163, 255, .28);
    border-radius: 16px;
    background: rgba(74, 163, 255, .1);
    color: #b9dcff;
    padding: 10px 12px;
    line-height: 1.5;
    font-size: 13px;
    font-weight: 800;
}

.asset-upload-feedback[hidden] {
    display: none;
}

.asset-upload-feedback.success {
    border-color: rgba(22, 160, 133, .38);
    background: rgba(22, 160, 133, .12);
    color: #9fffe1;
}

.asset-upload-feedback.error {
    border-color: rgba(255, 107, 122, .42);
    background: rgba(255, 107, 122, .12);
    color: #ffb7c1;
}

.asset-list-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    min-width: 0;
}

.asset-list-card .empty {
    min-height: 70px;
    display: grid;
    place-items: center;
}

details.asset-list-card {
    padding: 0;
    overflow: hidden;
}

details.asset-list-card summary {
    list-style: none;
    cursor: pointer;
    padding: 13px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 15px;
    font-weight: 900;
}

details.asset-list-card summary::-webkit-details-marker {
    display: none;
}

details.asset-list-card summary::after {
    content: "展开";
    border: 1px solid rgba(74, 163, 255, .28);
    border-radius: 999px;
    color: #9ccfff;
    background: var(--brand-soft);
    padding: 5px 9px;
    font-size: 12px;
}

details.asset-list-card[open] summary {
    border-bottom: 1px solid var(--line);
}

details.asset-list-card[open] summary::after {
    content: "收起";
}

.asset-items {
    display: grid;
    gap: 10px;
    padding: 0 14px 14px;
    max-height: 420px;
    overflow: auto;
}

.asset-card,
.asset-mini-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(17, 24, 34, .72);
    padding: 10px;
    min-width: 0;
}

.asset-mini-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

.asset-mini-card strong,
.asset-card strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-mini-card audio,
.asset-audio audio {
    width: 100%;
    max-width: 100%;
    height: 40px;
}

.asset-state-note {
    border: 1px solid rgba(74, 163, 255, .22);
    border-radius: 12px;
    background: rgba(74, 163, 255, .08);
    color: #a8caef;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.5;
    padding: 9px 10px;
}

.asset-state-note.success {
    border-color: rgba(20, 184, 166, .28);
    background: rgba(20, 184, 166, .1);
    color: #9af0df;
}

.avatar-preview-card {
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
}

.avatar-preview-card img,
.avatar-preview-card video,
.asset-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-preview-card img,
.avatar-preview-card video {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--panel-2);
}

.avatar-preview-card video {
    object-fit: contain;
}

.asset-thumb {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(11, 17, 27, .78);
    color: var(--muted);
    font-weight: 900;
}

.video-thumb {
    min-height: 96px;
}

.asset-audio {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(11, 17, 27, .72);
    padding: 10px;
}

.asset-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(11, 17, 27, .78);
    display: block;
}

.asset-edit-form {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.asset-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.asset-actions .ghost,
.asset-actions button.ghost {
    flex: 1 1 130px;
    width: auto;
}

.asset-created {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.asset-created small {
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-overview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.admin-overview-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-overview-grid .panel {
    margin-bottom: 0;
}

.admin-mini-stats,
.admin-status-grid {
    display: grid;
    gap: 12px;
}

.admin-mini-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-status-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.admin-mini-stats div,
.admin-status-grid div {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(17, 24, 34, .72);
    padding: 14px;
    min-width: 0;
}

.admin-mini-stats span,
.admin-status-grid span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.admin-mini-stats strong,
.admin-status-grid strong {
    display: block;
    font-size: 24px;
    color: var(--text);
}

.admin-ops-list.compact {
    display: grid;
    gap: 12px;
}

.admin-ops-list.compact .admin-ops-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.admin-ops-list.compact .admin-ops-row h3 {
    margin: 4px 0 6px;
}

.health-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.health-card {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(18, 25, 34, .82);
    padding: 18px;
    min-width: 0;
}

.health-card span {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.health-card.ok span {
    color: #83ffd9;
    background: rgba(22, 160, 133, .14);
    border: 1px solid rgba(22, 160, 133, .34);
}

.health-card.bad span {
    color: #ffadba;
    background: rgba(255, 107, 122, .14);
    border: 1px solid rgba(255, 107, 122, .34);
}

.health-card h2 {
    margin-bottom: 8px;
}

.health-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.config-list,
.callback-list {
    display: grid;
    gap: 10px;
}

.config-list div,
.callback-list div {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(17, 24, 34, .72);
    padding: 12px 14px;
}

.config-list span,
.callback-list span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.config-list strong,
.callback-list code {
    color: var(--text);
    overflow-wrap: anywhere;
}

.quota-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.quota-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(18, 25, 35, .82);
    padding: 14px 16px;
    min-width: 0;
}

.quota-card span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 6px;
}

.quota-card strong {
    display: block;
    color: var(--ink);
    font-size: 22px;
    line-height: 1.15;
}

.quota-card p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.production-overview {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.production-card {
    border: 1px solid rgba(61, 100, 144, .78);
    border-radius: 16px;
    background:
        linear-gradient(145deg, rgba(20, 35, 50, .88), rgba(15, 22, 32, .9)),
        rgba(18, 25, 35, .82);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .2);
    padding: 16px;
    min-width: 0;
}

.production-card.primary {
    border-color: rgba(72, 163, 255, .72);
    background:
        radial-gradient(circle at top right, rgba(75, 161, 255, .18), transparent 44%),
        linear-gradient(145deg, rgba(21, 42, 61, .92), rgba(15, 22, 32, .94));
}

.production-card span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 7px;
}

.production-card strong {
    display: block;
    color: var(--ink);
    font-size: 21px;
    line-height: 1.25;
}

.production-card p {
    margin: 9px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.production-card .ghost {
    margin-top: 12px;
}

.module-cards {
    align-items: stretch;
}

.module-card {
    min-height: 138px;
}

.usage-list {
    display: grid;
    gap: 10px;
}

.usage-list.compact {
    gap: 10px;
}

.usage-row {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(17, 24, 34, .7);
    padding: 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.usage-row h3 {
    margin: 4px 0 0;
    font-size: 16px;
}

.usage-row p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.usage-row small {
    color: var(--muted);
}

.usage-meta {
    display: grid;
    justify-items: end;
    gap: 6px;
    min-width: 120px;
}

/* Global UI polish: keep primary panels prominent and make nested content quieter. */
.topbar,
.home-command,
.model-workbench,
.production-card {
    box-shadow: var(--shadow-panel);
}

.home-command,
.production-card,
.model-workbench,
.work-card,
.delivery-card {
    border-radius: var(--compact-radius);
}

.workflow-step,
.choice-card,
.asset-picker,
.asset-pick-card,
.prep-card,
.prep-list form,
.prep-list div,
.task-card,
.task-timeline div,
.task-suggestion,
.script-card,
.admin-detail-item,
.admin-ops-row,
.audit-row,
.voice-review-card,
.voice-review-form,
.voice-review-user div,
.voice-review-bound-id,
.voice-review-audio,
.shooting-guide,
.admin-mini-stats div,
.admin-status-grid div,
.health-card,
.config-list div,
.callback-list div,
.quota-card,
.usage-row,
.delivery-meta div,
.source-card,
.resource-meta-grid div,
.model-resource-card,
.model-guide-card,
.resource-player,
.resource-empty-media,
.model-empty-state,
.asset-upload-card,
.asset-list-card {
    border-radius: var(--compact-radius);
    background: var(--surface-soft);
    box-shadow: none;
}

.workflow-step,
.choice-card,
.asset-pick-card,
.task-card,
.script-card,
.admin-ops-row,
.audit-row,
.usage-row {
    border-color: rgba(43, 53, 69, .78);
}

.workflow-step:hover,
.choice-card:hover,
.asset-pick-card:hover,
.task-card:hover,
.script-card:hover,
.admin-ops-row:hover,
.usage-row:hover {
    border-color: rgba(74, 163, 255, .32);
    background: rgba(15, 24, 37, .78);
}

.metric,
.work-metrics div,
.script-metrics div,
.model-readiness div,
.voice-review-metrics div,
.home-readiness a,
.quota-card,
.production-card {
    min-height: 78px;
    display: grid;
    align-content: center;
}

.metric strong,
.work-metrics strong,
.script-metrics strong,
.model-readiness strong,
.home-readiness strong,
.voice-review-metrics strong,
.admin-mini-stats strong,
.admin-status-grid strong {
    font-size: clamp(22px, 2vw, 28px);
    line-height: 1;
}

.badge,
.status-pill,
.quota-line span,
.workflow-step-head em,
.work-thumb b,
.work-thumb em {
    min-height: 26px;
    align-items: center;
    line-height: 1;
}

.task-actions .ghost,
.task-actions button.ghost,
.resource-actions .ghost,
.resource-actions button.ghost,
.asset-actions .ghost,
.asset-actions button.ghost,
.admin-ops-meta .ghost {
    min-height: 34px;
    padding: 7px 11px;
}

.section-note,
.item p,
.task-card p,
.script-card p,
.production-card p,
.quota-card p,
.usage-row p,
.admin-ops-row p,
.voice-review-guide p,
.model-guide-card span {
    color: #99aac3;
}

.work-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.work-card {
    box-shadow: var(--shadow-card);
}

.work-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, .22);
}

.work-thumb {
    height: clamp(168px, 14vw, 218px);
}

.delivery-player {
    padding: 14px;
}

.delivery-video-stage {
    border-radius: var(--compact-radius);
    min-height: min(60vh, 620px);
}

.delivery-video-stage video {
    height: min(60vh, 620px);
    max-height: min(60vh, 620px);
}

.model-grid,
.provider-grid,
.admin-overview-grid,
.health-grid {
    gap: 14px;
}

.model-workbench {
    padding: 15px;
    gap: 14px;
}

.visual-list,
.choice-card-list,
.asset-picker-list,
.asset-items {
    scrollbar-width: thin;
    scrollbar-color: rgba(125, 144, 171, .36) transparent;
}

details.asset-list-card summary::after {
    content: "展开";
    border-radius: 10px;
}

details.asset-list-card[open] summary::after {
    content: "收起";
}

.asset-card,
.asset-mini-card {
    border-radius: var(--compact-radius);
    background: var(--surface-subtle);
}

.workflow-card form > button {
    width: 100%;
}

.workflow-card .choice-card-list,
.workflow-card .asset-picker-list {
    max-height: clamp(240px, 34vh, 390px);
}

.choice-card,
.asset-pick-card {
    min-height: 70px;
}

.choice-card audio {
    min-width: 0;
}

.avatar-choice-card video,
.avatar-choice-card img {
    background: #050a12;
}

.task-card .task-actions {
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.task-card .task-actions .ghost,
.task-card .task-actions button {
    min-width: 94px;
    justify-content: center;
}

.task-progress span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-log-details {
    border-radius: var(--compact-radius);
    background: rgba(9, 16, 27, .72);
}

.admin-log-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.admin-log-details summary::after {
    content: "\5C55\5F00";
    border: 1px solid rgba(74, 163, 255, .22);
    border-radius: 999px;
    color: #b9dcff;
    font-size: 12px;
    padding: 4px 9px;
}

.admin-log-details[open] summary::after {
    content: "\6536\8D77";
}

.admin-log-details pre {
    border: 1px solid rgba(43, 53, 69, .72);
    border-radius: 10px;
    background: rgba(4, 8, 13, .72);
    padding: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(125, 144, 171, .36) transparent;
}

.provider-test-panel,
.voice-review-filter {
    align-items: center;
}

.provider-test-panel input,
.voice-review-filter input,
.voice-review-filter select {
    min-width: 0;
}

.provider-form {
    gap: 14px;
}

.provider-form .panel {
    padding: 16px;
}

.provider-form .panel h2,
.voice-review-panel .item-title h2,
.admin-shell .panel .item-title h2 {
    margin-bottom: 6px;
}

.provider-form .section-note {
    max-width: 980px;
    margin-bottom: 14px;
}

.provider-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px 14px;
}

.provider-grid label,
.voice-review-form label {
    min-width: 0;
}

.provider-actions {
    position: sticky;
    bottom: 12px;
    z-index: 5;
    padding: 10px;
    border: 1px solid rgba(43, 53, 69, .72);
    border-radius: var(--compact-radius);
    background: rgba(10, 16, 25, .88);
    backdrop-filter: blur(10px);
}

.provider-actions button {
    min-height: 42px;
}

.provider-test-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.provider-test-panel {
    min-height: 104px;
}

.provider-test-panel > div {
    min-width: 0;
}

.admin-shell > .panel > .work-filter,
.voice-review-filter {
    margin: 0;
}

.admin-ops-list {
    gap: 12px;
}

.admin-task-row {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 230px);
    padding: 14px;
}

.admin-task-main {
    gap: 10px;
}

.admin-task-facts {
    gap: 6px;
}

.admin-task-facts span {
    border-radius: 10px;
    background: rgba(10, 17, 27, .56);
}

.admin-task-preview {
    grid-template-columns: minmax(116px, 150px) minmax(0, 1fr);
    border-radius: var(--compact-radius);
}

.admin-task-preview video {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
}

.admin-ops-meta {
    align-content: start;
    align-items: stretch;
}

.admin-ops-meta .status-pill,
.admin-ops-meta .badge {
    justify-content: center;
    width: 100%;
}

.admin-ops-meta .ghost,
.admin-ops-meta form {
    width: 100%;
}

.voice-review-shell {
    --voice-panel: rgba(13, 21, 32, .78);
}

.voice-review-head {
    max-width: none;
}

.voice-review-metrics {
    gap: 10px;
}

.voice-review-metrics div {
    min-height: 74px;
    padding: 13px 15px;
}

.voice-review-guide {
    gap: 10px;
}

.voice-review-guide div {
    border-radius: var(--compact-radius);
    background: var(--surface-soft);
}

.voice-review-panel {
    padding: 14px;
}

.voice-review-card {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    gap: 14px;
    padding: 14px;
}

.voice-review-form {
    align-self: stretch;
    background: rgba(10, 24, 39, .58);
}

.voice-review-audio audio {
    max-width: none;
}

.voice-review-actions .ghost,
.voice-review-form button {
    min-height: 40px;
}

.config-list div,
.callback-list div {
    grid-template-columns: minmax(120px, 160px) minmax(0, 1fr);
}

@media (max-width: 1180px) {
    .voice-review-card,
    .admin-task-row {
        grid-template-columns: 1fr;
    }

    .admin-ops-meta {
        justify-content: flex-start;
    }

    .admin-ops-meta .status-pill,
    .admin-ops-meta .badge,
    .admin-ops-meta .ghost,
    .admin-ops-meta form {
        width: auto;
    }

    .voice-review-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: end;
    }

    .voice-review-form-head,
    .voice-review-form .voice-id-field,
    .voice-review-form button {
        grid-column: 1 / -1;
    }
}

.shooting-guide summary::after,
details.asset-list-card summary::after {
    content: "\5C55\5F00";
}

.shooting-guide[open] summary::after,
details.asset-list-card[open] summary::after {
    content: "\6536\8D77";
}

video,
audio,
img {
    max-width: 100%;
}

button:focus-visible,
.button:focus-visible,
.ghost:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(74, 163, 255, .16);
}

button,
.button,
a.ghost {
    min-width: 0;
}

button.danger,
.ghost.danger {
    border-color: rgba(248, 113, 113, .38);
    background: rgba(127, 29, 29, .22);
    color: #fecaca;
}

button.danger:hover,
.ghost.danger:hover {
    border-color: rgba(248, 113, 113, .58);
    background: rgba(127, 29, 29, .36);
    color: #fff1f2;
}

.empty,
.admin-empty,
.model-empty-state,
.resource-empty-media,
.inline-empty {
    border-radius: var(--compact-radius);
}

.empty,
.admin-empty {
    min-height: 86px;
    display: grid;
    place-items: center;
    background: rgba(9, 15, 24, .46);
    color: #99aac3;
    line-height: 1.6;
}

.item-title {
    min-width: 0;
}

.item-title > .ghost,
.item-title > .badge,
.item-title > form,
.item-title > button {
    flex: 0 0 auto;
}

.item-title p {
    max-width: 900px;
}

.main nav[role="navigation"],
.admin-shell nav[role="navigation"],
.work-shell nav[role="navigation"],
.script-shell nav[role="navigation"],
.assets-shell nav[role="navigation"] {
    margin-top: var(--section-gap);
    border: 1px solid rgba(43, 53, 69, .72);
    border-radius: var(--compact-radius);
    background: var(--surface-subtle);
    padding: 10px;
}

.main nav[role="navigation"] > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.main nav[role="navigation"] p,
.main nav[role="navigation"] span,
.main nav[role="navigation"] a {
    color: #99aac3;
    font-size: 13px;
}

.main nav[role="navigation"] a,
.main nav[role="navigation"] span[aria-current] span,
.main nav[role="navigation"] span[aria-disabled] span {
    min-height: 32px;
    min-width: 32px;
    border: 1px solid rgba(74, 163, 255, .22);
    border-radius: 10px;
    background: rgba(74, 163, 255, .08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    line-height: 1;
}

.main nav[role="navigation"] span[aria-current] span {
    color: #06111f;
    background: var(--brand);
    border-color: var(--brand);
    font-weight: 900;
}

.main nav[role="navigation"] span[aria-disabled] span {
    opacity: .45;
}

.main nav[role="navigation"] svg {
    width: 16px;
    height: 16px;
}

.panel > :last-child,
.card > :last-child,
.metric > :last-child {
    margin-bottom: 0;
}

.work-filter input,
.work-filter select,
.work-filter button,
.work-filter .ghost,
.script-filter input,
.script-filter select,
.script-filter button,
.script-filter .ghost,
.voice-review-filter input,
.voice-review-filter select,
.voice-review-filter button,
.voice-review-filter .ghost {
    min-height: 38px;
}

.sidebar {
    scrollbar-gutter: stable;
}

.brand,
.nav a,
.user-card {
    min-width: 0;
}

.nav a {
    overflow: hidden;
}

.nav a:not(.active):hover::before {
    border-color: rgba(74, 163, 255, .16);
    background: rgba(74, 163, 255, .08);
}

.nav a {
    position: relative;
}

.nav a.active::after {
    content: "";
    position: absolute;
    inset: 9px auto 9px 0;
    width: 3px;
    border-radius: 999px;
    background: var(--brand);
}

.home-command,
.production-overview,
.home-quick-actions,
.home-work-strip,
.style-workspace {
    align-items: stretch;
}

.home-command {
    min-height: 112px;
}

.home-command .primary-ghost {
    min-width: 118px;
}

.home-readiness a,
.production-card,
.module-card,
.style-steps span,
.inspiration-grid span {
    transition: border-color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease;
}

.home-readiness a:hover,
.module-card:hover,
.style-steps span:hover,
.inspiration-grid span:hover {
    border-color: rgba(74, 163, 255, .36);
    background: rgba(15, 24, 37, .78);
    transform: translateY(-1px);
}

.production-card {
    min-width: 0;
    align-content: start;
}

.production-card strong,
.module-card h2,
.style-channel b,
.profile-card b {
    overflow-wrap: anywhere;
}

.module-card {
    display: grid;
    align-content: start;
    gap: 10px;
}

.module-card .ghost {
    margin-top: auto;
}

.style-hero {
    gap: 16px;
}

.style-steps span {
    border-radius: var(--compact-radius);
    background: var(--surface-soft);
}

.style-source-form {
    align-items: end;
}

.style-channel {
    border: 1px solid rgba(43, 53, 69, .72);
    border-radius: var(--compact-radius);
    background: var(--surface-subtle);
    padding: 14px;
    margin-top: 12px;
}

.style-channel:first-of-type {
    border-top: 1px solid rgba(43, 53, 69, .72);
    padding-top: 14px;
}

.style-url {
    border: 1px solid rgba(43, 53, 69, .72);
    border-radius: 10px;
    background: rgba(5, 10, 18, .48);
    padding: 8px 10px;
    overflow-wrap: anywhere;
}

.sample-list {
    display: grid;
    gap: 10px;
}

.sample-card,
.profile-card {
    border-radius: var(--compact-radius);
    background: var(--surface-soft);
}

.sample-card button {
    justify-self: start;
    min-width: 120px;
}

.profile-card {
    margin-top: 12px;
}

.profile-grid div {
    min-width: 0;
}

.profile-grid strong,
.profile-grid em {
    overflow-wrap: anywhere;
}

.admin-help .help-grid div,
.admin-user-row,
.provider-log-row,
.health-card,
.config-list div,
.callback-list div {
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.admin-help .help-grid div:hover,
.admin-user-row:hover,
.provider-log-row:hover,
.health-card:hover {
    border-color: rgba(74, 163, 255, .32);
    background: rgba(15, 24, 37, .78);
}

.admin-create {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.admin-create button {
    min-height: 42px;
}

.admin-user-row {
    gap: 12px;
}

.admin-user-main {
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(43, 53, 69, .72);
}

.admin-user-name {
    min-width: 0;
}

.admin-user-name b,
.provider-log-row h3,
.health-card h2 {
    overflow-wrap: anywhere;
}

.admin-user-fields {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.admin-user-fields label {
    min-width: 0;
}

.admin-user-summary {
    padding-top: 2px;
}

.admin-user-summary span {
    border-radius: 10px;
    background: rgba(8, 14, 23, .52);
}

.admin-user-actions {
    padding-top: 10px;
    border-top: 1px solid rgba(43, 53, 69, .72);
}

.provider-log-row {
    align-items: stretch;
}

.provider-log-row > div:first-child {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.provider-log-row small,
.provider-log-row p {
    overflow-wrap: anywhere;
}

.provider-log-row .admin-ops-meta {
    min-width: 120px;
}

.health-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.health-card {
    border-radius: var(--compact-radius);
    display: grid;
    align-content: start;
}

.health-card.ok {
    border-color: rgba(22, 160, 133, .28);
}

.health-card.bad {
    border-color: rgba(255, 107, 122, .34);
}

.config-list div,
.callback-list div {
    border-radius: var(--compact-radius);
    background: var(--surface-soft);
}

.callback-list code {
    font-family: Consolas, "Microsoft YaHei", monospace;
    font-size: 13px;
    line-height: 1.55;
}

.admin-ops-list.compact .admin-ops-row {
    border-radius: var(--compact-radius);
}

.task-detail-grid {
    gap: 14px;
}

.task-progress-panel,
.script-main,
.script-brief,
.work-player {
    border-radius: var(--compact-radius);
}

.task-progress-panel {
    gap: 14px;
}

.task-progress.large {
    margin: 8px 0;
}

.task-progress.large span {
    border-radius: 12px;
}

.task-suggestion {
    border-radius: var(--compact-radius);
    background: rgba(13, 31, 50, .48);
}

.task-timeline {
    margin: 0;
}

.task-timeline div {
    border-radius: var(--compact-radius);
    background: var(--surface-soft);
}

.task-timeline strong,
.script-content,
.storyboard-list p,
.script-section-list div,
.script-pill-grid div,
.usage-row h3,
.usage-row p,
pre {
    overflow-wrap: anywhere;
}

.script-content {
    border-radius: var(--compact-radius);
    background: rgba(8, 14, 23, .56);
    max-height: none;
}

.script-pill-grid div,
.script-section-list div {
    border-radius: var(--compact-radius);
    background: var(--surface-soft);
}

.storyboard-list article {
    border-radius: var(--compact-radius);
    background: var(--surface-soft);
}

.storyboard-list span {
    border-radius: 10px;
}

pre {
    border-radius: var(--compact-radius);
    background: rgba(4, 8, 13, .68);
    scrollbar-width: thin;
    scrollbar-color: rgba(125, 144, 171, .36) transparent;
}

.usage-list {
    display: grid;
    gap: 10px;
}

.usage-row {
    border-radius: var(--compact-radius);
}

.usage-meta {
    align-self: stretch;
    align-content: center;
}

.grid > button[type="submit"] {
    min-height: 42px;
}

.panel > form.grid {
    align-items: stretch;
}

.panel > form.grid label {
    min-width: 0;
}

.panel > form.grid textarea {
    min-height: 112px;
}

.panel > form.grid button[type="submit"] {
    align-self: end;
}

.admin-shell .work-filter {
    margin: 0;
}

.admin-shell .work-filter label {
    display: grid;
    gap: 7px;
    min-width: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.admin-shell .work-filter input,
.admin-shell .work-filter select,
.admin-shell .work-filter button,
.admin-shell .work-filter .ghost {
    min-height: var(--control-h);
}

.admin-shell .item-title {
    align-items: center;
}

.admin-ops-row {
    border-radius: var(--compact-radius);
    background: linear-gradient(180deg, rgba(17, 24, 34, .82), rgba(11, 18, 28, .72));
}

.admin-ops-row:hover,
.audit-row:hover {
    border-color: rgba(74, 163, 255, .3);
    background: rgba(15, 24, 37, .82);
}

.admin-ops-row > div:first-child,
.audit-main {
    min-width: 0;
}

.admin-ops-row h3,
.audit-main b {
    overflow-wrap: anywhere;
}

.admin-ops-row p + p {
    margin-top: 6px;
}

.admin-ops-meta {
    min-width: 160px;
}

.admin-ops-meta .badge {
    justify-content: center;
}

.audit-row {
    border-radius: var(--compact-radius);
}

.audit-main .item-title {
    gap: 12px;
}

.audit-changes span {
    max-width: 100%;
    border-radius: 10px;
    background: rgba(8, 14, 23, .58);
    overflow-wrap: anywhere;
}

.item pre {
    max-height: 360px;
    overflow: auto;
}

.item .item-title {
    align-items: center;
}

.item-title .badge {
    flex: 0 0 auto;
}

body.guest-page {
    overflow-x: hidden;
    overflow-y: auto;
}

.auth-shell {
    align-items: center;
}

.auth-card {
    border-color: rgba(74, 163, 255, .26);
    background: linear-gradient(180deg, rgba(18, 25, 35, .94), rgba(11, 18, 28, .9));
}

.auth-card .section-note {
    margin-bottom: 14px;
}

.auth-card .stack {
    gap: 11px;
}

.auth-card label {
    display: grid;
    gap: 7px;
    min-width: 0;
    color: var(--muted);
    font-weight: 900;
}

.auth-card button {
    margin-top: 4px;
    min-height: 44px;
}

.topbar {
    min-width: 0;
}

.topbar > div {
    min-width: 0;
}

.topbar strong,
.topbar span,
.quota-line span {
    overflow-wrap: anywhere;
}

.main nav[role="navigation"] {
    overflow-x: auto;
}

.main nav[role="navigation"] > div {
    min-width: 0;
}

.main nav[role="navigation"] p {
    margin: 0;
}

.task-detail-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
}

.task-progress-panel {
    background:
        linear-gradient(180deg, rgba(17, 28, 43, .94), rgba(11, 18, 28, .86)),
        var(--surface);
}

.task-progress-panel > .item-title {
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(43, 53, 69, .72);
}

.task-progress.large span {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.task-suggestion {
    padding: 14px;
}

.task-suggestion p {
    margin-top: 6px;
}

.task-progress-panel .alert {
    margin-bottom: 0;
    overflow-wrap: anywhere;
}

.task-progress-panel .task-actions {
    justify-content: flex-start;
    padding-top: 12px;
    border-top: 1px solid rgba(43, 53, 69, .72);
}

.task-progress-panel .task-actions .ghost,
.task-progress-panel .task-actions button {
    min-height: 38px;
}

.delivery-card {
    top: 16px;
}

.delivery-card h2 {
    margin-top: 0;
}

.delivery-meta {
    margin-top: 12px;
}

.delivery-meta div {
    border-radius: 12px;
    background: rgba(8, 14, 23, .48);
}

.work-player > video {
    width: 100%;
    max-height: 68vh;
    border-radius: 12px;
    background: #02060b;
}

.work-player .delivery-actions {
    margin-top: 12px;
}

.admin-task-row {
    grid-template-columns: minmax(0, 1fr) minmax(190px, 230px);
}

.admin-task-row .admin-ops-meta {
    align-content: start;
    align-items: stretch;
    justify-content: stretch;
    min-width: 0;
}

.admin-task-row .admin-ops-meta .status-pill,
.admin-task-row .admin-ops-meta .badge,
.admin-task-row .admin-ops-meta .ghost,
.admin-task-row .admin-ops-meta button {
    width: 100%;
    min-height: 36px;
    justify-content: center;
}

.admin-task-facts {
    gap: 7px;
}

.admin-task-facts span {
    border-radius: 10px;
    background: rgba(8, 14, 23, .5);
    color: #a9bad1;
}

.admin-task-preview {
    grid-template-columns: 148px minmax(0, 1fr);
    padding: 10px;
    border-radius: var(--compact-radius);
}

.admin-task-preview video {
    width: 148px;
    height: 84px;
    border-radius: 10px;
}

.admin-task-preview p {
    margin-top: 5px;
    font-size: 13px;
}

.alert,
.notice,
.danger-text {
    overflow-wrap: anywhere;
}

.alert {
    max-height: min(42vh, 420px);
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 173, 186, .35) transparent;
}

.alert::-webkit-scrollbar {
    width: 8px;
}

.alert::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 173, 186, .34);
}

button:disabled,
button.is-loading,
.ghost[aria-disabled="true"] {
    transform: none;
    box-shadow: none;
}

button:disabled {
    cursor: not-allowed;
}

a.ghost,
button,
.button {
    text-align: center;
}

.task-actions .ghost,
.task-actions button,
.delivery-actions .ghost,
.delivery-actions button {
    white-space: nowrap;
}

.admin-ops-meta form,
.task-actions form,
.delivery-actions form {
    min-width: 0;
}

.admin-help .item-title {
    align-items: center;
}

.help-grid div {
    border-radius: var(--compact-radius);
    background: linear-gradient(180deg, rgba(17, 28, 43, .8), rgba(11, 18, 28, .68));
}

.admin-create {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.admin-create label {
    min-width: 0;
}

.admin-create button {
    align-self: end;
    min-height: var(--control-h);
}

.admin-user-row {
    background: linear-gradient(180deg, rgba(17, 24, 34, .82), rgba(11, 18, 28, .72));
}

.admin-user-row input,
.admin-user-row select,
.admin-create input,
.admin-create select {
    min-height: var(--control-h);
}

.admin-user-main {
    align-items: flex-start;
}

.admin-user-name b {
    display: block;
    overflow-wrap: anywhere;
}

.admin-user-fields label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.admin-user-summary {
    padding: 2px 0;
}

.admin-user-actions {
    gap: 10px;
}

.admin-user-actions .ghost,
.admin-user-actions button {
    min-height: var(--control-h);
}

.admin-quota-grid > div {
    border: 1px solid var(--line);
    border-radius: var(--compact-radius);
    background: var(--surface-soft);
    padding: 14px;
    min-width: 0;
}

.admin-quota-grid span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 7px;
}

.admin-quota-grid strong {
    display: block;
    overflow-wrap: anywhere;
    font-size: 18px;
}

.admin-detail-grid .item-title {
    align-items: center;
}

.admin-detail-grid .item b {
    display: block;
    overflow-wrap: anywhere;
}

.provider-form .panel {
    background: linear-gradient(180deg, rgba(17, 24, 34, .84), rgba(11, 18, 28, .72));
}

.provider-form .panel h2 {
    padding-bottom: 9px;
    border-bottom: 1px solid rgba(43, 53, 69, .7);
}

.provider-grid label {
    min-width: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.provider-grid input,
.provider-grid select {
    margin-top: 7px;
}

.provider-actions {
    position: sticky;
    bottom: 14px;
    z-index: 12;
    border: 1px solid rgba(74, 163, 255, .22);
    border-radius: var(--compact-radius);
    background: rgba(7, 12, 20, .78);
    backdrop-filter: blur(12px);
    padding: 10px;
}

.provider-actions button {
    width: 100%;
}

@media (max-width: 1180px) {
    .home-readiness,
    .home-quick-actions,
    .home-work-strip,
    .inspiration-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .production-overview {
        grid-template-columns: 1fr;
    }
}

input,
select,
textarea {
    background: rgba(27, 34, 45, .88);
}

label {
    color: #aebdd2;
}

@media (max-width: 980px) {
    .app { display: block; }
    .sidebar {
        width: auto;
        min-height: auto;
        max-height: none;
        position: static;
        border-right: 0;
        border-bottom: 1px solid var(--line-soft);
    }
    .brand { padding-bottom: 10px; }
    .user-card { grid-template-columns: 42px 1fr auto; }
    .user-card form { grid-column: auto; margin-top: 0; }
    .nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .nav a { justify-content: center; padding: 10px; }
    .nav a::before { display: none; }
    .sidebar-footer { display: none; }
    .main { padding: 18px; margin-left: 0; width: auto; }
    .topbar, .page-head, .prompt-actions, .asset-panel-head { display: grid; height: auto; }
    .grid, .columns, .home-command, .home-readiness, .home-quick-actions, .home-work-strip, .workflow-grid, .model-grid, .model-readiness, .asset-upload-grid, .asset-list-grid, .provider-grid, .cards, .stats, .sample, .three, .inspiration-grid, .help-grid, .admin-metrics, .admin-create, .admin-user-grid, .admin-user-fields, .admin-quota-grid, .admin-detail-grid, .admin-ops-row, .admin-task-preview, .audit-row, .admin-overview-grid, .admin-overview-grid.two, .admin-mini-stats, .admin-status-grid, .health-grid, .quota-overview, .production-overview, .usage-row, .config-list div, .callback-list div, .work-grid, .work-metrics, .work-detail-grid, .work-filter, .work-delivery, .source-grid, .style-hero, .style-source-form, .style-workspace, .sample-two, .script-metrics, .script-create-grid, .script-filter, .script-grid, .script-detail-grid, .script-pill-grid, .task-card, .task-detail-grid, .task-timeline { grid-template-columns: 1fr; }
    .provider-grid .wide { grid-column: auto; }
    .style-source-form .wide,
    .style-source-form button { grid-column: auto; }
    .script-create-grid .wide,
    .script-create-grid button { grid-column: auto; }
    .script-brief { position: static; }
    .delivery-card { position: static; }
    .delivery-video-stage { min-height: min(58vh, 560px); }
    .delivery-video-stage video { height: min(58vh, 560px); max-height: min(58vh, 560px); }
    .provider-test-panel { display: grid; }
    .provider-test-panel button { width: 100%; }
    .provider-actions {
        position: static;
        bottom: auto;
    }
    .provider-test-grid { grid-template-columns: 1fr; }
    .model-section-head { display: grid; }
    .model-section-actions { justify-content: flex-start; }
    .admin-model-tools { grid-template-columns: 1fr; }
    .model-form.compact { grid-template-columns: 1fr; }
    .visual-resource-card { grid-template-columns: 1fr; }
    .resource-visual video,
    .resource-visual img { height: auto; max-height: 320px; }
    .admin-task-preview video { width: 100%; height: auto; max-height: 220px; }
    .workflow-card { min-height: auto; }
    .workflow-card .section-note { min-height: 0; }
    .workflow-card form { max-width: none; }
    .workflow-step-head { grid-template-columns: 28px minmax(0, 1fr); }
    .workflow-step-head em { grid-column: 2; justify-self: start; }
    .choice-card { grid-template-columns: 18px minmax(0, 1fr); }
    .choice-card audio,
    .avatar-choice-card video,
    .avatar-choice-card img {
        grid-column: 2;
        justify-self: start;
    }
    .creative-assets { grid-template-columns: 1fr; }
    .model-card { min-height: auto; }
    .model-card { grid-template-rows: auto; }
    .model-form { width: 100%; }
    .resource-meta-grid { grid-template-columns: 1fr; }
    .resource-actions .ghost,
    .resource-actions button.ghost { width: 100%; }
    .asset-upload-feedback { max-width: none; min-width: 0; }
    .usage-meta { justify-items: start; }
    .studio-hero { padding: 20px; }
    .page-head h1, h1 { font-size: 24px; }
    .prompt-box { border-radius: var(--compact-radius); }
    .prompt-box textarea { min-height: 120px; }
}

@media (max-width: 560px) {
    .sidebar { padding: 14px; }
    .brand { gap: 10px; }
    .user-card {
        grid-template-columns: 38px 1fr;
        border-radius: var(--compact-radius);
        padding: 14px;
    }
    .user-card form {
        grid-column: 1 / -1;
        margin-top: 4px;
    }
    .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .main { padding: 14px; }
    .panel, .auth-card, .card, .metric { border-radius: var(--compact-radius); padding: 14px; }
    .studio-hero { padding: 16px; }
    .eyebrow { letter-spacing: 4px; }
    .segmented { display: grid; grid-template-columns: 1fr; }
    .asset-field-row { grid-template-columns: 1fr; }
    button, .button { width: 100%; }
    a.ghost { width: 100%; }
    .admin-user-head,
    .admin-user-foot,
    .admin-user-main,
    .admin-user-actions,
    .admin-ops-meta { display: grid; }
    .admin-user-actions button,
    .admin-user-actions .ghost { width: 100%; }
}
