/* =====================================================================
   Каталог: подбор по жанрам, панель вида и сортировки, предложение жанра

   Палитра взята из шаблона: тёмный фон #222/#2b2b2b, разделители #454545,
   акцент #ff5722 (кнопки .btn-best-cat). Своих переменных не заводим,
   чтобы блок не выбивался из остального оформления.
   ===================================================================== */

/* ---------- панель над списком ---------- */

.hs-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin: 0 0 16px;
	padding: 8px 12px;
	background: #222222;
	border-radius: 4px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, .3);
	box-sizing: border-box;
	width: 100%;
}

.hs-view {
	display: inline-flex;
	gap: 4px;
	padding: 3px;
	background: #2b2b2b;
	border-radius: 4px;
}

button.hs-view__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 3px;
	background: none;
	color: #999;
	font-size: 14px;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}

button.hs-view__btn:hover { color: #fff; background: #3a3a3a; }
button.hs-view__btn.is-active { color: #fff; background: #ff5722; }

.hs-sort {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	position: relative;
	max-width: 100%;
}
.hs-sort__label { font-size: 12px; color: #999; white-space: nowrap; }

.hs-sort__select {
	height: 30px;
	padding: 0 28px 0 10px;
	border: 1px solid #454545;
	border-radius: 3px;
	background: #2b2b2b
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%23999'/%3E%3C/svg%3E")
		no-repeat right 6px center / 14px 14px;
	color: #ddd;
	font: inherit;
	font-size: 12px;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	max-width: 190px;
	box-sizing: border-box;
}

.hs-sort__select:hover, .hs-sort__select:focus { border-color: #ff5722; outline: none; }
.hs-sort__select option { background: #222222; color: #ffffff; padding: 6px 10px; }

#hs-list.is-loading { opacity: .45; pointer-events: none; transition: opacity .15s ease; }

.hs-result-head {
	margin: 0 0 10px;
	padding: 7px 12px;
	background: #2b2b2b;
	border-left: 3px solid #ff5722;
	border-radius: 3px;
	font-size: 12px;
	color: #ccc;
}
.hs-result-head span { color: #999; }

.hs-empty { padding: 30px 12px; text-align: center; color: #999; }

/* ---------- пагинация ajax-выдачи ---------- */

.hs-pager {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px;
	clear: both;
	padding: 14px 0 4px;
}

button.hs-pager__btn {
	min-width: 32px;
	height: 30px;
	padding: 0 9px;
	border: 1px solid #454545;
	border-radius: 3px;
	background: #2b2b2b;
	color: #ccc;
	font: inherit;
	font-size: 12px;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease;
}

button.hs-pager__btn:hover:not([disabled]) { background: #3a3a3a; border-color: #666; }
button.hs-pager__btn.is-current { background: #ff5722; border-color: #ff5722; color: #fff; }
button.hs-pager__btn[disabled] { opacity: .4; cursor: default; }
.hs-pager__gap { color: #777; padding: 0 2px; }

/* ---------- подбор по жанрам в колонке ---------- */

.gf {
	margin-bottom: 16px;
	background: #222;
	border-radius: 4px;
	overflow: hidden;
}

.gf__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 9px 12px;
	background: #2b2b2b;
	border-bottom: 1px solid #454545;
}

.gf__title { font-size: 13px; font-weight: 700; color: #fff; }
.gf__hint { font-size: 11px; color: #888; cursor: help; }

.gf__chosen { padding: 9px 12px; border-bottom: 1px solid #454545; }
.gf__chosen-list { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 7px; }

button.gf-tag {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 7px;
	border: 0;
	border-radius: 3px;
	font-size: 11px;
	cursor: pointer;
	color: #fff;
}
button.gf-tag--inc { background: #2e7d32; }
button.gf-tag--exc { background: #a13030; }
button.gf-tag span { font-weight: 700; }

button.gf__reset {
	padding: 4px 9px;
	border: 1px solid #454545;
	border-radius: 3px;
	background: none;
	color: #bbb;
	font-size: 11px;
	cursor: pointer;
}
button.gf__reset:hover { color: #fff; border-color: #ff5722; }

.gf__list {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	/* Прокрутки внутри колонки нет: список либо свёрнут до трёх рядов,
	   либо раскрыт целиком по кнопке. Внутренний скролл в боковой колонке
	   неудобен — колесо мыши застревает в нём при прокрутке страницы. */
	max-height: 132px;
	overflow: hidden;
	padding: 10px 12px;
	transition: max-height .2s ease;
}

.gf.is-open .gf__list {
	max-height: none;
	overflow: visible;
}

/* Подсказка, что список продолжается: нижний край уходит в фон */
.gf:not(.is-open) .gf__list-wrap::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 34px;
	background: linear-gradient(to bottom, rgba(34, 34, 34, 0), #222);
	pointer-events: none;
}

.gf__list-wrap { position: relative; }

button.gf__toggle {
	display: block;
	width: 100%;
	padding: 7px 12px;
	border: 0;
	border-top: 1px solid #454545;
	background: none;
	color: #bbb;
	font: inherit;
	font-size: 12px;
	cursor: pointer;
	transition: color .15s ease, background .15s ease;
}

button.gf__toggle:hover { color: #fff; background: #2b2b2b; }

.gf-chip {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 2px 3px 2px 7px;
	border: 1px solid #3a3a3a;
	border-radius: 3px;
	background: #2b2b2b;
	font-size: 11.5px;
	color: #ccc;
	line-height: 1.6;
}

.gf-chip.is-inc { border-color: #2e7d32; background: rgba(46, 125, 50, .18); color: #fff; }
.gf-chip.is-exc { border-color: #a13030; background: rgba(161, 48, 48, .18); color: #fff; text-decoration: line-through; }

.gf-chip__count { font-size: 10px; color: #777; }

.gf-chip__plus, .gf-chip__minus {
	width: 18px;
	height: 18px;
	padding: 0;
	border: 0;
	border-radius: 2px;
	background: #3a3a3a;
	color: #ccc;
	font-size: 12px;
	line-height: 1;
	cursor: pointer;
}
.gf-chip__plus:hover { background: #2e7d32; color: #fff; }
.gf-chip__minus:hover { background: #a13030; color: #fff; }

.gf__more {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 9px 12px;
	border-top: 1px solid #454545;
	color: #bbb;
	font-size: 12px;
	text-decoration: none;
}
.gf__more:hover { color: #ff5722; }
.gf__more-arrow { margin-left: auto; }

/* ---------- предложение жанра в полной новости ---------- */

.hs-pool { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }

.hs-pchip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 5px 3px 9px;
	border: 1px dashed #666;
	border-radius: 3px;
	font-size: 11.5px;
	color: #ccc;
}
.hs-pchip__n { font-size: 10px; color: #888; }

.hs-pchip__plus, .hs-pchip__ok, .hs-pchip__del, .hs-pchip__done {
	width: 18px;
	height: 18px;
	padding: 0;
	border: 0;
	border-radius: 2px;
	background: #3a3a3a;
	color: #ccc;
	font-size: 12px;
	line-height: 18px;
	text-align: center;
	cursor: pointer;
}
.hs-pchip__plus:hover, .hs-pchip__ok:hover { background: #2e7d32; color: #fff; }
.hs-pchip__del:hover { background: #a13030; color: #fff; }
.hs-pchip__done { cursor: default; color: #2e7d32; background: none; }

button.gf__add, button.hs-genre-add {
	margin-left: 6px;
	padding: 1px 8px;
	border: 1px solid #454545;
	border-radius: 3px;
	background: #2b2b2b;
	color: #bbb;
	font-size: 11px;
	cursor: pointer;
}
button.gf__add:hover, button.hs-genre-add:hover { color: #fff; border-color: #ff5722; }

.hs-gpick {
	margin: 10px 0;
	padding: 12px;
	background: #222;
	border: 1px solid #454545;
	border-radius: 4px;
}

.hs-gpick__hint { margin: 0 0 10px; font-size: 12px; color: #999; }

.hs-gpick__search,
.hs-gpick__custom input {
	width: 100%;
	height: 32px;
	margin-bottom: 8px;
	padding: 0 10px;
	border: 1px solid #454545;
	border-radius: 3px;
	background: #2b2b2b;
	color: #ddd;
	font: inherit;
	font-size: 12px;
	box-sizing: border-box;
}
.hs-gpick__search:focus,
.hs-gpick__custom input:focus { border-color: #ff5722; outline: none; }

.hs-gpick__list {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	max-height: 220px;
	overflow-y: auto;
	margin-bottom: 10px;
	padding: 9px;
	background: #2b2b2b;
	border-radius: 3px;
}

button.hs-gchip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 9px;
	border: 1px solid #3a3a3a;
	border-radius: 3px;
	background: #333;
	color: #ccc;
	border-radius: 3px;
	background: none;
	color: #bbb;
	font-size: 11px;
	cursor: pointer;
}
button.gf__reset:hover { color: #fff; border-color: #ff5722; }

.gf__list {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	/* Прокрутки внутри колонки нет: список либо свёрнут до трёх рядов,
	   либо раскрыт целиком по кнопке. Внутренний скролл в боковой колонке
	   неудобен — колесо мыши застревает в нём при прокрутке страницы. */
	max-height: 132px;
	overflow: hidden;
	padding: 10px 12px;
	transition: max-height .2s ease;
}

.gf.is-open .gf__list {
	max-height: none;
	overflow: visible;
}

/* Подсказка, что список продолжается: нижний край уходит в фон */
.gf:not(.is-open) .gf__list-wrap::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 34px;
	background: linear-gradient(to bottom, rgba(34, 34, 34, 0), #222);
	pointer-events: none;
}

.gf__list-wrap { position: relative; }

button.gf__toggle {
	display: block;
	width: 100%;
	padding: 7px 12px;
	border: 0;
	border-top: 1px solid #454545;
	background: none;
	color: #bbb;
	font: inherit;
	font-size: 12px;
	cursor: pointer;
	transition: color .15s ease, background .15s ease;
}

button.gf__toggle:hover { color: #fff; background: #2b2b2b; }

.gf-chip {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 2px 3px 2px 7px;
	border: 1px solid #3a3a3a;
	border-radius: 3px;
	background: #2b2b2b;
	font-size: 11.5px;
	color: #ccc;
	line-height: 1.6;
}

.gf-chip.is-inc { border-color: #2e7d32; background: rgba(46, 125, 50, .18); color: #fff; }
.gf-chip.is-exc { border-color: #a13030; background: rgba(161, 48, 48, .18); color: #fff; text-decoration: line-through; }

.gf-chip__count { font-size: 10px; color: #777; }

.gf-chip__plus, .gf-chip__minus {
	width: 18px;
	height: 18px;
	padding: 0;
	border: 0;
	border-radius: 2px;
	background: #3a3a3a;
	color: #ccc;
	font-size: 12px;
	line-height: 1;
	cursor: pointer;
}
.gf-chip__plus:hover { background: #2e7d32; color: #fff; }
.gf-chip__minus:hover { background: #a13030; color: #fff; }

.gf__more {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 9px 12px;
	border-top: 1px solid #454545;
	color: #bbb;
	font-size: 12px;
	text-decoration: none;
}
.gf__more:hover { color: #ff5722; }
.gf__more-arrow { margin-left: auto; }

/* ---------- предложение жанра в полной новости ---------- */

.hs-pool { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }

.hs-pchip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 5px 3px 9px;
	border: 1px dashed #666;
	border-radius: 3px;
	font-size: 11.5px;
	color: #ccc;
}
.hs-pchip__n { font-size: 10px; color: #888; }

.hs-pchip__plus, .hs-pchip__ok, .hs-pchip__del, .hs-pchip__done {
	width: 18px;
	height: 18px;
	padding: 0;
	border: 0;
	border-radius: 2px;
	background: #3a3a3a;
	color: #ccc;
	font-size: 12px;
	line-height: 18px;
	text-align: center;
	cursor: pointer;
}
.hs-pchip__plus:hover, .hs-pchip__ok:hover { background: #2e7d32; color: #fff; }
.hs-pchip__del:hover { background: #a13030; color: #fff; }
.hs-pchip__done { cursor: default; color: #2e7d32; background: none; }

button.gf__add, button.hs-genre-add {
	margin-left: 6px;
	padding: 1px 8px;
	border: 1px solid #454545;
	border-radius: 3px;
	background: #2b2b2b;
	color: #bbb;
	font-size: 11px;
	cursor: pointer;
}
button.gf__add:hover, button.hs-genre-add:hover { color: #fff; border-color: #ff5722; }

.hs-gpick {
	margin: 10px 0;
	padding: 12px;
	background: #222;
	border: 1px solid #454545;
	border-radius: 4px;
}

.hs-gpick__hint { margin: 0 0 10px; font-size: 12px; color: #999; }

.hs-gpick__search,
.hs-gpick__custom input {
	width: 100%;
	height: 32px;
	margin-bottom: 8px;
	padding: 0 10px;
	border: 1px solid #454545;
	border-radius: 3px;
	background: #2b2b2b;
	color: #ddd;
	font: inherit;
	font-size: 12px;
	box-sizing: border-box;
}
.hs-gpick__search:focus,
.hs-gpick__custom input:focus { border-color: #ff5722; outline: none; }

.hs-gpick__list {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	max-height: 220px;
	overflow-y: auto;
	margin-bottom: 10px;
	padding: 9px;
	background: #2b2b2b;
	border-radius: 3px;
}

button.hs-gchip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 9px;
	border: 1px solid #3a3a3a;
	border-radius: 3px;
	background: #333;
	color: #ccc;
	font: inherit;
	font-size: 11.5px;
	cursor: pointer;
}
button.hs-gchip:hover { border-color: #ff5722; color: #fff; }
button.hs-gchip.is-picked { background: #ff5722; border-color: #ff5722; color: #fff; }
/* Уже указан у публикации или уже на голосовании: показываем, но выбрать нельзя */
button.hs-gchip.is-off { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.hs-gchip__n { font-size: 10px; opacity: .7; }

.hs-gpick__empty { font-size: 12px; color: #888; padding: 4px; }

button.hs-gpick__own {
	display: block;
	width: 100%;
	margin-bottom: 8px;
	padding: 8px;
	border: 1px dashed #555;
	border-radius: 3px;
	background: none;
	color: #999;
	font: inherit;
	font-size: 12px;
	cursor: pointer;
}
button.hs-gpick__own:hover { color: #ff5722; border-color: #ff5722; }

button.hs-gpick__submit {
	padding: 8px 18px;
	border: 0;
	border-radius: 3px;
	background: #ff5722;
	color: #fff;
	font: inherit;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
}
button.hs-gpick__submit[disabled] { opacity: .45; cursor: default; }

/* В списочном виде качество выводится в блоке полей, с постера убираем */
#hs-list:not(.is-grid) .poster-box .quality { display: none !important; }

/* ---------- плиточный вид (Grid как в hentaro) ---------- */

#hs-list.is-grid,
#hs-list.is-grid > #dle-content {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr) !important;
	gap: 20px 14px !important;
	padding: 8px 0 20px 0 !important;
	margin: 0 !important;
	width: 100% !important;
	box-sizing: border-box !important;
	float: none !important;
}

#hs-list.is-grid > #dle-content {
	grid-column: 1 / -1 !important;
	padding: 0 !important;
}

/* Все служебные блоки DLE внутри грида (пагинация, инфо) растягиваем на всю ширину */
#hs-list.is-grid > *:not(.sh-block):not(#dle-content),
#hs-list.is-grid > #dle-content > *:not(.sh-block) {
	grid-column: 1 / -1 !important;
	width: 100% !important;
}

#hs-list.is-grid .sh-block {
	display: flex !important;
	flex-direction: column !important;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	float: none !important;
	height: auto !important;
	min-height: 0 !important;
	position: relative !important;
	align-self: flex-start !important;
	transition: transform 0.25s ease !important;
}

#hs-list.is-grid .sh-block:hover {
	transform: translateY(-4px) !important;
	background: transparent !important;
	box-shadow: none !important;
	border: none !important;
}

#hs-list.is-grid .sh-block .sh-content {
	order: 1 !important;
	display: block !important;
	margin: 0 !important;
	padding: 0 !important;
	width: 100% !important;
}

#hs-list.is-grid .sh-block .sh-content > div {
	display: block !important;
	margin: 0 !important;
	padding: 0 !important;
	width: 100% !important;
}

/* Постер и контейнер постера */
#hs-list.is-grid .sh-block .poster,
#hs-list.is-grid .sh-block .poster .poster-box {
	float: none !important;
	width: 100% !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	position: relative !important;
	border-radius: 8px !important;
	overflow: hidden !important;
	background: #1a1a1a !important;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45) !important;
}

#hs-list.is-grid .sh-block .poster img {
	display: block !important;
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 2 / 3 !important;
	object-fit: cover !important;
	border-radius: 8px !important;
	margin: 0 !important;
	padding: 0 !important;
	transition: transform 0.3s ease !important;
}

#hs-list.is-grid .sh-block:hover .poster img {
	transform: scale(1.05) !important;
}

/* Бейдж качества на постере */
#hs-list.is-grid .sh-block .quality {
	position: absolute !important;
	top: 8px !important;
	left: 8px !important;
	bottom: auto !important;
	right: auto !important;
	z-index: 3 !important;
	padding: 3px 7px !important;
	border-radius: 4px !important;
	background: rgba(0, 0, 0, 0.78) !important;
	backdrop-filter: blur(4px) !important;
	-webkit-backdrop-filter: blur(4px) !important;
	color: #ffb733 !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	border: 1px solid rgba(255, 255, 255, 0.15) !important;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4) !important;
}

/* Кнопка воспроизведения по центру постера */
#hs-list.is-grid .sh-block .btn-tosee {
	position: absolute !important;
	top: 50% !important;
	left: 50% !important;
	transform: translate(-50%, -50%) scale(0.85) !important;
	width: 46px !important;
	height: 46px !important;
	line-height: 46px !important;
	border-radius: 50% !important;
	background: rgba(255, 87, 34, 0.92) !important;
	color: #ffffff !important;
	border: none !important;
	box-shadow: 0 4px 16px rgba(255, 87, 34, 0.5) !important;
	opacity: 0 !important;
	visibility: hidden !important;
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s !important;
	z-index: 5 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	font-size: 17px !important;
	padding: 0 !important;
	margin: 0 !important;
}

#hs-list.is-grid .sh-block .btn-tosee i {
	position: static !important;
	margin-left: 2px !important;
}

#hs-list.is-grid .sh-block:hover .btn-tosee {
	opacity: 1 !important;
	visibility: visible !important;
	transform: translate(-50%, -50%) scale(1) !important;
}

/* Заголовок под постером (2 строки максимум) */
#hs-list.is-grid .sh-block .sh-title-block {
	order: 2 !important;
	margin: 8px 0 0 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: none !important;
	min-height: 0 !important;
	height: auto !important;
}

#hs-list.is-grid .sh-block .title-main,
#hs-list.is-grid .sh-block .title-main a {
	font-size: 13.5px !important;
	font-weight: 600 !important;
	line-height: 1.35 !important;
	color: #e2e8f0 !important;
	text-decoration: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: -webkit-box !important;
	-webkit-line-clamp: 2 !important;
	-webkit-box-orient: vertical !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	height: auto !important;
	max-height: 2.7em !important;
	transition: color 0.2s ease !important;
}

#hs-list.is-grid .sh-block:hover .title-main a {
	color: #ff5722 !important;
}

/* Скрываем списочные поля в плитке */
#hs-list.is-grid .sh-block .sh-description,
#hs-list.is-grid .sh-block .data-block,
#hs-list.is-grid .sh-block .grid-hide,
#hs-list.is-grid .sh-block .hide-block,
#hs-list.is-grid .sh-block .rating-block,
#hs-list.is-grid .sh-block .favorite-block,
#hs-list.is-grid .sh-block .over-black,
#hs-list.is-grid .sh-block .po,
#hs-list.is-grid .sh-block .tosee-poster {
	display: none !important;
}

#hs-list.is-grid .hs-pager {
	grid-column: 1 / -1 !important;
	width: 100% !important;
}

@media only screen and (max-width: 480px) {
	#hs-list.is-grid,
	#hs-list.is-grid > #dle-content {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 14px 8px !important;
	}
	#hs-list.is-grid .sh-block .title-main,
	#hs-list.is-grid .sh-block .title-main a {
		font-size: 12px !important;
	}
}




/* =====================================================================
   Страница «Все теги»: чипсы значений, поиск, сортировка групп.
   Правила перенесены из набора hentaro и перекрашены под палитру шаблона.
   ===================================================================== */
/* --------------------------------------------------------------------------
   12. Сводная страница доп. полей (жанры, студии, режиссёры, годы)
   -------------------------------------------------------------------------- */

.xcat { padding: 4px 0 20px; }
.xcat__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding-bottom: 16px;
	margin-bottom: 16px;
	border-bottom: 1px solid #454545;
}
.xcat__nav { display: flex; flex-wrap: wrap; gap: 6px; }
.xcat__nav .chip { text-decoration: none; }
.xcat__sort {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}
.xcat__sort-label { font-size: 12px; color: #888; }
button.xcat__sort-btn { height: 26px; padding: 0 10px; }
/* Поиск по значениям */
.xcat__search {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 20px;
}
.xcat__input {
	flex: 1 1 260px;
	height: 42px;
	padding: 0 16px;
	border-radius: 999px;
	background: #2b2b2b;
	border: 1px solid #454545;
	color: #eee;
	font: inherit;
	font-size: 14px;
	transition: border-color .26s ease, box-shadow .26s ease;
}
.xcat__input:focus { border-color: #ff5722; box-shadow: 0 0 0 4px rgba(255, 87, 34, .16); }
.xcat__input::placeholder { color: #888; }
.xcat__found { font-size: 13px; color: #888; }
/* Группа значений */
.xcat__group { margin-bottom: 28px; scroll-margin-top: 100px; }
.xcat__group.is-empty { display: none; }
.xcat__title {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 17px;
	font-weight: 700;
	color: #eee;
	margin-bottom: 12px;
	padding-bottom: 10px;
	border-bottom: 1px dashed #454545;
}
.xcat__title .fa { color: #ff5722; font-size: 15px; }
.xcat__n {
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 999px;
	background: #2b2b2b;
	border: 1px solid #454545;
	color: #888;
}
.xcat__chips { display: flex; flex-wrap: wrap; gap: 5px; }
/* Чипса значения: ссылка + счётчик + «в подбор» */
.xcat-chip {
	display: inline-flex;
	align-items: stretch;
	height: 28px;
	border-radius: 999px;
	overflow: hidden;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1;
	color: #ccc;
	background: #2b2b2b;
	border: 1px solid #454545;
	transition: color .16s ease, border-color .26s ease, background .26s ease,
	            transform .26s ease, box-shadow .26s ease;
}
.xcat-chip:hover {
	color: #eee;
	border-color: #666;
	transform: translateY(-1px);
}
.xcat-chip.is-hidden { display: none; }
.xcat-chip.is-filtered { display: none; }
.xcat-chip__link {
	display: flex;
	align-items: center;
	padding: 0 5px 0 11px;
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
}
.xcat-chip__n {
	display: flex;
	align-items: center;
	padding-right: 9px;
	font-size: 10px;
	font-weight: 700;
	color: #888;
}
button.xcat-chip__add {
	width: 22px;
	min-width: 0;
	height: auto;
	line-height: 1;
	display: grid;
	place-items: center;
	flex: none;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: rgba(255,255,255,.05);
	background-image: none;
	box-shadow: none;
	color: #888;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition: background .16s ease, color .16s ease;
}
button.xcat-chip__add:hover { background: #2ea36a; color: #fff; }
.xcat-chip.is-picked {
	color: #fff;
	border-color: transparent;
	background: linear-gradient(118deg, #2ea36a, #35c07d);
	box-shadow: 0 6px 18px -8px rgba(53,192,125,.7);
}
.xcat-chip.is-picked .xcat-chip__n { color: rgba(255,255,255,.75); }
.xcat-chip.is-picked .xcat-chip__add { background: rgba(0,0,0,.22); color: #fff; }
.xcat__empty {
	padding: 40px 20px;
	text-align: center;
	color: #888;
	font-size: 15px;
}
/* Панель «перейти к подбору» появляется, когда что-то выбрано */
.xcat-bar {
	position: fixed;
	left: 50%;
	bottom: 20px;
	transform: translate(-50%, 20px);
	z-index: 900;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	max-width: min(760px, calc(100vw - 32px));
	padding: 10px 14px;
	border-radius: 999px;
	background: rgba(34, 34, 34, .92);
	-webkit-backdrop-filter: blur(blur(10px)) saturate(180%);
	        backdrop-filter: blur(blur(10px)) saturate(180%);
	border: 1px solid #454545;
	box-shadow: 0 6px 14px rgba(0, 0, 0, .4);
	opacity: 0;
	pointer-events: none;
	transition: opacity .26s ease, transform .26s cubic-bezier(.34,1.56,.64,1);
}
.xcat-bar.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.xcat-bar__list { display: flex; flex-wrap: wrap; gap: 5px; flex: 1 1 auto; }
.xcat-bar__go {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 34px;
	padding: 0 18px;
	flex: none;
	border-radius: 999px;
	background: #ff5722;
	background-image: #ff5722;
	border: 0;
	color: #fff;
	font: inherit;
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
}
.xcat-bar__go:hover { color: #fff; filter: brightness(1.07); }
.xcat-bar { left: 12px; right: 12px; transform: translateY(20px); max-width: none; }
.xcat-bar.is-on { transform: none; }
/* Исключённое значение в каталоге */
.xcat-chip.is-excluded {
	color: #fff;
	border-color: transparent;
	background: linear-gradient(118deg, #b3283f, #d8384f);
	box-shadow: 0 6px 18px -8px rgba(216,56,79,.7);
}
.xcat-chip.is-excluded .xcat-chip__n { color: rgba(255,255,255,.75); }
.xcat-chip.is-excluded .xcat-chip__minus { background: rgba(0,0,0,.22); color: #fff; }
.xcat-chip.is-excluded .xcat-chip__link { text-decoration: line-through; opacity: .85; }
button.xcat-chip__minus {
	width: 22px;
	min-width: 0;
	height: auto;
	line-height: 1;
	display: grid;
	place-items: center;
	flex: none;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: rgba(255,255,255,.05);
	background-image: none;
	box-shadow: none;
	color: #888;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition: background .16s ease, color .16s ease;
}
button.xcat-chip__minus:hover { background: #b3283f; color: #fff; }
.xcat-chip__link { padding-left: 8px; }

/* Селекты, поиск и кнопки .chip внутри наших блоков: в этом шаблоне таких
   классов нет, без них поля выглядели голыми белыми прямоугольниками. */

.xcat select, .xcat input[type="search"], .xcat input[type="text"] {
	height: 30px; padding: 0 10px; border: 1px solid #454545; border-radius: 3px;
	background: #2b2b2b; color: #ddd; font: inherit; font-size: 12px; box-sizing: border-box;
}
.xcat input:focus, .xcat select:focus { border-color: #ff5722; outline: none; }
.xcat__input { width: 100%; max-width: 320px; }
.xcat__sort-label, .xcat__found, .xcat__n { color: #888; font-size: 12px; }
.xcat__title { color: #fff; }
.xcat-chip__link { color: inherit; text-decoration: none; }
.xcat-chip__link:hover { color: #fff; }

.xcat .chip, .xcat__nav .chip, .gf .chip, #hs-list .chip {
	display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px;
	border: 1px solid #454545; border-radius: 999px; background: #2b2b2b; color: #ccc;
	font: inherit; font-size: 12px; line-height: 1.2; text-decoration: none; cursor: pointer;
	appearance: none; -webkit-appearance: none;
	transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.xcat .chip:hover, .xcat__nav .chip:hover, .gf .chip:hover, #hs-list .chip:hover {
	color: #fff; border-color: #666; background: #3a3a3a;
}
.xcat .chip.is-active, .xcat__nav .chip.is-active,
.xcat .chip.chip--accent, #hs-list .chip.chip--accent {
	background: #ff5722; border-color: #ff5722; color: #fff;
}
.xcat .chip[disabled] { opacity: .45; cursor: default; }

/* =====================================================================
   Модальное окно набора

   Штатный DLEalert рисуется системным стилем движка и рядом с тёмным
   шаблоном смотрится чужеродно, а форму предложения жанра в него не
   положишь. Своё окно — в палитре шаблона.
   ===================================================================== */

.hs-modal {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, .72);
	opacity: 0;
	transition: opacity .2s ease;
}

.hs-modal.is-open { opacity: 1; }

.hs-modal__box {
	width: 100%;
	max-width: 560px;
	max-height: 86vh;
	display: flex;
	flex-direction: column;
	background: #222;
	border: 1px solid #454545;
	border-radius: 6px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, .6);
	transform: translateY(10px) scale(.99);
	transition: transform .2s ease;
}

.hs-modal.is-open .hs-modal__box { transform: none; }

.hs-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px;
	border-bottom: 1px solid #454545;
	background: #2b2b2b;
	border-radius: 6px 6px 0 0;
}

.hs-modal__title { font-size: 14px; font-weight: 700; color: #fff; }

button.hs-modal__close {
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 3px;
	background: none;
	color: #999;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}

button.hs-modal__close:hover { background: #ff5722; color: #fff; }

.hs-modal__body {
	padding: 16px;
	overflow-y: auto;
}

/* Короткое сообщение вместо alert() */
.hs-note { font-size: 13px; line-height: 1.5; color: #ddd; }

/* Внутри окна форма занимает всю ширину и не рисует вторую рамку */
.hs-modal .hs-gpick {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}

.hs-modal .hs-gpick__list { max-height: 40vh; }
