.ta-layout {
    gap: 2.5rem;
}

.ta-editor {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 2.5rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ta-editor-form {
    flex: 1 1 320px;
    max-width: 520px;
}

.ta-step {
    border-left: 3px solid #e5e7eb;
    padding-left: 0.75rem;
    margin-bottom: 1.5rem;
}

.ta-step-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: #111827;
}

.ta-two-cols {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ta-field {
    display: block;
    margin-bottom: 1rem;
    flex: 1 1 140px;
}

.ta-field span {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
    color: #4b5563;
}

.ta-field input[type="text"],
.ta-field textarea,
.ta-field select {
    width: 100%;
    box-sizing: border-box;
    padding: 0.55rem 0.7rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font: inherit;
    background: #fff;
}

.ta-field input[type="text"]:focus,
.ta-field textarea:focus,
.ta-field select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37,99,235,0.2);
}

.ta-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.ta-editor-form button#ta-save {
    display: inline-flex;
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font: inherit;
    background: #111827;
    color: #fff;
    font-weight: 500;
    box-shadow: 0 10px 15px -3px rgba(15,23,42,0.2);
    transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.2s;
}

.ta-editor-form button#ta-save:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 15px 25px -5px rgba(15,23,42,0.25);
}

.ta-editor-form button#ta-save:disabled {
    opacity: 0.6;
    cursor: default;
    box-shadow: none;
}

.ta-message {
    margin-top: 0.25rem;
    font-size: 0.85rem;
}

.ta-message--info {
    color: #4b5563;
}

.ta-message--success {
    color: #15803d;
}

.ta-message--error {
    color: #b91c1c;
}

/* Hintergrund-Auswahl */
.ta-backgrounds {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ta-background-option {
    border: 1px solid #d1d5db;
    padding: 0.25rem;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s;
}

.ta-background-option--active {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37,99,235,0.2);
    transform: translateY(-1px);
}

.ta-background-thumb {
    width: 100%;
    padding-top: 60%;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    margin-bottom: 0.25rem;
}

.ta-background-label {
    font-size: 0.7rem;
    text-align: center;
    color: #374151;
}

.ta-editor-preview {
    flex: 1 1 280px;
    min-width: 280px;
    border-radius: 12px;
    padding: 1.25rem;
    background: radial-gradient(circle at top left, #eff6ff, #f9fafb);
    box-shadow: 0 10px 25px -10px rgba(15,23,42,0.2);
}

.ta-editor-preview h3 {
    margin-top: 0;
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
    color: #111827;
}

.ta-preview-hint {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: #6b7280;
}

/* Karte der Vorschau */
.ta-preview-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #f9fafb;
    min-height: 260px;
}

.ta-preview-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.35;
    filter: grayscale(0.1);
}

.ta-preview-inner {
    position: relative;
    padding: 1.5rem 1.75rem;
    min-height: 260px;
    backdrop-filter: blur(4px);
    background: linear-gradient(to bottom, rgba(249,250,251,0.6), rgba(249,250,251,0.25));
}

.ta-preview--border-simple {
    box-shadow: 0 0 0 1px rgba(15,23,42,0.4);
}

.ta-preview--border-double {
    box-shadow:
        0 0 0 1px rgba(15,23,42,0.7),
        0 0 0 4px rgba(249,250,251,0.9),
        0 0 0 6px rgba(15,23,42,0.7);
}

.ta-preview--border-none {
    box-shadow: none;
}

/* Schrift-Stile */
.ta-preview--font-serif {
    font-family: "Times New Roman", "Georgia", serif;
}

.ta-preview--font-sans {
    font-family: "Helvetica Neue", "Arial", sans-serif;
}

.ta-preview-name {
    margin: 0 0 0.75rem;
    font-size: 1.6rem;
    color: #111827;
}

.ta-preview-line {
    margin: 0;
    font-size: 0.95rem;
    color: #374151;
}

.ta-preview-ort {
    margin-bottom: 0.5rem;
}

.ta-preview-trauerspruch {
    font-style: italic;
    margin-bottom: 0.5rem;
}

.ta-preview-einleitung {
    margin-bottom: 0.5rem;
}

.ta-preview-wohnort {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #4b5563;
}

/* Bild in Vorschau */
.ta-preview-image {
    margin: 0.5rem 0 0.75rem;
    display: flex;
    justify-content: center;
}

.ta-preview-image img {
    max-width: 250px;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    display: block;
    box-shadow: 0 10px 20px -8px rgba(15,23,42,0.35);
}

/* Bild-Platzhalter */
.ta-preview-image--placeholder {
    width: 250px;
    max-width: 100%;
    height: 150px;
    border-radius: 12px;
    border: 1px dashed #d1d5db;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 0.85rem;
    background: rgba(249,250,251,0.8);
}

/* Responsive */


    .ta-editor-form,
    .ta-editor-preview {
        max-width: 100%;
    }

    .ta-editor-preview {
        margin-top: 1.5rem;
    }
}

    .ta-editor-form,
    .ta-editor-preview {
        max-width: 100%;
    }

    .ta-editor-preview {
        order: -1;
        margin-bottom: 1.5rem;
    }
}


.ta-editor-form,
.ta-editor-preview {
    flex: 0 0 50%;
    max-width: 50%;
}

@media (max-width: 700px) {
    .ta-editor {
        gap: 1rem;
    }
    .ta-editor-form,
    .ta-editor-preview {
        flex: 0 0 50%;
        max-width: 50%;
    }
}


.ta-editor-preview {
    order: 0;
}

.ta-editor-form {
    order: 1;
}


.ta-editor-form {
    order: 0; /* Editor links */
}

.ta-editor-preview {
    order: 1; /* Vorschau rechts */
}


.ta-preview-card {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Motiv-Auswahl (Kreuz, Kerze, Herz, ...) */
.ta-motifs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ta-motif-option {
    border: 1px solid #d1d5db;
    padding: 0.25rem;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s;
}

.ta-motif-option img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    margin-bottom: 0.25rem;
}

.ta-motif-option--active {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37,99,235,0.2);
    transform: translateY(-1px);
}

.ta-motif-label {
    font-size: 0.7rem;
    text-align: center;
    color: #374151;
}
