/* Match the + / - / theme controls in view.php. */
.reading-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    padding: 0;
    margin: 14px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.reading-toolbar > button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    box-sizing: border-box;
    padding: 0;
    border: 1px solid #c6dcd5;
    border-radius: 11px;
    background: #fff;
    color: var(--rebible-main, #3f6d77);
    font-size: 1.05rem;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.reading-toolbar > button:hover { background: #e4f1ec; border-color: #8bb6a9; }
.reading-toolbar > button:focus-visible { outline: 2px solid #3f756c; outline-offset: 2px; }
.view .reading-toolbar > button i { margin: 0; line-height: 1; color: currentColor; }

/* The shared site stylesheet fixes paragraphs to 1rem, including on mobile.
   Reading content must follow the saved font size instead. */
body:not(.dark-theme) .view,
body.dark-theme .view { font-size: var(--legacy-font-size); }
.view.reading-legacy { overflow-wrap: anywhere; }
.view.reading-article .container p,
.view.reading-article .container li,
.view.reading-legacy p,
.view.reading-legacy li,
.view .topic-page p { font-size: inherit !important; }
.view.reading-article .section-title { font-size: 1.3em !important; }
.view .topic-page .topic-scripture p { font-size: .95em !important; }

/* These controls use the same saved size for every 암송 heading, including
   the rem-sized headings that the global mobile stylesheet defines. */
.view .memory-page .memory-hero h1 { font-size: 1.65em !important; }
.view .memory-page .memory-group-heading h2 { font-size: 1.34em !important; }
.view .memory-page .memory-card-heading h3 { font-size: 1.03em !important; }
.view .memory-page :is(.memory-eyebrow, .memory-group-number, .memory-group-count,
    .memory-card-number, .memory-reference, .memory-video, .memory-jump a) {
    font-size: 1em;
}

.view.reading-article .salvation-prayer {
    background: #f3f6f8;
    border-left: 4px solid #4a6d7c;
    padding: 1.2rem;
    margin: 1.2rem 1rem;
    font-size: 1.05em;
    line-height: 1.7;
    color: #333;
}

body.dark-theme .reading-toolbar { background: transparent; border: 0; box-shadow: none; }
body.dark-theme .reading-toolbar > button { background: #263b33; border-color: #4a685b; color: #d4eee4; }
body.dark-theme .reading-toolbar > button:hover { background: #345044; color: #effaf5; }
body.dark-theme .reading-toolbar > button:focus-visible { outline-color: #9cd7bd; }

/* Keep article headers and content aligned when switching themes. */
body.dark-theme .view {
    width: calc(100% - 28px);
    margin: 18px auto 28px;
    padding: 26px 24px;
}
body.dark-theme .reading-article :is(.section_han, .feature-card, .step-item) {
    margin: 16px 0;
    padding: 20px;
    border: 1px solid #3b5048;
    border-radius: 15px;
}
body.dark-theme .reading-article .bible-verse {
    margin: 12px 0;
    padding: 14px 15px;
    border-left: 4px solid #67aaa1;
    border-radius: 0 10px 10px 0;
}
body.dark-theme .reading-article .container,
body.dark-theme .topic-page,
body.dark-theme .memory-page { background: transparent; color: #e0eae6; }
body.dark-theme .reading-article :is(.section_han, .feature-card, .apply-box, .church-info),
body.dark-theme .topic-page :is(.topic-item, .topic-question, .topic-nav a, .topic-nav span, .topic-fineprint),
body.dark-theme .memory-page :is(.memory-card, .memory-jump a) {
    background: #1d2e28;
    border-color: #3b5048;
    color: #e0eae6;
    box-shadow: none;
}
body.dark-theme .reading-article :is(.bible-verse, .seminar-banner),
body.dark-theme .topic-page :is(.topic-scripture, .topic-item-num, .topic-book-link),
body.dark-theme .memory-page :is(.memory-card-number, .memory-video) {
    background: #263b33;
    border-color: #4a685b;
    color: #d4eee4;
}
body.dark-theme .reading-article :is(p, .bible-reference, .section-title, .feature-card-title, .step-title, .step-desc, .church-info strong, .contact-number),
body.dark-theme .topic-page :is(.topic-section h2, .topic-scripture h3, .topic-verse-num, .topic-note, .topic-breadcrumb, .topic-fineprint p, .topic-share-status),
body.dark-theme .memory-page :is(.memory-group-number, .memory-group-count, .memory-reference, .memory-verse, .memory-empty) {
    color: #d4eee4 !important;
}
body.dark-theme .topic-page .topic-hero p,
body.dark-theme .memory-page .memory-hero p { color: #e5f3f1 !important; }
body.dark-theme .reading-article .feature-bad { color: #ffaaaa; }
body.dark-theme .reading-article .feature-good { color: #a9d2ff; }
body.dark-theme .reading-article .kakao-link { color: #3c1e1e; }
body.dark-theme .reading-article .salvation-prayer {
    background: #263b33;
    border-left-color: #67aaa1;
    color: #d4eee4;
}
body.dark-theme .topic-page .topic-nav .topic-nav-list { background: #356c58; color: #fff; }
body.dark-theme .topic-page .topic-share button { background: #263b33; border-color: #4a685b; color: #d4eee4; }
body.dark-theme .topic-page .topic-share .topic-share-kakao { background: #fee500; border-color: #fee500; color: #28221d; }
body.dark-theme .topic-page :is(.topic-item, .topic-nav a, .topic-book-link):hover,
body.dark-theme .memory-page .memory-jump a:hover { background: #345044; }
body.dark-theme .memory-page .memory-group-heading,
body.dark-theme .topic-page .topic-share { border-color: #3b5048; }

@media (max-width: 720px) {
    .reading-toolbar { padding: 0; }
    .reading-toolbar > button { height: 34px; border-radius: 9px; font-size: .95rem; }
    body.dark-theme .view { width: 100%; margin: 8px 0 18px; padding: 18px 14px; border: 0; border-radius: 0; }
    body.dark-theme .reading-article :is(.section_han, .feature-card, .step-item) { margin: 12px 0; padding: 16px 14px; border-radius: 12px; }
}
