/* Reset and Base Styles */
:root{
    --bg: #1a1f2e;
    --page: #0a0e1a;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --line: #374151;
    --card: #1a1f2e;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    --primary: #2f6fed;
    --primary-dark: #2559c2;
    --pill: #2d3748;
}

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

body {
    background: linear-gradient(to bottom, #0a0e1a 0%, #1a1f2e 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    line-height: 1.6;
}

/* Text size (settings.js): persisted in localStorage, applied on load */
body.text-normal { font-size: 100%; }
body.text-large { font-size: 115%; }
body.text-huge { font-size: 130%; }

a { color: inherit; }
a:hover { text-decoration: none; }

/* Topbar (matches bible-reader .bible-toolbar style) */
.topbar{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background: #020617;
    padding: 10px 14px 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease-in-out;
}

.topbar-inner{
    max-width: 1000px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: relative;
}

.topbar-title-spacer{
    width: 32px;
    height: 32px;
}

.day-indicator-wrapper{
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 0;
    background-color: #101010;
    border-top: 1px solid #1a1a1a;
    z-index: 100;
    transition: transform 0.3s ease-in-out;
}

.bottom-nav.nav-hidden {
    transform: translateY(100%);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #fff;
    cursor: pointer;
    padding: 4px 12px;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    text-decoration: none;
}

.bottom-nav-item a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
    height: 100%;
    pointer-events: auto;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: #ffd700;
}

.bottom-nav-item span,
.bottom-nav-item .bottom-nav-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
}

.bottom-nav-item svg {
    width: 24px;
    height: 24px;
    stroke-width: 1;
}

/* PWA Install button (top bar, mobile only – visibility controlled by pwa-install.js) */
.pwa-install-btn {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text, #e5e7eb);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--line, #374151);
    border-radius: 8px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}
.pwa-install-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}
.pwa-install-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* PWA install bar (day-selector): show only on mobile */
.pwa-install-bar {
    display: none;
}
@media (max-width: 768px) {
    .pwa-install-bar {
        display: flex;
    }
}

/* Progress backup (Export/Import) on day-selector */
.progress-backup-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text, #e5e7eb);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--line, #374151);
    border-radius: 8px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.progress-backup-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.bible-title{
    font-family: 'Crimson Pro', serif;
    font-size: 32px;
    font-weight: 400;
    color: var(--text);
    margin: 0;
    line-height: 1;
}

.chapter-selector-row{
    padding: 0 20px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    min-height: 48px;
}

.day-navigation-left{
    display: flex;
    align-items: center;
    gap: 12px;
}

.day-navigation-center{
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1;
    pointer-events: none;
}
.day-navigation-center button{
    pointer-events: auto;
}

.day-navigation-right{
    margin-left: auto;
    display: flex;
    align-items: center;
}

.completion-checkmark{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}
.completion-checkmark svg{
    width: 100%;
    height: 100%;
}

.day-indicator{
    font-size: 16px;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.chapter-btn{
    background: #40E0D0;
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 160ms ease;
}
.chapter-btn:hover{
    background: #35c9b8;
}

.nav-arrow-btn{
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #8b6f47;
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    margin-left: auto;
    transition: all 160ms ease;
}
.nav-arrow-btn:hover{
    background: #7a5f3a;
}

.topnav{
    display: flex;
    align-items: center;
    gap: 18px;
}
.topnav-link{
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
}
.topnav-link.is-active{
    color: var(--text);
}

.topbar-actions{
    display: flex;
    align-items: center;
    gap: 10px;
}

.circle-btn{
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    cursor: pointer;
    color: #e5e7eb;
    font-weight: 600;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 160ms ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.circle-btn:hover{
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}
.circle-btn span{
    line-height: 1;
}

/* Match bible-reader: large search icon */
#readerSearchBtn {
    font-size: 38px;
}

.icon-btn{
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--bg);
    cursor: pointer;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    padding: 0;
    min-width: 44px;
    min-height: 44px;
    /* Ensure touch target is large enough on mobile */
    touch-action: manipulation;
}
.icon-btn:hover{
    color: var(--text);
}

/* Make close buttons even larger on mobile devices */
@media (max-width: 768px) {
    .icon-btn {
        width: 50px;
        height: 50px;
        min-width: 50px;
        min-height: 50px;
        font-size: 24px;
    }
}

/* Modal (Search) */
.sr-only{
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.modal{
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
}
.modal.is-open{
    display: block;
}
.modal-backdrop{
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.55);
}
.modal-card{
    position: relative;
    max-width: 760px;
    margin: 80px auto 0;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.modal-small{
    max-width: 400px;
}
.modal-day-list{
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}
.modal-head{
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
}
.modal-title{
    font-weight: 800;
    letter-spacing: -0.01em;
}
.modal-body{
    padding: 16px;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Born Again modal: scrollable on mobile */
#bornAgainModal .modal-card{
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#bornAgainModal .modal-body{
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

/* Reader Search/Display modals: match bible-reader style */
#readerSearchModal .icon-btn,
#readerDisplayModal .icon-btn {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

@media (max-width: 768px) {
    #readerSearchModal .icon-btn,
    #readerDisplayModal .icon-btn {
        width: 50px;
        height: 50px;
        min-width: 50px;
        min-height: 50px;
        font-size: 24px;
    }
}

#readerDisplayModal .modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.font-size-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    max-width: 100%;
    width: 100%;
}

#readerFontSizeSlider {
    width: 100%;
    max-width: 400px;
    height: 8px;
    border-radius: 4px;
    background: var(--line);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    margin: 0 auto;
}

#readerFontSizeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 2px solid var(--bg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

#readerFontSizeSlider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 2px solid var(--bg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

#readerFontSizeSlider:focus {
    outline: none;
}

#readerFontSizeSlider:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.2);
    transform: scale(1.1);
}

#readerFontSizeSlider:focus::-moz-range-thumb {
    box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.2);
    transform: scale(1.1);
}

#readerFontSizeSlider:hover::-webkit-slider-thumb {
    transform: scale(1.1);
}

#readerFontSizeSlider:hover::-moz-range-thumb {
    transform: scale(1.1);
}

#readerFontSizeValue {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-top: 16px;
    text-align: center;
}

@media (max-width: 768px) {
    .font-size-controls {
        padding: 24px 16px;
    }

    #readerFontSizeSlider {
        height: 12px;
        max-width: 100%;
    }

    #readerFontSizeSlider::-webkit-slider-thumb {
        width: 44px;
        height: 44px;
        border-width: 3px;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    }

    #readerFontSizeSlider::-moz-range-thumb {
        width: 44px;
        height: 44px;
        border-width: 3px;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    }

    #readerFontSizeValue {
        font-size: 20px;
        margin-top: 12px;
    }
}

/* Search results (match bible-reader) */
.search-result-group {
    margin-bottom: 24px;
}

.search-result-group h3 {
    font-size: 16px;
    font-weight: 600;
    color: #40E0D0;
    margin-bottom: 8px;
    cursor: pointer;
    transition: color 0.2s;
}

.search-result-group h3:hover {
    color: #35c9b8;
}

.search-result-verses {
    padding-left: 12px;
}

.search-result-verse {
    margin-bottom: 8px;
    padding: 10px 12px;
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.05);
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-verse:hover {
    background: rgba(64, 224, 208, 0.1);
}

.search-result-verse mark {
    background: rgba(64, 224, 208, 0.3);
    padding: 2px 0;
    font-weight: 600;
}

.day-list-container{
    max-height: calc(80vh - 120px);
    overflow-y: auto;
    padding: 4px 0;
}

.day-list-item{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 160ms ease;
    border: 1px solid transparent;
    margin-bottom: 4px;
}

.day-list-item:hover{
    background: rgba(64, 224, 208, 0.1);
    border-color: rgba(64, 224, 208, 0.3);
}

.day-list-item.is-active{
    background: rgba(64, 224, 208, 0.15);
    border-color: #40E0D0;
}

.day-list-item-number{
    font-weight: 700;
    color: var(--muted);
    font-size: 14px;
    min-width: 50px;
}

.day-list-item.is-active .day-list-item-number{
    color: #40E0D0;
}

.day-list-item-ref{
    flex: 1;
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
    text-align: left;
    margin-left: 12px;
}

.day-list-item-check{
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 160ms ease;
}

.day-list-item.is-complete .day-list-item-check{
    opacity: 1;
}

.day-list-item-check svg{
    width: 16px;
    height: 16px;
}
.search-form{
    display: flex;
    gap: 10px;
    align-items: center;
}
.search-input{
    flex: 1;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    padding: 0 12px;
    font-weight: 700;
    font-size: 16px; /* Prevent mobile zoom on focus */
    outline: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.search-input:focus{
    border-color: rgba(47, 111, 237, 0.6);
    box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.12);
}
.search-meta{
    margin-top: 10px;
    color: var(--muted);
    font-weight: 600;
    font-size: 13px;
}
.search-results{
    margin-top: 12px;
    max-height: min(60vh, 520px);
    overflow: auto;
    padding-right: 4px;
}
.search-error{
    padding: 12px;
    border: 1px solid rgba(220, 38, 38, 0.35);
    background: rgba(220, 38, 38, 0.06);
    border-radius: 12px;
    color: #991b1b;
    font-weight: 700;
}

.font-size-controls{
    padding: 20px 0;
}
#fontSizeSlider{
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--line);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
#fontSizeSlider::-webkit-slider-thumb{
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 2px solid var(--bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
#fontSizeSlider::-moz-range-thumb{
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 2px solid var(--bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
#fontSizeSlider:focus{
    outline: none;
}
#fontSizeSlider:focus::-webkit-slider-thumb{
    box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.2);
}
#fontSizeSlider:focus::-moz-range-thumb{
    box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.2);
}
.font-size-display{
    margin-top: 16px;
    text-align: center;
}
#fontSizeValue{
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.theme-controls{
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.theme-label{
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.theme-buttons{
    display: flex;
    gap: 8px;
}

.voice-controls{
    margin-top: 16px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    flex-shrink: 0;
}

.reader-voice-select{
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
}

.reader-voice-select:focus{
    outline: none;
    border-color: rgba(148, 163, 184, 0.8);
}

.theme-btn{
    flex: 1;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 160ms ease;
}

.theme-btn-active,
.theme-dark-active {
    background: rgba(64, 224, 208, 0.25);
    color: #40E0D0;
    border-color: rgba(64, 224, 208, 0.5);
}

body.page-theme-light .theme-dark-active {
    background: #111827;
    color: #f9fafb;
    border-color: #111827;
}

body.page-theme-light {
    background: #f9fafb;
    color: #111827;
    --text: #111827;
    --muted: #6b7280;
    --bg: #ffffff;
    --card: #f9fafb;
    --line: #e5e7eb;
}

/* Header/toolbar: same theme as bible-reader */
body.page-theme-light .topbar,
body.page-theme-light .day-selector-toolbar,
body.page-theme-light .bible-toolbar {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

body.page-theme-light .topbar .circle-btn,
body.page-theme-light .topbar .day-indicator,
body.page-theme-light .bible-toolbar .circle-btn {
    color: #111827;
    border-color: #d1d5db;
}
body.page-theme-light .bible-toolbar .ref-button {
    background: #ffffff;
    border-color: #d1d5db;
    color: #111827;
}
body.page-theme-light .bible-toolbar .ref-button .ref-caret {
    color: #111827;
}
body.page-theme-light .circle-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.2);
}

body.page-theme-light .page{
    background: #f9fafb;
}

body.page-theme-light .scripture-content{
    color: #111827;
}

body.page-theme-light .bottom-nav{
    background-color: #ffffff;
    border-top-color: #e5e7eb;
}
body.page-theme-light .bottom-nav .bottom-nav-item,
body.page-theme-light .bottom-nav a.bottom-nav-item,
body.page-theme-light .bottom-nav div.bottom-nav-item {
    color: #374151 !important;
}
body.page-theme-light .bottom-nav .bottom-nav-item:hover,
body.page-theme-light .bottom-nav .bottom-nav-item.active,
body.page-theme-light .bottom-nav a.bottom-nav-item:hover,
body.page-theme-light .bottom-nav a.bottom-nav-item.active {
    color: #b8860b !important;
}

body.page-theme-light .day-list-item:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.15);
}
body.page-theme-light .day-list-item.active {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.25);
}
body.page-theme-sepia .day-list-item:hover {
    background: rgba(92, 75, 55, 0.1);
    border-color: rgba(92, 75, 55, 0.25);
}
body.page-theme-sepia .day-list-item.active {
    background: rgba(92, 75, 55, 0.15);
    border-color: rgba(92, 75, 55, 0.4);
}

/* Sepia theme: low-contrast warm yellow for easier night reading */
body.page-theme-sepia {
    background: #f4ecd8;
    color: #5c4b37;
    --text: #5c4b37;
    --muted: #78350f;
    --bg: #ebe3d0;
    --card: #f4ecd8;
    --line: #d4c4a0;
}

body.page-theme-sepia .topbar {
    background: #ebe3d0;
    border-bottom: 1px solid #d4c4a0;
    box-shadow: 0 4px 12px rgba(92, 75, 55, 0.15);
}

body.page-theme-sepia .page {
    background: #f4ecd8;
}

body.page-theme-sepia .scripture-content {
    color: #5c4b37;
}

body.page-theme-sepia .bottom-nav {
    background-color: #ebe3d0;
    border-top-color: #d4c4a0;
}
body.page-theme-sepia .bottom-nav .bottom-nav-item,
body.page-theme-sepia .bottom-nav a.bottom-nav-item,
body.page-theme-sepia .bottom-nav div.bottom-nav-item {
    color: #5c4b37 !important;
}
body.page-theme-sepia .bottom-nav .bottom-nav-item:hover,
body.page-theme-sepia .bottom-nav .bottom-nav-item.active,
body.page-theme-sepia .bottom-nav a.bottom-nav-item:hover,
body.page-theme-sepia .bottom-nav a.bottom-nav-item.active {
    color: #8b6914 !important;
}

body.page-theme-sepia .bible-toolbar,
body.page-theme-sepia .day-selector-toolbar {
    background: #ebe3d0;
    border-bottom: 1px solid #d4c4a0;
    box-shadow: 0 4px 12px rgba(92, 75, 55, 0.15);
}

body.page-theme-sepia .ref-button {
    background: #ebe3d0;
    border-color: rgba(92, 75, 55, 0.4);
    color: #5c4b37;
}

body.page-theme-sepia .toolbar-voice-select,
body.page-theme-sepia .speed-btn {
    background: rgba(235, 227, 208, 0.9);
    border-color: rgba(92, 75, 55, 0.3);
    color: #5c4b37;
}

body.page-theme-sepia .speed-btn.active,
body.page-theme-sepia .speed-btn[aria-pressed="true"] {
    background: rgba(92, 75, 55, 0.2);
    color: #5c4b37;
}

body.page-theme-sepia .circle-btn {
    color: #5c4b37;
    border-color: rgba(92, 75, 55, 0.45);
}
body.page-theme-sepia .circle-btn:hover {
    background: rgba(92, 75, 55, 0.1);
    border-color: rgba(92, 75, 55, 0.6);
}

.day-select-controls{
    display: flex;
    flex-direction: column;
    gap: 12px;
}
#daySelectInput{
    width: 100%;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    padding: 0 12px;
    font-weight: 700;
    font-size: 16px;
    outline: none;
    background: var(--bg);
    color: var(--text);
}
#daySelectInput:focus{
    border-color: rgba(47, 111, 237, 0.6);
    box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.12);
}


/* Page + Card */
.page{
    padding: 60px 20px 120px; /* Top padding clears the fixed topbar */
}
.content{
    max-width: 760px;
    margin: 0 auto;
    display: grid;
    gap: 18px;
}

.card{
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.card-muted{
    box-shadow: none;
}
.card-head{
    padding: 22px 22px 14px;
}
.card-body{
    padding: 0 22px 22px;
}

.kicker{
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.plan-title{
    margin-top: 8px;
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.day-row{
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.day-label{
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.day-controls{
    display: flex;
    align-items: center;
    gap: 10px;
}
.pill-btn{
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg);
    cursor: pointer;
    color: var(--muted);
    font-size: 18px;
}
.pill-btn:hover{
    color: var(--text);
}

.day-select{
    height: 38px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg);
    padding: 0 12px;
    font-weight: 800;
    color: var(--text);
    outline: none;
    cursor: pointer;
    min-width: 140px;
}
.day-select:focus{
    border-color: rgba(47, 111, 237, 0.6);
    box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.12);
}

.section-head{
    padding-top: 8px;
    margin-top: 12px;
}
.section-title{
    font-size: 16px;
    font-weight: 700;
    margin-top: 12px;
}

.scripture-list{
    list-style: none;
    margin-top: 10px;
    display: grid;
    gap: 10px;
}
.scripture-item{
    padding: 14px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.scripture-item a{
    text-decoration: none;
    font-weight: 700;
}
.scripture-item small{
    color: var(--muted);
    font-weight: 600;
}
.read-btn{
    color: #40E0D0;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(64, 224, 208, 0.1);
    border: 1px solid rgba(64, 224, 208, 0.3);
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    transition: all 160ms ease;
}
.read-btn:hover{
    background: rgba(64, 224, 208, 0.2);
    border-color: rgba(64, 224, 208, 0.5);
}
.read-btn:active{
    background: rgba(64, 224, 208, 0.3);
}
.scripture-item.skeleton{
    height: 52px;
    background: linear-gradient(90deg, #f3f4f6 0%, #eceff4 50%, #f3f4f6 100%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite linear;
    border-color: #edf0f5;
}
@keyframes shimmer{
    0%{ background-position: 0% 0%; }
    100%{ background-position: 200% 0%; }
}

.cta-row{
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn{
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
    background: var(--bg);
}
.btn-primary{
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.btn-primary:hover{
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}
.btn-ghost{
    border-color: var(--line);
    color: var(--muted);
}
.btn-ghost:hover{
    color: var(--text);
}
.btn-wide{
    padding-left: 18px;
    padding-right: 18px;
}

/* Scripture Text Styling */
.scripture-content {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    font-size: 1.12rem;
    line-height: 1.8;
    padding: 20px;
    max-width: 100%;
    margin: 0;
}

.section-title-large {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    font-size: 24px;
    font-style: italic;
    font-weight: 400;
    color: var(--text);
    margin: 0 0 24px 0;
    line-height: 1.4;
}

.chapter-header {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 26px;
    margin-bottom: 10px;
}

.chapter-block {
    position: relative;
    margin-bottom: 32px;
}

.verse-num {
    font-size: 0.75em;
    font-weight: bold;
    color: #d64541; /* Red verse numbers */
    vertical-align: super;
    margin-right: 4px;
    user-select: none; /* Don't copy verse numbers when selecting text */
}

.divider{
    height: 1px;
    background: var(--line);
    margin-top: 18px;
}

.chapter-navigation{
    margin-top: 32px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.nav-arrow-btn-large{
    width: 60px;
    height: 60px;
    border-radius: 999px;
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 28px;
    transition: all 160ms ease;
    box-shadow: 0 4px 12px rgba(64, 224, 208, 0.3);
}

.nav-arrow-btn-large:hover{
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(64, 224, 208, 0.4);
}

.nav-arrow-btn-large:active{
    transform: scale(0.95);
}

/* Light theme: dark button so it’s visible on light background */
body.page-theme-light .nav-arrow-btn-large {
    color: #111827;
    border-color: #374151;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
body.page-theme-light .nav-arrow-btn-large:hover {
    background: rgba(0, 0, 0, 0.08);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Sepia theme: dark button so it’s visible on sepia background */
body.page-theme-sepia .nav-arrow-btn-large {
    color: #5c4b37;
    border-color: #5c4b37;
    box-shadow: 0 4px 12px rgba(92, 75, 55, 0.25);
}
body.page-theme-sepia .nav-arrow-btn-large:hover {
    background: rgba(92, 75, 55, 0.12);
    box-shadow: 0 6px 16px rgba(92, 75, 55, 0.35);
}

.complete-day-btn-large{
    width: 60px;
    height: 60px;
    border-radius: 999px;
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 32px;
    transition: all 160ms ease;
    box-shadow: 0 4px 12px rgba(47, 111, 237, 0.3);
}

.complete-day-btn-large:hover{
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(47, 111, 237, 0.4);
}

.complete-day-btn-large:active{
    transform: scale(0.95);
}
.muted{
    color: var(--muted);
    margin-top: 10px;
}

/* Loading Animation */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #111827;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 50px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Tweak */
@media (max-width: 600px) {
    .topnav{ display: none; }
    .plan-title{ font-size: 22px; }
    .card-head, .card-body{ padding-left: 16px; padding-right: 16px; }
    .scripture-content { font-size: 1.05rem; }
    .modal-card{ margin: 56px 12px 0; }
    .page{ padding-bottom: 120px; }
    
    .chapter-selector-row{
        flex-wrap: wrap;
        justify-content: space-between;
        min-height: auto;
        padding-bottom: 20px;
    }
    
    .day-navigation-left{
        flex: 0 0 auto;
        max-width: calc(50% - 6px);
    }
    
    .day-navigation-center{
        position: static;
        transform: none;
        flex: 1 1 100%;
        order: 3;
        justify-content: center;
        align-items: center;
        margin-top: 8px;
        width: 100%;
        max-width: 100%;
        padding: 0;
    }
    
    .day-navigation-right{
        display: none;
    }
}
