@import 'skeleton.css';
/* Phase 135: Skeleton Loading */
/* DesiGospel "Modern Hymnal" Design System */
/* Fonts loaded via HTML <link> for performance */
/* Fonts loaded via HTML <link> for performance */
/* Removed @import to prevent render blocking */

:root {
    /* --- COLOR PALETTE: "Pure Light" (High Contrast) --- */
    --bg-paper: #FFFFFF;
    /* Was #FDFCF8 */
    --bg-void: #FAFAFA;
    /* Subtle contrast for void */
    --bg-surface: #FFFFFF;

    --text-ink: #000000;
    /* Pure Black */
    --text-stone: #444444;
    --text-primary: #121212;
    --text-secondary: #555555;
    --text-hint: #888888;

    --card-surface: #FFFFFF;
    --card-glass: #FFFFFF;
    /* Removed transparency */
    --border-glass: rgba(0, 0, 0, 0.08);
    --header-blur: rgba(255, 255, 255, 0.95);

    /* Brand Colors */
    --brand-primary: #000000;
    --brand-accent: #000000;
    /* Monochrome focus */

    /* Gradients (Removed for Purity, or kept very subtle) */
    --grad-dawn: linear-gradient(135deg, #f0f0f0 0%, #ffffff 100%);
    --grad-dusk: linear-gradient(135deg, #f0f0f0 0%, #ffffff 100%);
    --grad-forest: linear-gradient(135deg, #f0f0f0 0%, #ffffff 100%);
    --grad-vibrant: linear-gradient(135deg, #000000 0%, #333333 100%);

    --border-subtle: rgba(0, 0, 0, 0.1);
    --shadow-float: 0 5px 20px rgba(0, 0, 0, 0.1);
    /* Crisper shadow */

    --primary-action: #000000;
    --on-primary: #FFFFFF;

    --noise-opacity: 0.0;
    /* Removed Noise */

    /* Safe Areas */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* --- DARK MODE PALETTE --- */
[data-theme="dark"] {
    --bg-paper: #000000;
    /* Pitch Black */
    --bg-void: #000000;
    --bg-surface: #000000;

    --text-ink: #FFFFFF;
    /* Pure White */
    --text-stone: #CCCCCC;
    --text-primary: #FFFFFF;
    --text-secondary: #999999;
    --text-hint: #666666;

    --card-surface: #000000;
    --card-glass: #000000;
    /* Opaque */
    --border-glass: rgba(255, 255, 255, 0.15);
    --header-blur: rgba(0, 0, 0, 0.95);
    --header-blur: rgba(9, 9, 11, 0.85);

    --brand-primary: #fafafa;

    /* Dark Mode Gradients */
    --grad-dawn: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    --grad-dusk: linear-gradient(135deg, #7c2d12 0%, #ea580c 100%);
    --grad-forest: linear-gradient(135deg, #312e81 0%, #4f46e5 100%);

    --border-subtle: rgba(255, 255, 255, 0.15);
    --shadow-float: 0 10px 40px -10px rgba(0, 0, 0, 0.5);

    --primary-action: #e7e5e4;
    --on-primary: #1c1917;

    --noise-opacity: 0.03;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-paper);
    color: var(--text-ink);
    /* Global Telugu Support: Anek Telugu for everything (Sitewide Request) */
    font-family: 'Anek Telugu', 'Noto Sans Devanagari', 'Noto Sans Malayalam', 'Noto Sans Tamil', 'Noto Sans Kannada', 'Noto Sans Bengali', 'Noto Sans Gujarati', 'Noto Sans Gurmukhi', 'Noto Sans Oriya', sans-serif;
    margin: 0;
    padding: 0;
    /* GRAIN TEXTURE OVERLAY */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    padding-bottom: 80px;
    /* Space for FAB */
    overflow-x: hidden;
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
.brand-title,
.song-title-serif {
    font-family: 'Anek Telugu', sans-serif;
    font-weight: 600;
}

/* Dark Mode Specific Overrides */
[data-theme="dark"] body {
    background-image: none !important;
}

.container {
    max-width: 100%;
    /* Fluid Layout as requested */
    margin: 0 auto;
    padding: 20px;
}

/* Responsive Grid (Desktop) / Swipeable Stack (Mobile) */
#song-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding-bottom: 40px;
    /* Space for scroll */
}

/* Ensure anchor links act as block containers */
#song-list a.art-card {
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* Mobile: Standard Grid/List (No Stack) */
@media (max-width: 600px) {
    #song-list {
        display: flex;
        flex-direction: column;
        /* Simple vertical list */
        gap: 20px;
        padding-bottom: 40px;
    }

    #song-list a.art-card {
        min-width: auto;
        height: auto;
        margin-bottom: 0;
        /* Reset 3D props */
        position: static;
        box-shadow: var(--shadow-float);
        border: 1px solid var(--border-subtle);
        transform: none !important;
    }
}

/* Keep Lyrics Centered & Readable */
.lyric-content {
    max-width: 600px;
    margin: 0 auto;
}

.art-card.is-song-view {
    max-width: 700px;
    margin: 0 auto;
}

/* --- HEADER & NAV --- */
/* --- IMMERSIVE NAV (Global) --- */
.immersive-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    /* Fixed height for alignment */
    display: flex;
    /* Kept for children, but we'll use absolute for center */
    align-items: center;
    padding: 0 20px;
    z-index: 100;
    /* Gradient mask */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, transparent 100%);
    pointer-events: none;
}

.immersive-header>* {
    pointer-events: auto;
}

/* Absolute Center for Language Toggle */
.header-lang-toggle {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    /* Ensure it doesn't overlap if screen is tiny */
    max-width: 60%;
}

/* Nav Buttons (Left/Right) */
.header-nav-btn {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

/* Shared Circle Button Style (Back & Theme) */
.circle-btn,
.theme-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    /* Glassy default */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    /* Default to white in immersive mode */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.circle-btn:active,
.theme-btn:active {
    transform: scale(0.92);
}

/* Light Mode Overrides for Header */
[data-theme="light"] .immersive-header {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9) 0%, transparent 100%);
}

[data-theme="light"] .circle-btn,
[data-theme="light"] .theme-btn {
    background: white;
    color: var(--text-ink);
    border-color: rgba(0, 0, 0, 0.08);
    /* Subtle border */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* --- LIGHT MODE CARD RESTORATION --- */
/* Restore "Pearly White" contrast */
[data-theme="light"] {
    --bg-paper: #FDFCF8;
    /* Pearly White */
}

/* Ensure Card is Pure White in Light Mode */
[data-theme="light"] .bible-reader-page .card-body {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
    /* Soft, premium shadow */
}

.bible-nav-page .header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-top: 10px;
}

.brand-title {
    font-size: 28px;
    letter-spacing: -1px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-ink);
    text-decoration: none;
}

.bible-nav-page .pill-badge {
    font-family: 'Anek Telugu', sans-serif;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--text-ink);
    padding: 4px 8px;
    border-radius: 100px;
    color: var(--bg-paper);
    /* Inverted */
}

.theme-btn {
    background: var(--bg-surface-elevated);
    /* Ensure it has a backing */
    border: 1px solid var(--border-subtle);
    color: var(--text-ink);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    /* Subtle lift */
}

.theme-btn:active {
    transform: scale(0.95);
}

/* --- FLUID PILL OMNIBOX (Header Integrated) --- */
.bible-nav-page .header-omnibox-wrapper {
    flex: 1;
    margin: 0 20px;
    max-width: 400px;
    /* Max width constraint */
    display: flex;
    justify-content: flex-end;
    transition: all 0.3s ease;
}

/* Favorite Button on Cards (Global) */
.lyric-like-btn {
    position: absolute;
    bottom: 30px;
    /* Thumb Zone */
    right: 30px;
    /* Easy Access */
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-stone);
    padding: 12px;
    /* Larger hit area */
    border-radius: 50%;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.2s;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    z-index: 50;
}

.lyric-like-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.8);
}

.lyric-like-btn:active {
    transform: scale(0.9);
}

.lyric-like-btn.liked {
    color: #ef4444;
    transform: scale(1.1);
}

.lyric-like-btn.liked svg {
    fill: #ef4444;
    stroke: #ef4444;
}



.bible-nav-page .header-omnibox {
    display: flex;
    align-items: center;
    background: var(--card-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 50px;
    padding: 6px 6px 6px 20px;
    width: 100%;
    max-width: 240px;
    /* Collapsed state */
    transition: max-width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.bible-nav-page .header-omnibox:focus-within {
    max-width: 100%;
    /* Expand to fill wrapper */
    border-color: var(--text-ink);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.bible-nav-page .header-omnibox input {
    border: none !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.95rem;
    font-family: 'Anek Telugu', sans-serif;
    /* Cleaner sans for UI */
    height: auto;
    width: 100%;
}

.bible-nav-page .header-omnibox-btn {
    background: var(--text-ink);
    color: var(--bg-paper);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 10px;
    transition: transform 0.2s;
}

.bible-nav-page .header-omnibox-btn:hover {
    transform: scale(1.1) rotate(90deg);
}

/* Mobile responsive adjustments */
@media (max-width: 600px) {
    .brand-title span.pill-badge {
        display: none;
    }

    /* Save space */
    .header-omnibox-wrapper {
        margin: 0 10px;
    }
}

/* --- INPUTS --- */
input[type="text"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 16px;
    font-family: 'Anek Telugu', sans-serif;
    /* Input in Serif */
    font-size: 1.1rem;
    border: none;
    border-bottom: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-ink);
    border-radius: 0;
    outline: none;
    margin-bottom: 20px;
    transition: 0.3s;
}

input:focus,
textarea:focus {
    border-bottom-color: var(--text-ink);
}

label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-stone);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    font-weight: 600;
}

/* --- CARDS (Modern Hymnal Style) --- */
.art-card {
    background: var(--card-surface);
    border-radius: 24px;
    /* Squircle */
    padding: 6px;
    /* Inner frame padding */
    box-shadow: var(--shadow-float);
    margin-bottom: 20px;
    border: 1px solid var(--border-subtle);
    transition: transform 0.2s;

    /* --- CONTAINER QUERY CONTEXT --- */
    container-type: inline-size;
    container-name: card;
}

/* --- FLUID TYPOGRAPHY (Replaces JS fitText) --- */
@container card (min-width: 0px) {
    .lyric-text {
        font-size: clamp(1.5rem, 8cqi, 4rem) !important;
        line-height: 1.4;
        text-align: center;
        width: 100%;
        display: block;
    }

    .english-text {
        font-size: clamp(1rem, 5cqi, 2.5rem) !important;
        line-height: 1.4;
        text-align: center;
        width: 100%;
        display: block;
    }
}

.art-card:active {
    transform: scale(0.98);
}

.inner-canvas {
    border-radius: 18px;
    overflow: hidden;
    position: relative;
}

.gradient-header {
    height: 120px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    color: #1a1918;
    /* Force dark text on pastel gradients */
}

[data-theme="dark"] .gradient-header {
    color: white;
}

/* Gradient Variants */
.bg-dawn {
    background: var(--grad-dawn);
}

.bg-dusk {
    background: var(--grad-dusk);
}

.bg-forest {
    background: var(--grad-forest);
}

/* Default Fallback */
.bg-default {
    background: var(--grad-dawn);
}

/* --- BIBLE GRADIENT UTILITIES (Pastel/Glass) --- */
/* --- MODERN SILKY MESH GRADIENTS (Eye-Pleasing & Professional) --- */
/* Soft, organic blends perfect for text-heavy cards */
/* CRITICAL: Text color forced with !important to prevent Dark Mode overriding transparency */

/* 01 Silk Aura */
.grad-subtle-aura {
    background: radial-gradient(circle at 10% 20%, rgb(255, 252, 213) 0%, rgb(255, 230, 230) 90%);
    color: #431407 !important;
}

/* 02 Cool Mist */
.grad-cool-mist {
    background: radial-gradient(circle at 50% 50%, #f0f9ff 0%, #cbebff 100%);
    color: #0c4a6e !important;
}

/* 03 Gentle Violet */
.grad-gentle-violet {
    background: radial-gradient(circle at 0% 0%, #fdf2f8 0%, #f3e8ff 100%);
    color: #4a044e !important;
}

/* 04 Fresh Leaf */
.grad-fresh-leaf {
    background: linear-gradient(120deg, #f0fdf4 0%, #dcfce7 100%);
    color: #14532d !important;
}

/* 05 Warm Glow */
.grad-warm-glow {
    background: linear-gradient(to top, #f8fafc 0%, #f1f5f9 100%);
    color: #0f172a !important;
}

/* --- LOCAL REF PILL (Phase 100) --- */
/* --- LOCAL REF PILL (Phase 100) --- */
.local-ref-pill {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    /* Center Content */
    padding: 0;
    /* ZERO PADDING for Full Bleed */
    margin-bottom: 10px;
    width: auto;
    /* min-width removed for tight fit */
    gap: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 40px;
    backdrop-filter: blur(8px);
    margin: 4px auto 10px auto;
    /* Reduced Top Gap (4px) */
    overflow: hidden;
    height: 44px;
}

.local-ref-pill .ghp-book-name {
    padding-left: 16px;
    /* Offset from left edge */
    padding-right: 12px;
}

.local-ref-pill .ghp-book-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: inherit;
    opacity: 0.95;
    margin-bottom: 0;
    white-space: nowrap;
}

/* PHASE 106: Refined Inner Pill (Full Bleed) */
/* PHASE 106: Refined Inner Pill (Full Bleed) */
.local-ref-pill .ghp-inner-pill {
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    border: 1px solid rgba(255, 255, 255, 1);
    border-radius: 40px;
    /* Match Parent */
    padding: 0 16px;
    /* Horizontal padding for text */
    font-size: 0.9rem;
    font-weight: 700;
    backdrop-filter: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    height: 100%;
    /* FULL HEIGHT */
    margin: 0;
    /* NO GAP */
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.05);
    /* Subtle separation */
}

/* Light Mode Override for local pill */
[data-theme="light"] .local-ref-pill {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .local-ref-pill .ghp-book-name {
    color: #111;
}

[data-theme="light"] .local-ref-pill .ghp-inner-pill {
    /* PHASE 101: High Contrast Light Mode */
    background: #000;
    color: #fff;
    border: none;
}

/* --- LOCAL DOCK (Phase 98) --- */
.local-dock {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 15px 0;
    margin-top: auto;
    /* Push to bottom */
    width: 100%;
}

.local-dock .icon-capsule {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    backdrop-filter: blur(8px);
    cursor: pointer;
    transition: transform 0.2s;
}

.local-dock .icon-capsule:active {
    transform: scale(0.9);
}

[data-theme="light"] .local-dock .icon-capsule {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #333;
}

/* Updated Card Layout for Phase 98 */
.art-card {
    height: calc(100vh - 140px);
    /* Account for Header + Nav */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
    /* Other existing properties remain */
}

/* 07 Soft Rose */
.grad-soft-rose {
    background: radial-gradient(circle at 50% 100%, #fff1f2 0%, #ffe4e6 100%);
    color: #881337 !important;
}

/* 08 Ocean Breeze */
.grad-ocean-breeze {
    background: linear-gradient(to top, #f0f9ff 0%, #e0f2fe 100%);
    color: #0c4a6e !important;
}

/* 09 Golden Hour */
.grad-golden-hour {
    background: radial-gradient(circle at 0% 100%, #fefce8 0%, #fef9c3 100%);
    color: #713f12 !important;
}

/* 10 Platinum */
.grad-platinum {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #1f2937 !important;
}

.card-title-lg {
    font-family: 'Anek Telugu', sans-serif;
    font-size: 24px;
    line-height: 1.1;
    font-weight: 500;
}

.float-stat {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #000;
}

[data-theme="dark"] .float-stat {
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
}

.card-footer {
    padding: 16px 15px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.micro-tag {
    font-size: 12px;
    color: var(--text-stone);
    background: var(--border-subtle);
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 500;
}

/* --- BUTTONS --- */
.btn-primary {
    background: var(--primary-action);
    color: var(--on-primary);
    border: none;
    padding: 16px 32px;
    border-radius: 100px;
    font-family: 'Anek Telugu', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-primary:active {
    transform: scale(0.95);
}

.fab-magical {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: var(--primary-action);
    color: var(--on-primary);
    width: 60px;
    height: 60px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 100;
    transition: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fab-magical:hover {
    transform: rotate(10deg) scale(1.1);
}

/* --- CHIPS (Submit Form) --- */
.chip-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.chip-btn {
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-stone);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: 'Anek Telugu', sans-serif;
}

/* --- VERTICAL DOCK (Desktop) --- */
/* --- VERTICAL DOCK (Desktop) --- */
@media (min-width: 768px) {
    .unified-dock {
        right: 20px !important;
        left: auto !important;
        bottom: 50% !important;
        top: 50% !important;
        width: 52px !important;
        max-width: 52px !important;
        min-width: unset !important;
        height: auto !important;
        flex-direction: column !important;
        transform: translateY(-50%) !important;
        padding: 20px 0 !important;
        gap: 15px;
        /* Spacing between icons */
    }
}

/* --- RESPONSIVE DOCK ADJUSTMENTS --- */
/* --- RESPONSIVE DOCK ADJUSTMENTS --- */
/* Prevent overflow on very small screens */
@media (max-width: 380px) {
    .local-dock {
        gap: 10px !important;
    }

    .local-dock .icon-capsule {
        width: 40px;
        height: 40px;
    }
}

.bible-reader-page .local-dock {
    margin-bottom: 20px;
    /* Space from Navbar */
}

/* --- HEADER LANGUAGE TOGGLE --- */
/* --- PHASE 101: Header Toggle Colors --- */
.header-lang-toggle {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 0;
    /* PHASE 106: Full Bleed (No Padding) */
    border-radius: 30px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    height: 32px;
    width: 110px;
    /* FIXED WIDTH for symmetry */
}

[data-theme="light"] .header-lang-toggle {
    background: rgba(0, 0, 0, 0.05);
    /* Light grey on white */
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.header-lang-toggle .lang-opt {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0;
    margin: 0;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    line-height: normal;
    /* Fix Vertical Align for Telugu */
    padding-bottom: 2px;
    /* Micro-adjustment for visual center */
}

[data-theme="light"] .header-lang-toggle .lang-opt {
    color: rgba(0, 0, 0, 0.5);
}

.header-lang-toggle .lang-opt.active {
    background: #fff;
    color: #000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .header-lang-toggle .lang-opt.active {
    background: #000;
    color: #fff;
}

.lang-opt {
    font-family: 'Anek Telugu', sans-serif;
    /* For Telugu char */
    line-height: 1;
}

.lang-sep {
    display: none !important;
}

/* --- DYNAMIC PILL (Inner Pill Design) --- */
.bible-reader-page .global-header-pill {
    /* Existing constraints */
    justify-content: center;
    /* Center content */
    gap: 15px;
    /* font-family: 'Anek Telugu', sans-serif; -- Inherited */
}

/* Book Name Text */
.ghp-book-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-ink);
    white-space: nowrap;
}

[data-theme="dark"] .ghp-book-name {
    color: white;
}

/* Inner Pill for Reference */
.ghp-inner-pill {
    background: var(--text-ink);
    /* Max Contrast */
    color: var(--bg-paper);
    /* Inverted text */
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    letter-spacing: 0.5px;
}

/* --- LIGHT MODE CARD CONTRAST FIX --- */
/* Ensure cards pop against the paper background */
.bg-surface-elevated {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .bg-surface-elevated {
    background: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chip-btn.active {
    background: var(--bg-paper);
    color: var(--text-ink);
    border-color: var(--text-ink);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* --- UTILS --- */
.text-muted {
    color: var(--text-stone);
}

.mt-4 {
    margin-top: 30px;
}

.mb-4 {
    margin-bottom: 30px;
}

/* --- SONG VIEW --- */
.lyric-content {
    font-family: 'Anek Telugu', sans-serif;
    font-size: 1.4rem;
    line-height: 1.8;
    white-space: pre-wrap;
    padding: 20px;
}

/* --- BIBLE READER: STRICT SINGLE VIEW --- */

/* 1. Hide Divider Always */
.divider-handle {
    display: none !important;
}

/* 2. Default State (Telugu/Primary) */
/* Show Primary, Hide Secondary */
.lang-block.primary {
    display: flex !important;
    flex: 1;
    height: 100%;
}

.lang-block.secondary {
    display: none !important;
}

/* 3. English Mode (flipped class) */
/* Hide Primary, Show Secondary */
body.layout-flipped .lang-block.primary {
    display: none !important;
}

body.layout-flipped .lang-block.secondary {
    display: flex !important;
    flex: 1;
    height: 100%;
}


/* --- CONCEPT A: THE CURATOR --- */

.home-page .header {

    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(253, 252, 248, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
    transition: box-shadow 0.3s;
}

[data-theme="dark"] .header {
    background: rgba(0, 0, 0, 0.9);
}

.bible-nav-page .header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.home-page .logo {

    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'Anek Telugu', sans-serif;
    letter-spacing: -0.5px;
}

/* Hero */
.hero {
    margin: 20px;
    padding: 30px 20px;
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    color: white;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px -5px rgba(49, 46, 129, 0.4);
}

.hero h2 {
    font-size: 2rem;
    margin: 0 0 8px 0;
}

.hero p {
    opacity: 0.8;
    margin: 0 0 20px 0;
    font-size: 0.95rem;
    max-width: 80%;
}

.hero-btn {
    background: white;
    color: #312e81;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
    display: inline-block;
}

.hero-btn:active {
    transform: scale(0.95);
}

/* Rails */
.section-title {
    padding: 0 20px;
    margin-top: 30px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title span:first-child {
    font-size: 1.2rem;
    font-weight: 600;
    font-family: 'Anek Telugu', sans-serif;
}

.see-all {
    font-size: 0.85rem;
    color: var(--text-stone);
    cursor: pointer;
    font-weight: 500;
}

.rail {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 0 20px 20px 20px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.rail::-webkit-scrollbar {
    display: none;
}

/* Default card body is flex column */
/* Default card body is flex column */
.card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    /* No Scroll, Auto-Fit Text */
    padding: 24px 20px 10px 20px !important;
    /* Reduced Padding (Top/Sides/Bottom) */
    flex: 1;
}

/* Lang Block Constraint for Auto-Fit */
.lang-block {
    flex: 1;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-height: 100%;
    /* Force constraint */
    overflow: hidden;
    /* CRITICAL for clientHeight measurement */
    min-height: 0;
    /* Flexbox fix */
}

/* --- READER MODE LOGIC (3D Flip Animation - Phase 136) --- */

/* Wrapper Context */
.bible-reader-page .snap-slide {
    perspective: 1500px;
    /* Depth for 3D effect */
    touch-action: pan-y;
    /* Allow vertical scroll, block horizontal (handled by JS) */
}

/* 1. Card Body as 3D Container */
.bible-reader-page .card-body {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    /* CRITICAL for Grid shrinking */
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy "Twist" */

    /* Grid Stack for Overlapping Faces */
    display: grid !important;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    padding: 0 !important;
    /* Reset padding to handle internal faces */
}

/* 2. Lang Blocks as Faces */
.bible-reader-page .lang-block {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    width: 100%;
    height: 100%;
    min-height: 0;
    /* CRITICAL for Flex shrinking */
    backface-visibility: hidden;
    /* Hide back face */
    -webkit-backface-visibility: hidden;
    position: relative;
    /* Ensure stacking context */
    background: inherit;
    /* Match parent background */
    border-radius: inherit;

    /* Flex content centering */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px 20px 10px 20px;
    /* Moved padding here from card-body */
    overflow: hidden;
}

/* Front Face (Primary/Telugu) */
.bible-reader-page .lang-block.primary {
    transform: rotateY(0deg);
    z-index: 2;
}

/* Back Face (Secondary/English) */
.bible-reader-page .lang-block.secondary {
    transform: rotateY(180deg);
    display: flex !important;
    /* Always display for 3D structure */
    z-index: 1;
}

/* 3. Flip Trigger */
.bible-reader-page.layout-flipped .card-body {
    transform: rotateY(180deg);
}

/* Divider removed globally via PHP, style reference legacy removed */

/* Rail Cards */
.card {
    min-width: 140px;
    width: 140px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    color: inherit;
    /* transition: transform 0.2s; (Removed for perf on mobile scroll) */
}

.card .cover {
    width: 140px;
    height: 140px;
    border-radius: 16px;
    background: #e2e8f0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}


/* SELECTION CARD TEXT COLORS */
.cover.plain {
    color: #fff !important;
    /* Always white text on colored covers */
}

.card h3 {
    color: var(--text-ink);
    /* Theme aware */
}

.card p {
    color: var(--text-secondary);
}


.card h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Anek Telugu', sans-serif;
}

.card p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-stone);
}

/* List Item (Recent) */
.list-container {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: var(--card-surface);
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    text-decoration: none;
    color: inherit;
}

.list-cover {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #e2e8f0;
}

.list-info h4 {
    margin: 0 0 2px 0;
    font-size: 1rem;
    font-weight: 500;
    font-family: 'Anek Telugu', sans-serif;
}

.list-info span {
    font-size: 0.8rem;
    color: var(--text-stone);
}

/* Pills */
.home-page .pill {

    padding: 8px 18px;
    background: var(--card-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 50px;
    font-size: 0.9rem;
    white-space: nowrap;
    color: var(--text-stone);
    cursor: pointer;
}

.bible-nav-page .pill.active {
    background: var(--text-ink);
    color: var(--bg-paper);
    border-color: var(--text-ink);
}

/* Bottom Nav */
/* Bottom Nav (Global Thin Style) */
.home-page .nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-paper);
    /* Theme consistent */
    border-top: 1px solid var(--border-subtle);
    padding: 6px 0;
    /* Thin */
    height: 50px;
    /* Explicit Height */
    display: flex;
    justify-content: space-around;
    z-index: 1000;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
}

.home-page .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: var(--text-stone);
    font-size: 0.7rem;
    /* Smaller text */
    font-weight: 500;
    opacity: 0.8;
}

.home-page .nav-item span {
    font-size: 20px;
    /* Smaller Icons */
}

.home-page .nav-item.active {
    color: var(--primary-action);
    opacity: 1;
}

/* Home Page Scroll Fix */
.home-page {
    overflow-y: auto !important;
    min-height: 100vh;
    background: var(--bg-paper);
}

.home-page .nav-item {

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-stone);
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.bible-nav-page .nav-item.active {
    opacity: 1;
    color: var(--text-ink);
}

.bible-nav-page .nav-item span {
    font-size: 1.5rem;
}

.bible-nav-page .nav-item.active span {
    font-variation-settings: 'FILL' 1;
}

/* =========================================
   GLOBAL CAPSULE UI (Bible & Songs)
   v2.0 - Split Capsule, Moveable Divider
   ========================================= */

/* 1. COMPACT HEADER & FOOTER */
.art-card .card-header {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4));
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 10;
    position: relative;
    flex-shrink: 0;
}

.art-card .card-footer {
    height: 56px;
    /* Thinner Footer */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4));
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 10;
    flex-shrink: 0;
}

/* 2. STRICT CAPSULE BADGE */
.capsule-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 6px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-width: 180px;
    justify-content: center;
    pointer-events: none;
    /* Let clicks pass through if needed */
}

.cap-segment {
    font-family: 'Anek Telugu', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-primary);
    padding-left: 8px;
    white-space: nowrap;
}

.cap-ref {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 10px;
    border-radius: 6px;
    /* Squarish */
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 800;
    font-size: 0.8rem;
    color: var(--accent-color, #8b5cf6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    white-space: nowrap;
}

.cap-pill {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 600;
    padding-right: 8px;
    white-space: nowrap;
}

/* 3. SPLIT CONTENT BODY */
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    /* No padding, handled by inner blocks */
}

.lang-block {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.lang-block.primary {
    /* English / Transliteration usually top */
    background: rgba(255, 255, 255, 0.02);
}

.lang-block.secondary {
    /* Native Telugu usually bottom */
    flex: 1;
    /* Takes remaining space by default */
}

/* 4. MOVEABLE DIVIDER */
.divider-handle {
    height: 12px;
    width: 100%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: row-resize;
    z-index: 20;
    margin: -6px 0;
    /* Overlap slightly */
    position: relative;
    touch-action: none;
    /* Important for drag */
}

.divider-visual {
    width: 40px;
    height: 4px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    transition: background 0.2s, width 0.2s;
}

.divider-handle:active .divider-visual {
    background: var(--accent-color, #8b5cf6);
    width: 60px;
}

/* 5. COMPACT ICONS */
.icon-capsule {
    width: 34px;
    height: 34px;
    /* Reduced */
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.icon-capsule:active {
    background: rgba(255, 255, 255, 0.2);
}

.icon-capsule span {
    font-size: 18px;
}

.footer-actions-left,
.footer-actions-right {
    display: flex;
    gap: 10px;
}

/* --- OMNIBOX SEARCH (Material 3) --- */
/* --- OMNIBOX SEARCH (Minimal & Expandable - Phase 139) --- */
.omnibox-wrapper {
    position: relative;
    margin: 20px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center initially */
}

.omnibox {
    width: 100%;
    /* Default width */
    max-width: 100%;
    /* Mobile full width default */
    height: 56px;
    padding: 0 60px 0 20px;
    /* Space for bold icon */
    font-size: 1.1rem;
    /* Larger Text */
    font-weight: 600;
    /* Bold Text */

    /* MINIMAL STYLE */
    border: 2px solid var(--text-ink);
    /* Bold Border */
    border-radius: 12px;
    /* Slightly squared */
    background: var(--bg-paper);
    color: var(--text-ink);
    box-shadow: none;
    /* Flat */

    outline: none;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    font-family: inherit;
}

/* Expansion Logic (Desktop/Large Screens if constrained) */
@media (min-width: 768px) {
    .omnibox {
        width: 300px;
        /* Start smaller on desktop */
    }

    .omnibox:focus {
        width: 450px;
        /* Expand on focus */
    }
}

.omnibox:focus {
    background: var(--bg-surface);
    /* In dark mode, ensure contrast */
    border-color: var(--primary-action);
    /* Highlight color if desired, or keep monochrome */
    transform: scale(1.02);
    /* Slight pop */
}

/* Placeholder Styling */
.omnibox::placeholder {
    font-weight: 500;
    color: var(--text-secondary);
    opacity: 0.7;
}

.search-icon-float {
    position: absolute;
    right: 15px;
    /* Tighter align */
    top: 50%;
    transform: translateY(-50%);

    /* Make it look like a button */
    background: var(--text-ink);
    color: var(--bg-paper);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    /* Match outer radius style */
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    /* Passthrough click */

    font-size: 20px;
    transition: all 0.2s;
}

.omnibox:focus+.search-icon-float {
    background: var(--primary-action);
    /* Active Color */
    transform: translateY(-50%) scale(1.1);
}

/* Voice Mic Button (Phase 140) */
.voice-mic-btn {
    position: absolute;
    right: 55px;
    /* Left of the search icon */
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-ink);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 5;
}

.voice-mic-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.voice-mic-btn.listening {
    color: #ef4444;
    /* Recording Red */
    animation: pulseMic 1.5s infinite;
}

@keyframes pulseMic {
    0% {
        transform: translateY(-50%) scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    70% {
        transform: translateY(-50%) scale(1.1);
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        transform: translateY(-50%) scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* End of Styles */
[data-theme="dark"] .omnibox {
    background: #1e1e1e;
}

/* --- BRAND CONSISTENCY --- */
.bg-brand-gradient {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
}

.bg-surface-elevated {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* --- PHASE 141: LAYOUT DEBUG MODE --- */
.debug-layout .snap-slide {
    outline: 4px dashed #ff0000 !important;
    /* RED: Viewport/Slide Boundary */
    outline-offset: -4px;
}

.debug-layout .art-card {
    outline: 3px solid #0000ff !important;
    /* BLUE: Card Boundary */
    background: rgba(0, 0, 255, 0.05);
}

.debug-layout .local-ref-pill {
    outline: 2px solid #00ff00 !important;
    /* GREEN: Top Pill */
    background: rgba(0, 255, 0, 0.1);
}

.debug-layout .local-dock {
    outline: 2px solid #ff00ff !important;
    /* MAGENTA: Bottom Dock */
    background: rgba(255, 0, 255, 0.1);
}

.debug-layout .card-content-wrapper {
    outline: 1px dotted #ffffff !important;
    /* WHITE: Text Content Area */
}

/* Dark Mode Overrides */
[data-theme="dark"] .bg-surface-elevated {
    background: #1E293B;
    border-color: #334155;
}

/* --- MATERIAL SYMBOLS (Variable Font config) --- */
.material-symbols-rounded {
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    /* Default: Outlined (FILL 0) */
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    transition: font-variation-settings 0.2s ease;
}

/* Active State: Filled (Material 3 Standard) */
.bible-nav-page .nav-item.active .material-symbols-rounded,
.c4-pill.active .material-symbols-rounded,
/* For Acrylic Setup */
.mode-opt.active .mode-icon,
/* For Setup Sheet */
.material-symbols-rounded.filled {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* --- SETTINGS PAGE POLISH (Concept 6+ Material 3) --- */
.settings-container {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.settings-group {
    background: var(--card-surface);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-subtle);
}

.settings-header {
    padding: 0 10px 8px 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-stone);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.settings-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--card-surface);
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: var(--text-ink);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

.settings-icon {
    color: var(--text-stone);
    font-size: 24px;
    opacity: 0.8;
}

.settings-label {
    flex: 1;
    font-size: 1rem;
    font-weight: 500;
}

.settings-action {
    color: var(--text-stone);
    display: flex;
    align-items: center;
}

/* Toggles (Custom Checkbox) */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    -webkit-appearance: none;
    appearance: none;
    background: #E2E8F0;
    border-radius: 12px;
    outline: none;
    transition: 0.3s;
    cursor: pointer;
}

.toggle-switch:checked {
    background: #4F46E5;
}

.toggle-switch::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    background: #fff;
    transition: 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch:checked::before {
    transform: translateX(20px);
}

[data-theme="dark"] .toggle-switch {
    background: #334155;
}

[data-theme="dark"] .toggle-switch:checked {
    background: #6366F1;
}

/* UNIVERSAL SCROLL FIX (v3.9.17) */
body.enable-scroll {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    min-height: 100vh !important;
    position: static !important;
}


/* --- 1. GLOBAL THEME (Unified) --- */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    /* Bible-Specific Layout Logic */
    --split-ratio: 50fr;
}

body {
    background-color: var(--bg-void);
    color: var(--text-primary);
    font-family: 'Anek Telugu', 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    transition: background 0.3s, color 0.3s;
    overflow: hidden;
    /* Snap container handles scroll */
}

[data-theme="dark"] body {
    background-image: none !important;
}

/* --- HEADER --- */
.bible-nav-page .header {
    background: rgba(var(--bg-paper), 0.8);
    /* Translucent */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    width: 100%;
    height: 60px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    /* Center Logic */
    align-items: center;
    padding: 0 16px;
    z-index: 1000;
    border-bottom: 1px solid var(--border-subtle);
}

.bible-nav-page .logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-ink);
    letter-spacing: -0.5px;
}

.filter-pill-container {
    background: var(--card-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    padding: 4px;
    display: flex;
    gap: 4px;
    position: relative;
    z-index: 9999 !important;
}

.bible-nav-page .pill {
    padding: 6px 16px;
    border-radius: 100px;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-stone);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    pointer-events: auto;
    /* Force Clickable */
}

.bible-nav-page .pill.active {
    background: var(--text-ink);
    color: var(--bg-paper);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* .header-btn { REMOVED LEGACY BLOCK 1 } */

/* --- LIST LAYOUT (Handled inline or via style.css) --- */



/* Gradients */
.bg-grad-1 {
    background: var(--grad-dawn);
}

.bg-grad-2 {
    background: var(--grad-dusk);
}

.bg-grad-3 {
    background: var(--grad-forest);
}

/* Info Area */
.bible-info {
    padding: 12px;
    text-align: center;
}

.book-title {
    font-family: 'Anek Telugu', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-ink);
    margin: 0;
    line-height: 1.2;
}

.book-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: var(--text-stone);
    margin-top: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Reader Specific Styles (Keep as is mostly, just fix colors) */
/* ... (Existing Reader Styles below line 250) */

/* FIXED HEADER Z-INDEX & INTERACTIVITY */
.bible-nav-page .header {
    position: sticky;
    top: 0;
    z-index: 1000;
    /* Ensure on top */
}

.bible-nav-page .logo {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}

/* .header-btn { REMOVED LEGACY BLOCK 2 } */


/* --- 4. LAYOUT STRUCTURE --- */
.main-content {
    /* No padding-top here. We use physical spacers. */
    width: 100%;
    min-height: 100vh;
    padding-bottom: 120px;
    /* Bottom Dock Space */
}

/* Physical Spacer to push content below Fixed Header */
.bible-nav-page .header-spacer {
    width: 100%;
    height: calc(60px + var(--safe-top) + 30px);
    /* Header + Extra buffer */
    min-height: 90px;
    flex-shrink: 0;
}

/* --- 5. FILTER WIDGET (HEADER EMBEDDED) --- */
.filter-pill-container {
    /* Now static inside flex header, but let's keep flex props */
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 9999 !important;
    /* Nuclear Option */
    position: relative;
    pointer-events: auto;
    /* Ensure clickable */
}

/* Scoped .pill to avoid conflicts */
.filter-pill-container .pill {
    padding: 6px 14px;
    border-radius: 100px;
    border: 1px solid var(--border-glass);
    background: rgba(0, 0, 0, 0.05);
    /* Subtle bg for header embed */
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    user-select: none;
}




/* --- 7. READER MODE STYLES (Ported) --- */
.reader-container {
    width: 100%;
    height: 100dvh;
    background: var(--bg-void);
    overflow: hidden;
    position: relative;
}

/* Snap Container */
.snap-container {
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    padding-bottom: 80px;
    /* Dock Space */
}

.snap-slide {
    width: 100%;
    height: 100dvh;
    scroll-snap-align: start;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Art Card */
/* Art Card */
.art-card {
    width: 100%;
    max-width: 500px;
    height: 85vh;
    max-height: 800px;
    background: var(--bg-surface);
    /* Fallback */
    border-radius: 32px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;

    border: 1px solid var(--border-glass);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5);
}

/* REMOVED DUPLICATE .card-body RULE HERE */

.lyric-text {
    font-family: 'Anek Telugu', sans-serif;
    font-weight: 500;
    /* Auto-fit / Fluid Sizing controlled by JS */
    /* font-size: clamp(1.8rem, 4vh + 1vw, 2.8rem); REMOVED to allow JS control */
    line-height: 1.4;
    letter-spacing: 0;
    overflow-wrap: anywhere;
    color: inherit;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
}

[data-theme="light"] .lyric-text {
    text-shadow: none;
}

.english-text {
    margin-top: 20px;
    opacity: 0.7;
    font-size: 1rem;
}

/* --- 8. SETUP MODAL (Acrylic) --- */
.sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sheet-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.acrylic-modal {
    width: 90%;
    max-width: 360px;
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    padding: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    color: white;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sheet-overlay.active .acrylic-modal {
    transform: scale(1);
}

[data-theme="light"] .acrylic-modal {
    background: rgba(255, 255, 255, 0.85);
    color: black;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

.mode-opt {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 12px;
    cursor: pointer;
    border: 1px solid transparent;
}

[data-theme="light"] .mode-opt {
    background: rgba(0, 0, 0, 0.03);
}

.mode-opt.active {
    background: var(--brand-accent);
    color: white;
    border-color: transparent;
}

.save-btn {
    width: 100%;
    padding: 16px;
    border-radius: 100px;
    background: var(--text-primary);
    color: var(--bg-void);
    font-weight: 700;
    font-size: 1rem;
    margin-top: 20px;
}

/* --- 9. BOTTOM NAVIGATION (Matches Home Page .nav) --- */
.bible-nav-page .nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    /* No fixed height, use padding for content */
    background: var(--header-blur);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-glass);

    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;

    /* Metrics from Home Page */
    padding: 12px 0 25px 0;
    /* Extra bottom padding for Home Indicator */
}

.bible-nav-page .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;

    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0.7;
    transition: opacity 0.2s, color 0.2s;
    width: 60px;
}

.bible-nav-page .nav-item.active {
    opacity: 1;
    color: var(--text-primary);
}

.bible-nav-page .nav-item .material-symbols-rounded {
    font-size: 24px;
    /* Standard size */
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    transition: all 0.2s;
}

.bible-nav-page .nav-item.active .material-symbols-rounded {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* --- 10. GRID LAYOUTS (Chapters/Verses) --- */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 12px;
    padding: 20px 16px;
}

.grid-btn {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-family: 'Anek Telugu', sans-serif;
    font-size: 1.1rem;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.grid-btn:hover {
    background: var(--text-primary);
    color: var(--bg-void);
    border-color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.grid-btn:active {
    transform: scale(0.92);
    background: var(--brand-accent);
    color: white;
    border-color: transparent;
}

/* --- SETUP MODAL (Ported) --- */
.sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sheet-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.acrylic-modal {
    width: 90%;
    max-width: 400px;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border-radius: 24px;
    padding: 30px;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sheet-overlay.active .acrylic-modal {
    transform: scale(1);
}

.sheet-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: left;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-weight: 600;
}

.mode-grid {
    display: flex;
    gap: 10px;
}

.mode-opt {
    flex: 1;
    padding: 12px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    background: var(--card-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
}

.mode-opt.active {
    background: var(--brand-accent);
    color: white;
    border-color: var(--brand-accent);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.select-wrapper {
    position: relative;
}

.custom-select {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--card-glass);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    color: var(--text-primary);
    outline: none;
    appearance: none;
    font-weight: 500;
}

.select-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-secondary);
}

#secondaryGroup {
    overflow: hidden;
    transition: all 0.3s;
}

#secondaryGroup.hidden {
    opacity: 0;
    max-height: 0;
    margin-top: -20px;
}

#secondaryGroup.visible {
    opacity: 1;
    max-height: 100px;
    margin-top: 0;
}

.done-btn {
    width: 100%;
    padding: 16px;
    background: var(--text-primary);
    color: var(--bg-void);
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    transition: transform 0.1s;
}

.done-btn:active {
    transform: scale(0.96);
}

/* --- FLUID TOGGLE (v2.7.5) --- */
.toggle-fluid {
    background: var(--card-glass);
    border: 1px solid var(--border-glass);
    border-radius: 99px;
    padding: 6px;
    display: flex;
    position: relative;
    cursor: pointer;
    margin: 0 auto;
    width: 380px;
    /* Wider for full words */
    max-width: 90vw;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2);
}

.toggle-fluid .option {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 2;
    transition: color 0.3s;
    color: var(--text-secondary);
}

.toggle-fluid .option.active {
    color: var(--bg-paper);
    /* Dark text on white slider */
}

/* Specific Logic for Light Mode inverse */
[data-theme="light"] .toggle-fluid .option.active {
    color: var(--text-primary);
}

.toggle-fluid .slider {
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(50% - 6px);
    height: calc(100% - 12px);
    background: var(--text-primary);
    /* White indicator in Dark Mode */
    border-radius: 99px;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .toggle-fluid .slider {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* State Logic */
.toggle-fluid[data-state="right"] .slider {
    transform: translateX(100%);
}

/* --- SEAMLESS FLUSH WALL INTEGRATION (v19) --- */

/* RESET for Flush Wall Module */
.module-wrapper,
.module-wrapper * {
    box-sizing: border-box;
}

.module-wrapper {
    position: relative;
    /* Responsive Width: 100vw - 32px (margins) */
    width: calc(100vw - 32px);
    max-width: 600px;
    /* Cap for Tablet/Desktop */
    margin: 20px auto 40px auto;
    z-index: 10;
}

/* NAV LAYER */
.bible-nav-page .nav-layer {
    position: relative;
    z-index: 20;
    display: flex;
    padding: 0;
    height: 44px;
    /* Reduced Height */
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 22;
}

.tab-btn.active {
    color: var(--text-primary);
    font-weight: 700;
}

/* SHAPE LAYER */
.shape-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: visible;
}

.shape-path {
    fill: var(--bg-surface);
    stroke: var(--border-subtle);
    stroke-width: 1.5px;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.15));
}

[data-theme="light"] .shape-path {
    fill: #ffffff;
    stroke: rgba(0, 0, 0, 0.06);
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.05));
}

/* CONTENT BODY */
.content-body {
    position: relative;
    z-index: 5;
    /* VERTICAL SYMMETRY (12px Gap Top/Bottom) */
    margin-top: 0;

    padding: 12px;

    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Card gap */
    min-height: 300px;
}

/* CARD ITEMS (v19 Style) */
.card-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    background: var(--card-glass);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    text-decoration: none;
    /* For <a> tags */
    color: inherit;
}

.card-item:hover {
    background: var(--border-subtle);
    transform: translateX(4px);
}

.icon-box {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
    font-family: 'Fraunces', serif;
    letter-spacing: 0.5px;
}

/* Cyclic Gradients (Synced with Theme Variables or Hardcoded for simplicity) */
/* Using the predefined vars from v19 preview mapped to existing vars if possible, 
   or defining new local ones. Let's use specific hexes for the requested look. */

/* DARK MODE GRADIENTS */
[data-theme="dark"] .card-item:nth-child(4n+1) .icon-box {
    background: linear-gradient(135deg, #475569, #1e293b);
    color: #e2e8f0;
}

[data-theme="dark"] .card-item:nth-child(4n+2) .icon-box {
    background: linear-gradient(135deg, #334155, #0f172a);
    color: #cbd5e1;
}

[data-theme="dark"] .card-item:nth-child(4n+3) .icon-box {
    background: linear-gradient(135deg, #64748b, #334155);
    color: #f1f5f9;
}

[data-theme="dark"] .card-item:nth-child(4n+4) .icon-box {
    background: linear-gradient(135deg, #94a3b8, #475569);
    color: #f8fafc;
}

/* LIGHT MODE GRADIENTS */
[data-theme="light"] .card-item:nth-child(4n+1) .icon-box {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    color: #334155;
}

[data-theme="light"] .card-item:nth-child(4n+2) .icon-box {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: #475569;
}

[data-theme="light"] .card-item:nth-child(4n+3) .icon-box {
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
    color: #1e293b;
}

[data-theme="light"] .card-item:nth-child(4n+4) .icon-box {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    color: #0f172a;
}


.info-col {
    display: flex;
    flex-direction: column;
}

.info-title {
    font-family: 'Anek Telugu', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 2px;
    line-height: 1.2;
}

.info-sub {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* --- 12. IMMERSIVE READER ENGINE (v3.9.1) --- */

/* STRATIFIED Z-INDEXES */
/* 2000+: Fixed Overlays (Header, Dock)
   1000: Navigation/Search
   500: Drag Handles
   100: Cards/Content */

/* SNAP ARCHITECTURE */
.reader-mode {
    background-color: var(--bg-void);
    overflow: hidden;
    /* Body doesn't scroll, Snap Container does */
}

.snap-container {
    width: 100%;
    height: 100dvh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.snap-container::-webkit-scrollbar {
    display: none;
}

.snap-slide {
    width: 100%;
    height: 100dvh;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 0 16px;
}

/* FIXED HEADER ROW (Refactored to Flexbox v3.9.8) */
.bible-nav-page .header-row {
    position: fixed;
    top: calc(var(--safe-top) + 12px);
    left: 0;
    width: 100%;
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Pushes buttons to edges */
    pointer-events: none;
    padding: 0 max(16px, env(safe-area-inset-right) + 16px);
    padding-left: max(16px, env(safe-area-inset-left) + 16px);
    gap: 12px;
}

/* Flex Buttons (Fluid UI) */
.bible-nav-page .header-btn {
    position: relative;
    /* layout flow */
    transform: none;
    top: auto;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    /* Prevent crushing */
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-float);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bible-nav-page .header-btn:active {
    transform: scale(0.92);
}

/* Global Pill (Relocated v3.9.9) */
.global-header-pill {
    position: fixed;
    /* Stacked below header (Safe Top + 64px) */
    /* Stacked below header (Safe Top + 50px) - Tighter v3.9.13 */
    top: calc(var(--safe-top) + 50px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;

    display: flex;
    align-items: center;
    justify-content: center;

    /* Compact Symmetric dimensions (v3.9.10) */
    height: 48px;
    width: auto;
    min-width: 140px;
    max-width: 90vw;

    padding: 0 16px;
    gap: 6px;
    border-radius: 99px;

    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    /* Lighter shadow */

    pointer-events: auto;
    transition: all 0.3s ease;
}

.ghp-slot {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    /* Reduced Grid Gap */
    min-width: 0;
    height: 100%;
}

.ghp-text {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Compact Font for v3.9.9 */
    font-size: clamp(0.9rem, 1.25dvw + 0.5rem, 1.1rem);

    /* Robust Line Height for Descenders/Ascenders */
    line-height: 1.8;
    padding: 4px 0;
    /* Vertical safety buffer */
}

.ghp-text.te {
    font-family: 'Anek Telugu', sans-serif;
}

.ghp-text.en {
    font-family: 'Inter', sans-serif;
    opacity: 0.6;
}

.ghp-center-badge {
    background: var(--brand-accent);
    color: white;
    padding: 0 clamp(12px, 1.5dvw, 24px);
    height: clamp(24px, 3.5dvh, 32px);
    display: flex;
    align-items: center;
    border-radius: 50px;
    font-weight: 700;
    font-size: clamp(0.85rem, 1.2dvw, 1.1rem);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* SPLIT ENGINE (The Card) */
.split-engine {
    display: grid;
    position: relative;
    overflow: hidden;
    /* DEFAULT: PORTRAIT (Mobile) */
    width: 90dvw;
    /* Calculate available height: 100dvh - (Top 104 + Bottom 86) */
    /* Reduced subtractor to 190px for tighter fit */
    height: calc(100dvh - 190px - var(--safe-bottom) - var(--safe-top));
    max-height: 850px;
    min-height: 380px;
    margin-top: calc(var(--safe-top) + 104px);
    /* Push down to clear fixed header + pill */


    background: var(--bg-surface);
    border-radius: 28px;
    box-shadow: var(--shadow-float);
    border: 1px solid var(--border-glass);

    grid-template-columns: 1fr;
    /* Grid track using dvh for vertical split */
    grid-template-rows: var(--split-vh, 35dvh) 8px 1fr;
    transition: width 0.3s, height 0.3s;
}

/* LANDSCAPE SPLIT */
@media (orientation: landscape) {
    .snap-container {
        scroll-snap-type: x mandatory;
        display: flex;
        overflow-x: scroll;
        overflow-y: hidden;
    }

    .snap-slide {
        min-width: 100dvw;
    }

    .split-engine {
        width: 85dvw;
        height: 85dvh;
        margin-top: 0;
        grid-template-rows: 100%;
        /* Grid track using dvw for horizontal split */
        grid-template-columns: var(--split-vw, 42dvw) 8px 1fr;
    }


}

.pane {
    overflow-y: auto;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    /* Safe Center prevents top-clipping of overflowing content */
    justify-content: safe center;
    align-items: center;
    text-align: center;
    position: relative;
}

.pane.first {
    background: transparent;
}

.pane.second {
    background: rgba(128, 128, 128, 0.05);
}

.lyric-text {
    font-family: 'Anek Telugu', sans-serif;
    /* Reduced Minimum for iPhone SE */
    font-size: clamp(1.2rem, 4vh, 2.5rem);
    line-height: 1.4;
    color: var(--text-primary);
}

.english-text {
    font-family: 'Inter', sans-serif;
    /* Reduced Minimum for iPhone SE */
    font-size: clamp(0.9rem, 2dvw + 1vh, 2.2rem);
    line-height: 1.5;
    color: var(--text-secondary);
}

/* DRAG SEAM */
.drag-seam {
    background: var(--border-glass);
    z-index: 100;
    position: relative;
    cursor: ns-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Expanding hit area without affecting grid tracks */
    min-height: 20px;
    margin: -6px 0;
}

@media (orientation: landscape) {
    .drag-seam {
        cursor: col-resize;
        min-width: 20px;
        min-height: 100%;
        margin: 0 -6px;
    }
}

.drag-handle {
    width: 40px;
    height: 2px;
    /* Thinner for premium feel */
    background: rgba(128, 128, 128, 0.4);
    border-radius: 10px;
}

@media (orientation: landscape) {
    .drag-handle {
        width: 2px;
        height: 40px;
    }
}

/* BOTTOM DOCK */
.unified-dock {
    position: fixed;
    bottom: calc(var(--safe-bottom) + 32px);
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    /* Auto width */
    min-width: 140px;
    padding: 0 16px;
    height: 48px;
    /* Symmetric Match */
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-float);
    z-index: 2500;
}

.icon-capsule {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
}

.icon-capsule:hover {
    background: rgba(128, 128, 128, 0.1);
}

.icon-capsule:active {
    transform: scale(0.9);
}

.icon-capsule span {
    font-size: 24px;
    vertical-align: middle;
}

.dock-divider {
    width: 1px;
    height: 24px;
    background: var(--border-glass);
    margin: 0 12px;
}

/* DARK THEME SPECIFICS */
[data-theme="dark"] .pane.second {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .drag-handle {
    background: rgba(255, 255, 255, 0.2);
}

/* LANDSCAPE COMPACT OVERRIDES (v3.9.14: Right Dock) - RELOCATED TO END FOR SPECIFICITY */
@media (orientation: landscape) and (max-height: 500px) {
    .global-header-pill {
        top: 4px;
        /* Lift slightly */
        height: 40px;
        /* Slightly taller for full text */

        /* FULL WIDTH FIX */
        transform: translateX(-50%);
        /* Remove scale(0.9) */
        width: auto !important;
        min-width: 240px;
        /* Ensure space for "Thessalonians" */
        max-width: 85vw;
        padding: 0 24px;

        z-index: 2501;
    }

    /* Move Dock to Right */
    .unified-dock {
        bottom: auto;
        left: auto;
        /* Force Right Positioning */
        right: 16px;
        /* Vertically Centered (slightly lower to clear header icons) */
        top: 60%;
        transform: translateY(-50%);
        z-index: 2505;
        /* High Z */

        width: 44px;
        min-width: 0;
        height: auto;
        flex-direction: column;
        padding: 12px 0;
    }

    .dock-divider {
        width: 24px;
        height: 1px;
        margin: 8px 0;
    }

    .split-engine {
        /* Regain Vertical Space (Dock is gone) */
        /* BIGGER GAPS: 84px Top / 84px Bottom */
        margin-top: 84px;

        /* SUBTRACT Safe Bottom + Top Gap + Bottom Gap */
        height: calc(100dvh - 168px - var(--safe-bottom));

        /* Card Width: Total - Dock (80px) - Left Gap (80px) = Symmetric 80px Margins */
        width: calc(100dvw - 160px);
        margin-left: auto;
        margin-right: auto;
        /* Handled by width */
        /* Force clearance */
    }

    .pane {
        padding: 16px;
    }
}

/* DYNAMIC BOOK NAME LENGTH (v3.9.15) */
.bk-full {
    display: none;
}

.bk-short {
    display: inline;
}

@media (orientation: landscape) {
    .bk-full {
        display: inline;
    }

    .bk-short {
        display: none;
    }
}

/* UNIVERSAL GRID LAYOUT (v4.0) - The "Holy Grail" */
:root {
    --safe-top: env(safe-area-inset-top, 20px);
    --safe-bottom: env(safe-area-inset-bottom, 20px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);

    /* Colors */
    --bg-surface: rgba(255, 255, 255, 0.85);
    --bg-void: #121212;
    --text-primary: #1a1918;
    --text-secondary: #57534e;
    --border-glass: rgba(0, 0, 0, 0.08);
    --shadow-float: 0 8px 32px rgba(0, 0, 0, 0.08);
    --card-glass: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] {
    --bg-surface: rgba(30, 30, 30, 0.65);
    --bg-void: #000000;
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --border-glass: rgba(255, 255, 255, 0.1);
    --shadow-float: 0 8px 32px rgba(0, 0, 0, 0.5);
    --card-glass: rgba(20, 20, 20, 0.7);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body.reader-mode {
    margin: 0;
    padding: 0;
    background: var(--bg-void);
    color: var(--text-primary);
    overflow: hidden;
    /* Strict containment */
    font-family: 'Anek Telugu', sans-serif;
}

/* --- THE UNIVERSAL GRID --- */
.tech-grid {
    display: grid;
    width: 100vw;
    height: 100dvh;

    /* Vertical Layout (Portrait Default) */
    /* Row 1: Header/Pill (Auto sizing) */
    /* Row 2: Card (Flex 1 - Takes remaining space) */
    /* Row 3: Bottom Dock (Auto sizing) */
    grid-template-rows: auto 1fr auto;
    grid-template-columns: 100%;

    /* Safe Area Padding applied to CONTAINER, not elements */
    padding-top: var(--safe-top);
    padding-bottom: var(--safe-bottom);
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);

    gap: 16px;
    /* Global Gap */
}

/* --- GRID AREAS --- */

/* 1. HEADER ROW (Back Button + Pill) */
/* We group these visually in the grid's top row */
.bible-nav-page .header-row {
    position: absolute;
    top: calc(var(--safe-top) + 16px);
    left: var(--safe-left);
    width: 100%;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    /* Let clicks pass through to Pill if needed */
    z-index: 10;
}

.bible-nav-page .header-btn {
    pointer-events: auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    cursor: pointer;
}

/* The Pill sits in the grid flow */
.global-header-pill {
    grid-row: 1;
    justify-self: center;
    align-self: center;

    /* Dimensions */
    height: 52px;
    width: auto;
    min-width: 240px;
    max-width: 80%;
    padding: 0 20px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: 100px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-float);
    z-index: 5;

    /* Top margin to clear "Back" buttons if they overlap, 
       but normally Grid handles this. 
       Actually, back button is absolute. 
       Let's add slight margin to breathe. */
    margin-top: 4px;
}

/* Text Styles */
.ghp-text {
    font-weight: 600;
    font-size: 1rem;
}

.ghp-center-badge {
    background: rgba(128, 128, 128, 0.1);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
}

.bk-full {
    display: none;
}

.bk-short {
    display: inline;
}

/* 2. MAIN CONTENT (SNAP CONTAINER) */
.snap-container {
    grid-row: 2;
    width: 100%;
    height: 100%;
    /* Fill the Grid Cell */

    /* Scroll Logic */
    overflow-y: scroll;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    display: flex;
    flex-direction: column;

    /* No margins needed! The Grid Gap handles it. */
    border-radius: 24px;
    /* Optional: Clip content to rounded corners */
}

.snap-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    padding: 0;
    /* Flush to grid cell */
}

/* The Card Itself */
.split-engine {
    width: 100%;
    height: 100%;
    background: var(--card-surface);
    border: 1px solid var(--border-glass);
    border-radius: 24px;

    display: grid;
    grid-template-rows: 1fr 10px 1fr;
    /* Portrait Split */
    overflow: hidden;
}

.pane {
    overflow-y: auto;
    padding: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Safe center */
    justify-content: safe center;
}

.lyric-text {
    font-size: clamp(1.4rem, 4vh, 2.2rem);
    line-height: 1.4;
}

.english-text {
    font-size: clamp(1rem, 2.5vh, 1.6rem);
    color: var(--text-secondary);
}

/* Drag Handle */
.drag-seam {
    background: var(--border-glass);
    cursor: row-resize;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drag-handle {
    width: 40px;
    height: 4px;
    background: var(--text-secondary);
    border-radius: 10px;
    opacity: 0.3;
}

/* 3. BOTTOM DOCK */
.unified-dock {
    grid-row: 3;
    justify-self: center;
    align-self: center;

    height: 52px;
    padding: 0 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: 100px;
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    gap: 16px;

    /* Bottom Margin handled by Grid Padding-Bottom (Safe Area) */
}

.icon-capsule {
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
}

.dock-divider {
    width: 1px;
    height: 20px;
    background: var(--border-glass);
}

/* --- LANDSCAPE TRANSFORMATION --- */
@media (orientation: landscape) {
    .tech-grid {
        /* Change Grid Flow */
        grid-template-columns: 1fr auto;
        /* Main | Dock */
        grid-template-rows: auto 1fr;
        /* Header | Main */

        grid-template-areas:
            "header header"
            "main   dock";

        gap: 0;
        /* Precise control */
    }

    /* 1. HEADER (Spans Top) */
    .global-header-pill {
        grid-area: header;
        margin-top: 0;
        margin-bottom: 8px;
        /* Gap below pill */
    }

    .bk-full {
        display: inline;
    }

    .bk-short {
        display: none;
    }

    /* 2. MAIN (Left Large Area) */
    .snap-container {
        grid-area: main;
        /* Horizontal Scroll for Cards in Landscape? Or just 1 card? */
        /* User usually wants horizontal scroll in landscape */
        flex-direction: row;
        overflow-x: scroll;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;

        /* Margins for aesthetics */
        margin-right: 16px;
        /* Gap to dock */
    }

    .snap-slide {
        padding: 0 40px;
        /* Center with breathing room */
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .split-engine {
        /* Fixed Aspect Size or Flexible? 
           User liked "Floating" look. 
           Let's make it responsive but contained. */
        width: 100%;
        height: 100%;
        max-width: 1000px;

        grid-template-columns: 1fr 10px 1fr;
        grid-template-rows: 100%;
    }

    .drag-seam {
        cursor: col-resize;
    }

    .drag-handle {
        width: 4px;
        height: 40px;
    }

    /* 3. DOCK (Right Column) */
    .unified-dock {
        grid-area: dock;
        flex-direction: column;
        width: 52px;
        height: auto;
        padding: 20px 0;
        align-self: center;
        margin-left: 0;
    }

    .dock-divider {
        width: 20px;
        height: 1px;
    }
}

/* SCIP: style.css consolidated */

/* --- SONG READER PAGE STYLES --- */
.song-reader-page {
    --bg-void: #09090b;
    --card-glass: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.1);
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --icon-btn-bg: transparent;
    --icon-color: #fff;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --header-bg: transparent;
    --btn-glass: rgba(255, 255, 255, 0.05);

    background-color: var(--bg-void);
    color: var(--text-primary);
    font-family: 'Anek Telugu', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

[data-theme="light"] .song-reader-page {
    --bg-void: #f5f5f7;
    --card-glass: rgba(255, 255, 255, 0.65);
    --border-glass: rgba(0, 0, 0, 0.05);
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --icon-btn-bg: transparent;
    --icon-color: #1d1d1f;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --header-bg: transparent;
    --btn-glass: rgba(255, 255, 255, 0.8);
}

.song-reader-page .snap-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100dvh;
    overflow-y: scroll;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-top: 140px;
}

.song-reader-page .snap-container::-webkit-scrollbar {
    display: none;
}

.song-reader-page .snap-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    position: relative;
}

@media (orientation: landscape) {
    .song-reader-page .snap-container {
        flex-direction: row;
        overflow-x: scroll;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
    }

    .song-reader-page .snap-slide {
        width: 100vw;
    }

    .song-reader-page .art-card {
        height: 85vh;
        width: 80vw;
        max-width: 900px;
        flex-direction: row;
        gap: 40px;
    }
}

.song-reader-page .art-card {
    width: 85vw;
    height: 70vh;
    max-width: 500px;
    max-height: 800px;
    background: var(--card-glass) !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: 32px;
    box-shadow: 0 25px 50px -12px var(--shadow-color), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.song-reader-page .card-header {
    height: 60px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.1);
    font-family: 'Anek Telugu', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    z-index: 2;
}

.song-reader-page .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
    position: relative;
    z-index: 2;
    width: 100%;
}

.song-reader-page .card-footer {
    height: 60px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.song-reader-page .glow-orb {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, var(--glow-color, #8b5cf6), transparent 70%);
    opacity: 0.15;
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 0;
    transition: background 0.5s ease;
}

.song-reader-page .lyric-text {
    font-family: 'Anek Telugu', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    line-height: clamp(1.5, 5vw, 1.8);
    word-spacing: clamp(0.1rem, 1vw, 0.3rem);
    font-weight: 500;
    color: inherit !important;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.song-reader-page .immersive-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 1000;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    box-sizing: border-box;
    background: transparent;
}

.song-reader-page .header-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.song-reader-page .global-header-pill,
.song-reader-page .unified-dock {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    background: rgba(22, 22, 22, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    height: 52px;
    padding: 0 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 280px;
    min-width: 280px;
}

.song-reader-page .global-header-pill {
    top: 60px;
}

.song-reader-page .unified-dock {
    bottom: 60px;
}

/* --- BIBLE READER PAGE STYLES --- */
.bible-reader-page {
    background: var(--bg-paper);
    overflow: hidden;
    margin: 0;
}

.bible-reader-page .snap-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100dvh;
    overflow-y: scroll;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

/* High Contrast: Remove Shadows/Glass if desired, or keep minimal */

.bible-reader-page .art-card {
    width: 92vw;
    height: 85vh;
    max-height: 850px;
    max-width: 500px;
    margin: 0 auto;

    /* PURE OPAQUE CARD */
    background: var(--card-surface) !important;
    border: 1px solid var(--border-glass) !important;
    /* Keep subtle border for definition */
    border-radius: 32px;

    /* Remove Glass */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;

    /* Clean Shadow */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;

    display: flex;
    flex-direction: column;
    text-align: center;
}

[data-theme="dark"] .bible-reader-page .art-card {
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    /* Higher contrast border for pitch black on pitch black */
    box-shadow: none !important;
    /* Flat in dark mode */
}

@media (orientation: landscape) {
    .bible-reader-page .snap-container {
        flex-direction: row;
        overflow-x: scroll;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
    }

    .bible-reader-page .art-card {
        width: 88vw;
        height: 88vh;
        max-width: 1200px;
    }
}

.bible-reader-page .global-header-pill,
.bible-reader-page .unified-dock {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    height: 52px;
    padding: 0 12px;
    border-radius: 100px;

    /* OPAQUE CONTROLS */
    background: var(--card-surface);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    /* Lifted */

    /* Ensure text contrast in controls */
    color: var(--text-ink);

    /* Default (Mobile/Pill) sizes */
    width: 280px;
}

[data-theme="dark"] .bible-reader-page .global-header-pill,
[data-theme="dark"] .bible-reader-page .unified-dock {
    background: #111111;
    /* Slight elevation from pitch black bg */
    border: 1px solid #333;
}

.bible-reader-page .global-header-pill {
    top: calc(7.5vh + 10px);
}

.bible-reader-page .unified-dock {
    bottom: calc(7.5vh + 10px);
}

.bible-reader-page .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: transparent !important;
}

/* --- EMERGENCY FIXES PHASE 99 --- */

/* 1. Global Bottom Nav in Reader */
.bible-reader-page .nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    /* Above everything */
    background: var(--bg-paper);
    /* Ensure visibility */
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-around;
    padding: 6px 0;
    /* PHASE 101: Thinner */
    height: 50px;
    /* Explicit thinner height */
    box-sizing: border-box;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
    /* Added Shadow */
}

.bible-reader-page .nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    /* Smaller text */
    gap: 2px;
    /* Consistent gap */
}

.bible-reader-page .nav-item span {
    font-size: 20px;
    /* Smaller icons */
    margin-bottom: 2px;
}

.bible-reader-page .nav-item.active {
    color: var(--primary-action);
}

/* 2. Fix Card Overlap & Scroll Snap */
.bible-reader-page .snap-container {
    height: 100vh;
    padding-top: 60px;
    /* Clear Header */
    padding-bottom: 60px;
    /* Clear Nav (50px + 10px gap) */
    box-sizing: border-box;
    scroll-padding-top: 60px;
    /* Snap Alignment */
    background: var(--bg-paper);
}

.bible-reader-page .snap-slide {
    height: 100%;
    /* Fill the container space minus padding */
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: center;
    padding-bottom: 10px;
    /* PHASE 101: Visible Bottom Gap */
}

.bible-reader-page .art-card {
    width: 92%;
    height: auto;
    /* Allow auto height calculation */
    flex: 1;
    /* Fill check */
    margin: 0;
    border-radius: 24px;
    /* Slightly tighter radius */
    border-bottom: 1px solid var(--border-subtle) !important;
    /* Visible Border */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    position: relative;
    z-index: 5;
}

/* 2B. Ensure Gap from Nav & Header */
/* 2B. Ensure Gap from Nav & Header */
.bible-reader-page .snap-slide {
    height: 100dvh;
    /* Full Viewport */
    display: flex;
    flex-direction: column;
    /* CENTERING LOGIC - MAXIMIZED */
    padding-top: 40px !important;
    /* Reduced from 70px */
    padding-bottom: 30px !important;
    /* Reduced from 70px */
    box-sizing: border-box;
    justify-content: center;
}

/* Force Card to Fill Available Space (pushing dock down) */
.bible-reader-page .art-card {
    width: 90%;
    /* Fill vertical space defined by padding */
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0 !important;
    border: 1px solid var(--border-subtle) !important;
    /* Push dock to bottom */
}

/* 3. Local Dock Orientation Force */
.local-dock {
    flex-direction: row !important;
    display: flex !important;
    gap: 15px !important;
    /* Stack to bottom */
}

/* 4. Reading Mode Z-Index Fix*/
.immersive-header {
    z-index: 2001 !important;
    /* Above Card */
    background: transparent !important;
    /* FIX VIGNETTE */
}

/* 5. Light Mode Corner Fix */
/* Ensure body background matches header/safe-area in light mode so corners don't look dark */
[data-theme="light"].bible-reader-page {
    background-color: #F9FAFB !important;
    /* Light Grey/White */
}

[data-theme="light"] .immersive-header {
    background: #F9FAFB !important;
    /* Match Body */
}

/* 6. Dock Content Overflow & Symmetry */
.local-dock {
    flex-direction: row !important;
    display: flex !important;
    gap: 16px !important;
    margin-top: auto;
    /* Push to bottom */
    padding-bottom: 10px !important;
    /* Reduced from 20px */
    padding-top: 5px;
    /* Reduced from 10px */
    justify-content: center;
    flex-shrink: 0;
    width: 100%;
    /* Full width */
}

.local-dock .icon-capsule {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    /* Force Round */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-primary);
    padding: 0 !important;
}