/* ===== Global Touch Fix ===== */
html {
    touch-action: manipulation;
}

@font-face {
    font-family: 'BillaMount';
    src: url('fonts/BillaMount-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ===== CSS Variables & Reset ===== */
:root {
    /* Sacred Light — Parchment / Daylight */
    --bg-primary: #EFE8DA;
    --bg-secondary: #E5DBC8;
    --bg-sidebar: #E5DBC8;
    --bg-sidebar-hover: #D8CCB5;
    --bg-sidebar-active: #CBBCA1;
    --bg-card: #F5F0E4;
    --bg-card-alt: rgba(240, 234, 220, 0.85);
    --text-primary: #352A1E;
    --text-secondary: #6B5D4D;
    --text-muted: #9C8B78;
    --text-sidebar: #6B5D4D;
    --text-sidebar-active: #352A1E;
    --accent: #C49A2A;
    --accent-dark: #9A7820;
    --accent-light: #C89B18;

    --accent-soft: rgba(196, 154, 42, 0.1);
    --accent-border: rgba(196, 154, 42, 0.22);
    --border: rgba(60, 44, 24, 0.08);
    --border-strong: rgba(60, 44, 24, 0.14);
    --shadow-sm: 0 1px 4px rgba(40, 30, 16, 0.06), 0 0 1px rgba(40, 30, 16, 0.08);
    --shadow-md: 0 4px 20px rgba(40, 30, 16, 0.08), 0 1px 3px rgba(40, 30, 16, 0.06);
    --shadow-lg: 0 12px 48px rgba(40, 30, 16, 0.12), 0 2px 8px rgba(40, 30, 16, 0.06);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --radius-xl: 40px;
    --sidebar-width: 300px;
    --font-serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: 0.45s ease;
    --transition-slow: 0.7s ease;
    --glass-bg: rgba(240, 234, 220, 0.95);
    --glass-border: rgba(180, 150, 80, 0.15);
    --glass-blur: blur(0px);
}

/* Dark Mode */
[data-theme="dark"] {
    /* Sacred Dark — Manuscript / Candlelight */
    --bg-primary: #1A1612;
    --bg-secondary: #221C16;
    --bg-sidebar: #12100C;
    --bg-sidebar-hover: #1E1A14;
    --bg-sidebar-active: #2E2820;
    --bg-card: #252018;
    --bg-card-alt: rgba(34, 28, 20, 0.9);
    --text-primary: #E6DBC8;
    --text-secondary: #A89878;
    --text-muted: #786848;
    --text-sidebar: #9A8868;
    --text-sidebar-active: #F0E4CC;
    --accent: #DAA520;
    --accent-dark: #C49A2A;
    --accent-light: #F0C848;

    --accent-soft: rgba(218, 165, 32, 0.08);
    --accent-border: rgba(218, 165, 32, 0.18);
    --border: rgba(255, 220, 150, 0.05);
    --border-strong: rgba(255, 220, 150, 0.1);
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.45);

    --glass-bg: rgba(34, 28, 20, 0.95);
    --glass-border: rgba(196, 154, 42, 0.1);
}
/* Sepia Mode - Candlelit Parchment */
[data-theme="sepia"] {
    --bg-primary: #E8DCC4;
    --bg-secondary: #DED0B4;
    --bg-sidebar: #D6C8A8;
    --bg-sidebar-hover: #CFC098;
    --bg-sidebar-active: #C4B488;
    --bg-card: #F0E6D0;
    --bg-card-alt: rgba(240, 230, 208, 0.95);
    --text-primary: #3E2E1C;
    --text-secondary: #5A4630;
    --text-muted: #8A7458;
    --text-sidebar: #4E3C28;
    --text-sidebar-active: #2E1E10;
    --accent: #A06820;
    --accent-dark: #8A5818;
    --accent-light: #C89B18;

    --accent-soft: rgba(160, 104, 32, 0.08);
    --accent-border: rgba(160, 104, 32, 0.22);
    --border: rgba(120, 90, 40, 0.15);
    --border-strong: rgba(120, 90, 40, 0.25);
    --shadow-sm: 0 1px 4px rgba(80, 60, 20, 0.10);
    --shadow-md: 0 4px 20px rgba(80, 60, 20, 0.14);
    --shadow-lg: 0 12px 48px rgba(80, 60, 20, 0.18);

    --glass-bg: rgba(232, 220, 196, 0.97);
    --glass-border: rgba(160, 120, 50, 0.18);
}
/* Black Mode - True AMOLED Black */
[data-theme="black"] {
    --bg-primary: #000000;
    --bg-secondary: #080808;
    --bg-sidebar: #000000;
    --bg-sidebar-hover: #111111;
    --bg-sidebar-active: #1A1A1A;
    --bg-card: #0A0A0A;
    --bg-card-alt: rgba(10, 10, 10, 0.95);
    --text-primary: #CCCCCC;
    --text-secondary: #999999;
    --text-muted: #666666;
    --text-sidebar: #888888;
    --text-sidebar-active: #DDDDDD;
    --accent: #DAA520;
    --accent-dark: #B8901A;
    --accent-light: #F0C848;

    --accent-soft: rgba(218, 165, 32, 0.05);
    --accent-border: rgba(218, 165, 32, 0.14);
    --border: rgba(255, 255, 255, 0.04);
    --border-strong: rgba(255, 255, 255, 0.08);
    --shadow-sm: none;
    --shadow-md: 0 2px 12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.8);

    --glass-bg: rgba(0, 0, 0, 0.98);
    --glass-border: rgba(218, 165, 32, 0.08);
}



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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    transition: background var(--transition-slow), color var(--transition-slow);
}

/* Subtle background texture */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 25% 15%, rgba(196, 154, 42, 0.08) 0%, transparent 45%),
        radial-gradient(ellipse at 75% 85%, rgba(160, 130, 60, 0.05) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 50%, rgba(200, 170, 100, 0.03) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Suppress warm gradient overlay on Black theme */
[data-theme="black"] body::before {
    background: none !important;
}


/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition);
    overflow: hidden;
    border-right: 1px solid rgba(180, 150, 80, 0.06);
}

/* Sidebar gradient overlay */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(180deg, rgba(196, 154, 42, 0.06) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.sidebar>* {
    position: relative;
    z-index: 1;
}

.sidebar-header {
    padding: 32px 24px 20px;
    border-bottom: 1px solid var(--border-strong);
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--accent-light);
    letter-spacing: -0.01em;
    max-width: calc(100% - 40px);
    position: relative;
    z-index: 1;
}

.logo-sub {
    font-size: 0.65rem;
    color: rgba(196, 154, 42, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-top: 4px;
}

/* Theme Toggle */
.theme-toggle {
    position: absolute;
    top: 32px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all var(--transition);
    color: var(--text-sidebar);
    z-index: 10;
}

.theme-toggle:hover {
    background: var(--bg-card-alt);
    color: var(--accent-light);
    transform: rotate(20deg);
}

/* Font Size Controls (inside autoscroll bar) */
.font-size-ctrl {
    display: flex;
    gap: 2px;
    margin-right: 8px;
}

.font-btn {
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
    color: var(--text-muted);
    font-family: var(--font-serif);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 11px;
    cursor: pointer;
    transition: all var(--transition);
    line-height: 1;
    touch-action: manipulation;
}

.font-btn-down {
    border-radius: 8px 0 0 8px;
}

.font-btn-up {
    border-radius: 0 8px 8px 0;
}

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

.font-btn:disabled {
    opacity: 0.25;
    cursor: default;
}

/* Font size scaling — targets elements with explicit font-size */
[data-font-size="1"] .verse-text {
    font-size: 0.88rem;
    line-height: 1.7;
}

[data-font-size="2"] .verse-text {
    font-size: 1.02rem;
    line-height: 1.85;
}

/* level 3 is default (1.22rem) — no override */
[data-font-size="4"] .verse-text {
    font-size: 1.42rem;
    line-height: 2.3;
}

[data-font-size="5"] .verse-text {
    font-size: 1.65rem;
    line-height: 2.5;
}

[data-font-size="1"] .book-title {
    font-size: 2.4rem;
}

[data-font-size="2"] .book-title {
    font-size: 2.8rem;
}

[data-font-size="4"] .book-title {
    font-size: 3.8rem;
}

[data-font-size="5"] .book-title {
    font-size: 4.4rem;
}

[data-font-size="1"] .passage-title {
    font-size: 0.95rem;
}

[data-font-size="2"] .passage-title {
    font-size: 1.05rem;
}

[data-font-size="4"] .passage-title {
    font-size: 1.45rem;
}

[data-font-size="5"] .passage-title {
    font-size: 1.7rem;
}

[data-font-size="1"] #summaryText {
    font-size: 0.82rem;
}

[data-font-size="2"] #summaryText {
    font-size: 0.9rem;
}

[data-font-size="4"] #summaryText {
    font-size: 1.15rem;
}

[data-font-size="5"] #summaryText {
    font-size: 1.35rem;
}

[data-font-size="1"] #takeawayText {
    font-size: 0.82rem;
}

[data-font-size="2"] #takeawayText {
    font-size: 0.9rem;
}

[data-font-size="4"] #takeawayText {
    font-size: 1.15rem;
}

[data-font-size="5"] #takeawayText {
    font-size: 1.35rem;
}

[data-font-size="1"] .takeaway-title {
    font-size: 1rem;
}

[data-font-size="2"] .takeaway-title {
    font-size: 1.1rem;
}

[data-font-size="4"] .takeaway-title {
    font-size: 1.5rem;
}

[data-font-size="5"] .takeaway-title {
    font-size: 1.7rem;
}

[data-font-size="1"] .book-full-title {
    font-size: 0.8rem;
}

[data-font-size="2"] .book-full-title {
    font-size: 0.88rem;
}

[data-font-size="4"] .book-full-title {
    font-size: 1.1rem;
}

[data-font-size="5"] .book-full-title {
    font-size: 1.25rem;
}

[data-font-size="1"] .passage-ref {
    font-size: 0.65rem;
}

[data-font-size="2"] .passage-ref {
    font-size: 0.72rem;
}

[data-font-size="4"] .passage-ref {
    font-size: 0.9rem;
}

[data-font-size="5"] .passage-ref {
    font-size: 1rem;
}

[data-font-size="1"] .chrono-panel {
    font-size: 0.78rem;
}

[data-font-size="2"] .chrono-panel {
    font-size: 0.85rem;
}

[data-font-size="4"] .chrono-panel {
    font-size: 1.05rem;
}

[data-font-size="5"] .chrono-panel {
    font-size: 1.2rem;
}

.sidebar-search {
    padding: 12px 16px;
}

.sidebar-search input {
    width: 100%;
    padding: 10px 16px;
    background: var(--bg-sidebar-hover);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-sidebar-active);
    font-family: var(--font-sans);
    font-size: 0.82rem;
    outline: none;
    transition: all var(--transition);
}

.sidebar-search input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.sidebar-search input:focus {
    border-color: var(--accent-dark);
    background: var(--bg-sidebar-active);
    box-shadow: 0 0 20px rgba(196, 154, 42, 0.08);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}

.testament-title {
    font-family: var(--font-sans);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    padding: 20px 24px 8px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color var(--transition);
}

.testament-title:hover {
    color: var(--accent-light);
}

.testament-title::before {
    content: '\25BE';
    font-size: 0.65rem;
    transition: transform var(--transition);
    opacity: 0.6;
}

.testament-title.collapsed::before {
    transform: rotate(-90deg);
}

.book-list {
    list-style: none;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.book-list.collapsed {
    max-height: 0 !important;
}

.book-item {
    display: flex;
    align-items: center;
    gap: 0;
}

.book-item a {
    flex: 1;
    display: block;
    padding: 8px 24px 8px 28px;
    color: var(--text-sidebar);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 400;
    transition: all var(--transition);
    cursor: pointer;
    border-left: 2px solid transparent;
    position: relative;
}

.book-item a:hover {
    background: var(--bg-sidebar-hover);
    color: var(--text-sidebar-active);
    padding-left: 32px;
}

.book-item a.active {
    background: var(--bg-sidebar-active);
    color: var(--accent-light);
    border-left-color: var(--accent);
    font-weight: 500;
}

.book-item a.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--accent);
    border-radius: 2px 0 0 2px;
    opacity: 0.5;
}

.book-item .read-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-light);
    margin-right: 18px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity var(--transition);

}

.book-item .read-dot.visible {
    opacity: 1;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-strong);
    background: rgba(0, 0, 0, 0.15);
}


.progress-info {
    font-size: 0.7rem;
    color: var(--text-sidebar);
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

.sidebar-about {
    padding: 24px 20px;
    margin-top: auto;
}

.disclaimer {
    font-size: 0.6rem;
    color: var(--text-muted);
    opacity: 0.6;
    line-height: 1.6;
    font-style: italic;
}

.copyright {
    font-size: 0.6rem;
    color: var(--text-muted);
    opacity: 0.4;
    margin-top: 16px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.progress-bar {
    height: 2px;
    background: var(--border-strong);
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-dark), var(--accent-light));
    border-radius: 2px;
    width: 0%;
    transition: width 0.8s ease;

}



/* ===== Main Content ===== */
.content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ===== Welcome Screen ===== */
.welcome {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px;
}

.welcome-inner {
    text-align: center;
    max-width: 600px;
    animation: welcomeFade 1.2s ease;
}

/* Ornamental cross/star */
.welcome-icon {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 24px;
    opacity: 0.8;
    animation: gentlePulse 4s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(196, 154, 42, 0.3));
}

/* Calligraphy style drop cap for the intro summary */
#summaryText::first-letter {
    font-family: 'BillaMount', cursive, var(--font-serif);
    float: left;
    font-size: 1.45em;
    line-height: 0.8;
    padding-right: 2px;
    padding-top: 4px;
    margin-bottom: -2px;
    margin-left: 0px;
    color: var(--accent-dark);
    font-weight: normal;

}

/* Ornamental line above title */
.welcome-inner::before {
    content: '';
    display: block;
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: 0 auto 24px;
}

.welcome h1 {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    line-height: 1.15;
    text-shadow: 0 0 12px rgba(196, 154, 42, 0.6), 0 0 30px rgba(196, 154, 42, 0.4), 0 0 60px rgba(196, 154, 42, 0.2);
}



.welcome-subtitle {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--text-secondary);
    font-style: italic;
    font-weight: 400;
    margin-bottom: 12px;
}

/* Ornamental flourish */
.welcome-subtitle::after {
    content: '';
    display: block;
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
    margin: 20px auto 0;
}

.welcome-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.9;
    margin: 24px 0 40px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.welcome-stats {
    display: flex;
    justify-content: center;
    gap: 56px;
    margin-bottom: 44px;
}

.stat {
    text-align: center;
}

.stat-num {
    display: block;
    font-family: var(--font-serif);
    font-size: 2.6rem;
    font-weight: 600;
    color: var(--accent);
    line-height: 1.2;

}

.stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    margin-top: 4px;
}

.btn-start {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 48px;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent), var(--accent-light));
    color: #fff;
    border: none;
    border-radius: var(--radius-xl);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 24px rgba(196, 154, 42, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.btn-start::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}

.btn-start:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 36px rgba(196, 154, 42, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-start:hover::before {
    opacity: 1;
}

.btn-start:active {
    transform: translateY(-1px);
}

.welcome-note {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 20px;
    font-style: italic;
}

/* ===== Reader ===== */
.reader {
    max-width: 760px;
    margin: 0 auto;
    padding: 32px 48px 100px;
    animation: readerFade 0.5s ease;
}

.reader-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    margin-bottom: 4px;
}

.reader-nav-bottom {
    border-top: 1px solid var(--border);
    margin-top: 48px;
    padding-top: 24px;
}

.nav-btn {
    background: var(--bg-card);
    border: 1px solid var(--accent-border);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.nav-btn:hover {
    border-color: var(--accent-border);
    color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 2px 12px rgba(196, 154, 42, 0.08);
    transform: translateY(-1px);
}

.nav-btn:disabled {
    opacity: 0.25;
    cursor: default;
    pointer-events: none;
}

.reader-position {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* Book Header */
.book-header {
    text-align: center;
    padding: 56px 0 36px;
    position: relative;
    overflow: visible;
}

/* Emblem background behind title */
.header-emblem {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 340px;
    height: 340px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.60;
    z-index: 0;
    pointer-events: none;
    mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0) 75%);
    -webkit-mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0) 75%);
    transition: opacity 0.6s ease, background-image 0.4s ease;
}

[data-theme="dark"] .header-emblem,
[data-theme="black"] .header-emblem {
    opacity: 0.45;
}

/* Ensure all header content sits above emblem */
.book-testament-badge,
.book-title,
.book-full-title {
    position: relative;
    z-index: 1;
}

/* Decorative element above badge */
.book-header::before {
    content: '\2727  \2727  \2727';
    display: block;
    color: var(--accent);
    opacity: 0.3;
    font-size: 0.7rem;
    letter-spacing: 0.5em;
    margin-bottom: 20px;
}

.book-testament-badge {
    display: inline-block;
    padding: 5px 18px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    border-radius: var(--radius-xl);
    margin-bottom: 20px;
    border: 1px solid var(--accent-border);
}

.book-title {
    font-family: var(--font-serif);
    font-size: 3.2rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 10px;
    line-height: 1.15;
}

.book-full-title {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Ornamental divider after title */
.book-header::after {
    content: '';
    display: block;
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: 28px auto 0;
}

/* Book Summary - Parchment Card */
.book-summary {
    background: var(--bg-card);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-md);
    padding: 32px 36px;
    margin-top: 20px;
    margin-bottom: 56px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: visible;
}

/* Accent line at top of summary card */
.book-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.4;
}

/* Skip to Takeaways button */
.skip-takeaway-wrap {
    text-align: center;
    margin: -36px 0 32px;
}

.skip-takeaway-btn {
    background: var(--bg-card);
    color: var(--accent);
    border: 1px solid var(--accent-border);
    padding: 8px 22px;
    font-family: var(--font-serif);
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
}

.skip-takeaway-btn:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.summary-icon {
    position: absolute;
    top: -16px;
    left: 32px;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent-light));
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: 0 4px 16px rgba(196, 154, 42, 0.3);
}

.book-summary p {
    font-family: var(--font-serif);
    font-size: 1.18rem;
    line-height: 1.9;
    color: var(--text-primary);
}

/* ===== Passages ===== */
/* ===== DEEP STUDY PANEL ===== */
.deep-study-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    margin-top: 20px;
    background: var(--bg-card);
    border: 1px solid var(--accent-border);
    border-radius: 10px;
    color: var(--accent);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.deep-study-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
    box-shadow: 0 2px 12px rgba(196, 154, 42, 0.15);
}

.deep-study-toggle.expanded {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
    background: var(--bg-card);
}

.study-icon {
    display: flex;
    align-items: center;
    color: var(--accent);
}

.study-icon svg {
    width: 16px;
    height: 16px;
}

.study-badge {
    background: var(--accent);
    color: var(--bg-primary);
    font-size: 0.58rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    line-height: 1.4;
}

.study-arrow {
    margin-left: auto;
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.deep-study-toggle.expanded .study-arrow {
    transform: rotate(180deg);
}

.deep-study-panel {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.5s ease;
    border: 1px solid var(--accent-border);
    border-top: none;
    border-radius: 0 0 10px 10px;
    background: var(--bg-card);
}

.deep-study-panel.collapsed {
    max-height: 0 !important;
}

.study-note {
    padding: 24px 24px 20px;
    border-bottom: 1px solid var(--bg-hover);
}

.study-note:last-child {
    border-bottom: none;
}

.study-note-heading {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.5;
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.study-verse-ref {
    display: inline-block;
    background: var(--accent);
    color: var(--bg-primary);
    font-family: var(--font-sans);
    font-size: 0.6rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.06em;
    white-space: nowrap;
    flex-shrink: 0;
}

.study-note-body {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.study-cross-refs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.cross-ref-label {
    font-family: var(--font-sans);
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-right: 4px;
}

.cross-ref-tag {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--accent);
    background: rgba(196, 154, 42, 0.08);
    border: 1px solid var(--accent-border);
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.04em;
    transition: all 0.2s ease;
}

[data-theme="dark"] .cross-ref-tag,
[data-theme="black"] .cross-ref-tag {
    background: rgba(218, 165, 32, 0.1);
}

.cross-ref-tag:hover {
    background: rgba(196, 154, 42, 0.18);
    border-color: var(--accent);
    cursor: pointer;
}

/* ===== Cross-Reference Popup ===== */
.cross-ref-popup {
    position: absolute;
    z-index: 9999;
    background: var(--bg-card);
    border: 1px solid rgba(196, 154, 42, 0.25);
    border-radius: 16px;
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(196, 154, 42, 0.08);
    overflow: hidden;
    animation: popupFadeIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 420px;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cross-ref-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--bg-sidebar);
    border-bottom: 1px solid rgba(196, 154, 42, 0.15);
}

.cross-ref-popup-title {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-light);
}

.cross-ref-popup-close {
    background: none;
    border: none;
    color: var(--accent-light);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
    opacity: 0.5;
    transition: all 0.2s ease;
    border-radius: 6px;
}

.cross-ref-popup-close:hover {
    opacity: 1;
    background: rgba(196, 154, 42, 0.12);
}

.cross-ref-popup-body {
    padding: 20px 22px;
    overflow-y: auto;
    max-height: 340px;
}

.cross-ref-verse {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--text-primary);
    margin-bottom: 10px;
    padding-left: 8px;
    border-left: 2px solid rgba(196, 154, 42, 0.2);
}

.cross-ref-verse sup {
    color: var(--accent-light);
    font-family: var(--font-sans);
    font-size: 0.58rem;
    font-weight: 700;
    margin-right: 6px;
    opacity: 0.8;
}

.cross-ref-not-found {
    font-family: var(--font-serif);
    font-size: 0.88rem;
    color: var(--text-muted);
    font-style: italic;


}

/* Common Question Q&A */
.study-common-question {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--accent-border);
}

.common-q {
    font-family: var(--font-serif);
    font-size: 0.88rem;
    font-weight: 600;
    font-style: italic;
    color: var(--accent);
    margin-bottom: 6px;
    line-height: 1.6;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.common-q-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--bg-primary);
    font-family: var(--font-sans);
    font-size: 0.55rem;
    font-weight: 800;
    font-style: normal;
    flex-shrink: 0;
    line-height: 1;
}

.common-a {
    font-family: var(--font-serif);
    font-size: 0.82rem;
    line-height: 1.8;
    color: var(--text-muted);
    padding-left: 26px;
}

.deep-study-collapse-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: transparent;
    border: none;
    border-top: 1px solid var(--bg-hover);
    color: var(--accent);
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.deep-study-collapse-footer:hover {
    background: var(--bg-hover);
}

/* ===== END DEEP STUDY ===== */

.passage-section {
    margin-bottom: 56px;
    animation: passageFade 0.6s ease both;
}

.passage-title {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--accent);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--accent-border);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.passage-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(196, 154, 42, 0.4);
}

/* Accent dot on border */
.passage-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

.passage-ref {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.62rem;
    margin-left: auto;
    letter-spacing: 0.1em;
}

/* Drop Cap on first verse of each passage */
.passage-verses .verse:first-child .verse-text::first-letter {
    font-family: 'BillaMount', cursive, var(--font-serif);
    float: left;
    font-size: 1.45em;
    line-height: 0.8;
    padding-right: 2px;
    padding-top: 4px;
    margin-bottom: -2px;
    margin-left: 0px;
    color: var(--accent-dark);
    font-weight: normal;

}

.verse {
    margin-bottom: 8px;
    line-height: 2.15;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.verse-num {
    font-family: var(--font-sans);
    font-size: 0.58rem;
    font-weight: 600;
    color: var(--accent);
    vertical-align: super;
    margin-right: 4px;
    opacity: 0.35;
}

.verse-text {
    font-family: var(--font-serif);
    font-size: 1.22rem;
    line-height: 2.15;
    color: var(--text-primary);
}

[data-theme="dark"] .verse-text,
[data-theme="black"] .verse-text {
    color: var(--text-primary);
}

/* ===== Takeaway - Premium Card ===== */
.book-takeaway {
    background: linear-gradient(135deg, var(--accent-soft), rgba(196, 154, 42, 0.04));
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-md);
    padding: 36px 36px 32px;
    margin-top: 56px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* Decorative corner flourish */
.book-takeaway::before {
    content: '\2726';
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.2rem;
    color: var(--accent);
    opacity: 0.15;
}

.takeaway-title {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.takeaway-icon {
    font-size: 1.1rem;

}


.book-takeaway p {
    font-family: var(--font-serif);
    font-size: 1.12rem;
    line-height: 2;
    color: var(--text-primary);
}

.takeaway-image {
    width: 100%;
    height: auto;
    margin-bottom: 24px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--accent-border);
    transition: transform var(--transition);
    display: block;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.takeaway-image:hover {
    transform: scale(1.01);
}


/* ===== Mark as Read Button ===== */
.btn-mark-read {
    padding: 11px 28px;
    background: var(--bg-card);
    color: var(--accent);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.02em;
}

.btn-mark-read:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 20px rgba(196, 154, 42, 0.25);
    transform: translateY(-1px);
}

.btn-mark-read.read {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 2px 12px rgba(196, 154, 42, 0.2);
}

/* ===== Mobile Menu Toggle ===== */
.menu-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 200;
    width: 44px;
    height: 44px;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: var(--glass-blur);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: var(--text-sidebar-active);
    border-radius: 1px;
    transition: all var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4.5px, 4.5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4.5px, -4.5px);
}

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 90;
    opacity: 0;
    transition: opacity var(--transition);
}

.overlay.active {
    opacity: 1;
}

/* ===== Animations ===== */
@keyframes welcomeFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}










@keyframes readerFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes passageFade {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gentlePulse {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .content {
        margin-left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .overlay.active {
        display: block;
    }

    .reader {
        padding: 24px 24px 60px;
    }

    .book-title {
        font-size: 2.2rem;
    }

    .welcome h1 {
        font-size: 2.4rem;
    }

    .welcome-stats {
        gap: 32px;
    }

    .passage-verses .verse:first-child .verse-text::first-letter {
        font-size: 2.4em;
    }
}

@media (max-width: 500px) {
    .welcome {
        padding: 24px 16px;
    }

    .reader {
        padding: 16px 16px 60px;
    }

    .book-title {
        font-size: 1.8rem;
    }

    .book-summary {
        padding: 24px 20px;
    }

    .book-takeaway {
        padding: 24px 20px;
    }

    .verse-text {
        font-size: 1.05rem;
    }

    .reader-nav {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    .reader-position {
        width: 100%;
        text-align: center;
        order: -1;
        margin-bottom: 4px;
    }

    .stat-num {
        font-size: 2rem;
    }
}

/* ===== Scrollbar ===== */
.sidebar-content::-webkit-scrollbar {
    width: 3px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 2px;
}

/* Selection color */
::selection {
    background: rgba(196, 154, 42, 0.2);
    color: var(--text-primary);
}

/* ===== Auto-Scroll Bar ===== */
.autoscroll-bar {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 150;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
    touch-action: manipulation;
}

.autoscroll-bar.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.scroll-play {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--accent-border);
    background: var(--accent-soft);
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
}

.scroll-play:hover {
    background: var(--accent);
    color: #fff;
    transform: scale(1.05);
}

.scroll-play.playing {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    color: #fff;
    border-color: var(--accent);
}

/* Narrator Button */
.narrator-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--accent-border);
    background: var(--accent-soft);
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.narrator-btn:hover {
    background: var(--accent);
    color: #fff;
    transform: scale(1.08);
}
.narrator-btn.narrating {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    color: #fff;
    border-color: var(--accent);
    animation: narratePulse 2s ease-in-out infinite;
}
@keyframes narratePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(196, 154, 42, 0.3); }
    50% { box-shadow: 0 0 12px 4px rgba(196, 154, 42, 0.2); }
}
.narrator-btn svg {
    width: 18px;
    height: 18px;
}

/* Verse being narrated */
.verse.verse-narrating {
    background: rgba(196, 154, 42, 0.08) !important;
    border-left: 3px solid rgba(196, 154, 42, 0.5);
    padding-left: 12px;
    border-radius: 4px;
    transition: background 0.3s, border-left 0.3s;
}

.speed-buttons {
    display: flex;
    gap: 4px;
}

.speed-btn {
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--accent-border);
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.speed-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-soft);
}

.speed-btn.active {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 2px 10px rgba(196, 154, 42, 0.2);
}

@media (max-width: 500px) {
    .autoscroll-bar {
        bottom: 16px;
        right: 12px;
        left: 12px;
        justify-content: center;
        padding: 8px 12px;
    }

    .scroll-play {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .speed-btn {
        padding: 5px 10px;
        font-size: 0.65rem;
    }
}

/* Smooth auto-scroll optimization */
html.auto-scrolling {
    -webkit-overflow-scrolling: touch;
    overflow-y: scroll;
}

/* ===== Install Prompt ===== */
.install-prompt {
    margin: 16px 16px 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(196, 154, 42, 0.12), rgba(196, 154, 42, 0.04));
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-sm);
    text-align: center;
}

.install-title {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 8px;
}

.install-steps {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.install-steps span {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    color: var(--text-sidebar);
    line-height: 1.5;
}

.install-steps strong {
    color: var(--text-sidebar-active);
}

/* Custom Pause Icon */
.pause-icon {
    display: inline-flex;
    gap: 5px;
    height: 18px;
    /* Taller lines */
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.pause-bar {
    width: 4px;
    height: 100%;
    background-color: currentColor;
    border-radius: 1px;
}

/* Ensure button aligns content center */
#scrollPlayBtn {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Chronological View Toggle ===== */
.view-toggle {
    display: flex;
    margin: 0 16px 8px;
    background: var(--bg-sidebar-hover);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    padding: 3px;
    position: relative;
    z-index: 1;
}

.view-btn {
    flex: 1;
    padding: 7px 12px;
    border: none;
    border-radius: var(--radius-xl);
    background: transparent;
    color: var(--text-sidebar);
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}

.view-btn:hover {
    color: var(--text-sidebar-active);
}

.view-btn.active {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    color: #fff;
    box-shadow: 0 2px 12px rgba(196, 154, 42, 0.25);
}

/* ===== Era Group Headers (Chronological sidebar) ===== */
.era-group {
    margin-bottom: 4px;
}

.era-title {
    font-family: var(--font-sans);
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent);
    padding: 16px 24px 6px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color var(--transition);
}

.era-title:hover {
    color: var(--accent-light);
}

.era-title::before {
    content: '\25BE';
    font-size: 0.65rem;
    transition: transform var(--transition);
    opacity: 0.6;
}

.era-title.collapsed::before {
    transform: rotate(-90deg);
}

.era-date {
    font-weight: 400;
    font-size: 0.52rem;
    color: rgba(196, 184, 168, 0.4);
    margin-left: auto;
    letter-spacing: 0.06em;
    text-transform: none;
}

.era-book-list {
    list-style: none;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.era-book-list.collapsed {
    max-height: 0 !important;
}

.era-book-list .book-item a {
    padding-left: 28px;
}

.role-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
    opacity: 0.8;
}

.role-dot[data-role="law"] {
    background: #D4A03C;
}

.role-dot[data-role="narrative"] {
    background: #58A6C8;
}

.role-dot[data-role="wisdom"] {
    background: #A080C8;
}

.role-dot[data-role="prophecy"] {
    background: #C85858;
}

.role-dot[data-role="gospel"] {
    background: #4CAF50;
}

.role-dot[data-role="epistle"] {
    background: #7986CB;
}

.role-dot[data-role="apocalypse"] {
    background: #FF7043;
}

/* ===== Chronological Panel (Reader) ===== */
.chrono-panel {
    background: var(--bg-card);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-md);
    padding: 28px 32px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
    animation: passageFade 0.5s ease both;
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
}

.chrono-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.3;
}

.chrono-panel-header {
    margin-bottom: 20px;
}

.chrono-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.chrono-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    font-family: var(--font-sans);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    border-radius: var(--radius-xl);
    border: 1px solid var(--accent-border);
}

.era-badge {
    background: var(--accent-soft);
    color: var(--accent);
}

.role-badge {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-strong);
}

.date-badge {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border);
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.04em;
}

/* Connections */
.chrono-connections {
    margin-bottom: 20px;
}

.conn-section {
    margin-bottom: 12px;
}

.conn-label {
    font-family: var(--font-sans);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.conn-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.conn-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-xl);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--accent);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.conn-pill:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(196, 154, 42, 0.2);
}

.conn-desc {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Typology Cards */
.chrono-typology {
    margin-bottom: 16px;
}

.typo-section-title {
    font-family: var(--font-sans);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.typo-card {
    background: var(--bg-card-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 12px;
    transition: all var(--transition);
}

.typo-card:hover {
    border-color: var(--accent-border);
    box-shadow: var(--shadow-sm);
}

.typo-type-name {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 12px;
}

.typo-flow {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    gap: 0;
    align-items: center;
}

.typo-step {
    text-align: center;
    padding: 8px 4px;
}

.typo-step-label {
    font-family: var(--font-sans);
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.typo-step-text {
    font-family: var(--font-serif);
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.typo-arrow {
    color: var(--accent);
    font-size: 0.9rem;
    opacity: 0.5;
    text-align: center;
    padding: 0 2px;
}

.typo-step.empty .typo-step-text {
    color: var(--text-muted);
    font-style: italic;
    opacity: 0.5;
}

.typo-step.fulfillment .typo-step-text {
    color: var(--accent);
    font-weight: 500;
}

/* Anchor Passages */
.chrono-anchors {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.anchor-label {
    font-family: var(--font-sans);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    margin-bottom: 8px;
    width: 100%;
}

.anchor-chip {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-card-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.anchor-chip:hover {
    border-color: var(--accent-border);
    color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-1px);
}

/* No typology message */
.typo-empty {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    padding: 12px 0;
}

/* Back to panel floating button */
.back-to-panel {
    position: fixed;
    bottom: 80px;
    right: 24px;
    z-index: 160;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    color: #fff;
    border: none;
    border-radius: var(--radius-xl);
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    box-shadow: 0 4px 24px rgba(196, 154, 42, 0.35);
    opacity: 0;
    transform: translateY(16px);
    transition: all var(--transition);
}

.back-to-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-panel.hidden {
    opacity: 0;
    transform: translateY(16px);
}

.back-to-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 32px rgba(196, 154, 42, 0.45);
}

/* ===== Responsive: Chrono ===== */
@media (max-width: 900px) {
    .typo-flow {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .typo-arrow {
        transform: rotate(90deg);
        padding: 4px 0;
    }

    .typo-step {
        text-align: left;
        padding: 4px 0;
    }
}

@media (max-width: 500px) {
    .chrono-panel {
        padding: 20px 16px;
    }

    .chrono-badges {
        gap: 6px;
    }

    .chrono-badge {
        font-size: 0.58rem;
        padding: 4px 10px;
    }

    .conn-pill {
        font-size: 0.65rem;
        padding: 5px 10px;
    }
}

/* ===== Mode Toggle ===== */
.mode-toggle {
    display: flex;
    margin: 6px 16px 4px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    overflow: hidden;
}

.mode-btn {
    flex: 1;
    padding: 7px 12px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.03em;
}

.mode-btn:hover {
    color: var(--accent-light);
    background: rgba(196, 154, 42, 0.08);
}

.mode-btn.active {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent-light));
    color: var(--bg-page);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(196, 154, 42, 0.3);
}

/* ===== Gold Star Read Indicators ===== */
.book-item .read-dot {
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
    margin-right: 16px;
    flex-shrink: 0;
    opacity: 0;
    font-size: 0.75rem;
    color: var(--accent-light);
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: scale(0);
    box-shadow: none;
}

.book-item .read-dot.visible {
    opacity: 1;
    transform: scale(1);
    animation: starPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes starPop {
    0% {
        transform: scale(0) rotate(-30deg);
        opacity: 0;
    }

    50% {
        transform: scale(1.4) rotate(10deg);
        opacity: 1;
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* ===== Achievement Toast ===== */
.achievement-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 48px;
    background: linear-gradient(135deg,
            rgba(0, 0, 0, 0.95),
            rgba(10, 10, 10, 0.95));
    border: 2px solid var(--accent-light);
    border-radius: 16px;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.achievement-toast.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.achievement-star {
    font-size: 3rem;
    color: var(--accent-light);
    animation: achieveSpin 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes achieveSpin {
    0% {
        transform: scale(0) rotate(-180deg);
    }

    60% {
        transform: scale(1.3) rotate(15deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
    }
}

.achievement-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.achievement-label {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-light);
    opacity: 0.8;
}

.achievement-book {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: #f5f0e8;
    letter-spacing: 0.05em;
}

/* Light theme achievement */
html[data-theme]:not([data-theme="dark"]):not([data-theme="black"]) .achievement-toast,
html:not([data-theme]) .achievement-toast {
    background: linear-gradient(135deg,
            rgba(245, 240, 230, 0.97),
            rgba(235, 225, 205, 0.97));
    border-color: var(--accent-dark);
    box-shadow:
        0 0 40px rgba(196, 154, 42, 0.2),
        0 0 80px rgba(196, 154, 42, 0.1);
}

html[data-theme]:not([data-theme="dark"]):not([data-theme="black"]) .achievement-book,
html:not([data-theme]) .achievement-book {
    color: var(--text-body);
}

/* ===== Chapter Sub-list (Full Bible Mode) ===== */
.chapter-sublist {
    list-style: none;
    padding: 8px 0 4px 0;
    margin: 4px 0 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
    gap: 4px;
    border-top: 1px solid var(--border-strong);
}

.chapter-subitem {
    display: flex;
    align-items: center;
    justify-content: center;
}

.chapter-subitem a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 28px;
    font-family: var(--font-sans);
    font-size: 0.65rem;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.08);
    border: 1px solid transparent;
}

.chapter-subitem a:hover {
    color: var(--accent-light);
    background: rgba(196, 154, 42, 0.12);
    border-color: rgba(196, 154, 42, 0.25);
}

.chapter-subitem.active a {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent-light));
    color: var(--bg-page);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(196, 154, 42, 0.3);
    border-color: transparent;
}

[data-theme=dark] .chapter-subitem a,
[data-theme=black] .chapter-subitem a {
    background: rgba(255, 255, 255, 0.04);
}

[data-theme=dark] .chapter-subitem a:hover,
[data-theme=black] .chapter-subitem a:hover {
    background: rgba(196, 154, 42, 0.15);
}

/* Fix: Book items with chapter sub-lists need to wrap */
.book-item:has(.chapter-sublist) {
    flex-wrap: wrap;
}

.chapter-sublist {
    width: 100%;
    flex-basis: 100%;
}

.mode-toggle {
    display: none;
}

.chapter-sublist {
    display: none;
}

/* ===== Passage Sub-list (Chapter Sub-Menu) ===== */
.passage-sublist {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    width: 100%;
    flex-basis: 100%;
}

.passage-sublist.expanded {
    max-height: 600px;
    overflow-y: auto;
}

.passage-subitem {
    display: flex;
    align-items: center;
    gap: 0;
}

.passage-subitem a {
    flex: 1;
    display: block;
    padding: 5px 24px 5px 40px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 400;
    transition: all var(--transition);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-left: 2px solid transparent;
}

.passage-subitem a:hover {
    background: var(--bg-sidebar-hover);
    color: var(--text-sidebar-active);
    padding-left: 44px;
}

.passage-subitem a.active {
    color: var(--accent-light);
    border-left-color: rgba(196, 154, 42, 0.4);
    font-weight: 500;
    background: rgba(196, 154, 42, 0.06);
}

.passage-subitem .passage-read-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-light);
    margin-right: 16px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity var(--transition);
    box-shadow: 0 0 6px rgba(196, 154, 42, 0.3);
}

.passage-subitem .passage-read-dot.visible {
    opacity: 1;
}

/* Chevron indicator on book name for expandable items */
.book-item a .expand-chevron {
    display: inline-block;
    margin-left: 6px;
    font-size: 0.6rem;
    transition: transform 0.25s ease;
    opacity: 0.4;
}

.book-item a .expand-chevron.rotated {
    transform: rotate(90deg);
}

/* Book items with passage sublists need wrapping */
.book-item:has(.passage-sublist) {
    flex-wrap: wrap;
}

/* Per-passage mark-read button in the reader */
.passage-check-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    padding: 4px 12px;
    font-size: 0.7rem;
    font-family: var(--font-sans);
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.passage-check-btn:hover {
    opacity: 1;
    border-color: var(--accent);
    color: var(--accent-light);
}

.passage-check-btn.checked {
    opacity: 1;
    color: var(--accent-light);
    border-color: var(--accent);
    background: rgba(196, 154, 42, 0.08);
}

.passage-check-btn .check-icon {
    font-size: 0.8rem;
}

/* Scrollbar for passage sub-list */
.passage-sublist::-webkit-scrollbar {
    width: 3px;
}

.passage-sublist::-webkit-scrollbar-track {
    background: transparent;
}

.passage-sublist::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

/* ===== Daily Verse / Verse of the Day ===== */
.daily-verse-card {
    margin: 32px auto 28px;
    max-width: 480px;
    padding: 28px 24px 22px;
    background: rgba(196, 154, 42, 0.04);
    border: 1px solid rgba(196, 154, 42, 0.18);
    border-radius: var(--radius-lg, 16px);
    text-align: center;
    position: relative;
    animation: fadeInUp 0.8s ease both;
    animation-delay: 0.6s;
}

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

.daily-verse-label {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: 16px;
}

.daily-verse-text {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-style: italic;
    line-height: 1.7;
    color: var(--text-primary);
    margin: 0 0 14px;
    padding: 0 8px;
    border: none;
    quotes: none;
}

.daily-verse-ref {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    margin-bottom: 18px;
}

.daily-verse-btn {
    display: inline-block;
    padding: 8px 22px;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--accent-light);
    background: transparent;
    border: 1px solid rgba(196, 154, 42, 0.3);
    border-radius: var(--radius-sm, 8px);
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.03em;
}

.daily-verse-btn:hover {
    background: rgba(196, 154, 42, 0.1);
    border-color: var(--accent);
    transform: translateY(-1px);
}

@media (max-width: 600px) {
    .daily-verse-card {
        margin: 24px 16px 20px;
        padding: 22px 18px 18px;
    }
    .daily-verse-text {
        font-size: 0.95rem;
    }
}

/* ===== Verse Highlights ===== */
.verse[data-hl-key] {
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(196, 154, 42, 0.15);
    transition: background 0.25s ease, border-left 0.25s ease;
    border-radius: 4px;
    padding-left: 12px;
    border-left: 3px solid transparent;
}

.verse.hl-amber    { background: rgba(217, 168, 60, 0.12); border-left-color: rgba(217, 168, 60, 0.55); }
.verse.hl-rose     { background: rgba(194, 108, 122, 0.12); border-left-color: rgba(194, 108, 122, 0.55); }
.verse.hl-sage     { background: rgba(120, 170, 120, 0.12); border-left-color: rgba(120, 170, 120, 0.55); }
.verse.hl-lavender { background: rgba(150, 130, 200, 0.12); border-left-color: rgba(150, 130, 200, 0.55); }
.verse.hl-teal     { background: rgba(90, 180, 180, 0.12); border-left-color: rgba(90, 180, 180, 0.55); }
/* Legacy compat */
.verse.hl-gold { background: rgba(217, 168, 60, 0.12); border-left-color: rgba(217, 168, 60, 0.55); }
.verse.hl-blue { background: rgba(90, 180, 180, 0.12); border-left-color: rgba(90, 180, 180, 0.55); }
.verse.hl-green { background: rgba(120, 170, 120, 0.12); border-left-color: rgba(120, 170, 120, 0.55); }
.verse.hl-pink { background: rgba(194, 108, 122, 0.12); border-left-color: rgba(194, 108, 122, 0.55); }

.verse.has-note::after {
    content: '✎';
    position: absolute;
    right: 4px;
    top: 4px;
    font-size: 0.6rem;
    color: var(--text-muted);
    opacity: 0.5;
}

.verse.has-note {
    position: relative;
}


/* ===== Verse Selection State ===== */
.verse.verse-selected {
    background: rgba(196, 154, 42, 0.08) !important;
    outline: 2px dashed rgba(196, 154, 42, 0.5);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ===== Bottom Action Bar ===== */
.verse-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card, #1a1a1a);
    border-top: 1px solid rgba(196, 154, 42, 0.25);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.5);
    z-index: 1500;
    padding: 0 16px env(safe-area-inset-bottom, 12px);
    transform: translateY(100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.verse-action-bar.visible {
    transform: translateY(0);
}

.vab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 6px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.vab-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-light, #c49a2a);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.vab-close {
    background: none;
    border: none;
    color: var(--text-muted, #888);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.15s;
}
.vab-close:hover {
    color: #fff;
}

.vab-colors {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}
.vab-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    padding: 0;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.vab-dot-amber    { background: linear-gradient(135deg, #d9a83c, #c49028); }
.vab-dot-rose     { background: linear-gradient(135deg, #c26c7a, #a85565); }
.vab-dot-sage     { background: linear-gradient(135deg, #78aa78, #5e9060); }
.vab-dot-lavender { background: linear-gradient(135deg, #9682c8, #7b6aad); }
.vab-dot-teal     { background: linear-gradient(135deg, #5ab4b4, #489a9a); }
/* Legacy compat */
.vab-dot-gold  { background: linear-gradient(135deg, #d9a83c, #c49028); }
.vab-dot-blue  { background: linear-gradient(135deg, #5ab4b4, #489a9a); }
.vab-dot-green { background: linear-gradient(135deg, #78aa78, #5e9060); }
.vab-dot-pink  { background: linear-gradient(135deg, #c26c7a, #a85565); }

.vab-dot:hover { transform: scale(1.15); }
.vab-dot.active {
    border-color: #fff;
    transform: scale(1.15);
    box-shadow: 0 0 8px rgba(255,255,255,0.3);
}

.vab-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 0 12px;
}
.vab-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 10px 4px 8px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.vab-btn:hover, .vab-btn:active {
    background: rgba(255,255,255,0.07);
    border-color: rgba(196, 154, 42, 0.25);
    transform: scale(0.97);
}
.vab-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-light, #c49a2a);
    line-height: 1;
}
.vab-btn-icon svg {
    width: 20px;
    height: 20px;
}
.vab-btn-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-muted, #888);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Copy toast notification */
.copy-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(0,0,0,0.85);
    color: #c49a2a;
    padding: 12px 24px;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 3000;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}
.copy-toast.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ===== Note Modal ===== */
.note-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    animation: fadeIn 0.2s ease both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.note-modal {
    background: var(--bg-sidebar, #111);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg, 16px);
    width: 100%;
    max-width: 420px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    animation: modalSlide 0.25s ease both;
}

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

.note-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.note-modal-title {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-light);
    letter-spacing: 0.04em;
}

.note-modal-ref {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    color: var(--text-muted);
}

.note-modal-textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 8px);
    color: var(--text-primary);
    font-family: var(--font-serif);
    font-size: 0.92rem;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.note-modal-textarea:focus {
    border-color: var(--accent);
}

.note-modal-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}

.note-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.note-modal-cancel, .note-modal-save {
    padding: 8px 20px;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 500;
    border-radius: var(--radius-sm, 8px);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
}

.note-modal-cancel {
    background: transparent;
    color: var(--text-muted);
}
.note-modal-cancel:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.note-modal-save {
    background: rgba(196, 154, 42, 0.15);
    color: var(--accent-light);
    border-color: rgba(196, 154, 42, 0.3);
}
.note-modal-save:hover {
    background: rgba(196, 154, 42, 0.25);
    border-color: var(--accent);
}

/* ===== My Highlights (Welcome Screen) ===== */
.my-highlights-section {
    margin: 24px auto 20px;
    max-width: 480px;
    text-align: left;
    animation: fadeInUp 0.8s ease both;
    animation-delay: 0.8s;
}

.my-hl-label {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: 12px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.my-hl-label svg {
    color: var(--accent-light, #c49a2a);
    flex-shrink: 0;
}

.my-hl-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.my-hl-item {
    padding: 10px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm, 8px);
    cursor: pointer;
    transition: all 0.2s ease;
}
.my-hl-item:hover {
    background: rgba(255,255,255,0.06);
    transform: translateX(2px);
}

.my-hl-item.hl-amber    { border-left-color: rgba(217, 168, 60, 0.7); }
.my-hl-item.hl-rose     { border-left-color: rgba(194, 108, 122, 0.7); }
.my-hl-item.hl-sage     { border-left-color: rgba(120, 170, 120, 0.7); }
.my-hl-item.hl-lavender { border-left-color: rgba(150, 130, 200, 0.7); }
.my-hl-item.hl-teal     { border-left-color: rgba(90, 180, 180, 0.7); }
.my-hl-item.hl-gold  { border-left-color: rgba(217, 168, 60, 0.7); }
.my-hl-item.hl-blue  { border-left-color: rgba(90, 180, 180, 0.7); }
.my-hl-item.hl-green { border-left-color: rgba(120, 170, 120, 0.7); }
.my-hl-item.hl-pink  { border-left-color: rgba(194, 108, 122, 0.7); }

.my-hl-ref {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-primary);
}

.my-hl-note {
    font-family: var(--font-serif);
    font-size: 0.82rem;
    font-style: italic;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.my-hl-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(196, 154, 42, 0.2);
    border-radius: 8px;
    padding: 8px 16px;
    margin-top: 10px;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--accent-light, #c49a2a);
    letter-spacing: 0.03em;
    transition: background 0.15s, border-color 0.15s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.my-hl-toggle:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(196, 154, 42, 0.35);
}
.my-hl-toggle svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

@media (max-width: 600px) {
    .my-highlights-section {
        margin: 20px 16px 16px;
    }
}




/* ===== Highlight Popup ===== */
.hl-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    animation: fadeIn 0.2s ease both;
}
.hl-popup {
    background: var(--bg-card, #1a1a1a);
    border: 1px solid var(--border);
    border-radius: 14px;
    max-width: 480px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 12px 48px rgba(0,0,0,0.6);
    border-top: 3px solid var(--accent);
}
.hl-popup-amber    { border-top-color: rgba(217, 168, 60, 0.7); }
.hl-popup-rose     { border-top-color: rgba(194, 108, 122, 0.7); }
.hl-popup-sage     { border-top-color: rgba(120, 170, 120, 0.7); }
.hl-popup-lavender { border-top-color: rgba(150, 130, 200, 0.7); }
.hl-popup-teal     { border-top-color: rgba(90, 180, 180, 0.7); }
.hl-popup-gold     { border-top-color: rgba(217, 168, 60, 0.7); }
.hl-popup-blue     { border-top-color: rgba(90, 180, 180, 0.7); }
.hl-popup-green    { border-top-color: rgba(120, 170, 120, 0.7); }
.hl-popup-pink     { border-top-color: rgba(194, 108, 122, 0.7); }

.hl-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}
.hl-popup-ref {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-light, #c49a2a);
    letter-spacing: 0.03em;
}
.hl-popup-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
}
.hl-popup-close:hover { color: #fff; }

.hl-popup-body {
    padding: 16px 18px;
}
.hl-popup-verse {
    font-family: var(--font-serif, 'EB Garamond', serif);
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-primary);
    margin: 0 0 8px;
}
.hl-popup-verse sup {
    font-size: 0.65em;
    color: var(--accent-light);
    font-weight: 600;
    margin-right: 2px;
}

.hl-popup-note {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.hl-popup-note-label {
    font-family: var(--font-sans);
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-light, #c49a2a);
    display: block;
    margin-bottom: 6px;
}
.hl-popup-note p {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    font-style: italic;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0;
}

.hl-popup-footer {
    padding: 12px 18px;
    border-top: 1px solid rgba(255,255,255,0.06);
    text-align: center;
}
.hl-popup-goto {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(196, 154, 42, 0.25);
    border-radius: 8px;
    padding: 8px 24px;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-light, #c49a2a);
    letter-spacing: 0.03em;
    transition: background 0.15s, border-color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.hl-popup-goto:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(196, 154, 42, 0.4);
}

/* ===== Art Modal ===== */
.art-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
    animation: fadeIn 0.2s ease both;
}

.art-modal {
    background: var(--bg-sidebar, #111);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg, 16px);
    width: 100%;
    max-width: 500px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    animation: modalSlide 0.25s ease both;
}

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

.art-modal-title {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-light);
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    gap: 6px;
}
.art-title-icon {
    color: var(--accent-light, #c49a2a);
    flex-shrink: 0;
}
.art-download-btn svg {
    vertical-align: -3px;
    margin-right: 4px;
}

.art-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}
.art-modal-close:hover { color: var(--text-primary); }

.art-modal-body {
    position: relative;
    min-height: 200px;
}

.art-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

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

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

.art-loading-text {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0 0 4px;
}

.art-loading-ref {
    font-family: var(--font-serif);
    font-size: 0.78rem;
    font-style: italic;
    color: var(--accent-light);
    margin: 0;
}

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

.art-ref-overlay {
    position: absolute;
    bottom: 56px;
    left: 0;
    right: 0;
    text-align: center;
    font-family: var(--font-serif);
    font-size: 0.82rem;
    font-style: italic;
    color: rgba(255,255,255,0.85);
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
    padding: 8px;
    pointer-events: none;
}

.art-actions {
    display: flex;
    justify-content: center;
    padding: 14px;
    border-top: 1px solid var(--border);
    gap: 12px;
}

.art-download-btn {
    padding: 8px 24px;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--accent-light);
    background: rgba(196, 154, 42, 0.12);
    border: 1px solid rgba(196, 154, 42, 0.3);
    border-radius: var(--radius-sm, 8px);
    text-decoration: none;
    transition: all 0.2s ease;
}
.art-download-btn:hover {
    background: rgba(196, 154, 42, 0.22);
    border-color: var(--accent);
}

.art-error {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}
.art-error p { margin: 0 0 4px; }
.art-error-sub { font-size: 0.75rem; opacity: 0.6; }

/* ===== Daily Verse with Background Art ===== */
.daily-verse-card.has-bg-art {
    border-color: rgba(196, 154, 42, 0.08);
    background: none;
    transition: background-image 0.8s ease;
}

.daily-verse-card.has-bg-art .daily-verse-text {
    color: rgba(255,255,255,0.95);
    text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

.daily-verse-card.has-bg-art .daily-verse-ref {
    color: rgba(255,255,255,0.7);
}

.daily-verse-card.has-bg-art .daily-verse-label {
    color: rgba(255,255,255,0.8);
}

.daily-verse-card.has-bg-art .daily-verse-btn {
    color: rgba(255,255,255,0.9);
    border-color: rgba(255,255,255,0.25);
}
.daily-verse-card.has-bg-art .daily-verse-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.4);
}


