/* ==================================================================
   cy-session.css — все CSS-правила, добавленные за рабочую сессию
   24-25 мая 2026 (восстановлено из транскрипта после правки Cursor).
   Загружается ПОСЛЕ modern.css — переопределяет дубликаты.
   ==================================================================*/

/* ================================================================
   COMPAT FALLBACK — статические переменные для старого Chrome
   (Chrome < 111 не поддерживает oklch(); < 101 — light-dark()).
   Браузеры, которые НЕ поддерживают хотя бы одно из двух,
   попадают в этот блок и получают нормальные hex-значения
   светлой темы. Современные браузеры этот блок игнорируют
   и используют oklch()/light-dark() из modern.css.
   ================================================================ */
@supports not ((color: oklch(50% 0.1 200)) and (color: light-dark(white, black))) {
	:root {
		/* Поверхности (светлая тема, hex) */
		--c-bg:           #f5f6f8;
		--c-surface:      #ffffff;
		--c-surface-2:    #fafbfc;
		--c-border:       #e6e8ec;
		--c-border-strong:#d6dae0;
		--c-text:         #1a1d21;
		--c-text-muted:   #6b7280;
		--c-text-soft:    #9aa0a6;

		/* Первичный цвет — oklch(70% 0.13 22) ≈ #f47a6d */
		--c-primary:        #f47a6d;
		--c-primary-hover:  #e8665a;   /* oklch(63% 0.13 22) */
		--c-primary-active: #dc5347;   /* oklch(58% 0.13 22) */
		--c-primary-soft:   #fff1ee;   /* oklch(95% 0.05 22) */
		--c-primary-ring:   rgba(244, 122, 109, 0.35);

		/* Акцент / предупреждение / опасность */
		--c-accent:         #3dbfa0;   /* oklch(75% 0.08 165) */
		--c-accent-hover:   #2fa88b;
		--c-warn:           #e8a020;   /* oklch(75% 0.14 70) */
		--c-danger:         #e0452a;   /* oklch(64% 0.18 25) */

		/* Тени, радиусы, шрифт — одинаковые везде, но на старом Chrome не наследуются */
		--c-shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
		--c-shadow-md: 0 4px 12px rgba(15,23,42,.06), 0 2px 4px rgba(15,23,42,.04);
		--c-shadow-lg: 0 12px 32px rgba(15,23,42,.08), 0 4px 12px rgba(15,23,42,.04);
		--c-radius:    12px;
		--c-radius-sm: 8px;
		--c-radius-lg: 18px;
		--c-radius-pill: 999px;
		--ff-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
		--container: 1200px;
		--gap:    18px;
		--gap-lg: 24px;
	}

	/* Элементы с жестко заданным light-dark() в других файлах */
	.site-header {
		background: rgba(255, 255, 255, 0.95);
	}
}

/* ----------------------------------------------------------------
   COMPAT FALLBACK — тёмная тема для старого Chrome
   Когда пользователь переключает на тёмную тему (data-theme="dark")
   или система использует тёмную тему (prefers-color-scheme: dark),
   но браузер не поддерживает light-dark() — применяем статические
   hex-значения тёмной палитры. Современные браузеры этот блок
   игнорируют и используют light-dark() из modern.css.
   ---------------------------------------------------------------- */
@supports not ((color: oklch(50% 0.1 200)) and (color: light-dark(white, black))) {
	:root[data-theme="dark"],
	html[data-theme="dark"] {
		--c-bg:           #13151b;
		--c-surface:      #1a1d24;
		--c-surface-2:    #1f2229;
		--c-border:       #2a2e38;
		--c-border-strong:#353b47;
		--c-text:         #eaebef;
		--c-text-muted:   #9aa0aa;
		--c-text-soft:    #838990;

		/* Первичный цвет остаётся тем же coral-тоном */
		--c-primary-soft:   rgba(244, 122, 109, 0.14);
		--c-primary-ring:   rgba(244, 122, 109, 0.40);

		/* Глубокие тени для тёмного фона */
		--c-shadow-sm: 0 1px 2px rgba(0,0,0,.35), 0 1px 3px rgba(0,0,0,.25);
		--c-shadow-md: 0 4px 12px rgba(0,0,0,.35), 0 2px 4px rgba(0,0,0,.25);
		--c-shadow-lg: 0 12px 32px rgba(0,0,0,.45), 0 4px 12px rgba(0,0,0,.25);
	}

	/* Специфичные элементы, которым нужен тёмный фон напрямую (из-за light-dark() в основных стилях) */
	:root[data-theme="dark"] .site-header,
	html[data-theme="dark"] .site-header {
		background: rgba(31, 34, 41, 0.95);
	}
	:root[data-theme="dark"] .lang-dropdown__menu,
	html[data-theme="dark"] .lang-dropdown__menu {
		background: rgba(31, 34, 41, 0.98);
		border-color: rgba(255, 255, 255, 0.1);
	}
	:root[data-theme="dark"] .lang-dropdown__item:hover,
	html[data-theme="dark"] .lang-dropdown__item:hover {
		background: rgba(255, 255, 255, 0.06);
	}
	:root[data-theme="dark"] .lang-dropdown__item.is-active,
	html[data-theme="dark"] .lang-dropdown__item.is-active {
		background: rgba(244, 122, 109, 0.18);
	}


	/* Системная тёмная тема (когда пользователь не переключал вручную) */
	@media (prefers-color-scheme: dark) {
		:root:not([data-theme="light"]) {
			--c-bg:           #13151b;
			--c-surface:      #1a1d24;
			--c-surface-2:    #1f2229;
			--c-border:       #2a2e38;
			--c-border-strong:#353b47;
			--c-text:         #eaebef;
			--c-text-muted:   #9aa0aa;
			--c-text-soft:    #838990;

			--c-primary-soft:   rgba(244, 122, 109, 0.14);
			--c-primary-ring:   rgba(244, 122, 109, 0.40);

			--c-shadow-sm: 0 1px 2px rgba(0,0,0,.35), 0 1px 3px rgba(0,0,0,.25);
			--c-shadow-md: 0 4px 12px rgba(0,0,0,.35), 0 2px 4px rgba(0,0,0,.25);
			--c-shadow-lg: 0 12px 32px rgba(0,0,0,.45), 0 4px 12px rgba(0,0,0,.25);
		}

		:root:not([data-theme="light"]) .site-header {
			background: rgba(31, 34, 41, 0.95);
		}
		:root:not([data-theme="light"]) .lang-dropdown__menu {
			background: rgba(31, 34, 41, 0.98);
			border-color: rgba(255, 255, 255, 0.1);
		}
		:root:not([data-theme="light"]) .lang-dropdown__item:hover {
			background: rgba(255, 255, 255, 0.06);
		}
		:root:not([data-theme="light"]) .lang-dropdown__item.is-active {
			background: rgba(244, 122, 109, 0.18);
		}
	}
}

/* ----- edit #1 (2026-05-24T10:18:27.337Z) ----- */
/* === Sidebar Top widget (tabs: likes / views / comments) === */
.topnews-widget { display: block; }

/* Tab nav */
.topnews-tabs {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 4px;
	padding: 4px;
	margin: 0 0 14px;
	background: var(--c-bg, #f5f6f8);
	border: 1px solid var(--c-border);
	border-radius: 10px;
}
.topnews-tab {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--c-text-muted);
	font: inherit;
	font-size: 12.5px;
	font-weight: 500;
	padding: 7px 4px;
	border-radius: 7px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	line-height: 1;
	transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
	white-space: nowrap;
	min-width: 0;
}
.topnews-tab svg {
	width: 15px; height: 15px;
	flex: 0 0 15px;
	stroke-width: 2;
}
.topnews-tab__label {
	overflow: hidden;
	text-overflow: ellipsis;
}
.topnews-tab:hover { color: var(--c-text); background: rgba(0,0,0,.04); }
.topnews-tab.is-active {
	background: var(--c-surface);
	color: var(--c-primary);
	box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 0 0 1px var(--c-border);
}
.topnews-tab:focus-visible {
	outline: 2px solid var(--c-primary);
	outline-offset: 2px;
}

/* Panels */
.topnews-panels { position: relative; }
.topnews-panel { display: none; animation: tnFade .18s ease; }
.topnews-panel.is-active { display: block; }
@keyframes tnFade { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }

/* Items inside a panel */
.topnews-item {
	display: grid;
	grid-template-columns: 56px 1fr;
	gap: 10px;
	align-items: center;
	padding: 10px 0;
	border-top: 1px solid var(--c-border);
}
.topnews-item:first-child { border-top: 0; padding-top: 4px; }
.topnews-item:last-child { padding-bottom: 0; }
.topnews-thumb img {
	width: 56px; height: 56px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}
.topnews-title { display: block; color: var(--c-text); font-weight: 500; font-size: 13.5px; line-height: 1.35; }
.topnews-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: 4px;
}
.topnews-date { color: var(--c-text-muted); font-size: 12px; }
.topnews-item:hover .topnews-title { color: var(--c-primary); }

/* Metric badge */
.topnews-metric {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 7px;
	background: var(--c-bg, #f5f6f8);
	border: 1px solid var(--c-border);
	border-radius: 999px;
	color: var(--c-text-muted);
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1;
}
.topnews-metric svg {
	width: 12px; height: 12px;
	flex: 0 0 12px;
	stroke-width: 2.2;
}
.topnews-metric__value { font-variant-numeric: tabular-nums; }

/* Empty state */
.topnews-empty {
	padding: 12px 4px;
	color: var(--c-text-muted);
	font-size: 13px;
	text-align: center;
}

/* ----- edit #2 (2026-05-24T10:33:04.056Z) ----- */
/* === Sidebar Top widget v2 — vertical tabs, medals, color themes === */
.topnews-widget {
	display: block;
	--tn-likes: #ec4899;   /* pink-rose */
	--tn-views: #3b82f6;   /* blue */
	--tn-comm:  #14b8a6;   /* teal */
	--tn-medal-1-from: #fde68a;
	--tn-medal-1-to:   #f59e0b;
	--tn-medal-2-from: #e5e7eb;
	--tn-medal-2-to:   #9ca3af;
	--tn-medal-3-from: #fed7aa;
	--tn-medal-3-to:   #c2733a;
}

/* === Tabs (vertical: icon top, label bottom) === */
.topnews-tabs {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 4px;
	padding: 4px;
	margin: 0 0 12px;
	background: var(--c-bg, rgba(0,0,0,.04));
	border: 1px solid var(--c-border);
	border-radius: 12px;
	position: relative;
}
.topnews-tab {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--c-text-muted);
	font: inherit;
	font-size: 11px;
	font-weight: 500;
	padding: 8px 4px 7px;
	border-radius: 9px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	line-height: 1.1;
	min-width: 0;
	position: relative;
	transition: background-color .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.topnews-tab__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px; height: 22px;
	border-radius: 50%;
	background: transparent;
	transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.topnews-tab__icon svg {
	width: 16px; height: 16px;
	stroke-width: 2;
	display: block;
}
.topnews-tab__label {
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	letter-spacing: .1px;
}

.topnews-tab:hover { color: var(--c-text); }
.topnews-tab:hover .topnews-tab__icon { background: rgba(0,0,0,.06); transform: translateY(-1px); }

/* Active state: pill with subtle shadow, label gets tab's color */
.topnews-tab.is-active {
	background: var(--c-surface);
	box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 0 0 1px var(--c-border);
}
.topnews-tab--likes.is-active { color: var(--tn-likes); }
.topnews-tab--likes.is-active .topnews-tab__icon { background: color-mix(in srgb, var(--tn-likes) 14%, transparent); color: var(--tn-likes); }
.topnews-tab--views.is-active { color: var(--tn-views); }
.topnews-tab--views.is-active .topnews-tab__icon { background: color-mix(in srgb, var(--tn-views) 14%, transparent); color: var(--tn-views); }
.topnews-tab--comm.is-active  { color: var(--tn-comm);  }
.topnews-tab--comm.is-active  .topnews-tab__icon { background: color-mix(in srgb, var(--tn-comm)  14%, transparent); color: var(--tn-comm);  }

/* Active underline indicator */
.topnews-tab.is-active::after {
	content: "";
	position: absolute;
	left: 22%; right: 22%;
	bottom: -1px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	opacity: .85;
}

.topnews-tab:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* === Panels === */
.topnews-panels { position: relative; }
.topnews-panel { display: none; animation: tnFade .22s ease; }
.topnews-panel.is-active { display: block; }
@keyframes tnFade {
	from { opacity: 0; transform: translateY(3px); }
	to   { opacity: 1; transform: none; }
}

/* === Item card === */
.topnews-item {
	display: grid;
	grid-template-columns: 56px 1fr;
	gap: 12px;
	align-items: center;
	padding: 10px 0;
	border-top: 1px solid var(--c-border);
	text-decoration: none;
	color: inherit;
	transition: transform .15s ease;
}
.topnews-item:first-child { border-top: 0; padding-top: 6px; }
.topnews-item:last-child  { padding-bottom: 0; }
.topnews-item:hover { transform: translateX(2px); }
.topnews-item:hover .topnews-title { color: var(--c-primary); }

/* Thumbnail with rank overlay */
.topnews-thumb {
	position: relative;
	width: 56px; height: 56px;
	flex: 0 0 56px;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.topnews-thumb img {
	width: 100%; height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .25s ease;
}
.topnews-item:hover .topnews-thumb img { transform: scale(1.05); }

/* Rank badge — small chip over the bottom-left of the thumb */
.topnews-rank {
	position: absolute;
	left: 3px; bottom: 3px;
	min-width: 18px; height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 10.5px;
	font-weight: 700;
	line-height: 1;
	color: #fff;
	background: rgba(20,20,30,.75);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	box-shadow: 0 1px 2px rgba(0,0,0,.3);
	font-variant-numeric: tabular-nums;
}
.topnews-rank.is-medal { color: #1f1300; text-shadow: 0 1px 0 rgba(255,255,255,.35); border: 1px solid rgba(0,0,0,.1); }
.topnews-rank.medal-1 { background: linear-gradient(135deg, var(--tn-medal-1-from), var(--tn-medal-1-to)); }
.topnews-rank.medal-2 { background: linear-gradient(135deg, var(--tn-medal-2-from), var(--tn-medal-2-to)); }
.topnews-rank.medal-3 { background: linear-gradient(135deg, var(--tn-medal-3-from), var(--tn-medal-3-to)); }

/* Meta column */
.topnews-meta {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.topnews-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: var(--c-text);
	font-weight: 600;
	font-size: 13px;
	line-height: 1.3;
}
.topnews-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	min-height: 18px;
}
.topnews-date {
	color: var(--c-text-muted);
	font-size: 11.5px;
	line-height: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Metric badge — pill, color-coded per tab type */
.topnews-metric {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 2px 7px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	flex: 0 0 auto;
	transition: transform .15s ease;
}
.topnews-metric svg {
	width: 11px; height: 11px;
	stroke-width: 2.4;
	flex: 0 0 11px;
}
.topnews-metric__value { font-variant-numeric: tabular-nums; }
.topnews-metric--likes { color: var(--tn-likes); background: color-mix(in srgb, var(--tn-likes) 12%, transparent); }
.topnews-metric--views { color: var(--tn-views); background: color-mix(in srgb, var(--tn-views) 12%, transparent); }
.topnews-metric--comm  { color: var(--tn-comm);  background: color-mix(in srgb, var(--tn-comm)  12%, transparent); }
.topnews-metric--empty {
	color: var(--c-text-muted);
	opacity: .5;
	font-weight: 500;
	font-size: 13px;
	padding: 0 6px;
	background: transparent;
}
.topnews-item:hover .topnews-metric { transform: scale(1.06); }

/* Empty state */
.topnews-empty {
	padding: 22px 8px;
	color: var(--c-text-muted);
	font-size: 13px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}
.topnews-empty__icon { font-size: 22px; opacity: .7; }

/* Fallback for browsers without color-mix (very old) */
@supports not (background: color-mix(in srgb, red 10%, transparent)) {
	.topnews-tab--likes.is-active .topnews-tab__icon { background: rgba(236,72,153,.14); }
	.topnews-tab--views.is-active .topnews-tab__icon { background: rgba(59,130,246,.14); }
	.topnews-tab--comm.is-active  .topnews-tab__icon { background: rgba(20,184,166,.14); }
	.topnews-metric--likes { background: rgba(236,72,153,.12); }
	.topnews-metric--views { background: rgba(59,130,246,.12); }
	.topnews-metric--comm  { background: rgba(20,184,166,.12); }
}

/* ----- edit #3 (2026-05-24T15:21:21.850Z) ----- */
/* ===== Похожие анкеты — card grid ===== */
.related-news { margin-top: 40px; }

.related-news__head {
	margin-bottom: 18px;
}
.related-news__title {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 !important;
	font-size: 17px !important;
	font-weight: 700;
	color: var(--c-text);
}
.related-news__title svg {
	width: 20px; height: 20px;
	flex: 0 0 20px;
	color: var(--c-primary);
	stroke-width: 2;
}

/* Card grid */
.related-cards {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 12px;
}

/* Individual card */
.rcard {
	display: block;
	text-decoration: none;
	border-radius: var(--c-radius);
	overflow: hidden;
	box-shadow: var(--c-shadow-sm);
	position: relative;
	background: var(--c-surface-2);
	transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease;
	outline-offset: 3px;
}
.rcard:hover {
	transform: translateY(-4px) scale(1.01);
	box-shadow: var(--c-shadow-lg);
	text-decoration: none;
}
.rcard:focus-visible {
	outline: 2px solid var(--c-primary);
}

/* Image wrapper — portrait ratio */
.rcard__img-wrap {
	position: relative;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background: var(--c-surface-2);
}
.rcard__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	display: block;
	transition: transform .35s ease;
}
.rcard:hover .rcard__img {
	transform: scale(1.07);
}

/* Gradient overlay */
.rcard__overlay {
	position: absolute;
	top: 0; right: 0; bottom: 0; left: 0; /* inset: 0 — Chrome < 87 не поддерживает */
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, .82) 0%,
		rgba(0, 0, 0, .38) 38%,
		rgba(0, 0, 0, .08) 60%,
		transparent 80%
	);
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 12px 10px 11px;
	gap: 5px;
	pointer-events: none;
}

/* City badge */
.rcard__city {
	display: inline-block;
	align-self: flex-start;
	background: var(--c-primary);
	color: #fff;
	font-size: 9.5px;
	font-weight: 700;
	letter-spacing: .4px;
	text-transform: uppercase;
	padding: 2px 8px;
	border-radius: var(--c-radius-pill);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
	line-height: 1.4;
}

/* Name */
.rcard__name {
	color: #fff;
	font-weight: 600;
	font-size: 13px;
	line-height: 1.3;
	text-shadow: 0 1px 4px rgba(0,0,0,.6);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Responsive: 3 columns on tablet */
@media (max-width: 900px) {
	.related-cards { grid-template-columns: repeat(3, 1fr); gap: 10px; }
}

/* Responsive: horizontal scroll on mobile */
@media (max-width: 600px) {
	.related-cards {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		gap: 10px;
		padding-bottom: 6px;
		margin: 0 -16px;
		padding-left: 16px;
		padding-right: 16px;
	}
	.related-cards::-webkit-scrollbar { display: none; }
	.rcard {
		flex: 0 0 44%;
		scroll-snap-align: start;
	}
}

/* ----- edit #4 (2026-05-24T15:30:57.802Z) ----- */
/* Photo-count badge (top-right corner of card) */
.rcard__photo-count {
	position: absolute;
	top: 8px;
	left: 8px;
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 3px 7px 3px 5px;
	background: rgba(0,0,0,.55);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	border-radius: 20px;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	pointer-events: none;
	z-index: 2;
}
.rcard__photo-count svg {
	width: 13px;
	height: 13px;
	flex-shrink: 0;
	opacity: .9;
}

/* Responsive: 3 columns on tablet */
@media (max-width: 900px) {
	.related-cards { grid-template-columns: repeat(3, 1fr); }
}

/* ----- edit #5 (2026-05-24T15:36:41.402Z) ----- */
.related-news__title svg {
	width: 20px; height: 20px;
	flex: 0 0 20px;
	color: var(--c-primary);
	stroke-width: 2;
}
.related-news__city {
	color: var(--c-primary);
	font-weight: 700;
}

/* ----- edit #6 (2026-05-24T15:40:08.315Z) ----- */
.related-news__title-text {
	/* Keeps SVG + text aligned when h6 is inline-flex */
	display: inline;
}
.related-news__city-link {
	color: var(--c-primary);
	font-weight: 700;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color .15s;
}
.related-news__city-link:hover {
	border-bottom-color: var(--c-primary);
	text-decoration: none;
}

/* ----- edit #7 (2026-05-24T15:54:38.978Z) ----- */
	top: 8px;
	left: 8px;

/* ----- edit #8 (2026-05-24T15:58:39.749Z) ----- */
/* PM styles: see end of file — dedicated PM section */

/* ----- edit #9 (2026-05-24T16:00:42.016Z) ----- */
/* ============================================================
   PM — Modern redesign
   ============================================================ */

/* ── Shared button styles ─────────────────────────────────── */
.pm-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 34px;
	padding: 0 14px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	border: none;
	cursor: pointer;
	text-decoration: none !important;
	transition: background .15s, color .15s, box-shadow .15s;
	white-space: nowrap;
}
.pm-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.pm-btn--primary {
	background: var(--c-primary);
	color: #fff !important;
}
.pm-btn--primary:hover {
	background: color-mix(in srgb, var(--c-primary) 85%, #000);
	color: #fff !important;
}
.pm-btn--ghost {
	background: var(--c-surface-2);
	color: var(--c-text) !important;
	border: 1px solid var(--c-border);
}
.pm-btn--ghost:hover {
	background: var(--c-border);
	color: var(--c-text) !important;
}

/* ── PM Inbox card (.pm-wrap) ─────────────────────────────── */
.pm-wrap.form-card { padding: 0; overflow: hidden; }

.pm-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 22px 16px;
	border-bottom: 1px solid var(--c-border);
	flex-wrap: wrap;
}
.pm-header__left {
	display: flex;
	align-items: center;
	gap: 10px;
}
.pm-header__icon {
	width: 20px; height: 20px;
	color: var(--c-primary);
	flex-shrink: 0;
}
.pm-header__title {
	margin: 0 !important;
	font-size: 16px !important;
	font-weight: 700;
}
.pm-header__right {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}
.pm-header__actions { display: flex; gap: 8px; }

/* Storage bar */
.pm-storage {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	color: var(--c-text-muted);
}
.pm-storage .pm_progress_bar {
	width: 80px;
	height: 4px;
	border-radius: 2px;
	background: var(--c-border);
	overflow: hidden;
	margin: 0 !important;
	border: none !important;
	padding: 0 !important;
}
.pm-storage .pm_progress_bar span {
	display: block;
	height: 100%;
	background: var(--c-primary);
	border-radius: 2px;
	font-size: 0; /* hide text inside bar */
}
.pm-storage__label { white-space: nowrap; }

/* ── PM List (DLE renders <table class="pm">) ─────────────── */
.pmlist-wrap { padding: 8px 0 0; }

/* Convert table → conversation list */
.pmlist-wrap table.pm,
.pmlist-wrap table.pm tbody { display: block; width: 100%; }
.pmlist-wrap table.pm thead { display: none; }

/* Each row = conversation card */
.pmlist-wrap table.pm tr {
	display: flex;
	align-items: stretch;
	border-bottom: 1px solid var(--c-border);
	transition: background .13s;
	cursor: pointer;
	position: relative;
}
.pmlist-wrap table.pm tr:last-child { border-bottom: none; }
.pmlist-wrap table.pm tr:hover { background: var(--c-surface-2); }

/* Unread indicator stripe (left border via pm_icon cell) */
.pmlist-wrap table.pm td.pm_icon {
	width: 4px;
	min-width: 4px;
	padding: 0;
	background: transparent;
	border: none !important;
	align-self: stretch;
	flex-shrink: 0;
}
.pmlist-wrap table.pm td.pm_icon.pm-unread-image { background: var(--c-primary); }
.pmlist-wrap table.pm td.pm_icon.pm-reply-image  { background: oklch(0.55 0.13 145); }
.pmlist-wrap table.pm td.pm_icon.pm-read-image   { background: transparent; }

/* Main content cell */
.pmlist-wrap table.pm td.pm_subj {
	flex: 1;
	min-width: 0;
	padding: 13px 14px;
	border: none !important;
	vertical-align: middle;
}

/* Subject line */
.pmlist-wrap table.pm .pm_subj a {
	font-size: 14px;
	font-weight: 600;
	color: var(--c-text) !important;
	text-decoration: none !important;
}
.pmlist-wrap table.pm .pm_subj a b { font-weight: 700; }

/* Message preview */
.pmlist-wrap table.pm .pm_last_message {
	font-size: 13px;
	color: var(--c-text-muted);
	margin-top: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

/* "Переписка с ..." */
.pmlist-wrap table.pm .pm_with_user {
	font-size: 12px;
	color: var(--c-text-soft, var(--c-text-muted));
	margin-top: 2px;
}
.pmlist-wrap table.pm .pm_with_user a {
	color: var(--c-primary) !important;
	font-weight: 500;
}

/* Right column: sender + date */
.pmlist-wrap table.pm td.pm_last_user {
	flex: 0 0 auto;
	padding: 13px 14px 13px 0;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	gap: 4px;
	border: none !important;
	min-width: 110px;
}
.pmlist-wrap table.pm .pm_last_user a {
	font-size: 13px;
	font-weight: 600;
	color: var(--c-text) !important;
	text-decoration: none !important;
	white-space: nowrap;
}
.pmlist-wrap table.pm .pm_last_date {
	font-size: 11px;
	color: var(--c-text-muted);
	white-space: nowrap;
}

/* Checkbox column */
.pmlist-wrap table.pm td.pm_checkbox {
	flex: 0 0 auto;
	padding: 13px 16px 13px 6px;
	display: flex;
	align-items: center;
	border: none !important;
}
.pmlist-wrap table.pm td.pm_checkbox input[type="checkbox"] {
	width: 15px; height: 15px;
	cursor: pointer;
	accent-color: var(--c-primary);
}

/* Bold subject for unread */
.pmlist-wrap table.pm tr:has(td.pm-unread-image) .pm_subj a {
	font-weight: 700;
	color: var(--c-text) !important;
}
.pmlist-wrap table.pm tr:has(td.pm-unread-image) .pm_last_message {
	color: var(--c-text);
}

/* Bottom actions bar (delete/mark read etc.) */
.pmlist-wrap form {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	padding: 14px 16px;
	border-top: 1px solid var(--c-border);
}
.pmlist-wrap select {
	height: 34px;
	padding: 0 10px;
	border: 1px solid var(--c-border);
	background: var(--c-surface-2);
	color: var(--c-text);
	border-radius: 8px;
	font-size: 13px;
	cursor: pointer;
}
.pmlist-wrap select:focus { border-color: var(--c-primary); outline: none; }
.pmlist-wrap form input[type="button"],
.pmlist-wrap form input[type="submit"],
.pmlist-wrap form button {
	height: 34px;
	padding: 0 14px;
	background: var(--c-surface-2);
	color: var(--c-text);
	border: 1px solid var(--c-border);
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s;
}
.pmlist-wrap form input[type="button"]:hover,
.pmlist-wrap form input[type="submit"]:hover,
.pmlist-wrap form button:hover { background: var(--c-border); }

/* navigation table (pagination row) */
.pmlist-wrap table.pm_navigation { width: 100%; }

/* ── Compose form ─────────────────────────────────────────── */
.pm-compose {
	padding: 22px;
	border-top: 1px solid var(--c-border);
}
.pm-compose__title {
	margin: 0 0 20px !important;
	font-size: 15px !important;
	font-weight: 700;
}
.pm-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
	margin-bottom: 14px;
}
.pm-field__label {
	font-size: 12px;
	font-weight: 600;
	color: var(--c-text-muted);
	text-transform: uppercase;
	letter-spacing: .4px;
}
.pm-field__input {
	height: 38px;
	padding: 0 12px;
	border: 1px solid var(--c-border);
	border-radius: 8px;
	background: var(--c-surface-2);
	color: var(--c-text);
	font-size: 14px;
	transition: border-color .15s;
}
.pm-field__input:focus { border-color: var(--c-primary); outline: none; }
.pm-compose__editor { margin-bottom: 14px; }
.pm-captcha {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
}
.pm-compose__actions {
	display: flex;
	gap: 10px;
	align-items: center;
}

/* ── Thread view (.pm-thread) ─────────────────────────────── */
.pm-thread.form-card { padding: 0; overflow: hidden; }

.pm-thread__header {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 20px;
	border-bottom: 1px solid var(--c-border);
	background: var(--c-surface);
}
.pm-back {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px; height: 34px;
	border-radius: 8px;
	border: 1px solid var(--c-border);
	color: var(--c-text) !important;
	flex-shrink: 0;
	text-decoration: none !important;
	transition: background .15s;
}
.pm-back:hover { background: var(--c-surface-2); }
.pm-back svg { width: 18px; height: 18px; }
.pm-thread__info {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
}
.pm-thread__name {
	font-size: 15px;
	font-weight: 700;
	color: var(--c-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.pm-thread__subject {
	font-size: 12px;
	color: var(--c-text-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ── Messages list ─────────────────────────────────────────── */
.pm-messages {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 16px 20px;
}

/* Message card */
.pm-message {
	display: flex;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 12px;
	background: var(--c-surface-2);
	transition: background .1s;
	max-width: 80%;
	align-self: flex-start;
}

/* Own messages — right-aligned bubble */
.pm-message--own {
	align-self: flex-end;
	flex-direction: row-reverse;
	background: color-mix(in srgb, var(--c-primary) 12%, var(--c-surface));
	border: 1px solid color-mix(in srgb, var(--c-primary) 25%, transparent);
}

/* Avatar */
.pm-message__avatar {
	flex-shrink: 0;
	align-self: flex-start;
}
.pm-message__avatar img {
	width: 36px; height: 36px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
	border: 1.5px solid var(--c-border);
}

/* Body */
.pm-message__body {
	flex: 1;
	min-width: 0;
}
.pm-message--own .pm-message__body {
	align-items: flex-end;
	display: flex;
	flex-direction: column;
}

/* Meta: author + date */
.pm-message__meta {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 6px;
	flex-wrap: wrap;
}
.pm-message--own .pm-message__meta { flex-direction: row-reverse; }
.pm-message__author {
	font-size: 13px;
	font-weight: 700;
	color: var(--c-text);
}
.pm-message__author a {
	color: inherit !important;
	text-decoration: none !important;
}
.pm-message__date {
	font-size: 11px;
	color: var(--c-text-muted);
}

/* Online dot */
.pm-online-dot {
	display: inline-block;
	width: 7px; height: 7px;
	border-radius: 50%;
	background: oklch(0.55 0.13 145);
	flex-shrink: 0;
}

/* Text */
.pm-message__text {
	font-size: 14px;
	line-height: 1.55;
	word-break: break-word;
	color: var(--c-text);
}
.pm-message--own .pm-message__text { text-align: left; }

/* Signature */
.pm-message__signature {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px dashed var(--c-border);
	font-size: 12px;
	color: var(--c-text-muted);
}

/* Actions */
.pm-message__actions {
	display: flex;
	gap: 10px;
	margin-top: 8px;
	flex-wrap: wrap;
}
.pm-message__actions a,
.pm-message__actions span {
	font-size: 12px;
	color: var(--c-text-muted);
	cursor: pointer;
	text-decoration: none;
	transition: color .13s;
}
.pm-message__actions a:hover,
.pm-message__actions span:hover { color: var(--c-primary); }
.pm-message__actions .pm-action-del,
.pm-message__actions a.pm-action-del { color: var(--c-danger, #e74c3c); }
.pm-message__actions .pm-action-del:hover { color: color-mix(in srgb, var(--c-danger, #e74c3c) 75%, #000); }

/* ── Reply box ─────────────────────────────────────────────── */
.pm-reply {
	padding: 16px 20px 20px;
	border-top: 1px solid var(--c-border);
}
.pm-reply__foot {
	margin-top: 12px;
	display: flex;
	gap: 10px;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 600px) {
	.pm-header { padding: 14px 16px 12px; gap: 10px; }
	.pm-header__right { gap: 8px; }
	.pm-storage { display: none; }
	.pm-compose { padding: 16px; }
	.pm-thread__header { padding: 12px 14px; }
	.pm-messages { padding: 12px 14px; }
	.pm-message { max-width: 92%; }
	.pm-reply { padding: 12px 14px 16px; }
	.pmlist-wrap table.pm td.pm_last_user { display: none; }
	.pmlist-wrap table.pm td.pm_subj { padding: 12px 10px; }
	.pmlist-wrap form { padding: 12px 14px; }
}

/* ----- edit #10 (2026-05-24T16:03:52.226Z) ----- */
/* ── All td: reset engine.css backgrounds/borders ─────────── */
.pmlist-wrap table.pm td {
	background: transparent !important;
	border: none !important;
	padding: 0;
}

/* Unread indicator stripe */
.pmlist-wrap table.pm td.pm_icon {
	width: 4px;
	min-width: 4px;
	padding: 0;
	background: transparent !important;
	align-self: stretch;
	flex-shrink: 0;
}
.pmlist-wrap table.pm td.pm_icon.pm-unread-image { background: var(--c-primary) !important; }
.pmlist-wrap table.pm td.pm_icon.pm-reply-image  { background: oklch(0.55 0.13 145) !important; }

/* Main content cell */
.pmlist-wrap table.pm td.pm_subj {
	flex: 1;
	min-width: 0;
	padding: 13px 14px !important;
}
.pmlist-wrap table.pm .pm_subj a {
	font-size: 14px;
	font-weight: 600;
	color: var(--c-text) !important;
	text-decoration: none !important;
}
.pmlist-wrap table.pm .pm_subj a b { font-weight: 700; }
.pmlist-wrap table.pm .pm_last_message {
	font-size: 13px;
	color: var(--c-text-muted);
	margin-top: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.pmlist-wrap table.pm .pm_with_user {
	font-size: 12px;
	color: var(--c-text-muted);
	margin-top: 2px;
}
.pmlist-wrap table.pm .pm_with_user a { color: var(--c-primary) !important; font-weight: 500; }

/* Right column: sender + date */
.pmlist-wrap table.pm td.pm_last_user {
	flex: 0 0 auto;
	padding: 13px 14px 13px 0 !important;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	gap: 4px;
	min-width: 110px;
}
.pmlist-wrap table.pm .pm_last_user a {
	font-size: 13px;
	font-weight: 600;
	color: var(--c-text) !important;
	text-decoration: none !important;
	white-space: nowrap;
}
.pmlist-wrap table.pm .pm_last_date {
	font-size: 11px;
	color: var(--c-text-muted);
	white-space: nowrap;
}

/* Checkbox column */
.pmlist-wrap table.pm td.pm_checkbox {
	flex: 0 0 auto;
	padding: 13px 16px 13px 6px !important;
	display: flex;
	align-items: center;
}
.pmlist-wrap table.pm td.pm_checkbox input[type="checkbox"] {
	width: 15px; height: 15px;
	cursor: pointer;
	accent-color: var(--c-primary);
}

/* Bold/colored for unread rows */
.pmlist-wrap table.pm tr:has(td.pm-unread-image) .pm_subj a { font-weight: 700; }
.pmlist-wrap table.pm tr:has(td.pm-unread-image) .pm_last_message { color: var(--c-text); }

/* ── Action bar: the form wraps BOTH the .pm table and .pm_navigation.
   Keep form as block so tables stack vertically. ──────────────── */
.pmlist-wrap form { display: block; }

/* Navigation table (pagination + select + submit) */
.pmlist-wrap table.pm_navigation,
.pmlist-wrap table.pm_navigation tbody,
.pmlist-wrap table.pm_navigation tr { display: flex; width: 100%; align-items: center; }
.pmlist-wrap table.pm_navigation td {
	padding: 12px 16px !important;
	background: transparent !important;
	border: none !important;
}
.pmlist-wrap table.pm_navigation td:last-child {
	margin-left: auto;
	display: flex;
	gap: 8px;
	align-items: center;
}
.pmlist-wrap table.pm_navigation {
	border-top: 1px solid var(--c-border);
	margin-top: 4px;
}

.pmlist-wrap select {
	height: 34px;
	padding: 0 10px;
	border: 1px solid var(--c-border);
	background: var(--c-surface-2);
	color: var(--c-text);
	border-radius: 8px;
	font-size: 13px;
	cursor: pointer;
}
.pmlist-wrap select:focus { border-color: var(--c-primary); outline: none; }
.pmlist-wrap form input[type="button"],
.pmlist-wrap form input[type="submit"],
.pmlist-wrap form button {
	height: 34px;
	padding: 0 14px;
	background: var(--c-surface-2);
	color: var(--c-text);
	border: 1px solid var(--c-border);
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s;
}
.pmlist-wrap form input[type="button"]:hover,
.pmlist-wrap form input[type="submit"]:hover,
.pmlist-wrap form button:hover { background: var(--c-border); }

/* ----- edit #11 (2026-05-24T16:15:37.558Z) ----- */
/* ============================================================
   PM — базовые стили (таблицы не переопределяем)
   ============================================================ */

/* ── Shared button styles ─────────────────────────────────── */
.pm-btn {

/* ----- edit #12 (2026-05-24T16:16:27.429Z) ----- */
/* ── PM List (DLE renders <table class="pm">) ─────────────── */
.pmlist-wrap { padding: 4px 0 0; }

/* Hide the DLE table header — we don't need column titles */
.pmlist-wrap table.pm thead { display: none; }

/* Table: full width, no extra spacing */
.pmlist-wrap table.pm {
	width: 100% !important;
	border-collapse: collapse;
}

/* Every td: strip engine.css white background */
.pmlist-wrap table.pm td.pm_list {
	background: transparent !important;
	border: none !important;
	border-bottom: 1px solid var(--c-border) !important;
	padding: 12px 14px;
	vertical-align: middle;
}
.pmlist-wrap table.pm tr:last-child td.pm_list {
	border-bottom: none !important;
}
.pmlist-wrap table.pm tr:hover td.pm_list {
	background: var(--c-surface-2) !important;
	cursor: pointer;
}

/* Unread indicator stripe */
.pmlist-wrap table.pm td.pm_icon.pm_list {
	width: 4px;
	padding: 0 !important;
}
.pmlist-wrap table.pm td.pm_icon.pm-unread-image { background: var(--c-primary) !important; }
.pmlist-wrap table.pm td.pm_icon.pm-reply-image  { background: oklch(0.55 0.13 145) !important; }

/* Subject cell */
.pmlist-wrap table.pm td.pm_subj .pm_subj a {
	font-size: 14px;
	font-weight: 600;
	color: var(--c-text) !important;
	text-decoration: none !important;
}
.pmlist-wrap table.pm td.pm_subj .pm_subj a b { font-weight: 700; }
.pmlist-wrap table.pm td.pm_subj .pm_last_message {
	font-size: 13px;
	color: var(--c-text-muted);
	margin-top: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 320px;
}
.pmlist-wrap table.pm td.pm_subj .pm_with_user {
	font-size: 12px;
	color: var(--c-text-muted);
	margin-top: 2px;
}
.pmlist-wrap table.pm td.pm_subj .pm_with_user a { color: var(--c-primary) !important; font-weight: 500; }

/* Sender + date column */
.pmlist-wrap table.pm td.pm_last_user .pm_last_user {
	font-size: 13px;
	font-weight: 600;
	color: var(--c-text);
	white-space: nowrap;
}
.pmlist-wrap table.pm td.pm_last_user .pm_last_user a {
	color: var(--c-text) !important;
	text-decoration: none !important;
}
.pmlist-wrap table.pm td.pm_last_user .pm_last_date {
	font-size: 11px;
	color: var(--c-text-muted);
	white-space: nowrap;
}

/* Checkbox column */
.pmlist-wrap table.pm td.pm_checkbox.pm_list {
	width: 50px;
	text-align: center;
	padding: 0 10px !important;
}
.pmlist-wrap table.pm td.pm_checkbox input[type="checkbox"] {
	width: 15px; height: 15px;
	cursor: pointer;
	accent-color: var(--c-primary);
}

/* Bold subject for unread */
.pmlist-wrap table.pm tr:has(td.pm-unread-image) .pm_subj a { font-weight: 700; }
.pmlist-wrap table.pm tr:has(td.pm-unread-image) .pm_last_message { color: var(--c-text); }

/* ── Action bar (pm_navigation table) ─────────────────────── */
.pmlist-wrap table.pm_navigation {
	width: 100% !important;
	border-top: 1px solid var(--c-border);
	margin-top: 4px;
}
.pmlist-wrap table.pm_navigation td {
	padding: 10px 14px !important;
	background: transparent !important;
	border: none !important;
	vertical-align: middle;
}
.pmlist-wrap select {
	height: 34px;
	padding: 0 10px;
	border: 1px solid var(--c-border);
	background: var(--c-surface-2);
	color: var(--c-text);
	border-radius: 8px;
	font-size: 13px;
	cursor: pointer;
}
.pmlist-wrap select:focus { border-color: var(--c-primary); outline: none; }
.pmlist-wrap form input[type="button"],
.pmlist-wrap form input[type="submit"],
.pmlist-wrap form button {
	height: 34px;
	padding: 0 14px;
	background: var(--c-surface-2);
	color: var(--c-text);
	border: 1px solid var(--c-border);
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s;
}
.pmlist-wrap form input[type="button"]:hover,
.pmlist-wrap form input[type="submit"]:hover,
.pmlist-wrap form button:hover { background: var(--c-border); }

/* ----- edit #13 (2026-05-24T16:16:33.575Z) ----- */
	.pm-reply { padding: 12px 14px 16px; }
	.pmlist-wrap table.pm td.pm_last_user { display: none; }
	.pmlist-wrap table.pm td.pm_subj.pm_list { padding: 12px 10px !important; }
}

/* ----- edit #14 (2026-05-24T16:20:28.762Z) ----- */
/* Icon column — fixed 42px, icon centered, colored by state */
.pmlist-wrap table.pm td.pm_icon.pm_list {
	width: 42px;
	min-width: 42px;
	text-align: center;
	vertical-align: middle;
	background: transparent !important;
	padding: 0 !important;
}
.pmlist-wrap table.pm td.pm_icon.pm_list svg {
	width: 18px;
	height: 18px;
	vertical-align: middle;
	display: inline-block;
	color: var(--c-text-muted);
}
.pmlist-wrap table.pm td.pm_icon.pm-unread-image svg { color: var(--c-primary); }
.pmlist-wrap table.pm td.pm_icon.pm-reply-image svg  { color: oklch(0.55 0.13 145); }

/* Subject cell */
.pmlist-wrap table.pm td.pm_subj .pm_subj a {
	font-size: 14px;
	font-weight: 500;
	color: var(--c-text) !important;
	text-decoration: none !important;
	line-height: 1.3;
}
.pmlist-wrap table.pm td.pm_subj .pm_subj a b {
	font-weight: 700;
	font-size: 14px;
}
.pmlist-wrap table.pm td.pm_subj .pm_last_message {
	font-size: 13px;
	color: var(--c-text-muted);
	margin-top: 3px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 360px;
}
.pmlist-wrap table.pm td.pm_subj .pm_with_user {
	font-size: 12px;
	color: var(--c-text-muted);
	margin-top: 2px;
}
.pmlist-wrap table.pm td.pm_subj .pm_with_user a { color: var(--c-primary) !important; font-weight: 500; }

/* ----- edit #15 (2026-05-24T16:20:37.588Z) ----- */
/* Sender + date column — right-aligned, no wrap */
.pmlist-wrap table.pm td.pm_last_user {
	text-align: right;
	white-space: nowrap;
	vertical-align: middle;
}
.pmlist-wrap table.pm td.pm_last_user .pm_last_user {
	font-size: 13px;
	font-weight: 600;
	color: var(--c-text);
	white-space: nowrap;
	display: block;
}
.pmlist-wrap table.pm td.pm_last_user .pm_last_user a {
	color: var(--c-text) !important;
	text-decoration: none !important;
}
.pmlist-wrap table.pm td.pm_last_user .pm_last_date {
	font-size: 11px;
	color: var(--c-text-muted);
	white-space: nowrap;
	display: block;
	margin-top: 2px;
}

/* ----- edit #16 (2026-05-25T00:08:00.582Z) ----- */
/* ── Sort bar ─────────────────────────────────────────────────
   DLE выводит: <ul class="sort"><li class="asc|desc"><a>...</a></li>...</ul>
   Переопределяем engine.css полностью.
   ──────────────────────────────────────────────────────────── */
.sort-bar {
	margin: 0 0 18px;
}

/* Контейнер-список → горизонтальная flex-полоска */
.sort-bar ul.sort {
	display: flex !important;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
	align-items: center;
}

/* Каждый пункт — inline, не блок */
.sort-bar ul.sort > li {
	display: block !important;
	margin: 0 !important;
}

/* Ссылка → таблетка-кнопка */
.sort-bar ul.sort > li a {
	display: inline-flex !important;
	align-items: center;
	gap: 4px;
	height: 30px;
	padding: 0 12px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 500;
	color: var(--c-text-muted) !important;
	text-decoration: none !important;
	background: var(--c-surface-2);
	border: 1px solid var(--c-border);
	transition: background .15s, color .15s, border-color .15s;
	white-space: nowrap;
}
.sort-bar ul.sort > li a:hover {
	background: var(--c-border);
	color: var(--c-text) !important;
	border-color: var(--c-border-strong, var(--c-border));
}

/* Активный пункт (asc/desc) */
.sort-bar ul.sort > li.asc a,
.sort-bar ul.sort > li.desc a {
	background: var(--c-primary) !important;
	color: #fff !important;
	border-color: var(--c-primary) !important;
	font-weight: 600;
}
.sort-bar ul.sort > li.asc a:hover,
.sort-bar ul.sort > li.desc a:hover {
	background: color-mix(in srgb, var(--c-primary) 85%, #000) !important;
	border-color: color-mix(in srgb, var(--c-primary) 85%, #000) !important;
}

/* Скрываем старую PNG-стрелку из engine.css, рисуем свою через CSS */
.sort-bar ul.sort > li.asc a:after,
.sort-bar ul.sort > li.desc a:after {
	content: "" !important;
	display: inline-block !important;
	width: 0 !important;
	height: 0 !important;
	background: none !important;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	flex-shrink: 0;
	vertical-align: middle;
	margin: 0 !important;
}
.sort-bar ul.sort > li.asc a:after {
	border-bottom: 5px solid #fff;
}
.sort-bar ul.sort > li.desc a:after {
	border-top: 5px solid #fff;
}

@media (max-width: 600px) {
	.sort-bar ul.sort { gap: 5px; }
	.sort-bar ul.sort > li a { font-size: 12px; padding: 0 10px; height: 28px; }
}

/* ----- edit #17 (2026-05-25T00:12:00.460Z) ----- */
/* Контейнер-список → горизонтальная flex-полоска */
.sort-bar ul.sort {
	display: flex !important;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
	align-items: center;
}

/* Лейбл «Сортировать по:» как первый flex-элемент */
.sort-bar ul.sort::before {
	content: "Сортировать по:";
	font-size: 11px;
	font-weight: 600;
	color: var(--c-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.07em;
	white-space: nowrap;
	margin-right: 4px;
	align-self: center;
	flex-shrink: 0;
}

/* ----- edit #18 (2026-05-25T00:12:12.542Z) ----- */
/* Скрываем старую PNG-стрелку из engine.css, рисуем свою через CSS.
   ВАЖНО: DLE-класс — следующее направление, а не текущее.
   li.asc  → сейчас сортировка DESC (убывание) → стрелка ▼
   li.desc → сейчас сортировка ASC  (возрастание) → стрелка ▲ */
.sort-bar ul.sort > li.asc a:after,
.sort-bar ul.sort > li.desc a:after {
	content: "" !important;
	display: inline-block !important;
	width: 0 !important;
	height: 0 !important;
	background: none !important;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	flex-shrink: 0;
	margin: 0 0 1px 1px !important;
}
/* li.asc = текущая сортировка DESC → стрелка вниз ▼ */
.sort-bar ul.sort > li.asc a:after {
	border-top: 5px solid #fff;
}
/* li.desc = текущая сортировка ASC → стрелка вверх ▲ */
.sort-bar ul.sort > li.desc a:after {
	border-bottom: 5px solid #fff;
}

/* ----- edit #19 (2026-05-25T00:13:39.944Z) ----- */
@media (max-width: 700px) {
	/* Горизонтальный скролл в одну строку — как табы в мобильных приложениях */
	.sort-bar {
		margin-left: -16px;
		margin-right: -16px;
		margin-bottom: 14px;
	}
	.sort-bar ul.sort {
		flex-wrap: nowrap !important;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x mandatory;
		gap: 6px !important;
		padding: 4px 16px 8px !important;
		/* Скрываем скроллбар визуально */
		scrollbar-width: none;
	}
	.sort-bar ul.sort::-webkit-scrollbar { display: none; }
	.sort-bar ul.sort::before {
		/* Скрываем лейбл — на мобиле не нужен */
		display: none !important;
	}
	.sort-bar ul.sort > li {
		flex-shrink: 0;
		scroll-snap-align: start;
	}
	.sort-bar ul.sort > li a {
		font-size: 12px;
		padding: 0 11px;
		height: 30px;
		white-space: nowrap;
	}
}

/* ----- edit #20 (2026-05-25T00:16:45.061Z) ----- */
/* «Дате изменения» — скрываем везде, нет смысла для каталога анкет */
.sort-bar ul.sort > li.sort_by_editdate { display: none !important; }

@media (max-width: 700px) {
	/* Горизонтальный скролл в одну строку — как табы в мобильных приложениях */
	.sort-bar {
		margin-left: -16px;
		margin-right: -16px;
		margin-bottom: 14px;
	}
	/* Лейбл «Сортировать по» — над строкой таблеток */
	.sort-bar form::before {
		content: "Сортировать по";
		display: block;
		font-size: 11px;
		font-weight: 600;
		color: var(--c-text-muted);
		text-transform: uppercase;
		letter-spacing: 0.07em;
		padding: 0 16px 8px;
	}
	.sort-bar ul.sort {
		flex-wrap: nowrap !important;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x mandatory;
		gap: 6px !important;
		padding: 2px 16px 10px !important;
		scrollbar-width: none;
	}
	.sort-bar ul.sort::-webkit-scrollbar { display: none; }
	/* На мобиле лейбл уже есть через form::before — скрываем внутри ul */
	.sort-bar ul.sort::before { display: none !important; }
	.sort-bar ul.sort > li {
		flex-shrink: 0;
		scroll-snap-align: start;
	}
	.sort-bar ul.sort > li a {
		font-size: 12px;
		padding: 0 11px;
		height: 30px;
	}
}

/* ----- edit #21 (2026-05-25T00:19:55.160Z) ----- */
@media (max-width: 700px) {
	/* Полоска от края до края с фоном — чёткое разделение от контента */
	.sort-bar {
		margin: 0 -16px 16px;
		background: var(--c-surface);
		border-top: 1px solid var(--c-border);
		border-bottom: 1px solid var(--c-border);
	}

	/* Лейбл — маленький заголовок над таблетками */
	.sort-bar form::before {
		content: "Сортировать по";
		display: block;
		font-size: 10px;
		font-weight: 700;
		color: var(--c-text-muted);
		text-transform: uppercase;
		letter-spacing: 0.09em;
		padding: 12px 16px 6px;
	}

	/* Горизонтальный скролл без переноса */
	.sort-bar ul.sort {
		flex-wrap: nowrap !important;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		gap: 6px !important;
		padding: 0 16px 12px !important;
		margin: 0 !important;
	}
	.sort-bar ul.sort::-webkit-scrollbar { display: none; }

	/* Лейбл внутри ul убираем — есть form::before */
	.sort-bar ul.sort::before { display: none !important; }

	.sort-bar ul.sort > li { flex-shrink: 0; }

	/* Таблетки чуть крупнее — комфортный touch-target */
	.sort-bar ul.sort > li a {
		height: 34px;
		font-size: 13px;
		padding: 0 13px;
	}
}

/* ----- edit #22 (2026-05-25T00:24:55.515Z) ----- */
/* ── Thread view (.pm-thread — внутри .pm-wrap.form-card) ─── */
.pm-thread {
	border-top: 1px solid var(--c-border);
}

.pm-thread__header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 22px;
	border-bottom: 1px solid var(--c-border);
	background: var(--c-surface-2);
}
.pm-back {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px; height: 30px;
	border-radius: 7px;
	border: 1px solid var(--c-border);
	color: var(--c-text) !important;
	flex-shrink: 0;
	text-decoration: none !important;
	transition: background .15s;
}
.pm-back:hover { background: var(--c-border); }
.pm-back svg { width: 16px; height: 16px; }
.pm-thread__info {
	display: flex;
	align-items: baseline;
	gap: 8px;
	min-width: 0;
	flex: 1;
}
.pm-thread__name {
	font-size: 15px;
	font-weight: 700;
	color: var(--c-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.pm-thread__subject {
	font-size: 12px;
	color: var(--c-text-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ── Messages list ─────────────────────────────────────────── */
.pm-messages {
	display: flex;
	flex-direction: column;
	gap: 1px;
	padding: 0;
}

/* Message row: разделитель + контент */
.pm-message {
	display: flex;
	gap: 14px;
	padding: 16px 22px;
	border-bottom: 1px solid var(--c-border);
	transition: background .1s;
}
.pm-message:last-child { border-bottom: none; }
.pm-message:hover { background: var(--c-surface-2); }

/* Own messages — чуть отличный фон */
.pm-message--own {
	background: color-mix(in srgb, var(--c-primary) 5%, var(--c-surface));
}
.pm-message--own:hover {
	background: color-mix(in srgb, var(--c-primary) 9%, var(--c-surface));
}

/* Avatar */
.pm-message__avatar { flex-shrink: 0; }
.pm-message__avatar img {
	width: 40px; height: 40px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
	border: 2px solid var(--c-border);
}

/* Body */
.pm-message__body { flex: 1; min-width: 0; }

/* Meta: author + online + date */
.pm-message__meta {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 6px;
	flex-wrap: wrap;
}
.pm-message__author {
	font-size: 13px;
	font-weight: 700;
	color: var(--c-text);
}
.pm-message__author a {
	color: inherit !important;
	text-decoration: none !important;
}
.pm-message__author a:hover { color: var(--c-primary) !important; }
.pm-message__date {
	font-size: 11px;
	color: var(--c-text-muted);
}

/* Online dot */
.pm-online-dot {
	display: inline-block;
	width: 7px; height: 7px;
	border-radius: 50%;
	background: oklch(0.55 0.13 145);
	flex-shrink: 0;
}

/* Text */
.pm-message__text {
	font-size: 14px;
	line-height: 1.6;
	word-break: break-word;
	color: var(--c-text);
}

/* Signature */
.pm-message__signature {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px dashed var(--c-border);
	font-size: 12px;
	color: var(--c-text-muted);
}

/* Actions: появляются мягко */
.pm-message__actions {
	display: flex;
	gap: 14px;
	margin-top: 10px;
	flex-wrap: wrap;
	opacity: 0;
	transition: opacity .15s;
}
.pm-message:hover .pm-message__actions { opacity: 1; }
.pm-message__actions a,
.pm-message__actions span {
	font-size: 12px;
	color: var(--c-text-muted);
	cursor: pointer;
	text-decoration: none;
	transition: color .13s;
}
.pm-message__actions a:hover,
.pm-message__actions span:hover { color: var(--c-primary); }
.pm-message__actions .pm-action-del { color: var(--c-danger, #e74c3c) !important; }
.pm-message__actions .pm-action-del:hover { opacity: .75; }

/* ── Reply box ─────────────────────────────────────────────── */
.pm-reply {
	padding: 18px 22px 22px;
	border-top: 1px solid var(--c-border);
	background: var(--c-surface-2);
}

/* Textarea DLE-редактора */
.pm-reply textarea,
.pm-reply .bb-editor textarea {
	width: 100%;
	min-height: 110px;
	border: 1px solid var(--c-border);
	border-radius: 10px;
	background: var(--c-surface);
	color: var(--c-text);
	padding: 12px 14px;
	font-size: 14px;
	line-height: 1.5;
	font-family: var(--ff-sans, inherit);
	resize: vertical;
	transition: border-color .15s;
	box-sizing: border-box;
}
.pm-reply textarea:focus,
.pm-reply .bb-editor textarea:focus {
	border-color: var(--c-primary);
	outline: none;
}

.pm-reply__foot {
	margin-top: 12px;
	display: flex;
	gap: 10px;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 600px) {
	.pm-header { padding: 12px 16px; gap: 8px; }
	.pm-header__right { gap: 8px; }
	.pm-storage { display: none; }
	.pm-compose { padding: 16px; }
	.pm-thread__header { padding: 10px 16px; }
	.pm-message { padding: 14px 16px; gap: 10px; }
	.pm-message__avatar img { width: 34px; height: 34px; }
	.pm-message__actions { opacity: 1; }
	.pm-reply { padding: 14px 16px 18px; }
	.pmlist-wrap table.pm td.pm_last_user { display: none; }
	.pmlist-wrap table.pm td.pm_subj.pm_list { padding: 12px 10px !important; }
}

/* ----- edit #23 (2026-05-25T00:28:40.324Z) ----- */
/* ── Thread view (.pm-thread — внутри .pm-wrap.form-card) ─── */
.pm-thread {
	/* border-top убран: .pm-header уже даёт border-bottom */
}

/* ----- edit #24 (2026-05-25T00:32:58.845Z) ----- */
/* Search hint — chip-style examples */
.search-hint {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 5px;
	margin: 8px 0 0 !important;
	padding: 0 !important;
}
.search-hint__label {
	font-size: 11px;
	font-weight: 600;
	color: var(--c-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-right: 2px;
	flex-shrink: 0;
}
.search-hint__chip {
	display: inline-flex;
	align-items: center;
	height: 22px;
	padding: 0 9px;
	border-radius: 999px;
	border: 1px solid var(--c-border);
	background: var(--c-surface-2);
	font-size: 12px;
	font-family: inherit;
	color: var(--c-text-muted);
	cursor: pointer;
	transition: background .12s, color .12s, border-color .12s;
	line-height: 1;
	flex-shrink: 0;
}
.search-hint__chip:hover {
	background: var(--c-primary);
	border-color: var(--c-primary);
	color: #fff;
}

/* ----- edit #25 (2026-05-25T00:33:05.361Z) ----- */
.saw__pm-badge {
	background: var(--c-primary);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 1px 6px;
	border-radius: 999px;
	line-height: 1.6;
	flex-shrink: 0;
}
/* Скрываем бейдж когда 0 непрочитанных */
.saw__pm-badge[data-count="0"] { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════════
   Premium integration: golden nickname, crown, premium menu link, badges
   ═══════════════════════════════════════════════════════════════════════ */

/* Golden gradient nickname for premium users (group 1/admin or 6/premium) */
.saw__login--premium {
	background: linear-gradient(135deg, #f9d76b 0%, #f4b942 50%, #d49622 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}
@supports not (background-clip: text) {
	.saw__login--premium { color: #f4b942; -webkit-text-fill-color: #f4b942; }
}

/* Crown icon next to premium nickname */
.saw__crown {
	width: 14px;
	height: 14px;
	color: #f4b942;
	flex-shrink: 0;
	filter: drop-shadow(0 0 4px rgba(244, 185, 66, .35));
	-webkit-text-fill-color: #f4b942;   /* override the transparent fill from parent */
}

/* Avatar with golden ring for premium users */
.saw__avatar--premium {
	background: linear-gradient(135deg, rgba(249, 215, 107, .25), rgba(212, 150, 34, .15)) !important;
	border-color: rgba(244, 185, 66, .65) !important;
	color: #f4b942 !important;
	box-shadow: 0 0 14px rgba(244, 185, 66, .25);
}
.saw__avatar--premium:hover {
	background: linear-gradient(135deg, rgba(249, 215, 107, .35), rgba(212, 150, 34, .25)) !important;
	border-color: #f4b942 !important;
}

/* Premium menu link — golden accent */
.saw__link--premium {
	font-weight: 700 !important;
}
.saw__link--premium .saw__link-icon {
	color: #f4b942 !important;
	fill: #f4b942 !important;
	opacity: 1 !important;
	filter: drop-shadow(0 0 4px rgba(244, 185, 66, .35));
}
.saw__link--premium:hover {
	background: linear-gradient(90deg, rgba(244, 185, 66, .14), rgba(244, 185, 66, 0)) !important;
	color: #d49622 !important;
}

/* Label inside a link: takes remaining space, pushes badge to the right */
.saw__link-label {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Right-aligned badge inside a link (PM count, Premium status, etc.) */
.saw__link-badge {
	margin-left: auto;
	font-size: 10px;
	font-weight: 700;
	padding: 1px 7px;
	border-radius: 999px;
	line-height: 1.6;
	flex-shrink: 0;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.saw__link-badge--pm {
	background: var(--c-primary);
	color: #fff;
	text-transform: none;
	letter-spacing: 0;
	padding: 1px 6px;
}
.saw__link-badge--pm[data-count="0"] { display: none !important; }
.saw__link-badge--active {
	background: linear-gradient(135deg, #f9d76b 0%, #f4b942 50%, #d49622 100%);
	color: #fff;
	text-shadow: 0 1px 0 rgba(0, 0, 0, .15);
	box-shadow: 0 0 0 1px rgba(244, 185, 66, .35);
}
.saw__link-badge--cta {
	background: var(--c-primary);
	color: #fff;
}
.saw__link:hover .saw__link-badge--cta {
	background: var(--c-primary-hover, #e8665a);
}

/* ── Premium crown in comments — gold gradient + glowing crown, but ONLY
       when the comment AUTHOR is in Premium group (id=6). Driven by the
       comment-author--g{group-id} class set from {group-id} in comments.tpl,
       which is the comment author's group (not the viewer's). ─────────── */
.comment-crown { display: none; }   /* hidden by default for every comment */

.comment-author--g6 {
	background: linear-gradient(135deg, #f9d76b 0%, #f4b942 50%, #d49622 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-weight: 700;
}
.comment-author--g6 .comment-crown {
	display: inline-block;
	width: 13px;
	height: 13px;
	color: #f4b942;
	flex-shrink: 0;
	-webkit-text-fill-color: #f4b942;
	filter: drop-shadow(0 0 3px rgba(244, 185, 66, .35));
	vertical-align: middle;
}
@supports not (background-clip: text) {
	.comment-author--g6 { color: #f4b942; -webkit-text-fill-color: #f4b942; }
}

/* ── Premium crown in user-profile card ──────────────────────────────── */
.user-card__name--premium {
	background: linear-gradient(135deg, #f9d76b 0%, #f4b942 50%, #d49622 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
@supports not (background-clip: text) {
	.user-card__name--premium { color: #f4b942; -webkit-text-fill-color: #f4b942; }
}
.user-card__crown {
	width: 22px;
	height: 22px;
	color: #f4b942;
	flex-shrink: 0;
	-webkit-text-fill-color: #f4b942;
	filter: drop-shadow(0 0 6px rgba(244, 185, 66, .4));
	vertical-align: middle;
}

/* ----- edit #26 (2026-05-25T00:33:16.035Z) ----- */
.saw__link {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 6px;
	font-size: 13px;
	font-weight: 500;
	color: var(--c-text) !important;
	text-decoration: none !important;
	border-radius: var(--c-radius-sm);
	transition: background .12s ease, color .12s ease, padding-left .12s ease;
}
.saw__link:hover {
	background: var(--c-surface-2);
	color: var(--c-primary) !important;
	padding-left: 10px;
}
/* Icon inside link */
.saw__link-icon {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	stroke: currentColor;
	opacity: 0.5;
	transition: opacity .12s;
}
.saw__link:hover .saw__link-icon { opacity: 1; }

.saw__link--admin { color: var(--c-warn) !important; }
.saw__link--admin:hover {
	background: color-mix(in srgb, var(--c-warn) 10%, transparent) !important;
	color: var(--c-warn) !important;
}

/* Footer: logout button */
.saw__footer { display: flex; }
.saw__footer .btn { flex: 1; text-align: center; justify-content: center; }
.saw__logout {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 6px;
}
.saw__logout svg {
	width: 14px !important;
	height: 14px !important;
	flex-shrink: 0;
	stroke: currentColor;
	opacity: 0.75;
}

/* ----- edit #27 (2026-05-25T00:33:23.410Z) ----- */
.saw__avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: color-mix(in srgb, var(--c-primary) 15%, var(--c-surface-2));
	border: 2px solid color-mix(in srgb, var(--c-primary) 30%, transparent);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: var(--c-primary);
	text-decoration: none !important;
	transition: background .15s, border-color .15s, transform .15s;
}
.saw__avatar:hover {
	background: color-mix(in srgb, var(--c-primary) 25%, var(--c-surface-2));
	border-color: var(--c-primary);
	transform: scale(1.05);
}

/* ----- edit #28 (2026-05-25T00:39:07.540Z) ----- */
.news-list {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
	gap: 14px !important;
}

/* ── Search results: same card grid as .news-list ─────────── */
.content-flow--search {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 14px;
}
/* Everything that's NOT a profile-card spans the full row */
.content-flow--search > :not(.profile-card) {
	grid-column: 1 / -1;
}

/* Shared profile-card styles for both contexts */
.news-list .profile-card,
.content-flow--search .profile-card {
	float: none !important;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: var(--c-surface);
	border-radius: var(--c-radius);
	box-shadow: var(--c-shadow-sm);
	overflow: hidden;
	transition: transform .15s ease, box-shadow .15s ease;
	display: flex;
	flex-direction: column;
}
.news-list .profile-card:hover,
.content-flow--search .profile-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--c-shadow-md);
}
.news-list .profile-card__link,
.content-flow--search .profile-card__link {
	display: block;
	overflow: hidden;
	border-radius: 0 !important;
	aspect-ratio: 4 / 5;
	position: relative;
}
.news-list .profile-card__img,
.content-flow--search .profile-card__img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	transition: transform .35s ease;
}
.news-list .profile-card:hover .profile-card__img,
.content-flow--search .profile-card:hover .profile-card__img { transform: scale(1.04); }
.news-list .profile-card__title,
.content-flow--search .profile-card__title {
	margin: 0 !important;
	padding: 12px 12px 14px !important;
}
.news-list .profile-card__title a,
.content-flow--search .profile-card__title a {
	display: block;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.35;
	color: var(--c-text) !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
}
.news-list .profile-card__title a:hover,
.content-flow--search .profile-card__title a:hover { color: var(--c-primary) !important; }
.news-list .profile-card .meta,
.news-list .profile-card .story,
.news-list .profile-card .btn,
.news-list .profile-card hr,
.content-flow--search .profile-card .meta,
.content-flow--search .profile-card .story,
.content-flow--search .profile-card .btn,
.content-flow--search .profile-card hr { display: none !important; }

/* ----- edit #29 (2026-05-25T00:39:18.014Z) ----- */
@media (max-width: 600px) {
	.news-list,
	.content-flow--search { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
}

/* ----- edit #30 (2026-05-25T00:42:15.147Z) ----- */
/* ── Search results: same card grid as .news-list ─────────── */
.content-flow--search {
	display: grid !important;          /* перебить flex !important из .content-flow */
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
	gap: 14px !important;
}
/* profile-card в поиске — автоширина ячейки, не 100% */
.content-flow--search > .profile-card {
	width: auto !important;
	max-width: none !important;
}
/* Everything that's NOT a profile-card spans the full row */
.content-flow--search > :not(.profile-card) {
	grid-column: 1 / -1;
}

/* ----- edit #31 (2026-05-25T00:42:23.271Z) ----- */
.content-flow > :not(script):not(style):not(#dle-ajax-comments):not(#comments-section):not(.news-list):not(.form-card):not(.addcomments):not(.cy-comments-form):not(.user-card):not(.fullstory):not(.static):not(.text-page):not(.search-result):not(.search-comment):not(.alert):not(.sep):not(.profile-card) {
	/* пусто: правило перекрывается следующими edit'ами ниже */
}

/* ----- edit #32 (2026-05-25T00:51:18.835Z) ----- */
.user-card__list dt { display: inline; font-weight: 600; color: var(--c-text-muted); margin-right: 6px; font-size: 13px; }
.user-card__list dd { display: inline; margin: 0; }

/* Кликабельный счётчик-ссылка (Публикаций / Комментариев) */
.user-card__count {
	display: inline-flex;
	align-items: center;
	padding: 1px 8px;
	border-radius: 6px;
	color: var(--c-primary) !important;
	font-weight: 700;
	text-decoration: none !important;
	background: color-mix(in srgb, var(--c-primary) 10%, transparent);
	transition: background .15s, color .15s;
}
.user-card__count:hover {
	background: var(--c-primary);
	color: #fff !important;
}
.user-card__count--plain {
	background: transparent;
	color: var(--c-text-muted) !important;
	font-weight: 600;
	padding: 0;
	cursor: default;
}
.user-card__count--plain:hover { background: transparent; color: var(--c-text-muted) !important; }
.rss-icon { vertical-align: middle; margin-left: 4px; opacity: 0.7; }
.rss-icon:hover { opacity: 1; }

/* ----- edit #33 (2026-05-25T00:59:01.360Z) ----- */
.user-card__head {
	display: grid;
	grid-template-columns: 96px 1fr auto;
	gap: 16px;
	align-items: center;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--c-border);
	margin-bottom: 14px;
}
/* Ignore action в шапке */
.user-card__actions {
	display: flex;
	align-items: center;
	gap: 8px;
}
.user-card__ignore {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 12px;
	border-radius: 8px;
	border: 1px solid var(--c-border);
	background: var(--c-surface-2);
	color: var(--c-text-muted) !important;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none !important;
	cursor: pointer;
	transition: background .15s, color .15s, border-color .15s;
}
.user-card__ignore svg { width: 14px; height: 14px; flex-shrink: 0; }
.user-card__ignore:hover {
	background: color-mix(in srgb, var(--c-danger, #e74c3c) 10%, transparent);
	border-color: var(--c-danger, #e74c3c);
	color: var(--c-danger, #e74c3c) !important;
}

/* ── Бейджи групп (рендерится через group_prefix/suffix в БД) ─── */
.user-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 2px 10px 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.6;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	vertical-align: middle;
	white-space: nowrap;
}
.user-badge__icon { width: 12px; height: 12px; flex-shrink: 0; }
.user-badge--admin {
	background: linear-gradient(135deg, #ef4444, #b91c1c);
	color: #fff;
	box-shadow: 0 1px 4px rgba(239, 68, 68, 0.35);
}
.user-badge--premium {
	background: linear-gradient(135deg, #fbbf24, #d97706);
	color: #fff;
	box-shadow: 0 1px 4px rgba(217, 119, 6, 0.35);
}

/* ----- edit #34 (2026-05-25T00:59:08.528Z) ----- */
@media (max-width: 600px) {
	.user-card__head { grid-template-columns: 72px 1fr; }
	.user-card__head .user-card__rating,
	.user-card__head .user-card__actions { grid-column: 1 / -1; }
	.user-card__actions { justify-content: flex-start; }
	.user-card__avatar img { width: 72px; height: 72px; }
	.user-card__list { grid-template-columns: 1fr; }
}

/* ----- edit #35 (2026-05-25T01:02:33.459Z) ----- */
/* Ignore action в шапке */
.user-card__actions {
	display: flex;
	align-items: center;
	gap: 8px;
}
/* Скрываем контейнер если [ignore] не активен (нет вложенной ссылки) */
.user-card__actions:empty { display: none; }
/* DLE превращает [ignore]...[/ignore] во внешний <a href="javascript:AddIgnorePM(...)"> */
.user-card__actions > a {
	display: inline-flex;
	align-items: center;
	padding: 7px 12px;
	border-radius: 8px;
	border: 1px solid var(--c-border);
	background: var(--c-surface-2);
	color: var(--c-text-muted) !important;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none !important;
	cursor: pointer;
	transition: background .15s, color .15s, border-color .15s;
}
.user-card__actions > a:hover {
	background: color-mix(in srgb, var(--c-danger, #e74c3c) 10%, transparent);
	border-color: var(--c-danger, #e74c3c);
	color: var(--c-danger, #e74c3c) !important;
}
.user-card__ignore-inner {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.user-card__ignore-inner svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ----- edit #36 (2026-05-25T01:44:00.502Z) ----- */
/* Чтобы поиск и tabs были рядом, без двойного отступа */
.cities-controls {
	position: relative;
	/* NOTE: deliberately no z-index here — we don't want a new stacking
	   context, so that ::after with z-index:-1 escapes into .cities-page. */
	margin: clamp(18px, 2.5vw, 30px) 0 clamp(24px, 3vw, 40px);
}
/* City skyline — extends upward behind head + sub + search + tabs on both themes */
.cities-controls::after {
	content: "";
	position: absolute;
	left: 0; right: 0;
	bottom: 0;
	top: clamp(-380px, -42vw, -240px);
	background: url('/uploads/city.svg') no-repeat center bottom;
	background-size: min(1100px, 100%) auto;
	opacity: .25;
	filter: blur(1.5px);
	-webkit-mask-image: linear-gradient(to top, transparent 0%, #000 15%, #000 52%, transparent 100%);
	        mask-image: linear-gradient(to top, transparent 0%, #000 15%, #000 52%, transparent 100%);
	pointer-events: none;
	z-index: -1;
}
#cities-root, #cities-flat, #cities-empty {
	position: relative;
}
.cities-search { margin-bottom: 14px; }
@media (max-width: 640px) {
	.cities-controls::after {
		top: clamp(-320px, -55vw, -200px);
		background-size: min(560px, 100%) auto;
		opacity: .22;
	}
}
/* Кнопка очистки в поиске */
.cities-search__clear {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	width: 28px; height: 28px;
	border-radius: 50%;
	border: 0;
	background: var(--c-surface-2);
	color: var(--c-text-muted);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .12s, color .12s;
}
.cities-search__clear:hover { background: var(--c-primary); color: #fff; }

/* ── Tabs ──────────────────────────────────────────────── */
.cities-tabs {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin: 0;
	flex-wrap: wrap;
}

/* ----- edit #37 (2026-05-25T01:44:18.170Z) ----- */
/* ── Алфавитный навигатор (sticky pill rail) ─────────── */
.cities-alphabet {
	position: sticky;
	top: 8px;
	z-index: 5;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px;
	padding: 10px 12px;
	margin: 0 0 22px;
	background: color-mix(in srgb, var(--c-surface) 92%, transparent);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid var(--c-border);
	border-radius: 14px;
	box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.cities-alphabet__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 7px;
	color: var(--c-text-muted) !important;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none !important;
	transition: background .12s, color .12s, transform .12s;
}
.cities-alphabet__btn:hover {
	background: var(--c-surface-2);
	color: var(--c-text) !important;
}
.cities-alphabet__btn.is-current {
	background: var(--c-primary);
	color: #fff !important;
}
.cities-alphabet__btn.is-empty {
	opacity: 0.25;
	pointer-events: none;
}

/* ── Группа по букве ──────────────────────────────────── */
.cities-section {
	margin: 0 0 26px;
	scroll-margin-top: 90px;
}
.cities-section__title {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--c-text-muted);
}
.cities-section__title::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--c-border);
}
.cities-section__title span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 28px;
	padding: 0 8px;
	border-radius: 8px;
	background: color-mix(in srgb, var(--c-primary) 10%, transparent);
	color: var(--c-primary);
	font-size: 14px;
}
.cities-section__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 14px;
}

/* ── Плоский grid (для сортировки "По количеству") ──── */
.cities-flat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 14px;
}

/* Старое .cities-grid (для обратной совместимости) */
.cities-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 14px;
}

/* ----- edit #38 (2026-05-25T01:44:27.679Z) ----- */
/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 600px) {
	.cities-grid,
	.cities-section__grid,
	.cities-flat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.city-card { padding: 18px 10px 14px; }
	.city-card__pin { width: 24px; height: 24px; }
	.cities-search__input { height: 46px; }
	.cities-tab { padding: 8px 14px; font-size: 13px; }
	.cities-alphabet { padding: 8px 6px; gap: 2px; }
	.cities-alphabet__btn { width: 26px; height: 26px; font-size: 12px; }
	.cities-section { margin-bottom: 18px; scroll-margin-top: 80px; }
}

/* ----- edit #39 (2026-05-25T01:47:28.309Z) ----- */
/* ── Search ────────────────────────────────────────────── */
.cities-search {
	position: relative;
	max-width: 520px;
	margin: 0 auto 18px;
}
.cities-search__icon {
	position: absolute;
	left: 18px;
	top: 50%;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	color: var(--c-text-muted);
	pointer-events: none;
	z-index: 1;
}
.cities-search__input {
	width: 100%;
	height: 46px;
	padding: 0 44px 0 48px !important;
	border-radius: 999px;
	border: 1px solid var(--c-border) !important;
	background: var(--c-surface) !important;
	font-size: 15px !important;
	color: var(--c-text) !important;
	outline: none;
	transition: border-color .15s, box-shadow .15s;
	box-sizing: border-box;
	margin: 0 !important;
}

/* ----- edit #40 (2026-05-25T01:48:01.544Z) ----- */
/* Алфавитный навигатор больше не используется — оставлены пустые правила для совместимости */
.cities-alphabet { display: none !important; }

/* ── Группа по букве: тонкий divider ───────────────────── */
/* content-visibility: auto skips painting / layout for off-screen sections.
   Page has 1706 cards across 30+ letter groups — without this the browser
   computes layout for every card on first render even though only ~50 fit
   in the viewport. With contain-intrinsic-size we pre-reserve scroll space
   so jumping to a letter via #anchor still lands correctly.
   contain-intrinsic-size value = avg section height (≈ 280px header + grid). */
.cities-section {
	margin: 0 0 18px;
	content-visibility: auto;
	contain-intrinsic-size: 1px 320px;
}
/* SVG <use> ref needs explicit dimensions — width/height attrs on the inline
   <svg> were dropped when we switched to a single <symbol>. Inherit color so
   .city-card--hot etc. tint the pin. */
.city-card__pin {
	width: 28px;
	height: 28px;
	color: currentColor;
}
.cities-section__title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 10px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--c-text-muted);
}
.cities-section__title::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--c-border);
}
.cities-section__title span {
	font-size: 13px;
	color: var(--c-primary);
	font-weight: 800;
}

/* ── Grid карточек: компактный, плотный ────────────────── */
.cities-section__grid,
.cities-flat-grid,
.cities-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 6px;
}

/* ── City card: ОДНА СТРОКА (pin + name + count) ─────── */
.city-card {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	border-radius: 10px;
	text-decoration: none !important;
	color: var(--c-text) !important;
	transition: background .12s, border-color .12s, transform .1s;
	min-width: 0;
	min-height: 40px;
}
.city-card:hover {
	background: var(--c-surface-2);
	border-color: color-mix(in srgb, var(--c-primary) 50%, var(--c-border));
}
.city-card__pin {
	width: 16px;
	height: 16px;
	color: var(--c-primary);
	flex-shrink: 0;
}
.city-card__name {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--c-text);
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.city-card__fire { font-size: 12px; }
.city-card__count {
	display: inline-block;
	padding: 1px 7px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--c-primary) 10%, transparent);
	color: var(--c-primary);
	font-size: 11px;
	font-weight: 700;
	flex-shrink: 0;
	white-space: nowrap;
}

/* Hot city — primary акцент */
.city-card--hot {
	border-color: color-mix(in srgb, var(--c-primary) 35%, var(--c-border));
	background: color-mix(in srgb, var(--c-primary) 4%, var(--c-surface));
}
.city-card--hot .city-card__count {
	background: var(--c-primary);
	color: #fff;
}

/* ----- edit #41 (2026-05-25T01:48:15.956Z) ----- */
/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 600px) {
	.cities-grid,
	.cities-section__grid,
	.cities-flat-grid { grid-template-columns: 1fr; gap: 5px; }
	.cities-search__input { height: 44px; }
	.cities-tab { padding: 7px 14px; font-size: 13px; }
	.cities-section { margin-bottom: 14px; }
}

/* ----- edit #42 (2026-05-25T01:53:00.553Z) ----- */
.cities-search__icon {
	position: absolute;
	left: 18px;
	top: 50%;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	color: var(--c-text-muted);
	pointer-events: none;
}


/* ----- post-restore: трейлинг + cities-page header (из ранних Write) ----- */

/* Замыкающие скобки для последних Edit'ов где замена была частичной */
/* (ничего не дописываем — последний правильный блок уже закрыт) */

/* === Cities page hero — skyline grows UP from the controls bottom edge,
       extending behind head + sub + search + tabs. All text sits on top. === */
.cities-page {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 0 30px;
	position: relative;
	isolation: isolate;
}
.cities-page__head {
	position: relative;
	margin: 0 auto;
	max-width: min(660px, 90%);
	padding: clamp(24px, 4vw, 52px) 28px clamp(20px, 2.5vw, 32px);
	text-align: center;
}
.cities-page__head::before { content: none; }
.cities-page__head::after  { content: none; }
.cities-page__title {
	margin: 0 0 10px;
	font-size: clamp(30px, 4.5vw, 46px);
	font-weight: 800;
	letter-spacing: -.02em;
	line-height: 1.1;
	color: var(--c-text);
	/* white halo — separates text from SVG on both light and dark themes */
	filter:
		drop-shadow(0 0 5px rgba(255,255,255,1))
		drop-shadow(0 0 14px rgba(255,255,255,.85))
		drop-shadow(0 0 28px rgba(255,255,255,.5));
}
.cities-page__sub {
	margin: 0;
	color: var(--c-text);
	font-size: clamp(14px, 1.2vw, 16px);
	font-weight: 600;
	text-shadow:
		0 0 6px rgba(255,255,255,1),
		0 0 16px rgba(255,255,255,.88),
		0 0 32px rgba(255,255,255,.55);
}
/* Dark theme: мягче — сильное белое свечение там не нужно */
[data-theme="dark"] .cities-page__title {
	filter:
		drop-shadow(0 0 10px rgba(255,255,255,.35))
		drop-shadow(0 0 24px rgba(255,255,255,.18));
}
[data-theme="dark"] .cities-page__sub {
	text-shadow:
		0 0 10px rgba(255,255,255,.50),
		0 0 28px rgba(255,255,255,.25);
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .cities-page__title {
		filter:
			drop-shadow(0 0 10px rgba(255,255,255,.35))
			drop-shadow(0 0 24px rgba(255,255,255,.18));
	}
	:root:not([data-theme="light"]) .cities-page__sub {
		text-shadow:
			0 0 10px rgba(255,255,255,.50),
			0 0 28px rgba(255,255,255,.25);
	}
}
@media (max-width: 640px) {
	.cities-page__head { padding-top: 32px; }
	.cities-page__head::before { content: none; }
}
.cities-controls {
	margin: 0 0 20px;
}
.cities-empty {
	text-align: center;
	padding: 40px 16px;
	color: var(--c-text-muted);
}
.cities-empty svg {
	width: 48px;
	height: 48px;
	opacity: .35;
	margin: 0 auto 10px;
}
.cities-empty p {
	margin: 0;
	font-size: 14px;
}

/* Tab icons — небольшой размер */
.cities-tab svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }

/* hard-cap для empty SVG в карточках при отсутствии классов (защита от огромных) */
.cities-section svg:not([class]),
.cities-flat-grid svg:not([class]) { width: 16px; height: 16px; }

/* =================================================================
   POST-RESTORE FIXES (после Cursor wipe — добавлены 25.05 04:30 ночь)
   =================================================================*/

/* === .cities-tab — базовое оформление кнопок переключения === */
.cities-tabs {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin: 0;
	flex-wrap: wrap;
}
.cities-tab {
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 16px;
	border: 1px solid var(--c-border);
	border-radius: 999px;
	background: var(--c-surface);
	color: var(--c-text-muted);
	font: inherit;
	font-size: 13.5px;
	font-weight: 500;
	cursor: pointer;
	transition: background .12s, color .12s, border-color .12s, transform .08s;
	line-height: 1;
	white-space: nowrap;
}
.cities-tab:hover {
	background: var(--c-surface-2, #eef0f3);
	color: var(--c-text);
}
.cities-tab.is-active {
	background: var(--c-primary, #f2368f);
	color: #fff;
	border-color: var(--c-primary, #f2368f);
	box-shadow: 0 4px 10px -2px color-mix(in srgb, var(--c-primary, #f2368f) 35%, transparent);
}
.cities-tab.is-active:hover {
	background: var(--c-primary, #f2368f);
	color: #fff;
}
.cities-tab svg {
	width: 16px;
	height: 16px;
	stroke-width: 2;
}
.cities-tab.is-active svg { color: #fff; }

/* === PM thread — закрепление bubble-стиля для карточек сообщений === */
/* (на случай если базовое .pm-message было затёрто) */
.pm-message {
	display: flex;
	gap: 12px;
	padding: 14px 16px;
	background: var(--c-surface, #fff);
	border: 1px solid var(--c-border);
	border-radius: 14px;
	box-shadow: 0 1px 2px rgba(0,0,0,.04);
	margin-bottom: 10px;
	position: relative;
}
.pm-message:hover { box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.pm-message--own {
	background: color-mix(in srgb, var(--c-primary, #f2368f) 6%, var(--c-surface, #fff));
	border-color: color-mix(in srgb, var(--c-primary, #f2368f) 20%, var(--c-border));
}
.pm-message__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}
.pm-message__avatar img {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}
.pm-message__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
	font-size: 13px;
	flex-wrap: wrap;
}
.pm-message__author {
	font-weight: 600;
	color: var(--c-text);
}
.pm-message__author a { color: inherit; text-decoration: none; }
.pm-message__author a:hover { color: var(--c-primary, #f2368f); }
.pm-message__date {
	color: var(--c-text-muted);
	font-size: 12px;
	margin-left: auto;
}
.pm-message__text {
	font-size: 14px;
	line-height: 1.55;
	color: var(--c-text);
	word-break: break-word;
}
.pm-messages {
	display: flex;
	flex-direction: column;
	gap: 0;
	padding: 16px 18px 8px;
}

/* ============================================================================
   PM ENTERPRISE — полный redesign раздела «Личные сообщения»
   v2026-05-25-r3  Стиль Slack/Linear/Intercom: bubbles, hover-actions,
   четкое разделение свои/чужие, group-by-author, hooked tails.
   Правила в КОНЦЕ файла → переопределяют все ранние pm-* блоки.
   ============================================================================*/

/* === Container === */
.pm-wrap.form-card {
	padding: 0;
	overflow: hidden;
	border-radius: 16px;
	border: 1px solid var(--c-border);
	background: var(--c-surface, #fff);
	box-shadow: 0 1px 3px rgba(0,0,0,.03);
}

/* === Header (шапка раздела PM) === */
.pm-header {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px 20px;
	background: linear-gradient(to bottom, var(--c-surface, #fff), color-mix(in srgb, var(--c-surface, #fff) 92%, var(--c-bg, #f5f6f8)));
	border-bottom: 1px solid var(--c-border);
	flex-wrap: wrap;
}
.pm-header__left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pm-header__icon {
	width: 22px; height: 22px;
	color: var(--c-primary, #f2368f);
	flex-shrink: 0;
}
.pm-header__title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	color: var(--c-text);
	letter-spacing: -.01em;
}
.pm-header__right {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-left: auto;
	flex-wrap: wrap;
}
.pm-storage {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 12px;
	color: var(--c-text-muted);
}
.pm-storage .pm_progress_bar {
	width: 100px; height: 5px;
	background: var(--c-bg, #f0f0f0);
	border-radius: 999px;
	overflow: hidden;
	display: block;
}
.pm-storage .pm_progress_bar span {
	display: block; height: 100%;
	background: linear-gradient(90deg, #4ade80, #f2368f);
	border-radius: 999px;
	transition: width .3s;
}
.pm-storage__label { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pm-header__actions { display: flex; gap: 8px; flex-shrink: 0; }

/* === Buttons (общие) === */
.pm-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 9px 16px;
	border-radius: 10px;
	font: inherit;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background .15s, border-color .15s, color .15s, transform .08s, box-shadow .15s;
	text-decoration: none;
	line-height: 1;
	white-space: nowrap;
}
.pm-btn:active { transform: translateY(1px); }
.pm-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.pm-btn--primary {
	background: var(--c-primary, #f2368f);
	color: #fff;
	border-color: var(--c-primary, #f2368f);
	box-shadow: 0 2px 8px -2px color-mix(in srgb, var(--c-primary, #f2368f) 50%, transparent);
}
.pm-btn--primary:hover {
	background: color-mix(in srgb, var(--c-primary, #f2368f) 88%, #000);
	border-color: color-mix(in srgb, var(--c-primary, #f2368f) 88%, #000);
	color: #fff;
	box-shadow: 0 4px 14px -2px color-mix(in srgb, var(--c-primary, #f2368f) 55%, transparent);
}

.pm-btn--ghost {
	background: var(--c-surface, #fff);
	color: var(--c-text);
	border-color: var(--c-border);
}
.pm-btn--ghost:hover {
	background: var(--c-bg, #f5f6f8);
	border-color: color-mix(in srgb, var(--c-text-muted) 30%, var(--c-border));
	color: var(--c-text);
}

/* === PMLIST: inbox / outbox table (DLE-генерируемая таблица) === */
.pmlist-wrap { padding: 8px 0; }
.pmlist-wrap table { width: 100%; border-collapse: collapse; }
.pmlist-wrap td { padding: 12px 20px; border-bottom: 1px solid var(--c-border); font-size: 13px; vertical-align: middle; }
.pmlist-wrap tr:last-child td { border-bottom: 0; }
.pmlist-wrap tr:hover td { background: color-mix(in srgb, var(--c-primary, #f2368f) 3%, transparent); }

/* === THREAD === */
.pm-thread {
	display: flex;
	flex-direction: column;
	min-height: 540px;
}

.pm-thread__header {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 20px;
	border-bottom: 1px solid var(--c-border);
	background: var(--c-surface, #fff);
	position: sticky;
	top: 0;
	z-index: 5;
}
.pm-back {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px; height: 36px;
	border-radius: 10px;
	background: var(--c-bg, #f5f6f8);
	color: var(--c-text);
	text-decoration: none;
	transition: background .12s, transform .08s;
	flex-shrink: 0;
}
.pm-back:hover { background: var(--c-border); transform: translateX(-2px); }
.pm-back svg { width: 18px; height: 18px; }
.pm-thread__info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.pm-thread__name {
	font-size: 15px;
	font-weight: 700;
	color: var(--c-text);
	letter-spacing: -.01em;
}
.pm-thread__subject {
	font-size: 12.5px;
	color: var(--c-text-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
}

/* === MESSAGES container === */
.pm-messages {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 20px 20px 8px;
	background: var(--c-bg, #f5f6f8);
	flex: 1;
	overflow-y: auto;
}

/* === MESSAGE bubble (чужие — слева) === */
.pm-message {
	display: flex;
	gap: 10px;
	max-width: 78%;
	margin: 6px 0;
	position: relative;
	animation: pm-msg-in .22s ease;
	align-items: flex-start;
}
@keyframes pm-msg-in {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

.pm-message__avatar { flex-shrink: 0; position: relative; }
.pm-message__avatar img {
	width: 38px; height: 38px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
	border: 2px solid var(--c-surface, #fff);
	box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* Online dot прямо на аватарке */
.pm-online-dot {
	position: absolute;
	bottom: 0;
	right: 0;
	width: 11px; height: 11px;
	background: #22c55e;
	border: 2px solid var(--c-surface, #fff);
	border-radius: 50%;
	box-shadow: 0 0 0 0 rgba(34,197,94,.4);
	animation: pm-pulse 2s infinite;
}
.pm-message__meta .pm-online-dot {
	position: static;
	width: 7px; height: 7px;
	border-width: 0;
	margin: 0 2px;
	animation: pm-pulse-small 2s infinite;
}
@keyframes pm-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
	70%  { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
	100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
@keyframes pm-pulse-small {
	0%   { box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
	70%  { box-shadow: 0 0 0 4px rgba(34,197,94,0); }
	100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* Bubble — основное тело */
.pm-message__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	background: var(--c-surface, #fff);
	border: 1px solid var(--c-border);
	border-radius: 16px 16px 16px 4px;
	padding: 10px 14px 12px;
	box-shadow: 0 1px 2px rgba(0,0,0,.04);
	transition: box-shadow .15s;
}
.pm-message:hover .pm-message__body { box-shadow: 0 3px 10px rgba(0,0,0,.06); }

/* Meta row: автор + время */
.pm-message__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 4px;
	font-size: 12.5px;
	line-height: 1;
}
.pm-message__author {
	font-weight: 700;
	color: var(--c-primary, #f2368f);
	font-size: 13px;
}
.pm-message__author a { color: inherit; text-decoration: none; }
.pm-message__author a:hover { text-decoration: underline; }
.pm-message__date {
	color: var(--c-text-muted);
	font-size: 11.5px;
	margin-left: auto;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.pm-message__text {
	font-size: 14px;
	line-height: 1.5;
	color: var(--c-text);
	word-break: break-word;
}
.pm-message__text p { margin: 0 0 6px; }
.pm-message__text p:last-child { margin: 0; }
.pm-message__text a { color: var(--c-primary, #f2368f); }

.pm-message__signature {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px dashed color-mix(in srgb, var(--c-border) 60%, transparent);
	font-size: 12px;
	color: var(--c-text-muted);
	font-style: italic;
}

/* Actions — появляются на hover (subtle) */
.pm-message__actions {
	display: flex;
	gap: 4px;
	margin-top: 8px;
	flex-wrap: wrap;
	opacity: 0;
	transform: translateY(-2px);
	transition: opacity .15s, transform .15s;
}
.pm-message:hover .pm-message__actions,
.pm-message:focus-within .pm-message__actions { opacity: 1; transform: translateY(0); }
/* На мобиле — всегда видны */
@media (hover: none) {
	.pm-message__actions { opacity: 1; transform: none; }
}
.pm-message__actions > a,
.pm-message__actions > span {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 9px;
	border-radius: 7px;
	font-size: 11.5px;
	font-weight: 500;
	color: var(--c-text-muted);
	background: transparent;
	cursor: pointer;
	text-decoration: none;
	transition: background .12s, color .12s;
	line-height: 1;
}
.pm-message__actions > a:hover,
.pm-message__actions > span:hover {
	background: color-mix(in srgb, var(--c-primary, #f2368f) 8%, transparent);
	color: var(--c-primary, #f2368f);
}
.pm-message__actions .pm-action-del,
.pm-message__actions span.pm-action-del,
.pm-message__actions a.pm-action-del { color: #e74c3c; }
.pm-message__actions .pm-action-del:hover {
	background: color-mix(in srgb, #e74c3c 10%, transparent);
	color: #c0392b;
}

/* === OWN (свои) сообщения — справа, primary-цвет === */
.pm-message--own {
	margin-left: auto;
	flex-direction: row-reverse;
}
.pm-message--own .pm-message__body {
	background: linear-gradient(135deg, var(--c-primary, #f2368f), color-mix(in srgb, var(--c-primary, #f2368f) 85%, #ff5e9c));
	border-color: transparent;
	border-radius: 16px 16px 4px 16px;
	color: #fff;
	box-shadow: 0 2px 8px -2px color-mix(in srgb, var(--c-primary, #f2368f) 40%, transparent);
}
.pm-message--own:hover .pm-message__body {
	box-shadow: 0 4px 14px -2px color-mix(in srgb, var(--c-primary, #f2368f) 55%, transparent);
}
.pm-message--own .pm-message__author { color: rgba(255,255,255,.95); }
.pm-message--own .pm-message__date   { color: rgba(255,255,255,.75); }
.pm-message--own .pm-message__text   { color: #fff; }
.pm-message--own .pm-message__text a { color: #fff; text-decoration: underline; }
.pm-message--own .pm-message__signature {
	border-top-color: rgba(255,255,255,.25);
	color: rgba(255,255,255,.8);
}
.pm-message--own .pm-message__actions > a,
.pm-message--own .pm-message__actions > span {
	color: rgba(255,255,255,.8);
}
.pm-message--own .pm-message__actions > a:hover,
.pm-message--own .pm-message__actions > span:hover {
	background: rgba(255,255,255,.18);
	color: #fff;
}
.pm-message--own .pm-message__actions .pm-action-del { color: #ffd6d2; }
.pm-message--own .pm-message__actions .pm-action-del:hover {
	background: rgba(255,255,255,.18);
	color: #fff;
}

/* === REPLY form (внизу диалога) === */
.pm-reply {
	border-top: 1px solid var(--c-border);
	padding: 14px 18px;
	background: var(--c-surface, #fff);
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.pm-reply textarea {
	width: 100%;
	min-height: 80px;
	border: 1px solid var(--c-border);
	border-radius: 12px;
	padding: 12px 14px;
	font: inherit;
	font-size: 14px;
	resize: vertical;
	background: var(--c-bg, #f8f9fa);
	transition: border-color .15s, background .15s;
}
.pm-reply textarea:focus {
	outline: none;
	border-color: var(--c-primary, #f2368f);
	background: var(--c-surface, #fff);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-primary, #f2368f) 12%, transparent);
}
.pm-reply__foot {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

/* === COMPOSE (новое сообщение) === */
.pm-compose { padding: 20px; }
.pm-compose__title {
	margin: 0 0 16px;
	font-size: 17px;
	font-weight: 700;
	color: var(--c-text);
	letter-spacing: -.01em;
}
.pm-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.pm-field__label {
	font-size: 12px;
	font-weight: 600;
	color: var(--c-text-muted);
	text-transform: uppercase;
	letter-spacing: .03em;
}
.pm-field__input {
	width: 100%;
	border: 1px solid var(--c-border);
	border-radius: 10px;
	padding: 10px 14px;
	font: inherit;
	font-size: 14px;
	background: var(--c-bg, #f8f9fa);
	transition: border-color .15s, background .15s;
	box-sizing: border-box;
}
.pm-field__input:focus {
	outline: none;
	border-color: var(--c-primary, #f2368f);
	background: var(--c-surface, #fff);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-primary, #f2368f) 12%, transparent);
}
.pm-compose__editor { margin-bottom: 14px; }
.pm-captcha {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
	flex-wrap: wrap;
}
.pm-captcha img { border-radius: 8px; flex-shrink: 0; }
.pm-captcha .pm-field__input { flex: 1; min-width: 140px; max-width: 240px; }
.pm-compose__actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	flex-wrap: wrap;
	padding-top: 6px;
	border-top: 1px solid color-mix(in srgb, var(--c-border) 50%, transparent);
	margin-top: 4px;
	padding-top: 16px;
}

/* === Responsive === */
@media (max-width: 700px) {
	.pm-header { padding: 12px 14px; gap: 10px; }
	.pm-header__title { font-size: 15px; }
	.pm-storage .pm_progress_bar { width: 60px; }
	.pm-message { max-width: 92%; }
	.pm-messages { padding: 14px 12px 8px; }
	.pm-thread__header { padding: 12px 14px; }
	.pm-reply { padding: 12px; }
}

/* ================================================================
   SORT-BAR — окончательная редакция (переопределяет все дубли выше)
   Два предыдущих блока (edit#16 и edit#18) ставили border-top И
   border-bottom одновременно → получался ромб ◆ (кракозябра).
   Здесь явный сброс всех четырёх границ для обоих псевдоэлементов,
   и только потом — нужная одна граница.
   ================================================================ */

/* Базовый сброс: убираем ВСЕ границы для ОБОИХ состояний */
.sort-bar ul.sort > li.asc  a::after,
.sort-bar ul.sort > li.desc a::after {
	content: "" !important;
	display: inline-block !important;
	width: 0 !important;
	height: 0 !important;
	background: none !important;
	border-top:    0 solid transparent !important;
	border-bottom: 0 solid transparent !important;
	border-left:   4px solid transparent !important;
	border-right:  4px solid transparent !important;
	flex-shrink: 0;
	margin: 0 0 1px 4px !important;
	vertical-align: middle;
}

/* li.asc  = текущая сортировка по убыванию → стрелка вниз ▼ */
.sort-bar ul.sort > li.asc  a::after {
	border-top:    5px solid #fff !important;
	border-bottom: 0 !important;
}

/* li.desc = текущая сортировка по возрастанию → стрелка вверх ▲ */
.sort-bar ul.sort > li.desc a::after {
	border-bottom: 5px solid #fff !important;
	border-top:    0 !important;
}


/* ═══════════════════════════════════════════════════════════════════════
   PM (Personal Messages) — modern social-network redesign
   2026-05-26
   Overrides earlier PM rules via source-order priority.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Wrapper card ──────────────────────────────────────────────────────── */
.pm-wrap.form-card {
	padding: 0;
	overflow: hidden;
	border-radius: 16px;
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	box-shadow: 0 1px 2px rgba(15, 23, 42, .03), 0 4px 14px rgba(15, 23, 42, .05);
}

/* ── Header bar ────────────────────────────────────────────────────────── */
.pm-header {
	padding: 20px 24px;
	background: linear-gradient(180deg, var(--c-surface) 0%, var(--c-surface-2) 100%);
	border-bottom: 1px solid var(--c-border);
}
.pm-header__icon {
	width: 22px; height: 22px;
	color: var(--c-primary);
}
.pm-header__title {
	font-size: 17px !important;
	font-weight: 700;
}
.pm-storage .pm_progress_bar {
	width: 100px;
	height: 5px;
	border-radius: 999px;
	background: var(--c-border);
}
.pm-storage .pm_progress_bar span {
	background: linear-gradient(90deg, var(--c-primary) 0%, color-mix(in srgb, var(--c-primary) 70%, var(--c-warn)) 100%);
	border-radius: 999px;
}
.pm-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 38px;
	padding: 0 16px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none !important;
	transition: transform .12s, box-shadow .15s, background .15s;
}
.pm-btn:active { transform: translateY(0); }
.pm-btn--ghost {
	background: var(--c-surface);
	color: var(--c-text) !important;
	border: 1px solid var(--c-border);
}
.pm-btn--ghost:hover {
	background: var(--c-surface-2);
	border-color: color-mix(in srgb, var(--c-text) 20%, var(--c-border));
}
.pm-btn--primary {
	background: linear-gradient(180deg, #f88a7d 0%, #ec6f62 50%, #e15a4d 100%);
	color: #fff !important;
	border: 0;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, .25),
		inset 0 -1px 0 rgba(0, 0, 0, .12),
		0 1px 2px rgba(244, 90, 77, .2),
		0 4px 14px rgba(254, 64, 141, .2);
}
.pm-btn--primary:hover {
	transform: translateY(-1px);
	filter: brightness(1.04);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, .3),
		inset 0 -1px 0 rgba(0, 0, 0, .12),
		0 6px 18px rgba(254, 64, 141, .3),
		0 10px 26px rgba(244, 122, 109, .15);
}
.pm-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ── Inbox list — conversation rows ────────────────────────────────────── */
.pmlist-wrap { padding: 4px 0; }
.pmlist-wrap table.pm tr {
	padding: 0;
	cursor: pointer;
	transition: background .12s, padding-left .15s;
	border-bottom: 1px solid var(--c-border);
}
.pmlist-wrap table.pm tr:last-child { border-bottom: 0; }
.pmlist-wrap table.pm tr:hover {
	background: linear-gradient(90deg,
		color-mix(in srgb, var(--c-primary) 6%, transparent) 0%,
		transparent 100%);
	padding-left: 4px;
}

/* Hide default DLE arrow icons — we use a colored bar instead */
.pmlist-wrap table.pm td.pm_icon img,
.pmlist-wrap table.pm td.pm_icon svg { display: none !important; }
.pmlist-wrap table.pm td.pm_icon {
	width: 3px !important;
	min-width: 3px !important;
	background: transparent !important;
	overflow: hidden;
}
.pmlist-wrap table.pm td.pm_icon.pm-unread-image { background: var(--c-primary) !important; }
.pmlist-wrap table.pm td.pm_icon.pm-reply-image  { background: color-mix(in srgb, var(--c-primary) 40%, var(--c-text-muted)) !important; }

/* Center content cell */
.pmlist-wrap table.pm td.pm_subj {
	padding: 16px 18px !important;
}
.pmlist-wrap table.pm .pm_subj a {
	font-size: 14px;
	font-weight: 600;
	color: var(--c-text) !important;
	display: block;
	margin-bottom: 2px;
}
.pmlist-wrap table.pm .pm_last_message {
	font-size: 13px;
	color: var(--c-text-muted);
	margin-top: 1px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}
.pmlist-wrap table.pm .pm_with_user {
	font-size: 12px;
	color: var(--c-text-muted);
	margin-top: 4px;
	text-transform: none;
	letter-spacing: 0;
}
.pmlist-wrap table.pm .pm_with_user a {
	color: var(--c-primary) !important;
	font-weight: 600;
	text-decoration: none !important;
}
.pmlist-wrap table.pm .pm_with_user a:hover { text-decoration: underline !important; }

/* Unread = bold + accent dot on the right */
.pmlist-wrap table.pm tr:has(td.pm-unread-image) .pm_subj a,
.pmlist-wrap table.pm tr:has(td.pm-unread-image) .pm_last_message {
	color: var(--c-text) !important;
	font-weight: 700;
}
.pmlist-wrap table.pm tr:has(td.pm-unread-image) td.pm_last_user::before {
	content: "";
	width: 8px; height: 8px;
	border-radius: 50%;
	background: var(--c-primary);
	box-shadow: 0 0 8px color-mix(in srgb, var(--c-primary) 60%, transparent);
	margin-bottom: 2px;
}

/* Right column: sender + date */
.pmlist-wrap table.pm td.pm_last_user {
	padding: 16px 18px 16px 0 !important;
	min-width: 120px;
}
.pmlist-wrap table.pm .pm_last_user a {
	font-size: 13px;
	font-weight: 600;
}
.pmlist-wrap table.pm .pm_last_date {
	font-size: 11px;
	color: var(--c-text-muted);
}

/* Checkbox — fade in on hover */
.pmlist-wrap table.pm td.pm_checkbox {
	padding: 16px 18px 16px 4px !important;
	opacity: 0;
	transition: opacity .15s;
}
.pmlist-wrap table.pm tr:hover td.pm_checkbox,
.pmlist-wrap table.pm tr:has(input:checked) td.pm_checkbox { opacity: 1; }
.pmlist-wrap table.pm td.pm_checkbox input[type="checkbox"] {
	width: 16px; height: 16px;
	accent-color: var(--c-primary);
	cursor: pointer;
}

/* Bottom actions form */
.pmlist-wrap form {
	padding: 14px 18px;
	border-top: 1px solid var(--c-border);
	background: var(--c-surface-2);
}

/* ── Thread (chat) view ────────────────────────────────────────────────── */
.pm-thread.form-card {
	padding: 0;
	overflow: hidden;
	border-radius: 16px;
	background: var(--c-surface);
	border: 1px solid var(--c-border);
}
.pm-thread__header {
	padding: 14px 20px;
	background: linear-gradient(180deg, var(--c-surface) 0%, var(--c-surface-2) 100%);
	border-bottom: 1px solid var(--c-border);
	display: flex;
	align-items: center;
	gap: 14px;
}
.pm-back {
	width: 36px; height: 36px;
	border-radius: 10px;
	border: 1px solid var(--c-border);
	background: var(--c-surface);
	transition: background .15s, transform .12s;
}
.pm-back:hover { background: var(--c-surface-2); transform: translateX(-2px); }
.pm-thread__name {
	font-size: 15px;
	font-weight: 700;
}
.pm-thread__subject {
	font-size: 12px;
	color: var(--c-text-muted);
	margin-top: 1px;
}

/* Messages container — chat-style with background pattern */
.pm-messages {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 20px;
	min-height: 320px;
	max-height: 65vh;
	overflow-y: auto;
	background:
		radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--c-primary) 3%, transparent) 0%, transparent 40%),
		radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--c-primary) 3%, transparent) 0%, transparent 40%),
		var(--c-surface-2);
}
.pm-messages::-webkit-scrollbar { width: 6px; }
.pm-messages::-webkit-scrollbar-thumb {
	background: var(--c-border);
	border-radius: 3px;
}
.pm-messages::-webkit-scrollbar-thumb:hover { background: var(--c-text-muted); }

/* Message row: avatar + body */
.pm-message {
	display: flex;
	gap: 10px;
	max-width: 75%;
	align-self: flex-start;
	background: transparent !important;
	border: 0 !important;
	padding: 0 !important;
}
.pm-message--own {
	align-self: flex-end;
	flex-direction: row-reverse;
}

/* Avatar */
.pm-message__avatar { flex-shrink: 0; align-self: flex-end; }
.pm-message__avatar img {
	width: 36px; height: 36px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--c-surface);
	box-shadow: 0 1px 3px rgba(15, 23, 42, .12);
}

/* Body */
.pm-message__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	max-width: 100%;
}
.pm-message--own .pm-message__body { align-items: flex-end; }

/* Meta line (author + timestamp) — small text above bubble */
.pm-message__meta {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 0 6px;
}
.pm-message--own .pm-message__meta { flex-direction: row-reverse; }
.pm-message__author {
	font-size: 12px;
	font-weight: 700;
	color: var(--c-text);
}
.pm-message__author a {
	color: inherit !important;
	text-decoration: none !important;
}
.pm-message__date {
	font-size: 11px;
	color: var(--c-text-muted);
}

/* Online dot */
.pm-online-dot {
	width: 7px; height: 7px;
	border-radius: 50%;
	background: #3dbfa0;
	box-shadow: 0 0 6px rgba(61, 191, 160, .6);
	flex-shrink: 0;
}

/* The actual chat bubble */
.pm-message__bubble {
	position: relative;
	padding: 10px 14px;
	border-radius: 16px;
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
	max-width: 100%;
}
/* Tail / asymmetric corner: incoming = bottom-left squared */
.pm-message:not(.pm-message--own) .pm-message__bubble {
	border-bottom-left-radius: 4px;
}
/* Outgoing = bottom-right squared + primary gradient */
.pm-message--own .pm-message__bubble {
	border-bottom-right-radius: 4px;
	background: linear-gradient(135deg,
		color-mix(in srgb, var(--c-primary) 95%, #fff) 0%,
		var(--c-primary) 100%);
	border-color: color-mix(in srgb, var(--c-primary) 40%, transparent);
	color: #fff;
	box-shadow: 0 2px 8px color-mix(in srgb, var(--c-primary) 20%, transparent);
}

/* Message text */
.pm-message__text {
	font-size: 14px;
	line-height: 1.5;
	word-break: break-word;
	color: var(--c-text);
}
.pm-message--own .pm-message__text { color: #fff; }
.pm-message--own .pm-message__text a { color: #fff; text-decoration: underline; }

/* Signature */
.pm-message__signature {
	margin-top: 8px;
	padding-top: 6px;
	border-top: 1px dashed var(--c-border);
	font-size: 11.5px;
	color: var(--c-text-muted);
}
.pm-message--own .pm-message__signature {
	border-top-color: rgba(255, 255, 255, .25);
	color: rgba(255, 255, 255, .8);
}

/* Actions — icon buttons hidden until hover */
.pm-message__actions {
	position: absolute;
	top: -14px;
	display: flex;
	gap: 2px;
	padding: 3px;
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	border-radius: 999px;
	box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
	opacity: 0;
	transform: translateY(4px);
	transition: opacity .15s, transform .15s;
	pointer-events: none;
}
.pm-message:not(.pm-message--own) .pm-message__actions { right: -8px; }
.pm-message--own .pm-message__actions { left: -8px; }
.pm-message__bubble:hover .pm-message__actions {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}
.pm-action {
	width: 26px; height: 26px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	color: var(--c-text-muted);
	cursor: pointer;
	transition: background .12s, color .12s;
}
.pm-action svg { width: 13px; height: 13px; }
.pm-action:hover {
	background: var(--c-surface-2);
	color: var(--c-primary);
}
.pm-action--del:hover { color: #e0452a; background: rgba(224, 69, 42, .1); }

/* Consecutive messages from same author — compact */
.pm-message--continuation { margin-top: -10px; }
.pm-message--continuation .pm-message__avatar { visibility: hidden; }
.pm-message--continuation .pm-message__meta { display: none; }
.pm-message--continuation:not(.pm-message--own) .pm-message__bubble {
	border-top-left-radius: 6px;
	border-bottom-left-radius: 16px;
}
.pm-message--continuation.pm-message--own .pm-message__bubble {
	border-top-right-radius: 6px;
	border-bottom-right-radius: 16px;
}

/* ── Reply input ───────────────────────────────────────────────────────── */
.pm-reply {
	padding: 14px 18px 18px;
	background: var(--c-surface);
	border-top: 1px solid var(--c-border);
}
.pm-reply__editor {
	border: 1px solid var(--c-border);
	border-radius: 14px;
	background: var(--c-surface-2);
	padding: 0;
	overflow: hidden;
	transition: border-color .15s, box-shadow .15s;
}
.pm-reply__editor:focus-within {
	border-color: var(--c-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-primary) 12%, transparent);
}
.pm-reply__editor textarea,
.pm-reply__editor .bbeditor textarea,
.pm-reply__editor [contenteditable] {
	background: transparent !important;
	border: 0 !important;
	min-height: 80px !important;
	padding: 12px 14px !important;
}
.pm-reply__foot {
	margin-top: 10px;
	display: flex;
	justify-content: flex-end;
}

/* ── Dark theme overrides for PM ───────────────────────────────────────── */
[data-theme="dark"] .pm-wrap.form-card,
[data-theme="dark"] .pm-thread.form-card {
	background: var(--c-surface);
	border-color: rgba(255, 255, 255, .08);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 4px 14px rgba(0, 0, 0, .25);
}
[data-theme="dark"] .pm-header,
[data-theme="dark"] .pm-thread__header {
	background: linear-gradient(180deg, rgba(255,255,255,.03) 0%, transparent 100%);
	border-bottom-color: rgba(255, 255, 255, .08);
}
[data-theme="dark"] .pm-messages {
	background:
		radial-gradient(circle at 0% 0%, rgba(244, 122, 109, .04) 0%, transparent 40%),
		radial-gradient(circle at 100% 100%, rgba(91, 108, 255, .03) 0%, transparent 40%),
		rgba(15, 18, 24, .5);
}
[data-theme="dark"] .pm-message:not(.pm-message--own) .pm-message__bubble {
	background: rgba(255, 255, 255, .045);
	border-color: rgba(255, 255, 255, .08);
	color: #eaebef;
}
[data-theme="dark"] .pm-message__text { color: #eaebef; }
[data-theme="dark"] .pm-message--own .pm-message__bubble {
	background: linear-gradient(135deg, #f88a7d 0%, #ec6f62 100%);
	border-color: rgba(255, 255, 255, .15);
}
[data-theme="dark"] .pm-message__actions {
	background: rgba(30, 33, 40, .95);
	border-color: rgba(255, 255, 255, .1);
	box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
}
[data-theme="dark"] .pm-action { color: rgba(255, 255, 255, .65); }
[data-theme="dark"] .pm-action:hover {
	background: rgba(255, 255, 255, .08);
	color: #f88a7d;
}
[data-theme="dark"] .pm-reply { background: var(--c-surface); border-top-color: rgba(255, 255, 255, .08); }
[data-theme="dark"] .pm-reply__editor {
	background: rgba(255, 255, 255, .025);
	border-color: rgba(255, 255, 255, .08);
}
[data-theme="dark"] .pmlist-wrap table.pm tr { border-bottom-color: rgba(255, 255, 255, .06); }
[data-theme="dark"] .pmlist-wrap table.pm tr:hover {
	background: linear-gradient(90deg, rgba(244, 122, 109, .08) 0%, transparent 100%);
}
[data-theme="dark"] .pmlist-wrap form {
	background: rgba(255, 255, 255, .02);
	border-top-color: rgba(255, 255, 255, .08);
}

/* ── Responsive (≤640px) ───────────────────────────────────────────────── */
@media (max-width: 640px) {
	.pm-wrap.form-card { border-radius: 0; border-left: 0; border-right: 0; }
	.pm-header { padding: 14px 16px; gap: 10px; }
	.pm-storage { display: none; }
	.pm-thread__header { padding: 12px 14px; }
	.pm-messages { padding: 14px 12px; gap: 10px; max-height: none; }
	.pm-message { max-width: 88%; }
	.pm-message__avatar img { width: 30px; height: 30px; }
	.pm-message__actions { top: auto; bottom: -14px; }
	.pm-reply { padding: 12px 14px 16px; }
	.pmlist-wrap table.pm td.pm_last_user { display: none; }
	.pmlist-wrap table.pm td.pm_subj { padding: 14px 12px !important; }
}

/* ═══════════════════════════════════════════════════════════════════════
   PM — tighten layout, simpler hovers, no-messages styling (2026-05-26 fix)
   ═══════════════════════════════════════════════════════════════════════ */

/* 1) Messages list — tighter, content-sized bubbles, no forced min-height */
.pm-messages {
	padding: 14px 16px !important;
	gap: 8px !important;
	min-height: 0 !important;
	max-height: 60vh !important;
}
/* Bubble wraps to content (not full body width) */
.pm-message__body { align-items: flex-start !important; }
.pm-message--own .pm-message__body { align-items: flex-end !important; }
.pm-message__bubble {
	display: inline-block;
	max-width: 100%;
	padding: 7px 12px !important;
}
.pm-message {
	max-width: 70% !important;
	gap: 8px !important;
}
.pm-message__avatar img {
	width: 32px !important;
	height: 32px !important;
}
.pm-message--continuation { margin-top: -4px !important; }

/* 2) Reply textarea — smaller, sensible default */
.pm-reply { padding: 12px 16px 14px !important; }
.pm-reply__editor textarea,
.pm-reply__editor .bbeditor textarea,
.pm-reply__editor [contenteditable] {
	min-height: 56px !important;
	max-height: 200px !important;
	height: 56px !important;
	resize: vertical;
}
/* Override DLE's rows="N" attribute height */
.pm-reply__editor textarea[rows] { height: 56px !important; }
.pm-reply__foot { margin-top: 8px !important; }

/* 3) Inbox rows — tighter padding */
.pmlist-wrap table.pm td.pm_subj {
	padding: 12px 16px !important;
}
.pmlist-wrap table.pm td.pm_last_user {
	padding: 12px 16px 12px 0 !important;
	min-width: 100px;
}
.pmlist-wrap table.pm td.pm_checkbox {
	padding: 12px 14px 12px 4px !important;
}
.pmlist-wrap table.pm .pm_last_message {
	font-size: 12.5px !important;
	margin-top: 1px !important;
}

/* 4) "Написать" button — simpler, faster hover (no transform, lighter shadow) */
.pm-btn--primary {
	transition: filter .15s ease, box-shadow .15s ease !important;
	will-change: filter;
}
.pm-btn--primary:hover {
	transform: none !important;
	filter: brightness(1.06);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, .3),
		inset 0 -1px 0 rgba(0, 0, 0, .12),
		0 4px 14px rgba(254, 64, 141, .28) !important;
}
.pm-btn--primary:active {
	filter: brightness(.96);
}

/* 5) Empty state — proper card styling */
.pm-no-messages,
.pmlist-wrap > .pm-no-messages,
span.pm-no-messages {
	display: flex !important;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 60px 24px !important;
	color: var(--c-text-muted);
	font-size: 14px;
	text-align: center;
}
.pm-no-messages::before {
	content: "";
	display: block;
	width: 56px;
	height: 56px;
	background-color: var(--c-text-muted);
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/></svg>") center / contain no-repeat;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/></svg>") center / contain no-repeat;
	opacity: .35;
}

/* Dark-theme overrides for the new bits */
[data-theme="dark"] .pm-no-messages { color: rgba(255, 255, 255, .55); }
[data-theme="dark"] .pm-no-messages::before { background-color: rgba(255, 255, 255, .35); }

/* ──────────────────────────────────────────────────────────────────────────
   Captcha — DLE built-in (replaces ugly raw 160×80 image)
   ────────────────────────────────────────────────────────────────────────── */
.cy-captcha {
	display: flex;
	gap: 12px;
	align-items: stretch;
	margin: 6px 0 0;
}
.cy-captcha__image {
	position: relative;
	flex: 0 0 auto;
	display: inline-block;
	border: 1px solid var(--c-border);
	border-radius: var(--c-radius);
	background: var(--c-surface-2);
	overflow: hidden;
	cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}
.cy-captcha__image:hover {
	border-color: var(--c-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-primary, #fe408d) 18%, transparent);
}
.cy-captcha__image:active { transform: scale(.98); }
.cy-captcha__image a {
	display: block;
	line-height: 0;
	text-decoration: none;
	color: inherit;
	border: 0;
}
.cy-captcha__image span#dle-captcha { display: inline-block; line-height: 0; }
.cy-captcha__image img {
	display: block;
	width: 160px;
	height: 56px;
	object-fit: cover;
	object-position: center;
	border-radius: 0;
	filter: contrast(1.15);
	mix-blend-mode: multiply;
}
[data-theme="dark"] .cy-captcha__image img {
	filter: contrast(1.15) invert(.92);
	mix-blend-mode: screen;
}
.cy-captcha__refresh {
	position: absolute;
	top: 6px; right: 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px; height: 22px;
	border-radius: 50%;
	background: var(--c-surface);
	color: var(--c-primary);
	box-shadow: 0 1px 3px rgba(0,0,0,.15);
	opacity: 0;
	transition: opacity .15s ease, transform .3s ease;
	pointer-events: none;
}
.cy-captcha__image:hover .cy-captcha__refresh {
	opacity: 1;
	transform: rotate(180deg);
}
.cy-captcha__refresh svg { width: 13px; height: 13px; }
.cy-captcha__input {
	flex: 1;
	min-width: 0;
	font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
	font-size: 18px;
	font-weight: 600;
	letter-spacing: .08em;
	/* NO text-transform — DLE captcha is case-sensitive, юзер должен видеть
	   точно те символы что он ввёл (включая регистр) */
	text-align: center;
	color: var(--c-text);
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	border-radius: var(--c-radius);
	padding: 0 14px;
}
.cy-captcha__input::placeholder {
	font-family: var(--ff-sans);
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 0;
	color: var(--c-text-muted);
}
.cy-captcha__input:focus {
	outline: none;
	border-color: var(--c-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-primary, #fe408d) 18%, transparent);
}
.cy-captcha__hint {
	margin: 4px 0 0;
	font-size: 12px;
	color: var(--c-text-muted);
}
@media (max-width: 560px) {
	.cy-captcha { flex-direction: column; }
	.cy-captcha__image { align-self: flex-start; }
	.cy-captcha__input { width: 100%; }
}

/* ──────────────────────────────────────────────────────────────────────────
   Photo paywall — locked photos hidden via CSS (kept in HTML for SEO),
   paywall block shown to non-Premium after Nth photo.
   The PHP wraps each locked <a class="fancybox">...<img/></a> in a hidden
   <span.cy-photo-locked>, so the whole grid cell collapses (not just <img>).
   ────────────────────────────────────────────────────────────────────────── */
.cy-photo-locked {
	display: none !important;
}

/* Photo paywall — full-width row inside the .fullpost flexbox gallery.
   Soft pink wash, rounded corners, lock icon + text + CTA. */
.fullstory__body .fullpost > .cy-photo-paywall,
.cy-photo-paywall {
	flex: 1 1 100%;
	width: 100%;
	margin: 14px 6px;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 18px;
	padding: 18px 24px;
	border-radius: 14px;
	background: color-mix(in srgb, var(--c-primary, #fe408d) 7%, var(--c-surface));
	border: 1px solid color-mix(in srgb, var(--c-primary, #fe408d) 15%, transparent);
	text-decoration: none !important;
	transition: background .15s ease, box-shadow .15s ease;
	box-shadow: 0 2px 10px color-mix(in srgb, var(--c-primary, #fe408d) 8%, transparent);
}
.cy-photo-paywall:hover {
	background: color-mix(in srgb, var(--c-primary, #fe408d) 10%, var(--c-surface));
	box-shadow: 0 4px 16px color-mix(in srgb, var(--c-primary, #fe408d) 14%, transparent);
}
.cy-photo-paywall:hover {
	border-color: var(--c-primary, #fe408d);
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(254, 64, 141, .25);
}
.cy-photo-paywall__lock {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px; height: 52px;
	border-radius: 50%;
	background: var(--c-primary, #fe408d);
	color: #fff;
	box-shadow: 0 4px 14px rgba(254, 64, 141, .4);
}
.cy-photo-paywall__lock svg { width: 24px; height: 24px; }
.cy-photo-paywall__body {
	flex: 1;
	min-width: 0;
	text-align: left;
}
.cy-photo-paywall__title {
	font-size: 17px;
	font-weight: 800;
	color: var(--c-text);
	line-height: 1.2;
}
.cy-photo-paywall__sub {
	font-size: 13px;
	color: var(--c-text-muted);
	margin-top: 3px;
}
.cy-photo-paywall__cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 22px;
	border-radius: 999px;
	background: var(--c-primary, #fe408d);
	color: #fff !important;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none !important;
	box-shadow: 0 4px 12px rgba(254, 64, 141, .4);
	transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
	white-space: nowrap;
}
.cy-photo-paywall__cta:hover {
	background: color-mix(in srgb, var(--c-primary, #fe408d) 88%, #000);
	box-shadow: 0 6px 18px rgba(254, 64, 141, .55);
	color: #fff !important;
}
.cy-photo-paywall__cta svg { flex-shrink: 0; }

/* Mobile — column layout (lock above text, button below).
   Use the same compound selector as desktop or it won't override (specificity). */
@media (max-width: 640px) {
	.fullstory__body .fullpost > .cy-photo-paywall,
	.cy-photo-paywall {
		flex-direction: column;
		text-align: center;
		padding: 20px 16px;
		gap: 14px;
	}
	.cy-photo-paywall__body { text-align: center; }
	.cy-photo-paywall__title { font-size: 16px; }
	.cy-photo-paywall__sub { font-size: 12.5px; }
	.cy-photo-paywall__cta {
		width: auto;
		min-width: 160px;
		justify-content: center;
		padding: 11px 22px;
	}
}

/* ═══════════ CY: Registration redesign (2026-05-30) — 2-panel ═══════════ */
.cy-reg-card{ padding:0 !important; overflow:hidden; }
.cy-reg{ display:grid; grid-template-columns:300px 1fr; }

/* — Aside (выгоды + доверие) — */
.cy-reg__aside{ position:relative; overflow:hidden; color:#fff;
	background:linear-gradient(155deg, var(--c-primary) 0%, var(--c-primary-active) 100%); }
.cy-reg__aside::after{ content:""; position:absolute; right:-70px; top:-70px; width:220px; height:220px;
	background:radial-gradient(circle, rgba(255,255,255,.18), transparent 70%); border-radius:50%; }
.cy-reg__aside-inner{ position:relative; z-index:1; padding:34px 28px; display:flex; flex-direction:column; height:100%; box-sizing:border-box; }
.cy-reg__logo{ font-weight:900; font-size:20px; letter-spacing:.5px; }
/* color:#fff !important — перебиваем глобальный modern.css `h1..h6{color:var(--c-text)!important}` */
.cy-reg__hero{ font-size:23px; line-height:1.25; font-weight:800; margin:26px 0 22px; color:#fff !important; }
.cy-reg__benefits{ list-style:none; padding:0; margin:0 0 24px; display:flex; flex-direction:column; gap:13px; }
.cy-reg__benefits li{ display:flex; align-items:center; gap:11px; font-size:15px; opacity:.97; }
.cy-reg__bicon{ font-size:18px; width:24px; text-align:center; flex:none; }
.cy-reg__trust{ display:flex; gap:24px; margin-top:auto; padding-top:22px; border-top:1px solid rgba(255,255,255,.22); }
.cy-reg__stat b{ display:block; font-size:20px; font-weight:900; line-height:1.1; }
.cy-reg__stat span{ font-size:12px; opacity:.85; }

/* — Main (форма) — */
.cy-reg__main{ padding:30px 32px; }
.cy-reg__title{ margin:0 0 6px; font-size:24px; font-weight:800; }
.cy-reg__lead{ margin:0 0 22px; color:var(--c-text-muted); font-size:14px; line-height:1.5; }

/* — Field — */
.cy-field{ margin-bottom:16px; }
.cy-field > label{ display:block; font-size:13px; font-weight:700; margin-bottom:6px; color:var(--c-text); }
.cy-field__opt{ font-weight:400; opacity:.55; }
.cy-field__control{ position:relative; display:flex; align-items:center; }
.cy-field__icon{ position:absolute; left:13px; top:50%; transform:translateY(-50%); width:18px; height:18px; color:var(--c-text-muted); pointer-events:none; display:flex; }
.cy-field__icon svg{ width:18px; height:18px; }
.cy-reg .cy-field__control input{ width:100%; box-sizing:border-box; padding:12px 14px 12px 40px !important; border:1px solid var(--c-border);
	border-radius:12px !important; background:var(--c-surface); color:var(--c-text); font-size:15px; height:auto !important; transition:border-color .15s, box-shadow .15s; }
/* правый отступ под кнопку-глаз / «Проверить», чтобы текст не лез под них */
.cy-reg .cy-field__control:has(.cy-field__eye) input{ padding-right:44px !important; }
.cy-reg .cy-field__control:has(.cy-field__action) input{ padding-right:108px !important; }
.cy-field__control input::placeholder{ color:var(--c-text-muted); opacity:.7; }
.cy-field__control input:focus{ outline:none; border-color:var(--c-primary); box-shadow:0 0 0 3px var(--c-primary-ring); }
.cy-field__eye{ position:absolute; right:8px; top:50%; transform:translateY(-50%); background:none; border:0; padding:6px; cursor:pointer; color:var(--c-text-muted); display:flex; border-radius:8px; }
.cy-field__eye:hover{ color:var(--c-primary); background:var(--c-primary-soft); }
.cy-field__eye svg{ width:18px; height:18px; }
.cy-field__eye.is-on{ color:var(--c-primary); }
.cy-field__action{ position:absolute; right:6px; top:50%; transform:translateY(-50%); background:var(--c-primary-soft); color:var(--c-primary); border:0;
	padding:8px 13px; border-radius:9px; font-size:13px; font-weight:700; cursor:pointer; transition:background .15s, color .15s; }
.cy-field__action:hover{ background:var(--c-primary); color:#fff; }
.cy-field__hint{ margin:6px 2px 0; font-size:12.5px; line-height:1.4; }
.cy-field__hint--muted{ color:var(--c-text-muted); }
.cy-field textarea{ width:100%; box-sizing:border-box; padding:12px 14px; border:1px solid var(--c-border);
	border-radius:12px; background:var(--c-surface); color:var(--c-text); font-size:15px; }
.cy-field textarea:focus{ outline:none; border-color:var(--c-primary); box-shadow:0 0 0 3px var(--c-primary-ring); }

/* — password strength meter — */
.cy-pwd-meter{ display:none; height:5px; border-radius:99px; background:var(--c-border); margin:8px 2px 0; overflow:hidden; }
.cy-pwd-meter.lvl-1, .cy-pwd-meter.lvl-2, .cy-pwd-meter.lvl-3, .cy-pwd-meter.lvl-4{ display:block; } /* трек виден только когда есть пароль */
.cy-pwd-meter > span{ display:block; height:100%; width:0; border-radius:99px; transition:width .25s, background .25s; }
.cy-pwd-meter.lvl-1 > span{ width:25%; background:var(--c-primary-active); }
.cy-pwd-meter.lvl-2 > span{ width:50%; background:#e8a020; }
.cy-pwd-meter.lvl-3 > span{ width:75%; background:var(--c-accent); }
.cy-pwd-meter.lvl-4 > span{ width:100%; background:var(--c-accent-hover); }
.cy-pwd-meter.is-empty > span{ width:0; }

/* — submit / footer — */
.cy-reg__actions{ margin-top:22px; }
.cy-reg__submit{ width:100%; display:flex; align-items:center; justify-content:center; gap:8px; padding:14px; font-size:16px; font-weight:800; border-radius:12px; }
.cy-reg__foot{ margin:16px 0 0; text-align:center; font-size:13px; color:var(--c-text-muted); }
.cy-reg__foot a{ color:var(--c-primary); }

/* — responsive — */
@media (max-width:680px){
	.cy-reg{ grid-template-columns:1fr; }
	.cy-reg__aside{ display:none; }
	.cy-reg__main{ padding:24px 20px; }
}

/* ── Modern up-button: кнопка «наверх» в левом поле (порт modern-upbutton) 2026-06-02 ── */
.cy-upbtn{
	position:fixed; left:0; top:0; height:100%;
	width:calc((100vw - var(--container, 1200px)) / 2);
	z-index:900; cursor:pointer; display:none; background:transparent;
	-webkit-tap-highlight-color:transparent;
}
.cy-upbtn.is-shown{ display:block; }
.cy-upbtn__band{
	position:absolute; left:0; top:0; height:100%; width:84px;
	background-color:transparent; transition:background-color .4s ease;
}
.cy-upbtn:hover .cy-upbtn__band{ background-color:color-mix(in srgb, var(--c-text) 4%, transparent); }
.cy-upbtn__label{
	position:absolute; top:18px; left:0; width:84px; text-align:center;
	display:flex; flex-direction:column; align-items:center; gap:5px;
	color:var(--c-text-muted, #9a9ca0); font:700 11px/1.2 Inter, Arial, sans-serif;
	transition:color .2s ease; pointer-events:none; user-select:none;
}
.cy-upbtn:hover .cy-upbtn__label{ color:var(--c-primary, #f47a6d); }
.cy-upbtn__arrow{ width:18px; height:18px; transition:transform .3s ease; }
.cy-upbtn__remove{
	position:absolute; bottom:26px; left:0; width:84px; text-align:center;
	color:#bdbdbd; font:400 10px/1.2 Inter, Arial, sans-serif;
	opacity:0; transition:opacity .3s ease;
}
.cy-upbtn:hover .cy-upbtn__remove{ opacity:1; }
.cy-upbtn__remove span{ border-bottom:1px dashed currentColor; cursor:pointer; }
.cy-upbtn__remove span:hover{ color:var(--c-primary, #f47a6d); border-color:var(--c-primary, #f47a6d); }
@media (max-width:1320px){ .cy-upbtn{ display:none !important; } }
@media (hover:none){ .cy-upbtn{ display:none !important; } }

/* ── Золотой бейдж «Premium» ПОД названием сайта (только активная подписка, group=6) 2026-06-02 ── */
.site-brand__name{ display:inline-flex; flex-direction:column; align-items:center; gap:3px; line-height:1.04; }
.site-brand:hover .site-brand__title{ text-shadow:0 0 12px rgba(255,255,255,.55), 0 0 22px rgba(255,255,255,.2); }
.site-brand .cy-brand-premium{
	display:inline-flex; align-items:center;
	padding:2px 9px; border-radius:999px;
	font:800 9px/1 Inter, Arial, sans-serif; letter-spacing:.1em; text-transform:uppercase;
	color:#5a4310;
	background:linear-gradient(135deg, #fbe9a0 0%, #e9bf57 42%, #caa033 70%, #f3d77f 100%);
	border:1px solid rgba(168,124,28,.55);
	box-shadow:0 1px 2px rgba(150,110,20,.35), inset 0 1px 0 rgba(255,255,255,.6);
	white-space:nowrap; flex:0 0 auto;
}
.site-brand:hover .cy-brand-premium{ text-shadow:none; }
@media (max-width:560px){ .site-brand .cy-brand-premium{ padding:1px 7px; font-size:8.5px; } }

/* ── Мини-блики на премиум-плашке: белые радиальные искры, вспыхивают вразнобой 2026-06-02 ── */
.site-brand .cy-brand-premium{ position:relative; overflow:hidden; }
.cy-brand-premium .cy-glint{
	position:absolute; border-radius:50%; pointer-events:none;
	background:radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,255,255,.6) 18%, rgba(255,255,255,0) 60%);
	opacity:0; will-change:opacity, transform;
	animation:cy-prem-glint 3s ease-in-out infinite;
}
.cy-brand-premium .cy-glint:nth-of-type(1){ width:8px; height:8px; top:1px;    left:16%;  animation-delay:0s; }
.cy-brand-premium .cy-glint:nth-of-type(2){ width:6px; height:6px; bottom:1px; left:42%;  animation-delay:1.1s; animation-duration:3.6s; }
.cy-brand-premium .cy-glint:nth-of-type(3){ width:7px; height:7px; top:2px;    right:34%; animation-delay:2.0s; }
.cy-brand-premium .cy-glint:nth-of-type(4){ width:6px; height:6px; bottom:0;   right:14%; animation-delay:2.7s; animation-duration:3.3s; }
@keyframes cy-prem-glint{
	0%   { opacity:0;   transform:scale(.3); }
	22%  { opacity:.65; transform:scale(1); }
	50%  { opacity:0;   transform:scale(.55); }
	100% { opacity:0;   transform:scale(.3); }
}
@media (prefers-reduced-motion:reduce){
	.cy-brand-premium .cy-glint{ animation:none; opacity:0; }
}

/* ── Meta-действия в анкете (Редактировать / Жалоба): неброские чипы с иконкой 2026-06-02 ── */
.post-meta__action{
	display:inline-flex; align-items:center; gap:4px;
	padding:2px 8px; border-radius:999px;
	font-size:11px; line-height:1.6;
	color:var(--c-text-muted, #9aa0a6) !important;
	background:transparent; border:1px solid transparent;
	cursor:pointer; white-space:nowrap; text-decoration:none !important;
	transition:color .15s ease, background-color .15s ease, border-color .15s ease;
}
.post-meta__action svg{ width:12px; height:12px; opacity:.85; flex:0 0 auto; }
.post-meta__action:hover{
	color:var(--c-primary, #f47a6d) !important;
	background:color-mix(in srgb, var(--c-primary) 9%, transparent);
	border-color:color-mix(in srgb, var(--c-primary) 22%, transparent);
}
.post-meta__action--report:hover{
	color:var(--c-danger, #e0564d) !important;
	background:color-mix(in srgb, var(--c-danger) 9%, transparent);
	border-color:color-mix(in srgb, var(--c-danger) 24%, transparent);
}
.post-meta__info a:has(.post-meta__action){ text-decoration:none !important; }
/* не выталкивать действия в дальний угол — пусть идут сразу за мета-инфо */
.post-meta__spacer{ flex:0 0 auto; width:8px; min-width:8px; }

/* ═══════════ ЛИЧНЫЕ СООБЩЕНИЯ — чистый редизайн (Apple/Stripe), 2026-06-02 ═══════════ */
/* Список = .cy-pm-item (новая разметка из pm.php); старый table.pm-CSS неактивен */
.pmlist-wrap{ padding:6px 0 0; }
.cy-pm-list{ display:flex; flex-direction:column; }
.cy-pm-item{
	display:flex; align-items:center; gap:13px;
	padding:11px 18px; cursor:pointer; position:relative;
	border-bottom:1px solid var(--c-border); transition:background .13s ease;
}
.cy-pm-item:last-child{ border-bottom:none; }
.cy-pm-item:hover{ background:color-mix(in srgb, var(--c-text) 4%, transparent); }
.cy-pm-item__avatar{
	flex:0 0 auto; width:42px; height:42px; border-radius:50%;
	display:flex; align-items:center; justify-content:center;
	font:700 16px/1 Inter, Arial, sans-serif; color:#fff;
	background:hsl(var(--pm-hue,210), 52%, 56%);
	box-shadow:inset 0 0 0 1px rgba(255,255,255,.14); user-select:none;
}
.cy-pm-item__main{ flex:1 1 auto; min-width:0; }
.cy-pm-item__top{ display:flex; align-items:baseline; gap:10px; }
.cy-pm-item__name{ font-size:14.5px; font-weight:600; color:var(--c-text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.cy-pm-item__date{ margin-left:auto; flex:0 0 auto; font-size:11.5px; color:var(--c-text-muted); white-space:nowrap; }
.cy-pm-item__preview{ font-size:13px; color:var(--c-text-muted); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cy-pm-item__you{ color:var(--c-text-soft, var(--c-text-muted)); }
.cy-pm-item__dot{ flex:0 0 auto; width:9px; height:9px; border-radius:50%; background:var(--c-primary); opacity:0; }
.cy-pm-item.is-unread .cy-pm-item__dot{ opacity:1; }
.cy-pm-item.is-unread .cy-pm-item__name{ font-weight:700; }
.cy-pm-item.is-unread .cy-pm-item__preview{ color:var(--c-text); }
.cy-pm-item__check{ flex:0 0 auto; display:flex; align-items:center; padding:2px; opacity:0; transition:opacity .13s; }
.cy-pm-item:hover .cy-pm-item__check{ opacity:1; }
.cy-pm-item:has(.cy-pm-item__check input:checked) .cy-pm-item__check{ opacity:1; }
.cy-pm-item__check input{ width:16px; height:16px; accent-color:var(--c-primary); cursor:pointer; margin:0; }

/* Нижняя панель массовых действий */
.pmlist-wrap table.pm_navigation{ width:100%; border-top:1px solid var(--c-border); }
.pmlist-wrap table.pm_navigation td{ padding:12px 18px !important; background:transparent !important; border:none !important; }
.pmlist-wrap .navigation{ display:flex; gap:6px; align-items:center; }
.pmlist-wrap select#pmlist_doaction{ height:36px; padding:0 12px; border:1px solid var(--c-border); border-radius:9px; background:var(--c-surface-2, var(--c-surface)); color:var(--c-text); font-size:13px; cursor:pointer; }
.pmlist-wrap select#pmlist_doaction:focus{ border-color:var(--c-primary); outline:none; }
.pmlist-wrap input.bbcodes[type="submit"]{ height:36px; padding:0 16px; border-radius:9px; border:1px solid var(--c-border); background:var(--c-surface-2, var(--c-surface)); color:var(--c-text); font-size:13px; font-weight:600; cursor:pointer; transition:background .14s; }
.pmlist-wrap input.bbcodes[type="submit"]:hover{ background:color-mix(in srgb, var(--c-text) 7%, transparent); }

/* ── Диалог: бабблы ── */
.cy-pm-msgs{ display:flex; flex-direction:column; gap:3px; padding:18px 20px; }
.cy-pm-msg{ display:flex; gap:10px; max-width:74%; align-self:flex-start; position:relative; }
.cy-pm-msg--own{ align-self:flex-end; flex-direction:row-reverse; }
.cy-pm-msg--continuation .cy-pm-msg__avatar{ visibility:hidden; }
.cy-pm-msg--continuation .cy-pm-msg__meta{ display:none; }
.cy-pm-msg__avatar{ flex:0 0 auto; align-self:flex-end; }
.cy-pm-msg__avatar img{ width:34px; height:34px; border-radius:50%; object-fit:cover; display:block; }
.cy-pm-msg__body{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; }
.cy-pm-msg--own .cy-pm-msg__body{ align-items:flex-end; }
.cy-pm-msg__meta{ display:flex; align-items:center; gap:6px; margin:0 0 4px 2px; }
.cy-pm-msg--own .cy-pm-msg__meta{ flex-direction:row-reverse; margin:0 2px 4px 0; }
.cy-pm-msg__author{ font-size:12.5px; font-weight:600; color:var(--c-text); }
.cy-pm-msg__author a{ color:inherit !important; text-decoration:none !important; }
.cy-pm-msg__date{ font-size:11px; color:var(--c-text-muted); }
.cy-pm-online{ width:7px; height:7px; border-radius:50%; background:#34c759; }
.cy-pm-msg__bubble{ background:var(--c-surface-2, color-mix(in srgb,var(--c-text) 6%, var(--c-surface))); padding:9px 13px; border-radius:16px 16px 16px 5px; font-size:14px; line-height:1.5; color:var(--c-text); max-width:100%; }
.cy-pm-msg--own .cy-pm-msg__bubble{ background:var(--c-primary); color:#fff; border-radius:16px 16px 5px 16px; }
.cy-pm-msg--own .cy-pm-msg__bubble a{ color:#fff !important; }
.cy-pm-msg__text{ word-break:break-word; }
.cy-pm-msg__signature{ margin-top:6px; padding-top:6px; border-top:1px dashed color-mix(in srgb,currentColor 22%,transparent); font-size:12px; opacity:.7; }

/* экшены: инлайн внизу баббла, раскрываются по hover (привязаны, не плавают) */
.cy-pm-msg__actions{ position:static !important; inset:auto !important; top:auto !important; right:auto !important; left:auto !important; bottom:auto !important; transform:none !important; background:none !important; border:none !important; box-shadow:none !important; display:flex; gap:2px; align-items:center; max-height:0; opacity:0; overflow:hidden; margin:0 !important; padding:0 !important; transition:max-height .18s ease, opacity .15s ease, margin .18s ease; }
.cy-pm-msg--own .cy-pm-msg__actions{ justify-content:flex-end; }
.cy-pm-msg:hover .cy-pm-msg__actions{ max-height:34px; opacity:1; margin-top:5px !important; }
.cy-pm-msg__actions a{ display:inline-flex; text-decoration:none !important; }
.cy-pm-msg__actions .cy-pm-act{ display:inline-flex; align-items:center; justify-content:center; width:27px; height:27px; border-radius:8px; color:var(--c-text-muted) !important; cursor:pointer; margin:0 !important; transition:background .12s,color .12s; }
.cy-pm-msg__actions .cy-pm-act svg{ width:15px; height:15px; }
.cy-pm-msg__actions .cy-pm-act:hover{ background:color-mix(in srgb,var(--c-text) 9%,transparent); color:var(--c-text) !important; }
.cy-pm-msg__actions .cy-pm-act--del:hover{ background:color-mix(in srgb,var(--c-danger,#e0564d) 14%,transparent); color:var(--c-danger,#e0564d) !important; }

/* цитата внутри сообщения */
.cy-pm-msg__text .quote, .cy-pm-msg__text blockquote{ margin:6px 0; padding:6px 11px; border-left:3px solid color-mix(in srgb,currentColor 40%,transparent); background:color-mix(in srgb,currentColor 8%,transparent); border-radius:0 9px 9px 0; font-size:13px; line-height:1.45; }
.cy-pm-msg__text .quote .title_quote, .cy-pm-msg__text .quote b:first-child{ display:block; font-size:10.5px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; opacity:.7; margin-bottom:2px; }
.cy-pm-msg__text .dleshowhidden{ padding:6px 11px; border:1px dashed color-mix(in srgb,currentColor 30%,transparent); border-radius:9px; }

/* поле ответа */
.cy-pm-reply{ padding:14px 20px 18px; border-top:1px solid var(--c-border); }
.cy-pm-reply__foot{ margin-top:10px; display:flex; }

@media (max-width:600px){
	.cy-pm-item{ padding:10px 14px; gap:11px; }
	.cy-pm-item__avatar{ width:38px; height:38px; font-size:15px; }
	.cy-pm-msgs{ padding:14px; gap:7px; }
	.cy-pm-msg{ max-width:88%; }
	.cy-pm-reply{ padding:12px 14px 16px; }
	.cy-pm-msg__actions{ max-height:0 !important; opacity:0 !important; margin-top:0 !important; }
	.cy-pm-msg.is-acts .cy-pm-msg__actions{ max-height:38px !important; opacity:1 !important; margin-top:7px !important; }
	.cy-pm-msg.is-acts .cy-pm-act{ width:32px; height:32px; }
}

/* ── ЛС: шапка диалога (новый неймспейс) ── */
.cy-pm-thread.form-card{ padding:0; overflow:hidden; }
.cy-pm-thread__header{ display:flex; align-items:center; gap:13px; padding:13px 18px; border-bottom:1px solid var(--c-border); }
.cy-pm-back{ display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; flex:0 0 auto; border-radius:9px; border:1px solid var(--c-border); color:var(--c-text) !important; text-decoration:none !important; transition:background .14s; }
.cy-pm-back:hover{ background:color-mix(in srgb,var(--c-text) 6%,transparent); }
.cy-pm-back svg{ width:18px; height:18px; }
.cy-pm-thread__info{ display:flex; flex-direction:column; gap:1px; min-width:0; }
.cy-pm-thread__name{ font-size:15px; font-weight:700; color:var(--c-text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cy-pm-thread__subject{ font-size:12px; color:var(--c-text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* Telegram login button — always white text on blue background */
.btn-tg-login { background:#229ED9 !important; color:#fff !important; border-color:#229ED9 !important; }
.btn-tg-login:hover { background:#1b8dbe !important; border-color:#1b8dbe !important; color:#fff !important; }
