/* C08C: presentation only. Scoped to the existing game, after legacy styles.
   Do not set display/visibility/pointer-events: the engine owns game state.
   :root gives this layer precedence over the shell link appended at runtime.
   Explicit High Contrast keeps its existing accessibility presentation. */
html:has(body.kingdom-studio.kq-shell){background:#faf9f3}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]){
 --kq-workspace-ink:#254638;--kq-game-ink:#254638;--kq-game-muted:#59685e;
 --kq-game-paper:#fffef9;--kq-game-rule:#cbd4c8;--kq-game-soft:#edf1e7;
 --primary:#28533f;--gold:#28533f;--gold-2:#193d2c;--foreground:#254638;
 --ink:#254638;--muted:#59685e;--border:#cbd4c8;--panel:#fffef9;
 --navy:#faf9f3;--navy-2:#fffef9;
 background:#faf9f3!important;color:#254638!important;
 font-family:'DM Sans',system-ui,sans-serif;
}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .app-shell{max-width:1440px;padding-top:24px;padding-bottom:64px}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .topbar{border-color:var(--kq-game-rule)!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.topbar,.platform-tools,.setup-copy){color:var(--kq-game-ink)!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .platform-tools :is(button,a){color:var(--kq-game-ink)!important;border-radius:8px}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .platform-tools :is(button,a):hover{background:#e6eddf!important;color:#193d2c!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .setup-copy{background:none!important;border-color:transparent!important;box-shadow:none!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .setup-copy h1{font:500 clamp(1.85rem,3vw,2.6rem)/1.22 Georgia,serif!important;letter-spacing:-.025em;color:var(--kq-game-ink)!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .setup-copy .intro{color:var(--kq-game-muted)!important;font-size:1rem;line-height:1.65}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.setup-card,.score-card,.home-room-card,.kids-home-button){background:var(--kq-game-paper)!important;color:var(--kq-game-ink)!important;border-color:var(--kq-game-rule)!important;border-radius:16px;box-shadow:0 6px 22px #23402d08}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .setup-card{border-top:3px solid #b39551!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .board-flow-head h2{font:500 1.8rem/1.25 Georgia,serif;color:var(--kq-game-ink)}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.board-flow-head p,.ks-game-card small,.ks-experience p,.lounge-snapshot>p,.kids-home-button small){color:var(--kq-game-muted)!important;line-height:1.5}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .ks-game-card{background:var(--kq-game-paper)!important;border-color:var(--kq-game-rule)!important;border-radius:10px;box-shadow:none!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .ks-game-card button{color:var(--kq-game-ink)!important;min-height:76px}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .ks-game-card.selected{background:#eaf0e4!important;border-color:#53715b!important;box-shadow:inset 3px 0 #28533f!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .ks-game-card.selected .ks-check{color:#28533f!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .ks-game-card:hover{outline:1px solid #53715b;outline-offset:1px}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.step-label,.step-label span,.board-flow-progress){color:var(--kq-game-muted)!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .board-flow-progress .active{color:#28533f!important;border-color:#28533f!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .ks-experience [role=tablist]{background:var(--kq-game-soft)!important;padding:4px;border-radius:10px;height:auto;flex-wrap:wrap}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .ks-experience [role=tab]{color:var(--kq-game-ink)!important;min-height:44px;white-space:normal}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .ks-experience [data-state=active]{background:#28533f!important;color:#fffef9!important;box-shadow:none!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(input,select,textarea){border-color:#a8b7a7!important;background:var(--kq-game-paper)!important;color:var(--kq-game-ink)!important;border-radius:8px;accent-color:#28533f}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(input:not([type=checkbox]):not([type=radio]),select){min-height:44px;max-width:100%}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(button,.ks-connected){font-family:'DM Sans',system-ui,sans-serif}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.ks-connected,.secondary-button,.lifeline-button,.room-tabs button,.room-mode-tabs button,.home-room-actions button,#localPartialControls button,#localStealOptions button){background:var(--kq-game-soft)!important;color:var(--kq-game-ink)!important;border-color:#a8b7a7!important;box-shadow:none!important;min-height:44px;border-radius:9px}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.start-button,.board-room-button,#boardRoomButton,#boardContinueButton,.home-room-card button[type=submit],.reveal-button){background:#28533f!important;color:#fffef9!important;border-color:#28533f!important;box-shadow:none!important;min-height:48px;border-radius:9px}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .home-room-card button{background:#28533f!important;color:#fffef9!important;box-shadow:none!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .lounge-summary-root{background:var(--kq-game-soft)!important;border:1px solid #d6ddcf!important;border-radius:12px}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .learning-preview-grid button{background:#28533f!important;color:#f6e4af!important;border-color:#52765b!important;min-height:44px;box-shadow:none!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .learning-preview-grid button:hover{background:#193d2c!important;color:#fff!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) #bankChooser.kq-bank{background:var(--kq-game-soft)!important;color:var(--kq-game-ink)!important;border-color:var(--kq-game-rule)!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) #bankChooser.kq-bank :is(summary,p,label,legend,strong,small,span){color:var(--kq-game-ink)!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(dialog,.ks-dialog){background:var(--kq-game-paper)!important;color:var(--kq-game-ink)!important;border:1px solid #b9c6b4!important;border-radius:16px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) dialog::backdrop{background:#173b3066;backdrop-filter:blur(3px)}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) dialog :is(h2,h3,label,legend){color:var(--kq-game-ink)!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.dialog-intro,.room-hint){color:var(--kq-game-muted)!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.dialog-close,#boardPreviewDialog .dialog-close){background:#28533f!important;color:#fffef9!important;border-color:#28533f!important;min-width:44px;min-height:44px}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.question-fixed-top,.question-topline,.judging-controls,.question-actions,.editor-actions,.answer-area,.learning-note,.board-preview-question,.learning-card){background:var(--kq-game-soft)!important;color:var(--kq-game-ink)!important;border-color:var(--kq-game-rule)!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .question-topline :is(p,span,strong){color:var(--kq-game-ink)!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(#questionText,#answerText){color:var(--kq-game-ink)!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) #questionText{font-family:Georgia,serif!important;font-weight:600;line-height:1.4}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.prompt-label,#answerLabel,.question-category,.timer-row,.studio-lifelines){color:var(--kq-game-muted)!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .timer-track{background:#dfe6d7!important}
/* Preserve inline warning/red timer colors; only theme its default primary token. */
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.reference-link,.learning-card button){color:#28533f!important;text-decoration:underline;text-underline-offset:3px}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.game-toolbar h1,.game-toolbar .eyebrow,.progress-wrap,.ks-progress){color:var(--kq-game-ink)!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .game-toolbar h1{font-family:Georgia,serif;font-weight:500}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) #gameScreen .mode-guide,html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) #gameScreen .mode-guide *{background:var(--kq-game-soft)!important;color:var(--kq-game-ink)!important;border-color:var(--kq-game-rule)!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) #gameScreen .score-card{background:var(--kq-game-paper)!important;border-color:var(--kq-game-rule)!important;box-shadow:none!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) #gameScreen .score-card.active{background:#eaf0e4!important;border-left:5px solid #28533f!important;border-bottom-color:#b39551!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) #gameScreen .score-card *{color:var(--kq-game-ink)!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .board{background:#e6eddf!important;border-color:#c3cfbc!important;border-top:3px solid #b39551!important;box-shadow:none!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.category-title,.category-heading){color:var(--kq-game-ink)!important;border-color:#a7b79e!important;line-height:1.4}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) #board .clue-button{background:#28533f!important;color:#f6e4af!important;border-color:#53765c!important;border-bottom-color:#193d2c!important;box-shadow:0 3px 0 #193d2c22!important;min-height:56px}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) #board .clue-button:not(.used):hover{background:#193d2c!important;color:#fffef9!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) #board .clue-button.used{background:#d4decb!important;color:#40563d!important;border-color:#a8b7a0!important;box-shadow:none!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) #board .clue-button::after{color:inherit!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .judging-controls .ks-action-root:first-of-type .ks-connected{background:#fff0ed!important;color:#963e30!important;border-color:#c5968b!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .judging-controls .ks-action-root:last-of-type .ks-connected{background:#28533f!important;color:#fffef9!important;border-color:#28533f!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.room-tabs,.room-mode-tabs) .active{background:#28533f!important;color:#fffef9!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.live-host-panel,.room-host-controls,.room-player-card){background:var(--kq-game-soft)!important;color:var(--kq-game-ink)!important;border-color:var(--kq-game-rule)!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible{outline:3px solid #8b6e2f!important;outline-offset:3px}
@media(max-width:780px){
 html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .app-shell{padding:16px 12px 40px;min-width:0}
 html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .setup-card{padding:20px 14px}
 html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .setup-copy h1{font-size:1.9rem!important}
 html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .learning-preview-grid{gap:5px}
 html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .learning-preview-grid button{font-size:.8rem;padding:8px 3px}
 html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .board{padding:8px;gap:6px}
 html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) dialog{max-height:calc(100dvh - 20px);max-width:calc(100vw - 20px)}
 html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .judging-controls{gap:6px;padding:12px 8px}
 html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .judging-controls .ks-connected{white-space:normal;min-height:48px;font-size:.85rem;padding:10px 7px}
}

/* Override the legacy color-mode layer at the same state boundary. */
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) #rulesButton{background:var(--kq-game-soft)!important;color:var(--kq-game-ink)!important;border-color:#a8b7a7!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) #gameScreen :is(.game-toolbar,.game-toolbar h1,.game-toolbar .eyebrow,.progress-wrap){color:var(--kq-game-ink)!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) #gameScreen button{background:var(--kq-game-soft)!important;color:var(--kq-game-ink)!important;border-color:#a8b7a7!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) #gameScreen .board-play-tools{background:var(--kq-game-soft)!important;color:var(--kq-game-ink)!important;border-color:var(--kq-game-rule)!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .ks-game-card :is(strong,small,svg){color:inherit!important}
/* Chrome only: suppress duplicated legacy feature links, including mobile rules. */
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .platform-tools>a{display:none!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .judging-controls button[aria-label="Correct +"]{background:#28533f!important;color:#fffef9!important;border-color:#28533f!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .judging-controls button[aria-label="Incorrect −"]{background:#fff0ed!important;color:#963e30!important;border-color:#c5968b!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(#stealQuestion,.studio-lifelines button){background:var(--kq-game-soft)!important;color:var(--kq-game-ink)!important;border-color:#a8b7a7!important;min-height:44px}
@media(max-width:780px){
 html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .game-toolbar{flex-wrap:wrap!important;gap:16px!important;align-items:flex-start!important}
 html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .game-toolbar>div:first-child{flex:1 0 100%;min-width:0}
 html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .game-toolbar>.access-tools{flex-wrap:wrap;max-width:100%}
 html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .game-toolbar h1{font-size:1.8rem;line-height:1.25}
 html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) #questionDialog{height:calc(100dvh - 24px)!important;inset:12px 0!important;margin:0 auto!important}
 html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) #questionDialog .question-panel{height:100%!important;max-height:100%!important;min-height:0!important}
 html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .question-body{min-height:0!important}
}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .board-preview-column :is([data-preview-value],span){background:#28533f!important;color:#f6e4af!important;min-height:44px}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .board-preview-column [data-preview-value]:is(:hover,.active){background:#193d2c!important;color:#fffef9!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.toast,#kqActionNotice,.achievement-toast){background:#28533f!important;color:#fffef9!important;border-color:#b39551!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) #judgingControls button[aria-label="Correct +"]{background:#28533f!important;color:#fffef9!important;border-color:#28533f!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) #judgingControls button[aria-label="Incorrect −"]{background:#fff0ed!important;color:#963e30!important;border-color:#c5968b!important}

html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .board-preview-column strong{background:var(--kq-game-soft)!important;color:var(--kq-game-ink)!important;border-color:var(--kq-game-rule)!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .design-preview-studio{background:var(--kq-game-soft)!important;color:var(--kq-game-ink)!important;border-color:var(--kq-game-rule)!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .design-preview-card{background:var(--kq-game-paper)!important;color:var(--kq-game-ink)!important;border-color:#b9c6b4!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .design-preview-card.active{background:#eaf0e4!important;box-shadow:inset 0 0 0 1px #28533f!important}

/* C31: retain the existing board and scoring, with mode-specific presentation tokens. */
html:root[data-color-mode=dark] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]){--kq-workspace-ink:#f7f5e9;--kq-game-ink:#f7f5e9;--kq-game-muted:#d3dfcf;--kq-game-paper:#224c3e;--kq-game-rule:#789078;--kq-game-soft:#1c4034;--ink:#f7f5e9;--foreground:#f7f5e9;--muted:#d3dfcf;--panel:#224c3e;--border:#789078;background:#173b30!important;color:#f7f5e9!important}
html:root[data-color-mode=dark] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) #gameScreen .score-card.active{background:#365747!important;border-left-color:#e0c68d!important}
html:root[data-color-mode=dark] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.board,.timer-track){background:#1c4034!important}
html:root[data-color-mode=dark] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.reference-link,.learning-card button){color:#f2d99d!important}
html:root[data-color-mode=dark] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) #board .clue-button.used{background:#203f34!important;color:#c4d3bb!important}
html:root[data-color-mode=dark] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.lifeline-button,.studio-lifelines button,.ks-connected,#gameScreen .access-tools button):hover:not(:disabled){background:#315c49!important;color:#f7f5e9!important}
html:root[data-color-mode=dark] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .learning-card :is(p,small,div,span){color:#d3dfcf!important}
html:root[data-color-mode=dark] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) #modeResponseStatus{color:#d8edc5!important}

/* C42: pair setup labels and selected cards with the existing mode palette. */
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) :is(.board-size-controls label,#resumeSavedGame,#resumeSavedGame strong,#resumeSavedGame span){color:var(--kq-game-ink)!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .ks-game-card button span{color:var(--kq-game-muted)!important}
html:root[data-color-mode=dark] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .ks-game-card.selected{background:#315c49!important;border-color:#e0c68d!important;box-shadow:inset 3px 0 #e0c68d!important}
html:root[data-color-mode=dark] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]) .ks-game-card.selected .ks-check{color:#e0c68d!important}
/* Preview text is supplied by the existing studio, with explicit day/night tokens. */
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not(.global-high-contrast):not([data-theme=contrast]) :is(.lounge-snapshot>span,.learning-preview-heading strong,.learning-preview-heading span,.learning-preview-grid b,#resumeSavedGame b){color:var(--kq-game-ink)!important}
/* Setup step labels must remain readable on both shared canvases. */
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]):not(.global-high-contrast) .board-flow-progress span{color:var(--kq-game-muted)!important}
html:root[data-color-mode] body.quest-unified.kingdom-studio.kq-shell:not([data-theme=contrast]):not(.global-high-contrast) .board-flow-progress span.active{color:var(--kq-game-ink)!important;box-shadow:0 2px 0 #b69a58!important}
