/* V4: quiet, persistent prayer and a consistent recovery shell. Screen only. */
@media screen {
:root{--prayer-height:128px;--work-side:236px;scroll-padding-top:calc(var(--prayer-height) + 12px);}
/* The already installed local photo is preferred, with a bundled artwork fallback. */
.set-aside-banner{position:fixed;inset:0 0 auto;z-index:2147483646;isolation:isolate;text-align:center;color:#142b45;background:#fff7e7;border-bottom:2px solid #c7a15a;padding:8px 24px 10px;box-shadow:0 2px 9px #0a284012;overflow:hidden;}
.set-aside-banner::before{content:'';position:absolute;inset:0;z-index:-1;background-image:linear-gradient(90deg,#fff7e7 0%,#fffaf2ed 62%,#fff7e74d 100%),var(--rd-mountain);background-size:cover;background-position:center 43%;}
.set-aside-copy{max-width:1080px;margin:auto;position:relative;}
.set-aside-banner h2{font:italic 600 28px/1.18 'Snell Roundhand','Apple Chancery','Segoe Script',Georgia,serif;color:#173451;margin:0 0 4px;letter-spacing:-.02em;}
.set-aside-banner p{font:500 15px/1.42 Georgia,'Times New Roman',serif;margin:0 auto;max-width:1000px;color:#142b45;}
.set-aside-reminder{font:600 11px/1.35 system-ui,sans-serif;color:#735522;margin-top:5px;}
.app{padding-top:var(--prayer-height);grid-template-columns:var(--work-side) minmax(0,1fr);min-height:100dvh;}
.side{top:var(--prayer-height);height:calc(100dvh - var(--prayer-height));padding:15px 13px!important;background:linear-gradient(180deg,#0a223c 0%,#0d2b49 72%,#0d2b49cf),var(--rd-mountain) center bottom/auto 180px no-repeat,#0d2b49!important;}
.side .brand,.rd-brand{font:700 21px/1.25 Georgia,serif;color:#fff;letter-spacing:-.02em;}
.side .brand-sub{font-size:11px;color:#b8cde0;margin:4px 8px 12px;}
.rd-fourth-nav>button,.step-tabs-v8 .btn{min-height:36px!important;font-size:13px!important;line-height:1.25;padding:7px 10px!important;}
.main{margin:0 auto;padding:20px 26px 70px;}
.panel,.panel.active{animation:none!important;}
#vaultGate{top:var(--prayer-height)!important;}
#cloudDialog:has(.workbook-library,.step-space){inset:var(--prayer-height) 0 0!important;height:calc(100dvh - var(--prayer-height))!important;padding:0!important;background:#f2f6fb!important;scroll-padding-top:12px;}
#cloudDialog .modal-sheet:has(.workbook-library,.step-space){max-width:none!important;margin:0!important;}
#cloudDialog .step-space,#cloudDialog .workbook-library{border:0;border-radius:0;box-shadow:none;min-height:calc(100dvh - var(--prayer-height));background:#f2f6fb;}
#cloudDialog .step-space>h2,#cloudDialog .workbook-library h2{font-size:clamp(25px,3vw,34px);margin:0 0 5px;}
#cloudDialog .step-space .step-tabs-v8,#cloudDialog .workbook-library .step-tabs-v8{background:linear-gradient(180deg,#0a223c 0%,#0d2b49 72%,#0d2b49cf),var(--rd-mountain) center bottom/auto 180px no-repeat,#0d2b49!important;}
@media(min-width:960px){
#cloudDialog .step-space:has(>.step-tabs-v8),#cloudDialog .workbook-library:has(>.step-tabs-v8){padding:20px 26px 64px calc(var(--work-side) + 26px);}
#cloudDialog .step-space .step-tabs-v8,#cloudDialog .workbook-library .step-tabs-v8{position:fixed;inset:var(--prayer-height) auto 0 0;width:var(--work-side);height:calc(100dvh - var(--prayer-height));min-height:0;margin:0!important;border:0;border-radius:0;padding:15px 13px!important;overflow:auto;gap:3px;}
.step-tabs-v8::before{width:32px;height:26px;margin:0 auto 2px;color:#e7bd72;}
.rd-brand{margin:0 0 9px;padding:0 0 11px;}
}
/* Avoid showing the landing screen or sign-in form during protected switches. */
body.step-switching-v10:not(:has(#cloudDialog:not([hidden]) :is(.workbook-library,.step-space)))::after{inset:var(--prayer-height) 0 0!important;z-index:2100!important;background:#f2f6fb!important;color:#52677d!important;content:'Opening your recovery work…'!important;}
@media(min-width:960px){body.step-switching-v10:not(:has(#cloudDialog:not([hidden]) :is(.workbook-library,.step-space)))::after{background:linear-gradient(90deg,#0d2b49 0 var(--work-side),#f2f6fb var(--work-side))!important;padding-left:var(--work-side);}}
.topbar{gap:6px;padding:10px 12px;margin-bottom:17px;box-shadow:0 2px 10px #102e5008;}
.topbar .actions{width:100%;gap:6px;}.topbar .btn{min-height:35px;font-size:12px;}.topbar .status{font-size:11px;}
.inventory-progress{padding:17px!important;}.inventory-progress progress,.td-achievement progress{display:block;width:100%;height:9px;border:0;border-radius:8px;overflow:hidden;appearance:none;background:#dbe5ef;accent-color:#205d9b;}
.inventory-progress progress::-webkit-progress-bar,.td-achievement progress::-webkit-progress-bar{background:#dbe5ef;border-radius:8px;}.inventory-progress progress::-webkit-progress-value,.td-achievement progress::-webkit-progress-value{background:#205d9b;border-radius:8px;}.inventory-progress progress::-moz-progress-bar,.td-achievement progress::-moz-progress-bar{background:#205d9b;border-radius:8px;}
.rd-card{box-shadow:0 2px 8px #142f4c0b;}.rd-card h3{font-size:19px;}.rd-card p{line-height:1.42;}.rd-sobriety{background-image:linear-gradient(180deg,#0a315a15,#081e37d9 85%),var(--rd-mountain);background-size:cover;background-position:center 44%;}.rd-intro{margin:4px 0 10px;}
.rd-circle-wrap{justify-content:center;}.rd-circle-diagram{margin:4px 0!important;}.rd-card .rd-circle-wrap{flex:initial;margin:6px 0!important;}.rd-circle-legend{gap:6px;}
#rdProfile{position:fixed;top:calc(var(--prayer-height) + 12px);right:16px;z-index:1800;}.rd-profile-toggle{display:flex;gap:6px;align-items:center;border:1px solid #cbd9e8;background:#fff;color:#173756;border-radius:10px;padding:7px 11px;font:600 12px system-ui;cursor:pointer;list-style:none;}.rd-profile-toggle::-webkit-details-marker{display:none;}.rd-profile-menu{margin-top:5px;display:grid;gap:5px;min-width:172px;background:#fff;border:1px solid #d6e1ed;border-radius:10px;padding:8px;box-shadow:0 7px 24px #12345620;}.rd-profile-menu button,.rd-profile-menu select{background:#f7f9fc;color:#173756;border:1px solid #d6e1ed;padding:8px;border-radius:7px;font:600 12px system-ui;text-align:left;}.rd-profile-menu label{font-size:11px;color:#52677d;}.rd-profile-menu select{width:100%;margin-top:4px;}
/* Profile appears in the unobtrusive right edge; do not overlap the heading or toolbar. */
body.rd-signed-in .main>.topbar{margin-right:100px;}
body.rd-signed-in #cloudDialog .step-space>h2,body.rd-signed-in #cloudDialog .workbook-library>h2{padding-right:100px;}
#rdMobileNav{display:none;}
@media(max-width:959px){.app{grid-template-columns:208px minmax(0,1fr)}.side{height:calc(100dvh - var(--prayer-height));}#cloudDialog .step-space,#cloudDialog .workbook-library{padding:14px 14px 70px;}.set-aside-banner{padding:7px 14px 9px;}.set-aside-banner p{font-size:14px;}}
@media(max-width:760px){.app{display:block;}.side{height:auto;position:relative;top:auto;max-height:none;padding:9px 12px!important;}.side .brand-sub{display:none;}.side .rd-fourth-menu{margin:0;}.side .rd-fourth-menu>summary{display:none;}.side .rd-fourth-nav{display:none;}.side #rdFourthSections{max-height:190px;overflow:auto;margin:7px 0 0;}.side .brand{font-size:18px;}.main{padding:14px 12px 92px;}.set-aside-banner h2{font-size:23px;}.set-aside-banner p{font-size:13px;line-height:1.35;}.set-aside-reminder{font-size:10px;}.set-aside-banner::before{background-image:linear-gradient(90deg,#fff7e7f5,#fffaf2e8 80%,#fff7e7b0),var(--rd-mountain);}.step-space .step-tabs-v8,.workbook-library .step-tabs-v8{display:none!important;}.rd-profile-toggle{padding:5px 8px;font-size:11px;}.rd-profile-menu{min-width:150px;}#rdProfile{right:10px;top:calc(var(--prayer-height) + 8px);}body.rd-signed-in .main>.topbar{margin-right:0;}body.rd-signed-in .side>.brand{padding-right:86px;}#rdMobileNav:not([hidden]){display:flex;position:fixed;z-index:1800;bottom:0;left:0;right:0;background:#0d2b49;justify-content:space-around;padding:6px 4px calc(7px + env(safe-area-inset-bottom));box-shadow:0 -3px 14px #0a284025;gap:2px;}#rdMobileNav button,#rdMobileNav summary{display:flex;flex-direction:column;align-items:center;gap:3px;border:0;background:none;color:#e2edf8;font:600 10px system-ui;padding:5px 6px;min-height:42px;cursor:pointer;}#rdMobileNav button[aria-current=page]{color:#f0c77a;}#rdMobileNav [data-nav]::before{content:'';width:19px;height:19px;background:currentColor;mask:var(--rd-icon) center/contain no-repeat;}#rdMobileNav .rd-mobile-extra{position:absolute;right:6px;bottom:100%;background:#0d2b49;border:1px solid #43617d;border-radius:10px;padding:7px;min-width:130px;}#rdMobileNav .rd-mobile-extra button{flex-direction:row;width:100%;font-size:12px;}#rdMobileNav summary{list-style:none;}#rdMobileNav summary::-webkit-details-marker{display:none;}#cloudDialog .step-space,#cloudDialog .workbook-library{padding-bottom:100px;}}
/* Locally stored appearance preference, no account or recovery information. */
html[data-rd-theme=dark]{color-scheme:dark;--bg:#111e2d;--white:#192b3d;--ink:#e4edf7;--sub:#b6c8db;--line:#40576e;--soft:#23374b;--navy:#d7eaff;--premium-shadow:0 3px 10px #0003;}
html[data-rd-theme=dark] body,html[data-rd-theme=dark] .main,html[data-rd-theme=dark] #cloudDialog:has(.workbook-library,.step-space),html[data-rd-theme=dark] #cloudDialog .step-space,html[data-rd-theme=dark] #cloudDialog .workbook-library{background:#111e2d!important;color:#e4edf7;}
html[data-rd-theme=dark] :is(.sheet,.entry,.topbar,.inventory-progress,.rd-card:not(.rd-sobriety),.step-question,.library-item,.td-history,.td-stat,.td-achievement,.step-amend-card-v8,.rd-profile-menu,.rd-profile-toggle,.rd-profile-menu button,.rd-profile-menu select,.review-link,.softbox,.rd-tenth .td-today){background:#192b3d!important;color:#e4edf7!important;border-color:#40576e!important;}
html[data-rd-theme=dark] :is(.heading h1,.sheet h2,.sheet h3,.inventory-progress h2,.rd-card:not(.rd-sobriety) h3,.rd-calendar-summary strong,.rd-amends-count,.rd-circle-line strong,.rd-circle-line span,.sheet p,.step-status,.note,.status,.review-link small,.rd-intro,.rd-footer,.rd-profile-menu label,#cloudDialog .step-space>h2,#cloudDialog .workbook-library h2){color:#dce8f5!important;}
html[data-rd-theme=dark] :is(.input,textarea,input:not([type=checkbox]):not([type=radio]),select){background:#18293b;color:#eef5ff;border-color:#60768c;}html[data-rd-theme=dark] .btn:not(.primary):not(.rd-active){background:#24394d;color:#e4edf7;border-color:#60768c;}html[data-rd-theme=dark] .set-aside-banner{background:#192b3d;border-color:#aa8952;}.set-aside-banner{transition:none;}html[data-rd-theme=dark] .set-aside-banner::before{background-image:linear-gradient(90deg,#192b3df7,#192b3dea 76%,#192b3d9a),var(--rd-mountain);}html[data-rd-theme=dark] .set-aside-banner :is(h2,p){color:#f3ead8;}html[data-rd-theme=dark] .set-aside-reminder{color:#e5c585;}
}
@media print{#setAsideBanner,#rdProfile,#rdMobileNav{display:none!important;}}

@media screen {
#cloudDialog:not(:has(.workbook-library,.step-space)){top:var(--prayer-height);}
#rdProfile[hidden],#rdMobileNav[hidden],.rd-profile-menu [hidden]{display:none!important;}
@media(max-width:760px){body.rd-signed-in #cloudDialog .step-space>h2,body.rd-signed-in #cloudDialog .workbook-library>h2{padding-right:80px;} .set-aside-banner{max-height:42dvh;overflow:auto;} }
@media(min-width:761px) and (max-width:959px){#cloudDialog .step-space:has(>.step-tabs-v8),#cloudDialog .workbook-library:has(>.step-tabs-v8){padding-left:226px;}}
}

/* V5: restore V3's framed, cohesive composition while preserving V4 features. */
@media screen {
:root{--frame-x:clamp(12px,1.4vw,22px);--frame-top:12px;--frame-gap:12px;--shell-top:calc(var(--prayer-height) + var(--frame-top) + var(--frame-gap));--frame-radius:20px;scroll-padding-top:calc(var(--shell-top) + 12px);}
body{background:linear-gradient(150deg,#102f50b8,#527aa56b),var(--rd-mountain) center/cover fixed!important;}
.set-aside-banner{inset:var(--frame-top) var(--frame-x) auto;max-width:none;border:1px solid #c7a15a;border-radius:16px;box-shadow:0 5px 18px #071b3330; padding:9px 24px 10px;}
.set-aside-banner::before{background-image:linear-gradient(90deg,#fff9edfa 0%,#fff9edf5 48%,#fff9ede8 73%,#fff7e76b 100%),var(--rd-mountain);background-position:center 35%;}
.set-aside-banner h2{font-size:26px;margin-bottom:3px;}
.set-aside-banner p{max-width:1100px;font-size:15px;line-height:1.4;}
.set-aside-reminder{margin-top:4px;font-size:11px;}
.app{margin:var(--shell-top) var(--frame-x) 12px;padding-top:0;min-height:calc(100dvh - var(--shell-top) - 12px);border:1px solid #d6e0eb;border-radius:var(--frame-radius);background:#f5f8fc;box-shadow:0 12px 38px #071b3333;}
.side{top:var(--shell-top);height:calc(100dvh - var(--shell-top) - 12px);border-radius:calc(var(--frame-radius) - 1px) 0 0 calc(var(--frame-radius) - 1px);}
.main{align-self:start;width:100%;}
#vaultGate{top:var(--shell-top)!important;}
#cloudDialog:not(:has(.workbook-library,.step-space)){top:var(--shell-top);}
#cloudDialog:has(.workbook-library,.step-space){inset:var(--shell-top) var(--frame-x) 12px!important;width:auto!important;height:auto!important;border-radius:var(--frame-radius);border:1px solid #d6e0eb;box-shadow:0 12px 38px #071b3333;background:#f5f8fc!important;}
#cloudDialog .step-space,#cloudDialog .workbook-library{min-height:calc(100dvh - var(--shell-top) - 14px);background:#f5f8fc;border-radius:var(--frame-radius);}
#rdProfile{top:calc(var(--shell-top) + 12px);right:calc(var(--frame-x) + 16px);}
.rd-grid{gap:12px;}.rd-card{padding:14px;}.rd-sobriety{min-height:174px;}.rd-card h3{font-size:clamp(17px,1.45vw,22px);}
.rd-intro{margin:4px 0 12px;}
body.step-switching-v10:not(:has(#cloudDialog:not([hidden]) :is(.workbook-library,.step-space)))::after{inset:var(--shell-top) var(--frame-x) 12px!important;border-radius:var(--frame-radius);}
@media(min-width:960px){
#cloudDialog .step-space .step-tabs-v8,#cloudDialog .workbook-library .step-tabs-v8{inset:calc(var(--shell-top) + 1px) auto 13px calc(var(--frame-x) + 1px);height:auto;border-radius:calc(var(--frame-radius) - 1px) 0 0 calc(var(--frame-radius) - 1px);}
#cloudDialog .step-space:has(>.step-tabs-v8),#cloudDialog .workbook-library:has(>.step-tabs-v8){padding-top:18px;}
}
@media(max-width:959px){.set-aside-banner{padding:8px 16px;}.set-aside-banner p{font-size:14px;}}
@media(max-width:760px){
:root{--frame-x:8px;--frame-top:7px;--frame-gap:8px;--frame-radius:14px;}
.set-aside-banner{border-radius:12px;padding:7px 11px;max-height:40dvh;}
.set-aside-banner h2{font-size:22px;}.set-aside-banner p{font-size:13px;line-height:1.35;}.set-aside-reminder{font-size:10px;}
.side{height:auto;top:auto;border-radius:13px 13px 0 0;}
#cloudDialog:has(.workbook-library,.step-space){bottom:0!important;}
#rdProfile{right:calc(var(--frame-x) + 10px);top:calc(var(--shell-top) + 8px);}
.rd-card{padding:13px;}
}
html[data-rd-theme=dark] body{background:linear-gradient(150deg,#0a1929d9,#233d57ad),var(--rd-mountain) center/cover fixed!important;}
html[data-rd-theme=dark] .app,html[data-rd-theme=dark] #cloudDialog:has(.workbook-library,.step-space){background:#111e2d!important;border-color:#40576e;}
html[data-rd-theme=dark] .set-aside-banner::before{background-image:linear-gradient(90deg,#192b3df7,#192b3dea 76%,#192b3d9a),var(--rd-mountain);}
}

/* V6 — inline, optional Set Aside Prayer. No viewport offset or fixed banner. */
@media screen {
:root{--prayer-height:0px;--shell-top:var(--frame-top);scroll-padding-top:16px;}
#vaultGate{top:0!important;align-items:flex-start!important;padding:clamp(12px,2vw,28px)!important;}
#vaultGate .vault-card{flex:0 0 auto;margin:auto 0!important;max-height:none!important;overflow:visible!important;min-width:0;}
#cloudDialog:not(:has(.workbook-library,.step-space)){top:0;}
.rd-prayer{border:1px solid #d7bd8d;border-radius:10px;background:#fffaf0;color:#173451;margin:0 0 12px;overflow:hidden;max-width:100%;box-shadow:0 1px 3px #142b4510;}
.rd-prayer summary{display:flex;align-items:center;gap:9px;min-height:35px;padding:5px 12px;cursor:pointer;list-style:none;font:600 14px/1.35 Georgia,serif;color:#173451;}
.rd-prayer summary::-webkit-details-marker{display:none;}
.rd-prayer summary::after{content:'';margin-left:auto;width:7px;height:7px;border-right:2px solid #8c682e;border-bottom:2px solid #8c682e;transform:rotate(45deg);flex:none;}
.rd-prayer[open] summary::after{transform:rotate(225deg);}
.rd-prayer-symbol{color:#a7803f;font-size:15px;}
.rd-prayer-hint{font:500 11px/1.3 system-ui,sans-serif;color:#795e37;}
.rd-prayer-body{border-top:1px solid #e9d9b9;background:linear-gradient(90deg,#fffaf4fa 0%,#fffaf4f2 70%,#fffaf4c9),var(--rd-mountain) center/cover;padding:12px 16px 14px;}
.rd-prayer .rd-prayer-body p{font:400 16px/1.55 Georgia,serif;color:#173451;margin:0;max-width:920px;}
.rd-prayer .rd-prayer-body .rd-prayer-reminder{font:600 12px/1.45 system-ui,sans-serif;color:#79551f;margin-top:8px;}
#vaultGate .rd-prayer{margin:0 0 13px;}
html[data-rd-theme=dark] .rd-prayer{background:#213447;border-color:#8c754e;color:#e8eef5;}
html[data-rd-theme=dark] .rd-prayer summary,html[data-rd-theme=dark] .rd-prayer .rd-prayer-body p{color:#e8eef5;}
html[data-rd-theme=dark] .rd-prayer-hint,html[data-rd-theme=dark] .rd-prayer .rd-prayer-body .rd-prayer-reminder{color:#e3c487;}
html[data-rd-theme=dark] .rd-prayer-body{background:#192b3d;border-color:#766448;}
@media(max-width:600px){.rd-prayer summary{min-height:40px;flex-wrap:wrap;gap:5px 8px;}.rd-prayer-hint{font-size:10px;}.rd-prayer .rd-prayer-body p{font-size:15px;}.rd-prayer-body{padding:10px 12px;}}
}
@media print{.rd-prayer{display:none!important;}}

/* V7 — centered, understated prayer; isolate the active workspace visually. */
@media screen {
body:has(#cloudDialog:not([hidden]) :is(.step-space,.workbook-library):not([hidden])) #vaultGate,
body:has(#cloudDialog:not([hidden]) :is(.step-space,.workbook-library):not([hidden])) > .app {display:none!important;}
/* The framed dashboard must reveal only the scenic body background. */
#vaultGate .vault-card{margin:0!important;}
#vaultGate:not([hidden]){align-items:flex-start!important;}
.rd-prayer,#vaultGate .rd-prayer{width:min(100%,640px);max-width:100%;margin:2px auto 13px;box-sizing:border-box;border:1px solid #d7e1eb;border-radius:10px;background:#edf3f9;box-shadow:none;text-align:center;}
.rd-prayer summary{position:relative;display:flex;justify-content:center;align-items:center;gap:7px;padding:6px 28px;min-height:35px;box-sizing:border-box;color:#244664;font:600 14px/1.4 Georgia,serif;}
.rd-prayer summary::after{position:absolute;right:13px;top:calc(50% - 5px);margin:0;border-color:#52738f;width:6px;height:6px;}
.rd-prayer[open] summary::after{top:calc(50% - 1px);}
.rd-prayer-symbol{color:#738ca1;font-size:12px;}
.rd-prayer-hint{color:#59728a;font:500 10px/1.3 system-ui,sans-serif;}
.rd-prayer-body{border-top:1px solid #d7e1eb;background:linear-gradient(90deg,#f7f9fbea,#f7f9fbf5 45%,#f7f9fbe8),var(--rd-mountain) center 45%/cover;padding:13px 22px 14px;text-align:center;}
.rd-prayer .rd-prayer-body p{font:400 15px/1.55 Georgia,serif;max-width:560px;margin:0 auto;color:#244664;text-align:center;}
.rd-prayer .rd-prayer-body .rd-prayer-reminder{font:500 11px/1.45 system-ui,sans-serif;margin:8px auto 0;color:#546b80;text-align:center;}
html[data-rd-theme=dark] .rd-prayer{background:#1d3246;border-color:#40576e;box-shadow:none;}
html[data-rd-theme=dark] .rd-prayer-body{border-color:#40576e;background:linear-gradient(90deg,#1c3044f5,#1c3044eb),var(--rd-mountain) center/cover;}
html[data-rd-theme=dark] .rd-prayer :is(.rd-prayer-hint,.rd-prayer-symbol,.rd-prayer-reminder){color:#b8cddd!important;}
html[data-rd-theme=dark] .rd-prayer summary::after{border-color:#b8cddd;}
html[data-rd-theme=dark] .rd-card:not(.rd-sobriety) :is(p,.td-today strong,.td-today label,.td-calendar-head,.td-weekday,.td-calendar-weekdays,.rd-calendar-summary,.td-calendar-legend,.rd-calendar-legend){color:#d5e3f2!important;}
html[data-rd-theme=dark] .rd-reflection :is(.td-weekdays,.td-weekdays span,.td-weekdays div,.td-calendar-weekdays span){color:#c4d6e8!important;}
/* Compact closed control on small screens; full width only when space requires it. */
@media(max-width:600px){.rd-prayer,#vaultGate .rd-prayer{width:min(100%,480px);} .rd-prayer summary{min-height:42px;padding:6px 25px;gap:3px 6px;} .rd-prayer-hint{font-size:10px;} .rd-prayer-body{padding:12px 14px;} .rd-prayer .rd-prayer-body p{font-size:14px;}}
}

/* V8: dark-mode contrast. Pair foregrounds with their actual surfaces. */
@media screen {
html[data-rd-theme=dark]{--rd-text:#edf4fc;--rd-muted:#b9cce0;--rd-surface:#192b3d;--rd-inset:#111f30;--rd-border:#627b93;--rd-link:#a5caff;}
html[data-rd-theme=dark] #vaultGate .vault-card,
html[data-rd-theme=dark] .modal-shade .modal-sheet:not(:has(.step-space,.workbook-library)){background:var(--rd-surface)!important;color:var(--rd-text)!important;border-color:var(--rd-border)!important;color-scheme:dark;--ink:var(--rd-text);--muted:var(--rd-muted);--accent:var(--rd-link);}
html[data-rd-theme=dark] #vaultGate :is(.modern-choice,.step-tenth-launch,.step-pdf-v7,.modern-local,#vaultUnlock,#vaultPinUnlock),
html[data-rd-theme=dark] :is(.main,.step-space,.workbook-library) :is(.pair,.pill,.library-actions,.td-history,.td-calendar,.step-help,.step-box,.step-amend-card-v8,.td-stat,.td-achievement){background:var(--rd-inset)!important;color:var(--rd-text)!important;border-color:#40576e!important;}
html[data-rd-theme=dark] #vaultGate :is(h2,h3),
html[data-rd-theme=dark] .modal-shade .modal-sheet:not(:has(.step-space,.workbook-library)) :is(h2,h3),
html[data-rd-theme=dark] :is(.main,.step-space,.workbook-library) :is(.fieldlabel,.check-label,.pair-head,.check-caption,.stat strong,.suggesth){color:var(--rd-text)!important;}
html[data-rd-theme=dark] #vaultGate :is(#vaultHelp,.clean-independent,.step-privacy-v7,.modern-choice p,.step-tenth-launch p,.step-pdf-v7 p,.storage-note,.storage-subtitle,.vault-note,.clean-details,.clean-details p),
html[data-rd-theme=dark] .modal-shade .modal-sheet:not(:has(.step-space,.workbook-library)) :is(p,.clean-intro,.clean-details,.clean-details p,.note,.modal-message),
html[data-rd-theme=dark] :is(.main,.step-space,.workbook-library) :is(.note,.count,.stat,.quote,.eyebrow,.step-status,.td-weekday,.td-weekdays,.td-weekdays div,.td-weekdays span){color:var(--rd-muted)!important;}
html[data-rd-theme=dark] :is(#vaultGate,.modal-shade) :is(.fieldlabel,.clean-details summary,.modern-local summary){color:var(--rd-text)!important;}
html[data-rd-theme=dark] :is(#vaultGate,.modal-shade,.main) :is(.clean-kicker,.vault-mark,a:not(.btn)){color:var(--rd-link)!important;}
html[data-rd-theme=dark] :is(#vaultGate,.modal-shade) .clean-warning{color:#f2d69d!important;}
html[data-rd-theme=dark] #cloudDialog #cloudStatus.error,html[data-rd-theme=dark] #vaultGate #vaultError,html[data-rd-theme=dark] :is(.modal-shade,.main) :is(.error,.modal-message.error){color:#ffb6b6!important;}
/* Actual typed text, password dots, placeholders, caret and saved browser autofill. */
html[data-rd-theme=dark] :is(#vaultGate,.modal-shade,.main,.rd-profile-menu) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=range]),textarea,select){background:var(--rd-inset)!important;color:var(--rd-text)!important;-webkit-text-fill-color:var(--rd-text)!important;border-color:var(--rd-border)!important;caret-color:var(--rd-text);color-scheme:dark;}
html[data-rd-theme=dark] :is(#vaultGate,.modal-shade,.main,.rd-profile-menu) :is(input,textarea)::placeholder{color:#a8bed3!important;-webkit-text-fill-color:#a8bed3!important;opacity:1;}
html[data-rd-theme=dark] :is(#vaultGate,.modal-shade,.main) input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #111f30 inset!important;-webkit-text-fill-color:#edf4fc!important;caret-color:#edf4fc!important;}
html[data-rd-theme=dark] :is(#vaultGate,.modal-shade,.main,.rd-profile-menu) select option{background:#111f30;color:#edf4fc;}
html[data-rd-theme=dark] :is(#vaultGate,.modal-shade,.main) .btn:not(.primary):not(.rd-active){background:#24394d;color:#edf4fc;border-color:#627b93;}
html[data-rd-theme=dark] :is(#vaultGate,.modal-shade,.main) .btn.primary{background:#205d9b;color:#fff;border-color:#588ac0;}
html[data-rd-theme=dark] :is(#vaultGate,.modal-shade,.main) .btn.clean-link{background:transparent;color:#c9ddf0;border-color:transparent;}
html[data-rd-theme=dark] :is(#vaultGate,.modal-shade,.main) .btn.danger{color:#ffc2c2;border-color:#b46c72;}
/* Landing prayer requires its own higher-specificity background override. */
html[data-rd-theme=dark] .rd-prayer,html[data-rd-theme=dark] #vaultGate .rd-prayer{background:#20374b!important;color:#edf4fc!important;border-color:#526d85!important;}
html[data-rd-theme=dark] .rd-prayer summary,html[data-rd-theme=dark] .rd-prayer .rd-prayer-body p{color:#edf4fc!important;}
html[data-rd-theme=dark] .rd-prayer .rd-prayer-body{background:linear-gradient(90deg,#192b3df5,#192b3dec),var(--rd-mountain) center/cover!important;}
html[data-rd-theme=dark] .rd-prayer :is(.rd-prayer-hint,.rd-prayer-symbol,.rd-prayer-reminder){color:#b9cce0!important;}
html[data-rd-theme=dark] .rd-card:not(.rd-sobriety) :is(p,.td-today strong,.td-today label,.td-weekday,.td-calendar-legend,.rd-calendar-summary){color:#c9dced!important;}
html[data-rd-theme=dark] .td-cell-gray{background:#2b4054!important;color:#d2e0ef!important;}
html[data-rd-theme=dark] .td-cell-blue{background:#c9e1ff!important;color:#153b62!important;}
html[data-rd-theme=dark] .td-cell-red{background:#f7d9d8!important;color:#852e2c!important;}
html[data-rd-theme=dark] .td-cell-green{background:#d2eed9!important;color:#15532b!important;}
html[data-rd-theme=dark] .td-cell-yellow{background:#f9e6ae!important;color:#64470f!important;}
}
