.editor-card form {
    display: grid;
    gap: 0.9rem;
}

.editor-tabs {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    padding: 0.3rem;
    border-radius: 8px;
    background: #e2e8f0;
}

.tab-button {
    min-height: 38px;
    border: 0;
    border-radius: 8px;
    color: var(--muted);
    background: transparent;
    font-weight: 900;
}

.tab-button.active {
    color: var(--purple-dark);
    background: var(--white);
    box-shadow: 0 8px 20px rgba(30, 41, 59, 0.08);
}

.editor-grid {
    display: grid;
    gap: 0.8rem;
}

.code-panel,
.preview-panel {
    display: grid;
    gap: 0.45rem;
    font-weight: 900;
}

.code-panel textarea {
    width: 100%;
    min-height: 170px;
    resize: vertical;
    padding: 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #dbeafe;
    background: #0f172a;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.95rem;
    line-height: 1.45;
    tab-size: 2;
}

.code-panel textarea:focus {
    border-color: var(--yellow);
    outline: 3px solid rgba(250, 204, 21, 0.24);
}

.preview-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.preview-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    min-height: 44px;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
}

.preview-heading small {
    color: var(--muted);
}

#live-preview {
    width: 100%;
    min-height: 260px;
    border: 0;
    background: var(--white);
}

.editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

@media (max-width: 700px) {
    .editor-tabs {
        display: grid;
    }

    .editor-pane {
        display: none;
    }

    .editor-pane.active {
        display: grid;
    }

    .code-panel textarea,
    #live-preview {
        min-height: 310px;
    }

    .editor-actions .button {
        flex: 1 1 100%;
    }
}
