/* Shared appearance. This stylesheet never changes game-state colors or source text. */
html[data-color-mode=light]{color-scheme:light}
html[data-color-mode=dark]{color-scheme:dark;--kq-paper:#173b30;--kq-ink:#f7f5e9;--kq-line:#56735e;--kq-gold:#e0c68d;--kq-muted:#cedbc8}
html:root[data-color-mode=dark],html:root[data-color-mode=dark] body.kq-shell{background:#173b30!important;color:#f7f5e9!important}
html:root[data-kq-initial][data-color-mode=dark],html:root[data-kq-initial][data-color-mode=dark] body,html:root[data-kq-initial][data-color-mode=dark] iframe{background:#173b30!important;color:#f7f5e9;color-scheme:dark}
html:root[data-color-mode=dark] .kc{--paper:#173b30;--ink:#f7f5e9;--muted:#cedbc8;--line:#56735e;--copper:#e0c68d;--surface:#224c3e;--border:#56735e;background:var(--paper);color:var(--ink)}
.kc-theme-control{display:inline-flex;gap:7px;align-items:center;justify-content:center;min-height:44px;padding:8px 12px;border:1px solid var(--line,#d9ddcf);border-radius:8px;background:transparent;color:inherit;white-space:nowrap}
html:root[data-color-mode=dark] .kc :is(.kc-prototype,.kc-member-menu,.kc-header nav.open,.kc-group,.kc-resource,.kc-study-intro,.kc-report,.kc-destination,.kc-explore-item,.kc-platform-account-panel,.kc-home-ai-feature,.kc-home-ai-symbol,.kc-home-ai-cta,.kc-quest-starter,.kc-home-growth,.kc-empty,.kc-warning,.kc-home-bottom .kc-empty){background:#224c3e;color:#f7f5e9;border-color:#56735e}
html:root[data-color-mode=dark] .kc :is(h1,h2,h3,h4,.kc-thread-title,.kc-text-link,.kc-resource-title,.kc-home-growth-links strong,.kc-hero em,.kc-meta,.kc-eyebrow,.kc-brand,.kc-replies,.kc-join,.kc-member-button){color:#f7f5e9}
html:root[data-color-mode=dark] .kc :is(p,small,.kc-footnote,.kc-home-context,.kc-resource p,.kc-meta,.kc-home-growth-links small){color:#cedbc8}
html:root[data-color-mode=dark] .kc :is(input:not([type=checkbox]),select,textarea){background:#173b30;color:#f7f5e9;border-color:#56735e}
html:root[data-color-mode=dark] .kc :is(input,textarea)::placeholder{color:#c4cfbd;opacity:1}
html:root[data-color-mode=dark] .kc :is(.kc-primary,.kc-join.joined){background:#e0c68d!important;color:#173b30!important;border-color:#e0c68d!important}
html:root[data-color-mode=dark] .kc .kc-dialog{background:#224c3e;color:#f7f5e9;border-color:#56735e}
html:root[data-color-mode=dark] .kc :is(.kc-resource:hover,.kc-member-menu>button:hover,.kc-interest-tags span){background:#315c49;color:#f7f5e9}
html:root[data-color-mode=dark] .kc .daily-word{--surface:#224c3e;--ink:#f7f5e9;--border:#56735e;background:#224c3e!important;color:#f7f5e9!important}
html:root[data-color-mode=dark] .kc .daily-word :is(button,select,textarea){background:#173b30!important;color:#f7f5e9!important;border-color:#789078!important}
html:root[data-color-mode=dark] .kc :is(.kc-home-growth,.kc-home-growth-links a,.kc-thread,.kc-pillars,.kc-discovery-grid article){border-color:#56735e}
html:root[data-color-mode=dark] .kc .kc-group-art{color:#254638}
html:root[data-color-mode=dark] body.kq-shell :is(.qh-card,.quest-home-tour,.br-study-links a,.br-word-links a){background:#224c3e!important;color:#f7f5e9!important;border-color:#56735e!important}
html:root[data-color-mode=dark] body.kq-shell :is(.qh-card,.quest-home-tour) :is(h2,p,small,strong,.qh-card-action,.qh-icon){color:#f7f5e9!important}
html:root[data-color-mode=dark] body.kq-shell :is(.qh-saved-links a,.qh-welcome>p:last-child,.qh-saved p,.qh-eyebrow,.qh-welcome h1 em,.qh-joy){color:#cedbc8!important;border-color:#56735e!important}
html:root[data-color-mode=dark] body.kq-shell .kqe-workspace-tools .kq-site-controls button{background:#224c3e!important;color:#f7f5e9!important;border-color:#789078!important}
html:root[data-color-mode=dark] body.kq-shell .kq-site-sheet{background:#224c3e!important;color:#f7f5e9!important;border-color:#56735e!important}
html:root[data-color-mode=dark] body.kq-shell .kq-site-sheet :is(p,label,h2,button,a){color:#f7f5e9}
html:root[data-color-mode=dark] body.quest-unified:not(.global-high-contrast):not([data-theme=contrast]) #studyDialog{--ink:#f7f5e9;--muted:#cedbc8;--surface:#224c3e;--border:#56735e;--gold:#e0c68d;background:#173b30!important;color:#f7f5e9!important}
html:root[data-color-mode=dark] body.quest-unified.embedded-study:not(.global-high-contrast):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,.desk-research-panel,.desk-word-panel,.desk-inspector,.desk-outline,.desk-bottom-tools,.study-workspace-brand){background:#224c3e!important;color:#f7f5e9!important;border-color:#56735e!important;--ency-surface:#224c3e;--ency-ink:#f7f5e9;--ency-muted:#cedbc8;--ency-line:#56735e;--ency-accent:#e0c68d}
html:root[data-color-mode=dark] body.quest-unified.embedded-study:not(.global-high-contrast):not([data-theme=contrast]) #studyDialog :is(p,small,h2,h3,h4,h5,sup,strong,b,span,summary,label,.original,.easy-name,.strong-number):not(.verse-highlight):not(.word-highlight){color:#f7f5e9!important}
html:root[data-color-mode=dark] body.quest-unified.embedded-study:not(.global-high-contrast):not([data-theme=contrast]) #studyDialog :is(input,select,textarea,button,.strongs-phrase,.study-encyclopedia-result,.study-encyclopedia-sources a){background:#224c3e!important;color:#f7f5e9!important;border-color:#789078!important}
html:root[data-color-mode=dark] body.quest-unified.embedded-study:not(.global-high-contrast):not([data-theme=contrast]) #studyDialog :is(.strongs-phrase:hover,.strongs-phrase:focus-visible,.word-card .verse-morph){background:#315c49!important;color:#f7f5e9!important}
html:root[data-color-mode=dark] body.quest-unified.embedded-study:not(.global-high-contrast):not([data-theme=contrast]) #studyDialog :is(.verse-highlight,.word-highlight){color:#254638!important}
html:root[data-color-mode=dark] body.quest-unified.embedded-study:not(.global-high-contrast):not([data-theme=contrast]) #studyDialog .verse-highlight :is(span,strong){color:#254638!important}
/* Saved-show controls use the player's palette in both modes. */
body.kq-shell .qp-shell .qp-saved button,body.kq-shell .qp-player>button{background:var(--qp-panel,#fffef9);color:var(--qp-ink,#254638);border:1px solid var(--qp-line,#cbd0bf);border-radius:8px;padding:10px 14px;min-height:44px;cursor:pointer}
@media(max-width:600px){.kc-theme-control{padding:8px;min-width:44px}.kc-theme-control>span:last-child{display:none}.kc .kc-header-actions{gap:8px}}
html:root[data-color-mode=dark] .kc .kq-continue-row,html:root[data-color-mode=dark] .kc .kq-continue-row :is(a,span){color:#cedbc8;border-color:#56735e}
html:root[data-color-mode=dark] .kc .daily-word :is(time,label,small,.daily-word-theme){color:#cedbc8!important}
html:root[data-color-mode=dark] .study-loading{background:#173b30;color:#f7f5e9}
html:root[data-color-mode=dark] .study-loading p{color:#cedbc8}
@media(max-width:480px){.kc .kc-header{padding-inline:16px;gap:8px}.kc .kc-header-actions{gap:6px}.kc .kc-header .kc-brand{gap:7px}.kc .kc-header .kc-brand>span{min-width:0}}
/* Selected event filters must retain contrast on their pale background. */
html:root[data-color-mode=dark] .kc .kc-filter-pills button.active{background:#e0c68d;color:#173b30!important;border-color:#e0c68d}
html:root[data-color-mode=dark] .kc .kc-footnote{color:#dce5d6!important}
/* C25: complete semantic pairs where legacy component rules retain light-mode ink. */
html:root[data-color-mode=dark] .kc .kc-skip{background:#e0c68d;color:#173b30}
html:root[data-color-mode=dark] .kc :is(.kc-footer,.kc-footer a,.kc-footer>div:last-child,.kc-footer>div:last-child>span,.kc-meta span){color:#dce5d6!important}
html:root[data-color-mode=dark] .kc .kc-home-growth em{color:#e0c68d}
html:root[data-color-mode=dark] .kc :is(.daily-word a,.daily-word summary,.daily-saved summary,.daily-saved a,.daily-saved strong){color:#f7f5e9!important}
html:root[data-color-mode=dark] .kc :is(.daily-word details,.daily-word-saved,.daily-saved){color:#dce5d6}
html:root[data-color-mode=dark] body.kq-shell .kqe-footer,html:root[data-color-mode=dark] body.kq-shell .kqe-footer :is(a,span,p){color:#dce5d6!important}
html:root[data-color-mode=dark] .kc .daily-device-notebook :is(summary,strong){color:#f7f5e9!important}
html:root[data-color-mode=dark] .kc .kc-explore-secondary a{color:#f7f5e9}
html:root[data-color-mode=dark] .kc .kc-security{background:#224c3e;color:#f7f5e9;border-color:#789078}
html:root[data-color-mode=dark] body.quest-unified.embedded-study:not(.global-high-contrast):not([data-theme=contrast]) #studyDialog .study-panel{background:#224c3e!important;color:#f7f5e9!important;border-color:#789078!important}
html:root[data-color-mode=dark] body.quest-unified.embedded-study:not(.global-high-contrast):not([data-theme=contrast]) #studyDialog a{color:#f2d99d!important}
/* The embedded reader's legacy selectors use important backgrounds on verse children. */
html:root[data-color-mode=dark] body.quest-unified.embedded-study:not(.global-high-contrast):not([data-theme=contrast]) #studyDialog#studyDialog :is(.study-tabs,.bible-text,.trust-label,.context-workspace,.study-method-workspace){background:#224c3e!important;color:#f7f5e9!important}
html:root[data-color-mode=dark] body.quest-unified.embedded-study:not(.global-high-contrast):not([data-theme=contrast]) #studyDialog#studyDialog :is(.bible-text,.context-workspace,.study-method-workspace) :is(p,span,sup,strong,small,h2,h3,h4,summary,label):not(.verse-highlight):not(.word-highlight){background-color:transparent!important;color:#f7f5e9!important}
html:root[data-color-mode=dark] body.quest-unified.embedded-study:not(.global-high-contrast):not([data-theme=contrast]) #studyDialog#studyDialog :is(input,textarea)::placeholder{color:#d3dfcf!important;opacity:1}
/* C26: hover/focus/pressed states retain their dark-mode foreground/background pair. */
html:root[data-color-mode=dark] .kc :is(.kc-pillars>button,.kc-icon-button,.kc-join:not(.joined),.kc-explore-item):is(:hover,:focus-visible,:active){background:#315c49;color:#f7f5e9;border-color:#aabd9b}
html:root[data-color-mode=dark] .kc .kc-pillars>button:is(:hover,:focus-visible,:active) :is(strong,span){color:#f7f5e9}
html:root[data-color-mode=dark] body.kq-shell .qh-saved-links a:is(:hover,:focus-visible){background:#315c49!important;color:#f7f5e9!important}
/* C27: let the embedded workspace share its canvas instead of framing it as a modal. */
html:root body.quest-unified.embedded-study:not(.global-high-contrast):not([data-theme=contrast]) #studyDialog{border:0!important;outline:0;box-shadow:none!important}
html:root[data-color-mode=dark] body.quest-unified.embedded-study:not(.global-high-contrast):not([data-theme=contrast]) #studyDialog .study-panel{background:#1c4034!important;border-color:transparent!important}
html:root[data-color-mode=dark] body.quest-unified.embedded-study:not(.global-high-contrast):not([data-theme=contrast]) #studyDialog#studyDialog .study-tabs{background:transparent!important}
/* C28: the retained inner navigation must use the shared canvas, not legacy navy. */
html:root[data-color-mode=dark] body.quest-unified.embedded-study .kq-breadcrumbs{background:#173b30;border-bottom-color:#395b4b;backdrop-filter:none}
html:root[data-color-mode=light] body.quest-unified.embedded-study .kq-breadcrumbs{background:#faf9f3;color:#254638;border-bottom-color:#dedfd2;backdrop-filter:none}
html:root[data-color-mode=dark] body.kq-shell :is(.kqe-header,.kqe-breadcrumbs,.kqe-footer){border-color:#395b4b}
html:root[data-color-mode=dark] .kc :is(.kc-group,.kc-resource,.kc-explore-tile,.kc-growth-preview,.kc-growth-journey,.kc-quest-starter,.kc-home-growth){border-color:#496756}
/* C29: embedded Lab uses the same device preference as its shell. */
html:root[data-color-mode=dark] body.embedded-lab:not(.lab-high-contrast):not([data-theme=contrast]){--ink:#f7f5e9;--foreground:#f7f5e9;--muted:#d3dfcf;--border:#789078;--panel:#224c3e;--primary:#e0c68d;--gold:#e0c68d;--gold-2:#e0c68d;--navy:#173b30;--navy-2:#224c3e;background:#173b30!important;color:#f7f5e9!important}
html:root[data-color-mode=dark] body.embedded-lab:not(.lab-high-contrast):not([data-theme=contrast]) :is(dialog.lab-studio-page,#labLaunchDialog,#labEditDialog,#labPlayDialog){background:#173b30!important;color:#f7f5e9!important;border-color:#496756!important}
html:root[data-color-mode=dark] body.embedded-lab:not(.lab-high-contrast):not([data-theme=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,.lab-action-status){background:#224c3e!important;color:#f7f5e9!important;border-color:#496756!important}
html:root[data-color-mode=dark] body.embedded-lab:not(.lab-high-contrast):not([data-theme=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,h3,h4){color:#f7f5e9!important}
html:root[data-color-mode=dark] body.embedded-lab:not(.lab-high-contrast):not([data-theme=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:#d3dfcf!important}
html:root[data-color-mode=dark] body.embedded-lab:not(.lab-high-contrast):not([data-theme=contrast]) :is(button,input,textarea,select,.lab-back-link){background:#224c3e!important;color:#f7f5e9!important;border-color:#789078!important}
html:root[data-color-mode=dark] body.embedded-lab:not(.lab-high-contrast):not([data-theme=contrast]) :is(input,textarea)::placeholder{color:#d3dfcf;opacity:1}
html:root[data-color-mode=dark] body.embedded-lab:not(.lab-high-contrast):not([data-theme=contrast]) :is(.use-game,.primary,.primary-action,#labReveal,.lab-library-actions button:first-child,button.selected,button.revealed,button[aria-pressed=true]){background:#e0c68d!important;color:#173b30!important;border-color:#e0c68d!important}
html:root[data-color-mode=dark] body.embedded-lab:not(.lab-high-contrast):not([data-theme=contrast]) :is(button,.lab-back-link):is(:hover,:focus-visible):not(:disabled){background:#315c49!important;color:#f7f5e9!important;border-color:#b7c49e!important}
html:root[data-color-mode=light] body.embedded-lab:not(.lab-high-contrast):not([data-theme=contrast]) :is(button,.lab-back-link):is(:hover,:focus-visible):not(:disabled){background:#dfe8d7!important;color:#254638!important;border-color:#6a805f!important}
html:root[data-color-mode] body.embedded-lab:not(.lab-high-contrast):not([data-theme=contrast]) :is(button,input,textarea,select,a):focus-visible{outline:3px solid #b39148!important;outline-offset:3px}
html:root[data-color-mode=dark] body.embedded-lab:not(.lab-high-contrast):not([data-theme=contrast]) button:disabled{background:#254639!important;color:#b7c7b2!important;border-style:dashed!important}
html:root[data-color-mode=dark] body.embedded-lab:not(.lab-high-contrast):not([data-theme=contrast]) :is(.reference-link,.lab-workflow span:first-child,.lab-validation){color:#f2d99d!important}
html:root[data-color-mode=dark] body.embedded-lab:not(.lab-high-contrast):not([data-theme=contrast]) :is(.lab-studio-hero .eyebrow,.lab-studio-hero .platform-help,.lab-card>span,.lab-card p,.lab-card small){color:#d3dfcf!important}
html:root[data-color-mode=dark] body.embedded-lab:not(.lab-high-contrast):not([data-theme=contrast]) .lab-activity-card small{color:#d3dfcf!important}
html:root[data-color-mode=dark] body.embedded-lab:not(.lab-high-contrast):not([data-theme=contrast]) .lab-host-console .good{background:#244f36!important;color:#e5f4db!important;border-color:#9dc68c!important}
html:root[data-color-mode=dark] body.embedded-lab:not(.lab-high-contrast):not([data-theme=contrast]) .lab-host-console .bad{background:#653c35!important;color:#fff0e7!important;border-color:#dbab99!important}
/* C30: warning/entry panels and group artwork keep explicit foreground pairs. */
html:root[data-color-mode=dark] .kc .kc-ai-boundary{background:#224c3e;color:#f7f5e9;border:1px solid #496756}
html:root[data-color-mode=dark] .kc .kc-group-art :is(span,svg){color:#254638;opacity:1}
html:root[data-color-mode=dark] .kc .kc-group-content h3 button,html:root[data-color-mode=dark] .kc .kc-group-content h2 button{color:#f7f5e9}
html:root[data-color-mode=dark] body.embedded-lab:not(.lab-high-contrast):not([data-theme=contrast]) :is(.lab-studio-page>.eyebrow,.lab-play-stage .eyebrow){color:#d3dfcf!important}
html:root[data-color-mode=dark] body.embedded-lab:not(.lab-high-contrast):not([data-theme=contrast]) .lab-round-marker{background:#224c3e!important;color:#f7f5e9!important}
/* C32: local host/player surfaces share the board's theme; no room behavior changes. */
html:root[data-color-mode=dark] 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,.live-room-bar,.room-player-panel,.phone-player-panel,.host-inbox,.host-answer-card,.room-connected-card,.room-code-display){background:#224c3e!important;color:#f7f5e9!important;border-color:#789078!important}
html:root[data-color-mode=dark] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.focused-phone,.live-host-panel,.live-room-bar) :is(h2,h3,p,small,label,strong,summary,span){color:#f7f5e9!important}
html:root[data-color-mode=dark] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.focused-phone,.live-host-panel) :is(button,input){background:#173b30!important;color:#f7f5e9!important;border-color:#789078!important}
html:root[data-color-mode=dark] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.focused-phone,.live-host-panel) button:is(:hover,:focus-visible):not(:disabled){background:#315c49!important;color:#f7f5e9!important;border-color:#b7c49e!important}
html:root[data-color-mode=dark] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .focused-phone .phone-status{background:#224c3e!important;color:#f7f5e9!important;border-color:#789078!important}
html:root[data-color-mode=dark] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(#phoneConnection,#phoneReceipt){color:#d8edc5!important}
html:root[data-color-mode=dark] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .room-shared-game{background:#224c3e!important;color:#f7f5e9!important;border-color:#789078!important}
html:root[data-color-mode=dark] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .room-shared-game :is(small,em){color:#e0c68d!important}
/* C38: pair foregrounds with the remaining Community feedback/navigation surfaces. */
html:root[data-color-mode=dark] .kc .kc-notice:not(:empty){background:#224c3e;color:#f7f5e9;border-color:#56735e}
html:root[data-color-mode=dark] .kc .kc-notice button{color:#f7f5e9}
html:root[data-color-mode=dark] .kc .kc-date{background:#e0c68d;color:#173b30;border-color:#b9a36f}
html:root[data-color-mode=dark] .kc .kc-date :is(span,strong){color:inherit}
html:root[data-color-mode=dark] .kc .kc-header nav a:is([aria-current=page],:hover,:focus-visible){background:#315c49;color:#f7f5e9}
html:root[data-color-mode=dark] .kc .kc-profile-card{background:#224c3e;color:#f7f5e9;border-color:#56735e}
html:root[data-color-mode=dark] .kc .kc-tag,html:root[data-color-mode=dark] .kc .kc-meta .kc-tag.kc-tag{background:#e0c68d;color:#173b30!important;border-color:#b9a36f}
/* C40: paired colors for account context and action feedback. */
html:root[data-color-mode=dark] .kc .kc-account-label small,html:root[data-color-mode=dark] .kc .kc-member-menu .kc-account-explanation{color:#cedbc8}
html:root[data-color-mode=dark] .kc .kc-notice[data-tone=error]:not(:empty){background:#523c32;color:#fff0df;border-color:#bc9274}
html:root[data-color-mode=dark] .kc .kc-notice[data-tone=error] button{color:#fff0df}
html:root[data-color-mode=light] .fj-shell .fj-card-number{color:#52624d}
html:root[data-color-mode=dark] .fj-shell .fj-card-number{color:#e0c68d}

html:root[data-color-mode=dark] .kc .kc-home-growth-links a{color:#f7f5e9}
html:root[data-color-mode=dark] body.embedded-study:not(.global-high-contrast):not([data-theme=contrast]) #studyDialog.dedicated-kids:not(.kids-high-contrast) .kids-hub{background:#224c3e!important;color:#f7f5e9!important;border-color:#789078!important}
html:root[data-color-mode=dark] body.embedded-lab:not(.global-high-contrast):not([data-theme=contrast]) .lab-studio-actions .file-button{color:#f7f5e9!important;border-color:#789078!important;min-height:44px}

/* Streak text needs a readable gold on each surface, including player phones. */
html:root[data-color-mode=light] body.quest-unified .streak-badge{color:#785608!important}
html:root[data-color-mode=dark] body.quest-unified .streak-badge{color:#e0c68d!important}

html:root[data-color-mode=light] body.quest-unified .streak-crown.bronze{color:#80521f!important}
html:root[data-color-mode=light] body.quest-unified .streak-crown.silver{color:#52616e!important}
html:root[data-color-mode=light] body.quest-unified .streak-crown.gold{color:#785608!important}

/* Report text must follow its actual surface, including legacy nested text rules. */
html:root[data-color-mode=dark] body.quest-unified.kingdom-studio.kq-shell:not(.global-high-contrast):not([data-theme=contrast]) #learningReportDialog :is(p,small,b,strong,h2,h3,h4,label,li,span){color:#f7f5e9!important;opacity:1}
html:root[data-color-mode=dark] body.quest-unified.kingdom-studio.kq-shell:not(.global-high-contrast):not([data-theme=contrast]) #learningReportDialog .eyebrow{color:#e0c68d!important}

/* Completed-game results use the same readable text pairing as learning reports. */
html:root[data-color-mode=dark] body.quest-unified.kingdom-studio.kq-shell:not(.global-high-contrast):not([data-theme=contrast]) #winnerDialog :is(p,small,b,strong,h2,h3,h4,label,li,span){color:#f7f5e9!important;opacity:1}
html:root[data-color-mode=dark] body.quest-unified.kingdom-studio.kq-shell:not(.global-high-contrast):not([data-theme=contrast]) :is(#winnerDialog,#finalDialog)>.eyebrow{color:#e0c68d!important}

html:root[data-color-mode=dark] body.quest-unified.kingdom-studio.kq-shell:not(.global-high-contrast):not([data-theme=contrast]) .phone-drawers{background:transparent!important;color:#f7f5e9!important}
/* Stack the real player response form, not only the older form class. */
@media(max-width:700px){body.quest-unified #focusedAnswerForm{display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:8px}body.quest-unified #focusedAnswerForm>:is(label,textarea,button,p,.choice-grid){grid-column:1;width:100%;min-width:0;box-sizing:border-box}body.quest-unified #focusedAnswerForm .choice-grid:empty{display:none}body.quest-unified #focusedAnswerForm textarea{min-height:100px}body.quest-unified #focusedAnswerForm #phoneReceipt{margin:0}}

/* Enhanced buttons delegate to hidden engine controls; theme rules must never reshow them. */
html:root body.quest-unified.kingdom-studio.kq-shell .studio-original.studio-original{display:none!important}
html:root body.quest-unified.kingdom-studio.kq-shell:not(.global-high-contrast):not([data-theme=contrast]) #modeResponseForm button{background:#28533f!important;color:#fffef9!important;border-color:#28533f!important}
html:root[data-color-mode=light] body.quest-unified #modeResponseStatus{color:#28533f!important}
html:root[data-color-mode=dark] body.quest-unified #modeResponseStatus{color:#d3dfcf!important}

html:root[data-color-mode=dark] body.embedded-lab:not(.lab-high-contrast):not(.global-high-contrast):not([data-theme=contrast]) #labReportDialog :is(h2,h3,p,b,li){color:#f7f5e9!important}
html:root[data-color-mode=dark] body.embedded-lab:not(.lab-high-contrast):not(.global-high-contrast):not([data-theme=contrast]) #labReportDialog :is(.lab-report,.lab-report-list){background:transparent!important;color:#f7f5e9!important}

/* Dark room-choice surfaces must use their own readable foregrounds. */
html:root[data-color-mode=dark] body:not(.global-high-contrast):not([data-theme=contrast]) #roomsDialog .room-type-grid span{background:#224c3e!important;color:#f7f5e9!important;border-color:#789078!important}
html:root[data-color-mode=dark] body:not(.global-high-contrast):not([data-theme=contrast]) #roomsDialog .room-type-grid :is(b,small){color:#f7f5e9!important}
html:root[data-color-mode=dark] body:not(.global-high-contrast):not([data-theme=contrast]) #roomsDialog .room-type-grid input:checked+span{border-color:#e0c68d!important;box-shadow:inset 0 0 0 1px #e0c68d!important}
html:root[data-color-mode=dark] body:not(.global-high-contrast):not([data-theme=contrast]) #roomsDialog>.eyebrow{color:#e0c68d!important}
