.he-room {
	max-width: 900px;
	margin: 0 auto;
	padding: 8px;
	background: #171b22;
	border-radius: 10px;
	font-family: "Segoe UI", Arial, sans-serif;
	color: #dfe6ee;
}
.he-room a {
	color: #7fd0ff;
}
.he-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	padding: 6px 2px 10px;
}
.he-back {
	color: #7fd0ff;
	text-decoration: none;
	padding: 10px 6px;
}
.he-title {
	font-weight: 700;
	font-size: 15px;
}
.he-balls {
	font-size: 13px;
	color: #9aa7b5;
}
.he-balls b {
	color: #ffd76b;
}
.he-msg {
	background: #1d2733;
	border: 1px solid #2e4256;
	border-radius: 8px;
	padding: 10px;
	margin: 6px 0;
	font-size: 13px;
}
.he-msg-err {
	border-color: #7c3b3b;
	background: #2b1d1d;
}

/* карточки списков/правил */
.he-card {
	background: #1d242e;
	border: 1px solid #2b3542;
	border-radius: 12px;
	margin: 10px 0;
	overflow: hidden;
}
.he-card-title {
	background: #232d3a;
	padding: 12px 14px;
	font-weight: 700;
	font-size: 14px;
	border-bottom: 1px solid #2b3542;
}
.he-card-body {
	padding: 12px 14px;
	font-size: 13px;
}
.he-trow {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid #26303d;
}
.he-trow:last-child {
	border-bottom: none;
}
.he-trow-l {
	flex: 1;
}
.he-trow-name {
	font-weight: 700;
	font-size: 14px;
}
.he-trow-ic {
	width: 44px;
	height: 44px;
	vertical-align: middle;
	margin-right: 8px;
	display: inline-block;
}
.he-trow-sub {
	color: #8fa0b2;
	font-size: 12px;
	margin-top: 2px;
}
.he-trow-c {
	font-weight: 700;
	color: #7fd0ff;
	min-width: 44px;
	text-align: center;
}
.he-btn {
	display: inline-block;
	background: linear-gradient(#3a7bd5, #2f5fa8);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 12px 16px;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	min-height: 44px;
	box-sizing: border-box;
}
.he-btn:active {
	transform: scale(0.97);
}
.he-btn-on {
	background: linear-gradient(#2fae6b, #1f8a52);
}
.he-btn-off {
	background: #333d49;
	color: #7d8b99;
	cursor: default;
}
.he-btn-big {
	width: 100%;
	font-size: 15px;
}
.he-btn-leave {
	background: linear-gradient(#8a4b4b, #6d3737);
}
.he-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.he-stat {
	flex: 1 1 40%;
	background: #222b37;
	border-radius: 10px;
	padding: 10px;
	text-align: center;
}
.he-stat-v {
	font-size: 18px;
	font-weight: 800;
	color: #7fd0ff;
}
.he-stat-best {
	font-size: 12px;
	line-height: 24px;
}
.he-stat-l {
	font-size: 11px;
	color: #8fa0b2;
	margin-top: 4px;
}
.he-note {
	margin-top: 10px;
	font-size: 12px;
	color: #c8b06b;
}
.he-rules p {
	margin: 0 0 8px;
}
.he-rules ul {
	margin: 0;
	padding-left: 18px;
}
.he-rules li {
	margin: 6px 0;
}
.he-guide h4 {
	margin: 14px 0 6px;
	font-size: 13px;
	color: #7fd0ff;
}
.he-guide h4:first-child {
	margin-top: 0;
}
.he-guide p {
	margin: 0 0 8px;
}
.he-guide ol,
.he-guide ul {
	margin: 0;
	padding-left: 20px;
}
.he-guide li {
	margin: 6px 0;
}
.he-act-name {
	color: #7fd0ff;
	font-weight: 700;
}
.he-guide details {
	margin-top: 12px;
	border: 1px solid #2b3542;
	border-radius: 8px;
	background: #222b37;
}
.he-guide summary {
	cursor: pointer;
	padding: 11px 12px;
	font-weight: 700;
	font-size: 13px;
	color: #c8b06b;
}
.he-guide details[open] summary {
	border-bottom: 1px solid #2b3542;
}
.he-guide-inner {
	padding: 4px 12px 12px;
}

/* ---------- стол ---------- */
.he-felt {
	padding: 6px 0;
}
.he-oval {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	aspect-ratio: 10 / 7.2;
	background: radial-gradient(
		ellipse at center,
		#1f7a4d 0%,
		#14583a 62%,
		#0d3f29 100%
	);
	border: 10px solid #3a2b1e;
	border-radius: 50% / 50%;
	box-shadow:
		inset 0 0 60px rgba(0, 0, 0, 0.55),
		0 6px 22px rgba(0, 0, 0, 0.6);
}
.he-center {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 62%;
	text-align: center;
}
.he-pot {
	font-size: 12px;
	color: #ffe9a8;
	font-weight: 700;
	min-height: 16px;
	text-shadow: 0 1px 2px #000;
}
.he-stage {
	font-size: 11px;
	color: #bfe8d2;
	letter-spacing: 1px;
	text-transform: uppercase;
	margin-top: 6px;
	opacity: 0.8;
}
.he-board {
	display: flex;
	justify-content: center;
	gap: 4px;
	margin-top: 8px;
	min-height: 54px;
}
.he-card-mini {
	position: relative;
	width: 40px;
	height: 56px;
	background: linear-gradient(#fdfdfb, #f1f1ec);
	border-radius: 6px;
	color: #26323c;
	font-weight: 800;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
	border: 1px solid #d5d5cd;
}
.he-board .he-card-mini {
	width: 46px;
	height: 64px;
}
.he-board .he-card-mini.he-deal-anim {
	animation: he-deal 0.35s ease-out;
}
/* переворот карты: рубашка -> лицо (3D) */
.he-flip {
	position: relative;
}
.he-board .he-flip {
	width: 46px;
	height: 64px;
}
.he-holes .he-flip {
	width: 30px;
	height: 42px;
}
.he-flip-inner {
	position: absolute;
	inset: 0;
	transform-style: preserve-3d;
	transition: transform 0.55s cubic-bezier(0.22, 0.68, 0.35, 1);
}
.he-flip.he-flipped .he-flip-inner {
	transform: rotateY(180deg);
}
.he-flip-back,
.he-flip-front {
	position: absolute;
	inset: 0;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	border-radius: 6px;
}
.he-flip-front {
	transform: rotateY(180deg);
}
.he-flip-front .he-card-mini {
	width: 100%;
	height: 100%;
}
.he-flip-back {
	background:
		repeating-linear-gradient(
			45deg,
			rgba(255, 255, 255, 0.14) 0 3px,
			transparent 3px 7px
		),
		radial-gradient(circle at 50% 40%, #b23a4a, #7c1f2e 70%),
		linear-gradient(160deg, #8e1f2f, #5c1420);
	border: 2px solid #f2ece0;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}
.he-flip.he-deal-in {
	animation: he-deal-in 0.3s ease-out;
}
@keyframes he-deal-in {
	from {
		transform: translateY(-26px) scale(0.75);
		opacity: 0;
	}
	to {
		transform: none;
		opacity: 1;
	}
}
.he-c-red {
	color: #d21f1f;
}
.he-c-i {
	position: absolute;
	top: 2px;
	left: 4px;
	display: flex;
	flex-direction: column;
	align-items: center;
	line-height: 1;
	font-size: 17px;
}
.he-c-i2 {
	top: auto;
	left: auto;
	bottom: 2px;
	right: 4px;
	transform: rotate(180deg);
}
.he-c-s {
	font-size: 14px;
	line-height: 1.05;
}
.he-board .he-c-i {
	font-size: 19px;
}
.he-board .he-c-s {
	font-size: 16px;
}
.he-board .he-handname {
	font-size: 10px;
	color: #ffd76a;
	text-align: center;
	margin-top: 2px;
	white-space: nowrap;
}
@keyframes he-deal {
	from {
		opacity: 0;
		transform: translateY(-14px) scale(0.8);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* места */
.he-seat {
	position: absolute;
	transform: translate(-50%, -50%);
	width: 92px;
	background: rgba(16, 22, 29, 0.92);
	border: 2px solid #2c3947;
	border-radius: 12px;
	padding: 5px 4px 6px;
	text-align: center;
	box-sizing: border-box;
}
.he-seat-empty {
	width: 54px;
	border-style: dashed;
	background: rgba(16, 22, 29, 0.45);
	padding: 12px 4px;
}
.he-seat-sit {
	cursor: pointer;
}
.he-seat-sit:hover {
	border-color: #f0b429;
	background: rgba(28, 42, 56, 0.72);
}
.he-seat-num {
	color: #5d6c7b;
	font-size: 15px;
	font-weight: 700;
}
.he-seat-plus {
	color: #5d6c7b;
	font-size: 14px;
	line-height: 14px;
	font-weight: 700;
}
.he-seat-sit:hover .he-seat-num {
	color: #f0b429;
}
.he-seat-sit:hover .he-seat-plus {
	color: #f0b429;
}
.he-sitpop {
	position: absolute;
	left: 50%;
	top: 50%;
	z-index: 30;
	width: 210px;
	transform: translate(-50%, -50%);
	padding: 12px 14px;
	text-align: center;
	background: rgba(14, 19, 26, 0.97);
	border: 1px solid #f0b429;
	border-radius: 12px;
	box-shadow: 0 8px 26px rgba(0, 0, 0, 0.65);
}
.he-sitpop-q {
	font-size: 15px;
	font-weight: 800;
	color: #ffe08a;
}
.he-sitpop-sub {
	margin-top: 4px;
	font-size: 11px;
	color: #9fb0c0;
}
.he-sitpop-btns {
	display: flex;
	gap: 8px;
	margin-top: 10px;
}
.he-sitpop-btns .he-btn {
	flex: 1;
}
.he-seat-turn {
	border-color: #ffd76b;
	box-shadow: 0 0 14px rgba(255, 215, 107, 0.55);
	animation: he-pulse 1s infinite;
}
@keyframes he-chip-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}
@keyframes he-pulse {
	50% {
		box-shadow: 0 0 22px rgba(255, 215, 107, 0.85);
	}
}
/* игрок показывает карты: подсветка места + переворот рубашек в лицо */
.he-seat-reveal {
	animation: he-reveal-glow 1.2s ease-out;
}
@keyframes he-reveal-glow {
	0% {
		box-shadow: 0 0 0 rgba(255, 215, 107, 0);
	}
	30% {
		box-shadow:
			0 0 22px rgba(255, 215, 107, 0.95),
			inset 0 0 12px rgba(255, 215, 107, 0.4);
	}
	100% {
		box-shadow: 0 0 0 rgba(255, 215, 107, 0);
	}
}
.he-seat-folded {
	opacity: 0.45;
}
.he-seat-win {
	border-color: #2fae6b;
	box-shadow: 0 0 18px rgba(47, 174, 107, 0.8);
}
.he-seat-own {
	border-color: #3a7bd5;
}
.he-holes {
	display: flex;
	justify-content: center;
	gap: 2px;
	margin-bottom: 3px;
}
.he-holes .he-card-mini {
	width: 30px;
	height: 42px;
}
.he-holes .he-c-i {
	font-size: 13px;
}
.he-holes .he-c-s {
	font-size: 11px;
}
/* закрытая карта соперника (рубашка) */
.he-holes .he-card-back {
	width: 30px;
	height: 42px;
	border-radius: 6px;
	box-sizing: border-box;
	background:
		repeating-linear-gradient(
			45deg,
			rgba(255, 255, 255, 0.14) 0 3px,
			transparent 3px 7px
		),
		radial-gradient(circle at 50% 40%, #b23a4a, #7c1f2e 70%),
		linear-gradient(160deg, #8e1f2f, #5c1420);
	border: 2px solid #f2ece0;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}
/* свои карты: каждая кликабельна по отдельности (показать/скрыть именно эту) */
.he-holes-own {
	-webkit-tap-highlight-color: transparent;
}
.he-hcard {
	display: inline-block;
	cursor: pointer;
}
/* полностью вскрытые карты соперника приподнимаются */
.he-holes-shown {
	transform: translateY(-7px);
	position: relative;
	z-index: 6;
}
.he-holes-shown .he-card-mini {
	box-shadow: 0 5px 12px rgba(255, 215, 107, 0.5);
}
/* своя раскрытая карта приподнимается и подсвечивается — видно, что она открыта */
.he-hcard-shown {
	transform: translateY(-7px);
	position: relative;
	z-index: 6;
}
.he-hcard-shown .he-card-mini {
	box-shadow: 0 5px 12px rgba(255, 215, 107, 0.5);
}
/* наведение на свою карту — подсказка, что её можно открыть */
.he-hcard:hover .he-card-mini {
	box-shadow: 0 0 0 2px rgba(255, 215, 107, 0.75);
}
.he-avatar {
	display: block;
	width: 34px;
	height: 34px;
	margin: 0 auto 3px;
	border-radius: 50%;
	border: 2px solid #46586b;
	background: linear-gradient(#3a7bd5, #244a80);
	color: #fff;
	font-weight: 800;
	font-size: 16px;
	line-height: 30px;
	overflow: hidden;
	box-sizing: border-box;
	text-decoration: none;
}
.he-avatar:hover {
	border-color: #f0b429;
}
.he-ava-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.he-nick {
	font-size: 11px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.he-nick a {
	color: inherit;
	text-decoration: none;
}
.he-nick a:hover {
	color: #f0b429;
	text-decoration: underline;
}
.he-stack {
	font-size: 13px;
	font-weight: 800;
	color: #ffd76b;
}
.he-stack .he-chip-ic {
	width: 12px;
	height: 12px;
	margin-right: 3px;
	vertical-align: -1px;
}
.he-allin {
	font-size: 9px;
	font-weight: 800;
	color: #fff;
	background: #d0342c;
	border-radius: 4px;
	margin-top: 2px;
	letter-spacing: 1px;
}
.he-dealer {
	position: absolute;
	right: -7px;
	top: -7px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #f6f7f9;
	color: #1b232c;
	font-weight: 900;
	font-size: 11px;
	line-height: 20px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
/* индикатор присутствия: игрок отошёл / нет связи (в левом верхнем углу места) */
.he-pres {
	position: absolute;
	top: -6px;
	left: -6px;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.5);
	box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
	z-index: 4;
}
.he-pres-away {
	background: #e6a23c;
}
.he-pres-off {
	background: #e05252;
	animation: he-pres-pulse 1s infinite;
}
@keyframes he-pres-pulse {
	50% {
		opacity: 0.35;
	}
}
.he-turn-warn {
	color: #ffcf6b;
	font-size: 12px;
	font-weight: 700;
	margin-left: 8px;
	white-space: nowrap;
}
.he-chip {
	position: absolute;
	transform: translate(-50%, -50%);
	min-width: 34px;
	padding: 3px 7px;
	border-radius: 12px;
	background: radial-gradient(circle at 35% 30%, #ffe9a8, #d9a53c 60%, #a97b23);
	color: #3a2b0e;
	font-weight: 800;
	font-size: 11px;
	text-align: center;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
	animation: he-chip-in 0.25s ease-out;
}

/* нижняя панель */
.he-bottom {
	margin-top: 8px;
}
.he-actions {
	min-height: 56px;
}
.he-actions .he-btn {
	margin: 3px 2px;
}
.he-btn-fold {
	background: linear-gradient(#a05252, #7c3a3a);
}
.he-btn-call {
	background: linear-gradient(#2fae6b, #1f8a52);
}
.he-btn-raise {
	background: linear-gradient(#e0a13c, #b57a22);
}
.he-btn-go {
	background: linear-gradient(#3a7bd5, #2f5fa8);
}
.he-btn-q {
	padding: 12px 10px;
	font-size: 12px;
}
.he-wait {
	flex: 0 0 100%;
	text-align: center;
	color: #8fa0b2;
	font-size: 13px;
	padding: 16px 0;
}
.he-raise {
	flex: 0 0 100%;
	box-sizing: border-box;
	background: #222b37;
	border-radius: 10px;
	padding: 10px;
	margin-top: 6px;
}
.he-raise-row {
	display: flex;
	align-items: center;
	gap: 10px;
}
.he-raise input[type="range"] {
	flex: 1;
	accent-color: #e0a13c;
	height: 32px;
}
.he-raise-to {
	font-weight: 800;
	color: #ffd76b;
	min-width: 52px;
	text-align: right;
}
.he-raise-btns {
	display: flex;
	gap: 4px;
	margin-top: 8px;
	flex-wrap: wrap;
}
.he-raise-btns .he-btn {
	flex: 1;
}
.he-recharge {
	flex: 0 0 100%;
	box-sizing: border-box;
	background: #222b37;
	border-radius: 10px;
	padding: 10px;
	margin-top: 6px;
}
.he-recharge-l {
	color: #9fb0c0;
	font-size: 12px;
	margin-bottom: 8px;
}
.he-recharge-l b {
	color: #ffd76b;
}
.he-recharge-row {
	display: flex;
	align-items: center;
	gap: 10px;
}
.he-recharge input[type="range"] {
	flex: 1;
	min-width: 0;
	accent-color: #2fae6b;
	height: 32px;
}
.he-btn-sm {
	padding: 10px 14px;
	font-size: 13px;
	background: linear-gradient(#2fae6b, #1f8a52);
	white-space: nowrap;
}
.he-timer {
	height: 6px;
	background: #222b37;
	border-radius: 3px;
	margin-top: 8px;
	overflow: hidden;
}
.he-timer-bar {
	height: 100%;
	width: 0;
	background: #2fae6b;
	border-radius: 3px;
	transition: width 0.2s linear;
}
.he-timer-low {
	background: #d0342c;
}

/* журнал и баннеры */
.he-side {
	margin-top: 12px;
	background: #1d242e;
	border: 1px solid #2b3542;
	border-radius: 12px;
	overflow: hidden;
}
.he-side-title {
	background: #232d3a;
	padding: 10px 14px;
	font-weight: 700;
	font-size: 13px;
}
.he-log {
	max-height: 180px;
	overflow-y: auto;
	padding: 8px 14px;
	font-size: 12px;
	line-height: 1.7;
}
.he-log-row {
	border-bottom: 1px solid #232c37;
	padding: 2px 0;
	color: #aebccb;
}
.he-log-row b {
	color: #7fd0ff;
}
.he-banner {
	min-height: 20px;
	margin-top: 10px;
	text-align: center;
	font-weight: 700;
	font-size: 13px;
	border-radius: 8px;
	padding: 0;
}
.he-banner-win {
	background: rgba(47, 174, 107, 0.18);
	border: 1px solid #2fae6b;
	color: #8fe6b8;
	padding: 10px;
}
.he-banner-err {
	background: rgba(208, 52, 44, 0.15);
	border: 1px solid #a05252;
	color: #f0a19b;
	padding: 10px;
}
.he-noscript {
	text-align: center;
	padding: 14px;
	color: #f0a19b;
}

/* мобайл */
@media (max-width: 640px) {
	.he-oval {
		aspect-ratio: 4 / 5;
		border-width: 7px;
	}
	.he-seat {
		width: 74px;
		padding: 4px 3px 5px;
	}
	.he-seat-empty {
		width: 44px;
		padding: 9px 3px;
	}
	.he-avatar {
		width: 26px;
		height: 26px;
		line-height: 22px;
		font-size: 13px;
	}
	.he-nick {
		font-size: 10px;
	}
	.he-stack {
		font-size: 12px;
	}
	.he-holes .he-card-mini {
		width: 24px;
		height: 34px;
	}
	.he-holes .he-c-i {
		font-size: 10px;
	}
	.he-holes .he-c-s {
		font-size: 8px;
	}
	.he-holes .he-handname {
		font-size: 9px;
	}
	.he-board .he-card-mini {
		width: 34px;
		height: 48px;
	}
	.he-board .he-flip {
		width: 34px;
		height: 48px;
	}
	.he-holes .he-flip {
		width: 24px;
		height: 34px;
	}
	.he-holes .he-card-back {
		width: 24px;
		height: 34px;
	}
	.he-board .he-c-i {
		font-size: 13px;
	}
	.he-board .he-c-s {
		font-size: 11px;
	}
	.he-board .he-board {
		gap: 3px;
	}
	.he-actions .he-btn {
		flex: 1;
		min-width: 80px;
	}
	.he-actions {
		display: flex;
		flex-wrap: wrap;
	}
}
#heChatLayer {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	pointer-events: none;
	z-index: 25;
}
.he-bubble {
	position: absolute;
	max-width: 180px;
	padding: 6px 10px;
	transform: translate(-50%, calc(-100% - 48px));
	background: #fffdf5;
	border: 1px solid #f0b429;
	border-radius: 10px;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
	color: #26323c;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	word-break: break-word;
	animation: he-bubble-in 0.18s ease-out;
}
.he-bubble::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -6px;
	margin-left: -6px;
	border: 6px solid #f0b429;
	border-right-color: transparent;
	border-left-color: transparent;
	border-bottom-color: transparent;
}
.he-bubble-tall {
	transform: translate(-50%, calc(-100% - 74px));
}
.he-bubble-below {
	transform: translate(-50%, 52px);
}
.he-bubble-below::after {
	top: -6px;
	bottom: auto;
	border-color: #f0b429 transparent transparent;
}
.he-bubble-out {
	opacity: 0;
	transition: opacity 0.4s;
}
@keyframes he-bubble-in {
	from {
		opacity: 0;
		margin-top: 6px;
	}
	to {
		opacity: 1;
		margin-top: 0;
	}
}
.he-chat {
	display: flex;
	gap: 8px;
	margin-top: 8px;
}
.he-chat input {
	flex: 1;
	height: 44px;
	padding: 0 12px;
	border: 1px solid #2c3947;
	border-radius: 8px;
	background: #0f141b;
	color: #dfe6ee;
	font-size: 14px;
	box-sizing: border-box;
}
.he-chat .he-btn {
	min-width: 74px;
}

.he-inv-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	padding: 10px 0;
	border-bottom: 1px solid #253040;
}
.he-inv-row:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}
.he-inv-txt {
	font-size: 14px;
	line-height: 1.4;
	color: #dfe6ee;
}
.he-inv-out .he-inv-txt {
	color: #93a1b0;
}
.he-inv-btns {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

.he-chip .he-chip-ic {
	width: 13px;
	height: 13px;
	margin-right: 3px;
	vertical-align: -2px;
}
.he-pot .he-chip-ic {
	width: 14px;
	height: 14px;
	margin: 0 3px;
	vertical-align: -2px;
}

.he-inv-ok .he-inv-txt {
	color: #8fe0b0;
}

/* --- Игроки онлайн + приглашения (лобби) --- */
.he-inv-pick {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 13px;
	color: #93a1b0;
	margin-bottom: 10px;
}
.he-select {
	flex: 1 1 200px;
	min-width: 160px;
	background: #222b37;
	color: #dfe6ee;
	border: 1px solid #2f3d4e;
	border-radius: 8px;
	padding: 11px 12px;
	font-size: 14px;
	min-height: 44px;
	box-sizing: border-box;
}
.he-online {
	max-height: 340px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}
.he-online-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 0;
	min-height: 48px;
	border-bottom: 1px solid #253040;
}
.he-online-row:last-child {
	border-bottom: 0;
}
.he-online-nick {
	flex: 1 1 auto;
	min-width: 0;
	color: #6fb1ff;
	text-decoration: none;
	font-size: 14px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.he-online-nick:active {
	opacity: 0.7;
}
.he-online-at {
	flex-shrink: 0;
	font-size: 11px;
	color: #c8a24a;
	background: #2b2a20;
	border: 1px solid #4a4327;
	border-radius: 10px;
	padding: 2px 8px;
}
.he-online-sent {
	flex-shrink: 0;
	font-size: 13px;
	font-weight: 700;
	color: #8fe0b0;
	padding: 12px 6px;
	white-space: nowrap;
}
.he-online-empty {
	color: #7d8b99;
	font-size: 14px;
	padding: 10px 0;
	text-align: center;
}

/* --- Кнопка «Пригласить всех онлайн» (стол) --- */
.he-btn-invite {
	background: linear-gradient(#2fae6b, #1f8a52);
	white-space: nowrap;
}

/* --- Всплывающее уведомление --- */
.he-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	transform: translateX(-50%);
	background: #1b2530;
	color: #eaf1f8;
	border: 1px solid #2fae6b;
	border-radius: 10px;
	padding: 12px 18px;
	font-size: 14px;
	font-weight: 600;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
	z-index: 9999;
	max-width: 90%;
	text-align: center;
	transition: opacity 0.4s ease;
}
.he-toast-out {
	opacity: 0;
}

/* --- Compact invite button (lobby) --- */
.he-online-inv {
	padding: 8px 12px;
	font-size: 12px;
	min-height: 40px;
	border-radius: 8px;
	white-space: nowrap;
}

/* --- Invite selection modal (table) --- */
.he-modal {
	position: fixed;
	inset: 0;
	z-index: 9998;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}
.he-modal-bg {
	position: absolute;
	inset: 0;
	background: rgba(6, 10, 16, 0.66);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
}
.he-modal-sheet {
	position: relative;
	width: 100%;
	max-width: 480px;
	max-height: 86vh;
	background: linear-gradient(#1e2936, #18212c);
	border-top-left-radius: 22px;
	border-top-right-radius: 22px;
	display: flex;
	flex-direction: column;
	box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.55);
	animation: he-sheet-in 0.2s ease;
}
@keyframes he-sheet-in {
	from {
		transform: translateY(40px);
		opacity: 0.5;
	}
	to {
		transform: none;
		opacity: 1;
	}
}
.he-modal-grab {
	width: 42px;
	height: 4px;
	border-radius: 3px;
	background: #374556;
	margin: 10px auto 2px;
	flex-shrink: 0;
}
.he-modal-h {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 16px 6px;
	font-size: 17px;
	font-weight: 700;
	color: #eaf1f8;
}
.he-modal-x {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #232e3b;
	border: none;
	color: #9fb0c0;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease;
}
.he-modal-x:active {
	background: #2c3a4a;
}
.he-modal-sub {
	padding: 0 16px 10px;
	font-size: 13px;
	color: #8494a5;
}
.he-modal-list {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 4px 12px 8px;
	min-height: 140px;
}
.he-mi-row {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	min-height: 62px;
	border-radius: 14px;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition:
		background 0.15s ease,
		box-shadow 0.15s ease;
	margin-bottom: 4px;
}
.he-mi-row:active {
	background: #222b37;
}
.he-mi-row--on {
	background: rgba(47, 174, 107, 0.12);
	box-shadow: inset 0 0 0 1.5px rgba(47, 174, 107, 0.55);
}
.he-mi-off {
	opacity: 0.5;
	cursor: default;
}
.he-mi-cb {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}
.he-mi-ava {
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	border-radius: 50%;
	background: linear-gradient(135deg, #3a7bd5, #2f5fa8);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	text-transform: uppercase;
}
.he-mi-nick {
	flex: 1 1 auto;
	min-width: 0;
	color: #eaf1f8;
	font-size: 15px;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.he-mi-tag {
	flex-shrink: 0;
	font-size: 11px;
	color: #d9b45a;
	background: rgba(217, 180, 90, 0.12);
	border: 1px solid rgba(217, 180, 90, 0.35);
	border-radius: 999px;
	padding: 3px 9px;
}
.he-mi-done {
	flex-shrink: 0;
	font-size: 12px;
	font-weight: 700;
	color: #8fe0b0;
}
.he-mi-check {
	position: relative;
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	border: 2px solid #3a4a5c;
	border-radius: 8px;
	background: #141c26;
	transition:
		background 0.15s ease,
		border-color 0.15s ease;
}
.he-mi-check::after {
	content: "";
	position: absolute;
	left: 7px;
	top: 3px;
	width: 6px;
	height: 11px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	opacity: 0;
	transform: rotate(45deg) scale(0.4);
	transition:
		transform 0.15s ease,
		opacity 0.15s ease;
}
.he-mi-row--on .he-mi-check {
	background: linear-gradient(#2fae6b, #1f8a52);
	border-color: transparent;
}
.he-mi-row--on .he-mi-check::after {
	opacity: 1;
	transform: rotate(45deg) scale(1);
}
.he-mi-cb:focus-visible ~ .he-mi-check {
	box-shadow: 0 0 0 3px rgba(47, 174, 107, 0.4);
}
.he-modal-f {
	padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
	border-top: 1px solid #253040;
}
.he-modal-f .he-btn {
	width: 100%;
	border-radius: 12px;
	font-size: 15px;
}
.he-modal-f .he-btn[disabled] {
	background: #2c3a4a;
	color: #7d8b99;
}

@media (min-width: 560px) {
	.he-modal {
		align-items: center;
	}
	.he-modal-sheet {
		border-radius: 20px;
		max-height: 82vh;
	}
	.he-modal-grab {
		display: none;
	}
}

/* Баннер покерного стола в карточке «Столы» на главной лобби */
.he-tables-banner {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 12px;
	margin: 0 0 12px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* Кнопка вкл/выкл звука за столом */
.he-mute {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	min-width: 44px;
	padding: 0;
	border: 1px solid #2e4256;
	border-radius: 12px;
	background: #1d2733;
	color: #7fd0ff;
	cursor: pointer;
	box-sizing: border-box;
}
.he-mute:hover {
	background: #24303f;
}
.he-mute svg {
	display: block;
	width: 22px;
	height: 22px;
}
.he-mute-off {
	color: #6b7787;
	border-color: #26313f;
	background: #17202b;
}

/* Слой анимации монет (полёт от банка к победителю) */
#heCoinLayer {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: visible;
	z-index: 40;
}
.he-coin {
	position: absolute;
	width: 16px;
	height: 16px;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: radial-gradient(
		circle at 35% 30%,
		#fff3b0 0%,
		#ffd24d 45%,
		#d99a1f 78%,
		#a9720f 100%
	);
	border: 1px solid #8a5c0c;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
	will-change: left, top, opacity;
}
