:root {
    --bg: #f7f8fc;
    --sidebar: #f1f3f7;
    --surface: #ffffff;
    --surface-soft: #fbfcff;
    --text: #171b2a;
    --muted: #7b8190;
    --line: #e5e8f0;
    --line-strong: #d5dae7;
    --primary: #6d5dfc;
    --primary-strong: #5847ea;
    --primary-soft: #f0edff;
    --danger: #d92d20;
    --danger-soft: #fff0ee;
    --ok: #079455;
    --ok-soft: #eafaf1;
    --warn: #b54708;
    --warn-soft: #fff6df;
    --shadow-sm: 0 8px 20px rgba(23, 27, 42, .04);
    --shadow: 0 20px 52px rgba(23, 27, 42, .08);
    --radius: 8px;
}

/* Xuanji Cloud admin console: concept 3 shell + concept 2 model workspace. */
.cloud-admin-body {
    --bg: #f5f7fa;
    --sidebar: #ffffff;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #172033;
    --muted: #6f7b8f;
    --line: #e4e9f0;
    --line-strong: #d4dce7;
    --primary: #1677ff;
    --primary-strong: #095fd1;
    --primary-soft: #edf5ff;
    --danger: #d92d20;
    --danger-soft: #fff1f0;
    --ok: #079455;
    --ok-soft: #eaf8f0;
    --warn: #b26a00;
    --warn-soft: #fff7e7;
    --shadow-sm: 0 1px 3px rgba(15, 31, 54, .04);
    --shadow: 0 10px 30px rgba(15, 31, 54, .07);
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    letter-spacing: 0;
}

.cloud-admin-body .app-shell {
    grid-template-columns: 216px minmax(0, 1fr);
}

.cloud-admin-body .sidebar {
    align-items: stretch;
    gap: 10px;
    padding: 18px 14px 16px;
    border-right-color: var(--line);
    background: #fff;
    backdrop-filter: none;
}

.cloud-admin-body .brand {
    min-height: 46px;
    gap: 10px;
    margin: 0 2px 8px;
    padding: 0 8px;
    font-size: 16px;
    font-weight: 760;
}

.cloud-admin-body .brand::before {
    display: none;
}

.cloud-admin-body .brand-mark {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: #111827;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(17, 24, 39, .14);
}

.cloud-admin-body .nav {
    gap: 3px;
}

.cloud-admin-body .nav-section {
    margin: 17px 10px 6px;
    color: #9aa4b3;
    font-size: 11px;
    font-weight: 700;
}

.cloud-admin-body .nav a,
.cloud-admin-body .nav button {
    position: relative;
    min-height: 40px;
    gap: 11px;
    padding: 9px 11px;
    border: 0;
    border-radius: 7px;
    color: #526076;
    font-weight: 650;
}

.cloud-admin-body .nav a:hover,
.cloud-admin-body .nav button:hover {
    background: #f5f8fc;
    color: #172033;
}

.cloud-admin-body .nav .active {
    background: var(--primary-soft);
    color: var(--primary-strong);
}

.cloud-admin-body .nav .active::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: -14px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--primary);
}

.cloud-admin-body .sidebar-meta {
    margin-top: auto;
    padding: 14px 10px 2px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
}

.cloud-admin-body .sidebar-meta strong,
.cloud-admin-body .sidebar-meta span {
    display: block;
}

.cloud-admin-body .sidebar-meta strong {
    margin-bottom: 3px;
    color: #455268;
    font-size: 12px;
}

.cloud-admin-body .topbar {
    min-height: 74px;
    padding: 15px clamp(22px, 3vw, 42px);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(16px);
}

.cloud-admin-body .topbar h1 {
    font-size: 19px;
    font-weight: 760;
}

.cloud-admin-body .topbar .muted {
    margin-top: 2px;
    font-size: 12px;
}

.cloud-admin-body .topbar-actions {
    flex-wrap: nowrap;
    gap: 10px;
}

.cloud-admin-body .environment-status {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: #5f6c80;
    font-size: 12px;
    font-weight: 650;
}

.cloud-admin-body .environment-status i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 0 3px var(--ok-soft);
}

.cloud-admin-body .topbar-user {
    gap: 9px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.cloud-admin-body .topbar-user > span:last-child {
    display: grid;
    line-height: 1.25;
}

.cloud-admin-body .topbar-user small {
    color: var(--muted);
    font-size: 11px;
}

.cloud-admin-body .topbar-avatar {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #edf3fb;
    color: #36506f;
    font-weight: 750;
}

.cloud-admin-body .topbar-logout button {
    width: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 50%;
}

.cloud-admin-body .main > .alert,
.cloud-admin-body .main > .panel,
.cloud-admin-body .main > .table-wrap,
.cloud-admin-body .main > .asset-grid,
.cloud-admin-body .main > .pagination,
.cloud-admin-body .main > .grid,
.cloud-admin-body .main > .section-gap,
.cloud-admin-body .main > .control-page-head,
.cloud-admin-body .main > .control-quickbar,
.cloud-admin-body .main > .control-overview-grid,
.cloud-admin-body .main > .model-workspace {
    width: min(1320px, calc(100% - clamp(44px, 6vw, 84px)));
    margin-left: auto;
    margin-right: auto;
}

.cloud-admin-body .main > .control-page-head {
    margin-top: 34px;
}

.cloud-admin-body .panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.cloud-admin-body .button {
    min-height: 36px;
    gap: 7px;
    border-radius: 7px;
    background: var(--primary);
    box-shadow: none;
    font-weight: 680;
}

.cloud-admin-body .button:hover {
    background: var(--primary-strong);
    box-shadow: 0 4px 12px rgba(22, 119, 255, .16);
    transform: none;
}

.cloud-admin-body .button.secondary {
    border-color: var(--line-strong);
    background: #fff;
    color: #344258;
}

.cloud-admin-body .button.secondary:hover {
    border-color: #b9c9de;
    background: #f8fafc;
    color: var(--primary-strong);
}

.cloud-admin-body .button.icon-only {
    width: 34px;
    padding: 0;
}

.control-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.control-page-head h2 {
    margin: 0 0 6px;
    font-size: 27px;
    font-weight: 760;
    letter-spacing: 0;
}

.control-page-head p {
    margin: 0;
    color: var(--muted);
}

.control-page-head .actions {
    display: flex;
    gap: 8px;
}

.control-quickbar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.control-quickbar > a {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 16px 18px;
    color: var(--text);
}

.control-quickbar > a + a {
    border-left: 1px solid var(--line);
}

.control-quickbar > a:hover {
    background: #f9fbfd;
}

.control-quickbar strong,
.control-quickbar small {
    display: block;
}

.control-quickbar strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.control-quickbar small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.control-quick-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 7px;
    background: var(--primary-soft);
    color: var(--primary);
}

.control-quick-icon.danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.control-quick-icon svg {
    width: 17px;
    height: 17px;
}

.control-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, .8fr);
    gap: 16px;
    margin-top: 16px;
}

.control-overview-grid .panel,
.control-attention-panel,
.cloud-admin-body .tasks-panel {
    margin: 0;
    padding: 20px;
}

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

.control-section-head h2 {
    margin: 0 0 4px;
    font-size: 16px;
}

.control-section-head p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.control-health-list,
.control-activity-list {
    border-top: 1px solid var(--line);
}

.control-health-row {
    min-height: 52px;
    display: grid;
    grid-template-columns: 10px minmax(100px, .7fr) minmax(120px, 1fr) auto;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    color: var(--text);
}

.control-health-row:hover {
    color: var(--text);
    background: #fafcfe;
}

.control-health-row > span:nth-of-type(2) {
    color: var(--muted);
}

.service-dot,
.model-state-dot {
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 50%;
    background: #a6afbd;
}

.service-dot.ok,
.model-state-dot.online {
    background: var(--ok);
    box-shadow: 0 0 0 3px var(--ok-soft);
}

.service-dot.warn {
    background: #f79009;
    box-shadow: 0 0 0 3px var(--warn-soft);
}

.control-activity-list a {
    min-height: 52px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--line);
    color: var(--text);
}

.control-activity-list time,
.control-activity-list small {
    color: var(--muted);
    font-size: 11px;
}

.control-activity-list strong,
.control-activity-list small {
    display: block;
}

.control-activity-list > a > svg,
.text-action svg {
    width: 15px;
    height: 15px;
}

.text-action {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--primary-strong);
    font-weight: 680;
}

.control-empty,
.empty-table {
    padding: 26px 12px;
    color: var(--muted);
    text-align: center;
}

.cloud-admin-body .control-attention-panel,
.cloud-admin-body .tasks-panel {
    margin-top: 16px;
}

.cloud-admin-body .dashboard-table-wrap {
    border: 1px solid var(--line);
    border-radius: 7px;
    box-shadow: none;
}

.cloud-admin-body .job-type-icon {
    background: var(--primary-soft);
    color: var(--primary);
}

.cloud-admin-body .dashboard-filter {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.cloud-admin-body .dashboard-filter .compact-select {
    width: 150px;
}

.cloud-admin-body table th {
    background: #f7f9fc;
    color: #738096;
    font-size: 11px;
    font-weight: 700;
}

.cloud-admin-body table td {
    border-color: var(--line);
}

.model-page-head {
    align-items: center;
}

.model-segmented {
    display: inline-flex;
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #edf1f6;
}

.model-segmented a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 6px;
    color: #647085;
    font-weight: 680;
}

.model-segmented a.active {
    background: #fff;
    color: var(--primary-strong);
    box-shadow: 0 1px 4px rgba(22, 40, 67, .09);
}

.model-segmented svg {
    width: 16px;
    height: 16px;
}

.cloud-admin-body .provider-console {
    margin-top: 22px;
    padding: 0;
    overflow: hidden;
}

.provider-console > summary {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 18px;
    cursor: pointer;
    list-style: none;
}

.provider-console > summary::-webkit-details-marker {
    display: none;
}

.provider-console > summary > span:first-child,
.provider-summary-actions {
    display: flex;
    align-items: center;
    gap: 11px;
}

.provider-console > summary > span:first-child > svg {
    width: 20px;
    color: var(--primary);
}

.provider-console summary strong,
.provider-console summary small {
    display: block;
}

.provider-console summary small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.provider-summary-actions > svg {
    width: 17px;
    transition: transform .18s ease;
}

.provider-console[open] .provider-summary-actions > svg {
    transform: rotate(180deg);
}

.provider-settings-form {
    padding: 18px;
    border-top: 1px solid var(--line);
    background: #fafcfe;
}

.provider-settings-form .settings-group {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
}

.provider-settings-form .settings-group + .settings-group {
    margin-top: 12px;
}

.settings-shared-badge {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 5px;
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-size: 11px;
    font-weight: 700;
}

.model-workspace {
    display: grid;
    grid-template-columns: 262px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    margin-top: 16px;
    padding-bottom: 40px;
}

.model-catalog-list {
    position: sticky;
    top: 90px;
    padding: 0;
    overflow: hidden;
}

.model-catalog-head {
    padding: 17px 16px 13px;
    border-bottom: 1px solid var(--line);
}

.model-catalog-head strong,
.model-catalog-head small {
    display: block;
}

.model-catalog-head small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.model-catalog-items {
    padding: 7px;
}

.model-catalog-item {
    position: relative;
    width: 100%;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 11px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.model-catalog-item:hover {
    background: #f6f8fb;
}

.model-catalog-item[aria-selected="true"] {
    background: var(--primary-soft);
    color: var(--primary-strong);
}

.model-catalog-item[aria-selected="true"]::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: -7px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--primary);
}

.model-catalog-item strong,
.model-catalog-item small {
    display: block;
}

.model-catalog-item strong {
    max-width: 205px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.model-catalog-item small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.model-editor-stack,
.model-editor {
    min-width: 0;
}

.model-editor {
    padding: 0;
    overflow: hidden;
}

.model-editor[hidden] {
    display: none;
}

.model-editor .settings-form {
    padding: 22px;
}

.model-editor-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin: -22px -22px 22px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--line);
    background: #fbfcfe;
}

.model-editor-head h2 {
    margin: 0 0 4px;
    font-size: 19px;
}

.model-editor-head p {
    margin: 0;
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
}

.model-toggle-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.model-toggle-list > label {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fafcfe;
}

.model-toggle-list strong,
.model-toggle-list small {
    display: block;
}

.model-toggle-list small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.model-toggle-list input[type="checkbox"] {
    width: 38px;
    height: 22px;
    flex: 0 0 auto;
    appearance: none;
    border-radius: 999px;
    background: #cdd5df;
    cursor: pointer;
    transition: background .16s ease;
}

.model-toggle-list input[type="checkbox"]::before {
    content: "";
    width: 18px;
    height: 18px;
    display: block;
    margin: 2px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(31, 41, 55, .22);
    transition: transform .16s ease;
}

.model-toggle-list input[type="checkbox"]:checked {
    background: var(--primary);
}

.model-toggle-list input[type="checkbox"]:checked::before {
    transform: translateX(16px);
}

.model-role-fieldset {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 16px 0 0;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.model-role-fieldset .checkbox-field {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #3e4b60;
    font-weight: 650;
}

.model-role-fieldset input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-height: 0;
    margin: 0;
    padding: 0;
}

.model-role-fieldset legend {
    padding: 0 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.model-capability-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.model-capability-summary > div {
    padding: 13px 15px;
    background: #fafcfe;
}

.model-capability-summary > div + div {
    border-left: 1px solid var(--line);
}

.model-capability-summary span,
.model-capability-summary strong {
    display: block;
}

.model-capability-summary span {
    color: var(--muted);
    font-size: 11px;
}

.model-capability-summary strong {
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.model-editor .settings-advanced {
    margin-top: 16px;
}

.model-editor-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.cloud-admin-body a:focus-visible,
.cloud-admin-body button:focus-visible,
.cloud-admin-body input:focus-visible,
.cloud-admin-body select:focus-visible,
.cloud-admin-body textarea:focus-visible {
    outline-color: rgba(22, 119, 255, .22);
}

.cloud-admin-body input:focus,
.cloud-admin-body select:focus,
.cloud-admin-body textarea:focus {
    border-color: #8bbdff;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, .10);
}

@media (max-width: 1080px) {
    .control-quickbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .control-quickbar > a:nth-child(3) {
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .control-quickbar > a:nth-child(4) {
        border-top: 1px solid var(--line);
    }

    .control-overview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .cloud-admin-body .app-shell {
        display: block;
    }

    .cloud-admin-body .sidebar {
        position: static;
        height: auto;
        padding: 10px 14px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .cloud-admin-body .brand,
    .cloud-admin-body .sidebar-meta,
    .cloud-admin-body .nav-section {
        display: none;
    }

    .cloud-admin-body .nav {
        flex-direction: row;
        overflow-x: auto;
    }

    .cloud-admin-body .nav a {
        width: auto;
        flex: 0 0 auto;
    }

    .cloud-admin-body .nav .active::before {
        top: auto;
        right: 10px;
        bottom: -10px;
        left: 10px;
        width: auto;
        height: 3px;
        border-radius: 3px 3px 0 0;
    }

    .model-workspace {
        grid-template-columns: 1fr;
    }

    .model-catalog-list {
        position: static;
    }

    .model-catalog-items {
        display: flex;
        overflow-x: auto;
    }

    .model-catalog-item {
        min-width: 220px;
    }
}

@media (max-width: 620px) {
    .cloud-admin-body .topbar {
        min-height: 58px;
        padding: 10px 14px;
    }

    .cloud-admin-body .environment-status,
    .cloud-admin-body .topbar-user > span:last-child,
    .cloud-admin-body .topbar .muted {
        display: none;
    }

    .cloud-admin-body .main > .alert,
    .cloud-admin-body .main > .panel,
    .cloud-admin-body .main > .table-wrap,
    .cloud-admin-body .main > .asset-grid,
    .cloud-admin-body .main > .pagination,
    .cloud-admin-body .main > .grid,
    .cloud-admin-body .main > .section-gap,
    .cloud-admin-body .main > .control-page-head,
    .cloud-admin-body .main > .control-quickbar,
    .cloud-admin-body .main > .control-overview-grid,
    .cloud-admin-body .main > .model-workspace {
        width: calc(100% - 24px);
    }

    .control-page-head {
        align-items: stretch;
        flex-direction: column;
    }

    .control-page-head h2 {
        font-size: 23px;
    }

    .control-page-head .actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .control-quickbar {
        grid-template-columns: 1fr;
    }

    .control-quickbar > a + a {
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .model-page-head {
        align-items: stretch;
    }

    .model-segmented {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .model-segmented a {
        justify-content: center;
    }

    .provider-console > summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .model-toggle-list,
    .model-capability-summary {
        grid-template-columns: 1fr;
    }

    .model-capability-summary > div + div {
        border-top: 1px solid var(--line);
        border-left: 0;
    }
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 82% 4%, rgba(109, 93, 252, .08), transparent 30%),
        linear-gradient(180deg, #fbfcff 0%, var(--bg) 48%, #f6f7fb 100%);
    color: var(--text);
    font-family: Outfit, "PingFang SC", "Microsoft YaHei", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.55;
}

a {
    color: var(--primary-strong);
    text-decoration: none;
    transition: color .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

a:hover {
    color: #4636d4;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(109, 93, 252, .18);
    outline-offset: 2px;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 10;
    padding: 9px 12px;
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--primary-strong);
    box-shadow: var(--shadow);
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 224px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    overflow: auto;
    padding: 16px 14px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(14px);
}

.brand {
    min-height: 44px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 0 10px;
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
    white-space: nowrap;
}

.brand:hover {
    color: var(--text);
}

.brand::before {
    content: "";
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .75), transparent 34%),
        linear-gradient(135deg, #18a8ff 0%, #5d6bff 52%, #8d5bff 100%);
    box-shadow: 0 10px 22px rgba(93, 107, 255, .28);
}

.nav {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    overflow: visible;
}

.nav form {
    margin: 0;
    flex: 0 0 auto;
}

.nav-section {
    margin: 10px 8px 2px;
    color: #8d94a4;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.nav a,
.nav button {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #4d5567;
    font: inherit;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
}

.nav a:hover,
.nav button:hover {
    background: #ffffff;
    color: var(--text);
}

.nav .active {
    background: var(--primary-soft);
    color: var(--primary-strong);
    border-color: #e2dcff;
}

.nav svg,
.button svg,
.icon-button svg,
.quick-action svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.main {
    min-width: 0;
    padding: 0;
}

.topbar {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 28px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(14px);
}

.topbar h1 {
    margin: 0;
    color: var(--text);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
}

.topbar-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.topbar-actions form {
    margin: 0;
}

.topbar-link,
.topbar-logout button {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: #4d5567;
    font: inherit;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.topbar-link:hover,
.topbar-logout button:hover {
    border-color: #dcdff0;
    background: #fbfcff;
    color: var(--text);
}

.topbar-link.active {
    border-color: #e2dcff;
    background: var(--primary-soft);
    color: var(--primary-strong);
}

.topbar-link svg,
.topbar-logout svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.topbar-user {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: #3c4254;
    white-space: nowrap;
}

.topbar-user svg {
    width: 17px;
    height: 17px;
    color: var(--primary);
}

.main > .alert,
.main > .dashboard-band,
.main > .grid,
.main > .panel,
.main > .table-wrap,
.main > .asset-grid,
.main > .pagination,
    .main > .section-gap,
    .main > .voice-console,
    .main > .creator-console,
    .main > .studio-page,
    .main > .volc-tts-page,
    .main > .tts-workbench-page {
    margin-left: 28px;
    margin-right: 28px;
}

.main > .alert,
.main > .dashboard-band,
.main > .panel,
.main > .table-wrap,
    .main > .asset-grid,
    .main > .voice-console,
    .main > .creator-console,
    .main > .studio-page,
    .main > .volc-tts-page,
    .main > .tts-workbench-page {
    margin-top: 20px;
}

h1,
h2,
h3 {
    color: var(--text);
    line-height: 1.24;
}

h2 {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 800;
}

p {
    margin: 0 0 10px;
}

.muted {
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 16px;
}

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

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

.section-gap {
    height: 16px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 18px;
    box-shadow: var(--shadow-sm);
}

.dashboard-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
}

.overview-panel {
    min-height: 182px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    overflow: hidden;
    background:
        radial-gradient(circle at 88% 0%, rgba(109, 93, 252, .11), transparent 32%),
        radial-gradient(circle at 12% 0%, rgba(7, 148, 85, .08), transparent 30%),
        linear-gradient(135deg, #ffffff, #fbfcff);
}

.dashboard-status-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--primary-strong);
    font-size: 12px;
    font-weight: 800;
}

.overview-panel h2 {
    max-width: 720px;
    margin-bottom: 8px;
    font-size: 28px;
}

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

.status-tile {
    min-height: 86px;
    display: grid;
    align-content: space-between;
    gap: 10px;
    padding: 13px 14px;
    border: 1px solid #e4e7f0;
    border-radius: 8px;
    background: rgba(255, 255, 255, .82);
    color: #4d5567;
    box-shadow: 0 8px 18px rgba(23, 27, 42, .03);
}

.status-tile:hover {
    color: var(--text);
    border-color: #cfd5e6;
    background: #ffffff;
    transform: translateY(-1px);
}

.status-tile span {
    font-size: 12px;
    font-weight: 800;
}

.status-tile strong {
    color: var(--text);
    font-size: 30px;
    line-height: .95;
    font-variant-numeric: tabular-nums;
}

.status-tile-failed strong {
    color: var(--danger);
}

.status-tile-succeeded strong {
    color: var(--ok);
}

.dashboard-actions-panel {
    display: grid;
    align-content: start;
    gap: 14px;
}

.dashboard-actions-panel .section-heading {
    align-items: baseline;
}

.dashboard-actions-grid {
    display: grid;
    gap: 10px;
}

.summary-panel {
    display: grid;
    gap: 12px;
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.summary-row strong,
.metric strong {
    display: block;
    color: var(--text);
    font-size: 28px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.metric {
    min-height: 96px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.metric strong {
    margin-top: 4px;
}

.quick-action {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcff;
    color: var(--text);
}

.quick-action:hover {
    color: var(--text);
    border-color: #cdd3ff;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.quick-action svg {
    width: 34px;
    height: 34px;
    padding: 8px;
    border-radius: 8px;
    color: var(--primary-strong);
    background: var(--primary-soft);
}

.quick-action span {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.quick-action strong {
    color: var(--text);
    font-size: 14px;
    line-height: 1.2;
}

.quick-action small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
}

.tasks-panel {
    display: grid;
    gap: 16px;
    padding: 0;
    overflow: hidden;
}

.task-toolbar {
    padding: 18px 18px 0;
}

.task-toolbar .muted {
    margin-top: 4px;
}

.dashboard-filter {
    justify-content: flex-end;
}

.dashboard-table-wrap {
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
    background: transparent;
}

.job-type {
    display: flex;
    align-items: center;
    gap: 10px;
}

.job-type-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #f0edff;
    color: var(--primary-strong);
}

.job-type-icon svg {
    width: 17px;
    height: 17px;
}

.job-type div {
    display: grid;
    gap: 2px;
}

.job-type strong {
    color: var(--text);
}

.job-type span {
    color: var(--muted);
    font-size: 12px;
}

.empty-table {
    padding: 28px 14px;
    color: var(--muted);
    text-align: center;
}

.button,
button.button {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 7px 13px;
    border: 1px solid var(--primary);
    border-radius: 8px;
    background: var(--primary);
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(109, 93, 252, .18);
    transition: color .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.button:hover,
button.button:hover {
    color: #ffffff;
    background: var(--primary-strong);
    border-color: var(--primary-strong);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(109, 93, 252, .24);
}

.button:active,
button.button:active,
.quick-action:active,
.nav a:active,
.nav button:active {
    transform: translateY(1px) scale(.99);
}

.button.secondary {
    background: #ffffff;
    color: var(--primary-strong);
    border-color: var(--line-strong);
    box-shadow: none;
}

.button.secondary:hover {
    background: var(--primary-soft);
    color: var(--primary-strong);
    border-color: #c8cfff;
}

.button.danger {
    background: var(--danger);
    border-color: var(--danger);
    box-shadow: 0 10px 22px rgba(217, 45, 32, .14);
}

.button.danger:hover {
    background: #b42318;
    border-color: #b42318;
}

.button:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
}

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

.settings-form {
    display: grid;
    gap: 18px;
}

.settings-compact .settings-form {
    gap: 14px;
}

.settings-group {
    display: grid;
    gap: 14px;
}

.settings-compact .settings-group {
    gap: 10px;
}

.settings-group + .settings-group {
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.settings-compact .settings-group + .settings-group {
    padding-top: 14px;
}

.settings-group h2 {
    margin: 0;
    font-size: 15px;
}

.settings-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.settings-heading-row form {
    margin: 0;
    flex: 0 0 auto;
}

.settings-help,
.field small {
    margin: -4px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.field small.status-good { color: var(--ok); }
.field small.status-warn { color: var(--warn); }

.settings-actions {
    padding-top: 2px;
}

.settings-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 18px 28px 14px;
    overflow-x: auto;
}

.settings-tabs a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: #4d5567;
    font-weight: 700;
    white-space: nowrap;
}

.settings-tabs a:hover {
    border-color: #dcdff0;
    background: #fbfcff;
    color: var(--text);
}

.settings-tabs a.active {
    border-color: #e2dcff;
    background: var(--primary-soft);
    color: var(--primary-strong);
}

.settings-tabs svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.model-kind-tabs {
    margin-top: 0;
}

.model-provider-panel {
    border-top: 3px solid var(--primary);
}

.settings-shared-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}

.model-admin-list {
    display: grid;
    gap: 10px;
    margin: 12px 28px 28px;
}

.model-admin-item {
    margin: 0;
}

.model-admin-item > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
}

.model-admin-item > summary::-webkit-details-marker {
    display: none;
}

.model-admin-item > summary span,
.model-admin-item > summary strong,
.model-admin-item > summary small {
    display: block;
}

.model-admin-item > summary small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.model-admin-item > summary em {
    color: var(--ok);
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.model-admin-item > .settings-form {
    padding: 4px 18px 18px;
    border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
    .model-admin-list {
        margin-left: 16px;
        margin-right: 16px;
    }
}

@media (max-width: 640px) {
    .model-admin-list {
        margin-left: 12px;
        margin-right: 12px;
    }

    .model-admin-item > summary {
        align-items: flex-start;
        flex-direction: column;
    }
}

.settings-advanced {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.settings-advanced summary {
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: #4d5567;
    font-weight: 700;
    cursor: pointer;
}

.settings-advanced .field {
    padding: 0 12px 12px;
}

.settings-advanced-grid {
    padding: 0 12px 12px;
}

.settings-advanced-grid .field {
    padding: 0;
}

.settings-advanced .small-textarea {
    min-height: 88px;
}

.checkbox-row {
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 9px;
    align-self: end;
    color: #303647;
    font-weight: 700;
    cursor: pointer;
}

.checkbox-row input {
    width: 16px;
    min-height: 16px;
    height: 16px;
    padding: 0;
    flex: 0 0 auto;
}

.user-create-panel summary {
    min-height: 42px;
}

.balance-panel {
    margin-top: 16px;
}

.compact-balance-panel {
    padding: 16px;
}

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

.balance-inline {
    min-width: 180px;
    display: grid;
    gap: 3px;
    padding: 6px 0;
    text-align: right;
}

.balance-inline span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.balance-inline strong {
    color: var(--text);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.1;
}

.balance-actions form {
    margin: 0;
}

.balance-metric {
    min-height: 78px;
    display: grid;
    align-content: center;
    gap: 7px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.balance-metric span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.balance-metric strong {
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.15;
    word-break: break-word;
}

.resource-package-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.resource-package-item {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.resource-package-item span {
    min-width: 0;
    overflow: hidden;
    color: #4d5567;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resource-package-item strong {
    color: var(--text);
    font-weight: 800;
    white-space: nowrap;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.section-heading h2 {
    margin: 0;
}

.field {
    display: grid;
    align-content: start;
    gap: 7px;
}

.field.full {
    grid-column: 1 / -1;
}

label {
    color: #303647;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 11px;
    color: var(--text);
    background: #ffffff;
    font: inherit;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

input:hover,
select:hover,
textarea:hover {
    border-color: var(--line-strong);
}

input:focus,
select:focus,
textarea:focus {
    border-color: #b9c0ff;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(109, 93, 252, .10);
}

input[type="checkbox"] {
    accent-color: var(--primary);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

.small-textarea {
    min-height: 120px;
}

.hint {
    color: var(--muted);
    font-size: 12px;
}

.compact-select {
    max-width: 180px;
}

.inline-check {
    width: 16px;
    min-height: 16px;
}

.login-gap,
.section-gap {
    height: 16px;
}

.preview-audio {
    width: 100%;
    display: none;
}

.media-control {
    width: 100%;
}

.creator-console,
.voice-console {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    min-height: calc(100vh - 132px);
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.creator-workspace,
.voice-workspace {
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(360px, 1fr) auto auto;
    background:
        radial-gradient(circle at 12% 0%, rgba(109, 93, 252, .06), transparent 32%),
        linear-gradient(180deg, #fbfcff, #ffffff 24%);
}

.creator-console-bar,
.voice-console-bar {
    min-height: 62px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 22px;
    border-bottom: 1px solid #edf0f6;
}

.creator-mode-select,
.voice-mode-select,
.creator-model-pill,
.voice-model-pill,
.voice-count-pill {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e2e6ef;
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    color: #343848;
    white-space: nowrap;
}

.creator-mode-select,
.voice-mode-select {
    min-width: 142px;
    justify-content: center;
    padding: 7px 12px;
    font-weight: 700;
}

.creator-mode-select svg,
.voice-mode-select svg,
.creator-writing-tip svg,
.voice-writing-tip svg,
.creator-model-pill svg,
.voice-model-pill svg,
.voice-count-pill svg {
    width: 16px;
    height: 16px;
}

.creator-writing-tip,
.voice-writing-tip {
    min-width: 0;
    flex: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #8a91a3;
    font-size: 13px;
}

.creator-writing-tip span,
.voice-writing-tip span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.creator-writing-tip svg,
.voice-writing-tip svg {
    color: #d8a713;
    flex: 0 0 auto;
}

.creator-model-pill,
.voice-model-pill,
.voice-count-pill {
    padding: 7px 12px;
}

.creator-model-pill span,
.voice-model-pill span {
    color: #8c93a1;
}

.creator-model-pill strong,
.voice-model-pill strong {
    color: var(--text);
}

.voice-model-pill em {
    padding: 1px 5px;
    border-radius: 5px;
    background: #35c68a;
    color: #ffffff;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
}

.voice-count-pill {
    background: linear-gradient(90deg, #fff7fd, #f6f4ff);
    color: #3f4251;
    font-variant-numeric: tabular-nums;
}

.voice-count-pill svg {
    color: var(--primary);
}

.creator-editor,
.voice-editor {
    width: 100%;
    min-height: 100%;
    padding: 28px 36px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text);
    font-size: 18px;
    line-height: 1.9;
    resize: none;
    box-shadow: none;
}

.creator-editor:hover,
.creator-editor:focus,
.voice-editor:hover,
.voice-editor:focus {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.creator-editor::placeholder,
.voice-editor::placeholder {
    color: #a9b0bd;
}

.creator-side-panel,
.voice-side-panel {
    display: grid;
    align-content: start;
    gap: 20px;
    padding: 22px 24px;
    border-left: 1px solid #edf0f6;
    background:
        radial-gradient(circle at 70% 0%, rgba(109, 93, 252, .08), transparent 28%),
        #fbfcff;
}

.creator-promo,
.voice-promo {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .90), rgba(255, 255, 255, .64)),
        linear-gradient(135deg, rgba(109, 93, 252, .16), rgba(196, 180, 255, .24));
    color: var(--text);
}

.creator-promo strong,
.voice-promo strong {
    font-size: 15px;
}

.creator-promo span,
.voice-promo span {
    color: #6d7280;
    font-size: 13px;
    line-height: 1.6;
}

.creator-submit {
    width: 100%;
}

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

.studio-page {
    display: grid;
    gap: 18px;
    padding-bottom: 28px;
}

.studio-stage {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(228, 226, 255, .82), rgba(255, 255, 255, .96) 112px),
        #ffffff;
    box-shadow: var(--shadow);
}

.studio-model-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.studio-model-name {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #272b3a;
    font-size: 20px;
    font-weight: 800;
}

.studio-model-name strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.studio-model-mark {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background:
        radial-gradient(circle at 32% 24%, #ffffff 0 18%, transparent 20%),
        conic-gradient(from 220deg, #4bd7ff, #7f5cff, #35d79b, #4bd7ff);
    box-shadow: 0 8px 18px rgba(109, 93, 252, .28);
}

.studio-black-button {
    min-height: 40px;
    padding: 8px 20px;
    border: 0;
    border-radius: 999px;
    background: #151622;
    color: #ffffff;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(21, 22, 34, .18);
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.studio-black-button:hover {
    background: #05060c;
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(21, 22, 34, .22);
}

.studio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.studio-tags span {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
    color: #5f6677;
    font-size: 13px;
    font-weight: 700;
}

.studio-preview-canvas {
    min-height: 390px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .18), transparent),
        linear-gradient(135deg, #eaf7ff 0%, #fff8ef 46%, #f4efff 100%);
    position: relative;
}

.studio-preview-canvas::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 25%, rgba(255, 255, 255, .58), transparent 18%),
        radial-gradient(circle at 82% 22%, rgba(255, 255, 255, .48), transparent 22%),
        radial-gradient(circle at 52% 82%, rgba(109, 93, 252, .10), transparent 28%);
}

.video-canvas {
    aspect-ratio: 16 / 9;
}

.image-canvas {
    aspect-ratio: 16 / 9;
}

.voice-canvas {
    min-height: 300px;
}

.studio-empty-state {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 9px;
    max-width: 420px;
    padding: 24px;
    color: #5b6274;
    text-align: center;
}

.studio-empty-state svg {
    width: 56px;
    height: 56px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .78);
    color: var(--primary);
    box-shadow: 0 14px 32px rgba(109, 93, 252, .14);
}

.studio-empty-state strong {
    color: #252938;
    font-size: 18px;
}

.studio-empty-state span {
    color: #747b8c;
}

.studio-composer {
    display: grid;
    gap: 10px;
    max-width: 980px;
    width: min(100%, 980px);
    justify-self: center;
}

.studio-tabs {
    display: flex;
    gap: 8px;
}

.studio-tabs span {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: #697083;
    font-size: 13px;
    font-weight: 700;
}

.studio-tabs .active {
    color: var(--primary-strong);
    background: var(--primary-soft);
    border-color: #dcd7ff;
}

.studio-input-shell {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(23, 27, 42, .08);
}

.studio-textarea {
    min-height: 92px;
    border: 0;
    border-radius: 10px;
    padding: 8px 10px;
    background: transparent;
    resize: vertical;
    box-shadow: none;
}

.studio-textarea:hover,
.studio-textarea:focus {
    border: 0;
    box-shadow: none;
}

.studio-upload-row,
.studio-control-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.studio-upload-tile {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px dashed #dce1ec;
    border-radius: 10px;
    background: #fbfcff;
    color: #697083;
    cursor: pointer;
}

.studio-upload-tile svg {
    width: 17px;
    height: 17px;
}

.studio-file-input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.studio-control-row select,
.studio-control-row input,
.studio-upload-row select,
.studio-upload-row input:not(.studio-file-input) {
    width: auto;
    max-width: min(260px, 100%);
}

.studio-control-chip,
.studio-check-chip,
.studio-range-chip {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcff;
    color: #4d5567;
    font-weight: 700;
}

.studio-control-chip svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.studio-range-chip input {
    width: 112px;
    min-height: 22px;
    padding: 0;
    border: 0;
    accent-color: var(--primary);
}

.studio-range-chip input:focus,
.studio-range-chip input:hover {
    border: 0;
    box-shadow: none;
}

.studio-send {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    margin-left: auto;
    border: 0;
    border-radius: 12px;
    background: #bcc1ff;
    color: #ffffff;
    cursor: pointer;
    transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}

.studio-send:hover {
    background: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(109, 93, 252, .22);
}

.studio-send svg {
    width: 18px;
    height: 18px;
}

.voice-sample-dock {
    display: grid;
    gap: 10px;
    padding: 18px 28px;
}

.voice-section-label {
    display: block;
    margin-bottom: 8px;
    color: #737989;
    font-size: 13px;
    font-weight: 700;
}

.voice-sample-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.voice-sample-chip {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid #e3e7f0;
    border-radius: 8px;
    background: #ffffff;
    color: #262a38;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(30, 35, 52, .04);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.voice-sample-chip:hover {
    border-color: #c8cfff;
    box-shadow: 0 12px 22px rgba(109, 93, 252, .10);
    transform: translateY(-1px);
}

.voice-sample-chip:active {
    transform: translateY(1px) scale(.99);
}

.voice-sample-chip span::before {
    content: "声";
    width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    margin-right: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffe6f4, #e8e5ff);
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
}

.voice-sample-chip small {
    color: #a2a8b6;
    font-size: 12px;
    font-weight: 600;
}

.voice-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 22px;
    border-top: 1px solid #edf0f6;
    background: rgba(255, 255, 255, .94);
}

.voice-preview-area {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.voice-preview-status {
    color: var(--muted);
    font-size: 13px;
}

.voice-action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.voice-control-section {
    min-width: 0;
}

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

.voice-mode-card {
    min-height: 70px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e3e7f0;
    border-radius: 9px;
    background: #ffffff;
}

.voice-mode-card svg {
    width: 18px;
    height: 18px;
    color: #697083;
    flex: 0 0 auto;
}

.voice-mode-card strong,
.voice-mode-card span {
    display: block;
}

.voice-mode-card strong {
    color: #252a38;
    font-size: 13px;
}

.voice-mode-card span {
    color: #8a91a3;
    font-size: 12px;
}

.voice-mode-card.active {
    border-color: #b9c0ff;
    background: #f7f6ff;
}

.voice-mode-card.active svg,
.voice-mode-card.active strong {
    color: var(--primary-strong);
}

.voice-mode-card.muted-card {
    opacity: .78;
}

.voice-persona-card {
    min-height: 70px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e4e8f0;
    border-radius: 10px;
    background: #ffffff;
}

.voice-avatar {
    position: relative;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background:
        radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .92), transparent 28%),
        linear-gradient(135deg, #ffe3ef, #dcd8ff 56%, #c9f4ff);
    color: var(--primary-strong);
    font-weight: 800;
}

.voice-avatar > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.voice-avatar-letter {
    position: relative;
    z-index: 1;
}

.voice-avatar.has-image {
    background: #ffffff;
    color: transparent;
}

.voice-avatar.has-image .voice-avatar-letter {
    visibility: hidden;
}

.voice-persona-meta {
    min-width: 0;
    flex: 1;
}

.voice-persona-meta strong,
.voice-persona-meta span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voice-persona-meta strong {
    color: var(--text);
}

.voice-persona-meta span {
    color: #8a91a3;
    font-size: 12px;
}

.voice-persona-card svg {
    width: 17px;
    height: 17px;
    color: #9097a8;
}

.voice-select {
    margin-top: 10px;
}

.range-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #333848;
}

.range-row strong {
    color: #333848;
    font-variant-numeric: tabular-nums;
}

.voice-range {
    min-height: 22px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    accent-color: var(--primary);
}

.voice-range:focus,
.voice-range:hover {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.range-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 3px;
    color: #9aa1af;
    font-size: 12px;
}

.voice-inline-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e4e8f0;
    border-radius: 10px;
    background: #ffffff;
}

.voice-inline-option span,
.voice-inline-option strong,
.voice-inline-option small {
    display: block;
}

.voice-inline-option strong {
    color: #252a38;
    font-size: 13px;
}

.voice-inline-option small {
    margin-top: 2px;
    color: #8a91a3;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
}

.studio-page {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(380px, .82fr);
    gap: 18px;
    align-items: stretch;
}

.studio-stage,
.studio-composer {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.studio-stage {
    min-height: 660px;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    overflow: hidden;
}

.studio-model-row {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 22px;
    border-bottom: 1px solid #eef1f6;
}

.studio-model-name {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.studio-model-mark {
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: conic-gradient(from 20deg, #6d5dfc, #11c5d8, #f2b64b, #6d5dfc);
    box-shadow: 0 8px 18px rgba(109, 93, 252, .18);
}

.studio-black-button {
    min-height: 38px;
    padding: 8px 16px;
    border: 0;
    border-radius: 999px;
    background: #171b2a;
    color: #ffffff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.studio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 22px;
    border-bottom: 1px solid #eef1f6;
}

.studio-tags span {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border: 1px solid #e4e8f0;
    border-radius: 999px;
    background: #fbfcff;
    color: #596175;
    font-size: 12px;
    font-weight: 700;
}

.studio-preview-canvas {
    display: grid;
    place-items: center;
    padding: 28px;
    background:
        radial-gradient(circle at 50% 24%, rgba(109, 93, 252, .08), transparent 34%),
        linear-gradient(180deg, #ffffff, #fafbff);
}

.studio-empty-state {
    width: min(540px, 100%);
    display: grid;
    gap: 10px;
    justify-items: center;
    text-align: center;
    color: var(--muted);
}

.studio-empty-state > svg {
    width: 56px;
    height: 56px;
    padding: 14px;
    border-radius: 18px;
    background: var(--primary-soft);
    color: var(--primary);
}

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

.studio-composer {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}

.studio-tabs {
    display: flex;
    gap: 18px;
    padding: 18px 22px 0;
    color: #7b8190;
    font-weight: 800;
}

.studio-tabs span {
    padding-bottom: 12px;
    border-bottom: 2px solid transparent;
}

.studio-tabs .active {
    color: var(--primary-strong);
    border-color: var(--primary-strong);
}

.studio-input-shell {
    display: grid;
    gap: 14px;
    padding: 18px 22px 22px;
}

.studio-textarea {
    min-height: 180px;
    resize: vertical;
}

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

.studio-material-card {
    min-width: 0;
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid #e4e8f0;
    border-radius: 12px;
    background: #fbfcff;
}

.studio-material-card .studio-upload-tile,
.studio-upload-tile.is-static {
    width: 100%;
    justify-content: center;
    border-style: solid;
    background: #ffffff;
}

.studio-upload-tile.is-static {
    cursor: default;
}

.studio-material-card select {
    width: 100%;
}

.studio-param-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    border: 1px solid #e4e8f0;
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(251, 252, 255, .94), rgba(255, 255, 255, .98)),
        #ffffff;
}

.studio-field {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.studio-field-wide {
    grid-column: span 2;
}

.studio-field > span {
    color: #687084;
    font-size: 12px;
    font-weight: 800;
}

.studio-field input,
.studio-field select {
    width: 100%;
    min-width: 0;
}

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

.studio-toggle-card {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border: 1px solid #e4e8f0;
    border-radius: 12px;
    background: #ffffff;
    color: #475067;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.studio-toggle-card:hover {
    border-color: #c8cfff;
    color: var(--primary-strong);
    background: var(--primary-soft);
}

.studio-toggle-card:active {
    transform: translateY(1px) scale(.99);
}

.studio-toggle-card input {
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
}

.studio-toggle-card svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.studio-submit-row {
    justify-content: flex-end;
}

.voice-library-box,
.voice-style-panel {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e4e8f0;
    border-radius: 12px;
    background: #fbfcff;
}

.voice-library-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, .75fr);
    gap: 10px;
    align-items: center;
}

.voice-library-top strong,
.voice-library-top span {
    display: block;
}

.voice-library-top span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.studio-persona-card {
    border-color: #dfe3ff;
    box-shadow: 0 10px 22px rgba(109, 93, 252, .07);
}

.voice-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 7px;
}

.voice-tag-list span {
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-size: 11px;
    font-weight: 800;
}

.voice-style-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.voice-style-chips button {
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid #e0e5f0;
    border-radius: 999px;
    background: #ffffff;
    color: #475067;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.voice-style-chips button:hover {
    border-color: #c8cfff;
    color: var(--primary-strong);
    background: var(--primary-soft);
}

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

.studio-range-chip,
.studio-check-chip {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #e4e8f0;
    border-radius: 999px;
    background: #ffffff;
}

.studio-range-chip {
    flex: 1 1 146px;
}

.studio-range-chip span,
.studio-check-chip span {
    white-space: nowrap;
    color: #475067;
    font-size: 12px;
    font-weight: 800;
}

.studio-range-chip input {
    min-height: 22px;
    padding: 0;
    border: 0;
    background: transparent;
    accent-color: var(--primary);
}

.studio-range-chip input:hover,
.studio-range-chip input:focus {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.studio-send {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: var(--primary);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(109, 93, 252, .20);
}

.studio-send svg {
    width: 18px;
    height: 18px;
}

.doubao-tts-page {
    grid-template-columns: minmax(0, 1.04fr) minmax(420px, .96fr);
    gap: 20px;
    align-items: stretch;
}

.doubao-live-pane,
.doubao-compose-pane {
    min-width: 0;
    border: 1px solid #e6eaf2;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(31, 38, 61, .06);
}

.doubao-live-pane {
    min-height: 650px;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    overflow: hidden;
}

.doubao-model-bar {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 22px;
    border-bottom: 1px solid #eef1f6;
}

.doubao-model-title {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.doubao-model-title strong,
.doubao-model-title span {
    display: block;
}

.doubao-model-title strong {
    color: #171b2a;
    font-size: 19px;
    font-weight: 800;
}

.doubao-model-title span {
    margin-top: 2px;
    color: #778095;
    font-size: 12px;
    font-weight: 700;
}

.doubao-model-mark {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border-radius: 9px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .85), transparent 42%),
        linear-gradient(135deg, #23c3ff, #5e72ff 56%, #8360ff);
    box-shadow: 0 12px 24px rgba(94, 114, 255, .22);
}

.doubao-status-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 13px 22px;
    border-bottom: 1px solid #eef1f6;
    background: #fbfcff;
}

.doubao-status-strip span,
.doubao-count-pill {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border: 1px solid #e3e8f3;
    border-radius: 7px;
    background: #ffffff;
    color: #596175;
    font-size: 12px;
    font-weight: 800;
}

.doubao-player-board {
    display: grid;
    place-items: center;
    padding: 34px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

.doubao-wave-card {
    width: min(520px, 100%);
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 30px 28px;
    text-align: center;
}

.doubao-wave-card strong {
    color: #171b2a;
    font-size: 19px;
}

.doubao-wave-card p {
    max-width: 38ch;
    margin: 0;
    color: #777f91;
}

.doubao-wave-ring {
    width: min(340px, 86vw);
    height: 118px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
    border: 1px solid #edf1f8;
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(246, 248, 252, .7), #ffffff),
        repeating-linear-gradient(90deg, transparent 0 23px, rgba(226, 231, 241, .56) 24px 25px);
}

.doubao-wave-ring span {
    width: 8px;
    border-radius: 99px;
    background: linear-gradient(180deg, #23c3ff, #6472ff);
    opacity: .86;
    transform-origin: center;
    animation: doubaoWave 1.35s ease-in-out infinite;
}

.doubao-wave-ring span:nth-child(1) { height: 32px; animation-delay: -.18s; }
.doubao-wave-ring span:nth-child(2) { height: 48px; animation-delay: -.32s; }
.doubao-wave-ring span:nth-child(3) { height: 74px; animation-delay: -.44s; }
.doubao-wave-ring span:nth-child(4) { height: 94px; animation-delay: -.28s; }
.doubao-wave-ring span:nth-child(5) { height: 64px; animation-delay: -.12s; }
.doubao-wave-ring span:nth-child(6) { height: 88px; animation-delay: -.36s; }
.doubao-wave-ring span:nth-child(7) { height: 58px; animation-delay: -.24s; }
.doubao-wave-ring span:nth-child(8) { height: 40px; animation-delay: -.4s; }
.doubao-wave-ring span:nth-child(9) { height: 26px; animation-delay: -.08s; }

@keyframes doubaoWave {
    0%, 100% {
        transform: scaleY(.66);
        opacity: .58;
    }
    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

.doubao-preview-audio {
    width: min(360px, 100%);
    display: none;
    margin-top: 8px;
}

.doubao-compose-pane {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    overflow: hidden;
}

.doubao-compose-head {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px 0;
}

.doubao-mode-tabs {
    display: inline-flex;
    gap: 18px;
    color: #7a8295;
    font-size: 14px;
    font-weight: 800;
}

.doubao-mode-tabs span {
    padding-bottom: 12px;
    border-bottom: 2px solid transparent;
}

.doubao-mode-tabs .active {
    color: #4857e8;
    border-color: #4857e8;
}

.doubao-text-box {
    display: grid;
    gap: 12px;
    padding: 12px 20px 16px;
}

.doubao-textarea {
    min-height: 210px;
    resize: vertical;
    padding: 16px;
    border: 1px solid #e4e9f3;
    border-radius: 10px;
    background: #fbfcff;
    color: #171b2a;
    font: inherit;
    font-size: 15px;
    line-height: 1.72;
}

.doubao-textarea:hover,
.doubao-textarea:focus {
    border-color: #cdd5ff;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(94, 114, 255, .08);
}

.doubao-sample-row,
.doubao-style-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.doubao-sample-row button,
.doubao-style-chips button,
.doubao-section-title button {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid #e0e6f1;
    border-radius: 7px;
    background: #ffffff;
    color: #4d566b;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, color .16s ease, background .16s ease;
}

.doubao-sample-row button:hover,
.doubao-style-chips button:hover,
.doubao-section-title button:hover {
    border-color: #cdd5ff;
    color: #4857e8;
    background: #f4f6ff;
    transform: translateY(-1px);
}

.doubao-section-title button svg {
    width: 14px;
    height: 14px;
}

.doubao-control-stack {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 0 20px 20px;
}

.doubao-section-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(170px, .86fr);
    gap: 10px;
    align-items: center;
}

.doubao-section-title.compact {
    grid-template-columns: minmax(0, 1fr) auto;
    margin-top: 2px;
}

.doubao-section-title > span {
    color: #242a3a;
    font-size: 14px;
    font-weight: 800;
}

.doubao-section-title input,
.doubao-style-input,
.doubao-voice-select {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #e3e8f3;
    border-radius: 8px;
    background: #ffffff;
    color: #171b2a;
    font: inherit;
}

.doubao-section-title input:hover,
.doubao-section-title input:focus,
.doubao-style-input:hover,
.doubao-style-input:focus,
.doubao-voice-select:hover,
.doubao-voice-select:focus {
    border-color: #cdd5ff;
    box-shadow: 0 0 0 4px rgba(94, 114, 255, .08);
}

.doubao-voice-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 13px;
    border: 1px solid #dfe5f2;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff, #fbfcff);
}

.doubao-avatar {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #eff2ff;
    color: #4857e8;
    font-weight: 900;
}

.doubao-empty-result {
    display: none;
    margin: -4px 0 0;
    color: #b54708;
    font-size: 12px;
}

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

.doubao-range,
.doubao-check {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid #e3e8f3;
    border-radius: 9px;
    background: #fbfcff;
}

.doubao-range span,
.doubao-check span {
    white-space: nowrap;
    color: #596175;
    font-size: 12px;
    font-weight: 800;
}

.doubao-range input {
    min-width: 0;
    flex: 1 1 auto;
    padding: 0;
    border: 0;
    background: transparent;
    accent-color: #5e72ff;
}

.doubao-range input:hover,
.doubao-range input:focus {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.doubao-check {
    grid-column: 1 / -1;
    justify-content: flex-start;
}

.doubao-action-row {
    display: grid;
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
    gap: 10px;
    margin-top: 2px;
}

.doubao-primary {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid #5868f2;
    border-radius: 9px;
    background: #5868f2;
    color: #ffffff;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}

.doubao-primary:hover {
    background: #4655df;
    border-color: #4655df;
    box-shadow: 0 12px 24px rgba(70, 85, 223, .18);
    transform: translateY(-1px);
}

.doubao-primary:active {
    transform: translateY(0);
}

.doubao-primary svg {
    width: 16px;
    height: 16px;
}

.doubao-primary.dark {
    border-color: #151928;
    background: #151928;
}

.doubao-primary.dark:hover {
    border-color: #060914;
    background: #060914;
}

.doubao-primary.ghost {
    border-color: #dde4f2;
    background: #ffffff;
    color: #343b52;
}

.doubao-primary.ghost:hover {
    border-color: #cdd5ff;
    background: #f4f6ff;
    color: #4857e8;
    box-shadow: none;
}

.volc-tts-page {
    display: grid;
    gap: 16px;
    padding-bottom: 28px;
}

.volc-tts-editor {
    min-height: 540px;
    display: grid;
    grid-template-rows: auto minmax(300px, 1fr) auto;
    padding: 28px 38px 24px;
    border-top: 1px solid #edf0f6;
    background: #ffffff;
}

.volc-tts-model-row {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
}

.volc-voice-pill {
    width: 100%;
    min-height: 38px;
    padding: 8px 42px 8px 18px;
    border: 1px solid #dfe4ef;
    border-radius: 9px;
    background: #ffffff;
    color: #242a3a;
    font: inherit;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 4px 14px rgba(28, 36, 56, .04);
}

.volc-voice-pill:hover,
.volc-voice-pill:focus {
    border-color: #cfd7ff;
    box-shadow: 0 0 0 4px rgba(103, 91, 255, .08);
}

.volc-tts-tip {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #818899;
    font-size: 13px;
}

.volc-tts-tip svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: #c4952b;
}

.volc-count {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 9px;
    border-radius: 6px;
    background: #f6f7fb;
    color: #858c9c;
    font-size: 12px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.volc-tts-textarea {
    width: 100%;
    min-height: 320px;
    resize: vertical;
    margin-top: 22px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #202637;
    font: inherit;
    font-size: 18px;
    line-height: 1.85;
}

.volc-tts-textarea::placeholder {
    color: #a7adbb;
}

.volc-tts-textarea:hover,
.volc-tts-textarea:focus {
    border: 0;
    box-shadow: none;
    background: transparent;
}

.volc-example-area {
    display: grid;
    gap: 10px;
    padding-top: 18px;
}

.volc-example-area > span {
    color: #5f6677;
    font-size: 14px;
    font-weight: 700;
}

.volc-example-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.volc-example-chips button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid #e5e9f2;
    border-radius: 9px;
    background: #ffffff;
    color: #343b52;
    font: inherit;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(28, 36, 56, .035);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease;
}

.volc-example-chips button:hover {
    border-color: #d4d9ff;
    color: #6654ee;
    box-shadow: 0 8px 18px rgba(83, 94, 180, .08);
    transform: translateY(-1px);
}

.volc-example-chips strong {
    font-size: 13px;
    font-weight: 800;
}

.volc-example-chips small {
    color: #939aab;
    font-size: 12px;
    font-weight: 700;
}

.volc-chip-avatar {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: #fde9e8;
    color: #a34646;
    font-size: 11px;
    font-weight: 900;
}

.volc-tts-controls {
    display: grid;
    grid-template-columns: minmax(250px, .9fr) minmax(260px, 1.05fr) minmax(300px, 1.15fr);
    gap: 14px;
}

.volc-control-card,
.volc-action-card {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 14px;
    border: 1px solid #e5e9f2;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(31, 38, 61, .04);
}

.volc-action-card {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.volc-control-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.volc-control-head > span {
    color: #252b3b;
    font-size: 14px;
    font-weight: 800;
}

.volc-control-head input,
.volc-style-input {
    width: 100%;
    min-height: 36px;
    padding: 8px 10px;
    border: 1px solid #e2e7f1;
    border-radius: 8px;
    background: #fbfcff;
    color: #202637;
    font: inherit;
}

.volc-control-head button {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border: 1px solid #e2e7f1;
    border-radius: 7px;
    background: #ffffff;
    color: #5a6377;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.volc-control-head button svg {
    width: 14px;
    height: 14px;
}

.volc-control-head input:focus,
.volc-style-input:focus {
    border-color: #cfd7ff;
    box-shadow: 0 0 0 4px rgba(103, 91, 255, .08);
}

.volc-active-voice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid #edf0f6;
    border-radius: 9px;
    background: #fbfcff;
}

.volc-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #efeaff;
    color: #6856ef;
    font-weight: 900;
}

.volc-empty-result {
    display: none;
    margin: -4px 0 0;
    color: #b54708;
    font-size: 12px;
}

.volc-style-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.volc-style-chips button {
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid #e2e7f1;
    border-radius: 7px;
    background: #ffffff;
    color: #4d566b;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.volc-style-chips button:hover,
.volc-control-head button:hover {
    border-color: #d4d9ff;
    color: #6654ee;
    background: #f7f8ff;
}

.volc-range-row {
    display: grid;
    gap: 10px;
}

.volc-range-row label {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.volc-range-row span,
.volc-check span {
    color: #596175;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.volc-range-row input {
    min-height: 22px;
    padding: 0;
    border: 0;
    background: transparent;
    accent-color: #675bff;
}

.volc-range-row input:hover,
.volc-range-row input:focus {
    border: 0;
    box-shadow: none;
}

.volc-check {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.volc-preview-box {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.volc-preview-box strong {
    color: #252b3b;
    font-size: 14px;
}

.volc-preview-box span {
    color: #7b8293;
    font-size: 12px;
}

.volc-preview-audio {
    width: min(420px, 100%);
    display: none;
    margin-top: 8px;
}

.volc-action-buttons {
    display: inline-flex;
    gap: 10px;
}

.volc-button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 16px;
    border: 1px solid #dfe5f2;
    border-radius: 9px;
    background: #ffffff;
    color: #3f4658;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}

.volc-button:hover {
    transform: translateY(-1px);
}

.volc-button svg {
    width: 16px;
    height: 16px;
}

.volc-button.primary {
    border-color: #151928;
    background: #151928;
    color: #ffffff;
}

.volc-button.primary:hover {
    border-color: #060914;
    background: #060914;
    box-shadow: 0 12px 22px rgba(21, 25, 40, .14);
}

.volc-button.ghost:hover {
    border-color: #d4d9ff;
    color: #6654ee;
    background: #f7f8ff;
}

body.vision-clone-body {
    min-height: 100dvh;
    overflow: hidden;
    background: #f6f7fb;
}

body.vision-clone-body .app-shell {
    min-height: 100dvh;
    display: block;
}

body.vision-clone-body .skip-link,
body.vision-clone-body .sidebar,
body.vision-clone-body .topbar,
body.vision-clone-body .main > .alert {
    display: none;
}

body.vision-clone-body .main {
    min-height: 100dvh;
    padding: 0;
}

body.vision-clone-body .main > .vision-page {
    margin: 0;
}

.vision-page {
    --vision-line: #e6e9f2;
    --vision-soft-line: #eef1f7;
    --vision-text: #202433;
    --vision-muted: #7a8292;
    --vision-purple: #6d5dfc;
    --vision-purple-soft: #f0edff;
    min-height: 100dvh;
    display: grid;
    grid-template-rows: 50px 58px auto minmax(0, 1fr) auto;
    overflow: hidden;
    background: #f6f7fb;
    color: var(--vision-text);
}

.vision-topbar,
.vision-model-strip,
.vision-composer-dock {
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(18px);
}

.vision-topbar {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 18px;
    border-bottom: 1px solid var(--vision-line);
}

.vision-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--vision-text);
    font-size: 18px;
    font-weight: 800;
    white-space: nowrap;
}

.vision-brand:hover {
    color: var(--vision-text);
}

.vision-brand-mark,
.vision-model-mark {
    position: relative;
    width: 25px;
    height: 25px;
    flex: 0 0 auto;
}

.vision-brand-mark::before,
.vision-brand-mark::after {
    content: "";
    position: absolute;
    bottom: 2px;
    border-radius: 3px 3px 6px 6px;
    transform: skewX(-13deg);
}

.vision-brand-mark::before {
    left: 2px;
    width: 10px;
    height: 19px;
    background: linear-gradient(180deg, #20c4ff, #3a69ff);
}

.vision-brand-mark::after {
    left: 11px;
    width: 12px;
    height: 25px;
    background: linear-gradient(180deg, #65f0ff, #7559ff 68%, #9658ff);
}

.vision-mode-tabs {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vision-mode-tabs a,
.vision-mode-tabs span {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 8px;
    color: #5b6372;
    font-weight: 700;
    white-space: nowrap;
}

.vision-mode-tabs a:hover {
    background: #f4f6fb;
    color: var(--vision-text);
}

.vision-mode-tabs .active {
    background: #edf2ff;
    color: #3168ff;
}

.vision-top-actions,
.vision-history-actions,
.vision-live-tags,
.vision-composer-top {
    display: flex;
    align-items: center;
}

.vision-top-actions {
    gap: 8px;
}

.vision-top-actions a {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border-radius: 8px;
    color: #4f5868;
    font-weight: 700;
    white-space: nowrap;
}

.vision-top-actions a:hover {
    background: #f4f6fb;
    color: var(--vision-text);
}

.vision-top-actions svg,
.vision-icon-button svg,
.vision-history-actions svg,
.vision-add-media svg,
.vision-send-button svg,
.vision-inline-alert svg {
    width: 17px;
    height: 17px;
}

.vision-icon-button {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #566070;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.vision-icon-button:hover {
    border-color: var(--vision-line);
    background: #f8f9fc;
    color: var(--vision-text);
}

.vision-model-strip {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--vision-line);
    background:
        linear-gradient(90deg, rgba(220, 224, 255, .88), rgba(255, 255, 255, .96) 36%, rgba(255, 255, 255, .96));
}

.vision-model-identity {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.vision-model-mark {
    border-radius: 9px;
    background:
        radial-gradient(circle at 32% 28%, #ffffff 0 18%, transparent 19%),
        conic-gradient(from 210deg, #19c7ff, #6d5dfc, #35cf95, #19c7ff);
    box-shadow: 0 8px 18px rgba(72, 88, 255, .25);
}

.vision-model-identity div {
    min-width: 0;
    display: grid;
    line-height: 1.2;
}

.vision-model-identity span {
    color: #7a8294;
    font-size: 11px;
    font-weight: 800;
}

.vision-model-identity strong {
    min-width: 0;
    overflow: hidden;
    color: #252a3a;
    font-size: 16px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vision-live-tags {
    min-width: 0;
    flex: 1;
    gap: 7px;
    overflow-x: auto;
}

.vision-live-tags span,
.vision-history-tags span {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border: 1px solid var(--vision-soft-line);
    border-radius: 6px;
    background: rgba(255, 255, 255, .76);
    color: #5e6677;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.vision-instant-button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 22px;
    border: 0;
    border-radius: 999px;
    background: #11131d;
    color: #ffffff;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(17, 19, 29, .18);
    transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}

.vision-instant-button:hover {
    background: #05060b;
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(17, 19, 29, .22);
}

.vision-inline-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 16px 0;
    padding: 10px 12px;
    border: 1px solid #ffd5cd;
    border-radius: 8px;
    background: #fff6f4;
    color: #9f2f21;
}

.vision-inline-alert div {
    display: grid;
    gap: 2px;
}

.vision-inline-alert strong,
.vision-inline-alert span {
    font-size: 13px;
}

.vision-inline-alert.ok {
    border-color: #c8f0dc;
    background: #f0fff7;
    color: #087443;
}

.vision-workbench {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.vision-feed {
    min-width: 0;
    overflow: auto;
    padding: 24px 28px 28px;
    scroll-behavior: smooth;
}

.vision-feed::after {
    content: "";
    display: block;
    height: 24px;
}

.vision-history-card {
    max-width: 840px;
    display: grid;
    gap: 12px;
    margin: 0 auto 26px;
    color: var(--vision-text);
}

.vision-history-media {
    min-height: 180px;
    overflow: hidden;
    border-radius: 4px;
    background: #050506;
    box-shadow: 0 18px 42px rgba(23, 27, 42, .08);
}

.vision-history-media video {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #050506;
}

.vision-media-placeholder {
    min-height: 260px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    padding: 28px;
    color: rgba(255, 255, 255, .78);
    text-align: center;
}

.vision-media-placeholder svg {
    width: 42px;
    height: 42px;
    color: rgba(255, 255, 255, .62);
}

.vision-media-placeholder strong {
    color: #ffffff;
    font-size: 17px;
}

.vision-media-placeholder span {
    max-width: 420px;
    color: rgba(255, 255, 255, .66);
    line-height: 1.7;
}

.vision-history-body {
    display: grid;
    gap: 9px;
}

.vision-history-time {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #6d7585;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.vision-history-body p {
    max-width: 720px;
    margin: 0;
    color: #202432;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.65;
    text-wrap: pretty;
}

.vision-history-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.vision-history-actions {
    gap: 8px;
    flex-wrap: wrap;
}

.vision-history-actions a,
.vision-reuse-button {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border: 1px solid var(--vision-soft-line);
    border-radius: 8px;
    background: #ffffff;
    color: #5b6373;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.vision-history-actions a:hover,
.vision-reuse-button:hover {
    border-color: #dce1ec;
    background: #f8f9fc;
    color: #202433;
    transform: translateY(-1px);
}

.vision-empty-feed {
    min-height: 100%;
    display: grid;
    place-items: center;
}

.vision-empty-screen {
    width: min(100%, 520px);
    min-height: 292px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    padding: 34px;
    border: 1px dashed #dfe4ef;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .52)),
        radial-gradient(circle at 26% 20%, rgba(109, 93, 252, .12), transparent 28%),
        radial-gradient(circle at 72% 64%, rgba(26, 198, 255, .12), transparent 32%);
    color: #6d7585;
    text-align: center;
}

.vision-empty-screen svg {
    width: 58px;
    height: 58px;
    padding: 13px;
    border-radius: 8px;
    background: #ffffff;
    color: var(--vision-purple);
    box-shadow: 0 16px 34px rgba(67, 79, 191, .13);
}

.vision-empty-screen strong {
    color: #252a3a;
    font-size: 18px;
}

.vision-empty-screen span {
    max-width: 360px;
    line-height: 1.7;
}

.vision-param-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 12;
    width: min(392px, calc(100vw - 24px));
    height: 100dvh;
    min-height: 0;
    overflow: auto;
    padding: 18px 18px 110px;
    border-left: 1px solid var(--vision-line);
    background:
        radial-gradient(circle at 80% 0%, rgba(109, 93, 252, .08), transparent 28%),
        #fbfcff;
    box-shadow: -22px 0 54px rgba(23, 27, 42, .18);
    transform: translateX(110%);
    transition: transform .22s ease, box-shadow .22s ease;
}

.vision-page.is-param-open .vision-param-panel {
    transform: translateX(0);
}

.vision-page::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 11;
    display: none;
    background: rgba(24, 29, 45, .22);
    backdrop-filter: blur(2px);
}

.vision-page.is-param-open::after {
    display: block;
}

.vision-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.vision-panel-head div {
    display: grid;
    gap: 2px;
}

.vision-panel-head strong {
    color: #222737;
    font-size: 18px;
    font-weight: 800;
}

.vision-panel-head span {
    color: #7b8393;
    font-size: 13px;
}

.vision-param-section {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid var(--vision-soft-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .78);
}

.vision-param-section summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #2a3041;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.vision-param-section summary::-webkit-details-marker {
    display: none;
}

.vision-param-section summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid #8a92a1;
    border-bottom: 2px solid #8a92a1;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .16s ease;
}

.vision-param-section[open] summary::after {
    transform: rotate(225deg) translate(-2px, -1px);
}

.vision-param-section > *:not(summary) {
    margin-top: 12px;
}

.vision-field,
.vision-param-group {
    display: grid;
    gap: 8px;
}

.vision-field > span,
.vision-param-group > span {
    color: #687184;
    font-size: 12px;
    font-weight: 800;
}

.vision-field input,
.vision-field select,
.vision-upload-stack select {
    min-height: 38px;
    border-color: #e2e7f0;
    background: #ffffff;
}

.vision-field.is-disabled,
.vision-segment-option.is-disabled,
.vision-duration-chip.is-disabled,
.vision-duration-chip:disabled,
.vision-switch-card.is-disabled {
    opacity: .46;
    cursor: not-allowed;
}

.vision-field.is-disabled input,
.vision-field.is-disabled select,
.vision-segment-option.is-disabled span,
.vision-duration-chip.is-disabled,
.vision-duration-chip:disabled,
.vision-switch-card.is-disabled {
    background: #f4f6fa;
    color: #8992a3;
}

.vision-segment-option.is-disabled span,
.vision-duration-chip.is-disabled,
.vision-duration-chip:disabled,
.vision-switch-card.is-disabled {
    pointer-events: none;
    box-shadow: none;
    transform: none;
}

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

.vision-upload-stack {
    display: grid;
    gap: 9px;
}

.vision-upload-card {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    border: 1px dashed #d7deea;
    border-radius: 8px;
    background: #ffffff;
    color: #4f586b;
    cursor: pointer;
}

.vision-upload-card:hover {
    border-color: #bfc8dc;
    background: #f8faff;
}

.vision-upload-card svg {
    width: 17px;
    height: 17px;
    color: var(--vision-purple);
}

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

.vision-segment-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vision-segment-option {
    min-width: 0;
    display: block;
}

.vision-segment-option input,
.vision-switch-card input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.vision-segment-option span,
.vision-duration-chip {
    min-height: 34px;
    display: grid;
    place-items: center;
    padding: 7px 8px;
    border: 1px solid #e3e7f1;
    border-radius: 8px;
    background: #ffffff;
    color: #545d6e;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.vision-segment-option input:checked + span,
.vision-duration-chip.active {
    border-color: #c6c0ff;
    background: var(--vision-purple-soft);
    color: var(--vision-purple);
    box-shadow: inset 0 0 0 1px rgba(109, 93, 252, .14);
}

.vision-segment-option span:hover,
.vision-duration-chip:hover {
    border-color: #ccd3e2;
    transform: translateY(-1px);
}

.vision-duration-chip:disabled:hover {
    border-color: #e3e7f1;
    transform: none;
}

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

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

.vision-switch-card {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border: 1px solid #e3e7f1;
    border-radius: 8px;
    background: #ffffff;
    color: #566073;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.vision-switch-card svg {
    width: 16px;
    height: 16px;
    color: #7c8494;
}

.vision-switch-card:has(input:checked) {
    border-color: #c6c0ff;
    background: var(--vision-purple-soft);
    color: var(--vision-purple);
}

.vision-switch-card.is-checked {
    border-color: #c6c0ff;
    background: var(--vision-purple-soft);
    color: var(--vision-purple);
}

.vision-switch-card:has(input:checked) svg,
.vision-switch-card.is-checked svg {
    color: var(--vision-purple);
}

@media (min-width: 1181px) {
    .vision-panel-head [data-close-vision-params] {
        display: inline-grid;
    }
}

.vision-composer-dock {
    border-top: 1px solid rgba(224, 229, 239, .82);
    padding: 10px 18px 16px;
}

.vision-composer {
    width: min(100%, 820px);
    display: grid;
    gap: 8px;
    margin: 0 auto;
    padding: 12px;
    border: 1px solid #dde3ef;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 46px rgba(24, 31, 56, .12);
}

.vision-composer-top {
    gap: 8px;
}

.vision-add-media {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid #edf0f6;
    border-radius: 8px;
    background: #f8f9fc;
    color: #6c7485;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.vision-add-media.secondary {
    background: #ffffff;
}

.vision-add-media:hover {
    border-color: #dce2ee;
    color: #303648;
}

.vision-count {
    margin-left: auto;
    color: #9aa1af;
    font-size: 12px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.vision-prompt-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 10px;
    align-items: end;
}

.vision-prompt-row textarea {
    min-height: 54px;
    max-height: 180px;
    padding: 8px 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #222636;
    font-size: 15px;
    line-height: 1.65;
    resize: none;
    box-shadow: none;
}

.vision-prompt-row textarea:hover,
.vision-prompt-row textarea:focus {
    border: 0;
    box-shadow: none;
}

.vision-prompt-row textarea::placeholder {
    color: #a6adba;
}

.vision-send-button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 12px;
    background: #c7c7ff;
    color: #ffffff;
    cursor: pointer;
    transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}

.vision-send-button:hover {
    background: var(--vision-purple);
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(109, 93, 252, .25);
}

.vision-page.is-submitting .vision-send-button,
.vision-page.is-submitting .vision-instant-button {
    pointer-events: none;
    opacity: .72;
}

.vision-page.is-submitting .vision-send-button svg {
    animation: visionSendPulse .72s ease infinite alternate;
}

@keyframes visionSendPulse {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-3px);
    }
}

body.volc-clone-body {
    overflow: hidden;
    background: #f6f8fc;
}

body.volc-clone-body .app-shell {
    min-height: 100vh;
    display: block;
}

body.volc-clone-body .skip-link,
body.volc-clone-body .sidebar,
body.volc-clone-body .topbar,
body.volc-clone-body .main > .alert {
    display: none;
}

body.volc-clone-body .main {
    height: 100vh;
    overflow: hidden;
}

body.volc-clone-body .main > .volc-console-shell {
    margin: 0;
}

.volc-console-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    grid-template-rows: 48px minmax(0, 1fr);
    background: #ffffff;
    color: #1f2430;
    font-family: "PingFang SC", "Microsoft YaHei", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.volc-console-top {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    height: 48px;
    border-bottom: 1px solid #edf0f5;
    background: #ffffff;
}

.volc-brand-clone {
    width: 200px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-left: 16px;
    color: #222735;
    font-size: 17px;
    font-weight: 800;
}

.volc-brand-mark {
    width: 22px;
    height: 25px;
    display: inline-block;
    position: relative;
    flex: 0 0 auto;
}

.volc-brand-mark::before,
.volc-brand-mark::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 12px;
    height: 24px;
    border-radius: 4px 4px 2px 2px;
    transform-origin: bottom center;
}

.volc-brand-mark::before {
    left: 2px;
    background: linear-gradient(180deg, #3c86ff, #0878ff);
    transform: skewX(-18deg);
}

.volc-brand-mark::after {
    right: 1px;
    height: 19px;
    background: linear-gradient(180deg, #43d3ff, #16a7ff);
    transform: skewX(18deg);
}

.volc-overview-pill {
    height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 14px;
    border-radius: 4px;
    background: #edf3ff;
    color: #2f69dc;
    font-size: 14px;
    font-weight: 700;
}

.volc-overview-pill svg,
.volc-project-switch svg,
.volc-menu-button svg {
    width: 17px;
    height: 17px;
}

.volc-project-switch {
    min-width: 0;
    height: 48px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 48px;
    color: #2d3342;
    font-size: 14px;
    font-weight: 600;
}

.volc-project-switch svg {
    color: #4d5567;
}

.volc-menu-button {
    width: 48px;
    height: 48px;
    display: inline-grid;
    place-items: center;
    margin-left: auto;
    border: 0;
    border-left: 1px solid #edf0f5;
    background: #ffffff;
    color: #202637;
    cursor: pointer;
}

.volc-speech-sidebar {
    grid-column: 1;
    grid-row: 2;
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 12px;
    padding: 18px 12px 14px;
    border-right: 1px solid #edf0f5;
    background: #f7f9fd;
}

.volc-product-title {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 10px;
    color: #272d3b;
    font-size: 16px;
    font-weight: 800;
}

.volc-product-title svg {
    width: 17px;
    height: 17px;
    color: #5a6171;
}

.volc-version-select {
    width: 100%;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid #e7ebf2;
    border-radius: 6px;
    background: #ffffff;
    color: #2d3342;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.volc-version-select svg {
    width: 15px;
    height: 15px;
    color: #8a91a2;
}

.volc-side-nav {
    min-height: 0;
    overflow: auto;
    display: grid;
    align-content: start;
    gap: 3px;
}

.volc-side-nav small {
    margin: 9px 10px 4px;
    color: #8a91a2;
    font-size: 12px;
    font-weight: 600;
}

.volc-nav-item {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #333a4d;
    font-size: 14px;
    font-weight: 650;
}

.volc-nav-item svg {
    width: 17px;
    height: 17px;
    color: #5c6476;
}

.volc-nav-item.active {
    background: #eee8ff;
    color: #7659ff;
}

.volc-nav-item.active svg {
    color: #7659ff;
}

.volc-buy-button {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #e6e9f1;
    border-radius: 8px;
    background:
        repeating-linear-gradient(135deg, rgba(132, 140, 160, .05) 0 6px, transparent 6px 12px),
        #ffffff;
    color: #2f3545;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.volc-buy-button svg {
    width: 16px;
    height: 16px;
    color: #735cff;
}

.volc-speech-main {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    background: #ffffff;
}

.volc-main-title {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 38px;
    border-bottom: 1px solid #edf0f5;
    color: #202637;
    font-size: 20px;
    font-weight: 800;
}

.volc-synthesis-panel {
    min-height: 505px;
    display: grid;
    grid-template-rows: auto minmax(270px, 1fr) auto;
    padding: 38px 38px 24px;
    background: #ffffff;
}

.volc-editor-topline {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
}

.volc-default-select {
    width: 180px;
    min-height: 38px;
    padding: 8px 38px 8px 16px;
    border: 1px solid #dfe4ef;
    border-radius: 8px;
    background: #ffffff;
    color: #252b3b;
    font: inherit;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 4px 12px rgba(28, 36, 56, .035);
}

.volc-default-select:hover,
.volc-default-select:focus {
    border-color: #cfd7ff;
    box-shadow: 0 0 0 4px rgba(103, 91, 255, .08);
}

.volc-editor-tip {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8a91a3;
    font-size: 14px;
    line-height: 1.5;
}

.volc-editor-tip svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: #c99a35;
}

.volc-text-count {
    color: #9aa1af;
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.volc-main-textarea {
    width: 100%;
    min-height: 300px;
    resize: vertical;
    margin-top: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #232938;
    font: inherit;
    font-size: 18px;
    line-height: 1.85;
}

.volc-main-textarea::placeholder {
    color: #a8aebb;
}

.volc-main-textarea:hover,
.volc-main-textarea:focus {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.volc-examples {
    display: grid;
    gap: 10px;
}

.volc-example-label {
    color: #555d70;
    font-size: 14px;
    font-weight: 700;
}

.volc-example-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
}

.volc-example-list button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid #e5e9f1;
    border-radius: 8px;
    background: #ffffff;
    color: #2f3648;
    font: inherit;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(28, 36, 56, .035);
    transition: transform .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.volc-example-list button:hover {
    border-color: #d3d8ff;
    color: #6b55f2;
    box-shadow: 0 8px 20px rgba(104, 85, 242, .08);
    transform: translateY(-1px);
}

.volc-example-list strong {
    font-size: 14px;
    font-weight: 800;
}

.volc-example-list small {
    color: #9aa1af;
    font-size: 12px;
    font-weight: 700;
}

.volc-face {
    width: 23px;
    height: 23px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: #fde8e6;
    color: #a24642;
    font-size: 11px;
    font-weight: 900;
}

.volc-settings-drawer {
    display: grid;
    grid-template-columns: minmax(260px, .95fr) minmax(260px, 1.1fr) minmax(300px, 1.15fr);
    gap: 14px;
    padding: 0 38px 32px;
}

.volc-setting-block,
.volc-generate-dock {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 14px;
    border: 1px solid #e6eaf2;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(31, 38, 61, .035);
}

.volc-setting-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.volc-setting-heading > span {
    color: #252b3b;
    font-size: 14px;
    font-weight: 800;
}

.volc-setting-heading input,
.volc-style-field {
    width: 100%;
    min-height: 36px;
    padding: 8px 10px;
    border: 1px solid #e2e7f0;
    border-radius: 6px;
    background: #fbfcff;
    color: #222838;
    font: inherit;
}

.volc-setting-heading input:focus,
.volc-style-field:focus {
    border-color: #cfd7ff;
    box-shadow: 0 0 0 4px rgba(103, 91, 255, .08);
}

.volc-setting-heading button {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border: 1px solid #e2e7f0;
    border-radius: 6px;
    background: #ffffff;
    color: #596175;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.volc-setting-heading button svg {
    width: 14px;
    height: 14px;
}

.volc-current-voice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid #eef1f6;
    border-radius: 8px;
    background: #fbfcff;
}

.volc-current-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eee9ff;
    color: #6d55f2;
    font-weight: 900;
}

.volc-empty-result {
    display: none;
    margin: -4px 0 0;
    color: #b54708;
    font-size: 12px;
}

.volc-style-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.volc-style-list button {
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid #e2e7f0;
    border-radius: 6px;
    background: #ffffff;
    color: #4d566b;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.volc-style-list button:hover,
.volc-setting-heading button:hover {
    border-color: #d3d8ff;
    color: #6b55f2;
    background: #f7f8ff;
}

.volc-param-block {
    gap: 10px;
}

.volc-param-block label {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 28px;
}

.volc-param-block span {
    color: #5d6577;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.volc-param-block input[type="range"] {
    min-height: 22px;
    padding: 0;
    border: 0;
    background: transparent;
    accent-color: #6d55f2;
}

.volc-param-block input[type="range"]:hover,
.volc-param-block input[type="range"]:focus {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.volc-strip-check {
    grid-template-columns: auto minmax(0, 1fr) !important;
    justify-content: start;
}

.volc-generate-dock {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.volc-preview-status {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.volc-preview-status strong {
    color: #252b3b;
    font-size: 14px;
}

.volc-preview-status span {
    color: #7b8293;
    font-size: 12px;
}

.volc-preview-audio {
    width: min(420px, 100%);
    display: none;
    margin-top: 8px;
}

.volc-dock-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volc-secondary-button,
.volc-generate-button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 8px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.volc-secondary-button {
    border: 1px solid #dfe5f2;
    background: #ffffff;
    color: #3f4658;
}

.volc-generate-button {
    border: 1px solid #151928;
    background: #151928;
    color: #ffffff;
}

.volc-secondary-button svg,
.volc-generate-button svg {
    width: 16px;
    height: 16px;
}

.volc-secondary-button:hover {
    border-color: #d3d8ff;
    color: #6b55f2;
    background: #f7f8ff;
}

.volc-generate-button:hover {
    border-color: #05070d;
    background: #05070d;
}

.tts-workbench-page {
    min-height: calc(100vh - 116px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    overflow: hidden;
    border: 1px solid #edf0f6;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(30, 36, 58, .06);
}

.tts-editor-pane {
    position: relative;
    min-width: 0;
    min-height: 720px;
    display: grid;
    grid-template-rows: auto minmax(360px, 1fr) auto;
    padding: 38px 32px 96px;
    border-right: 1px solid #edf0f6;
    background: #ffffff;
}

.tts-editor-toolbar {
    display: grid;
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.tts-command-input,
.tts-command-context,
.tts-voice-search,
.tts-language-row {
    min-height: 42px;
    border: 1px solid #e3e8f2;
    border-radius: 8px;
    background: #ffffff;
    color: #242b3b;
    font: inherit;
    box-shadow: 0 4px 14px rgba(31, 38, 61, .025);
}

.tts-command-tabs {
    min-height: 42px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border: 1px solid #e3e8f2;
    border-radius: 8px;
    background: #f7f8fc;
    box-shadow: 0 4px 14px rgba(31, 38, 61, .025);
}

.tts-command-tab {
    min-width: 0;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #5b6375;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.tts-command-tab.active {
    background: #ffffff;
    color: #674fff;
    box-shadow: 0 5px 12px rgba(31, 38, 61, .08);
}

.tts-command-tab svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}

.tts-command-panels {
    min-width: 0;
}

.tts-command-panel {
    min-height: 42px;
    display: flex;
    align-items: center;
}

.tts-command-panel[hidden] {
    display: none;
}

.tts-command-panel > span {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #e3e8f2;
    border-radius: 8px;
    background: #fbfcff;
    color: #7a8293;
    font-size: 13px;
    font-weight: 700;
}

.tts-command-panel.context {
    align-items: stretch;
}

.tts-mode-card svg,
.tts-current-voice svg,
.tts-language-row svg,
.tts-submit-button svg,
.tts-preview-gradient svg,
.tts-submit-gradient svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.tts-command-input,
.tts-command-context,
.tts-voice-search {
    width: 100%;
    padding: 8px 12px;
}

.tts-command-context {
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    resize: none;
    overflow: auto;
    line-height: 1.4;
}

.tts-command-input:focus,
.tts-command-context:focus,
.tts-voice-search:focus {
    border-color: #cfd7ff;
    box-shadow: 0 0 0 4px rgba(103, 91, 255, .08);
}

.tts-main-textarea {
    width: 100%;
    min-height: 420px;
    resize: vertical;
    margin-top: 22px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #202637;
    font: inherit;
    font-size: 18px;
    line-height: 1.85;
}

.tts-main-textarea::placeholder {
    color: #abb2c1;
}

.tts-main-textarea:hover,
.tts-main-textarea:focus {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.tts-hidden-main-text {
    display: none;
}

.tts-dialogue-editor {
    min-height: 420px;
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.tts-dialogue-editor[hidden] {
    display: none;
}

.tts-dialogue-rounds,
.tts-dialogue-round {
    display: grid;
    gap: 24px;
}

.tts-dialogue-line {
    display: grid;
    gap: 10px;
}

.tts-dialogue-speaker {
    width: fit-content;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border: 1px solid #e5e9f2;
    border-radius: 8px;
    background: #ffffff;
    color: #252d3e;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(31, 38, 61, .025);
}

.tts-dialogue-speaker:hover {
    border-color: #cfd7ff;
    color: #674fff;
}

.tts-dialogue-avatar {
    width: 22px;
    height: 22px;
    font-size: 11px;
}

.tts-dialogue-textarea {
    width: 100%;
    min-height: 92px;
    resize: vertical;
    padding: 0;
    border: 0;
    background: transparent;
    color: #202637;
    font: inherit;
    font-size: 18px;
    line-height: 1.75;
    outline: none;
}

.tts-dialogue-textarea::placeholder {
    color: #abb2c1;
}

.tts-add-dialogue-round {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
    border: 0;
    background: transparent;
    color: #202637;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.tts-add-dialogue-round::before,
.tts-add-dialogue-round::after {
    content: "";
    height: 1px;
    background: #eef1f7;
}

.tts-add-dialogue-round span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tts-add-dialogue-round svg {
    width: 15px;
    height: 15px;
}

.tts-dialogue-second-title {
    margin-top: 18px;
}

.tts-dialogue-language-picker {
    margin-top: 10px;
}

.tts-dialogue-config-row {
    cursor: default;
}

.tts-bottom-bar {
    position: absolute;
    left: 32px;
    bottom: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tts-preview-gradient,
.tts-submit-gradient {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(90deg, #126bff 0%, #6a4dff 58%, #7b36ff 100%);
    color: #ffffff;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(85, 76, 255, .22);
    transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.tts-preview-gradient:hover,
.tts-submit-gradient:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(85, 76, 255, .28);
}

.tts-preview-gradient:disabled,
.tts-submit-gradient:disabled {
    cursor: wait;
    opacity: .72;
    transform: none;
}

.tts-preview-gradient strong {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    font-size: 12px;
    font-weight: 900;
}

.tts-count {
    color: #8b93a3;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.tts-audio-dock {
    position: absolute;
    left: 32px;
    right: 32px;
    bottom: 82px;
    display: none;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #edf0f6;
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 12px 32px rgba(31, 38, 61, .08);
}

.tts-audio-dock.show {
    display: flex;
}

.tts-audio-dock span {
    flex: 0 0 auto;
    color: #6d7587;
    font-size: 12px;
    font-weight: 800;
}

.tts-preview-audio {
    width: min(430px, 100%);
    display: none;
}

.tts-workbench-page.player-open {
    margin-bottom: 120px;
}

.tts-player-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    min-height: 118px;
    display: grid;
    grid-template-columns: minmax(260px, 420px) minmax(420px, 1fr) minmax(120px, 170px);
    align-items: center;
    gap: 22px;
    padding: 14px 28px 18px;
    border-top: 1px solid #e7ebf3;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 -18px 42px rgba(31, 38, 61, .08);
    backdrop-filter: blur(14px);
}

.tts-player-dock[hidden] {
    display: none;
}

.tts-player-summary {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.tts-player-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .7), transparent 42%),
        linear-gradient(135deg, #ffd2c7 0%, #b89bff 56%, #6f88ff 100%);
    color: #ffffff;
    font-weight: 900;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .55);
}

.tts-player-summary span:last-child {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.tts-player-summary strong {
    overflow: hidden;
    color: #252b3b;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tts-player-summary small {
    overflow: hidden;
    color: #8b93a3;
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tts-player-main {
    min-width: 0;
    display: grid;
    gap: 9px;
    justify-items: center;
}

.tts-player-controls {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
}

.tts-player-toggle,
.tts-player-skip,
.tts-player-icon {
    display: inline-grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: #222838;
    cursor: pointer;
}

.tts-player-toggle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #6637f5;
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(102, 55, 245, .26);
}

.tts-player-toggle svg {
    width: 23px;
    height: 23px;
}

.tts-player-skip {
    position: relative;
    width: 30px;
    height: 30px;
    color: #343b4d;
}

.tts-player-skip svg {
    width: 28px;
    height: 28px;
}

.tts-player-skip span {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #343b4d;
    font-size: 11px;
    font-weight: 900;
}

.tts-player-progress {
    width: min(720px, 100%);
    display: grid;
    grid-template-columns: 52px minmax(160px, 1fr) 52px;
    gap: 10px;
    align-items: center;
}

.tts-player-progress span {
    color: #8c94a4;
    font-size: 14px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.tts-player-progress span:first-child {
    text-align: right;
}

.tts-player-progress input[type="range"] {
    width: 100%;
    height: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    accent-color: #6637f5;
}

.tts-player-progress input[type="range"]:hover,
.tts-player-progress input[type="range"]:focus {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.tts-player-note {
    color: #b0b7c5;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.tts-player-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
}

.tts-player-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #151928;
}

.tts-player-icon:hover {
    background: #f4f6fb;
    color: #6637f5;
}

.tts-player-icon svg {
    width: 19px;
    height: 19px;
}

.tts-side-panel {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 18px;
    padding: 28px 24px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.tts-promo-card {
    display: grid;
    gap: 8px;
    padding: 17px 18px;
    border-radius: 8px;
    background:
        radial-gradient(circle at 90% 20%, rgba(126, 103, 255, .2), transparent 42%),
        linear-gradient(135deg, #ffffff 0%, #f3f0ff 100%);
    color: #31384c;
}

.tts-promo-card strong {
    font-size: 15px;
    font-weight: 900;
}

.tts-promo-card span {
    color: #6b7284;
    font-size: 13px;
    line-height: 1.65;
}

.tts-side-section {
    display: grid;
    gap: 10px;
}

.tts-side-section[hidden],
.tts-language-picker[hidden] {
    display: none;
}

.tts-section-title {
    color: #4c5365;
    font-size: 14px;
    font-weight: 800;
}

.tts-mode-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.tts-mode-card {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e5e9f2;
    border-radius: 8px;
    background: #ffffff;
    color: #303749;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.tts-mode-card.active {
    border-color: #b9aaff;
    background: #fbfaff;
    color: #674fff;
    box-shadow: 0 0 0 3px rgba(103, 79, 255, .05);
}

.tts-mode-card span {
    display: grid;
    gap: 2px;
}

.tts-mode-card strong {
    font-size: 14px;
    font-weight: 900;
}

.tts-mode-card small {
    color: #7a8293;
    font-size: 12px;
    font-weight: 700;
}

.tts-current-voice {
    width: 100%;
    min-height: 76px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid #e6ebf4;
    border-radius: 8px;
    background: #ffffff;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(31, 38, 61, .035);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.tts-current-voice:hover {
    border-color: #d4d9ff;
    box-shadow: 0 10px 22px rgba(87, 73, 255, .08);
    transform: translateY(-1px);
}

.tts-current-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .72), transparent 40%),
        linear-gradient(135deg, #ffd2c7 0%, #b89bff 56%, #6f88ff 100%);
    color: #ffffff;
    font-weight: 900;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .5);
}

.tts-current-meta {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.tts-current-meta strong {
    overflow: hidden;
    color: #202637;
    font-size: 16px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tts-current-meta small {
    overflow: hidden;
    color: #777f91;
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tts-current-voice > svg {
    color: #7d8495;
}

.tts-hidden-select {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.tts-empty-result {
    display: none;
    margin: -2px 0 0;
    color: #b54708;
    font-size: 12px;
}

.tts-modal-open {
    overflow: hidden;
}

.tts-voice-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 28px;
    background: rgba(19, 24, 38, .36);
    backdrop-filter: blur(7px);
}

.tts-voice-modal[hidden] {
    display: none;
}

.tts-voice-dialog {
    width: min(1180px, calc(100vw - 40px));
    height: min(820px, calc(100dvh - 42px));
    max-height: min(820px, calc(100dvh - 42px));
    display: grid;
    grid-template-rows: auto auto auto minmax(260px, 1fr) auto auto;
    gap: 0;
    padding: 30px 36px 0;
    overflow: hidden;
    border: 1px solid rgba(225, 230, 241, .95);
    border-radius: 18px;
    background: linear-gradient(180deg, #fbfcff 0%, #ffffff 16%);
    box-shadow: 0 34px 88px rgba(18, 25, 43, .24);
}

.tts-voice-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 26px;
}

.tts-voice-modal-head h2 {
    margin: 0;
    color: #111827;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0;
}

.tts-voice-modal-close {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #303747;
    cursor: pointer;
}

.tts-voice-modal-close:hover {
    background: #f3f5fb;
    color: #674fff;
}

.tts-voice-modal-close svg {
    width: 24px;
    height: 24px;
}

.tts-voice-modal-tabs {
    min-height: 44px;
    display: flex;
    align-items: flex-end;
    gap: 36px;
    border-bottom: 1px solid #e6eaf2;
}

.tts-voice-modal-tabs button {
    position: relative;
    min-height: 44px;
    padding: 0 0 14px;
    border: 0;
    background: transparent;
    color: #4f5668;
    font: inherit;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
}

.tts-voice-modal-tabs button.active {
    color: #674fff;
}

.tts-voice-modal-tabs button.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    border-radius: 999px 999px 0 0;
    background: #674fff;
}

.tts-voice-modal-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 20px 0 18px;
}

.tts-voice-modal-search > span {
    min-width: 0;
    min-height: 48px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 0 16px;
    border: 1px solid #e4e9f2;
    border-radius: 10px;
    background: #ffffff;
    color: #8a92a4;
    box-shadow: 0 5px 16px rgba(31, 38, 61, .03);
}

.tts-voice-modal-search svg {
    width: 19px;
    height: 19px;
}

.tts-voice-modal-search .tts-voice-search {
    min-height: 46px;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.tts-voice-modal-search .tts-voice-search:focus {
    border: 0;
    box-shadow: none;
}

.tts-voice-filter-button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    border: 1px solid #e4e9f2;
    border-radius: 10px;
    background: #ffffff;
    color: #3c4354;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 5px 16px rgba(31, 38, 61, .04);
}

.tts-voice-filter-button:hover {
    border-color: #d4d9ff;
    color: #674fff;
}

.tts-voice-filter-button.active {
    border-color: #c9bdff;
    color: #674fff;
    box-shadow: 0 0 0 3px rgba(103, 79, 255, .08), 0 5px 16px rgba(31, 38, 61, .04);
}

.tts-voice-filter-wrap {
    position: relative;
}

.tts-voice-filter-wrap[hidden] {
    display: none;
}

.tts-voice-filter-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 8;
    width: min(560px, calc(100vw - 48px));
    max-height: min(620px, calc(100vh - 220px));
    overflow: auto;
    padding: 18px;
    border: 1px solid #e7ebf3;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(31, 38, 61, .16);
}

.tts-voice-filter-panel[hidden] {
    display: none;
}

.tts-voice-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 0 14px;
    border-bottom: 1px solid #edf0f8;
}

.tts-voice-filter-head strong {
    color: #111827;
    font-size: 16px;
    font-weight: 900;
}

.tts-voice-filter-head button {
    border: 0;
    background: transparent;
    color: #674fff;
    font: inherit;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.tts-voice-filter-section {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 0 0;
}

.tts-voice-filter-section b {
    flex: 0 0 100%;
    color: #747c90;
    font-size: 13px;
    font-weight: 900;
}

.tts-voice-filter-section label {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border: 1px solid #e5e9f2;
    border-radius: 8px;
    background: #ffffff;
    color: #394154;
    font-size: 14px;
    font-weight: 850;
    cursor: pointer;
    user-select: none;
}

.tts-voice-filter-section label:has(input:checked) {
    border-color: #c9bdff;
    background: #f7f4ff;
    color: #674fff;
}

.tts-voice-filter-section input {
    width: 14px;
    height: 14px;
    accent-color: #674fff;
}

@media (max-width: 720px) {
    .tts-voice-filter-wrap {
        width: 100%;
    }

    .tts-voice-filter-button {
        width: 100%;
    }

    .tts-voice-filter-panel {
        left: 0;
        right: auto;
        width: min(100%, calc(100vw - 48px));
        max-height: min(560px, calc(100vh - 180px));
    }
}

.tts-voice-list {
    min-height: 0;
    display: grid;
    align-content: start;
    gap: 2px;
    overflow: auto;
    padding: 16px 0 18px;
}

.tts-voice-row {
    min-height: 88px;
    display: grid;
    grid-template-columns: auto minmax(240px, 1fr) minmax(260px, auto) auto;
    gap: 18px;
    align-items: center;
    padding: 14px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
}

.tts-voice-row:hover,
.tts-voice-row:focus {
    border-color: #edf0f8;
    background: #fbfcff;
    outline: 0;
}

.tts-voice-row.selected {
    border-color: #c9bdff;
    background: #fbfaff;
    box-shadow: 0 0 0 3px rgba(103, 79, 255, .05);
}

.tts-voice-row[hidden] {
    display: none;
}

.tts-voice-row-avatar {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 26% 24%, rgba(255, 255, 255, .88), transparent 30%),
        linear-gradient(135deg, #ffd0c6 0%, #b591ff 54%, #698aff 100%);
    color: #ffffff;
    font-weight: 900;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .55);
}

.tts-voice-row-play {
    position: absolute;
    right: -3px;
    bottom: -3px;
    z-index: 2;
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: #6a6f8c;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(32, 38, 55, .18);
}

.tts-voice-row-play:hover {
    background: #674fff;
}

.tts-voice-row-play svg {
    width: 12px;
    height: 12px;
}

.tts-voice-row-main {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.tts-voice-row-main strong {
    overflow: hidden;
    color: #111827;
    font-size: 18px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tts-voice-row-main small {
    overflow: hidden;
    color: #a1a8b8;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tts-voice-row-tags {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.tts-language-badge {
    position: relative;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border: 1px solid #e5e9f2;
    border-radius: 8px;
    background: #ffffff;
    color: #41495c;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.tts-language-badge b {
    display: inline-block;
    font-weight: 900;
    letter-spacing: -2px;
}

.tts-language-badge:focus {
    outline: 0;
    border-color: #c9bdff;
    box-shadow: 0 0 0 3px rgba(103, 79, 255, .08);
}

.tts-language-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 3;
    min-width: 142px;
    display: none;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #e7ebf3;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 18px 44px rgba(31, 38, 61, .16);
}

.tts-language-badge:hover .tts-language-popover,
.tts-language-badge:focus .tts-language-popover {
    display: grid;
}

.tts-language-popover em {
    display: block;
    color: #232938;
    font-style: normal;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
}

.tts-voice-row-tags > em {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border: 1px solid #e5e9f2;
    border-radius: 8px;
    background: #ffffff;
    color: #566074;
    font-style: normal;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.tts-voice-row-more {
    width: 30px;
    display: inline-grid;
    place-items: center;
    color: #171d2b;
}

.tts-voice-row-more svg {
    width: 22px;
    height: 22px;
}

.tts-voice-modal .tts-empty-result {
    margin: 0;
    padding: 20px 0 32px;
    text-align: center;
}

.tts-voice-modal-foot {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 -36px;
    padding: 14px 36px 18px;
    border-top: 1px solid #edf0f6;
    background: rgba(255, 255, 255, .96);
}

.tts-voice-modal-foot > span {
    color: #50586a;
    font-size: 16px;
    font-weight: 800;
}

.tts-voice-modal-foot > div {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.tts-voice-cancel,
.tts-voice-confirm {
    min-width: 88px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.tts-voice-cancel {
    border: 1px solid #e5e9f2;
    background: #ffffff;
    color: #535b6e;
}

.tts-voice-cancel:hover {
    border-color: #d4d9ff;
    color: #674fff;
}

.tts-voice-confirm {
    border: 1px solid #b996ff;
    background: #b996ff;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(153, 111, 255, .22);
}

.tts-voice-confirm:disabled {
    cursor: not-allowed;
    opacity: .58;
    box-shadow: none;
}

.tts-param-section {
    gap: 18px;
}

.tts-language-picker {
    position: relative;
    z-index: 6;
}

.tts-language-row {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 8px 12px;
    text-align: left;
    color: #4d5568;
    font-weight: 800;
    cursor: pointer;
}

.tts-language-picker.open .tts-language-row {
    border-color: #674fff;
    box-shadow: 0 0 0 2px rgba(103, 79, 255, .16), 0 8px 18px rgba(31, 38, 61, .06);
}

.tts-language-row span {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tts-language-row strong,
.tts-language-row em {
    display: inline-block;
    font-style: normal;
    white-space: nowrap;
}

.tts-language-row strong {
    letter-spacing: -2px;
}

.tts-language-row svg {
    color: #768094;
}

.tts-language-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: min(454px, calc(100vw - 32px));
    min-height: 210px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid #e2e7f1;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(37, 43, 59, .12);
    overflow: hidden;
}

.tts-language-menu[hidden] {
    display: none;
}

.tts-language-menu-column {
    display: grid;
    align-content: start;
    gap: 6px;
    padding: 10px 12px;
}

.tts-language-menu-column + .tts-language-menu-column {
    border-left: 1px solid #e8edf5;
}

.tts-language-option {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #252b3b;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.tts-language-option:hover,
.tts-language-option:focus {
    background: #f6f7fb;
    outline: 0;
}

.tts-language-option[aria-selected="true"] {
    background: #f3f4ff;
    color: #563dff;
}

.tts-language-option svg {
    width: 16px;
    height: 16px;
    color: #788195;
}

.tts-slider-row {
    display: grid;
    gap: 8px;
}

.tts-slider-head,
.tts-slider-scale {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tts-slider-head strong {
    color: #555d70;
    font-size: 14px;
    font-weight: 800;
}

.tts-slider-head em {
    color: #232938;
    font-style: normal;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.tts-slider-row input[type="range"] {
    width: 100%;
    min-height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    accent-color: #674fff;
}

.tts-slider-row input[type="range"]:hover,
.tts-slider-row input[type="range"]:focus {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.tts-slider-scale small {
    color: #8890a1;
    font-size: 12px;
    font-weight: 800;
}

.tts-submit-panel {
    display: grid;
    gap: 12px;
    padding-top: 2px;
}

.tts-submit-panel div {
    display: grid;
    gap: 3px;
}

.tts-submit-panel strong {
    overflow: hidden;
    color: #202637;
    font-size: 14px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tts-submit-panel span {
    color: #7b8394;
    font-size: 12px;
    line-height: 1.5;
}

.tts-submit-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #151928;
    border-radius: 8px;
    background: #151928;
    color: #ffffff;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.tts-submit-button:hover {
    background: #060914;
    box-shadow: 0 12px 22px rgba(21, 25, 40, .16);
    transform: translateY(-1px);
}

.studio-preview-canvas.has-results {
    min-height: 560px;
    display: block;
    padding: 16px;
    overflow: auto;
    aspect-ratio: auto;
}

.studio-result-board {
    position: relative;
    z-index: 1;
    width: 100%;
    display: grid;
    gap: 14px;
}

.studio-result-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 2px 0;
}

.studio-result-toolbar strong,
.studio-result-toolbar span {
    display: block;
}

.studio-result-toolbar strong {
    color: #242938;
    font-size: 16px;
}

.studio-result-toolbar span {
    margin-top: 2px;
    color: #7a8192;
    font-size: 12px;
    font-weight: 700;
}

.studio-refresh-link {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid rgba(209, 215, 229, .9);
    border-radius: 999px;
    background: rgba(255, 255, 255, .82);
    color: #4f5970;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.studio-refresh-link:hover {
    color: var(--primary-strong);
    border-color: #c8cfff;
    background: #ffffff;
}

.studio-refresh-link svg {
    width: 14px;
    height: 14px;
}

.studio-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
    gap: 14px;
    align-content: start;
}

.studio-result-card {
    min-width: 0;
    display: grid;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(225, 230, 242, .94);
    border-radius: 14px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 16px 34px rgba(47, 55, 78, .08);
}

.studio-result-media {
    min-height: 150px;
    aspect-ratio: 16 / 9;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(109, 93, 252, .08), rgba(17, 197, 216, .08)),
        #eef2f8;
}

.studio-result-media img,
.studio-result-media video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.studio-result-placeholder {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 18px;
    color: #747b8c;
    text-align: center;
}

.studio-result-placeholder svg {
    width: 38px;
    height: 38px;
    padding: 9px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .82);
    color: var(--primary);
}

.studio-result-placeholder strong {
    color: #303647;
    font-size: 14px;
}

.studio-result-placeholder span {
    max-width: 210px;
    color: #747b8c;
    font-size: 12px;
    line-height: 1.5;
}

.studio-result-meta {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.studio-result-meta > div {
    min-width: 0;
}

.studio-result-meta strong,
.studio-result-meta span:not(.badge) {
    display: block;
}

.studio-result-meta strong {
    color: #242938;
    font-size: 13px;
}

.studio-result-meta span:not(.badge) {
    overflow: hidden;
    color: #7b8293;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.studio-result-actions .button {
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
}

.studio-result-actions .button svg {
    width: 14px;
    height: 14px;
}

.voice-preview {
    width: 100%;
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfcff;
}

.voice-preview.compact {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
}

.voice-preview-head {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.voice-preview-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary);
    flex: 0 0 auto;
}

.voice-preview-icon svg {
    width: 17px;
    height: 17px;
}

.voice-preview-info {
    min-width: 0;
}

.voice-preview-info strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voice-preview-text {
    margin-top: 2px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.voice-preview.compact .voice-preview-icon {
    width: 28px;
    height: 28px;
}

.voice-preview.compact audio {
    display: none;
}

.audio-preview-button {
    min-height: 32px;
    padding: 6px 10px;
}

.audio-preview-button.is-playing {
    background: var(--primary-soft);
    color: var(--primary-strong);
    border-color: #c8cfff;
}

.detail-action-gap {
    height: 10px;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.panel .table-wrap {
    box-shadow: none;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 13px 14px;
    border-bottom: 1px solid #eef1f6;
    text-align: left;
    vertical-align: top;
}

th {
    background: #fbfcff;
    color: #667085;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

td {
    color: #303647;
    font-variant-numeric: tabular-nums;
}

tr:last-child td {
    border-bottom: 0;
}

tbody tr:hover {
    background: #fbfcff;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    padding: 3px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: #eff2f7;
    color: #4d5567;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
}

.badge.pending,
.badge.running,
.badge.polling {
    background: var(--warn-soft);
    color: var(--warn);
    border-color: #f6d59d;
}

.badge.succeeded {
    background: var(--ok-soft);
    color: var(--ok);
    border-color: #bdebd1;
}

.badge.partial {
    border-color: #f5d99b;
    background: #fff8e8;
    color: #a46305;
}

.badge.failed,
.badge.cancelled {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: #ffd1cc;
}

.alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.alert.ok {
    border-color: #bdebd1;
    color: var(--ok);
    background: var(--ok-soft);
}

.alert.error {
    border-color: #ffd1cc;
    color: var(--danger);
    background: var(--danger-soft);
}

.asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.asset-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    display: grid;
    gap: 10px;
    box-shadow: var(--shadow-sm);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.asset-card:hover {
    border-color: #c8cfff;
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.asset-preview {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    background: #eef1f7;
    display: grid;
    place-items: center;
    overflow: hidden;
}

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

.asset-preview audio {
    width: 94%;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.json-block {
    white-space: pre-wrap;
    word-break: break-word;
    background: #fbfcff;
    color: #303647;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px;
    max-height: 360px;
    overflow: auto;
}

.pagination {
    margin-top: 16px;
    margin-bottom: 28px;
}

.pagination nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-box {
    width: min(430px, 100%);
    position: relative;
    padding: 26px;
    overflow: hidden;
}

.login-box::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, #18a8ff, var(--primary), #a86dff);
}

.login-box h1 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-box h1::before {
    content: "";
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #18a8ff, #5d6bff 58%, #8d5bff);
}

@media (max-width: 1100px) {
    .dashboard-band,
    .creator-console,
    .voice-console,
    .studio-page,
    .volc-tts-controls {
        grid-template-columns: 1fr;
    }

    .volc-action-card {
        grid-template-columns: 1fr;
    }

    .dashboard-actions-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .creator-side-panel,
    .voice-side-panel {
        border-left: 0;
        border-top: 1px solid #edf0f6;
    }
}

@media (max-width: 900px) {
    body.volc-clone-body {
        overflow: auto;
    }

    body.volc-clone-body .main {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .volc-console-shell {
        min-height: 100vh;
        grid-template-columns: 1fr;
        grid-template-rows: 48px auto;
    }

    .volc-console-top {
        grid-column: 1;
    }

    .volc-brand-clone {
        width: auto;
        min-width: 154px;
    }

    .volc-project-switch {
        margin-left: 12px;
    }

    .volc-speech-sidebar {
        display: none;
    }

    .volc-speech-main {
        grid-column: 1;
        grid-row: 2;
        overflow: visible;
    }

    .volc-editor-topline,
    .volc-settings-drawer,
    .volc-generate-dock {
        grid-template-columns: 1fr;
    }

    .volc-default-select {
        width: min(260px, 100%);
    }

    .app-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
    }

    .sidebar {
        position: static;
        min-height: 52px;
        height: auto;
        flex-direction: row;
        align-items: center;
        gap: 18px;
        overflow: auto;
        padding: 8px 18px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .brand {
        width: auto;
        margin-bottom: 0;
        flex: 0 0 auto;
    }

    .nav {
        width: auto;
        flex-direction: row;
        align-items: center;
        gap: 4px;
        overflow-x: auto;
    }

    .nav-section {
        margin: 0 6px;
    }

    .nav a,
    .nav button {
        width: auto;
        min-height: 34px;
        padding: 7px 10px;
        flex: 0 0 auto;
    }

    .nav form {
        margin: 0;
    }

    .grid.cols-3,
    .grid.cols-2,
    .form-grid,
    .balance-grid,
    .resource-package-grid {
        grid-template-columns: 1fr;
    }

    .settings-heading-row {
        align-items: stretch;
        flex-direction: column;
    }

    .settings-heading-row .button {
        width: 100%;
        justify-content: center;
    }

    .settings-tabs {
        margin-left: 20px;
        margin-right: 20px;
    }

    .balance-inline {
        min-width: 0;
        text-align: left;
    }

    .topbar {
        align-items: stretch;
        flex-direction: column;
        padding: 16px 20px;
    }

    .topbar-actions {
        align-items: stretch;
        justify-content: flex-start;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .topbar-actions form,
    .topbar-link,
    .topbar-logout button {
        width: 100%;
    }

    .topbar-user {
        justify-content: center;
        width: 100%;
    }

    .main > .alert,
    .main > .dashboard-band,
    .main > .grid,
    .main > .panel,
    .main > .table-wrap,
    .main > .asset-grid,
    .main > .pagination,
    .main > .section-gap,
    .main > .voice-console,
    .main > .creator-console,
    .main > .studio-page,
    .main > .volc-tts-page {
        margin-left: 20px;
        margin-right: 20px;
    }

    .creator-console,
    .voice-console {
        min-height: auto;
    }

    .creator-console-bar,
    .voice-console-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .creator-writing-tip span,
    .voice-writing-tip span {
        white-space: normal;
    }

    .voice-action-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .voice-action-buttons {
        width: 100%;
    }

    .voice-action-buttons .button {
        flex: 1 1 auto;
    }

    .volc-tts-editor {
        padding: 24px;
    }

    .volc-tts-model-row {
        grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
    }

    .volc-count {
        justify-self: start;
    }

    .studio-stage {
        min-height: 460px;
    }

    .doubao-live-pane {
        min-height: 520px;
    }

    .voice-library-top {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .volc-console-top {
        gap: 8px;
    }

    .volc-brand-clone {
        min-width: 130px;
        padding-left: 12px;
        font-size: 15px;
    }

    .volc-overview-pill,
    .volc-project-switch {
        display: none;
    }

    .volc-main-title {
        height: 56px;
        padding: 0 18px;
        font-size: 19px;
    }

    .volc-synthesis-panel {
        min-height: 520px;
        padding: 24px 18px 20px;
    }

    .volc-main-textarea {
        min-height: 275px;
        font-size: 16px;
    }

    .volc-settings-drawer {
        padding: 0 18px 24px;
    }

    .volc-dock-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .volc-secondary-button,
    .volc-generate-button {
        width: 100%;
    }

    body {
        font-size: 13px;
    }

    .panel {
        padding: 16px;
    }

    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .section-heading .actions,
    .section-heading .actions select,
    .section-heading .actions .button {
        width: 100%;
    }

    .nav {
        grid-template-columns: 1fr;
    }

    .topbar h1 {
        font-size: 21px;
    }

    .overview-panel h2 {
        font-size: 21px;
    }

    .overview-panel {
        gap: 14px;
        min-height: auto;
    }

    .dashboard-status-heading {
        gap: 12px;
    }

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

    .status-tile {
        min-height: 64px;
        padding: 9px 8px;
    }

    .status-tile span {
        font-size: 11px;
    }

    .status-tile strong {
        font-size: 24px;
    }

    .dashboard-actions-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-actions-panel .section-heading {
        align-items: baseline;
        flex-direction: row;
    }

    .dashboard-actions-panel .quick-action {
        justify-content: center;
        gap: 8px;
        padding: 9px 8px;
    }

    .dashboard-actions-panel .quick-action small {
        display: none;
    }

    .dashboard-actions-panel .quick-action strong {
        font-size: 13px;
    }

    .creator-editor,
    .voice-editor,
    .studio-preview-canvas {
        min-height: 340px;
    }

    .studio-preview-canvas.has-results {
        padding: 10px;
    }

    .studio-result-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .studio-refresh-link {
        width: fit-content;
    }

    .studio-result-grid {
        grid-template-columns: 1fr;
    }

    .studio-material-row,
    .studio-param-panel,
    .studio-toggle-grid {
        grid-template-columns: 1fr;
    }

    .studio-field-wide {
        grid-column: auto;
    }

    .creator-editor,
    .voice-editor {
        padding: 20px;
        font-size: 16px;
    }

    .voice-sample-dock,
    .voice-action-bar,
    .creator-side-panel,
    .voice-side-panel {
        padding: 16px;
    }

    .creator-model-pill,
    .voice-model-pill,
    .voice-count-pill,
    .creator-mode-select,
    .voice-mode-select {
        width: 100%;
        justify-content: center;
    }

    .studio-model-row,
    .studio-control-row {
        align-items: stretch;
        flex-direction: column;
    }

    .studio-black-button,
    .studio-control-row .button,
    .studio-send {
        width: 100%;
    }

    .creator-mini-grid,
    .voice-mode-grid {
        grid-template-columns: 1fr;
    }

    .voice-action-buttons {
        flex-direction: column;
    }

    .studio-stage {
        padding: 12px;
    }

    .studio-model-row,
    .studio-upload-row,
    .studio-control-row {
        align-items: stretch;
        flex-direction: column;
    }

    .studio-control-row select,
    .studio-control-row input,
    .studio-upload-row select,
    .studio-upload-row input:not(.studio-file-input),
    .studio-control-chip,
    .studio-check-chip,
    .studio-range-chip,
    .studio-black-button {
        width: 100%;
        max-width: 100%;
    }

    .studio-send {
        width: 100%;
    }

    .volc-tts-editor {
        min-height: 520px;
        padding: 18px;
    }

    .volc-tts-model-row,
    .volc-control-head,
    .volc-action-card {
        grid-template-columns: 1fr;
    }

    .volc-voice-pill {
        text-align: left;
    }

    .volc-tts-tip {
        align-items: flex-start;
    }

    .volc-tts-textarea {
        min-height: 270px;
        font-size: 16px;
    }

    .volc-action-buttons {
        display: grid;
        grid-template-columns: 1fr;
    }

    .volc-button {
        width: 100%;
    }

    .doubao-live-pane,
    .doubao-compose-pane {
        border-radius: 10px;
    }

    .doubao-model-bar,
    .doubao-compose-head,
    .doubao-section-title,
    .doubao-action-row {
        align-items: stretch;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .doubao-model-bar,
    .doubao-compose-head {
        padding: 14px 14px 0;
    }

    .doubao-status-strip,
    .doubao-text-box,
    .doubao-control-stack {
        padding-left: 14px;
        padding-right: 14px;
    }

    .doubao-player-board {
        padding: 24px 14px;
    }

    .doubao-wave-card {
        padding: 18px 8px;
    }

    .doubao-wave-ring {
        gap: 6px;
        height: 104px;
    }

    .doubao-param-grid {
        grid-template-columns: 1fr;
    }

    .doubao-check {
        grid-column: auto;
    }

    .doubao-primary {
        width: 100%;
    }

    .quick-action {
        min-height: 56px;
    }

    .actions .button,
    .actions button.button {
        flex: 1 1 auto;
    }
}

@media (max-width: 1180px) {
    .tts-workbench-page {
        grid-template-columns: 1fr;
    }

    .tts-editor-pane {
        min-height: 620px;
        border-right: 0;
        border-bottom: 1px solid #edf0f6;
    }

    .tts-side-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .tts-promo-card,
    .tts-submit-panel {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .main > .tts-workbench-page {
        margin-left: 12px;
        margin-right: 12px;
    }

    .tts-editor-pane {
        min-height: 560px;
        padding: 18px 16px 96px;
    }

    .tts-editor-toolbar,
    .tts-side-panel,
    .tts-mode-grid {
        grid-template-columns: 1fr;
    }

    .tts-main-textarea {
        min-height: 320px;
        font-size: 16px;
    }

    .tts-bottom-bar {
        left: 16px;
        right: 16px;
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .tts-preview-gradient,
    .tts-submit-gradient,
    .tts-submit-button {
        width: 100%;
    }

    .tts-audio-dock {
        left: 16px;
        right: 16px;
        align-items: stretch;
        flex-direction: column;
    }

    .tts-side-panel {
        padding: 18px 16px;
    }
}

@media (max-width: 1180px) {
    .vision-workbench {
        grid-template-columns: 1fr;
    }

    .vision-param-panel {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 12;
        width: min(392px, calc(100vw - 24px));
        height: 100dvh;
        transform: translateX(110%);
        transition: transform .22s ease, box-shadow .22s ease;
        box-shadow: -22px 0 54px rgba(23, 27, 42, .18);
    }

    .vision-page.is-param-open .vision-param-panel {
        transform: translateX(0);
    }

    .vision-page::after {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 11;
        display: none;
        background: rgba(24, 29, 45, .22);
        backdrop-filter: blur(2px);
    }

    .vision-page.is-param-open::after {
        display: block;
    }
}

@media (max-width: 720px) {
    .vision-page {
        grid-template-rows: 48px 58px auto minmax(0, 1fr) auto;
    }

    .vision-topbar {
        gap: 10px;
        padding: 0 12px;
    }

    .vision-brand {
        font-size: 16px;
    }

    .vision-mode-tabs {
        justify-content: flex-end;
        gap: 4px;
    }

    .vision-mode-tabs a {
        display: none;
    }

    .vision-mode-tabs span {
        min-height: 30px;
        padding: 5px 9px;
    }

    .vision-top-actions a span {
        display: none;
    }

    .vision-top-actions a {
        width: 34px;
        justify-content: center;
        padding: 6px;
    }

    .vision-model-strip {
        gap: 10px;
        padding: 8px 12px;
    }

    .vision-model-identity {
        max-width: 190px;
    }

    .vision-live-tags {
        display: none;
    }

    .vision-instant-button {
        min-height: 38px;
        margin-left: auto;
        padding: 8px 15px;
    }

    .vision-feed {
        padding: 18px 16px 20px;
    }

    .vision-history-card {
        gap: 10px;
        margin-bottom: 24px;
    }

    .vision-history-media {
        min-height: 160px;
    }

    .vision-media-placeholder {
        min-height: 220px;
    }

    .vision-history-body p {
        font-size: 15px;
    }

    .vision-param-panel {
        width: min(390px, calc(100vw - 18px));
        padding: 16px 14px 112px;
    }

    .vision-field-grid,
    .vision-switch-grid {
        grid-template-columns: 1fr;
    }

    .vision-segment-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vision-composer-dock {
        padding: 8px 10px 12px;
    }

    .vision-composer {
        border-radius: 16px;
        padding: 10px;
    }

    .vision-composer-top {
        flex-wrap: wrap;
    }

    .vision-count {
        width: 100%;
        margin-left: 0;
    }

    .vision-prompt-row {
        grid-template-columns: minmax(0, 1fr) 42px;
        gap: 8px;
    }

    .vision-prompt-row textarea {
        font-size: 14px;
    }
}

@media (max-width: 980px) {
    .tts-voice-dialog {
        width: min(760px, calc(100vw - 28px));
        padding: 24px 22px 0;
    }

    .tts-voice-row {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .tts-voice-row-tags {
        display: none;
    }

    .tts-voice-modal-foot {
        margin-left: -22px;
        margin-right: -22px;
        padding-left: 22px;
        padding-right: 22px;
    }

    .tts-player-dock {
        grid-template-columns: 1fr;
        gap: 12px;
        min-height: 188px;
        padding: 14px 16px 16px;
    }

    .tts-workbench-page.player-open {
        margin-bottom: 192px;
    }

    .tts-player-actions {
        position: absolute;
        top: 12px;
        right: 12px;
    }

    .tts-player-summary {
        padding-right: 90px;
    }
}

@media (max-width: 560px) {
    .tts-voice-modal {
        padding: 0;
    }

    .tts-voice-dialog {
        width: 100vw;
        max-height: 100dvh;
        height: 100dvh;
        border-radius: 0;
        border: 0;
        padding: 20px 16px 0;
    }

    .tts-voice-modal-head {
        padding-bottom: 18px;
    }

    .tts-voice-modal-head h2 {
        font-size: 21px;
    }

    .tts-voice-modal-tabs {
        gap: 24px;
        overflow-x: auto;
    }

    .tts-voice-modal-tabs button {
        flex: 0 0 auto;
        font-size: 15px;
    }

    .tts-voice-modal-search {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .tts-voice-row {
        min-height: 82px;
        grid-template-columns: auto minmax(0, 1fr) 24px;
        gap: 12px;
        padding: 12px 8px;
    }

    .tts-voice-row-main strong {
        font-size: 16px;
    }

    .tts-voice-row-main small {
        font-size: 13px;
    }

    .tts-voice-modal-foot {
        min-height: 72px;
        margin-left: -16px;
        margin-right: -16px;
        padding: 12px 16px 16px;
    }

    .tts-player-dock {
        min-height: 218px;
    }

    .tts-workbench-page.player-open {
        margin-bottom: 222px;
    }

    .tts-player-controls {
        gap: 16px;
    }

    .tts-player-progress {
        grid-template-columns: 42px minmax(0, 1fr) 42px;
    }

    .tts-player-note {
        font-size: 12px;
    }
}

body.volc-image-body {
    background: #ffffff;
}

body.volc-image-body .app-shell {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
}

body.volc-image-body .main {
    height: 100vh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
}

body.volc-image-body .topbar,
body.volc-image-body .main > .alert {
    flex: 0 0 auto;
}

body.volc-image-body .topbar {
    position: relative;
    z-index: 32;
    background: #ffffff;
}

body.volc-image-body .main > .volc-image-page {
    flex: 1 1 auto;
    margin: 0;
}

.volc-image-page {
    position: relative;
    min-height: 0;
    display: grid;
    grid-template-rows: 52px minmax(0, 1fr) auto;
    overflow: hidden;
    background: #ffffff;
    color: #242938;
    font-family: "PingFang SC", "Microsoft YaHei", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.volc-image-topbar {
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    min-height: 52px;
    padding: 0 18px 0 20px;
    border-bottom: 1px solid #edf0f5;
    background: #ffffff;
}

.volc-image-model-trigger,
.volc-image-actions,
.volc-image-actions a {
    display: inline-flex;
    align-items: center;
}

.volc-image-model-picker {
    position: relative;
    min-width: 0;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-self: start;
}

.volc-image-model-trigger {
    max-width: min(520px, 44vw);
    min-height: 40px;
    gap: 10px;
    padding: 6px 10px 6px 11px;
    border: 0;
    border-radius: 8px;
    background: #f1f3fb;
    color: #252a38;
    font: inherit;
    cursor: pointer;
    box-shadow: none;
}

.volc-image-model-trigger strong {
    min-width: 0;
    overflow: hidden;
    color: #101420;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.1;
    text-decoration: underline dotted currentColor 2px;
    text-underline-offset: 5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.volc-image-model-trigger > span:not(.volc-image-mark) {
    color: #4d5364;
    font-size: 17px;
    font-weight: 800;
}

.volc-model-quota {
    flex: 0 0 auto;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border: 1px solid #e4e8f1;
    border-radius: 999px;
    background: #ffffff;
    color: #687286;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .01em;
    box-shadow: 0 8px 18px rgba(32, 39, 58, .05);
    white-space: nowrap;
}

.volc-model-quota span {
    color: #8a93a7;
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
}

.volc-model-quota strong {
    color: #3d4658;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.volc-image-model-trigger svg {
    width: 15px;
    height: 15px;
    color: #73798a;
}

.volc-image-model-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 24;
    width: min(760px, calc(100vw - 64px));
    overflow: hidden;
    border: 1px solid #e3e7f0;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 22px 60px rgba(31, 38, 61, .16);
}

.volc-model-panel-head {
    min-height: 94px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 40px 16px;
}

.volc-model-panel-head > strong {
    color: #151925;
    font-size: 24px;
    font-weight: 900;
}

.volc-model-panel-head > div {
    display: inline-flex;
    align-items: center;
    gap: 22px;
}

.volc-model-panel-head button {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #111521;
    cursor: pointer;
}

.volc-model-panel-head button:hover {
    background: #f4f6fb;
}

.volc-model-panel-head svg {
    width: 28px;
    height: 28px;
}

.volc-model-panel-head div span {
    width: 1px;
    height: 22px;
    background: #d7dce8;
}

.volc-model-tabs {
    display: flex;
    align-items: end;
    gap: 38px;
    padding: 0 40px;
    border-bottom: 1px solid #e3e7f0;
}

.volc-model-tabs button {
    min-height: 54px;
    padding: 0;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: #444a5e;
    font: inherit;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
}

.volc-model-tabs button.active {
    color: #111521;
    border-bottom-color: #111521;
    font-weight: 900;
}

.volc-model-section {
    display: grid;
    gap: 12px;
    padding: 20px;
}

.volc-model-section > span {
    padding-left: 20px;
    color: #7b8498;
    font-size: 18px;
    font-weight: 700;
}

.volc-model-list {
    display: grid;
    gap: 8px;
}

.volc-model-option {
    min-height: 76px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto 24px;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border: 0;
    border-radius: 8px;
    background: #ffffff;
    color: #424759;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.volc-model-option:hover,
.volc-model-option.active {
    background: #f3f4fb;
}

.volc-model-option .volc-image-mini-mark {
    width: 32px;
    height: 32px;
}

.volc-model-option strong {
    overflow: hidden;
    color: #424759;
    font-size: 20px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.volc-model-option em {
    grid-column: 4;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 2px 5px;
    border-radius: 4px;
    background: #ece5ff;
    color: #6a43ff;
    font-style: normal;
    font-size: 14px;
    font-weight: 900;
}

.volc-model-option small {
    grid-column: 3;
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border: 1px solid rgba(102, 111, 134, .08);
    border-radius: 999px;
    background: #ffffff;
    color: #7a8193;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.volc-model-option.active small,
.volc-model-option:hover small {
    background: #ffffff;
}

.volc-model-option > svg {
    grid-column: 5;
    width: 22px;
    height: 22px;
    justify-self: end;
    color: #505569;
    opacity: 0;
}

.volc-model-option.active > svg {
    opacity: 1;
}

.volc-image-mark,
.volc-image-mini-mark {
    flex: 0 0 auto;
    border-radius: 50%;
    background:
        radial-gradient(circle at 34% 28%, #ffffff 0 16%, transparent 18%),
        conic-gradient(from 225deg, #1cc9e8, #7658ff, #36d686, #1cc9e8);
}

.volc-image-mark {
    width: 20px;
    height: 20px;
    box-shadow: 0 7px 14px rgba(105, 88, 255, .18);
}

.volc-image-mini-mark {
    width: 16px;
    height: 16px;
}

.volc-image-actions {
    justify-self: end;
    gap: 6px;
}

.volc-image-actions a {
    width: 34px;
    height: 34px;
    justify-content: center;
    border-radius: 7px;
    color: #3f4555;
}

.volc-image-actions a:hover {
    background: #f5f7fb;
    color: #6255f6;
}

.volc-image-actions svg {
    width: 18px;
    height: 18px;
}

.volc-favorite-filter {
    justify-self: end;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #5b6274;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    user-select: none;
}

.volc-favorite-filter:hover {
    border-color: #e6e9f3;
    background: #f7f8fc;
    color: #333949;
}

.volc-favorite-filter input {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    flex: 0 0 13px !important;
    width: 13px !important;
    min-width: 13px !important;
    max-width: 13px !important;
    height: 13px !important;
    min-height: 13px !important;
    max-height: 13px !important;
    display: inline-grid;
    place-items: center;
    margin: 0;
    border: 1px solid #cbd2e2;
    border-radius: 4px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
}

.volc-favorite-filter input::after {
    content: "";
    width: 3px;
    height: 6px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    opacity: 0;
    transform: translateY(-1px) rotate(45deg);
}

.volc-favorite-filter input:checked {
    border-color: #6d5df8;
    background: #6d5df8;
    box-shadow: 0 6px 14px rgba(109, 93, 248, .22);
}

.volc-favorite-filter input:checked::after {
    opacity: 1;
}

.volc-image-workspace {
    min-height: 0;
    overflow-y: auto;
    padding: 10px 96px 178px;
    background: #ffffff;
}

.volc-image-thread {
    width: min(1110px, 100%);
    display: grid;
    gap: 22px;
    margin: 0 auto;
}

.volc-image-thread.is-empty {
    min-height: 360px;
    place-items: center;
}

.volc-image-message {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.volc-image-message time {
    color: #8a91a3;
    font-size: 13px;
    font-weight: 800;
}

.volc-image-message p {
    max-width: 960px;
    margin: 0;
    color: #252a38;
    font-size: 16px;
    line-height: 1.72;
}

.volc-image-chip-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.volc-image-chip-row > img {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 5px;
    object-fit: cover;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .82);
}

.volc-image-chip-row > span {
    min-height: 27px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid #eef1f7;
    border-radius: 6px;
    background: #f6f7fb;
    color: #747b8d;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.volc-image-chip-row svg {
    width: 15px;
    height: 15px;
}

.volc-image-provider {
    max-width: min(270px, 100%);
}

.volc-image-status.succeeded {
    color: #087443;
    background: #effaf3;
    border-color: #d8f2e2;
}

.volc-image-status.partial {
    border-color: #f5d99b;
    background: #fff8e8;
    color: #a46305;
}

.volc-image-partial-note {
    width: min(960px, 100%);
    margin: 8px 0 0;
    color: #a46305;
    font-size: 13px;
    font-weight: 700;
}

.volc-image-status.failed,
.volc-image-status.cancelled {
    color: #b42318;
    background: #fff4f2;
    border-color: #ffd9d4;
}

.volc-image-status.pending,
.volc-image-status.running,
.volc-image-status.polling {
    color: #715312;
    background: #fff8e6;
    border-color: #f7e4ad;
}

.volc-image-output {
    width: min(480px, 100%);
    min-height: 148px;
    display: grid;
    place-items: center;
    overflow: hidden;
    margin-top: 4px;
    border-radius: 5px;
    background: #f1f4f8;
}

.volc-image-output.is-grid {
    width: min(640px, 100%);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    place-items: stretch;
    gap: 8px;
    padding: 8px;
}

.volc-image-output-frame {
    position: relative;
    width: 100%;
    min-width: 0;
}

.volc-image-output img {
    width: 100%;
    height: auto;
    display: block;
}

.volc-image-output.is-grid img {
    aspect-ratio: 16 / 9;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.volc-image-preview-trigger {
    width: 100%;
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.volc-image-preview-trigger:focus-visible {
    outline: 3px solid rgba(108, 93, 255, .34);
    outline-offset: 3px;
}

.volc-image-output-tools {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    z-index: 2;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
    pointer-events: none;
}

.volc-image-output-frame:hover .volc-image-output-tools,
.volc-image-output-frame:focus-within .volc-image-output-tools {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.volc-image-output-tools a,
.volc-image-output-tools button {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: rgba(64, 76, 91, .58);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(24, 31, 45, .12);
    backdrop-filter: blur(8px);
}

.volc-image-output-tools a:hover,
.volc-image-output-tools button:hover,
.volc-image-output-tools button.is-active {
    background: rgba(63, 70, 88, .76);
    color: #ffffff;
}

.volc-image-output-tools button.is-active svg,
.volc-image-lightbox-tools button.is-active svg {
    fill: currentColor;
}

.volc-image-output-tools svg {
    width: 19px;
    height: 19px;
    stroke-width: 2.4;
}

.volc-upscale-open {
    overflow: hidden;
}

.volc-upscale-modal[hidden] {
    display: none;
}

.volc-upscale-modal {
    position: fixed;
    inset: 0;
    z-index: 95;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(21, 25, 36, .28);
    backdrop-filter: blur(10px);
}

.volc-upscale-card {
    width: min(440px, 100%);
    overflow: hidden;
    border: 1px solid #e2e7f2;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 28px 76px rgba(22, 29, 49, .22);
}

.volc-upscale-head {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid #eef1f7;
}

.volc-upscale-head > div {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.volc-upscale-head strong {
    color: #171b28;
    font-size: 18px;
    font-weight: 900;
}

.volc-upscale-head span {
    color: #7b8497;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
}

.volc-upscale-head button {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #232938;
    cursor: pointer;
}

.volc-upscale-head button:hover {
    background: #f4f6fb;
    color: #6154f4;
}

.volc-upscale-form {
    display: grid;
    gap: 14px;
    padding: 18px 20px 20px;
}

.volc-upscale-upload {
    min-height: 88px;
    display: grid;
    place-items: center;
    gap: 7px;
    padding: 14px;
    border: 1px dashed #d9e0ee;
    border-radius: 12px;
    background: #f8faff;
    color: #8b94a7;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.volc-upscale-upload:hover {
    border-color: #cfd6fb;
    background: #f7f7ff;
    color: #6255f6;
}

.volc-upscale-upload svg {
    width: 25px;
    height: 25px;
}

.volc-upscale-options {
    display: grid;
    gap: 8px;
}

.volc-upscale-model {
    display: grid;
    gap: 8px;
}

.volc-upscale-model > span {
    color: #555e73;
    font-size: 13px;
    font-weight: 800;
}

.volc-upscale-model select {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #dfe4ef;
    border-radius: 8px;
    background: #fff;
    color: #303747;
    font: inherit;
    font-weight: 750;
}

.volc-upscale-capability-note {
    color: #7f8798;
    font-size: 12px;
    font-weight: 700;
}

.volc-upscale-options button:disabled {
    cursor: not-allowed;
    opacity: .4;
}

.volc-upscale-options > span {
    color: #4a5265;
    font-size: 13px;
    font-weight: 900;
}

.volc-upscale-options > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.volc-upscale-options button {
    min-height: 38px;
    border: 1px solid #dfe5f0;
    border-radius: 9px;
    background: #ffffff;
    color: #434b5e;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.volc-upscale-options button:hover,
.volc-upscale-options button.active {
    border-color: #c9d0ff;
    background: #f2f3ff;
    color: #6255f6;
}

.volc-upscale-form p {
    margin: 0;
    color: #858da0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.6;
}

.volc-upscale-submit {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 10px;
    background: #6f63ff;
    color: #ffffff;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(100, 87, 246, .22);
}

.volc-upscale-submit:hover {
    background: #5f53ef;
}

.volc-image-preview-open {
    overflow: hidden;
}

.volc-image-lightbox[hidden] {
    display: none;
}

.volc-image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: #f8f9fc;
}

.volc-image-lightbox-dialog {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.volc-image-lightbox-main {
    position: relative;
    min-width: 0;
    min-height: 0;
    display: grid;
    place-items: center;
    padding: 78px 76px;
}

.volc-image-lightbox-back,
.volc-image-lightbox-tools button,
.volc-image-lightbox-tools a,
.volc-image-lightbox-pager button,
.volc-image-lightbox-dock button,
.volc-image-lightbox-mobile-close {
    display: inline-grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: #596174;
    cursor: pointer;
}

.volc-image-lightbox-back {
    position: absolute;
    top: 28px;
    left: 28px;
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.volc-image-lightbox-back svg {
    width: 26px;
    height: 26px;
}

.volc-image-lightbox-tools {
    position: absolute;
    top: 30px;
    right: 30px;
    display: inline-flex;
    align-items: center;
    gap: 16px;
}

.volc-image-lightbox-tools button,
.volc-image-lightbox-tools a {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.volc-image-lightbox-tools svg {
    width: 18px;
    height: 18px;
}

.volc-image-lightbox-back:hover,
.volc-image-lightbox-tools button:hover,
.volc-image-lightbox-tools a:hover,
.volc-image-lightbox-pager button:hover {
    background: #eef1f7;
    color: #252a38;
}

.volc-image-lightbox-tools button.is-active {
    color: #6255f6;
}

.volc-image-toast {
    position: fixed;
    left: 50%;
    bottom: 34px;
    z-index: 90;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(28, 33, 46, .88);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    opacity: 0;
    transform: translate(-50%, 8px);
    transition: opacity .18s ease, transform .18s ease;
    pointer-events: none;
}

.volc-image-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.volc-image-lightbox-stage {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: grid;
    place-items: center;
}

.volc-image-lightbox-stage img {
    max-width: min(100%, 1040px);
    max-height: calc(100dvh - 190px);
    display: block;
    border-radius: 8px;
    object-fit: contain;
}

.volc-image-lightbox-pager {
    position: absolute;
    top: 50%;
    right: 28px;
    display: grid;
    gap: 18px;
    transform: translateY(-50%);
}

.volc-image-lightbox-pager button {
    width: 34px;
    height: 34px;
    border-radius: 8px;
}

.volc-image-lightbox-side {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    border-left: 1px solid #edf0f6;
    background: #ffffff;
}

.volc-image-lightbox-model {
    min-height: 96px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px;
    border-bottom: 1px solid #edf0f6;
}

.volc-image-lightbox-model .volc-image-mark {
    width: 42px;
    height: 42px;
    border-radius: 9px;
}

.volc-image-lightbox-model div {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.volc-image-lightbox-model strong {
    overflow: hidden;
    color: #3f4658;
    font-size: 15px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.volc-image-lightbox-model time {
    color: #8991a3;
    font-size: 12px;
    font-weight: 700;
}

.volc-image-lightbox-info {
    display: grid;
    gap: 12px;
    padding: 26px 24px;
}

.volc-image-lightbox-info h3 {
    margin: 0;
    color: #252a38;
    font-size: 14px;
    font-weight: 900;
}

.volc-image-lightbox-info > img {
    width: 44px;
    height: 44px;
    border-radius: 7px;
    object-fit: cover;
}

.volc-image-lightbox-info p {
    margin: 0;
    color: #3f4658;
    font-size: 14px;
    line-height: 1.65;
}

.volc-image-lightbox-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.volc-image-lightbox-chips span {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 7px;
    background: #f3f5fa;
    color: #747c8f;
    font-size: 12px;
    font-weight: 800;
}

.volc-image-lightbox-dock {
    justify-self: end;
    display: grid;
    gap: 10px;
    padding: 0 14px 18px;
}

.volc-image-lightbox-dock button {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(36, 42, 56, .12);
}

.volc-image-lightbox-dock button.active {
    color: #7061ff;
}

.volc-image-lightbox-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 24px 22px;
}

.volc-image-lightbox-actions button {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 8px;
    background: #f2f4fa;
    color: #697184;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.volc-image-lightbox-actions button:hover {
    background: #ebeefd;
    color: #6255f6;
}

.volc-image-lightbox-mobile-close {
    display: none;
}

.volc-image-placeholder {
    width: 100%;
    min-height: 164px;
    display: grid;
    place-items: center;
    gap: 7px;
    padding: 18px;
    color: #8b92a3;
    text-align: center;
}

.volc-image-placeholder svg {
    width: 36px;
    height: 36px;
    padding: 8px;
    border-radius: 9px;
    background: #ffffff;
    color: #6b60f5;
}

.volc-image-placeholder strong {
    color: #343a4b;
    font-size: 14px;
}

.volc-image-placeholder span {
    max-width: 340px;
    font-size: 12px;
    line-height: 1.5;
}

.volc-image-message-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.volc-image-message-actions button,
.volc-image-message-actions a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 15px;
    border: 1px solid #edf0f7;
    border-radius: 6px;
    background: #f5f6fb;
    color: #737b90;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: none;
}

.volc-image-message-actions button:hover,
.volc-image-message-actions a:hover {
    border-color: #d8ddfa;
    background: #f2f3ff;
    color: #6154f4;
}

.volc-image-message-actions svg {
    width: 16px;
    height: 16px;
}

.volc-image-empty {
    width: min(420px, 100%);
    display: grid;
    justify-items: center;
    gap: 10px;
    color: #7e8596;
    text-align: center;
}

.volc-image-empty .volc-image-mark {
    width: 38px;
    height: 38px;
}

.volc-image-empty strong {
    color: #252a38;
    font-size: 18px;
}

.volc-image-empty p {
    margin: 0;
    line-height: 1.7;
}

.volc-image-side-dock {
    position: absolute;
    right: 24px;
    bottom: 72px;
    z-index: 5;
    display: grid;
    gap: 14px;
}

.volc-image-side-dock button {
    width: 58px;
    height: 58px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #edf0f6;
    border-radius: 50%;
    background: #ffffff;
    color: #303747;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(31, 38, 61, .10);
}

.volc-image-side-dock button:hover {
    color: #6255f6;
    transform: translateY(-1px);
}

.volc-image-side-dock button.active {
    color: #7b5cff;
}

.volc-image-side-dock svg {
    width: 23px;
    height: 23px;
}

.volc-image-composer {
    z-index: 4;
    display: flex;
    justify-content: center;
    padding: 0 32px 34px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), #ffffff 24px);
}

.volc-image-input-card {
    position: relative;
    width: min(1110px, 100%);
    display: grid;
    gap: 12px;
    padding: 18px 20px 16px;
    border: 1px solid #dfe4ef;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(37, 43, 66, .06);
}

.volc-image-prompt-row {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) auto;
    align-items: start;
    gap: 16px;
}

.volc-image-upload-strip {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 100%;
}

.volc-image-upload {
    width: 66px;
    min-height: 66px;
    display: grid;
    place-items: center;
    gap: 4px;
    padding: 8px 6px;
    border: 1px dashed #dce2ee;
    border-radius: 8px;
    background: #f8faff;
    color: #a1a8b7;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.volc-image-upload:hover {
    border-color: #cfd6fb;
    color: #6659f5;
    background: #f7f7ff;
}

.volc-image-upload svg {
    width: 21px;
    height: 21px;
}

.volc-image-upload span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.volc-upload-preview {
    --upload-progress: 0;
    position: relative;
    width: auto;
    height: 66px;
    min-width: 66px;
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.volc-upload-preview [hidden] {
    display: none !important;
}

.volc-upload-progress {
    position: relative;
    width: 66px;
    height: 66px;
    flex: 0 0 66px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 10px;
    background: #c6c8cd;
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.volc-upload-progress::before,
.volc-upload-progress::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    border-radius: 999px;
    transform: translate(-50%, -50%);
}

.volc-upload-progress::before {
    width: 39px;
    height: 39px;
    background: conic-gradient(from -90deg, #ffffff calc(var(--upload-progress) * 1%), rgba(255, 255, 255, .42) 0);
}

.volc-upload-progress::after {
    width: 29px;
    height: 29px;
    background: rgba(255, 255, 255, .2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}

.volc-upload-progress span {
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(73, 77, 91, .22);
}

.volc-upload-preview-list {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: min(560px, 46vw);
    overflow-x: auto;
    padding: 2px 12px 2px 0;
}

.volc-upload-thumb {
    position: relative;
    width: 66px;
    height: 66px;
    flex: 0 0 66px;
}

.volc-upload-preview img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 9px;
    background: #eef1f6;
    box-shadow: inset 0 0 0 1px rgba(222, 228, 240, .72);
}

.volc-upload-preview button {
    position: absolute;
    right: -10px;
    top: -10px;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: #45485a;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(35, 39, 55, .18);
}

.volc-upload-preview > button {
    right: -2px;
}

.volc-upload-thumb button {
    right: -8px;
    top: -8px;
}

.volc-upload-preview button:hover {
    background: #303345;
}

.volc-upload-preview button svg {
    width: 14px;
    height: 14px;
    stroke-width: 3;
}

.volc-image-prompt-row textarea {
    min-height: 72px;
    max-height: 180px;
    padding: 4px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #262b3a;
    font-size: 16px;
    line-height: 1.65;
    resize: vertical;
    box-shadow: none;
}

.volc-image-prompt-row textarea:hover,
.volc-image-prompt-row textarea:focus {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.volc-image-prompt-row textarea::placeholder {
    color: #aeb5c2;
}

.volc-image-template {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #71798c;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.volc-image-template:hover {
    background: #f5f6fb;
    color: #6154f4;
}

.volc-image-template svg {
    width: 17px;
    height: 17px;
}

.volc-image-template-panel[hidden] {
    display: none;
}

.volc-image-template-panel {
    position: absolute;
    right: 20px;
    bottom: calc(100% + 12px);
    z-index: 18;
    width: min(920px, calc(100vw - 64px));
    max-height: min(72vh, 620px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    border: 1px solid #dfe4ef;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 26px 64px rgba(27, 34, 54, .16);
}

.volc-image-template-head {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid #e6eaf3;
}

.volc-image-template-head > div {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.volc-image-template-head strong {
    color: #111522;
    font-size: 19px;
    font-weight: 900;
}

.volc-image-template-head span {
    color: #7b8497;
    font-weight: 800;
}

.volc-image-template-head button {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #171b28;
    cursor: pointer;
}

.volc-image-template-head button:hover {
    background: #f4f6fb;
    color: #6154f4;
}

.volc-image-template-head svg {
    width: 20px;
    height: 20px;
}

.volc-image-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 12px;
    padding: 16px;
    overflow-y: auto;
    background: #fbfcff;
}

.volc-image-template-card {
    min-height: 228px;
    display: grid;
    grid-template-rows: 112px minmax(0, 1fr);
    padding: 0;
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    color: #252b3b;
    font: inherit;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(36, 44, 67, .04);
}

.volc-image-template-card:hover {
    border-color: #cdd4fb;
    box-shadow: 0 14px 30px rgba(39, 47, 78, .1);
    transform: translateY(-1px);
}

.volc-template-thumb {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 112px;
    overflow: hidden;
    color: #ffffff;
}

.volc-template-thumb::before,
.volc-template-thumb::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    opacity: .55;
}

.volc-template-thumb::before {
    width: 130px;
    height: 130px;
    right: -34px;
    top: -44px;
    background: rgba(255, 255, 255, .45);
}

.volc-template-thumb::after {
    width: 74px;
    height: 74px;
    left: -20px;
    bottom: -22px;
    background: rgba(255, 255, 255, .28);
}

.volc-template-thumb.has-image::before,
.volc-template-thumb.has-image::after {
    display: none;
}

.volc-template-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.volc-template-thumb-0 {
    background: linear-gradient(135deg, #2f80ed, #36d1a2);
}

.volc-template-thumb-1 {
    background: linear-gradient(135deg, #d56a5f, #f0c66d);
}

.volc-template-thumb-2 {
    background: linear-gradient(135deg, #475569, #86a7ff);
}

.volc-template-thumb-3 {
    background: linear-gradient(135deg, #2c7a7b, #b8d98d);
}

.volc-template-thumb-4 {
    background: linear-gradient(135deg, #7c5c43, #e7b87a);
}

.volc-template-thumb-5 {
    background: linear-gradient(135deg, #ef6f6c, #66c7d5);
}

.volc-template-thumb svg {
    position: relative;
    z-index: 1;
    width: 34px;
    height: 34px;
    filter: drop-shadow(0 8px 16px rgba(25, 31, 48, .18));
}

.volc-template-thumb em {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 1;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(17, 23, 36, .46);
    color: #ffffff;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}

.volc-template-copy {
    display: grid;
    align-content: start;
    gap: 7px;
    padding: 12px 13px 14px;
}

.volc-template-copy strong {
    color: #1e2432;
    font-size: 15px;
    font-weight: 900;
}

.volc-template-copy span {
    display: -webkit-box;
    min-height: 58px;
    overflow: hidden;
    color: #697286;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.volc-image-control-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.volc-image-control-row select {
    width: auto;
    max-width: min(250px, 100%);
    min-height: 34px;
    padding: 5px 31px 5px 10px;
    border-color: #e0e5ef;
    border-radius: 7px;
    background-color: #ffffff;
    color: #3c4354;
    font-size: 14px;
    font-weight: 800;
}

.volc-image-control-chip {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border: 1px solid #e0e5ef;
    border-radius: 7px;
    background: #ffffff;
    color: #444b5d;
    font-weight: 800;
}

button.volc-image-control-chip {
    font: inherit;
    cursor: pointer;
}

.volc-image-control-chip:hover {
    border-color: #cfd6fb;
    color: #6255f6;
    background: #f8f8ff;
}

.volc-image-control-chip svg {
    width: 16px;
    height: 16px;
}

.volc-image-param-popover[hidden] {
    display: none;
}

.volc-image-param-popover {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 12px);
    z-index: 16;
    width: min(720px, calc(100vw - 52px));
    display: grid;
    gap: 18px;
    padding: 18px;
    border: 1px solid #dfe4ef;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 24px 58px rgba(31, 38, 61, .14);
    transform: translateX(-50%);
}

.volc-image-param-popover.is-group-only [data-image-common-param] {
    display: none !important;
}

.volc-image-param-section {
    display: grid;
    gap: 10px;
}

.volc-image-param-section > span {
    color: #4b5365;
    font-size: 15px;
    font-weight: 800;
}

.volc-image-resolution-grid,
.volc-image-mode-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 4px;
    border-radius: 9px;
    background: #f3f5fb;
}

.volc-image-mode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.volc-image-resolution-grid button,
.volc-image-mode-grid button,
.volc-image-ratio-grid button,
.volc-image-count-stepper button {
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #4a5162;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
}

.volc-image-resolution-grid button.active,
.volc-image-mode-grid button.active,
.volc-image-ratio-grid button.active {
    border-color: #dce1ef;
    background: #ffffff;
    color: #101420;
    box-shadow: 0 2px 7px rgba(39, 45, 68, .08);
}

.volc-image-resolution-grid button:hover,
.volc-image-mode-grid button:hover,
.volc-image-ratio-grid button:hover,
.volc-image-count-stepper button:hover {
    background: #ffffff;
    color: #6255f6;
}

.volc-image-resolution-grid button.is-disabled,
.volc-image-mode-grid button.is-disabled,
.volc-image-ratio-grid button.is-disabled,
.volc-image-count-stepper button.is-disabled {
    cursor: not-allowed;
    opacity: .45;
}

.volc-image-ratio-grid {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border-radius: 9px;
    background: #f3f5fb;
}

.volc-image-ratio-grid button {
    min-height: 70px;
    display: grid;
    place-items: center;
    gap: 5px;
    padding: 6px 4px;
}

.volc-image-ratio-grid svg {
    width: 22px;
    height: 22px;
}

.volc-image-ratio-grid span {
    font-size: 13px;
}

.volc-image-count-stepper {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-self: start;
    padding: 6px 8px;
    border: 1px solid #e0e5ef;
    border-radius: 10px;
    background: #ffffff;
}

.volc-image-count-stepper button {
    width: 30px;
    min-height: 30px;
    display: inline-grid;
    place-items: center;
    border-color: #e6eaf3;
    background: #f8faff;
}

.volc-image-count-stepper svg {
    width: 15px;
    height: 15px;
}

.volc-image-count-stepper strong {
    min-width: 38px;
    text-align: center;
    color: #272d3d;
}

.volc-image-count-stepper span {
    color: #81899a;
    font-size: 13px;
    font-weight: 800;
}

.volc-image-group-mode[hidden] {
    display: none;
}

.volc-image-group-mode {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e1e6f1;
    border-radius: 12px;
    background: #ffffff;
}

.volc-image-group-mode > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.volc-image-group-mode strong {
    color: #242938;
    font-size: 15px;
    font-weight: 900;
}

.volc-image-group-mode a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #5f55f6;
    font-size: 13px;
    font-weight: 850;
}

.volc-image-group-mode a svg {
    width: 15px;
    height: 15px;
}

.volc-image-group-mode-list {
    display: grid;
    gap: 6px;
}

.volc-image-group-mode-list button {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border: 0;
    border-radius: 8px;
    background: #ffffff;
    color: #242938;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.volc-image-group-mode-list button:hover,
.volc-image-group-mode-list button.active {
    background: #f0f2ff;
    color: #5c52f3;
}

.volc-image-group-mode-list button span {
    display: grid;
    gap: 5px;
}

.volc-image-group-mode-list button strong {
    font-size: 15px;
    line-height: 1;
}

.volc-image-group-mode-list button em {
    color: #7f8798;
    font-style: normal;
    font-size: 13px;
    font-weight: 700;
}

.volc-image-group-mode-list button.active em {
    color: #6158e8;
}

.volc-image-group-mode-list button > svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    opacity: 0;
}

.volc-image-group-mode-list button.active > svg {
    opacity: 1;
}

.volc-image-size-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 4px;
    border-radius: 9px;
    background: #f8faff;
}

.volc-image-size-row input {
    min-height: 42px;
    border: 1px solid #dfe4ef;
    border-radius: 8px;
    background: #ffffff;
    color: #4a5162;
    font-weight: 850;
    text-align: center;
}

.volc-image-size-row svg {
    width: 18px;
    height: 18px;
    color: #81899a;
    justify-self: center;
}

.volc-image-cost {
    margin-left: auto;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    color: #7f879b;
    font-size: 13px;
    font-weight: 800;
}

.volc-image-send {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: #c4c6ff;
    color: #ffffff;
    cursor: pointer;
}

.volc-image-send:hover {
    background: #7568ff;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(103, 91, 255, .18);
}

.volc-image-send svg {
    width: 18px;
    height: 18px;
}

.volc-video-model-trigger {
    max-width: min(620px, 52vw);
}

.volc-video-model-panel {
    max-height: calc(100dvh - 74px);
    overflow-y: auto;
}

.volc-video-model-section .volc-model-option {
    grid-template-columns: auto minmax(0, 1fr) auto auto 24px;
}

.volc-video-model-section .volc-model-option small {
    grid-column: 3;
}

.volc-video-model-section .volc-model-option em {
    grid-column: 4;
}

.volc-video-model-section .volc-model-option > svg {
    grid-column: 5;
}

.volc-video-model-section .volc-model-option.active {
    background: #f3f4fb;
}

.volc-video-output {
    width: min(760px, 100%);
    background: #050506;
}

.volc-video-output video {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #050506;
}

.volc-video-output-frame {
    width: 100%;
}

.volc-video-last-frame {
    width: 100%;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 10px;
    color: rgba(255, 255, 255, .82);
    text-decoration: none;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.volc-video-last-frame img {
    width: 96px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 4px;
    background: #111;
}

.volc-video-last-frame span {
    min-width: 0;
    font-size: 13px;
    font-weight: 700;
}

.volc-video-output .volc-image-placeholder {
    min-height: 260px;
    color: rgba(255, 255, 255, .72);
}

.volc-video-output .volc-image-placeholder svg {
    background: rgba(255, 255, 255, .12);
    color: #ffffff;
}

.volc-video-output .volc-image-placeholder strong {
    color: #ffffff;
}

.volc-video-output .volc-image-placeholder span {
    color: rgba(255, 255, 255, .68);
}

.volc-video-prompt-row {
    grid-template-columns: 176px minmax(0, 1fr) auto;
}

.volc-video-upload-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 84px));
    gap: 8px;
}

.volc-video-upload-stack .volc-image-upload {
    width: 84px;
    min-height: 48px;
}

.volc-video-upload-stack .volc-image-upload.is-disabled,
.volc-video-control-row select.is-disabled {
    opacity: .46;
    cursor: not-allowed;
}

.volc-video-upload-stack .volc-image-upload.is-disabled {
    pointer-events: none;
    background: #f4f6fa;
    color: #8992a3;
}

.volc-video-control-row select.is-disabled {
    background-color: #f4f6fa;
    color: #8992a3;
}

.volc-video-control-row select {
    max-width: min(214px, 100%);
}

.volc-video-control-row select[multiple] {
    min-width: 156px;
    max-width: min(188px, 100%);
    min-height: 34px;
    max-height: 72px;
    padding-right: 10px;
}

.volc-video-control-row .volc-image-control-chip {
    font-variant-numeric: tabular-nums;
}

.vision-page.is-submitting .volc-image-send {
    pointer-events: none;
    opacity: .72;
}

.vision-page.is-submitting .volc-image-send svg {
    animation: visionSendPulse .72s ease infinite alternate;
}

@media (max-width: 900px) {
    body.volc-image-body .main {
        min-height: 0;
        display: flex;
        overflow: hidden;
    }

    .volc-image-page {
        min-height: calc(100vh - 220px);
        grid-template-rows: auto minmax(0, 1fr) auto;
    }

    .volc-image-topbar {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
        padding: 8px 12px;
    }

    .volc-image-model-trigger strong {
        font-size: 14px;
    }

    .volc-image-model-panel {
        width: min(720px, calc(100vw - 24px));
    }

    .volc-image-actions a {
        width: 32px;
        height: 32px;
    }

    .volc-favorite-filter {
        padding: 5px 7px;
        font-size: 13px;
    }

    .volc-image-workspace {
        padding: 14px 18px 190px;
    }

    .volc-image-thread {
        width: 100%;
    }

    .volc-image-side-dock {
        display: none;
    }

    .volc-image-composer {
        padding: 0 12px 14px;
    }

    .volc-image-input-card {
        border-radius: 14px;
        padding: 14px;
    }

    .volc-image-param-popover {
        width: min(680px, calc(100vw - 24px));
        max-height: min(72vh, 560px);
        overflow-y: auto;
        padding: 14px;
    }

    .volc-image-ratio-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .volc-image-prompt-row {
        grid-template-columns: max-content minmax(0, 1fr);
        gap: 12px;
    }

    .volc-image-upload {
        width: 58px;
        min-height: 58px;
    }

    .volc-upload-preview {
        min-width: 58px;
        height: 58px;
    }

    .volc-upload-progress,
    .volc-upload-thumb {
        width: 58px;
        height: 58px;
        flex-basis: 58px;
    }

    .volc-image-template {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .volc-image-template-panel {
        right: 12px;
        width: min(680px, calc(100vw - 24px));
        max-height: min(72vh, 560px);
    }

    .volc-image-template-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .volc-image-cost {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 560px) {
    .volc-image-topbar {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .volc-image-model-trigger > span:not(.volc-image-mark):not(.volc-model-quota),
    .volc-image-model-trigger svg {
        display: none;
    }

    .volc-image-model-picker {
        width: 100%;
        gap: 7px;
    }

    .volc-image-model-trigger {
        max-width: min(58vw, 260px);
    }

    .volc-model-quota {
        max-width: 118px;
        overflow: hidden;
        font-size: 11px;
        text-overflow: ellipsis;
    }

    .volc-image-model-panel {
        left: -4px;
        max-height: calc(100vh - 190px);
        overflow-y: auto;
    }

    .volc-model-panel-head {
        min-height: 72px;
        padding: 18px 20px 12px;
    }

    .volc-model-panel-head > strong {
        font-size: 20px;
    }

    .volc-model-panel-head svg {
        width: 23px;
        height: 23px;
    }

    .volc-model-tabs {
        gap: 26px;
        padding: 0 20px;
    }

    .volc-model-tabs button {
        min-height: 46px;
        font-size: 17px;
    }

    .volc-model-section {
        padding: 16px 12px;
    }

    .volc-model-option {
        min-height: 64px;
        grid-template-columns: auto minmax(0, 1fr) 24px;
        padding: 10px 12px;
    }

    .volc-model-option strong {
        font-size: 16px;
    }

    .volc-model-option small,
    .volc-model-option em {
        grid-column: 2;
        justify-self: start;
    }

    .volc-model-option > svg {
        grid-column: 3;
        grid-row: 1 / span 3;
    }

    .volc-image-actions {
        gap: 2px;
    }

    .volc-image-actions a {
        width: 30px;
        height: 30px;
    }

    .volc-favorite-filter span {
        display: none;
    }

    .volc-image-workspace {
        padding: 12px 12px 224px;
    }

    .volc-image-message p {
        font-size: 15px;
    }

    .volc-image-chip-row > span {
        max-width: 100%;
    }

    .volc-image-output {
        width: 100%;
    }

    .volc-image-lightbox-dialog {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr) auto;
        overflow-y: auto;
    }

    .volc-image-lightbox-main {
        min-height: 52vh;
        padding: 58px 16px 28px;
    }

    .volc-image-lightbox-tools {
        top: 14px;
        right: 48px;
        gap: 8px;
    }

    .volc-image-lightbox-tools button,
    .volc-image-lightbox-tools a {
        width: 30px;
        height: 30px;
    }

    .volc-image-lightbox-back {
        top: 12px;
        left: 12px;
    }

    .volc-image-lightbox-stage img {
        max-height: 42vh;
    }

    .volc-image-lightbox-pager,
    .volc-image-lightbox-dock {
        display: none;
    }

    .volc-image-lightbox-side {
        grid-template-rows: auto auto auto;
        border-left: 0;
        border-top: 1px solid #edf0f6;
    }

    .volc-image-lightbox-spacer {
        display: none;
    }

    .volc-image-lightbox-model {
        min-height: 74px;
        padding: 16px;
    }

    .volc-image-lightbox-info {
        padding: 18px 16px;
    }

    .volc-image-lightbox-actions {
        padding: 0 16px 16px;
    }

    .volc-image-lightbox-mobile-close {
        position: fixed;
        top: 12px;
        right: 10px;
        width: 36px;
        height: 36px;
        display: inline-grid;
        border-radius: 8px;
        background: #eef1f7;
    }

    .volc-image-message-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .volc-image-message-actions button,
    .volc-image-message-actions a {
        width: 100%;
        min-width: 0;
        padding-left: 8px;
        padding-right: 8px;
    }

    .volc-image-prompt-row {
        grid-template-columns: 1fr;
    }

    .volc-image-upload-strip {
        width: 100%;
    }

    .volc-image-upload {
        width: 78px;
        min-height: 58px;
        grid-auto-flow: row;
        justify-content: center;
    }

    .volc-upload-preview {
        min-width: 72px;
        height: 72px;
    }

    .volc-upload-progress,
    .volc-upload-thumb {
        width: 72px;
        height: 72px;
        flex-basis: 72px;
    }

    .volc-upload-preview-list {
        max-width: 100%;
    }

    .volc-image-control-row {
        align-items: stretch;
        flex-direction: column;
    }

    .volc-image-param-popover {
        bottom: calc(100% + 8px);
    }

    .volc-image-template-panel {
        left: 12px;
        right: 12px;
        bottom: calc(100% + 8px);
        width: auto;
        max-height: min(72vh, 520px);
    }

    .volc-image-template-head {
        min-height: 58px;
        padding: 14px;
    }

    .volc-image-template-head strong {
        font-size: 17px;
    }

    .volc-image-template-grid {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .volc-image-template-card {
        min-height: 206px;
        grid-template-rows: 96px minmax(0, 1fr);
    }

    .volc-template-thumb {
        min-height: 96px;
    }

    .volc-image-resolution-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .volc-image-size-row {
        grid-template-columns: 1fr;
    }

    .volc-image-size-row svg {
        display: none;
    }

    .volc-image-control-row select,
    .volc-image-control-chip,
    .volc-image-send {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 900px) {
    .sidebar {
        position: sticky;
        top: 0;
        z-index: 40;
        padding: 8px 14px;
        gap: 12px;
        background: rgba(255, 255, 255, .96);
    }

    .brand {
        min-height: 40px;
        padding: 0 4px;
        font-size: 16px;
    }

    .brand::before {
        width: 26px;
        height: 26px;
    }

    .nav {
        scrollbar-width: none;
    }

    .nav::-webkit-scrollbar {
        display: none;
    }

    .nav-section {
        display: none;
    }

    .nav a,
    .nav button {
        min-height: 40px;
        padding: 7px 11px;
        border-color: var(--line);
        background: #ffffff;
    }

    .mobile-dashboard-link {
        display: none !important;
    }

    .topbar {
        gap: 12px;
        padding: 14px 16px 12px;
    }

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

    .topbar-link,
    .topbar-logout button,
    .topbar-user {
        min-height: 40px;
        border-radius: 10px;
    }

    .topbar-user {
        grid-column: 1 / -1;
        justify-content: flex-start;
        min-width: 0;
    }

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

    .main > .alert,
    .main > .dashboard-band,
    .main > .grid,
    .main > .panel,
    .main > .table-wrap,
    .main > .asset-grid,
    .main > .pagination,
    .main > .section-gap,
    .main > .voice-console,
    .main > .creator-console,
    .main > .studio-page,
    .main > .volc-tts-page,
    .main > .tts-workbench-page {
        margin-left: 16px;
        margin-right: 16px;
    }

    .dashboard-band,
    .grid,
    .asset-grid {
        gap: 12px;
    }

    .dashboard-filter {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    }

    .dashboard-filter .compact-select {
        max-width: 100%;
    }

    .asset-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .asset-card {
        border-radius: 8px;
    }

    body.volc-image-body .main {
        min-height: 0;
        flex-direction: column;
    }

    body.volc-image-body .topbar {
        flex: 0 0 auto;
    }

    .volc-image-page {
        min-height: 0;
        grid-template-rows: auto minmax(0, 1fr) auto;
    }

    .volc-image-workspace {
        padding-left: 16px;
        padding-right: 16px;
    }

    .volc-image-output-tools {
        opacity: 1;
        visibility: visible;
        transform: none;
        pointer-events: auto;
    }
}

@media (max-width: 640px) {
    .sidebar {
        padding: 8px 12px;
    }

    .brand span {
        display: none;
    }

    .brand {
        width: 34px;
        overflow: hidden;
        gap: 0;
    }

    .topbar {
        padding: 12px;
    }

    .topbar h1 {
        font-size: 20px;
    }

    .topbar .muted {
        font-size: 12px;
    }

    .topbar-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .topbar-link span,
    .topbar-logout span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .main > .alert,
    .main > .dashboard-band,
    .main > .grid,
    .main > .panel,
    .main > .table-wrap,
    .main > .asset-grid,
    .main > .pagination,
    .main > .section-gap,
    .main > .voice-console,
    .main > .creator-console,
    .main > .studio-page,
    .main > .volc-tts-page,
    .main > .tts-workbench-page {
        margin-left: 12px;
        margin-right: 12px;
    }

    .panel {
        border-radius: 8px;
        padding: 14px;
    }

    .dashboard-status-heading {
        flex-direction: column;
        align-items: stretch;
    }

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

    .status-tile {
        min-height: 72px;
        padding: 10px;
    }

    .dashboard-actions-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-actions-panel .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-actions-panel .quick-action {
        justify-content: flex-start;
    }

    .dashboard-actions-panel .quick-action small {
        display: block;
    }

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

    .compact-select,
    .actions select,
    .actions .button,
    .actions button.button {
        width: 100%;
        max-width: 100%;
    }

    .mobile-card-table {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .mobile-card-table table,
    .mobile-card-table thead,
    .mobile-card-table tbody,
    .mobile-card-table tr,
    .mobile-card-table td {
        display: block;
    }

    .mobile-card-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .mobile-card-table tbody {
        display: grid;
        gap: 10px;
    }

    .mobile-card-table tr {
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--surface);
        box-shadow: var(--shadow-sm);
    }

    .mobile-card-table tbody tr:hover {
        background: var(--surface);
    }

    .mobile-card-table td {
        padding: 0;
        border: 0;
    }

    .mobile-card-table td + td {
        margin-top: 8px;
    }

    .mobile-card-table td[data-label] {
        display: grid;
        grid-template-columns: 74px minmax(0, 1fr);
        align-items: start;
        gap: 10px;
        text-align: left;
        word-break: break-word;
    }

    .mobile-card-table td[data-label]::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 12px;
        font-weight: 800;
        line-height: 1.7;
    }

    .mobile-card-table td[data-label="ID"] {
        grid-template-columns: 1fr;
        margin-bottom: 2px;
        font-size: 15px;
        font-weight: 800;
    }

    .mobile-card-table td[data-label="ID"]::before,
    .mobile-card-table td[data-label="操作"]::before {
        display: none;
    }

    .mobile-card-table td[data-label="操作"] {
        grid-template-columns: 1fr;
        padding-top: 4px;
    }

    .mobile-card-table td[data-label="操作"] form,
    .mobile-card-table td[data-label="操作"] .button {
        width: 100%;
    }

    .mobile-card-table .job-type {
        align-items: flex-start;
    }

    .mobile-card-table .voice-preview.compact {
        width: 100%;
    }

    .asset-grid {
        grid-template-columns: 1fr;
    }

    .asset-card {
        padding: 10px;
    }

    .asset-card .actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .asset-card .actions form,
    .asset-card .actions .button,
    .asset-card .actions button.button {
        width: 100%;
    }

    .json-block {
        max-height: 280px;
    }

    .volc-image-page {
        min-height: 0;
    }

    .volc-image-topbar {
        min-height: 50px;
        padding: 8px 10px;
    }

    .volc-image-workspace {
        padding: 12px 10px 234px;
    }

    .volc-image-thread {
        gap: 18px;
    }

    .volc-image-message {
        gap: 9px;
    }

    .volc-image-message p {
        font-size: 15px;
        line-height: 1.65;
    }

    .volc-image-chip-row {
        gap: 6px;
    }

    .volc-image-chip-row > span {
        min-height: 30px;
        padding: 5px 8px;
        font-size: 12px;
    }

    .volc-image-output.is-grid {
        grid-template-columns: 1fr;
    }

    .volc-image-composer {
        padding: 0 10px 12px;
    }

    .volc-image-input-card {
        gap: 10px;
        padding: 12px;
        border-radius: 12px;
        box-shadow: 0 10px 28px rgba(37, 43, 66, .10);
    }

    .volc-image-prompt-row textarea {
        min-height: 92px;
        font-size: 16px;
    }

    .volc-image-upload-strip {
        overflow-x: auto;
        padding-top: 2px;
        padding-right: 6px;
    }

    .volc-image-param-popover {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 10px;
        width: auto;
        max-height: min(78dvh, 620px);
        overflow-y: auto;
        border-radius: 14px;
        transform: none;
    }

    .volc-image-template-panel {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 10px;
        width: auto;
        max-height: min(78dvh, 620px);
        border-radius: 14px;
    }
}

/* Final responsive overrides must stay after legacy generator breakpoints. */
.cloud-admin-body .model-catalog-head small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cloud-admin-body .model-role-fieldset .checkbox-field {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.cloud-admin-body .model-role-fieldset input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-height: 0;
    margin: 0;
    padding: 0;
}

@media (max-width: 620px) {
    .cloud-admin-body .topbar {
        min-height: 58px;
        align-items: center;
        flex-direction: row;
        padding: 10px 14px;
    }

    .cloud-admin-body .topbar-actions {
        width: auto;
        display: flex;
        grid-template-columns: none;
        flex: 0 0 auto;
    }

    .cloud-admin-body .topbar-user,
    .cloud-admin-body .environment-status {
        display: none;
    }

    .cloud-admin-body .topbar-logout button {
        width: 34px;
        min-height: 34px;
        padding: 0;
        border-radius: 50%;
    }

    .cloud-admin-body .topbar-actions form {
        width: auto;
    }

    .cloud-admin-body .provider-summary-actions {
        max-width: 100%;
        flex-wrap: wrap;
    }
}

/* 用户与设备管理 */
.cloud-admin-body .main > .user-admin-overview,
.cloud-admin-body .main > .user-admin-toolbar,
.cloud-admin-body .main > .user-admin-list,
.cloud-admin-body .main > .pagination {
    width: min(1320px, calc(100% - clamp(44px, 6vw, 84px)));
    margin-left: auto;
    margin-right: auto;
}

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

.user-admin-overview > div {
    min-height: 86px;
    padding: 17px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.user-admin-overview span,
.user-admin-overview strong { display: block; }
.user-admin-overview span { color: var(--muted); font-size: 12px; }
.user-admin-overview strong { margin-top: 6px; color: var(--text); font-size: 24px; letter-spacing: 0; }

.user-admin-toolbar {
    padding: 14px;
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    background: #fff;
}

.user-admin-filters {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.user-admin-filters select { width: auto; min-width: 126px; }
.user-search-field { width: min(320px, 38vw); position: relative; }
.user-search-field svg { width: 16px; height: 16px; position: absolute; left: 12px; top: 50%; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.user-search-field input { width: 100%; padding-left: 36px; }

.user-create-disclosure { position: relative; flex: 0 0 auto; }
.user-create-disclosure > summary {
    min-height: 36px;
    padding: 8px 13px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 7px;
    color: #fff;
    background: var(--primary);
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}
.user-create-disclosure > summary::-webkit-details-marker { display: none; }
.user-create-disclosure > summary svg { width: 16px; height: 16px; }
.user-create-disclosure[open] > summary { background: var(--primary-strong); }
.user-create-form {
    width: min(720px, calc(100vw - 64px));
    padding: 16px;
    position: absolute;
    z-index: 12;
    top: 44px;
    right: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(31, 42, 68, .16);
}
.user-create-form > button { align-self: end; }

.user-admin-list { display: grid; gap: 10px; }
.user-admin-item {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.user-admin-item > header {
    min-height: 86px;
    padding: 14px 16px;
    display: grid;
    grid-template-columns: minmax(220px, 1.25fr) minmax(190px, .8fr) minmax(360px, 1.5fr) auto;
    align-items: center;
    gap: 16px;
}

.user-admin-identity { min-width: 0; display: flex; align-items: center; gap: 11px; }
.user-admin-identity > span:last-child { min-width: 0; }
.user-admin-identity strong,
.user-admin-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-admin-identity strong { color: var(--text); font-size: 15px; }
.user-admin-identity small { margin-top: 3px; color: var(--muted); }
.user-admin-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--primary-strong);
    background: var(--primary-soft);
    font-weight: 800;
}
.user-admin-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.user-admin-stats { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(70px, 1fr)); gap: 8px; }
.user-admin-stats div { min-width: 0; }
.user-admin-stats dt { color: var(--muted); font-size: 11px; }
.user-admin-stats dd { margin: 3px 0 0; overflow: hidden; color: var(--text); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.user-admin-primary-actions { justify-self: end; }
.button.secondary.danger-soft { color: var(--danger); border-color: #ffd1cc; background: var(--danger-soft); }
.button.secondary.danger-soft:hover { color: #b42318; border-color: #ffb8b0; background: #ffe8e5; }

.user-admin-details { border-top: 1px solid var(--line); }
.user-admin-details > summary {
    min-height: 38px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #526176;
    background: #fbfcff;
    cursor: pointer;
    list-style: none;
    font-weight: 700;
}
.user-admin-details > summary::-webkit-details-marker { display: none; }
.user-admin-details > summary svg { width: 16px; height: 16px; transition: transform .16s ease; }
.user-admin-details[open] > summary svg { transform: rotate(180deg); }
.user-admin-management { padding: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.user-admin-management > section { min-width: 0; }
.user-admin-management > section + section { padding-left: 24px; border-left: 1px solid var(--line); }
.user-admin-management > .user-device-section { grid-column: 1 / -1; padding: 18px 0 0; border-top: 1px solid var(--line); border-left: 0; }
.user-admin-section-title { margin-bottom: 13px; display: flex; align-items: center; gap: 10px; }
.user-admin-section-title > svg { width: 20px; height: 20px; color: var(--primary); }
.user-admin-section-title strong,
.user-admin-section-title small { display: block; }
.user-admin-section-title small { margin-top: 2px; color: var(--muted); font-weight: 400; }

.user-admin-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 10px; }
.user-admin-form label { min-width: 0; display: grid; gap: 6px; color: #596579; font-size: 12px; font-weight: 700; }
.user-admin-form input,
.user-admin-form select { width: 100%; }
.user-admin-form button { justify-self: start; }

.user-device-list { border-top: 1px solid var(--line); }
.user-device-row {
    min-height: 58px;
    display: grid;
    grid-template-columns: 28px minmax(180px, 1fr) minmax(140px, .5fr) auto auto;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--line);
}
.user-device-row:last-child { border-bottom: 0; }
.user-device-row > svg { width: 18px; height: 18px; color: #6c788b; }
.user-device-row strong,
.user-device-row small { display: block; }
.user-device-row small,
.user-device-last-seen { color: var(--muted); font-size: 11px; }
.user-device-empty,
.user-admin-empty { min-height: 140px; display: grid; place-items: center; align-content: center; gap: 7px; color: var(--muted); }
.user-device-empty { min-height: 78px; grid-auto-flow: column; justify-content: start; }
.user-device-empty svg,
.user-admin-empty svg { width: 24px; height: 24px; }

@media (max-width: 1120px) {
    .user-admin-item > header { grid-template-columns: minmax(220px, 1fr) minmax(180px, .8fr) auto; }
    .user-admin-stats { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 760px) {
    .cloud-admin-body .main > .user-admin-overview,
    .cloud-admin-body .main > .user-admin-toolbar,
    .cloud-admin-body .main > .user-admin-list,
    .cloud-admin-body .main > .pagination { width: calc(100% - 24px); }
    .user-admin-overview { grid-template-columns: 1fr 1fr; }
    .user-admin-toolbar { display: grid; }
    .user-admin-filters { display: grid; grid-template-columns: 1fr 1fr; }
    .user-search-field { width: 100%; grid-column: 1 / -1; }
    .user-create-disclosure { justify-self: stretch; }
    .user-create-disclosure > summary { width: 100%; justify-content: center; }
    .user-create-form { width: calc(100vw - 48px); right: auto; left: 0; grid-template-columns: 1fr; }
    .user-admin-item > header { grid-template-columns: 1fr auto; }
    .user-admin-badges { grid-column: 1 / -1; grid-row: 2; }
    .user-admin-stats { grid-column: 1 / -1; grid-row: 3; grid-template-columns: 1fr 1fr; }
    .user-admin-primary-actions { grid-column: 2; grid-row: 1; }
    .user-admin-management { grid-template-columns: 1fr; }
    .user-admin-management > section + section { padding: 18px 0 0; border-top: 1px solid var(--line); border-left: 0; }
    .user-admin-management > .user-device-section { grid-column: 1; }
    .user-admin-form { grid-template-columns: 1fr; }
    .user-device-row { padding: 12px 0; grid-template-columns: 28px minmax(0, 1fr) auto; }
    .user-device-last-seen { grid-column: 2; }
    .user-device-row > .badge { grid-column: 3; grid-row: 1; }
    .user-device-row > form { grid-column: 3; grid-row: 2; }
}

/* Cloud admin usability pass: one hierarchy, explicit save state and mobile drawer. */
.topbar-heading {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-nav-toggle,
.mobile-nav-backdrop {
    display: none;
}

.control-clear-status {
    width: min(1320px, calc(100% - clamp(44px, 6vw, 84px)));
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 16px auto 0;
    padding: 11px 16px;
    border: 1px solid #ccebd9;
    border-radius: 8px;
    background: var(--ok-soft);
    color: var(--ok);
}

.control-clear-status > svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.control-clear-status strong,
.control-clear-status small {
    display: block;
}

.control-clear-status small {
    margin-top: 2px;
    color: #47745d;
    font-size: 11px;
}

.model-mobile-select {
    display: none;
}

.model-status-stack {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 6px;
}

.model-block-reason {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    padding: 11px 13px;
    border: 1px solid #f2d59c;
    border-radius: 7px;
    background: var(--warn-soft);
    color: var(--warn);
}

.model-block-reason > svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.model-block-reason strong,
.model-block-reason small {
    display: block;
}

.model-block-reason small {
    margin-top: 2px;
    color: #805b22;
}

.model-editor .field > small,
.settings-service-card .field > small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.45;
}

.save-state {
    margin-right: auto;
    color: var(--muted);
    font-size: 12px;
}

[data-form-actions] {
    align-items: center;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

[data-form-actions].is-dirty {
    border-color: #b9d6ff;
    background: #f5f9ff;
}

[data-form-actions].is-dirty .save-state {
    color: var(--primary-strong);
    font-weight: 700;
}

.model-editor-actions,
.settings-sticky-actions {
    position: sticky;
    z-index: 8;
    bottom: 12px;
    margin-right: -10px;
    margin-left: -10px;
    padding: 12px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 10px 26px rgba(15, 31, 54, .10);
    backdrop-filter: blur(12px);
}

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

.settings-compact .settings-service-card,
.settings-service-card + .settings-service-card {
    min-width: 0;
    margin: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.settings-service-head {
    min-height: 42px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.settings-service-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
}

.settings-service-icon svg {
    width: 18px;
    height: 18px;
}

.settings-service-head h2,
.settings-service-head small {
    display: block;
    margin: 0;
}

.settings-service-head h2 {
    font-size: 15px;
}

.settings-service-head small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.settings-service-card .checkbox-row {
    align-self: end;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
}

.user-admin-overview {
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.user-admin-overview > div {
    min-height: 68px;
    padding: 13px 18px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.user-admin-overview > div + div {
    border-left: 1px solid var(--line);
}

.user-admin-overview strong {
    margin-top: 3px;
    font-size: 20px;
}

.user-admin-details > summary > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.user-admin-details > summary > span svg {
    width: 15px;
    height: 15px;
}

.login-page {
    background: #f5f7fa;
}

.cloud-admin-body .login-box {
    padding: 28px;
    border-color: var(--line);
    box-shadow: var(--shadow);
}

.cloud-admin-body .login-box::before,
.cloud-admin-body .login-box h1::before {
    display: none;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.login-brand strong,
.login-brand small {
    display: block;
}

.login-brand strong {
    color: var(--text);
    font-size: 21px;
}

.login-brand small,
.login-help {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.login-help {
    margin: 18px 0 0;
    text-align: center;
}

.password-field {
    position: relative;
    display: block;
}

.password-field input {
    width: 100%;
    padding-right: 44px;
}

.password-field button {
    position: absolute;
    top: 50%;
    right: 6px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    transform: translateY(-50%);
    cursor: pointer;
}

.password-field button:hover {
    background: var(--surface-soft);
    color: var(--text);
}

.password-field button svg {
    width: 17px;
    height: 17px;
}

@media (max-width: 980px) {
    .settings-service-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .cloud-admin-body .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 80;
        width: min(82vw, 300px);
        height: 100dvh;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        overflow-y: auto;
        padding: 18px 14px 16px;
        border-right: 1px solid var(--line);
        border-bottom: 0;
        background: #fff;
        box-shadow: 18px 0 50px rgba(15, 31, 54, .16);
        transform: translateX(-105%);
        transition: transform .2s ease;
    }

    .cloud-admin-body.mobile-nav-open .sidebar {
        transform: translateX(0);
    }

    .cloud-admin-body .sidebar .brand,
    .cloud-admin-body .sidebar .sidebar-meta,
    .cloud-admin-body .sidebar .nav-section {
        display: flex;
    }

    .cloud-admin-body .sidebar .brand {
        width: 100%;
        overflow: visible;
        gap: 10px;
    }

    .cloud-admin-body .sidebar .brand > span {
        display: inline;
    }

    .cloud-admin-body .sidebar .brand > .brand-mark {
        display: inline-grid;
    }

    .cloud-admin-body .sidebar .sidebar-meta {
        display: block;
    }

    .cloud-admin-body .sidebar .nav {
        flex-direction: column;
        overflow: visible;
    }

    .cloud-admin-body .sidebar .nav a {
        width: 100%;
        flex: 0 0 auto;
    }

    .cloud-admin-body .sidebar .nav .active::before {
        top: 8px;
        right: auto;
        bottom: 8px;
        left: -14px;
        width: 3px;
        height: auto;
        border-radius: 0 3px 3px 0;
    }

    .mobile-nav-toggle {
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        flex: 0 0 auto;
        padding: 0;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
        color: var(--text);
        cursor: pointer;
    }

    .mobile-nav-toggle svg {
        width: 19px;
        height: 19px;
    }

    .mobile-nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 70;
        border: 0;
        background: rgba(17, 24, 39, .32);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }

    .cloud-admin-body.mobile-nav-open .mobile-nav-backdrop {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .cloud-admin-body.mobile-nav-open {
        overflow: hidden;
    }

    .cloud-admin-body .topbar {
        position: sticky;
        top: 0;
        z-index: 30;
    }

    .model-catalog-items {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
    }

    .model-catalog-item {
        min-width: 0;
    }
}

@media (max-width: 620px) {
    .cloud-admin-body .topbar {
        min-height: 62px;
        gap: 8px;
        padding: 10px 12px;
    }

    .cloud-admin-body .topbar h1 {
        overflow: hidden;
        font-size: 18px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cloud-admin-body .topbar-heading {
        min-width: 0;
        gap: 9px;
    }

    .cloud-admin-body .topbar-heading > div {
        min-width: 0;
    }

    .cloud-admin-body .main > .control-quickbar,
    .cloud-admin-body .main > .control-overview-grid,
    .cloud-admin-body .main > .model-workspace,
    .cloud-admin-body .main > .control-clear-status {
        width: calc(100% - 24px);
    }

    .model-catalog-head {
        padding: 14px;
    }

    .model-catalog-head > div,
    .model-catalog-items {
        display: none;
    }

    .model-mobile-select {
        width: 100%;
        display: block;
    }

    .model-editor .settings-form {
        padding: 16px;
    }

    .model-editor-head {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        margin: -16px -16px 16px;
        padding: 16px;
    }

    .model-editor-head h2 {
        overflow-wrap: anywhere;
    }

    .model-editor-head p {
        overflow-wrap: anywhere;
    }

    .model-status-stack {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .model-toggle-list,
    .model-capability-summary {
        grid-template-columns: 1fr;
    }

    .model-capability-summary > div + div {
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .model-role-fieldset {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .model-editor-actions,
    .settings-sticky-actions {
        bottom: 8px;
        flex-wrap: wrap;
        margin-right: -4px;
        margin-left: -4px;
    }

    .save-state {
        width: 100%;
    }

    .settings-service-card {
        padding: 14px;
    }

    .settings-service-head {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .settings-service-head > .badge {
        grid-column: 2;
        justify-self: start;
    }

    .user-admin-overview {
        grid-template-columns: 1fr 1fr;
    }

    .user-admin-overview > div:nth-child(odd) {
        border-left: 0;
    }

    .user-admin-overview > div:nth-child(n + 3) {
        border-top: 1px solid var(--line);
    }

    .control-clear-status {
        align-items: flex-start;
    }
}
