/* C08E presentation contract. Existing engines own visibility, gameplay and permissions.
   Load after legacy styles in every public experience, including embedded frames. */
:root{--kq-paper:#faf9f3;--kq-surface:#fffef9;--kq-soft:#edf1e7;--kq-ink:#254638;--kq-muted:#53644f;--kq-rule:#a8b7a7;--kq-accent:#28533f;--kq-gold:#856324}
body:is(.embedded-lab,.embedded-study,.kq-reference-page):not([data-theme=contrast]):not(.lab-high-contrast){--ink:#254638;--foreground:#254638;--muted:#53644f;--border:#a8b7a7;--panel:#fffef9;--primary:#28533f;--gold:#28533f;--gold-2:#28533f;--navy:#faf9f3;--navy-2:#fffef9;background:#faf9f3!important;color:#254638!important;font-family:'DM Sans',system-ui,sans-serif}
/* The framed Lab is the same workspace, not an independent dark application. */
html:root body.embedded-lab:not(.lab-high-contrast) :is(dialog.lab-studio-page,#labLaunchDialog){background:#faf9f3!important;color:#254638!important;border-color:#a8b7a7!important;box-sizing:border-box}
html:root body.embedded-lab:not(.lab-high-contrast) :is(.lab-host-header,.lab-player-shell,.lab-play-stage,.lab-round-answer,.lab-score-person,.lab-round-card,.lab-report article,.lab-launch-summary,.lab-activity-card,.lab-saved-card,.lab-studio-setup){background:#fffef9!important;color:#254638!important;border-color:#a8b7a7!important}
html:root body.embedded-lab:not(.lab-high-contrast) :is(.lab-main-prompt,.lab-round-answer p,.lab-round-answer small,.lab-studio-hero h2,.lab-play-stage,.lab-section-title h3,.lab-round-card header,.lab-score-person strong,.lab-round-marker){color:#254638!important}
html:root body.embedded-lab:not(.lab-high-contrast) :is(.lab-host-header p,.lab-saved-card p,.lab-activity-card>span,.lab-round-fields label,.lab-setup-note,.lab-section-title span,.lab-workflow span,.lab-empty){color:#53644f!important}
html:root body.embedded-lab:not(.lab-high-contrast) :is(button,input,textarea,select,.lab-back-link){background:#edf1e7!important;color:#254638!important;border:1px solid #a8b7a7!important;border-radius:9px;font:inherit;min-height:44px;max-width:100%;box-sizing:border-box}
html:root body.embedded-lab:not(.lab-high-contrast) :is(input,textarea,select){background:#fffef9!important}
html:root body.embedded-lab:not(.lab-high-contrast) :is(.use-game,.primary,.primary-action,#labReveal,.lab-library-actions button:first-child){background:#28533f!important;color:#fffef9!important;border-color:#28533f!important}
html:root body.embedded-lab:not(.lab-high-contrast) :is(button.selected,button.revealed,button[aria-pressed=true]){background:#28533f!important;color:#fffef9!important;border-color:#28533f!important;box-shadow:inset 0 0 0 2px #b89a53}
html:root body.embedded-lab:not(.lab-high-contrast) .lab-host-console .good{background:#e4f0e4!important;color:#205337!important;border-color:#4e7d59!important}
html:root body.embedded-lab:not(.lab-high-contrast) .lab-host-console .bad{background:#fff0ed!important;color:#963e30!important;border-color:#b57768!important}
html:root body.embedded-lab:not(.lab-high-contrast) :is(.lab-action-status,.lab-round-answer){background:#f0f2e7!important;color:#254638!important;border-left:3px solid #856324!important}
html:root body.embedded-lab:not(.lab-high-contrast) .lab-validation{color:#865516!important}
html:root body.embedded-lab:not(.lab-high-contrast) .lab-validation.valid{color:#205337!important}
html:root body.embedded-lab:not(.lab-high-contrast) button:disabled{opacity:1;color:#53644f!important;background:#f0f2e7!important;border-style:dashed!important}
html:root body.embedded-lab:not(.lab-high-contrast) .lab-main-prompt{font:600 clamp(1.35rem,2.7vw,2.2rem)/1.5 Georgia,serif;overflow-wrap:anywhere}
html:root body.embedded-lab:not(.lab-high-contrast) .lab-host-header{flex-wrap:wrap;gap:20px}
html:root body.embedded-lab:not(.lab-high-contrast) .lab-host-header>div{min-width:0;flex:1 1 300px}
html:root body.embedded-lab:not(.lab-high-contrast) .lab-host-tools{flex-wrap:wrap}
html:root body.embedded-lab:not(.lab-high-contrast) .lab-studio-hero h2{font:500 clamp(2rem,4vw,3rem)/1.2 Georgia,serif}
html:root body.embedded-lab:not(.lab-high-contrast) :is(.lab-round-marker,.lab-workflow span:first-child){color:#28533f!important}
html:root body.embedded-lab:not(.lab-high-contrast) .reference-link{color:#28533f!important;text-decoration:underline;text-underline-offset:3px}
html:root body.lab-projector:not(.lab-high-contrast) .lab-main-prompt{font-size:clamp(1.7rem,4vw,4rem)}
/* Explicit accessibility modes remain deliberate high contrast, with no white stage. */
html:root body.lab-high-contrast :is(dialog.lab-studio-page,.lab-host-header,.lab-player-shell,.lab-play-stage,.lab-round-answer,.lab-score-person,.lab-round-card,.lab-activity-card,.lab-saved-card,.lab-action-status){background:#102b20!important;color:#fff!important;border-color:#d7e2c8!important}
html:root body.lab-high-contrast :is(.lab-main-prompt,.lab-round-answer p,.lab-round-answer small,h2,h3,h4,p,label,strong,.lab-round-marker){color:#fff!important}
html:root body.lab-high-contrast :is(button,input,textarea,select){color:#fff!important;background:#183e2c!important;border-color:#d7e2c8!important;min-height:44px}
/* Remaining secondary game and phone panels, including post-game and final reveal. */
html:root body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.winner-dialog,.learning-report,.final-contestant,.final-result,.room-player-panel,.phone-player-panel,.host-inbox,.host-answer-card,.room-connected-card,.room-code-display,.lab-report article){background:#fffef9!important;color:#254638!important;border-color:#a8b7a7!important}
html:root body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.winner-dialog,.learning-report,.final-contestant,.final-result) :is(p,li,strong,label,h2,h3,h4){color:#254638!important}
html:root body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(#finalDialog,#roomsDialog,#settingsDialog,#toolsDialog,#accountDialog,#hostToolsDialog) button:not(.dialog-close){background:#edf1e7!important;color:#254638!important;border-color:#a8b7a7!important;min-height:44px}
html:root body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(#finalDialog,#roomsDialog) :is(button.primary,button.start-button,button[type=submit]){background:#28533f!important;color:#fffef9!important}
/* Embedded Scripture and supervised Kids reuse source rendering unchanged. */
html:root body.embedded-study:not([data-theme=contrast]) :is(dialog,.study-reader,.study-panel,.study-workspace,.study-card,.study-toolbar,.study-verse,.study-word-card,.study-feature-card){background:#fffef9!important;color:#254638!important;border-color:#a8b7a7!important}
html:root body.embedded-study:not([data-theme=contrast]) :is(h1,h2,h3,h4,label,legend,.study-reader p,.study-verse,.study-word-card){color:#254638!important}
html:root body.embedded-study:not([data-theme=contrast]) :is(button,input,select,textarea){background:#edf1e7!important;color:#254638!important;border-color:#a8b7a7!important;min-height:44px}
/* Public reader/media dark preference stays dark forest, never forced to light. */
html[data-color-mode=dark] body.kq-shell :is(.kb-shell,.qp-shell,.br-shell){--background:#173b30;--foreground:#f7f5e9;--card:#224c3e;--card-foreground:#f7f5e9;--popover:#224c3e;--popover-foreground:#f7f5e9;--muted:#224c3e;--muted-foreground:#cedbc8;--border:#56735e;--input:#56735e}
body.kq-shell .kq-utility-header{background:#faf9f3!important;color:#254638!important;border-color:#d9ddcf!important}
body.kq-shell .kq-utility-header>a{color:#254638!important;min-height:44px;display:inline-flex;align-items:center}
/***** Legacy informational pages: no changes to their data or report behavior. *****/
body.kq-reference-page{margin:0!important;--background:#faf9f3;--surface:#fffef9;--text:#254638;--muted:#53644f;--line:#a8b7a7;--accent:#28533f}
body.kq-reference-page :is(header,section,article,aside,pre,form,.panel,.card){background:var(--kq-paper,#fffef9)!important;color:var(--kq-ink,#254638)!important;border-color:var(--kq-line,#a8b7a7)!important}
body.kq-reference-page :is(p,h1,h2,h3,h4,label,legend,small){color:var(--kq-ink,#254638)!important}
body.kq-reference-page a{color:var(--kq-ink,#28533f)!important}
body.kq-reference-page :is(button,input,textarea,select){font:inherit;color:var(--kq-ink,#254638)!important;background:var(--kq-paper,#edf1e7)!important;border:1px solid var(--kq-line,#a8b7a7)!important;min-height:44px}
/* Focus is distinguishable on both light surfaces and green selected controls. */
body:is(.kq-shell,.embedded-lab,.embedded-study,.kq-reference-page) :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible{outline:3px solid #856324!important;outline-offset:3px!important;box-shadow:0 0 0 3px #fffef9!important}
body:is(.kq-shell,.embedded-lab,.embedded-study,.kq-reference-page) :is(input,textarea)::placeholder{color:#64705e;opacity:1}
@media(max-width:780px){
 body.embedded-lab #labPlayDialog{width:100%!important;padding:18px!important}
 body.embedded-lab .lab-host-header{display:flex;flex-direction:column;align-items:stretch}
 body.embedded-lab .lab-host-header>div{flex:auto!important}
 body.embedded-lab .lab-host-tools{display:flex;flex-wrap:wrap;gap:8px}
 body.embedded-lab .lab-host-tools button{flex:1 1 120px}
 body.embedded-lab :is(.lab-score-strip,.lab-host-console,.lab-workflow){gap:8px;flex-wrap:wrap}
 body.embedded-lab .lab-score-person button{width:44px;height:44px}
 body.embedded-lab .lab-play-stage{padding:16px;min-width:0}
 body.embedded-lab .lab-main-prompt{font-size:1.4rem!important}
}
@media(prefers-reduced-motion:reduce){body:is(.kq-shell,.embedded-lab,.embedded-study,.kq-reference-page) *{scroll-behavior:auto!important}}
/* Late legacy color-mode selectors are more specific than the initial frame tokens. */
html:root[data-color-mode] body.quest-unified:is(.embedded-lab,.embedded-study):not(.lab-high-contrast):not([data-theme=contrast]){--ink:#254638!important;--muted:#53644f!important;--gold:#28533f!important;--gold-2:#28533f!important;--border:#a8b7a7!important;--navy:#faf9f3!important;--navy-2:#fffef9!important}
html:root body.embedded-lab:not(.lab-high-contrast) :is(.lab-player-header,.lab-player-header>div,.lab-player-actions,.lab-score-strip,.lab-play-footer,.lab-host-console,.lab-mechanic,.lab-report,.lab-report-list){background:#fffef9!important;color:#254638!important;border-color:#a8b7a7!important}
html:root body.embedded-lab:not(.lab-high-contrast) :is(h2,h3,h4,.eyebrow,.lab-player-header p,.lab-play-footer,.lab-player-actions){color:#254638!important}
html:root body.embedded-lab .lab-player-header{display:flex!important;flex-wrap:wrap;gap:18px;align-items:flex-start}
html:root body.embedded-lab .lab-player-header>div{flex:1 1 280px;min-width:0}
html:root body.embedded-lab .lab-player-actions{display:flex;flex-wrap:wrap;gap:8px}
@media(max-width:780px){html:root body.embedded-lab .lab-player-header{display:block!important}html:root body.embedded-lab .lab-player-actions{margin-top:16px}}

html:root body.embedded-lab:not(.lab-high-contrast) :is(small,.lab-workflow,.lab-studio-hero,.lab-studio-hero>div,.lab-section-title,.lab-round-builder){color:#53644f!important;background-color:transparent!important}
html:root body.embedded-lab:not(.lab-high-contrast) .lab-studio-hero p{color:#53644f!important}
html:root body.kq-shell .kq-utility-header button{background:#edf1e7!important;color:#254638!important;border-color:#a8b7a7!important;min-height:44px;min-width:44px}
html[data-color-mode=dark] body.kq-shell :is(.kb-shell,.qp-shell,.br-shell) :is(input,textarea)::placeholder{color:#cedbc8!important;opacity:1}
html[data-color-mode=dark] body.kq-shell :is(.qp-nav,.qh-nav) button{color:#f7f5e9!important;background:#224c3e!important;border-color:#56735e!important}
html:root[data-color-mode] body.quest-unified.embedded-lab.lab-high-contrast{background:#102b20!important;color:#fff!important}
html:root body.lab-high-contrast :is(dialog.lab-studio-page,.lab-player-header,.lab-player-header>div,.lab-player-actions,.lab-score-strip,.lab-host-console,.lab-play-footer,.lab-studio-hero,.lab-studio-hero>div,.lab-workflow,.lab-section-title){background:#102b20!important;color:#fff!important;border-color:#d7e2c8!important}
html:root body.embedded-lab .lab-score-strip{display:flex!important;flex-wrap:wrap!important;align-items:center;gap:12px;text-align:left}
html:root body.embedded-lab .lab-score-person{flex:0 1 auto;min-width:190px;gap:10px}
html:root body.embedded-lab .lab-score-person strong{min-width:0;overflow-wrap:anywhere}
html:root body.embedded-lab .lab-score-person button{flex:0 0 44px;width:44px;height:44px;padding:8px}
html:root body.embedded-lab .lab-round-marker{margin:0 0 0 auto}
@media(max-width:560px){html:root body.embedded-lab .lab-score-person{width:100%;min-width:0}html:root body.embedded-lab .lab-round-marker{margin:0;width:100%}}

html:root body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(#modeResponseForm button,#kqUndoAction){background:#28533f!important;color:#fffef9!important;min-height:44px;border-color:#28533f!important}
html:root body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .kids-home-button>span{color:#fffef9!important}
html:root body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.focused-phone,.phone-question,.phone-drawers details,.live-host-panel,.live-host-submission,.host-answer-inbox,.room-roster,.room-live-status){background:#fffef9!important;color:#254638!important;border-color:#a8b7a7!important}
html:root body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.focused-phone,.live-host-panel) :is(h2,h3,p,small,label,strong,summary){color:#254638!important}
html:root body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(#phoneReceipt,#phoneConnection){color:#205337!important}
html:root body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(#phoneSend,#phoneBuzz){background:#28533f!important;color:#fffef9!important;border-color:#28533f!important}
/* Reader control surfaces must not inherit near-white text on an outline button's pale fill. */
html:root body.kq-shell :is(.kb-shell,.qp-shell,.br-shell) [data-slot=button]{background:#edf1e7!important;color:#254638!important;border-color:#8c9f89!important;min-height:44px}
html:root body.kq-shell :is(.kb-shell,.qp-shell,.br-shell) :is([data-slot=button][aria-pressed=true],[data-slot=button][data-state=active]){background:#28533f!important;color:#fffef9!important;border-color:#b39551!important}
html:root body.kq-shell :is([data-slot=dropdown-menu-content],[data-slot=dialog-content],[data-slot=select-content]){background:#fffef9!important;color:#254638!important;border-color:#a8b7a7!important}
html:root body.kq-shell :is([data-slot=dropdown-menu-content],[data-slot=dialog-content],[data-slot=select-content]) :is(p,h2,h3,label,small,[role=menuitem],[role=option]){color:#254638!important}
html:root body.kq-shell :is([role=menuitem],[role=option]){min-height:44px}
html:root body.kq-shell :is([role=menuitem],[role=option])[data-highlighted]{background:#e4eddf!important;color:#254638!important}
html:root body.embedded-study:not([data-theme=contrast]) #studyDialog{background:#faf9f3!important;color:#254638!important}
html:root body.embedded-study .study-encyclopedia{--ency-accent:#795819!important;--ency-surface:#fffef9;--ency-ink:#254638;--ency-muted:#53644f;--ency-line:#a8b7a7}
html:root body.embedded-study .translation-note{color:#53644f!important}
html:root body.embedded-study .guided-question-list>label>span{background:#28533f!important;color:#fffef9!important}
html:root body.embedded-study .kids-library-grid small{color:#53644f!important}
html:root body.embedded-study :is(.kids-lesson,.kids-activity,.study-feature,.reading-plans,.teacher-lesson-builder){background:#fffef9!important;color:#254638!important;border-color:#a8b7a7!important}
html:root body.embedded-study :is(.kids-lesson,.kids-activity) :is(p,h3,h4,b,small){color:#254638!important}
html:root body.embedded-study .kids-activity{background:#edf1e7!important}
html:root body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) #judgingControls button:disabled,html:root body.kq-shell [data-slot=button]:disabled{opacity:1!important;background:#edf1e7!important;color:#53644f!important;border:1px dashed #8c9f89!important}
html:root body.embedded-study #kidsDialog.kids-high-contrast,html:root body.embedded-study #kidsDialog.kids-high-contrast :is(section,article,.kids-lesson,.kids-activity,.kids-hub,.kids-library-grid){background:#102b20!important;color:#fff!important;--ink:#fff;--muted:#fff;--border:#d7e2c8}
html:root body.embedded-study #kidsDialog.kids-high-contrast :is(p,h2,h3,h4,small,label,span,b,strong){color:#fff!important}
html:root body.embedded-study #kidsDialog.kids-high-contrast :is(button,input,select,textarea){background:#183e2c!important;color:#fff!important;border-color:#d7e2c8!important}
html:root body.quest-unified.embedded-lab.lab-high-contrast :is(#labPlayDialog,#labDialog,#labLaunchDialog,#labEditDialog){background:#102b20!important;color:#fff!important}
/* Explicit light-reader tokens override the compiled legacy light-blue palette. */
html:root[data-color-mode=light] body.kq-shell :is(.br-shell,.kb-shell,.qp-shell){background:#faf9f3!important;color:#254638!important;--foreground:#254638!important;--background:#fffef9!important;--muted-foreground:#53644f!important;--card:#fffef9!important;--card-foreground:#254638!important;--border:#a8b7a7!important}
html:root[data-color-mode=light] body.kq-shell .br-shell{--br-text:#254638!important;--br-muted:#53644f!important;--br-surface:#fffef9!important;--br-border:#a8b7a7!important}
html:root[data-color-mode=light] body.kq-shell .kb-shell{--kb-bg:#faf9f3!important;--kb-surface:#fffef9!important;--kb-text:#254638!important;--kb-muted:#53644f!important;--kb-line:#a8b7a7!important;--kb-accent:#28533f!important}
html:root[data-color-mode=light] body.kq-shell .qp-shell{--qp-bg:#faf9f3!important;--qp-panel:#fffef9!important;--qp-ink:#254638!important;--qp-muted:#53644f!important;--qp-line:#a8b7a7!important;--qp-accent:#795819!important}
html:root body.kq-shell .qp-skip{background:#28533f!important;color:#fffef9!important}
/* Keep foreground/background changes atomic; an old navy-to-paper fade briefly hid text. */
html:root body.kq-shell :is(.kb-shell,.qp-shell,.br-shell) :is(button,[data-slot=button]){transition-property:box-shadow,transform!important}
html:root body.kq-shell .qp-shell button{min-height:44px;min-width:44px}
html:root body.kq-shell .kb-shell [role=tab]{min-height:44px}
html:root body.kq-shell .kb-shell [role=tablist]{height:auto;min-height:44px;flex-wrap:wrap}
html:root body.kq-shell .br-shell :is(select,button){min-height:44px}
/* Compatibility launchpad and its quick tour remain reachable, so share the same palette. */
html:root body.kq-shell .qh-card{background:#fffef9!important;color:#254638!important;border-color:#a8b7a7!important}
html:root body.kq-shell .qh-card :is(h2,p,small,.qh-card-action,.qh-icon),html:root body.kq-shell .qh-kids-actions a{color:#254638!important}
html:root body.kq-shell .qh-create{background:#28533f!important;color:#fffef9!important}
html:root body.kq-shell .qh-create :is(h2,p,.qh-card-action,.qh-icon){color:#fffef9!important}
html:root body.kq-shell :is(.qh-code button,.quest-home-tour [data-slot=button]){background:#28533f!important;color:#fffef9!important;border-color:#28533f!important;min-height:44px}
html:root body.kq-shell .qh-saved-links a{color:#254638!important;border-color:#a8b7a7!important}
html:root body.kq-shell .qh-saved-links a:hover{background:#e4eddf!important}
html:root body.kq-shell .quest-home-tour strong{color:#254638!important}
html:root body.kq-shell .quest-home-tour button{min-height:44px;min-width:44px}
html:root body.kq-reference-page :is(.skip-link,.skip){background:#28533f!important;color:#fffef9!important}
html:root body.embedded-study .study-workspace-brand{background:#edf1e7!important;color:#254638!important}
html:root body.embedded-study .study-workspace-brand :is(small,strong){color:#254638!important}
html:root body.kq-shell [data-slot=dialog-content] label:has(input[type=checkbox]){min-height:44px;display:flex;align-items:center;gap:10px}
html:root body.kq-shell :is(.qh-eyebrow,.qh-welcome h1 em,.qh-joy){color:#795819!important}
html:root body.kq-shell :is(.qh-welcome>p:last-child,.qh-saved p){color:#53644f!important}
html:root body.kq-shell .quest-skip-link{background:#28533f!important;color:#fffef9!important}
html:root body.kq-shell .qh-create .qh-eyebrow{color:#f6e4af!important}
/* C09B: the embedded workspace shares the community palette even under a saved
   legacy dark preference. Intentional high-contrast mode keeps its own colors. */
html:root[data-color-mode] body.quest-unified.embedded-study:not([data-theme=contrast]) #studyDialog :is(.bible-text,.bible-heading,.chapter-stepper,.study-encyclopedia,.study-encyclopedia-article,.study-encyclopedia-note,.word-card,.reading-word-result,.reader-tools,.reader-tool-card,.study-notebook,.testament-grid article,.library-grid article){background:#fffef9!important;color:#254638!important;border-color:#a8b7a7!important;--ency-surface:#fffef9;--ency-ink:#254638;--ency-muted:#53644f;--ency-line:#a8b7a7;--ency-accent:#795819}
html:root[data-color-mode] body.quest-unified.embedded-study:not([data-theme=contrast]) #studyDialog :is(.bible-text,.chapter-stepper,.study-encyclopedia,.word-card,.reading-word-result,.reader-tools,.study-notebook,.testament-grid,.library-grid) :is(p,small,h3,h4,h5,sup,strong,b,span,summary,label,.original,.easy-name,.strong-number):not(.verse-highlight):not(.word-highlight){color:#254638!important;background-color:transparent!important;opacity:1!important}
html:root[data-color-mode] body.quest-unified.embedded-study:not([data-theme=contrast]) #studyDialog :is(.strongs-phrase,.study-encyclopedia-result,.study-encyclopedia-sources a){background:#fffef9!important;color:#254638!important;border-color:#a8b7a7!important}
html:root[data-color-mode] body.quest-unified.embedded-study:not([data-theme=contrast]) #studyDialog .strongs-phrase{min-height:0;padding:0 1px;display:inline;line-height:inherit;font:inherit;text-decoration:underline;text-decoration-color:#856324;text-underline-offset:4px;border:0!important;border-radius:2px}
html:root[data-color-mode] body.quest-unified.embedded-study:not([data-theme=contrast]) #studyDialog :is(.strongs-phrase:hover,.strongs-phrase:focus-visible,.study-encyclopedia-result[aria-pressed=true],.word-card .verse-morph){background:#edf1e7!important;color:#254638!important}
html:root[data-color-mode] body.quest-unified.embedded-study:not([data-theme=contrast]) #studyDialog .verse-highlight{background:#f3e4b7!important;color:#254638!important}
html:root[data-color-mode] body.quest-unified.embedded-study:not([data-theme=contrast]) #studyDialog .word-highlight{color:#254638!important}
html:root[data-color-mode] body.quest-unified.embedded-study:not([data-theme=contrast]) #studyDialog .word-card .match-kind{background:#e4eddf!important;color:#254638!important}
.br-study-links,.br-word-links{display:flex;flex-wrap:wrap;gap:10px;margin:20px 0}.br-study-links a,.br-word-links a{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:10px 14px;border:1px solid #a8b7a7;border-radius:10px;background:#fffef9;color:#254638!important;text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}.br-word-links small{color:#53644f}.br-original{scroll-margin-top:30px}.br-original summary{min-height:44px;cursor:pointer;line-height:1.5}.br-original p{font-size:16px;line-height:1.6}.br-passage p[aria-current=location]{border-left:3px solid #856324;padding-left:12px;scroll-margin-top:40px}
@media(max-width:600px){.br-word-links{display:grid;grid-template-columns:minmax(0,1fr)}.br-word-links a{justify-content:space-between}.br-study-links a{flex:1 1 180px}.br-original select{max-width:100%}html:root body.embedded-study #studyDialog .chapter-stepper{flex-wrap:wrap;gap:8px}html:root body.embedded-study #studyDialog .chapter-stepper strong{order:-1;width:100%;text-align:center}}
html:root body.embedded-study #readingWordResult{display:flex;flex-wrap:wrap;align-items:center;gap:14px;scroll-margin-top:75px}html:root body.embedded-study #readingWordResult>div{flex:1 1 240px}html:root body.embedded-study #readingWordResult .word-provenance{order:3;flex:1 0 100%;font-size:14px;line-height:1.6;margin:0}html:root body.embedded-study #readingWordResult>button{flex:0 0 auto}
html:root[data-color-mode] body.embedded-study #studyDialog input::placeholder{color:#64705e!important;opacity:1!important}
@media(max-width:600px){html:root body.embedded-study #readingWordResult{display:block}html:root body.embedded-study #readingWordResult>div{margin-bottom:12px}html:root body.embedded-study #readingWordResult .word-provenance{margin-top:12px}html:root body.embedded-study #readingWordResult>button{width:100%}}
/* Reader chapter controls remain quiet and legible, including unavailable states. */
html:root body.kq-shell .br-shell [data-slot=button]:disabled{border-style:solid!important;box-shadow:none!important}
