.pyr-game {
	background:
		radial-gradient(circle at 54% 44%, rgba(207, 144, 45, 0.22), transparent 42%),
		linear-gradient(145deg, #5a3a17 0%, #37230f 58%, #241608 100%);
	border-radius: 18px;
	box-sizing: border-box;
	color: #fff;
	display: flex;
	flex-direction: column;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	min-height: 532px;
	overflow: hidden;
	position: relative;
}

.pyr-game::before {
	background-image:
		linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
	background-size: 23px 23px;
	content: "";
	inset: 0;
	pointer-events: none;
	position: absolute;
}

.pyr-toolbar {
	align-items: center;
	background: rgba(28, 15, 5, 0.72);
	border-bottom: 1px solid rgba(255,255,255,.11);
	display: grid;
	gap: 12px;
	grid-template-columns: 1fr auto 1fr;
	padding: 10px 14px;
	position: relative;
	z-index: 20;
}

.pyr-toolbar__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.pyr-toolbar button,
.pyr-footer button {
	background: rgba(255,255,255,.1);
	border: 1px solid rgba(255,255,255,.2);
	border-radius: 999px;
	color: #fff;
	cursor: pointer;
	font-size: 12px;
	font-weight: 850;
	min-height: 38px;
	padding: 8px 14px;
}

.pyr-toolbar button:hover:not(:disabled),
.pyr-footer button:hover {
	background: rgba(255,255,255,.17);
	transform: translateY(-1px);
}

.pyr-toolbar button:disabled {
	cursor: not-allowed;
	opacity: .4;
}

.pyr-title {
	text-align: center;
}

.pyr-title small {
	color: #f0ce77;
	display: block;
	font-size: 10px;
	font-weight: 850;
	letter-spacing: .09em;
	text-transform: uppercase;
}

.pyr-title h2 {
	color: #fff;
	font-size: clamp(23px, 3vw, 34px);
	line-height: 1;
	margin: 2px 0 0;
}

.pyr-metrics {
	display: flex;
	gap: 6px;
	justify-content: flex-end;
}

.pyr-metrics > div {
	background: rgba(255,255,255,.07);
	border: 1px solid rgba(255,255,255,.1);
	border-radius: 9px;
	min-width: 58px;
	padding: 5px 7px;
	text-align: center;
}

.pyr-metrics span {
	color: rgba(255,255,255,.58);
	display: block;
	font-size: 8px;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.pyr-metrics strong {
	color: #f0ce77;
	display: block;
	font-size: 15px;
}

.pyr-mobile-note {
	background: rgba(240,206,119,.12);
	color: #f7e6aa;
	display: none;
	font-size: 11px;
	font-weight: 750;
	padding: 6px 10px;
	position: relative;
	text-align: center;
	z-index: 10;
}

.pyr-board-scroll {
	flex: 1;
	overflow-x: auto;
	overflow-y: hidden;
	position: relative;
	z-index: 2;
}

.pyr-board {
	align-items: center;
	box-sizing: border-box;
	display: grid;
	gap: 18px;
	grid-template-columns: 130px minmax(520px, 1fr) 130px;
	min-height: 420px;
	min-width: 830px;
	padding: 12px 18px 16px;
}

.pyr-stock-area,
.pyr-progress-panel {
	align-items: center;
	background: rgba(28,15,5,.45);
	border: 1px solid rgba(255,255,255,.1);
	border-radius: 14px;
	display: flex;
	flex-direction: column;
	gap: 13px;
	justify-content: center;
	padding: 12px;
}

.pyr-stock-area > div {
	text-align: center;
}

.pyr-zone-label {
	color: rgba(255,255,255,.58);
	display: block;
	font-size: 9px;
	font-weight: 850;
	letter-spacing: .08em;
	margin-bottom: 5px;
	text-transform: uppercase;
}

.pyr-stock,
.pyr-waste {
	height: 104px;
	position: relative;
	width: 74px;
}

.pyr-stock {
	align-items: center;
	background:
		linear-gradient(45deg, rgba(255,255,255,.13) 25%, transparent 25%) 0 0 / 14px 14px,
		linear-gradient(-45deg, rgba(255,255,255,.13) 25%, transparent 25%) 0 0 / 14px 14px,
		#6b2f24;
	border: 5px solid #f7f3e9;
	border-radius: 8px;
	box-shadow: 0 8px 14px rgba(0,0,0,.28);
	color: #f0ce77;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	font-size: 16px;
	font-weight: 950;
	justify-content: center;
	padding: 0;
}

.pyr-stock small {
	background: #f0ce77;
	border-radius: 999px;
	bottom: -9px;
	color: #2a190a;
	font-size: 9px;
	padding: 2px 5px;
	position: absolute;
	right: -8px;
}

.pyr-stock.is-empty {
	background: rgba(255,255,255,.04);
	border: 2px dashed rgba(255,255,255,.18);
	box-shadow: none;
	font-size: 28px;
}

.pyr-empty-waste {
	align-items: center;
	border: 2px dashed rgba(255,255,255,.15);
	border-radius: 8px;
	color: rgba(255,255,255,.28);
	display: flex;
	font-size: 9px;
	font-weight: 900;
	height: 100%;
	justify-content: center;
	width: 100%;
}

.pyr-pass-info {
	background: rgba(255,255,255,.06);
	border-radius: 9px;
	padding: 6px 10px;
}

.pyr-pass-info span {
	color: rgba(255,255,255,.55);
	display: block;
	font-size: 8px;
	font-weight: 800;
	text-transform: uppercase;
}

.pyr-pass-info strong {
	color: #f0ce77;
	font-size: 15px;
}

.pyr-pyramid {
	align-items: center;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 386px;
	position: relative;
}

.pyr-row {
	display: flex;
	justify-content: center;
	margin-top: -53px;
	min-height: 94px;
	position: relative;
}

.pyr-row:first-child {
	margin-top: 0;
}

.pyr-row .pyr-card,
.pyr-row .pyr-card-placeholder {
	margin: 0 8px;
}

.pyr-card,
.pyr-card-placeholder {
	height: 94px;
	width: 67px;
}

.pyr-card {
	aspect-ratio: .72;
	background: linear-gradient(145deg, #fff, #edf0f4);
	border: 1px solid rgba(0,0,0,.22);
	border-radius: 7px;
	box-shadow: 0 7px 13px rgba(0,0,0,.3);
	box-sizing: border-box;
	color: #111318;
	cursor: pointer;
	padding: 0;
	position: relative;
	transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
	user-select: none;
}

.pyr-card--red {
	color: #d82f46;
}

.pyr-card:not(.is-exposed) {
	filter: saturate(.7);
	opacity: .78;
}

.pyr-card.is-exposed:hover:not(:disabled) {
	box-shadow:
		0 0 0 2px rgba(240,206,119,.62),
		0 9px 16px rgba(0,0,0,.35);
	transform: translateY(-4px);
	z-index: 40;
}

.pyr-card.is-selected {
	box-shadow:
		0 0 0 4px #f0ce77,
		0 10px 18px rgba(0,0,0,.38);
	transform: translateY(-6px);
	z-index: 50;
}

.pyr-card.is-hint {
	animation: pyrHint 700ms ease-in-out infinite alternate;
	z-index: 60;
}

@keyframes pyrHint {
	from { box-shadow: 0 0 0 2px rgba(109,231,174,.62); }
	to { box-shadow: 0 0 0 6px rgba(109,231,174,.98); }
}

.pyr-card:disabled {
	cursor: not-allowed;
}

.pyr-card__corner {
	font-size: 14px;
	font-weight: 900;
	left: 5px;
	line-height: .82;
	position: absolute;
	top: 5px;
}

.pyr-card__corner b,
.pyr-card__corner small {
	display: block;
}

.pyr-card__corner small {
	font-size: 12px;
	margin-top: 4px;
}

.pyr-card__corner--bottom {
	bottom: 5px;
	left: auto;
	right: 5px;
	top: auto;
	transform: rotate(180deg);
}

.pyr-card > strong {
	font-size: 32px;
	left: 50%;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
}

.pyr-progress-panel {
	text-align: center;
}

.pyr-progress-panel > span {
	color: rgba(255,255,255,.55);
	font-size: 9px;
	font-weight: 850;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.pyr-progress-panel > strong {
	color: #f0ce77;
	font-size: 38px;
	line-height: 1;
}

.pyr-progress-panel > div {
	background: rgba(255,255,255,.09);
	border-radius: 999px;
	height: 6px;
	overflow: hidden;
	width: 100%;
}

.pyr-progress-panel i {
	background: linear-gradient(90deg, #d39b2b, #f0ce77);
	display: block;
	height: 100%;
	transition: width 180ms ease;
}

.pyr-progress-panel small {
	color: rgba(255,255,255,.5);
	font-size: 9px;
	line-height: 1.45;
}

.pyr-footer {
	align-items: center;
	background: rgba(28,15,5,.72);
	border-top: 1px solid rgba(255,255,255,.1);
	display: flex;
	gap: 10px;
	justify-content: center;
	min-height: 48px;
	padding: 8px 12px;
	position: relative;
	z-index: 10;
}

.pyr-footer p {
	color: rgba(255,255,255,.78);
	font-size: 12px;
	margin: 0;
	text-align: center;
}

.pyr-footer button {
	background: linear-gradient(180deg, #f0ce77, #d39b2b);
	border-color: transparent;
	color: #291808;
}

@media (max-width: 900px) {
	.pyr-toolbar {
		grid-template-columns: 1fr auto;
	}

	.pyr-title {
		display: none;
	}

	.pyr-board {
		grid-template-columns: 110px minmax(500px, 1fr) 110px;
		min-width: 760px;
		padding-left: 10px;
		padding-right: 10px;
	}

	.pyr-row .pyr-card,
	.pyr-row .pyr-card-placeholder {
		margin: 0 6px;
	}
}

@media (max-width: 700px) {
	.pyr-game {
		border-radius: 10px;
		min-height: 486px;
	}

	.pyr-toolbar {
		gap: 7px;
		padding: 7px;
	}

	.pyr-toolbar button {
		font-size: 10px;
		min-height: 33px;
		padding: 6px 10px;
	}

	.pyr-metrics {
		gap: 3px;
	}

	.pyr-metrics > div {
		min-width: 47px;
		padding: 4px 5px;
	}

	.pyr-metrics strong {
		font-size: 13px;
	}

	.pyr-mobile-note {
		display: block;
	}

	.pyr-board {
		grid-template-columns: 95px 480px 95px;
		min-width: 700px;
		padding: 8px;
	}

	.pyr-stock-area,
	.pyr-progress-panel {
		padding: 7px;
	}

	.pyr-card,
	.pyr-card-placeholder {
		height: 86px;
		width: 61px;
	}

	.pyr-row {
		margin-top: -48px;
		min-height: 86px;
	}

	.pyr-row:first-child {
		margin-top: 0;
	}

	.pyr-row .pyr-card,
	.pyr-row .pyr-card-placeholder {
		margin: 0 5px;
	}

	.pyr-stock,
	.pyr-waste {
		height: 92px;
		width: 65px;
	}

	.pyr-footer p {
		font-size: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pyr-card,
	.pyr-progress-panel i,
	.pyr-toolbar button {
		transition: none;
	}

	.pyr-card.is-hint {
		animation: none;
	}
}
