.sp-game {
	background:
		radial-gradient(circle at 50% 42%, rgba(44, 109, 171, 0.22), transparent 43%),
		linear-gradient(145deg, #173f39 0%, #0b2d29 60%, #071f1d 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;
}

.sp-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: 24px 24px;
	content: "";
	inset: 0;
	pointer-events: none;
	position: absolute;
}

.sp-toolbar {
	align-items: center;
	background: rgba(3, 20, 19, 0.7);
	border-bottom: 1px solid rgba(255, 255, 255, 0.11);
	display: grid;
	gap: 12px;
	grid-template-columns: 1fr auto 1fr;
	padding: 10px 14px;
	position: relative;
	z-index: 20;
}

.sp-toolbar__left {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.sp-toolbar button,
.sp-bid-panel button,
.sp-result 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;
}

.sp-toolbar button:hover,
.sp-bid-panel button:hover,
.sp-result button:hover {
	background: rgba(255,255,255,.17);
	transform: translateY(-1px);
}

.sp-toolbar button.is-primary,
.sp-result button {
	background: linear-gradient(180deg, #f2cf64, #d49a25);
	border-color: transparent;
	color: #13201d;
}

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

.sp-title small {
	color: rgba(255,255,255,.62);
	display: block;
	font-size: 10px;
	font-weight: 850;
	letter-spacing: .08em;
	text-transform: uppercase;
}

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

.sp-toolbar__right {
	align-items: flex-end;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.sp-toolbar__right span {
	color: #c7d8ff;
	font-size: 10px;
	font-weight: 800;
}

.sp-toolbar__right strong {
	color: #f2cf64;
	font-size: 18px;
}

.sp-mobile-note {
	background: rgba(242, 207, 100, 0.12);
	color: #f7e5a1;
	display: none;
	font-size: 11px;
	font-weight: 750;
	padding: 6px 10px;
	position: relative;
	text-align: center;
	z-index: 12;
}

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

.sp-board {
	box-sizing: border-box;
	display: grid;
	grid-template-areas:
		"score top top"
		"left center right"
		"player player player";
	grid-template-columns: 188px minmax(430px, 1fr) 188px;
	grid-template-rows: 68px 220px minmax(190px, auto);
	min-height: 470px;
	min-width: 850px;
	padding: 10px 14px 14px;
	position: relative;
}

.sp-score-panel {
	align-self: start;
	background: rgba(3,20,19,.54);
	border: 1px solid rgba(255,255,255,.11);
	border-radius: 12px;
	grid-area: score;
	margin-right: 10px;
	padding: 8px;
	z-index: 8;
}

.sp-score-panel h3 {
	color: #f2cf64;
	font-size: 10px;
	letter-spacing: .07em;
	margin: 0 0 7px;
	text-transform: uppercase;
}

.sp-team-score {
	align-items: center;
	border-top: 1px solid rgba(255,255,255,.07);
	display: grid;
	gap: 5px;
	grid-template-columns: 1fr 40px;
	padding: 6px 4px;
}

.sp-team-score.is-player {
	color: #f2cf64;
}

.sp-team-score span {
	font-size: 10px;
	font-weight: 800;
}

.sp-team-score strong {
	font-size: 18px;
	text-align: right;
}

.sp-team-score small {
	color: rgba(255,255,255,.5);
	font-size: 8px;
	grid-column: 1 / -1;
}

.sp-bids {
	border-top: 1px solid rgba(255,255,255,.08);
	margin-top: 6px;
	padding-top: 5px;
}

.sp-bids > div {
	display: grid;
	font-size: 9px;
	gap: 4px;
	grid-template-columns: 1fr 24px 44px;
	padding: 3px 2px;
}

.sp-bids > div.is-player {
	color: #f2cf64;
	font-weight: 850;
}

.sp-bids b,
.sp-bids small {
	text-align: center;
}

.sp-opponent {
	align-items: center;
	color: rgba(255,255,255,.73);
	display: flex;
	flex-direction: column;
	font-size: 11px;
	font-weight: 850;
	gap: 8px;
	justify-content: center;
	position: relative;
	z-index: 5;
}

.sp-opponent--top {
	grid-area: top;
}

.sp-opponent--left {
	grid-area: left;
}

.sp-opponent--right {
	grid-area: right;
}

.sp-backs {
	height: 48px;
	position: relative;
	width: 94px;
}

.sp-backs span {
	background:
		linear-gradient(45deg, rgba(255,255,255,.13) 25%, transparent 25%) 0 0 / 12px 12px,
		linear-gradient(-45deg, rgba(255,255,255,.13) 25%, transparent 25%) 0 0 / 12px 12px,
		#203b77;
	border: 3px solid #f4f6fa;
	border-radius: 5px;
	box-shadow: 0 3px 8px rgba(0,0,0,.28);
	height: 46px;
	left: calc(var(--i) * 6px);
	position: absolute;
	top: 0;
	width: 34px;
}

.sp-backs b {
	background: #f2cf64;
	border-radius: 999px;
	bottom: -4px;
	color: #14201d;
	font-size: 9px;
	padding: 2px 5px;
	position: absolute;
	right: 0;
	z-index: 10;
}

.sp-table-center {
	align-self: stretch;
	background: radial-gradient(circle, rgba(255,255,255,.045), transparent 62%);
	border: 1px solid rgba(255,255,255,.07);
	border-radius: 50%;
	grid-area: center;
	justify-self: center;
	position: relative;
	width: min(100%, 430px);
}

.sp-table-mark {
	color: rgba(180,205,255,.12);
	font-size: 88px;
	left: 50%;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
}

.sp-trick {
	height: 78px;
	position: absolute;
	width: 56px;
	z-index: 5;
}

.sp-trick--top {
	left: 50%;
	top: 5px;
	transform: translateX(-50%);
}

.sp-trick--left {
	left: 58px;
	top: 50%;
	transform: translateY(-50%) rotate(-7deg);
}

.sp-trick--right {
	right: 58px;
	top: 50%;
	transform: translateY(-50%) rotate(7deg);
}

.sp-trick--bottom {
	bottom: 5px;
	left: 50%;
	transform: translateX(-50%);
}

.sp-trick-slot {
	border: 2px dashed rgba(255,255,255,.11);
	border-radius: 7px;
	display: block;
	height: 100%;
	width: 100%;
}

.sp-trick-card,
.sp-trick-card .sp-card {
	height: 100%;
	width: 100%;
}

.sp-player {
	align-self: end;
	grid-area: player;
	position: relative;
	z-index: 12;
}

.sp-status {
	align-items: center;
	display: flex;
	gap: 10px;
	justify-content: center;
	margin-bottom: 6px;
	min-height: 24px;
	text-align: center;
}

.sp-status span {
	background: rgba(242,207,100,.14);
	border: 1px solid rgba(242,207,100,.34);
	border-radius: 999px;
	color: #f2cf64;
	font-size: 9px;
	font-weight: 900;
	padding: 4px 8px;
	text-transform: uppercase;
}

.sp-status strong {
	color: rgba(255,255,255,.76);
	font-size: 11px;
}

.sp-hand {
	align-items: flex-end;
	display: flex;
	justify-content: center;
	min-height: 128px;
	overflow: visible;
	padding: 0 15px;
}

.sp-hand .sp-card {
	flex: 0 0 76px;
	margin-left: -24px;
	transition: margin 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.sp-hand .sp-card:first-child {
	margin-left: 0;
}

.sp-hand .sp-card:hover:not(:disabled) {
	margin-left: -18px;
	transform: translateY(-15px);
	z-index: 30;
}

.sp-hand .sp-card:first-child:hover:not(:disabled) {
	margin-left: 0;
}

.sp-card {
	aspect-ratio: .72;
	background: linear-gradient(145deg, #fff, #edf0f4);
	border: 1px solid rgba(0,0,0,.22);
	border-radius: 8px;
	box-shadow: 0 7px 13px rgba(0,0,0,.28);
	box-sizing: border-box;
	color: #111318;
	cursor: pointer;
	height: 108px;
	padding: 0;
	position: relative;
	user-select: none;
}

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

.sp-card.is-legal {
	box-shadow:
		0 0 0 2px rgba(113, 218, 173, .55),
		0 7px 13px rgba(0,0,0,.28);
}

.sp-card.is-disabled,
.sp-card:disabled {
	cursor: not-allowed;
	filter: saturate(.65);
	opacity: .58;
}

.sp-card__corner {
	font-size: 16px;
	font-weight: 900;
	left: 6px;
	line-height: .82;
	position: absolute;
	top: 6px;
}

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

.sp-card__corner small {
	font-size: 13px;
	margin-top: 4px;
}

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

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

.sp-bid-panel {
	align-items: center;
	background: rgba(3,20,19,.58);
	border: 1px solid rgba(255,255,255,.11);
	border-radius: 14px;
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	justify-content: center;
	margin: 7px auto 0;
	max-width: 520px;
	padding: 8px 10px;
}

.sp-bid-panel > span {
	color: #f2cf64;
	font-size: 11px;
	font-weight: 850;
}

.sp-bid-panel > div {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

.sp-bid-panel button {
	min-height: 33px;
	min-width: 38px;
	padding: 6px 10px;
}

.sp-result {
	background: rgba(3,20,19,.94);
	border: 1px solid rgba(242,207,100,.42);
	border-radius: 16px;
	left: 50%;
	padding: 18px;
	position: absolute;
	text-align: center;
	top: 40%;
	transform: translate(-50%, -50%);
	width: min(320px, 80%);
	z-index: 80;
}

.sp-result h3 {
	color: #f2cf64;
	margin: 0 0 6px;
}

.sp-result p {
	color: rgba(255,255,255,.72);
	margin: 0 0 12px;
}

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

	.sp-title {
		display: none;
	}

	.sp-board {
		grid-template-columns: 155px minmax(400px, 1fr) 155px;
		min-width: 770px;
	}
}

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

	.sp-toolbar {
		padding: 7px;
	}

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

	.sp-toolbar__right span {
		font-size: 9px;
	}

	.sp-toolbar__right strong {
		font-size: 15px;
	}

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

	.sp-board {
		grid-template-columns: 140px 390px 140px;
		grid-template-rows: 60px 205px minmax(175px, auto);
		min-width: 710px;
		padding: 7px 9px 10px;
	}

	.sp-score-panel {
		padding: 5px;
	}

	.sp-hand .sp-card {
		flex-basis: 66px;
		margin-left: -23px;
	}

	.sp-card {
		height: 94px;
	}

	.sp-card > strong {
		font-size: 31px;
	}

	.sp-card__corner {
		font-size: 14px;
	}

	.sp-status strong {
		font-size: 9px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sp-hand .sp-card,
	.sp-toolbar button,
	.sp-bid-panel button {
		transition: none;
	}
}
