/* x2video page specific styles */

/* 图生视频右栏「私人图库」面板 */
.ai-i2v-gallery-pane .ai-i2v-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding-bottom: 8px;
}

.ai-i2v-gallery-zoom-row {
    margin-bottom: 10px;
}

.ai-i2v-gallery-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--ws-border, rgba(255, 255, 255, 0.08));
    border-radius: 10px;
    background: var(--ws-surface-light, #2e2e2e);
}

.ai-i2v-gallery-cover {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #08090d;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.ai-i2v-gallery-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
}

.ai-i2v-gallery-btn {
    width: 100%;
    font-size: 0.74rem;
    line-height: 1.2;
    white-space: nowrap;
}

.ai-i2v-gallery-empty {
    text-align: center;
    color: var(--ws-text-muted, #999999);
    padding: 36px 12px;
}

.ai-i2v-gallery-empty i {
    display: block;
    margin-bottom: 8px;
    font-size: 1.8rem;
}

/* 中栏左右扩展、最大化按钮与栏宽在 ai_workspace.css。这里只留视频展开后的设置分栏。 */
@media (min-width: 992px) {
    /* 展开后：时间轴下方设置左右分栏，避免整行拉满浪费横向空间 */
    .ai-workspace-t2v:has(.ai-workspace-pane.is-mid-expanded) .ai-t2v-mid-settings-split {
        flex-direction: row;
        align-items: flex-start;
        gap: 0;
    }

    .ai-workspace-t2v:has(.ai-workspace-pane.is-mid-expanded) .ai-t2v-mid-settings-col.is-specs {
        flex: 2 1 0;
        min-width: 0;
        order: 1;
        padding-right: 20px;
    }

    .ai-workspace-t2v:has(.ai-workspace-pane.is-mid-expanded) .ai-t2v-mid-settings-col.is-look {
        flex: 3 1 0;
        min-width: 0;
        order: 2;
        padding-left: 20px;
        border-left: 1px solid var(--ws-border-light, rgba(255, 255, 255, 0.12));
    }

    .ai-workspace-t2v:has(.ai-workspace-pane.is-mid-expanded) .ai-t2v-mid-settings-col > .ws-form-group:last-child {
        margin-bottom: 0;
    }

    /* 展开后：分段标题与段卡片同一行 */
    .ai-workspace-t2v:has(.ai-workspace-pane.is-mid-expanded) .ai-onboarding-i2v-segments {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 12px;
    }

    .ai-workspace-t2v:has(.ai-workspace-pane.is-mid-expanded) .ai-onboarding-i2v-segments > .ws-form-label {
        flex: 0 0 auto;
        margin-bottom: 0;
        white-space: nowrap;
    }

    .ai-workspace-t2v:has(.ai-workspace-pane.is-mid-expanded) .ai-onboarding-i2v-segments .ai-t2v-segment-tabs {
        flex: 1 1 auto;
        min-width: 0;
        flex-wrap: nowrap;
    }
}

/* 中栏设置默认单列；展开分栏见上方 min-width:992px + .ai-workspace-pane.is-mid-expanded */
.ai-t2v-mid-settings-split {
    display: flex;
    flex-direction: column;
}

.ai-t2v-mid-settings-col.is-look {
    order: 1;
}

.ai-t2v-mid-settings-col.is-specs {
    order: 2;
}

/* 有声：时长档在时间轴 heading 上方，样式跟时间轴标题同一套 */
.ai-h3-duration-bar {
    margin-bottom: 12px;
}

.ai-h3-duration-bar .ws-prompt-header {
    margin-bottom: 6px;
}

.ai-h3-duration-bar .ws-dim-grid {
    max-width: 280px;
}

/* 有声：分镜 / 对白时间轴（缩回中栏也用同一套，色块随栏宽按比例变窄） */
.ai-h3-storyboard {
    position: relative;
    margin-bottom: 12px;
    overflow: visible;
}

.ai-h3-shot-over-hint {
    margin: 0 0 8px;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--ws-text-muted, #999999);
}

.ai-h3-shot-over-hint.is-over {
    color: #d97757;
}

.ai-h3-ruler,
.ai-h3-track {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 6px;
}

.ai-h3-track-label,
.ai-h3-ruler-spacer {
    flex: 0 0 88px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--ws-text-dim, #999999);
    min-width: 0;
}

.ai-h3-track-label.is-shot-with-cast {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding-top: 10px;
}

.ai-h3-track-label-row {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.ai-h3-track-label-row.is-shot {
    height: 32px;
}

.ai-h3-track-label-row.is-cast {
    height: 22px;
    margin-top: 2px;
}

.ai-h3-track-add-slot {
    flex: 0 0 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-h3-track-add {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    line-height: 22px;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    background: linear-gradient(180deg, #f6f6f6 0%, #8a8a8a 100%);
    opacity: 0.2;
    cursor: pointer;
    transition: opacity 0.28s ease, transform 0.28s ease, box-shadow 0.28s ease;
}

.ai-h3-track:hover .ai-h3-track-add,
.ai-h3-track-add:focus {
    opacity: 1;
    animation: ai-h3-add-breathe 1.4s ease-in-out infinite;
}

.ai-h3-track-add:disabled {
    opacity: 0.12;
    cursor: default;
    animation: none;
}

@keyframes ai-h3-add-breathe {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.35);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
        transform: scale(1.08);
    }
}

.ai-h3-role-icon {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.ai-h3-role-icon.is-dialogue {
    color: #e0c48a;
}

.ai-h3-role-icon.is-dialogue.is-female {
    color: #e0a0c0;
}

.ai-h3-role-icon.is-dialogue.is-male {
    color: #8eb4e0;
}

.ai-h3-role-icon.is-voiceover {
    color: #9aa7b8;
}

.ai-h3-role-icon.is-caption {
    color: #d4c07a;
}

.ai-h3-role-icon.is-soundscape {
    color: #7db38a;
}

.ai-h3-role-icon.is-music {
    color: #8a8ad0;
}

.ai-h3-role-icon.is-shot {
    color: #9bb6d9;
}

.ai-h3-role-icon.is-cast {
    color: #c4b48a;
}

.ai-h3-role-icon.is-ruler {
    color: #8a8a8a;
}

.ai-h3-clip-delete {
    position: absolute;
    top: 1px;
    right: 8px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    padding: 0;
    border: 0;
    border-radius: 2px;
    line-height: 1;
    font-size: 12px;
    color: #ffffff;
    background: #d64545;
    cursor: pointer;
}

.ai-h3-clip-delete:hover,
.ai-h3-clip-delete:focus {
    background: #f05a5a;
    color: #ffffff;
    outline: none;
}

.ai-h3-shot-chip .ai-h3-clip-delete {
    right: 4px;
}

.ai-h3-ruler-marks,
.ai-h3-track-body {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    height: 22px;
}

.ai-h3-track-body {
    height: 36px;
    border: 1px solid var(--ws-border, rgba(255, 255, 255, 0.08));
    border-radius: 6px;
    background: var(--ws-surface-light, #2e2e2e);
    overflow: hidden;
    touch-action: none;
}

.ai-h3-track-body-shot {
    height: var(--h3-shot-track-h, 52px);
    min-height: 52px;
    border: 1px solid #6e6e6e;
    border-radius: 2px;
    background-color: #5a5a5a;
    background-image:
        repeating-linear-gradient(
            90deg,
            #5a5a5a 0,
            #5a5a5a 4px,
            #d0d0d0 4px,
            #d0d0d0 10px,
            #5a5a5a 10px,
            #5a5a5a 16px
        ),
        repeating-linear-gradient(
            90deg,
            #5a5a5a 0,
            #5a5a5a 4px,
            #d0d0d0 4px,
            #d0d0d0 10px,
            #5a5a5a 10px,
            #5a5a5a 16px
        ),
        linear-gradient(#4a4a4a, #4a4a4a);
    background-size: 16px 7px, 16px 7px, 100% calc(100% - 20px);
    background-position: 0 2px, 0 calc(100% - 2px), 0 10px;
    background-repeat: repeat-x, repeat-x, no-repeat;
}

.ai-h3-shot-block {
    position: absolute;
    left: var(--h3-x);
    width: var(--h3-w);
    top: 10px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    box-sizing: border-box;
}

.ai-h3-track-body-shot.is-reordering {
    user-select: none;
}

.ai-h3-shot-block.is-shifting {
    transform: translateX(var(--h3-shift-dx, 0px));
    transition: transform 0.14s ease;
}

.ai-h3-shot-block.is-dragging {
    z-index: 8;
    transform: translateX(var(--h3-drag-dx, 0px));
    transition: none;
}

.ai-h3-shot-chip.is-grabbable {
    cursor: grab;
}

.ai-h3-shot-chip.is-grabbing {
    cursor: grabbing;
}

.ai-h3-ruler-marks {
    height: 18px;
}

.ai-h3-ruler-svg {
    display: block;
    width: 100%;
    height: 100%;
}

.ai-h3-ruler-tick {
    fill: var(--ws-text-dim, #999999);
    font-size: 10px;
}

.ai-h3-dlg-chip {
    position: absolute;
    left: var(--h3-x);
    width: var(--h3-w);
    min-width: 0;
    box-sizing: border-box;
}

.ai-h3-shot-chip {
    position: relative;
    left: 0;
    width: 100%;
    top: 0;
    height: 32px;
    display: flex;
    align-items: center;
    background: #3d5f8c;
    border: 1px solid #9bb6d9;
    cursor: pointer;
}

.ai-h3-shot-chip.is-shot-2 { background: #3d6a3d; border-color: #9bc49b; }
.ai-h3-shot-chip.is-shot-3 { background: #8a6a2e; border-color: #e0c48a; }
.ai-h3-shot-chip.is-shot-4 { background: #6a3d72; border-color: #c9a0d0; }
.ai-h3-shot-chip.is-shot-5 { background: #7a3d3d; border-color: #d0a0a0; }

.ai-h3-shot-character-stack {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}

.ai-h3-shot-character-bar,
.ai-h3-shot-character-add {
    position: relative;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 22px;
    margin-top: 2px;
    padding: 0 34px 0 4px;
    border: 1px solid #9bb6d9;
    background: rgba(20, 28, 40, 0.55);
    color: #f3f3f3;
    cursor: pointer;
}

.ai-h3-shot-block.is-shot-2 .ai-h3-shot-character-bar,
.ai-h3-shot-block.is-shot-2 .ai-h3-shot-character-add {
    border-color: #9bc49b;
    background: rgba(20, 36, 20, 0.55);
}

.ai-h3-shot-block.is-shot-3 .ai-h3-shot-character-bar,
.ai-h3-shot-block.is-shot-3 .ai-h3-shot-character-add {
    border-color: #e0c48a;
    background: rgba(40, 32, 12, 0.55);
}

.ai-h3-shot-block.is-shot-4 .ai-h3-shot-character-bar,
.ai-h3-shot-block.is-shot-4 .ai-h3-shot-character-add {
    border-color: #c9a0d0;
    background: rgba(36, 20, 40, 0.55);
}

.ai-h3-shot-block.is-shot-5 .ai-h3-shot-character-bar,
.ai-h3-shot-block.is-shot-5 .ai-h3-shot-character-add {
    border-color: #d0a0a0;
    background: rgba(40, 20, 20, 0.55);
}

.ai-h3-shot-character-bar.is-active {
    box-shadow: inset 0 0 0 1px #f3f3f3;
}

.ai-h3-shot-character-add {
    justify-content: flex-start;
    gap: 6px;
    height: 22px;
    padding: 0 8px;
    border-style: dashed;
    background: transparent;
    color: rgba(243, 243, 243, 0.88);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.ai-h3-shot-character-add > i {
    flex: 0 0 auto;
    font-size: 11px;
}

.ai-h3-shot-character-add-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-h3-shot-character-bar .ai-h3-shot-mark.is-hori,
.ai-h3-shot-character-bar .ai-h3-shot-mark.is-distance {
    flex: 0 0 auto;
    margin-right: 4px;
    font-size: 10px;
    line-height: 1;
    font-weight: 600;
    padding: 0 4px;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    color: inherit;
    cursor: pointer;
}

.ai-h3-shot-character-bar .ai-h3-shot-mark.is-hori.is-add,
.ai-h3-shot-character-bar .ai-h3-shot-mark.is-distance.is-add {
    min-width: 0;
    font-size: 10px;
    font-weight: 600;
    padding: 0 4px;
    border: 1px dashed rgba(255, 255, 255, 0.55);
    background: rgba(0, 0, 0, 0.22);
    color: rgba(255, 255, 255, 0.88);
}

.ai-h3-shot-mark.is-hori-front { background: rgba(40, 90, 160, 0.88); }
.ai-h3-shot-mark.is-hori-side { background: rgba(140, 90, 30, 0.9); }
.ai-h3-shot-mark.is-hori-back { background: rgba(90, 40, 120, 0.9); }
.ai-h3-shot-mark.is-hori-front_45 { background: rgba(40, 120, 90, 0.88); }
.ai-h3-shot-mark.is-hori-side_45 { background: rgba(120, 70, 40, 0.9); }
.ai-h3-shot-mark.is-hori-back_45 { background: rgba(70, 50, 130, 0.9); }
.ai-h3-shot-mark.is-distance { background: rgba(70, 85, 140, 0.92); }

.ai-h3-shot-character-bar .ai-h3-clip-delete {
    right: 2px;
    top: 3px;
}

.ai-h3-shot-character-swap {
    position: absolute;
    top: 3px;
    right: 18px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    padding: 0;
    border: 0;
    border-radius: 2px;
    line-height: 1;
    font-size: 8px;
    color: #f3f3f3;
    background: rgba(40, 70, 120, 0.92);
    cursor: pointer;
}

.ai-h3-shot-character-swap:hover,
.ai-h3-shot-character-swap:focus {
    background: rgba(60, 100, 160, 0.96);
    color: #ffffff;
    outline: none;
}

.ai-h3-shot-chip.is-active,
.ai-h3-dlg-chip.is-active {
    box-shadow: inset 0 0 0 2px #f3f3f3;
}

.ai-h3-cut-handle {
    position: absolute;
    top: 10px;
    left: var(--h3-x);
    width: 8px;
    height: 32px;
    margin-left: -4px;
    background: #f0f0f0;
    cursor: ew-resize;
    z-index: 3;
}

.ai-h3-dlg-chip {
    top: 6px;
    height: 24px;
    display: flex;
    align-items: center;
    background: #b8862a;
    border: 1px solid #f0d28c;
    cursor: grab;
    z-index: 1;
}

.ai-h3-dlg-marks {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 2px;
    padding-left: 2px;
    z-index: 2;
}

.ai-h3-dlg-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    height: 18px;
    min-width: 18px;
    padding: 0 4px;
    border: 0;
    border-radius: 2px;
    background: rgba(72, 40, 120, 0.94);
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.ai-h3-dlg-mark.is-expression {
    background: rgba(120, 48, 72, 0.94);
}

.ai-h3-dlg-chip.is-s1 {
    background: #b8862a;
    border-color: #f0d28c;
}

.ai-h3-dlg-chip.is-s2 {
    background: #2e7a90;
    border-color: #8fd0e0;
}

.ai-h3-dlg-chip.is-s3 {
    background: #8a5a2e;
    border-color: #e0b48a;
}

.ai-h3-dlg-chip.is-s4 {
    background: #5a3d72;
    border-color: #c9a0d0;
}

.ai-h3-dlg-chip.is-voiceover {
    background: #4a5560;
    border-color: #9aa7b8;
}

.ai-h3-dlg-chip.is-caption {
    background: #6a5a2e;
    border-color: #d4c07a;
}

.ai-h3-dlg-chip.is-soundscape {
    background: #3d6a4a;
    border-color: #9bc4a6;
    cursor: pointer;
}

.ai-h3-dlg-chip.is-music {
    background: #3d3d72;
    border-color: #a0a0d0;
    cursor: pointer;
}

.ai-h3-dlg-handle {
    flex: 0 0 8px;
    align-self: stretch;
    background: rgba(255, 255, 255, 0.88);
    cursor: ew-resize;
}

.ai-h3-shot-marks {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 2px;
    padding-left: 3px;
    z-index: 2;
}

.ai-h3-shot-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 18px;
    min-width: 18px;
    padding: 0 3px;
    border: 0;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    cursor: pointer;
}

.ai-h3-shot-mark .ai-cam-icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.ai-h3-shot-mark.is-camera {
    gap: 3px;
}

.ai-h3-shot-mark.is-camera.is-add {
    min-width: 18px;
    padding: 0 3px;
}

.ai-h3-shot-framing-initials {
    font-size: 10px;
    line-height: 1;
    font-weight: 600;
}

.ai-h3-shot-mark.is-effect {
    font-size: 10px;
    line-height: 1;
    font-weight: 600;
    padding: 0 4px;
}

.ai-h3-shot-mark.is-expression {
    font-size: 10px;
    line-height: 1;
    font-weight: 600;
    padding: 0 4px;
    background: rgba(160, 70, 110, 0.9);
}

.ai-h3-shot-mark.is-add {
    min-width: 18px;
    padding: 0 3px;
    border: 1px dashed rgba(255, 255, 255, 0.55);
    background: rgba(0, 0, 0, 0.22);
    color: rgba(255, 255, 255, 0.88);
    font-size: 12px;
    font-weight: 700;
}

.ai-h3-shot-character-bar .ai-h3-shot-mark.is-expression {
    flex: 0 0 auto;
    margin-right: 4px;
}

.ai-h3-shot-mark.is-view-none {
    background: rgba(0, 0, 0, 0.5);
}

.ai-h3-shot-mark.is-view-front {
    background: rgba(40, 90, 160, 0.88);
}

.ai-h3-shot-mark.is-view-three_quarter {
    background: rgba(40, 120, 90, 0.88);
}

.ai-h3-shot-mark.is-view-side {
    background: rgba(140, 90, 30, 0.9);
}

.ai-h3-shot-mark.is-view-back {
    background: rgba(90, 40, 120, 0.9);
}

.ai-h3-shot-chip .ai-h3-block-text {
    padding-left: 4px;
}

.ai-h3-block-text {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 22px 0 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    line-height: 20px;
    text-align: left;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

.ai-h3-shot-chip.is-empty .ai-h3-block-text,
.ai-h3-dlg-chip.is-empty .ai-h3-block-text {
    color: rgba(255, 255, 255, 0.78);
}

.ai-h3-storyboard-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    flex-wrap: wrap;
}

.ai-h3-track-btn-icon {
    width: 13px;
    height: 13px;
    fill: currentColor;
}

.ai-h3-role-icon .ai-h3-track-btn-icon {
    width: 14px;
    height: 14px;
}

.ai-h3-track-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ai-h3-track-action-btn > i {
    font-size: 12px;
    line-height: 1;
}

@media (min-width: 992px) {
    .ai-h3-storyboard.is-compact .ai-h3-ruler,
    .ai-h3-storyboard.is-compact .ai-h3-track {
        gap: 4px;
        margin-bottom: 4px;
    }

    .ai-h3-storyboard.is-compact .ai-h3-track-label,
    .ai-h3-storyboard.is-compact .ai-h3-ruler-spacer {
        flex-basis: 68px;
        font-size: 0.64rem;
        gap: 2px;
    }

    .ai-h3-storyboard.is-compact .ai-h3-track-label.is-shot-with-cast {
        gap: 0;
    }

    .ai-h3-storyboard.is-compact .ai-h3-shot-character-add {
        font-size: 10px;
        gap: 4px;
        padding: 0 6px;
    }

    .ai-h3-storyboard.is-compact .ai-h3-track-add-slot {
        flex-basis: 22px;
    }

    .ai-h3-storyboard.is-compact .ai-h3-track-add {
        width: 18px;
        height: 18px;
        line-height: 18px;
        font-size: 14px;
    }

    .ai-h3-storyboard.is-compact .ai-h3-block-text {
        font-size: 10px;
        padding: 0 22px 0 4px;
    }

    .ai-h3-storyboard.is-compact .ai-h3-dlg-mark {
        height: 16px;
        min-width: 16px;
        font-size: 10px;
        padding: 0 3px;
    }

    .ai-h3-storyboard.is-compact .ai-h3-shot-mark {
        height: 16px;
        min-width: 16px;
        font-size: 9px;
    }

    .ai-h3-storyboard.is-compact .ai-h3-shot-mark .ai-cam-icon {
        width: 12px;
        height: 12px;
    }

    .ai-h3-storyboard.is-compact .ai-h3-storyboard-actions {
        margin: 6px 0;
        gap: 6px;
    }

    .ai-h3-storyboard.is-compact .ai-h3-storyboard-actions .btn {
        font-size: 0.72rem;
        padding: 2px 8px;
    }
}

.ai-h3-clip-editor-layer {
    position: absolute;
    z-index: 30;
    box-sizing: border-box;
    overflow: visible;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: #2a2a2e;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.ai-h3-clip-editor-arrow {
    position: absolute;
    top: -8px;
    left: var(--h3-arrow-x, 50%);
    width: 0;
    height: 0;
    border-left: 16px solid transparent;
    border-right: 16px solid transparent;
    border-bottom: 8px solid #2a2a2e;
    transform: translateX(-50%);
    filter: drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.16));
    pointer-events: none;
}

.ai-h3-shot-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.ai-h3-shot-editor-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.ai-h3-shot-helper-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ai-h3-shot-helper-box {
    position: relative;
    box-sizing: border-box;
    padding: 8px 22px 8px 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
}

.ai-h3-shot-helper-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    margin: 0 0 6px;
    padding-right: 18px;
    color: #d0d0d0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.ai-h3-shot-helper-who {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ai-h3-shot-helper-head .ai-h3-character-icon {
    width: 16px;
    height: 16px;
    font-size: 10px;
    flex: 0 0 auto;
}

.ai-h3-shot-helper-text {
    color: #9a9a9a;
    font-size: 12px;
    line-height: 1.4;
    word-break: break-word;
}

.ai-h3-shot-helper-remove {
    position: absolute;
    top: 1px;
    right: 4px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    padding: 0;
    border: 0;
    border-radius: 2px;
    line-height: 1;
    font-size: 12px;
    color: #ffffff;
    background: #d64545;
    cursor: pointer;
}

.ai-h3-shot-helper-remove:hover,
.ai-h3-shot-helper-remove:focus {
    background: #f05a5a;
    color: #ffffff;
    outline: none;
}

.ai-h3-shot-editor-row .ai-t2v-textarea {
    flex: 1 1 auto;
    min-width: 0;
}

.ai-h3-shot-prompt-wrap {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.ai-h3-shot-prompt-wrap .ai-t2v-textarea {
    display: block;
    width: 100%;
}

.ai-h3-name-helper {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 40;
    box-sizing: border-box;
    margin-top: 4px;
    max-height: 220px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: #232328;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.ai-h3-name-helper-item {
    display: block;
    width: 100%;
    padding: 6px 12px;
    border: 0;
    background: transparent;
    color: #e8e8e8;
    font-size: 0.78rem;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
}

.ai-h3-name-helper-item.is-active,
.ai-h3-name-helper-item:hover,
.ai-h3-name-helper-item:focus {
    background: rgba(108, 99, 255, 0.2);
    color: #ffffff;
    outline: none;
}

.ai-h3-character-hori-grid {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 8px;
}

.ai-h3-character-hori-grid .ai-h3-camera-layer-option {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
    justify-content: center;
    min-height: 34px;
    padding: 6px 10px;
    font-size: 0.82rem;
}

.ai-h3-character-hori-layer-root {
    z-index: 1125;
}

.ai-h3-character-hori-layer {
    width: auto;
    max-width: 360px;
    min-height: 0;
    padding: 18px 16px 14px;
}

.ai-h3-script-hori-btn {
    max-width: 128px;
}

.ai-h3-script-distance-btn {
    max-width: 128px;
}

.ai-h3-audio-editor .ai-t2v-duration-limit-hint {
    margin: 0 0 6px;
}

.ai-h3-audio-editor .ai-t2v-textarea {
    display: block;
    width: 100%;
    min-height: 80px;
}

.ai-h3-delivery-row {
    margin-top: 8px;
}

.ai-h3-delivery-row .ws-form-label {
    margin-bottom: 6px;
}

.ai-h3-delivery-select {
    position: relative;
}

.ai-h3-delivery-select-btn {
    position: relative;
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-height: 36px;
    padding: 6px 28px 6px 10px;
    border: 1px solid var(--ws-input-border, rgba(255, 255, 255, 0.12));
    border-radius: 6px;
    background: var(--ws-input-bg, #1f2024);
    color: var(--ws-text, #eee);
    font-size: 0.86rem;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
}

.ai-h3-delivery-select-btn:focus {
    outline: none;
    border-color: var(--ws-accent, #6c63ff);
}

.ai-h3-delivery-select.is-open .ai-h3-delivery-select-btn {
    border-color: var(--ws-accent, #6c63ff);
}

.ai-h3-delivery-select-btn::after {
    content: '';
    position: absolute;
    top: 16px;
    right: 12px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #b8b8b8;
}

.ai-h3-delivery-select-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 40;
    max-height: 220px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 4px 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 6px;
    background: #1f2024;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.ai-h3-delivery-select-option {
    display: block;
    width: 100%;
    padding: 6px 10px;
    border: 0;
    background: transparent;
    color: var(--ws-text, #eee);
    font-size: 0.84rem;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
}

.ai-h3-delivery-select-option:hover,
.ai-h3-delivery-select-option:focus {
    background: rgba(108, 99, 255, 0.16);
    outline: none;
}

.ai-h3-delivery-select-option.active {
    background: rgba(108, 99, 255, 0.28);
    color: var(--ws-accent, #6c63ff);
}

.ai-h3-expression-row {
    margin-top: 10px;
}

.ai-h3-expression-row .ai-h3-delivery-select-list {
    max-height: 360px;
}

.ai-h3-expression-row .ws-form-label {
    margin-bottom: 6px;
}

.ai-h3-shot-camera-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 80px;
    width: 80px;
    min-height: 80px;
    padding: 0;
    border: 1px solid #6c63ff;
    border-radius: 8px;
    background: #7c5cff;
    color: #fff;
    cursor: pointer;
}

.ai-h3-shot-camera-btn:hover,
.ai-h3-shot-camera-btn:focus {
    background: #6b4cf0;
    border-color: #6b4cf0;
    color: #fff;
    outline: none;
}

.ai-h3-shot-camera-btn .ai-cam-icon {
    width: 28px;
    height: 28px;
}

.ai-h3-shot-camera-btn.is-assistant {
    flex-direction: column;
    gap: 4px;
    background: #8a4d72;
    border-color: #7a3f64;
}

.ai-h3-shot-camera-btn.is-assistant:hover,
.ai-h3-shot-camera-btn.is-assistant:focus {
    background: #9b587f;
    border-color: #9b587f;
}

.ai-h3-shot-camera-btn.is-assistant > i {
    font-size: 18px;
}

.ai-h3-shot-camera-btn.is-assistant > span {
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.ai-h3-camera-layer-root {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 9, 13, 0.62);
    padding: 24px;
}

.ai-h3-script-import-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
}

.ai-h3-script-import-slot {
    margin-bottom: 12px;
}

.ai-h3-script-zone .ws-prompt-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    padding-right: 36px;
}

.ai-h3-character-picker-root {
    z-index: 1120;
}

.ai-h3-character-assistant-root {
    z-index: 1115;
}

.ai-h3-camera-layer {
    position: relative;
    width: 100%;
    max-width: 560px;
    min-height: 200px;
    padding: 20px 18px 16px;
    border-radius: 12px;
    background: var(--ws-card-bg, #2a2a2e);
    border: 1px solid var(--ws-border, rgba(255, 255, 255, 0.08));
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.ai-h3-camera-layer-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--ws-text-muted, #999);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.ai-h3-camera-layer-close:hover,
.ai-h3-camera-layer-close:focus {
    color: var(--ws-text, #fff);
    background: rgba(255, 255, 255, 0.06);
    outline: none;
}

.ai-h3-camera-layer-title {
    margin: 0 32px 14px 0;
    color: var(--ws-text, #fff);
    font-size: 0.95rem;
    font-weight: 600;
}

.ai-h3-assistant-layer-heading {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 16px;
    margin: 0 32px 14px 0;
}

.ai-h3-assistant-layer-heading .ai-h3-camera-layer-title {
    flex: 0 0 auto;
    margin: 0;
}

.ai-h3-assistant-search {
    flex: 1 1 520px;
    max-width: 720px;
    min-width: 180px;
    height: 34px;
    padding: 5px 12px;
    border: 1px solid var(--ws-input-border, rgba(255, 255, 255, 0.14));
    border-radius: 6px;
    outline: none;
    background: var(--ws-input-bg, #1f2024);
    color: var(--ws-text, #eee);
    font-size: 0.82rem;
}

.ai-h3-assistant-search:focus {
    border-color: #6c63ff;
    box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.2);
}

.ai-h3-assistant-search::placeholder {
    color: var(--ws-text-dim, #777);
}

.ai-h3-camera-layer-section-title {
    margin: 0 0 8px;
    color: var(--ws-muted, #bbb);
    font-size: 0.78rem;
    font-weight: 600;
}

.ai-h3-assistant-group-mode {
    margin-left: 0.4em;
    font-weight: 500;
    opacity: 0.75;
}

.ai-h3-camera-layer-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ai-h3-camera-layer-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--ws-input-border, rgba(255, 255, 255, 0.12));
    background: var(--ws-input-bg, #1f2024);
    color: var(--ws-text, #eee);
    font-size: 0.82rem;
    cursor: pointer;
}

.ai-h3-camera-layer-option:hover,
.ai-h3-camera-layer-option:focus {
    border-color: rgba(124, 92, 255, 0.55);
    color: #fff;
    outline: none;
}

.ai-h3-camera-layer-option.is-active {
    background: rgba(124, 92, 255, 0.18);
    border-color: #7c5cff;
    color: #fff;
    box-shadow: 0 0 0 2px rgba(124, 92, 255, 0.28);
}

.ai-h3-camera-layer-option .ai-cam-icon {
    width: 20px;
    height: 20px;
}

.ai-h3-camera-layer.ai-h3-effect-layer {
    width: 86vw;
    max-width: 86vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.ai-h3-effect-layer-empty,
.ai-h3-effect-layer-name {
    margin: 0 0 10px;
    color: #f3f3f3;
    font-size: 13px;
}

.ai-h3-effect-layer-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.ai-h3-effect-layer-group + .ai-h3-effect-layer-group {
    margin-top: 10px;
}

.ai-h3-assistant-group-toggle {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 14px;
    border: 1px solid var(--ws-input-border, rgba(255, 255, 255, 0.12));
    border-radius: 10px;
    background: var(--ws-input-bg, #1f2024);
    color: var(--ws-text-muted, #aaa);
    text-align: left;
    cursor: pointer;
}

.ai-h3-assistant-group-toggle:hover,
.ai-h3-assistant-group-toggle:focus {
    border-color: rgba(124, 92, 255, 0.62);
    color: var(--ws-text, #fff);
    outline: none;
}

.ai-h3-assistant-group-toggle.has-selection {
    border-color: #6c63ff;
    background: rgba(108, 99, 255, 0.17);
}

.ai-h3-assistant-group-heading {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.ai-h3-assistant-group-title,
.ai-h3-assistant-group-count {
    flex: 0 0 auto;
    font-size: 0.92rem;
    font-weight: 600;
}

.ai-h3-assistant-group-count {
    color: var(--ws-text-dim, #888);
}

.ai-h3-assistant-group-names {
    min-width: 0;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(20, 20, 24, 0.78);
    color: var(--ws-text-muted, #aaa);
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-h3-assistant-group-meta {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
}

.ai-h3-assistant-group-meta .ai-h3-assistant-group-mode {
    margin-left: 0;
}

.ai-h3-effect-layer-grid,
.ai-h3-script-assist-grid {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 10px;
    padding-top: 10px;
}

.ai-h3-effect-layer-grid .ws-detail-option-card {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
}

.ai-h3-assistant-card-main {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ai-h3-wuhua-card-opts {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    box-sizing: border-box;
    gap: 0;
    padding: 0;
}

.ai-h3-wuhua-card-opts-block {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    gap: 2px;
    padding: 4px;
}

.ai-h3-wuhua-card-opts-block + .ai-h3-wuhua-card-opts-block {
    border-left: 1px solid rgba(180, 164, 255, 0.28);
}

.ai-h3-wuhua-card-opts-label {
    color: #c8c4de;
    font-size: 0.62rem;
    line-height: 1.2;
}

.ai-h3-wuhua-card-opts-btns {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ai-h3-wuhua-card-opt-btn {
    width: 100%;
    margin: 0;
    padding: 2px 4px;
    border: 1px solid rgba(180, 164, 255, 0.28);
    border-radius: 4px;
    background: #221f33;
    color: #efeaff;
    font-size: 0.62rem;
    line-height: 1.2;
    cursor: pointer;
}

.ai-h3-wuhua-card-opt-btn:hover,
.ai-h3-wuhua-card-opt-btn:focus {
    border-color: rgba(180, 164, 255, 0.55);
}

.ai-h3-wuhua-card-opt-btn.is-active {
    border-color: var(--ws-accent, #6c63ff);
    background: rgba(108, 99, 255, 0.28);
}

.ai-h3-effect-layer-grid .ws-detail-option-card-img {
    height: auto;
    max-height: none;
    aspect-ratio: 1;
    object-fit: cover;
}

.ai-h3-effect-layer-grid .ws-detail-option-card-name {
    font-size: 0.75rem;
}

@media (min-width: 1800px) {
    .ai-h3-effect-layer-grid,
    .ai-h3-script-assist-grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }
}

@media (max-width: 1199px) {
    .ai-h3-effect-layer-grid,
    .ai-h3-script-assist-grid {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .ai-h3-camera-layer.ai-h3-effect-layer,
    .ai-h3-script-assist-layer {
        width: 94vw;
        max-width: 94vw;
    }

    .ai-h3-effect-layer-grid,
    .ai-h3-script-assist-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 6px;
    }

    .ai-h3-assistant-group-toggle {
        padding: 8px 10px;
    }

    .ai-h3-assistant-layer-heading {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .ai-h3-assistant-search {
        flex-basis: auto;
        max-width: none;
        min-width: 0;
    }

    .ai-h3-assistant-group-names,
    .ai-h3-assistant-group-meta .ai-h3-assistant-group-mode {
        display: none;
    }
}

.ai-h3-effect-layer-clear {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    margin-top: 12px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: transparent;
    color: #f3f3f3;
    cursor: pointer;
}

.ai-h3-effect-layer-clear:hover,
.ai-h3-effect-layer-clear:focus {
    border-color: #d0d0d0;
    color: #ffffff;
    outline: none;
}

.ai-h3-character-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: var(--ws-input-bg, #1f2024);
    color: var(--ws-text, #eee);
    font-size: 0.78rem;
    line-height: 1.2;
    cursor: pointer;
}

.ai-h3-character-chip:hover,
.ai-h3-character-chip:focus {
    border-color: rgba(255, 255, 255, 0.38);
    color: #fff;
    outline: none;
}

.ai-h3-character-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #c8c8c8;
}

.ai-h3-character-icon.is-default {
    color: #8a8a8a;
    background: rgba(255, 255, 255, 0.05);
}

.ai-h3-character-icon.is-female:not(.is-default) {
    color: #e0a0c0;
}

.ai-h3-character-icon.is-male {
    color: #8eb4e0;
}

.ai-h3-character-icon.has-avatar {
    background: transparent;
    padding: 0;
    overflow: hidden;
}

.ai-h3-character-icon .ai-h3-character-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.ai-h3-character-chip.is-current,
.ai-h3-character-chip.is-selected {
    border-color: rgba(120, 180, 120, 0.7);
    box-shadow: inset 0 0 0 1px rgba(120, 180, 120, 0.35);
}

body.ai-h3-script-modal-open {
    overflow: hidden;
}

.ai-h3-script-zone {
    margin-bottom: 32px;
}

.ai-h3-script-notebook.is-summary {
    flex: none;
    margin-right: 12px;
    min-height: 120px;
    background: #efe6cf;
    border: 1px solid #c4b089;
    border-radius: 3px 10px 10px 3px;
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.4),
        6px 8px 0 #d8c49a,
        11px 12px 0 #c4b089;
    cursor: pointer;
}

.ai-h3-script-notebook.is-summary:hover,
.ai-h3-script-notebook.is-summary:focus {
    filter: brightness(1.04);
}

.ai-h3-script-notebook.is-summary:focus {
    outline: none;
}

.ai-h3-script-notebook.is-summary:focus-visible {
    outline: 2px solid rgba(196, 150, 78, 0.85);
    outline-offset: 4px;
}

.ai-h3-script-notebook.is-summary .ai-h3-script-notebook-coil {
    margin: 6px 0 8px;
}

.ai-h3-script-notebook.is-summary .ai-h3-script-notebook-stack {
    pointer-events: none;
}

.ai-h3-script-notebook.is-summary .ai-h3-script-notebook-page {
    overflow: visible;
    min-height: 120px;
    padding: 10px 14px 58px 6px;
}

.ai-h3-script-summary {
    box-sizing: border-box;
    white-space: pre-wrap;
    min-height: 96px;
    padding: 2px 4px 4px 0;
    color: #3d2a16;
    font-family: "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", "SimSun", serif;
    font-size: 0.9rem;
    line-height: 1.75;
}

.ai-h3-script-edit-seal {
    position: absolute;
    right: 6px;
    bottom: 4px;
    z-index: 3;
    display: flex;
    align-items: flex-end;
    gap: 0;
    margin: 0;
    padding: 2px 0 0 6px;
    border: 0;
    background: transparent;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.ai-h3-script-edit-seal:focus {
    outline: none;
}

.ai-h3-script-edit-seal:focus-visible {
    outline: 2px solid rgba(196, 90, 60, 0.75);
    outline-offset: 3px;
}

.ai-h3-script-edit-mark {
    display: block;
    width: 54px;
    height: 58px;
    flex: 0 0 auto;
}

.ai-h3-script-edit-mark.is-en {
    width: 78px;
    height: 40px;
}

.ai-h3-script-edit-mark-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ai-h3-script-edit-pencil {
    display: block;
    width: 46px;
    height: 52px;
    margin: 0 0 2px -6px;
    transform-origin: 28% 82%;
}

.ai-h3-script-edit-pencil-img {
    display: block;
    width: 46px;
    height: 52px;
    object-fit: contain;
    pointer-events: none;
}

.ai-h3-script-notebook.is-summary:hover .ai-h3-script-edit-pencil,
.ai-h3-script-edit-seal:hover .ai-h3-script-edit-pencil,
.ai-h3-script-edit-seal:focus .ai-h3-script-edit-pencil {
    animation: ai-h3-pencil-write 0.72s ease-in-out infinite;
}

@keyframes ai-h3-pencil-write {
    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }
    35% {
        transform: translate(-5px, 7px) rotate(-10deg);
    }
    68% {
        transform: translate(3px, -4px) rotate(7deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ai-h3-script-notebook.is-summary:hover .ai-h3-script-edit-pencil,
    .ai-h3-script-edit-seal:hover .ai-h3-script-edit-pencil,
    .ai-h3-script-edit-seal:focus .ai-h3-script-edit-pencil {
        animation: none;
        transform: translate(-2px, 2px);
    }
}

.ai-h3-script-modal-root {
    position: fixed;
    inset: 0;
    z-index: 1070;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 9, 13, 0.62);
}

.ai-h3-script-modal {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 90vw;
    max-width: 90vw;
    height: auto;
    max-height: 90vh;
    overflow: hidden;
    border-radius: 12px;
    background: var(--ws-card-bg, #2a2a2e);
    border: 1px solid var(--ws-border, rgba(255, 255, 255, 0.08));
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.ai-h3-script-modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 2;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--ws-text-muted, #999);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.ai-h3-script-modal-close:hover,
.ai-h3-script-modal-close:focus {
    color: #fff;
    outline: none;
}

.ai-h3-script-modal-tabs {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.ai-h3-script-modal-tabs .ai-video-purple-tabbar {
    padding-right: 42px !important;
}

.ai-h3-script-modal-body {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 16px 20px 24px;
}

.ai-h3-script-form {
    --h3-script-label-col: 5.5em;
    --h3-script-label-gap: 20px;
    max-width: none;
    width: 100%;
}

html[lang="en"] .ai-h3-script-form {
    --h3-script-label-col: 9.5em;
}

.ai-h3-script-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
}

.ai-h3-script-col-main,
.ai-h3-script-col-assist {
    min-width: 0;
}

.ai-h3-assistant-group {
    margin-bottom: 14px;
}

.ai-h3-assistant-group .ws-form-label {
    margin-bottom: 8px;
}

.ai-h3-script-field {
    margin-bottom: 10px;
}

.ai-h3-script-form .ai-h3-script-field.is-inline {
    display: grid;
    grid-template-columns: var(--h3-script-label-col) minmax(0, 1fr);
    column-gap: var(--h3-script-label-gap);
    align-items: start;
}

.ai-h3-script-field.is-inline > .ws-form-label {
    margin: 0;
    min-height: 34px;
    line-height: 34px;
    white-space: nowrap;
}

.ai-h3-script-inline-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ai-h3-script-form textarea.ws-prompt-textarea,
.ai-h3-script-form textarea.ai-t2v-textarea {
    min-height: 34px;
    height: 34px;
    max-height: 240px;
    padding-top: 6px;
    padding-bottom: 6px;
    line-height: 20px;
    resize: vertical;
}

.ai-h3-script-field.is-inline > textarea.ws-prompt-textarea {
    min-width: 0;
}

.ai-h3-script-what-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-h3-script-what-row .ai-h3-shot-prompt-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

.ai-h3-script-assist-btn {
    flex: 0 0 auto;
    max-width: 96px;
    min-height: 28px;
    padding: 2px 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    background: transparent;
    color: #c8c8c8;
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.ai-h3-script-assist-btn:hover,
.ai-h3-script-assist-btn:focus {
    border-color: rgba(124, 92, 255, 0.7);
    color: #fff;
    outline: none;
}

.ai-h3-script-assist-btn.is-on {
    border-color: #7c5cff;
    color: #fff;
}

.ai-h3-script-assist-layer-root {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 9, 13, 0.62);
    padding: 24px;
}

.ai-h3-script-assist-layer {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 86vw;
    max-width: 86vw;
    height: auto;
    max-height: 90vh;
    padding: 20px 18px 16px;
    border-radius: 12px;
    background: var(--ws-card-bg, #2a2a2e);
    border: 1px solid var(--ws-border, rgba(255, 255, 255, 0.08));
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.ai-h3-script-assist-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.ai-h3-script-assist-group + .ai-h3-script-assist-group {
    margin-top: 10px;
}

.ai-h3-script-assist-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    padding: 0 0 6px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #e8e8e8;
    cursor: pointer;
}

.ai-h3-script-assist-card:hover,
.ai-h3-script-assist-card:focus {
    border-color: rgba(124, 92, 255, 0.75);
    outline: none;
}

.ai-h3-script-assist-card.is-active {
    border-color: #7c5cff;
}

.ai-h3-script-assist-card.is-wuhua-wide,
.ai-h3-script-assist-card.is-hogtie-wide {
    display: grid;
    grid-column: span 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto;
    align-items: stretch;
    column-gap: 0;
}

.ai-h3-script-assist-card.is-wuhua-wide.is-lora-strength {
    grid-column: span 3;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ai-h3-script-assist-card.is-wuhua-wide .ai-h3-script-assist-cover,
.ai-h3-script-assist-card.is-hogtie-wide .ai-h3-script-assist-cover {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
}

.ai-h3-script-assist-card.is-wuhua-wide .ai-h3-script-assist-name,
.ai-h3-script-assist-card.is-hogtie-wide .ai-h3-script-assist-name {
    grid-column: 1;
    grid-row: 2;
    width: auto;
}

.ai-h3-script-assist-card.is-wuhua-wide .ai-h3-wuhua-card-opts,
.ai-h3-script-assist-card.is-hogtie-wide .ai-h3-wuhua-card-opts {
    display: contents;
}

.ai-h3-script-assist-card.is-wuhua-wide .ai-h3-wuhua-card-opts-block,
.ai-h3-script-assist-card.is-hogtie-wide .ai-h3-wuhua-card-opts-block {
    grid-row: 1 / span 2;
    min-height: 0;
    justify-content: center;
}

.ai-h3-script-assist-cover {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 6px;
    background-color: #1a1a1e;
    background-size: cover;
    background-position: center;
}

.ai-h3-script-assist-cover.is-none {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ws-text-dim, #888);
    font-size: 0.72rem;
}

.ai-h3-script-assist-cover.is-motion {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e8e8e8;
}

.ai-h3-script-assist-cover.is-motion .ai-cam-icon {
    width: 44px;
    height: 44px;
    fill: currentColor;
}

.ai-h3-script-assist-cover-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ai-h3-assistant-cover-box {
    position: relative;
    width: 100%;
}

.ai-h3-assistant-lora-badge {
    position: absolute;
    right: 4px;
    bottom: 4px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    padding: 1px 4px;
    border: 1px solid #317468;
    border-radius: 3px;
    background: #e4f3ef;
    color: #20594f;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.3;
    pointer-events: none;
    white-space: nowrap;
}
.ai-h3-assistant-lora-badge i { margin-right: 2px; font-size: 8px; }

.ai-h3-script-assist-name {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 0 2px;
    color: #e8e8e8;
    font-size: 12px;
    line-height: 1.3;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-h3-script-shot-block .ai-h3-shot-helper-list {
    margin-top: 8px;
}

.ai-h3-script-shot-head,
.ai-h3-script-say-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.ai-h3-script-shot-head .ws-form-label {
    margin-bottom: 0;
    color: var(--ws-text, #fff);
    font-size: 0.95rem;
    font-weight: 700;
}

.ai-h3-script-shot-head .ai-h3-script-icon-btn {
    margin-top: 0;
}

.ai-h3-script-shot-block {
    display: grid;
    grid-template-columns: var(--h3-script-label-col) minmax(0, 1fr);
    column-gap: var(--h3-script-label-gap);
    row-gap: 10px;
    align-items: start;
    margin: 0 0 6px;
    padding: 10px 0 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.ai-h3-script-shot-block .ai-h3-script-shot-head {
    grid-column: 1 / -1;
}

.ai-h3-script-shot-block .ai-h3-script-field.is-inline {
    display: contents;
}

.ai-h3-script-shot-block .ai-h3-script-field {
    margin-bottom: 0;
}

.ai-h3-script-form .ai-h3-script-say-speaker,
.ai-h3-script-form .ai-h3-script-cast-add {
    cursor: pointer;
}

.ai-h3-script-cast-add {
    background: transparent;
    border-color: #5ec8d8;
    color: #8edce8;
}

.ai-h3-script-cast-add:hover,
.ai-h3-script-cast-add:focus {
    background: transparent;
    border-color: #7ad8e6;
    color: #c8f4fa;
    outline: none;
}

.ai-h3-script-caption-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.ai-h3-script-caption-row .ws-prompt-textarea {
    flex: 1 1 auto;
    min-width: 0;
}

.ai-h3-script-soundscape-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; }

.ai-h3-caption-settings-root { z-index: 1085; }
.ai-h3-camera-layer.ai-h3-caption-settings-layer {
    width: min(1080px, 94vw); max-width: 1080px; max-height: 90vh;
    padding: 24px; overflow: auto; border-radius: 20px;
    background: #16121e; color: #ede7f7; border: 1px solid #40324f;
    box-shadow: 0 24px 80px #0009;
}
.ai-h3-caption-settings-layer .ai-h3-camera-layer-title { color: #f4edff; margin-bottom: 24px; }
.ai-h3-caption-settings-layer .ai-h3-camera-layer-section-title { color: #b8a9cd; font-size: 13px; margin-bottom: 12px; }
.ai-h3-caption-settings-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: start; }
.ai-h3-caption-settings-pos { min-width: 0; }
.ai-h3-caption-settings-pos .ai-h3-caption-settings-section { margin-bottom: 0; }
.ai-h3-caption-settings-side { padding: 20px; border: 1px solid #382c45; border-radius: 14px; background: #201929; }
.ai-h3-caption-settings-section { margin-bottom: 24px; }
.ai-h3-caption-settings-section.is-last { margin-bottom: 0; }
.ai-h3-caption-stage-heading { display: flex; justify-content: space-between; align-items: center; color: #eee5fc; }
.ai-h3-caption-stage-heading small { color: #ac99c7; font-variant-numeric: tabular-nums; }
.ai-h3-caption-pos-stage {
    position: relative; container-type: inline-size; box-sizing: content-box;
    width: min(100%, calc((90vh - 200px) * var(--h3-caption-w) / var(--h3-caption-h)));
    aspect-ratio: var(--h3-caption-aspect); margin: 16px auto 0; overflow: hidden;
    border: 1px solid #645078; border-radius: 12px; background: #0d0b12; cursor: crosshair;
}
.ai-h3-caption-pos-img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ai-h3-caption-pos-mockup { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: radial-gradient(ellipse at 50% 35%, #342743, #100d16 80%); color: #9986b0; }
.ai-h3-caption-pos-mockup > i { font-size: 32px; opacity: .35; }
.ai-h3-caption-pos-mockup-label { font-size: 12px; opacity: .6; }
.ai-h3-caption-grid { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to right, transparent calc(33.333% - .5px), #bc9edf38 33.333%, transparent calc(33.333% + .5px), transparent calc(66.666% - .5px), #bc9edf38 66.666%, transparent calc(66.666% + .5px)), linear-gradient(to bottom, transparent calc(33.333% - .5px), #bc9edf38 33.333%, transparent calc(33.333% + .5px), transparent calc(66.666% - .5px), #bc9edf38 66.666%, transparent calc(66.666% + .5px)); }
.ai-h3-caption-spot { position: absolute; z-index: 3; width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 1px solid #b29bcc80; background: #171120ba; color: #cdb9e5; font-size: 11px; cursor: pointer; }
.ai-h3-caption-spot:hover, .ai-h3-caption-spot:focus-visible, .ai-h3-caption-spot.is-active { background: #7955d4; border-color: #d1b9ff; color: white; box-shadow: 0 0 0 3px #9c77ff30; }
.ai-h3-caption-pos-preview { position: absolute; z-index: 4; padding: 0; font-weight: 400; line-height: 1.448; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-all; pointer-events: none; -webkit-text-stroke: .08em #000; paint-order: stroke fill; font-family: sans-serif; }
.ai-h3-caption-pos-preview.is-dark { -webkit-text-stroke-color: #fff; }
.ai-h3-caption-pos-preview, .ai-h3-caption-spot { --cx: -50%; --cy: -50%; transform: translate(var(--cx), var(--cy)); }
.is-align-left.ai-h3-caption-pos-preview, .is-align-left.ai-h3-caption-spot { --cx: 0%; text-align: left; }
.is-align-right.ai-h3-caption-pos-preview, .is-align-right.ai-h3-caption-spot { --cx: -100%; text-align: right; }
.is-align-center.ai-h3-caption-pos-preview { text-align: center; }
.is-valign-top.ai-h3-caption-pos-preview, .is-valign-top.ai-h3-caption-spot { --cy: 0%; }
.is-valign-bottom.ai-h3-caption-pos-preview, .is-valign-bottom.ai-h3-caption-spot { --cy: -100%; }
.ai-h3-caption-feedback { margin: 8px 0 0; color: #ac9aba; font-size: 12px; }
.ai-h3-caption-feedback.is-strong { color: #f0e9fa; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ai-h3-caption-size-label { display: flex; justify-content: space-between; color: #cdbfdf; font-size: 13px; }
.ai-h3-caption-size-slider { color-scheme: dark; width: 100%; accent-color: #9571f5; margin: 14px 0 26px; cursor: pointer; }
@media (max-width: 700px) {
    .ai-h3-camera-layer.ai-h3-caption-settings-layer { padding: 18px; }
    .ai-h3-caption-settings-body { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .ai-h3-caption-pos-stage { width: min(100%, calc(38vh * var(--h3-caption-w) / var(--h3-caption-h))); }
    .ai-h3-caption-settings-side { padding: 16px; }
}

.ai-h3-caption-range {
    position: relative;
    height: 32px;
    margin-top: 8px;
    touch-action: none;
    cursor: pointer;
}

.ai-h3-caption-range-track {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 6px;
    margin-top: -3px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.12);
}

.ai-h3-caption-range-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    border-radius: 99px;
    background: #7c5cff;
}

.ai-h3-caption-range-thumb {
    position: absolute;
    top: 50%;
    width: 18px;
    height: 18px;
    padding: 0;
    margin: -9px 0 0 -9px;
    border: 2px solid #7c5cff;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 0 rgba(124, 92, 255, 0);
    cursor: grab;
    z-index: 2;
}

.ai-h3-caption-range-thumb:hover,
.ai-h3-caption-range-thumb:focus,
.ai-h3-caption-range-thumb.is-dragging {
    box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.28);
    outline: none;
}

.ai-h3-caption-range-thumb.is-dragging {
    cursor: grabbing;
}

.ai-h3-caption-style-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.ai-h3-caption-style-row.is-colors {
    margin-bottom: 0;
}

.ai-h3-caption-color-chip {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
}

.ai-h3-caption-color-chip.is-white {
    background: #fff;
}

.ai-h3-caption-color-chip.is-yellow {
    background: #ffd54a;
}

.ai-h3-caption-color-chip.is-cyan {
    background: #7ad8e6;
}

.ai-h3-caption-color-chip.is-red {
    background: #ff6b6b;
}

.ai-h3-caption-color-chip.is-black {
    background: #111;
}

.ai-h3-caption-color-chip:hover,
.ai-h3-caption-color-chip:focus,
.ai-h3-caption-color-chip.is-active {
    border-color: #7c5cff;
    box-shadow: 0 0 0 2px rgba(124, 92, 255, 0.28);
    outline: none;
}

.ai-h3-script-say-row,
.ai-h3-script-who-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

.ai-h3-script-who-table {
    display: grid;
    grid-template-columns: max-content max-content max-content max-content max-content max-content minmax(0, 1fr);
    column-gap: 8px;
    row-gap: 6px;
    align-items: center;
    width: 100%;
}

.ai-h3-script-who-table .ai-h3-script-who-row {
    display: contents;
}

.ai-h3-script-say-row .ws-prompt-textarea,
.ai-h3-script-who-row .ws-prompt-textarea {
    flex: 1;
    min-width: 0;
}

.ai-h3-script-who-table .ws-prompt-textarea {
    width: 100%;
    min-width: 0;
}

.ai-h3-script-who-name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    min-height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 0.78rem;
    line-height: 1.2;
    white-space: nowrap;
    cursor: default;
}

.ai-h3-script-who-name .ai-h3-character-icon {
    width: 18px;
    height: 18px;
    font-size: 11px;
}

.ai-h3-script-say-speaker {
    flex: 0 0 auto;
    margin-top: 0;
}

.ai-h3-script-icon-btn {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    margin-top: 0;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--ws-text-muted, #999);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.ai-h3-script-icon-btn:hover,
.ai-h3-script-icon-btn:focus {
    color: #d97757;
    outline: none;
}

.ai-h3-character-pick-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin-left: 2px;
    color: #8fd18f;
    font-size: 11px;
}

.ai-h3-character-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
}

.ai-h3-character-voice-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    height: 18px;
    min-width: 18px;
    padding: 0 4px;
    border-radius: 2px;
    background: rgba(72, 40, 120, 0.94);
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
}

.ai-h3-character-layer {
    max-width: 420px;
    overflow: visible;
}

.ai-h3-character-layer .ai-h3-delivery-select-list {
    z-index: 50;
    max-height: 280px;
}

.ai-h3-character-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.ai-h3-character-field-label {
    color: var(--ws-text-dim, #999);
    font-size: 0.78rem;
}

.ai-h3-character-gender-row {
    display: flex;
    gap: 8px;
}

.ai-h3-character-field .ws-prompt-textarea {
    width: 100%;
    min-height: 88px;
}

.ai-h3-character-input {
    box-sizing: border-box;
    width: 100%;
    min-height: 36px;
    padding: 6px 10px;
    border: 1px solid var(--ws-input-border, rgba(255, 255, 255, 0.12));
    border-radius: 6px;
    background: var(--ws-input-bg, #1f2024);
    color: var(--ws-text, #eee);
    font-size: 0.86rem;
}

.ai-h3-character-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
}

.ai-h3-character-pick-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ai-h3-character-pick-list .ai-h3-character-chip {
    width: 100%;
    justify-content: flex-start;
    cursor: pointer;
    pointer-events: auto;
}

.ft_confirm_container .ai-h3-shot-add-confirm {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ft_confirm_container .ai-h3-shot-add-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid var(--ws-border, rgba(255, 255, 255, 0.12));
    border-radius: 6px;
    background: var(--ws-surface-light, #2e2e2e);
    color: var(--ws-text, #eee);
    font-size: 0.88rem;
    line-height: 1.4;
    cursor: pointer;
}

.ft_confirm_container .ai-h3-shot-add-option input {
    flex: 0 0 auto;
    margin-top: 3px;
}

.ft_confirm_container .ai-h3-shot-add-option span {
    min-width: 0;
}

/* 剧本弹层：线圈笔记本（编辑 / 微调同一张皮） */
.ai-h3-script-modal.is-notebook {
    width: 86vw;
    max-width: 1200px;
    min-height: min(72vh, 720px);
    background: #efe6cf;
    border: 1px solid #c4b089;
    border-radius: 3px 12px 12px 4px;
    box-shadow:
        0 22px 56px rgba(0, 0, 0, 0.48),
        8px 10px 0 #d8c49a,
        14px 16px 0 #c4b089;
    color: #2a2118;
}

.ai-h3-script-modal.is-notebook .ai-h3-script-modal-close {
    color: #5a4a32;
}

.ai-h3-script-modal.is-notebook .ai-h3-script-modal-close:hover,
.ai-h3-script-modal.is-notebook .ai-h3-script-modal-close:focus {
    color: #1f1810;
}

.ai-h3-script-modal.is-notebook .ai-video-purple-tabs .ai-video-purple-tabbar {
    background: transparent !important;
    border-bottom: 1px solid #d4c4a0 !important;
}

.ai-h3-script-tabbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ai-h3-chaos-meter {
    flex: 0 0 auto;
    margin: 0 12px 0 0;
    padding: 2px 8px;
    font-size: 12px;
    line-height: 1.4;
    color: #6a5840;
    border: 1px solid #d4c4a0;
    border-radius: 999px;
    background: #f8f2e4;
    cursor: help;
    white-space: nowrap;
}

.ai-h3-chaos-meter.is-over {
    color: #8b1e1e;
    border-color: #c45a4a;
    background: #f6e4dc;
}

.ai-h3-script-modal.is-notebook ul.ai-video-purple-nav-tabs .nav-link {
    color: #6a5840 !important;
    background: transparent !important;
    border-color: transparent !important;
}

.ai-h3-script-modal.is-notebook ul.ai-video-purple-nav-tabs .nav-link:hover {
    color: #2a2118 !important;
    background: rgba(255, 248, 230, 0.45) !important;
}

.ai-h3-script-modal.is-notebook ul.ai-video-purple-nav-tabs .nav-link.active {
    color: #2a2118 !important;
    background: #f8f2e4 !important;
    border-color: #d4c4a0 #d4c4a0 #f8f2e4 !important;
    box-shadow: inset 0 -2px 0 #6b4f2a;
}

.ai-h3-script-modal.is-notebook .ai-h3-script-modal-body {
    display: flex;
    padding: 0 20px 16px 0;
    overflow: hidden;
    background: transparent;
}

.ai-h3-script-modal.is-notebook .ai-h3-script-form,
.ai-h3-script-modal.is-notebook .ai-h3-script-tune {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    width: 100%;
}

.ai-h3-script-notebook {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
}

.ai-h3-script-notebook-coil {
    position: relative;
    z-index: 2;
    flex: 0 0 36px;
    margin: 8px 0 10px;
    background-image:
        radial-gradient(circle at 50% 10px, #3d3d40 0 5px, #111 6px, #111 7px, transparent 8px),
        linear-gradient(90deg, transparent 14px, #1a1a1c 14px, #1a1a1c 20px, transparent 20px);
    background-size: 36px 32px, 36px 100%;
    background-repeat: repeat-y, no-repeat;
    background-position: center 6px, 0 0;
    pointer-events: none;
}

.ai-h3-script-notebook-stack {
    position: absolute;
    top: 14px;
    right: -10px;
    bottom: 14px;
    z-index: 0;
    width: 18px;
    pointer-events: none;
}

.ai-h3-script-notebook-edge {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 10px;
    border: 1px solid #c4b089;
    border-left: 0;
    border-radius: 0 4px 4px 0;
    background: #e8dcc0;
    pointer-events: auto;
    cursor: pointer;
}

.ai-h3-script-notebook-edge:nth-child(1) { right: 8px; }
.ai-h3-script-notebook-edge:nth-child(2) { right: 4px; background: #e0d2b2; }
.ai-h3-script-notebook-edge:nth-child(3) { right: 0; background: #d6c4a0; }

.ai-h3-script-notebook-page {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    padding: 10px 18px 12px 8px;
    overflow: hidden;
    background-color: #f7f1e2;
    background-image:
        url("/images/ai/h3-script-paper-grain.svg?v=20260831"),
        linear-gradient(#f8f2e4, #efe6cf);
    background-repeat: repeat, no-repeat;
    background-size: 180px 180px, auto;
    box-shadow: inset 0 0 0 1px rgba(196, 176, 137, 0.45);
}

.ai-h3-script-spread {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.ai-h3-script-album {
    flex: 0 0 150px;
    width: 150px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-top: 4px;
}

.ai-h3-script-photo {
    position: relative;
    display: block;
    width: 150px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.ai-h3-script-photo:focus {
    outline: none;
}

.ai-h3-script-photo:focus-visible {
    outline: 2px solid rgba(196, 150, 78, 0.85);
    outline-offset: 4px;
}

.ai-h3-script-photo-mat {
    display: block;
    width: 150px;
    background: #f3ead4;
    box-shadow: 0 1px 3px rgba(42, 33, 24, 0.18);
}

.ai-h3-script-photo.is-empty .ai-h3-script-photo-mat {
    min-height: 112px;
    aspect-ratio: 3 / 4;
    box-shadow:
        inset 0 0 0 1px #d4c4a0,
        0 1px 3px rgba(42, 33, 24, 0.12);
}

.ai-h3-script-photo-img {
    display: block;
    width: 150px;
    height: auto;
}

.ai-h3-script-photo-corner {
    position: absolute;
    z-index: 2;
    width: 0;
    height: 0;
    pointer-events: none;
    filter: drop-shadow(1px 1px 0 rgba(72, 18, 12, 0.28));
}

.ai-h3-script-photo-corner.is-tl {
    top: -1px;
    left: -1px;
    border-top: 18px solid #c23b2e;
    border-right: 18px solid transparent;
}

.ai-h3-script-photo-corner.is-tr {
    top: -1px;
    right: -1px;
    border-top: 18px solid #c23b2e;
    border-left: 18px solid transparent;
}

.ai-h3-script-photo-corner.is-bl {
    bottom: -1px;
    left: -1px;
    border-bottom: 18px solid #c23b2e;
    border-right: 18px solid transparent;
}

.ai-h3-script-photo-corner.is-br {
    bottom: -1px;
    right: -1px;
    border-bottom: 18px solid #c23b2e;
    border-left: 18px solid transparent;
}

.ai-h3-script-modal.is-notebook .ai-h3-script-layout {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
}

.ai-h3-script-modal.is-notebook .ws-form-label,
.ai-h3-script-modal.is-notebook .ai-h3-script-shot-head .ws-form-label {
    color: #3d2a16;
}

.ai-h3-script-modal.is-notebook .ai-h3-script-shot-block {
    border-top: 1px solid #d4c4a0;
}

.ai-h3-script-modal.is-notebook textarea.ws-prompt-textarea,
.ai-h3-script-modal.is-notebook textarea.ai-t2v-textarea {
    background: rgba(255, 252, 244, 0.78);
    border-color: #c9b99a;
    color: #2a2118;
}

.ai-h3-script-modal.is-notebook textarea.ws-prompt-textarea::placeholder,
.ai-h3-script-modal.is-notebook textarea.ai-t2v-textarea::placeholder {
    color: #8a7760;
}

.ai-h3-script-modal.is-notebook .ai-h3-character-chip {
    background: #f3ead4;
    border-color: #c9b99a;
    color: #2a2118;
}

.ai-h3-script-modal.is-notebook .ai-h3-character-chip:hover,
.ai-h3-script-modal.is-notebook .ai-h3-character-chip:focus {
    border-color: #8d6b3a;
    color: #1f1810;
}

.ai-h3-script-modal.is-notebook .ai-h3-character-chip.is-on {
    border-color: #3a7a5c;
}

.ai-h3-script-modal.is-notebook .ai-h3-script-cast-add {
    border-color: #6a8f8f;
    color: #3a5c5c;
}

.ai-h3-script-modal.is-notebook .ai-h3-script-cast-add:hover,
.ai-h3-script-modal.is-notebook .ai-h3-script-cast-add:focus {
    border-color: #3a5c5c;
    color: #2a2118;
}

.ai-h3-script-modal.is-notebook .ai-h3-script-assist-btn {
    border-color: #c9b99a;
    color: #4a3a28;
}

.ai-h3-script-modal.is-notebook .ai-h3-script-assist-btn:hover,
.ai-h3-script-modal.is-notebook .ai-h3-script-assist-btn:focus {
    border-color: #6b4f2a;
    color: #2a2118;
}

.ai-h3-script-modal.is-notebook .ai-h3-script-assist-btn.is-on {
    border-color: #6b4f2a;
    background: #efe0c4;
    color: #2a2118;
}

.ai-h3-script-modal.is-notebook .ai-h3-script-icon-btn {
    color: #6a5840;
}

.ai-h3-script-modal.is-notebook .ai-h3-script-icon-btn:hover,
.ai-h3-script-modal.is-notebook .ai-h3-script-icon-btn:focus {
    color: #2a2118;
}

.ai-h3-script-modal.is-notebook .ai-h3-shot-helper-box {
    border: 1px dashed #b89a6a;
    background: rgba(255, 248, 230, 0.86);
}

.ai-h3-script-modal.is-notebook .ai-h3-shot-helper-head {
    color: #2a2118;
}

.ai-h3-script-modal.is-notebook .ai-h3-shot-helper-text {
    color: #3d2a16;
}

.ai-h3-script-modal.is-notebook .btn-outline-secondary {
    border-color: #c9b99a;
    color: #4a3a28;
    background: transparent;
}

.ai-h3-script-modal.is-notebook .btn-outline-secondary:hover,
.ai-h3-script-modal.is-notebook .btn-outline-secondary:focus {
    border-color: #6b4f2a;
    color: #2a2118;
    background: #efe0c4;
}

.ai-h3-script-notebook-footer {
    flex: 0 0 auto;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #d4c4a0;
}

.ai-h3-script-modal.is-notebook .ai-h3-script-tune {
    overflow-x: hidden;
    overflow-y: auto;
}

/* The desktop footer is outside the settings scroller; mobile keeps its flow. */
@media (min-width: 768px) {
    .ai-h3-script-spread { overflow: hidden; align-items: stretch; }
    .ai-h3-script-modal.is-notebook .ai-h3-script-layout { overflow-y: auto; overflow-x: hidden; }
    .ai-h3-script-notebook-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding-top: 4px; margin-top: 4px; }
    .ai-h3-script-notebook-footer > .h3-mobile-timing { grid-column: 1; margin: 0; }
    .ai-h3-script-notebook-footer > .ai-h3-shot-over-hint { grid-column: 1 / -1; grid-row: 1; margin: 0; }
    .ai-h3-script-notebook-footer > .ai-h3-script-notebook-add { width: auto; white-space: nowrap; }
}

.ai-h3-script-notebook-add {
    width: 100%;
}

.ai-h3-script-modal.is-notebook .ai-t2v-duration-limit-hint,
.ai-h3-script-modal.is-notebook .ai-h3-shot-over-hint {
    color: #8a3a28;
}

.ai-h3-script-modal.is-notebook .ai-t2v-effect-view-label {
    color: #4a3a28;
}

.ai-h3-script-modal.is-notebook .ws-section-title {
    color: #3d2a16;
}

.ai-h3-script-modal.is-notebook .ai-h3-track-label,
.ai-h3-script-modal.is-notebook .ai-h3-ruler-spacer {
    color: #5a4a32;
}

.ai-h3-script-modal.is-notebook .ai-h3-ruler-tick {
    fill: #6a5840;
}

.ai-h3-script-modal.is-notebook .ai-h3-track-body {
    background-color: #efe6cf;
    border-color: #c9b99a;
}

.ai-h3-script-modal.is-notebook .ai-h3-track-body-shot {
    border-color: #2a2a2a;
    background-color: #3a3a3a;
    background-image:
        repeating-linear-gradient(
            90deg,
            #2a2a2a 0,
            #2a2a2a 4px,
            #f4f4f4 4px,
            #f4f4f4 10px,
            #2a2a2a 10px,
            #2a2a2a 16px
        ),
        repeating-linear-gradient(
            90deg,
            #2a2a2a 0,
            #2a2a2a 4px,
            #f4f4f4 4px,
            #f4f4f4 10px,
            #2a2a2a 10px,
            #2a2a2a 16px
        ),
        linear-gradient(#3a3a3a, #3a3a3a);
    background-size: 16px 7px, 16px 7px, 100% calc(100% - 20px);
    background-position: 0 2px, 0 calc(100% - 2px), 0 10px;
    background-repeat: repeat-x, repeat-x, no-repeat;
}

.ai-h3-script-modal.is-notebook .ai-h3-clip-editor-layer {
    background: #f7f1e2;
    border-color: #c9b99a;
    box-shadow: 0 10px 28px rgba(61, 42, 22, 0.22);
    color: #2a2118;
}

.ai-h3-script-modal.is-notebook .ai-h3-clip-editor-arrow {
    border-bottom-color: #f7f1e2;
    filter: drop-shadow(0 -1px 0 #c9b99a);
}

.ai-h3-script-modal.is-notebook .ai-h3-name-helper {
    background: #f8f2e4;
    border-color: #c9b99a;
    box-shadow: 0 8px 24px rgba(61, 42, 22, 0.18);
}

.ai-h3-script-modal.is-notebook .ai-h3-name-helper-item {
    color: #2a2118;
}

.ai-h3-script-modal.is-notebook .ai-h3-name-helper-item.is-active,
.ai-h3-script-modal.is-notebook .ai-h3-name-helper-item:hover,
.ai-h3-script-modal.is-notebook .ai-h3-name-helper-item:focus {
    background: #efe0c4;
    color: #1f1810;
}

.ai-h3-script-modal.is-notebook .ai-h3-delivery-select-btn {
    background: rgba(255, 252, 244, 0.78);
    border-color: #c9b99a;
    color: #2a2118;
}

.ai-h3-script-modal.is-notebook .ai-h3-delivery-select-btn::after {
    border-top-color: #6a5840;
}

.ai-h3-script-modal.is-notebook .ai-h3-delivery-select-list {
    background: #f8f2e4;
    border-color: #c9b99a;
    box-shadow: 0 8px 20px rgba(61, 42, 22, 0.18);
}

.ai-h3-script-modal.is-notebook .ai-h3-delivery-select-option {
    color: #2a2118;
}

.ai-h3-script-modal.is-notebook .ai-h3-delivery-select-option:hover,
.ai-h3-script-modal.is-notebook .ai-h3-delivery-select-option:focus {
    background: #efe0c4;
}

.ai-h3-script-modal.is-notebook .ai-h3-delivery-select-option.active {
    background: #efe0c4;
    color: #6b4f2a;
}

.ai-h3-script-modal.is-notebook .ai-h3-shot-camera-btn {
    color: #4a3a28;
}

.ai-h3-script-modal.is-notebook .ai-h3-shot-camera-btn:hover,
.ai-h3-script-modal.is-notebook .ai-h3-shot-camera-btn:focus {
    color: #2a2118;
}

.h3-nb-next-enter-active,
.h3-nb-next-leave-active,
.h3-nb-prev-enter-active,
.h3-nb-prev-leave-active {
    transition: transform 0.26s ease, opacity 0.26s ease;
}

.h3-nb-next-leave-active,
.h3-nb-prev-leave-active {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
}

.h3-nb-next-enter {
    transform: translateX(18%) rotate(1.2deg);
    opacity: 0;
}

.h3-nb-next-leave-to {
    transform: translateX(-12%) rotate(-0.8deg);
    opacity: 0;
}

.h3-nb-prev-enter {
    transform: translateX(-18%) rotate(-1.2deg);
    opacity: 0;
}

.h3-nb-prev-leave-to {
    transform: translateX(12%) rotate(0.8deg);
    opacity: 0;
}


.ai-h3-character-assistant-heading-tools {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
    gap: 8px;
}
.ai-h3-character-assistant-root .ai-h3-assistant-search {
    flex: 1 1 auto;
    max-width: none;
}
.ai-h3-character-assistant-root .ai-h3-effect-layer-clear {
    width: auto;
    flex: 0 0 auto;
    margin-top: 0;
    white-space: nowrap;
}

/* H3 character assistant body map */
.ai-h3-character-assistant-root {
    padding: 0;
}
.ai-h3-character-assistant-root .ai-h3-camera-layer.ai-h3-effect-layer {
    --h3-body-chrome: 88px;
    max-width: 92vw;
    max-height: 100vh;
    overflow: visible;
}
.ai-h3-character-assistant-root .ai-h3-effect-layer-body {
    flex: 1 1 auto;
    min-height: 0;
}
.ai-h3-character-assistant-root .ai-h3-effect-layer-body.is-body-map {
    overflow: hidden;
}
.ai-h3-character-assistant-root:not(.ai-workspace-paperdoll-slot) .ai-h3-body-slot--body-posture.ai-h3-body-slot-right .ai-h3-body-box {
    top: calc(58% + var(--h3-body-box-h, 34px) + 8px);
    width: 16.2%;
    min-width: 16.2%;
    max-width: 16.2%;
}
.ai-h3-character-assistant-root:not(.ai-workspace-paperdoll-slot) .ai-h3-body-slot--body-posture .ai-h3-body-lead-h1 {
    top: calc(58% + var(--h3-body-box-h, 34px) + 25px);
    left: 66%;
    width: 16.2%;
}
.ai-h3-character-assistant-root:not(.ai-workspace-paperdoll-slot) .ai-h3-body-slot--body-posture .ai-h3-body-lead-v {
    top: 42%;
    left: 66%;
    height: calc(16% + var(--h3-body-box-h, 34px) + 25px);
}
.ai-h3-character-assistant-root:not(.ai-workspace-paperdoll-slot) .ai-h3-body-slot--body-posture .ai-h3-body-lead-h2 {
    top: 42%;
    left: 50%;
    width: 16%;
}
.ai-h3-character-assistant-root:not(.ai-workspace-paperdoll-slot) .ai-h3-body-slot--body-posture .ai-h3-body-pin {
    top: 42%;
    left: 50%;
}
.ai-h3-character-body-board {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.ai-h3-character-body-stage {
    position: relative;
    width: min(100%, calc((100vh - var(--h3-body-chrome, 88px)) * 1.65));
    margin: 0 auto;
}
.ai-h3-character-body-map {
    --h3-body-line: var(--ws-accent, #7c5cff);
    --h3-body-line-hot: #9b7dff;
    --h3-body-box-h: 34px;
    position: relative;
    width: 100%;
    aspect-ratio: 1.65 / 1;
    height: auto;
    overflow: visible;
    background: #050608;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.ai-h3-character-body-figure {
    aspect-ratio: 592 / 820;
    position: absolute;
    left: 50%;
    top: 50%;
    height: 96%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.ai-h3-character-body-figure img {
    display: block;
    height: 100%;
    width: auto;
    filter: invert(1);
}
.ai-h3-body-slot {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.ai-h3-body-lead-h1,
.ai-h3-body-lead-h2,
.ai-h3-body-lead-v {
    position: absolute;
    background: var(--h3-body-line);
    pointer-events: none;
}
.ai-h3-body-lead-h1,
.ai-h3-body-lead-h2 {
    height: 1px;
}
.ai-h3-body-lead-v {
    width: 1px;
}
.ai-h3-body-pin {
    position: absolute;
    z-index: 5;
    width: 0;
    height: 0;
    pointer-events: none;
}
.ai-h3-body-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    border-radius: 50%;
    background: var(--h3-body-line);
    box-shadow: 0 0 0 1px rgba(5, 6, 8, 0.85);
    pointer-events: none;
}
.ai-h3-body-thumbs {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2px;
    transform: translate(0, calc(-100% - 4px));
    pointer-events: none;
}
.ai-h3-body-slot-left .ai-h3-body-thumbs {
    transform: translate(-100%, calc(-100% - 4px));
}
.ai-h3-body-slot-right .ai-h3-body-thumbs {
    transform: translate(0, calc(-100% - 4px));
}
.ai-h3-body-thumbs.is-beside {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    flex-shrink: 0;
}
.ai-h3-body-thumb {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--h3-body-box-h, 34px);
    height: var(--h3-body-box-h, 34px);
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(155, 125, 255, 0.85);
    background: rgba(12, 10, 28, 0.92);
    box-shadow: 0 0 0 1px rgba(5, 6, 8, 0.7);
    pointer-events: auto;
    cursor: pointer;
}
.ai-h3-body-thumb-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.ai-h3-body-thumb-letter {
    color: #f2edff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}
.ai-h3-body-box-cluster {
    display: contents;
}
.ai-h3-body-slot-stack .ai-h3-body-box-cluster {
    display: flex;
    position: absolute;
    z-index: 6;
    right: 1.6%;
    left: auto;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    width: max-content;
    max-width: 72%;
    pointer-events: none;
}
.ai-h3-body-slot:has(.ai-h3-body-box.is-selected) .ai-h3-body-lead-h1,
.ai-h3-body-slot:has(.ai-h3-body-box.is-selected) .ai-h3-body-lead-h2,
.ai-h3-body-slot:has(.ai-h3-body-box.is-selected) .ai-h3-body-lead-v,
.ai-h3-body-slot:has(.ai-h3-body-box.is-active) .ai-h3-body-lead-h1,
.ai-h3-body-slot:has(.ai-h3-body-box.is-active) .ai-h3-body-lead-h2,
.ai-h3-body-slot:has(.ai-h3-body-box.is-active) .ai-h3-body-lead-v,
.ai-h3-body-slot:has(.ai-h3-body-box.is-selected) .ai-h3-body-dot,
.ai-h3-body-slot:has(.ai-h3-body-box.is-active) .ai-h3-body-dot {
    background: var(--h3-body-line-hot);
}
.ai-h3-body-box {
    position: absolute;
    z-index: 6;
    box-sizing: border-box;
    width: max-content;
    min-width: 16.2%;
    max-width: 48%;
    height: var(--h3-body-box-h, 34px);
    min-height: var(--h3-body-box-h, 34px);
    max-height: var(--h3-body-box-h, 34px);
    padding: 0 7px;
    overflow: hidden;
    border: 1px solid var(--h3-body-line);
    background: rgba(12, 10, 28, 0.82);
    color: #d7d0ff;
    text-align: left;
    pointer-events: auto;
    cursor: pointer;
}
.ai-h3-body-slot-left .ai-h3-body-box {
    left: 1.6%;
    right: auto;
}
.ai-h3-body-slot-right .ai-h3-body-box,
.ai-h3-body-slot-stack .ai-h3-body-box {
    left: auto;
    right: 1.6%;
}
.ai-h3-body-slot-left.ai-h3-body-row-0 .ai-h3-body-box { top: 2%; }
.ai-h3-body-slot-left.ai-h3-body-row-1 .ai-h3-body-box { top: 8%; }
.ai-h3-body-slot-left.ai-h3-body-row-2 .ai-h3-body-box { top: 14%; }
.ai-h3-body-slot-left.ai-h3-body-row-3 .ai-h3-body-box { top: 20%; }
.ai-h3-body-slot-left.ai-h3-body-row-4 .ai-h3-body-box { top: 26%; }
.ai-h3-body-slot-left.ai-h3-body-row-5 .ai-h3-body-box { top: 32%; }
.ai-h3-body-slot-left.ai-h3-body-row-6 .ai-h3-body-box { top: 38%; }
.ai-h3-body-slot-left.ai-h3-body-row-7 .ai-h3-body-box { top: 44%; }
.ai-h3-body-slot-left.ai-h3-body-row-8 .ai-h3-body-box { top: 50%; }
.ai-h3-body-slot-left.ai-h3-body-row-9 .ai-h3-body-box { top: 56%; }
.ai-h3-body-slot-left.ai-h3-body-row-10 .ai-h3-body-box { top: 64%; }
.ai-h3-body-slot-left.ai-h3-body-row-11 .ai-h3-body-box { top: 84%; }
.ai-h3-body-slot-right.ai-h3-body-row-0 .ai-h3-body-box { top: 2%; }
.ai-h3-body-slot-right.ai-h3-body-row-1 .ai-h3-body-box { top: 8.4%; }
.ai-h3-body-slot-right.ai-h3-body-row-2 .ai-h3-body-box { top: 14.8%; }
.ai-h3-body-slot-right.ai-h3-body-row-3 .ai-h3-body-box { top: 21.2%; }
.ai-h3-body-slot-right.ai-h3-body-row-4 .ai-h3-body-box { top: 27.6%; }
.ai-h3-body-slot-right.ai-h3-body-row-5 .ai-h3-body-box { top: 34%; }
.ai-h3-body-slot-right.ai-h3-body-row-6 .ai-h3-body-box { top: 40.4%; }
.ai-h3-body-slot-right.ai-h3-body-row-7 .ai-h3-body-box { top: 46.8%; }
.ai-h3-body-slot-right.ai-h3-body-row-8 .ai-h3-body-box { top: 58%; }
.ai-h3-body-slot-stack.ai-h3-body-row-0 .ai-h3-body-box-cluster { top: 73.6%; }
.ai-h3-body-slot-stack.ai-h3-body-row-1 .ai-h3-body-box-cluster { top: 80.6%; }
.ai-h3-body-slot-stack.ai-h3-body-row-2 .ai-h3-body-box-cluster { top: 87.6%; }
.ai-h3-body-slot-stack.ai-h3-body-row-3 .ai-h3-body-box-cluster { top: 94.6%; }
.ai-h3-body-slot-stack .ai-h3-body-box {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    min-width: 88px;
    max-width: none;
    flex: 0 1 auto;
}
.ai-h3-body-box:hover,
.ai-h3-body-box:focus {
    color: #fff;
    background: rgba(124, 92, 255, 0.22);
    outline: none;
}
.ai-h3-body-box.is-selected {
    background: rgba(124, 92, 255, 0.34);
    color: #fff;
}
.ai-h3-body-box.is-active {
    box-shadow: 0 0 0 1px #fff;
}
.ai-h3-body-box-cat,
.ai-h3-body-box-chips {
    display: flex;
    align-items: center;
    height: 100%;
    overflow: hidden;
    white-space: nowrap;
}
.ai-h3-body-box-cat {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    opacity: 0.78;
}
.ai-h3-body-box-chips {
    gap: 4px;
}
.ai-h3-body-box-chip {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 7px;
    border: 1px solid rgba(155, 125, 255, 0.7);
    border-radius: 3px;
    background: rgba(124, 92, 255, 0.28);
    color: #fff;
    font-size: 0.68rem;
    line-height: 1;
    cursor: pointer;
}
.ai-h3-body-box-chip:hover,
.ai-h3-body-box-chip:focus {
    background: rgba(155, 125, 255, 0.45);
}
/* body-map leads: unique rails, no overlap/cross; dots mapped from 592x820 outline into 1.65 stage */
.ai-h3-body-slot--head-hair-style .ai-h3-body-lead-h1 { top: 4.4%; left: 17.8%; width: 1.4%; }
.ai-h3-body-slot--head-hair-style .ai-h3-body-lead-v { top: 4.4%; left: 19.2%; height: 3.55%; }
.ai-h3-body-slot--head-hair-style .ai-h3-body-lead-h2 { top: 7.95%; left: 19.2%; width: 30.59%; }
.ai-h3-body-slot--head-hair-style .ai-h3-body-pin { top: 7.95%; left: 49.79%; }
.ai-h3-body-slot--head-eyes .ai-h3-body-lead-h1 { top: 10.4%; left: 17.8%; width: 2.75%; }
.ai-h3-body-slot--head-eyes .ai-h3-body-lead-v { top: 10.4%; left: 20.55%; height: 1.39%; }
.ai-h3-body-slot--head-eyes .ai-h3-body-lead-h2 { top: 11.79%; left: 20.55%; width: 27.98%; }
.ai-h3-body-slot--head-eyes .ai-h3-body-pin { top: 11.79%; left: 48.53%; }
.ai-h3-body-slot--head-ear .ai-h3-body-lead-h1 { top: 16.4%; left: 17.8%; width: 4.1%; }
.ai-h3-body-slot--head-ear .ai-h3-body-lead-v { top: 13.52%; left: 21.9%; height: 2.88%; }
.ai-h3-body-slot--head-ear .ai-h3-body-lead-h2 { top: 13.52%; left: 21.9%; width: 25.49%; }
.ai-h3-body-slot--head-ear .ai-h3-body-pin { top: 13.52%; left: 47.39%; }
.ai-h3-body-slot--head-expression .ai-h3-body-lead-h1 { top: 22.4%; left: 17.8%; width: 5.45%; }
.ai-h3-body-slot--head-expression .ai-h3-body-lead-v { top: 14.29%; left: 23.25%; height: 8.11%; }
.ai-h3-body-slot--head-expression .ai-h3-body-lead-h2 { top: 14.29%; left: 23.25%; width: 26.54%; }
.ai-h3-body-slot--head-expression .ai-h3-body-pin { top: 14.29%; left: 49.79%; }
.ai-h3-body-slot--costume-neck .ai-h3-body-lead-h1 { top: 28.4%; left: 17.8%; width: 6.8%; }
.ai-h3-body-slot--costume-neck .ai-h3-body-lead-v { top: 18.32%; left: 24.6%; height: 10.08%; }
.ai-h3-body-slot--costume-neck .ai-h3-body-lead-h2 { top: 18.32%; left: 24.6%; width: 25.19%; }
.ai-h3-body-slot--costume-neck .ai-h3-body-pin { top: 18.32%; left: 49.79%; }
.ai-h3-body-slot--body-breast-size .ai-h3-body-lead-h1 { top: 34.4%; left: 17.8%; width: 8.15%; }
.ai-h3-body-slot--body-breast-size .ai-h3-body-lead-v { top: 27.92%; left: 25.95%; height: 6.48%; }
.ai-h3-body-slot--body-breast-size .ai-h3-body-lead-h2 { top: 27.92%; left: 25.95%; width: 21.74%; }
.ai-h3-body-slot--body-breast-size .ai-h3-body-pin { top: 27.92%; left: 47.69%; }
.ai-h3-body-slot--body-breast .ai-h3-body-lead-h1 { top: 40.4%; left: 17.8%; width: 9.5%; }
.ai-h3-body-slot--body-breast .ai-h3-body-lead-v { top: 29.36%; left: 27.3%; height: 11.04%; }
.ai-h3-body-slot--body-breast .ai-h3-body-lead-h2 { top: 29.36%; left: 27.3%; width: 22.49%; }
.ai-h3-body-slot--body-breast .ai-h3-body-pin { top: 29.36%; left: 49.79%; }
.ai-h3-body-slot--costume-sleeve .ai-h3-body-lead-h1 { top: 46.4%; left: 17.8%; width: 10.85%; }
.ai-h3-body-slot--costume-sleeve .ai-h3-body-lead-v { top: 36.56%; left: 28.65%; height: 9.84%; }
.ai-h3-body-slot--costume-sleeve .ai-h3-body-lead-h2 { top: 36.56%; left: 28.65%; width: 14.29%; }
.ai-h3-body-slot--costume-sleeve .ai-h3-body-pin { top: 36.56%; left: 42.94%; }
.ai-h3-body-slot--costume-upper .ai-h3-body-lead-h1 { top: 52.4%; left: 17.8%; width: 12.2%; }
.ai-h3-body-slot--costume-upper .ai-h3-body-lead-v { top: 38.48%; left: 30%; height: 13.92%; }
.ai-h3-body-slot--costume-upper .ai-h3-body-lead-h2 { top: 38.48%; left: 30%; width: 19.79%; }
.ai-h3-body-slot--costume-upper .ai-h3-body-pin { top: 38.48%; left: 49.79%; }
.ai-h3-body-slot--body-hand-posture .ai-h3-body-lead-h1 { top: 58.4%; left: 17.8%; width: 13.55%; }
.ai-h3-body-slot--body-hand-posture .ai-h3-body-lead-v { top: 55.28%; left: 31.35%; height: 3.12%; }
.ai-h3-body-slot--body-hand-posture .ai-h3-body-lead-h2 { top: 55.28%; left: 31.35%; width: 5.41%; }
.ai-h3-body-slot--body-hand-posture .ai-h3-body-pin { top: 55.28%; left: 36.76%; }
.ai-h3-body-slot--body-crotch .ai-h3-body-lead-h1 { top: 66.4%; left: 17.8%; width: 14.9%; }
.ai-h3-body-slot--body-crotch .ai-h3-body-lead-v { top: 58.45%; left: 32.7%; height: 7.95%; }
.ai-h3-body-slot--body-crotch .ai-h3-body-lead-h2 { top: 58.45%; left: 32.7%; width: 17.09%; }
.ai-h3-body-slot--body-crotch .ai-h3-body-pin { top: 58.45%; left: 49.79%; }
.ai-h3-body-slot--costume-feet .ai-h3-body-lead-h1 { top: 86.4%; left: 17.8%; width: 16.25%; }
.ai-h3-body-slot--costume-feet .ai-h3-body-lead-v { top: 86.4%; left: 34.05%; height: 7.09%; }
.ai-h3-body-slot--costume-feet .ai-h3-body-lead-h2 { top: 93.49%; left: 34.05%; width: 12.92%; }
.ai-h3-body-slot--costume-feet .ai-h3-body-pin { top: 93.49%; left: 46.97%; }
.ai-h3-body-slot--costume-head .ai-h3-body-lead-h1 { top: 4.4%; left: 80.6%; width: 1.6%; }
.ai-h3-body-slot--costume-head .ai-h3-body-lead-v { top: 4.4%; left: 80.6%; height: 2.88%; }
.ai-h3-body-slot--costume-head .ai-h3-body-lead-h2 { top: 7.28%; left: 51.05%; width: 29.55%; }
.ai-h3-body-slot--costume-head .ai-h3-body-pin { top: 7.28%; left: 51.05%; }
.ai-h3-body-slot--head-posture .ai-h3-body-lead-h1 { top: 10.8%; left: 78.6%; width: 3.6%; }
.ai-h3-body-slot--head-posture .ai-h3-body-lead-v { top: 10.8%; left: 78.6%; height: 2.24%; }
.ai-h3-body-slot--head-posture .ai-h3-body-lead-h2 { top: 13.04%; left: 51.76%; width: 26.84%; }
.ai-h3-body-slot--head-posture .ai-h3-body-pin { top: 13.04%; left: 51.76%; }
.ai-h3-body-slot--head-mouth .ai-h3-body-lead-h1 { top: 17.2%; left: 76.6%; width: 5.6%; }
.ai-h3-body-slot--head-mouth .ai-h3-body-lead-v { top: 15.63%; left: 76.6%; height: 1.57%; }
.ai-h3-body-slot--head-mouth .ai-h3-body-lead-h2 { top: 15.63%; left: 49.79%; width: 26.81%; }
.ai-h3-body-slot--head-mouth .ai-h3-body-pin { top: 15.63%; left: 49.79%; }
.ai-h3-body-slot--costume-shoulder .ai-h3-body-lead-h1 { top: 23.6%; left: 74.6%; width: 7.6%; }
.ai-h3-body-slot--costume-shoulder .ai-h3-body-lead-v { top: 23.41%; left: 74.6%; height: 0.2%; }
.ai-h3-body-slot--costume-shoulder .ai-h3-body-lead-h2 { top: 23.41%; left: 55.8%; width: 18.8%; }
.ai-h3-body-slot--costume-shoulder .ai-h3-body-pin { top: 23.41%; left: 55.8%; }
.ai-h3-body-slot--body-back .ai-h3-body-lead-h1 { top: 30%; left: 72.6%; width: 9.6%; }
.ai-h3-body-slot--body-back .ai-h3-body-lead-v { top: 26.48%; left: 72.6%; height: 3.52%; }
.ai-h3-body-slot--body-back .ai-h3-body-lead-h2 { top: 26.48%; left: 56.64%; width: 15.96%; }
.ai-h3-body-slot--body-back .ai-h3-body-pin { top: 26.48%; left: 56.64%; }
.ai-h3-body-slot--costume-chest .ai-h3-body-lead-h1 { top: 36.4%; left: 70.6%; width: 11.6%; }
.ai-h3-body-slot--costume-chest .ai-h3-body-lead-v { top: 30.32%; left: 70.6%; height: 6.08%; }
.ai-h3-body-slot--costume-chest .ai-h3-body-lead-h2 { top: 30.32%; left: 52.18%; width: 18.42%; }
.ai-h3-body-slot--costume-chest .ai-h3-body-pin { top: 30.32%; left: 52.18%; }
.ai-h3-body-slot--costume-waist .ai-h3-body-lead-h1 { top: 42.8%; left: 68.6%; width: 13.6%; }
.ai-h3-body-slot--costume-waist .ai-h3-body-lead-v { top: 42.32%; left: 68.6%; height: 0.48%; }
.ai-h3-body-slot--costume-waist .ai-h3-body-lead-h2 { top: 42.32%; left: 53.36%; width: 15.24%; }
.ai-h3-body-slot--costume-waist .ai-h3-body-pin { top: 42.32%; left: 53.36%; }
.ai-h3-body-slot--costume-lower .ai-h3-body-lead-h1 { top: 49.2%; left: 66.6%; width: 15.6%; }
.ai-h3-body-slot--costume-lower .ai-h3-body-lead-v { top: 49.2%; left: 66.6%; height: 10.21%; }
.ai-h3-body-slot--costume-lower .ai-h3-body-lead-h2 { top: 59.41%; left: 52.31%; width: 14.29%; }
.ai-h3-body-slot--costume-lower .ai-h3-body-pin { top: 59.41%; left: 52.31%; }
.ai-h3-body-slot--costume-leg .ai-h3-body-lead-h1 { top: 60.4%; left: 64.6%; width: 17.6%; }
.ai-h3-body-slot--costume-leg .ai-h3-body-lead-v { top: 60.4%; left: 64.6%; height: 16.48%; }
.ai-h3-body-slot--costume-leg .ai-h3-body-lead-h2 { top: 76.88%; left: 52.18%; width: 12.42%; }
.ai-h3-body-slot--costume-leg .ai-h3-body-pin { top: 76.88%; left: 52.18%; }

.ai-h3-body-box-layer {
    position: absolute;
    z-index: 12;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    min-width: 0;
    right: auto;
    bottom: auto;
    height: auto;
    overflow: hidden;
    padding: 10px 12px 12px;
    border: 1px solid rgba(180, 164, 255, 0.45);
    border-radius: 8px;
    background: #2a2740;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}
.ai-h3-body-box-layer:not(.is-placed),
.ai-h3-body-box-layer-arrow:not(.is-placed) {
    visibility: hidden;
    pointer-events: none;
}
.ai-h3-body-box-layer-arrow {
    position: absolute;
    z-index: 13;
    width: 0;
    height: 0;
    pointer-events: none;
    transform: translateY(-50%);
}
.ai-h3-body-box-layer-arrow.is-from-left {
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    border-right: 10px solid #2a2740;
    filter: drop-shadow(-1px 0 0 rgba(180, 164, 255, 0.45));
}
.ai-h3-body-box-layer-arrow.is-from-right {
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    border-left: 10px solid #2a2740;
    filter: drop-shadow(1px 0 0 rgba(180, 164, 255, 0.45));
}
.ai-h3-body-box-layer-head {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    color: #efeaff;
}
.ai-h3-body-box-layer-search {
    flex: 1 0 100%;
    width: 100%;
    max-width: none;
    min-width: 0;
    height: 32px;
    margin: 2px 0 0;
}
.ai-h3-body-box-layer-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}
.ai-h3-body-box-layer-section + .ai-h3-body-box-layer-section {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(180, 164, 255, 0.18);
}
.ai-h3-body-box-layer-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    color: #cfc8ea;
}
.ai-h3-body-box-layer-grid {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: flex-start;
    gap: 8px;
    min-height: 0;
    padding-top: 0;
    overflow: visible;
}
.ai-h3-body-box-layer-grid .ws-detail-option-card {
    flex: 0 0 100px;
    width: 100px;
    max-width: 100px;
    height: auto;
    align-self: flex-start;
}
.ai-h3-body-box-layer-grid .ws-detail-option-card-name {
    white-space: normal;
    overflow: hidden;
    text-overflow: unset;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.2;
    min-height: 2.4em;
    font-size: 12px;
}
.ai-h3-body-box-layer-grid .ws-detail-option-card-img {
    width: 100px;
    height: 100px;
    max-height: 100px;
    aspect-ratio: 1;
    object-fit: cover;
}
.ai-h3-body-box-layer-grid .ws-detail-option-card-img.ws-detail-option-card-none {
    width: 100px;
    height: 100px;
    min-height: 100px;
    max-height: 100px;
}

.ai-h3-character-assistant-list {
    display: none;
}
@media (max-width: 767px) {
    .ai-h3-character-body-board {
        display: none;
    }
    .ai-h3-character-assistant-list {
        display: block;
    }
    .ai-h3-character-assistant-root .ai-h3-effect-layer-body.is-body-map {
        overflow-y: auto;
    }
}


/* App-style script form only below the desktop breakpoint. */
.ai-h3-web-mobile-only { display: none; }
.ai-h3-mobile-script-done,
.ai-h3-mobile-script-title { display: none; }
@media (max-width: 767px) {
    .ai-h3-script-modal-root { padding: 0; }
    .ai-h3-script-modal.is-notebook {
        width: 100%; max-width: 100%; height: 100%; max-height: 100%; min-height: 0;
        margin: 0; border: 0; border-radius: 0; box-shadow: none;
        padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);
        box-sizing: border-box; background: #191919;
    }
    .ai-h3-script-modal.is-notebook .ai-h3-script-modal-close { display: none; }
    .ai-h3-script-modal.is-notebook .ai-video-purple-tabbar {
        flex: 0 0 auto; min-height: 60px; padding: 8px 12px !important;
        background: #191919 !important; border-bottom: 1px solid #383838 !important;
    }
    .ai-h3-script-tabbar-row { flex-wrap: nowrap; gap: 10px; width: 100%; }
    .ai-h3-mobile-script-done {
        display: inline-flex; order: 1; align-items: center; flex: 0 0 auto; min-height: 44px;
        padding: 0 14px; border: 1px solid #5a5a5a; border-radius: 6px;
        background: #292929; color: #a4a9ff; font-size: 16px; line-height: 1; cursor: pointer;
    }
    .ai-h3-mobile-script-done:hover,
    .ai-h3-mobile-script-done:focus { border-color: #777; background: #343434; color: #c1c4ff; }
    .ai-h3-mobile-script-done:active { background: #222; transform: translateY(1px); }
    .ai-h3-mobile-script-done:focus-visible { outline: 2px solid #8991ff; outline-offset: 2px; }
    .ai-h3-script-modal .ai-h3-chaos-meter {
        order: 2; margin: 0; padding: 2px 8px; font-size: 12px; white-space: nowrap;
        color: #c7c7c7; border-color: #555; background: #252525;
    }
    .ai-h3-script-modal .ai-h3-chaos-meter.is-over { color: #ffaaa0; border-color: #a64b42; background: #3a2321; }
    .ai-h3-mobile-script-title {
        display: block; order: 3; flex: 0 0 auto; margin-left: auto;
        color: #ededed; font-size: 16px; font-weight: 600; line-height: 1.3; white-space: nowrap;
    }
    .ai-h3-script-modal.is-notebook .ai-h3-script-modal-body {
        display: block; overflow-y: auto; overflow-x: hidden; min-height: 0; padding: 18px 20px;
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
        overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch;
        background: #f7f1e2 url('/images/ai/h3-script-paper-grain.svg') repeat; background-size: 180px 180px;
    }
    .ai-h3-script-modal.is-notebook .ai-h3-script-notebook,
    .ai-h3-script-modal.is-notebook .ai-h3-script-notebook-page,
    .ai-h3-script-modal.is-notebook .ai-h3-script-spread { display: block; overflow: visible; min-height: 0; padding: 0; background: transparent; box-shadow: none; }
    .ai-h3-script-modal .ai-h3-script-notebook-coil,
    .ai-h3-script-modal .ai-h3-script-notebook-stack { display: none; }
    .ai-h3-script-modal .ai-h3-script-album { display: flex; width: 100%; gap: 12px; margin-bottom: 20px; }
    .ai-h3-script-modal .ai-h3-script-photo { flex: 1 1 0; min-width: 0; max-width: 150px; }
    .ai-h3-script-modal.is-notebook .ai-h3-web-mobile-only { display: block; }
    .ai-h3-script-modal.is-notebook .ai-h3-web-mobile-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; }
    .ai-h3-web-mobile-pager button { flex: 0 0 44px; height: 44px; border: 1px solid #cdbd9e; background: #fffdf7; color: #59452e; border-radius: 4px; }
    .ai-h3-web-mobile-pager span { min-width: 0; text-align: center; font-size: 16px; }
    .ai-h3-shot-box { padding: 14px; margin-bottom: 22px; border: 1px solid #cdbd9e; border-radius: 10px; background: #fffdf7; box-sizing: border-box; }
    .ai-h3-shot-box > :last-child { margin-bottom: 0; }
    .ai-h3-shot-box .ai-h3-script-shot-block { border-top: 0; }
    .ai-h3-script-modal.is-notebook .ai-h3-script-form .ai-h3-script-field.is-inline,
    .ai-h3-script-modal.is-notebook .ai-h3-script-shot-block .ai-h3-script-field,
    .ai-h3-script-modal.is-notebook .ai-h3-script-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin-bottom: 22px; }
    .ai-h3-script-modal.is-notebook .ai-h3-script-shot-block { display: flex; flex-direction: column; align-items: stretch; width: 100%; padding: 0; border: 0; gap: 0; }
    .ai-h3-script-modal .ai-h3-script-shot-head { order: 0; margin: 0 0 16px; }
    .ai-h3-script-modal .ai-h3-script-field.is-what { order: 5; }
    .ai-h3-script-modal .ai-h3-script-field.is-who { order: 2; }
    .ai-h3-script-modal .ai-h3-script-field.is-camera { order: 3; }
    .ai-h3-script-modal .ai-h3-script-field.is-say { order: 4; }
    .ai-h3-script-modal .ai-h3-script-field.is-caption { order: 6; }
    .ai-h3-script-modal .ai-h3-script-field.is-soundscape { order: 7; }
    .ai-h3-script-modal.is-notebook .ws-form-label { font-size: 14px; line-height: 1.5; font-weight: 600; padding: 0; margin: 0; color: #59452e; }
    .ai-h3-script-modal.is-notebook textarea.ws-prompt-textarea {
        width: 100%; max-width: 100%; min-width: 0; min-height: 108px !important; height: auto;
        box-sizing: border-box; padding: 10px 12px; border: 1px solid #cdbd9e; border-radius: 8px;
        font-size: 16px; line-height: 1.6; color: #3d2a16; background: #fffdf7; resize: vertical;
    }
    .ai-h3-script-modal.is-notebook .ai-h3-script-inline-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; width: 100%; }
    .ai-h3-script-modal.is-notebook .ai-h3-script-who-table { display: block; }
    .ai-h3-script-modal.is-notebook .ai-h3-script-who-table .ai-h3-script-who-row,
    .ai-h3-script-modal.is-notebook .ai-h3-script-say-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 8px; padding: 12px; margin-bottom: 12px; border: 1px solid #d5c6a8; border-radius: 10px; background: rgba(255,253,247,.7); }
    .ai-h3-script-modal .ai-h3-script-who-name,
    .ai-h3-script-modal .ai-h3-script-say-speaker,
    .ai-h3-script-modal .ai-h3-script-who-row textarea,
    .ai-h3-script-modal .ai-h3-script-say-row textarea { grid-column: 1 / -1; min-width: 0; }
    .ai-h3-script-modal .ai-h3-script-who-name { white-space: normal; padding: 6px 0; }
    .ai-h3-script-modal .ai-h3-character-name { white-space: normal; overflow-wrap: anywhere; }
    .ai-h3-script-modal.is-notebook .ai-h3-script-what-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; }
    .ai-h3-script-modal .ai-h3-script-what-row > .ai-h3-shot-prompt-wrap { order: -1; flex: 1 0 100%; min-width: 0; }
    .ai-h3-script-modal .ai-h3-web-camera-launcher.ai-h3-web-camera-inline-only { display: none; }
    .ai-h3-script-modal.is-notebook .ai-h3-script-assist-btn,
    .ai-h3-script-modal.is-notebook .ai-h3-character-chip,
    .ai-h3-script-modal.is-notebook .ai-h3-script-inline-body > .btn,
    .ai-h3-web-mobile-options button { min-width: 0; max-width: 100%; min-height: 44px; padding: 8px 10px; white-space: normal; overflow-wrap: anywhere; border: 1px solid #cdbd9e; border-radius: 4px; font-size: 14px; line-height: 1.5; background: #fffdf7; color: #59452e; }
    .ai-h3-script-modal.is-notebook .ai-h3-script-assist-btn.is-on,
    .ai-h3-web-mobile-options button.active { background: #79518e; border-color: #79518e; color: #fff; }
    .ai-h3-web-mobile-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .ai-h3-script-modal .ai-h3-script-notebook-footer { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 0; }
    .ai-h3-script-modal .ai-h3-script-notebook-add { min-height: 44px; width: 100%; margin: 0; }
    .ai-h3-script-modal .h3-nb-next-enter-active,
    .ai-h3-script-modal .h3-nb-next-leave-active,
    .ai-h3-script-modal .h3-nb-prev-enter-active,
    .ai-h3-script-modal .h3-nb-prev-leave-active,
    .ai-h3-script-modal .h3-nb-next-enter,
    .ai-h3-script-modal .h3-nb-next-leave-to,
    .ai-h3-script-modal .h3-nb-prev-enter,
    .ai-h3-script-modal .h3-nb-prev-leave-to { transition: none; animation: none; transform: none; opacity: 1; }
}
@media (max-width: 380px) {
    .ai-h3-script-modal.is-notebook .ai-h3-script-modal-body { padding-left: 12px; padding-right: 12px; }
    .ai-h3-script-modal.is-notebook .ai-h3-script-who-table .ai-h3-script-who-row,
    .ai-h3-script-modal.is-notebook .ai-h3-script-say-row,
    .ai-h3-web-mobile-options { grid-template-columns: minmax(0, 1fr); }
}


/* Character settings reuse the storyboard body map and its catalog cards. */
.ai-h3-character-map-editor.ai-h3-character-layer {
    width: min(96vw, calc(clamp(400px, calc(94vh - 280px), 720px) * 1.65 + 40px));
    max-width: 1100px;
    padding: 16px 20px;
    max-height: 94vh;
    overflow-y: auto;
}
.ai-h3-character-map-editor .ai-h3-character-body-stage { width: 100%; }
.ai-h3-character-map-editor .ai-h3-effect-layer-body { flex: none; overflow: visible; }
.ai-h3-character-map-editor .ai-h3-character-field textarea { min-height: 64px; }
.ai-h3-character-map-tools { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ai-h3-character-map-tools .ai-h3-assistant-search { flex: 1; min-width: 0; }
.ai-h3-character-map-tools button { flex: 0 0 auto; }
.ai-h3-body-paperdoll { position: relative; width: 100%; height: 100%; overflow: hidden; }
.ai-h3-character-body-figure .ai-h3-body-paperdoll img { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; max-width: none; object-fit: contain; }
.ai-h3-character-body-figure .ai-h3-body-paperdoll.is-outfit img {
    filter: none;
    width: 120%;
    height: 120%;
    top: -18%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translateX(-50%);
}
.ai-h3-character-body-figure .ai-h3-body-paperdoll img.ai-h3-paperdoll-cutout {
    filter: none;
    width: 120%;
    height: 120%;
    top: -18%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translateX(-50%);
    pointer-events: none;
}
.ai-h3-character-map-editor.is-paperdoll .ai-h3-character-body-figure { aspect-ratio: 2 / 3; width: auto; }
.ai-h3-character-map-editor .ai-h3-wardrobe-hint { margin: 0 0 10px; padding: 0; border: 0; background: none; color: #aaa; font-size: 12px; line-height: 1.5; }
.ai-h3-character-map-editor .ai-h3-character-body-map { height: auto; aspect-ratio: 1.65 / 1; --h3-body-box-h: 24px; }
.ai-h3-character-map-editor .ai-h3-character-body-figure { height: 96%; z-index: 1; }
.ai-h3-character-map-editor .ai-h3-body-slot { z-index: 2; }
.ai-h3-character-map-editor .ai-h3-body-box { font-size: 13px; }
.ai-h3-character-map-editor .ai-h3-body-slot--head-hair-style { --body-box-y: 2%; --body-pin-y: 7.95%; }
.ai-h3-character-map-editor .ai-h3-body-slot--head-eyes { --body-box-y: 8%; --body-pin-y: 11.79%; }
.ai-h3-character-map-editor .ai-h3-body-slot--head-ear { --body-box-y: 14%; --body-pin-y: 13.52%; }
.ai-h3-character-map-editor .ai-h3-body-slot--head-expression { --body-box-y: 20%; --body-pin-y: 14.29%; }
.ai-h3-character-map-editor .ai-h3-body-slot--costume-neck { --body-box-y: 26%; --body-pin-y: 18.32%; }
.ai-h3-character-map-editor .ai-h3-body-slot--body-breast-size { --body-box-y: 34%; --body-pin-y: 27.92%; }
.ai-h3-character-map-editor .ai-h3-body-slot--body-breast { --body-box-y: 38%; --body-pin-y: 29.36%; }
.ai-h3-character-map-editor .ai-h3-body-slot--costume-sleeve { --body-box-y: 44%; --body-pin-y: 36.56%; }
.ai-h3-character-map-editor .ai-h3-body-slot--costume-upper { --body-box-y: 52%; --body-pin-y: 38.48%; }
.ai-h3-character-map-editor .ai-h3-body-slot--body-hand-posture { --body-box-y: 56%; --body-pin-y: 55.28%; }
.ai-h3-character-map-editor .ai-h3-body-slot--body-crotch { --body-box-y: 64%; --body-pin-y: 58.45%; }
.ai-h3-character-map-editor .ai-h3-body-slot--costume-feet { --body-box-y: 84%; --body-pin-y: 93.49%; }
.ai-h3-character-map-editor .ai-h3-body-slot--costume-head { --body-box-y: 2%; --body-pin-y: 7.28%; }
.ai-h3-character-map-editor .ai-h3-body-slot--head-posture { --body-box-y: 8.4%; --body-pin-y: 13.04%; }
.ai-h3-character-map-editor .ai-h3-body-slot--head-mouth { --body-box-y: 14.8%; --body-pin-y: 15.63%; }
.ai-h3-character-map-editor .ai-h3-body-slot--costume-shoulder { --body-box-y: 18%; --body-pin-y: 23.41%; }
.ai-h3-character-map-editor .ai-h3-body-slot--body-back { --body-box-y: 26%; --body-pin-y: 26.48%; }
.ai-h3-character-map-editor .ai-h3-body-slot--costume-chest { --body-box-y: 34%; --body-pin-y: 30.32%; }
.ai-h3-character-map-editor .ai-h3-body-slot--costume-waist { --body-box-y: 42%; --body-pin-y: 42.32%; }
.ai-h3-character-map-editor .ai-h3-body-slot--costume-lower { --body-box-y: 50%; --body-pin-y: 59.41%; }
.ai-h3-character-map-editor .ai-h3-body-slot--costume-leg { --body-box-y: 62%; --body-pin-y: 76.88%; }
.ai-h3-character-map-editor .ai-h3-body-lead-h1 { top: calc(var(--body-box-y) + var(--h3-body-box-h) / 2); }
.ai-h3-character-map-editor .ai-h3-body-lead-v { top: min(calc(var(--body-box-y) + var(--h3-body-box-h) / 2), var(--body-pin-y)); height: max(calc(var(--body-pin-y) - var(--body-box-y) - var(--h3-body-box-h) / 2), calc(var(--body-box-y) + var(--h3-body-box-h) / 2 - var(--body-pin-y))); }
.ai-h3-character-map-editor .ai-h3-body-lead-h2, .ai-h3-character-map-editor .ai-h3-body-pin { top: var(--body-pin-y); }
.ai-h3-character-map-editor.is-paperdoll .ai-h3-body-slot--head-ear { --body-pin-y: 17%; }
.ai-h3-character-map-editor.is-paperdoll .ai-h3-body-slot--costume-neck { --body-pin-y: 23%; }
.ai-h3-character-map-editor.is-paperdoll .ai-h3-body-slot--costume-upper { --body-pin-y: 40%; }
.ai-h3-character-map-editor.is-paperdoll .ai-h3-body-slot--costume-lower { --body-pin-y: 54%; }
.ai-h3-character-map-editor.is-paperdoll .ai-h3-body-slot--costume-leg { --body-pin-y: 76%; }
.ai-h3-character-map-editor.is-paperdoll .ai-h3-body-slot--costume-feet { --body-pin-y: 94%; }

.ai-h3-character-map-editor .ai-h3-body-box-cat, .ai-h3-character-map-editor .ai-h3-body-box-chip { font-size: 13px; }

.ai-h3-character-meta { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; align-items: end; }
.ai-h3-character-header { display: flex; align-items: center; gap: 16px; padding-right: 32px; margin-bottom: 12px; }
.ai-h3-character-header .ai-h3-camera-layer-title { margin: 0; flex: 1; min-width: 0; }
.ai-h3-character-header-voice { display: flex; align-items: center; gap: 8px; }
.ai-h3-character-header-voice .ai-h3-character-field-label { margin: 0; white-space: nowrap; }
.ai-h3-character-header-voice .ai-h3-delivery-select { width: 140px; }
.ai-h3-character-map-editor .ai-h3-body-slot:not(.ai-h3-body-slot-stack) .ai-h3-body-box { top: var(--body-box-y); max-width: 28%; }
.ai-h3-character-map-editor .ai-h3-character-actions { position: sticky; bottom: -16px; z-index: 30; padding: 8px 0; margin: 0; background: #272727; }
.ai-h3-character-map-editor { overflow-anchor: none; }
.ai-h3-character-map-editor .ai-h3-body-box-cat { gap: 4px; }
.ai-h3-character-map-editor.is-paperdoll .ai-h3-body-slot--head-ear .ai-h3-body-pin { left: 45.5%; }
.ai-h3-character-map-editor.is-paperdoll .ai-h3-body-slot--head-ear .ai-h3-body-lead-h2 { width: 23.6%; }
@media (max-width: 767px) {
    .ai-h3-character-meta { grid-template-columns: 1fr 1fr; }
    .ai-h3-character-header { flex-wrap: wrap; gap: 8px; }
    .ai-h3-character-header-voice .ai-h3-delivery-select { width: 110px; }
}

.ai-h3-body-selection-label { display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-h3-default-outfit-card { font: inherit; color: inherit; padding: 0; text-align: center; }
.ai-h3-default-outfit-card .ai-h3-default-outfit-description { display: flex; align-items: center; justify-content: center; padding: 8px; font-size: 12px; line-height: 1.5; white-space: normal; background: #252030; color: #ddd; }

/* 全剧换人沿用选人卡片，限制弹层高度以保证小屏可操作。 */
.ai-h3-cast-swap-layer {
    max-width: 620px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    color: var(--ws-text, #eee);
}
.ai-h3-cast-swap-layer .ai-h3-character-pick-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ai-h3-cast-swap-layer .ai-h3-character-chip {
    white-space: normal;
    overflow-wrap: anywhere;
}

.ai-h3-character-pick-row { display: flex; align-items: stretch; gap: 8px; }
.ai-h3-character-pick-row > .ai-h3-character-card:first-child { flex: 1; min-width: 0; }
.ai-h3-character-pick-row > .ai-h3-character-pick-replace { width: auto; flex: 0 0 auto; }
.ai-h3-character-replace-hint { margin: 12px 0 0; color: var(--ws-text-muted, #aaa); font-size: 13px; }

/* Compact character library; detailed actions live in the manager. */
.ai-h3-library-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ai-h3-library-toolbar .ws-section-title { margin-right: auto; }
.ai-h3-library-layer { width: calc(100vw - 32px); max-width: 760px; max-height: calc(100vh - 48px); overflow-y: auto; color: var(--ws-text, #eee); }
.ai-h3-library-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--ws-border, #444); }
.ai-h3-library-row .ai-h3-library-identity { flex: 1; min-width: 0; width: auto; padding: 6px 8px; border: 0; background: transparent; }
.ai-h3-library-identity .ai-h3-character-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-h3-library-status { font-size: 12px; }
.ai-h3-library-row > .btn { flex-shrink: 0; }
@media (max-width: 575px) {
    .ai-h3-cast-swap-layer .ai-h3-character-pick-list { grid-template-columns: 1fr; }
    .ai-h3-library-row { flex-wrap: wrap; }
    .ai-h3-library-row .ai-h3-library-identity { flex-basis: calc(100% - 100px); }
    .ai-h3-library-status { margin-right: auto; }
}
.ai-h3-library-status span { display: block; }

/* Portrait edits share the same draft and option panel as the landscape body map. */
.ai-h3-portrait-editor { display: none; }
.ai-h3-portrait-workspace { display: contents; }
@media (max-width: 767px) and (orientation: landscape) {
    .ai-h3-character-map-editor .ai-h3-character-body-board { display: flex; }
    .ai-h3-character-map-editor .ai-h3-character-assistant-list { display: none; }
}
@media (max-width: 767px) and (orientation: portrait) {
    .ai-h3-character-male-outline {
        flex: none;
        min-height: 0;
        height: clamp(170px, 32vh, 290px);
        background: #101014;
        border-radius: 12px;
        overflow: hidden;
    }
    .ai-h3-character-editor-root { padding: 0; }
    .ai-h3-camera-layer.ai-h3-character-map-editor { width: 100%; max-width: none; height: 100%; max-height: 100%; padding: 12px; border-radius: 0; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; }
    .ai-h3-character-map-editor .ai-h3-character-header { flex: none; margin-bottom: 8px; gap: 6px; }
    .ai-h3-character-map-editor .ai-h3-camera-layer-title { font-size: 15px; }
    .ai-h3-character-map-editor .ai-h3-character-header-voice { gap: 4px; font-size: 12px; }
    .ai-h3-character-map-editor .ai-h3-character-header-voice .ai-h3-delivery-select { width: 82px; }
    .ai-h3-character-map-editor .ai-h3-delivery-select-btn { padding: 6px 18px 6px 8px; font-size: 13px; min-height: 32px; }
    .ai-h3-character-map-editor .ai-h3-character-map-tools { gap: 8px; margin-bottom: 6px; flex: none; }
    .ai-h3-character-map-editor .ai-h3-character-map-tools button { font-size: 11px; padding: 8px; }
    .ai-h3-character-map-editor .ai-h3-assistant-search { font-size: 12px; padding: 8px; }
    .ai-h3-character-map-editor .ai-h3-wardrobe-hint { font-size: 11px; margin-bottom: 6px; }
    .ai-h3-portrait-workspace { display: flex; flex-direction: column; flex: 1 0 auto; min-height: calc(clamp(170px, 32vh, 290px) + 320px); }
    .ai-h3-portrait-editor { display: block; flex: none; }
    .ai-h3-portrait-preview { height: clamp(170px, 32vh, 290px); display: flex; align-items: center; background: #101014; border-radius: 12px; overflow: hidden; }
    .ai-h3-portrait-figure { position: relative; height: 100%; aspect-ratio: 2 / 3; flex: none; }
    .ai-h3-portrait-figure .ai-h3-body-paperdoll img { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; max-width: none; object-fit: contain; }
    .ai-h3-portrait-figure .ai-h3-body-paperdoll:not(.is-outfit) img:not(.ai-h3-paperdoll-cutout) { filter: invert(1); }
    .ai-h3-portrait-figure .ai-h3-body-paperdoll.is-outfit img,
    .ai-h3-portrait-figure .ai-h3-body-paperdoll img.ai-h3-paperdoll-cutout {
        filter: none;
        width: 120%;
        height: 120%;
        top: -18%;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translateX(-50%);
    }
    .ai-h3-portrait-figure .ai-h3-body-paperdoll img.ai-h3-paperdoll-cutout {
        pointer-events: none;
    }
    .ai-h3-portrait-outline { width: 100%; height: 100%; object-fit: contain; filter: invert(1); }
    .ai-h3-portrait-pin { position: absolute; top: var(--body-pin-y, 50%); left: 50%; width: 24px; height: 24px; border-radius: 50%; transform: translate(-50%, -50%); border: 0; padding: 0; background: transparent; }
    .ai-h3-portrait-pin span { display: block; margin: auto; width: 9px; height: 9px; border-radius: 50%; background: #9b7dff; border: 1px solid #fff; box-shadow: 0 0 0 3px #7c5cff33; }
    .ai-h3-portrait-pin.is-active span { width: 13px; height: 13px; box-shadow: 0 0 0 6px #7c5cff66; }
    .ai-h3-portrait-pin.ai-h3-body-slot--costume-head { left: 65%; }
    .ai-h3-portrait-pin.ai-h3-body-slot--head-ear { left: 32%; }
    .ai-h3-portrait-pin.ai-h3-body-slot--costume-shoulder { left: 62%; top: 23%; }
    .ai-h3-portrait-pin.ai-h3-body-slot--body-back { left: 83%; }
    .ai-h3-portrait-pin.ai-h3-body-slot--body-breast-size { left: 37%; }
    .ai-h3-portrait-pin.ai-h3-body-slot--costume-chest { left: 64%; }
    .ai-h3-portrait-pin.ai-h3-body-slot--costume-upper { top: 32%; }
    .ai-h3-portrait-pin.ai-h3-body-slot--costume-sleeve { left: 32%; }
    .ai-h3-portrait-selection { flex: 1; min-width: 0; padding: 8px; max-height: 100%; overflow-y: auto; overflow-x: hidden; }
    .ai-h3-portrait-selection strong { display: block; font-size: 12px; color: #b7a7ed; margin-bottom: 6px; }
    .ai-h3-portrait-selection button { display: block; width: 100%; text-align: left; white-space: normal; overflow-wrap: anywhere; color: #ddd; background: transparent; border: 1px solid transparent; border-radius: 7px; padding: 7px 5px; font-size: 11px; line-height: 1.4; }
    .ai-h3-portrait-selection button.is-active { background: #7c5cff26; border-color: #7c5cff; }
    .ai-h3-portrait-selection p { font-size: 10px; color: #aaa; margin: 8px 0 0; }
    .ai-h3-portrait-tabs { display: flex; margin: 8px 0 6px; border-bottom: 1px solid #444; }
    .ai-h3-portrait-tabs button { flex: 1; color: #aaa; background: transparent; border: 1px solid transparent; border-radius: 6px 6px 0 0; margin-bottom: -1px; padding: 9px 4px; font-size: 13px; }
    .ai-h3-portrait-tabs button.is-active { color: #e5ddff; background: #353044; border-color: #78649d #78649d #353044; }
    .ai-h3-portrait-tabs .ai-h3-portrait-expand { flex: 0 0 36px; }
    .ai-h3-portrait-editor button:focus { outline: none; box-shadow: none; }
    .ai-h3-portrait-editor button:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
    .ai-h3-portrait-pin:focus-visible span { box-shadow: 0 0 0 3px #101014, 0 0 0 5px #e5ddff; }
    .ai-h3-portrait-parts { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 8px; }
    .ai-h3-portrait-parts button { flex: 0 1 auto; min-width: 0; max-width: 100%; overflow-wrap: anywhere; border: 1px solid #555; border-radius: 16px; background: transparent; color: #ccc; padding: 6px 10px; font-size: 12px; }
    .ai-h3-portrait-parts button.is-active { background: #7c5cff33; border-color: #9b7dff; color: #eee; }
    .ai-h3-character-map-editor.is-searching .ai-h3-body-box-layer,
    .ai-h3-character-map-editor .ai-h3-character-assistant-list,
    .ai-h3-character-map-editor .ai-h3-body-box-layer-arrow { display: none; }
    .ai-h3-character-map-editor .ai-h3-effect-layer-body.is-body-map { display: none; }
    .ai-h3-character-map-editor .ai-h3-effect-layer-body:not(.is-body-map) { flex: 1; min-height: 0; overflow-y: auto; }
    .ai-h3-character-map-editor .ai-h3-body-box-layer { position: relative; flex: 1; min-height: 0; width: 100%; padding: 8px; box-shadow: none; border-radius: 10px; background: #202024; }
    .ai-h3-character-map-editor .ai-h3-body-box-layer-body { flex: 1; overflow-y: auto; min-height: 160px; max-height: 40vh; }
    .ai-h3-character-map-editor .ai-h3-body-box-layer-grid { flex: 0 0 auto; overflow: visible; min-height: 0; max-height: none; }
    .ai-h3-character-map-editor .ai-h3-character-actions { position: sticky; bottom: -12px; z-index: 5; flex: none; padding: 8px 0; background: #262626; }
    .ai-h3-character-map-editor .ai-h3-character-actions button { min-height: 36px; }
    .ai-h3-character-map-editor.is-options-expanded .ai-h3-portrait-workspace { min-height: 400px; }
    .ai-h3-character-map-editor.is-options-expanded .ai-h3-portrait-preview { height: 80px; }
    .ai-h3-character-map-editor.is-options-expanded .ai-h3-portrait-selection button,
    .ai-h3-character-map-editor.is-options-expanded .ai-h3-portrait-pin { display: none; }
}

/* Character training status; independent of voice selection. */
.ai-h3-trained-badge {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    align-self: center;
    margin: 0;
    padding: 3px 6px;
    border: 1px solid #317468;
    border-radius: 4px;
    background: #e4f3ef;
    color: #20594f;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
}
.ai-h3-trained-badge i { margin-right: 4px; }
.ai-h3-trained-intro { flex: none; color: var(--ws-text-dim, #999); font-size: 12px; line-height: 1.5; margin: 0 0 8px; }

/* Keep training status in the card's layout so it cannot cover name or voice. */
.ai-h3-character-card { min-width: 0; max-width: 100%; }
.ai-h3-character-card > .ai-h3-trained-badge { margin-left: auto; }
.tooltip.ai-h3-trained-tooltip { z-index: 1130; }
