/* =========================================================
 * 漫剧工作流 v2 — 基于阅文漫剧助手操作手册重新设计
 * 5 步工作流：上传剧本 → 剧本格式 → 风格选择 → 角色场景 → 漫剧分镜
 * 作用域：以 .drama-v2 开头的 class；避免与旧版 .drama-* 样式冲突
 * ========================================================= */

.drama-v2-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--bg-warm);
    border-radius: 12px;
    min-height: calc(100vh - 180px);
    overflow: hidden;
}

/* ===== 顶部进度条（固定 5 步） ===== */
.drama-v2-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: var(--bg-white);
    color: var(--strong);
    border-bottom: 1px solid var(--border);
}
.drama-v2-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.drama-v2-project-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--strong);
}
.drama-v2-project-rename {
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    padding: 2px 6px;
    border-radius: 4px;
}
.drama-v2-project-rename:hover { color: var(--strong); background: var(--bg-warm); }

.drama-v2-steps {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
}
.drama-v2-step {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 4px;
    padding: 2px 12px 0;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 13px;
    user-select: none;
    position: relative;
    min-width: 70px;
    text-align: center;
}
.drama-v2-step-label {
    padding-bottom: 6px;
    border-bottom: 2px solid transparent;
    transition: all .2s;
    white-space: nowrap;
}
.drama-v2-step.active .drama-v2-step-label {
    color: #c8791f;
    font-weight: 600;
    border-bottom-color: #c8791f;
}
.drama-v2-step.done .drama-v2-step-label { color: var(--strong); }
.drama-v2-step:hover .drama-v2-step-label { color: var(--strong); }
.drama-v2-step-arrow {
    color: var(--text-hint);
    font-size: 12px;
    padding: 0 4px;
    margin-bottom: 6px;
}

.drama-v2-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.drama-v2-btn {
    padding: 7px 14px;
    background: #c8791f;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background .15s;
}
.drama-v2-btn:hover { background: #e0a13a; }
.drama-v2-btn:disabled { background: var(--border); color: var(--text-hint); cursor: not-allowed; }
.drama-v2-btn.ghost {
    background: transparent;
    color: var(--strong);
    border: 1px solid var(--border);
}
.drama-v2-btn.ghost:hover { background: var(--bg-warm); color: var(--strong); }
.drama-v2-btn.secondary {
    background: var(--bg-warm);
    color: var(--strong);
}
.drama-v2-btn.secondary:hover { background: var(--border); color: var(--strong); }

/* ===== 通用模型切换器（每步顶部）===== */
.drama-v2-model-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 20px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.drama-v2-model-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}
.drama-v2-model-item label {
    font-weight: 500;
    color: var(--strong);
    margin: 0;
}
.drama-v2-model-item select {
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-white);
    font-size: 12px;
    min-width: 200px;
    cursor: pointer;
}
.drama-v2-model-hint {
    color: var(--text-secondary);
    font-size: 11px;
    margin-left: 2px;
}

/* ===== 主体内容区 ===== */
.drama-v2-body {
    flex: 1;
    padding: 20px 24px;
    overflow: auto;
    background: var(--bg-warm);
}

/* ===== Step 1: 上传剧本 ===== */
.drama-v2-upload-panel {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 20px;
}
.drama-v2-upload-left {
    background: var(--bg-white);
    border-radius: 10px;
    padding: 30px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.drama-v2-upload-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--strong);
}
.drama-v2-upload-sub {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}
.drama-v2-upload-box {
    width: 100%;
    max-width: 620px;
    min-height: 280px;
    border: 2px dashed var(--border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    cursor: pointer;
    transition: all .2s;
    background: var(--bg-warm);
}
.drama-v2-upload-box:hover, .drama-v2-upload-box.dragover {
    border-color: #c8791f;
    background: var(--bg-warm);
}
.drama-v2-upload-box i.fa-file-arrow-up {
    font-size: 44px;
    color: #c8791f;
}
.drama-v2-upload-hint {
    color: var(--text-secondary);
    font-size: 14px;
}
.drama-v2-upload-hint-sub {
    color: var(--text-hint);
    font-size: 12px;
}
.drama-v2-upload-filename {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-warm);
    border-radius: 8px;
    margin-top: 10px;
    font-size: 13px;
    color: #c8791f;
}
.drama-v2-upload-filename .btn-remove {
    background: none; border: none;
    color: #e07b63; cursor: pointer; font-size: 14px;
}
.drama-v2-upload-compliance {
    text-align: center;
    font-size: 12px;
    color: var(--text-hint);
    margin-top: 20px;
}

.drama-v2-upload-right {
    background: var(--bg-white);
    border-radius: 10px;
    padding: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}
.drama-v2-upload-right h4 {
    font-size: 15px;
    margin: 0 0 10px;
    color: var(--strong);
    font-weight: 600;
}
.drama-v2-upload-right h5 {
    font-size: 13px;
    margin: 16px 0 6px;
    color: var(--strong);
    font-weight: 600;
}
.drama-v2-upload-right code {
    background: var(--bg-warm);
    padding: 1px 5px;
    border-radius: 3px;
    color: #e07b63;
    font-size: 12px;
}
.drama-v2-format-example {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 12px;
    margin: 8px 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-secondary);
    background: var(--bg-warm);
}
.drama-v2-format-example .highlight {
    background: rgba(232,176,75,.12); border: 1px solid rgba(232,176,75,.4);
    padding: 1px 4px; border-radius: 3px; color: #e8c073;
}

/* ===== Step 2: 剧本格式（分集预览） ===== */
.drama-v2-format-panel {
    background: var(--bg-white);
    border-radius: 10px;
    padding: 20px 24px;
    min-height: 500px;
}
.drama-v2-format-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.drama-v2-format-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--strong);
}
.drama-v2-format-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}
.drama-v2-format-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
}
.drama-v2-format-toolbar select {
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 5px;
    min-width: 120px;
    font-size: 13px;
}
.drama-v2-episode-content {
    min-height: 400px;
    padding: 16px 20px;
    background: var(--bg-warm);
    border: 1px solid var(--border);
    border-radius: 8px;
    white-space: pre-wrap;
    font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, '苹方', 'Microsoft YaHei', sans-serif;
    line-height: 1.75;
    color: var(--strong);
    font-size: 13.5px;
}
.drama-v2-episode-content:focus {
    outline: none;
    border-color: #c8791f;
    background: var(--bg-white);
}
.drama-v2-episode-content [contenteditable] { outline: none; }

.drama-v2-tag {
    display: inline-block;
    padding: 1px 6px;
    background: var(--bg-warm);
    color: #c8791f;
    border: 1px solid var(--border);
    border-radius: 3px;
    font-size: 12px;
    margin: 0 2px;
}
.drama-v2-tag.emotion { background: rgba(224,123,99,.13); color: #e07b63; border-color: #ffccc7; }
.drama-v2-tag.action { background: rgba(77,191,168,.12); color: #4dbfa8; border-color: #b7eb8f; }
.drama-v2-tag.sfx { background: rgba(232,176,75,.12); color: #e8c073; border-color: rgba(232,176,75,.4); }
.drama-v2-tag.shot { background: var(--bg-warm); color: #c8791f; border-color: var(--border); }

/* ===== Step 3: 风格选择 ===== */
.drama-v2-style-panel {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
}
.drama-v2-style-left {
    background: var(--bg-white);
    border-radius: 10px;
    padding: 20px 24px;
}
.drama-v2-style-section {
    margin-bottom: 22px;
}
.drama-v2-style-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 10px;
    color: var(--strong);
}
.drama-v2-ratio-list {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.drama-v2-ratio-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all .15s;
}
.drama-v2-ratio-item:hover { background: var(--bg-warm); }
.drama-v2-ratio-item.active {
    border-color: #c8791f;
    background: var(--bg-warm);
    box-shadow: 0 2px 8px rgba(200,121,31,.15);
}
.drama-v2-ratio-box {
    border: 2px solid #6b7280;
    border-radius: 6px;
    background: var(--bg-warm);
    transition: all .15s;
}
.drama-v2-ratio-item.active .drama-v2-ratio-box {
    border-color: #c8791f;
    background: linear-gradient(135deg, rgba(200,121,31,.14), rgba(200,121,31,.30));
}
.drama-v2-ratio-item.active .drama-v2-ratio-label { color: #c8791f; font-weight: 600; }
.drama-v2-ratio-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.drama-v2-style-mode-toggle {
    display: flex;
    gap: 14px;
    margin-bottom: 12px;
}
.drama-v2-style-mode-toggle label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
}

.drama-v2-style-category-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.drama-v2-category-tab {
    padding: 5px 14px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--bg-white);
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all .15s;
    user-select: none;
}
.drama-v2-category-tab.active {
    background: #c8791f;
    border-color: #c8791f;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(200,121,31,.28);
}
.drama-v2-category-tab:hover:not(.active) {
    background: var(--bg-warm);
    border-color: var(--border);
    color: #c8791f;
}

.drama-v2-style-preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    max-height: 520px;
    overflow-y: auto;
}
.drama-v2-style-current-chip {
    margin: 0 0 10px;
    padding: 6px 12px;
    background: var(--bg-warm);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: #c8791f;
    font-size: 12px;
    display: inline-flex; align-items: center; gap: 6px;
    font-weight: 500;
}
.drama-v2-style-current-chip i { color: #c8791f; }
.drama-v2-style-current-chip .dim { color: var(--text-secondary); font-weight: 400; margin-left: 4px; }
.drama-v2-style-preset-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1 / 1.1;
    background: var(--bg-warm);
    border: 2px solid transparent;
    transition: all .18s;
}
.drama-v2-style-preset-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(200,121,31,.18);
}
.drama-v2-style-preset-card.active {
    border-color: #c8791f;
    box-shadow: 0 0 0 3px rgba(200,121,31,.18), 0 6px 16px rgba(200,121,31,.28);
    transform: translateY(-2px);
}
.drama-v2-style-preset-card .cover {
    width: 100%; height: 100%;
    background-size: cover; background-position: center;
    filter: brightness(.9);
    transition: filter .18s;
}
.drama-v2-style-preset-card.active .cover { filter: brightness(1); }
.drama-v2-style-preset-card .name {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 6px 8px;
    background: linear-gradient(0deg, rgba(0,0,0,.85), rgba(0,0,0,0));
    color: #ffffff; font-size: 12px; font-weight: 500;
    text-align: center;
}
.drama-v2-style-preset-card .check {
    position: absolute; top: 6px; right: 6px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #c8791f;
    color: #ffffff; font-size: 11px;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transform: scale(.6);
    transition: all .18s;
    box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.drama-v2-style-preset-card.active .check {
    opacity: 1;
    transform: scale(1);
}

.drama-v2-custom-style {
    padding: 10px 0;
}
.drama-v2-custom-style textarea {
    width: 100%; min-height: 100px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    resize: vertical;
    font-family: inherit;
}

.drama-v2-style-right {
    background: var(--bg-white);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.drama-v2-style-right h4 {
    font-size: 14px; font-weight: 600; margin: 0;
    color: var(--strong);
}
.drama-v2-style-preview-name {
    font-size: 13px; color: #c8791f; font-weight: 500;
}
.drama-v2-style-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.drama-v2-style-preview-grid img {
    width: 100%; aspect-ratio: 1/1.1; object-fit: cover;
    border-radius: 6px; background: var(--bg-warm);
}

/* ===== Step 4: 角色场景（三列） ===== */
.drama-v2-scene-panel {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    min-height: 500px;
}
.drama-v2-col {
    background: var(--bg-white);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 500px;
}
.drama-v2-col-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.drama-v2-col-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--strong);
    display: flex;
    align-items: center;
    gap: 6px;
}
.drama-v2-col-title .count {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 400;
}
.drama-v2-col-actions {
    display: flex;
    gap: 6px;
}
.drama-v2-mini-btn {
    padding: 3px 10px;
    border-radius: 5px;
    border: 1px solid var(--border);
    background: var(--bg-white);
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all .15s;
}
.drama-v2-mini-btn:hover { border-color: #c8791f; color: #c8791f; }
.drama-v2-mini-btn.primary {
    background: #c8791f; border-color: #c8791f; color: #ffffff;
}
.drama-v2-mini-btn.primary:hover { background: #e0a13a; color: #ffffff; }
.drama-v2-mini-btn.danger { color: #e07b63; }
.drama-v2-mini-btn.danger:hover { border-color: #e07b63; }

.drama-v2-card-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    overflow-y: auto;
    max-height: 620px;
}
.drama-v2-card {
    background: var(--bg-warm);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    transition: all .15s;
    position: relative;
}
.drama-v2-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); border-color: #c8791f; }
.drama-v2-card-img {
    width: 100%;
    aspect-ratio: 1 / 1.15;
    background: var(--border);
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-hint);
    font-size: 24px;
}
.drama-v2-card-img .generating {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 12px;
    gap: 6px;
}
.drama-v2-card-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--strong);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.drama-v2-card-role-chip {
    padding: 1px 6px;
    background: var(--bg-warm);
    color: #c8791f;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
}
.drama-v2-card-role-chip.prop-工具 { background: rgba(77,191,168,.12); color: #4dbfa8; }
.drama-v2-card-role-chip.prop-法器 { background: var(--bg-warm); color: #c8791f; }
.drama-v2-card-role-chip.prop-交通工具 { background: rgba(232,176,75,.12); color: #e8c073; }
.drama-v2-card-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.drama-v2-card-footer {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.drama-v2-voice-chip {
    padding: 1px 5px;
    background: var(--border);
    border-radius: 3px;
    font-size: 10px;
    color: var(--text-secondary);
}

.drama-v2-card-empty {
    grid-column: 1 / -1;
    padding: 60px 10px;
    text-align: center;
    color: var(--text-hint);
    font-size: 13px;
}

.drama-v2-col-bottom {
    border-top: 1px solid var(--border);
    padding-top: 10px;
    display: flex;
    justify-content: center;
}

/* ===== Step 5: 漫剧分镜 ===== */
.drama-v2-storyboard-panel {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 16px;
    min-height: 600px;
}
.drama-v2-act-sidebar {
    background: var(--bg-white);
    border-radius: 10px;
    padding: 14px 12px;
}
.drama-v2-act-sidebar-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px 10px;
    border-bottom: 1px solid var(--border);
}
.drama-v2-act-sidebar-head .add {
    cursor: pointer; color: #c8791f;
}
.drama-v2-act-item {
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}
.drama-v2-act-item:hover { background: var(--bg-warm); }
.drama-v2-act-item.active { background: var(--bg-warm); color: #c8791f; font-weight: 600; }
.drama-v2-act-item .count-badge {
    background: var(--bg-white);
    padding: 0 6px;
    border-radius: 8px;
    font-size: 11px;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.drama-v2-storyboard-main {
    background: var(--bg-white);
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
}
.drama-v2-storyboard-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}
.drama-v2-storyboard-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--strong);
}
.drama-v2-storyboard-toolbar { display: flex; gap: 6px; flex-wrap: wrap; }

.drama-v2-sb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    flex: 1;
    overflow-y: auto;
    max-height: 70vh;
}
.drama-v2-sb-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all .15s;
}
.drama-v2-sb-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); border-color: #c8791f; }
.drama-v2-sb-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg-warm);
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c8791f;
}
.drama-v2-sb-thumb img, .drama-v2-sb-thumb video {
    width: 100%; height: 100%; object-fit: cover;
}
.drama-v2-sb-thumb .play-icon {
    position: absolute;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,.85);
    color: #c8791f;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    pointer-events: none;
}
.drama-v2-sb-thumb .loading-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.6);
    color: #ffffff; font-size: 12px;
    display: flex; align-items: center; justify-content: center;
    gap: 6px;
}
.drama-v2-sb-thumb .shot-label {
    position: absolute;
    top: 8px; left: 8px;
    background: rgba(0,0,0,.6);
    color: #ffffff;
    font-size: 12px; font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}
.drama-v2-sb-body {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.drama-v2-sb-title {
    font-size: 13px; font-weight: 600;
    color: var(--strong);
}
.drama-v2-sb-prompt {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.55;
    max-height: 80px;
    overflow-y: auto;
    padding: 4px 0;
}
.drama-v2-sb-empty {
    color: var(--text-hint); font-size: 12px;
    font-style: italic;
}
.drama-v2-sb-subjects {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding-top: 6px;
    border-top: 1px dashed var(--border);
}
.drama-v2-sb-subject {
    background: var(--border);
    color: var(--text-secondary);
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.drama-v2-sb-subject.character { background: var(--bg-warm); color: #c8791f; }
.drama-v2-sb-subject.scene { background: rgba(232,176,75,.12); color: #e8c073; }
.drama-v2-sb-subject.prop { background: rgba(77,191,168,.12); color: #4dbfa8; }
.drama-v2-sb-footer {
    display: flex;
    gap: 4px;
    padding: 6px 10px 10px;
    justify-content: flex-end;
}

/* ===== 弹窗 ===== */
.drama-v2-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 3100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.drama-v2-modal {
    background: var(--bg-white);
    border-radius: 12px;
    width: 720px;
    max-width: 100%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.22);
    overflow: hidden;
}
.drama-v2-modal.large { width: 1000px; }
.drama-v2-modal-head {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.drama-v2-modal-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--strong);
}
.drama-v2-modal-close {
    border: none; background: none;
    font-size: 16px; cursor: pointer; color: var(--text-secondary);
}
.drama-v2-modal-close:hover { color: var(--strong); }
.drama-v2-modal-body {
    padding: 20px; flex: 1; overflow-y: auto;
}
.drama-v2-modal-body .field {
    margin-bottom: 14px;
}
.drama-v2-modal-body .field label {
    display: block;
    font-size: 13px; font-weight: 500; color: var(--strong);
    margin-bottom: 5px;
}
.drama-v2-modal-body .field input,
.drama-v2-modal-body .field textarea,
.drama-v2-modal-body .field select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 13px;
    font-family: inherit;
}
.drama-v2-modal-body .field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.drama-v2-modal-foot {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ===== 镜头详情二级页 ===== */
.drama-v2-shot-detail {
    background: var(--bg-white);
    border-radius: 10px;
    display: grid;
    grid-template-columns: 280px 1fr 260px;
    gap: 0;
    min-height: calc(100vh - 240px);
    overflow: hidden;
}
.drama-v2-shot-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    padding: 0 16px;
}
.drama-v2-shot-tab {
    padding: 10px 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 13px;
    border-bottom: 2px solid transparent;
}
.drama-v2-shot-tab.active {
    color: #c8791f;
    border-bottom-color: #c8791f;
    font-weight: 600;
}
.drama-v2-shot-left {
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}
.drama-v2-shot-left-body {
    padding: 14px 16px;
    overflow-y: auto;
    flex: 1;
}
.drama-v2-shot-left-body .field { margin-bottom: 12px; }
.drama-v2-shot-left-body .field label {
    display: block; font-size: 12px; font-weight: 500;
    margin-bottom: 4px; color: var(--strong);
}
.drama-v2-shot-left-body .field select,
.drama-v2-shot-left-body .field input,
.drama-v2-shot-left-body .field textarea {
    width: 100%; padding: 5px 9px;
    border: 1px solid var(--border); border-radius: 5px;
    font-size: 12px; font-family: inherit;
}
.drama-v2-shot-left-body .field textarea { min-height: 80px; resize: vertical; }
.drama-v2-shot-subjects-row {
    display: flex; gap: 6px; flex-wrap: wrap;
    padding: 4px 0;
}
.drama-v2-shot-subject-pick {
    padding: 3px 8px; border-radius: 4px;
    background: var(--bg-warm); border: 1px solid var(--border);
    font-size: 11px; color: var(--text-secondary); cursor: pointer;
}
.drama-v2-shot-subject-pick.picked {
    background: var(--bg-warm); border-color: #c8791f; color: #c8791f;
}
.drama-v2-shot-center {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-warm);
}
.drama-v2-shot-preview {
    flex: 1;
    background: var(--bg-warm);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #c8791f;
    position: relative;
    overflow: hidden;
}
.drama-v2-shot-preview img, .drama-v2-shot-preview video {
    max-width: 100%; max-height: 100%; border-radius: 10px;
}
.drama-v2-shot-preview .placeholder {
    color: var(--text-secondary); font-size: 14px;
}
.drama-v2-shot-right {
    border-left: 1px solid var(--border);
    padding: 14px 16px;
    overflow-y: auto;
    background: var(--bg-warm);
}
.drama-v2-version-list { display: flex; flex-direction: column; gap: 10px; }
.drama-v2-version-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px;
    background: var(--bg-white);
    cursor: pointer;
    transition: all .15s;
}
.drama-v2-version-item:hover { border-color: #c8791f; }
.drama-v2-version-item.active { border-color: #c8791f; box-shadow: 0 0 0 3px rgba(200,121,31,.15); }
.drama-v2-version-item img, .drama-v2-version-item video {
    width: 100%; aspect-ratio: 16/9; object-fit: cover;
    border-radius: 5px;
}
.drama-v2-version-item .meta {
    font-size: 11px; color: var(--text-secondary); padding: 4px 2px 0;
}

/* ===== 模型切换弹层（分镜卡片上的小按钮） ===== */
.drama-v2-inline-model-pick {
    position: absolute;
    top: 8px; right: 8px;
    background: rgba(0,0,0,.5);
    color: #ffffff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
}
.drama-v2-inline-model-pick:hover { background: rgba(0,0,0,.75); }

/* ===== 日志面板 ===== */
.drama-v2-log {
    position: fixed;
    bottom: 20px; right: 20px;
    width: 420px;
    max-height: 260px;
    background: var(--bg-white);
    color: var(--strong);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 11px;
    font-family: 'SF Mono', Monaco, Menlo, monospace;
    overflow-y: auto;
    z-index: 1800;
    box-shadow: 0 4px 18px rgba(0,0,0,.3);
    display: none;
}
.drama-v2-log.show { display: block; }
.drama-v2-log-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 6px;
    color: var(--strong);
    font-weight: 600;
    font-size: 12px;
    position: sticky; top: 0;
    background: var(--bg-white);
}
.drama-v2-log-line { margin-bottom: 2px; white-space: pre-wrap; }
.drama-v2-log-line.INFO { color: var(--strong); }
.drama-v2-log-line.OK   { color: #4dbfa8; }
.drama-v2-log-line.WARN { color: #e8c073; }
.drama-v2-log-line.ERR  { color: #e07b63; }
.drama-v2-log-line.SYS  { color: #c8791f; }

/* 小屏适配 */
@media (max-width: 1200px) {
    .drama-v2-upload-panel { grid-template-columns: 1fr; }
    .drama-v2-style-panel { grid-template-columns: 1fr; }
    .drama-v2-scene-panel { grid-template-columns: 1fr; }
    .drama-v2-storyboard-panel { grid-template-columns: 1fr; }
    .drama-v2-act-sidebar { min-height: auto; }
    .drama-v2-shot-detail { grid-template-columns: 1fr; }
}

/* =========================================================
 * Step 4 · 角色/场景/道具 详情页（全屏三栏，明亮浅色·蓝紫主题）
 * ========================================================= */
.drama-v2-item-detail {
    background: var(--bg-white);
    border-radius: 10px;
    display: grid;
    grid-template-columns: 280px 1fr 240px;
    gap: 0;
    min-height: calc(100vh - 220px);
    overflow: hidden;
    color: var(--strong);
}
.drama-v2-id-back {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--bg-warm);
    color: var(--strong); font-size: 14px; font-weight: 600;
    cursor: pointer; user-select: none;
}
.drama-v2-id-back:hover { background: var(--bg-warm); }
.drama-v2-id-left { border-right: 1px solid var(--bg-warm); display: flex; flex-direction: column; }
.drama-v2-id-left-body { padding: 14px 16px; overflow-y: auto; flex: 1; }
.drama-v2-id-left-body .field { margin-bottom: 14px; }
.drama-v2-id-left-body .field label {
    display: block; font-size: 12px; color: var(--strong); margin-bottom: 5px; font-weight: 500;
}
.drama-v2-id-left-body .field input,
.drama-v2-id-left-body .field textarea,
.drama-v2-id-left-body .field select {
    width: 100%; padding: 6px 10px;
    background: var(--bg-white); border: 1px solid var(--border);
    border-radius: 5px; color: var(--strong); font-size: 12px; font-family: inherit;
}
.drama-v2-id-left-body .field textarea { min-height: 78px; resize: vertical; }
.drama-v2-id-left-body .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.drama-v2-id-field-header {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12px; color: var(--strong); margin-bottom: 5px;
}
.drama-v2-id-field-header .right { display: flex; gap: 10px; color: var(--text-secondary); font-size: 11px; }
.drama-v2-id-field-header .right span { cursor: pointer; }
.drama-v2-id-field-header .right span:hover { color: var(--strong); }

.drama-v2-id-genmode {
    display: flex; gap: 0; margin-bottom: 12px;
    background: var(--bg-warm); border-radius: 6px; padding: 2px;
}
.drama-v2-id-genmode-tab {
    flex: 1; text-align: center; padding: 6px 10px; font-size: 12px;
    color: var(--text-secondary); cursor: pointer; border-radius: 5px;
}
.drama-v2-id-genmode-tab.active { background: #c8791f; color: #ffffff; font-weight: 600; }

.drama-v2-id-left-footer {
    padding: 12px 16px; border-top: 1px solid var(--bg-warm); background: var(--bg-white);
}
.drama-v2-id-gen-btn {
    width: 100%; padding: 10px;
    background: linear-gradient(90deg,#c8791f,#e0a13a);
    color: #ffffff; border: none; border-radius: 6px;
    font-size: 14px; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.drama-v2-id-gen-btn:disabled { opacity: .55; cursor: not-allowed; }
.drama-v2-id-gen-btn:hover:not(:disabled) { filter: brightness(1.1); }
.drama-v2-id-gen-btn .coin { color: #e0a13a; font-size: 12px; }

.drama-v2-id-center {
    display: flex; flex-direction: column;
    background: var(--bg-warm); padding: 14px 16px; min-width: 0;
}
.drama-v2-id-center-title { font-size: 16px; font-weight: 600; color: var(--strong); padding: 4px 0 10px; }
.drama-v2-id-canvas {
    flex: 1; background: var(--bg-white); border: 1px solid var(--border); border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; position: relative; min-height: 360px;
}
.drama-v2-id-canvas img, .drama-v2-id-canvas video { max-width: 100%; max-height: 100%; display: block; }
.drama-v2-id-canvas .placeholder { color: var(--text-hint); font-size: 14px; text-align: center; }
.drama-v2-id-canvas .loading {
    position: absolute; inset: 0; background: rgba(0,0,0,.55);
    color: #ffffff; display: flex; align-items: center; justify-content: center;
    font-size: 14px; gap: 8px;
}
.drama-v2-id-toolbar { margin-top: 10px; display: flex; gap: 8px; justify-content: center; }
.drama-v2-id-tool-btn {
    width: 36px; height: 36px; border-radius: 8px;
    background: var(--bg-warm); border: 1px solid var(--border); color: var(--strong);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.drama-v2-id-tool-btn:hover { color: var(--strong); background: var(--border); }

.drama-v2-id-views {
    margin-top: 12px; background: var(--bg-white); border: 1px solid var(--border);
    border-radius: 8px; padding: 10px;
}
.drama-v2-id-views-head {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12px; color: var(--text-secondary); margin-bottom: 8px;
}
.drama-v2-id-views-actions { display: flex; gap: 12px; }
.drama-v2-id-views-actions span { cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.drama-v2-id-views-actions span:hover { color: #c8791f; }

.drama-v2-id-views-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 8px;
}
.drama-v2-id-view-card {
    background: var(--bg-warm); border: 2px solid transparent;
    border-radius: 8px; aspect-ratio: 1 / 1; cursor: pointer;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    overflow: hidden; position: relative;
    color: var(--text-secondary); font-size: 11px;
}
.drama-v2-id-view-card.active { border-color: #c8791f; }
.drama-v2-id-view-card .cover {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
}
.drama-v2-id-view-card .label {
    position: relative; z-index: 1; padding: 2px 6px;
    background: rgba(0,0,0,.6); color: #ffffff; border-radius: 3px;
    font-size: 11px; margin-top: auto; margin-bottom: 4px;
}
.drama-v2-id-view-card.empty .label { background: transparent; color: var(--strong); margin-top: 6px; }
.drama-v2-id-view-card .ph-icon { font-size: 22px; color: var(--border); margin-bottom: 4px; }
.drama-v2-id-view-card.add {
    background: transparent; border: 1px dashed var(--border);
}
.drama-v2-id-view-card.add:hover { border-color: #c8791f; color: #c8791f; }
.drama-v2-id-view-card .loading {
    position: absolute; inset: 0; background: rgba(0,0,0,.55);
    display: flex; align-items: center; justify-content: center;
    color: #ffffff; font-size: 11px; gap: 4px;
}

.drama-v2-id-right {
    border-left: 1px solid var(--border); padding: 14px 12px;
    overflow-y: auto; background: var(--bg-warm);
}
.drama-v2-id-right-head {
    font-size: 13px; font-weight: 600; color: var(--strong); margin-bottom: 10px;
    display: flex; justify-content: space-between; align-items: center;
}
.drama-v2-id-version-list { display: flex; flex-direction: column; gap: 10px; }
.drama-v2-id-version-item {
    background: var(--bg-white); border-radius: 8px; padding: 6px;
    cursor: pointer; border: 2px solid transparent; transition: all .15s;
}
.drama-v2-id-version-item:hover { border-color: #e0a13a; }
.drama-v2-id-version-item.active { border-color: #c8791f; }
.drama-v2-id-version-item img {
    width: 100%; aspect-ratio: 16/9; object-fit: cover;
    border-radius: 5px; background: var(--bg-warm);
}
.drama-v2-id-version-item .meta {
    display: flex; justify-content: space-between; align-items: center;
    padding: 4px 2px 0; font-size: 10px; color: var(--text-secondary);
}
.drama-v2-id-version-item .meta .tag {
    background: rgba(200,121,31,.14); color: #c8791f;
    padding: 0 5px; border-radius: 3px;
}
.drama-v2-id-version-empty {
    color: var(--text-hint); font-size: 12px; text-align: center; padding: 30px 10px;
}

.drama-v2-id-refs {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 6px; margin-top: 6px;
}
.drama-v2-id-ref-card {
    aspect-ratio: 1 / 1; background: var(--bg-white);
    border: 1px dashed var(--border); border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); font-size: 18px; cursor: pointer;
    overflow: hidden; position: relative;
}
.drama-v2-id-ref-card img { width: 100%; height: 100%; object-fit: cover; }
.drama-v2-id-ref-card:hover { border-color: #c8791f; color: #c8791f; }
.drama-v2-id-ref-card .remove {
    position: absolute; top: 2px; right: 2px;
    width: 18px; height: 18px; border-radius: 50%;
    background: rgba(0,0,0,.7); color: #ffffff;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px;
}

@media (max-width: 1200px) {
    .drama-v2-item-detail { grid-template-columns: 1fr; }
}

/* =========================================================
 * 视频合成（Step 5 底部）
 * ========================================================= */
.drama-v2-mini-btn.compose {
    background: linear-gradient(135deg, #c8791f, #e0a13a);
    color: #ffffff; border-color: transparent;
}
.drama-v2-mini-btn.compose:hover:not(:disabled) {
    filter: brightness(1.08); color: #ffffff;
}
.drama-v2-mini-btn.compose:disabled {
    background: var(--border); color: var(--text-hint); cursor: not-allowed;
}
.drama-v2-mini-btn .count-chip {
    display: inline-block;
    padding: 1px 6px; margin-left: 4px;
    background: rgba(255,255,255,.22);
    border-radius: 8px; font-size: 11px;
}
.drama-v2-mini-btn.compose:disabled .count-chip {
    background: var(--border);
}

.drama-v2-compose-empty {
    margin-top: 16px;
    background: var(--bg-warm);
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 16px 20px;
    display: flex; align-items: center; gap: 14px;
}
.drama-v2-compose-empty > i {
    font-size: 28px; color: var(--text-hint);
}

.drama-v2-compose-result {
    margin-top: 16px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.drama-v2-compose-result .head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-warm);
    border-bottom: 1px solid var(--border);
}
.drama-v2-compose-result .title {
    font-weight: 600; color: var(--strong); display: flex; align-items: center; gap: 6px;
}
.drama-v2-compose-result .meta {
    color: var(--text-secondary); font-size: 12px; display: flex; gap: 6px;
}
.drama-v2-compose-result.done .title i { color: #4dbfa8; }
.drama-v2-compose-result.running .title i { color: #c8791f; }
.drama-v2-compose-result .body {
    padding: 14px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: stretch;
}
.drama-v2-compose-result .body video {
    width: 100%; max-height: 320px;
    background: #000; border-radius: 8px;
}
.drama-v2-compose-result .actions {
    display: flex; flex-direction: column; gap: 8px;
    justify-content: center; min-width: 160px;
}

.drama-v2-compose-result.running .progress-bar {
    height: 10px; margin: 10px 14px 6px;
    background: var(--border); border-radius: 6px; overflow: hidden;
}
.drama-v2-compose-result.running .progress-fill {
    height: 100%;
    background: linear-gradient(90deg,#c8791f,#e0a13a);
    transition: width .18s;
}
.drama-v2-compose-result.running .progress-text {
    padding: 0 14px 4px;
    color: var(--text-secondary); font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.drama-v2-compose-result.running .hint {
    padding: 4px 14px 12px;
    color: #e8c073; font-size: 12px;
}

/* 合成模态框 */
.drama-v2-compose-modal {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 0;
    height: 520px;
}
.drama-v2-compose-modal .left, .drama-v2-compose-modal .right {
    padding: 16px;
}
.drama-v2-compose-modal .left { border-right: 1px solid var(--border); overflow: auto; }
.drama-v2-compose-modal .right { background: var(--bg-warm); overflow: auto; }
.drama-v2-compose-modal .section-title {
    display: flex; justify-content: space-between; align-items: center;
    font-weight: 600; color: var(--strong); margin-bottom: 10px;
}
.drama-v2-compose-modal .section-title .mini {
    font-weight: 400; font-size: 12px; color: #c8791f;
    display: flex; gap: 8px;
}
.drama-v2-compose-modal .section-title .mini span { cursor: pointer; }
.drama-v2-compose-modal .section-title .mini span:hover { text-decoration: underline; }

.drama-v2-compose-list {
    display: flex; flex-direction: column; gap: 6px;
}
.drama-v2-compose-row {
    display: grid;
    grid-template-columns: auto 96px 1fr;
    gap: 10px; align-items: center;
    padding: 8px; border: 1px solid var(--border); border-radius: 8px;
    cursor: pointer; transition: all .15s; background: var(--bg-white);
}
.drama-v2-compose-row:hover:not(.disabled) { border-color: #c8791f; background: var(--bg-warm); }
.drama-v2-compose-row.disabled { opacity: .55; cursor: not-allowed; }
.drama-v2-compose-row input[type=checkbox] {
    width: 16px; height: 16px; cursor: pointer;
}
.drama-v2-compose-row .thumb {
    width: 96px; height: 54px; background: #000; border-radius: 5px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-hint);
}
.drama-v2-compose-row .thumb video,
.drama-v2-compose-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.drama-v2-compose-row .info { min-width: 0; }
.drama-v2-compose-row .info .t {
    font-weight: 600; color: var(--strong); font-size: 13px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.drama-v2-compose-row .info .d {
    color: var(--text-secondary); font-size: 12px;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
    overflow: hidden; margin-top: 2px;
}
.drama-v2-compose-row .info .m { font-size: 11px; color: var(--text-secondary); margin-top: 3px; display: flex; gap: 5px; }

.drama-v2-compose-modal .right .field { margin-bottom: 14px; }
.drama-v2-compose-modal .right .field label {
    display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 4px;
}
.drama-v2-compose-modal .right .field select {
    width: 100%; padding: 6px 10px; border: 1px solid var(--border);
    border-radius: 6px; background: var(--bg-white); font-size: 13px;
}

.drama-v2-compose-summary {
    margin-top: 16px; padding: 12px;
    background: var(--bg-white); border: 1px solid var(--border); border-radius: 8px;
    font-size: 13px; color: var(--text-secondary);
}
.drama-v2-compose-summary > div { display: flex; justify-content: space-between; margin-bottom: 4px; }
.drama-v2-compose-summary b { color: #c8791f; font-weight: 600; }
.drama-v2-compose-summary .tip {
    display: block;
    margin-top: 8px;
    padding: 8px; background: rgba(232,176,75,.12); border-radius: 5px;
    color: #e8c073; font-size: 11px; line-height: 1.6;
}

.drama-v2-compose-modal-footer {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 12px 20px; border-top: 1px solid var(--border);
    background: var(--bg-warm);
}

@media (max-width: 900px) {
    .drama-v2-compose-modal { grid-template-columns: 1fr; height: auto; }
    .drama-v2-compose-modal .left { border-right: none; border-bottom: 1px solid var(--border); }
    .drama-v2-compose-result .body { grid-template-columns: 1fr; }
}

/* =========================================================
 * 项目列表页（list 视图）
 * ========================================================= */
.drama-v2-root { min-height: calc(100vh - 180px); }

.drama-v2-list-wrap {
    background: var(--bg-warm);
    border-radius: 12px;
    padding: 24px;
    min-height: calc(100vh - 180px);
}
.drama-v2-list-header {
    background: var(--bg-white);
    border-radius: 10px;
    padding: 18px 22px;
    margin-bottom: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.drama-v2-list-title-row {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 16px; margin-bottom: 16px;
}
.drama-v2-list-title { font-size: 22px; font-weight: 700; color: var(--strong); line-height: 1.3; }
.drama-v2-list-subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.drama-v2-list-actions { display: flex; gap: 10px; flex-shrink: 0; }

.drama-v2-list-filters {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    padding-top: 12px; border-top: 1px solid var(--border);
}
.drama-v2-list-filters select,
.drama-v2-list-filters input {
    padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px;
    background: var(--bg-white); font-size: 13px; color: var(--strong);
    transition: border-color .15s;
}
.drama-v2-list-filters select:hover,
.drama-v2-list-filters input:hover { border-color: #c8791f; }
.drama-v2-list-filters input { min-width: 220px; flex: 1; max-width: 320px; }

.drama-v2-list-section { margin-bottom: 28px; }
.drama-v2-list-section-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 16px; font-weight: 600; color: var(--strong); margin-bottom: 14px;
}
.drama-v2-list-section-title .c {
    padding: 1px 7px; background: var(--border); color: var(--text-secondary);
    border-radius: 10px; font-size: 12px; font-weight: 500;
}
.drama-v2-list-filter-chip {
    margin-left: 8px;
    padding: 2px 10px; background: var(--bg-warm); color: #c8791f;
    border-radius: 10px; font-size: 12px; font-weight: 500;
    display: inline-flex; align-items: center; gap: 4px;
}

/* 项目组卡片 */
.drama-v2-list-groups {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}
.drama-v2-list-group-card {
    background: var(--bg-white); border-radius: 10px;
    border: 1px solid var(--border);
    padding: 14px 16px;
    display: grid;
    grid-template-columns: 42px 1fr auto auto;
    gap: 12px; align-items: center;
    cursor: pointer; transition: all .15s;
    position: relative;
}
.drama-v2-list-group-card:hover {
    border-color: #c8791f;
    box-shadow: 0 4px 14px rgba(200,121,31,.1);
    transform: translateY(-1px);
}
.drama-v2-list-group-card .icon {
    width: 42px; height: 42px; border-radius: 8px;
    background: linear-gradient(135deg,#c8791f,#e0a13a);
    color: #ffffff; display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.drama-v2-list-group-card .meta { min-width: 0; }
.drama-v2-list-group-card .name {
    font-size: 14px; font-weight: 600; color: var(--strong);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.drama-v2-list-group-card .info {
    font-size: 11px; color: var(--text-secondary); margin-top: 2px;
    display: flex; align-items: center; gap: 4px;
}
.drama-v2-list-group-card .count {
    background: var(--bg-warm); color: #c8791f;
    border-radius: 10px; padding: 2px 8px;
    font-size: 11px; font-weight: 600;
}
.drama-v2-list-group-card .more {
    width: 28px; height: 28px; border-radius: 50%;
    color: var(--text-secondary); display: flex; align-items: center; justify-content: center;
    transition: all .15s;
}
.drama-v2-list-group-card .more:hover { background: var(--border); color: var(--strong); }

.drama-v2-list-empty-groups {
    padding: 16px 18px; background: var(--bg-warm); border-radius: 8px;
    color: var(--text-secondary); font-size: 13px; border: 1px dashed var(--border);
}

/* 项目卡片 */
.drama-v2-list-projects {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.drama-v2-list-project-card {
    background: var(--bg-white); border-radius: 10px;
    border: 1px solid var(--border);
    overflow: hidden;
    cursor: pointer; transition: all .2s;
    position: relative;
    display: flex; flex-direction: column;
}
.drama-v2-list-project-card:hover {
    border-color: #c8791f;
    box-shadow: 0 6px 20px rgba(200,121,31,.15);
    transform: translateY(-2px);
}
.drama-v2-list-project-card .cover {
    width: 100%; aspect-ratio: 16/10;
    background: var(--border) center/cover no-repeat;
    position: relative;
}
.drama-v2-list-project-card .cover.empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; color: var(--text-hint); background: var(--bg-white);
}
.drama-v2-list-project-card .cover.empty i { font-size: 32px; }
.drama-v2-list-project-card .cover.empty span { font-size: 12px; }

.drama-v2-list-stage {
    position: absolute; top: 8px; left: 8px; z-index: 2;
    padding: 3px 8px; border-radius: 10px;
    background: rgba(0,0,0,.55); color: #ffffff;
    font-size: 11px; display: inline-flex; align-items: center; gap: 4px;
    backdrop-filter: blur(6px);
}
.drama-v2-list-stage i { color: #4dbfa8; }

.drama-v2-list-project-card .body { padding: 10px 12px 12px; }
.drama-v2-list-project-card .name {
    font-size: 14px; font-weight: 600; color: var(--strong);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: 6px;
}
.drama-v2-list-project-card .counts {
    display: flex; gap: 10px; flex-wrap: wrap;
    color: var(--text-secondary); font-size: 11px; margin-bottom: 8px;
}
.drama-v2-list-project-card .counts span {
    display: inline-flex; align-items: center; gap: 3px;
}
.drama-v2-list-project-card .counts .hot {
    color: #c8791f; font-weight: 600;
}
.drama-v2-list-project-card .foot {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 11px; color: var(--text-secondary);
    padding-top: 8px; border-top: 1px solid var(--bg-warm);
}
.drama-v2-list-project-card .foot .more {
    width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: all .15s;
}
.drama-v2-list-project-card .foot .more:hover { background: var(--border); color: var(--strong); }

.drama-v2-list-empty {
    background: var(--bg-white); border-radius: 10px; padding: 60px 24px;
    text-align: center; color: var(--text-secondary);
    border: 1px dashed var(--border);
}
.drama-v2-list-empty > i { font-size: 48px; color: var(--border); }

/* 列表右键/更多菜单 */
.drama-v2-list-menu {
    position: fixed;
    z-index: 9999;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    min-width: 160px;
    padding: 4px 0;
    font-size: 13px;
}
.drama-v2-list-menu .item {
    padding: 8px 14px; cursor: pointer; color: var(--strong);
    display: flex; align-items: center; gap: 8px;
}
.drama-v2-list-menu .item:hover { background: var(--bg-warm); color: #c8791f; }
.drama-v2-list-menu .item.danger { color: #e07b63; }
.drama-v2-list-menu .item.danger:hover { background: rgba(224,123,99,.13); color: #e07b63; }
.drama-v2-list-menu .item i { width: 14px; text-align: center; }

/* workspace 头部"返回列表"按钮 */
.drama-v2-header-back {
    background: var(--bg-warm); border: 1px solid var(--border);
    color: var(--text-secondary); width: 32px; height: 32px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all .15s; font-size: 13px;
    margin-right: 4px;
}
.drama-v2-header-back:hover {
    background: var(--border); border-color: var(--border); color: var(--strong);
}

/* ====== 漫剧工作流 · 合成视频云端状态角标 ====== */
.drama-v2-cloud-badge {
    display: inline-flex; align-items: center; gap: 4px;
    margin-left: 10px; padding: 2px 10px; border-radius: 10px;
    font-size: 11px; font-weight: 500; vertical-align: middle;
}
.drama-v2-cloud-badge.uploading { background: rgba(232,176,75,.12); color: #e8c073; border: 1px solid rgba(232,176,75,.4); }
.drama-v2-cloud-badge.done      { background: rgba(77,191,168,.12); color: #4dbfa8; border: 1px solid #b7eb8f; }
.drama-v2-cloud-badge.fail      { background: rgba(224,123,99,.13); color: #e07b63; border: 1px solid #ffccc7; }

/* ====== 预览失效占位 ====== */
.drama-v2-compose-expired {
    background: rgba(232,176,75,.12); border: 1px dashed rgba(232,176,75,.4); border-radius: 8px;
    padding: 20px 24px; display: flex; gap: 14px; align-items: flex-start;
    color: #e8c073;
}
.drama-v2-compose-expired > i { font-size: 28px; color: #e8c073; flex-shrink: 0; margin-top: 2px; }

/* ====== 项目列表 · 进入项目组的视觉提示 ====== */
.drama-v2-list-group-card { cursor: pointer; transition: all 0.15s; }
.drama-v2-list-group-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.08); border-color: #c8791f; }
