:root {
    --wiki-page: #fff; --wiki-canvas: #f6f6f6; --wiki-ink: #202122;
    --wiki-muted: #54595d; --wiki-blue: #0645ad; --wiki-rule: #a2a9b1;
    --wiki-frame: #a7d7f9; --wiki-box: #f8f9fa; --wiki-band: #eaecf0;
}
:root[data-wiki-color="dark"] {
    --wiki-page: #101418; --wiki-canvas: #202122; --wiki-ink: #eaecf0;
    --wiki-muted: #a2a9b1; --wiki-blue: #8ab4f8; --wiki-rule: #72777d;
    --wiki-frame: #54595d; --wiki-box: #202122; --wiki-band: #27292d;
}
.wiki-appearance { display: flex; justify-content: flex-end; align-items: center; gap: 16px; font: 13px/1.6 Arial, Helvetica, sans-serif; color: var(--wiki-ink); }
.wiki-appearance .wiki-back { color: var(--wiki-blue); padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.wiki-appearance .wiki-back:hover { text-decoration: underline; }
.wiki-appearance fieldset { display: flex; align-items: center; gap: 12px; margin: 0; padding: 0; border: 0; }
.wiki-appearance label { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.wiki-appearance input { margin: 0; accent-color: #36c; }
.wiki-appearance :focus-visible { outline: 2px solid var(--wiki-blue); outline-offset: 3px; }
/* The same Wikipedia palette applies to the existing game. */
.wiki-game { --wiki-link: var(--wiki-blue); background: var(--wiki-canvas); color: var(--wiki-ink); color-scheme: light; }
[data-wiki-color="dark"] .wiki-game { color-scheme: dark; }
.wiki-game .wiki-game__personal { height: auto; min-height: 40px; background: var(--wiki-canvas); }
.wiki-game .wiki-game__personal:has(.wiki-appearance) { display: flex; }
.wiki-game .wiki-game__tabs { background: var(--wiki-canvas); border-color: var(--wiki-frame); }
.wiki-game .wiki-game__mode button, .wiki-game .wiki-game__tabs > a { background: var(--wiki-box); border-color: var(--wiki-frame); }
.wiki-game .wiki-game__mode button.is-active { background: var(--wiki-page); color: var(--wiki-ink); }
.wiki-game .wiki-game__panel, .wiki-game .wiki-game__card { background: var(--wiki-page); color: var(--wiki-ink); border-color: var(--wiki-frame); }
.wiki-game .wiki-game__top > :is(h1,h2), .wiki-game .wiki-game__card-heading strong, .wiki-game .wiki-game__history-top h2 { color: var(--wiki-ink); }
.wiki-game .wiki-game__logo { color: var(--wiki-ink) !important; }
.wiki-game .wiki-game__statbar, .wiki-game .wiki-game__history-item, .wiki-game .wiki-game__next-round, .wiki-game .wiki-game__status { background: var(--wiki-box); color: var(--wiki-ink); }
.wiki-game .wiki-game__stat-label { background: var(--wiki-band); }
.wiki-game .wiki-game__history-side span, .wiki-game .wiki-game__card-badge, .wiki-game .wiki-game__nav-heading { color: var(--wiki-muted); }
[data-wiki-color="dark"] .wiki-game .wiki-game__card.is-correct .wiki-game__card-result em,
[data-wiki-color="dark"] .wiki-game .wiki-game__history-result.is-win { color: #71c4a5; }
[data-wiki-color="dark"] .wiki-game .wiki-game__card.is-wrong .wiki-game__card-result::after,
[data-wiki-color="dark"] .wiki-game .wiki-game__history-result.is-loss { color: #f8a397; }
.wiki-game .wiki-game__history-vs, .wiki-game .wiki-game__toast { color: var(--wiki-muted); }
.wiki-game .wiki-game__history-top button::before, .wiki-game .wiki-game__history-top button::after { color: var(--wiki-ink); }
