* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --accent: #7c3aed;
    --accent-light: #a78bfa;
    --accent-subtle: #5b21b6;
    --accent-indigo: #6366f1;
    --bg: #09090b;
    --bg-card: #131316;
    --bg-card-hover: #1a1a20;
    --bg-input: #111114;
    --border: #2a2a35;
    --border-light: #3a3a45;
    --text: #e0e0e0;
    --text-muted: #888;
    --text-dim: #555;
    --white: #ffffff;
    --red: #e55;
    --red-bg: #1f1010;
    --green: #4a4;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Navbar ── */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 2rem;
    background: #0c0c0e;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-icon { font-size: 1rem; }

.nav-links { display: flex; gap: 1.5rem; }

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover { color: var(--white); }

/* ── Layout ── */
.container {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    flex: 1;
}

.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-dim);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
}

/* ── Page Header ── */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-family: 'DM Sans', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ── Cards ── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.05);
}

/* ── Forms ── */
.form-group { margin-bottom: 1rem; }

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--white);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.optional { color: var(--text-dim); font-weight: 400; font-size: 0.8rem; }

.transcript-toggle { text-align: center; margin: 0.5rem 0; }

.text-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
    padding: 0.3rem 0.6rem;
    transition: color 0.2s;
}

.text-btn:hover { color: var(--accent); }

/* ── Buttons ── */
.btn-primary {
    display: inline-block;
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
    text-align: center;
    text-decoration: none;
}

.btn-primary:hover {
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
    transform: translateY(-1px);
}
.btn-sm { width: auto; padding: 0.5rem 1.2rem; font-size: 0.85rem; }

.btn-secondary {
    padding: 0.6rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger {
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: 1px solid #522;
    border-radius: 8px;
    color: #c66;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover { background: var(--red-bg); border-color: #833; }

/* ── Progress ── */
.progress-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-light);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

#progress-message { color: var(--text); font-size: 0.95rem; }
.progress-sub { color: var(--text-dim); font-size: 0.8rem; margin-top: 0.2rem; }

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366f1, #7c3aed);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* ── Error ── */
.error-card { border-color: #522; background: var(--red-bg); }
.error-card p { color: var(--red); margin-bottom: 1rem; }

/* ── Sermon Cards / Grid ── */
.sermon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.sermon-card-link { text-decoration: none; }

.sermon-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 2px solid transparent;
    border-radius: 10px;
    padding: 1.25rem;
    transition: all 0.2s;
    position: relative;
}

.sermon-card:hover {
    border-color: rgba(124, 58, 237, 0.3);
    border-top: 2px solid #7c3aed;
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.1);
}

.sermon-card h3 {
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.sermon-card-meta {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.sermon-card-status {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.status-complete { background: #1a2e1a; color: var(--green); }
.status-processing { background: rgba(124, 58, 237, 0.12); color: var(--accent-light); animation: pulse 2s infinite; }
.status-error { background: var(--red-bg); color: var(--red); }
.status-pending { background: rgba(124, 58, 237, 0.08); color: #9f8abf; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

.source-badge {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-dim);
    background: #151518;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
}

.recent-section { margin-top: 2rem; }
.recent-section h2 { font-size: 1.1rem; color: var(--white); margin-bottom: 1rem; }

.view-all-link {
    display: inline-block;
    color: var(--accent-light);
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    transition: color 0.2s;
}

.view-all-link:hover { text-decoration: underline; color: var(--accent); }

/* ── Archive ── */
.archive-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 0.65rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--white);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.15);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state h2 { color: var(--white); margin-bottom: 0.5rem; }
.empty-state p { margin-bottom: 1.5rem; }
.empty-state .btn-primary { width: auto; }

/* ── Sermon Detail Header ── */
.sermon-header {
    margin-bottom: 2rem;
}

.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 0.75rem;
    transition: color 0.2s;
}

.back-link:hover { color: var(--accent-light); }

.sermon-header h1 {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.8rem;
    color: var(--white);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.sermon-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.source-link {
    color: var(--accent-light);
    text-decoration: none;
    font-size: 0.85rem;
    margin-left: 0.5rem;
    transition: color 0.2s;
}

.source-link:hover { text-decoration: underline; color: var(--accent); }

/* ── Content Calendar ── */
.content-calendar {
    margin-bottom: 1.5rem;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}
.calendar-header h3 {
    font-size: 1rem;
    color: var(--white);
    margin-bottom: 0.25rem;
}
.calendar-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.calendar-actions .btn-secondary {
    text-decoration: none;
}
.cal-custom-badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.15rem 0.55rem;
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid var(--accent);
    color: var(--accent-light);
    font-size: 0.65rem;
    border-radius: 100px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    vertical-align: middle;
}

/* ── Calendar display grid (day cards with stacked items) ── */
.calendar-display-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.6rem;
    margin-top: 0.5rem;
}
.cal-day-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.cal-day-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.4rem;
}
.cal-day-head .cal-day-name {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.cal-day-head .cal-date {
    color: var(--text-muted);
    font-size: 0.72rem;
}
.cal-day-items {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.cal-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0.55rem;
    background: rgba(124, 58, 237, 0.06);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}
.cal-item:hover {
    background: rgba(124, 58, 237, 0.12);
    border-color: var(--accent-light);
}
.cal-item-icon {
    width: 18px;
    height: 18px;
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 1px;
}
.cal-item-icon svg { width: 100%; height: 100%; }
.cal-item-body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
.cal-item-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--white);
    line-height: 1.2;
}
.cal-item-tip {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.3;
}
.cal-empty {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    padding: 0.5rem 0;
}

/* ── Calendar edit mode (drag-and-drop) ── */
.calendar-edit {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-top: 0.5rem;
}

/* When calendar is in edit mode, the content grid becomes the drag source */
body.calendar-edit-mode .content-grid {
    outline: 2px dashed var(--accent);
    outline-offset: 6px;
    border-radius: 12px;
    position: relative;
}
body.calendar-edit-mode .content-grid::before {
    content: "↑ Drag any card up into a day column to schedule it";
    display: block;
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.85rem;
    border-radius: 100px;
    letter-spacing: 0.02em;
    white-space: nowrap;
    z-index: 5;
}
body.calendar-edit-mode .content-btn {
    cursor: grab;
}
body.calendar-edit-mode .content-btn:active {
    cursor: grabbing;
}
body.calendar-edit-mode .content-btn.dragging {
    opacity: 0.4;
}

/* Day columns (drop zones) */
.cal-edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.cal-edit-col {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.5rem;
}
.cal-edit-col-head {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.5rem;
}
.cal-edit-col-head input {
    padding: 0.35rem 0.55rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--white);
    font-size: 0.78rem;
    font-family: inherit;
}
.cal-edit-col-head .cal-edit-day { font-weight: 600; }
.cal-edit-col-head .cal-edit-date { font-size: 0.72rem; color: var(--text-muted); }
.cal-edit-col-head input:focus {
    outline: none;
    border-color: var(--accent);
}
.cal-dropzone {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 80px;
    padding: 0.3rem;
    border-radius: 6px;
    transition: all 0.15s;
}
.cal-dropzone.drag-over {
    background: rgba(124, 58, 237, 0.10);
    outline: 2px dashed var(--accent);
    outline-offset: -2px;
}
.cal-item-edit {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.45rem;
    cursor: grab;
    transition: all 0.15s;
}
.cal-item-edit.dragging {
    opacity: 0.4;
    cursor: grabbing;
}
.cal-item-edit:hover {
    border-color: var(--accent-light);
}
.cal-item-edit-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.3rem;
}
.cal-item-icon-sm {
    width: 14px;
    height: 14px;
    color: var(--accent);
    flex-shrink: 0;
}
.cal-item-icon-sm svg { width: 100%; height: 100%; }
.cal-item-edit-label {
    flex: 1;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--white);
    line-height: 1.2;
}
.cal-item-remove {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    transition: all 0.15s;
}
.cal-item-remove:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}
.cal-item-tip-input {
    width: 100%;
    padding: 0.3rem 0.5rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--white);
    font-size: 0.72rem;
    font-family: inherit;
}
.cal-item-tip-input:focus {
    outline: none;
    border-color: var(--accent);
}
.calendar-edit-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.calendar-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.calendar-strip {
    display: flex;
    gap: 0.5rem;
}

.calendar-day {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.calendar-day:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
}

.cal-day-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cal-date {
    font-size: 0.7rem;
    color: var(--text-dim);
}

.cal-content {
    font-size: 0.82rem;
    color: var(--white);
    font-weight: 500;
    margin-top: 0.15rem;
}

.cal-tip {
    font-size: 0.68rem;
    color: var(--text-muted);
    line-height: 1.3;
    margin-top: 0.15rem;
}

/* ── Tabs ── */
.tabs-container {
    margin-bottom: 2rem;
}

/* Legacy .tabs (still used for nested .subtab strips like Social Media sub-options) */
.tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.15rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    padding: 0.5rem 0.5rem 0;
    overflow-x: auto;
}
.tab {
    padding: 0.6rem 0.75rem;
    background: transparent;
    border: none;
    border-radius: 8px 8px 0 0;
    color: var(--text-dim);
    font-size: 0.78rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.tab:hover { color: var(--text-muted); }
.tab.active { background: var(--bg-card-hover); color: var(--accent); }

/* ── Recap Carousel tab ── */
.carousel-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-muted);
}
.carousel-empty p {
    margin-bottom: 0.5rem;
}
.carousel-empty .carousel-hint {
    font-size: 0.82rem;
    margin: 0.25rem 0 1.5rem;
}
.carousel-empty .spinner {
    margin: 0 auto 1rem;
}
.carousel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}
.carousel-slide-card {
    position: relative;
    aspect-ratio: 4 / 5;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.15s;
}
.carousel-slide-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.carousel-slide-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.carousel-slide-num {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(0,0,0,.6);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 100px;
    z-index: 2;
}
.carousel-slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0));
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    opacity: 0;
    transition: opacity 0.15s;
}
.carousel-slide-card:hover .carousel-slide-overlay {
    opacity: 1;
}
.carousel-slide-type {
    flex: 1;
    color: var(--white);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.85;
}
.carousel-slide-overlay .action-btn {
    background: var(--bg-card);
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    color: var(--white);
    text-decoration: none;
}
.carousel-slide-overlay .action-btn:hover {
    background: var(--accent);
}
.carousel-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.carousel-modal.hidden { display: none; }
.carousel-modal-inner {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 520px;
    width: calc(100% - 2rem);
}
.carousel-modal h3 {
    margin: 0 0 1rem;
    color: var(--white);
}
.carousel-modal textarea,
.carousel-modal input[type="text"] {
    width: 100%;
    padding: 0.55rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--white);
    font-family: inherit;
    font-size: 0.9rem;
}
.carousel-modal textarea:focus,
.carousel-modal input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
}

/* ── Content navigator grid (replaces the tab strip on sermon detail) ── */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}
.content-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 1rem 0.6rem 0.95rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-dim);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 90px;
    text-align: center;
}
.content-btn svg {
    width: 22px;
    height: 22px;
    color: var(--text-muted);
    transition: color 0.15s ease, transform 0.15s ease;
}
.content-btn span {
    line-height: 1.2;
    color: var(--text-muted);
    transition: color 0.15s ease;
}
.content-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-light);
    transform: translateY(-1px);
}
.content-btn:hover svg,
.content-btn:hover span {
    color: var(--white);
}
.content-btn.active {
    background: rgba(124, 58, 237, 0.10);
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.15);
}
.content-btn.active svg {
    color: var(--accent);
}
.content-btn.active span {
    color: var(--white);
    font-weight: 600;
}
@media (max-width: 640px) {
    .content-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.4rem;
    }
    .content-btn {
        padding: 0.75rem 0.4rem;
        min-height: 78px;
        font-size: 0.72rem;
    }
    .content-btn svg { width: 18px; height: 18px; }
}

.tab-content {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 1.5rem;
}

.tab-content.active { display: block; }

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.tab-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
}

/* ── Social Sub-tabs ── */
.social-subtabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.subtab {
    padding: 0.4rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.subtab:hover { border-color: var(--accent); color: var(--accent); }
.subtab.active { background: var(--accent); color: var(--white); border-color: var(--accent); }

.subtab-content { display: none; }
.subtab-content.active { display: block; }

/* ── Content ── */
.content-body {
    color: var(--text);
    line-height: 1.75;
    font-size: 0.95rem;
    word-wrap: break-word;
}

/* Plain text tabs (social, transcript, questions) keep pre-wrap */
.content-body.plain-text {
    white-space: pre-wrap;
}

.content-body h1, .content-body h2, .content-body h3 {
    color: var(--white);
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.content-body h1 { font-size: 1.3rem; }
.content-body h2 { font-size: 1.15rem; }
.content-body h3 { font-size: 1.05rem; }

/* Hide first H1 if it duplicates the tab header title */
.content-body > h1:first-child { display: none; }
.content-body p { margin-bottom: 0.75rem; }

.content-body blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--text-muted);
    font-style: italic;
}

.content-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.content-hint strong { color: var(--accent); }

.transcript-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-height: 500px;
    overflow-y: auto;
}

/* ── Copy Buttons ── */
.copy-btn {
    padding: 0.35rem 0.85rem;
    background: #151518;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.copy-btn:hover { background: var(--border-light); color: var(--white); }
.copy-btn.copied { background: var(--accent); color: var(--white); border-color: var(--accent); }

.copy-btn-sm {
    padding: 0.25rem 0.6rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-dim);
    font-size: 0.72rem;
    font-family: inherit;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: all 0.2s;
}

.copy-btn-sm:hover { color: var(--accent); border-color: var(--accent); }

/* ── Tab Action Buttons ── */
.tab-actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-shrink: 0;
}

.action-btn {
    padding: 0.3rem 0.65rem;
    background: #151518;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.action-btn:hover { background: var(--border-light); color: var(--white); }
.action-btn.copied { background: var(--accent); color: var(--white); border-color: var(--accent); }
.action-btn:disabled { opacity: 0.5; cursor: wait; }
.action-btn svg { flex-shrink: 0; }

/* ── Edit Area ── */
.edit-area {
    margin-top: 0.75rem;
}

.edit-textarea {
    width: 100%;
    min-height: 250px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1rem;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.92rem;
    line-height: 1.7;
    resize: vertical;
}

.edit-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

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

/* ── Edit Sermon Info ── */
.edit-info-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.72rem;
    padding: 0.25rem 0.6rem;
    border-radius: 100px;
    cursor: pointer;
    margin-left: 0.5rem;
    transition: all 0.15s;
}
.edit-info-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}
.edit-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin: -0.5rem 0 1.5rem;
}
.info-form .form-group {
    margin-bottom: 0.85rem;
}
.info-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.85rem;
}
@media (max-width: 640px) {
    .info-form-row { grid-template-columns: 1fr; }
}
.info-form input[type="text"],
.info-form input[type="date"] {
    width: 100%;
    padding: 0.55rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--white);
    font-size: 0.9rem;
    font-family: inherit;
}
.info-form-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}
.info-save-status {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.info-save-success { color: var(--green); }
.info-save-error { color: #ef4444; }
.hidden { display: none; }

/* ── Download All ── */
.images-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.images-header .section-subhead {
    margin: 0;
}

.download-all-btn {
    text-decoration: none;
    white-space: nowrap;
}

/* ── Spinner Tiny (for regen buttons) ── */
.spinner-tiny {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Alternatives Picker ── */
.alt-btn {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.3);
    color: var(--accent-light);
}

.alt-btn:hover {
    background: rgba(124, 58, 237, 0.2);
    color: var(--white);
}

.alts-picker {
    margin-top: 1rem;
}

.alts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.alts-header h3 {
    font-size: 0.95rem;
    color: var(--white);
}

.alt-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s;
}

.alt-card:hover {
    border-color: var(--accent);
}

.alt-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.alt-text {
    color: var(--text);
    font-size: 0.88rem;
    line-height: 1.6;
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 0.5rem;
}

.alt-actions {
    display: flex;
    gap: 0.4rem;
}

/* ── Quotes ── */
.quotes-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quote-card {
    background: var(--bg);
    border-left: 3px solid var(--accent);
    padding: 1.25rem 1.5rem;
    border-radius: 0 8px 8px 0;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.quote-card:hover {
    box-shadow: 0 0 12px rgba(124, 58, 237, 0.08);
}

.quote-card blockquote {
    font-size: 1.02rem;
    line-height: 1.6;
    color: var(--text);
    font-style: italic;
    border: none;
    padding: 0;
    margin: 0;
}

/* ── Quote Images ── */
.section-subhead {
    font-size: 1rem;
    color: var(--white);
    margin: 2rem 0 1rem;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.image-gallery-stories {
    grid-template-columns: repeat(auto-fill, minmax(140px, 180px));
}

.image-card-story {
    max-width: 180px;
}

.image-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.image-card:hover {
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: 0 2px 12px rgba(124, 58, 237, 0.1);
}

.image-card img {
    width: 100%;
    display: block;
}

.download-btn {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem;
    background: rgba(0,0,0,0.8);
    color: var(--accent-light);
    text-align: center;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.2s;
}

.image-card:hover .download-btn { opacity: 1; }

/* ── Sermon Actions ── */
.sermon-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* ── Series Badge ── */
.series-badge {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--accent-light);
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(124, 58, 237, 0.25);
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-weight: 500;
}

.sermon-card-badges { display: flex; gap: 0.4rem; margin-top: 0.5rem; flex-wrap: wrap; }

/* ── Series Filter ── */
.series-filter {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: inherit;
    min-width: 160px;
    transition: border-color 0.2s;
}

/* ── Content Hint ── */
.content-hint {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}
.content-hint strong { color: var(--text-muted); }

/* ── Scripture Grid ── */
.scripture-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.scripture-card {
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    padding: 1rem 1.2rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.scripture-card:hover {
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.08);
}

.scripture-ref {
    color: var(--accent-light);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.scripture-text {
    color: var(--text);
    font-size: 0.88rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* ── Auth Pages ── */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
}

.auth-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.3rem;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.auth-card .form-group {
    margin-bottom: 1rem;
}

.auth-card .btn-primary {
    width: 100%;
    margin-top: 0.5rem;
}

.auth-error {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid rgba(238, 85, 85, 0.2);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.auth-switch a {
    color: var(--accent-light);
    text-decoration: none;
    transition: color 0.2s;
}

.auth-switch a:hover {
    text-decoration: underline;
    color: var(--accent);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-name {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.logout-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.logout-btn:hover {
    border-color: var(--text-muted);
    color: var(--text-muted);
}

/* ── Series Design Panel ── */
.series-design-panel {
    margin-top: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.series-design-panel h4 {
    font-size: 0.8rem;
    color: var(--text);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.series-design-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.series-design-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.color-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-input-wrap input[type="color"] {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 2px;
    cursor: pointer;
    background: var(--bg-input);
}

.color-input-wrap input[type="text"] {
    width: 90px;
    font-family: monospace;
    font-size: 0.85rem;
}

.series-design-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.series-design-status {
    font-size: 0.78rem;
    color: var(--accent-light);
    margin-top: 0.5rem;
}

.extracted-colors-group {
    min-width: 220px;
}

.extracted-colors-preview {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.color-edit-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-edit-row input[type="color"] {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 1px;
    cursor: pointer;
    background: var(--bg-input);
    flex-shrink: 0;
}

.color-edit-row .color-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    min-width: 70px;
}

.color-hex-input {
    width: 80px;
    font-family: monospace;
    font-size: 0.78rem;
    padding: 0.2rem 0.4rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
}

.color-hex-input:focus {
    border-color: var(--accent);
    outline: none;
}

#analyzing-spinner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--accent-light);
}

.spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.file-input-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px dashed var(--border-light);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
}

.file-input-label:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.file-input-label.has-file {
    border-style: solid;
    border-color: var(--accent);
    color: var(--accent);
}

/* ── Utilities ── */
.hidden { display: none !important; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .navbar { padding: 0.75rem 1rem; }
    .container { padding: 1.5rem 1rem; }
    .form-row, .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
    .tabs { padding: 0.3rem 0.3rem 0; }
    .tab { padding: 0.5rem 0.6rem; font-size: 0.75rem; }
    .sermon-grid { grid-template-columns: 1fr; }
    .sermon-header h1 { font-size: 1.4rem; }
    .archive-controls { flex-direction: column; }
    .sermon-actions { flex-direction: column; }
}
