
            #wpadminbar { display: none !important; }
            html { margin-top: 0 !important; }
            *, *::before, *::after { box-sizing: border-box !important; margin: 0; padding: 0; }
            
            body.saas-takeover-active, body.saas-modal-open { overflow: hidden !important; margin: 0 !important; padding: 0 !important; }

            :root, #saas-dashboard-main-container {
                --brand-primary: #7083df; --brand-hover: #4f46e5; --brand-light: rgba(112, 131, 223, 0.1);
                --green: #3dcfb6; --green-dark: #2eb8a0; --green-light: #eefaf8;
                --text-primary: #1a1a2e; --text-secondary: #475569; --text-muted: #94a3b8; --text-placeholder: #cbd5e1;
                --border: #e2e8f0; --border-light: #f1f5f9; --bg-white: #ffffff; --bg-gray: #f8fafc;
                --active-bg: #f0f2fb; --red: #f1416c;
                --track-fill: #7083df; --track-empty: #e2e8f0;
            }

            #saas-fullscreen-app-wrapper {
                position: fixed !important; top: 0 !important; left: 0 !important; width: 100vw !important; height: 100vh !important;
                background: #edf0f5 !important; z-index: 2147483645 !important;
                display: flex !important; flex-direction: row !important; overflow: hidden !important;
                font-family: 'DM Sans', sans-serif !important;
                padding: 0 !important; margin: 0 !important;
            }
            body.admin-bar #saas-fullscreen-app-wrapper { top: 32px !important; height: calc(100vh - 32px) !important; }

            #saas-dashboard-main-container {
    flex: 1;
    min-width: 0;
    height: 100vh !important;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border: none;
}
            
            /* T3: 全局基础字号 14px */
            .sw-workspace { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--bg-white); color: var(--text-primary); font-size: 14px; }
            .sw-workspace button, .sw-workspace input, .sw-workspace textarea { font-family: inherit; cursor: pointer; border: none; outline: none; background: none; }
            .main-body { flex: 1; display: flex; overflow: hidden; }

/* 写作页面：只在本页 wrapper 内强制统一左侧菜单保持折叠态，不允许展开 */
#saas-fullscreen-app-wrapper.saas-writer-sidebar-locked .saas-sidebar-container {
    width: 60px !important;
    min-width: 60px !important;
}

#saas-fullscreen-app-wrapper.saas-writer-sidebar-locked .saas-sidebar-logo,
#saas-fullscreen-app-wrapper.saas-writer-sidebar-locked .saas-sidebar-collapse-btn {
    display: none !important;
}

#saas-fullscreen-app-wrapper.saas-writer-sidebar-locked .saas-nav-group {
    padding: 0 8px !important;
    align-items: center !important;
}

#saas-fullscreen-app-wrapper.saas-writer-sidebar-locked .saas-nav-group:first-of-type {
    margin-top: 16px !important;
}

#saas-fullscreen-app-wrapper.saas-writer-sidebar-locked .saas-nav-item {
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    gap: 0 !important;
    justify-content: center !important;
    border-radius: 12px !important;
}

#saas-fullscreen-app-wrapper.saas-writer-sidebar-locked .saas-nav-item > span {
    display: none !important;
}

#saas-fullscreen-app-wrapper.saas-writer-sidebar-locked .saas-nav-divider {
    margin: 16px 10px !important;
}

#saas-fullscreen-app-wrapper.saas-writer-sidebar-locked .saas-sidebar-member-wrap {
    margin: auto 0 0 !important;
    padding-top: 12px !important;
    align-items: center !important;
}

#saas-fullscreen-app-wrapper.saas-writer-sidebar-locked .saas-sidebar-member-quick-grid {
    display: none !important;
}

#saas-fullscreen-app-wrapper.saas-writer-sidebar-locked .saas-sidebar-member-promo {
    width: 44px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#saas-fullscreen-app-wrapper.saas-writer-sidebar-locked .saas-sidebar-member-entry {
    width: 44px !important;
    justify-content: center !important;
}

#saas-fullscreen-app-wrapper.saas-writer-sidebar-locked .saas-sidebar-member-entry__meta,
#saas-fullscreen-app-wrapper.saas-writer-sidebar-locked .saas-sidebar-member-entry__arrow {
    display: none !important;
}

#saas-fullscreen-app-wrapper.saas-writer-sidebar-locked .saas-sidebar-member-entry__avatar {
    margin: 0 !important;
}

#saas-fullscreen-app-wrapper.saas-writer-sidebar-locked .saas-sidebar-member-dropdown {
    position: fixed !important;
    left: 68px !important;
    right: auto !important;
    bottom: 16px !important;
    width: 220px !important;
    z-index: 2147483651 !important;
}

/* 已切换为全局统一左侧菜单，引擎样式由 SaaS 全局统一左侧菜单引擎输出 */

.left-sidebar {
    --apple-bg: #f6f7fb;
    --apple-text: #1a1a2e;
    --apple-muted: #94a3b8;
    --apple-hover: #eef2f7;
    width: 188px;
    background: #f8f9fc;
    border-right: 1px solid #e6ebf3;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: visible;
    z-index: 5;
    padding: 12px 8px 16px;
gap: 8px;
}

html.dark-mode .left-sidebar {
    --apple-bg: #171926;
    --apple-text: #edf1ff;
    --apple-hover: #222536;
    background: linear-gradient(180deg, #171926 0%, #12131f 100%);
    border-right: 1px solid #2a2b40;
}

/* 顶部文档头 */
.left-sidebar > div:first-child {
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    border-bottom: none !important;
    padding: 4px 0 0;
    flex: 0 0 auto;
    background: transparent !important;
    border-radius: 0;
    box-shadow: none !important;
}

html.dark-mode .left-sidebar > div:first-child {
    background: transparent !important;
}

.sidebar-title-wrap {
    position: relative;
    margin: 0 4px;
}

.sidebar-title-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    z-index: 1;
}

.sidebar-script-name-input {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 12px 0 36px !important;
    background: #ffffff !important;
    border: 1px solid #e6ebf3 !important;
    border-radius: 12px !important;
    font-size: 12px !important;
    color: var(--text-secondary) !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    line-height: 1 !important;
    text-align: left !important;
    transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease !important;
    box-shadow: 0 1px 2px rgba(5, 0, 56, 0.04) !important;
}

.sidebar-script-name-input:hover {
    color: var(--brand-primary) !important;
    background: #f6f8fc !important;
    border-color: rgba(112, 131, 223, 0.22) !important;
    box-shadow: 0 4px 10px rgba(5, 0, 56, 0.06) !important;
    transform: translateY(-1px);
}

.sidebar-script-name-input:focus {
    color: var(--text-primary) !important;
    background: #ffffff !important;
    border-color: rgba(112, 131, 223, 0.28) !important;
    box-shadow: 0 0 0 3px rgba(112, 131, 223, 0.10) !important;
    transform: none;
    outline: none !important;
}

.sidebar-script-name-input::placeholder {
    color: var(--text-secondary) !important;
    opacity: 1 !important;
}

html.dark-mode .sidebar-script-name-input {
    color: #aab2d5 !important;
    background: #171a2a !important;
    border-color: #2a2b40 !important;
    box-shadow: none !important;
}

html.dark-mode .sidebar-script-name-input:hover {
    color: #8ea0ff !important;
    background: #202334 !important;
    border-color: rgba(112, 131, 223, 0.28) !important;
    box-shadow: none !important;
    transform: translateY(-1px);
}

html.dark-mode .sidebar-script-name-input:focus {
    color: #e0e4f8 !important;
    background: #202334 !important;
    border-color: rgba(112, 131, 223, 0.34) !important;
    box-shadow: 0 0 0 3px rgba(112, 131, 223, 0.12) !important;
    transform: none;
}

html.dark-mode .sidebar-script-name-input::placeholder {
    color: #aab2d5 !important;
    opacity: 1 !important;
}

/* 一级导航区 */
.sidebar-section { 
    padding: 8px !important; 
    margin: 0 4px;
    border: 1px solid #e6ebf3;
    border-radius: 16px;
    background: #fff;
    box-shadow: none;
}

html.dark-mode .sidebar-section {
    background: rgba(26, 27, 46, 0.86);
    border-color: #2a2b40;
    box-shadow: none;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 12px;
    margin: 0;
    font-size: 14px;
    color: #64748b;
    transition: background .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease;
    cursor: pointer;
    font-weight: 700;
    border-radius: 12px;
    border: 1px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav-item + .sidebar-nav-item {
    margin-top: 8px;
}

.sidebar-nav-item:hover {
    background: #f6f8fc;
    color: var(--text-primary);
    border-color: #e5eaf3;
}

.sidebar-nav-item.active {
    background: rgba(112, 131, 223, 0.11);
    color: var(--brand-primary);
    border-color: rgba(112, 131, 223, 0.18);
        box-shadow: none;
}

.sidebar-nav-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.82;
}

.sidebar-nav-item.active svg {
    color: var(--brand-primary);
    opacity: 1;
}

html.dark-mode .sidebar-nav-item {
    color: #8d97ba;
}

html.dark-mode .sidebar-nav-item:hover {
    background: #202334;
    color: #e0e4f8;
    border-color: #2f3347;
}

html.dark-mode .sidebar-nav-item.active {
    background: rgba(112, 131, 223, 0.14);
    border-color: rgba(112, 131, 223, 0.26);
    color: #8ea0ff;
}

/* 左栏主内容区 */
.episode-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 0;
    gap: 12px;
    padding: 0 2px 2px;
}

/* 创作控制卡 */
.ep-fieldset {
    margin: 0;
    border: 1px solid #e6ebf3;
    border-radius: 16px;
    position: relative;
    padding: 12px 12px 12px;
    background: #fff;
    box-shadow: none;
}

html.dark-mode .ep-fieldset {
    border-color: #2a2b40;
    background: rgba(26, 27, 46, 0.86);
    box-shadow: none;
}

.ep-legend {
    position: static;
    top: auto;
    left: auto;
    transform: none;
    background: transparent;
    padding: 0;
    margin-bottom: 12px;
    font-size: 11px;
    font-weight: 700;
    color: #7b8798;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

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

.ep-input-box {
    border: 0.5px solid #e6ebf3;
    border-radius: 12px;
    padding: 10px 12px;
    min-width: 0;
}

html.dark-mode .ep-input-box {
    border-color: #2a2b40;
}

.ep-input-label {
    font-size: 12px;
    color: #8890a0;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.1;
    margin-bottom: 6px;
}

.ep-input-wrapper {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 3px;
    height: auto;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    min-width: 0;
}

html.dark-mode .ep-input-wrapper {
    background: transparent;
    border: none;
}

.ep-num-input {
    width: auto !important;
    min-width: 16px !important;
    max-width: 40px !important;
    height: 20px !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
    text-align: left !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
}

.ep-num-input::-webkit-outer-spin-button,
.ep-num-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
    display: none;
}
.ep-num-input {
    -moz-appearance: textfield;
}

.ep-unit {
    font-size: 11px;
    color: #8d98aa;
    font-weight: 700;
    margin-left: -14px; /* 原来 -9px → 再往左 5px */
    flex-shrink: 0;
    line-height: 1;
    position: relative;
    left: -1px;
}

/* 主操作按钮区：两个独立按钮，不再共享白底模块 */
/* 主操作按钮区：只承载“全局故事看板”这个独立工具入口 */
.ep-ai-action-row {
    padding: 0 4px;
    margin: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

html.dark-mode .ep-ai-action-row {
    background: transparent;
    border: none;
    box-shadow: none;
}

/* 通用按钮基础 */
.btn-ai-text-link {
    cursor: pointer;
    transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* 全局故事看板：独立次级工具入口 */
#btn-open-story-board {
    width: 136px !important;
    min-width: 136px !important;
    max-width: 136px !important;
    height: 40px !important;
    padding: 0 12px !important;
    gap: 6px !important;
    border-radius: 12px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    color: var(--text-secondary) !important;
    background: #ffffff !important;
    border: 1px solid #e6ebf3 !important;
    box-shadow: 0 1px 2px rgba(5, 0, 56, 0.04) !important;
}

#btn-open-story-board:hover {
    color: var(--brand-primary) !important;
    background: #f6f8fc !important;
    border-color: rgba(112, 131, 223, 0.22) !important;
    box-shadow: 0 4px 10px rgba(5, 0, 56, 0.06) !important;
    transform: translateY(-1px);
}

#btn-open-story-board svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
    color: currentColor !important;
    stroke: currentColor !important;
    opacity: 0.92 !important;
    margin-right: 0 !important;
}

/* 暗黑模式：全局故事看板 */
html.dark-mode #btn-open-story-board {
    color: #aab2d5 !important;
    background: #171a2a !important;
    border: 1px solid #2a2b40 !important;
    box-shadow: none !important;
}

html.dark-mode #btn-open-story-board:hover {
    color: #8ea0ff !important;
    background: #202334 !important;
    border-color: rgba(112, 131, 223, 0.28) !important;
    box-shadow: none !important;
    transform: translateY(-1px);
}

/* 暗黑模式：两个按钮仍然保持独立 */
html.dark-mode #btn-ai-split-episodes {
    color: #8ea0ff !important;
    background: rgba(112, 131, 223, 0.14) !important;
    border: 1px solid rgba(112, 131, 223, 0.26) !important;
    box-shadow: none !important;
}

html.dark-mode #btn-ai-split-episodes:hover {
    color: #8ea0ff !important;
    background: rgba(112, 131, 223, 0.18) !important;
    border-color: rgba(112, 131, 223, 0.34) !important;
    box-shadow: none !important;
    transform: translateY(-1px);
}

html.dark-mode #btn-ai-split-episodes span {
    font-size: 11px !important;
    line-height: 1 !important;
    color: #8ea0ff !important;
    background: rgba(255, 255, 255, 0.08) !important;
    opacity: 1 !important;
    padding: 2px 6px !important;
    border-radius: 7px !important;
    margin-left: 0 !important;
    font-weight: 700 !important;
}

html.dark-mode #btn-open-story-board {
    color: #aab2d5 !important;
    background: #171a2a !important;
    border: 1px solid #2a2b40 !important;
    box-shadow: none !important;
}

html.dark-mode #btn-open-story-board:hover {
    color: #8ea0ff !important;
    background: #202334 !important;
    border-color: rgba(112, 131, 223, 0.28) !important;
    box-shadow: none !important;
    transform: translateY(-1px);
}

html.dark-mode #btn-open-story-board svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
    color: currentColor !important;
    stroke: currentColor !important;
    opacity: 0.92 !important;
    margin-right: 0 !important;
}
/* 分集结构区 */
.episode-list-wrapper {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 8px 0 12px;
    border: 1px solid #e6ebf3;
    border-radius: 16px;
    background: #fff;
    box-shadow: none;
    min-height: 0;
}

html.dark-mode .episode-list-wrapper {
    background: rgba(26, 27, 46, 0.86);
    border-color: #2a2b40;
    box-shadow: none;
}

.episode-list-wrapper::-webkit-scrollbar {
    width: 0 !important;
    display: none !important;
}

.episode-list-wrapper {
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE/Edge */
}

html.dark-mode .episode-list-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
}

.episode-list-toolbar {
    padding: 0 12px 10px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    border-bottom: 1px solid #edf1f6;
    margin-bottom: 8px;
}

html.dark-mode .episode-list-toolbar {
    border-bottom-color: #23263a;
}

.episode-list-title {
    font-size: 12px !important;
    font-weight: 800 !important;
    color: #7b8798 !important;
    letter-spacing: 0 !important;
    line-height: 1 !important;
    padding-left: 0 !important;
    white-space: nowrap !important;
}

/* #btn-open-story-board 的按钮形态已在上方与 #btn-ai-split-episodes 统一处理，避免重复覆盖 */

/* 暗黑模式按钮样式已在上方统一处理，避免重复覆盖 */

.episode-list {
    flex: 1;
    padding-top: 4px;
}

.fw-folder {
    border: none;
    margin-bottom: 8px;
}

.fw-folder-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    margin: 0 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0;
    transition: background .16s ease, color .16s ease;
    border-radius: 12px;
}

.fw-folder-hd:hover {
    color: var(--text-primary);
    background: #f6f8fc;
}

html.dark-mode .fw-folder-hd:hover {
    background: #202334;
}

.fw-folder-hd svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s;
    opacity: 0.8;
}

.fw-folder-bd {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 4px;
}

.fw-folder.collapsed .fw-folder-bd {
    display: none;
}

.fw-folder.collapsed .fw-folder-hd svg {
    transform: rotate(-90deg);
}

.episode-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px 8px 16px;
    margin: 0 8px;
    border-radius: 12px;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
    cursor: pointer;
    border: 1px solid transparent !important;
    outline: none !important;
    background: transparent;
}

.episode-item:hover {
    background: #f6f8fc;
    border-color: #e8edf5 !important;
}

html.dark-mode .episode-item:hover {
    background: #202334;
    border-color: #2f3347 !important;
}

.episode-item.active {
    background: rgba(112, 131, 223, 0.11);
    border-color: rgba(112, 131, 223, 0.18) !important;
    box-shadow: none;
}

.episode-item-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    transition: color .16s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.episode-item:hover .episode-item-name {
    color: var(--text-primary);
}

.episode-item.active .episode-item-name {
    color: var(--brand-primary);
    font-weight: 800;
}

.ep-word-count {
    display: flex;
    align-items: center;
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 700;
    background: transparent;
    padding: 0;
    white-space: nowrap;
    font-family: 'DM Mono', monospace;
    letter-spacing: 0;
}

.episode-item.active .ep-word-count {
    color: var(--brand-primary);
    opacity: 0.8;
}

.ep-word-count svg {
    display: none !important;
}

.ep-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.86);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 50;
    backdrop-filter: blur(3px);
    border-radius: 16px;
}

html.dark-mode .ep-loading-overlay {
    background: rgba(22, 23, 26, 0.88);
}

.ep-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top: 3px solid var(--brand-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ep-loading-text {
    font-size: 12px;
    font-weight: 800;
    color: var(--brand-primary);
    letter-spacing: 0.8px;
}

            .editor-area { flex: 1; display: flex; flex-direction: column; background: var(--bg-white); min-width: 0; position: relative; border-right: 1px solid var(--border);}
            
            .editor-toolbar { height: 50px; background: var(--bg-white); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 20px; flex-shrink: 0; z-index: 10; box-shadow: 0 2px 10px rgba(5,0,56,0.04);}
            .toolbar-left { display: flex; align-items: center; gap: 2px; }
            
            /* T4: 工具栏按钮统一 12px (统一三态) */
            .tb { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 6px; color: var(--text-secondary); font-size: 12px; font-weight: 700; transition: 0.15s; border: 1px solid transparent;}
            .tb:hover { background: var(--bg-gray); color: var(--text-primary); border-color: var(--border); }
            .tb.active { background: var(--active-bg) !important; color: var(--brand-primary) !important; border-color: var(--brand-light) !important; box-shadow: inset 0 2px 4px rgba(112, 131, 223, 0.1) !important; }
            html.dark-mode .tb.active { background: var(--active-bg) !important; color: var(--brand-primary) !important; border-color: var(--brand-light) !important; }
            .tb svg { width: 14px; height: 14px; }
            
            .tb-divider { width: 1px; height: 16px; background: var(--border); margin: 0 6px; }
            
            /* T4: 12px (统一三态) */
            .fw-btn-nav { display: flex; align-items: center; gap: 4px; color: var(--text-secondary); padding: 0 8px; height: 28px; border-radius: 6px; font-size: 12px; font-weight: 700; transition: 0.2s; border: 1px solid transparent; cursor: pointer; margin-left: 2px;}
            .fw-btn-nav:hover { background: var(--bg-gray); color: var(--text-primary); border-color: var(--border); }
            .fw-btn-nav.panel-active { background: var(--active-bg); color: var(--brand-primary); border-color: var(--brand-light); }
            .fw-btn-nav svg { width: 13px; height: 13px; }

            /* T4: 12px (统一三态) */

            .toolbar-right { display: flex; align-items: center; gap: 12px; }
            
            .btn-download-script { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--border); color: var(--text-secondary); cursor: pointer; transition: 0.2s; background: var(--bg-white); }
            .btn-download-script:hover { background: var(--bg-gray); color: var(--brand-primary); border-color: var(--brand-primary); }
            .btn-download-script svg { width: 14px; height: 14px; }
            
            /* T4: 12px */
            .script-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-secondary); font-weight: 700; }
            .doc-save-indicator { display: none; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; transition: 0.2s; color: var(--text-muted); min-width: 50px; }
            .doc-save-indicator.saved { color: var(--green-dark); }
            
            .btn-first-save { background: var(--brand-primary) !important; color: white !important; padding: 6px 16px; border-radius: 6px; font-size: 12px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s; box-shadow: 0 2px 8px rgba(112, 131, 223, 0.2); border: none; letter-spacing: 0.5px;}
            .btn-first-save:hover { background: #6376d4 !important; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(112, 131, 223, 0.3); }
            
            .saving-dots-container { display: flex; align-items: center; justify-content: center; gap: 5px; }
            .saving-dot { width: 6px; height: 6px; background-color: var(--brand-primary); border-radius: 50%; animation: blink 0.8s infinite alternate; }
            .saving-dot:nth-child(2) { animation-delay: 0.4s; }
            @keyframes blink { from { opacity: .35; transform: translateY(0); } to { opacity: 1; transform: translateY(-1px);} }

            /* 🚀 核心修复 1：取消外层高度撑满占位，改为 0 */
            .editor-content { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0; background: var(--bg-white); position: relative; scroll-behavior: smooth; display: block; cursor: text; padding-bottom: 0; }
            
            /* 移除 flex:1，让容器高度由内容和 padding 真实撑开，避免光标计算错误 */
            #quill-editor-container { width: 100%; position: relative; z-index: 1; display: block;}
            
            .comment-margin-container { position: absolute; top: 0; right: 12px; bottom: 0; width: 250px; pointer-events: none; z-index: 2; transition: opacity 0.2s ease, visibility 0.2s; }
            .comment-margin-container.hide-for-panel { opacity: 0; visibility: hidden; }
            .editor-content.waiting-for-input { cursor: default !important; }
            .editor-content.waiting-for-input #quill-editor-container { visibility: hidden !important; pointer-events: none !important; }
            
            .ql-container.ql-snow { overflow: visible !important; }
            .ql-editor { overflow-y: visible !important; }

            ::-webkit-scrollbar { width: 8px !important; height: 8px !important; }
            ::-webkit-scrollbar-track { background: rgba(0,0,0,0.03) !important; border-left: 1px solid rgba(0,0,0,0.02) !important; }
            ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2) !important; border-radius: 4px !important; } 
            ::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.4) !important; }
            html.dark-mode ::-webkit-scrollbar-track { background: rgba(255,255,255,0.02) !important; border-left: 1px solid rgba(255,255,255,0.02) !important; }
            html.dark-mode ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2) !important; }
            html.dark-mode ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.4) !important; }

            .document-mode-switch { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 30px 0 10px; margin-bottom: 10px; background: var(--bg-white); }
            /* T3: 14px (统一三态) */
            .mode-text-btn { font-size: 14px; font-weight: 700; color: var(--text-secondary); cursor: pointer; transition: 0.2s; user-select: none; padding: 6px 16px; border-radius: 8px; border: 1px solid transparent;}
            .mode-text-btn:hover { background: var(--bg-gray); color: var(--text-primary); border-color: var(--border); }
            .mode-text-btn.active { background: var(--active-bg); color: var(--brand-primary); font-weight: 800; border-color: var(--brand-light); box-shadow: inset 0 2px 4px rgba(112, 131, 223, 0.1); }

            .mode-ai-write-btn {
                display: inline-flex; align-items: center; gap: 5px;
                font-size: 13px; font-weight: 700; color: var(--brand-primary);
                background: var(--active-bg); border: none; border-radius: 8px;
                padding: 7px 12px; margin-left: 6px; cursor: pointer;
                transition: 0.2s; user-select: none;
            }
            .mode-ai-write-btn:hover { background: var(--brand-light); }
            .mode-ai-write-btn svg { width: 14px; height: 14px; stroke-width: 2.2; }
            .mode-divider { display: none !important; }

            .center-action-menu { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; z-index: 1; background: transparent; padding: 0; box-shadow: none; border: none; gap: 0; }
            /* T2: 16px */
            .mode-text-btn-lg { font-size: 16px; color: var(--text-secondary) !important; font-weight: 700 !important; cursor: pointer; transition: .2s; padding: 8px 16px; letter-spacing: 0.5px; background: transparent !important; border: none !important; }
            .mode-text-btn-lg:hover { color: var(--text-primary) !important; }
            .mode-divider-lg { width: 1px; height: 16px; background: var(--text-placeholder); margin: 0 4px; }

            .ql-toolbar { display: none !important; }
            
            /* 🚀 核心修复 2：将底边距增加到 12em 确立物理留白空间 */
            .ql-container.ql-snow { border: none !important; font-family: 'DM Mono', monospace !important;font-size: 16px !important; width: 100% !important; height: auto !important; display: block; }
            .ql-editor { width: 100% !important; max-width: 824px !important; margin: 0 auto !important; padding: 42px 40px 12em !important; line-height: 1.6 !important; letter-spacing: 0 !important; color: var(--text-primary) !important; outline: none !important; text-align: left; min-height: 100%; }
            .ql-editor p { margin-bottom: 1em !important; }
            .ql-editor.is-empty::before { display: none !important; }
            .ql-editor .ql-align-center { text-align: center !important; }
            .ql-editor .ql-align-right { text-align: right !important; }
            .ql-editor .ql-align-justify { text-align: justify !important; }

            .right-panel { width: 0; background: var(--bg-gray); display: flex; flex-direction: column; flex-shrink: 0; border-left: none; transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); overflow: hidden; z-index: 5; }
            .right-panel.open { width: 400px; }
            
            .rp-header-container { display: none; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); background: var(--bg-white); padding: 0 20px; height: 50px; flex-shrink: 0; min-width: 400px; position: sticky; top: 0; z-index: 100; }
            .rp-header-container.active { display: flex; }

            /* T2: 16px */
            .rp-nav-title { font-size: 16px; font-weight: 800; color: var(--text-primary); display: flex; align-items: center; gap: 8px;}
            
            /* 🆕 修改了左侧的宽度占比，为搜索框留出空间 */
            .rp-tabs-left { display: flex; gap: 8px; align-items: center; height: 100%; flex-shrink: 0;}
            
            /* T3: 14px (统一三态) */
            .rp-tab { display: flex; align-items: center; height: 30px; padding: 0 12px; font-size: 14px; font-weight: 700; color: var(--text-secondary); cursor: pointer; transition: 0.2s; border-radius: 6px; border: 1px solid transparent;}
            .rp-tab:hover { background: var(--bg-gray); color: var(--text-primary); border-color: var(--border); }
            .rp-tab.active { background: var(--active-bg); color: var(--brand-primary); border-color: var(--brand-light); box-shadow: inset 0 2px 4px rgba(112, 131, 223, 0.1); }

            .btn-close-panel { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; color: var(--text-muted); transition: 0.2s; cursor: pointer; background: var(--bg-gray); flex-shrink:0;}
            .btn-close-panel:hover { background: var(--border); color: var(--text-primary); }
            .btn-close-panel svg { width: 18px; height: 18px; }

            .rp-body { flex: 1; overflow-y: auto; overflow-x: hidden; position: relative; min-width: 400px; display: none; flex-direction: column;}
            .rp-body.active { display: flex; }
            .rp-body::-webkit-scrollbar { width: 4px; }
            .rp-body::-webkit-scrollbar-track { background: transparent; }
            .rp-body::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 4px; }
            html.dark-mode .rp-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); }
            
            .rp-tab-pane { display: none; flex-direction: column; height: 100%; padding: 24px;}
            .rp-tab-pane.active { display: flex; }

            /* AI Pane */
            .ai-panel-top { display: flex; flex-direction: column; gap: 16px; flex: 1;}
            .ai-return-box-wrapper { position: relative; background: var(--bg-white); border: 1px solid var(--border); border-radius: 16px; min-height: 400px; display: flex; flex-direction: column; box-shadow: 0 4px 20px rgba(5,0,56,0.06);overflow: hidden; transition: 0.3s; }
            
            /* T3: 规范化返回框字号 14px */
            .ai-return-box { padding: 24px; font-size: 14px; font-weight: 700; line-height: 1.8; color: var(--text-secondary); overflow-y: auto; max-height: 550px; flex: 1; display: flex; align-items: center; justify-content: center; }
            .ai-return-box-wrapper.has-content { border-color: var(--brand-primary); box-shadow: 0 4px 24px var(--brand-light); }
            .ai-return-box-wrapper.has-content .ai-return-box { display: block; color: var(--text-primary); padding-bottom: 60px; }

            .ai-generate-group { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; gap: 16px; z-index: 10; transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); width: 80%; }
            .ai-generate-group.generated { top: 16px; bottom: auto; left: auto; right: 16px; transform: none; gap: 8px; flex-direction: row; width: auto;}
            .ai-generate-group.disabled { opacity: 0; pointer-events: none; }
            
            /* 🚨 核心修复：加上 !important 防止被重置背景导致按钮白化 */
            .btn-ai-generate-new, .btn-ai-generate-continue { padding: 14px 24px; border-radius: 12px; font-size: 14px; font-weight: 800; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; letter-spacing: 0.5px; border: none; }
            .btn-ai-generate-new { background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-hover) 100%) !important; color: #FFF !important; box-shadow: 0 4px 15px var(--brand-light) !important; }
            .btn-ai-generate-new:hover { transform: translateY(-2px) !important; box-shadow: 0 8px 20px rgba(112, 131, 223, 0.4) !important; }
            
            .btn-ai-generate-continue { background: var(--active-bg) !important; color: var(--brand-primary) !important; box-shadow: none !important; border: 1px solid var(--brand-light) !important; }
            .btn-ai-generate-continue:hover { background: var(--brand-light) !important; transform: translateY(-2px) !important; box-shadow: 0 4px 12px var(--brand-light) !important; }
            
            /* T4: 12px */
            .ai-generate-group.generated .btn-ai-generate-new, .ai-generate-group.generated .btn-ai-generate-continue { padding: 8px 16px; font-size: 12px; border-radius: 8px; }

            .ai-expand-btn { position: absolute; bottom: 16px; right: 16px; width: 36px; height: 36px; background: var(--bg-white); border: 1px solid var(--border); border-radius: 8px; display: none; align-items: center; justify-content: center; color: var(--text-muted); cursor: pointer; transition: 0.2s; box-shadow: 0 2px 8px rgba(5,0,56,0.08);z-index: 10; }
            .ai-return-box-wrapper.has-content .ai-expand-btn { display: flex; }
            .ai-expand-btn:hover { color: var(--brand-primary); border-color: var(--brand-primary); transform: scale(1.05); }

            .ai-btn-row { display: none; justify-content: space-between; gap: 12px; margin-top: 10px;}
            
            /* T3: 14px */
            .btn-ai-action-confirm { width: 100%; padding: 14px 0; text-align: center; border-radius: 12px; font-size: 14px; font-weight: 800; cursor: pointer; transition: 0.2s; border: none; background: var(--bg-white); color: var(--text-primary); border: 2px solid var(--border); }
            .btn-ai-action-confirm:hover { border-color: var(--brand-primary); color: var(--brand-primary); box-shadow: 0 4px 12px var(--brand-light);}

            /* Plot Pane */
            .plot-control-wrapper { display: flex; flex-direction: column; gap: 28px; background: var(--bg-white); padding: 24px; border-radius: 16px; border: 1px solid var(--border); box-shadow: 0 4px 20px rgba(5,0,56,0.06);}
            .plot-item { position: relative; display: flex; flex-direction: column; gap: 12px; }
            /* T3: 14px */
            .plot-label { font-size: 14px; font-weight: 700; color: var(--text-primary); margin: 0; line-height: 1; display:flex; justify-content: space-between;}
            .plot-label::after { content: attr(data-val); color: var(--brand-primary); font-weight: 800;}
            .plot-slider-container { position: relative; display: flex; align-items: center; height: 16px; }
            input[type=range].plot-slider { -webkit-appearance: none; width: 100% !important; height: 8px !important; border-radius: 4px !important; outline: none !important; z-index: 2 !important; margin: 0 !important; border: none !important; padding:0 !important; background: linear-gradient(to right, var(--track-fill) var(--percent, 50%), var(--track-empty) var(--percent, 50%)) !important; display:block !important;}
            input[type=range].plot-slider::-webkit-slider-thumb { -webkit-appearance: none; height: 20px; width: 20px; border-radius: 50%; background: #ffffff; cursor: pointer; box-shadow: 0 2px 6px rgba(112, 131, 223, 0.4); border: 3px solid var(--track-fill); transition: transform 0.2s; }
            input[type=range].plot-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
            /* T3: 14px */
            .plot-add-btn { display: flex; align-items: center; justify-content: center; height: 44px; color: var(--text-secondary); cursor: pointer; transition: 0.2s; border-radius: 12px; background: var(--bg-gray); border: 1px dashed var(--border); font-size: 14px; font-weight: 700; gap: 8px;}
            .plot-add-btn:hover { border-color: var(--brand-primary); color: var(--brand-primary); background: var(--active-bg); }
            /* 🚨 修复拉杆的+号尺寸，防止撑破排版 */
            .plot-add-btn svg { width: 18px !important; height: 18px !important; flex-shrink: 0; }

            .plot-extra-input-container { margin-top: 10px; width: 100%; }
            .plot-extra-textarea { width: 100% !important; height: 100px !important; border: 1px solid var(--border) !important; border-radius: 12px !important; padding: 16px !important; font-size: 14px !important; font-family: inherit !important; resize: none !important; outline: none !important; transition: 0.2s !important; background: var(--bg-gray) !important; color: var(--text-primary) !important; display: block !important; }
            .plot-extra-textarea:focus { border-color: var(--brand-primary) !important; background: var(--bg-white) !important; box-shadow: 0 0 0 3px var(--brand-light) !important; }

            /* 弹窗类 */
            .custom-slider-modal-overlay, .ai-large-modal-overlay { position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; width: 100vw !important; height: 100vh !important; background: rgba(18, 19, 31, 0.6) !important; backdrop-filter: blur(4px) !important; z-index: 2147483647 !important; display: none; align-items: center; justify-content: center; }
            .ai-large-modal-overlay { opacity: 0; transition: opacity .25s ease !important; }
            .ai-large-modal-overlay.show { display: flex !important; opacity: 1 !important; }
            .custom-slider-modal { position:relative !important; width: 360px; margin: auto !important; background: var(--bg-white); border-radius: 16px; box-shadow: 0 20px 50px rgba(5,0,56,0.2);display: flex; flex-direction: column; overflow: hidden; animation: popIn 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); border: 1px solid var(--border); }
            @keyframes popIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
            /* T2: 16px */
            .custom-slider-modal-hd { padding: 20px 24px; font-size: 16px; font-weight: 800; border-bottom: 1px solid var(--border-light); color: var(--text-primary); background: var(--bg-gray);}
            .custom-slider-modal-bd { padding: 24px; }
            .custom-slider-modal-ft { display: flex; border-top: 1px solid var(--border-light); background: var(--bg-gray);}
            /* T3: 14px */
            .custom-slider-input { width: 100% !important; height: 44px !important; border: 1px solid var(--border) !important; border-radius: 8px !important; padding: 0 14px !important; font-size: 14px !important; font-weight: 700 !important; outline: none !important; background: var(--bg-white) !important; color: var(--text-primary) !important; transition: 0.2s !important; display: block !important; }transition: 0.2s !important; display: block !important; }
            .custom-slider-input:focus { border-color: var(--brand-primary) !important; box-shadow: 0 0 0 3px var(--brand-light) !important; }
            /* T3: 14px */
            .btn-custom-slider-cancel, .btn-custom-slider-confirm { flex: 1; padding: 16px; text-align: center; font-size: 14px; font-weight: 700; cursor: pointer; background: transparent; border: none; transition: 0.2s; }
            .btn-custom-slider-cancel { color: var(--text-secondary); border-right: 1px solid var(--border-light); }
            .btn-custom-slider-cancel:hover { background: var(--border-light); color: var(--text-primary);}
            .btn-custom-slider-confirm { color: var(--brand-primary); }
            .btn-custom-slider-confirm:hover { background: var(--active-bg); }

            .ai-large-modal { position:relative !important; margin: auto !important; width: 800px !important; max-width: 90vw !important; background-color: var(--bg-white) !important; border-radius: 20px !important; box-shadow: 0 25px 50px rgba(5,0,56,0.25) !important;display: none; flex-direction: column !important; overflow: hidden !important; border: 1px solid var(--border) !important; }
            .ai-large-modal-overlay.show .ai-large-modal { display: flex !important; animation: modalPop .25s cubic-bezier(.2,.8,.2,1) !important; }
            @keyframes modalPop { 0% { transform: translateY(-20px) scale(.96); opacity: 0; } 100% { transform: translateY(0) scale(1); opacity: 1; } }
            /* T1: 规范最大标题 16px */
            .ai-large-modal-hd { padding: 20px 30px; border-bottom: 1px solid var(--border-light); display: flex; justify-content: space-between; align-items: center; background: var(--bg-gray); font-size: 16px; font-weight: 800; color: var(--text-primary); }
            .ai-large-modal-close { cursor: pointer; color: var(--text-muted); transition: 0.2s; display: flex; background: var(--border-light); padding: 6px; border-radius: 8px;}
            .ai-large-modal-close:hover { background: var(--red); color: #fff;}
            /* T3: 14px */
            .ai-large-modal-bd { padding: 30px 40px; min-height: 400px; max-height: 65vh; overflow-y: auto; font-size: 14px; line-height: 1.8; color: var(--text-primary); background: var(--bg-white); }
            .ai-large-modal-ft { padding: 20px 30px; border-top: 1px solid var(--border-light); display: flex; justify-content: flex-end; background: var(--bg-gray); }
            .btn-modal-confirm { background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-hover) 100%) !important; color: #FFFFFF !important; border: none !important; padding: 14px 36px !important; border-radius: 12px !important; font-size: 14px !important; font-weight: 700 !important; cursor: pointer !important; transition: 0.2s !important; box-shadow: 0 4px 15px var(--brand-light) !important; margin: 0 !important;}
            .btn-modal-confirm:hover { transform: translateY(-2px) !important; box-shadow: 0 8px 20px rgba(112,131,223,0.3) !important; }

            /* 暗黑模式 */
            html.dark-mode body.saas-takeover-active, html.dark-mode #saas-fullscreen-app-wrapper { background: #12131f !important; }
            html.dark-mode #saas-dashboard-main-container { 
                --brand-primary: #7083df; --brand-hover: #5c6bc0; --brand-light: rgba(112, 131, 223, 0.15);
                --green: #3dcfb6; --green-dark: #2eb8a0; --green-light: rgba(61, 207, 182, 0.15);
                --text-primary: #e0e4f8; --text-secondary: #8890b8; --text-muted: #6b7299; --text-placeholder: #4B5563;
                --border: #2a2b40; --border-light: #1e1f2f; --bg-white: #1a1b2e; --bg-gray: #12131f;
                --active-bg: #22243a; --track-empty: #2a2b40;
            }
            html.dark-mode .left-sidebar, html.dark-mode .editor-area, html.dark-mode .editor-toolbar, html.dark-mode .right-panel, html.dark-mode .rp-header-container, html.dark-mode .rp-tabs { border-color: var(--border) !important; }
            html.dark-mode .left-sidebar { box-shadow: 2px 0 10px rgba(5,0,56,0.3); }
html.dark-mode .right-panel { box-shadow: -2px 0 10px rgba(5,0,56,0.3); }
            html.dark-mode .ai-return-box-wrapper { background: #12131f; border-color: #2a2b40; }
            html.dark-mode .ai-return-box-wrapper.has-content { background: #1a1b2e; border-color: var(--brand-primary); }
            html.dark-mode .plot-control-wrapper { border-color: #2a2b40; background: #161726; }
            html.dark-mode .btn-ai-action-confirm { background: #12131f; }
            html.dark-mode .ai-large-modal, html.dark-mode .custom-slider-modal { background: #1a1b2e; border-color: #2a2b40; }
            html.dark-mode .ai-large-modal-hd, html.dark-mode .ai-large-modal-ft, html.dark-mode .custom-slider-modal-hd, html.dark-mode .custom-slider-modal-ft { background: #161726; border-color: #2a2b40; }
            html.dark-mode .ai-large-modal-bd, html.dark-mode .custom-slider-modal-bd { background: #1a1b2e; }
            html.dark-mode .ep-num-input, html.dark-mode .sidebar-script-name-input { background: #12131f; border-color: #2a2b40; color: #e0e4f8; }
            html.dark-mode .custom-slider-input { background: #12131f !important; border-color: #2a2b40 !important; color: #e0e4f8 !important; }
            html.dark-mode .ep-loading-overlay { background: rgba(22, 23, 26, 0.85); }

            /* ===== 方案 A：工作流纵向引导（雅蓝） ===== */
            .sw-step { width: 18px; height: 18px; border-radius: 50%; background: var(--brand-primary); color: #fff;
                font-size: 10px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
                flex-shrink: 0; margin-right: 2px; line-height: 1; }
            .sw-step-sm { width: 16px; height: 16px; font-size: 9px; }
            .sw-step-muted { background: #cdd5e6; }
            html.dark-mode .sw-step-muted { background: #3a3d56; color: #aab2d5; }

            /* AI 一键分集：用 id+!important 拉满优先级，压住旧的 #btn-ai-split-episodes 规则 */
            #btn-ai-split-episodes.sw-ai-split-block { display: flex !important; align-items: center !important;
                justify-content: center !important; gap: 6px !important; width: 100% !important; height: 42px !important;
                border-radius: 12px !important; font-size: 13px !important; font-weight: 800 !important; color: #fff !important;
                background: var(--brand-primary) !important; border: none !important; cursor: pointer !important;
                box-shadow: 0 4px 12px rgba(112,131,223,.30) !important;
                transition: background .18s ease, box-shadow .18s ease, transform .18s ease !important; }
            #btn-ai-split-episodes.sw-ai-split-block:hover { background: #6376d4 !important;
                box-shadow: 0 6px 16px rgba(112,131,223,.38) !important; transform: translateY(-1px) !important; }
            /* 步骤号③ 与 -1点：用 id 选择器压住旧的 #btn-ai-split-episodes span 规则 */
            #btn-ai-split-episodes.sw-ai-split-block .sw-step { color: #fff !important; background: rgba(255,255,255,.25) !important; }
            #btn-ai-split-episodes.sw-ai-split-block .sw-ai-split-cost { font-size: 11px !important; font-weight: 700 !important;
                color: #fff !important; background: rgba(255,255,255,.22) !important; opacity: 1 !important;
                padding: 2px 7px !important; border-radius: 7px !important; margin-left: 0 !important;
                font-family: 'DM Mono', monospace !important; line-height: 1 !important; }
            /* 暗色模式下也保持雅蓝实心、文字清晰 */
            html.dark-mode #btn-ai-split-episodes.sw-ai-split-block { background: var(--brand-primary) !important; color: #fff !important; box-shadow: 0 4px 12px rgba(112,131,223,.30) !important; }
            html.dark-mode #btn-ai-split-episodes.sw-ai-split-block:hover { background: #6376d4 !important; }
            html.dark-mode #btn-ai-split-episodes.sw-ai-split-block .sw-step,
            html.dark-mode #btn-ai-split-episodes.sw-ai-split-block .sw-ai-split-cost { color: #fff !important; background: rgba(255,255,255,.22) !important; }

            /* AI 一键分集：小尺寸次要按钮（非必走步骤，低调呈现，置于剧集分配卡内） */
            #btn-ai-split-episodes.sw-ai-split-mini {
                display: flex !important; align-items: center !important; justify-content: center !important; gap: 6px !important;
                width: 100% !important; height: 32px !important; margin-top: 10px !important;
                border-radius: 9px !important; font-size: 12px !important; font-weight: 700 !important;
                color: var(--brand-primary) !important; background: rgba(112,131,223,.10) !important;
                border: 1px solid rgba(112,131,223,.22) !important; cursor: pointer !important;
                box-shadow: none !important; transition: background .16s ease, border-color .16s ease !important; }
            #btn-ai-split-episodes.sw-ai-split-mini:hover { background: rgba(112,131,223,.16) !important; border-color: rgba(112,131,223,.34) !important; }
            #btn-ai-split-episodes.sw-ai-split-mini svg { opacity: .9; }
            #btn-ai-split-episodes.sw-ai-split-mini .sw-ai-split-mini-text { line-height: 1 !important; }
            #btn-ai-split-episodes.sw-ai-split-mini .sw-ai-split-mini-cost {
                font-size: 10.5px !important; font-weight: 700 !important; color: var(--brand-primary) !important;
                background: rgba(112,131,223,.16) !important; padding: 2px 6px !important; border-radius: 6px !important;
                font-family: 'DM Mono', monospace !important; line-height: 1 !important; }
            html.dark-mode #btn-ai-split-episodes.sw-ai-split-mini { background: rgba(112,131,223,.16) !important; color: #c7cffa !important; border-color: rgba(112,131,223,.28) !important; }
            html.dark-mode #btn-ai-split-episodes.sw-ai-split-mini:hover { background: rgba(112,131,223,.24) !important; }
            html.dark-mode #btn-ai-split-episodes.sw-ai-split-mini .sw-ai-split-mini-cost { color: #c7cffa !important; background: rgba(255,255,255,.10) !important; }

            .sw-empty-stage { flex-direction: column !important; gap: 0 !important; text-align: center; }
            .sw-empty-kicker { font-size: 12px; font-weight: 700; color: var(--brand-primary); letter-spacing: .5px; margin-bottom: 8px; }
            .sw-empty-h { font-size: 20px; font-weight: 800; color: var(--text-primary); line-height: 1.5; margin-bottom: 22px; }
            .sw-primary-action { display: inline-flex !important; align-items: center; gap: 8px; padding: 13px 28px !important;
                border-radius: 13px !important; font-size: 15px !important; font-weight: 800 !important; color: #fff !important;
                background: var(--brand-primary) !important; box-shadow: 0 8px 22px rgba(112,131,223,.30); cursor: pointer;
                letter-spacing: .5px; border: none !important; transition: background .18s ease, transform .18s ease, box-shadow .18s ease; }
            .sw-primary-action:hover { background: #6376d4 !important; transform: translateY(-1px); box-shadow: 0 10px 26px rgba(112,131,223,.38); color: #fff !important; }
            .sw-minor-row { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 18px; }
            .sw-minor-link { font-size: 13px !important; font-weight: 700 !important; color: var(--text-muted) !important;
                background: transparent !important; border: none !important; padding: 4px 6px !important; }
            .sw-minor-link:hover { color: var(--text-secondary) !important; background: transparent !important; }
            .sw-minor-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-placeholder); flex-shrink: 0; }

            .sw-tb-feature-group { display: inline-flex; align-items: center; gap: 3px;
                background: #f3f5fe; border-radius: 8px; padding: 2px 4px; }
            html.dark-mode .sw-tb-feature-group { background: rgba(112,131,223,.12); }

            /* ===== 故事设定 D1：左侧步骤条 + 复用主编辑器 ===== */
            /* 步骤条悬浮在编辑区左侧 */
            #main-editor-scroll.is-setting-mode { position: relative; padding-left: 210px; }
            .setting-steprail { position: absolute; top: 0; left: 0; width: 188px; height: 100%;
                background: var(--bg-gray); border-right: 1px solid var(--border); padding: 18px 14px; z-index: 5; overflow-y: auto; }
            html.dark-mode .setting-steprail { background: #14151f; border-right-color: #262838; }
            .ssr-label { font-size: 11px; font-weight: 700; color: var(--text-muted); letter-spacing: .5px; padding: 0 6px 12px; }
            .ssr-node { position: relative; display: flex; align-items: center; gap: 11px; padding: 10px 8px; cursor: pointer; border-radius: 10px; margin-bottom: 4px; border: 1px solid transparent; transition: background .15s, box-shadow .15s; }
            .ssr-node .ssr-circ { width: 24px; height: 24px; border-radius: 50%; background: #e3e8f1; color: var(--text-muted); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; flex-shrink: 0; z-index: 1; border: 2px solid var(--bg-gray); }
            .ssr-node .ssr-tx { display: flex; flex-direction: column; min-width: 0; }
            .ssr-node .ssr-tx .t { font-size: 12.5px; font-weight: 600; color: #6b7589; white-space: nowrap; }
            .ssr-node .ssr-tx .s { font-size: 10px; color: #a8b1c2; font-weight: 600; margin-top: 1px; white-space: nowrap; }
            .ssr-node .ssr-line { position: absolute; left: 21px; top: -14px; width: 2px; height: 14px; background: #dde3ee; }
            .ssr-node:first-of-type .ssr-line { display: none; }
            .ssr-node:hover { background: rgba(112,131,223,.06); }
            .ssr-node.on { background: var(--bg-white); box-shadow: 0 1px 3px rgba(5,0,56,.07); border-color: var(--border); }
            .ssr-node.on .ssr-circ { background: var(--brand-primary); color: #fff; border-color: var(--bg-white); box-shadow: 0 3px 8px rgba(112,131,223,.35); }
            .ssr-node.on .ssr-tx .t { color: var(--brand-primary); font-weight: 700; }
            .ssr-node.filled .ssr-circ { background: #eaf4ee; color: #54A076; }
            .ssr-node.on.filled .ssr-circ { background: var(--brand-primary); color: #fff; }
            html.dark-mode .ssr-node.on { background: #1c1d2b; }
            html.dark-mode .ssr-node .ssr-circ { border-color: #14151f; }
            /* 当前项标题头（编辑器上方） */
            .setting-cur-head { max-width: 860px; margin: 0 auto; padding: 30px 20px 4px; }
            .sch-title { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 800; color: var(--text-primary); }
            .sch-ic { width: 26px; height: 26px; border-radius: 8px; background: var(--active-bg); color: var(--brand-primary); font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
            .sch-hint { font-size: 12px; color: var(--text-muted); font-weight: 600; margin: 6px 0 0 35px; }
            /* ===== 一键分集按钮：款1 实心 + 下方说明 ===== */
            #btn-ai-split-episodes.sw-ai-split-btn {
                display: flex !important; align-items: center; justify-content: center; gap: 6px;
                width: 100% !important; margin-top: 10px !important; padding: 11px 12px !important;
                background: #7f8bbf !important; border: none !important; border-radius: 10px !important; cursor: pointer !important;
                color: #fff !important; font-size: 13px !important; font-weight: 600 !important; line-height: 1 !important;
                box-shadow: 0 2px 8px rgba(127,139,191,.25) !important;
                transition: background .18s ease, box-shadow .18s ease, transform .18s ease !important;
            }
            #btn-ai-split-episodes.sw-ai-split-btn:hover { background: #737fb5 !important; box-shadow: 0 4px 12px rgba(127,139,191,.32) !important; transform: translateY(-1px) !important; }
            #btn-ai-split-episodes.sw-ai-split-btn svg { flex-shrink: 0; opacity: .95; }
            .sw-ai-split-meta { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 9px; font-size: 11px; font-weight: 700; }
            .sw-ai-split-meta .sw-ai-split-vip { color: #7f8bbf; }
            .sw-ai-split-meta .sw-ai-split-dot { color: #c7cdda; }
            .sw-ai-split-meta .sw-ai-split-cost { color: #6b7690; }
            html.dark-mode #btn-ai-split-episodes.sw-ai-split-btn { background: #6b76a8 !important; box-shadow: none !important; }
            html.dark-mode #btn-ai-split-episodes.sw-ai-split-btn:hover { background: #7580b5 !important; }
            html.dark-mode .sw-ai-split-meta .sw-ai-split-vip { color: #9aa4d4; }
            html.dark-mode .sw-ai-split-meta .sw-ai-split-dot { color: #3a3d56; }
            html.dark-mode .sw-ai-split-meta .sw-ai-split-cost { color: #aab2c8; }
        