/**
 * Dark theme — full token set + contrast fixes (§39).
 */

[data-theme="dark"] {
	color-scheme: dark;

	--ilyt-bg: #111827;
	--ilyt-surface: #1f2937;
	--ilyt-text: #f3f4f6;
	--ilyt-muted: #9ca3af;
	--ilyt-border: #374151;
	--ilyt-accent-hover: color-mix(in srgb, var(--ilyt-accent) 82%, #fff);
	--ilyt-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
	--ilyt-on-accent: #fff;

	/* Semantic surfaces */
	--ilyt-success-bg: rgba(34, 197, 94, 0.15);
	--ilyt-success-text: #86efac;
	--ilyt-success-border: rgba(34, 197, 94, 0.35);
	--ilyt-error-bg: rgba(239, 68, 68, 0.15);
	--ilyt-error-text: #fca5a5;
	--ilyt-error-border: rgba(239, 68, 68, 0.35);
	--ilyt-info-bg: rgba(59, 130, 246, 0.15);
	--ilyt-info-text: #93c5fd;
	--ilyt-info-border: rgba(59, 130, 246, 0.35);
	--ilyt-warn-bg: rgba(245, 158, 11, 0.15);
	--ilyt-warn-text: #fcd34d;
	--ilyt-warn-border: rgba(245, 158, 11, 0.35);
}

[data-theme="dark"] body {
	background: var(--ilyt-bg);
	color: var(--ilyt-text);
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] .ilyt-page-title,
[data-theme="dark"] .ilyt-hero__title,
[data-theme="dark"] .widget-title {
	color: var(--ilyt-text);
}

[data-theme="dark"] .ilyt-widget-feed__card {
	background: var(--ilyt-surface-2, rgba(255, 255, 255, 0.04));
	border-color: var(--ilyt-border);
}

[data-theme="dark"] p,
[data-theme="dark"] li,
[data-theme="dark"] dd,
[data-theme="dark"] label,
[data-theme="dark"] legend,
[data-theme="dark"] .ilyt-article__content {
	color: inherit;
}

[data-theme="dark"] .ilyt-muted,
[data-theme="dark"] .ilyt-tagline,
[data-theme="dark"] .ilyt-hero__subtitle,
[data-theme="dark"] .ilyt-page-desc,
[data-theme="dark"] .ilyt-breadcrumbs,
[data-theme="dark"] .ilyt-card__excerpt,
[data-theme="dark"] .ilyt-footer__brand p,
[data-theme="dark"] .ilyt-footer__copy,
[data-theme="dark"] .ilyt-settings-note {
	color: var(--ilyt-muted);
}

[data-theme="dark"] .ilyt-cookie-banner {
	background: var(--ilyt-surface);
	border-top-color: var(--ilyt-border);
	box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .ilyt-cookie-banner__text {
	color: var(--ilyt-text);
}

[data-theme="dark"] a:not(.ilyt-btn):not(.ilyt-card__link):not(.ilyt-lf-card__link):not(.ilyt-board-card__link):not(.ilyt-fab-write) {
	color: var(--ilyt-accent);
}

[data-theme="dark"] .ilyt-fab-write,
[data-theme="dark"] .ilyt-fab-write:visited,
[data-theme="dark"] .ilyt-fab-write:hover,
[data-theme="dark"] .ilyt-fab-write:focus-visible,
[data-theme="dark"] .ilyt-fab-write__icon {
	color: #fff;
}

[data-theme="dark"] hr {
	border-color: var(--ilyt-border);
}

[data-theme="dark"] blockquote {
	border-left-color: var(--ilyt-border);
	color: var(--ilyt-muted);
}

/* Forms — global */
[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
[data-theme="dark"] textarea,
[data-theme="dark"] select {
	background: var(--ilyt-surface);
	color: var(--ilyt-text);
	border-color: var(--ilyt-border);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
	color: var(--ilyt-muted);
	opacity: 0.85;
}

[data-theme="dark"] select option {
	background: var(--ilyt-surface);
	color: var(--ilyt-text);
}

[data-theme="dark"] .ilyt-form__group label,
[data-theme="dark"] .ilyt-cabinet-nav__btn,
[data-theme="dark"] .ilyt-cabinet-tabs__btn:not(.is-active) {
	color: var(--ilyt-text);
}

[data-theme="dark"] .ilyt-cabinet-nav__group {
	background: var(--ilyt-surface);
	border-color: var(--ilyt-border);
}

[data-theme="dark"] .ilyt-cabinet-nav__group--logout {
	background: transparent;
	border-color: transparent;
}

[data-theme="dark"] .ilyt-cabinet-nav__group--logout .ilyt-cabinet-nav__btn {
	background: var(--ilyt-surface);
	border-color: var(--ilyt-border);
}

[data-theme="dark"] .ilyt-cabinet-nav__group--logout .ilyt-cabinet-nav__btn:hover {
	background: rgba(153, 27, 27, 0.15);
	color: #fca5a5;
}

[data-theme="dark"] .ilyt-donations-module {
	background: var(--ilyt-surface);
	border-color: var(--ilyt-border);
}

[data-theme="dark"] .ilyt-donations-status.is-ready {
	background: var(--ilyt-success-bg);
	border-color: var(--ilyt-success-border);
	color: var(--ilyt-success-text);
}

[data-theme="dark"] .ilyt-donations-status.is-pending,
[data-theme="dark"] .ilyt-earnings-donate-required {
	background: var(--ilyt-warn-bg);
	border-color: var(--ilyt-warn-border);
	color: var(--ilyt-warn-text);
}

[data-theme="dark"] .ilyt-cabinet-nav__btn.is-active {
	color: var(--ilyt-on-accent);
}

/* Buttons */
[data-theme="dark"] .ilyt-btn--outline,
[data-theme="dark"] .ilyt-nav__cabinet--outline,
[data-theme="dark"] .ilyt-map-filters__btn:not(.is-active),
[data-theme="dark"] .ilyt-feed-filter__btn:not(.is-active),
[data-theme="dark"] .ilyt-lf-filter:not(.is-active),
[data-theme="dark"] .ilyt-board-chip:not(.is-active),
[data-theme="dark"] .ilyt-board-mine-filter:not(.is-active),
[data-theme="dark"] .ilyt-board-tab-btn:not(.is-active),
[data-theme="dark"] .ilyt-board-wizard-step:not(.is-active),
[data-theme="dark"] .ilyt-comment-votes__btn {
	background: var(--ilyt-surface);
	color: var(--ilyt-text);
	border-color: var(--ilyt-border);
}

[data-theme="dark"] .ilyt-btn--accent,
[data-theme="dark"] .ilyt-map-filters__btn.is-active,
[data-theme="dark"] .ilyt-feed-filter__btn.is-active,
[data-theme="dark"] .ilyt-cabinet-tabs__btn.is-active,
[data-theme="dark"] .ilyt-board-mine-filter.is-active,
[data-theme="dark"] .ilyt-board-tab-btn.is-active,
[data-theme="dark"] .ilyt-board-wizard-step.is-active {
	color: var(--ilyt-on-accent);
}

/* Alerts & status */
[data-theme="dark"] .ilyt-cabinet__alert.is-success,
[data-theme="dark"] .ilyt-comments__alert.is-success {
	background: var(--ilyt-success-bg);
	color: var(--ilyt-success-text);
	border-color: var(--ilyt-success-border);
}

[data-theme="dark"] .ilyt-cabinet__alert.is-error,
[data-theme="dark"] .ilyt-comments__alert.is-error {
	background: var(--ilyt-error-bg);
	color: var(--ilyt-error-text);
	border-color: var(--ilyt-error-border);
}

[data-theme="dark"] .ilyt-comments__alert.is-info {
	background: var(--ilyt-info-bg);
	color: var(--ilyt-info-text);
	border-color: var(--ilyt-info-border);
}

[data-theme="dark"] .ilyt-comments__count {
	color: var(--ilyt-text);
}

[data-theme="dark"] .ilyt-comments .ilyt-form__group input,
[data-theme="dark"] .ilyt-comments .ilyt-form__group textarea {
	background: var(--ilyt-bg);
	color: var(--ilyt-text);
	border-color: var(--ilyt-border);
}

[data-theme="dark"] .ilyt-comment-hidden-banner {
	background: var(--ilyt-warn-bg);
	color: var(--ilyt-warn-text);
	border-color: var(--ilyt-warn-border);
}

[data-theme="dark"] .ilyt-cabinet-post-status--pending,
[data-theme="dark"] .ilyt-status--pending {
	background: var(--ilyt-warn-bg);
	color: var(--ilyt-warn-text);
}

[data-theme="dark"] .ilyt-cabinet-post-status--published,
[data-theme="dark"] .ilyt-status--published {
	background: var(--ilyt-success-bg);
	color: var(--ilyt-success-text);
}

[data-theme="dark"] .ilyt-cabinet-post-status--rejected,
[data-theme="dark"] .ilyt-status--rejected {
	background: var(--ilyt-error-bg);
	color: var(--ilyt-error-text);
}

/* Cards & surfaces with hardcoded white/light bg */
[data-theme="dark"] .ilyt-lf-card,
[data-theme="dark"] .ilyt-urgent-lf,
[data-theme="dark"] .ilyt-video-preview,
[data-theme="dark"] .ilyt-board-contacts,
[data-theme="dark"] .ilyt-board-mine-item {
	background: var(--ilyt-surface);
	border-color: var(--ilyt-border);
	color: var(--ilyt-text);
}

[data-theme="dark"] .ilyt-urgent-lf {
	background: var(--ilyt-error-bg);
	border-color: var(--ilyt-error-border);
}

[data-theme="dark"] .ilyt-urgent-lf__title {
	color: var(--ilyt-error-text);
}

[data-theme="dark"] .ilyt-lf-card {
	border-color: var(--ilyt-border);
}

[data-theme="dark"] .ilyt-lf-card__link,
[data-theme="dark"] .ilyt-board-card__link {
	color: inherit;
}

[data-theme="dark"] .ilyt-lf-card__image--placeholder {
	background: var(--ilyt-border);
}

[data-theme="dark"] .ilyt-board-card__placeholder,
[data-theme="dark"] .ilyt-board-card__image {
	background: var(--ilyt-border);
}

[data-theme="dark"] .ilyt-board-card__image--placeholder {
	background: linear-gradient(135deg, var(--ilyt-border), var(--ilyt-surface));
}

[data-theme="dark"] .ilyt-video-panel,
[data-theme="dark"] .ilyt-video-preview {
	background: var(--ilyt-surface);
}

[data-theme="dark"] .ilyt-video-panel__hint,
[data-theme="dark"] .ilyt-video-panel__limit {
	color: var(--ilyt-muted);
}

/* Board badges — readable on dark */
[data-theme="dark"] .ilyt-board-badge--buy {
	background: rgba(37, 99, 235, 0.25);
	color: #93c5fd;
}

[data-theme="dark"] .ilyt-board-badge--sell {
	background: rgba(22, 163, 74, 0.25);
	color: #86efac;
}

[data-theme="dark"] .ilyt-board-badge--promo {
	background: rgba(245, 158, 11, 0.25);
	color: #fcd34d;
}

[data-theme="dark"] .ilyt-board-chip.is-active,
[data-theme="dark"] .ilyt-board-chip--buy.is-active {
	background: rgba(37, 99, 235, 0.2);
	color: #93c5fd;
}

[data-theme="dark"] .ilyt-board-chip--sell.is-active {
	background: rgba(22, 163, 74, 0.2);
	color: #86efac;
}

[data-theme="dark"] .ilyt-board-fav-btn {
	background: rgba(0, 0, 0, 0.45);
	color: var(--ilyt-text);
}

[data-theme="dark"] .ilyt-board-type-btn {
	background: var(--ilyt-surface);
	color: var(--ilyt-text);
}

[data-theme="dark"] .ilyt-board-type-btn span,
[data-theme="dark"] .ilyt-board-type-btn strong {
	color: inherit;
}

/* Chat */
[data-theme="dark"] .ilyt-chat-widget__panel,
[data-theme="dark"] .ilyt-chat-widget__messages {
	background: var(--ilyt-surface);
	color: var(--ilyt-text);
}

[data-theme="dark"] .ilyt-chat-widget__rooms button {
	color: var(--ilyt-text);
	background: var(--ilyt-bg);
}

[data-theme="dark"] .ilyt-chat-widget__form input {
	background: var(--ilyt-bg);
	color: var(--ilyt-text);
}

/* Polls & problems */
[data-theme="dark"] .ilyt-poll__options label {
	background: var(--ilyt-surface);
	color: var(--ilyt-text);
	border-color: var(--ilyt-border);
}

[data-theme="dark"] .ilyt-problem-support {
	background: var(--ilyt-surface);
	color: var(--ilyt-text);
}

/* Games — keep board readable */
[data-theme="dark"] .ilyt-games-board-cell:not(.ilyt-games-board-cell--light) {
	color: var(--ilyt-text);
}

[data-theme="dark"] .ilyt-games-board-cell--light {
	background: #f0d9b5;
	color: #1a1a1a;
}

/* Theme switcher */
.ilyt-theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--ilyt-border);
	border-radius: 999px;
	background: var(--ilyt-surface);
	color: var(--ilyt-text);
	cursor: pointer;
	font-size: 1.1rem;
}

.ilyt-theme-toggle:hover {
	border-color: var(--ilyt-accent);
}

.ilyt-cabinet-theme-form__options {
	border: 0;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.65rem;
}

.ilyt-cabinet-theme-form__option {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	padding: 0.85rem 1rem;
	border: 1px solid var(--ilyt-border);
	border-radius: 12px;
	background: var(--ilyt-surface);
	cursor: pointer;
}

.ilyt-cabinet-theme-form__option:has(input:checked) {
	border-color: var(--ilyt-accent);
	box-shadow: 0 0 0 1px color-mix(in srgb, var(--ilyt-accent) 35%, transparent);
}

.ilyt-cabinet-theme-form__option-body {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.ilyt-cabinet-theme-form__option-label {
	font-weight: 600;
	color: var(--ilyt-text);
}

.ilyt-cabinet-theme-form__option-hint {
	font-size: 0.875rem;
	color: var(--ilyt-muted);
}

.ilyt-theme-switcher {
	position: relative;
}

.ilyt-theme-switcher__menu {
	display: none !important;
}

[data-theme="dark"] img {
	opacity: var(--ilyt-image-dim, 0.85);
}

/* Header logo — full opacity, transparent PNG must show header background */
[data-theme="dark"] .ilyt-header__logo,
[data-theme="dark"] .ilyt-header__logo-stack,
[data-theme="dark"] .ilyt-header__logo-img {
	opacity: 1;
	background: transparent;
}

/* Post & card photos — always fully visible */
[data-theme="dark"] .ilyt-article__figure img,
[data-theme="dark"] .ilyt-post-gallery__item img,
[data-theme="dark"] .ilyt-article__content img,
[data-theme="dark"] .ilyt-post-photo img,
[data-theme="dark"] .ilyt-card__image img,
[data-theme="dark"] .ilyt-photo-of-day__link img,
[data-theme="dark"] .ilyt-meme-of-day__media img,
[data-theme="dark"] .wp-block-image img,
[data-theme="dark"] figure img {
	opacity: 1;
}

/* WordPress blocks / entry content */
[data-theme="dark"] .entry-content,
[data-theme="dark"] .ilyt-article__content {
	color: var(--ilyt-text);
}

[data-theme="dark"] .entry-content a {
	color: var(--ilyt-accent);
}

[data-theme="dark"] .wp-block-table td,
[data-theme="dark"] .wp-block-table th {
	border-color: var(--ilyt-border);
	color: var(--ilyt-text);
}

[data-theme="dark"] .wp-block-code,
[data-theme="dark"] pre,
[data-theme="dark"] code {
	background: var(--ilyt-surface);
	color: var(--ilyt-text);
	border-color: var(--ilyt-border);
}

/* Leaflet popups on dark pages */
[data-theme="dark"] .leaflet-popup-content-wrapper,
[data-theme="dark"] .leaflet-popup-tip {
	background: var(--ilyt-surface);
	color: var(--ilyt-text);
}

[data-theme="dark"] .leaflet-container {
	background: var(--ilyt-bg);
}

/* Post status chips (cabinet) */
[data-theme="dark"] .ilyt-post-status--pending {
	background: var(--ilyt-warn-bg);
	color: var(--ilyt-warn-text);
}

[data-theme="dark"] .ilyt-post-status--publish {
	background: var(--ilyt-success-bg);
	color: var(--ilyt-success-text);
}

[data-theme="dark"] .ilyt-post-status--trash {
	background: var(--ilyt-error-bg);
	color: var(--ilyt-error-text);
}

[data-theme="dark"] .ilyt-single-rail__card {
	background: var(--ilyt-surface);
	border-color: var(--ilyt-border);
}

[data-theme="dark"] .ilyt-single-rail__headline {
	color: var(--ilyt-text);
}

[data-theme="dark"] .ilyt-share--post,
[data-theme="dark"] .ilyt-share--profile {
	background: var(--ilyt-surface);
	border-color: var(--ilyt-border);
}

[data-theme="dark"] .ilyt-share--profile {
	background: transparent;
	border: 0;
}

[data-theme="dark"] .ilyt-share__link {
	background: var(--ilyt-bg);
	color: var(--ilyt-text);
}

[data-theme="dark"] .ilyt-share-panel .ilyt-share__link,
[data-theme="dark"] .ilyt-share-dropdown__item,
[data-theme="dark"] .ilyt-share--compact .ilyt-share__link {
	background: transparent;
	color: inherit;
}

/* Card placeholders */
[data-theme="dark"] .ilyt-card__image--placeholder {
	background: linear-gradient(135deg, var(--ilyt-border), var(--ilyt-surface));
}

[data-theme="dark"] .ilyt-card__title a {
	color: var(--ilyt-text);
}

[data-theme="dark"] .ilyt-card__title a:hover {
	color: var(--ilyt-accent);
}

/* Video embed */
[data-theme="dark"] .ilyt-video-embed {
	background: var(--ilyt-surface);
}

[data-theme="dark"] .ilyt-video-error {
	background: var(--ilyt-error-bg);
	color: var(--ilyt-error-text);
}

[data-theme="dark"] .ilyt-video-list__item {
	border-color: var(--ilyt-border);
	color: var(--ilyt-text);
}

/* Moderation */
[data-theme="dark"] .ilyt-moderation__alert.is-success {
	background: var(--ilyt-success-bg);
	color: var(--ilyt-success-text);
}

[data-theme="dark"] .ilyt-mod-badge {
	background: var(--ilyt-warn-bg);
	color: var(--ilyt-warn-text);
}

[data-theme="dark"] .ilyt-mod-reject {
	border-color: var(--ilyt-error-border);
	color: var(--ilyt-error-text);
}

[data-theme="dark"] .ilyt-mod-card__title,
[data-theme="dark"] .ilyt-mod-card__excerpt {
	color: var(--ilyt-text);
}

/* Board extras */
[data-theme="dark"] .ilyt-board-card__title {
	color: var(--ilyt-text);
}

[data-theme="dark"] .ilyt-board-type-btn--buy.is-selected,
[data-theme="dark"] .ilyt-board-type-btn--buy:hover {
	background: rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .ilyt-board-type-btn--sell.is-selected,
[data-theme="dark"] .ilyt-board-type-btn--sell:hover {
	background: rgba(22, 163, 74, 0.2);
}

[data-theme="dark"] .ilyt-board-verified {
	color: var(--ilyt-success-text);
}

[data-theme="dark"] .ilyt-board-fav-btn.is-active {
	color: var(--ilyt-warn-text);
}

[data-theme="dark"] .ilyt-board-single__price,
[data-theme="dark"] .ilyt-board-card__price {
	color: var(--ilyt-accent);
}

/* Navigation & header */
[data-theme="dark"] .ilyt-nav__list a,
[data-theme="dark"] .ilyt-nav__link,
[data-theme="dark"] .ilyt-nav__sublink {
	color: var(--ilyt-text);
}

[data-theme="dark"] .ilyt-nav__list a:hover,
[data-theme="dark"] .ilyt-nav__link:hover,
[data-theme="dark"] .ilyt-nav__sublink:hover {
	color: var(--ilyt-accent);
}

[data-theme="dark"] .ilyt-nav__submenu {
	background: var(--ilyt-surface);
	border-color: var(--ilyt-border);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .ilyt-rubric-subnav {
	background: var(--ilyt-surface);
	border-color: var(--ilyt-border);
}

[data-theme="dark"] .ilyt-rubric-subnav__link {
	color: var(--ilyt-text);
}

[data-theme="dark"] .ilyt-rubric-subnav__link:hover,
[data-theme="dark"] .ilyt-rubric-subnav__item.is-current .ilyt-rubric-subnav__link {
	color: var(--ilyt-accent);
}

[data-theme="dark"] .ilyt-header {
	background: var(--ilyt-surface);
	border-color: var(--ilyt-border);
}

[data-theme="dark"] .ilyt-search-form__input {
	color: var(--ilyt-text);
	background: var(--ilyt-bg);
	border-color: var(--ilyt-border);
}

[data-theme="dark"] .ilyt-search-form__input::placeholder {
	color: var(--ilyt-muted);
}

[data-theme="dark"] .ilyt-search-form__field--action {
	background: var(--ilyt-bg);
	border-color: var(--ilyt-border);
}

[data-theme="dark"] .ilyt-search-form__action {
	border-color: var(--ilyt-border);
	color: var(--ilyt-accent);
}

[data-theme="dark"] .ilyt-header-search__toggle {
	background: var(--ilyt-bg);
	border-color: var(--ilyt-border);
	color: var(--ilyt-text);
}

[data-theme="dark"] .ilyt-header-search__panel {
	background: var(--ilyt-surface);
	border-color: var(--ilyt-border);
}

/* Comments */
[data-theme="dark"] .comment-body,
[data-theme="dark"] .ilyt-comment__text {
	color: var(--ilyt-text);
}

[data-theme="dark"] .ilyt-comment__meta {
	color: var(--ilyt-muted);
}

/* Author page */
[data-theme="dark"] .ilyt-author-stats__item,
[data-theme="dark"] .ilyt-author-header__bio,
[data-theme="dark"] .ilyt-author-header__name {
	color: var(--ilyt-text);
}

[data-theme="dark"] .ilyt-author-header__level,
[data-theme="dark"] .ilyt-user-profile-level,
[data-theme="dark"] .ilyt-author-header__since {
	color: var(--ilyt-muted);
}

/* Ads placeholder */
[data-theme="dark"] .ilyt-ad-slot {
	background: var(--ilyt-surface);
	border-color: var(--ilyt-border);
	color: var(--ilyt-muted);
}

/* Tinted surfaces — text inherits container contrast (not global light headings) */
[data-theme="dark"] .ilyt-challenge-module :is(h2, h3, p, li, span, button:not(.ilyt-btn)),
[data-theme="dark"] .ilyt-challenge-form-note :is(span, button),
[data-theme="dark"] .ilyt-cabinet__alert :is(h2, h3, p, li, span),
[data-theme="dark"] .ilyt-form__alert :is(p, span),
[data-theme="dark"] .ilyt-toast :is(p, span),
[data-theme="dark"] .ilyt-comments__alert :is(p, span),
[data-theme="dark"] .ilyt-bayans-alert :is(p, span),
[data-theme="dark"] .ilyt-donations-notice :is(p, span),
[data-theme="dark"] .ilyt-donations-status :is(p, span),
[data-theme="dark"] .ilyt-bonuses-rubles-hint :is(p, span),
[data-theme="dark"] .ilyt-earnings-donate-required :is(p, span),
[data-theme="dark"] .ilyt-competition-active :is(h2, h3, p, li, span),
[data-theme="dark"] .ilyt-comment-hidden-banner :is(p, span),
[data-theme="dark"] .ilyt-oauth-panel__banner :is(p, span) {
	color: inherit;
}

[data-theme="dark"] .ilyt-cabinet__alert.is-info,
[data-theme="dark"] .ilyt-comments__alert.is-info {
	background: var(--ilyt-info-bg);
	color: var(--ilyt-info-text);
	border-color: var(--ilyt-info-border);
}

[data-theme="dark"] .ilyt-form__alert.is-success {
	background: var(--ilyt-success-bg);
	color: var(--ilyt-success-text);
}

[data-theme="dark"] .ilyt-form__alert.is-error {
	background: var(--ilyt-error-bg);
	color: var(--ilyt-error-text);
}

[data-theme="dark"] .ilyt-toast.is-success {
	background: var(--ilyt-success-bg);
	color: var(--ilyt-success-text);
	border-color: var(--ilyt-success-border);
}

[data-theme="dark"] .ilyt-toast.is-error {
	background: var(--ilyt-error-bg);
	color: var(--ilyt-error-text);
	border-color: var(--ilyt-error-border);
}

[data-theme="dark"] .ilyt-toast.is-info {
	background: var(--ilyt-info-bg);
	color: var(--ilyt-info-text);
	border-color: var(--ilyt-info-border);
}

[data-theme="dark"] .ilyt-competition-active {
	color: var(--ilyt-text);
}

[data-theme="dark"] .ilyt-competition-past-card {
	background: var(--ilyt-surface);
	border-color: var(--ilyt-border);
	color: var(--ilyt-text);
}

[data-theme="dark"] .ilyt-competition-past-card__title,
[data-theme="dark"] .ilyt-competition-past-card__desc,
[data-theme="dark"] .ilyt-competition-past-card__winner,
[data-theme="dark"] .ilyt-competition-past-card__gift {
	color: var(--ilyt-text);
}

[data-theme="dark"] .ilyt-content-char-counter.is-warning,
[data-theme="dark"] .ilyt-bayan-item__status,
[data-theme="dark"] .ilyt-user-status--bayanshik {
	color: var(--ilyt-warn-text);
}

[data-theme="dark"] .ilyt-bayan-item--resolved .ilyt-bayan-item__status {
	color: var(--ilyt-success-text);
}

[data-theme="dark"] .ilyt-urgent-lf :is(h2, h3, p, li, span, a) {
	color: inherit;
}

[data-theme="dark"] .ilyt-moderation__alert.is-success :is(p, span) {
	color: inherit;
}

[data-theme="dark"] .ilyt-lf-card__status--inactive {
	background: var(--ilyt-border);
	color: var(--ilyt-muted);
}

/* Mobile bottom navigation — rounded dark preset */
@media (max-width: 1024px) {
	[data-theme="dark"] .ilyt-mobile-nav {
		background: rgba(22, 27, 38, 0.94);
		border-color: rgba(255, 255, 255, 0.08);
		box-shadow:
			0 14px 40px rgba(0, 0, 0, 0.45),
			0 2px 8px rgba(0, 0, 0, 0.28),
			inset 0 1px 0 rgba(255, 255, 255, 0.04);
		backdrop-filter: blur(18px) saturate(140%);
		-webkit-backdrop-filter: blur(18px) saturate(140%);
	}

	[data-theme="dark"] .ilyt-mobile-nav__item {
		color: rgba(226, 232, 240, 0.72);
	}

	[data-theme="dark"] .ilyt-mobile-nav__item.is-active,
	[data-theme="dark"] .ilyt-mobile-nav__item:hover,
	[data-theme="dark"] .ilyt-mobile-nav__item:focus-visible {
		color: #fff;
	}

	[data-theme="dark"] .ilyt-mobile-nav__item.is-active {
		color: var(--ilyt-accent);
	}

	[data-theme="dark"] .ilyt-mobile-nav__item.is-active .ilyt-mobile-nav__icon-wrap,
	[data-theme="dark"] .ilyt-mobile-nav__item:hover .ilyt-mobile-nav__icon-wrap,
	[data-theme="dark"] .ilyt-mobile-nav__item:focus-visible .ilyt-mobile-nav__icon-wrap {
		background: rgba(255, 255, 255, 0.1);
	}

	[data-theme="dark"] .ilyt-mobile-nav__badge {
		box-shadow: 0 0 0 2px rgba(22, 27, 38, 0.96);
	}

	[data-theme="dark"] .ilyt-mobile-nav__dismiss {
		border-color: rgba(255, 255, 255, 0.12);
		background: rgba(22, 27, 38, 0.96);
		color: rgba(226, 232, 240, 0.85);
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
	}

	[data-theme="dark"] .ilyt-mobile-shell__search,
	[data-theme="dark"] .ilyt-mobile-shell__panel {
		background: rgba(22, 27, 38, 0.96);
		border-color: rgba(255, 255, 255, 0.08);
		box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.28);
	}

	[data-theme="dark"] .ilyt-mobile-shell__panel-head {
		border-bottom-color: rgba(255, 255, 255, 0.08);
	}

	[data-theme="dark"] .ilyt-mobile-shell__panel-close {
		background: rgba(255, 255, 255, 0.08);
		color: rgba(226, 232, 240, 0.85);
	}

	[data-theme="dark"] .ilyt-mobile-shell__backdrop {
		background: rgba(0, 0, 0, 0.55);
	}

	[data-theme="dark"] .ilyt-mobile-menu__item {
		border-bottom-color: rgba(255, 255, 255, 0.08);
	}

	[data-theme="dark"] .ilyt-mobile-menu__link:hover,
	[data-theme="dark"] .ilyt-mobile-menu__action:hover,
	[data-theme="dark"] .ilyt-mobile-menu__toggle:hover {
		background: rgba(255, 255, 255, 0.05);
	}

	[data-theme="dark"] .ilyt-mobile-menu__sub {
		background: rgba(255, 255, 255, 0.03);
	}

	[data-theme="dark"] .ilyt-mobile-mast__row--main-nav {
		border-top-color: rgba(255, 255, 255, 0.08);
	}

	[data-theme="dark"] .ilyt-mobile-mast__main-link:hover,
	[data-theme="dark"] .ilyt-mobile-mast__main-link:focus-visible {
		background: rgba(255, 255, 255, 0.06);
	}

	[data-theme="dark"] .ilyt-mobile-mast__burger {
		border-color: rgba(255, 255, 255, 0.12);
		background: rgba(255, 255, 255, 0.04);
	}

	[data-theme="dark"] .ilyt-mobile-header-menu__panel {
		background: rgba(22, 27, 38, 0.98);
		border-color: rgba(255, 255, 255, 0.1);
		box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 6px 16px rgba(0, 0, 0, 0.28);
	}

	[data-theme="dark"] .ilyt-mobile-header-menu__head {
		border-bottom-color: rgba(255, 255, 255, 0.08);
	}

	[data-theme="dark"] .ilyt-mobile-header-menu__close {
		background: rgba(255, 255, 255, 0.08);
		color: rgba(226, 232, 240, 0.9);
	}

	[data-theme="dark"] .ilyt-mobile-header-menu__link {
		border-color: rgba(255, 255, 255, 0.12);
		background: rgba(255, 255, 255, 0.03);
		color: rgba(226, 232, 240, 0.92);
	}

	[data-theme="dark"] .ilyt-mobile-header-menu__link:hover,
	[data-theme="dark"] .ilyt-mobile-header-menu__link:focus-visible {
		border-color: var(--ilyt-accent);
		background: rgba(220, 38, 38, 0.12);
	}
}
