/* OhGeekz optional dark palette — light theme stays entirely unchanged. */
/* Scope all visual overrides to the saved dark state of the HTML element. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171d25;
  --bg-4: #212a35;
  --tt: #eef2f6;
  --tt-3: #aab9c9;
  --bdc: rgba(230, 239, 248, .19);
  --bsh: 0 10px 30px rgba(0, 0, 0, .4);
  --ui-bg: #222c37;
  --ui-bg-darker: #1a232d;
  --ui-bg-darkest: #354353;
  --ui-bdc: #445363;
}

/* Same header, layout and orange highlights in both themes. */
.og-theme-switch {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 7px;
  line-height: 1;
  cursor: pointer;
}
.og-theme-switch:hover, .og-theme-switch:focus-visible {
  background: transparent;
  border-color: #f7941e;
  color: #f7941e;
}
.og-theme-switch:focus-visible { outline: 2px solid #f7941e; outline-offset: 2px; }
.og-theme-icon { display: block; pointer-events: none; }
.og-theme-icon--sun { display: none; }
:root[data-theme="dark"] .og-theme-icon--moon { display: none; }
:root[data-theme="dark"] .og-theme-icon--sun { display: block; }
@media (max-width: 767px) {
  .og-theme-switch { flex-basis: 38px; width: 38px; height: 38px; margin: 0 2px; }
}

/* Text/content. The original CSS declares some grey values directly. */
:root[data-theme="dark"] .desc,
:root[data-theme="dark"] .full-text { color: #d0d9e3; }
:root[data-theme="dark"] .full-text a { color: #8bc4ff; }
:root[data-theme="dark"] .full-text a:hover { color: #b0d8ff; }
:root[data-theme="dark"] .speedbar { color: #b8c5d3; }
:root[data-theme="dark"] .page__title,
:root[data-theme="dark"] .sect__subtitle { color: var(--tt); }

/* Text input surfaces and the DLE form/dialogue components. */
:root[data-theme="dark"] input[type="text"],
:root[data-theme="dark"] input[type="password"],
:root[data-theme="dark"] input[type="email"],
:root[data-theme="dark"] input[type="number"],
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] .quick-edit-textarea {
  background-color: #263241;
  color: #f0f4f8;
  box-shadow: inset 0 0 0 1px #485869;
}
:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder { color: #a9b8c6; opacity: 1; }
:root[data-theme="dark"] select option { color: #f0f4f8; background: #263241; }
:root[data-theme="dark"] fieldset,
:root[data-theme="dark"] #searchtable fieldset { border-color: #485869; }
:root[data-theme="dark"] fieldset legend { color: #bbc7d3; }
:root[data-theme="dark"] .form__caption--above { background-color: #354252; }
:root[data-theme="dark"] .usp__list li > span:first-child,
:root[data-theme="dark"] .xfieldsnote { color: #aab9c9; }

/* Existing full-story text tables and formatted post blocks. */
:root[data-theme="dark"] .full-text table tr:nth-child(2n+1) { background-color: #25313d; }
:root[data-theme="dark"] .full-text table tr:first-child { background-color: #344557; }
:root[data-theme="dark"] .full-text table tr td { border-color: #171d25; }
:root[data-theme="dark"] .scriptcode,
:root[data-theme="dark"] .title_spoiler,
:root[data-theme="dark"] .text_spoiler,
:root[data-theme="dark"] .hide { background-color: #293644; border-color: #465666; color: #e5ebf2; }
:root[data-theme="dark"] .inhide { background-color: #212a35; border-color: #465666; }
:root[data-theme="dark"] .title_quote,
:root[data-theme="dark"] .quote { background-color: #30343b; color: #e4d6c0; }
:root[data-theme="dark"] .message-info { background-color: #4d3926; color: #f5e7c7; border-color: #8f632b; }
:root[data-theme="dark"] .message-info a { color: #fff0cf; }

/* Tag/model directory: keep existing grid, cards and filter controls. */
:root[data-theme="dark"] .tags-page .model-card { background-color: #202934; border-color: #435161; }
:root[data-theme="dark"] .tags-page .model-card:hover { border-color: #8494a7; }
:root[data-theme="dark"] .tags-page .model-card__image { background-color: #303a47; }
:root[data-theme="dark"] .models-alpha__item,
:root[data-theme="dark"] .models-sort__item { border-color: #445465; }
:root[data-theme="dark"] .models-alpha__item:hover,
:root[data-theme="dark"] .models-alpha__item.is-active { border-color: #f7941e; }

/* Home page A–Z button, A–Z static page and page-number jump. */
:root[data-theme="dark"] .home-browse-az a {
  background: #263241;
  color: #f0f4f8;
  border-color: #ce7730;
}
:root[data-theme="dark"] .home-browse-az a:hover { background: #364353; }
:root[data-theme="dark"] .az-browser__letters a {
  background: #263241;
  color: #f0f4f8;
  border-color: #475566;
}
:root[data-theme="dark"] .az-browser__letters a:hover {
  background: #364353;
  color: #fff;
  border-color: #f7941e;
}
:root[data-theme="dark"] .ohg-jump__panel {
  background: #232e3a;
  color: #f0f4f8;
  border-color: #556577;
}
:root[data-theme="dark"] .ohg-jump__controls input {
  background: #303e4e;
  color: #fff;
  border-color: #586a7d;
}

/* DLE search, suggestions, comment tools and popup menus. */
:root[data-theme="dark"] #searchsuggestions span.searchheading + span,
:root[data-theme="dark"] .ac-result-empty { color: #aab9c9; }
:root[data-theme="dark"] .ui-menu,
:root[data-theme="dark"] .bb-pane-dropdown,
:root[data-theme="dark"] .commentsreplyname,
:root[data-theme="dark"] .uploadedfile,
:root[data-theme="dark"] .file-box { background: #26313d; color: #eef2f6; border-color: #485969; }
:root[data-theme="dark"] .bb-pane-dropdown > li > a { color: #ecf1f7; }
:root[data-theme="dark"] .bb-pane-dropdown > li > a:hover { color: #fff; background: #374554; }
:root[data-theme="dark"] .bb-btn { color: #e2e9f1; }
:root[data-theme="dark"] #dlefastreplycomments { background: #26313d; }
:root[data-theme="dark"] .page__comments { color: var(--tt); }
:root[data-theme="dark"] .login__row { color: #c3cfdb; }

/* AJAX catalog loads its own light CSS within the content after main.tpl. */
:root[data-theme="dark"] .ajax-catalog,
:root[data-theme="dark"] .ac-result,
:root[data-theme="dark"] .ac-rebuild-wrapper { background: #222c37; color: #edf2f7; }
:root[data-theme="dark"] .ac-catalog li a,
:root[data-theme="dark"] .ac-result-list li a { color: #e6edf5; }
:root[data-theme="dark"] .ac-catalog li a.active,
:root[data-theme="dark"] .ac-catalog li a:hover { background: #303d4a; }
:root[data-theme="dark"] .ac-result-list li a:hover { color: #fff; }
:root[data-theme="dark"] .ac-settings-list li:nth-child(2n),
:root[data-theme="dark"] .ac-sort li:hover { background: #303c4a; }
:root[data-theme="dark"] .ac-settings-list-title,
:root[data-theme="dark"] .ac-settings-list-title strong { color: #e4ebf3; }
:root[data-theme="dark"] .ac-item-cover { background-color: #354251; }
:root[data-theme="dark"] .ac-rebuild-progress-help:after { background: #45515e; }
:root[data-theme="dark"] .ac-rebuild-progress { background: #354251; }
:root[data-theme="dark"] ul.ac-result-list::-webkit-scrollbar-track { background: #283440; }
:root[data-theme="dark"] ul.ac-result-list::-webkit-scrollbar-thumb { background: #526274; }
:root[data-theme="dark"] input.ac-settings-input,
:root[data-theme="dark"] select.ac-settings-input {
  background: #283544;
  color: #eef2f6;
  border-color: #546477;
}

/* Keep embedded video players, advertisements and model images intact. */
