/* Scripture reader controls follow their surface colors in both themes. */
.view .reader-toolbar i,
.view .devotion-share-btn i,
.view .qt-note-btn i,
.view .verse-action-icons i,
#translation i,
#pop i {
    color: currentColor;
}

body.dark-theme {
    color-scheme: dark;
    --legacy-page-bg: #101918;
    --legacy-font-color: #e0eae6;
    --legacy-link-color: #a8d8c9;
    --legacy-icon-color: #b6d8cc;
    --legacy-hover-color: #293e37;
    --legacy-highlight-color: #427b59;
    background: #101918;
    color: #e0eae6;
}
body.dark-theme .view {
    background: #172320;
    color: #e0eae6;
    border-color: #30453e;
}
body.dark-theme .view a { color: #a8d8c9; }
body.dark-theme .view h1,
body.dark-theme .view h2,
body.dark-theme .view h3,
body.dark-theme .view h4,
body.dark-theme .view p,
body.dark-theme .view li { color: inherit; }
body.dark-theme .view hr { border: 0; border-top: 1px solid #3b5048; }
body.dark-theme .zoom.reader-toolbar { background: transparent; border: 0; box-shadow: none; }
body.dark-theme .qt-note-panel,
body.dark-theme #verse_action_modal {
    background: #1d2e28;
    border-color: #3b5048;
    box-shadow: none;
}
body.dark-theme .reader-toolbar .reader-tool-group > a,
body.dark-theme .devotion-share-btn,
body.dark-theme .qt-note-btn {
    background: #263b33;
    border-color: #4a685b;
    color: #d4eee4;
}
body.dark-theme .reader-toolbar .reader-tool-group > a:hover,
body.dark-theme .devotion-share-btn:hover,
body.dark-theme .devotion-share-btn:focus-visible,
body.dark-theme .qt-note-btn:hover,
body.dark-theme .qt-note-btn:focus {
    background: #345044;
    color: #effaf5;
}
body.dark-theme .reader-toolbar .reader-tool-group > a:focus-visible,
body.dark-theme .devotion-share-btn:focus-visible { outline: 2px solid #9cd7bd; outline-offset: 2px; }
body.dark-theme .devotion-share-btn--kakao {
    background: #fee500;
    border-color: #fee500;
    color: #28221d;
}
body.dark-theme .devotion-share-btn--kakao:hover,
body.dark-theme .devotion-share-btn--kakao:focus-visible { background: #f5dd00; color: #28221d; }
body.dark-theme .devotion-share-actions,
body.dark-theme .devotion-share-divider,
body.dark-theme .verse-action-icons { border-color: #3b5048; }
body.dark-theme .qt-note-title,
body.dark-theme .devotion-share-status { color: #b5dece; }
body.dark-theme .qt-note-btn-primary,
body.dark-theme .verse-save-btn { background: #356c58; color: #fff; }
body.dark-theme .qt-note-btn-primary:hover { background: #427e67; }
body.dark-theme .verse-close-btn { background: #495e55; color: #fff; }
body.dark-theme .verse-memo2-text { background: #23352d; color: #e0eae6; }
body.dark-theme .verse-action-icons button { color: #d4eee4; }
body.dark-theme .verse-action-icons button:hover { background: #345044; }
body.dark-theme .view textarea,
body.dark-theme .view select,
body.dark-theme .view input[type="text"],
body.dark-theme .view input[type="search"] {
    background: #13221c;
    color: #e0eae6;
    border-color: #4a685b;
}
body.dark-theme .view textarea::placeholder,
body.dark-theme .view input::placeholder { color: #a0b6ac; opacity: 1; }
body.dark-theme .qt-note-panel textarea:focus { border-color: #9cd7bd; outline-color: #9cd7bd; }
body.dark-theme #translation,
body.dark-theme #translation.show,
body.dark-theme #translation .translation,
body.dark-theme #translation .translation:link,
body.dark-theme #translation .translation:visited {
    background: #1d2e28 !important;
    color: #e0eae6 !important;
    border-color: #4a685b;
}
body.dark-theme #translation .translation:hover,
body.dark-theme #translation .translation:focus { background: #345044 !important; }
body.dark-theme #translation .translation-check { color: #b5dece; }
body.dark-theme #pop { background: #172320; color: #e0eae6; border-color: #4a685b; }
body.dark-theme .pop-header { background: #1d2e28; border-color: #3b5048; }
body.dark-theme .pop-title,
body.dark-theme #pop-close,
body.dark-theme #pop-content a { color: #b5dece; }
body.dark-theme #pop-close:hover,
body.dark-theme #pop-close:focus { background: #345044; color: #effaf5; }
body.dark-theme #pop-content p,
body.dark-theme #pop-content li,
body.dark-theme #pop-content h2,
body.dark-theme #pop-content h3 { color: inherit; }
body.dark-theme .pop-loading,
body.dark-theme .pop-error { color: #b0c2b9; }
body.dark-theme #pagedn,
body.dark-theme #pagedn:hover,
body.dark-theme #pagedn:focus {
    background: transparent;
    border: 0;
    box-shadow: none;
    opacity: 1;
    color: #d4eee4;
}
body.dark-theme #pagedn i { color: currentColor; opacity: .55; }

/* ID-based memo styles must override the reader's original white input rule. */
body.dark-theme #vmodal_memo,
body.dark-theme #vmodal_admin_check {
    background: #13221c;
    color: #e0eae6;
    border-color: #4a685b;
}
body.dark-theme #vmodal_memo::placeholder { color: #a0b6ac; opacity: 1; }
body.dark-theme #vmodal_memo:focus,
body.dark-theme #vmodal_admin_check:focus-visible {
    border-color: #9cd7bd;
    outline: 2px solid #9cd7bd;
    outline-offset: 1px;
}
body.dark-theme #vmodal_memo2_text { background: #23352d; color: #e0eae6; }
body.dark-theme .verse-action-icons button:focus-visible,
body.dark-theme .verse-bottom-buttons button:focus-visible {
    outline: 2px solid #9cd7bd;
    outline-offset: 2px;
}
body.dark-theme .verse-save-btn:hover { background: #427e67; }
body.dark-theme .verse-close-btn:hover { background: #5a7367; }
