:root {
	--bg: #f4f6fb;
	--surface: #ffffff;
	--surface-2: #eef2f7;
	--surface-3: #f8fafc;
	--surface-raised: #ffffff;
	--text: #18202a;
	--muted: #657284;
	--line: #dce3ed;
	--accent: #c01818;
	--accent-2: #2563eb;
	--good: #14814a;
	--warn: #d97706;
	--shadow: 0 18px 45px rgba(31, 41, 55, .08);
	--radius: 8px;
	--shell: 1320px;
}

[data-theme="dark"] {
	--bg: #101318;
	--surface: #171b22;
	--surface-2: #202632;
	--surface-3: #12161d;
	--surface-raised: #1d2330;
	--text: #edf2f7;
	--muted: #9aa6b6;
	--line: #2c3441;
	--accent: #ef4444;
	--accent-2: #60a5fa;
	--good: #38c172;
	--warn: #f59e0b;
	--shadow: 0 18px 45px rgba(0, 0, 0, .25);
}

@media (prefers-color-scheme: dark) {
	html[data-theme="auto"] {
		--bg: #101318;
		--surface: #171b22;
		--surface-2: #202632;
		--surface-3: #12161d;
		--surface-raised: #1d2330;
		--text: #edf2f7;
		--muted: #9aa6b6;
		--line: #2c3441;
		--accent: #ef4444;
		--accent-2: #60a5fa;
		--good: #38c172;
		--warn: #f59e0b;
		--shadow: 0 18px 45px rgba(0, 0, 0, .25);
	}
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background:
		radial-gradient(circle at 12% 0, color-mix(in srgb, var(--accent-2) 9%, transparent), transparent 30rem),
		linear-gradient(180deg, var(--surface-3), var(--bg) 18rem);
	color: var(--text);
	font: 15px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
	letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; border: 0; display: block; }
button, input, textarea, select { font: inherit; }

.shell {
	width: min(var(--shell), calc(100% - 32px));
	margin-inline: auto;
}

.sr-only,
.skip-link {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

.skip-link:focus {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 20;
	width: auto;
	height: auto;
	clip: auto;
	padding: 10px 14px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 10;
	background: color-mix(in srgb, var(--surface) 92%, transparent);
	border-bottom: 1px solid var(--line);
	backdrop-filter: blur(16px);
}

@supports not (background: color-mix(in srgb, white, black)) {
	.site-header { background: var(--surface); }
	.catalog-hero,
	.page-heading { background: var(--surface); }
}

.header-grid {
	display: grid;
	grid-template-columns: auto minmax(320px, 1fr) auto;
	gap: 24px;
	align-items: center;
	min-height: 72px;
}

.brand {
	display: inline-flex;
	gap: 12px;
	align-items: center;
	min-width: 174px;
}

.brand-mark {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: 8px;
	background: linear-gradient(135deg, var(--accent), #111827);
	color: #fff;
	font-weight: 800;
}

.brand-text { display: grid; line-height: 1.05; }
.brand-text strong { font-size: 20px; }
.brand-text small { color: var(--muted); }

.main-nav {
	display: flex;
	align-items: center;
	gap: 8px;
	justify-content: center;
}

.main-nav a,
.nav-dropdown button,
.mobile-nav a,
.panel a {
	border-radius: var(--radius);
	color: var(--muted);
}

.main-nav a,
.nav-dropdown button {
	padding: 10px 12px;
	font-weight: 650;
}

.main-nav a:hover,
.nav-dropdown button:hover,
.nav-dropdown.is-open button,
.panel a:hover,
.mobile-nav a:hover {
	background: var(--surface-2);
	color: var(--text);
}

.nav-dropdown {
	position: relative;
}

.nav-dropdown button {
	border: 0;
	background: transparent;
	cursor: pointer;
}

.nav-dropdown button::after {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-left: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
}

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

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
	display: grid;
	gap: 2px;
}

.nav-dropdown-menu a {
	justify-content: flex-start;
	padding: 9px 10px;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.auth-dropdown {
	position: relative;
}

.auth-toggle {
	min-width: 74px;
	height: 42px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--text);
	font-weight: 750;
	cursor: pointer;
}

.auth-menu {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	z-index: 12;
	width: min(310px, calc(100vw - 24px));
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
	pointer-events: none;
}

.auth-dropdown:hover .auth-menu,
.auth-dropdown:focus-within .auth-menu,
.auth-dropdown.is-open .auth-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
}

.auth-menu .panel {
	box-shadow: var(--shadow);
}

.search-form {
	display: flex;
	align-items: center;
	width: min(310px, 32vw);
	border: 1px solid var(--line);
	background: var(--surface-2);
	border-radius: var(--radius);
	overflow: hidden;
}

.search-form input {
	min-width: 0;
	width: 100%;
	border: 0;
	background: transparent;
	color: var(--text);
	padding: 10px 12px;
	outline: 0;
}

.search-form button,
.theme-toggle,
.menu-toggle {
	width: 42px;
	height: 42px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--text);
	cursor: pointer;
}

.search-form button:hover,
.theme-toggle:hover,
.menu-toggle:hover,
.auth-toggle:hover {
	background: var(--surface-2);
	color: var(--accent);
}

.search-form button {
	border-width: 0 0 0 1px;
	background: transparent;
}

.menu-toggle { display: none; }

.mobile-nav {
	display: none;
	width: min(var(--shell), calc(100% - 32px));
	margin: 10px auto 0;
	padding: 8px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.mobile-nav.is-open { display: grid; }
.mobile-nav a { padding: 12px; }
.mobile-nav strong {
	padding: 12px 12px 4px;
	color: var(--muted);
	font-size: 12px;
	text-transform: uppercase;
}

.page-shell {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 312px;
	gap: 22px;
	align-items: start;
	padding: 24px 0 42px;
}

.sidebar {
	position: sticky;
	top: 92px;
	display: grid;
	gap: 16px;
}

.panel,
.game-card,
.game-page,
.static-page,
.form-page,
.profile-page,
.pm-page,
.stats-page,
.add-comment,
.comment,
.notice,
.poll-box,
.download-box {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

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

.panel { padding: 16px; }
.panel h2 {
	margin: 0 0 12px;
	font-size: 15px;
	text-transform: uppercase;
	color: var(--muted);
}

.panel a {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 9px 10px;
}

.archive-panel {
	background: color-mix(in srgb, var(--surface) 86%, var(--surface-2));
	box-shadow: none;
}

.speedbar-wrap {
	margin-bottom: 18px;
	color: var(--muted);
	font-size: 14px;
}

.speedbar-wrap a { color: var(--muted); }

.catalog-hero,
.page-heading {
	margin-bottom: 20px;
	padding: 22px;
	border-radius: var(--radius);
	background:
		linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent 46%),
		var(--surface);
	border: 1px solid var(--line);
	box-shadow: var(--shadow);
}

.page-heading-compact {
	padding: 0;
	margin-bottom: 12px;
	border: 0;
	background: transparent;
	box-shadow: none;
}

.page-heading-compact h1 {
	font-size: 28px;
}

.catalog-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 220px;
	gap: 24px;
	align-items: end;
}

.eyebrow {
	margin: 0 0 8px;
	color: var(--accent);
	font-weight: 800;
	text-transform: uppercase;
}

.catalog-hero h1,
.page-heading h1,
.game-hero h1 {
	margin: 0;
	font-size: clamp(30px, 4vw, 46px);
	line-height: 1.05;
	letter-spacing: 0;
}

.catalog-hero p,
.page-heading p {
	max-width: 760px;
	margin: 14px 0 0;
	color: var(--muted);
	font-size: 17px;
}

.hero-stat {
	padding: 18px;
	border-radius: var(--radius);
	background: var(--surface-2);
}

.hero-stat strong {
	display: block;
	font-size: 32px;
	line-height: 1;
}

.hero-stat span { color: var(--muted); }

.section-title {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 16px;
	margin: 8px 0 14px;
}

.section-title h2 {
	margin: 0;
	font-size: 22px;
}

.section-title span {
	color: var(--muted);
	font-size: 14px;
}

.content-feed {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

.content-flow {
	display: grid;
	gap: 18px;
	min-width: 0;
}

.game-card {
	display: grid;
	gap: 14px;
	padding: 14px;
	transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.game-card:hover {
	transform: translateY(-2px);
	border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
	box-shadow: 0 22px 58px rgba(31, 41, 55, .11);
}

.game-card-head {
	display: grid;
	gap: 8px;
	margin-bottom: 14px;
}

.game-card-main {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	align-items: start;
}

.game-card-cover {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--surface-2);
	border: 1px solid var(--line);
}

.game-card-cover img {
	width: 100%;
	aspect-ratio: 16 / 9;
	height: 100%;
	object-fit: cover;
	transition: transform .28s ease;
}

.game-card:hover .game-card-cover img {
	transform: scale(1.025);
}

.game-card-cover-empty {
	display: grid;
	place-items: center;
	aspect-ratio: 16 / 9;
	color: var(--muted);
	font-size: 38px;
	font-weight: 900;
	letter-spacing: 0;
}

.badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 1;
	padding: 5px 8px;
	border-radius: 6px;
	background: var(--surface);
	color: var(--text);
	font-size: 12px;
	font-weight: 800;
}

.badge-new { background: var(--good); color: #fff; }
.badge-danger { background: var(--accent); color: #fff; }

.badge-inline {
	display: inline-flex;
	align-items: center;
	min-height: 26px;
	padding: 3px 8px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 800;
}

.game-card-body {
	display: grid;
	gap: 12px;
	align-content: start;
	min-height: 100%;
}

.meta-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
	align-items: center;
	color: var(--muted);
	font-size: 13px;
}

.game-card-title {
	margin: 0;
	font-size: 20px;
	line-height: 1.18;
	overflow-wrap: anywhere;
}

.game-card-text {
	color: var(--muted);
	overflow-wrap: anywhere;
	display: -webkit-box;
	-webkit-line-clamp: 5;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.spec-chips,
.score-row,
.hero-actions,
.download-actions,
.story-actions,
.tags-line {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.spec-chips:empty,
.score-row:empty,
.hero-actions:empty,
.tags-line:empty {
	display: none;
}

.spec-chips span,
.score,
.tags-line a {
	display: inline-flex;
	align-items: center;
	min-height: 30px;
	padding: 5px 9px;
	border-radius: 7px;
	background: var(--surface-2);
	color: var(--muted);
	font-size: 13px;
}

.score-steam { color: var(--good); }
.score-meta { color: var(--warn); }

.card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
}

.content-feed .game-card-cover img {
	width: 100%;
	min-height: 210px;
	max-height: 260px;
	object-fit: cover;
	background: var(--surface-2);
}

.button-link,
.primary-button,
.ghost-button,
.download-actions a,
.login-panel button,
.add-comment button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 9px 14px;
	border-radius: var(--radius);
	border: 1px solid var(--line);
	font-weight: 750;
}

.button-link,
.primary-button,
.login-panel button,
.add-comment button {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

.ghost-button,
.download-actions a {
	background: var(--surface);
	color: var(--text);
}

.game-page { padding: 22px; }

.game-page .game-hero h1 {
	font-size: clamp(30px, 4vw, 44px);
}

.game-hero {
	display: grid;
	grid-template-columns: 1fr;
	gap: 22px;
	align-items: center;
}

.game-hero-media {
	position: relative;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--surface-2);
	border: 1px solid var(--line);
}

.game-hero-media img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.game-hero-info {
	display: grid;
	gap: 12px;
}

.game-hero-info:only-child {
	grid-column: 1 / -1;
}

.score-row-large .score {
	min-height: 36px;
	font-size: 14px;
}

.game-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) !important;
	gap: 18px !important;
	margin-top: 18px !important;
}

.game-main {
	display: block;
	width: 100% !important;
	gap: 18px;
	min-width: 0;
}

.game-main > * {
	width: 100% !important;
	max-width: none !important;
}

.game-main > * + * {
	margin-top: 18px;
}

.article-body {
	color: var(--text);
	overflow-wrap: anywhere;
	width: 100% !important;
	max-width: none !important;
}

.article-body::after {
	content: "";
	display: block;
	clear: both;
}

.article-body h1,
.article-body h2,
.article-body h3 {
	line-height: 1.2;
}

.article-body p { margin: 0 0 1em; }
.article-body a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.article-body ul, .article-body ol { padding-left: 22px; }
.article-body img {
	float: none !important;
	display: block;
	border-radius: var(--radius);
	margin: 14px auto 18px;
}

.article-body > div:first-child > img:first-child,
.article-body > p:first-child > img:first-child {
	float: none !important;
	display: block;
	width: min(100%, 760px);
	height: auto;
	margin: 0 auto 18px !important;
	border: 1px solid var(--line);
	box-shadow: var(--shadow);
}

.article-body .highslide img {
	float: none !important;
	width: min(100%, 600px);
	margin: 14px auto 18px !important;
	border: 1px solid var(--line);
	box-shadow: none;
}

.article-body .title_quote,
.article-body .quote,
.comment-text .title_quote,
.comment-text .quote {
	border: 1px solid var(--line);
	background: var(--surface-2);
}

.article-body .title_quote,
.comment-text .title_quote {
	margin-top: 10px;
	padding: 8px 10px 0;
	border-bottom: 0;
	border-radius: var(--radius) var(--radius) 0 0;
	color: var(--muted);
	font-size: 13px;
	font-weight: 750;
}

.article-body .quote,
.comment-text .quote {
	margin-bottom: 10px;
	padding: 8px 10px 10px;
	border-top: 0;
	border-radius: 0 0 var(--radius) var(--radius);
	color: var(--text);
}

.article-body table,
.search-table table {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
}

.article-body td,
.article-body th,
.search-table td,
.search-table th {
	padding: 10px 12px;
	border-bottom: 1px solid var(--line);
	vertical-align: top;
}

.content-section {
	padding-top: 4px;
	min-width: 0;
}

.content-section h2,
.download-box h2,
.comments-section h2,
.add-comment h3,
.info-table h2 {
	margin: 0 0 14px;
	font-size: 22px;
}

.screens-wrap {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 12px;
}

.screens-wrap img {
	border-radius: var(--radius);
}

.video-link {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--surface-2);
}

.video-link img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.video-link span {
	position: absolute;
	left: 16px;
	bottom: 16px;
	padding: 9px 12px;
	border-radius: var(--radius);
	background: rgba(0, 0, 0, .72);
	color: #fff;
	font-weight: 800;
}

.download-box {
	padding: 18px;
	box-shadow: none;
	background:
		linear-gradient(135deg, color-mix(in srgb, var(--accent) 9%, transparent), transparent 48%),
		var(--surface);
}

.download-box p {
	margin: 0 0 14px;
	color: var(--muted);
}

.download-box-soft {
	background: var(--surface-2);
}

.story-footer {
	display: grid;
	gap: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--line);
}

.game-aside {
	display: grid;
	align-content: start;
	gap: 16px;
}

.info-table {
	padding: 16px;
	border-radius: var(--radius);
	background: var(--surface-2);
	border: 1px solid var(--line);
}

.info-table dl {
	display: grid;
	grid-template-columns: 108px minmax(0, 1fr);
	gap: 10px;
	margin: 0;
	padding: 10px 0;
	border-top: 1px solid var(--line);
}

.info-table dt {
	color: var(--muted);
}

.info-table dd {
	margin: 0;
	overflow-wrap: anywhere;
}

.mini-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.mini-card {
	display: block;
	padding: 10px;
	border-radius: var(--radius);
	background: var(--surface-2);
	border: 1px solid transparent;
}

.mini-card:hover {
	border-color: var(--line);
	background: var(--surface);
}

.mini-card-title {
	font-size: 13px;
	font-weight: 700;
	line-height: 1.25;
}

.compact-list {
	display: grid;
	gap: 8px;
}

.compact-item {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 10px;
	border-radius: var(--radius);
	background: var(--surface-2);
	border: 1px solid transparent;
}

.compact-item:hover {
	border-color: var(--line);
	background: var(--surface);
}

.compact-item span {
	min-width: 0;
	overflow-wrap: anywhere;
}

.compact-item small {
	color: var(--accent);
	font-weight: 800;
}

.user-head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.user-head img,
.comment-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--surface-2);
}

.user-head h2 {
	margin: 0;
	font-size: 16px;
	text-transform: none;
	color: var(--text);
}

.user-head span { color: var(--muted); font-size: 13px; }
.panel-links { display: grid; gap: 6px; }
.panel-links.inline { grid-template-columns: repeat(2, 1fr); margin-top: 10px; }

.login-panel form,
.add-comment,
.form-grid {
	display: grid;
	gap: 12px;
}

.login-panel label,
.add-comment label {
	display: grid;
	gap: 6px;
	color: var(--muted);
	font-size: 13px;
}

.login-panel input,
.add-comment input,
.add-comment textarea {
	width: 100%;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--text);
	padding: 10px 12px;
}

.check-line {
	grid-template-columns: auto 1fr;
	align-items: center;
}

.check-line input { width: auto; }

.comments-section {
	display: grid;
	gap: 16px;
	padding-top: 22px;
	border-top: 1px solid var(--line);
	counter-reset: none !important;
}

.comments-section h2 {
	font-size: 24px;
	margin: 0;
	line-height: 1.15;
}

.comments-section ol,
.comments-section ul {
	margin: 0;
	padding: 0;
	list-style: none !important;
	counter-reset: none !important;
}

#dle-comments-form,
#dlemasscomments,
#dle-comments-list,
#dle-comments-list > .comments-tree-list {
	display: grid;
	gap: 14px;
	width: 100%;
	min-width: 0;
}

#dle-comments-list > .comments-tree-list {
	margin-left: 0 !important;
	padding-left: 0 !important;
	border-left: 0 !important;
}

.comments-section li {
	list-style: none !important;
	counter-increment: none !important;
}

.comments-section li::marker {
	content: "" !important;
	font-size: 0;
}

.comments-section li::before,
.comment::before {
	display: none !important;
	content: none !important;
}

.comment {
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr);
	gap: 14px;
	width: 100%;
	padding: 16px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface-raised);
	box-shadow: 0 10px 28px rgba(31, 41, 55, .06);
}

.comments-tree-item .comments-tree-list,
.comments-section .children,
.comments-section .children-comments {
	margin-left: 52px;
	padding-left: 14px;
	border-left: 2px solid var(--line);
}

.comment-head,
.comment-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 10px;
	align-items: center;
	color: var(--muted);
	font-size: 13px;
}

.comment-author {
	color: var(--text);
	font-size: 16px;
	font-weight: 800;
}

.comment-date {
	color: var(--muted);
}

.comment-text {
	margin: 10px 0 12px;
	overflow-wrap: anywhere;
	font-size: 15px;
	line-height: 1.55;
}

.comment-source {
	display: inline-block;
	margin-top: 6px;
	color: var(--accent-2);
}

.comment-rating {
	margin-left: auto;
	color: var(--accent);
	font-weight: 800;
}

.comment-actions a,
.comment-actions span {
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	padding: 4px 8px;
	border-radius: 6px;
	background: var(--surface-2);
	color: var(--muted);
	font-weight: 650;
}

.comment-actions a:hover,
.comment-actions span:hover {
	color: var(--text);
	background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
}

.comment-composer {
	display: grid;
	gap: 14px;
	padding: 18px;
	background:
		linear-gradient(135deg, color-mix(in srgb, var(--accent-2) 8%, transparent), transparent 45%),
		var(--surface-raised);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: 0 10px 28px rgba(31, 41, 55, .06);
}

.composer-head h3 {
	margin: 0;
	font-size: 20px;
	line-height: 1.2;
}

.composer-head p {
	margin: 4px 0 0;
	color: var(--muted);
	font-size: 14px;
}

.editor-wrap {
	min-width: 0;
}

.editor-wrap textarea,
.comment-composer textarea,
.comments-section textarea,
.comments-section input[type="text"],
.comments-section input[type="email"],
.comments-section input[type="password"],
.comments-section .f_input,
.comments-section .form-control {
	width: 100% !important;
	border: 1px solid var(--line) !important;
	border-radius: var(--radius) !important;
	background: var(--surface) !important;
	color: var(--text) !important;
	padding: 11px 12px !important;
	box-shadow: none !important;
	outline: 0;
}

.editor-wrap textarea,
.comment-composer textarea,
.comments-section textarea {
	min-height: 150px;
	resize: vertical;
	line-height: 1.55;
}

.comments-section .tox-tinymce,
.comments-section .bb-editor,
.comments-section .wysiwygeditor {
	border: 1px solid var(--line) !important;
	border-radius: var(--radius) !important;
	overflow: hidden;
}

.composer-actions,
.comments-section .form_submit,
.comments-section .form-submit {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
}

.comments-section input[type="button"],
.comments-section input[type="submit"],
.comments-section button {
	min-height: 40px;
	padding: 8px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface-2);
	color: var(--text);
	font-weight: 750;
	cursor: pointer;
}

.comments-section input[type="submit"],
.comments-section button.primary-button {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

.composer-question,
.composer-captcha {
	display: grid;
	gap: 8px;
}

.captcha-wrap { overflow-x: auto; }

.pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	width: 100%;
	margin: 28px auto 8px;
	text-align: center;
}

.page-list {
	display: contents;
}

.pagination a,
.pagination span,
.page-list > * {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	min-height: 38px;
	padding: 7px 10px;
	border-radius: var(--radius);
	background: var(--surface);
	border: 1px solid var(--line);
}

.static-page {
	padding: 24px;
}

.static-page h1 {
	margin-top: 0;
}

.notice {
	margin-bottom: 18px;
	padding: 14px 16px;
	box-shadow: none;
}

.notice strong {
	display: block;
	margin-bottom: 4px;
}

.form-page,
.profile-page {
	padding: 22px;
}

.form-page h1,
.profile-page h1 {
	margin: 0 0 10px;
	line-height: 1.15;
}

.form-page p {
	margin: 0 0 18px;
	color: var(--muted);
}

.form-stack {
	display: grid;
	gap: 14px;
}

.form-stack label,
.form-page label {
	display: grid;
	gap: 6px;
	color: var(--muted);
	font-size: 13px;
}

.form-stack input,
.form-stack textarea,
.form-stack select,
.form-page input,
.form-page textarea,
.form-page select,
.search-table input,
.search-table select {
	width: 100%;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--text);
	padding: 10px 12px;
}

.form-stack textarea,
.form-page textarea {
	resize: vertical;
}

.inline-control {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.inline-control input {
	flex: 1 1 220px;
}

.inline-control button,
.editor-tools button,
.editor-tools input {
	min-height: 40px;
	padding: 9px 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface-2);
	color: var(--text);
	cursor: pointer;
}

.editor-tools {
	overflow-x: auto;
}

.profile-head {
	display: flex;
	gap: 16px;
	align-items: center;
	margin-bottom: 20px;
}

.profile-head img {
	border-radius: var(--radius);
	object-fit: cover;
	background: var(--surface-2);
}

.profile-head p {
	margin: 6px 0 0;
	color: var(--muted);
}

.profile-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.profile-grid {
	display: grid;
	grid-template-columns: 320px minmax(0, 1fr);
	gap: 18px;
}

.profile-text {
	padding: 16px;
	border-radius: var(--radius);
	background: var(--surface-2);
	border: 1px solid var(--line);
}

.profile-edit {
	margin-top: 20px;
	box-shadow: none;
}

.category-tree,
.category-tree ul {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.category-tree ul {
	margin-left: 12px;
	padding-left: 10px;
	border-left: 1px solid var(--line);
}

.category-tree a {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 9px 10px;
	border-radius: var(--radius);
	background: var(--surface-2);
}

.category-tree small {
	color: var(--muted);
}

.tags-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tags-cloud a {
	display: inline-flex;
	align-items: center;
	min-height: 34px;
	padding: 6px 10px;
	border-radius: var(--radius);
	background: var(--surface-2);
	color: var(--text);
	font-weight: 650;
}

.poll-box,
.pm-page,
.stats-page {
	padding: 18px;
}

.poll-box h2,
.pm-page h1,
.pm-page h2,
.stats-page h1 {
	margin: 0 0 14px;
}

.poll-question,
.poll-list,
.poll-total {
	margin-bottom: 12px;
}

.poll-total {
	color: var(--muted);
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 16px 0;
}

.stats-grid div {
	padding: 16px;
	border-radius: var(--radius);
	background: var(--surface-2);
}

.stats-grid span {
	display: block;
	color: var(--muted);
}

.stats-grid strong {
	display: block;
	font-size: 28px;
	line-height: 1.1;
}

.pm-page {
	display: grid;
	gap: 18px;
}

.pm-status,
.pm-read {
	padding: 16px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface-2);
}

.pm-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pm-tabs a,
.pm-tabs span {
	display: inline-flex;
	padding: 9px 12px;
	border-radius: var(--radius);
	background: var(--surface-2);
}

.profile-popup {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr);
	gap: 14px;
	padding: 14px;
}

.profile-popup img {
	border-radius: var(--radius);
	object-fit: cover;
	background: var(--surface-2);
}

.profile-popup ul {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.profile-popup li {
	display: flex;
	justify-content: space-between;
	gap: 10px;
}

.profile-popup span {
	color: var(--muted);
}

.site-footer {
	border-top: 1px solid var(--line);
	background: var(--surface);
}

.footer-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 24px;
	padding: 24px 0;
	color: var(--muted);
}

.footer-grid p {
	margin: 6px 0 0;
	max-width: 620px;
}

.footer-grid nav {
	display: flex;
	align-items: center;
	gap: 14px;
}

.liveinternet-counter {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	min-width: 88px;
}

.liveinternet-counter img {
	display: block;
	width: 88px;
	height: 15px;
	border: 0;
	opacity: .78;
}

.dle-info,
.berrors,
.ui-dialog,
.pm_status {
	border-radius: var(--radius);
}

@media (max-width: 1180px) {
	.page-shell {
		grid-template-columns: 1fr;
	}

	.sidebar-right {
		position: static;
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 900px) {
	.header-grid {
		grid-template-columns: auto 1fr;
		gap: 12px;
	}

	.main-nav { display: none; }
	.menu-toggle { display: inline-grid; place-items: center; }
	.search-form { width: min(360px, 46vw); }

	.page-shell {
		grid-template-columns: 1fr;
		padding-top: 16px;
	}

	.sidebar-right {
		grid-template-columns: 1fr;
	}

	.content-feed {
		grid-template-columns: 1fr;
	}

	.catalog-hero,
	.game-hero,
	.game-layout {
		grid-template-columns: 1fr;
	}

	.game-card-main {
		grid-template-columns: 220px minmax(0, 1fr);
	}

	.content-feed .game-card-cover img {
		min-height: 150px;
	}
}

@media (max-width: 680px) {
	.shell {
		width: min(calc(100% - 20px), var(--shell));
	}

	.header-grid {
		grid-template-columns: auto 1fr;
		min-height: 64px;
	}

	.brand-text small { display: none; }

	.brand {
		min-width: 0;
	}

	.search-form {
		order: 3;
		grid-column: 1 / -1;
		width: 100%;
	}

	.header-actions {
		display: grid;
		grid-template-columns: 1fr repeat(3, 42px);
		grid-column: 1 / -1;
		gap: 8px;
		width: 100%;
	}

	.auth-toggle {
		width: 42px;
		min-width: 42px;
		font-size: 0;
	}

	.auth-toggle::before {
		content: "↪";
		font-size: 17px;
	}

	.auth-dropdown,
	.theme-toggle,
	.menu-toggle {
		grid-row: 1;
	}

	.auth-dropdown { grid-column: 2; }
	.theme-toggle { grid-column: 3; }
	.menu-toggle { grid-column: 4; }

	.auth-menu {
		right: -92px;
	}

	.catalog-hero,
	.page-heading,
	.game-page {
		padding: 16px;
	}

	.section-title {
		display: grid;
		gap: 2px;
	}

	.game-card-main {
		grid-template-columns: 1fr;
	}

	.game-card-cover img {
		min-height: 0;
	}

	.card-footer {
		align-items: stretch;
		flex-direction: column;
	}

	.footer-grid {
		align-items: stretch;
		grid-template-columns: 1fr;
	}

	.footer-grid nav {
		flex-wrap: wrap;
	}

	.liveinternet-counter {
		justify-content: flex-start;
	}

	.comments-tree-item .comments-tree-list,
	.comments-section .children,
	.comments-section .children-comments {
		margin-left: 18px;
		padding-left: 10px;
	}

	.comment {
		grid-template-columns: 1fr;
	}

	.info-table dl {
		grid-template-columns: 1fr;
		gap: 4px;
	}

	.mini-grid,
	.form-grid,
	.profile-grid,
	.stats-grid {
		grid-template-columns: 1fr;
	}
}
