.ct-stage-builder {
    --ct-ink: #17202a;
    --ct-muted: #61707f;
    --ct-line: #d8dee6;
    --ct-panel: #ffffff;
    --ct-soft: #f4f6f8;
    --ct-accent: #1f7a6b;
    --ct-accent-dark: #16574d;
    color: var(--ct-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ct-builder-shell {
    display: grid;
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
    min-height: 720px;
    border: 1px solid var(--ct-line);
    background: var(--ct-soft);
}

.ct-builder-panel {
    min-width: 0;
}

.ct-builder-input {
    border-right: 1px solid var(--ct-line);
    background: var(--ct-panel);
    padding: 18px;
}

.ct-builder-preview {
    display: flex;
    flex-direction: column;
}

.ct-field {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.ct-field label {
    font-size: 13px;
    font-weight: 700;
    color: var(--ct-muted);
}

.ct-field input,
.ct-field textarea {
    width: 100%;
    border: 1px solid var(--ct-line);
    border-radius: 6px;
    background: #ffffff;
    color: var(--ct-ink);
    font: inherit;
}

.ct-field input {
    min-height: 42px;
    padding: 8px 10px;
}

.ct-field textarea {
    min-height: 590px;
    padding: 12px;
    resize: vertical;
    line-height: 1.45;
}

.ct-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--ct-line);
    background: #ffffff;
}

.ct-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ct-options label {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    font-size: 13px;
    color: var(--ct-muted);
    white-space: nowrap;
}

.ct-download {
    min-height: 40px;
    border: 0;
    border-radius: 6px;
    padding: 0 14px;
    background: var(--ct-accent);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.ct-download:hover,
.ct-download:focus {
    background: var(--ct-accent-dark);
}

.ct-summary {
    padding: 10px 16px;
    border-bottom: 1px solid var(--ct-line);
    color: var(--ct-muted);
    font-size: 13px;
    background: #fbfcfd;
}

.ct-cue-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 16px;
    overflow: auto;
    list-style: none;
}

.ct-cue {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--ct-line);
    border-radius: 8px;
    background: #ffffff;
}

.ct-cue-number {
    font-weight: 800;
    color: var(--ct-accent-dark);
}

.ct-cue-character {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 800;
}

.ct-cue-lines {
    margin: 0;
    color: var(--ct-ink);
    white-space: pre-wrap;
}

@media (max-width: 820px) {
    .ct-builder-shell {
        grid-template-columns: 1fr;
    }

    .ct-builder-input {
        border-right: 0;
        border-bottom: 1px solid var(--ct-line);
    }

    .ct-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .ct-download {
        width: 100%;
    }
}

