/* =====================================================================
   DROPGAME — ТЁМНАЯ ТЕМА (подключается после style2.css)
   Правила Material Design (dark theme):
   • база #121212, не чистый чёрный; глубина — светлее поверхность (белая подсветка 5–16 %), а не тени;
   • текст: основной — белый 87 %, второстепенный — 60 %, неактивный — 38 %; разделители — белый 12 %;
   • акценты на тёмном — приглушённые светлые тона (уровень 200), насыщенный цвет только на кнопках;
   • фирменный цвет на больших поверхностях — наложением ~8 %.
   Включается атрибутом html[data-theme="dark"] (ставит скрипт в <head> до отрисовки — без вспышки).
   Блок «авто» ниже собран из style2.css: каждое светлое правило заменено на поверхность нужного уровня.
   ===================================================================== */
html[data-theme="dark"] {
	color-scheme: dark;
	--dk-bg: #121212;                 /* 0dp — фон страницы */
	--dk-surface: #1e1e1e;            /* 1dp (белый 5 %) — карточки, блоки */
	--dk-surface-2: #242424;          /* 3dp (8 %) — вложенные подложки */
	--dk-surface-3: #2c2c2c;          /* 8dp (12 %) — поля, чипы, плитки */
	--dk-raised: #333333;             /* 24dp (16 %) — меню, всплывающие окна */
	--dk-tint: #172a31;               /* поверхность + 8 % фирменного #00b7f1 */
	--dk-text: rgba(255, 255, 255, .87);
	--dk-text-2: rgba(255, 255, 255, .78);
	--dk-muted: rgba(255, 255, 255, .60);
	--dk-disabled: rgba(255, 255, 255, .38);
	--dk-border: rgba(255, 255, 255, .12);
	--dk-link: #81d4fa;               /* light blue 200 — вместо насыщенного #1b7490 */
	--dk-accent: #4fc3f7;
	/* переменные модулей */
	--ar-track: #2c2c2c;
	--ar-ink: rgba(255, 255, 255, .87);
	--ar-mut: rgba(255, 255, 255, .60);
	--ar-review-bg: #3a3122;
}
html[data-theme="dark"] body { background: var(--dk-bg) !important; color: var(--dk-text); }

/* ссылки в тексте */
html[data-theme="dark"] .full-news-text a:not([class]),
html[data-theme="dark"] .full-page-text a:not([class]),
html[data-theme="dark"] .art-text a:not([class]),
html[data-theme="dark"] .com-item-text a:not([class]) { color: var(--dk-link); }

/* поля ввода, редактор, таблицы */
html[data-theme="dark"] input:not([type=submit]):not([type=button]):not([type=checkbox]):not([type=radio]):not([type=range]),
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .bb-editor,
html[data-theme="dark"] .bb-pane,
html[data-theme="dark"] .wseditor { background-color: var(--dk-surface-3) !important; color: var(--dk-text) !important; border-color: var(--dk-border) !important; }
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color: var(--dk-disabled) !important; }
html[data-theme="dark"] table, html[data-theme="dark"] th, html[data-theme="dark"] td { border-color: var(--dk-border); }
html[data-theme="dark"] hr { border-color: var(--dk-border); background-color: var(--dk-border); }
html[data-theme="dark"] code, html[data-theme="dark"] pre { background-color: var(--dk-surface-3); color: var(--dk-text); }

/* шапка на телефоне: в main.tpl инлайн-тень белого цвета */
html[data-theme="dark"] .head-line[style*="box-shadow"] { box-shadow: 0 20px 20px 20px var(--dk-bg) !important; }

/* выпадающие меню, окна, уведомления — самая высокая поверхность */
html[data-theme="dark"] .lang-dd__list,
html[data-theme="dark"] .ui-dialog,
html[data-theme="dark"] .login-block,
html[data-theme="dark"] #DLEPush .DLEPush-notification,
html[data-theme="dark"] .mob-panel2 { background-color: var(--dk-raised) !important; color: var(--dk-text); }
html[data-theme="dark"] .ui-dialog .ui-dialog-titlebar, html[data-theme="dark"] .ui-dialog .ui-dialog-buttonpane { background: transparent !important; border-color: var(--dk-border) !important; color: var(--dk-text); }

/* картинки на тёмном чуть приглушаем, чтобы не «светили» (кроме иконок и обложек в шапках) */
html[data-theme="dark"] .full-news-text img, html[data-theme="dark"] .art-text img { filter: brightness(.92); }

/* тени на тёмном почти не видны — делаем их глубже, а не светлее */
html[data-theme="dark"] .main-news, html[data-theme="dark"] .apc, html[data-theme="dark"] .acard { box-shadow: none; }

/* плавная смена темы там, где нет View Transitions */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
	transition: background-color .45s ease, color .45s ease, border-color .45s ease, fill .45s ease !important;
}
/* круговое раскрытие новой темы (View Transitions API) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; }

/* ================= АВТО: из style2.css ================= */

/* вкладки «Файлы / Информация / Помощь»: цвет фона ставит скрипт шаблона инлайном — перекрываем */
html[data-theme="dark"] .dblock.blo4ki { background: var(--dk-surface) !important; }
html[data-theme="dark"] .dblock.blo4ki[data-active-tab="information"] { background: #262116 !important; }   /* тёплый оттенок, как светлый #fff9eb */
html[data-theme="dark"] .dblock.blo4ki[data-active-tab="help"] { background: var(--dk-tint) !important; }
html[data-theme="dark"] .dblock.blo4ki[data-active-tab="settings"] { background: #211c2b !important; }

/* значки шапки на телефоне (поиск, меню) на страницах без тёмной обложки — белые */
html[data-theme="dark"] .head-line .mob-search { filter: none; }
html[data-theme="dark"] .head-line .mob-menu { filter: invert(1); }
html[data-theme="dark"] #fulln .mob-menu { filter: none; }

/* заглушка рекламы «Загрузка»: анимация в style2.css мигает светлыми цветами — своя тёмная */
html[data-theme="dark"] .taki-odessa-block::before { animation-name: dgSkeletonDark; background: var(--dk-surface-3); color: var(--dk-disabled); }
@keyframes dgSkeletonDark { 0%, 100% { background-color: #2a2a2a; } 50% { background-color: #333333; } }
html[data-theme="dark"] .art-ad::before { background: var(--dk-raised); box-shadow: 0 0 0 1px var(--dk-border); color: var(--dk-muted); }
html[data-theme="dark"] body { color: var(--dk-text); }
html[data-theme="dark"] .search-block { background-color: var(--dk-surface); }
html[data-theme="dark"] .form-text::placeholder { color: var(--dk-muted); }
html[data-theme="dark"] .head-line { background-color: var(--dk-surface); }
html[data-theme="dark"] .logo { color: var(--dk-text); }
html[data-theme="dark"] .top-menu a { color: var(--dk-text-2); }
html[data-theme="dark"] .lang-dd__list { background-color: var(--dk-surface); border-color: var(--dk-border); }
html[data-theme="dark"] .lang-dd__item { color: var(--dk-text-2); }
html[data-theme="dark"] .lang-dd__item:hover, html[data-theme="dark"] .lang-dd__item:focus-visible { background-color: var(--dk-surface-2); color: var(--dk-text); }
html[data-theme="dark"] .lang-dd__item.is-active { background-color: var(--dk-tint); }
html[data-theme="dark"] .head-slider { background-color: var(--dk-surface); }
html[data-theme="dark"] .mtitle { color: var(--dk-text); }
html[data-theme="dark"] .best-line { background-color: var(--dk-surface); }
html[data-theme="dark"] .footer-wrap { background-color: var(--dk-surface); }
html[data-theme="dark"] .footer { color: var(--dk-text); }
html[data-theme="dark"] .footer-logo { color: var(--dk-text); }
html[data-theme="dark"] .footer-text a:hover { color: var(--dk-text); }
html[data-theme="dark"] .footer-menu a { color: var(--dk-text); }
html[data-theme="dark"] .category-menu-line { background-color: var(--dk-surface); }
html[data-theme="dark"] .category-menu a { color: var(--dk-text); }
html[data-theme="dark"] .main-news { background-color: var(--dk-surface); }
html[data-theme="dark"] .rel-link { background-color: var(--dk-surface); }
html[data-theme="dark"] .lazy-img { background-color: var(--dk-surface-3); }
html[data-theme="dark"] .main-news-title { color: var(--dk-text); }
html[data-theme="dark"] .form-text { color: var(--dk-text); }
html[data-theme="dark"] #searchsuggestions { background-color: var(--dk-surface); }
html[data-theme="dark"] #searchsuggestions a { color: var(--dk-muted); border-bottom-color: var(--dk-border); }
html[data-theme="dark"] #searchsuggestions a:hover { background-color: var(--dk-surface-3); }
html[data-theme="dark"] #searchsuggestions a span.searchheading { color: var(--dk-text); }
html[data-theme="dark"] #searchsuggestions span.notfound { color: var(--dk-muted); border-bottom-color: var(--dk-border); }
html[data-theme="dark"] .nav-pages > span { background-color: var(--dk-surface); color: var(--dk-text); }
html[data-theme="dark"] .navigation-k a:focus-visible { outline-color: var(--dk-border); }
html[data-theme="dark"] .full-news-stat { color: var(--dk-text); }
html[data-theme="dark"] .full-news-stat a { color: var(--dk-link); }
html[data-theme="dark"] .full-news-stat a:hover { color: var(--dk-text); }
html[data-theme="dark"] .blo4ki { background-color: var(--dk-surface); }
html[data-theme="dark"] .share .share-box>a { border-left-color: var(--dk-border); }
html[data-theme="dark"] .ftitle { color: var(--dk-text); }
html[data-theme="dark"] .fscrul > a { background-color: var(--dk-surface-3); }
html[data-theme="dark"] .frblock-title { color: var(--dk-text); }
html[data-theme="dark"] .dblock.blo4ki { background-color: var(--dk-surface); }
html[data-theme="dark"] .dblock.blo4ki[data-active-tab="information"] { background-color: var(--dk-surface-2); }
html[data-theme="dark"] .dblock.blo4ki[data-active-tab="help"] { background-color: var(--dk-tint); }
html[data-theme="dark"] .dblock.blo4ki[data-active-tab="settings"] { background-color: var(--dk-surface-2); }
html[data-theme="dark"] .switch > span.active { color: var(--dk-text); }
html[data-theme="dark"] .full-news-text a:hover { color: var(--dk-text); }
html[data-theme="dark"] .fnauth-links a { background-color: var(--dk-surface); color: var(--dk-text); }
html[data-theme="dark"] .title_spoiler a:last-child { color: var(--dk-text); }
html[data-theme="dark"] .title_spoiler svg { color: var(--dk-text-2); }
html[data-theme="dark"] .text_spoiler { background-color: var(--dk-surface); }
html[data-theme="dark"] details { border-left-color: var(--dk-border); }
html[data-theme="dark"] details > *:not(summary) { color: var(--dk-text-2); }
html[data-theme="dark"] .comments-block-title { color: var(--dk-text); }
html[data-theme="dark"] .com-item-author { color: var(--dk-text); }
html[data-theme="dark"] .com-item-author a { color: var(--dk-text); }
html[data-theme="dark"] .com-item-date { color: var(--dk-muted); }
html[data-theme="dark"] .comments-item-links a { color: var(--dk-link); }
html[data-theme="dark"] .comments-item-links a:hover { color: var(--dk-text); }
html[data-theme="dark"] .com-item .bbcodes { color: var(--dk-text); }
html[data-theme="dark"] .quote a { color: var(--dk-text); }
html[data-theme="dark"] .form-line-tt input { border-color: var(--dk-border); background-color: var(--dk-surface); color: var(--dk-text); }
html[data-theme="dark"] .form-line-tt select, html[data-theme="dark"] .search select { border-color: var(--dk-border); background-color: var(--dk-surface); color: var(--dk-text); }
html[data-theme="dark"] .form-line-tt textarea, html[data-theme="dark"] .form-line-tt .fr-view { border-color: var(--dk-border); background-color: var(--dk-surface); color: var(--dk-text) !important; }
html[data-theme="dark"] .dark .gray-theme.fr-box .fr-counter { color: var(--dk-text-2); }
html[data-theme="dark"] .dark .gray-theme.fr-toolbar { color: var(--dk-text-2); }
html[data-theme="dark"] .dark  .gray-theme.fr-toolbar .fr-command.fr-btn, html[data-theme="dark"] .gray-theme.fr-popup .fr-command.fr-btn { color: var(--dk-muted); }
html[data-theme="dark"] .ui-dialog { border-color: var(--dk-border); background-color: var(--dk-surface); color: var(--dk-text-2); }
html[data-theme="dark"] .ui-dialog-titlebar { border-bottom-color: var(--dk-border); }
html[data-theme="dark"] .ui-dialog-buttonset { background-color: var(--dk-surface-2); border-top-color: var(--dk-border); }
html[data-theme="dark"] .ui-dialog-buttonset button { background-color: var(--dk-surface-3); color: var(--dk-muted); }
html[data-theme="dark"] .user-card-tt-image { border-color: var(--dk-border); background-color: var(--dk-surface-3); }
html[data-theme="dark"] .user-card-tt-info-line { color: var(--dk-muted); }
html[data-theme="dark"] .user-card-tt-info-line span { color: var(--dk-text); }
html[data-theme="dark"] .login-wrap { background-color: var(--dk-surface); }
html[data-theme="dark"] .login-block-title { color: var(--dk-text); border-bottom-color: var(--dk-border); }
html[data-theme="dark"] .login-link a { color: var(--dk-muted); }
html[data-theme="dark"] .login-input-text { background-color: var(--dk-surface-2); border-color: var(--dk-border); color: var(--dk-text); }
html[data-theme="dark"] .login-input-text:placeholder { color: var(--dk-muted); }
html[data-theme="dark"] .reg-link a { color: var(--dk-text-2); }
html[data-theme="dark"] .stt-block { background-color: var(--dk-surface); }
html[data-theme="dark"] .stt-block-title { color: var(--dk-text); }
html[data-theme="dark"] .white .stt-block-title { color: var(--dk-text); }
html[data-theme="dark"] .stt-block-content { color: var(--dk-muted); }
html[data-theme="dark"] .pmtt-menu a { color: var(--dk-text-2); }
html[data-theme="dark"] .pmtt-menu a i { color: var(--dk-text-2); }
html[data-theme="dark"] .pmtt-new-title { border-bottom-color: var(--dk-border); }
html[data-theme="dark"] .pmtt-mess-title { border-bottom-color: var(--dk-border); }
html[data-theme="dark"] .pmtt-mess-theme { border-bottom-color: var(--dk-border); }
html[data-theme="dark"] .pmtt-mess-menu a { background: var(--dk-surface); background: var(--dk-surface); background: var(--dk-surface); background: var(--dk-surface); background: var(--dk-surface); background-color: var(--dk-surface); border-color: var(--dk-border); color: var(--dk-text-2); }
html[data-theme="dark"] .pmtt-mess-menu a:hover { background-color: var(--dk-surface-3); }
html[data-theme="dark"] .trating-title { color: var(--dk-text); }
html[data-theme="dark"] .bbcodes { background-color: var(--dk-surface); border-color: var(--dk-border); }
html[data-theme="dark"] .bbcodes_poll { background-color: var(--dk-surface); border-color: var(--dk-border); }
html[data-theme="dark"] #dropmenudiv { border-color: var(--dk-border); }
html[data-theme="dark"] #dropmenudiv a { border-color: var(--dk-border); }
html[data-theme="dark"] #dropmenudiv a:hover { background-color: var(--dk-surface-3); color: var(--dk-text); }
html[data-theme="dark"] #newpm { background-color: var(--dk-surface); }
html[data-theme="dark"] #newpmheader { color: var(--dk-text-2); }
html[data-theme="dark"] .user-info-table td small { color: var(--dk-muted); }
html[data-theme="dark"] .user-info-table input { color: var(--dk-text); border-color: var(--dk-border); }
html[data-theme="dark"] .error a { color: var(--dk-muted); }
html[data-theme="dark"] .search-panel, html[data-theme="dark"] .search-empty { background-color: var(--dk-surface); }
html[data-theme="dark"] .search-msg { color: var(--dk-muted); }
html[data-theme="dark"] input.textin, html[data-theme="dark"] #searchtable input[type="text"] { border-color: var(--dk-border); background-color: var(--dk-surface-2); color: var(--dk-text); }
html[data-theme="dark"] input.textin:focus, html[data-theme="dark"] #searchtable input[type="text"]:focus { background-color: var(--dk-surface); }
html[data-theme="dark"] #searchtable .bbcodes, html[data-theme="dark"] #doclear, html[data-theme="dark"] #doreset { background-color: var(--dk-surface-3); color: var(--dk-text-2); }
html[data-theme="dark"] #searchtable .bbcodes:hover, html[data-theme="dark"] #doclear:hover, html[data-theme="dark"] #doreset:hover { background-color: var(--dk-tint); color: var(--dk-text); }
html[data-theme="dark"] .search-empty-title { color: var(--dk-text); }
html[data-theme="dark"] .search-empty-text { color: var(--dk-muted); }
html[data-theme="dark"] .ui-menu { background-color: var(--dk-surface); border-color: var(--dk-border); color: var(--dk-text); }
html[data-theme="dark"] .ui-menu .ui-menu-item a.ui-state-hover, html[data-theme="dark"] .ui-menu .ui-menu-item a.ui-state-active { color: var(--dk-text-2); }
html[data-theme="dark"] .voteprogress { background-color: var(--dk-surface-2); background: var(--dk-surface-2); background: var(--dk-surface-2); background: var(--dk-surface-2); background: var(--dk-surface-2); background: var(--dk-surface-2); background: var(--dk-surface-2); }
html[data-theme="dark"] .pollprogress { background-color: var(--dk-surface-2); background: var(--dk-surface-2); background: var(--dk-surface-2); background: var(--dk-surface-2); background: var(--dk-surface-2); background: var(--dk-surface-2); background: var(--dk-surface-2); }
html[data-theme="dark"] .ajaxProgress { border-color: var(--dk-border); }
html[data-theme="dark"] .ias_trigger a { border-color: var(--dk-border); color: var(--dk-muted); background-color: var(--dk-surface-2); background: var(--dk-surface-2); background: var(--dk-surface-2); background: var(--dk-surface-2); background: var(--dk-surface-2); background: var(--dk-surface-2); background: var(--dk-surface-2); }
html[data-theme="dark"] .ias_trigger a:hover { background-color: var(--dk-surface-3); background: var(--dk-surface-3); background: var(--dk-surface-3); background: var(--dk-surface-3); background: var(--dk-surface-3); background: var(--dk-surface-3); background: var(--dk-surface-3); }
html[data-theme="dark"] .findrelated { background-color: var(--dk-surface-2); }
@media (max-width: 1240px) {
	html[data-theme="dark"] .mob-panel { background-color: var(--dk-surface); }
	html[data-theme="dark"] .mob-panel-land { color: var(--dk-text); }
	html[data-theme="dark"] .mob-panel-menu a { color: var(--dk-text-2); }
	html[data-theme="dark"] .mob-panel-menu2 a { color: var(--dk-text); }
	html[data-theme="dark"] .flnm .best-line { background-color: var(--dk-surface); }
	html[data-theme="dark"] .search-block { background-color: var(--dk-surface); }
	html[data-theme="dark"] .full-news-image { border-color: var(--dk-border); }
	html[data-theme="dark"] .full-news-title-wrap, html[data-theme="dark"] .full-news-title-wrap.news { background-color: var(--dk-surface); color: var(--dk-text); }
}
@media (max-width: 800px) {
	html[data-theme="dark"] .category-menu a { color: var(--dk-text); }
}
html[data-theme="dark"] ol.comments-tree-list { --tree-c: var(--dk-text-2); --tree-bg: var(--dk-surface); }
@media (max-width: 500px) {
	html[data-theme="dark"] .main-news-title { color: var(--dk-text); }
}
@media (min-width: 880px) {
	html[data-theme="dark"] .bb-pane { background-color: var(--dk-surface-2); border-color: var(--dk-border); }
	html[data-theme="dark"] .bb-editor textarea { border-color: var(--dk-border); }
}
html[data-theme="dark"] .quote { color: var(--dk-muted); background-color: var(--dk-surface-3); }
html[data-theme="dark"] .white .stt-block { background-color: var(--dk-surface); }
html[data-theme="dark"] .white .gray-theme.fr-box .fr-counter { color: var(--dk-text-2); background-color: var(--dk-surface); }
html[data-theme="dark"] .white .gray-theme.fr-toolbar { color: var(--dk-text-2); background-color: var(--dk-surface-3); }
html[data-theme="dark"] .white .gray-theme .fr-separator { background-color: var(--dk-surface); }
html[data-theme="dark"] .white .gray-theme.fr-toolbar .fr-command.fr-btn, html[data-theme="dark"] .gray-theme.fr-popup .fr-command.fr-btn { color: var(--dk-text); }
html[data-theme="dark"] .white .gray-theme.fr-desktop .fr-command:hover, html[data-theme="dark"] .gray-theme.fr-desktop .fr-command:focus { background-color: var(--dk-surface); }
html[data-theme="dark"] .white .form-line-tt textarea, html[data-theme="dark"] .white .form-line-tt .fr-view { background-color: var(--dk-surface-3); border-color: var(--dk-border); }
html[data-theme="dark"] .white .form-line-tt input { border-color: var(--dk-border); background-color: var(--dk-surface); }
html[data-theme="dark"] .white .herh .form-line-tt { border-bottom-color: var(--dk-border); }
html[data-theme="dark"] .white .herh .form-line-tt:nth-child(2n) { background-color: var(--dk-surface-2); }
html[data-theme="dark"] .white .pmtt-menu { border-bottom-color: var(--dk-border); }
html[data-theme="dark"] .white .pmtt-menu a { background: var(--dk-surface); background: var(--dk-surface); background: var(--dk-surface); background: var(--dk-surface); background: var(--dk-surface); background-color: var(--dk-surface); border-color: var(--dk-border); color: var(--dk-text-2); }
html[data-theme="dark"] .white .pmtt-menu a i { color: var(--dk-muted); }
html[data-theme="dark"] .white .pmtt-pm-list-content table { border-color: var(--dk-border); }
html[data-theme="dark"] .white .pmtt-pm-list-content table  td { border-bottom-color: var(--dk-border); }
html[data-theme="dark"] .white .pmtt-pm-list-content tr:first-child td { border-bottom-color: var(--dk-border); }
html[data-theme="dark"] .white .pmtt-pm-list-content table  tr:nth-child(2n) td { background-color: var(--dk-surface-2); border-bottom-color: var(--dk-border); }
html[data-theme="dark"] .white .pm_progress_bar { background-color: var(--dk-surface-3); border-color: var(--dk-border); }
html[data-theme="dark"] .white .pmtt-new-title { border-bottom-color: var(--dk-border); }
html[data-theme="dark"] .white .pmtt-mess-title { border-bottom-color: var(--dk-border); }
html[data-theme="dark"] .white .pmtt-mess-theme { border-bottom-color: var(--dk-border); }
html[data-theme="dark"] .white .pmtt-mess-menu a { background: var(--dk-surface); background: var(--dk-surface); background: var(--dk-surface); background: var(--dk-surface); background: var(--dk-surface); background-color: var(--dk-surface); border-color: var(--dk-border); color: var(--dk-text-2); }
html[data-theme="dark"] .white .pmtt-mess-menu a:hover { background-color: var(--dk-surface-3); }
html[data-theme="dark"] .poll-btn2 { background-color: var(--dk-surface); color: var(--dk-text); }
html[data-theme="dark"] .taki-odessa-block:before { background-color: var(--dk-surface-3); border-color: var(--dk-border); }
html[data-theme="dark"] .post-author { border-color: var(--dk-border); background-color: var(--dk-surface); color: var(--dk-muted); }
html[data-theme="dark"] .post-author__name { color: var(--dk-text); }
html[data-theme="dark"] .dle-msg-title { color: var(--dk-text); }
html[data-theme="dark"] .ui-dialog { background-color: var(--dk-surface); color: var(--dk-text-2); }
html[data-theme="dark"] .ui-dialog .ui-dialog-title { color: var(--dk-text); }
html[data-theme="dark"] .ui-dialog .ui-dialog-titlebar-close { background-color: var(--dk-surface-2); }
html[data-theme="dark"] .ui-dialog .ui-dialog-titlebar-close:hover { background-color: var(--dk-surface-3); }
html[data-theme="dark"] .ui-dialog .ui-dialog-content { color: var(--dk-text-2); }
html[data-theme="dark"] .ui-dialog .ui-dialog-content input[type="text"], html[data-theme="dark"] .ui-dialog .ui-dialog-content input[type="email"], html[data-theme="dark"] .ui-dialog .ui-dialog-content input[type="password"], html[data-theme="dark"] .ui-dialog .ui-dialog-content textarea { border-color: var(--dk-border); background-color: var(--dk-surface-2); color: var(--dk-text); }
html[data-theme="dark"] .ui-dialog .ui-dialog-content input:focus, html[data-theme="dark"] .ui-dialog .ui-dialog-content textarea:focus { background-color: var(--dk-surface); }
html[data-theme="dark"] .ui-dialog .ui-dialog-buttonset button { background-color: var(--dk-surface-3); color: var(--dk-text-2); }
html[data-theme="dark"] .ui-dialog .ui-dialog-buttonset button:hover { background-color: var(--dk-tint); color: var(--dk-text); }
html[data-theme="dark"] .auth-card { background-color: var(--dk-surface); color: var(--dk-text); }
html[data-theme="dark"] .auth-soc-btn { border-color: var(--dk-border); background-color: var(--dk-surface); color: var(--dk-text); }
html[data-theme="dark"] .auth-soc-btn:hover { background-color: var(--dk-surface-2); border-color: var(--dk-border); color: var(--dk-text); }
html[data-theme="dark"] .auth-or { color: var(--dk-muted); }
html[data-theme="dark"] .auth-or::before, html[data-theme="dark"] .auth-or::after { background-color: var(--dk-surface-3); }
html[data-theme="dark"] .auth-hint { color: var(--dk-muted); }
html[data-theme="dark"] .auth-card input[type="text"], html[data-theme="dark"] .auth-card input[type="email"], html[data-theme="dark"] .auth-card input[type="password"], html[data-theme="dark"] .auth-card textarea, html[data-theme="dark"] .login-block .login-input-text { border-color: var(--dk-border); background-color: var(--dk-surface-2); color: var(--dk-text); }
html[data-theme="dark"] .auth-card input:focus, html[data-theme="dark"] .auth-card textarea:focus, html[data-theme="dark"] .login-block .login-input-text:focus { background-color: var(--dk-surface); }
html[data-theme="dark"] .auth-check { background-color: var(--dk-surface-3); color: var(--dk-text-2); }
html[data-theme="dark"] .auth-check:hover { background-color: var(--dk-tint); }
html[data-theme="dark"] .auth-foot { color: var(--dk-muted); }
html[data-theme="dark"] .login-wrap-show .login-block { background-color: var(--dk-surface); }
html[data-theme="dark"] #DLEPush .DLEPush-notification.wrapper { background-color: var(--dk-surface); color: var(--dk-text); }
html[data-theme="dark"] #DLEPush .DLEPush-close { background-color: var(--dk-surface-2); color: var(--dk-text-2); }
html[data-theme="dark"] #DLEPush .DLEPush-close:hover { background-color: var(--dk-surface-3); }
html[data-theme="dark"] .usp-soc-title { color: var(--dk-text); }
html[data-theme="dark"] .usp-soc-hint { color: var(--dk-muted); }
html[data-theme="dark"] .usp-soc-row { border-color: var(--dk-border); background-color: var(--dk-surface); color: var(--dk-text); }
html[data-theme="dark"] a.usp-soc-row:hover { color: var(--dk-text); }
html[data-theme="dark"] .usp-soc-row.is-on { border-color: var(--dk-border); background-color: var(--dk-surface-2); }
html[data-theme="dark"] .up-page { color: var(--dk-text); }
html[data-theme="dark"] .up-hero, html[data-theme="dark"] .up-card { background-color: var(--dk-surface); }
html[data-theme="dark"] .up-avatar img { border-color: var(--dk-border); background-color: var(--dk-surface-3); }
html[data-theme="dark"] .up-dot { border-color: var(--dk-border); }
html[data-theme="dark"] .up-tag { background-color: var(--dk-surface-3); color: var(--dk-text-2); }
html[data-theme="dark"] .up-tag.is-online { background-color: var(--dk-surface-3); color: var(--dk-text-2); }
html[data-theme="dark"] .up-btn a { background-color: var(--dk-surface-3); color: var(--dk-text); }
html[data-theme="dark"] .up-btn a:hover { background-color: var(--dk-tint); color: var(--dk-text); }
html[data-theme="dark"] .up-stat { background-color: var(--dk-surface-2); }
html[data-theme="dark"] .up-stat span { color: var(--dk-muted); }
html[data-theme="dark"] .up-list li { border-bottom-color: var(--dk-border); }
html[data-theme="dark"] .up-list li span { color: var(--dk-muted); }
html[data-theme="dark"] .up-about { color: var(--dk-text-2); }
html[data-theme="dark"] .up-link { background-color: var(--dk-surface-2); color: var(--dk-text); }
html[data-theme="dark"] .up-link:hover { background-color: var(--dk-tint); color: var(--dk-text); }
html[data-theme="dark"] .up-link span { color: var(--dk-muted); }
html[data-theme="dark"] .up-field input[type="text"], html[data-theme="dark"] .up-field input[type="email"], html[data-theme="dark"] .up-field input[type="password"], html[data-theme="dark"] .up-field select, html[data-theme="dark"] .up-field textarea { border-color: var(--dk-border); background-color: var(--dk-surface-2); color: var(--dk-text); }
html[data-theme="dark"] .up-field input:focus, html[data-theme="dark"] .up-field select:focus, html[data-theme="dark"] .up-field textarea:focus { background-color: var(--dk-surface); }
html[data-theme="dark"] .up-subtitle { border-top-color: var(--dk-border); }
html[data-theme="dark"] .vt-ring.is-checking::before { background: var(--dk-surface); }
html[data-theme="dark"] .app-hero-icon img { background-color: var(--dk-surface); }
html[data-theme="dark"] .app-links { border-top-color: var(--dk-border); }
html[data-theme="dark"] .app-links-row > span { color: var(--dk-muted); }
html[data-theme="dark"] .app-links-row a { background-color: var(--dk-tint); color: var(--dk-link); }
html[data-theme="dark"] .app-links-row a:hover { background-color: var(--dk-tint); }
html[data-theme="dark"] { --ar-track: var(--dk-surface-3); --ar-ink: var(--dk-text); --ar-mut: var(--dk-muted); }
html[data-theme="dark"] .ar-rating { background-color: var(--dk-surface); }
html[data-theme="dark"] .ar-sum { border-right-color: var(--dk-border); }
html[data-theme="dark"] .ar-crit-stats { border-top-color: var(--dk-border); }
html[data-theme="dark"] .ar-tabs { background-color: var(--dk-surface-2); }
html[data-theme="dark"] .ar-tabs button { color: var(--dk-text-2); }
html[data-theme="dark"] .ar-tabs button.is-on { background-color: var(--dk-surface); }
html[data-theme="dark"] .ar-sort select { border-color: var(--dk-border); }
html[data-theme="dark"] .ar-other { border-color: var(--dk-border); color: var(--dk-link); }
html[data-theme="dark"] .ar-ext { background-color: var(--dk-surface-2); }
html[data-theme="dark"] .ar-ext-head img, html[data-theme="dark"] .ar-ext-ava { background-color: var(--dk-surface-3); }
html[data-theme="dark"] .ar-form { background-color: var(--dk-surface-2); }
html[data-theme="dark"] .ar-switch i { background-color: var(--dk-tint); }
html[data-theme="dark"] .ar-switch i::after { background-color: var(--dk-surface); }
html[data-theme="dark"] .ar-crit-total { border-top-color: var(--dk-border); }
html[data-theme="dark"] .ar-pick { background-color: var(--dk-surface); }
html[data-theme="dark"] .com-item.is-review .com-item-top { background-color: var(--dk-surface-3); }
html[data-theme="dark"] .com-item.is-review .com-item-date { color: var(--dk-text-2); }
html[data-theme="dark"] .ar-badge { background-color: var(--dk-surface); color: var(--dk-text); }
html[data-theme="dark"] .ar-ext .ar-badge { background-color: var(--dk-surface-2); }
html[data-theme="dark"] .ar-like { background-color: var(--dk-surface-2); color: var(--dk-text-2); }
html[data-theme="dark"] .ar-like:hover { background-color: var(--dk-surface-3); }
@media (max-width: 680px) {
	html[data-theme="dark"] .ar-sum { border-bottom-color: var(--dk-border); }
}
html[data-theme="dark"] .frblock.nghty { background-color: var(--dk-surface); }
html[data-theme="dark"] .frblock.nghty .frblock-title { color: var(--dk-text); }
html[data-theme="dark"] .rel-strip .main-news-title.rel { color: var(--dk-text); }
html[data-theme="dark"] .dlp-hint { color: var(--dk-muted); }
html[data-theme="dark"] .dlp-tg { background-color: var(--dk-tint); color: var(--dk-link) !important; }
html[data-theme="dark"] .dlp-tg:hover { background-color: var(--dk-tint); }
html[data-theme="dark"] .cml-vote:focus-visible { outline-color: var(--dk-border); }
html[data-theme="dark"] .ar-no-comments { color: var(--dk-text-2); }
@media (min-width: 1241px) {
	html[data-theme="dark"] .lang-dd--head .lang-dd__item.is-active { background-color: var(--dk-tint); }
}
html[data-theme="dark"] .art-card { background-color: var(--dk-surface); }
html[data-theme="dark"] .art-av { background-color: var(--dk-surface); color: var(--dk-text); }
html[data-theme="dark"] .art-body .art-text { color: var(--dk-text); }
html[data-theme="dark"] .art-text h2, html[data-theme="dark"] .art-text h3 { color: var(--dk-text); }
html[data-theme="dark"] .art-text td, html[data-theme="dark"] .art-text th { border-top-color: var(--dk-border); }
html[data-theme="dark"] .art-text tr:nth-child(odd):not(:first-child) td { background-color: var(--dk-surface-2); }
html[data-theme="dark"] .art-ad { background-color: var(--dk-surface-2); }
html[data-theme="dark"] .art-ad::before { background-color: var(--dk-surface); color: var(--dk-muted); }
html[data-theme="dark"] .art-ad .taki-odessa-block::before { background: var(--dk-surface-3); }
html[data-theme="dark"] .art-ad-side { background-color: var(--dk-surface); }
html[data-theme="dark"] .art-stars .unit-rating li a:focus-visible { outline-color: var(--dk-border); }
@media (max-width: 1000px) {
	html[data-theme="dark"] .art-rel-m h2 { color: var(--dk-text); }
	html[data-theme="dark"] .art-rel-grid .main-news-title.rel { color: var(--dk-text); }
	html[data-theme="dark"] .art-rel-grid .main-news-category.rel { color: var(--dk-link); }
}
html[data-theme="dark"] .mainflex > .acard:first-child { background-color: var(--dk-surface); color: var(--dk-text); }
html[data-theme="dark"] .mainflex > .acard:first-child .acard-m { color: var(--dk-muted); }
html[data-theme="dark"] .mainflex > .acard:first-child .acard-cat { background-color: var(--dk-tint); color: var(--dk-link); }
html[data-theme="dark"] .mainflex > .acard:first-child .acard-t { color: var(--dk-text); }
html[data-theme="dark"] .mainflex > .acard:first-child .acard-d { color: var(--dk-muted); }
html[data-theme="dark"] .acard-s > span { background-color: var(--dk-surface-2); color: var(--dk-text-2); }
html[data-theme="dark"] .acard-s svg { color: var(--dk-link); }
html[data-theme="dark"] .seo-about { border-top-color: var(--dk-border); color: var(--dk-text-2); }
html[data-theme="dark"] .seo-about .seo-about-title { color: var(--dk-text); }
html[data-theme="dark"] .seo-about a:hover { color: var(--dk-text); }
html[data-theme="dark"] .home-art-all { background-color: var(--dk-tint); color: var(--dk-link); }
html[data-theme="dark"] .category-menu .subcat { background-color: var(--dk-surface); color: var(--dk-text); }
html[data-theme="dark"] .category-menu .subcat:hover { color: var(--dk-link); }
html[data-theme="dark"] .mob-panel.mob-panel { background-color: var(--dk-surface); }
html[data-theme="dark"] .mp-x, html[data-theme="dark"] .mob-panel .mp-login { background-color: var(--dk-surface-2) !important; color: var(--dk-text); }
html[data-theme="dark"] .mob-panel .mp-login svg { color: var(--dk-link); }
html[data-theme="dark"] .mp-x:hover, html[data-theme="dark"] .mob-panel .mp-login:hover { background-color: var(--dk-tint) !important; }
html[data-theme="dark"] .mob-panel .mp-grid .mp-card { color: var(--dk-text); }
html[data-theme="dark"] .mob-panel .mp-grid .mp-card:hover, html[data-theme="dark"] .mob-panel .mp-grid .mp-card:active { background-color: var(--dk-surface-2); }
html[data-theme="dark"] .mp-ico { background-color: var(--dk-tint); }
html[data-theme="dark"] .mob-panel .mp-links { border-top-color: var(--dk-border); }
html[data-theme="dark"] .mob-panel .mp-links a { color: var(--dk-muted); }
html[data-theme="dark"] .mob-panel .mp-links a:hover { color: var(--dk-link); }
html[data-theme="dark"] .ord-card { background-color: var(--dk-surface); }
html[data-theme="dark"] .ord-lead { color: var(--dk-text); }
html[data-theme="dark"] .ord-label { color: var(--dk-muted); }
html[data-theme="dark"] .ord-field input { border-color: var(--dk-border); background-color: var(--dk-surface-2); color: var(--dk-text); }
html[data-theme="dark"] .ord-field input:focus { background-color: var(--dk-surface); }
html[data-theme="dark"] .ord-field input.is-bad { background-color: var(--dk-surface-2); }
html[data-theme="dark"] .ord-paste { background-color: var(--dk-tint); color: var(--dk-link); }
html[data-theme="dark"] .ord-paste:hover { background-color: var(--dk-tint); }
html[data-theme="dark"] .ord-msg.is-success { background-color: var(--dk-surface-3); color: var(--dk-text-2); }
html[data-theme="dark"] .ord-msg.is-info { background-color: var(--dk-surface-2); }
html[data-theme="dark"] .ord-msg.is-error { background-color: var(--dk-surface-3); }
html[data-theme="dark"] .ord-note { color: var(--dk-muted); }
html[data-theme="dark"] .ord-tg { background-color: var(--dk-surface); color: var(--dk-text); }
html[data-theme="dark"] .ord-tg-btn { background-color: var(--dk-tint); color: var(--dk-link); }
html[data-theme="dark"] .fb-card { background-color: var(--dk-surface); }
html[data-theme="dark"] .fb-title { color: var(--dk-text); }
html[data-theme="dark"] .fb-lead { color: var(--dk-muted); }
html[data-theme="dark"] .fb-l { color: var(--dk-muted); }
html[data-theme="dark"] .fb-card input[type="text"], html[data-theme="dark"] .fb-card input[type="email"], html[data-theme="dark"] .fb-card select, html[data-theme="dark"] .fb-card textarea { border-color: var(--dk-border); background-color: var(--dk-surface-2); color: var(--dk-text); }
html[data-theme="dark"] .fb-card input:focus, html[data-theme="dark"] .fb-card select:focus, html[data-theme="dark"] .fb-card textarea:focus { background-color: var(--dk-surface); }
html[data-theme="dark"] .fb-codeimg, html[data-theme="dark"] .fb-q { background-color: var(--dk-surface-2); color: var(--dk-text); }
html[data-theme="dark"] .footer-wrap:has(> .ft-sphs) .home-art-all:hover { background-color: var(--dk-surface); color: var(--dk-text); }
html[data-theme="dark"] .main-news.apc { background-color: var(--dk-surface); color: var(--dk-text); }
html[data-theme="dark"] .apc-mod { color: var(--dk-text); }
html[data-theme="dark"] .apc-t { color: var(--dk-text); }
html[data-theme="dark"] .apc-cat { color: var(--dk-link); }
html[data-theme="dark"] .apc-cat em { background-color: var(--dk-surface-2); }
html[data-theme="dark"] .apc-d { color: var(--dk-muted); }
html[data-theme="dark"] .apc-s { background-color: var(--dk-surface-2); }
html[data-theme="dark"] .apc-s > span { color: var(--dk-muted); }
html[data-theme="dark"] .apc-s > span + span { border-left-color: var(--dk-border); }
html[data-theme="dark"] .apc-s svg { color: var(--dk-muted); }
html[data-theme="dark"] .cmx-title { color: var(--dk-text); }
html[data-theme="dark"] .cmx-item { border-color: var(--dk-border); background-color: var(--dk-surface); color: var(--dk-text); }
html[data-theme="dark"] .cmx-item:hover { color: var(--dk-text); }
html[data-theme="dark"] .cmx-item .cmx-name { color: var(--dk-text); }
html[data-theme="dark"] .cmx-item:hover .cmx-name { color: var(--dk-text); }
html[data-theme="dark"] .cmx-n { color: var(--dk-text); }
html[data-theme="dark"] .post-author.post-author { border-top-color: var(--dk-border); }
html[data-theme="dark"] .post-author .post-author__text small { color: var(--dk-muted); }
html[data-theme="dark"] .post-author .post-author__name { color: var(--dk-text); }
html[data-theme="dark"] .post-author .post-author__name a:hover { color: var(--dk-link); }
html[data-theme="dark"] .post-author__date { color: var(--dk-muted); }
html[data-theme="dark"] .dg-tldr { color: var(--dk-text); }
html[data-theme="dark"] .dg-wn { color: var(--dk-text); }

/* ================= ПЕРЕКЛЮЧАТЕЛЬ ТЕМЫ (.dg-theme) =================
   Капсула-«небо»: днём — голубое небо, облака и солнце с лучами; ночью — тёмное небо, звёзды и луна с кратерами.
   Кружок едет с пружинкой, лучи прячутся, кратеры проявляются, звёзды мерцают. */
.dg-theme {
	--w: 62px; --h: 32px; --k: 24px;
	position: relative; flex: 0 0 auto;
	width: var(--w); height: var(--h); padding: 0; margin: 0 6px;
	border: 0; border-radius: 999px; cursor: pointer;
	background: none; -webkit-tap-highlight-color: transparent;
	outline-offset: 3px;
}
.dg-theme:focus-visible { outline: 2px solid #4fc3f7; }
.dg-theme__track {
	position: absolute; inset: 0; overflow: hidden; border-radius: inherit;
	background: linear-gradient(180deg, #5fd0ff 0%, #18a8e0 100%);
	box-shadow: inset 0 2px 6px rgba(0, 0, 0, .25), 0 0 0 1px rgba(255, 255, 255, .25);
	transition: background .6s ease;
}
html[data-theme="dark"] .dg-theme__track { background: linear-gradient(180deg, #0b1b2b 0%, #1d3149 100%); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .14); }
/* облака */
.dg-theme__cloud {
	position: absolute; height: 9px; border-radius: 9px; background: #fff; opacity: .95;
	transition: transform .6s cubic-bezier(.5, -0.4, .3, 1.4), opacity .4s;
}
.dg-theme__cloud::before { content: ''; position: absolute; width: 9px; height: 9px; left: 4px; top: -4px; border-radius: 50%; background: inherit; }
.dg-theme__cloud--a { width: 18px; right: 7px; bottom: 6px; }
.dg-theme__cloud--b { width: 13px; right: 18px; bottom: 3px; opacity: .8; }
html[data-theme="dark"] .dg-theme__cloud { transform: translateY(20px); opacity: 0; }
/* звёзды */
.dg-theme__star {
	position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff;
	box-shadow: 0 0 4px #fff; opacity: 0; transform: translateY(-14px) scale(.4);
	transition: transform .6s cubic-bezier(.5, -0.4, .3, 1.4), opacity .4s;
}
.dg-theme__star--a { left: 9px; top: 7px; }
.dg-theme__star--b { left: 18px; top: 18px; width: 2px; height: 2px; transition-delay: .05s; }
.dg-theme__star--c { left: 25px; top: 8px; width: 2px; height: 2px; transition-delay: .1s; }
html[data-theme="dark"] .dg-theme__star { opacity: 1; transform: none; animation: dgTwinkle 2.4s ease-in-out infinite; }
html[data-theme="dark"] .dg-theme__star--b { animation-delay: .8s; }
html[data-theme="dark"] .dg-theme__star--c { animation-delay: 1.6s; }
@keyframes dgTwinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.6); } }
/* кружок: солнце → луна */
.dg-theme__knob {
	position: absolute; top: calc((var(--h) - var(--k)) / 2); left: calc((var(--h) - var(--k)) / 2);
	width: var(--k); height: var(--k); border-radius: 50%;
	background: radial-gradient(circle at 35% 35%, #fff6b0 0%, #ffd23f 45%, #ffb300 100%);
	box-shadow: 0 0 0 3px rgba(255, 214, 64, .35), 0 0 14px 3px rgba(255, 200, 40, .55), 0 2px 4px rgba(0, 0, 0, .25);
	transition: transform .65s cubic-bezier(.68, -0.55, .27, 1.55), background .5s ease, box-shadow .5s ease;
}
html[data-theme="dark"] .dg-theme__knob {
	transform: translateX(calc(var(--w) - var(--h))) rotate(-25deg);
	background: radial-gradient(circle at 35% 35%, #ffffff 0%, #e4e9ef 55%, #b9c3cf 100%);
	box-shadow: 0 0 0 3px rgba(255, 255, 255, .08), 0 0 14px 2px rgba(190, 215, 255, .35), 0 2px 4px rgba(0, 0, 0, .4);
}
/* лучи солнца */
.dg-theme__rays { position: absolute; inset: -6px; border-radius: 50%; transition: transform .6s ease, opacity .35s ease; }
.dg-theme__rays i { position: absolute; left: 50%; top: 50%; width: 2px; height: 5px; margin: -2.5px 0 0 -1px; border-radius: 2px; background: #ffd23f; }
.dg-theme__rays i:nth-child(1) { transform: rotate(0deg) translateY(-15px); }
.dg-theme__rays i:nth-child(2) { transform: rotate(45deg) translateY(-15px); }
.dg-theme__rays i:nth-child(3) { transform: rotate(90deg) translateY(-15px); }
.dg-theme__rays i:nth-child(4) { transform: rotate(135deg) translateY(-15px); }
.dg-theme__rays i:nth-child(5) { transform: rotate(180deg) translateY(-15px); }
.dg-theme__rays i:nth-child(6) { transform: rotate(225deg) translateY(-15px); }
.dg-theme__rays i:nth-child(7) { transform: rotate(270deg) translateY(-15px); }
.dg-theme__rays i:nth-child(8) { transform: rotate(315deg) translateY(-15px); }
.dg-theme:hover .dg-theme__rays { transform: rotate(45deg); }
html[data-theme="dark"] .dg-theme__rays { opacity: 0; transform: scale(.4) rotate(-90deg); }
/* кратеры луны */
.dg-theme__crater { position: absolute; border-radius: 50%; background: #aab5c2; opacity: 0; transform: scale(0); transition: transform .45s ease .15s, opacity .3s ease .15s; }
.dg-theme__crater--a { width: 7px; height: 7px; left: 5px; top: 6px; }
.dg-theme__crater--b { width: 5px; height: 5px; right: 5px; top: 11px; }
.dg-theme__crater--c { width: 4px; height: 4px; left: 10px; bottom: 4px; }
html[data-theme="dark"] .dg-theme__crater { opacity: .75; transform: scale(1); }
/* нажатие — кружок «сплющивается» */
.dg-theme:active .dg-theme__knob { width: calc(var(--k) + 6px); }
html[data-theme="dark"] .dg-theme:active .dg-theme__knob { margin-left: -6px; }
@media (prefers-reduced-motion: reduce) {
	.dg-theme *, .dg-theme *::before { transition: none !important; animation: none !important; }
}
/* место в шапке ПК (перед переключателем языка) и в мобильном меню */
.head-r .dg-theme { --w: 50px; --h: 28px; --k: 20px; align-self: center; margin: 0 2px 0 6px; }
.head-r .dg-theme__rays i { height: 4px; }
/* место под переключатель в шапке ПК: пункты меню чуть плотнее, без переноса */
@media (min-width: 1241px) {
	.top-menu { flex-wrap: nowrap; white-space: nowrap; }
	.head-line:has(.dg-theme) .top-menu a { margin: 0 7px; padding-left: 36px; }
}
.mp-top-r .dg-theme { --w: 56px; --h: 30px; --k: 22px; margin: 0 8px 0 0; }
