/* v:f5a0e3eb38 */
.hljs{display:block;overflow-x:auto;padding:.5em;background:#F0F0F0}.hljs,.hljs-subst{color:#444}.hljs-comment{color:#888888}.hljs-keyword,.hljs-attribute,.hljs-selector-tag,.hljs-meta-keyword,.hljs-doctag,.hljs-name{font-weight:bold}.hljs-type,.hljs-string,.hljs-number,.hljs-selector-id,.hljs-selector-class,.hljs-quote,.hljs-template-tag,.hljs-deletion{color:#880000}.hljs-title,.hljs-section{color:#880000;font-weight:bold}.hljs-regexp,.hljs-symbol,.hljs-variable,.hljs-template-variable,.hljs-link,.hljs-selector-attr,.hljs-selector-pseudo{color:#BC6060}.hljs-literal{color:#78A960}.hljs-built_in,.hljs-bullet,.hljs-code,.hljs-addition{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta-string{color:#4d99bf}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold}
/*
 * Основа: переменные оформления, шрифты, сброс, типографика, формы.
 * Порядок файлов стилей (settings css в index.php): base → layout → components → content → pages → dark → admin.
 * Именование — БЭМ: блок каркаса = часть views/parts/header.* / footer.*, блок страницы = имя view, общие блоки —
 * компоненты (components.css); классы из HTML-контента в БД — content.css (их имена не менять).
 */

/****************************************************************** Переменные */
/* Цвета, шрифты и картинки оформления. Тёмная тема (dark.css) переопределяет их для body.dark,
 * шаблоны сайта (themes/{имя}/style.css) — для своего оформления; admin.css использует только эти переменные */
:root {
	--color-accent: #339933;
	--color-border: rgba(0, 204, 0, .3);
	--color-glow: rgba(0, 204, 0, .5);
	--color-head-bg: rgba(0, 204, 0, .05);
	--color-text: #003300;
	--color-muted: #888;
	--color-bg: #fff;
	--color-surface: #ffffff;
	--color-hover: #eee;
	--color-danger: #CC0000;
	--color-danger-border: rgba(204, 0, 0, .3);
	--color-success: #00BB00;
	--font-body: Verdana, Geneva, sans-serif;
	--font-head: "fbusv8c5ei", Verdana, Geneva, sans-serif;
	--img-telegram: url("/statics/img/telegram.png");
	--img-star: url("/statics/img/star.png");
	--img-complexity: url("/statics/img/complexity.png");
}

/***************************************************************** Типографика */
@font-face {
	font-family: "fbusv8c5ei";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("/statics/font/fbusv8c5ei.ttf");
}
* {
	margin: 0;
	padding: 0;
	border: none;
	outline: none;
	box-sizing: border-box;
}
body {
	font-family: var(--font-body);
	font-size: 12pt;
	line-height: 15pt;
	color: var(--color-text);
}
h1, h2, h3 {
	font-weight: bold;
	color: var(--color-accent);
	font-family: var(--font-head);
}
h1 {
	text-align: center;
	margin: 0 0 30px 0;
	font-size: 26pt;
	line-height: 30pt;
}
h2 {
	margin: 20px 0;
	font-size: 22pt;
	line-height: 26pt;
}
h3 {
	margin: 15px 0;
	font-size: 18pt;
	line-height: 22pt;
}
p {
	margin-bottom: 15px;
}
a {
	text-decoration: none;
	color: var(--color-accent);
}
a:hover, a:focus {
	text-decoration: underline;
}
ol, ul {
	list-style-position: inside;
	margin: 0 0 15px 15px;
}
ol ul, ul ul, ol ol, ul ol {
	margin-bottom: 0;
}
li {
	padding: 4px 0;
}
hr {
	display: block;
	border-bottom: 1px solid var(--color-accent);
	margin-bottom: 20px;
}
img {
	max-width: 100%;
}

/********************************************************************** Формы */
form {
	margin: 0 0 15px 0;
}
label {
	display: block;
	padding: 0 0 3px 5px;
	color: var(--color-muted);
}
input[type="text"], input[type="number"], input[type="password"], button, textarea, select, .btn {
	border: 1px solid var(--color-border);
	font-family: var(--font-body);
	font-size: 12pt;
}
input[type="radio"], input[type="checkbox"] {
	accent-color: var(--color-accent);
}
input[type="text"]:hover, input[type="text"]:focus,
input[type="number"]:hover, input[type="number"]:focus,
input[type="password"]:hover, input[type="password"]:focus,
button:hover, button:focus,
textarea:hover, textarea:focus,
select:hover, select:focus,
.btn:hover, .btn:focus {
	border-color: var(--color-accent);
	box-shadow: 0 0 5px var(--color-glow);
	text-decoration: none;
}
input[type="text"], input[type="number"], input[type="password"] {
	padding: 8px 10px;
	width: 100%;
}
button, .btn {
	padding: 8px 20px;
	background: var(--color-surface);
	color: #000;
	cursor: pointer;
	display: inline-block;
	text-decoration: none;
	margin: 0 0 5px 0;
}
textarea {
	height: 150px;
	padding: 10px;
	width: 100%;
}
select {
	padding: 7px 10px;
}

/* Строка формы: подпись и поле */
.field {
	margin: 0 0 15px 0;
}
/* Поле-ловушка для ботов: люди его не видят и не заполняют */
.field--trap {
	display: none;
}

/*
 * Каркас страницы: блоки совпадают с views/header.php, footer.php и частями views/parts/header.*, footer.*
 */

/************************************************ Страница (header.php, footer.php) */
.page {
	width: 100%;
	max-width: 1200px;
	min-width: 320px;
	padding: 10px;
	margin: 0 auto;
}

/***************************************************** Верх шапки (header.top.php) */
.header {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.header__language {
	border: 1px solid var(--color-border);
	display: inline-block;
	margin: 2px;
}
.header__language:hover, .header__language:active, .header__language:focus {
	border-color: var(--color-accent);
	box-shadow: 0 0 5px var(--color-glow);
}
.header__language--active {
	border-color: #993333;
	box-shadow: 0 0 5px rgba(204, 0, 0, .5);
}
.header__icon {
	height: 16px;
	width: 21px;
	display: block;
}
.header__auth {
	text-align: right;
	margin-bottom: 5px;
	font-size: 10.5pt;
}
/* Кнопка «Выход» (POST-форма) выглядит как ссылка */
.header__logout {
	display: inline;
	margin: 0;
}
.header__logout-button {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	color: var(--color-accent);
	cursor: pointer;
}
.header__logout-button:hover, .header__logout-button:focus {
	text-decoration: underline;
}

/************************************************** Главное меню (header.menu.php) */
.menu {
	margin: 0 0 8px 0;
	border-bottom: 3px solid var(--color-accent);
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
}
.menu__item {
	display: inline-block;
	background: none;
	padding: 10px 13px;
}
.menu__item:hover,
.menu__item:focus,
.menu__item:active,
.menu__item--active {
	background: var(--color-accent);
	color: #ffffff;
	text-decoration: none;
}
.menu__telegram {
	display: inline-block;
	width: 25px;
	height: 25px;
	margin: 4px 0 4px 3px;
	background: var(--img-telegram);
	background-size: cover;
	border-radius: 4px;
	vertical-align: middle;
}
.menu__telegram:hover, .menu__telegram:focus, .menu__telegram:active {
	box-shadow: 0 0 5px rgba(0, 0, 0, .3);
}

/************************************************ Меню сервисов (header.menu.php) */
.submenu {
	margin: 0 0 25px 0;
}
.submenu__label {
	display: inline-block;
	margin-right: 5px;
	font-size: 11pt;
}
.submenu__item {
	display: inline-block;
	font-size: 11pt;
}
.submenu__item:hover,
.submenu__item:focus,
.submenu__item:active {
	text-decoration: underline;
}
.submenu__item--active {
	font-weight: bold;
}

/*********************************************** Хлебные крошки (header.breadcrumbs.php) */
.breadcrumb {
	margin: 0 0 15px 0;
}
.breadcrumb__link {
	display: inline-block;
	padding: 5px 3px;
	text-decoration: none;
}
.breadcrumb__link:hover, .breadcrumb__link:focus, .breadcrumb__link:active {
	text-decoration: underline;
}
.breadcrumb__separator {
	display: inline-block;
	padding: 5px 3px;
}
.breadcrumb__current {
	display: inline-block;
	padding: 5px 3px;
}

/************************************************ Сообщения (header.messages.php) */
.alert {
	padding: 10px;
	margin-bottom: 10px;
}
.alert--success {
	border: 1px solid var(--color-border);
	color: var(--color-accent);
}
.alert--errors {
	border: 1px solid var(--color-danger-border);
	color: var(--color-danger);
}

/************************************ Предпросмотр шаблона сайта (theme.preview.php) */
.theme-preview {
	padding: 8px 10px;
	margin: 10px 0;
	border: 1px dashed var(--color-danger-border);
	color: var(--color-danger);
}

/******************************************************* Подвал (footer.bottom.php) */
.footer {
	border-top: 3px solid var(--color-accent);
	padding: 20px 0;
	margin-top: 25px;
}
/* Подписка, оферта, соглашение, контакты */
.footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
	margin-bottom: 8px;
}
/* Пометка «неофициальный фан-сайт» и товарные знаки; отступ снизу — чтобы закреплённые кнопки не закрывали текст */
.footer__disclaimer {
	margin-top: 8px;
	padding-bottom: 40px;
	font-size: 0.85em;
	opacity: 0.75;
}
/* Кнопки «наверх» и «тёмная тема» — закреплены в углу экрана */
.footer__button {
	display: block;
	position: fixed;
	bottom: 10px;
	padding: 6px;
	border-radius: 10px;
	cursor: pointer;
	font-size: 26pt;
	background: rgba(51, 153, 51, .1);
	color: var(--color-accent);
	z-index: 9999999;
	text-decoration: none;
}
.footer__button:hover, .footer__button:focus, .footer__button:active {
	text-decoration: none;
}
.footer__button--top {
	right: 10px;
}
.footer__button--theme {
	right: 50px;
}

/******************************************************************** Адаптив */
@media screen and (max-width: 1200px) {
	.menu {
		justify-content: space-around;
	}
}

/*
 * Компоненты — блоки, которые встречаются на нескольких страницах. Имена — по сути блока, а не по странице.
 */

/********************************** Карточки растений, зомби, костюмов (views/parts/card.php) */
.card-list {
	margin: 0 0 25px 0;
}
.card {
	display: inline-block;
	border: 1px solid #fff;
	margin: 5px;
	border-radius: 18px;
	position: relative;
	text-decoration: none;
}
.card:hover, .card:focus, .card:active {
	border-color: var(--color-accent);
	box-shadow: 0 0 10px rgba(0, 204, 0, .6);
	text-decoration: none;
}
.card__img {
	display: block;
	width: 96px;
	height: 96px;
	border-radius: 18px;
}
/* Значок в углу — семейство растения */
.card__icon {
	display: block;
	position: absolute;
	top: -9px;
	right: -9px;
	width: 30px;
	height: 30px;
}
/* Подпись поверх картинки — количество зомби на уровне */
.card__label {
	position: absolute;
	top: 35px;
	left: 0;
	width: 100%;
	text-align: center;
	font-weight: bold;
	color: rgba(255, 255, 255, .8);
	font-size: 40px;
	text-shadow: 0px 0px 2px rgba(0, 0, 0, .2);
}
.card:hover .card__label, .card:focus .card__label, .card:active .card__label {
	color: #fff;
	text-shadow: 0px 0px 4px rgba(0, 0, 0, .3);
}
/* Зомби в шаре хомяка (арена) */
.card--hamster-ball, .card--hamster-ball:hover, .card--hamster-ball:focus, .card--hamster-ball:active {
	border-color: #333399;
	box-shadow: 0 0 10px rgba(0, 0, 204, .6);
}

/***************************************************** Поле выбора файла (формы) */
.file {
	position: relative;
	display: inline-block;
}
.file__input {
	position: absolute;
	z-index: -1;
	opacity: 0;
	display: block;
	width: 0;
	height: 0;
}

/********************************************* Постраничная навигация (Controllers\Paginator) */
.paginator {
	display: block;
	text-align: center;
	margin: 10px 0;
}
.paginator__link {
	display: inline-block;
	padding: 6px;
	margin: 2px;
}
.paginator__link--active {
	font-weight: bold;
	color: var(--color-text);
}
.paginator__ellipsis {
	display: inline-block;
	padding: 4px;
	margin: 0 2px;
}

/********************************************** Видео YouTube: превью, по клику — плеер */
.movie {
	position: relative;
	height: 0;
	padding-top: 51%;
	width: 90%;
	margin: 0 auto 15px auto;
}
.movie__poster, .movie__frame {
	position: absolute;
	top: 0;
	left: 0;
	border: 0;
	width: 100%;
	height: 100%;
	cursor: pointer;
}
.movie__icon {
	width: 100px;
	height: 70px;
	background-color: #FF0000;
	border-radius: 15px;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50px, -35px);
	cursor: pointer;
	transition: background-color 0.3s;
}
.movie__icon:hover {
	background-color: #cc0000;
}
.movie__icon::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	border-style: solid;
	border-width: 15px 0 15px 25px;
	border-color: transparent transparent transparent #ffffff;
}

/***************************************** Код уровня или арены (JSON), открывается кнопкой */
.code-view {
	display: none;
}
.code-view--open {
	display: block;
}

/**************************************** Увеличение картинки по клику (картинки .js-zoom) */
.image-modal {
	display: none;
	position: fixed;
	z-index: 1;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0, 0, 0, .5);
	animation-name: fade-in;
	animation-duration: 0.3s;
	justify-content: center;
	align-items: center;
}
.image-modal__content {
	position: relative;
	background-color: #fff;
	max-width: 800px;
	margin: 0 10px;
	border: 1px solid var(--color-accent);
	box-shadow: 0 0 15px 0 rgba(0, 0, 0, .3);
	animation-name: fade-in;
	animation-duration: 0.3s;
	display: inline-block;
}
.image-modal__img {
	max-width: 100%;
	max-height: 96vh;
	display: block;
}
.image-modal__close {
	position: absolute;
	top: 12px;
	right: 10px;
	font-size: 28px;
	font-weight: bold;
	color: #000;
}
.image-modal__close:hover, .image-modal__close:focus, .image-modal__close:active {
	color: var(--color-accent);
	text-decoration: none;
	cursor: pointer;
}
@keyframes fade-in {
	from {opacity: 0}
	to {opacity: 1}
}

/*************************************************** Диалог (редактор сохранений) */
.modal {
	display: none;
	position: fixed;
	z-index: 1;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0, 0, 0, .5);
	animation-name: fade-in;
	animation-duration: 0.3s;
}
.modal__content {
	display: inline-block;
	position: relative;
	background-color: #fff;
	margin: auto;
	max-width: 500px;
	border: 1px solid var(--color-accent);
	box-shadow: 0 0 15px 0 rgba(0, 0, 0, .3);
	animation-name: fade-in;
	animation-duration: 0.3s;
	justify-content: center;
	align-items: center;
}
.modal__header {
	padding: 10px 35px 10px 10px;
	border-bottom: 1px solid var(--color-border);
	position: relative;
}
.modal__title {
	font-size: 16pt;
	line-height: 20pt;
	font-weight: bold;
	color: var(--color-accent);
	text-shadow: 1px 1px 0px rgba(0, 0, 0, .1);
}
.modal__close {
	position: absolute;
	top: 12px;
	right: 10px;
	font-size: 28px;
	font-weight: bold;
	color: #000;
}
.modal__close:hover, .modal__close:focus, .modal__close:active {
	color: var(--color-accent);
	text-decoration: none;
	cursor: pointer;
}
.modal__body {
	padding: 10px 10px 10px 116px;
	min-height: 116px;
	position: relative;
}
.modal__preview {
	display: block;
	position: absolute;
	top: 10px;
	left: 10px;
	border: 1px solid var(--color-accent);
	border-radius: 16px;
	width: 96px;
	height: 96px;
}
.modal__footer {
	padding: 10px;
	border-top: 1px solid var(--color-border);
	clear: both;
	text-align: center;
}
.modal__button {
	margin: 0 3px;
}

/***************************** Оценка звёздами: рейтинг и сложность уровня (custom.php) */
.vote {
	display: inline-block;
	margin: 0 10px;
	vertical-align: middle;
}
.vote__text {
	margin-bottom: 5px;
}
.vote__stars {
	overflow: hidden;
	zoom: 1;
	position: relative;
}
/* Радиокнопки скрыты, звёзды — подписи к ним; справа налево, чтобы подсвечивать звёзды до наведённой */
.vote__radio {
	opacity: 0;
	position: absolute;
	top: 0;
	z-index: 0;
}
.vote__star {
	float: right;
	cursor: pointer;
	position: relative;
	z-index: 1;
}
.vote__stars--rating .vote__radio, .vote__stars--rating .vote__star {
	height: 20px;
	width: 22px;
}
.vote__stars--rating .vote__star {
	background: var(--img-star) no-repeat 0 0;
	margin-right: 5px;
}
.vote__stars--rating .vote__star:hover, .vote__stars--rating .vote__star:hover ~ .vote__star {
	background-position: 0 -20px;
}
.vote__stars--complexity .vote__radio, .vote__stars--complexity .vote__star {
	height: 21px;
	width: 12px;
}
.vote__stars--complexity .vote__star {
	background: var(--img-complexity) no-repeat 0 0;
	margin-right: 8px;
}
.vote__stars--complexity .vote__star:hover, .vote__stars--complexity .vote__star:hover ~ .vote__star {
	background-position: 0 -21px;
}
/* Выбранное значение в форме отзыва: звезда и все левее неё */
.vote__stars--rating .vote__radio:checked ~ .vote__star {
	background-position: 0 -20px;
}
.vote__stars--complexity .vote__radio:checked ~ .vote__star {
	background-position: 0 -21px;
}

/***************************** Метки и значки (отзывы на уровни, каталог) */
.tag {
	display: inline-block;
	margin: 0 4px 4px 0;
	padding: 1px 8px;
	border: 1px solid var(--color-border);
	border-radius: 10px;
	font-size: 9pt;
	white-space: nowrap;
}
a.tag {
	text-decoration: none;
}
.badge {
	display: inline-block;
	padding: 0 6px;
	border-radius: 4px;
	background: var(--color-head-bg);
	border: 1px solid var(--color-border);
	font-size: 8pt;
	vertical-align: middle;
}
.badge--premium {
	border-color: #d4a017;
	color: #a07800;
}
.badge--passed {
	color: var(--color-accent);
	font-weight: bold;
}
/* Кнопка, похожая на ссылку */
.btn--link, button.btn--link {
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	color: var(--color-accent);
	cursor: pointer;
	text-decoration: underline;
	font: inherit;
}

/*************************** Навигация по разделам длинной страницы (views/parts/section-nav.php) */
.section-nav {
	margin: 0 0 20px 0;
	padding: 8px 12px;
	border: 1px solid var(--color-border);
	border-radius: 8px;
}
.section-nav__title {
	cursor: pointer;
	font-family: var(--font-head);
	font-size: 16pt;
	line-height: 22pt;
	color: var(--color-accent);
}
.section-nav[open] > .section-nav__title {
	margin-bottom: 4px;
}
.section-nav__count {
	font-size: 11pt;
	color: var(--color-muted);
}
.section-nav__group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px;
	margin: 5px 0;
}
.section-nav__group-title {
	margin-right: 3px;
	font-weight: bold;
}
.section-nav__group-title::after {
	content: ":";
}
.section-nav__link {
	display: inline-block;
	padding: 2px 9px;
	font-size: 10.5pt;
	line-height: 15pt;
	border: 1px solid var(--color-border);
	border-radius: 12px;
}
.section-nav__link:hover, .section-nav__link:focus {
	border-color: var(--color-accent);
	box-shadow: 0 0 5px var(--color-glow);
	text-decoration: none;
}

/***************************** Значок подписчика у имени (user_badge(), MON-002) */
.user-badge {
	display: inline-block;
	width: 20px;
	height: 20px;
	margin: 0 2px;
	object-fit: contain;
	vertical-align: middle;
}
.user-badge--star {
	width: auto;
	height: auto;
	color: #e0a800;
	font-size: 14pt;
	line-height: 1;
}

/* Поиск в выпадающем списке (statics/js/select-search.js): окно под select, в первой строке — поле поиска */
.select-search {
	position: absolute;
	z-index: 1000;
	box-sizing: border-box;
	max-width: calc(100vw - 20px);
	padding: 5px;
	background: var(--color-surface);
	color: var(--color-text);
	border: 1px solid var(--color-accent);
	box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}
.select-search__input {
	box-sizing: border-box;
	width: 100%;
	padding: 6px 8px;
	border: 1px solid var(--color-border);
	background: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: 12pt;
}
.select-search__input:focus {
	outline: none;
	border-color: var(--color-accent);
}
.select-search__list {
	list-style: none;
	margin: 5px 0 0 0;
	padding: 0;
	max-height: 300px;
	overflow-y: auto;
}
.select-search__item, .select-search__empty {
	padding: 5px 8px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.select-search__item {
	cursor: pointer;
}
.select-search__item--selected {
	font-weight: bold;
}
.select-search__item--active, .select-search__item:hover {
	background: var(--color-hover);
}
.select-search__empty {
	color: var(--color-muted);
}
.tag--active {
	border-color: var(--color-accent);
	background: var(--color-head-bg);
	font-weight: bold;
}
/* Метки новостей в строке списка (views/items.php) — не раздвигают строки */
.items__list .tag {
	margin: 0 0 0 4px;
	vertical-align: 1px;
}

/*
 * Классы из HTML-контента в БД (описания растений, зомби, перков, страницы, ссылки модов) и из настроек (реклама).
 * Имена не менять: они записаны в тысячах записей. Проверка использования — docs/project-audit/FRONTEND.md.
 */

/*********************************** Таблицы уровней: растения, перки, зомби, страницы, опросы */
.table-scroll {
	overflow-x: auto;
	white-space: nowrap;
	-webkit-overflow-scrolling: touch;
	max-width: 100%;
	margin-bottom: 20px;
}
.table {
	width: 100%;
	border-collapse: collapse;
	white-space: normal;
}
.table th, .table td {
	vertical-align: middle;
	text-align: center;
	padding: 3px;
	border: 1px solid var(--color-border);
}
.table th {
	font-weight: bold;
	background: var(--color-head-bg);
}
.table tr:hover td {
	background: var(--color-hover);
}
/* Уровни улучшения растений и перков */
.table .bronze {
	font-weight: bold;
	color: #cd7f32;
}
.table .silver {
	font-weight: bold;
	color: #c0c0c0;
}
.table .gold {
	font-weight: bold;
	color: #ffd700;
}
.table .word-break {
	word-break: break-all;
}
.table .deleted {
	color: #999;
	text-decoration: line-through;
}
/* Строка текущего пользователя в рейтинге опроса */
.table .current {
	background: rgba(0, 0, 204, .05);
}

/******************************************** Значки растений и зомби в тексте страниц */
.list__img {
	display: block;
	width: 96px;
	height: 96px;
	border-radius: 18px;
}

/****************************************************** Дни (страница «Локации») */
.days__item {
	display: inline-block;
	margin: 5px;
	border: 1px solid transparent;
	position: relative;
}
.days__item:hover, .days__item:focus, .days__item:active {
	border-color: var(--color-accent);
	box-shadow: 0 0 10px rgba(0, 204, 0, .6);
	text-decoration: none;
}

/**************************************** Дерево параметров уровней (страница с параметрами) */
.levels-params, .levels-params ul {
	list-style: none;
	margin: 0 0 0 10px;
	padding: 0 0 0 10px;
}
.levels-params ul {
	display: none;
	border-left: 1px solid #ccc;
}
.levels-params ul.open {
	display: block;
}
.levels-params li {
	margin: 5px 0;
}
.levels-params span {
	cursor: pointer;
	display: inline-block;
	padding: 3px 10px;
	border-radius: 6px;
	transition: background 0.2s;
}
.levels-params span:hover {
	background: #f0f0f0;
}
.levels-params b {
	display: inline-block;
	padding: 3px 10px;
	color: #00c;
	font-weight: normal;
}

/************************************************ Ссылки на скачивание мода (mods.link) */
.mod__link {
	display: block;
	padding: 0 4px;
	margin-bottom: 3px;
}

/************************************************************ Реклама (settings ad) */
#yandex_rtb_R-A-449919-1,
.adsbygoogle {
	margin: 20px 0;
}

/*
 * Страницы: блок = имя view (views/plants.php → .plants). Разделы — в алфавитном порядке view.
 */

/******************************************************************* 404.php */
.error-404 {
	text-align: center;
}
.error-404__img {
	display: inline-block;
	max-width: 100%;
}

/****************************************************** auth.php, auth-telegram.php */
/* Вход через Telegram — основной, по паролю — свёрнутая форма */
.auth__telegram {
	margin: 0 0 15px 0;
}
.auth__telegram-button {
	font-weight: bold;
}
.auth__hint {
	color: var(--color-muted);
}
.auth__password {
	margin: 0 0 20px 0;
}
.auth__password-toggle {
	color: var(--color-accent);
	cursor: pointer;
	margin: 0 0 10px 0;
}
.auth__status--error {
	color: var(--color-danger);
}
.auth__command {
	user-select: all;
	word-break: break-all;
}

/**************************************************************** battle.php */
/* Изменения семейств и обязательные/исключённые растения */
.battle__changes {
	margin: 0 0 25px 0;
}
.battle__changes-item {
	display: inline-block;
	border: 1px solid transparent;
	margin: 5px;
	position: relative;
	border-radius: 50%;
}
.battle__changes-img {
	display: block;
}
.battle__changes-change {
	display: block;
	position: absolute;
	bottom: 3px;
	right: 3px;
	width: 30px;
	height: 30px;
}
/* Вариант уровня, когда у недели их несколько */
.battle__variant {
	margin-top: 30px;
	padding-top: 15px;
	border-top: 1px dashed var(--color-accent);
}
/* Готовые наборы растений */
.battle__loadout-title {
	font-weight: bold;
	margin: 0 5px;
}
.battle__loadout .card-list {
	margin-bottom: 10px;
}
.battle__events {
	margin-bottom: 25px;
}

/* Карта поля арены (views/parts/battle.board.php): 5 рядов × 9 столбцов, зомби приходят справа */
.board {
	display: grid;
	grid-template-columns: repeat(9, 1fr);
	gap: 2px;
	max-width: 540px;
	margin: 0 0 10px 0;
	padding: 4px;
	border-radius: 8px;
	background: #5d8a2b;
}
.board__cell {
	position: relative;
	aspect-ratio: 1;
	border-radius: 4px;
	background: #8cc04a;
	overflow: hidden;
}
.board__cell--score-2 {
	background: #b5d36a;
}
.board__cell--score-3 {
	background: #e0d36a;
}
.board__cell--score-5 {
	background: #f0a94a;
}
.board__cell--mold {
	background-image: repeating-linear-gradient(45deg, rgba(60, 40, 90, .55) 0 4px, transparent 4px 8px);
}
.board__cell--rail {
	box-shadow: inset 6px 0 0 -3px #6b4a2b, inset -6px 0 0 -3px #6b4a2b;
}
.board__cell--power {
	outline: 3px solid;
	outline-offset: -3px;
}
.board__cell--power-alpha {
	outline-color: #e23b3b;
}
.board__cell--power-beta {
	outline-color: #3b6be2;
}
.board__cell--power-gamma {
	outline-color: #9b3be2;
}
.board__cell--power-delta {
	outline-color: #e2c23b;
}
.board__item {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	line-height: 1;
	color: #333;
	text-shadow: 0 0 2px #fff;
}
.board__item--gold {
	color: #b8860b;
}
.board__item--boost {
	color: #1f7fc0;
}
.board__item--trap {
	color: #d2401a;
}
.board__item--cart {
	font-size: 26px;
	color: #6b4a2b;
}
.board__item--puddle {
	color: #1f6fb0;
}
.board__item--gravestone_sun {
	color: #c98a00;
}
.board__item--gravestone_plantfood {
	color: #2f9a12;
}
.board__unit {
	position: absolute;
	inset: 0;
}
.board__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}
/* Замороженный зомби */
.board__unit--frozen .board__img {
	filter: saturate(.4) brightness(1.1) drop-shadow(0 0 3px #7fd4ff);
}
.board__level {
	position: absolute;
	right: 1px;
	bottom: 0;
	font-size: 11px;
	font-weight: bold;
	color: #fff;
	text-shadow: 0 0 2px #000;
}
.board-legend {
	margin: 0 0 25px 0;
	padding: 0;
	list-style: none;
}
.board-legend li {
	display: inline-flex;
	align-items: center;
	margin: 3px 15px 3px 0;
}
.board-legend__swatch {
	position: relative;
	display: inline-block;
	width: 20px;
	height: 20px;
	margin-right: 6px;
	border-radius: 4px;
}
/* Образец со значком — на цвете обычной клетки */
.board-legend__swatch--item {
	background-color: #8cc04a;
}
.board-legend__swatch .board__item {
	font-size: 14px;
}

/*************************************************************** battles.php */
.battles {
	margin: 0 0 25px 0;
}
.battles__year {
	margin-bottom: 15px;
}
.battles__year:not(:last-child) {
	padding-bottom: 15px;
	border-bottom: 1px dashed var(--color-accent);
}
.battles__item {
	display: inline-block;
	vertical-align: top;
	margin: 5px;
	padding: 3px;
	text-decoration: none;
}
.battles__item:hover, .battles__item:focus, .battles__item:active {
	text-decoration: underline;
}
/* Сезон: подпись и недели */
.battles__season {
	margin: 5px 0 10px 0;
}
.battles__season-title {
	font-family: var(--font-head);
	color: var(--color-accent);
	margin: 0 5px;
}
/* Тема недели под датой */
.battles__tag {
	display: block;
	font-size: 11px;
	color: var(--color-muted);
}
/* Арена, которая ещё не началась */
.battles__item--future {
	color: red;
}

/************************************************************ codeviewer.php */
.codeviewer__search {
	margin-bottom: 20px;
}
.codeviewer__input {
	margin: 3px;
	max-width: 200px;
}
.codeviewer__button {
	margin: 3px;
}
.codeviewer__frame {
	margin-bottom: 10px;
	display: flex;
	max-height: 100vh;
}
.codeviewer__nav {
	width: 25%;
	border-right: 1px solid var(--color-accent);
	overflow-y: scroll;
}
.codeviewer__nav-item {
	display: block;
	padding: 3px 10px;
	border-bottom: 1px solid #fff;
}
.codeviewer__nav-item:hover, .codeviewer__nav-item--active {
	background: #f9fff9;
	cursor: pointer;
	border-bottom-color: var(--color-accent);
}
.codeviewer__code {
	width: 75%;
	display: block;
	padding: 10px;
	background: #f9fff9;
	overflow-y: scroll;
}
/* Найденный текст в коде */
.codeviewer__match {
	background: #88ee88;
}

/**************************************************************** custom.php */
.custom__img {
	display: block;
	max-width: 90%;
	margin: 0 auto 20px auto;
}
.custom__icon {
	display: inline-block;
	vertical-align: top;
}
.custom__action {
	text-align: center;
}

/* Отзывы на уровень (REV-001) */
.reviews {
	margin-top: 25px;
}
.review-form {
	margin-bottom: 20px;
	padding: 10px 15px;
	border: 1px solid var(--color-border);
	border-radius: 8px;
}
.review-form textarea {
	width: 100%;
	box-sizing: border-box;
}
.review-form__option {
	display: inline-block;
	margin-right: 12px;
	font-weight: normal;
}
.review-form__hint {
	color: var(--color-muted);
	font-size: 9pt;
}
.review-form__delete {
	margin-top: 8px;
}
.review {
	padding: 10px 0;
	border-bottom: 1px dashed var(--color-accent);
}
.review:target {
	background: var(--color-head-bg);
}
.review__head {
	margin-bottom: 5px;
}
.review__name {
	margin-right: 6px;
}
.review__stars {
	color: #e0a800;
	letter-spacing: 1px;
	white-space: nowrap;
}
.review__complexity {
	white-space: nowrap;
}
.review__date, .review__edited {
	color: var(--color-muted);
	font-size: 9pt;
}
.review__text {
	overflow-wrap: anywhere;
}
.review__img {
	display: block;
	max-width: 100%;
	max-height: 360px;
	margin: 8px 0;
}
.review__actions {
	margin-top: 5px;
	font-size: 9pt;
}
.review__action {
	display: inline-block;
	margin-right: 12px;
}
.review__report, .review__helpful {
	color: var(--color-muted);
}
.review__reply {
	margin: 8px 0 0 20px;
	padding: 6px 10px;
	border-left: 3px solid var(--color-accent);
	background: var(--color-head-bg);
}
.review__reply-form {
	margin: 8px 0 0 20px;
}
.review__reply-form textarea {
	width: 100%;
	box-sizing: border-box;
}

/* Свежие отзывы (главная, каталог, страница автора) */
.reviews-latest {
	margin-bottom: 15px;
}
.reviews-latest__item {
	padding: 6px 0;
	border-bottom: 1px dashed var(--color-border);
}
.reviews-latest__level {
	font-weight: bold;
	margin-right: 6px;
}
.reviews-latest__text {
	overflow-wrap: anywhere;
}

/* Страница автора */
.author__stats {
	margin-bottom: 15px;
}

/*************************************************************** customs.php */
.customs__filter {
	margin-bottom: 5px;
}
.customs__filter--author {
	max-width: 200px;
}
.customs__item {
	margin-top: 7px;
	padding-bottom: 7px;
	border-bottom: 1px dashed var(--color-accent);
}
/* Картинка слева обтекается текстом — после записи обтекание сбрасывается */
.customs__item::after, .mods__item::after, .others__item::after, .perks__item::after {
	content: "";
	display: block;
	clear: both;
}
.customs__prev {
	float: left;
	margin: 0 10px 3px 0;
	border: 1px solid #fff;
	max-width: 35%;
}
.customs__tags {
	margin-top: 4px;
}
.customs__name {
	margin-bottom: 5px;
	font-size: 12pt;
	font-weight: bold;
	color: var(--color-accent);
}
.customs__author {
	margin-bottom: 5px;
}
.customs__info {
	display: inline-block;
	margin: 0 10px 5px 0;
}
.customs__icon {
	display: inline-block;
	vertical-align: top;
	margin-right: 1px;
}

/**************************************************************** editor.php */
.editor {
	margin: 0 0 25px 0;
}
.editor__tabs {
	margin-bottom: 15px;
	border-bottom: 1px solid var(--color-accent);
}
.editor__tab {
	display: inline-block;
	top: 1px;
	padding: 8px 14px;
	border: 1px solid var(--color-accent);
	position: relative;
}
.editor__tab:hover, .editor__tab:focus, .editor__tab:active {
	cursor: pointer;
	background: #eee;
}
.editor__tab--active {
	border-bottom-color: #fff;
}
.editor__content {
	display: none;
}
.editor__content--active {
	display: block;
}
.editor__list {
	margin-bottom: 20px;
}
.editor__summary {
	margin: 0 0 20px 0;
	padding-left: 20px;
}
.editor__item {
	margin: 0 0 10px 0;
}
.editor__icon {
	width: 25px;
	height: 25px;
	display: inline-block;
	margin: 0 10px 0 0;
	vertical-align: middle;
}
/* Растение, костюм или зомби: красная рамка — не открыт, зелёная — открыт */
.editor__img {
	display: inline-block;
	border: 1px solid #993333;
	box-shadow: 0 0 10px rgba(204, 0, 0, 1);
	cursor: pointer;
	width: 96px;
	height: 96px;
	margin: 5px;
	border-radius: 16px;
}
.editor__img--active {
	border-color: var(--color-accent);
	box-shadow: 0 0 10px rgba(0, 204, 0, 1);
}
.editor__btns {
	text-align: center;
	margin-bottom: 20px;
}
/* Аккордеон со списком иконок: кнопки «открыть все» — над ним */
.editor__fold {
	margin-bottom: 20px;
}
.editor__fold-title {
	cursor: pointer;
	padding: 8px 0;
	color: var(--color-accent);
}
.editor__fold .editor__list {
	margin: 10px 0 0 0;
}
.editor__review {
	display: none;
}
.editor__review--open {
	display: block;
}

/************************************************************** families.php */
.families {
	margin: 0 0 25px 0;
}
.families__list {
	margin-bottom: 15px;
}
.families__list:not(:last-child) {
	border-bottom: 1px dashed var(--color-accent);
}

/****************************************************************** home.php */
.home__news {
	margin: 0 0 25px 0;
}
.home__news-item {
	margin-bottom: 15px;
}
.home__news-item:not(:last-child) {
	padding-bottom: 15px;
	border-bottom: 1px dashed var(--color-accent);
}
.home__news-date {
	font-weight: normal;
}

/***************************************************************** level.php */
.level__img {
	width: 90%;
	display: block;
	margin: 0 auto 15px auto;
}
/* Уровень выключен в игре */
.level__disabled {
	color: var(--color-danger);
}

/**************************************************************** levels.php */
.levels {
	margin: 0 0 25px 0;
}
.levels__list {
	margin-bottom: 15px;
}
.levels__list:not(:last-child) {
	padding-bottom: 15px;
	border-bottom: 1px dashed var(--color-accent);
}
.levels__item {
	display: inline-block;
	margin: 5px;
	padding: 3px;
	text-decoration: none;
}
.levels__item:hover, .levels__item:focus, .levels__item:active {
	text-decoration: underline;
}

/******************************************************************* map.php */
.map__summary::after {
	content: "";
	display: block;
	clear: both;
}
.map__img {
	float: left;
	margin: 0 10px 5px 0;
}
.map__days {
	margin: 0 0 25px 0;
}
.map__day {
	display: inline-block;
	margin: 5px;
	border: 1px solid transparent;
	position: relative;
}
.map__day:hover, .map__day:focus, .map__day:active {
	border-color: var(--color-accent);
	box-shadow: 0 0 10px rgba(0, 204, 0, .6);
	text-decoration: none;
}
.map__day-img {
	display: block;
	max-width: 150px;
}
.map__day-name {
	position: absolute;
	top: 30px;
	left: 0;
	width: 100%;
	text-align: center;
	font-weight: bold;
	color: rgba(255, 255, 255, .8);
	font-size: 20px;
	text-shadow: 0px 0px 2px rgba(0, 0, 0, .2);
}
.map__day:hover .map__day-name, .map__day:focus .map__day-name, .map__day:active .map__day-name {
	color: #fff;
	text-shadow: 0px 0px 4px rgba(0, 0, 0, .3);
}

/****************************************************************** maps.php */
.maps {
	margin: 0 0 25px 0;
}
.maps__item {
	border: 1px solid #fff;
	display: inline-block;
	margin: 10px;
	text-decoration: none;
}
.maps__item:hover, .maps__item:focus, .maps__item:active {
	border-color: var(--color-accent);
	box-shadow: 0 0 10px rgba(0, 204, 0, .6);
	text-decoration: none;
}
.maps__img {
	display: block;
}

/******************************************************************* mod.php */
.mod__summary::after {
	content: "";
	display: block;
	clear: both;
}
.mod__preview {
	float: left;
	margin: 0 10px 5px 0;
}
.mod__links {
	margin-bottom: 20px;
}
.mod__images {
	text-align: center;
}
.mod__image {
	object-fit: cover;
	height: 120px;
	display: inline-block;
	margin: 5px;
	cursor: pointer;
}

/****************************************************************** mods.php */
.mods {
	margin: 0 0 25px 0;
}
.mods__item {
	margin-bottom: 15px;
}
.mods__item:not(:last-child) {
	padding-bottom: 15px;
	border-bottom: 1px dashed var(--color-accent);
}
.mods__img {
	float: left;
	margin: 0 10px 5px 0;
	padding: 5px;
	text-decoration: none;
}

/**************************************************************** others.php */
.others {
	margin: 0 0 25px 0;
}
.others__item {
	margin-bottom: 15px;
}
.others__item:not(:last-child) {
	padding-bottom: 15px;
	border-bottom: 1px dashed var(--color-accent);
}
.others__img {
	float: left;
	margin: 0 10px 5px 0;
	border: 1px solid #fff;
}

/***************************************************************** perks.php */
.perks {
	margin: 0 0 25px 0;
}
.perks__item {
	margin-bottom: 15px;
}
.perks__item:not(:last-child) {
	padding-bottom: 15px;
	border-bottom: 1px dashed var(--color-accent);
}
.perks__img {
	float: left;
	margin: 0 10px 5px 0;
	border: 1px solid #fff;
}
.perks__toggle {
	display: block;
	margin-bottom: 10px;
}
.perks__table {
	display: none;
}
.perks__toggle--open + .perks__table {
	display: block;
}

/***************************************************************** plant.php */
.plant__preview {
	max-width: 30%;
	height: 190px;
	float: left;
	margin: 0 20px 5px 0;
	display: flex;
	align-content: center;
	justify-content: center;
}
.plant__img {
	object-fit: contain;
	cursor: pointer;
}
.plant__family-icon {
	width: 30px;
	vertical-align: middle;
}

/**************************************************************** plants.php */
.plants {
	margin: 0 0 25px 0;
}
.plants__list {
	margin-bottom: 15px;
}
.plants__list:not(:last-child) {
	border-bottom: 1px dashed var(--color-accent);
}

/*************************************************************** surveys.php */
.surveys__auth {
	text-align: center;
	font-size: 24px;
	line-height: 30px;
	padding: 40px 0;
}
.surveys__item {
	padding: 10px 0;
	margin-bottom: 10px;
	border-bottom: 1px solid var(--color-accent);
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: space-between;
	align-items: center;
}
/* Плитка с числом: время, количество вопросов, баллы */
.surveys__cell {
	border-radius: 5px;
	background: #f9f9f9;
	padding: 10px;
	width: 150px;
	text-align: center;
}
.surveys__label {
	display: inline;
}
/* Картинка вопроса — в своём размере, но не шире блока */
.surveys__image {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto 15px auto;
}
.surveys__text {
	margin-bottom: 10px;
}
.surveys__time {
	color: #ccc;
	font-weight: bold;
	font-size: 28px;
	line-height: 34px;
}

/**************************************************************** zombie.php */
.zombie__preview {
	max-width: 30%;
	height: 190px;
	float: left;
	margin: 0 20px 5px 0;
	display: flex;
	align-content: center;
	justify-content: center;
}
.zombie__img {
	object-fit: contain;
	cursor: pointer;
}

/*************************************************************** zombies.php */
.zombies {
	margin: 0 0 25px 0;
}
.zombies__list {
	margin-bottom: 15px;
}
.zombies__list:not(:last-child) {
	border-bottom: 1px dashed var(--color-accent);
}

/******************************************************************** Адаптив */
@media screen and (max-width: 600px) {
	.plant__preview, .zombie__preview {
		max-width: 90%;
		height: auto;
		max-height: 250px;
		float: none;
		margin: 0 auto 15px auto;
		display: flex;
	}
}

/*
 * Тёмная тема: класс dark у body (кнопка в подвале, выбор хранится в localStorage).
 * Переменные — те же, что в :root (base.css); ниже — то, что не выражено переменными.
 */
body.dark {
	--color-text: #ddd;
	--color-bg: #222;
	--color-surface: #444;
	--color-hover: #444;
	background: #222;
	color: #ddd;
}
.dark input:-webkit-autofill,
.dark input:-webkit-autofill:hover,
.dark input:-webkit-autofill:focus,
.dark input:-webkit-autofill:active {
    -webkit-background-clip: text;
    -webkit-text-fill-color: #ffffff;
    transition: background-color 5000s ease-in-out 0s;
}
.dark .card,
.dark .maps__item,
.dark .customs__prev,
.dark .perks__img,
.dark .others__img {
	border-color: #222;
}
.dark .card:hover, .dark .card:focus, .dark .card:active,
.dark .maps__item:hover, .dark .maps__item:focus, .dark .maps__item:active,
.dark .customs__prev:hover, .dark .customs__prev:focus, .dark .customs__prev:active {
	border-color: #339933;
}
.dark input[type="text"],
.dark input[type="number"],
.dark input[type="password"],
.dark button,
.dark textarea,
.dark select,
.dark .btn {
	background: #444;
	color: #ddd;
}

.dark .paginator__link--active {
    color: #45CC45;
}

.dark .codeviewer__code,
.dark .pell-actionbar,
.dark .codeviewer__nav-item:hover, .dark .codeviewer__nav-item--active,
.dark .table tr:hover td {
	background: #444;
}

.dark .image-modal__content {
	background: #222;
}

.dark .editor__tab--active {
	border-bottom-color: #222;
}
.dark .editor__tab:hover, .dark .editor__tab:focus, .dark .editor__tab:active {
	background: #444;
}
.dark .modal__content {
	background: #222;
}

.dark .le-modal__content,
.dark .le-code,
.dark .le-text[type=text],
.dark .le-table th {
	background: #222;
}
.dark .le-table tr:hover td,
.dark .le-button {
	background: #444;
    color: #ddd;
}
.dark .le-lawn__item,
.dark .le-mower__item,
.dark .le-plant__item,
.dark .le-zombie__item,
.dark .le-familie__item {
	border-color: #222;
}
.dark .le-lawn__item:hover, .dark .le-lawn__item:focus, .dark .le-lawn__item:active,
.dark .le-mower__item:hover, .dark .le-mower__item:focus, .dark .le-mower__item:active,
.dark .le-plant__item:hover, .dark .le-plant__item:focus, .dark .le-plant__item:active,
.dark .le-zombie__item:hover, .dark .le-zombie__item:focus, .dark .le-zombie__item:active,
.dark .le-familie__item:hover, .dark .le-familie__item:focus, .dark .le-familie__item:active {
	border-color: #339933;
}
.dark .le-modal__close {
    color: #ddd;
}
.dark .le-img-add {
	border-color: rgba(51, 153, 51, .8);
	color: rgba(51, 153, 51, .8);
}
.dark .le-img--selected {
	border-color: #f33;
	box-shadow: 0 0 10px #f00;
}

.dark .hljs {
	display: block;
	overflow-x: auto;
	padding: 0.5em;
	background: #282a36;
}
.dark .hljs-built_in,
.dark .hljs-selector-tag,
.dark .hljs-section,
.dark .hljs-link {
	color: #8be9fd;
}
.dark .hljs-keyword {
	color: #ff79c6;
}
.dark .hljs,
.dark .hljs-subst {
	color: #f8f8f2;
}
.dark .hljs-title,
.dark .hljs-attr,
.dark .hljs-meta-keyword {
	font-style: italic;
	color: #50fa7b;
}
.dark .hljs-string,
.dark .hljs-meta,
.dark .hljs-name,
.dark .hljs-type,
.dark .hljs-symbol,
.dark .hljs-bullet,
.dark .hljs-addition,
.dark .hljs-variable,
.dark .hljs-template-tag,
.dark .hljs-template-variable {
	color: #f1fa8c;
}
.dark .hljs-comment,
.dark .hljs-quote,
.dark .hljs-deletion {
	color: #6272a4;
}
.dark .hljs-keyword,
.dark .hljs-selector-tag,
.dark .hljs-literal,
.dark .hljs-title,
.dark .hljs-section,
.dark .hljs-doctag,
.dark .hljs-type,
.dark .hljs-name,
.dark .hljs-strong {
	font-weight: bold;
}
.dark .hljs-literal,
.dark .hljs-number {
	color: #bd93f9;
}
.dark .hljs-emphasis {
	font-style: italic;
}

.dark .levels-params span:hover {
	color: #333;
}
.dark .levels-params b {
	color: #99f;
}
.dark .surveys__cell {
	background: #333;
}

/* Модификатор сильнее общих правил .dark .card */
.dark .card--hamster-ball, .dark .card--hamster-ball:hover, .dark .card--hamster-ball:focus, .dark .card--hamster-ball:active {
	border-color: #333399;
}

/************************************************************ Панель управления */
/* Только переменные из :root (base.css) — при смене дизайна сайта админка меняется вместе с ним (ADR-008) */
.admin {
	display: grid;
	grid-template-columns: 230px minmax(0, 1fr);
	gap: 20px;
	align-items: start;
	margin-bottom: 20px;
}
.admin__nav {
	border: 1px solid var(--color-border);
	padding: 10px 0;
	position: sticky;
	top: 10px;
}
.admin__nav-group {
	padding: 8px 15px 4px;
	font-size: 9pt;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: var(--color-muted);
}
.admin__nav-link {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	padding: 5px 15px;
	font-size: 10.5pt;
	line-height: 14pt;
	border-left: 3px solid transparent;
}
.admin__nav-link:hover, .admin__nav-link:focus {
	background: var(--color-head-bg);
	text-decoration: none;
}
.admin__nav-link.active {
	border-left-color: var(--color-accent);
	background: var(--color-head-bg);
	font-weight: bold;
}
.admin__content {
	min-width: 0;
}
.admin-badge {
	display: inline-block;
	white-space: nowrap;
	min-width: 20px;
	padding: 0 6px;
	border-radius: 10px;
	background: var(--color-accent);
	color: var(--color-surface);
	font-size: 9pt;
	line-height: 16pt;
	text-align: center;
	font-weight: bold;
}
.admin-badge--danger {
	background: var(--color-danger);
}
.admin-muted {
	color: var(--color-muted);
	font-size: 10pt;
}

/* Панель фильтров над списком */
.admin-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin: 0 0 15px 0;
}
.admin-toolbar input[type="text"] {
	width: auto;
	flex: 1 1 200px;
}
.admin-toolbar button, .admin-toolbar .btn, .admin-actions button, .admin-actions .btn {
	margin: 0;
}
.admin-toolbar__right {
	margin-left: auto;
}

/* Таблицы: поверх .table сайта */
.admin-table td, .admin-table th {
	text-align: left;
	padding: 5px 8px;
}
.admin-table td.num, .admin-table th.num {
	text-align: right;
	white-space: nowrap;
}
.admin-table img {
	max-height: 40px;
	vertical-align: middle;
}

/* Форма */
.admin-form {
	max-width: 900px;
}
.admin-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 0 15px;
}
.admin-field {
	margin: 0 0 15px 0;
}
.admin-field--wide {
	grid-column: 1 / -1;
}
.admin-field select {
	width: 100%;
}
.admin-field textarea.html, .admin-field textarea.code {
	font-family: monospace;
	font-size: 10pt;
	line-height: 13pt;
	height: 260px;
}
.admin-field textarea.short {
	height: 70px;
}
.admin-field__hint {
	padding: 3px 0 0 5px;
	color: var(--color-muted);
	font-size: 9.5pt;
	line-height: 12pt;
}
.admin-field input[readonly], .admin-field textarea[readonly], .admin-field select[disabled] {
	opacity: .7;
}
.admin-check {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 5px;
	color: inherit;
}
.admin-section {
	border: 1px solid var(--color-border);
	padding: 15px;
	margin: 0 0 20px 0;
}
.admin-section > h2:first-child, .admin-section > h3:first-child {
	margin-top: 0;
}
.admin-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin: 15px 0;
}
.admin-actions form {
	margin: 0;
}
.btn--danger, button.btn--danger {
	border-color: var(--color-danger-border);
	color: var(--color-danger);
}
.btn--danger:hover, .btn--danger:focus {
	border-color: var(--color-danger);
}
.btn--primary, button.btn--primary {
	background: var(--color-accent);
	border-color: var(--color-accent);
	color: var(--color-bg);
}

/* Вкладки языков */
.admin-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	border-bottom: 1px solid var(--color-accent);
	margin: 0 0 15px 0;
}
.admin-tabs__tab, button.admin-tabs__tab {
	border: 1px solid transparent;
	border-bottom: none;
	background: none;
	margin: 0 0 -1px 0;
	padding: 6px 14px;
	font-size: 10.5pt;
	color: var(--color-accent);
}
.admin-tabs__tab:hover, .admin-tabs__tab:focus {
	box-shadow: none;
	border-color: var(--color-border);
}
.admin-tabs__tab.active {
	border-color: var(--color-accent);
	background: var(--color-bg);
	color: var(--color-text);
	font-weight: bold;
}
.admin-tabs__tab.empty::after {
	content: " ○";
	color: var(--color-danger);
}
.admin-tabs__panel {
	display: none;
}
.admin-tabs__panel.active {
	display: block;
}

/* Карточки на главной */
.admin-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 12px;
	margin: 0 0 20px 0;
}
.admin-card {
	border: 1px solid var(--color-border);
	padding: 12px 15px;
}
.admin-card__value {
	font-size: 20pt;
	line-height: 24pt;
	font-weight: bold;
	color: var(--color-accent);
}
.admin-card__label {
	color: var(--color-muted);
	font-size: 10pt;
}

/* Изменения в журнале: было → стало */
.admin-diff {
	width: 100%;
	border-collapse: collapse;
	font-size: 10pt;
	line-height: 13pt;
}
.admin-diff td, .admin-diff th {
	border: 1px solid var(--color-border);
	padding: 4px 6px;
	vertical-align: top;
	text-align: left;
	word-break: break-word;
}
.admin-diff th {
	background: var(--color-head-bg);
	white-space: nowrap;
}
.admin-diff__old {
	color: var(--color-danger);
	white-space: pre-wrap;
}
.admin-diff__new {
	color: var(--color-accent);
	white-space: pre-wrap;
}
.admin-diff__cell {
	max-height: 160px;
	overflow: auto;
}

/* Картинки записи */
.admin-images {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
}
.admin-images__item {
	border: 1px solid var(--color-border);
	padding: 10px;
	max-width: 280px;
}
.admin-images__item img {
	display: block;
	max-height: 140px;
	margin: 0 0 8px 0;
}

@media (max-width: 800px) {
	.admin {
		grid-template-columns: minmax(0, 1fr);
	}
	.admin__nav {
		position: static;
		display: flex;
		flex-wrap: wrap;
		padding: 5px;
	}
	.admin__nav-group {
		width: 100%;
		padding: 6px 5px 2px;
	}
	.admin__nav-link {
		border-left: none;
		border-bottom: 2px solid transparent;
		padding: 4px 8px;
	}
	.admin__nav-link.active {
		border-bottom-color: var(--color-accent);
	}
}

/* Редактор описания pell (форма уровня): рамка как у полей (.admin — сильнее pell.min.css, он подключается позже), кнопки панели без общих отступов кнопок */
.admin .pell {
	border: 1px solid var(--color-border);
	font-family: var(--font-body);
	font-size: 12pt;
}
.admin .pell:hover, .admin .pell:focus {
	border-color: var(--color-accent);
	box-shadow: 0 0 5px var(--color-glow);
	text-decoration: none;
}
.pell-button {
	padding: 0;
	margin: 0;
}

/* Предпросмотр вопросов викторины (views/admin/survey-preview.php) */
.survey-preview {
	padding: 8px 10px;
	border-radius: 6px;
	cursor: pointer;
}
.survey-preview:hover {
	background: var(--color-hover);
}
.survey-preview__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
.survey-preview__text {
	margin: 6px 0;
}
.survey-preview__image {
	display: block;
	max-width: 100%;
	max-height: 220px;
	width: auto;
	height: auto;
	margin: 6px 0;
	border: 1px solid var(--color-border);
	border-radius: 4px;
	background: #fff;
}
.survey-preview__answers {
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
}
.survey-preview__answer {
	padding: 2px 0;
}
.survey-preview__answer--correct {
	font-weight: bold;
	color: var(--color-success);
}
.survey-preview__mark {
	display: inline-block;
	width: 1.2em;
	text-align: center;
	font-weight: bold;
}
.survey-preview__mark--correct {
	color: var(--color-success);
}
.survey-preview__mark--wrong {
	color: var(--color-danger);
}
.survey-preview__separator {
	margin: 8px 0;
	border: 0;
	border-top: 1px solid var(--color-border);
}

/* Статистика ответов викторины и ответы участника (views/admin/survey-stats.php, survey-answers.php) */
.survey-stats__summary {
	width: auto;
	margin-bottom: 10px;
}
.survey-stats__total td {
	font-weight: bold;
}
.survey-stats__question {
	min-width: 260px;
}
.survey-stats__sort {
	white-space: nowrap;
	color: inherit;
}
.survey-stats__sorts {
	font-weight: normal;
	font-size: 10pt;
	white-space: nowrap;
}
.survey-stats__sorts .survey-stats__sort {
	color: var(--color-accent);
}
.survey-stats__sorts .survey-stats__sort--active {
	font-weight: bold;
}
.survey-stats__sort--active {
	color: var(--color-accent);
}
.survey-stats__pct {
	font-weight: bold;
}
.survey-stats__outcome {
	white-space: nowrap;
}
.survey-stats__outcome--correct {
	color: var(--color-success);
}
.survey-stats__outcome--wrong {
	color: var(--color-danger);
}
.survey-stats__outcome--none {
	color: var(--color-muted);
}
.admin-toolbar form {
	margin: 0;
}
/* Кнопка «Удалить» в строке списка (row_delete в Entities) */
.admin-row-delete {
	display: inline;
	margin: 0;
}
.admin-row-delete button {
	margin: 0;
	padding: 2px 8px;
	font-size: 10pt;
}

/* Таблицы уровней растений: ячейки, которые отличаются от таблицы на сайте */
.plant-levels-preview .table td[data-diff], .plant-levels-preview .table th[data-diff] {
	background: #ffe08a;
	color: #222;
}

/* Модерация отзывов на уровни (admin/reviews-list.php) */
.admin-review {
	margin-bottom: 12px;
	padding: 10px 12px;
	border: 1px solid var(--color-border);
	border-radius: 6px;
}
.admin-review__head {
	margin-bottom: 6px;
}
.admin-review__text {
	margin-bottom: 6px;
	overflow-wrap: anywhere;
}
.admin-review__img {
	max-width: 240px;
	max-height: 160px;
	margin: 4px 0;
}
.admin-review__reply {
	margin: 6px 0;
	padding-left: 10px;
	border-left: 3px solid var(--color-border);
}
.admin-review .admin-actions form {
	display: inline-block;
	margin: 6px 8px 0 0;
}
/* Слова из словаря в тексте отзыва и сам словарь */
.admin-mark {
	padding: 0 2px;
	border-radius: 3px;
	background: #ffe08a;
	color: #222;
}
.admin-mark--block {
	background: #ff9b9b;
}
.admin-review__pending {
	margin: 6px 0;
	padding: 6px 10px;
	border-left: 3px solid #ffb000;
}
.admin-words {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}
.admin-words__col {
	flex: 1 1 280px;
}
.admin-words textarea {
	width: 100%;
	box-sizing: border-box;
	font-family: monospace;
}
.admin-words .admin-actions {
	flex-basis: 100%;
}

