/* Short-drama workflow heading loaded after the global theme.
   It deliberately uses independent classes so generic tab/card themes cannot
   turn the heading into an interactive blue card. */
#testdrama .td-single-page-workspace #tdImportNovelHeading {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 720px);
    justify-content: center;
    margin: 10px 0 72px;
}

#testdrama .td-single-page-workspace .td-import-novel-title {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 12px 32px 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

#testdrama .td-single-page-workspace .td-import-novel-title::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.82) 22%, rgba(34, 197, 94, 0.82) 78%, transparent);
}

#testdrama .td-single-page-workspace .td-import-novel-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #f8fafc;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.3;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

#testdrama .td-single-page-workspace .td-import-novel-main > i {
    color: #7dd3fc;
    font-size: 15px;
}

#testdrama .td-single-page-workspace .td-import-novel-number {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    color: #67e8f9;
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
}

#testdrama .td-single-page-workspace .td-import-novel-arrow {
    position: absolute;
    left: 50%;
    bottom: -54px;
    z-index: 2;
    width: 48px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #67e8f9;
    font-size: 28px;
    line-height: 1;
    filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.42));
    pointer-events: none;
    transform: translateX(-50%);
}

@media (max-width: 520px) {
    #testdrama .td-single-page-workspace .td-import-novel-title {
        padding-right: 12px;
        padding-left: 12px;
    }
}

/* Fixed script cards with an independently anchored create button. */
#testdrama .td-single-page-workspace .td-project-list-layout {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 64px;
    align-items: stretch;
    gap: 12px;
}

#testdrama .td-single-page-workspace .td-project-list-layout #tdProjectList {
    width: 100%;
    min-width: 0;
}

#testdrama .td-single-page-workspace .td-project-list-layout #tdProjectList .td-project-tab {
    flex: 0 0 280px;
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    box-sizing: border-box;
}

#testdrama .td-single-page-workspace .td-project-list-layout > .td-project-tab-add {
    width: 64px;
    min-width: 64px;
    max-width: 64px;
    min-height: 50px;
    margin: 0;
    justify-self: end;
}

#testdrama .td-single-page-workspace .td-project-list-layout > .td-project-tab-add[hidden] {
    display: none;
}

/* Preserve the storyboard frame before a script/storyboard exists. */
#testdrama .td-single-page-workspace #tdShotPromptList.is-empty,
#testdrama .td-single-page-workspace #tdStoryboardList.is-empty {
    display: grid;
    min-height: 360px;
}

#testdrama .td-single-page-workspace .td-storyboard-card--empty {
    width: 100%;
    min-height: 360px;
    box-sizing: border-box;
    pointer-events: none;
}

/* Major translucent sections share the storyboard card's cyan-to-green rail. */
#testdrama .td-single-page-workspace #tdProjectManager,
#testdrama .td-single-page-workspace #tdSecondaryDetailSwitcher,
#testdrama .td-single-page-workspace #tdVideoGenerationFrame {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

#testdrama .td-single-page-workspace #tdProjectManager::before,
#testdrama .td-single-page-workspace #tdSecondaryDetailSwitcher::before,
#testdrama .td-single-page-workspace #tdVideoGenerationFrame::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 3;
    width: 4px;
    border-radius: inherit;
    background: linear-gradient(180deg, #38bdf8, #22c55e);
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.28);
    pointer-events: none;
}

/* Translucent frame around the complete asset-detail tab group. */
#testdrama .td-single-page-workspace #tdSecondaryDetailSwitcher {
    width: 100%;
    box-sizing: border-box;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.018);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

/* One translucent outer frame around video settings and shot selection. */
#testdrama .td-single-page-workspace #tdVideoGenerationFrame {
    width: 100%;
    box-sizing: border-box;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.018);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

#testdrama .td-single-page-workspace #tdVideoGenerationFrame > #tdStoryboardList {
    margin-bottom: 0;
}

/* Generate Video uses the same numbered workflow heading and arrow treatment. */
#testdrama .td-single-page-workspace #tdVideoDetailTab {
    position: relative;
    min-height: 72px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 10px auto 72px;
    padding: 12px 32px 14px;
}

#testdrama .td-single-page-workspace #tdVideoDetailTab .td-detail-tab-main {
    font-size: 18px;
    letter-spacing: 0.02em;
}

#testdrama .td-single-page-workspace #tdVideoDetailTab .td-workflow-step-number {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    margin-right: 2px;
    color: #67e8f9;
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
}

#testdrama .td-single-page-workspace #tdVideoDetailTab .td-workflow-down-arrow {
    position: absolute;
    left: 50%;
    bottom: -54px;
    z-index: 2;
    width: 48px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #67e8f9;
    font-size: 28px;
    line-height: 1;
    filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.42));
    pointer-events: none;
    transform: translateX(-50%);
}
