.toc-tools {
  position: sticky; top: 86px; z-index: 4;
  display: grid; grid-template-columns: minmax(220px,1fr) minmax(180px,260px) auto;
  gap: 14px; align-items: end; margin: 0 0 22px; padding: 16px;
  border: 1px solid var(--line); border-radius: 15px; background: #fffffff2;
  box-shadow: 0 8px 28px #07075c12; backdrop-filter: blur(8px);
}
.toc-tools label {font-size:.78rem;font-weight:800;color:var(--navy);text-transform:uppercase;letter-spacing:.06em}
.toc-tools input,.toc-tools select {display:block;width:100%;margin-top:5px;padding:11px 12px;border:1px solid #b9bdd7;border-radius:9px;background:#fff;color:var(--ink);font:500 1rem/1.2 inherit}
.toc-tools p {margin:0 0 10px;color:var(--muted);white-space:nowrap}
.lesson-card[hidden] {display:none}
.devotional-dialog {width:min(900px,calc(100% - 22px));max-width:900px;height:min(94vh,1000px);overflow-x:hidden;overflow-y:auto;padding:22px;background:#e7e8f2;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y}
.devotional-heading {position:sticky;top:-22px;z-index:2;margin:-22px -22px 16px;padding:20px 58px 14px 22px;background:#fffffff5;border-bottom:1px solid var(--line);backdrop-filter:blur(8px)}
.devotional-heading h2,.devotional-heading p {margin-top:.25rem;margin-bottom:.35rem}
.devotional-pages {display:grid;grid-template-columns:1fr;gap:20px;max-width:760px;margin:auto}
.devotional-pages figure {margin:0;padding:8px;background:#fff;border-radius:8px;box-shadow:0 9px 30px #07075c2a}
.devotional-pages img {display:block;width:100%;height:auto;touch-action:pan-y pinch-zoom;-webkit-user-drag:none}
.devotional-pages figcaption {padding:6px 4px 0;text-align:center;color:var(--muted);font-size:.78rem}
.devotional-close {position:sticky;float:right;top:5px;right:5px;z-index:20;width:auto;height:44px;padding:0 14px;border-radius:999px;background:var(--navy);color:#fff!important;box-shadow:0 5px 18px #0005;font:800 .92rem/1 inherit}
.devotional-close span{font-size:.82rem}
.rotation-hero {max-width:820px;margin-bottom:20px}.rotation-hero h1{font:700 clamp(2rem,5vw,3.6rem)/1.08 Georgia,serif;color:var(--navy);margin:.15em 0}.day-jump{position:sticky;top:86px;z-index:4;display:flex;gap:6px;overflow:auto;padding:10px;margin:0 0 18px;background:#fffffff2;border:1px solid var(--line);border-radius:13px;backdrop-filter:blur(8px)}.day-jump a{flex:0 0 34px;height:34px;display:grid;place-items:center;border-radius:50%;background:var(--blue);color:var(--navy);font-weight:800;text-decoration:none}.rotation-days{display:grid;gap:12px}.rotation-day{margin:0;padding:0;border-radius:15px;overflow:visible}.rotation-day>summary{display:flex;justify-content:space-between;padding:16px 18px;font-size:1.15rem;background:#fff}.rotation-day>summary small{color:var(--muted);font-weight:500}.rotation-list{display:grid;gap:8px;padding:12px;background:var(--blue2)}.rotation-item{display:grid;grid-template-columns:78px minmax(220px,1fr) minmax(175px,auto) auto;gap:14px;align-items:center;padding:13px;background:#fff;border:1px solid var(--line);border-radius:11px}.rotation-item.taught{border-left:5px solid #27845e}.rotation-step{font-weight:900;color:var(--navy)}.rotation-title a{display:block;color:var(--ink);font:700 1.08rem Georgia,serif}.rotation-title small,.rotation-status small{display:block;color:var(--muted)}.rotation-status strong{display:block;color:#176548}.compact{padding:8px 12px;font-size:.82rem}.mark-dialog label{display:block;margin:13px 0;font-weight:800}.mark-dialog input,.mark-dialog textarea{display:block;width:100%;margin-top:5px;padding:10px;border:1px solid #b9bdd7;border-radius:8px;font:inherit}.history-section{margin-top:28px;padding:22px;background:#fff;border:1px solid var(--line);border-radius:16px}.history-section h2{font-family:Georgia,serif;color:var(--navy)}.history-list{display:grid;gap:8px}.history-list article{display:grid;grid-template-columns:110px 1fr;gap:14px;padding:11px;border-bottom:1px solid var(--line)}.history-list time{font-weight:800;color:var(--navy)}.history-list small{display:block;color:var(--muted)}
.position-card{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,320px);gap:18px;margin:18px 0 22px;padding:20px;border-radius:16px;background:linear-gradient(135deg,#fff,#edf0ff);border:1px solid #bfc4e7;box-shadow:0 8px 28px #07075c12}.position-card h2{margin:.2em 0;color:var(--navy);font:700 1.5rem Georgia,serif}.position-card p{margin:.35em 0}.next-position{padding:15px;border-radius:12px;background:var(--navy);color:#fff}.next-position .eyebrow{color:#e7bf82}.next-position h3{margin:.25em 0}.next-position a{display:block;color:#fff;font:700 1.1rem Georgia,serif}.next-position small{display:block;color:#dfe2ff}
.leadership-notes{border:2px solid #bfc4e7;background:linear-gradient(145deg,#fff,#f3f4fb)}.leadership-note-form,.leadership-note-list article details form{display:grid;gap:12px}.leadership-note-form label,.leadership-note-list label{font-weight:800}.leadership-note-form select,.leadership-note-form textarea,.leadership-note-list select,.leadership-note-list textarea{display:block;width:100%;margin-top:5px;padding:10px;border:1px solid #b9bdd7;border-radius:9px;background:#fff;font:inherit}.leadership-note-list{display:grid;gap:12px;margin-top:20px}.leadership-note-list article{padding:15px;border-left:5px solid var(--navy);border-radius:10px;background:#fff;box-shadow:0 5px 18px #07075c10}.leadership-note-list header{display:flex;justify-content:space-between;gap:12px}.leadership-note-list header span{color:var(--muted);font-size:.82rem}.leadership-note-list article>p{white-space:pre-wrap}.leadership-note-list details{margin-top:10px}.leadership-note-list details form{margin-top:10px}.empty-note{color:var(--muted);font-style:italic}
.meeting-focus{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 22px;padding:20px 22px;border-radius:16px;background:linear-gradient(135deg,#07075c,#171b88);color:#fff;box-shadow:0 10px 32px #07075c32}.meeting-focus h2,.meeting-focus p{margin:.2em 0}.meeting-focus .eyebrow{color:#e7bf82}.meeting-focus .button{background:#fff;color:var(--navy);white-space:nowrap}.lesson,.reading-dialog{font-size:var(--reader-size,100%)}.lesson p,.lesson li,.lesson textarea,.reading-dialog .reading-text,.reading-dialog p{font-size:inherit}.reading-size{position:fixed;left:12px;bottom:14px;z-index:7;display:flex;align-items:center;gap:5px;padding:5px;border:1px solid #bfc4e7;border-radius:999px;background:#fffffff2;box-shadow:0 6px 22px #07075c24}.reading-size button{display:grid;place-items:center;width:42px;height:36px;padding:0;border:0;border-radius:999px;background:var(--blue);color:var(--navy);font:900 1rem/1 system-ui,-apple-system,Segoe UI,sans-serif;cursor:pointer}
.birthday-hero h1{margin:.15em 0;color:var(--navy);font:700 clamp(2.2rem,6vw,4rem)/1.05 Georgia,serif}.birthday-submit{margin:20px 0;padding:22px;border:1px solid #bfc4e7;border-radius:16px;background:#fff}.birthday-submit form{display:grid;grid-template-columns:1fr 1fr auto;gap:12px;align-items:end}.birthday-submit label,.birthday-manage label{font-weight:800}.birthday-submit input,.birthday-manage input{display:block;width:100%;margin-top:5px;padding:10px;border:1px solid #b9bdd7;border-radius:9px;font:inherit}.birthday-submit small{display:block;margin-top:10px;color:var(--muted)}.birthday-months{display:grid;gap:12px;margin-top:22px}.birthday-month{margin:0;max-width:none}.birthday-month>summary{display:flex;justify-content:space-between;font-size:1.18rem}.birthday-month>div{display:grid;gap:8px;margin-top:12px}.birthday-month article{display:grid;grid-template-columns:85px 1fr auto;gap:15px;align-items:center;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--blue2)}.birthday-date{display:grid;text-align:center}.birthday-date strong{color:var(--navy)}.birthday-date span{color:var(--muted);font-size:.82rem}.birthday-month h2,.birthday-month p{margin:0}.birthday-month h2{font:700 1.25rem Georgia,serif;color:var(--navy)}.birthday-manage{margin:0;padding:9px 12px}.birthday-manage form{display:grid;gap:8px;margin-top:9px;min-width:260px}
.site-header .brand{gap:16px;align-items:center}.site-header .brand-logo{width:72px;height:72px}.site-header .brand-copy{justify-content:center;gap:0}.site-header .brand-wordmark-frame{height:55px;max-width:430px}.site-header .brand-wordmark{width:min(390px,40vw);height:55px}.site-header .brand-copy small{margin-top:-2px;padding-left:3px;line-height:1.1}.theme-toggle{white-space:nowrap}.account-nav .theme-toggle{background:#ffffff12;border:1px solid #ffffffaa;color:#fff}.account-nav .theme-toggle:hover{background:#ffffff25}
html[data-theme="dark"]{--paper:#0c0e1a;--ink:#f2f3fb;--muted:#bec2d5;--blue:#272c50;--blue2:#171a31;--line:#3b4164;--white:#171a2d;--green:#c8ccff;--green2:#202541;color-scheme:dark}html[data-theme="dark"] body{background:#0c0e1a;color:var(--ink)}html[data-theme="dark"] main{color:var(--ink)}html[data-theme="dark"] .hero h1,html[data-theme="dark"] .lesson-title h1,html[data-theme="dark"] .lesson section h2,html[data-theme="dark"] .admin-heading h1,html[data-theme="dark"] .birthday-hero h1,html[data-theme="dark"] .birthday-month h2,html[data-theme="dark"] .birthday-date strong,html[data-theme="dark"] .rotation-hero h1,html[data-theme="dark"] .position-card h2{color:#f2f3ff}html[data-theme="dark"] .lesson-card,html[data-theme="dark"] .toc-tools,html[data-theme="dark"] .lesson section:not(.take-home),html[data-theme="dark"] .leader-note,html[data-theme="dark"] details,html[data-theme="dark"] .feedback-prompt,html[data-theme="dark"] .auth-card,html[data-theme="dark"] .admin-card,html[data-theme="dark"] .admin-form,html[data-theme="dark"] .table-wrap,html[data-theme="dark"] .history-section,html[data-theme="dark"] .birthday-submit,html[data-theme="dark"] .rotation-item,html[data-theme="dark"] .leadership-note-list article,html[data-theme="dark"] .devotional-heading,html[data-theme="dark"] .devotional-pages figure{background:#171a2d;color:#f2f3fb;border-color:#3b4164}html[data-theme="dark"] .perspective.recovery,html[data-theme="dark"] .perspective.biblical,html[data-theme="dark"] .leadership-notes,html[data-theme="dark"] .position-card{background:linear-gradient(145deg,#171a2d,#202541)}html[data-theme="dark"] .scripture-list article,html[data-theme="dark"] .role-explanation article,html[data-theme="dark"] .birthday-month article,html[data-theme="dark"] .rotation-list{background:#20243e;color:#f2f3fb}html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:#0f1222!important;color:#fff!important;border-color:#4a527b!important}html[data-theme="dark"] dialog{background:#171a2d;color:#f2f3fb}html[data-theme="dark"] dialog h2,html[data-theme="dark"] summary,html[data-theme="dark"] a:not(.button){color:#cdd1ff}html[data-theme="dark"] .secondary-button{background:#252a49;color:#f4f5ff;border-color:#626b9b}html[data-theme="dark"] .toc-tools,html[data-theme="dark"] .day-jump{backdrop-filter:none}html[data-theme="dark"] .day-jump{background:#171a2df2}html[data-theme="dark"] footer{color:#aeb3ca}
html[data-theme="dark"] .reading-size{background:#171a2df2;border-color:#4a527b;box-shadow:0 6px 22px #0008}html[data-theme="dark"] .reading-size button{background:#2b3158;color:#fff}

/* Complete dark-theme pass. Keep component-specific rules here so they win
   over the original light-theme declarations in style.css/admin.css. */
html[data-theme="dark"] {
  --paper:#0b0d18;
  --ink:#f5f6ff;
  --muted:#b8bed4;
  --blue:#293057;
  --blue2:#1c2038;
  --line:#434b72;
  --white:#171a2d;
  --green:#bfc7ff;
  --green2:#222744;
  --dark-surface:#15182a;
  --dark-surface-raised:#1b1f36;
  --dark-surface-soft:#222744;
  --dark-accent:#aeb9ff;
  --dark-accent-strong:#d8dcff;
  --dark-success:#78ddb2;
  --dark-danger:#ffaaa4;
}
html[data-theme="dark"] body,
html[data-theme="dark"] main {background:var(--paper);color:var(--ink)}
html[data-theme="dark"] ::selection {background:#5966bd;color:#fff}
html[data-theme="dark"] :focus-visible {outline:3px solid #aeb9ff;outline-offset:3px}
html[data-theme="dark"] * {scrollbar-color:#6873a9 #171a2d}
html[data-theme="dark"] *::-webkit-scrollbar {width:12px;height:12px}
html[data-theme="dark"] *::-webkit-scrollbar-track {background:#171a2d}
html[data-theme="dark"] *::-webkit-scrollbar-thumb {background:#6873a9;border:3px solid #171a2d;border-radius:999px}

html[data-theme="dark"] a:not(.button):not(.secondary-button),
html[data-theme="dark"] .scripture-link,
html[data-theme="dark"] .lesson-nav a,
html[data-theme="dark"] .leadership-login-link {color:#cbd1ff}
html[data-theme="dark"] a:not(.button):not(.secondary-button):hover,
html[data-theme="dark"] .scripture-link:hover {color:#fff}
html[data-theme="dark"] .muted,
html[data-theme="dark"] .admin-heading p:last-child,
html[data-theme="dark"] .admin-form label small,
html[data-theme="dark"] .auth-card label small,
html[data-theme="dark"] .role-explanation span {color:var(--muted)}

html[data-theme="dark"] .button,
html[data-theme="dark"] .scripture-chip {background:#4c58ad;color:#fff;border:1px solid #727ed0}
html[data-theme="dark"] .button:hover,
html[data-theme="dark"] .scripture-chip:hover {background:#606dcc}
html[data-theme="dark"] .secondary-button,
html[data-theme="dark"] .section-nav button {background:#272d4d;color:#f7f8ff;border-color:#626d9f}
html[data-theme="dark"] .secondary-button:hover,
html[data-theme="dark"] .section-nav button:hover {background:#353d68}
html[data-theme="dark"] .danger-button {background:#552a35;color:#ffd9d6;border-color:#9d5963}
html[data-theme="dark"] .danger-button:hover {background:#713642}

html[data-theme="dark"] .lesson-card,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .admin-card,
html[data-theme="dark"] .admin-form,
html[data-theme="dark"] .feedback-form,
html[data-theme="dark"] .feedback-item,
html[data-theme="dark"] .review-card,
html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .birthday-submit,
html[data-theme="dark"] .history-section,
html[data-theme="dark"] .leader-note,
html[data-theme="dark"] .feedback-prompt,
html[data-theme="dark"] details {background:var(--dark-surface);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .lesson-card:hover {background:#1c2037;border-color:#727ed0}
html[data-theme="dark"] .sequence {color:#9aa5e8}
html[data-theme="dark"] .lesson-card span {color:#cbd1ff}

html[data-theme="dark"] .lesson section:not(.take-home) {background:var(--dark-surface);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .perspective.recovery,
html[data-theme="dark"] .perspective.biblical,
html[data-theme="dark"] .leadership-notes,
html[data-theme="dark"] .position-card {background:linear-gradient(145deg,#171a2d,#222744);border-color:#505a8a}
html[data-theme="dark"] .teaching-intro {background:#20243d}
html[data-theme="dark"] .questions li {border-color:#3d4569}
html[data-theme="dark"] .scripture-list article,
html[data-theme="dark"] .copyright-note,
html[data-theme="dark"] .permission-note {background:#20243b;color:var(--muted)}
html[data-theme="dark"] .take-home {background:linear-gradient(135deg,#252d72,#13184c)!important;border-color:#5966bd}
html[data-theme="dark"] .take-home,
html[data-theme="dark"] .take-home h2 {color:#fff!important}

html[data-theme="dark"] dialog,
html[data-theme="dark"] .devotional-dialog {background:#101321;color:var(--ink);border:1px solid var(--line)}
html[data-theme="dark"] .devotional-heading,
html[data-theme="dark"] .devotional-pages figure {background:var(--dark-surface-raised);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .dialog-close {color:#fff;background:#2b3155;border-radius:999px}
html[data-theme="dark"] .devotional-close {background:#4c58ad;color:#fff!important}

html[data-theme="dark"] .toc-tools,
html[data-theme="dark"] .day-jump,
html[data-theme="dark"] .reading-size {background:#171a2df2;color:var(--ink);border-color:var(--line);backdrop-filter:none}
html[data-theme="dark"] .toc-tools label {color:#d9ddff}
html[data-theme="dark"] .day-jump a {background:#2c335b;color:#eef0ff;border:1px solid #465080}
html[data-theme="dark"] .day-jump a:hover {background:#424c87}
html[data-theme="dark"] .reading-size button {background:#30375f;color:#fff;border:1px solid #515c91}

html[data-theme="dark"] .position-card h2,
html[data-theme="dark"] .rotation-hero h1 {color:#f5f6ff}
html[data-theme="dark"] .next-position {background:#252d72;color:#fff;border:1px solid #4f5fc0}
html[data-theme="dark"] .next-position a {color:#fff}
html[data-theme="dark"] .next-position small {color:#dce0ff}
html[data-theme="dark"] .rotation-day {background:var(--dark-surface);border-color:var(--line)}
html[data-theme="dark"] .rotation-day>summary {background:#1b1f36;color:#f5f6ff;border-radius:14px}
html[data-theme="dark"] .rotation-day[open]>summary {border-radius:14px 14px 0 0;border-bottom:1px solid var(--line)}
html[data-theme="dark"] .rotation-day>summary small {color:var(--muted)}
html[data-theme="dark"] .rotation-list {background:#111423}
html[data-theme="dark"] .rotation-item {background:#191d31;color:var(--ink);border-color:#3d466d}
html[data-theme="dark"] .rotation-item:hover {background:#1e233b;border-color:#566397}
html[data-theme="dark"] .rotation-step {color:#aeb9ff}
html[data-theme="dark"] .rotation-title a {color:#f1f3ff}
html[data-theme="dark"] .rotation-title small,
html[data-theme="dark"] .rotation-status small {color:#bcc3dc}
html[data-theme="dark"] .rotation-status strong {color:var(--dark-success)}
html[data-theme="dark"] .rotation-item.taught {border-left-color:var(--dark-success);background:#172a29}
html[data-theme="dark"] .history-list article {border-color:var(--line)}
html[data-theme="dark"] .history-list time {color:#cbd1ff}

html[data-theme="dark"] .birthday-month article,
html[data-theme="dark"] .role-explanation article {background:#1d2139;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .birthday-date strong,
html[data-theme="dark"] .birthday-month h2,
html[data-theme="dark"] .role-explanation strong {color:#d8dcff}

html[data-theme="dark"] .admin-form label {color:var(--ink)}
html[data-theme="dark"] .admin-table {background:var(--dark-surface);color:var(--ink)}
html[data-theme="dark"] .admin-table th {background:#242946;color:#dce0ff}
html[data-theme="dark"] .admin-table th,
html[data-theme="dark"] .admin-table td {border-color:#3d4569}
html[data-theme="dark"] .admin-table tbody tr:hover {background:#20243c}
html[data-theme="dark"] .leadership-login-link {border-color:var(--line)}
html[data-theme="dark"] .flashes p {background:#20372f;color:#d8ffed;border:1px solid #3d735d}
html[data-theme="dark"] .flashes .error {background:#45252c;color:#ffd5d2;border-color:#87505a}
html[data-theme="dark"] .flashes .warning {background:#45391f;color:#ffe9b2;border-color:#806c38}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {background:#0e1120!important;color:#fff!important;border-color:#515a84!important}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {color:#8f96af}
html[data-theme="dark"] option {background:#101321;color:#fff}
@media(max-width:700px) {
  .toc-tools {position:static;grid-template-columns:1fr;padding:13px}
  .toc-tools p {margin:0}
  .lesson-grid {grid-template-columns:1fr}
  .lesson-card {padding:17px}
  .devotional-dialog {position:fixed;inset:0;width:100%;max-width:none;height:100dvh;max-height:100dvh;margin:0;border-radius:0;padding:10px 7px;background:#dfe1ec;overflow-y:auto;touch-action:pan-y;-webkit-overflow-scrolling:touch}
  .devotional-heading {top:-10px;margin:-10px -7px 10px;padding:14px 48px 10px 13px}
  .devotional-heading h2{font-size:1.25rem}.devotional-heading>p:last-child{font-size:.82rem}
  .devotional-pages{gap:12px}.devotional-pages figure{padding:3px;border-radius:4px}
  .day-jump{position:static}.rotation-item{grid-template-columns:64px 1fr;gap:8px}.rotation-status{grid-column:1/3}.rotation-item .compact{grid-column:1/3;width:100%}.history-list article{grid-template-columns:1fr;gap:2px}
  .position-card{grid-template-columns:1fr;padding:14px}.devotional-close{top:4px;right:4px;height:46px;padding:0 15px}
  .leadership-note-list header{display:grid;gap:3px}
  .meeting-focus{align-items:flex-start;flex-direction:column;padding:17px}.meeting-focus .button{width:100%;text-align:center}.reading-size{left:8px;bottom:8px}
  .birthday-submit form{grid-template-columns:1fr}.birthday-month article{grid-template-columns:65px 1fr}.birthday-manage{grid-column:1/3;width:100%}.birthday-manage form{min-width:0}
  .site-header .brand{gap:10px}.site-header .brand-logo{width:54px;height:54px}.site-header .brand-wordmark-frame{height:42px;max-width:255px}.site-header .brand-wordmark{width:min(245px,61vw);height:42px}.site-header .brand-copy small{font-size:.56rem;letter-spacing:.055em}.site-header .account-nav{padding-left:0;gap:9px}.account-nav .theme-toggle{padding:6px 9px}
}

/* v1.6.0 lesson access, reader, and glossary refinements */
body.dialog-open{position:fixed;left:0;right:0;width:100%;overflow:hidden}
dialog[open].reading-dialog{display:flex;flex-direction:column;padding:0;overflow:hidden;overscroll-behavior:contain}
.reading-dialog-body{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:30px;touch-action:pan-x pan-y}
.reading-dialog>.dialog-close,.dictionary-dialog>.dialog-close{position:absolute;top:10px;right:10px;z-index:40;display:grid;place-items:center;width:48px;height:48px;padding:0;border:2px solid currentColor;border-radius:50%;background:#fff;color:var(--navy);font:800 1.9rem/1 system-ui;box-shadow:0 4px 16px #0004}
.devotional-dialog{--devotional-zoom:1;height:min(94vh,1000px);padding:0;overflow:hidden}
.devotional-scroll{padding:22px;overflow:auto}
.devotional-heading{top:-22px;margin:-22px -22px 16px;padding:20px 76px 14px 22px}
.devotional-pages{align-items:start;min-width:100%}
.devotional-pages figure{width:calc(100% * var(--devotional-zoom));max-width:none;transition:width .16s ease}
.devotional-pages img{width:100%;max-width:none;image-rendering:auto}
.devotional-zoom{display:flex;align-items:center;gap:8px;margin-top:12px}
.devotional-zoom button{min-width:46px;min-height:42px;padding:7px 12px;border:1px solid #aeb3db;border-radius:999px;background:#fff;color:var(--navy);font:800 1rem/1 system-ui;cursor:pointer}
.devotional-zoom [data-devotional-zoom="reset"]{min-width:74px}
.teacher-scripture-prompt{margin:0 0 18px;padding:14px 16px;border-left:4px solid var(--gold);border-radius:8px;background:var(--blue2)}
.mark-taught-card{border:2px solid #aeb3db!important;background:linear-gradient(145deg,#fff,#f1f2ff)!important}
.mark-taught-card form{display:grid;gap:12px}.mark-taught-card label{font-weight:800}.mark-taught-card input,.mark-taught-card textarea{display:block;width:100%;margin-top:5px;padding:10px;border:1px solid #b9bdd7;border-radius:9px;background:#fff;font:inherit}.mark-taught-card .last-taught{padding:12px 14px;border-radius:9px;background:var(--blue2)}
.glossary-term{display:inline;padding:0 1px;border:0;border-bottom:2px dotted var(--gold);background:transparent;color:inherit;font:inherit;cursor:help}
.glossary-term:hover,.glossary-term:focus{border-radius:3px;background:#fff0be;color:#17182d}
.reading-size .dictionary-button{width:auto;min-width:58px;padding:0 10px;font-size:.78rem}
.dictionary-dialog{width:min(680px,calc(100% - 28px));max-width:680px;height:min(82vh,760px);padding:0;overflow:hidden}
.dictionary-dialog[open]{display:flex;flex-direction:column}.dictionary-dialog h2{font-family:Georgia,serif;color:var(--navy)}
.dictionary-search{display:block;margin:18px 0 12px;font-weight:800}.dictionary-search input{display:block;width:100%;margin-top:5px;padding:11px;border:1px solid #b9bdd7;border-radius:9px;font:inherit}
.dictionary-list{display:grid;gap:8px}.dictionary-list button{display:grid;gap:2px;width:100%;padding:11px 13px;border:1px solid var(--line);border-radius:9px;background:var(--blue2);color:var(--ink);text-align:left;cursor:pointer}.dictionary-list strong{text-transform:capitalize;color:var(--navy)}.dictionary-list span{font-size:.88rem}
html[data-theme="dark"] .section-label{color:#d8dcff!important}
html[data-theme="dark"] .teacher-scripture-prompt,html[data-theme="dark"] .mark-taught-card,html[data-theme="dark"] .mark-taught-card .last-taught{background:#20243b!important;color:var(--ink);border-color:#59638f!important}
html[data-theme="dark"] .devotional-zoom button,html[data-theme="dark"] .dictionary-list button{background:#272d4d;color:#f7f8ff;border-color:#626d9f}
html[data-theme="dark"] .dictionary-list strong{color:#d8dcff}
html[data-theme="dark"] .glossary-term:hover,html[data-theme="dark"] .glossary-term:focus{background:#5a4822;color:#fff}

@media(max-width:700px){
  dialog[open].reading-dialog,dialog[open].dictionary-dialog{position:fixed;inset:0;width:100%;max-width:none;height:100dvh;max-height:100dvh;margin:0;border-radius:0;padding:0;overflow:hidden}
  .reading-dialog-body,.devotional-scroll{padding:16px 10px 24px;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
  .reading-dialog>.dialog-close,.dictionary-dialog>.dialog-close{position:absolute;top:max(10px,env(safe-area-inset-top));right:10px;width:50px;height:50px}
  .devotional-heading{top:-16px;margin:-16px -10px 12px;padding:calc(14px + env(safe-area-inset-top)) 70px 12px 12px}
  .devotional-heading h2{font-size:1.18rem}.devotional-heading>p:last-of-type{font-size:.82rem}
  .devotional-zoom{position:sticky;top:0;z-index:3;flex-wrap:wrap}
  .devotional-pages{gap:12px}.devotional-pages figure{padding:3px;border-radius:4px}
  .reading-size{max-width:calc(100vw - 16px)}
}
