/* =====================================================================
   ATMOS - новогодняя тема
   Включается в config.tpl (переменная new_year). Логика - js/newyear.js
   и js/newyear-games.js
   ===================================================================== */

:root {
	--ny-red: #ff5d6c;
	--ny-green: #55d67a;
	--ny-blue: #4aa8ff;
	--ny-gold: #ffc53d;
	--ny-pink: #ff7ad1;
	--ny-ice: #7cf0ff;
	--ny-overlay: rgba(5, 9, 18, .74);
	--ny-night: linear-gradient(180deg, #071022 0%, #13284a 60%, #22406b 100%);
	--ny-snowcap: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 12' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff'/%3E%3Cstop offset='1' stop-color='%23dbe7f5'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 12C2 7 6 5 12 5c10 0 14-3 24-3s16 3 28 3 18-4 30-4 16 4 26 4 18-3 30-3 14 3 26 3 18-4 30-4 16 3 28 3 14-2 24-2c10 0 18 3 28 3 6 0 10 2 14 7z' fill='url(%23g)'/%3E%3C/svg%3E");
	--ny-drift: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='f' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='1' stop-color='%23e3edf8'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 20C80 6 170 8 250 16s150-12 270-6 180 14 300 4 170-10 250-2 100 10 130 6V40H0z' fill='%2396aecb' fill-opacity='.35'/%3E%3Cpath d='M0 27c110-12 200-10 300-2s180-12 300-6 200 14 310 6 210-8 290-2V40H0z' fill='%23c9d8ea' fill-opacity='.75'/%3E%3Cpath d='M0 33c130-8 250-7 370-2s230-8 350-4 220 9 330 4 110-3 150-1V40H0z' fill='url(%23f)'/%3E%3C/svg%3E");
	--ny-hat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 32'%3E%3Cpath d='M6 24C8 12 16 3 27 4c5 1 8 5 9 10-4-3-8-3-10 1-3 5-4 9-4 9z' fill='%23e5484d'/%3E%3Cpath d='M27 4c5 1 8 5 9 10-4-3-8-3-10 1z' fill='%23b8323d'/%3E%3Crect x='3' y='21' width='24' height='8' rx='4' fill='%23fff'/%3E%3Ccircle cx='35' cy='16' r='4.5' fill='%23fff'/%3E%3C/svg%3E");
}

.ny [hidden] {
	display: none !important;
}

body.ny-modal-open {
	overflow: hidden;
}

/* ---------- Снег ---------- */
.ny-snow {
	position: fixed;
	inset: 0;
	z-index: 1040;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

/* ---------- Снежные шапки на карточках ---------- */
.ny .block::before {
	content: "";
	position: absolute;
	top: -6px;
	left: 10px;
	right: 10px;
	z-index: 2;
	height: 11px;
	background: var(--ny-snowcap) 0 0 / 100% 100% no-repeat;
	filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .22));
	pointer-events: none;
}

.ny .block.block-table::before {
	top: 0;
}

/* ---------- Сугробы на HUD-полосе и в футере ---------- */
.ny .hud-band::after,
.ny .footer::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	z-index: 1;
	height: 40px;
	background: var(--ny-drift) 0 100% / 100% 100% no-repeat;
	filter: drop-shadow(0 -2px 6px rgba(180, 210, 255, .18));
	pointer-events: none;
}

.ny .footer::after {
	height: 34px;
}

/* ---------- Новогодняя шапка на аватарке ---------- */
.ny .user-chip::before,
.ny-ava--hat::after {
	content: "";
	position: absolute;
	z-index: 2;
	background: var(--ny-hat) center / contain no-repeat;
	transform: rotate(-18deg);
	pointer-events: none;
}

.ny .user-chip::before {
	top: -9px;
	left: -3px;
	width: 28px;
	height: 22px;
}

/* ---------- Кнопки в шапке: одна «пилюля» в стиле переключателя темы ---------- */
.ny-tools {
	order: 3;
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 2px;
	height: 34px;
	padding: 3px;
	border: 1px solid var(--hud-border);
	border-radius: 999px;
	background: var(--hud-surface);
}

.ny-tools > button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 26px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--hud-muted);
	font-size: 14px;
	cursor: pointer;
	transition: color .2s, background .2s;
}

.ny-tools > button:hover {
	background: var(--hud-surface-2);
	color: var(--hud-text);
}

.ny-tools .ny-fx-toggle[aria-pressed="true"] {
	background: var(--accent);
	color: var(--accent-ink);
}

.ny-fx-toggle svg {
	transition: transform .3s var(--ease);
}

.ny-fx-toggle:hover svg {
	transform: rotate(60deg);
}

.ny-tools:hover {
	border-color: var(--hud-muted);
}

/* в бургер-меню (до 992px шапка без пилюли) */
.ny-nav-item b {
	margin-left: 2px;
	color: var(--accent);
	font-weight: 600;
}

.ny-nav-item .fa-snowflake,
.ny-nav-item .fa-gamepad {
	width: 18px;
	color: var(--accent);
	text-align: center;
}

@media (max-width: 991.98px) {
	.ny-tools {
		display: none;
	}
}

@media (min-width: 992px) {
	.ny-nav-item {
		display: none !important;
	}
}

/* те же отступы и размеры, что у .theme-toggle в atmos.css */
@media (min-width: 992px) {
	.ny-tools {
		margin-left: 8px;
	}
}

@media (min-width: 992px) and (max-width: 1199.98px) {
	.ny-tools {
		height: 38px;
		margin-left: 4px;
		padding: 4px;
		border-radius: var(--radius-s);
	}

	.ny-tools > button {
		height: 28px;
		border-radius: calc(var(--radius-s) - 4px);
	}
}

/* ---------- Гирлянда ---------- */
.ny-garland {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 3;
	height: 50px;
	pointer-events: none;
}

.ny-garland--band {
	top: 0;
	z-index: 2;
}

.ny-garland__wire {
	position: absolute;
	top: 0;
	left: 0;
	overflow: visible;
}

.ny-garland__cord {
	fill: none;
	stroke: #1c2617;
	stroke-width: 3.2;
	stroke-linecap: round;
}

/* витой провод: светлая пунктирная жилка поверх тёмной */
.ny-garland__twist {
	fill: none;
	stroke: #56704a;
	stroke-width: 1.4;
	stroke-dasharray: 4 3;
	stroke-linecap: round;
}

.ny-garland__hooks {
	fill: #56704a;
	stroke: #1c2617;
	stroke-width: 1.2;
}

/* Лампочка C9: цоколь + стеклянная колба, висит строго вниз и чуть качается */
.ny-bulb {
	--c: var(--ny-red);
	position: absolute;
	width: 14px;
	height: 30px;
	margin-left: -7px;
	transform-origin: 50% 0;
	animation: ny-swing 3.4s ease-in-out infinite alternate;
	animation-delay: calc(var(--rnd) * -3.4s);
	cursor: pointer;
	pointer-events: auto;
}

.ny-bulb--c1 { --c: var(--ny-gold); }
.ny-bulb--c2 { --c: var(--ny-green); }
.ny-bulb--c3 { --c: var(--ny-blue); }
.ny-bulb--c4 { --c: var(--ny-pink); }

.ny-bulb b {
	position: absolute;
	top: 0;
	left: 3px;
	width: 8px;
	height: 8px;
	border-radius: 2px 2px 3px 3px;
	background:
		repeating-linear-gradient(180deg, rgba(255, 255, 255, .14) 0 1px, transparent 1px 3px),
		linear-gradient(90deg, #1f2a1a, #3f5236 45%, #1f2a1a);
}

.ny-bulb i {
	position: absolute;
	top: 7px;
	left: 1px;
	width: 12px;
	height: 19px;
	border-radius: 45% 45% 50% 50% / 30% 30% 70% 70%;
	background:
		radial-gradient(ellipse 30% 22% at 34% 28%, rgba(255, 255, 255, .9), transparent),
		linear-gradient(90deg,
			color-mix(in srgb, var(--c) 65%, #000) 0%,
			var(--c) 30%,
			color-mix(in srgb, var(--c) 55%, #fff) 50%,
			var(--c) 70%,
			color-mix(in srgb, var(--c) 65%, #000) 100%);
	box-shadow: 0 0 6px 0 var(--c);
	transition: transform .15s;
}

/* Ореол: круглый и меньше шага между лампочками, чтобы соседние не сливались в полосу */
.ny-bulb::after {
	content: "";
	position: absolute;
	top: 0;
	left: 50%;
	width: 32px;
	height: 32px;
	z-index: -1;
	margin-top: 2px;
	margin-left: -16px;
	border-radius: 50%;
	background: radial-gradient(circle, color-mix(in srgb, var(--c) 42%, transparent) 0, transparent 66%);
	pointer-events: none;
	transition: opacity .3s;
}

.ny-bulb.is-popped::after {
	opacity: 0;
}

.ny-bulb:hover i {
	transform: scale(1.15);
}

.ny-bulb.is-popped i {
	background:
		radial-gradient(ellipse 30% 22% at 34% 28%, rgba(255, 255, 255, .3), transparent),
		#3a4235;
	box-shadow: none;
	animation: none !important;
}

@keyframes ny-swing {
	from { transform: rotate(-4deg); }
	to { transform: rotate(4deg); }
}

.ny-garland[data-mode="chase"] .ny-bulb i {
	animation: ny-bulb-blink 1.4s ease-in-out infinite;
	animation-delay: calc(var(--i) * .1s);
}

.ny-garland[data-mode="twinkle"] .ny-bulb i {
	animation: ny-bulb-blink 2.4s ease-in-out infinite;
	animation-delay: calc(var(--rnd) * -2.4s);
}

.ny-garland[data-mode="alternate"] .ny-bulb i {
	animation: ny-bulb-blink 1.2s steps(1) infinite;
}

.ny-garland[data-mode="alternate"] .ny-bulb:nth-of-type(even) i {
	animation-delay: -.6s;
}

.ny-garland[data-mode="glow"] .ny-bulb i {
	animation: ny-bulb-breathe 3s ease-in-out infinite;
}

@keyframes ny-bulb-blink {
	0%, 100% { filter: none; }
	50% { filter: brightness(.5) saturate(.7); box-shadow: none; }
}

@keyframes ny-bulb-breathe {
	0%, 100% { filter: brightness(1.1); }
	50% { filter: brightness(.7); }
}

.ny-calm .ny-bulb,
.ny-calm .ny-bulb i {
	animation: none !important;
}

/* HUD-полоса: гирлянда сверху, сани летают за контентом */
.ny .hud-band {
	overflow: hidden;
}

.ny .hud-band:not(.hud-band--hero) {
	padding-top: 56px;
}

.ny .hud-band > .container {
	position: relative;
	z-index: 1;
}

/* ---------- Сани ---------- */
.ny-sleigh {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 1036;
	width: 270px;
	height: 110px;
	cursor: pointer;
	will-change: transform;
	filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35));
}

.ny-sleigh--band {
	position: absolute;
	z-index: 0;
	opacity: .9;
}

.ny-sleigh svg {
	display: block;
	width: 100%;
	height: 100%;
}

.ny-sl-fur { fill: #9b6a44; }
.ny-sl-belly { fill: #e2c29c; }
.ny-sl-eye { fill: #1b1f27; }
.ny-sl-nose { fill: #ff3b3b; filter: drop-shadow(0 0 5px #ff3b3b); animation: ny-nose 1.2s ease-in-out infinite; }
.ny-sl-bell { fill: #ffc53d; }
.ny-sl-coat { fill: #d93a3a; }
.ny-sl-belt { fill: #1b1f27; }
.ny-sl-skin { fill: #f6c9a4; }
.ny-sl-beard { fill: #ffffff; }
.ny-sl-sack { fill: #8b5a2b; }
.ny-sl-gift { fill: #3fae5a; }
.ny-sl-body { fill: #c8323d; }

.ny-sl-antler,
.ny-sl-leg,
.ny-sl-rein,
.ny-sl-trim,
.ny-sl-runner,
.ny-sl-tie,
.ny-sl-ribbon,
.ny-sl-collar {
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ny-sl-antler { stroke: #e2c29c; stroke-width: 2.6; }
.ny-sl-leg { stroke: #7a4f31; stroke-width: 3.4; }
.ny-sl-rein { stroke: #6b3d1f; stroke-width: 1.6; }
.ny-sl-trim { stroke: #ffc53d; stroke-width: 2.4; }
.ny-sl-runner { stroke: #ffc53d; stroke-width: 3.2; }
.ny-sl-tie { stroke: #5c3a1b; stroke-width: 2; }
.ny-sl-ribbon { stroke: #ffc53d; stroke-width: 2; }
.ny-sl-collar { stroke: #c8323d; stroke-width: 3; }

.ny-sl-leg {
	transform-box: fill-box;
	transform-origin: 50% 0;
	animation: ny-gallop .42s ease-in-out infinite alternate;
}

.ny-sl-leg--b {
	animation-delay: -.42s;
}

@keyframes ny-gallop {
	from { transform: rotate(-18deg); }
	to { transform: rotate(18deg); }
}

@keyframes ny-nose {
	50% { opacity: .55; }
}

.ny-sleigh-spark {
	position: fixed;
	z-index: 1035;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 0 6px 2px rgba(150, 210, 255, .8);
	pointer-events: none;
	animation: ny-spark 1.4s ease-out forwards;
}

.ny-sleigh-spark--band {
	position: absolute;
	z-index: 0;
}

@keyframes ny-spark {
	to {
		transform: translate(var(--dx), var(--dy)) scale(.2);
		opacity: 0;
	}
}

/* ---------- Салюты ---------- */
.ny-fireworks {
	position: fixed;
	inset: 0;
	z-index: 1065;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.ny .footer {
	overflow: hidden;
}

.ny-footer-fw {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.ny .footer > :not(.ny-footer-fw) {
	position: relative;
	z-index: 1;
}

/* ---------- Блок отсчёта ---------- */
.ny-countdown__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
	margin-bottom: 16px;
}

.ny-countdown__cell {
	padding: 10px 4px 8px;
	border: 1px solid var(--border);
	border-radius: var(--radius-s);
	background: var(--surface-2);
	text-align: center;
}

.ny-countdown__cell b {
	display: block;
	color: var(--accent-text, var(--accent));
	font-family: var(--font-display);
	font-size: 24px;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	line-height: 1.1;
}

.ny-countdown__cell span {
	color: var(--text-muted);
	font-size: 12px;
}

.ny-countdown__greet {
	margin-bottom: 16px;
	color: var(--text);
	font-size: 15px;
	text-align: center;
}

.ny-countdown__music {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 8px 12px 8px 8px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--surface-2);
	color: var(--text-strong);
	font-size: 14px;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
}

.ny-countdown__music small {
	display: block;
	color: var(--text-muted);
	font-size: 12px;
	font-weight: 400;
}

.ny-countdown__play {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--accent-gradient);
	color: var(--accent-ink);
	font-size: 13px;
}

.ny-countdown__play .fa-pause,
.is-playing .ny-countdown__play .fa-play {
	display: none;
}

.is-playing .ny-countdown__play .fa-pause {
	display: inline;
}

.ny-countdown__games {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 14px;
}

.ny-countdown__games .btn {
	flex: 1 1 auto;
}

/* ---------- Всплывашка ---------- */
.ny-toast {
	position: fixed;
	left: 50%;
	bottom: 26px;
	z-index: 1070;
	max-width: calc(100% - 32px);
	padding: 11px 20px;
	border: 1px solid rgba(74, 168, 255, .5);
	border-radius: 14px;
	background: rgba(11, 22, 48, .92);
	box-shadow: 0 0 24px rgba(74, 168, 255, .3), 0 14px 30px -10px rgba(0, 0, 0, .6);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	text-align: center;
	transform: translate(-50%, 20px);
	opacity: 0;
	transition: opacity .25s, transform .25s var(--ease);
	pointer-events: none;
}

.ny-toast .fa-snowflake {
	color: var(--ny-blue);
}

.ny-toast.is-shown {
	transform: translate(-50%, 0);
	opacity: 1;
}

/* ---------- Модальное окно ---------- */
.ny-modal {
	position: fixed;
	inset: 0;
	z-index: 1060;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: var(--ny-overlay);
	-webkit-backdrop-filter: blur(5px);
	backdrop-filter: blur(5px);
	animation: ny-fade .2s ease-out;
}

.ny-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 460px;
	max-height: calc(100vh - 32px);
	overflow: auto;
	padding: 20px;
	border: 1px solid var(--border);
	border-radius: var(--radius-l);
	background: var(--surface);
	box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7);
	color: var(--text);
	animation: ny-pop .25s var(--ease);
}

.ny-modal--wide .ny-modal__dialog {
	max-width: 980px;
}

.ny-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.ny-modal__title {
	margin: 0;
	color: var(--text-strong);
	font-family: var(--font-display);
	font-size: 20px;
	font-weight: 600;
}

.ny-modal__close {
	flex: none;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--surface-2);
	color: var(--text-muted);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.ny-modal__close:hover {
	color: var(--text-strong);
}

@keyframes ny-fade {
	from { opacity: 0; }
}

@keyframes ny-pop {
	from { transform: translateY(12px) scale(.98); opacity: 0; }
}

/* ---------- Общие элементы игр ---------- */
.ny-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 14px;
}

.ny-tabs button {
	padding: 6px 14px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--surface-2);
	color: var(--text-muted);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.ny-tabs button.is-active {
	border-color: transparent;
	background: var(--accent-gradient);
	color: var(--accent-ink);
}

.ny-game__stats {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 10px;
	color: var(--text-muted);
	font-size: 14px;
	font-variant-numeric: tabular-nums;
}

.ny-game__stats b {
	color: var(--text-strong);
}

.ny-game__hint {
	margin: 10px 0 0;
	color: var(--text-muted);
	font-size: 13px;
	text-align: center;
}

.ny-game__hint:empty {
	display: none;
}

.ny-empty {
	margin: 0;
	padding: 18px 8px;
	color: var(--text-muted);
	text-align: center;
}

.text-gold {
	color: var(--ny-gold);
}

.text-red {
	color: var(--ny-red);
}

.ny-round-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .22);
	border-radius: 50%;
	background: rgba(8, 16, 32, .55);
	color: #fff;
	font-size: 15px;
	cursor: pointer;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.ny-round-btn:hover,
.ny-round-btn.is-playing {
	border-color: var(--ny-gold);
	color: var(--ny-gold);
}

/* Аватар и звания */
.ny-ava {
	position: relative;
	flex: none;
	display: inline-block;
	width: 48px;
	height: 48px;
}

.ny-ava img {
	width: 100%;
	height: 100%;
	border-radius: 14px;
	object-fit: cover;
}

.ny-ava--hat::after {
	top: -11px;
	left: -8px;
	width: 32px;
	height: 26px;
}

.ny-user {
	display: block;
	overflow: hidden;
	color: var(--text-strong);
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ny-user:hover {
	color: var(--link-hover, var(--accent));
}

.ny-rank {
	display: block;
	font-size: 12px;
	font-weight: 700;
}

.ny-rank--ge { color: #ffb02e; }
.ny-rank--le { color: #e0a84a; }
.ny-rank--mg { color: #7cb7ff; }
.ny-rank--gn { color: #e6c35c; }
.ny-rank--silver { color: #a8b3c2; }

/* ---------- aim_snow: игра и табло сезона ---------- */
.ny-aim {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 290px;
	gap: 16px;
	margin-bottom: 24px;
}

.ny-tir {
	position: relative;
	height: clamp(340px, 34vw, 430px);
	overflow: hidden;
	border: 1px solid var(--hud-border);
	border-radius: var(--radius-l);
	background: var(--ny-night);
	box-shadow: 0 20px 50px -24px rgba(0, 0, 0, .8);
	color: #fff;
	-webkit-user-select: none;
	user-select: none;
}

.ny-modal .ny-tir {
	height: clamp(320px, 62vh, 520px);
}

.ny-tir__canvas {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
}

.ny-tir.is-playing .ny-tir__canvas {
	cursor: none;
	touch-action: none;
}

.ny-tir__screen {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 24px 20px;
	text-align: center;
	text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}

/* подложка под текстом: сцена светлая внизу (сугробы), без неё текст теряется */
.ny-tir__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 580px;
	padding: 20px 26px;
	border: 1px solid rgba(255, 255, 255, .1);
	border-radius: var(--radius-l);
	background: rgba(6, 10, 22, .62);
	box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .7);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.ny-tir__card > :last-child {
	margin-bottom: 0;
}

.ny-tir__eyebrow {
	margin: 0 0 6px;
	color: var(--accent);
	font-family: var(--font-display);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
}

.ny-tir__title {
	margin: 0 0 14px;
	color: #fff;
	font-family: var(--font-display);
	font-size: clamp(24px, 3.4vw, 36px);
	font-weight: 700;
	line-height: 1.1;
}

.ny-tir__rules {
	display: grid;
	grid-template-columns: repeat(2, auto);
	gap: 6px 18px;
	margin: 0 0 18px;
	padding: 0;
	color: #dbe6f5;
	font-size: 14px;
	list-style: none;
	text-align: left;
}

.ny-tir__rules b {
	display: inline-block;
	min-width: 30px;
	color: var(--accent);
	font-family: var(--font-display);
}

.ny-tir__start {
	min-width: 180px;
	font-family: var(--font-display);
	letter-spacing: .06em;
	text-transform: uppercase;
	box-shadow: var(--accent-glow);
}

.ny-tir__best {
	margin: 12px 0 0;
	color: #c3cfdf;
	font-size: 14px;
}

.ny-tir__best b {
	color: var(--accent);
}

.ny-tir__best a,
.ny-tir__save a {
	color: var(--accent);
	text-decoration: underline;
}

.ny-tir__score {
	color: var(--accent);
	font-family: var(--font-display);
	font-size: clamp(52px, 8vw, 78px);
	font-weight: 800;
	line-height: 1;
	text-shadow: 0 0 28px rgba(var(--accent-rgb), .45);
}

.ny-tir__screen .ny-rank {
	margin-top: 4px;
	font-family: var(--font-display);
	font-size: 15px;
	letter-spacing: .04em;
}

.ny-tir__summary {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 12px 0 8px;
}

.ny-tir__summary span {
	min-width: 70px;
	padding: 6px 10px;
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: var(--radius-s);
	background: rgba(5, 10, 20, .5);
	color: #b9c6d8;
	font-size: 12px;
}

.ny-tir__summary b {
	display: block;
	color: #fff;
	font-family: var(--font-display);
	font-size: 18px;
}

.ny-tir__save {
	margin: 0 0 14px;
	color: #c3cfdf;
	font-size: 14px;
}

.ny-tir__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.ny-tir__screen .btn-outline-primary {
	border-color: rgba(255, 255, 255, .35);
	background: rgba(5, 10, 20, .45);
	color: #fff;
}

/* HUD в духе CS: очки слева, время по центру, статистика справа */
.ny-tir__hud {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: end;
	gap: 10px;
	padding: 12px 16px;
	background: linear-gradient(0deg, rgba(5, 10, 20, .55), transparent);
	color: var(--accent);
	font-family: var(--font-display);
	pointer-events: none;
	text-shadow: 0 0 8px rgba(var(--accent-rgb), .45);
}

.ny-hud small {
	display: block;
	color: rgba(var(--accent-rgb), .75);
	font-size: 11px;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.ny-hud--score b {
	font-size: 34px;
	line-height: 1;
}

.ny-hud--time {
	text-align: center;
}

.ny-hud--time b {
	display: block;
	font-size: 28px;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.ny-hud__bar {
	display: block;
	width: 120px;
	height: 3px;
	margin-top: 6px;
	overflow: hidden;
	border-radius: 999px;
	background: rgba(var(--accent-rgb), .2);
}

.ny-hud__bar i {
	display: block;
	height: 100%;
	background: var(--accent);
	transition: width .1s linear;
}

.ny-hud--time.is-low {
	color: var(--ny-red);
	animation: ny-low .5s ease-in-out infinite alternate;
}

.ny-hud--time.is-low .ny-hud__bar i {
	background: var(--ny-red);
}

@keyframes ny-low {
	to { opacity: .55; }
}

.ny-hud--stats {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	font-size: 14px;
}

.ny-hud--stats b {
	font-size: 20px;
}

.ny-tir__tools {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 3;
	display: flex;
	gap: 8px;
}

.text-ice {
	color: var(--ny-ice) !important;
}

/* Табло сезона - как TAB в CS 1.6 */
.ny-board {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	padding: 16px;
	border: 1px solid var(--hud-border);
	border-radius: var(--radius-l);
	background: var(--hud-bg);
	color: var(--hud-text);
}

.ny-board__head b {
	display: block;
	color: var(--accent);
	font-family: var(--font-display);
	font-size: 20px;
	letter-spacing: .04em;
}

.ny-board__head span {
	color: var(--hud-muted);
	font-size: 13px;
}

.ny-board__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.ny-board__table th {
	padding: 0 4px 6px;
	border-bottom: 1px solid var(--hud-border);
	color: var(--hud-muted);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .08em;
	text-align: left;
	text-transform: uppercase;
}

.ny-board__table th:nth-child(n+3) {
	text-align: right;
}

.ny-board__table td {
	padding: 7px 4px;
	border-bottom: 1px solid rgba(255, 255, 255, .05);
	vertical-align: middle;
}

.ny-board__pos {
	width: 20px;
	color: var(--hud-muted);
	font-family: var(--font-display);
}

.ny-board__table tbody tr:first-child .ny-board__pos {
	color: var(--accent);
}

.ny-board__name {
	max-width: 0;
	width: 100%;
}

.ny-board__name .ny-user {
	color: var(--hud-text);
	font-size: 13px;
}

.ny-board__name .ny-rank {
	font-size: 11px;
}

.ny-board__num {
	color: var(--hud-muted);
	font-variant-numeric: tabular-nums;
	text-align: right;
	white-space: nowrap;
}

.ny-board__score {
	color: var(--accent);
	font-family: var(--font-display);
	font-size: 15px;
}

.ny-board__empty {
	padding: 18px 4px !important;
	color: var(--hud-muted);
	text-align: center;
}

.ny-board__me {
	margin-top: auto;
	color: var(--hud-muted);
	font-size: 13px;
}

.ny-board__me b {
	color: var(--hud-text);
}

.ny-board__me a {
	color: var(--accent);
	text-decoration: underline;
}

.ny-board .btn-outline-primary {
	border-color: var(--hud-border);
	color: var(--hud-text);
}

/* ---------- Пожелания проекту ---------- */
.ny-wishes__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 18px;
}

.ny-wishes__head h3 {
	margin: 0 0 6px;
	color: var(--text-strong);
	font-family: var(--font-display);
	font-size: 20px;
	font-weight: 600;
}

.ny-wishes__head h3 i {
	color: var(--accent);
}

.ny-wishes__head p {
	max-width: 560px;
	margin: 0;
	color: var(--text-muted);
}

.ny-wishes__stats {
	display: flex;
	flex: none;
	gap: 8px;
}

.ny-wishes__stats span {
	min-width: 72px;
	padding: 8px 10px;
	border: 1px solid var(--border);
	border-radius: var(--radius-s);
	background: var(--surface-2);
	color: var(--text-muted);
	font-size: 12px;
	text-align: center;
}

.ny-wishes__stats b {
	display: block;
	color: var(--text-strong);
	font-family: var(--font-display);
	font-size: 20px;
}

.ny-wishes__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 18px;
}

.ny-stickers {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 16px;
}

.ny-stickers--wall {
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.ny-sticker {
	--paper: #fff3b0;
	--ink: #4a3b00;
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 170px;
	padding: 16px 14px 12px;
	border-radius: 4px 4px 14px 4px;
	background: linear-gradient(180deg, rgba(255, 255, 255, .35), transparent 30%), var(--paper);
	box-shadow: 0 10px 18px -10px rgba(0, 0, 0, .55), 0 1px 0 rgba(0, 0, 0, .06);
	color: var(--ink);
	transform: rotate(var(--tilt, 0deg));
	transition: transform .2s var(--ease);
}

.ny-sticker:hover {
	transform: rotate(0deg) translateY(-2px);
}

/* скотч сверху */
.ny-sticker::before {
	content: "";
	position: absolute;
	top: -9px;
	left: 50%;
	width: 64px;
	height: 18px;
	margin-left: -32px;
	background: rgba(255, 255, 255, .45);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .1);
	transform: rotate(-3deg);
}

.ny-sticker--server { --paper: #ffe08a; --ink: #4d3800; }
.ny-sticker--site { --paper: #bfe0ff; --ink: #0f3557; }
.ny-sticker--admins { --paper: #c9f0c4; --ink: #1d4a17; }
.ny-sticker--events { --paper: #ffc9e4; --ink: #5a1739; }
.ny-sticker--other { --paper: #e2d4ff; --ink: #34205e; }

.ny-sticker header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	margin-bottom: 8px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.ny-sticker__cat {
	opacity: .75;
}

.ny-sticker__status {
	padding: 2px 7px;
	border-radius: 999px;
	background: rgba(0, 0, 0, .1);
}

.ny-sticker__status.is-2 {
	background: #2f8f3a;
	color: #fff;
}

.ny-sticker__status.is-1 {
	background: rgba(0, 0, 0, .7);
	color: #fff;
}

.ny-sticker p {
	flex: 1;
	margin: 0 0 12px;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	word-break: break-word;
}

.ny-sticker footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.ny-sticker__author {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	overflow: hidden;
	color: inherit;
	font-size: 12px;
	font-weight: 600;
	opacity: .85;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ny-sticker__author:hover {
	color: inherit;
	opacity: 1;
}

.ny-sticker__author img {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	object-fit: cover;
}

.ny-like {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: 5px;
	padding: 4px 10px;
	border: 0;
	border-radius: 999px;
	background: rgba(0, 0, 0, .1);
	color: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: background .2s, transform .15s;
}

.ny-like:hover:not(:disabled) {
	background: rgba(0, 0, 0, .18);
}

.ny-like:active:not(:disabled) {
	transform: scale(.92);
}

.ny-like.is-liked {
	background: #e5484d;
	color: #fff;
}

.ny-like:disabled {
	cursor: default;
	opacity: .6;
}

.ny-sticker__tools {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px dashed rgba(0, 0, 0, .2);
}

.ny-chip {
	padding: 3px 8px;
	border: 1px solid rgba(0, 0, 0, .2);
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font-size: 11px;
	font-weight: 600;
	cursor: pointer;
}

.ny-chip.is-active {
	border-color: transparent;
	background: rgba(0, 0, 0, .75);
	color: #fff;
}

.ny-chip--danger {
	margin-left: auto;
	color: #a3262c;
}

.ny-wall-bar {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 6px;
}

.ny-wish-form__label {
	margin: 0 0 8px;
	color: var(--text-muted);
	font-size: 13px;
}

.ny-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 12px;
}

.ny-cat input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.ny-cat span {
	display: inline-block;
	padding: 6px 12px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--surface-2);
	color: var(--text-muted);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.ny-cat input:checked + span {
	border-color: transparent;
	background: var(--accent-gradient);
	color: var(--accent-ink);
}

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

.ny-wish-form textarea {
	resize: vertical;
}

.ny-wish-form__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 10px;
	color: var(--text-muted);
}

/* ---------- Таблица рекордов ---------- */
.ny-top {
	display: grid;
	gap: 8px;
}

.ny-top__row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius-m);
	background: var(--surface-2);
}

.ny-top__row.is-podium {
	border-color: rgba(255, 197, 61, .45);
}

.ny-top__row .ny-ava {
	width: 40px;
	height: 40px;
}

.ny-top__place {
	flex: none;
	width: 28px;
	color: var(--text-muted);
	font-size: 20px;
	font-weight: 700;
	text-align: center;
}

.ny-top__place span {
	font-size: 15px;
}

.ny-top__who {
	flex: 1;
	min-width: 0;
}

.ny-top__score {
	flex: none;
	color: var(--accent-text, var(--accent));
	font-family: var(--font-display);
	font-size: 22px;
	font-weight: 800;
	text-align: right;
}

.ny-top__score small {
	display: block;
	color: var(--text-muted);
	font-family: var(--font-body);
	font-size: 12px;
	font-weight: 400;
}

/* ---------- Меню игр ---------- */
.ny-menu {
	display: grid;
	gap: 10px;
}

.ny-menu__item {
	display: grid;
	grid-template-columns: 48px 1fr;
	grid-template-rows: auto auto;
	column-gap: 12px;
	align-items: center;
	padding: 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius-m);
	background: var(--surface-2);
	color: var(--text-strong);
	text-align: left;
	cursor: pointer;
	transition: border-color .2s, transform .2s var(--ease);
}

.ny-menu__item:hover {
	border-color: var(--accent);
	transform: translateY(-1px);
}

.ny-menu__icon {
	grid-row: span 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 14px;
	background: var(--ny-night);
	font-size: 24px;
}

.ny-menu__item small {
	color: var(--text-muted);
}

/* ---------- Новогодний дроп ---------- */
.ny-catch {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	border-radius: var(--radius-m);
	background: var(--ny-night);
	touch-action: none;
	cursor: pointer;
}

/* ---------- Найди пару ---------- */
.ny-memory {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
	perspective: 800px;
}

.ny-memory__card {
	position: relative;
	aspect-ratio: 1;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	transform-style: preserve-3d;
	transition: transform .35s var(--ease);
}

.ny-memory__card > span {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-s);
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	font-size: 28px;
}

.ny-memory__back {
	background: var(--ny-night);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
	color: rgba(255, 255, 255, .45);
	font-size: 20px !important;
}

.ny-memory__face {
	border: 1px solid var(--border);
	background: var(--surface-2);
	transform: rotateY(180deg);
}

.ny-memory__card.is-open,
.ny-memory__card.is-done {
	transform: rotateY(180deg);
}

.ny-memory__card.is-done .ny-memory__face {
	border-color: var(--ok-border, var(--border));
	background: var(--ok-bg, var(--surface-2));
}

/* ---------- Мобильные ---------- */
@media (max-width: 991.98px) {
	.ny-aim {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 767.98px) {
	.ny-wishes__head {
		flex-direction: column;
	}

	.ny-tir__rules {
		font-size: 13px;
	}
}

@media (max-width: 575.98px) {
	.ny-tir {
		height: 470px;
	}

	.ny-tir__screen {
		padding: 56px 12px 16px;
	}

	.ny-tir__card {
		width: 100%;
		padding: 16px 14px;
	}

	.ny-tir__title {
		font-size: 22px;
	}

	.ny-tir__rules {
		grid-template-columns: 1fr;
		gap: 4px;
		margin-bottom: 14px;
	}

	.ny-tir__summary span {
		min-width: 0;
		flex: 1 1 40%;
	}

	.ny-hud--score b {
		font-size: 26px;
	}

	.ny-hud--stats {
		flex-direction: column;
		align-items: flex-end;
		gap: 0;
	}

	.ny-sleigh {
		width: 190px;
		height: 78px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ny-bulb i,
	.ny-sl-leg,
	.ny-sl-nose {
		animation: none !important;
	}

	.ny-memory__card {
		transition: none;
	}
}
