/* ============================================================
   数字人平台 · 苹果风统一主题（浅色毛玻璃）
   各 douyin_*.html 页面在 </head> 前最后引入本文件，
   以覆盖各页面内联的深色/旧版样式。
   ============================================================ */
:root {
    color-scheme: light;
    --apple-bg: #e7eef4;
    --apple-blue: #3d75e6;
    --apple-indigo: #715bd8;
    --apple-cyan: #167fa9;
    --apple-green: #23a66e;
    --apple-red: #dc5261;
    --apple-text: #1f2937;
    --apple-muted: #68768a;
    --apple-line: rgba(255, 255, 255, .66);
    --apple-line-dark: rgba(102, 126, 148, .16);
    --apple-glass: rgba(255, 255, 255, .47);
    --apple-glass-soft: rgba(255, 255, 255, .33);
    --apple-glass-strong: rgba(255, 255, 255, .72);
    --apple-shadow: inset 0 1px 0 rgba(255,255,255,.76), 0 18px 48px rgba(31,45,61,.10);
    --apple-shadow-soft: inset 0 1px 0 rgba(255,255,255,.66), 0 8px 24px rgba(31,45,61,.065);
    --apple-radius: 17px;
}

/* ---------- 页面底色：浅灰蓝渐变 + 柔光晕 ---------- */
html {
    background: var(--apple-bg);
    color-scheme: light;
}

body {
    color: var(--apple-text) !important;
    background:
        radial-gradient(circle at 14% 3%, rgba(64,158,255,.24), transparent 31%),
        radial-gradient(circle at 88% 4%, rgba(103,194,58,.17), transparent 28%),
        radial-gradient(circle at 52% 105%, rgba(113,91,216,.13), transparent 38%),
        linear-gradient(135deg, #eef3f7 0%, #dfe8ef 100%) !important;
    background-attachment: fixed !important;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif !important;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .52;
    background:
        linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,.13) 1px, transparent 1px);
    background-size: 30px 30px;
    -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%);
    mask-image: linear-gradient(to bottom, #000, transparent 85%);
}

.app-container,
body > main,
body > .header { position: relative; z-index: 1; }

/* ---------- 顶部导航：毛玻璃 ---------- */
.header {
    background: rgba(255, 255, 255, 0.72) !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.05) !important;
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
}

.logo {
    color: var(--apple-text) !important;
}

.logo-icon {
    background: linear-gradient(135deg, #0a84ff, #5e5ce6) !important;
    border-radius: 10px !important;
    box-shadow: 0 6px 16px rgba(10, 132, 255, 0.32) !important;
    color: #fff !important;
}

.logo-copy strong {
    color: var(--apple-text) !important;
}

.logo-copy span {
    color: #86868b !important;
}

.user-menu a,
.user-menu button {
    color: var(--apple-text);
}

.header-create-link {
    color: #fff !important;
    border: 0 !important;
    background: linear-gradient(135deg, #0a84ff, #5e5ce6) !important;
    box-shadow: 0 6px 18px rgba(10, 132, 255, 0.3) !important;
    border-radius: 999px !important;
}

.header-create-link:hover {
    box-shadow: 0 9px 22px rgba(10, 132, 255, 0.4) !important;
}

/* ---------- 通用面板 / 卡片 ---------- */
.page-header,
.page-bottom,
.unified-card,
.unified-question-item,
.unified-stat-card,
.creator-panel,
.creator-workspace,
.creator-hero,
.material-page-card,
.draft-card,
.asset-modal,
.config-section {
    background: var(--apple-glass) !important;
    border: 1px solid rgba(255, 255, 255, 0.75) !important;
    border-radius: var(--apple-radius) !important;
    box-shadow: var(--apple-shadow), inset 0 1px rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.unified-card:hover,
.unified-question-item:hover,
.unified-stat-card:hover,
.draft-card:hover {
    border-color: rgba(10, 132, 255, 0.35) !important;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.1) !important;
}

.page-title,
.card-title,
.creator-panel__title,
.attribute-heading__title,
.draft-name,
.modal-title {
    color: var(--apple-text) !important;
}

.card-title {
    border-bottom: 1px solid var(--apple-line) !important;
}

.page-description,
.creator-panel__description,
.attribute-heading__description,
.creator-field__hint {
    color: var(--apple-muted) !important;
}

/* 各类次级标题 / 标签 */
.creator-eyebrow,
.attribute-heading__eyebrow,
.section-eyebrow,
.creator-panel__number,
.step-badge,
.draft-meta-label {
    color: var(--apple-muted) !important;
}

/* ---------- 按钮 ---------- */
.unified-btn-primary,
.create-role-btn,
.attribute-submit-btn,
.asset-modal__primary,
.modal-btn-confirm,
.create-btn,
.creator-action--primary,
.login-modal__submit,
.login-submit {
    color: #fff !important;
    border: 0 !important;
    background: linear-gradient(135deg, #0a84ff, #5e5ce6) !important;
    box-shadow: 0 8px 20px rgba(10, 132, 255, 0.28) !important;
    border-radius: 12px !important;
}

.unified-btn-primary:hover,
.create-role-btn:hover,
.attribute-submit-btn:hover,
.modal-btn-confirm:hover,
.create-btn:hover,
.creator-action--primary:hover,
.login-modal__submit:hover,
.login-submit:hover {
    box-shadow: 0 11px 26px rgba(10, 132, 255, 0.38) !important;
}

.unified-btn-secondary,
.modal-btn-cancel,
.asset-modal__secondary,
.back-btn,
.page-btn {
    background: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: var(--apple-text) !important;
    border-radius: 12px !important;
}

.unified-btn-secondary:hover,
.modal-btn-cancel:hover,
.back-btn:hover,
.page-btn:hover {
    border-color: rgba(10, 132, 255, 0.4) !important;
    color: var(--apple-blue) !important;
}

.btn-edit {
    background: linear-gradient(135deg, #0a84ff, #5e5ce6) !important;
    color: #fff !important;
    border-radius: 10px !important;
}

.btn-delete {
    background: rgba(255, 59, 48, 0.1) !important;
    color: #ff3b30 !important;
    border: 1px solid rgba(255, 59, 48, 0.3) !important;
    border-radius: 10px !important;
}

/* ---------- 列表项 / 表格 ---------- */
.unified-list-item {
    background: rgba(255, 255, 255, 0.55) !important;
    border: 1px solid var(--apple-line) !important;
    border-radius: 14px !important;
}

.unified-list-item:hover {
    background: rgba(240, 246, 255, 0.8) !important;
    border-color: rgba(10, 132, 255, 0.35) !important;
}

.unified-list-icon {
    background: linear-gradient(135deg, #0a84ff, #5e5ce6) !important;
    border-radius: 10px !important;
}

.unified-list-title,
.asset-list-name,
.draft-meta-item {
    color: var(--apple-text) !important;
}

.unified-list-subtitle,
.draft-meta {
    color: var(--apple-muted) !important;
}

.unified-table,
.table-container {
    background: rgba(255, 255, 255, 0.55) !important;
    border: 1px solid var(--apple-line) !important;
    border-radius: 14px !important;
}

.table-header,
.table-header.table-row {
    background: rgba(0, 0, 0, 0.03) !important;
    color: var(--apple-text) !important;
    border-bottom: 1px solid var(--apple-line) !important;
}

.table-row {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    color: var(--apple-text) !important;
}

.table-row:hover {
    background: rgba(10, 132, 255, 0.05) !important;
}

/* ---------- 选项 / 分段控件 ---------- */
.unified-option-item,
.style-option,
.choice-strip,
.role-type-option,
.feed-tab {
    color: var(--apple-text) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    background: rgba(255, 255, 255, 0.6) !important;
    border-radius: 12px !important;
}

.unified-option-item:hover,
.style-option:hover,
.feed-tab:hover {
    background: rgba(10, 132, 255, 0.07) !important;
    border-color: rgba(10, 132, 255, 0.35) !important;
}

.unified-option-item.selected,
.style-option:has(input:checked),
.feed-tab.active {
    background: rgba(10, 132, 255, 0.12) !important;
    border-color: var(--apple-blue) !important;
    color: var(--apple-blue) !important;
}

.style-selector {
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid var(--apple-line) !important;
    border-radius: 14px !important;
}

.style-selector__title {
    color: var(--apple-muted) !important;
}

/* ---------- 表单控件 ---------- */
.styled-input,
.modal-input,
.login-modal__input,
.login-field input,
.attribute-picker,
.asset-modal__input,
select {
    background: rgba(255, 255, 255, 0.75) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 12px !important;
    color: var(--apple-text) !important;
}

.styled-input:focus,
.modal-input:focus,
.login-modal__input:focus,
.login-field input:focus,
.asset-modal__input:focus {
    border-color: var(--apple-blue) !important;
    box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.14) !important;
    outline: none !important;
}

.attribute-label,
.creator-field__label,
.login-field span,
.attribute-label__hint {
    color: var(--apple-text);
}

.creator-field__label > span:first-child {
    color: var(--apple-text) !important;
}

/* 上传区 */
.unified-upload-area,
.temp-upload,
.section-upload-btn {
    background: rgba(255, 255, 255, 0.5) !important;
    border: 1.5px dashed rgba(10, 132, 255, 0.35) !important;
    border-radius: 16px !important;
}

.unified-upload-area:hover,
.temp-upload:hover {
    background: rgba(10, 132, 255, 0.05) !important;
    border-color: var(--apple-blue) !important;
}

.upload-icon,
.upload-text {
    color: var(--apple-blue) !important;
}

.upload-hint,
.temp-upload__title,
.empty-description,
.empty-hint {
    color: var(--apple-muted) !important;
}

/* ---------- 状态徽标 ---------- */
.status-badge {
    background: rgba(10, 132, 255, 0.1) !important;
    color: var(--apple-blue) !important;
    border-radius: 999px !important;
}

.score-excellent {
    background: rgba(48, 209, 88, 0.12) !important;
    color: #248a3d !important;
    border-color: rgba(48, 209, 88, 0.4) !important;
}

.score-good {
    background: rgba(255, 159, 10, 0.12) !important;
    color: #c93400 !important;
    border-color: rgba(255, 159, 10, 0.45) !important;
}

.score-poor {
    background: rgba(255, 59, 48, 0.1) !important;
    color: #d70015 !important;
    border-color: rgba(255, 59, 48, 0.4) !important;
}

/* ---------- 创作页（douyin_send）---------- */
.creator-step {
    color: var(--apple-muted) !important;
}

.creator-actions .creator-action {
    border-radius: 16px !important;
}

.creator-action--advanced {
    background: rgba(94, 92, 230, 0.1) !important;
    border: 1px solid rgba(94, 92, 230, 0.3) !important;
    color: var(--apple-indigo) !important;
}

.creator-action--podcast {
    background: rgba(48, 209, 88, 0.1) !important;
    border: 1px solid rgba(48, 209, 88, 0.3) !important;
    color: #248a3d !important;
}

.video-avatar,
.role-avatar {
    border-radius: 16px !important;
    border: 2px solid transparent;
}

.video-avatar.selected,
.role-avatar.selected {
    border-color: var(--apple-blue) !important;
    box-shadow: 0 8px 22px rgba(10, 132, 255, 0.3) !important;
}

.role-avatar.is-robot {
    outline-color: var(--apple-blue) !important;
}

/* ---------- 弹窗 ---------- */
.login-overlay,
.modal-overlay {
    background: rgba(29, 29, 31, 0.32) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

.login-modal,
.modal-box,
.login-dialog {
    background: rgba(255, 255, 255, 0.86) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 22px !important;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.22) !important;
    backdrop-filter: blur(30px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(160%) !important;
    color: var(--apple-text) !important;
}

.login-modal__title,
.login-dialog h2 {
    color: var(--apple-text) !important;
}

.login-modal__description,
.login-dialog > p,
.login-kicker {
    color: var(--apple-muted) !important;
}

.login-modal__icon,
.login-brand-mark {
    background: linear-gradient(135deg, #0a84ff, #5e5ce6) !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 20px rgba(10, 132, 255, 0.35) !important;
}

.login-close {
    color: var(--apple-muted) !important;
    background: rgba(0, 0, 0, 0.05) !important;
    border: 0 !important;
    border-radius: 50% !important;
}

/* ---------- 加载层：苹果风 ---------- */
.loading-container {
    background: rgba(245, 245, 247, 0.55) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
}

.spinner {
    width: 46px !important;
    height: 46px !important;
    border: 4px solid rgba(10, 132, 255, 0.18) !important;
    border-top-color: var(--apple-blue) !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    filter: none !important;
    animation: appleSpin 0.9s linear infinite !important;
}

.spinner::before,
.spinner::after {
    display: none !important;
}

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

.loading-text {
    color: var(--apple-text) !important;
    text-shadow: none !important;
    font-weight: 500 !important;
    animation: none !important;
}

/* ---------- 底部导航（苹果风强化） ---------- */
.douyin-bottom-nav {
    background: rgba(255, 255, 255, 0.78) !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.12) !important;
    backdrop-filter: blur(26px) saturate(170%) !important;
    -webkit-backdrop-filter: blur(26px) saturate(170%) !important;
}

.douyin-nav-item {
    color: #86868b !important;
}

.douyin-nav-item:hover,
.douyin-nav-item:focus-visible {
    color: var(--apple-blue) !important;
    background: rgba(10, 132, 255, 0.08) !important;
}

.douyin-nav-item.is-active {
    color: var(--apple-blue) !important;
    background: rgba(10, 132, 255, 0.12) !important;
}

.douyin-nav-item--create .douyin-nav-icon-wrap {
    background: linear-gradient(135deg, #0a84ff, #5e5ce6) !important;
    box-shadow: 0 8px 20px rgba(10, 132, 255, 0.38) !important;
    border-radius: 14px !important;
}

/* ---------- 杂项 ---------- */
.progress {
    color: var(--apple-blue) !important;
}

.t-input {
    background: rgba(255, 255, 255, 0.75) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 12px !important;
    color: var(--apple-text) !important;
}

.t-tabs__nav-item.t-is-active {
    color: var(--apple-blue) !important;
}

.empty-icon {
    color: #c7c7cc !important;
}

.empty-text {
    color: var(--apple-text) !important;
}

.user-info,
.page-info {
    color: var(--apple-muted) !important;
}

.pagination-wrap .page-btn.is-active,
.page-btn.is-active {
    background: linear-gradient(135deg, #0a84ff, #5e5ce6) !important;
    color: #fff !important;
    border-color: transparent !important;
}

/* 高级编辑页（深色工作流）关键区块提亮 */
.workflow-container .step-container,
.workflow-container .config-section {
    background: var(--apple-glass) !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    border-radius: var(--apple-radius) !important;
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
}

/* 滚动条苹果风 */
::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.18);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-track {
    background: transparent;
}

/* ============================================================
   systemallview 同款毛玻璃精修层
   ============================================================ */
button,
input,
select,
textarea { font: inherit; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(61,117,230,.20) !important;
    outline-offset: 2px;
}

.header {
    min-height: 70px !important;
    border-bottom: 1px solid var(--apple-line) !important;
    background: rgba(255,255,255,.43) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.78), 0 12px 34px rgba(31,45,61,.075) !important;
    backdrop-filter: blur(24px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(24px) saturate(1.2) !important;
}

.header-content {
    width: min(1400px,100%) !important;
    max-width: none !important;
    min-height: 70px !important;
    height: 70px !important;
    padding-inline: 28px !important;
}

.logo {
    color: #26374a !important;
    font-size: 17px !important;
    font-weight: 760 !important;
    letter-spacing: -.015em;
}

.logo-icon {
    width: 40px !important;
    height: 40px !important;
    margin-right: 12px !important;
    border: 1px solid rgba(255,255,255,.78) !important;
    border-radius: 13px !important;
    color: #fff !important;
    background: linear-gradient(135deg, rgba(113,91,216,.88), rgba(61,117,230,.84)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.48), 0 9px 24px rgba(80,95,205,.23) !important;
}

.logo-copy strong { color: #26374a !important; font-weight: 760 !important; }
.logo-copy span { color: #718095 !important; }

.notification-button,
.user-profile-button,
.back-btn,
.back-fab,
.history-toggle-btn,
.header-actions > button {
    border: 1px solid var(--apple-line) !important;
    border-radius: 11px !important;
    color: #52667c !important;
    background: rgba(255,255,255,.38) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.68), 0 6px 16px rgba(31,45,61,.05) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
}

.douyin-home-page .user-menu {
    gap: 8px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.douyin-home-page .notification-button {
    position: relative;
    width: 38px;
    height: 38px;
    min-width: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    padding: 0 !important;
    cursor: pointer;
}

.douyin-home-page .notification-button svg {
    width: 17px;
    height: 17px;
    display: block;
    color: #5d7086;
}

.douyin-home-page .notification-dot { display: none; }
.douyin-home-page .notification-button.has-notifications .notification-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 5px;
    height: 5px;
    display: block;
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 50%;
    background: #ff5c64;
    box-shadow: 0 0 0 2px rgba(255,92,100,.1);
}

.douyin-home-page .user-profile-button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 10px 0 6px !important;
    cursor: pointer;
    white-space: nowrap;
}

.douyin-home-page .user-profile-avatar {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    flex: 0 0 26px;
    border: 1px solid rgba(255,255,255,.76);
    border-radius: 9px;
    color: #486078;
    background: rgba(255,255,255,.5);
    font-size: 12px;
    font-weight: 700;
}

.douyin-home-page .user-chevron {
    color: #8090a2;
    font-size: 13px;
    line-height: 1;
}

.header-create-link {
    min-height: 38px;
    padding-inline: 16px !important;
    border: 1px solid rgba(255,255,255,.68) !important;
    border-radius: 11px !important;
    background: linear-gradient(135deg, rgba(113,91,216,.92), rgba(61,117,230,.90)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 20px rgba(80,95,205,.18) !important;
}

.main-content {
    width: min(1400px,100%) !important;
    max-width: none !important;
    margin-inline: auto !important;
    padding: 28px 28px 112px !important;
}

.page-header,
.page-bottom,
.unified-card,
.unified-question-item,
.unified-stat-card,
.creator-panel,
.creator-workspace,
.creator-hero,
.material-page-card,
.draft-card,
.asset-modal,
.config-section,
.card,
.step-card,
.publish-section,
.final-video-container {
    border: 1px solid var(--apple-line) !important;
    background: var(--apple-glass) !important;
    box-shadow: var(--apple-shadow) !important;
    backdrop-filter: blur(22px) saturate(1.16) !important;
    -webkit-backdrop-filter: blur(22px) saturate(1.16) !important;
}

.page-header,
.creator-hero,
.material-page-card { border-radius: 19px !important; }

.unified-card,
.creator-panel,
.draft-card,
.card,
.step-card { border-radius: 16px !important; }

.unified-card:hover,
.unified-question-item:hover,
.unified-stat-card:hover,
.draft-card:hover,
.card:hover,
.step-card:hover {
    transform: none !important;
    border-color: rgba(255,255,255,.84) !important;
    background: rgba(255,255,255,.56) !important;
    box-shadow: var(--apple-shadow) !important;
}

.page-title,
.card-title,
.creator-panel__title,
.attribute-heading__title,
.draft-name,
.modal-title,
.step-title,
.podcast-card__title {
    color: #27384a !important;
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
    text-shadow: none !important;
    letter-spacing: -.02em;
}

.page-description,
.page-subtitle,
.creator-panel__description,
.attribute-heading__description,
.creator-field__hint,
.step-description,
.podcast-card__description { color: var(--apple-muted) !important; }

.card-title { border-bottom-color: var(--apple-line-dark) !important; }

.unified-btn-primary,
.create-role-btn,
.attribute-submit-btn,
.asset-modal__primary,
.modal-btn-confirm,
.create-btn,
.creator-action--primary,
.login-modal__submit,
.login-submit,
.btn-primary,
.publish-btn,
.download-primary {
    border: 1px solid rgba(255,255,255,.68) !important;
    border-radius: 11px !important;
    color: #fff !important;
    background: linear-gradient(135deg, rgba(113,91,216,.92), rgba(61,117,230,.90)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 20px rgba(80,95,205,.18) !important;
}

.unified-btn-primary:hover,
.create-role-btn:hover,
.attribute-submit-btn:hover,
.modal-btn-confirm:hover,
.create-btn:hover,
.creator-action--primary:hover,
.btn-primary:hover,
.publish-btn:hover,
.download-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 11px 26px rgba(80,95,205,.23) !important;
}

.unified-btn-secondary,
.modal-btn-cancel,
.asset-modal__secondary,
.back-btn,
.page-btn,
.btn-secondary,
.copy-btn,
.regenerate-item-btn,
.regenerate-modal-btns button,
.audio-action,
.history-close-btn {
    border: 1px solid var(--apple-line) !important;
    border-radius: 10px !important;
    color: #42566c !important;
    background: rgba(255,255,255,.42) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.70), 0 6px 16px rgba(31,45,61,.05) !important;
}

.unified-btn-secondary:hover,
.modal-btn-cancel:hover,
.back-btn:hover,
.page-btn:hover,
.btn-secondary:hover,
.copy-btn:hover,
.regenerate-item-btn:hover,
.audio-action:hover {
    transform: translateY(-1px) !important;
    border-color: rgba(255,255,255,.84) !important;
    color: #315fbd !important;
    background: rgba(255,255,255,.72) !important;
    box-shadow: var(--apple-shadow-soft) !important;
}

.unified-list-item,
.unified-table,
.table-container,
.style-selector,
.choice-strip,
.role-list-panel,
.vm-role-info-card,
.role-type-card,
.timbre-source-list,
.audio-container,
.download-container,
.history-item {
    border: 1px solid var(--apple-line) !important;
    border-radius: 14px !important;
    background: rgba(255,255,255,.34) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.62) !important;
}

.unified-list-item:hover,
.role-type-card:hover,
.history-item:hover { background: rgba(255,255,255,.62) !important; }

.table-header,
.table-header.table-row { background: rgba(255,255,255,.30) !important; border-bottom-color: var(--apple-line-dark) !important; }
.table-row { border-bottom-color: var(--apple-line-dark) !important; }
.table-row:hover { background: rgba(255,255,255,.38) !important; }

.unified-option-item,
.style-option,
.role-type-option,
.feed-tab,
.mode-option,
.filter-tag {
    border: 1px solid var(--apple-line) !important;
    border-radius: 11px !important;
    color: #52667c !important;
    background: rgba(255,255,255,.38) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.64) !important;
}

.unified-option-item:hover,
.style-option:hover,
.feed-tab:hover,
.mode-option:hover,
.filter-tag:hover { background: rgba(255,255,255,.64) !important; }

.unified-option-item.selected,
.style-option:has(input:checked),
.feed-tab.active,
.mode-option.selected,
.filter-tag.active {
    border-color: rgba(61,117,230,.32) !important;
    color: #315fbd !important;
    background: rgba(229,239,255,.68) !important;
    box-shadow: 0 0 0 3px rgba(61,117,230,.06) !important;
}

input,
select,
textarea,
.styled-input,
.modal-input,
.login-modal__input,
.login-field input,
.attribute-picker,
.asset-modal__input,
.text-input,
.regenerate-modal-input,
.form-input,
.form-textarea,
.speaker-select,
.json-editor {
    border: 1px solid rgba(102,126,148,.18) !important;
    border-radius: 10px !important;
    color: #26374a !important;
    background: rgba(255,255,255,.53) !important;
    box-shadow: inset 0 1px 2px rgba(31,45,61,.025) !important;
}

input:focus,
select:focus,
textarea:focus,
.styled-input:focus,
.modal-input:focus,
.login-modal__input:focus,
.login-field input:focus,
.asset-modal__input:focus,
.text-input:focus,
.form-input:focus,
.form-textarea:focus,
.speaker-select:focus,
.json-editor:focus {
    outline: none !important;
    border-color: rgba(61,117,230,.48) !important;
    background: rgba(255,255,255,.72) !important;
    box-shadow: 0 0 0 4px rgba(61,117,230,.085) !important;
}

input::placeholder,
textarea::placeholder,
.text-input::placeholder { color: #8a98a8 !important; }

.unified-upload-area,
.temp-upload,
.section-upload-btn,
.upload-zone,
.regen-ref-upload {
    border: 1.5px dashed rgba(61,117,230,.28) !important;
    border-radius: 14px !important;
    color: #516b86 !important;
    background: rgba(255,255,255,.30) !important;
}
.unified-upload-area:hover,
.temp-upload:hover,
.upload-zone:hover,
.regen-ref-upload:hover { border-color: rgba(61,117,230,.50) !important; background: rgba(255,255,255,.56) !important; }

.status-badge,
.step-status,
.history-item-type,
.podcast-hero__badge {
    border: 1px solid rgba(61,117,230,.16) !important;
    border-radius: 999px !important;
    color: #315fbd !important;
    background: rgba(61,117,230,.09) !important;
}

/* 首页 */
.douyin-home-page .home-hero,
.douyin-home-page .feed-panel {
    border: 1px solid var(--apple-line) !important;
    background: var(--apple-glass) !important;
    box-shadow: var(--apple-shadow) !important;
    backdrop-filter: blur(22px) saturate(1.16) !important;
    -webkit-backdrop-filter: blur(22px) saturate(1.16) !important;
}
.douyin-home-page .home-hero { border-radius: 20px !important; }
.douyin-home-page .home-hero::before { opacity: .45; }
.douyin-home-page .hero-copy h1 { color: #23364a !important; font-weight: 780 !important; }
.douyin-home-page .hero-copy p { color: var(--apple-muted) !important; }
.douyin-home-page .hero-overview {
    border-color: var(--apple-line) !important;
    background: rgba(255,255,255,.34) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.68) !important;
}
.douyin-home-page .overview-orbit { box-shadow: 0 0 0 14px rgba(61,117,230,.035) !important; }
.douyin-home-page .overview-orbit > span { background: linear-gradient(135deg, rgba(113,91,216,.90), rgba(61,117,230,.88)) !important; box-shadow: 0 10px 26px rgba(80,95,205,.19) !important; }
.douyin-home-page .video-stage { border-radius: 16px !important; box-shadow: 0 14px 34px rgba(31,45,61,.12) !important; }
.douyin-home-page .feed-toolbar { border-bottom-color: var(--apple-line-dark) !important; }

/* 创作页 */
.douyin-create-page .creator-hero {
    overflow: hidden;
    background: var(--apple-glass) !important;
}
.douyin-create-page .creator-hero::before,
.douyin-create-page .creator-hero::after { opacity: .32 !important; }
.douyin-create-page .creator-hero__content h1 { color: #23364a !important; background: none !important; -webkit-text-fill-color: currentColor !important; }
.douyin-create-page .creator-hero__content p { color: var(--apple-muted) !important; }
.douyin-create-page .creator-steps { border-color: var(--apple-line) !important; background: rgba(255,255,255,.30) !important; }
.douyin-create-page .creator-step { color: #607287 !important; }
.douyin-create-page .creator-step.active { color: #315fbd !important; }
.douyin-create-page .creator-panel__number {
    border: 1px solid var(--apple-line) !important;
    color: #45668c !important;
    background: rgba(255,255,255,.44) !important;
}
.douyin-create-page .creator-action--advanced { color: #5d50be !important; background: rgba(113,91,216,.09) !important; }
.douyin-create-page .creator-action--podcast { color: #1d8259 !important; background: rgba(35,166,110,.09) !important; }

/* 创作页桌面布局：共享 1400px 画布会让表单和操作区横向失衡。 */
@media (min-width: 901px) {
    .douyin-create-page .header-content {
        width: min(1200px, calc(100% - 40px)) !important;
        max-width: 1200px !important;
        padding-inline: 20px !important;
    }

    .douyin-create-page .main-content {
        width: min(1180px, calc(100% - 40px)) !important;
        max-width: 1180px !important;
        padding: 28px 0 116px !important;
    }

    .douyin-create-page .creator-workspace {
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .douyin-create-page .back-fab {
        left: max(12px, calc(50% - 646px)) !important;
    }
}

/* 作品列表 */
.douyin-works-page .page-header {
    height: auto !important;
    min-height: 88px;
    margin-top: 20px;
    padding: 16px 20px !important;
    justify-content: flex-start !important;
    gap: 7px !important;
}
.douyin-works-page .page-header .page-title {
    min-height: 36px;
    margin: 0 !important;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--apple-line);
    border-radius: 10px;
    color: #5c6e82 !important;
    background: rgba(255,255,255,.34) !important;
    font-size: 13px !important;
    cursor: pointer;
}
.douyin-works-page .page-header h1.page-title { color: #315fbd !important; background: rgba(229,239,255,.64) !important; }
.douyin-works-page .page-bottom { overflow: hidden; }

/* 个人中心 */
.douyin-profile-page .user-profile-card {
    padding: 24px 26px !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: hidden;
}
.douyin-profile-page .user-profile-card > div:first-child { align-items: center; }
.douyin-profile-page .user-profile-card > div:nth-child(2) {
    height: auto !important;
    min-height: 54px;
    display: flex;
    align-items: center;
}
.douyin-profile-page .user-profile-card > div:nth-child(5) {
    height: auto !important;
    min-height: 54px;
    margin-top: 16px !important;
    padding: 10px 0;
    justify-content: flex-start !important;
    gap: 8px !important;
}
.douyin-profile-page .user-profile-card > div:nth-child(5) .page-title {
    min-height: 34px;
    margin: 0 !important;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--apple-line);
    border-radius: 10px;
    color: #5c6f84 !important;
    background: rgba(255,255,255,.34) !important;
    font-size: 13px !important;
}
.douyin-profile-page #userNameDiv {
    color: #27384a !important;
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
    text-shadow: none !important;
}
.douyin-profile-page #role-list,
.douyin-material-page #role-list,
.douyin-material-page #role-list-img-3d,
.douyin-material-page #timbre-list,
.douyin-material-page #img-list,
.douyin-material-page #sound-list {
    min-height: 72px !important;
    max-height: 170px !important;
    margin: 16px 0 24px !important;
    padding: 10px !important;
    border: 1px solid var(--apple-line) !important;
    border-radius: 13px !important;
    background: rgba(255,255,255,.28) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.62) !important;
}
.douyin-profile-page #role-list:empty,
.douyin-material-page #role-list:empty,
.douyin-material-page #role-list-img-3d:empty { display: none !important; }
.douyin-profile-page #play {
    min-height: 460px;
    height: auto !important;
    margin-top: 14px;
    overflow: hidden !important;
    border: 1px solid var(--apple-line) !important;
    border-radius: 17px !important;
    background: rgba(255,255,255,.34) !important;
    box-shadow: var(--apple-shadow) !important;
    backdrop-filter: blur(20px) !important;
}
.douyin-profile-page .role-section-heading,
.douyin-material-page .material-section-header {
    border-bottom-color: var(--apple-line-dark) !important;
    color: #354b61 !important;
}

/* 素材中心 */
.douyin-material-page .material-page-card { padding: 24px !important; }
.douyin-material-page .role-toolbar,
.douyin-material-page .attribute-form,
.douyin-material-page .role-type-fieldset {
    border: 1px solid var(--apple-line) !important;
    border-radius: 14px !important;
    background: rgba(255,255,255,.28) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.60) !important;
}
.douyin-material-page .role-preview-avatar,
.douyin-material-page .role-avatar { box-shadow: 0 8px 22px rgba(31,45,61,.11) !important; }
.douyin-material-page .attribute-heading__eyebrow { color: #5d7187 !important; }
.douyin-material-page .logo-button {
    border: 1px solid rgba(255,255,255,.68) !important;
    border-radius: 11px !important;
    color: #fff !important;
    background: linear-gradient(135deg, rgba(113,91,216,.92), rgba(61,117,230,.90)) !important;
    box-shadow: 0 8px 20px rgba(80,95,205,.18) !important;
    font-size: 14px !important;
}

.douyin-profile-page #goback,
.douyin-material-page #goback,
.douyin-works-page #goback {
    z-index: 1200 !important;
    width: 38px !important;
    height: 38px !important;
    top: 82px !important;
    left: 18px !important;
    border: 1px solid var(--apple-line) !important;
    border-radius: 11px !important;
    color: #52667c !important;
    background: rgba(255,255,255,.50) !important;
    box-shadow: var(--apple-shadow-soft) !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
}
.douyin-profile-page #goback > div,
.douyin-material-page #goback > div,
.douyin-works-page #goback > div {
    width: 12px !important;
    height: 12px !important;
    border-color: #5b6f85 !important;
    border-width: 1.7px !important;
}

/* 草稿 */
.douyin-draft-page .main-content { width: min(1180px,100%) !important; }
.douyin-draft-page .page-header {
    padding: 26px 28px !important;
    margin-top: 20px;
}
.douyin-draft-page .draft-list { gap: 12px !important; }
.douyin-draft-page .draft-card { padding: 18px !important; }
.douyin-draft-page .draft-actions { border-top-color: var(--apple-line-dark) !important; }
.douyin-draft-page .step-badge { border: 1px solid var(--apple-line) !important; background: rgba(255,255,255,.36) !important; }
.douyin-draft-page .modal-overlay { position: fixed !important; inset: 0 !important; z-index: 10020 !important; }

/* 高级视频编辑 */
.douyin-advanced-page .main-content { width: min(1320px,100%) !important; }
.douyin-advanced-page .workflow-container { gap: 0 !important; }
.douyin-advanced-page .config-section {
    padding: 20px !important;
    margin-bottom: 14px !important;
    border-radius: 16px !important;
}
.douyin-advanced-page .step-card {
    width: 100% !important;
    padding: 22px !important;
    opacity: 1 !important;
}
.douyin-advanced-page .step-card.waiting { opacity: .62 !important; }
.douyin-advanced-page .step-card.active {
    border-color: rgba(61,117,230,.36) !important;
    background: rgba(241,246,255,.62) !important;
    box-shadow: 0 0 0 3px rgba(61,117,230,.06), var(--apple-shadow) !important;
}
.douyin-advanced-page .step-card.completed {
    border-color: rgba(35,166,110,.22) !important;
    background: rgba(237,250,244,.55) !important;
}
.douyin-advanced-page .step-connector {
    width: 2px !important;
    height: 30px !important;
    background: rgba(94,119,143,.18) !important;
}
.douyin-advanced-page .step-connector::before {
    width: 8px !important;
    height: 8px !important;
    background: #6b86b0 !important;
    box-shadow: 0 0 0 4px rgba(255,255,255,.48) !important;
}
.douyin-advanced-page .step-number {
    width: 38px !important;
    height: 38px !important;
    border: 1px solid rgba(255,255,255,.70) !important;
    color: #fff !important;
    background: linear-gradient(135deg, rgba(113,91,216,.90), rgba(61,117,230,.88)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.34), 0 7px 18px rgba(80,95,205,.16) !important;
}
.douyin-advanced-page .step-header { margin-bottom: 14px !important; }
.douyin-advanced-page .step-content { border-top-color: var(--apple-line-dark) !important; }
.douyin-advanced-page .input-label,
.douyin-advanced-page .image-card-desc,
.douyin-advanced-page .video-card-info { color: var(--apple-muted) !important; }
.douyin-advanced-page .image-grid,
.douyin-advanced-page .video-grid,
.douyin-advanced-page .shot-images,
.douyin-advanced-page .regen-ref-grid {
    gap: 10px !important;
}
.douyin-advanced-page .image-card,
.douyin-advanced-page .video-card,
.douyin-advanced-page .shot-image-box,
.douyin-advanced-page .regen-ref-item {
    border: 1px solid var(--apple-line) !important;
    border-radius: 13px !important;
    background: rgba(255,255,255,.38) !important;
    box-shadow: var(--apple-shadow-soft) !important;
}
.douyin-advanced-page .module-loading-card {
    border-color: var(--apple-line) !important;
    background: rgba(255,255,255,.40) !important;
    color: #52667c !important;
}
.douyin-advanced-page .regenerate-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 10020 !important;
    background: rgba(36,48,64,.26) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}
.douyin-advanced-page .regenerate-modal-content {
    border: 1px solid var(--apple-line) !important;
    border-radius: 18px !important;
    color: var(--apple-text) !important;
    background: rgba(247,250,253,.88) !important;
    box-shadow: 0 28px 80px rgba(31,45,61,.22) !important;
    backdrop-filter: blur(24px) !important;
}
.douyin-advanced-page .json-editor {
    color: #dcecff !important;
    background: #101a27 !important;
    border-color: rgba(255,255,255,.12) !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
}

/* 播客生成 */
.douyin-podcast-page .main-content { width: min(1060px,100%) !important; }
.douyin-podcast-page .podcast-hero {
    margin-bottom: 18px !important;
    padding: 32px 34px !important;
    border: 1px solid var(--apple-line) !important;
    border-radius: 19px !important;
    color: var(--apple-text) !important;
    background: var(--apple-glass) !important;
    box-shadow: var(--apple-shadow) !important;
    backdrop-filter: blur(22px) saturate(1.16) !important;
    -webkit-backdrop-filter: blur(22px) saturate(1.16) !important;
}
.douyin-podcast-page .podcast-hero::before,
.douyin-podcast-page .podcast-hero::after { opacity: .28 !important; }
.douyin-podcast-page .podcast-eyebrow { color: #55768b !important; }
.douyin-podcast-page .podcast-hero h1 { color: #23364a !important; background: none !important; -webkit-text-fill-color: currentColor !important; }
.douyin-podcast-page .podcast-hero p { color: var(--apple-muted) !important; }
.douyin-podcast-page .podcast-card { padding: 24px !important; }
.douyin-podcast-page .podcast-card__number {
    border: 1px solid var(--apple-line) !important;
    color: #45668c !important;
    background: rgba(255,255,255,.42) !important;
}
.douyin-podcast-page .speaker-selector,
.douyin-podcast-page .token-config {
    border: 1px solid var(--apple-line) !important;
    border-radius: 14px !important;
    background: rgba(255,255,255,.28) !important;
}
.douyin-podcast-page .progress-bar { background: rgba(61,117,230,.10) !important; }
.douyin-podcast-page .progress-fill { background: linear-gradient(90deg,#715bd8,#3d75e6) !important; }
.douyin-podcast-page .history-overlay {
    background: rgba(36,48,64,.22) !important;
    backdrop-filter: blur(8px) !important;
}
.douyin-podcast-page .history-sidebar {
    border-left: 1px solid var(--apple-line) !important;
    color: var(--apple-text) !important;
    background: rgba(240,246,250,.88) !important;
    box-shadow: -18px 0 48px rgba(31,45,61,.13) !important;
    backdrop-filter: blur(28px) !important;
    -webkit-backdrop-filter: blur(28px) !important;
}
.douyin-podcast-page .history-header { border-bottom-color: var(--apple-line-dark) !important; }
.douyin-podcast-page .log-container { border: 1px solid rgba(255,255,255,.10) !important; border-radius: 12px !important; background: #101a27 !important; }

/* 弹层与底部导航 */
.login-overlay,
.modal-overlay,
.loading-overlay {
    position: fixed !important;
    inset: 0 !important;
}
.login-overlay,
.modal-overlay {
    background: rgba(36,48,64,.26) !important;
    backdrop-filter: blur(12px) saturate(.9) !important;
    -webkit-backdrop-filter: blur(12px) saturate(.9) !important;
}
.login-modal,
.modal-box,
.login-dialog,
.asset-modal {
    border: 1px solid var(--apple-line) !important;
    border-radius: 19px !important;
    color: var(--apple-text) !important;
    background: rgba(247,250,253,.86) !important;
    box-shadow: 0 28px 80px rgba(31,45,61,.22) !important;
    backdrop-filter: blur(26px) saturate(1.12) !important;
    -webkit-backdrop-filter: blur(26px) saturate(1.12) !important;
}
.loading-container,
.loading-overlay {
    overflow: hidden !important;
    background: rgba(226,235,243,.76) !important;
    backdrop-filter: blur(18px) !important;
}
.loading-container::before,
.loading-overlay::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: -55%;
    bottom: -55%;
    left: -42%;
    width: 32%;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.72) 48%, rgba(199,227,245,.42) 58%, transparent);
    filter: blur(12px);
    transform: skewX(-18deg);
    animation: douyinOperationGlassSweep 2.1s cubic-bezier(.4,0,.2,1) infinite;
}
.loading-container > *,
.loading-overlay > * { position: relative; z-index: 1; }
.loading-card,
.module-loading-card {
    border: 1px solid rgba(255,255,255,.76) !important;
    border-radius: 18px !important;
    background: rgba(247,250,253,.72) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.84), 0 20px 54px rgba(31,45,61,.14) !important;
    backdrop-filter: blur(24px) saturate(1.12) !important;
    -webkit-backdrop-filter: blur(24px) saturate(1.12) !important;
}
.spinner,
.spinner-large,
.module-loading-spinner {
    border-color: rgba(61,117,230,.14) !important;
    border-top-color: var(--apple-blue) !important;
    box-shadow: none !important;
    filter: none !important;
}
.loading-text,
.module-loading-text {
    color: #26384b !important;
    animation: douyinLoadingTextPulse 1.45s ease-in-out infinite;
}

@keyframes douyinOperationGlassSweep {
    0% { left: -42%; opacity: 0; }
    16% { opacity: .72; }
    76% { opacity: .62; }
    100% { left: 112%; opacity: 0; }
}
@keyframes douyinLoadingTextPulse { 50% { opacity: .56; } }

.douyin-bottom-nav {
    width: min(calc(100% - 24px),680px) !important;
    border: 1px solid var(--apple-line) !important;
    background: rgba(242,248,252,.72) !important;
    box-shadow: var(--apple-shadow) !important;
    backdrop-filter: blur(28px) saturate(1.16) !important;
    -webkit-backdrop-filter: blur(28px) saturate(1.16) !important;
}
.douyin-nav-item { color: #708095 !important; }
.douyin-nav-item:hover,
.douyin-nav-item:focus-visible { color: #315fbd !important; background: rgba(255,255,255,.42) !important; }
.douyin-nav-item.is-active { color: #315fbd !important; background: rgba(229,239,255,.64) !important; }
.douyin-nav-item--create .douyin-nav-icon-wrap {
    background: linear-gradient(135deg, rgba(113,91,216,.92), rgba(61,117,230,.90)) !important;
    box-shadow: 0 8px 20px rgba(80,95,205,.19) !important;
}

.float-back {
    opacity: .72 !important;
    filter: none !important;
    border-color: var(--apple-line) !important;
    color: #486078 !important;
    background: rgba(255,255,255,.46) !important;
    box-shadow: var(--apple-shadow-soft) !important;
    backdrop-filter: blur(22px) saturate(1.15) !important;
    -webkit-backdrop-filter: blur(22px) saturate(1.15) !important;
}

/* 高级视频编辑的手机引擎选择器；桌面继续使用原生 select。 */
.mobile-engine-picker {
    display: none;
}

@media (max-width: 760px) {
    .header-content { min-height: 62px !important; height: 62px !important; padding-inline: 13px !important; }
    .main-content { padding: 14px 12px 96px !important; }
    .page-header,
    .creator-hero,
    .podcast-hero { padding: 22px 18px !important; border-radius: 16px !important; }
    .unified-card,
    .creator-panel,
    .step-card,
    .card { padding: 17px 14px !important; border-radius: 15px !important; }
    .douyin-home-page .home-hero { padding: 28px 20px !important; }
    .douyin-advanced-page .step-header { align-items: flex-start !important; }
    .douyin-advanced-page .step-status { margin-left: auto; }
    .douyin-podcast-page .mode-selector { flex-direction: column !important; }
    .douyin-bottom-nav { width: 100% !important; }

    /* 高级视频编辑：手机头部改为标题行 + 操作行，避免长模型名挤掉标题和按钮。 */
    .douyin-advanced-v2-page .header {
        min-height: 112px !important;
    }
    .douyin-advanced-v2-page .header-content {
        min-height: 112px !important;
        height: auto !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        align-content: center;
        gap: 8px;
        padding: 8px 12px !important;
    }
    .douyin-advanced-v2-page .logo {
        min-width: 0;
        max-width: 100% !important;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .douyin-advanced-v2-page .logo-icon {
        flex: 0 0 auto;
    }
    .douyin-advanced-v2-page .advanced-header-actions {
        min-width: 0;
        width: 100%;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto auto;
        align-items: center;
        gap: 8px !important;
    }
    .douyin-advanced-v2-page #globalEngineSelect {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        min-height: 38px;
        padding: 0 30px 0 10px !important;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .douyin-advanced-v2-page #saveDraftBtn,
    .douyin-advanced-v2-page .advanced-header-actions .back-btn {
        min-height: 38px;
        margin: 0;
        flex: none;
        white-space: nowrap;
    }
    .douyin-advanced-v2-page #saveDraftBtn {
        padding: 0 12px !important;
    }
    .douyin-advanced-v2-page .advanced-header-actions .back-btn {
        padding: 0 10px !important;
    }
}

@media (max-width: 640px) {
    .douyin-home-page .notification-button { display: none !important; }
    .douyin-advanced-v2-page .header {
        min-height: 158px !important;
    }
    .douyin-advanced-v2-page .header-content {
        min-height: 158px !important;
    }
    .douyin-advanced-v2-page .advanced-header-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .douyin-advanced-v2-page #globalEngineSelect {
        display: none !important;
    }
    .douyin-advanced-v2-page .mobile-engine-picker {
        position: relative;
        z-index: 30;
        grid-column: 1 / -1;
        display: block;
        min-width: 0;
        width: 100%;
    }
    .douyin-advanced-v2-page .mobile-engine-trigger {
        width: 100%;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 7px 13px;
        border: 1px solid rgba(61,117,230,.28);
        border-radius: 12px;
        color: #26384b;
        background: rgba(255,255,255,.72);
        box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 5px 15px rgba(31,45,61,.07);
        text-align: left;
        cursor: pointer;
    }
    .douyin-advanced-v2-page .mobile-engine-picker.is-open .mobile-engine-trigger {
        border-color: rgba(61,117,230,.56);
        box-shadow: 0 0 0 3px rgba(61,117,230,.1), 0 7px 18px rgba(31,45,61,.08);
    }
    .douyin-advanced-v2-page .mobile-engine-trigger-copy {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 1px;
    }
    .douyin-advanced-v2-page .mobile-engine-trigger-copy strong {
        overflow: hidden;
        font-size: 16px;
        line-height: 1.3;
        font-weight: 720;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .douyin-advanced-v2-page .mobile-engine-trigger-copy small {
        overflow: hidden;
        color: #718095;
        font-size: 12px;
        line-height: 1.3;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .douyin-advanced-v2-page .mobile-engine-chevron {
        flex: none;
        width: 9px;
        height: 9px;
        margin-right: 3px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        color: #52667c;
        font-size: 0;
        line-height: 0;
        transform: rotate(45deg);
        transition: transform .16s ease;
    }
    .douyin-advanced-v2-page .mobile-engine-picker.is-open .mobile-engine-chevron {
        transform: rotate(225deg);
    }
    .douyin-advanced-v2-page .mobile-engine-menu {
        position: absolute;
        top: calc(100% + 7px);
        left: 0;
        right: 0;
        z-index: 100;
        display: grid;
        gap: 6px;
        padding: 7px;
        border: 1px solid rgba(255,255,255,.92);
        border-radius: 14px;
        background: rgba(243,248,252,.995);
        box-shadow: 0 18px 44px rgba(31,45,61,.2), inset 0 1px 0 rgba(255,255,255,.96);
        -webkit-backdrop-filter: blur(24px) saturate(1.15);
        backdrop-filter: blur(24px) saturate(1.15);
    }
    .douyin-advanced-v2-page .mobile-engine-menu[hidden] {
        display: none !important;
    }
    .douyin-advanced-v2-page .mobile-engine-option {
        width: 100%;
        min-height: 64px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        padding: 9px 12px;
        border: 1px solid transparent;
        border-radius: 11px;
        color: #26384b;
        background: transparent;
        text-align: left;
        cursor: pointer;
    }
    .douyin-advanced-v2-page .mobile-engine-option span {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    .douyin-advanced-v2-page .mobile-engine-option strong {
        font-size: 16px;
        line-height: 1.3;
        font-weight: 720;
    }
    .douyin-advanced-v2-page .mobile-engine-option small {
        color: #718095;
        font-size: 14px;
        line-height: 1.35;
    }
    .douyin-advanced-v2-page .mobile-engine-option i {
        display: none;
        width: 24px;
        height: 24px;
        place-items: center;
        border-radius: 999px;
        color: #fff;
        background: linear-gradient(135deg,#715bd8,#3d75e6);
        font-size: 13px;
        font-style: normal;
    }
    .douyin-advanced-v2-page .mobile-engine-option.is-selected {
        border-color: rgba(61,117,230,.22);
        background: rgba(229,239,255,.72);
    }
    .douyin-advanced-v2-page .mobile-engine-option.is-selected i {
        display: grid;
    }
    .douyin-advanced-v2-page #saveDraftBtn,
    .douyin-advanced-v2-page .advanced-header-actions .back-btn {
        width: 100%;
        min-height: 40px;
        justify-content: center;
    }
    .douyin-advanced-v2-page .step-content > .copy-btn {
        position: static !important;
        inset: auto !important;
        width: 100% !important;
        min-height: 42px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        margin: 10px 0 0 !important;
        padding: 9px 14px !important;
        transform: none !important;
        white-space: nowrap;
    }
    .douyin-advanced-v2-page .step-content > .btn-group {
        position: relative;
        z-index: 1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .douyin-advanced-v2-page .step-content > .btn-group > .btn {
        width: 100%;
        min-width: 0;
        justify-content: center;
        white-space: nowrap;
    }
    .douyin-advanced-v2-page .advanced-header-actions .back-label {
        display: none;
    }
    .douyin-advanced-v2-page .advanced-header-actions .back-btn::after {
        content: "返回";
    }
}

/* ---------- 抖音相关页面共享首屏玻璃骨架 ---------- */
html.dy-booting,
html.dy-booting body { overflow: hidden !important; }

.dy-page-skeleton {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    overflow: hidden;
    opacity: 0;
    color: var(--apple-text, #1f2937);
    background:
        radial-gradient(circle at 10% -5%, rgba(82,153,233,.22), transparent 33%),
        radial-gradient(circle at 91% 1%, rgba(82,186,154,.14), transparent 29%),
        linear-gradient(145deg, rgba(240,246,250,.988), rgba(222,232,240,.988));
    cursor: progress;
    transition: opacity .24s ease;
    -webkit-backdrop-filter: blur(26px) saturate(1.12);
    backdrop-filter: blur(26px) saturate(1.12);
}

.dy-page-skeleton.is-visible { opacity: 1; }
.dy-page-skeleton.is-leaving { opacity: 0; pointer-events: none; }

.dy-skeleton-header {
    height: 70px;
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) auto;
    align-items: center;
    gap: 13px;
    padding: 0 max(28px, calc((100vw - 1400px) / 2 + 28px));
    border-bottom: 1px solid rgba(255,255,255,.74);
    background: rgba(255,255,255,.43);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.82), 0 12px 34px rgba(31,45,61,.065);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    backdrop-filter: blur(24px) saturate(1.2);
}

.dy-skeleton-main {
    width: min(1400px,100%);
    margin: 0 auto;
    padding: 28px;
}

.dy-skeleton-shape {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.76);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255,255,255,.72), rgba(194,216,231,.58));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.84), 0 7px 18px rgba(38,58,78,.05);
}

.dy-skeleton-shape::after,
.dy-skeleton-row::after {
    content: "";
    position: absolute;
    top: -50%;
    bottom: -50%;
    left: -46%;
    width: 32%;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.9) 48%, rgba(202,228,245,.48) 58%, transparent);
    filter: blur(8px);
    transform: skewX(-18deg);
    animation: douyinGlassSkeletonSweep 1.72s cubic-bezier(.4,0,.2,1) infinite;
}

.dy-skeleton-logo { width: 42px; height: 42px; border-radius: 13px; }
.dy-skeleton-brand { display: grid; gap: 6px; width: 180px; }
.dy-skeleton-brand .dy-skeleton-shape:first-child { width: 138px; height: 13px; }
.dy-skeleton-brand .dy-skeleton-shape:last-child { width: 178px; height: 7px; border-radius: 999px; opacity: .72; }
.dy-skeleton-header-actions { display: flex; gap: 8px; }
.dy-skeleton-header-actions .dy-skeleton-shape:first-child { width: 94px; height: 38px; }
.dy-skeleton-header-actions .dy-skeleton-shape:last-child { width: 106px; height: 38px; }

.dy-skeleton-hero-card {
    min-height: 274px;
    display: grid;
    grid-template-columns: minmax(0,1.35fr) minmax(240px,.65fr);
    align-items: center;
    gap: 48px;
    padding: 38px 44px;
    border: 1px solid rgba(255,255,255,.75);
    border-radius: 22px;
    background: rgba(255,255,255,.4);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.82), 0 18px 44px rgba(31,45,61,.07);
    -webkit-backdrop-filter: blur(24px) saturate(1.14);
    backdrop-filter: blur(24px) saturate(1.14);
}

.dy-skeleton-hero-copy { display: grid; gap: 15px; }
.dy-skeleton-hero-copy .dy-skeleton-shape:nth-child(1) { width: 170px; height: 9px; border-radius: 999px; }
.dy-skeleton-hero-copy .dy-skeleton-shape:nth-child(2) { width: min(620px,90%); height: 38px; }
.dy-skeleton-hero-copy .dy-skeleton-shape:nth-child(3) { width: min(520px,78%); height: 12px; opacity: .8; }
.dy-skeleton-hero-copy .dy-skeleton-shape:nth-child(4) { width: 180px; height: 42px; margin-top: 9px; border-radius: 12px; }
.dy-skeleton-visual { width: min(290px,100%); aspect-ratio: 1.25; justify-self: end; border-radius: 20px; }

.dy-skeleton-stat-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 12px;
    margin-top: 16px;
}
.dy-skeleton-stat-grid .dy-skeleton-shape { height: 82px; border-radius: 16px; }

.dy-skeleton-list { display: grid; gap: 10px; margin-top: 20px; }
.dy-skeleton-row {
    position: relative;
    min-height: 76px;
    display: grid;
    grid-template-columns: 44px minmax(0,1fr) 78px;
    align-items: center;
    gap: 15px;
    overflow: hidden;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 16px;
    background: rgba(255,255,255,.38);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 9px 24px rgba(38,58,78,.05);
    -webkit-backdrop-filter: blur(18px) saturate(1.12);
    backdrop-filter: blur(18px) saturate(1.12);
}
.dy-skeleton-row:nth-child(2)::after { animation-delay: .12s; }
.dy-skeleton-row:nth-child(3)::after { animation-delay: .24s; }
.dy-skeleton-avatar { width: 44px; height: 44px; border-radius: 13px; }
.dy-skeleton-copy { display: grid; gap: 9px; }
.dy-skeleton-copy .dy-skeleton-shape:first-child { width: min(420px,72%); height: 13px; }
.dy-skeleton-copy .dy-skeleton-shape:last-child { width: min(580px,88%); height: 8px; border-radius: 999px; opacity: .72; }
.dy-skeleton-action { width: 76px; height: 32px; }

.dy-content-enter-target { animation: douyinContentEnter .42s cubic-bezier(.22,1,.36,1) both; }

/* 高级编辑：图片上的重新生成按钮采用轻量 Apple 玻璃控件 */
.douyin-advanced-v2-page .regenerate-item-btn {
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    border: 1px solid rgba(255,255,255,.66) !important;
    border-radius: 11px !important;
    color: #3f5f88 !important;
    background: linear-gradient(145deg,rgba(255,255,255,.56),rgba(225,236,249,.28)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.72),0 6px 16px rgba(21,42,72,.12) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.55) !important;
    backdrop-filter: blur(18px) saturate(1.55) !important;
}

.douyin-advanced-v2-page .regenerate-item-btn:hover {
    color: #315fd1 !important;
    background: linear-gradient(145deg,rgba(255,255,255,.72),rgba(224,236,255,.46)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.88),0 8px 20px rgba(39,79,150,.18) !important;
    transform: translateY(-1px) scale(1.04) !important;
}

@keyframes douyinGlassSkeletonSweep {
    0% { left: -46%; opacity: 0; }
    16% { opacity: .84; }
    74% { opacity: .68; }
    100% { left: 116%; opacity: 0; }
}

@keyframes douyinContentEnter {
    from { opacity: 0; transform: translateY(7px); filter: blur(3px); }
}

@media (max-width: 760px) {
    .dy-skeleton-header {
        height: 62px;
        grid-template-columns: 38px minmax(0,1fr) auto;
        gap: 10px;
        padding-inline: 13px;
    }
    .dy-skeleton-logo { width: 38px; height: 38px; border-radius: 12px; }
    .dy-skeleton-brand { width: 125px; }
    .dy-skeleton-brand .dy-skeleton-shape:first-child { width: 96px; }
    .dy-skeleton-brand .dy-skeleton-shape:last-child { width: 122px; }
    .dy-skeleton-header-actions .dy-skeleton-shape:first-child { display: none; }
    .dy-skeleton-header-actions .dy-skeleton-shape:last-child { width: 86px; height: 36px; }
    .dy-skeleton-main { padding: 14px 12px 28px; }
    .dy-skeleton-hero-card { min-height: 360px; grid-template-columns: 1fr; gap: 24px; padding: 26px 20px; }
    .dy-skeleton-visual { width: 100%; max-height: 138px; justify-self: stretch; }
    .dy-skeleton-stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
    .dy-skeleton-stat-grid .dy-skeleton-shape:last-child { display: none; }
    .dy-skeleton-row { grid-template-columns: 40px minmax(0,1fr); min-height: 70px; padding: 12px; }
    .dy-skeleton-avatar { width: 40px; height: 40px; }
    .dy-skeleton-action { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .dy-page-skeleton { transition: none; }
    .dy-skeleton-shape::after,
    .dy-skeleton-row::after,
    .dy-content-enter-target,
    .loading-container::before,
    .loading-overlay::before,
    .loading-text,
    .module-loading-text { animation: none !important; }
    .regenerate-item-btn::before,
    .regenerate-action-btn::before { transition: none !important; }
}
