:root {
    --primary-deep: #0f0f23;
    --primary-mid: #1a1a2e;
    --primary-light: #16213e;
    --accent-gold: #d4af37;
    --accent-gold-light: #f4d03f;
    --accent-purple: #6b5b95;
    --accent-sapphire: #1e3a5f;
    --text-primary: #f5f5f5;
    --text-secondary: #b8b8b8;
    --text-muted: #888;
    --surface-elevated: #252542;
    --surface-card: #1e1e3a;
    --border-subtle: rgba(212, 175, 55, 0.2);
    --border-glow: rgba(212, 175, 55, 0.4);
    --shadow-divine: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-gold: 0 0 20px rgba(212, 175, 55, 0.15);
    
    --font-display: 'Cinzel', 'Cormorant Garamond', serif;
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Source Serif 4', Georgia, serif;
    
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

[data-theme="earth"] {
    --primary-deep: #2c2416;
    --primary-mid: #3d3221;
    --primary-light: #4a3f2a;
    --accent-gold: #c9a227;
    --accent-gold-light: #e8c547;
    --accent-purple: #8b7355;
    --accent-sapphire: #5d4e37;
    --text-primary: #f5f0e8;
    --text-secondary: #c4b8a8;
    --text-muted: #9a8b7a;
    --surface-elevated: #4a3f2a;
    --surface-card: #3d3221;
    --border-subtle: rgba(201, 162, 39, 0.2);
    --border-glow: rgba(201, 162, 39, 0.4);
}

[data-theme="light"] {
    --primary-deep: #f8f6f3;
    --primary-mid: #ffffff;
    --primary-light: #f0ebe3;
    --accent-gold: #b8860b;
    --accent-gold-light: #daa520;
    --accent-purple: #6b5b95;
    --accent-sapphire: #2e4a62;
    --text-primary: #2c2416;
    --text-secondary: #5d4e37;
    --text-muted: #8b7355;
    --surface-elevated: #ffffff;
    --surface-card: #f8f6f3;
    --border-subtle: rgba(184, 134, 11, 0.2);
    --border-glow: rgba(184, 134, 11, 0.3);
    --shadow-divine: 0 8px 32px rgba(0, 0, 0, 0.1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--primary-deep);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color var(--transition-base), color var(--transition-base);
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 200%;
    height: 100%;
    background: radial-gradient(ellipse at center, 
        rgba(212, 175, 55, 0.08) 0%, 
        transparent 60%);
    pointer-events: none;
    z-index: 0;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

.display-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    margin-bottom: var(--space-lg);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
}

p {
    margin-bottom: var(--space-md);
}

.app-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section {
    padding: var(--space-3xl) 0;
}

/* ============================================
   NAVIGATION
   ============================================ */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(to bottom, var(--primary-deep) 0%, transparent 100%);
    padding: var(--space-md) 0;
    transition: all var(--transition-base);
}

.main-nav.scrolled {
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-divine);
}

[data-theme="light"] .main-nav.scrolled {
    background: rgba(248, 246, 243, 0.95);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--accent-gold);
    text-decoration: none;
}

.nav-logo i {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
    cursor: pointer;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: width var(--transition-base);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent-gold);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-light) 100%);
    color: var(--primary-deep);
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-gold);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    background: var(--surface-elevated);
    border-color: var(--accent-gold);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: var(--space-sm);
}

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

.btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
}

.btn-mic {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    animation: pulse 2s infinite;
}

.btn-mic:hover {
    transform: scale(1.05);
}

.btn-mic.recording {
    animation: recording-pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(231, 76, 60, 0); }
}

@keyframes recording-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ============================================
   CARDS & PANELS
   ============================================ */
.card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition-base);
}

.card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-divine);
}

.card-elevated {
    background: var(--surface-elevated);
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--space-sm);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--space-md);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--primary-deep);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-hint {
    margin-top: var(--space-xs);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.input-group {
    display: flex;
    gap: var(--space-sm);
}

.input-group .form-input {
    flex: 1;
}

.search-box {
    position: relative;
}

.search-box .form-input {
    padding-left: 3rem;
    padding-right: 3rem;
}

.search-icon {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-actions {
    position: absolute;
    right: var(--space-sm);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: var(--space-xs);
}

/* ============================================
   BIBLE READER STYLES
   ============================================ */
.bible-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-xl);
    min-height: calc(100vh - 200px);
}

@media (max-width: 968px) {
    .bible-layout {
        grid-template-columns: 1fr;
    }
    .bible-sidebar {
        display: none;
    }
    .bible-sidebar.mobile-open {
        display: block;
        position: fixed;
        left: 0;
        top: 70px;
        bottom: 0;
        width: 280px;
        z-index: 100;
        background: var(--primary-deep);
        overflow-y: auto;
        padding: var(--space-lg);
    }
}

.bible-sidebar {
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    height: fit-content;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    position: sticky;
    top: 90px;
}

.bible-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-subtle);
}

.bible-nav-title {
    font-family: var(--font-display);
    font-size: 0.875rem;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.book-list {
    list-style: none;
}

.book-item {
    margin-bottom: var(--space-xs);
}

.book-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    font-size: 0.9375rem;
}

.book-name:hover, .book-name.active {
    background: var(--surface-elevated);
    color: var(--accent-gold);
}

.book-name.active {
    border-left: 2px solid var(--accent-gold);
}

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-xs);
    padding: var(--space-sm);
    background: var(--primary-deep);
    border-radius: var(--radius-sm);
    margin-top: var(--space-xs);
}

.chapter-btn {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.chapter-btn:hover, .chapter-btn.active {
    background: var(--accent-gold);
    color: var(--primary-deep);
    border-color: var(--accent-gold);
}

.bible-content {
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
}

.bible-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-xl);
    border-bottom: 2px solid var(--border-subtle);
}

.bible-reference {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--accent-gold);
    margin-bottom: var(--space-sm);
}

.bible-version-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-md);
    background: var(--primary-deep);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.verse-container {
    font-size: 1.125rem;
    line-height: 2;
}

.verse {
    margin-bottom: var(--space-md);
    padding-left: var(--space-xl);
    position: relative;
    transition: all var(--transition-fast);
}

.verse:hover {
    background: var(--surface-elevated);
    border-radius: var(--radius-sm);
    margin-left: calc(-1 * var(--space-md));
    margin-right: calc(-1 * var(--space-md));
    padding-left: calc(var(--space-xl) + var(--space-md));
    padding-right: var(--space-md);
}

.verse-number {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.75rem;
    color: var(--accent-gold);
    font-weight: 600;
    line-height: 2.5;
}

.verse-text {
    color: var(--text-primary);
}

.verse-actions {
    position: absolute;
    right: var(--space-sm);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: var(--space-xs);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.verse:hover .verse-actions {
    opacity: 1;
}

.verse-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-deep);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.75rem;
}

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

/* Bible Toolbar - kept for print hide rule compatibility */
.bible-toolbar { display: none; }

/* ============================================
   BIBLE NAVIGATOR (new mobile-first)
   ============================================ */
.bible-navigator {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
}

.bible-nav-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.bible-nav-selectors {
    display: flex;
    gap: var(--space-sm);
    flex: 1;
    min-width: 0;
}

.bible-nav-select {
    flex: 1;
    min-width: 0;
    padding: 0.45rem var(--space-sm);
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--primary-deep);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23d4af37'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px;
}

.bible-nav-select:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.bible-nav-select option {
    background: var(--primary-deep);
    color: var(--text-primary);
}

.bible-nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex-shrink: 0;
}

.bible-nav-arrow {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all var(--transition-fast);
}

.bible-nav-arrow:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.bible-listen-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-light) 100%);
    border: none;
    color: var(--primary-deep);
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.bible-listen-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
}

.bible-listen-btn.playing {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.35);
    animation: pulse-listen 1.2s ease-in-out infinite;
}

@keyframes pulse-listen {
    0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(231, 76, 60, 0); }
}

/* Mode toggle row */
.bible-mode-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.bible-mode-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    transition: color var(--transition-fast);
}

.bible-mode-label.mode-label-personal {
    color: var(--accent-gold);
}

/* Toggle Switch */
.mode-toggle {
    position: relative;
    display: inline-flex;
    cursor: pointer;
    flex-shrink: 0;
}

.mode-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.mode-toggle-track {
    display: flex;
    align-items: center;
    width: 48px;
    height: 26px;
    background: var(--surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 13px;
    transition: all var(--transition-base);
    padding: 2px;
}

.mode-toggle input:checked + .mode-toggle-track {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-light) 100%);
    border-color: transparent;
}

.mode-toggle-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.mode-toggle input:checked + .mode-toggle-track .mode-toggle-thumb {
    transform: translateX(22px);
    background: var(--primary-deep);
}

.bible-mode-indicator {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    background: transparent;
    transition: all var(--transition-base);
}

.bible-mode-indicator.active-personal {
    background: rgba(212, 175, 55, 0.15);
    color: var(--accent-gold);
}

/* Personalize Banner */
.personalize-banner {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    font-size: 0.875rem;
    color: var(--text-secondary);
    animation: fadeIn 0.3s ease;
}

.personalize-banner > i {
    color: var(--accent-gold);
    flex-shrink: 0;
}

.personalize-banner span {
    flex: 1;
}

.personalize-banner strong {
    color: var(--accent-gold);
}

.btn-inline-ghost {
    background: none;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-inline-ghost:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* Personalized verse highlight */
.verse-text.personalized-active .personalized-name {
    color: var(--accent-gold);
    font-weight: 600;
    background: rgba(212, 175, 55, 0.12);
    padding: 0 3px;
    border-radius: 3px;
}

.verse.personalizing {
    opacity: 0.5;
    transition: opacity 0.3s;
}

/* Personalize loading shimmer */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}

.personalize-loading {
    background: linear-gradient(90deg, var(--surface-elevated) 25%, var(--surface-card) 50%, var(--surface-elevated) 75%);
    background-size: 400px 100%;
    animation: shimmer 1.2s infinite;
    border-radius: var(--radius-sm);
    color: transparent !important;
    user-select: none;
}

.version-select { min-width: 120px; }
.nav-btn { padding: var(--space-sm) var(--space-md); }

/* Search Results */
.search-results {
    margin-top: var(--space-xl);
}

.search-result-item {
    padding: var(--space-lg);
    background: var(--surface-elevated);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    border-left: 3px solid var(--accent-gold);
}

.search-result-reference {
    font-family: var(--font-display);
    color: var(--accent-gold);
    font-size: 0.9375rem;
    margin-bottom: var(--space-sm);
}

.search-result-text {
    color: var(--text-secondary);
    line-height: 1.8;
}

.search-result-text mark {
    background: rgba(212, 175, 55, 0.3);
    color: var(--text-primary);
    padding: 0 2px;
    border-radius: 2px;
}

/* Voice Search Overlay */
.voice-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 35, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.voice-overlay.active {
    opacity: 1;
    visibility: visible;
}

.voice-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-purple) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: voice-pulse 1.5s ease-in-out infinite;
}

@keyframes voice-pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

.voice-circle i {
    font-size: 4rem;
    color: white;
}

.voice-text {
    margin-top: var(--space-xl);
    font-size: 1.5rem;
    color: var(--text-primary);
    text-align: center;
}

.voice-hint {
    margin-top: var(--space-md);
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.voice-close {
    position: absolute;
    top: var(--space-xl);
    right: var(--space-xl);
}

/* Testament Headers */
.testament-header {
    padding: var(--space-sm) var(--space-md);
    margin-top: var(--space-md);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-gold);
    border-bottom: 1px solid var(--border-subtle);
}

/* ============================================
   HERO & OTHER SECTIONS
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    position: relative;
}

.hero-content {
    max-width: 800px;
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-style: italic;
    color: var(--accent-gold);
    margin-bottom: var(--space-md);
    letter-spacing: 0.1em;
}

.hero-title {
    margin-bottom: var(--space-lg);
}

.hero-title .highlight {
    color: var(--accent-gold);
    display: block;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-2xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: var(--space-2xl);
    margin-top: var(--space-3xl);
    flex-wrap: wrap;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.hero-feature i {
    color: var(--accent-gold);
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-gold);
    border-radius: 50%;
    opacity: 0;
    animation: float-up 15s infinite;
}

@keyframes float-up {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-100vh) scale(1); opacity: 0; }
}

/* ============================================
   STEPPER / WIZARD
   ============================================ */
.stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
}

.step {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.step-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface-elevated);
    border: 2px solid var(--border-subtle);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--transition-base);
}

.step.active .step-number {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--primary-deep);
}

.step.completed .step-number {
    background: transparent;
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.step-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.step.active .step-label {
    color: var(--accent-gold);
}

.step-divider {
    width: 40px;
    height: 2px;
    background: var(--border-subtle);
}

.step-divider.completed {
    background: var(--accent-gold);
}

/* ============================================
   THEME GRID
   ============================================ */
.theme-search {
    margin-bottom: var(--space-xl);
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.theme-card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.theme-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-purple));
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.theme-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-divine);
}

.theme-card:hover::before {
    transform: scaleX(1);
}

.theme-card.selected {
    border-color: var(--accent-gold);
    background: var(--surface-elevated);
}

.theme-card.selected::before {
    transform: scaleX(1);
}

.theme-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-sapphire) 0%, var(--accent-purple) 100%);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    font-size: 1.5rem;
    color: var(--accent-gold);
}

.theme-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.theme-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.theme-category {
    display: inline-block;
    margin-top: var(--space-md);
    padding: var(--space-xs) var(--space-sm);
    background: var(--primary-deep);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-gold);
}

/* ============================================
   DECLARATION DISPLAY
   ============================================ */
.declaration-container {
    max-width: 800px;
    margin: 0 auto;
}

.declaration-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--border-subtle);
}

.declaration-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--accent-gold);
    margin-bottom: var(--space-sm);
}

.declaration-meta {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.declaration-flow {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.declaration-card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    position: relative;
    transition: all var(--transition-base);
}

.section-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: var(--primary-deep);
    color: var(--accent-gold);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
    border: 1px solid var(--border-subtle);
}

.opening-text,
.closing-text {
    font-size: 1.125rem;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.8;
}

.verses-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.verse-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border-subtle);
    border-left: 4px solid var(--accent-gold);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.verse-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-divine);
}

.verse-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.verse-reference {
    font-family: var(--font-display);
    font-size: 0.875rem;
    color: var(--accent-gold);
}

.verse-personalized {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: var(--space-sm);
}

.verse-original {
    font-size: 0.9375rem;
    color: var(--text-muted);
    font-style: italic;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-subtle);
}

.verse-application {
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: var(--primary-deep);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.btn-icon-sm {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    transition: color var(--transition-fast);
}

.btn-icon-sm:hover {
    color: var(--accent-gold);
}

/* Floating Actions */
.floating-actions-container {
    position: fixed;
    bottom: 90px;
    right: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all var(--transition-base);
}

.floating-actions-container.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.btn-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    border: 2px solid var(--primary-mid);
}

@media (max-width: 768px) {
    .declaration-flow {
        gap: var(--space-sm);
    }

    .declaration-card, .verse-card {
        padding: var(--space-sm) var(--space-md);
        border-radius: var(--radius-md);
        margin: 0;
    }

    .declaration-container {
        padding: 0;
        max-width: 100%;
    }

    .declaration-header {
        margin-bottom: var(--space-md);
        padding-bottom: var(--space-md);
    }

    .declaration-title {
        font-size: 1.25rem;
    }

    .verse-card {
        padding: var(--space-sm) 0.75rem;
    }

    .verse-personalized {
        font-size: 1rem;
    }

    .verse-application {
        padding: var(--space-sm);
        font-size: 0.875rem;
    }

    .opening-text,
    .closing-text {
        font-size: 1rem;
    }

    /* Section padding tightening on mobile */
    .section {
        padding: var(--space-xl) 0;
    }

    .container {
        padding: 0 var(--space-sm);
    }

    .bible-content {
        padding: var(--space-md);
        border-radius: var(--radius-md);
    }

    .card {
        padding: var(--space-md);
    }
}

/* ============================================
   LOADING & PROCESSING STATES
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-deep);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    position: relative;
}

.loading-spinner::before,
.loading-spinner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.loading-spinner::before {
    width: 100%;
    height: 100%;
    border: 3px solid var(--border-subtle);
}

.loading-spinner::after {
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--accent-gold);
    animation: spin 1s linear infinite;
}

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

.loading-text {
    margin-top: var(--space-xl);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--accent-gold);
}

.loading-verse {
    margin-top: var(--space-lg);
    max-width: 500px;
    text-align: center;
    padding: 0 var(--space-lg);
    font-style: italic;
    color: var(--text-muted);
    animation: fade-verse 4s infinite;
}

@keyframes fade-verse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-gold { color: var(--accent-gold); }
.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   PAGE SECTIONS
   ============================================ */
.page-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   SAVED DECLARATIONS
   ============================================ */
.declaration-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.declaration-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.declaration-item:hover {
    border-color: var(--border-glow);
}

.declaration-info h4 {
    font-size: 1rem;
    margin-bottom: var(--space-xs);
}

.declaration-info p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.declaration-actions {
    display: flex;
    gap: var(--space-sm);
}

/* ============================================
   SETTINGS
   ============================================ */
.settings-grid {
    display: grid;
    gap: var(--space-xl);
    max-width: 600px;
}

.api-key-input {
    position: relative;
}

.api-key-input .form-input {
    padding-right: 3rem;
}

.toggle-visibility {
    position: absolute;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--space-xs);
}

.security-note {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: rgba(212, 175, 55, 0.1);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.security-note i {
    color: var(--accent-gold);
    margin-top: 2px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-features {
        flex-direction: column;
        gap: var(--space-md);
    }

    .step-label {
        display: none;
    }

    .theme-grid {
        grid-template-columns: 1fr;
    }

    .declaration-body {
        padding: var(--space-lg);
    }

    .declaration-body::before {
        font-size: 4rem;
    }

    .bible-content {
        padding: var(--space-lg);
    }

    .bible-reference {
        font-size: 1.5rem;
    }

    .verse {
        padding-left: var(--space-lg);
    }

    .verse:hover .verse-actions {
        opacity: 1;
        position: static;
        transform: none;
        margin-top: var(--space-sm);
        justify-content: flex-start;
    }

    /* Always show verse actions on mobile */
    .verse-actions {
        opacity: 1;
        position: static;
        transform: none;
        margin-top: var(--space-sm);
        justify-content: flex-start;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

@media (prefers-contrast: high) {
    :root {
        --border-subtle: var(--accent-gold);
        --text-muted: var(--text-secondary);
    }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
    .main-nav, .stepper, .declaration-actions, .btn, .bible-sidebar, .bible-toolbar, .verse-actions {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .declaration-body, .bible-content {
        border: none !important;
        box-shadow: none !important;
    }

    .verse-block, .verse {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Update the container to allow the button to float outside */
.mobile-footer-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary-mid);
    border-top: 1px solid var(--border-subtle);
    padding: 0.5rem 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    overflow: visible; /* Important: Allows the button to stick out the top */
    align-items: flex-end; /* Aligns text buttons to bottom */
}

.mobile-footer-nav .footer-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.mobile-footer-nav .footer-btn i {
    font-size: 1.25rem;
}

.mobile-footer-nav .footer-btn.active,
.mobile-footer-nav .footer-btn:hover {
    color: var(--accent-gold);
}

@media (max-width: 768px) {
    .mobile-footer-nav {
        display: flex;
    }
    .app-container {
        padding-bottom: 80px; /* prevent content from being hidden under footer */
    }
    .nav-links {
        display: none !important;
    }
}
/* NEW STYLES FOR THE PLUS BUTTON */
.mobile-footer-nav .footer-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-light) 100%);
    color: var(--primary-deep) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    top: -20px; /* Moves the button up */
    border: 4px solid var(--primary-mid); /* Creates a "cutout" effect from the bar */
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1), 0 4px 10px rgba(212, 175, 55, 0.3);
    padding: 0;
    flex: 0 0 auto; /* Prevents squishing */
    margin: 0 0.5rem; /* Adds spacing from side buttons */
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.27);
}

.mobile-footer-nav .footer-fab i {
    font-size: 1.5rem;
    margin: 0;
}

.mobile-footer-nav .footer-fab:active {
    transform: scale(0.95);
}

/* Ensure side buttons don't crowd the center */
.mobile-footer-nav .footer-btn:not(.footer-fab) {
    padding-bottom: 8px;
}

/* Personalization Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 15, 35, 0.9);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: var(--surface-card);
    border: 1px solid var(--accent-gold);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.27);
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.modal-header {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--accent-gold);
    font-family: var(--font-display);
    margin: 0;
}

.modal-body {
    padding: var(--space-lg);
    text-align: center;
}

.modal-context {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
}

.personalized-verse {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

/* The inserted name style */
.personalized-name {
    color: var(--accent-gold);
    font-weight: 600;
    background: rgba(212, 175, 55, 0.1);
    padding: 0 4px;
    border-radius: 4px;
}

.verse-reference-sm {
    font-size: 0.875rem;
    color: var(--accent-purple);
    font-family: var(--font-display);
}

.modal-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-top: var(--space-lg);
}
/* ============================================
   SOCIAL CARD GENERATION STYLES
   ============================================ */
#socialCardContainer {
    position: fixed;
    left: -9999px; /* Hide from view but keep renderable */
    top: 0;
    z-index: -1;
}

.social-card {
    display: flex;
    flex-direction: column;
    font-family: 'Source Serif 4', serif;
    background: radial-gradient(circle at top right, #2a2a4e 0%, #0f0f23 100%);
    color: #f5f5f5;
    position: relative;
    overflow: hidden;
}

.post-card {
    width: 1080px;
    height: 1350px;
}

.story-card {
    width: 1080px;
    height: 1920px;
}

.story-card .social-card-content {
    padding: 100px 60px;
}

.story-card .social-title {
    font-size: 84px;
}

.story-card .social-verse-box p {
    font-size: 48px;
}

.story-card .social-text-lg {
    font-size: 52px;
}

/* Watermark Background */
.social-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 800px;
    color: rgba(212, 175, 55, 0.03);
    z-index: 0;
    pointer-events: none;
}

.social-card-content {
    flex: 1;
    padding: 80px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.social-header {
    margin-bottom: 60px;
}

.social-title {
    font-family: 'Cinzel', serif;
    font-size: 72px;
    color: #d4af37; /* Gold */
    margin: 20px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.social-divider {
    width: 100px;
    height: 4px;
    background: #d4af37;
    margin: 0 auto 20px;
    border-radius: 2px;
}

.social-meta {
    font-family: 'Cormorant Garamond', serif;
    font-size: 36px;
    color: #b8b8b8;
    font-style: italic;
}

.social-body {
    width: 100%;
}

.social-text-lg {
    font-size: 42px;
    line-height: 1.4;
    margin-bottom: 50px;
    font-weight: 500;
}

.social-verse-box {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    padding: 50px;
    margin-bottom: 50px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.social-verse-box p {
    font-size: 36px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.social-verse-ref {
    display: block;
    font-family: 'Cinzel', serif;
    color: #d4af37;
    font-size: 30px;
    margin-top: 20px;
    text-align: right;
}

.social-text-sm {
    font-size: 32px;
    color: #d4af37;
    font-style: italic;
}

/* Footer Design */
.social-footer {
    background: #080814;
    padding: 40px 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid rgba(212, 175, 55, 0.2);
    position: relative;
    z-index: 1;
}

.footer-brand {
    font-family: 'Cinzel', serif;
    font-size: 32px;
    color: #f5f5f5;
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-brand::before {
    content: '\f521'; /* FontAwesome Crown */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #d4af37;
}

.footer-tagline {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    color: #888;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
/* ============================================
   BLESS PAGE
   ============================================ */

/* Hero */
.bless-hero {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.bless-hero-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    font-size: 1.75rem;
    color: var(--primary-deep);
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.3);
}

.bless-hero-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--accent-gold);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bless-hero-sub {
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.7;
}

/* Flow container */
.bless-flow {
    max-width: 680px;
    margin: 0 auto;
}

.bless-step {
    animation: fadeInUp 0.35s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.bless-step-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.bless-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
    color: var(--primary-deep);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Step 1 — Recipient grid */
.bless-recipient-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

@media (max-width: 500px) {
    .bless-recipient-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-sm);
    }
}

.bless-recipient-card {
    background: var(--surface-card);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
}

.bless-recipient-card:hover {
    border-color: var(--accent-gold);
    background: var(--surface-elevated);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.15);
}

.bless-recipient-card.selected {
    border-color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.1);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.3);
}

.bless-recipient-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.bless-recipient-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.2;
}

.bless-recipient-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-align: center;
}

/* Step 2 — Occasion grid */
.bless-occasion-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.bless-occasion-card {
    background: var(--surface-card);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    text-align: left;
}

.bless-occasion-card:hover,
.bless-occasion-card.selected {
    border-color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.08);
    transform: translateY(-1px);
}

.bless-occasion-emoji {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

.bless-occasion-info {
    flex: 1;
    min-width: 0;
}

.bless-occasion-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.bless-occasion-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Step 3 — Form */
.bless-form {
    margin-bottom: var(--space-lg);
}

.bless-tone-row {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.bless-tone-btn {
    padding: 0.4rem var(--space-md);
    background: var(--surface-elevated);
    border: 1.5px solid var(--border-subtle);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.bless-tone-btn:hover,
.bless-tone-btn.active {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.1);
}

.bless-form-actions {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    justify-content: space-between;
    margin-top: var(--space-lg);
    flex-wrap: wrap;
}

.bless-back-btn {
    background: none;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    transition: all var(--transition-fast);
}

.bless-back-btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* Step 4 — The Blessing Card */
.blessing-card-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.blessing-card {
    background: linear-gradient(160deg, #1a1a3e 0%, #0f0f23 60%, #1a1232 100%);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl) var(--space-xl);
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 175, 55, 0.1);
    animation: blessingReveal 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.27);
}

@keyframes blessingReveal {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Decorative background cross */
.blessing-card::before {
    content: '✛';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 340px;
    color: rgba(212, 175, 55, 0.03);
    pointer-events: none;
    line-height: 1;
}

/* Corner ornaments */
.blessing-card::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: calc(var(--radius-xl) - 4px);
    pointer-events: none;
}

.blessing-card-occasion {
    text-align: center;
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-gold);
    opacity: 0.75;
    margin-bottom: var(--space-md);
    position: relative;
    z-index: 1;
}

.blessing-card-crown {
    text-align: center;
    color: var(--accent-gold);
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.4));
}

.blessing-card-recipient {
    text-align: center;
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 4vw, 2rem);
    color: var(--text-primary);
    letter-spacing: 0.03em;
    margin-bottom: var(--space-md);
    position: relative;
    z-index: 1;
}

.blessing-card-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    margin: 0 auto var(--space-lg);
    position: relative;
    z-index: 1;
}

.blessing-card-opening {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: var(--space-lg);
    position: relative;
    z-index: 1;
}

.blessing-card-verses {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    position: relative;
    z-index: 1;
}

.blessing-verse-block {
    background: rgba(212, 175, 55, 0.05);
    border-left: 3px solid var(--accent-gold);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: var(--space-md) var(--space-lg);
}

.blessing-verse-text {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: var(--space-xs);
    font-style: italic;
}

.blessing-verse-ref {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--accent-gold);
    letter-spacing: 0.05em;
}

.blessing-card-closing {
    text-align: center;
    color: var(--accent-gold);
    font-family: var(--font-heading);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: var(--space-lg);
    position: relative;
    z-index: 1;
}

.blessing-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    position: relative;
    z-index: 1;
}

.blessing-card-sender {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

.blessing-card-brand {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: rgba(212, 175, 55, 0.5);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Action bar */
.blessing-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
}

.blessing-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    cursor: pointer;
    border: 1.5px solid var(--border-subtle);
    background: var(--surface-card);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.blessing-action-btn i {
    font-size: 1.2rem;
}

.blessing-action-btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.08);
    transform: translateY(-2px);
}

.blessing-action-btn.primary {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-light) 100%);
    border-color: transparent;
    color: var(--primary-deep);
    font-size: 1rem;
    padding: var(--space-md) var(--space-xl);
    flex-direction: row;
    gap: var(--space-sm);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

.blessing-action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.4);
    color: var(--primary-deep);
    background: linear-gradient(135deg, var(--accent-gold-light) 0%, var(--accent-gold) 100%);
}

.blessing-meta-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

/* Hidden image export card */
#blessingCardExport {
    position: fixed;
    left: -9999px;
    top: 0;
    z-index: -1;
    width: 1080px;
    padding: 120px 100px;
    background: linear-gradient(160deg, #1a1a3e 0%, #0f0f23 60%, #1a1232 100%);
    font-family: 'Source Serif 4', serif;
    color: #f5f5f5;
}
