@charset "UTF-8";

/*
 * Optional Console theme. Load after kajero_preview_colors.css.
 * Every rule is scoped: removing data-kajero-theme restores the original theme.
 * Positioning, panel visibility, history, language scope and generated content
 * remain the responsibility of the existing layout and interaction code.
 */
html[data-kajero-theme="console"] {
  color-scheme: dark;
  --console-bg: #101216;
  --console-surface: #181b21;
  --console-raised: #20252d;
  --console-input: #12161c;
  --console-hover: #29313a;
  --console-text: #e5e7eb;
  --console-muted: #a4acb9;
  --console-dim: #8d98a8;
  --console-line: #343b46;
  --console-control-line: #5c697a;
  --console-accent: #a8d5bb;
  --console-selected: #254b38;
  --console-selected-line: #6f9d80;
  --console-danger: #e7adb0;
  --console-danger-bg: #3d252b;
  --console-warm: #dec69a;
  --console-warm-bg: #352d20;
  --console-blue: #a9ccd8;
  --console-blue-bg: #22323a;
  --bg: var(--console-bg);
  --card: var(--console-surface);
  --text: var(--console-text);
  --ink: var(--console-text);
  --muted: var(--console-muted);
  --line: var(--console-line);
  --line-strong: var(--console-control-line);
  --green-900: #b4d9c3;
  --green-800: #9ac7ae;
  --green-700: #3f7358;
  --green-500: #75a68b;
  --green-300: #354d40;
  --green-100: #202e27;
  --green-050: #19251f;
  --warm-900: #e3cdab;
  --warm-800: var(--console-warm);
  --warm-700: #7a603c;
  --warm-100: var(--console-warm-bg);
  --warm-line: #514632;
  --cool-900: #bad5df;
  --cool-800: var(--console-blue);
  --cool-700: #426876;
  --cool-500: #6d96a5;
  --cool-100: var(--console-blue-bg);
  --cool-line: #3b535e;
  --link-visited: #c1b1d3;
  --highlight: #51482c;
  --border-color: var(--console-line);
  --card-soft: var(--console-raised);
  --accent: var(--console-accent);
  --shadow: 0 3px 12px rgb(0 0 0 / .14);
  --shadow-soft: none;
  --shadow-medium: 0 6px 20px rgb(0 0 0 / .24);
  --radius-xl: 12px;
  --radius-lg: 10px;
  --radius-md: 8px;
  --radius-sm: 6px;
  scrollbar-color: #58616e var(--console-bg);
}

html[data-kajero-theme="console"] body {
  color: var(--console-text);
  background: var(--console-bg);
  line-height: 1.65;
}

html[data-kajero-theme="console"] ::selection {
  background: #365841;
  color: #f4f8f5;
}

html[data-kajero-theme="console"] a { color: var(--green-900); }
html[data-kajero-theme="console"] a:visited { color: var(--link-visited); }
html[data-kajero-theme="console"] a:hover { color: #d2ebdc; }
html[data-kajero-theme="console"] :focus-visible {
  outline: 2px solid var(--console-accent);
  outline-offset: 3px;
}

/* Neutral surfaces: repeat the specific base selectors that hard-code white. */
html[data-kajero-theme="console"] :is(
  .card, .hero, .compact-hero, .entry-tabs__nav, .kajero-suggestion-panel,
  .modal-content, .kajero-tag-dialog, .learning-note-item,
  .search-mode-empty, .async-processing-card, .kajero-search-turn__loading
) {
  background: var(--console-surface);
  border-color: var(--console-line);
  color: var(--console-text);
  box-shadow: var(--shadow);
}

html[data-kajero-theme="console"] :is(
  .entry-panel > .word-card, .entry > .word-card,
  .entry-panel > .word-card ~ .card, .entry > .word-card ~ .card,
  .entry-secondary-cards > .card, .entry-secondary-panel > .card,
  .example-translation-search-card
) {
  background: var(--console-surface);
  border-color: var(--console-line);
  box-shadow: none;
}

html[data-kajero-theme="console"] :is(.entry-panel > .word-card, .entry > .word-card) {
  border-top-color: #597563;
}

html[data-kajero-theme="console"] :is(
  .entry-panel > .word-card ~ .card, .entry > .word-card ~ .card,
  .entry-secondary-cards > .card
)::before { background: var(--console-line); }

html[data-kajero-theme="console"] :is(
  .card-title, .card-title h2, .entry__head h1, .entry__head h2,
  .entry-panel > .word-card ~ .card .card-title,
  .entry > .word-card ~ .card .card-title,
  .entry-secondary-cards > .card .card-title
) {
  color: var(--console-text);
  font-weight: 650;
}

html[data-kajero-theme="console"] .card { padding: 16px; }
html[data-kajero-theme="console"] .card > .inner,
html[data-kajero-theme="console"] .entry-secondary-cards .card > .inner {
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
html[data-kajero-theme="console"] .card.is-collapsible .inner::after {
  background: linear-gradient(180deg, transparent, var(--console-surface));
}
html[data-kajero-theme="console"] .card-title { margin-bottom: 12px; }
html[data-kajero-theme="console"] :is(.entry-tabs__panels, .entry-tabs .entry-panel) { gap: 14px; }
html[data-kajero-theme="console"] .grid { gap: 16px; }

/* Keep the existing sticky header, fixed composer, menu bounds and offsets. */
html[data-kajero-theme="console"] .kajero-timeline-mode .hero {
  padding-block: 8px;
  border-color: var(--console-line);
  border-radius: 0 0 10px 10px;
  background: #171b20;
  box-shadow: 0 2px 8px rgb(0 0 0 / .16);
}

html[data-kajero-theme="console"] .kajero-timeline-mode .search-row {
  background: #1c2128;
  border-color: var(--console-control-line);
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 4px 18px rgb(0 0 0 / .3);
  backdrop-filter: none;
}

html[data-kajero-theme="console"] :is(.lang-panel, .kajero-timeline-mode .hero > .lang-panel) {
  background: var(--console-input);
  border-color: var(--console-line);
  border-radius: 7px;
}

html[data-kajero-theme="console"] :is(.lang-tab, .kajero-timeline-mode .lang-tabs > a) {
  color: var(--console-muted);
  background: transparent;
  font-weight: 600;
}

html[data-kajero-theme="console"] :is(.lang-tab.active, .kajero-timeline-mode .lang-tabs > a.active) {
  color: #e7f4ec;
  background: var(--console-selected);
  box-shadow: none;
}

/* Paint the primary menu trigger wrapper to match its inner control. */
html[data-kajero-theme="console"] .hero-menu .structure > .branch {
  background: var(--console-raised);
  border-color: var(--console-control-line);
  border-radius: 7px;
  box-shadow: none;
}

html[data-kajero-theme="console"] .kajero-timeline-mode .hero-menu #kajero-main-menu-panel,
html[data-kajero-theme="console"] .structure ul {
  color: var(--console-text);
  background: var(--console-raised);
  border-color: var(--console-control-line);
  box-shadow: var(--shadow-medium);
  border-radius: 8px;
}

html[data-kajero-theme="console"] :is(
  .structure a, .hero-menu .structure > .branch > ul > li > .structure-menu-command
) {
  color: var(--console-text);
  background: transparent;
  font-weight: 500;
}

html[data-kajero-theme="console"] :is(
  .structure a:hover, .structure-menu-command:hover,
  .kajero-suggestion-option.is-active, .kajero-suggestion-option:hover
) {
  color: #edf3ef;
  background: var(--console-hover);
}

html[data-kajero-theme="console"] :is(
  .kajero-search-turn__toggle, .kajero-search-turn.is-collapsed .kajero-search-turn__toggle
) {
  color: var(--console-text);
  background: var(--console-raised);
  border: 1px solid var(--console-line);
  border-radius: 8px;
  box-shadow: none;
  font-weight: 600;
}

html[data-kajero-theme="console"] :is(.kajero-search-turn__copy, .kajero-search-turn__delete) {
  background: var(--console-surface);
  border-color: var(--console-line);
  color: var(--console-muted);
  border-radius: 7px;
}

html[data-kajero-theme="console"] .kajero-search-timeline { gap: 16px; }
html[data-kajero-theme="console"] .kajero-search-turn__meta { color: var(--console-muted); opacity: 1; }

html[data-kajero-theme="console"] .compact-hero--home.kajero-home-motion {
  --kajero-home-motion-paper: #cfdad3;
  background: var(--console-surface);
}
html[data-kajero-theme="console"] .kajero-home-motion__trigger {
  min-height: 112px;
  padding: 16px 20px;
}
html[data-kajero-theme="console"] .kajero-home-motion__paper-field { background: var(--console-surface); }
html[data-kajero-theme="console"] .kajero-home-motion__logo-frame { width: 64px; }
html[data-kajero-theme="console"] .kajero-home-motion__letters {
  color: var(--console-text);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 650;
  text-shadow: none;
}
html[data-kajero-theme="console"] .kajero-home-motion__caption { color: var(--console-muted); }

/* One compact entry rail and a readable content pane; retain mobile tabs. */
@media (min-width: 961px) {
  html[data-kajero-theme="console"] .entry-tabs {
    grid-template-columns: minmax(184px, 224px) minmax(0, 1fr);
    gap: 14px;
  }
}

html[data-kajero-theme="console"] .entry-tabs__nav { gap: 5px; padding: 7px; box-shadow: none; }
html[data-kajero-theme="console"] .entry-tab {
  padding: 9px 10px;
  border-radius: 6px;
  color: var(--console-muted);
  background: transparent;
  font-weight: 600;
}

html[data-kajero-theme="console"] .entry-tab:hover,
html[data-kajero-theme="console"] .entry-tab:focus-visible {
  color: var(--console-text);
  background: var(--console-hover);
}

html[data-kajero-theme="console"] :is(
  .entry-tab.is-active, .entry-tab[aria-current="true"],
  .entry-secondary-tab[aria-selected="true"]
) {
  color: #e7f4ec;
  background: var(--console-selected);
  border-color: var(--console-selected-line);
  box-shadow: none;
}

html[data-kajero-theme="console"] .entry-secondary-tab {
  border-radius: 6px;
  font-weight: 600;
}

html[data-kajero-theme="console"] :is(.entry__head .headword, .lemma) {
  color: var(--console-text);
  font-size: min(var(--headword-fit-size, 2.25rem), 2.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
}

html[data-kajero-theme="console"] .entry__head .headword a { color: inherit; }
html[data-kajero-theme="console"] :is(.pronunciation-ipa, .pronunciation-phonemic, .pronunciation-phonetic) {
  color: #b9c3d1;
}
html[data-kajero-theme="console"] .meaning {
  color: var(--console-text);
  margin-block-start: 12px;
  font-size: 1.15rem;
  line-height: 1.6;
  font-weight: 500;
}

html[data-kajero-theme="console"] :is(
  .root-card .root-meta-row, .row-content, .translation-row .translation-values,
  .info-page-section, .example-card .example-translation, .eo,
  .sense-card__contrast-body, .sense-card__contrast-item-head h4,
  .sense-card__gloss, .learning-note-body, .learning-note-extra-row strong,
  .leghelpilo-text
) { color: var(--console-text); }

html[data-kajero-theme="console"] :is(
  .root-card .root-label, .pronunciation-line, .phonetic, .ja,
  .ja-pitch__label, .example-language-arrow, .sense-card__eo-gloss,
  .sense-card__verb-form-meta, .minimal-pair-translation, .minimal-pair-count,
  .minimal-pair-arrow, .kajero-tag-candidate small, .kajero-tag-chip small,
  .kajero-tag-first, .cjkvi-relation-code, .learning-note-meta
) { color: var(--console-muted); }

html[data-kajero-theme="console"] :is(
  .row-box, .translation-row, .bookmark-ranking-item, .my-likes-stat,
  .sense-card__item, .sense-card__verb-forms, .sense-card__contrast-item,
  .learning-note-preview-box, .learning-note-content, .pronunciation-existing,
  .pronunciation-list-row, .search-mode-query-label, .parser-knowledge-focus,
  .leghelpilo-text, .leghelpilo-text .leghelpilo-token,
  .learning-note-body .leghelpilo-token, .leghelpilo-frequency-toggle,
  .leghelpilo-threshold-control, .leghelpilo-display-toggle,
  .sense-card__verb-frame, .sense-card__field, .parser-knowledge-pos,
  .learning-note-reply, .learning-note-filter-form
) {
  color: var(--console-text);
  background: var(--console-raised);
  border-color: var(--console-line);
  box-shadow: none;
}

html[data-kajero-theme="console"] :is(.row-label, .translation-row strong, .title-bar, .kajero-tag-header) {
  color: var(--console-muted);
  background: #20262d;
  border-color: var(--console-line);
  font-weight: 600;
}

html[data-kajero-theme="console"] :is(.row-label, .row-content, .translation-row strong, .translation-row .translation-values) {
  padding: 10px 12px;
}

html[data-kajero-theme="console"] :is(.search-mode-list a, .sense-card__verb-form, .sense-card__translation,
  .sense-card__contrast-alternative, .info-page-section .structure--directory > li > a) {
  color: var(--console-text);
  background: var(--console-raised);
  border-color: var(--console-line);
  font-weight: 550;
}

html[data-kajero-theme="console"] .search-mode-list a:hover {
  color: #d2ebdc;
  background: var(--console-hover);
}

html[data-kajero-theme="console"] .word-card .meaning a[href]:hover,
html[data-kajero-theme="console"] .word-card .meaning a[href]:focus-visible,
html[data-kajero-theme="console"] .translation-row .translation-values a[href]:hover,
html[data-kajero-theme="console"] .translation-row .translation-values a[href]:focus-visible {
  color: var(--console-accent);
  text-decoration-color: currentColor;
}
html[data-kajero-theme="console"] .leghelpilo-text a.leghelpilo-token__source-link,
html[data-kajero-theme="console"] .learning-note-body a.leghelpilo-token__source-link {
  color: var(--console-accent);
  background: var(--console-surface);
  border-color: var(--console-line);
  box-shadow: none;
}

html[data-kajero-theme="console"] .search-mode-list { gap: 6px; }
html[data-kajero-theme="console"] .sense-card__item { padding: 12px; }
html[data-kajero-theme="console"] .example-item { gap: 10px; }
html[data-kajero-theme="console"] .example-learning-list ul + .example-language[data-translation-language],
html[data-kajero-theme="console"] .example-search-groups ul + .example-language[data-translation-language] {
  margin-block-start: 1.6rem;
}

/* Reuse the established language hue families, with dark fills and light ink. */
html[data-kajero-theme="console"] :is(.language-pill, .example-language-label[data-language]) {
  background: var(--console-raised);
  color: var(--console-text);
  border: 1px solid var(--console-line);
  border-radius: 5px;
  min-width: 0;
  font-weight: 600;
}

html[data-kajero-theme="console"] .language-pill.eo,
html[data-kajero-theme="console"] .example-language-label[data-language="eo"] {
  background: #23382b; border-color: #45614e; color: #b6d9c1;
}
html[data-kajero-theme="console"] .language-pill.ja,
html[data-kajero-theme="console"] .example-language-label[data-language="ja"] {
  background: #38282d; border-color: #6b4b55; color: #e4bdc9;
}
html[data-kajero-theme="console"] .language-pill.en,
html[data-kajero-theme="console"] .example-language-label[data-language="en"] {
  background: #32293b; border-color: #5f506d; color: #d4c0e4;
}
html[data-kajero-theme="console"] :is(.language-pill.zh, .language-pill.ryu),
html[data-kajero-theme="console"] :is(.example-language-label[data-language="zh"], .example-language-label[data-language="ryu"]) {
  background: #3a2a2e; border-color: #6d5058; color: #e5c0ca;
}
html[data-kajero-theme="console"] :is(.language-pill.io, .language-pill.fr),
html[data-kajero-theme="console"] :is(.example-language-label[data-language="io"], .example-language-label[data-language="fr"]) {
  background: #25323d; border-color: #4c6273; color: #bed4e6;
}
html[data-kajero-theme="console"] .example-language-label[data-language="tok"] {
  background: #3a321e; border-color: #6d6034; color: #e2cf8b;
}
html[data-kajero-theme="console"] .verb-transitivity-badge--transitive {
  background: #3a3020; border-color: #80663f; color: #e0c593;
}
html[data-kajero-theme="console"] .verb-transitivity-badge--intransitive {
  background: #243446; border-color: #577b9e; color: #b8d4ed;
}
html[data-kajero-theme="console"] .verb-transitivity-badge--both {
  background: #342b43; border-color: #796194; color: #d4bfe9;
}
html[data-kajero-theme="console"] .sense-card__contrast-kind--avoid {
  background: var(--console-danger-bg); border-color: #8c5a64; color: var(--console-danger);
}
html[data-kajero-theme="console"] .sense-card__contrast-kind--other {
  background: var(--console-blue-bg); border-color: var(--cool-line); color: var(--console-blue);
}

/* Controls stay modest, with explicit focus and a native dark color scheme. */
html[data-kajero-theme="console"] button,
html[data-kajero-theme="console"] input[type="submit"],
html[data-kajero-theme="console"] :is(
  .hero-action-button, .structure-branch-toggle, .entry-secondary-tab, .pager-link,
  .relation-map-pill, .tag-pill, .pill, .fold, .compact-hero__links a,
  .compact-footer a, .learning-note-hashtag, .dictionary-annotation-chip,
  .kajero-tag-chip, .kajero-tag-load, .kajero-tag-candidate
) {
  background: var(--console-raised);
  color: var(--console-text);
  border-color: var(--console-control-line);
  border-radius: 7px;
  box-shadow: none;
  font-weight: 600;
  text-shadow: none;
}

html[data-kajero-theme="console"] :is(
  .hero-action-button:hover, .structure-branch-toggle:hover, .pager-link:hover,
  .compact-hero__links a:hover, .kajero-tag-candidate:hover, .kajero-tag-load:hover
) { background: var(--console-hover); color: #f0f3f5; }

html[data-kajero-theme="console"] .learning-note-pill,
html[data-kajero-theme="console"] .learning-note-actions .editLearningNoteBtn,
html[data-kajero-theme="console"] .editCommentBtn,
html[data-kajero-theme="console"] .learning-note-reply-form button,
html[data-kajero-theme="console"] #commentButton,
html[data-kajero-theme="console"] .read-more-btn {
  background: var(--console-raised);
  color: var(--console-text);
  border-color: var(--console-control-line);
  border-radius: 7px;
  box-shadow: none;
}
html[data-kajero-theme="console"] .learning-note-actions .editLearningNoteBtn:is(:hover, :focus-visible),
html[data-kajero-theme="console"] .learning-note-reply-form button:is(:hover, :focus-visible) {
  background: var(--console-hover);
  color: #f0f3f5;
}
html[data-kajero-theme="console"] .learning-note-status--answered {
  background: #23382b; border-color: #45614e; color: #b6d9c1;
}
html[data-kajero-theme="console"] .learning-note-status--unanswered,
html[data-kajero-theme="console"] .learning-note-delete-open {
  background: var(--console-danger-bg); border-color: #8c5a64; color: var(--console-danger);
}
html[data-kajero-theme="console"] .learning-note-delete-confirm {
  background: #7c303e; border-color: #b97a85; color: #fff1f1;
}

html[data-kajero-theme="console"] :is(
  .search-button, .kajero-tag-actions .kajero-tag-search,
  .partial-language-filter__button.is-active, .dictionary-annotation-chip.is-active,
  .dictionary-annotation-chip[aria-pressed="true"], .compact-hero__language-link.is-active
) {
  background: var(--console-selected);
  color: #e7f4ec;
  border-color: var(--console-selected-line);
}

html[data-kajero-theme="console"] .pronunciation-widget button {
  background: #2a4d3b;
  color: #d9eee2;
  border-color: #658773;
  border-radius: 7px;
  box-shadow: none;
}
html[data-kajero-theme="console"] .pronunciation-widget .pronunciation-open-record {
  background: var(--console-danger-bg);
  color: #efb8bd;
  border-color: #90626a;
}
html[data-kajero-theme="console"] .pronunciation-synthesis .pronunciation-synthesize {
  min-height: 36px;
  background: var(--console-raised);
  color: var(--console-text);
  border-color: var(--console-control-line);
  border-radius: 7px;
  box-shadow: none;
}
html[data-kajero-theme="console"] .pronunciation-synthesis .pronunciation-synthesize:hover {
  background: var(--console-hover);
  color: #f0f3f5;
}
html[data-kajero-theme="console"] .pronunciation-synthesis .pronunciation-synthesize:focus-visible {
  outline: 2px solid var(--console-accent);
  outline-offset: 3px;
}
html[data-kajero-theme="console"] :is(.pronunciation-count, .pronunciation-synthesis-status) {
  color: var(--console-muted);
  background: transparent;
  border-color: var(--console-line);
}

html[data-kajero-theme="console"] .star-check {
  --bookmark-star-bg-lightness: 15%;
  --bookmark-star-color-lightness: 76%;
  --bookmark-star-border-alpha: .7;
  background: #202a24;
  color: #b1c9ba;
  border-color: #52725e;
  border-radius: 6px;
  box-shadow: none;
}
html[data-kajero-theme="console"] .star-check--checked,
html[data-kajero-theme="console"] .star-check:has(.star-check__input:checked) {
  background: #315b43;
  color: #f0f6f2;
  border-color: #7ba58a;
  box-shadow: none;
}
html[data-kajero-theme="console"] .star-check__icon { filter: none; }
html[data-kajero-theme="console"] :is(.learning-note-like-button, .pronunciation-like-button) {
  --learning-note-like-bg-lightness: 16%;
  --learning-note-like-color-lightness: 78%;
  --learning-note-like-border-alpha: .65;
}

html[data-kajero-theme="console"] input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="image"]),
html[data-kajero-theme="console"] :is(textarea, select),
html[data-kajero-theme="console"] :is(#learningNoteModal, #editLearningNoteModal) .learning-note-editor-fields :is(input[type="text"], input[type="password"], select, textarea) {
  color: var(--console-text);
  background: var(--console-input);
  border-color: var(--console-control-line);
  border-radius: 7px;
  box-shadow: none;
  caret-color: var(--console-accent);
}
html[data-kajero-theme="console"] :is(input, textarea)::placeholder {
  color: var(--console-dim);
  opacity: 1;
}
html[data-kajero-theme="console"] :is(input[type="checkbox"], input[type="radio"]) {
  accent-color: #8db79c;
}
html[data-kajero-theme="console"] :is(.kajero-theme-label, .kajero-theme-setting) {
  color: var(--console-muted);
}
html[data-kajero-theme="console"] .kajero-theme-select {
  color: var(--console-text);
  background: var(--console-input);
  border-color: var(--console-control-line);
  border-radius: 6px;
}

/* Dialog fields and actions keep their existing scroll / sticky behavior. */
html[data-kajero-theme="console"] .modal { background: rgb(0 0 0 / .62); }
html[data-kajero-theme="console"] :is(dialog, .kajero-tag-dialog)::backdrop { background: rgb(0 0 0 / .62); }
html[data-kajero-theme="console"] .kajero-tag-dialog { border-radius: 10px; }
html[data-kajero-theme="console"] .kajero-tag-header { background: var(--console-raised); }
html[data-kajero-theme="console"] .kajero-tag-summary { background: #202a24; }
html[data-kajero-theme="console"] :is(#learningNoteModal, #editLearningNoteModal) .learning-note-editor-actions {
  background: var(--console-raised);
}
html[data-kajero-theme="console"] :is(#learningNoteModal, #editLearningNoteModal) .learning-note-editor-actions :is(button, input[type="submit"]) {
  background: #29352d;
  color: var(--console-text);
  border-color: var(--console-control-line);
  border-radius: 7px;
}
html[data-kajero-theme="console"] :is(#learningNoteModal, #editLearningNoteModal) .learning-note-editor-feedback,
html[data-kajero-theme="console"] .kajero-tag-chip.is-unknown {
  background: var(--console-danger-bg);
  color: var(--console-danger);
  border-color: #8c5a64;
}
html[data-kajero-theme="console"] :is(.kajero-tag-status, .learning-note-useful-badge, .learning-note-detached-badge, .bookmark-ranking-count) {
  color: var(--console-warm);
  background: var(--console-warm-bg);
  border-color: var(--warm-line);
}

/* Tables and long explanatory content: dark cells, unchanged overflow regions. */
html[data-kajero-theme="console"] :is(
  .cjkvi-table, .km table, .entry__body table, .inner table,
  .tabelvortoj-table-wrap, .frazanalizo-text-pre, .parser-knowledge-chip
) {
  background: var(--console-surface);
  color: var(--console-text);
  border-color: var(--console-line);
}
html[data-kajero-theme="console"] :is(.cjkvi-table th, .km th, .entry__body th, .inner th) {
  color: var(--console-muted);
  background: var(--console-raised);
  border-color: var(--console-line);
}
html[data-kajero-theme="console"] :is(.cjkvi-table td, .km td, .entry__body td, .inner td) {
  border-color: var(--console-line);
}
html[data-kajero-theme="console"] :is(.learning-note-body, .info-page-section) { line-height: 1.8; }

/* Graph surfaces change; established edge/role hue families remain distinct. */
html[data-kajero-theme="console"] :is(
  .relation-map-graph-scroll, .frazanalizo-graph-scroll, .frazanalizo-diagram-svg,
  .frazanalizo-card, .relation-map-detail-section, .frazanalizo-token-details
) {
  background: var(--console-input);
  color: var(--console-text);
  border-color: var(--console-line);
}
html[data-kajero-theme="console"] .relation-map-node rect {
  fill: var(--console-raised); stroke: #607080; filter: none;
}
html[data-kajero-theme="console"] .relation-map-node text { fill: var(--console-text); }
html[data-kajero-theme="console"] .relation-map-node-subtitle { fill: var(--console-muted); }
html[data-kajero-theme="console"] .relation-map-node--center rect { fill: #294735; stroke: #80aa8d; }
html[data-kajero-theme="console"] .relation-map-node--origin rect { fill: #303048; stroke: #9798c4; }
html[data-kajero-theme="console"] .relation-map-node--root rect { fill: #243a2c; stroke: #80aa8d; }
html[data-kajero-theme="console"] .relation-map-node--derived rect { fill: #3a3022; stroke: #c5a575; }
html[data-kajero-theme="console"] .relation-map-node--related rect { fill: #372b40; stroke: #b08bc0; }
html[data-kajero-theme="console"] .relation-map-node--nearby rect { fill: #25344a; stroke: #89a6cf; }
html[data-kajero-theme="console"] .relation-map-node--tag rect { fill: #243741; stroke: #8bb9ca; }
html[data-kajero-theme="console"] .relation-map-node--translation rect { fill: #3b2b36; stroke: #c498b0; }
html[data-kajero-theme="console"] .relation-map-node-link:focus-visible .relation-map-node rect { stroke: #d9e5dd; }

html[data-kajero-theme="console"] .parse-node > rect { fill: #252c34; stroke: #718092; filter: none; }
html[data-kajero-theme="console"] .parse-node.role-subj > rect { fill: #26394c; stroke: #8aadd2; }
html[data-kajero-theme="console"] .parse-node.role-obj > rect { fill: #413522; stroke: #d3b17d; }
html[data-kajero-theme="console"] .parse-node.role-pred > rect { fill: #342d48; stroke: #b19dd3; }
html[data-kajero-theme="console"] :is(.parse-node.role-advl, .parse-node.role-verb) > rect { fill: #243e2e; stroke: #92b79b; }
html[data-kajero-theme="console"] .parse-node.role-mod > rect { fill: #3d3a23; stroke: #c4ba80; }
html[data-kajero-theme="console"] :is(.parse-node.role-clause, .parse-node.role-inf) > rect { fill: #243d43; stroke: #8bbcc3; }
html[data-kajero-theme="console"] .parse-node.role-conj > rect { fill: #402c32; stroke: #c792a0; }
html[data-kajero-theme="console"] :is(.parse-node-word, .parse-node-role) { fill: var(--console-text); }
html[data-kajero-theme="console"] .parse-node-translation { fill: #c0cad4; }
html[data-kajero-theme="console"] .parse-punctuation-marker { fill: #a8b2c1; stroke: var(--console-input); }
html[data-kajero-theme="console"] .dependency-edge { stroke: #8f9baa; }
html[data-kajero-theme="console"] :is(.dependency-edge.is-selected, .dependency-edge.is-related) { stroke: #d0e5d7; }
html[data-kajero-theme="console"] .diagram-word-shape { filter: none; }
html[data-kajero-theme="console"] :is(.diagram-kind-verb .diagram-word-shape, .diagram-quality-cordicle .diagram-quality-shape) { fill: #31546b; stroke: #9fc4d8; }
html[data-kajero-theme="console"] :is(.diagram-kind-officium .diagram-word-shape, .diagram-kind-relation .diagram-word-shape, .parse-node.diagram-kind-pphead > .diagram-word-shape, .diagram-quality-relation .diagram-quality-shape) { fill: #5b4327; stroke: #d8bb8d; }
html[data-kajero-theme="console"] :is(.diagram-kind-qualis .diagram-word-shape, .diagram-quality-qualis .diagram-quality-shape, .diagram-quality-modificant .diagram-quality-shape) { fill: #355133; stroke: #afc99d; }
html[data-kajero-theme="console"] .diagram-kind-clause .diagram-word-shape { fill: #53385b; stroke: #c9aad1; }
html[data-kajero-theme="console"] :is(.diagram-kind-connector .diagram-word-shape, .diagram-kind-function .diagram-word-shape, .parse-node.diagram-kind-ppobject > .diagram-word-shape, .diagram-quality-officium .diagram-quality-shape, .diagram-quality-connector .diagram-quality-shape, .diagram-quality-function .diagram-quality-shape) { fill: #583c4a; stroke: #d5aebf; }
html[data-kajero-theme="console"] .diagram-node .parse-node-word { fill: #f0f3f5; stroke: none; }
html[data-kajero-theme="console"] .diagram-node .parse-node-translation { fill: #d2d9e1; }
html[data-kajero-theme="console"] .diagram-root text { stroke: var(--console-input); }
html[data-kajero-theme="console"] :is(.frazanalizo-mode.is-active, .frazanalizo-candidate-button.is-active) {
  color: #e7f4ec; background: var(--console-selected); border-color: var(--console-selected-line);
}

/* Account, moderation and proposal pages also share this optional theme. */
html[data-kajero-theme="console"] :is(
  .my-page-author-form, .my-page-account, .kajero-sync-panel,
  .translation-proposal-my-page-link, .translation-proposal-item,
  .admin-active-panel, .admin-utr-entry, .admin-utr-entry--add
) {
  color: var(--console-text);
  background: var(--console-raised);
  border-color: var(--console-line);
  box-shadow: none;
}
html[data-kajero-theme="console"] :is(
  .my-page-author-form label, .my-page-account strong, .kajero-account-links a,
  .translation-proposal-item-head strong, .admin-utr-entry label,
  .admin-utr-entry summary, .admin-utr-entry[open] > summary
) { color: var(--console-text); background-color: transparent; }
html[data-kajero-theme="console"] .translation-proposal-message,
html[data-kajero-theme="console"] .translation-proposal-status {
  color: var(--console-blue);
  background: var(--console-blue-bg);
  border-color: var(--cool-line);
}
html[data-kajero-theme="console"] .status-approved .translation-proposal-status,
html[data-kajero-theme="console"] .admin-useful-learning-note {
  background: #23382b; border-color: #45614e; color: #b6d9c1;
}
html[data-kajero-theme="console"] :is(.status-rejected, .status-withdrawn) .translation-proposal-status {
  color: var(--console-muted);
  background: #2c3038;
  border-color: var(--console-line);
}
html[data-kajero-theme="console"] :is(
  .admin-utr-danger, .admin-utr-message--error, .admin-shutdown-button,
  .admin-hide-comment, .admin-hide-recording, .admin-hide-learning-note,
  .admin-delete-learning-note, .kajero-account-links a.is-destructive,
  .kajero-account-delete .is-destructive, .translation-proposal-admin-actions .is-destructive,
  .translation-proposal-withdraw .is-destructive
) {
  color: var(--console-danger);
  background: var(--console-danger-bg);
  border-color: #8c5a64;
}
html[data-kajero-theme="console"] :is(
  .my-page-author-form button, .translation-proposal-form button,
  .translation-proposal-admin-actions button:not(.is-destructive)
) {
  background: var(--console-selected);
  color: #e7f4ec;
  border-color: var(--console-selected-line);
}

/* Reading catalogue, directory results and popup lexical help. */
html[data-kajero-theme="console"] :is(
  .readings-intro, .readings-collection--featured, .reading-item, .reading-excerpt,
  .reading-level, .reading-tag, .partial-match-item, .search-mode-result table,
  .search-mode-similar .search-mode-result tbody > tr:has(> td),
  .search-mode-expression a, .info-page-kicker, .leghelpilo-legend > span,
  .leghelpilo-token-popover, .leghelpilo-token-popover .leghelpilo-token,
  .leghelpilo-token__morphemes .morpheme-parts, .leghelpilo-keyword-grid li,
  .leghelpilo-counter,
  .learning-note-kind-extra, .learning-note-target-chip,
  .leghelpilo-page-link, .relation-map-details-toggle,
  .verb-form-summary, .verb-form-summary__ending
) {
  color: var(--console-text);
  background: var(--console-raised);
  border-color: var(--console-line);
  box-shadow: none;
}
html[data-kajero-theme="console"] :is(
  .reading-item__head h3, .reading-goal, .reading-meta dd, .reading-open,
  .search-mode-result td:first-child, .learning-note-target-chip span
) { color: var(--console-text); }
html[data-kajero-theme="console"] :is(
  .search-mode-operator, .search-mode-hint, .leghelpilo-token__translation,
  .leghelpilo-token__kana, .leghelpilo-token__pronunciation,
  .leghelpilo-page-status, .leghelpilo-counter
) { color: var(--console-muted); }
html[data-kajero-theme="console"] .leghelpilo-note .eo {
  color: #b6d9c1;
  background: #23382b;
  border-color: #658c70;
}
html[data-kajero-theme="console"] .leghelpilo-note :is(.ja, .zh) {
  color: #e4bdc9;
  background: #38282d;
  border-color: #947280;
}
html[data-kajero-theme="console"] :is(
  .learning-note-hidden-recent-badge, .learning-note-leghelpilo-link,
  .admin-utr-count, .translation-proposal-counts, .translation-proposal-time,
  .translation-proposal-pagination
) { color: var(--console-muted); }
html[data-kajero-theme="console"] .admin-utr-message--success {
  color: #b6d9c1;
  background: #23382b;
}
html[data-kajero-theme="console"] .learning-note-error {
  color: var(--console-danger);
  background: var(--console-danger-bg);
  border-color: #8c5a64;
}
html[data-kajero-theme="console"] :is(
  .tabelvortoj-table caption, .tabelvortoj-table td,
  .tabelvortoj-table tbody tr:nth-child(even) td
) {
  color: var(--console-text);
  background: var(--console-raised);
  border-color: var(--console-line);
}

/* Grammar detail drawers, neutral SVG labels and relation legend hue families. */
html[data-kajero-theme="console"] :is(.frazanalizo-toolbar, .frazanalizo-node-panel, .frazanalizo-status) {
  color: var(--console-text);
  background: var(--console-raised);
  border-color: var(--console-line);
}
html[data-kajero-theme="console"] .diagram-kind-punct .diagram-word-shape {
  fill: #343b46; stroke: #8d98a8;
}
html[data-kajero-theme="console"] .diagram-role-tag rect { fill: #2c3340; stroke: #66707f; }
html[data-kajero-theme="console"] .diagram-role-tag text { fill: var(--console-text); }
html[data-kajero-theme="console"] .relation-map :is(.relation-map-legend-chip, .relation-map-pill) {
  color: var(--console-text);
  background: var(--console-raised);
  border-color: var(--console-line);
}
html[data-kajero-theme="console"] .relation-map :is(.relation-map-legend-chip--origin, .relation-map-pill--origin) {
  color: #c5c3e3; background: #303048; border-color: #797ba8;
}
html[data-kajero-theme="console"] .relation-map :is(.relation-map-legend-chip--root, .relation-map-pill--root) {
  color: #b6d9c1; background: #243a2c; border-color: #658c70;
}
html[data-kajero-theme="console"] .relation-map :is(.relation-map-legend-chip--derived, .relation-map-pill--derived) {
  color: #e0c593; background: #3a3022; border-color: #a58a5d;
}
html[data-kajero-theme="console"] .relation-map :is(.relation-map-legend-chip--related, .relation-map-pill--related) {
  color: #d5bde0; background: #372b40; border-color: #9475a2;
}
html[data-kajero-theme="console"] .relation-map :is(.relation-map-legend-chip--nearby, .relation-map-pill--nearby) {
  color: #bdd1eb; background: #25344a; border-color: #7491b9;
}
html[data-kajero-theme="console"] .relation-map :is(.relation-map-legend-chip--tag, .relation-map-pill--tag) {
  color: #b6d9e4; background: #243741; border-color: #719dac;
}
html[data-kajero-theme="console"] .relation-map :is(.relation-map-legend-chip--translation, .relation-map-pill--translation) {
  color: #e2c1d2; background: #3b2b36; border-color: #a47d92;
}

/* Course panels are named explicitly; state colors and interactive geometry remain. */
html[data-kajero-theme="console"] .esperanto-course-page { color: var(--console-text); }
html[data-kajero-theme="console"] .esperanto-course-page :is(
  h1, h2, h3, h4, h5, p, li, dt, dd, label, summary, legend, strong, caption
) { color: var(--console-text); }
html[data-kajero-theme="console"] :is(
  .esperanto-course-overview, .esperanto-course-unit, .esperanto-course-lesson,
  .esperanto-course-block, .esperanto-course-gateway, .esperanto-course-progress,
  .esperanto-course-eyebrow, .esperanto-course-gateway-link, .esperanto-course-preparation,
  .esperanto-course-block--optional, .esperanto-course-block--pronunciation,
  .esperanto-course-block--reading, .esperanto-course-block--tip, .esperanto-course-words,
  .esperanto-course-self-recording, .esperanto-course-example, .esperanto-course-word,
  .esperanto-course-word a,
  .esperanto-course-tool-links a, .esperanto-course-actions a,
  .esperanto-course-practical-stage, .esperanto-course-practical-chapter,
  .esperanto-course-join-check, .esperanto-course-activity,
  .esperanto-course-activity__choices label, .esperanto-course-interaction,
  .esperanto-course-interaction__response, .esperanto-course-evidence > *,
  .esperanto-course-guided-composition, .esperanto-course-guided-composition__draft,
  .esperanto-course-writing-support, .esperanto-course-alternating,
  .esperanto-course-guided-composition__self-check, .esperanto-course-artifact--draft-reuse,
  .esperanto-course-writing-support [data-course-writing-support-panel],
  .esperanto-course-writing-support__words li, .esperanto-course-guided-composition__recording,
  .esperanto-course-alternating [data-course-alternating-reference],
  .esperanto-course-relay-composition, .esperanto-course-relay-composition__facts,
  .esperanto-course-relay-composition__listening, .esperanto-course-relay-fact,
  .esperanto-course-relay-fact label, .esperanto-course-artifact--relay-note,
  .esperanto-course-listening-pending, .esperanto-course-schedule,
  .esperanto-course-schedule thead th, .esperanto-course-schedule tbody,
  .esperanto-course-schedule tbody tr, .esperanto-course-integrated-mission,
  .esperanto-course-integrated-mission__header [data-course-mission-notes],
  .esperanto-course-mission-task__note, .esperanto-course-mission-optional,
  .esperanto-course-mission-more, .esperanto-course-integrated-mission__contract,
  .esperanto-course-mission-steps li, .esperanto-course-mission-resume,
  .esperanto-course-mission-part, .esperanto-course-mission-task,
  .esperanto-course-mission-task fieldset, .esperanto-course-mission-task li > label,
  .esperanto-course-mission-repair, .esperanto-course-mission-task--speaking,
  .esperanto-course-mission-part__footer, .esperanto-course-mission-finish,
  .esperanto-course-mission-translation
) {
  color: var(--console-text);
  background: var(--console-raised);
  border-color: var(--console-line);
  box-shadow: none;
}
html[data-kajero-theme="console"] #course-routes [data-course-route-select],
html[data-kajero-theme="console"] .esperanto-course-page :is(
  .esperanto-course-recorder button, .esperanto-course-listening-pending button,
  .esperanto-course-guided-composition__draft-meta button,
  .esperanto-course-join-actions button, .esperanto-course-join-actions a,
  button[data-course-practical-complete], button[data-course-retention-confirm],
  button[data-course-record-evidence]
) {
  color: var(--console-text);
  background: var(--console-raised);
  border-color: var(--console-control-line);
  box-shadow: none;
}
html[data-kajero-theme="console"] #course-routes [data-course-route-select]:hover,
html[data-kajero-theme="console"] .esperanto-course-word a:hover,
html[data-kajero-theme="console"] .esperanto-course-page :is(
  .esperanto-course-recorder button, .esperanto-course-listening-pending button,
  .esperanto-course-guided-composition__draft-meta button,
  .esperanto-course-join-actions button, .esperanto-course-join-actions a,
  button[data-course-practical-complete], button[data-course-retention-confirm],
  button[data-course-record-evidence]
):hover {
  color: #f0f3f5;
  background: var(--console-hover);
  border-color: var(--console-selected-line);
}
html[data-kajero-theme="console"] .esperanto-course-page :is(
  [data-course-practice-choice], [data-course-activity-choice], [data-course-time-choice],
  [data-course-interaction-choice], [data-course-answer]
) {
  color: var(--console-text);
  background: var(--console-input);
  border-color: var(--console-control-line);
}
html[data-kajero-theme="console"] .esperanto-course-page :is(
  [data-course-practice-choice], [data-course-activity-choice], [data-course-time-choice],
  [data-course-interaction-choice]
):hover {
  color: #f0f3f5;
  background: var(--console-hover);
}
html[data-kajero-theme="console"] .esperanto-course-page [data-course-practice-choice][aria-pressed="true"],
html[data-kajero-theme="console"] .esperanto-course-page button[data-course-practical-complete][aria-pressed="true"],
html[data-kajero-theme="console"] .esperanto-course-page button[data-course-retention-confirm][aria-pressed="true"],
html[data-kajero-theme="console"] .esperanto-course-page button[data-course-record-evidence][aria-pressed="true"],
html[data-kajero-theme="console"] .esperanto-course-map [data-course-lesson-id].is-current,
html[data-kajero-theme="console"] .esperanto-course-map [data-course-lesson-id][aria-current="page"],
html[data-kajero-theme="console"] #course-routes .esperanto-course-route.is-selected,
html[data-kajero-theme="console"] #course-routes [data-course-route-select].is-selected {
  color: #e7f4ec;
  background: var(--console-selected);
  border-color: var(--console-selected-line);
}
html[data-kajero-theme="console"] .esperanto-course-page [data-course-practice-choice].is-correct,
html[data-kajero-theme="console"] .esperanto-course-gateway.is-checked [data-course-answer].is-correct,
html[data-kajero-theme="console"] .esperanto-course-mission-task li > label:has(input:checked),
html[data-kajero-theme="console"] .esperanto-course-evidence [data-course-evidence-status="confirmed"],
html[data-kajero-theme="console"] .esperanto-course-evidence [data-course-evidence-status="確認済み"],
html[data-kajero-theme="console"] .esperanto-course-relay-fact [data-course-relay-fact-state="correct"] {
  color: #b6d9c1;
  background: #23382b;
  border-color: #658c70;
}
html[data-kajero-theme="console"] .esperanto-course-page [data-course-practice-choice].is-wrong,
html[data-kajero-theme="console"] .esperanto-course-gateway.is-checked [data-course-answer].is-wrong,
html[data-kajero-theme="console"] .esperanto-course-page [data-course-save-status][data-course-save-state="error"] {
  color: var(--console-danger);
  background: var(--console-danger-bg);
  border-color: #8c5a64;
}
html[data-kajero-theme="console"] .esperanto-course-evidence [data-course-evidence-status="supported"],
html[data-kajero-theme="console"] .esperanto-course-evidence [data-course-evidence-status="支援ありで確認"],
html[data-kajero-theme="console"] .esperanto-course-evidence [data-course-evidence-status="alternative-unconfirmed"],
html[data-kajero-theme="console"] .esperanto-course-evidence [data-course-evidence-status="代替経路で完了・未確認"] {
  color: var(--console-warm);
  background: var(--console-warm-bg);
  border-color: var(--warm-line);
}
html[data-kajero-theme="console"] :is(
  .esperanto-course-guided-composition__complete:has(input:disabled),
  .esperanto-course-mission-part__footer:has(input:disabled),
  .esperanto-course-mission-finish:has(input:disabled)
) {
  color: var(--console-muted);
  background: var(--console-input);
  border-color: var(--console-line);
}
html[data-kajero-theme="console"] .esperanto-course-progress__bar { background: #34433a; }
html[data-kajero-theme="console"] .esperanto-course-page :is(
  .esperanto-course-lead, .esperanto-course-objective, .esperanto-course-model-audio,
  .esperanto-course-public-audio-note, .esperanto-course-public-audio-empty,
  .esperanto-course-compact-audio, .esperanto-course-evidence-note,
  .esperanto-course-save-status, .esperanto-course-alternating__availability
) { color: var(--console-muted); }
html[data-kajero-theme="console"] :is(
  .esperanto-course-relay-composition__draft > h4 > span,
  .esperanto-course-relay-composition__self-check legend > span,
  .esperanto-course-schedule__companion, .esperanto-course-mission-part__status
) { color: var(--console-blue); }
html[data-kajero-theme="console"] .esperanto-course-input-sample[data-course-input-sample] > [lang="eo"] {
  color: var(--console-text);
  background: var(--console-raised);
  border-color: var(--console-line);
}

/* Calendar header rows also paint between cells; retain Ganto's resolved palette. */
html[data-kajero-theme="console"] #ganto-kadro .ganto-tabelo thead tr.ganto-month-row,
html[data-kajero-theme="console"] #ganto-kadro .ganto-month-row > :is(th, td) {
  color: var(--console-text);
  background-color: var(--month-header-bg, #303030);
}
html[data-kajero-theme="console"] #ganto-kadro .ganto-tabelo thead tr.ganto-week-row,
html[data-kajero-theme="console"] #ganto-kadro .ganto-week-row > :is(th, td) {
  color: var(--console-text);
  background-color: var(--week-header-bg, #2b2b2b);
}
html[data-kajero-theme="console"] #ganto-kadro .ganto-tabelo thead tr.ganto-weekday-row,
html[data-kajero-theme="console"] #ganto-kadro .ganto-weekday-row > :is(th, td) {
  color: var(--console-text);
  background-color: var(--weekday-header-bg, #2c2c2c);
}
html[data-kajero-theme="console"] #ganto-kadro .ganto-tabelo thead tr.ganto-date-row,
html[data-kajero-theme="console"] #ganto-kadro .ganto-date-row > :is(th, td) {
  color: var(--console-text);
  background-color: var(--date-header-bg, #252525);
}
html[data-kajero-theme="console"] #ganto-kadro .ganto-tabelo th.ganto-sunday-header:not(.ganto-today-header):not(.ganto-current-week-header) {
  color: var(--sunday-header-color, #ff8a80);
}
html[data-kajero-theme="console"] #ganto-kadro .ganto-tabelo th.ganto-today-header,
html[data-kajero-theme="console"] #ganto-kadro .ganto-tabelo.ganto-year-view th.ganto-current-week-header {
  color: var(--page-bg, #101216);
  background-color: var(--text-color, #e5e7eb) !important;
}

/* Existing responsive list wrapping and hidden/expanded states stay intact. */
@media (max-width: 640px) {
  html[data-kajero-theme="console"] :is(.card, .entry-panel > .word-card, .entry > .word-card) { padding: 12px; }
  html[data-kajero-theme="console"] :is(.entry__head .headword, .lemma) {
    font-size: min(var(--headword-fit-size, 2rem), 2rem);
  }
  html[data-kajero-theme="console"] :is(.entry-tabs__panels, .entry-tabs .entry-panel) { gap: 12px; }
  html[data-kajero-theme="console"] :is(.entry-tab, .entry-secondary-tab, .hero-action-button, .structure-branch-toggle, .kajero-tag-actions button) { min-height: 44px; }
  html[data-kajero-theme="console"] .pronunciation-widget button { width: 44px; height: 44px; }
  html[data-kajero-theme="console"] .pronunciation-synthesis .pronunciation-synthesize { min-height: 44px; }
  html[data-kajero-theme="console"] .star-check { min-height: 44px; }
  html[data-kajero-theme="console"] :is(
    .pager-link, .kajero-theme-select, .relation-map-zoom-button,
    .relation-map-zoom-reset, .frazanalizo-zoom-button, .frazanalizo-zoom-reset
  ) { min-width: 44px; min-height: 44px; }
  html[data-kajero-theme="console"] :is(input[type="text"], input[type="search"], input[type="password"], textarea, select) { font-size: 16px; }
  html[data-kajero-theme="console"] .kajero-tag-term { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html[data-kajero-theme="console"] :is(button, a, input, select, textarea) { transition: none; }
}

@media print {
  html[data-kajero-theme="console"] {
    color-scheme: light;
    --console-bg: #fff;
    --console-surface: #fff;
    --console-raised: #f2f2f2;
    --console-text: #202020;
    --console-muted: #505050;
    --console-line: #c5c5c5;
    --console-control-line: #888;
    --shadow: none;
  }
}

/* Complete the confirmed Console component states without changing geometry. */
@media screen {
  html[data-kajero-theme="console"] .kajero-tag-dialog button:not(.kajero-tag-search):focus-visible {
    background: var(--console-hover);
    color: var(--console-text);
  }

  html[data-kajero-theme="console"] .root-search-results > p,
  html[data-kajero-theme="console"] .root-search-results > h2 {
    background: var(--console-raised);
    color: var(--console-text);
    border-color: var(--console-line);
  }
  html[data-kajero-theme="console"] .root-search-results > p {
    color: var(--console-muted);
  }

  html[data-kajero-theme="console"] .detail-card .morpheme-parts {
    background: var(--console-raised);
    color: var(--console-text);
    border-color: var(--console-line);
  }
  html[data-kajero-theme="console"] .morpheme-parts a.morpheme-form,
  html[data-kajero-theme="console"] .leghelpilo-token__morphemes a.morpheme-form {
    color: var(--console-accent);
  }
  html[data-kajero-theme="console"] .morpheme-parts a.morpheme-form:visited,
  html[data-kajero-theme="console"] .leghelpilo-token__morphemes a.morpheme-form:visited {
    color: var(--link-visited);
  }
  html[data-kajero-theme="console"] .morpheme-parts a.morpheme-form:is(:hover, :focus-visible),
  html[data-kajero-theme="console"] .leghelpilo-token__morphemes a.morpheme-form:is(:hover, :focus-visible) {
    color: #d2ebdc;
  }

  /* Only these four legacy quiz producers use this questions/result structure.
     The background and score text are inline, so only those two need priority. */
  html[data-kajero-theme="console"] .info-page-card .info-page-section #questions ~ #result {
    background-color: var(--console-raised) !important;
    color: var(--console-text);
  }
  html[data-kajero-theme="console"] .info-page-card .info-page-section #questions ~ #result > h2 > span {
    color: var(--console-blue) !important;
  }
}
