/* ============================================================
   VGrom — шаблон для DataLife Engine 20.0
   Полный редизайн: светлая и тёмная темы, адаптивная сетка
   ============================================================ */

:root {
	--bg: #f5f6fa;
	--bg-soft: #eceef5;
	--surface: #ffffff;
	--surface-2: #f3f5f9;
	--surface-3: #e9ecf4;
	--text: #161b26;
	--muted: #67707f;
	--line: #e3e7f0;
	--line-strong: #ccd3e0;
	--accent: #d6303f;
	--accent-strong: #b3232f;
	--accent-soft: rgba(214, 48, 63, .1);
	--accent-2: #4f5dd3;
	--accent-2-soft: rgba(79, 93, 211, .1);
	--good: #1f9d61;
	--good-soft: rgba(31, 157, 97, .12);
	--warn: #c77414;
	--warn-soft: rgba(199, 116, 20, .14);
	--danger: #dc2626;
	--steam: #1b2838;
	--meta-score: #2a9d3f;
	--shadow: 0 10px 30px rgba(22, 27, 38, .08);
	--shadow-big: 0 24px 60px rgba(22, 27, 38, .14);
	--radius: 16px;
	--radius-sm: 10px;
	--shell: 1280px;
	--font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--header-bg: rgba(255, 255, 255, .82);
}

[data-theme="dark"] {
	--bg: #1b1d22;
	--bg-soft: #202329;
	--surface: #25282e;
	--surface-2: #2c2f36;
	--surface-3: #212429;
	--text: #d4d7db;
	--muted: #8e949c;
	--line: #34373e;
	--line-strong: #45494f;
	--accent: #e0656f;
	--accent-strong: #e87f88;
	--accent-soft: rgba(224, 101, 111, .13);
	--accent-2: #8a96d8;
	--accent-2-soft: rgba(138, 150, 216, .13);
	--good: #6fbf8f;
	--good-soft: rgba(111, 191, 143, .14);
	--warn: #d8a455;
	--warn-soft: rgba(216, 164, 85, .15);
	--danger: #d97078;
	--meta-score: #7ec98f;
	--shadow: 0 8px 24px rgba(0, 0, 0, .28);
	--shadow-big: 0 18px 44px rgba(0, 0, 0, .38);
	--header-bg: rgba(27, 29, 34, .88);
}

@media (prefers-color-scheme: dark) {
	html[data-theme="auto"] {
		--bg: #1b1d22;
		--bg-soft: #202329;
		--surface: #25282e;
		--surface-2: #2c2f36;
		--surface-3: #212429;
		--text: #d4d7db;
		--muted: #8e949c;
		--line: #34373e;
		--line-strong: #45494f;
		--accent: #e0656f;
		--accent-strong: #e87f88;
		--accent-soft: rgba(224, 101, 111, .13);
		--accent-2: #8a96d8;
		--accent-2-soft: rgba(138, 150, 216, .13);
		--good: #6fbf8f;
		--good-soft: rgba(111, 191, 143, .14);
		--warn: #d8a455;
		--warn-soft: rgba(216, 164, 85, .15);
		--danger: #d97078;
		--meta-score: #7ec98f;
		--shadow: 0 8px 24px rgba(0, 0, 0, .28);
		--shadow-big: 0 18px 44px rgba(0, 0, 0, .38);
		--header-bg: rgba(27, 29, 34, .88);
	}
}

/* ---------- Базовое ---------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	background-image:
		radial-gradient(60rem 24rem at 85% -8rem, var(--accent-2-soft), transparent),
		radial-gradient(50rem 22rem at -10% -6rem, var(--accent-soft), transparent);
	background-repeat: no-repeat;
	color: var(--text);
	font: 16px/1.65 var(--font);
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent-2); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }

svg { flex: none; }

.shell {
	max-width: var(--shell);
	margin: 0 auto;
	padding: 0 20px;
}

.sr-only {
	position: absolute;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: -48px; left: 16px;
	z-index: 200;
	padding: 10px 16px;
	background: var(--accent);
	color: #fff;
	border-radius: 0 0 var(--radius-sm) var(--radius-sm);
	transition: top .2s ease;
}
.skip-link:focus { top: 0; color: #fff; }

/* ---------- Шапка ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--header-bg);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line);
}

.header-grid {
	display: flex;
	align-items: center;
	gap: 22px;
	min-height: 64px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--text);
}
.brand:hover { color: var(--text); }

.brand-mark {
	display: grid;
	place-items: center;
	width: 40px; height: 40px;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	color: #fff;
	font-weight: 800;
	font-size: 15px;
	letter-spacing: .02em;
	box-shadow: 0 6px 16px var(--accent-soft);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 17px; }
.brand-text small { color: var(--muted); font-size: 11.5px; }

.main-nav {
	display: flex;
	align-items: center;
	gap: 4px;
}

.main-nav > a,
.nav-dropdown > button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 13px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--text);
	font: 600 14.5px/1 var(--font);
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}
.main-nav > a:hover,
.nav-dropdown > button:hover { background: var(--surface-2); color: var(--accent); }

.nav-dropdown { position: relative; }
.nav-dropdown svg { width: 14px; height: 14px; transition: transform .15s ease; }
.nav-dropdown.is-open svg { transform: rotate(180deg); }

.nav-dropdown-menu {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	min-width: 220px;
	display: none;
	flex-direction: column;
	padding: 8px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-big);
}
.nav-dropdown.is-open .nav-dropdown-menu { display: flex; }

.nav-dropdown-menu a {
	padding: 9px 12px;
	border-radius: 8px;
	color: var(--text);
	font-size: 14.5px;
}
.nav-dropdown-menu a:hover { background: var(--surface-2); color: var(--accent); }

.header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
}

.search-form {
	position: relative;
	display: flex;
	align-items: center;
}

.search-form input[type="search"] {
	width: 210px;
	padding: 9px 38px 9px 14px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface-2);
	color: var(--text);
	font: 14px var(--font);
	transition: border-color .15s ease, width .2s ease, background .15s ease;
}
.search-form input[type="search"]:focus {
	outline: none;
	width: 250px;
	border-color: var(--accent-2);
	background: var(--surface);
}

.search-form button {
	position: absolute;
	right: 5px;
	display: grid;
	place-items: center;
	width: 30px; height: 30px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--muted);
	cursor: pointer;
}
.search-form button:hover { color: var(--accent); }
.search-form button svg { width: 17px; height: 17px; }

.theme-toggle,
.menu-toggle {
	display: grid;
	place-items: center;
	width: 38px; height: 38px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	color: var(--text);
	font-size: 16px;
	cursor: pointer;
	transition: border-color .15s ease, color .15s ease;
}
.theme-toggle:hover,
.menu-toggle:hover { border-color: var(--accent); color: var(--accent); }
.menu-toggle { display: none; }
.menu-toggle svg { width: 19px; height: 19px; }

.auth-dropdown { position: relative; }

.auth-toggle {
	padding: 9px 18px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--accent), var(--accent-strong));
	color: #fff;
	font: 600 14px var(--font);
	cursor: pointer;
	transition: filter .15s ease;
}
.auth-toggle:hover { filter: brightness(1.08); }
.auth-toggle.is-user { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }

.auth-menu {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	width: 300px;
	display: none;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow-big);
	overflow: hidden;
}
.auth-dropdown.is-open .auth-menu { display: block; }
.auth-menu .panel { border: 0; box-shadow: none; margin: 0; }

/* ---------- Мобильная навигация ---------- */

.mobile-nav {
	display: none;
	flex-direction: column;
	gap: 2px;
	padding: 12px 20px 16px;
	background: var(--surface);
	border-bottom: 1px solid var(--line);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a {
	padding: 10px 12px;
	border-radius: var(--radius-sm);
	color: var(--text);
	font-weight: 600;
	font-size: 15px;
}
.mobile-nav a:hover { background: var(--surface-2); color: var(--accent); }
.mobile-nav strong {
	margin-top: 10px;
	padding: 4px 12px;
	color: var(--muted);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .08em;
}

/* ---------- Каркас страницы ---------- */

.page-shell {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 312px;
	gap: 32px;
	padding-top: 26px;
	padding-bottom: 48px;
}

.content-area { min-width: 0; }

.speedbar-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	margin-bottom: 10px;
	color: var(--muted);
	font-size: 13px;
}
.speedbar-wrap a { color: var(--muted); }
.speedbar-wrap a:hover { color: var(--accent); }

.page-heading {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	margin-bottom: 14px;
}
.page-heading h1 {
	margin: 0;
	font-size: clamp(20px, 2.4vw, 26px);
}
.page-heading-compact h1 { font-size: 18px; font-weight: 700; color: var(--muted); }
.page-heading-icon { border-radius: var(--radius-sm); }

.sort-box select {
	padding: 7px 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--text);
	font: 14px var(--font);
}

/* ---------- Сетка карточек ---------- */

.content-feed {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 22px;
}
/* пагинация и служебные блоки внутри грида — на всю ширину */
.content-feed > .pagination,
.content-feed > .notice,
.content-feed > nav,
.content-feed > .berrors {
	grid-column: 1 / -1;
}

.content-flow { display: flex; flex-direction: column; gap: 24px; }

/* ---------- Карточка игры (shortstory) ---------- */

.game-card {
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.game-card:hover {
	transform: translateY(-3px);
	border-color: var(--line-strong);
	box-shadow: var(--shadow-big);
}

.card-cover {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	background: var(--surface-3);
	overflow: hidden;
}
.card-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .35s ease;
}
.game-card:hover .card-cover img { transform: scale(1.04); }

.card-cover-empty {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	min-height: 120px;
	background: linear-gradient(135deg, var(--accent-soft), var(--accent-2-soft));
	color: var(--muted);
	font-weight: 800;
	font-size: 28px;
	letter-spacing: .06em;
}

.card-badges {
	position: absolute;
	top: 10px; left: 10px;
	display: flex;
	gap: 6px;
}

.card-scores {
	position: absolute;
	bottom: 10px; left: 10px;
	display: flex;
	gap: 6px;
}

/* ---------- Бейджи и оценки ---------- */

.badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 9px;
	border-radius: 999px;
	font: 700 11px/1.5 var(--font);
	text-transform: uppercase;
	letter-spacing: .05em;
}
.badge-new { background: var(--good); color: #fff; }
.badge-update { background: var(--warn); color: #fff; }
.badge-18 { background: var(--danger); color: #fff; }

.meta-row .badge-new { background: var(--good-soft); color: var(--good); }
.meta-row .badge-update { background: var(--warn-soft); color: var(--warn); }

.score {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	border-radius: 999px;
	font: 700 12.5px/1.4 var(--font);
	white-space: nowrap;
}
.score svg { width: 14px; height: 14px; }
.score-steam { background: var(--steam); color: #9ecbff; }
.score-meta { background: #14181f; color: var(--meta-score); }

/* ---------- Тело карточки ---------- */

.card-body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
	padding: 16px 18px 18px;
}

.meta-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
	color: var(--muted);
	font-size: 13px;
}
.meta-row a { color: var(--muted); font-weight: 600; }
.meta-row a:hover { color: var(--accent); }
.meta-cat a { color: var(--accent-2); }

.card-title {
	margin: 0;
	font-size: 18px;
	line-height: 1.35;
}
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent); }

.spec-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.spec-chips span {
	padding: 3px 10px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface-2);
	color: var(--muted);
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.card-text {
	flex: 1;
	color: var(--muted);
	font-size: 14px;
	line-height: 1.6;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
}

.card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 4px;
	padding-top: 12px;
	border-top: 1px solid var(--line);
}

.card-stats {
	display: flex;
	align-items: center;
	gap: 13px;
}

.stat {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: var(--muted);
	font-size: 13px;
	font-weight: 600;
}
.stat svg { width: 16px; height: 16px; }
a.stat:hover, .stat a:hover { color: var(--accent); }

.stat-action { cursor: pointer; transition: color .15s ease, transform .15s ease; }
.stat-action:hover { color: var(--accent); transform: scale(1.12); }
.stat-action.is-active { color: var(--accent); }

.button-link {
	display: inline-flex;
	align-items: center;
	padding: 7px 16px;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent);
	font: 600 13.5px var(--font);
	transition: background .15s ease, color .15s ease;
	cursor: pointer;
}
.game-card:hover .button-link,
.button-link:hover { background: var(--accent); color: #fff; }

/* ---------- Кнопки ---------- */

.primary-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 26px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--accent), var(--accent-strong));
	color: #fff;
	font: 700 15px var(--font);
	cursor: pointer;
	transition: filter .15s ease, transform .15s ease;
	box-shadow: 0 8px 22px var(--accent-soft);
}
.primary-button:hover { filter: brightness(1.08); transform: translateY(-1px); color: #fff; }
.primary-button svg { width: 18px; height: 18px; }

.ghost-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 22px;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	background: var(--surface);
	color: var(--text);
	font: 600 14.5px var(--font);
	cursor: pointer;
	transition: border-color .15s ease, color .15s ease;
}
.ghost-button:hover { border-color: var(--accent); color: var(--accent); }
.ghost-button svg { width: 16px; height: 16px; }

/* ---------- Полная новость ---------- */

.game-page { position: relative; }

.game-backdrop {
	position: absolute;
	inset: -26px -20px auto;
	height: 380px;
	z-index: -1;
	background-size: cover;
	background-position: center top;
	border-radius: 0 0 var(--radius) var(--radius);
	filter: blur(28px) saturate(1.15);
	opacity: .22;
	pointer-events: none;
}

.game-hero {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 20px 24px;
	margin-bottom: 24px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.game-hero h1 {
	margin: 0;
	font-size: clamp(22px, 2.8vw, 30px);
}

.game-hero-stats {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 16px;
}
.game-hero-stats .score { font-size: 13.5px; padding: 6px 13px; }
.game-hero-stats .score svg { width: 16px; height: 16px; }

.rating-bar {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 5px 14px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface-2);
}
.rating-bar svg { width: 17px; height: 17px; }
.rating-up a, .rating-down a { display: inline-flex; color: var(--muted); }
.rating-up a:hover { color: var(--good); }
.rating-down a:hover { color: var(--danger); }
.rating-value { font-weight: 700; font-size: 15px; }
.rating-value small { color: var(--muted); font-weight: 500; }

.hero-bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 18px;
	margin-top: 2px;
	padding-top: 14px;
	border-top: 1px solid var(--line);
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-left: auto;
}
.hero-actions .primary-button { padding: 10px 22px; }
.hero-actions .ghost-button { padding: 9px 18px; }

.game-main {
	display: flex;
	flex-direction: column;
	gap: 26px;
}

/* ---------- Типографика статьи ---------- */

.article-body {
	font-size: 16px;
	line-height: 1.75;
}
.article-body p { margin: 0 0 1em; }
.article-body img {
	border-radius: var(--radius-sm);
}
.article-body h2, .article-body h3 { margin: 1.4em 0 .6em; }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body blockquote {
	margin: 1em 0;
	padding: 12px 18px;
	border-left: 3px solid var(--accent);
	background: var(--surface-2);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.article-body table { border-collapse: collapse; width: 100%; }
.article-body td, .article-body th {
	padding: 8px 12px;
	border: 1px solid var(--line);
}

/* ---------- Секции контента ---------- */

.content-section {
	padding: 24px 28px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
}
.content-section > h2 {
	margin: 0 0 16px;
	font-size: 21px;
}

/* ---------- Характеристики игры ---------- */

.game-specs { padding: 18px 22px; }
.game-specs > h2 { margin-bottom: 10px; font-size: 18px; }

.specs-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 2px 32px;
}
.specs-grid dl { margin: 0; }
.specs-grid dl > div {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 6px 2px;
	border-bottom: 1px dashed var(--line);
}
.specs-grid dl > div:last-child { border-bottom: 0; }
.specs-grid dt { color: var(--muted); font-size: 13px; white-space: nowrap; }
.specs-grid dd {
	margin: 0;
	font-size: 13.5px;
	font-weight: 600;
	text-align: right;
}
.specs-grid .specs-head { border-bottom: 1px solid var(--line-strong); }
.specs-grid .specs-head dt {
	color: var(--text);
	font-weight: 700;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: .05em;
}

/* ---------- Скриншоты ---------- */

.screens-wrap { display: block; }
.screens-wrap ul.xfieldimagegallery,
.screens-wrap ul {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.screens-wrap li { margin: 0; }
.screens-wrap a {
	display: block;
	border-radius: var(--radius-sm);
	overflow: hidden;
	background: var(--surface-3);
}
.screens-wrap img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--radius-sm);
	transition: transform .25s ease, opacity .25s ease;
}
.screens-wrap a:hover img { transform: scale(1.04); opacity: .92; }

/* ---------- Видео ---------- */

.video-poster {
	position: relative;
	display: block;
	width: 100%;
	max-width: 720px;
	margin: 0 auto;
	padding: 0;
	border: 0;
	border-radius: var(--radius-sm);
	overflow: hidden;
	cursor: pointer;
	background: var(--surface-3);
}
.video-poster img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.play-button {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	background: rgba(0, 0, 0, .25);
	transition: background .2s ease;
}
.video-poster:hover .play-button { background: rgba(0, 0, 0, .4); }
.play-button svg {
	width: 72px; height: 72px;
	padding: 18px;
	border-radius: 999px;
	background: var(--accent);
	color: #fff;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
	transition: transform .2s ease;
}
.video-poster:hover .play-button svg { transform: scale(1.08); }

.video-frame {
	display: block;
	width: 100%;
	max-width: 720px;
	margin: 0 auto;
	aspect-ratio: 16 / 9;
	border: 0;
	border-radius: var(--radius-sm);
}

/* ---------- Обновление ---------- */

.update-section { border-left: 3px solid var(--warn); }

/* ---------- Спойлеры ---------- */

details.spoiler {
	margin: 10px 0;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
	overflow: hidden;
}
details.spoiler > summary {
	padding: 12px 16px;
	cursor: pointer;
	font-weight: 600;
	font-size: 14.5px;
	list-style: none;
	display: flex;
	align-items: center;
	gap: 10px;
	transition: background .15s ease;
}
details.spoiler > summary::-webkit-details-marker { display: none; }
details.spoiler > summary::before {
	content: "";
	width: 8px; height: 8px;
	border-right: 2px solid var(--muted);
	border-bottom: 2px solid var(--muted);
	transform: rotate(-45deg);
	transition: transform .15s ease;
	flex: none;
}
details.spoiler[open] > summary::before { transform: rotate(45deg); }
details.spoiler > summary:hover { background: var(--surface-3); color: var(--accent); }
details.spoiler .spoiler-body {
	padding: 4px 16px 14px;
	border-top: 1px dashed var(--line);
	font-size: 14.5px;
}

/* нативные спойлеры DLE (когда BB-коды распарсены движком) */
.title_spoiler {
	padding: 12px 16px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm) var(--radius-sm) 0 0;
	background: var(--surface-2);
	font-weight: 600;
}
.title_spoiler a { color: var(--text); }
.title_spoiler a:hover { color: var(--accent); }
.text_spoiler {
	padding: 12px 16px;
	border: 1px solid var(--line);
	border-top: 0;
	border-radius: 0 0 var(--radius-sm) var(--radius-sm);
	background: var(--surface);
}

/* ---------- Блок скачивания ---------- */

.download-box {
	padding: 28px;
	background:
		linear-gradient(135deg, var(--accent-soft), transparent 55%),
		var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	text-align: center;
}
.download-box > h2 { margin: 0 0 6px; font-size: 22px; }
.download-box > p { margin: 0 0 18px; color: var(--muted); font-size: 14.5px; }

.download-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 12px;
}

.zip-menu { position: relative; }
.zip-menu-list {
	position: absolute;
	top: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%);
	min-width: 240px;
	display: none;
	flex-direction: column;
	padding: 8px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-big);
	z-index: 20;
}
.zip-menu.is-open .zip-menu-list { display: flex; }
.zip-menu.is-open [data-zip-toggle] svg { transform: rotate(180deg); }
.zip-menu-list a {
	padding: 10px 14px;
	border-radius: 8px;
	color: var(--text);
	font-weight: 600;
	font-size: 14px;
	text-align: left;
}
.zip-menu-list a:hover { background: var(--surface-2); color: var(--accent); }
.zip-pending {
	padding: 10px 14px;
	color: var(--muted);
	font-size: 13.5px;
}

.banner-slot { margin-top: 18px; }

.download-box-soft {
	background: var(--surface);
	padding: 18px;
}
.telegram-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-weight: 700;
	font-size: 15.5px;
	color: #2aabee;
}
.telegram-link svg { width: 22px; height: 22px; }
.telegram-link:hover { color: var(--accent-2); }

/* ---------- Футер новости ---------- */

.story-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.tags-line {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	color: var(--muted);
}
.tags-line svg { width: 16px; height: 16px; }
.tags-line a {
	padding: 3px 11px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	color: var(--muted);
	font-size: 12.5px;
	font-weight: 600;
}
.tags-line a:hover { border-color: var(--accent); color: var(--accent); }

.story-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	font-size: 13px;
}
.story-actions a, .story-actions span { color: var(--muted); cursor: pointer; }
.story-actions a:hover, .story-actions span:hover { color: var(--accent); }

/* ---------- Соседние публикации ---------- */

.story-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}
.story-nav a {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 14px 18px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	color: var(--text);
	transition: border-color .15s ease;
}
.story-nav a:hover { border-color: var(--accent); }
.story-nav small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.story-nav span { font-weight: 600; font-size: 14.5px; line-height: 1.4; }
.story-nav-next { text-align: right; margin-left: auto; width: 100%; }
.story-nav a:only-child { grid-column: span 2; }

/* ---------- Мини-карточки (похожие, сайдбар) ---------- */

.mini-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 14px;
}
.mini-grid-column { grid-template-columns: 1fr; }

.mini-card {
	display: flex;
	flex-direction: column;
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	overflow: hidden;
	transition: border-color .15s ease, transform .15s ease;
}
.mini-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.mini-card > a, .mini-card-body > a { display: block; }

.mini-card-cover {
	display: block;
	aspect-ratio: 16 / 9;
	background: var(--surface-3);
	overflow: hidden;
}
.mini-card-cover img { width: 100%; height: 100%; object-fit: cover; }

.mini-card-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 10px 12px 12px;
}
.mini-card-title {
	color: var(--text);
	font-weight: 600;
	font-size: 13.5px;
	line-height: 1.4;
}
.mini-card-title:hover { color: var(--accent); }
.mini-card-date { color: var(--muted); font-size: 12px; }

/* ---------- Сайдбар ---------- */

.sidebar {
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.panel {
	padding: 20px 22px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
}
.panel > h2 {
	margin: 0 0 14px;
	font-size: 15px;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--muted);
}

.panel-links { display: flex; flex-direction: column; gap: 2px; }
.panel-links a {
	padding: 8px 10px;
	border-radius: 8px;
	color: var(--text);
	font-weight: 600;
	font-size: 14.5px;
}
.panel-links a:hover { background: var(--surface-2); color: var(--accent); }
.panel-links.inline { flex-direction: row; flex-wrap: wrap; gap: 8px; }

.compact-list { display: flex; flex-direction: column; }
.compact-item {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 9px 10px;
	border-radius: 8px;
}
.compact-item:hover { background: var(--surface-2); }
.compact-item-title { color: var(--text); font-weight: 600; font-size: 14px; line-height: 1.45; }
.compact-item:hover .compact-item-title { color: var(--accent); }
.compact-item-date { color: var(--muted); font-size: 12px; }

/* ---------- Панель авторизации ---------- */

.user-panel .user-head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}
.user-panel .user-head img { border-radius: 999px; }
.user-panel .user-head h2 { margin: 0; font-size: 16px; text-transform: none; letter-spacing: 0; color: var(--text); }
.user-panel .user-head span { color: var(--muted); font-size: 12.5px; }

.login-panel h2 { color: var(--text); text-transform: none; letter-spacing: 0; font-size: 18px; }
.login-panel form { display: flex; flex-direction: column; gap: 12px; }
.login-panel label span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 13px; }
.login-panel button[type="submit"] {
	padding: 10px;
	border: 0;
	border-radius: var(--radius-sm);
	background: linear-gradient(135deg, var(--accent), var(--accent-strong));
	color: #fff;
	font: 700 14.5px var(--font);
	cursor: pointer;
}
.login-panel .panel-links { margin-top: 10px; }

/* ---------- Формы ---------- */

input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
	font: 14.5px var(--font);
	color: var(--text);
}

.form-page,
.static-page,
.pm-page,
.profile-page,
.stats-page,
.tags-page,
.search-page {
	padding: 26px 28px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
}
.form-page h1, .static-page h1, .tags-page h1, .search-page h1 {
	margin: 0 0 14px;
	font-size: clamp(22px, 3vw, 28px);
}

.form-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 14px;
	margin-bottom: 14px;
}

.form-stack { display: flex; flex-direction: column; gap: 14px; }

.form-page label span,
.form-grid label span,
.form-stack label span {
	display: block;
	margin-bottom: 5px;
	color: var(--muted);
	font-size: 13px;
	font-weight: 600;
}

.form-page input[type="text"],
.form-page input[type="email"],
.form-page input[type="password"],
.form-page input[type="number"],
.form-page select,
.form-page textarea,
.login-panel input[type="text"],
.login-panel input[type="password"],
.comment-composer input[type="text"],
.comment-composer input[type="email"] {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
	transition: border-color .15s ease, background .15s ease;
}
.form-page input:focus,
.form-page textarea:focus,
.form-page select:focus,
.login-panel input:focus,
.comment-composer input:focus {
	outline: none;
	border-color: var(--accent-2);
	background: var(--surface);
}

.check-line {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	cursor: pointer;
}
.check-line input { accent-color: var(--accent); }

.inline-control {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 6px;
}
.inline-control button {
	padding: 9px 20px;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	background: var(--surface);
	color: var(--text);
	font: 600 14px var(--font);
	cursor: pointer;
}
.inline-control button:hover { border-color: var(--accent); color: var(--accent); }

.captcha-wrap, .composer-captcha { margin: 12px 0; }
.captcha-image img { border-radius: var(--radius-sm); }

.editor-wrap { margin: 12px 0; }
.editor-wrap .bb-editor,
.editor-wrap textarea,
.comment-composer textarea,
.form-page textarea {
	display: block;
	width: 100% !important;
	min-height: 160px;
	padding: 12px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--text);
	resize: vertical;
}
.editor-wrap .bb-editor { padding: 0; border: 0; min-height: 0; background: transparent; }

/* ---------- Комментарии ---------- */

.comments-section {
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 24px 28px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
}
.comments-section > h2 { margin: 0; font-size: 21px; }

.comment {
	display: flex;
	gap: 14px;
	padding: 16px;
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
}
.comment-avatar { border-radius: 999px; flex: none; }
.comment-body { min-width: 0; flex: 1; }

.comment-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 10px;
	margin-bottom: 6px;
}
.comment-author { font-size: 14.5px; }
.comment-date { color: var(--muted); font-size: 12.5px; }
.comment-rating { margin-left: auto; color: var(--muted); font-size: 13px; }

.comment-source { margin-bottom: 6px; font-size: 13px; color: var(--accent-2); }
.comment-text { font-size: 14.5px; line-height: 1.65; overflow-wrap: anywhere; }

.comment-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 10px;
	font-size: 13px;
}
.comment-actions a { color: var(--muted); }
.comment-actions a:hover { color: var(--accent); }

.comment-composer {
	padding: 18px 20px;
	background: var(--surface-2);
	border: 1px dashed var(--line-strong);
	border-radius: var(--radius-sm);
}
.composer-head h3 { margin: 0 0 4px; font-size: 17px; }
.composer-head p { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; }
.composer-question { display: block; margin: 12px 0; }
.composer-question span { display: block; margin-bottom: 5px; font-size: 13.5px; color: var(--muted); }
.composer-actions { margin-top: 14px; }

/* ---------- Пагинация ---------- */

.pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 26px 0 6px;
}
.page-list { display: flex; flex-wrap: wrap; gap: 6px; }
.page-list a, .page-list span,
.pagination .page-prev, .pagination .page-next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	padding: 8px 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--text);
	font-weight: 600;
	font-size: 14px;
}
.page-list a:hover { border-color: var(--accent); color: var(--accent); }
.page-list span:not(.nav_ext) {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}
.page-list span.nav_ext { border: 0; background: transparent; color: var(--muted); }
.pagination a:hover .page-prev,
.pagination a:hover .page-next { border-color: var(--accent); color: var(--accent); }
/* неактивные «Назад»/«Далее» (DLE оборачивает их в span) */
.pagination > span > .page-prev,
.pagination > span > .page-next {
	opacity: .45;
	pointer-events: none;
}

/* ---------- Облако тегов, опросы, уведомления ---------- */

.tags-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tags-cloud a {
	padding: 5px 14px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface-2);
	color: var(--text);
	font-weight: 600;
}
.tags-cloud a:hover { border-color: var(--accent); color: var(--accent); }

.poll-box {
	padding: 20px 22px;
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	margin: 14px 0;
}
.poll-box h2 { margin: 0 0 10px; font-size: 17px; }
.poll-question { margin-bottom: 10px; font-weight: 600; }
.poll-list { display: flex; flex-direction: column; gap: 6px; }
.poll-total { margin-top: 10px; color: var(--muted); font-size: 13px; }

.notice {
	padding: 16px 20px;
	margin-bottom: 18px;
	background: var(--accent-2-soft);
	border: 1px solid var(--accent-2);
	border-radius: var(--radius-sm);
	font-size: 14.5px;
}
.notice strong { display: block; margin-bottom: 4px; }

/* ---------- Быстрый поиск ---------- */

#searchsuggestions {
	width: min(420px, 92vw) !important;
	padding: 8px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-big);
	z-index: 150;
}
#searchsuggestions a,
.fast-result {
	display: block;
	padding: 10px 12px;
	border-radius: 8px;
	color: var(--text);
}
#searchsuggestions a:hover { background: var(--surface-2); }
#searchsuggestions .searchheading,
.fast-result .searchheading {
	display: block;
	font-weight: 700;
	font-size: 14px;
	color: var(--accent-2);
}
.fast-result-text,
#searchsuggestions span {
	display: block;
	color: var(--muted);
	font-size: 12.5px;
	line-height: 1.5;
}
#searchsuggestions .seperator { display: block; padding: 6px 12px; }
#searchsuggestions .seperator a { color: var(--accent); font-weight: 600; font-size: 13px; padding: 0; }

.search-table { margin: 14px 0; }

/* ---------- Профиль, ПМ, статистика ---------- */

.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.profile-head img { border-radius: var(--radius-sm); }
.profile-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
}
.info-table { width: 100%; border-collapse: collapse; }
.info-table td { padding: 8px 6px; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.info-table td:first-child { color: var(--muted); }
.profile-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.pm-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pm-tabs a {
	padding: 7px 16px;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--text);
	font-weight: 600;
	font-size: 13.5px;
}
.pm-tabs a:hover { border-color: var(--accent); color: var(--accent); }
.pm-status { color: var(--muted); font-size: 13.5px; margin-bottom: 12px; }

.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 14px;
}

/* ---------- Меню категорий ---------- */

.category-tree {
	margin: 0;
	padding: 0;
	list-style: none;
}
.category-tree ul { margin: 0 0 0 14px; padding: 0; list-style: none; }
.category-tree a {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 8px;
	color: var(--text);
	font-weight: 600;
	font-size: 14.5px;
}
.category-tree a:hover { background: var(--surface-2); color: var(--accent); }
.category-tree small { color: var(--muted); font-size: 12px; }

.editor-tools { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }

/* ---------- Вложения, прочее ---------- */

.attachment {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
	font-size: 13.5px;
}

.offline {
	max-width: 520px;
	margin: 12vh auto;
	padding: 32px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	text-align: center;
}

.profile-popup {
	padding: 14px 16px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-big);
}

/* ---------- Системные диалоги DLE (jQuery UI) ---------- */

.ui-widget-overlay {
	position: fixed;
	inset: 0;
	background: rgba(10, 12, 16, .6);
	backdrop-filter: blur(2px);
}

.ui-dialog {
	position: absolute;
	padding: 0;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow-big);
	color: var(--text);
	font: 14.5px/1.6 var(--font);
	overflow: hidden;
}

.ui-dialog .ui-dialog-titlebar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px;
	background: var(--surface-2);
	border-bottom: 1px solid var(--line);
}
.ui-dialog .ui-dialog-title { font-weight: 700; font-size: 15.5px; }

.ui-dialog .ui-dialog-titlebar-close {
	order: 2;
	position: relative;
	flex: none;
	width: 30px; height: 30px;
	padding: 0;
	margin: 0;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	overflow: hidden;
	color: transparent;
	font-size: 0;
	line-height: 0;
	text-indent: -999px;
	cursor: pointer;
	transition: border-color .15s ease;
}
.ui-dialog .ui-dialog-titlebar-close > * { display: none !important; }
.ui-dialog .ui-dialog-titlebar-close::before {
	content: "✕";
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	font-size: 13px;
	line-height: 1;
	text-indent: 0;
	color: var(--muted);
}
.ui-dialog .ui-dialog-titlebar-close:hover { border-color: var(--accent); }
.ui-dialog .ui-dialog-titlebar-close:hover::before { color: var(--accent); }

.ui-dialog .ui-dialog-content {
	padding: 18px;
	background: var(--surface);
	overflow: auto;
}
.ui-dialog .ui-dialog-content textarea,
.ui-dialog .ui-dialog-content input[type="text"],
.ui-dialog .ui-dialog-content input[type="password"],
.ui-dialog .ui-dialog-content input[type="email"],
.ui-dialog .ui-dialog-content select {
	width: 100%;
	margin-top: 10px;
	padding: 10px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
	color: var(--text);
	font: 14.5px var(--font);
}
.ui-dialog .ui-dialog-content textarea { min-height: 140px; resize: vertical; }
.ui-dialog .ui-dialog-content textarea:focus,
.ui-dialog .ui-dialog-content input:focus {
	outline: none;
	border-color: var(--accent-2);
	background: var(--surface);
}

.ui-dialog .ui-dialog-buttonpane {
	display: flex;
	justify-content: flex-end;
	padding: 12px 18px 16px;
	background: var(--surface);
	border-top: 1px solid var(--line);
}
.ui-dialog .ui-dialog-buttonset {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.ui-dialog .ui-dialog-buttonpane button,
.ui-dialog .ui-button {
	padding: 9px 20px;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	background: var(--surface);
	color: var(--text);
	font: 600 14px var(--font);
	cursor: pointer;
	transition: border-color .15s ease, color .15s ease, filter .15s ease;
}
.ui-dialog .ui-dialog-buttonpane button:hover { border-color: var(--accent); color: var(--accent); }
.ui-dialog .ui-dialog-buttonpane button:last-child {
	border: 0;
	background: linear-gradient(135deg, var(--accent), var(--accent-strong));
	color: #fff;
}
.ui-dialog .ui-dialog-buttonpane button:last-child:hover { filter: brightness(1.08); color: #fff; }

/* всплывающие меню jQuery UI (например, у кнопки «Редактировать») */
.ui-menu {
	position: absolute;
	min-width: 200px;
	margin: 0;
	padding: 8px;
	list-style: none;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-big);
	color: var(--text);
	font: 14.5px/1.5 var(--font);
	z-index: 300;
}
.ui-menu .ui-menu-item { margin: 0; padding: 0; }
.ui-menu .ui-menu-item-wrapper,
.ui-menu .ui-menu-item > a,
.ui-menu .ui-menu-item > div {
	display: block;
	padding: 9px 12px;
	border-radius: 8px;
	color: var(--text);
	cursor: pointer;
	border: 0;
}
.ui-menu .ui-menu-item-wrapper.ui-state-active,
.ui-menu .ui-menu-item-wrapper:hover,
.ui-menu .ui-menu-item > a:hover {
	background: var(--surface-2);
	color: var(--accent);
	margin: 0;
}
.ui-menu .ui-menu-divider {
	margin: 6px 4px;
	border: 0;
	border-top: 1px solid var(--line);
	height: 0;
}

/* ---------- Футер сайта ---------- */

.site-footer {
	margin-top: 26px;
	padding: 34px 0 40px;
	background: var(--surface);
	border-top: 1px solid var(--line);
}

.footer-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) auto auto;
	gap: 32px;
	align-items: start;
}

.footer-about strong { font-size: 17px; }
.footer-about p { margin: 6px 0 0; color: var(--muted); font-size: 14px; max-width: 420px; }

.site-footer nav { display: flex; flex-direction: column; gap: 8px; }
.site-footer nav a { color: var(--muted); font-weight: 600; font-size: 14px; }
.site-footer nav a:hover { color: var(--accent); }

.liveinternet-counter { opacity: .7; }

/* ---------- Кнопка наверх ---------- */

.to-top {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 90;
	display: grid;
	place-items: center;
	width: 46px; height: 46px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	color: var(--text);
	cursor: pointer;
	box-shadow: var(--shadow);
	transition: color .15s ease, border-color .15s ease, transform .15s ease;
}
.to-top:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.to-top svg { width: 20px; height: 20px; }
.to-top[hidden] { display: none; }

/* ---------- Адаптив ---------- */

@media (max-width: 1100px) {
	.page-shell { grid-template-columns: 1fr; }
	.sidebar { flex-direction: row; flex-wrap: wrap; }
	.sidebar .panel { flex: 1 1 280px; }
}

@media (max-width: 900px) {
	.main-nav { display: none; }
	.menu-toggle { display: grid; }
	.search-form input[type="search"] { width: 150px; }
	.search-form input[type="search"]:focus { width: 180px; }
}

@media (max-width: 640px) {
	.shell { padding: 0 14px; }
	.header-grid { gap: 10px; }
	.brand-text small { display: none; }
	.search-form { order: 5; flex: 1 1 100%; padding-bottom: 10px; }
	.search-form input[type="search"],
	.search-form input[type="search"]:focus { width: 100%; }
	.content-feed { grid-template-columns: 1fr; }
	.game-hero { padding: 16px; gap: 10px; }
	.screens-wrap ul.xfieldimagegallery, .screens-wrap ul { grid-template-columns: repeat(2, 1fr); gap: 8px; }
	.content-section, .comments-section, .form-page, .static-page,
	.pm-page, .profile-page, .stats-page, .tags-page, .search-page { padding: 18px; }
	.download-box { padding: 22px 18px; }
	.specs-grid { grid-template-columns: 1fr; }
	.story-nav { grid-template-columns: 1fr; }
	.story-nav a:only-child { grid-column: auto; }
	.footer-grid { grid-template-columns: 1fr; gap: 22px; }
	.comment { padding: 12px; gap: 10px; }
	.game-hero-stats { gap: 8px 12px; }
	.hero-actions { width: 100%; margin-left: 0; }
	.hero-actions .primary-button, .hero-actions .ghost-button { flex: 1 1 auto; }
}

@media print {
	.site-header, .sidebar, .site-footer, .to-top, .mobile-nav,
	.hero-actions, .download-box, .comments-section, .story-nav { display: none !important; }
	body { background: #fff; color: #000; }
}
