/* =========================================================
   DLE GURU — шаблон для DataLife Engine 21 · Авторы: doz (https://dle.guru/) и Claude (Anthropic)
   ========================================================= */

/* Мост к системным стилям DLE (css/engine.css из стандартного шаблона):
   переменные движка берут цвета и размеры DLE Guru */
:root {
	--app-em: 16px;
	--surface: var(--card); --surface-soft: var(--card-2); --surface-sunk: var(--bg);
	--line: var(--border); --hair: 1px;
	--accent-strong: var(--accent); --accent-hover-soft: var(--accent-soft); --accent-ink: #fff;
	--positive: var(--success); --positive-soft: rgba(34, 197, 94, .12);
	--negative: var(--danger); --negative-soft: var(--danger-soft);
	--warn: #b7791f; --warn-soft: rgba(245, 158, 11, .14);
	--sage: #22c55e; --sage-soft: rgba(34, 197, 94, .12); --sage-ink: #15803d;
	--star: #f5a524; --star-off: var(--border); --news-text: var(--text-2);
	--sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;
	--r-xs: 6px; --r-sm: 8px; --r-md: 12px; --r-lg: 14px; --r-pill: 999px;
	--fs-meta: 14px; --fs-sm: 15px; --fs-ui: 15px; --fs-h4: 20px; --font-size-xs: 12px;
	--control-h: 46px;
	--shadow-tiny: 0 2px 8px rgba(16, 24, 40, .06);
	--shadow-soft: 0 8px 24px rgba(16, 24, 40, .08);
	--shadow-menu: var(--shadow-lg); --shadow-modal: var(--shadow-lg);
	--code-operator: #8a5f2b;
}

:root {
	--bg: #f0f2f6;
	--card: #ffffff;
	--card-2: #f2f4f7;
	--text: #0f1218;
	--text-2: #3a404b;
	--muted: #666c77;
	--border: #e6e8ed;
	--hover: #f2f4f7;
	--accent: #3f5f8f;
	--accent-2: #344f78;
	--accent-soft: rgba(63, 95, 143, .1);
	--danger: #c0574f;
	--danger-soft: rgba(192, 87, 79, .1);
	--logo-ink: #22345a;
	--success: #22c55e;
	--shadow: 0 1px 2px rgba(16, 24, 40, .04);
	--shadow-lg: 0 24px 64px rgba(16, 24, 40, .18);
	--overlay: rgba(20, 22, 28, .45);
	--radius: 22px;
	--radius-sm: 14px;
	--header-h: 78px;
	--font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	color-scheme: light;
}

:root[data-theme="dark"] {
	--warn: #f5c26b; --sage-ink: #86efac;
	--bg: #111317;
	--card: #1a1d22;
	--card-2: #22262c;
	--text: #f2f3f5;
	--text-2: #c9ccd2;
	--muted: #8b919b;
	--border: #272b32;
	--hover: #22262c;
	--accent: #6283b8;
	--accent-2: #7290c2;
	--accent-soft: rgba(98, 131, 184, .16);
	--danger: #d07b70;
	--danger-soft: rgba(208, 123, 112, .14);
	--logo-ink: #f2f3f5;
	--shadow: none;
	--shadow-lg: 0 24px 64px rgba(0, 0, 0, .5);
	--overlay: rgba(0, 0, 0, .6);
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 400 16px/1.5 var(--font);
	-webkit-font-smoothing: antialiased;
	transition: background .2s, color .2s;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0; }

.ico { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 2000; padding: 10px 16px; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 600; transition: top .15s; }
.skip-link:focus { top: 12px; color: #fff; }
.logo-h { margin: 0; font: inherit; }
.muted { color: var(--muted); font-weight: 400; }
.link { color: var(--accent); font-weight: 500; }
.link:hover { text-decoration: underline; }
.dot { color: var(--muted); margin: 0 4px; }
.hide-sm {}

.container { width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.header {
	position: sticky; top: 0; z-index: 50;
	height: var(--header-h);
	background: var(--card);
	border-bottom: 1px solid var(--border);
}
.header__inner {
	height: 100%;
	display: grid;
	grid-template-columns: 290px minmax(0, 1fr) auto;
	align-items: center;
	gap: 24px;
}
.logo { font-size: 26px; font-weight: 800; letter-spacing: -.03em; padding-left: 14px; }
.logo__text, .auth__logo { color: var(--logo-ink); }
.logo__dot { color: #e9a93a; }
[data-theme="dark"] .logo__dot { color: #f2b84b; }
/* Префикс группы из настроек DLE (по умолчанию color:red) — в тон сайта */
[style*="color:red"], [style*="color: red"], [style*="color:#ff0000"], [style*="color:#FF0000"], font[color="red"] { color: var(--danger) !important; }

.search {
	position: relative;
	max-width: 586px;
	width: 100%;
}
.search .search__input {
	width: 100%;
	height: 52px;
	padding: 0 92px 0 50px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: var(--card-2);
	outline: none;
	font-size: 17px;
	transition: border-color .15s, background .15s;
}
.search__input::placeholder { color: var(--muted); }
.search .search__input:focus { border-color: var(--accent); background: var(--card); }
.search__input::-webkit-search-cancel-button { display: none; }
.search__ico { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search__kbd { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); display: flex; gap: 4px; }
kbd {
	min-width: 26px; height: 24px; padding: 0 6px;
	display: inline-grid; place-items: center;
	border: 1px solid var(--border); border-radius: 7px;
	background: var(--card); color: var(--muted);
	font: 500 12px var(--font);
}

.header__actions { display: flex; align-items: center; gap: 14px; }

.btn-icon {
	width: 52px; height: 52px;
	display: inline-grid; place-items: center;
	border-radius: 50%;
	background: var(--card-2);
	color: var(--text);
	transition: background .15s, color .15s;
}
.btn-icon:hover { background: var(--border); }
.btn-icon--sm { width: 36px; height: 36px; }
.btn-icon--sm .ico { width: 18px; height: 18px; }

.theme-toggle .ico--dark { display: none; }
.theme-toggle .ico { width: 22px; height: 22px; }
[data-theme="dark"] .theme-toggle .ico--light { display: none; }
[data-theme="dark"] .theme-toggle .ico--dark { display: inline-block; }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	height: 52px; padding: 0 24px;
	border-radius: 999px;
	border: 1px solid transparent;
	font-size: 17px; font-weight: 600;
	white-space: nowrap;
	transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn--outline { border-color: var(--border); background: var(--card); }
.btn--outline:hover { background: var(--hover); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-2); }
.btn--dark { background: var(--text); color: var(--card); }
.btn--white { background: var(--card); border-color: var(--border); }
.btn--white:hover { background: var(--hover); }
.btn--sm { height: 40px; padding: 0 20px; font-size: 14px; }
.btn--lg { height: 54px; padding: 0 30px; font-size: 18px; }
.btn--block { width: 100%; }

.user-btn {
	height: 52px; padding: 0 22px 0 8px;
	display: inline-flex; align-items: center; gap: 10px;
	border: 1px solid var(--border); border-radius: 999px;
	background: var(--card);
	font-size: 17px; font-weight: 600;
	position: relative;
}
.user-btn:hover { background: var(--hover); }
.user-btn__ava { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.badge {
	position: absolute; top: -2px; right: -2px;
	min-width: 20px; height: 20px; padding: 0 6px;
	border-radius: 999px; background: var(--danger); color: #fff;
	font-size: 12px; font-weight: 700; display: grid; place-items: center;
}

/* ---------- Layout ---------- */
.layout {
	display: grid;
	grid-template-columns: 290px minmax(0, 1fr) 390px;
	gap: 30px;
	align-items: start;
	padding-top: 30px;
	padding-bottom: 60px;
}
.main { min-width: 0; max-width: 832px; width: 100%; justify-self: center; display: flex; flex-direction: column; gap: 20px; }
.main > *:empty { display: none; }

.sidebar, .aside { position: sticky; top: calc(var(--header-h) + 30px); }
.aside { display: flex; flex-direction: column; gap: 20px; }

/* ---------- Left menu ---------- */
.menu { display: flex; flex-direction: column; gap: 2px; }
.menu__item {
	display: flex; align-items: center; gap: 18px;
	height: 44px; padding: 0 16px 0 20px;
	border-radius: 14px;
	font-size: 18px; font-weight: 500; color: var(--text-2);
	transition: background .15s, color .15s;
}
.menu__item .ico { width: 22px; height: 22px; color: var(--text-2); }
.menu__item:hover { background: var(--hover); color: var(--text); }
.menu__item.is-active { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.menu__item.is-active .ico { color: var(--accent); }
.menu__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu__count { color: var(--muted); font-size: 14px; }
.menu__hash { color: var(--muted) !important; }
.menu__sub { padding-left: 24px; }
.menu-title {
	margin: 34px 0 10px; padding-left: 16px;
	font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
	color: var(--muted);
}

/* ---------- Cards ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.block { padding: 30px; }
.title-line {
	position: relative;
	padding-left: 14px;
	font-size: 22px; font-weight: 700;
	margin-bottom: 22px;
}
.title-line::before {
	content: ""; position: absolute; left: 0; top: 3px; bottom: 3px;
	width: 4px; border-radius: 4px; background: var(--accent);
}
.section-title { font-size: 22px; font-weight: 700; margin: 10px 0 20px; }

.speedbar { color: var(--muted); font-size: 16px; padding: 0 2px; }
.speedbar a { color: var(--muted); }
.speedbar a:hover { color: var(--text); }

.page-head { padding: 30px; }
.page-head__title { font-size: 34px; font-weight: 700; }
.page-head__text { color: var(--text-2); margin-top: 16px; font-size: 17px; }
.page-head__text > :first-child { margin-top: 0; }
.page-head__text > :last-child { margin-bottom: 0; }
.page-head__text p { margin: 0 0 12px; }
.page-head__text ul { margin: 0 0 12px; padding-left: 22px; }
.page-head__text li + li { margin-top: 4px; }

/* ---------- Post ---------- */
.post { padding: 26px 30px 22px; }
.post__head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.post__meta { flex: 1; min-width: 0; }
.post__author { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 17px; }
.post__author a:hover { color: var(--accent); }
.verified { width: 18px; height: 18px; }
.post__sub { font-size: 14px; color: var(--muted); }
.post__cat a { color: var(--accent); font-weight: 500; }
.post__title { font-size: 24px; font-weight: 700; line-height: 1.3; }
.post__title a:hover { color: var(--accent); }
.post__title--lg { font-size: 36px; line-height: 1.15; letter-spacing: -.02em; margin-bottom: 22px; }
.post__text { color: var(--text-2); font-size: 17px; line-height: 1.65; margin-top: 12px; }
.post__text img { display: none; }
.post__img { display: block; margin-top: 20px; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 16/9; background: var(--card-2); }
.post__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
a.post__img:hover img { transform: scale(1.02); }
.post__img--full { margin: 0 0 24px; }
.post__body { font-size: 19px; }
.post__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.post--full .post__foot { margin-top: 26px; }

.avatar {
	width: 50px; height: 50px; border-radius: 50%;
	display: grid; place-items: center; flex: none;
	background: #17181c center/cover no-repeat;
	color: #fff; font-weight: 700; font-size: 18px; text-transform: uppercase;
	overflow: hidden;
}
.avatar--lg { width: 50px; height: 50px; }

.actions { display: flex; align-items: center; gap: 18px; }
.rate {
	display: inline-flex; align-items: center; gap: 8px;
	height: 44px; padding: 0 14px;
	border-radius: 999px; background: var(--card-2);
	font-size: 17px; color: var(--text-2);
}
.rate a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); transition: color .15s; }
.rate a:first-child:hover { color: var(--success); }
.rate a:last-child:hover { color: var(--danger); }
.rate--sm { height: 34px; padding: 0 10px; font-size: 14px; }
.rate--sm .ico { width: 16px; height: 16px; }
.stat { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 17px; }
a.stat:hover { color: var(--accent); }
.fav, .actions > a:not(.stat) { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--text-2); transition: color .15s, background .15s; }
.fav:hover, .actions > a:not(.stat):hover { color: var(--accent); background: var(--hover); }
.fav.is-active { color: var(--accent); }

/* Text content */
.text { line-height: 1.7; color: var(--text); }
.text p { margin: 0 0 1em; }
.text p:last-child { margin-bottom: 0; }
.text a { color: var(--accent); }
.text a:hover { text-decoration: underline; }
.text img { border-radius: var(--radius-sm); margin: 1em 0; }
.text h2, .text h3 { margin: 1.4em 0 .6em; }
.text blockquote, .text .quote {
	margin: 1.2em 0; padding: 16px 20px;
	border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0;
	background: var(--card-2); color: var(--text-2);
}
.text ul, .text ol { padding-left: 1.3em; }
.text pre, .text code { background: var(--card-2); border-radius: 8px; font-size: .9em; }
.text pre { padding: 14px 16px; overflow: auto; }
.text code { padding: 2px 6px; }
.text table { width: 100%; border-collapse: collapse; }
.text td, .text th { border: 1px solid var(--border); padding: 8px 12px; }
.text iframe, .text video { max-width: 100%; border-radius: var(--radius-sm); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tags a { padding: 6px 14px; border-radius: 999px; background: var(--card-2); font-size: 14px; }
.tags a:hover { background: var(--accent-soft); color: var(--accent); }

/* Prev / Next */
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.prevnext:empty { display: none; }
.prevnext__item { padding: 20px 24px; display: flex; flex-direction: column; gap: 10px; transition: transform .15s; }
.prevnext__item:hover { transform: translateY(-2px); }
.prevnext__item--next { text-align: right; align-items: flex-end; grid-column: 2; }
.prevnext__label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 16px; }
.prevnext__label .ico { width: 18px; height: 18px; }
.prevnext__title {
	font-size: 19px; font-weight: 600; line-height: 1.4;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.prevnext__item:hover .prevnext__title { color: var(--accent); }

/* Mini cards (related & popular) */
.related { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; }
.mini { display: flex; gap: 14px; align-items: center; min-width: 0; }
.mini__img {
	position: relative; flex: none;
	width: 70px; height: 70px; border-radius: 14px;
	background: var(--card-2);
}
.mini__img img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.mini__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mini__date { font-size: 14px; color: var(--muted); }
.mini__title {
	font-size: 16px; font-weight: 600; line-height: 1.4;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
	transition: color .15s;
}
.mini:hover .mini__title { color: var(--accent); }

/* ---------- Right widgets ---------- */
.widget { padding: 28px 30px; }
.widget__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.widget__head .title-line { margin: 0; }
.widget__more { color: var(--muted); font-size: 16px; }
.widget__more:hover { color: var(--accent); }
.widget__title { font-size: 22px; font-weight: 700; margin-bottom: 22px; }

.popular { display: flex; flex-direction: column; gap: 18px; counter-reset: pop; }
.mini--num .mini__img::before {
	counter-increment: pop; content: counter(pop);
	position: absolute; top: -9px; left: -7px; z-index: 1;
	width: 26px; height: 26px; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--text); color: var(--card);
	border: 2px solid var(--card);
	font-size: 14px; font-weight: 700;
}
[data-theme="dark"] .mini--num .mini__img::before { background: #fff; color: #000; }


.donate {
	display: flex; align-items: center; gap: 18px;
	padding: 20px 24px; border-radius: var(--radius);
	background: var(--accent-soft); color: var(--text);
	border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
	transition: transform .15s, box-shadow .15s, background .15s;
}
.donate:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--accent) 16%, transparent); box-shadow: 0 10px 26px rgba(63, 95, 143, .14); }
.donate__ico { width: 46px; height: 46px; border-radius: 14px; background: var(--accent); color: #f2b84b; display: grid; place-items: center; flex: none; }
.donate__arrow { color: var(--accent); transition: transform .15s; }
.donate:hover .donate__arrow { transform: translateX(3px); }
.donate__ico .ico { width: 22px; height: 22px; animation: donate-beat 1.6s ease-in-out infinite; }
.donate__text { flex: 1; display: flex; flex-direction: column; font-size: 16px; }
.donate__text b { font-size: 18px; }
.donate__text span { color: var(--text-2); font-size: 15px; }
@keyframes donate-beat { 0%, 60%, 100% { transform: scale(1); } 30% { transform: scale(1.15); } }

.footer { padding: 0 10px; color: var(--muted); font-size: 16px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer__links a:hover { color: var(--text); }
.footer__copy { margin-top: 18px; line-height: 1.5; }
.socials { display: flex; gap: 10px; margin-top: 20px; }
.socials a {
	width: 42px; height: 42px; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--card); color: var(--text-2);
	transition: color .15s, background .15s;
}
.socials a:hover { background: var(--accent); color: #fff; }
.socials .ico { width: 18px; height: 18px; }

/* ---------- Pagination ---------- */
.pagination {
	display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px;
	padding: 16px 0;
}
.pagination a, .pagination span {
	min-width: 52px; height: 52px; padding: 0 8px;
	display: grid; place-items: center;
	border-radius: 50%;
	background: var(--card); color: var(--text);
	font-weight: 600; font-size: 17px;
	transition: background .15s, color .15s;
}
.pagination a:hover { background: var(--accent-soft); color: var(--accent); }
.pagination span { background: var(--accent); color: #fff; }
.pagination > span:has(svg), .pagination > span:has(.ico) { background: var(--card); color: var(--muted); }
.pagination span.nav_ext { background: transparent; color: var(--muted); }

/* ---------- Comments ---------- */
.addcomment { display: flex; flex-direction: column; gap: 16px; }
.addcomment__editor textarea, .addcomment textarea,
.input {
	width: 100%;
	padding: 20px 24px;
	border: 1px solid var(--border); border-radius: 16px;
	background: var(--card);
	font-size: 18px;
	outline: none;
	transition: border-color .15s, box-shadow .15s;
}
.addcomment textarea { min-height: 146px; resize: vertical; }
.input { padding: 16px 24px; }
textarea.input { resize: vertical; }
.input::placeholder, .addcomment textarea::placeholder { color: var(--muted); }
.input:focus, .addcomment textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.addcomment__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 26px; }

.comments-list { margin-top: 10px; }
.comments-list:empty { display: none; }
.comment { display: flex; gap: 14px; padding: 22px 0; border-top: 1px solid var(--border); }
.comment__ava img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.comment__main { flex: 1; min-width: 0; }
.comment__head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.comment__author { font-weight: 600; }
.comment__date { color: var(--muted); font-size: 14px; }
.comment__text { font-size: 16px; }
.comment__sign { margin-top: 8px; color: var(--muted); font-size: 14px; }
.comment__foot { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 10px; font-size: 14px; color: var(--muted); }
.comment__foot > a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.comment__foot > a:hover { color: var(--accent); }
.comment__foot .ico { width: 16px; height: 16px; }
.comment__mass { margin-left: auto; }
.comments-tree-list { list-style: none; padding: 0; margin: 0; }
.comments-tree-list .comments-tree-list { padding-left: 40px; }

.online-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); display: inline-block; }

/* ---------- Forms ---------- */
.form-row { display: grid; gap: 16px; margin-bottom: 4px; }
.form-row--2 { grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.field { display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }
.form-row .field { margin-bottom: 0; }
.modal__body .form-row { margin-bottom: 26px; }
.label { font-size: 17px; font-weight: 500; color: var(--text-2); }
.select select {
	width: 100%; height: 64px; padding: 0 44px 0 28px;
	border: 1px solid var(--border); border-radius: 16px;
	background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 18px center;
	-webkit-appearance: none; appearance: none;
	font-size: 18px; outline: none;
}
.select select:focus { border-color: var(--accent); }
.checks { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 16px; color: var(--text-2); }
.check input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.captcha { grid-template-columns: auto 1fr; align-items: center; }

/* ---------- Dropdown ---------- */
.dropdown { position: relative; }
.dropdown__menu {
	position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
	min-width: 230px; padding: 8px;
	background: var(--card); border: 1px solid var(--border); border-radius: 16px;
	box-shadow: var(--shadow-lg);
	display: none; flex-direction: column;
}
.dropdown.is-open .dropdown__menu { display: flex; animation: pop .15s ease-out; }
.dropdown__menu > a, .dropdown__menu > button {
	display: flex; align-items: center; gap: 12px;
	padding: 10px 12px; border-radius: 10px;
	font-size: 15px; font-weight: 500; text-align: left; width: 100%;
	color: var(--text);
}
.dropdown__menu > a:hover, .dropdown__menu > button:hover { background: var(--hover); }
.dropdown__menu .ico { width: 18px; height: 18px; color: var(--muted); }
.dropdown__menu .is-danger, .dropdown__menu .is-danger .ico { color: var(--danger); }
.dropdown__sep { height: 1px; background: var(--border); margin: 6px 4px; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 20px; }
.modal.is-open { display: grid; }
.modal__overlay { position: absolute; inset: 0; background: var(--overlay); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .2s; }
.modal__box {
	position: relative; z-index: 1;
	width: 100%; max-height: calc(100vh - 40px);
	background: var(--card); border-radius: 30px;
	box-shadow: var(--shadow-lg);
	animation: rise .25s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } }
body.modal-open { overflow: hidden; }

.modal__box--form { max-width: 750px; display: flex; flex-direction: column; overflow: hidden; }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 26px 26px 26px 40px; border-bottom: 1px solid var(--border); }
.modal__head h3 { font-size: 28px; font-weight: 700; }
.modal__head .btn-icon { width: 44px; height: 44px; }
.modal__body { padding: 30px 40px 10px; overflow-y: auto; flex: 1; }
.modal__foot { padding: 24px 30px; border-top: 1px solid var(--border); }
.modal__body::-webkit-scrollbar { width: 6px; }
.modal__body::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 6px; }

.ava-edit { display: flex; align-items: center; gap: 26px; padding: 26px; border-radius: 18px; background: var(--card-2); margin-bottom: 32px; }
.ava-edit__img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; flex: none; background: var(--border); }
.ava-edit__title { font-size: 20px; }
.ava-edit__hint { color: var(--muted); font-size: 15px; margin: 6px 0 12px; }
.ava-edit__btns { display: flex; flex-wrap: wrap; gap: 10px; }
.ava-edit__btns label { cursor: pointer; }
.ava-edit__btns label.is-active { border-color: var(--danger); color: var(--danger); }

/* Auth modal */
.modal__box--auth { max-width: 1026px; display: grid; grid-template-columns: 425px 1fr; padding: 13px; border-radius: 26px; }
.auth__promo {
	border-radius: 20px; padding: 40px;
	background: linear-gradient(140deg, #2f4a73 0%, #3f5f8f 60%, #52729f 100%);
	color: #fff;
	display: flex; flex-direction: column; justify-content: space-between; min-height: 490px;
}
.auth__logo { display: flex; align-items: center; gap: 12px; font-size: 28px; font-weight: 800; }
.auth__logo .ico { width: 26px; height: 26px; }
.auth__promo h3 { font-size: 30px; font-weight: 800; line-height: 1.2; margin-bottom: 26px; }
.auth__promo ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; font-size: 18px; font-weight: 500; }
.auth__promo li { display: flex; align-items: center; gap: 14px; }
.auth__promo li span { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .18); display: grid; place-items: center; }
.auth__promo li .ico { width: 18px; height: 18px; }
.auth__form { position: relative; padding: 46px 32px 20px 30px; display: flex; flex-direction: column; justify-content: center; }
.modal__close { position: absolute; top: 12px; right: 12px; width: 46px; height: 46px; }
.auth__title { font-size: 30px; font-weight: 800; }
.auth__sub { color: var(--text-2); margin: 10px 0 30px; font-size: 17px; }
.float-field {
	position: relative; display: flex; flex-direction: column;
	padding: 10px 24px; margin-bottom: 24px;
	border: 1px solid var(--border); border-radius: 16px; background: var(--card-2);
	transition: border-color .15s, box-shadow .15s;
}
.float-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--card); }
.float-field span { font-size: 14px; color: var(--muted); }
.float-field input { border: 0; outline: none; background: transparent; font-size: 19px; padding: 2px 40px 2px 0; }
.float-field__eye { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.float-field__eye:hover { color: var(--text); }
.auth__lost { align-self: flex-end; color: var(--accent); font-size: 17px; margin: -6px 0 24px; }
.auth__reg { text-align: center; color: var(--text-2); margin-top: 26px; font-size: 17px; }
.auth__reg a { color: var(--accent); }

/* ---------- Profile ---------- */
.main:has(.profile) { max-width: none; grid-column: 2 / 4; }
.layout:has(.profile) .aside { display: none; }
.profile { position: relative; z-index: 2; }
.profile__cover { height: 225px; border-radius: var(--radius) var(--radius) 0 0; background: linear-gradient(110deg, #3f5f8f 0%, #6683ad 45%, #d3dbe7 100%); }
[data-theme="dark"] .profile__cover { background: linear-gradient(110deg, #3f5f8f 0%, #344f78 45%, #1f2633 100%); }
.profile__bar { display: flex; align-items: flex-start; gap: 26px; padding: 0 30px; }
.profile__ava { position: relative; margin-top: -54px; flex: none; }
.profile__ava img { width: 136px; height: 136px; border-radius: 50%; object-fit: cover; border: 5px solid var(--card); background: var(--card-2); }
.profile__online { position: absolute; right: 10px; bottom: 10px; width: 24px; height: 24px; border-radius: 50%; background: var(--success); border: 4px solid var(--card); }
.profile__info { flex: 1; min-width: 0; padding-top: 16px; }
.profile__name { display: flex; align-items: center; gap: 8px; font-size: 30px; font-weight: 700; }
.profile__name .verified { width: 22px; height: 22px; }
.group-badge { display: inline-block; margin-top: 6px; padding: 3px 12px; border-radius: 999px; background: var(--danger-soft); color: var(--danger); font-size: 15px; font-weight: 600; }
.group-badge:empty { display: none; }
.profile__btns { display: flex; align-items: center; gap: 12px; padding-top: 30px; }
.profile__btns .btn { height: 46px; }
.profile__btns .btn-icon { width: 50px; height: 50px; }
.tabs { display: flex; gap: 8px; padding: 0 30px; margin-top: 18px; }
.tabs__item { padding: 14px 16px 16px; font-size: 18px; font-weight: 500; color: var(--text-2); border-bottom: 2px solid transparent; }
.tabs__item:hover { color: var(--text); }
.tabs__item.is-active { color: var(--accent); border-bottom-color: var(--accent); }

.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) 375px; gap: 20px; align-items: start; }
.profile-grid__side { display: flex; flex-direction: column; gap: 20px; }
.about { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 16px; color: var(--text-2); font-size: 17px; }
.about li { display: flex; align-items: center; gap: 10px; }
.about .ico { width: 18px; height: 18px; color: var(--muted); }
.about__online { color: var(--success) !important; font-weight: 500; }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.metric { padding: 26px; display: flex; flex-direction: column; }
.metric__label { color: var(--text-2); font-size: 16px; }
.metric__value { font-size: 36px; font-weight: 500; margin: 8px 0 14px; line-height: 1.2; }
.metric__value small { font-size: 15px; color: var(--accent); font-weight: 500; }
.metric__value--rate { color: var(--success); }
.metric__link { color: var(--accent); font-weight: 500; margin-top: auto; }
.metric--ico { flex-direction: row; align-items: center; justify-content: space-between; }
.metric--ico .metric__value { margin: 4px 0 0; font-weight: 700; font-size: 30px; }
.metric__ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--card-2); color: var(--accent); flex: none; }
.metric__ico .ico { width: 26px; height: 26px; }

/* ---------- Stats page ---------- */
.stats-hero { text-align: center; padding: 30px 20px 20px; }
.stats-hero__ico { width: 64px; height: 64px; border-radius: 18px; background: var(--accent); color: #fff; display: inline-grid; place-items: center; margin-bottom: 22px; }
.stats-hero__ico .ico { width: 30px; height: 30px; }
.stats-hero h1 { font-size: 36px; font-weight: 700; }
.stats-hero p { color: var(--text-2); font-size: 18px; max-width: 640px; margin: 22px auto 0; }
.stat-table__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.stat-table__head h3 { font-size: 24px; font-weight: 700; }
.stat-table__head p { color: var(--muted); margin-top: 4px; }
.stat-table ul { list-style: none; margin: 0; padding: 0; }
.stat-table li { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 17px; }
.stat-table li:last-child { border-bottom: 0; padding-bottom: 0; }
.topusers table { width: 100%; border-collapse: collapse; }
.topusers td, .topusers th { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; }

/* ---------- Info / alerts ---------- */
.alert { padding: 24px 28px; border-left: 4px solid var(--accent); }
.alert__title { font-size: 20px; margin-bottom: 8px; }
.alert__text { color: var(--text-2); }

/* ---------- Mobile nav ---------- */
.mobnav { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1440px) {
	.layout { grid-template-columns: 240px minmax(0, 1fr) 340px; gap: 24px; }
	.header__inner { grid-template-columns: 240px minmax(0, 1fr) auto; }
	.menu__item { font-size: 17px; }
}

@media (max-width: 1200px) {
	.main:has(.profile) { grid-column: 2; }
	.layout { grid-template-columns: 220px minmax(0, 1fr); }
	.header__inner { grid-template-columns: 220px minmax(0, 1fr) auto; }
	.aside { grid-column: 2; position: static; display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
	.profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
	:root { --header-h: 64px; --radius: 18px; }
	.container { padding: 0 16px; }
	.header__inner { grid-template-columns: auto 1fr auto; gap: 14px; }
	.logo { font-size: 22px; padding-left: 0; }
	.search__input { height: 44px; font-size: 16px; padding-right: 16px; }
	.search__kbd { display: none; }
	.btn-icon, .user-btn, .btn { height: 44px; }
	.btn-icon { width: 44px; }
	.user-btn { padding: 0 6px; }
	.user-btn__ava { width: 32px; height: 32px; }
	.hide-sm { display: none !important; }

	.layout { grid-template-columns: 1fr; padding-top: 16px; padding-bottom: 90px; gap: 16px; }
	.aside { grid-column: 1; grid-template-columns: 1fr; }
	.main:has(.profile) { grid-column: 1; }
	.sidebar {
		position: fixed; top: 0; bottom: 0; left: 0; z-index: 90;
		width: 290px; padding: 24px 12px;
		background: var(--bg); overflow-y: auto;
		transform: translateX(-100%); transition: transform .25s;
		box-shadow: var(--shadow-lg);
	}
	body.sidebar-open .sidebar { transform: none; }
	body.sidebar-open::after { content: ""; position: fixed; inset: 0; z-index: 80; background: var(--overlay); }

	.mobnav {
		position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 70;
		display: flex; justify-content: space-around; padding: 8px;
		background: var(--card); border: 1px solid var(--border); border-radius: 999px;
		box-shadow: var(--shadow-lg);
	}
	.mobnav a, .mobnav button { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; color: var(--text-2); }
	.mobnav a:hover, .mobnav button:hover { background: var(--hover); color: var(--accent); }

	.post, .block, .widget, .page-head { padding: 20px; }
	.post__title { font-size: 20px; }
	.post__title--lg { font-size: 26px; }
	.post__body { font-size: 17px; }
	.post__text { font-size: 16px; }
	.actions { gap: 12px; }
	.rate { height: 38px; font-size: 15px; }
	.stat { font-size: 15px; }
	.prevnext { grid-template-columns: 1fr; gap: 12px; }
	.prevnext__item--next { grid-column: auto; }
	.related { grid-template-columns: 1fr; gap: 18px; }
	.metrics { grid-template-columns: 1fr; gap: 12px; }
	.form-row--2 { grid-template-columns: 1fr; }
	.addcomment__foot { flex-direction: column; align-items: stretch; }

	.profile__cover { height: 140px; }
	.profile__bar { flex-wrap: wrap; padding: 0 20px; gap: 12px 18px; }
	.profile__ava img { width: 104px; height: 104px; }
	.profile__ava { margin-top: -44px; }
	.profile__name { font-size: 24px; }
	.profile__btns { width: 100%; padding-top: 0; }
	.tabs { padding: 0 20px; }

	.modal { padding: 0; align-items: end; }
	.modal__box { max-height: 92vh; border-radius: 24px 24px 0 0; }
	.modal__box--auth { grid-template-columns: 1fr; padding: 0; overflow-y: auto; }
	.auth__promo { display: none; }
	.auth__form { padding: 40px 22px 28px; }
	.modal__head { padding: 18px 18px 18px 22px; }
	.modal__head h3 { font-size: 22px; }
	.modal__body { padding: 22px; }
	.modal__foot { padding: 16px 22px; }
	.ava-edit { flex-direction: column; text-align: center; }
	.ava-edit__btns { justify-content: center; }
}

@media (max-width: 560px) {
	.search { display: none; }
	.header__inner { grid-template-columns: 1fr auto; }
	.post__foot { flex-wrap: wrap; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =========================================================
   ПРАВКИ v2
   ========================================================= */

/* ---------- Чекбоксы и радио ---------- */
input[type="checkbox"], input[type="radio"] {
	-webkit-appearance: none; appearance: none;
	flex: none; width: 22px; height: 22px; margin: 0;
	border: 1.5px solid var(--border); border-radius: 7px;
	background: var(--card) center/14px no-repeat;
	cursor: pointer; vertical-align: middle;
	transition: background-color .15s, border-color .15s, box-shadow .15s;
}
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]:hover, input[type="radio"]:hover { border-color: var(--accent); }
input[type="checkbox"]:checked {
	background-color: var(--accent); border-color: var(--accent);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
input[type="radio"]:checked { border: 6px solid var(--accent); }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { box-shadow: 0 0 0 4px var(--accent-soft); outline: none; }

.checks { gap: 4px; }
.check, .checkbox {
	display: flex; align-items: flex-start; gap: 12px;
	padding: 10px 14px; border-radius: 12px;
	font-size: 16px; line-height: 1.45; color: var(--text-2);
	cursor: pointer; transition: background .15s;
}
.check:hover, .checkbox:hover { background: var(--card-2); }
.check label, .checkbox label { cursor: pointer; flex: 1; }
.check input, .checkbox input { margin-top: 0 !important; }

/* ---------- Подрубрики в меню ---------- */
.menu__group { display: flex; flex-direction: column; }
.menu__sub { display: flex; flex-direction: column; gap: 2px; padding-left: 22px; margin: 2px 0 4px; border-left: 1px solid var(--border); margin-left: 30px; }
.menu__sub .menu__item { height: 38px; font-size: 16px; padding-left: 14px; }
.menu__sub .menu__hash { display: none; }
.menu__sub:empty { display: none; }

/* ---------- Профиль ---------- */
.metric__rate { margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; color: var(--text-2); }
.metric__rate > div { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
.metric__rate > div:last-child { border-bottom: 0; padding-bottom: 0; }
.metric__rate b { color: var(--text); font-weight: 700; }
.metric__rate b span, .metric__rate span span { font-weight: 700; }

.dropdown__menu { z-index: 120; }
.dropdown__raw:empty { display: none; }
.profile-grid ~ .alert, .profile-grid + * { margin-top: 0; }

/* ---------- Общие формы и служебные страницы ---------- */
.form-page { padding: 32px; }
.form-page__head { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.form-page__ico { width: 56px; height: 56px; border-radius: 16px; flex: none; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.form-page__ico .ico { width: 26px; height: 26px; }
.form-page__title { font-size: 30px; font-weight: 700; }
.form-page__sub { color: var(--text-2); margin-top: 6px; font-size: 16px; }
.form-page__foot { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 10px; padding-top: 24px; border-top: 1px solid var(--border); }
.form-page__foot .muted { margin-left: auto; font-size: 14px; }
.form-page .field { margin-bottom: 22px; gap: 10px; }
.field__row { display: flex; gap: 10px; }
.field__row .input { flex: 1; }
.req { color: var(--danger); }
.captcha { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.captcha img { border-radius: 10px; }
.captcha .input { max-width: 220px; }

/* Поля, которые DLE генерирует сам (поиск, доп. поля, категории, ЛС, регистрация) */
.main--forms input[type="text"], .main--forms input[type="email"], .main--forms input[type="password"],
.main--forms input[type="search"], .main--forms input[type="number"], .main--forms input[type="url"],
.main--forms input:not([type]), .main--forms select, .main--forms textarea,
.modal__body input[type="text"], .modal__body select, .modal__body textarea {
	width: 100%; max-width: 100%;
	min-height: 52px; padding: 12px 18px;
	border: 1px solid var(--border); border-radius: 14px;
	background-color: var(--card); color: var(--text);
	font: 400 16px var(--font);
	outline: none; transition: border-color .15s, box-shadow .15s;
}
.main--forms select:not([multiple]):not([size]), .modal__body select:not([multiple]):not([size]) {
	-webkit-appearance: none; appearance: none; padding-right: 44px;
	background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center;
}
.main--forms select[multiple] { min-height: 160px; padding: 8px; }
.main--forms select[multiple] option { padding: 8px 10px; border-radius: 8px; }
.main--forms select[multiple] option:checked { background: var(--accent-soft) linear-gradient(var(--accent-soft), var(--accent-soft)); color: var(--accent); }
.main--forms textarea { min-height: 120px; resize: vertical; }
.main--forms input:focus, .main--forms select:focus, .main--forms textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.main--forms .bb-editor textarea, .main--forms .wseditor textarea { border-radius: 0; }

.main--forms input[type="submit"], .main--forms input[type="button"], .main--forms button:not(.btn):not(.btn-icon):not([class*="bb-"]):not(.addnews__toggle):not([data-dropdown]),
.main--forms .fbutton, .main--forms .bbcodes {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	height: 48px; padding: 0 24px; border-radius: 999px;
	border: 1px solid var(--border); background: var(--card); color: var(--text);
	font: 600 16px var(--font); cursor: pointer; transition: background .15s, border-color .15s;
}
.main--forms input[type="submit"], .main--forms button[type="submit"]:not(.btn), .main--forms .fbutton:first-child {
	background: var(--accent); border-color: var(--accent); color: #fff;
}
.main--forms input[type="button"]:hover, .main--forms .bbcodes:hover { background: var(--hover); }
.main--forms input[type="submit"]:hover, .main--forms button[type="submit"]:not(.btn):hover { background: var(--accent-2); }

.main--forms table { width: 100%; border-collapse: separate; border-spacing: 0 12px; }
.main--forms td { vertical-align: top; padding: 0; }
.main--forms td.label, .main--forms td:first-child:not(:only-child) { width: 30%; padding: 14px 16px 0 0; color: var(--text-2); font-weight: 500; }
.main--forms label { cursor: pointer; }

.modal__body 

/* ---------- Поиск ---------- */
.search-page .searchtable { display: flex; flex-direction: column; gap: 14px; }
.searchtable br { display: none; }
.searchtable fieldset { border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; margin: 0; }
.searchtable legend { padding: 0 8px; font-weight: 600; color: var(--text-2); }
.searchtable input[type="text"], .searchtable #searchinput { font-size: 18px; }
.searchtable input[type="button"], .searchtable input[type="submit"], .searchtable button { margin: 4px 8px 0 0; }
.search-msg { margin-top: 0; }
.search-item { display: flex; align-items: center; gap: 16px; padding: 18px 22px; transition: transform .15s; }
.search-item:hover { transform: translateY(-2px); }
.search-item:hover .mini__title { color: var(--accent); }
.search-item .mini__img:empty { display: none; }

/* ---------- Добавление публикации ---------- */
.addnews__cat select { width: 100%; }
.addnews__toggle { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); font-weight: 600; font-size: 16px; }
.addnews__toggle .ico { width: 18px; height: 18px; }
.addnews__poll { margin-top: 16px; padding: 20px; border-radius: 16px; background: var(--card-2); }
.addnews__poll .field:last-of-type { margin-bottom: 12px; }
.addnews__admin { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 10px; padding: 16px; border-radius: 16px; background: var(--card-2); }
.addnews__admin:empty { display: none; }
.addnews__admin > *, .addnews__admin label { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text-2); }
.addnews__admin br { display: none; }
#related_news:not(:empty) { display: block; margin-top: 8px; padding: 12px 16px; border-radius: 12px; background: var(--card-2); font-size: 14px; }

/* ---------- Личные сообщения ---------- */
.pm { padding-bottom: 24px; }
.pm .form-page__head { margin-bottom: 22px; }
.pm__bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.pm__tabs { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: var(--card-2); }
.pm__tabs a, .pm__tabs > span { display: inline-flex; }
.pm__tab { display: inline-flex; align-items: center; height: 42px; padding: 0 20px; border-radius: 999px; font-weight: 600; color: var(--text-2); }
.pm__tab:hover { color: var(--text); }
.pm__tab.is-active,
/* Активная вкладка по содержимому: DLE подставляет форму вместо [newpm], поэтому метку внутри class ставить нельзя */
.pm:has(.pm__list) .pm__tab--list, .pm:has(.pm__new) .pm__tab--new { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.pm__limit { min-width: 240px; }
.pm__limit-text { font-size: 14px; color: var(--muted); margin-bottom: 8px; text-align: right; }
.pm__progress { height: 8px; border-radius: 8px; background: var(--card-2); overflow: hidden; }
.pm__progress > *, .pm__progress .pm_progress_bar, .pm__progress span { display: block; height: 100%; border-radius: 8px; background: var(--accent) !important; font-size: 0; }
.pm__list table { width: 100%; border-collapse: collapse; }
.pm__list th { padding: 0 12px 12px; text-align: left; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--border); }
.pm__list td { padding: 14px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.pm__list tr:last-child td { border-bottom: 0; }
.pm__list tr:hover td { background: var(--hover); }
.pm__list a { font-weight: 600; }
.pm__list a:hover { color: var(--accent); }
.pm__list .mass_comments_action, .pm__list form > div:last-child { margin-top: 16px; }
.pm__list:has(> :only-child:not(table)) { color: var(--muted); text-align: center; padding: 48px 20px; }
.pm-msg .comment { border-top: 0; padding: 0; }

/* ---------- Статистика: самые активные ---------- */
.topusers { overflow-x: auto; margin: 0 -8px; }
.topusers table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; }
.topusers tr:first-child td, .topusers th { padding: 0 8px 12px; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.topusers td { padding: 14px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; white-space: nowrap; }
.topusers tr:last-child td { border-bottom: 0; }
.topusers tr:not(:first-child):hover td { background: var(--hover); }
.topusers a { font-weight: 600; }
.topusers a:hover { color: var(--accent); }

/* ---------- Футер ---------- */
.footer__copy { font-size: 16px; }

@media (max-width: 960px) {
	.form-page { padding: 22px; }
	.form-page__title { font-size: 24px; }
	.field__row { flex-direction: column; }
	.main--forms td.label, .main--forms td:first-child:not(:only-child) { width: auto; display: block; padding: 0 0 8px; }
	.main--forms td { display: block; }
	.pm__limit { width: 100%; }
	.pm__limit-text { text-align: left; }
	.form-page__foot .muted { margin-left: 0; width: 100%; }
}

/* ---------- Обсуждения (последние комментарии) ---------- */

.comment__news { margin: 2px 0 8px; font-size: 15px; font-weight: 600; }
.comment__news a { color: var(--accent); }
.comment__news a:hover { text-decoration: underline; }

/* ---------- Редактирование комментария (DLE вставляет редактор в текст) ---------- */
.comment__text .bb-editor, .comment__text .wseditor, .comment__text .tox-tinymce, .comment__text .fr-box { margin: 6px 0 12px; }
.comment__text textarea {
	width: 100%; min-height: 140px; padding: 16px 18px;
	border: 1px solid var(--border); border-radius: 14px;
	background: var(--card); color: var(--text);
	font: 400 16px/1.6 var(--font); resize: vertical; outline: none;
}
.comment__text textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.comment__text .bb-editor textarea { border: 0; border-radius: 0; box-shadow: none; }
.comment__text input[type="button"], .comment__text input[type="submit"], .comment__text button:not([class*="bb"]):not([class*="tox"]):not([class*="fr-"]) {
	display: inline-flex; align-items: center; justify-content: center;
	height: 42px; padding: 0 20px; margin: 4px 8px 0 0;
	border: 1px solid var(--border); border-radius: 999px;
	background: var(--card); color: var(--text);
	font: 600 15px var(--font); cursor: pointer; transition: background .15s;
}
.comment__text input[type="button"]:hover, .comment__text button:not([class*="bb"]):not([class*="tox"]):not([class*="fr-"]):hover { background: var(--hover); }
.comment__text input[type="button"]:last-of-type, .comment__text button:not([class*="bb"]):not([class*="tox"]):not([class*="fr-"]):last-of-type, .comment__text .applychanges, .comment__text input[type="submit"] {
	background: var(--accent); border-color: var(--accent); color: #fff;
}
.comment__text input[type="button"]:last-of-type:hover, .comment__text button:not([class*="bb"]):last-of-type:hover, .comment__text .applychanges:hover { background: var(--accent-2); }
.comment__text div[align="right"], .comment__text .save-buttons, .comment__text div:has(> input[type="button"]), .comment__text div:has(> button:not([class*="bb"])) { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.comment__text div:has(> input[type="button"]) input, .comment__text div:has(> button) button { margin: 0 !important; }

/* Кнопки «Найти» в поиске */
.searchtable input[type="button"]:first-of-type, .searchtable button:first-of-type { background: var(--accent); border-color: var(--accent); color: #fff; }
.searchtable input[type="button"]:first-of-type:hover { background: var(--accent-2); }
.comment:has(.comment__text textarea) .comment__foot { display: none; }
.mass_comments_action input[type="submit"], .mass_comments_action input[type="button"], .mass_comments_action button {
	height: 38px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--border);
	background: var(--card); color: var(--text); font: 600 14px var(--font); cursor: pointer;
}
.mass_comments_action input[type="submit"]:hover, .mass_comments_action button:hover { background: var(--hover); }

.comment.comment--card {
	padding: 24px 28px; margin-bottom: 16px;
	border: 0 !important; border-radius: var(--radius);
	background: var(--card); box-shadow: var(--shadow);
}

/* Панель редактора в тёмной теме */
[data-theme="dark"] .comment__text .bb-pane,
[data-theme="dark"] .addcomment .bb-pane,
[data-theme="dark"] .bb-editor > div:first-child:not(textarea) { background: var(--card-2) !important; border-color: var(--border) !important; }
[data-theme="dark"] .bb-btn, [data-theme="dark"] .bb-pane * { color: var(--text-2); }
[data-theme="dark"] .bb-btn svg, [data-theme="dark"] .bb-pane svg { fill: currentColor; }

.pages-inner:empty { display: none; }
.pages-inner { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.pages-inner a, .pages-inner span { min-width: 40px; height: 40px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--card-2); font-weight: 600; }
.pages-inner a:hover { background: var(--accent-soft); color: var(--accent); }
.pages-inner span { background: var(--accent); color: #fff; }

/* DLE оборачивает {content} в #dle-content — сохраняем отступы между блоками */
#dle-content { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
#dle-content > form { display: flex; flex-direction: column; gap: 20px; }
#dle-content:empty { display: none; }

/* Рейтинг в профиле */
.metric__rate { margin: 0; display: flex; flex-direction: column; gap: 0; font-size: 15px; }
.metric__rate .metric__value { margin: 8px 0 14px; }
.metric__value--rate { color: var(--text); }
.metric__value--rate.is-plus { color: var(--success); }
.metric__value--rate.is-minus { color: var(--danger); }
.rate-split { display: flex; gap: 8px; margin-top: auto; }
.rate-split__item { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--card-2); font-weight: 600; color: var(--text-2); }
.rate-split__item .ico { width: 16px; height: 16px; }
.rate-split__item.is-plus .ico { color: var(--success); }
.rate-split__item.is-minus .ico { color: var(--danger); }
.metric:has(.metric__rate) { min-height: 100%; }

/* Меню профиля всегда поверх соседних карточек */
.profile, .profile__bar, .profile__btns, .profile .dropdown { overflow: visible !important; }
.profile .dropdown.is-open { z-index: 130; }
.profile-grid { position: relative; z-index: 1; }

/* Обратная связь, восстановление пароля */
.form-page .form-row--2 { margin-bottom: 0; }
.form-page .form-row--2 .field { margin-bottom: 22px; }
.form-page select { width: 100%; }
.form-page--narrow { max-width: 640px; }
input[type="file"] { font: 500 15px var(--font); color: var(--text-2); }
input[type="file"]::file-selector-button {
	height: 42px; padding: 0 18px; margin-right: 12px;
	border: 1px solid var(--border); border-radius: 999px;
	background: var(--card); color: var(--text); font: 600 14px var(--font); cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: var(--hover); }

/* ---------- Доп. поля (DLE 21 выводит их блоками «подпись + поле») ---------- */
.xfields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; margin-bottom: 22px; padding: 22px; border-radius: 18px; background: var(--card-2); }
.xfields:empty { display: none; }
.xfields > * { min-width: 0; }
.xfields > div, .xfields > p { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.xfields br { display: none; }
.xfields label, .xfields b, .xfields strong, .xfields .xfieldsrow > :first-child { font-size: 15px; font-weight: 500; color: var(--text-2); }
.xfields input[type="text"], .xfields input:not([type]), .xfields input[type="number"], .xfields input[type="url"], .xfields select, .xfields textarea {
	width: 100% !important; min-height: 48px; padding: 10px 16px !important;
	border: 1px solid var(--border) !important; border-radius: 12px !important;
	background: var(--card) !important; color: var(--text) !important;
	font: 400 16px var(--font) !important; outline: none;
}
.xfields input:focus, .xfields select:focus, .xfields textarea:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 4px var(--accent-soft); }
.xfields textarea { min-height: 110px; resize: vertical; }
.xfields > div:has(textarea), .xfields > div:has([class*="upload"]), .xfields > div:has(.bb-editor), .xfields > div:has(input[type="file"]) { grid-column: 1 / -1; }
/* Загрузчик изображения доп. поля */
.xfields [class*="upload-button"], .xfields .qq-upload-button, .xfields button, .xfields input[type="button"] {
	display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; width: auto !important;
	height: 44px; padding: 0 20px !important; border-radius: 999px !important;
	border: 1px dashed var(--accent) !important; background: var(--accent-soft) !important; color: var(--accent) !important;
	font: 600 15px var(--font) !important; cursor: pointer;
}
.xfields [class*="upload-drop"], .xfields .qq-upload-drop-area { border: 2px dashed var(--border); border-radius: 16px; padding: 20px; text-align: center; color: var(--muted); }
.xfields img { max-width: 160px; border-radius: 12px; }
.modal__body .xfields { grid-template-columns: 1fr; background: none; padding: 0; }

/* ---------- Добавление публикации: доводка ---------- */
.addnews .field__row .btn { height: 52px; flex: none; }
.addnews__toggle { padding: 10px 16px; border-radius: 999px; background: var(--accent-soft); }
.addnews__toggle:hover { background: var(--accent); color: #fff; }
.addnews .bb-editor, .addnews .wseditor, .addnews .tox-tinymce, .addnews .fr-box { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); }
.addnews__admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.addnews__admin label, .addnews__admin > div { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; }
.addnews__admin label:hover { background: var(--card); }
@media (max-width: 960px) { .xfields { grid-template-columns: 1fr; padding: 16px; } }
.addnews__toggle { align-self: flex-start; }

/* =========================================================
   v4 — компоненты под теги DLE 21
   ========================================================= */

/* Хлебные крошки и сортировка */
.pagebar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; }
.speedbar { color: var(--muted); font-size: 16px; }
.speedbar a { color: var(--muted); }
.speedbar a:hover { color: var(--text); }
.sortbar { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.sortbar ul { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.sortbar a, .sortbar li > span { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--card); color: var(--text-2); font-weight: 500; }
.sortbar a:hover { color: var(--accent); }
.sortbar .active a, .sortbar li.asc a, .sortbar li.desc a { background: var(--accent-soft); color: var(--accent); }

/* Рубрики: иконки и подрубрики */
.menu__icon { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; flex: none; }

/* Публикации */
.post--pinned { box-shadow: inset 0 0 0 2px var(--accent-soft), var(--shadow); }
.pin { display: inline-grid; place-items: center; color: var(--accent); }
.pin .ico { width: 16px; height: 16px; }
.badge-new { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; margin-left: 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; }
.post__author a:hover { color: var(--accent); }
.post__tools { display: flex; gap: 8px; }
.edit-note { margin-top: 20px; padding: 12px 16px; border-radius: 12px; background: var(--card-2); color: var(--muted); font-size: 14px; }
.static-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.static-tools { display: flex; gap: 8px; flex: none; }

/* Пункты меню, которые DLE оборачивает своей ссылкой */
.dropdown__menu > a > .dd-item, .dropdown__menu .dd-item { display: flex; align-items: center; gap: 12px; width: 100%; }
.dropdown__menu > a:has(> .dd-item) { padding: 10px 12px; }
.dropdown__user { display: flex; align-items: center; gap: 12px; padding: 8px 12px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.dropdown__user img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.dropdown__user b { display: block; font-size: 15px; }
.dropdown__user span { font-size: 13px; color: var(--muted); }
.dropdown__count { margin-left: auto; font-size: 13px; color: var(--muted); }
.dropdown__count b { color: var(--accent); }

/* Рейтинг (кнопки DLE становятся ссылками внутри .rate) */
.rate { gap: 6px; padding: 0 6px; }
.rate a { display: inline-flex; }
.rate__btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; border-radius: 999px; color: var(--text-2); transition: color .15s, background .15s; }
.rate a:hover .rate__btn--up, .rate__btn--up:hover { color: var(--success); background: rgba(34, 197, 94, .1); }
.rate a:hover .rate__btn--down, .rate__btn--down:hover { color: var(--danger); background: var(--danger-soft); }
.rate__num { min-width: 14px; text-align: center; font-weight: 600; }
.rate .ratingplus { color: var(--success); }
.rate .ratingminus { color: var(--danger); }
.rate--sm .rate__btn { height: 28px; padding: 0 6px; }

/* Комментарии */
.comment { position: relative; }
.comment--reply { margin-left: 56px; }
.comment__ava { position: relative; flex: none; }
.comment__ava img, .comment__ava .avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; font-size: 16px; }
.comment__online { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--success); border: 2px solid var(--card); }
.comment__badge { padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; }
.comment__author a { font-weight: 600; }
.comment__author a:hover { color: var(--accent); }
.comment__replies { display: inline-flex; align-items: center; gap: 6px; }
.comment__images { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.comment__images img { max-width: 160px; border-radius: 12px; }
.comment__mass { margin-left: auto; }
.discussion-empty { margin: -10px 0 20px; }
.comments-list:empty + .pagination:empty { display: none; }

/* Форма комментария */
.addcomment { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.comments-list:empty ~ .addcomment, #comment > .addcomment:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.addcomment__title { font-size: 18px; font-weight: 700; }
.addcomment__note { color: var(--muted); font-size: 15px; margin-top: -6px; }
.addcomment__note a { color: var(--accent); }
.addcomment__foot { margin-top: 6px; }
.addcomment__foot--end { justify-content: flex-end; }
.addcomment__upload a { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; font-size: 15px; cursor: pointer; }
/* «Подписаться на комментарии» от DLE — в виде переключателя */
.addcomment__subscribe, .addcomment__subscribe label { display: inline-flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 16px; cursor: pointer; }
.addcomment__subscribe input[type="checkbox"] {
	position: relative; width: 48px !important; height: 28px !important; flex: none;
	border-radius: 999px !important; border: 1px solid var(--border) !important;
	background: var(--card-2) !important; transition: background .2s !important;
}
.addcomment__subscribe input[type="checkbox"]::after {
	content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%;
	background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s;
}
.addcomment__subscribe input[type="checkbox"]:checked { background: var(--accent) !important; border-color: var(--accent) !important; background-image: none !important; }
.addcomment__subscribe input[type="checkbox"]:checked::after { transform: translateX(20px); }

/* Формы: дополнительные элементы */
.form-row--3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-row--3 .field { margin-bottom: 0; }
.modal__body .form-row--3 { margin-bottom: 26px; }
.form-sep { font-size: 17px; font-weight: 700; margin: 8px 0 16px; padding-top: 22px; border-top: 1px solid var(--border); }
.input--sm { min-height: 40px !important; padding: 8px 14px !important; font-size: 14px !important; margin-top: 10px; max-width: 320px; }
.btn--danger { background: var(--danger-soft); color: var(--danger); }
.btn--danger:hover { background: var(--danger); color: #fff; }
.modal__foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.modal__foot a:has(.btn--danger) { margin-left: auto; }
.auth__social { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }
.auth__social:not(:has(a)) { display: none; }
.auth__social--left { justify-content: flex-start; margin: 0 0 16px; }
.auth__social a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); color: var(--text-2); font-weight: 700; transition: background .15s, color .15s; }
.auth__social a:hover { background: var(--accent); color: #fff; }
.profile__ban { margin: 12px 30px 0; padding: 12px 16px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-size: 15px; }
#result-registration:not(:empty) { margin-top: 8px; font-size: 14px; }

/* Загрузка файлов (обратная связь) */
.dropzone {
	position: relative; display: flex; align-items: center; justify-content: center; gap: 12px;
	min-height: 96px; padding: 20px; border: 2px dashed var(--border); border-radius: 16px;
	color: var(--muted); font-size: 15px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone:focus-within { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.dropzone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone u { color: var(--accent); }

/* Личные сообщения */
.pm__tabs > a { display: inline-flex; }
.pm__new { margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--border); }
.pm__list { margin-top: 26px; padding-top: 8px; border-top: 1px solid var(--border); }
.pm__list:not(:has(table)) { color: var(--muted); text-align: center; padding: 40px 20px; }
.pm-dialog__head { padding-bottom: 18px; margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.pm-dialog__subj { font-size: 24px; font-weight: 700; }
.pm-dialog__thread { display: flex; flex-direction: column; gap: 18px; padding: 18px 0; }
.pm-msg { display: flex; gap: 12px; max-width: 86%; }
.pm-msg__bubble { flex: 1; min-width: 0; padding: 14px 18px; border-radius: 18px 18px 18px 6px; background: var(--card-2); }
.pm-msg--own { flex-direction: row-reverse; margin-left: auto; }
.pm-msg--own .pm-msg__bubble { border-radius: 18px 18px 6px 18px; background: var(--accent-soft); }
.pm-dialog__reply { padding-top: 22px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px; }

/* Поиск */
.search-simple { display: flex; flex-direction: column; gap: 14px; }
.search-simple__btns { display: flex; flex-wrap: wrap; gap: 10px; }
.searchtable input#searchinput, .searchtable input[name="story"] { min-height: 56px !important; font-size: 18px !important; padding: 12px 20px !important; border-radius: 16px !important; }
.search-adv { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.search-adv__box { min-width: 0; margin: 0; padding: 16px 18px 18px; border: 1px solid var(--border); border-radius: 16px; display: flex; flex-direction: column; gap: 12px; }
.search-adv__box--wide, .search-adv__foot { grid-column: 1 / -1; }
.search-adv__box legend { padding: 0 8px; font-weight: 600; font-size: 15px; color: var(--text-2); }
.search-adv__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font-size: 15px; color: var(--text-2); }
.search-adv__row select { width: auto !important; min-width: 140px; }
.search-adv__row label { display: inline-flex; align-items: center; gap: 8px; }
.search-adv__foot { margin-top: 4px; }
.search-item { flex-direction: column; align-items: stretch; }
.search-item__text { margin-top: 4px; color: var(--text-2); font-size: 15px; line-height: 1.55; }

/* Добавление публикации */
.addnews__poll { margin-bottom: 22px; }
.addnews__poll > summary { list-style: none; display: inline-flex; cursor: pointer; }
.addnews__poll > summary::-webkit-details-marker { display: none; }
.addnews__poll[open] > summary { background: var(--accent); color: #fff; }
.addnews__poll-body { margin-top: 14px; padding: 20px; border-radius: 16px; background: var(--card-2); }
.addnews__editor { min-width: 0; }

/* Статистика */
.stats-db { color: var(--muted); font-size: 15px; text-align: center; }
.stats-db b { color: var(--text); }

/* Всплывающий профиль (наведение на автора) */
.ppop { min-width: 280px; font-family: var(--font); color: var(--text); }
.ppop__top { display: flex; align-items: center; gap: 14px; }
.ppop__ava { position: relative; flex: none; }
.ppop__ava img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.ppop__name { display: block; font-size: 18px; }
.ppop__full, .ppop__group { display: block; font-size: 14px; color: var(--muted); }
.ppop__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 16px 0; }
.ppop__facts dt { font-size: 12px; color: var(--muted); }
.ppop__facts dd { margin: 0; font-weight: 600; font-size: 14px; }
.ppop__links { display: flex; flex-wrap: wrap; gap: 8px; }
.ppop__links a { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--card-2); font-size: 13px; font-weight: 600; color: var(--accent); }

/* Облако тегов */
.tags--cloud { margin-top: 20px; }
.tags--cloud a { font-size: 15px !important; }

/* Опрос в публикации */
.poll-block { padding: 26px 30px; }
.poll__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.poll__title { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.poll__title .ico { color: var(--accent); }
.poll__question { color: var(--text-2); margin-bottom: 14px; }
.poll__list { display: flex; flex-direction: column; gap: 8px; }
.poll__list label, .poll__list > div { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--card-2); cursor: pointer; }
.poll__list .pollprogress, .poll__list [class*="progress"] { height: 8px; border-radius: 8px; background: var(--accent); }
.poll__total { margin-top: 12px; color: var(--muted); font-size: 14px; }
.poll__btns { display: flex; gap: 10px; margin-top: 16px; }

/* Вложения */
.attach { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; margin: 6px 0; padding: 12px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--card-2); vertical-align: middle; }
.attach__ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.attach__body { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.attach__name { font-weight: 600; color: var(--text); word-break: break-word; }
.attach__name:hover { color: var(--accent); }
.attach__meta { color: var(--muted); font-size: 13px; }
.attach__online { color: var(--accent); font-size: 13px; }
.attach--denied { color: var(--muted); }

@media (max-width: 960px) {
	.form-row--3, .search-adv { grid-template-columns: 1fr; }
	.comment--reply { margin-left: 24px; }
	.pm-msg { max-width: 100%; }
	.pagebar { flex-direction: column; align-items: flex-start; }
}

/* Поле поиска в шапке — перебиваем общие стили полей движка */
.search .search__input { min-height: 0; height: 52px; padding: 0 92px 0 50px; border-radius: 999px; font-size: 17px; line-height: normal; }
@media (max-width: 960px) { .search .search__input { height: 44px; font-size: 16px; padding-right: 16px; } }
.comment__ava { align-self: flex-start; width: 44px; height: 44px; }

/* Доп. поля DLE 21 (.xfieldsrow: подпись + поле) — подпись над полем */
.xfields .xfieldsrow { display: flex !important; flex-direction: column; gap: 8px; margin: 0; font-size: 15px; font-weight: 500; color: var(--text-2); }
.xfields .xfieldscolleft, .xfields .xfieldscolright { width: 100%; }
.xfields .xfieldsrow:has(textarea), .xfields .xfieldsrow:has(.wseditor), .xfields .xfieldsrow:has([class*="upload"]), .xfields .xfieldsrow:has(input[type="file"]) { grid-column: 1 / -1; }
.social-block:not(:has(a)):not(:has(.field *)) { display: none; }
[data-theme="dark"] input[type="checkbox"], [data-theme="dark"] input[type="radio"] { border-color: #3d434d; }
.metric--ico > div { display: flex; flex-direction: column; }
