/* escape. — конструктор пригласительных (/priglashenie/).
   Всё под .esc-inv. Шрифт Ubuntu берётся из темы.

   Карточка свёрстана в НАСТОЯЩИХ пикселях картинки: 1080×1440 и описана в
   плагине (card.css). Здесь только оболочка страницы: колонки, форма, ховеры. */

body.esc-part-priglashenie {
	background-color: #1c1c1c;
}

/* На конструкторе шапка в потоке: так больше места под карточку. */
body.esc-part-priglashenie .esc-gh {
	position: relative; /* static dropped z-index: the Blog menu slid under the card */
}

body.esc-part-priglashenie .esc-gh-spacer,
body.esc-part-priglashenie .esc-gh-progress {
	display: none;
}

.esc-inv {
	--bg: #1c1c1c;
	--bg-soft: #171717;
	--surface: #242424;
	--surface-2: #2b2b2b;
	--border: rgba(255, 255, 255, .08);
	--border-strong: rgba(255, 255, 255, .16);
	--edge: rgba(255, 255, 255, .04);
	--text: #ffffff;
	--card-text: #f2f2f2;
	--muted: #b3b3b3;
	--muted-2: #8f8f8f;
	--accent: #ff0004;
	--accent-hover: #d40c10;
	--accent-text: #ff6b6d;
	--accent-grad: linear-gradient(135deg, #ff3b3e 0%, #ff0004 100%);
	--ease: ease-in-out;
	--shadow: 0 0 20px rgba(0, 0, 0, .3);
	--shadow-hover: 0 0 40px rgba(0, 0, 0, .7);
	--shadow-red: 0 8px 24px rgba(255, 0, 4, .28);

	color: var(--muted);
	background-color: var(--bg);
	font-family: 'Ubuntu', Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.esc-inv :where(*, *::before, *::after) {
	box-sizing: border-box;
}

.esc-inv :where(h1, h2, h3, p, ul, li, figure) {
	margin: 0;
}

.esc-inv :where(ul) {
	padding: 0;
	list-style: none;
}

.esc-inv :where(img) {
	display: block;
	max-width: 100%;
}

.esc-inv :where(button) {
	font-family: inherit;
	cursor: pointer;
}

.esc-inv :where(summary) {
	list-style: none;
	cursor: pointer;
}

.esc-inv summary::-webkit-details-marker {
	display: none;
}

/* ── Шапка страницы ─────────────────────────────────────────── */

.esc-inv-hero {
	max-width: 1200px;
	margin-inline: auto;
	padding: clamp(32px, 4vw, 56px) 24px clamp(20px, 2.5vw, 28px);
}

.esc-inv-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--accent-text);
}

.esc-inv-eyebrow::before {
	content: "";
	width: 22px;
	height: 1px;
	background: var(--accent);
	opacity: .7;
}

.esc-inv-h1 {
	margin-top: 12px;
	font-size: clamp(32px, 5vw, 56px);
	font-weight: 700;
	line-height: 1.1;
	color: var(--text);
	text-wrap: balance;
}

.esc-inv-grad {
	background: var(--accent-grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.esc-inv-sub {
	max-width: 640px;
	margin-top: 14px;
	font-size: 17px;
	line-height: 1.6;
	color: var(--muted);
	text-wrap: pretty;
}

.esc-inv-noscript,
.esc-inv-off {
	max-width: 1200px;
	margin-inline: auto;
	padding: 24px;
	color: var(--muted);
}

/* ── Две колонки: карточка и форма ──────────────────────────── */

.esc-inv-wrap {
	display: grid;
	grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
	gap: 24px;
	align-items: start;
	max-width: 1200px;
	margin-inline: auto;
	padding: 12px 24px clamp(56px, 7vw, 96px);
	overflow-x: clip;
}

@media (max-width: 900px) {
	.esc-inv-hero {
		padding: 12px 16px 8px;
	}

	.esc-inv-eyebrow,
	.esc-inv-sub {
		display: none;
	}

	.esc-inv-h1 {
		margin-top: 0;
		font-size: 28px;
	}

	.esc-inv-wrap {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
		padding: 0 16px calc(136px + env(safe-area-inset-bottom, 0px));
	}

	.esc-inv-hint {
		min-height: 0;
		margin-top: 0;
	}

	.esc-inv-form {
		gap: 16px;
		padding: 16px;
		border-radius: 16px;
	}

	.esc-inv-chips {
		gap: 8px;
	}

	.esc-inv-chip span {
		min-height: 44px;
		padding: 8px 14px;
		font-size: 14px;
	}

	.esc-inv-hours {
		flex-wrap: nowrap;
		overflow-x: auto;
		margin: 0 -16px;
		padding: 0 16px 4px;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.esc-inv-hours::-webkit-scrollbar {
		display: none;
	}

	.esc-inv-hours .esc-inv-hour {
		flex: none;
		min-height: 44px;
	}

	.esc-inv-cover-tabs {
		gap: 8px;
	}

	.esc-inv-hour,
	.esc-inv-chip-btn {
		min-height: 44px;
	}
}

.esc-inv-side {
	position: sticky;
	top: 16px;
}

/* Телефон: превью стоит на месте вверху и не липнет — липкая карточка
   сжималась, отъезжала вправо и сужала форму, страница прыгала. Когда
   слот уходит за экран, та же живая карточка переезжает миниатюрой в нижнюю
   полоску (script.js placeFrame); слот держит высоту, поэтому скролл ровный. */
@media (max-width: 900px) {
	.esc-inv-side {
		position: static;
		width: 100%;
		max-width: min(260px, 66vw);
		margin-inline: auto;
	}

	.esc-inv-slot {
		aspect-ratio: 1080 / 1440;
	}
}

/* Рамка превью: свой слой, чтобы scale карточки не рябил при скролле.
   Селектор сильнее плагинного .esc-inv-frame, чтобы тень конструктора
   не спорила с тенью страницы /i/{код}. Подъём при наведении убран —
   на липкой колонке он дёргает картинку. */
.esc-inv .esc-inv-frame {
	transform: translateZ(0);
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	transition: box-shadow .3s var(--ease);
	box-shadow: var(--shadow);
}

.esc-inv .esc-inv-frame:hover {
	box-shadow: var(--shadow-hover);
}

/* Сама карточка (.esc-inv-card и всё внутри) описана в плагине:
   plugins/esclub-invite/assets/css/card.css. */

/* ── Кнопки под карточкой ───────────────────────────────────── */

.esc-inv-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 20px;
}

.esc-inv-btn {
	flex: 1;
	min-width: 160px;
	min-height: 52px;
	padding: 14px 22px;
	border: 1px solid transparent;
	border-radius: 6px;
	background: var(--accent);
	color: #fff;
	font-size: 16px;
	font-weight: 500;
	transition: transform .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.esc-inv-btn:hover {
	background: var(--accent-hover);
	transform: translateY(-2px);
	box-shadow: var(--shadow-red);
}

.esc-inv-btn:active {
	transform: scale(.975);
}

.esc-inv-btn[disabled] {
	opacity: .6;
	cursor: default;
	transform: none;
	box-shadow: none;
}

.esc-inv-btn[hidden] {
	display: none;
}

.esc-inv-btn-ghost {
	background: transparent;
	border-color: var(--border-strong);
	color: var(--text);
	flex: 0 1 auto;
}

.esc-inv-btn-ghost:hover {
	background: transparent;
	border-color: var(--accent);
	box-shadow: none;
	transform: translateY(-2px);
}

.esc-inv-hint {
	min-height: 22px;
	margin-top: 10px;
	font-size: 14px;
	color: var(--muted-2);
}

.esc-inv-hint.is-error,
.esc-inv-note.is-error {
	color: var(--accent-text);
}

/* ── Своё фото и обрезка ────────────────────────────────────── */

.esc-inv-cover-own-wrap {
	position: relative;
	min-width: 0;
}

.esc-inv-cover-own .esc-inv-cover-dash,
.esc-inv-cover-art-stub .esc-inv-cover-dash,
.esc-inv-cover-pick.esc-inv-cover-own:not(.is-set) input:checked + .esc-inv-cover-frame,
.esc-inv-cover-pick.esc-inv-cover-own:not(.is-set) input:focus-visible + .esc-inv-cover-frame {
	position: relative;
	border: 1px dashed var(--border-strong);
	background: var(--surface-2);
	box-shadow: none;
	outline: none;
}

.esc-inv-cover-own:not(.is-set) .esc-inv-cover-dash img[hidden] {
	display: none;
}

.esc-inv-cover-own-wrap input[type="file"],
.esc-inv-cover-own-wrap input[type="file"]:focus,
.esc-inv-cover-own-wrap input[type="file"]:focus-visible {
	outline: none;
	box-shadow: none;
	border: 0;
}

.esc-inv-cover-art-stub,
.esc-inv-cover-pick[data-esc-art-home] {
	width: 100%;
	padding: 0;
	background: none;
	border: 0;
	text-align: inherit;
	color: inherit;
}

.esc-inv-art-home-wrap {
	position: relative;
	display: block;
	min-width: 0;
}

.esc-inv-art-home-wrap[hidden] {
	display: none;
}

.esc-inv-art-hide {
	position: absolute;
	left: 6px;
	right: 6px;
	bottom: 6px;
	z-index: 3;
	min-height: 44px;
	padding: 6px 8px;
	border: 0;
	border-radius: 8px;
	background: rgba(12, 12, 12, .72);
	color: #fff;
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
}

.esc-inv-art-hide:hover,
.esc-inv-art-hide:focus-visible {
	background: rgba(12, 12, 12, .88);
}

.esc-inv-art-hide:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.esc-inv-cover-plus {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px;
	color: var(--muted);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.25;
	text-align: center;
	pointer-events: none;
	z-index: 1;
}

.esc-inv-cover-own .esc-inv-cover-dash img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.esc-inv-cover-plus svg {
	width: 28px;
	height: 28px;
	flex: none;
}

.esc-inv-cover-own.is-set .esc-inv-cover-dash {
	border-style: solid;
	border-color: transparent;
}

.esc-inv-cover-own.is-set .esc-inv-cover-plus {
	display: none;
}

.esc-inv-cover-own-wrap input[type="file"] {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
	z-index: 2;
}

.esc-inv-cover-own-wrap:has(.is-set) input[type="file"] {
	/* После снимка клетку выбирают радиокнопкой, файл — кнопкой «Сменить». */
	pointer-events: none;
}

.esc-inv-own-tools[hidden] {
	display: none;
}

.esc-inv-own-clear {
	position: absolute;
	top: 6px;
	right: 6px;
	z-index: 3;
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 1px solid var(--border-strong);
	border-radius: 50%;
	background: rgba(28, 28, 28, .88);
	color: #fff;
	font-size: 20px;
	line-height: 1;
}

.esc-inv-own-clear:hover {
	border-color: var(--accent);
	color: #fff;
}

.esc-inv-own-change {
	position: absolute;
	left: 6px;
	right: 6px;
	bottom: 6px;
	z-index: 3;
	min-height: 32px;
	padding: 6px 10px;
	border: 1px solid var(--border-strong);
	border-radius: 8px;
	background: rgba(28, 28, 28, .88);
	color: #fff;
	font-size: 13px;
	font-weight: 500;
}

.esc-inv-own-change:hover {
	border-color: var(--accent);
}

.esc-inv-crop {
	position: fixed;
	inset: 0;
	z-index: 10050;
	display: grid;
	place-items: center;
	padding: 16px;
}

.esc-inv-crop[hidden] {
	display: none;
}

.esc-inv-crop-back {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .64);
}

.esc-inv-crop-dialog {
	position: relative;
	width: min(440px, 100%);
	max-height: calc(100dvh - 32px);
	overflow: auto;
	padding: 20px;
	border: 1px solid var(--border);
	border-radius: 24px;
	background: var(--surface);
	box-shadow: var(--shadow-hover);
}

body.esc-inv-crop-open {
	overflow: hidden;
}

body.esc-inv-crop-open .esc-inv-bar {
	opacity: 0;
	pointer-events: none;
}

.esc-inv-covers-all {
	width: 100%;
	margin-top: 12px;
}

.esc-inv-browse {
	position: fixed;
	inset: 0;
	z-index: 10050;
	display: grid;
	place-items: center;
	padding: 16px;
}

.esc-inv-browse[hidden] {
	display: none;
}

.esc-inv-browse-back {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .64);
}

.esc-inv-browse-dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(720px, 100%);
	max-height: calc(100dvh - 32px);
	overflow: hidden;
	padding: 20px;
	border: 1px solid var(--border);
	border-radius: 24px;
	background: var(--surface);
	box-shadow: var(--shadow-hover);
}

.esc-inv-browse-dialog .esc-inv-legend {
	flex: none;
}

.esc-inv-browse-hero {
	flex: none;
	overflow: hidden;
	width: min(280px, 100%);
	max-height: min(28vh, 210px);
	margin: 0 auto 12px;
	aspect-ratio: 4 / 3;
	border-radius: 12px;
	background: var(--bg);
}

.esc-inv-browse-hero img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.esc-inv-browse-dialog .esc-inv-btn {
	flex: none;
	display: block;
	width: min(100%, 280px);
	margin: 0 auto 14px;
}

.esc-inv-browse-grid {
	flex: 1;
	min-height: 0;
	overflow: auto;
	padding-top: 4px;
	gap: 8px;
	grid-template-columns: repeat(5, minmax(0, 1fr));
}

.esc-inv-browse-grid .esc-inv-cover-pick {
	width: 100%;
	padding: 0;
	background: none;
	border: 0;
	text-align: inherit;
	color: inherit;
}

.esc-inv-browse-grid .esc-inv-cover-pick.is-on .esc-inv-cover-frame {
	border-color: var(--accent);
	box-shadow: 0 0 0 1px var(--accent);
}

body.esc-inv-browse-open {
	overflow: hidden;
}

body.esc-inv-browse-open .esc-inv-bar {
	opacity: 0;
	pointer-events: none;
}

.esc-inv-cover-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}

.esc-inv-cover-pane[hidden] {
	display: none;
}

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

.esc-inv-art-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 12px;
}

.esc-inv-art-more {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin: 0 0 12px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--accent);
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.esc-inv-art-more:hover,
.esc-inv-art-more:focus-visible {
	text-decoration: underline;
}

.esc-inv-art-extra[hidden] {
	display: none;
}

.esc-inv-art-extra-label {
	margin: 4px 0 8px;
}

.esc-inv-art-lib-label {
	margin: 20px 0 10px;
}

.esc-inv-cover-pane[data-esc-cover-pane="art"] {
	position: relative;
}

.esc-inv-cover-pane[data-esc-cover-pane="art"] .esc-inv-btn {
	margin-top: 12px;
}

.esc-inv-cover-pane[data-esc-cover-pane="art"] [data-esc-art-captcha] {
	position: absolute;
	left: 0;
	bottom: 0;
	width: 0;
	height: 0;
	overflow: visible;
}

.esc-inv-covers-certs {
	max-height: 360px;
	overflow: auto;
	padding-right: 4px;
	margin-top: 12px;
}

.esc-inv-crop-stage {
	display: flex;
	justify-content: center;
	overflow: hidden;
	margin-bottom: 12px;
	border-radius: 12px;
	background: #111;
}

.esc-inv-crop-shot {
	position: relative;
	display: inline-block;
	max-width: 100%;
	line-height: 0;
}

.esc-inv-crop-shot img {
	display: block;
	max-width: 100%;
	max-height: min(56vh, 480px);
	width: auto;
	height: auto;
}

.esc-inv-crop-window {
	position: absolute;
	box-sizing: border-box;
	border: 2px solid #fff;
	box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55);
	pointer-events: none;
}

.esc-inv-crop-move {
	display: block;
	margin-bottom: 14px;
	font-size: 14px;
	color: var(--muted);
}

.esc-inv-crop-move[hidden] {
	display: none;
}

.esc-inv-crop-move input {
	display: block;
	width: 100%;
	margin-top: 8px;
	accent-color: var(--accent);
}

.esc-inv-crop-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/* ── Форма ──────────────────────────────────────────────────── */

.esc-inv-form {
	display: flex;
	flex-direction: column;
	gap: 24px;
	min-width: 0;
	padding: clamp(24px, 3vw, 32px);
	border: 1px solid var(--border);
	border-radius: 24px;
	background: var(--surface);
	box-shadow: inset 0 1px 0 var(--edge);
}

.esc-inv-field {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.esc-inv-field-two {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.esc-inv-legend {
	display: block;
	margin-bottom: 10px;
	padding: 0;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--muted-2);
}

.esc-inv-input {
	width: 100%;
	min-height: 52px;
	padding: 13px 16px;
	border: 1px solid var(--border);
	border-radius: 10px;
	background: var(--surface-2);
	color: var(--text);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.4;
	color-scheme: dark;
	transition: border-color .2s var(--ease);
}

.esc-inv-input:hover {
	border-color: var(--border-strong);
}

.esc-inv-input:focus-visible {
	outline: none;
	border-color: var(--accent);
}

.esc-inv-select {
	position: relative;
}

.esc-inv-select .esc-inv-input {
	min-height: 60px;
	padding-right: 44px;
	appearance: none;
	-webkit-appearance: none;
}

.esc-inv-select::after {
	content: "";
	position: absolute;
	right: 18px;
	top: 50%;
	width: 10px;
	height: 10px;
	border-right: 1.6px solid var(--muted);
	border-bottom: 1.6px solid var(--muted);
	transform: translateY(-70%) rotate(45deg);
	pointer-events: none;
}

.esc-inv-date,
.esc-inv-time {
	position: relative;
}

.esc-inv-date-hint {
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--muted-2);
	font-size: 16px;
	line-height: 1.4;
	pointer-events: none;
}

.esc-inv-date:not(.is-set) input[type="date"],
.esc-inv-time:not(.is-set) input[type="time"] {
	color: transparent;
}

.esc-inv-date.is-set .esc-inv-date-hint,
.esc-inv-time.is-set .esc-inv-date-hint {
	display: none;
}

.esc-inv-hours[hidden] {
	display: none;
}

.esc-inv-hours {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.esc-inv-hour,
.esc-inv-chip-btn {
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--surface-2);
	color: var(--muted);
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	transition: border-color .2s var(--ease), color .2s var(--ease), background-color .2s var(--ease), transform .2s var(--ease);
}

.esc-inv-hour:hover,
.esc-inv-chip-btn:hover {
	border-color: var(--border-strong);
	color: var(--text);
	transform: translateY(-2px);
}

.esc-inv-hour.is-on,
.esc-inv-chip-btn.is-on {
	border-color: var(--accent);
	background: var(--accent);
	color: #fff;
	transform: none;
}

.esc-inv-textarea {
	min-height: 96px;
	resize: vertical;
}

.esc-inv-note {
	margin-top: 8px;
	font-size: 14px;
	line-height: 1.45;
	color: var(--muted-2);
}

/* Свёртка «Текст на карточке»: готовые фразы уже стоят, править не обязательно. */
.esc-inv-more {
	border-top: 1px solid var(--border);
	padding-top: 4px;
}

.esc-inv-more-sum {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 44px;
	font-size: 15px;
	font-weight: 500;
	color: var(--text);
}

.esc-inv-more-sum::after {
	content: "";
	width: 10px;
	height: 10px;
	margin-left: 12px;
	border-right: 1.6px solid var(--muted);
	border-bottom: 1.6px solid var(--muted);
	transform: rotate(45deg);
	transition: transform .2s var(--ease);
}

.esc-inv-more[open] .esc-inv-more-sum::after {
	transform: rotate(225deg);
	margin-top: 6px;
}

.esc-inv-more-body {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 8px 0 4px;
}

.esc-inv-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.esc-inv-chip {
	position: relative;
	display: inline-flex;
}

.esc-inv-chip input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.esc-inv-chip span {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 10px 18px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--surface-2);
	color: var(--muted);
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	transition: border-color .2s var(--ease), color .2s var(--ease), background-color .2s var(--ease), transform .2s var(--ease);
}

.esc-inv-chip:hover span {
	border-color: var(--border-strong);
	color: var(--text);
	transform: translateY(-2px);
}

.esc-inv-chip input:checked + span {
	border-color: var(--accent);
	background: var(--accent);
	color: #fff;
	transform: none;
}

.esc-inv-chip input:focus-visible + span {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.esc-inv-palettes {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 18px;
}

.esc-inv-palette {
	position: relative;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.esc-inv-palette input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.esc-inv-palette-dot {
	display: block;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 2px solid var(--border-strong);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
	cursor: pointer;
	transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}

.esc-inv-palette:hover .esc-inv-palette-dot {
	transform: translateY(-2px);
	border-color: var(--text);
}

.esc-inv-palette input:checked + .esc-inv-palette-dot {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px rgba(255, 0, 4, .28), inset 0 0 0 1px rgba(255, 255, 255, .18);
	transform: none;
}

.esc-inv-palette input:focus-visible + .esc-inv-palette-dot {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

.esc-inv-palette-name {
	font-size: 12px;
	font-weight: 500;
	line-height: 1.2;
	color: var(--muted);
}

.esc-inv-palette input:checked ~ .esc-inv-palette-name {
	color: var(--text);
}

.esc-inv-covers {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	padding-top: 6px;
}

.esc-inv-cover-pick {
	position: relative;
	display: block;
	min-width: 0;
	cursor: pointer;
}

.esc-inv-cover-pick[hidden] {
	display: none;
}

.esc-inv-cover-pick input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.esc-inv-cover-frame {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	border: 2px solid transparent;
	border-radius: 12px;
	background: var(--bg);
	transition: border-color .2s var(--ease), transform .3s var(--ease);
}

.esc-inv-cover-frame img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .45s var(--ease);
}

.esc-inv-cover-pick:hover .esc-inv-cover-frame {
	transform: translateY(-6px);
}

.esc-inv-cover-pick:hover .esc-inv-cover-frame img {
	transform: scale(1.04);
}

.esc-inv-cover-pick input:checked + .esc-inv-cover-frame {
	border-color: var(--accent);
	box-shadow: 0 0 0 1px var(--accent);
}

.esc-inv-cover-wait {
	display: block;
	position: absolute;
	inset: 0;
	z-index: 1;
	opacity: 0;
	pointer-events: none;
	overflow: hidden;
	background: rgba(28, 28, 28, .35);
	transition: opacity .3s var(--ease);
}

.esc-inv-cover.is-wait .esc-inv-cover-wait {
	opacity: 1;
}

.esc-inv-cover-wait::after,
.esc-inv-cover-frame.is-wait::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(100deg, transparent 25%, rgba(255, 255, 255, .07) 50%, transparent 75%);
	transform: translateX(-100%);
	animation: esc-inv-wait-sweep 1.5s var(--ease) infinite;
}

.esc-inv-cover-frame.is-wait::after {
	z-index: 1;
	pointer-events: none;
}

@keyframes esc-inv-wait-sweep {
	to {
		transform: translateX(100%);
	}
}

.esc-inv-cover-pick input:focus-visible + .esc-inv-cover-frame {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* ── Карточка крупно (с миниатюры в нижней полоске) ─────────── */

.esc-inv-peek {
	position: fixed;
	inset: 0;
	z-index: 10050;
	display: grid;
	place-items: center;
	padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
}

.esc-inv-peek[hidden] {
	display: none;
}

.esc-inv-peek-back {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .82);
}

.esc-inv-peek-dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: min(calc(100vw - 32px), 420px, calc((100dvh - 210px) * .75));
	padding-top: 56px;
}

.esc-inv-peek-x {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--border-strong);
	border-radius: 50%;
	background: rgba(28, 28, 28, .88);
	color: #fff;
	font-size: 26px;
	line-height: 1;
}

.esc-inv-peek-x:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.esc-inv-peek-actions {
	display: flex;
	gap: 10px;
}

.esc-inv-peek-actions .esc-inv-btn {
	min-width: 0;
	min-height: 48px;
	padding: 12px 10px;
	font-size: 15px;
}

.esc-inv-peek .esc-inv-hint {
	min-height: 0;
	margin: 0;
	text-align: center;
}

.esc-inv-peek .esc-inv-hint:empty {
	display: none;
}

body.esc-inv-peek-open {
	overflow: hidden;
}

body.esc-inv-peek-open .esc-inv-bar {
	opacity: 0;
	pointer-events: none;
}

@keyframes esc-inv-dock-in {
	from {
		opacity: 0;
		transform: scale(.7);
	}
}

/* ── Нижняя полоска на телефоне ─────────────────────────────── */

.esc-inv-bar {
	display: none;
}

@media (max-width: 900px) {
	.esc-inv-actions-desk {
		display: none;
	}

	.esc-inv-bar {
		position: fixed;
		left: 12px;
		right: 12px;
		bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		z-index: 980;
		display: flex;
		align-items: center;
		gap: 10px;
		padding: 10px;
		border: 1px solid var(--border);
		border-radius: 16px;
		background: rgba(28, 28, 28, .92);
		box-shadow: var(--shadow-hover);
	}

	.esc-inv-dock {
		flex: none;
		width: 54px;
		border-radius: 8px;
		outline-offset: 2px;
		cursor: zoom-in;
		animation: esc-inv-dock-in .25s var(--ease);
	}

	.esc-inv-dock[hidden] {
		display: none;
	}

	.esc-inv-dock:focus-visible {
		outline: 2px solid var(--accent);
	}

	.esc-inv .esc-inv-dock .esc-inv-frame {
		border-radius: 8px;
		box-shadow: 0 0 0 1px var(--border-strong);
		pointer-events: none;
	}

	.esc-inv-bar .esc-inv-btn {
		flex: 1;
		min-width: 0;
		min-height: 48px;
		padding: 12px 10px;
		font-size: 15px;
	}

	.esc-inv-bar .esc-inv-btn[hidden] {
		display: none;
	}

	.esc-inv-covers {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.esc-inv-browse-grid {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}

	.esc-inv .esc-inv-frame:hover {
		box-shadow: var(--shadow);
	}

	body.menu-open .esc-inv-bar {
		opacity: 0;
		pointer-events: none;
	}
}

@media (max-width: 520px) {
	.esc-inv-field-two {
		gap: 10px;
	}

	.esc-inv-browse-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (prefers-reduced-motion: reduce) {
	.esc-inv *,
	.esc-inv *::before,
	.esc-inv *::after {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
	}

	.esc-inv-btn:hover,
	.esc-inv-btn-ghost:hover,
	.esc-inv-chip:hover span,
	.esc-inv-palette:hover .esc-inv-palette-dot,
	.esc-inv-cover-pick:hover,
	.esc-inv-cover-pick:hover .esc-inv-cover-frame,
	.esc-inv-hour:hover,
	.esc-inv-chip-btn:hover {
		transform: none;
	}

	.esc-inv-cover-pick:hover .esc-inv-cover-frame img {
		transform: none;
	}

	.esc-inv-cover-wait::after,
	.esc-inv-cover-frame.is-wait::after {
		animation: none !important;
	}
}
