@font-face {
	font-family: "Codenames UI";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("/assets/fonts/InterVariable.woff2?v=c8511b94febc") format("woff2");
}

:root {
	color-scheme: dark;
	font-family:
		"Codenames UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
		"Segoe UI", sans-serif;
	background: #0c1110;
	color: #f8f4e9;
}

* {
	box-sizing: border-box;
}

[hidden] {
	display: none !important;
}

body {
	margin: 0;
	min-width: 320px;
	background: #0c1110;
}

button,
input,
select {
	font: inherit;
}

.shell {
	min-height: 100vh;
	background:
		linear-gradient(90deg, rgb(12 17 16 / 94%) 0%, rgb(12 17 16 / 74%) 46%, rgb(12 17 16 / 22%) 100%),
		url("/assets/hero-game-table.png?v=c8511b94febc") center / cover;
}

.hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
	gap: 32px;
	align-items: end;
	min-height: min(760px, 88vh);
	padding: clamp(28px, 5vw, 72px);
}

.hero-copy {
	max-width: 820px;
	padding-bottom: clamp(0px, 4vw, 48px);
}

.eyebrow {
	margin: 0 0 14px;
	color: #85d0ff;
	font-size: 0.82rem;
	font-weight: 800;
	text-transform: uppercase;
}

h1,
p {
	margin: 0;
}

.hero h1 {
	max-width: 12ch;
	font-size: clamp(3rem, 8vw, 7.6rem);
	line-height: 0.95;
	letter-spacing: 0;
}

.intro {
	max-width: 620px;
	margin-top: 22px;
	color: #d6d0c2;
	font-size: clamp(1.05rem, 2vw, 1.45rem);
	line-height: 1.5;
}

.entry-card {
	display: grid;
	gap: 16px;
	align-self: center;
	padding: 22px;
	border: 1px solid rgb(248 244 233 / 20%);
	border-radius: 8px;
	background: rgb(12 17 16 / 78%);
	backdrop-filter: blur(18px);
}

.entry-card div {
	display: grid;
	gap: 7px;
}

label {
	color: #cfc8b8;
	font-size: 0.78rem;
	font-weight: 800;
	text-transform: uppercase;
}

input,
select {
	width: 100%;
	min-height: 50px;
	padding: 0 13px;
	border: 1px solid rgb(248 244 233 / 24%);
	border-radius: 8px;
	background: rgb(255 255 255 / 10%);
	color: #fffaf0;
}

select {
	color-scheme: dark;
	cursor: pointer;
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 18px;
	border: 1px solid transparent;
	border-radius: 8px;
	color: #f8f4e9;
	font-weight: 800;
	cursor: pointer;
}

.button-primary {
	background: #c93434;
	box-shadow: 0 14px 34px rgb(201 52 52 / 28%);
}

.button-secondary {
	border-color: rgb(248 244 233 / 30%);
	background: rgb(248 244 233 / 8%);
}

.button:disabled {
	cursor: default;
	opacity: 0.48;
}

.form-note {
	color: #b8b3a8;
	font-size: 0.82rem;
	line-height: 1.4;
}

.status {
	min-height: 22px;
	color: #85d0ff;
	font-weight: 700;
}

.preview {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1px;
	background: rgb(248 244 233 / 16%);
}

.stat {
	padding: clamp(18px, 4vw, 36px);
	background: rgb(12 17 16 / 90%);
}

.stat strong {
	display: block;
	color: #f4c152;
	font-size: clamp(2rem, 6vw, 4.5rem);
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.stat strong.is-counting {
	animation: stat-count-lift 900ms ease-out both;
}

.stat span {
	color: #d6d0c2;
	font-weight: 800;
	text-transform: uppercase;
}

.game-shell {
	--board-tv-extra: 0px;
	--card-font-size: clamp(0.72rem, 1.18vw, 1.38rem);
	--card-tv-ratio: 1.48;
	--team-rgb: 169 52 55;
	--team-solid: #a93437;
	--team-progress-height: 0%;
	--turn-enter-x: 72%;
	--turn-exit-x: -36%;

	position: relative;
	isolation: isolate;
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	gap: clamp(10px, 1.6vw, 20px);
	min-height: 100svh;
	padding: clamp(12px, 2vw, 28px);
	overflow: hidden;
	background:
		radial-gradient(circle at 50% 82%, rgb(var(--team-rgb) / 16%), transparent 44%),
		#0e1414;
}

.game-shell.blue-turn {
	--team-rgb: 35 114 170;
	--team-solid: #2372aa;
	--turn-enter-x: -72%;
	--turn-exit-x: 36%;
}

.game-shell::before,
.game-shell::after {
	position: absolute;
	z-index: 0;
	inset: 0;
	pointer-events: none;
	content: "";
}

.game-shell::before {
	background:
		radial-gradient(ellipse at 50% 92%, rgb(var(--team-rgb) / 48%), transparent 42%),
		radial-gradient(ellipse at 24% 82%, rgb(244 193 82 / 16%), transparent 34%),
		radial-gradient(ellipse at 74% 78%, rgb(var(--team-rgb) / 22%), transparent 36%),
		linear-gradient(180deg, transparent 0 44%, rgb(var(--team-rgb) / 8%) 78%, transparent 100%);
	opacity: 0.82;
}

.game-shell.turn-pulse::before {
	animation: turn-pulse 1.4s ease-out both;
}

.team-score-progress {
	position: absolute;
	z-index: 0;
	right: -8%;
	bottom: 0;
	left: -8%;
	height: var(--team-progress-height);
	background:
		radial-gradient(ellipse at 50% 100%, rgb(var(--team-rgb) / 40%), rgb(var(--team-rgb) / 18%) 46%, transparent 76%),
		linear-gradient(180deg, transparent 0%, rgb(var(--team-rgb) / 10%) 44%, rgb(var(--team-rgb) / 20%) 100%);
	mask-image: linear-gradient(180deg, transparent 0%, #000 30%);
	pointer-events: none;
	transition: height 700ms cubic-bezier(0.2, 0.72, 0.24, 1);
}

.game-shell::after {
	background:
		linear-gradient(rgb(255 255 255 / 4.5%) 1px, transparent 1px) 0 0 / 34px 34px,
		linear-gradient(90deg, rgb(255 255 255 / 3.5%) 1px, transparent 1px) 0 0 / 34px 34px,
		radial-gradient(circle at 24px 24px, rgb(255 255 255 / 8%) 1px, transparent 2px) 0 0 / 68px 68px,
		linear-gradient(115deg, transparent 0 44%, rgb(var(--team-rgb) / 8%) 49%, transparent 55%);
	mask-image: linear-gradient(180deg, rgb(0 0 0 / 80%), rgb(0 0 0 / 30%));
}

.topbar,
.board-wrap,
.bottom-console {
	position: relative;
	z-index: 1;
}

.topbar {
	display: grid;
	grid-template-columns: minmax(84px, 168px) minmax(0, 1fr) minmax(84px, 168px);
	align-items: stretch;
	gap: clamp(8px, 1.5vw, 18px);
}

.score {
	position: relative;
	display: grid;
	place-items: center;
	min-height: clamp(72px, 10vw, 132px);
	overflow: hidden;
	border: 1px solid rgb(255 255 255 / 13%);
	border-radius: 10px;
	background: rgb(255 255 255 / 5.5%);
	box-shadow: inset 0 1px 0 rgb(255 255 255 / 10%), 0 18px 42px rgb(0 0 0 / 22%);
	text-align: center;
	text-transform: uppercase;
}

.score strong {
	position: relative;
	z-index: 1;
	display: block;
	font-size: clamp(2.4rem, 6vw, 6.2rem);
	font-variant-numeric: tabular-nums;
	line-height: 0.9;
}

.score span {
	position: relative;
	z-index: 1;
	display: block;
	margin-top: 4px;
	font-size: clamp(0.68rem, 1.1vw, 0.92rem);
	font-weight: 950;
	letter-spacing: 0.09em;
}

.score-blue {
	--score-rgb: 35 114 170;

	background: linear-gradient(180deg, rgb(35 114 170 / 30%), rgb(35 114 170 / 12%));
	color: #a9ddff;
}

.score-red {
	--score-rgb: 169 52 55;

	background: linear-gradient(180deg, rgb(169 52 55 / 32%), rgb(169 52 55 / 13%));
	color: #ffb2af;
}

.score strong.score-count-down {
	animation: score-count-down 520ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.score.score-panel-flash {
	animation: score-panel-flash 1620ms ease-out both;
}

.turn-panel {
	display: grid;
	align-content: center;
	justify-items: center;
	gap: 8px;
	min-width: 0;
	padding: clamp(8px, 1.5vw, 18px);
	border: 1px solid rgb(var(--team-rgb) / 32%);
	border-radius: 10px;
	background: rgb(7 12 12 / 46%);
	box-shadow:
		inset 0 1px 0 rgb(255 255 255 / 10%),
		0 0 46px rgb(var(--team-rgb) / 18%);
	backdrop-filter: blur(14px);
}

.room {
	margin: 0;
	color: rgb(248 241 231 / 48%);
	font-size: clamp(0.72rem, 1.2vw, 0.9rem);
	font-weight: 820;
	text-transform: uppercase;
}

.turn-label {
	position: relative;
	display: inline-grid;
	place-items: center;
	min-height: clamp(48px, 7vw, 86px);
	padding: 0 clamp(16px, 3vw, 34px);
	overflow: hidden;
	border-radius: 10px;
	background: var(--team-solid);
	box-shadow: 0 0 34px rgb(var(--team-rgb) / 42%);
	color: #fff7f2;
	font-size: clamp(1.45rem, 4.8vw, 5rem);
	font-weight: 980;
	line-height: 0.95;
	text-transform: uppercase;
	white-space: nowrap;
}

.turn-sizer {
	visibility: hidden;
}

.turn-copy {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 0 clamp(16px, 3vw, 34px);
}

.turn-next {
	opacity: 0;
}

.turn-label.turn-relay .turn-current {
	animation: turn-relay-out 470ms ease-in both;
}

.turn-label.turn-relay .turn-next {
	animation: turn-relay-in 650ms 170ms cubic-bezier(0.16, 0.84, 0.28, 1) both;
}

.board-wrap {
	display: grid;
	place-items: center center;
	min-height: 0;
}

.board-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: clamp(5px, 0.85vw, 14px);
	width: min(100%, calc((100svh - 345px) * 1.58 + var(--board-tv-extra)), 1240px);
	min-width: 0;
	padding: clamp(8px, 1.2vw, 18px);
	border: 1px solid rgb(255 255 255 / 10%);
	border-radius: 18px;
	background: rgb(7 12 12 / 26%);
	box-shadow: 0 28px 70px rgb(0 0 0 / 28%);
	backdrop-filter: blur(8px);
}

.word-card {
	position: relative;
	display: grid;
	place-items: center;
	aspect-ratio: var(--card-tv-ratio);
	min-width: 0;
	padding: clamp(5px, 0.9vw, 16px);
	overflow: hidden;
	border: 0;
	border-radius: 16px;
	background: #e9dec9;
	box-shadow:
		inset 0 -4px 0 rgb(0 0 0 / 13%),
		inset 0 1px 0 rgb(255 255 255 / 35%),
		0 13px 32px rgb(0 0 0 / 24%);
	color: #151515;
	font-size: var(--card-font-size);
	font-weight: 900;
	letter-spacing: 0.012em;
	line-height: 1;
	text-align: center;
	text-shadow: 0 1px 0 rgb(255 255 255 / 22%);
	text-transform: uppercase;
	cursor: pointer;
}

.word-card:disabled {
	cursor: default;
	opacity: 1;
}

.word-card strong {
	position: relative;
	z-index: 1;
	min-width: 0;
	overflow-wrap: anywhere;
	font: inherit;
}

.word-card.red {
	background: #a93437;
	color: #fff4ee;
	text-shadow: 0 1px 1px rgb(0 0 0 / 24%);
}

.word-card.blue {
	background: #2372aa;
	color: #eff9ff;
	text-shadow: 0 1px 1px rgb(0 0 0 / 24%);
}

.word-card.neutral {
	background: #9fa39a;
	color: #101312;
	text-shadow: 0 1px 0 rgb(255 255 255 / 18%);
}

.word-card.assassin {
	background: #111;
	color: #fff4e8;
	text-shadow: 0 1px 1px rgb(0 0 0 / 35%);
}

.word-card.revealed {
	box-shadow:
		inset 0 -4px 0 rgb(0 0 0 / 13%),
		inset 0 1px 0 rgb(255 255 255 / 35%),
		0 13px 32px rgb(0 0 0 / 24%);
}

.word-card.revealed::before {
	position: absolute;
	inset: 0;
	background-position: center top;
	background-repeat: no-repeat;
	background-size: 100% auto;
	content: "";
	filter: invert(1);
	opacity: 0.38;
	pointer-events: none;
	mask-image: linear-gradient(180deg, #000 0 44%, rgb(0 0 0 / 42%) 76%, rgb(0 0 0 / 8%) 100%);
}

.word-card.red.revealed.watermark-1::before {
	background-image: url("/assets/images/card-watermarks/red-1.svg?v=c8511b94febc");
}

.word-card.red.revealed.watermark-2::before {
	background-image: url("/assets/images/card-watermarks/red-2.svg?v=c8511b94febc");
}

.word-card.blue.revealed.watermark-1::before {
	background-image: url("/assets/images/card-watermarks/blue-1.svg?v=c8511b94febc");
}

.word-card.blue.revealed.watermark-2::before {
	background-image: url("/assets/images/card-watermarks/blue-2.svg?v=c8511b94febc");
}

.word-card.neutral.revealed::before {
	filter: none;
	opacity: 0.44;
}

.word-card.neutral.revealed.watermark-1::before {
	background-image: url("/assets/images/card-watermarks/bystander-1.svg?v=c8511b94febc");
}

.word-card.neutral.revealed.watermark-2::before {
	background-image: url("/assets/images/card-watermarks/bystander-2.svg?v=c8511b94febc");
}

.word-card.assassin.revealed::before {
	background-image: url("/assets/images/card-watermarks/assassin.svg?v=c8511b94febc");
	filter: invert(1) sepia(0.22) saturate(1.4);
}

.game-shell.spymaster-view .word-card.revealed,
.game-shell.finished-board-view .word-card.revealed {
	filter: saturate(0.82) brightness(0.82);
}

.game-shell.spymaster-view .word-card.revealed::after,
.game-shell.finished-board-view .word-card.revealed::after {
	position: absolute;
	z-index: 2;
	right: 0;
	bottom: 0;
	left: 0;
	padding: 3px 0 4px;
	background: rgb(7 12 12 / 42%);
	color: rgb(248 241 231 / 82%);
	font-size: 0.5rem;
	font-weight: 950;
	letter-spacing: 0.1em;
	line-height: 1;
	text-shadow: none;
	content: "OPEN";
}

.bottom-console {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: stretch;
	gap: 10px;
}

.players-box,
.controls-box {
	min-width: 0;
	border: 1px solid rgb(255 255 255 / 12%);
	border-radius: 10px;
	background: rgb(7 12 12 / 54%);
	box-shadow: inset 0 1px 0 rgb(255 255 255 / 8%);
	backdrop-filter: blur(12px);
}

.players-box {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 13px;
	overflow: hidden;
}

.connection-indicator {
	width: 12px;
	height: 12px;
	flex: 0 0 12px;
	border-radius: 999px;
	background: #f4c152;
	box-shadow: 0 0 14px rgb(244 193 82 / 50%);
}

.connection-indicator.is-connected {
	background: #4ad27d;
	box-shadow: 0 0 14px rgb(74 210 125 / 48%);
}

.connection-indicator.is-disconnected {
	background: #7d8791;
	box-shadow: none;
}

.connection-indicator.is-error {
	background: #ff6a63;
	box-shadow: 0 0 14px rgb(255 106 99 / 46%);
}

.nicknames,
.spy-names {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 7px;
	min-width: 0;
}

.nicknames {
	color: rgb(248 241 231 / 47%);
	font-size: clamp(0.72rem, 1.1vw, 0.86rem);
	font-weight: 760;
}

.player-chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.player-chip + .player-chip::before {
	color: rgb(248 241 231 / 30%);
	content: "\00b7";
}

.player-chip.is-current {
	color: rgb(248 241 231 / 82%);
	text-decoration: underline;
	text-decoration-color: rgb(244 193 82 / 72%);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

.spy-names {
	color: #f4c152;
	font-size: clamp(0.78rem, 1.15vw, 0.94rem);
	font-weight: 980;
	text-shadow: 0 0 14px rgb(244 193 82 / 45%);
}

.spy-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.spy-chip-button {
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	text-shadow: inherit;
	cursor: pointer;
}

.spy-chip-button:hover {
	color: inherit;
	text-shadow: inherit;
}

.spy-chip-button:focus-visible {
	outline: 2px solid rgb(244 193 82 / 78%);
	outline-offset: 3px;
}

.spy-icon {
	position: relative;
	width: 16px;
	height: 11px;
	border: 2px solid rgb(244 193 82 / 90%);
	border-radius: 999px;
	box-shadow: 0 0 12px rgb(244 193 82 / 36%);
}

.spy-icon::after {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 5px;
	height: 5px;
	border-radius: 999px;
	background: #f4c152;
	content: "";
	transform: translate(-50%, -50%);
}

.console-divider {
	width: 1px;
	align-self: stretch;
	background: rgb(255 255 255 / 13%);
}

.overlay-rail {
	position: absolute;
	z-index: 12;
	right: 0;
	bottom: calc(100% + 10px);
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
	width: min(360px, 100%);
	pointer-events: none;
}

.toast-stack {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
	width: 100%;
	pointer-events: none;
}

.game-toast {
	width: fit-content;
	max-width: 100%;
	padding: 10px 12px;
	border: 1px solid rgb(255 255 255 / 14%);
	border-radius: 8px;
	background: rgb(7 12 12 / 90%);
	box-shadow: 0 22px 60px rgb(0 0 0 / 32%);
	color: rgb(248 241 231 / 86%);
	font-size: 0.86rem;
	font-weight: 820;
	line-height: 1.35;
	overflow-wrap: anywhere;
	backdrop-filter: blur(16px);
	animation: toast-in 180ms ease both;
}

.game-toast.is-error {
	border-color: rgb(255 106 99 / 48%);
	box-shadow: 0 22px 60px rgb(0 0 0 / 32%), 0 0 24px rgb(255 106 99 / 14%);
	color: #ffd6d2;
}

.game-toast.is-leaving {
	animation: toast-out 180ms ease both;
}

.controls-box {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 7px;
}

.control {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 42px;
	padding: 0 13px;
	border: 1px solid rgb(255 255 255 / 15%);
	border-radius: 8px;
	background: rgb(255 255 255 / 7%);
	color: rgb(248 241 231 / 82%);
	font-size: clamp(0.76rem, 1vw, 0.9rem);
	font-weight: 900;
	white-space: nowrap;
	cursor: pointer;
}

input:focus,
select:focus,
.button:focus-visible,
.word-card:focus-visible,
.control:focus-visible {
	outline: 3px solid #85d0ff;
	outline-offset: 2px;
}

.control svg {
	width: 19px;
	height: 19px;
	flex: 0 0 auto;
	stroke-width: 2.35;
}

.control:hover,
.control.active {
	border-color: rgb(var(--team-rgb) / 42%);
	background: rgb(var(--team-rgb) / 18%);
	color: #fff7f2;
}

.control:disabled {
	cursor: default;
	opacity: 0.52;
}

.share-dialog {
	width: min(1120px, calc(100vw - 32px));
	max-height: calc(100svh - 32px);
	padding: 0;
	overflow: auto;
	border: 1px solid rgb(255 255 255 / 18%);
	border-radius: 10px;
	background: #0d1212;
	box-shadow: 0 36px 100px rgb(0 0 0 / 58%);
	color: #f8f1e7;
}

.share-dialog[open] {
	animation: share-dialog-in 180ms ease-out both;
}

.share-dialog::backdrop {
	background: rgb(3 7 7 / 82%);
	backdrop-filter: blur(8px);
}

.share-dialog-content {
	display: grid;
	gap: clamp(20px, 3vw, 34px);
	padding: clamp(20px, 3vw, 34px);
}

.share-dialog-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
}

.share-eyebrow {
	color: #85d0ff;
	font-size: 0.76rem;
	font-weight: 850;
	letter-spacing: 0;
	text-transform: uppercase;
}

.share-dialog-header h2 {
	margin: 4px 0 0;
	font-size: clamp(1.8rem, 3.5vw, 3rem);
	letter-spacing: 0;
	line-height: 1;
}

.share-close {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	flex: 0 0 44px;
	padding: 0;
	border: 1px solid rgb(255 255 255 / 15%);
	border-radius: 8px;
	background: rgb(255 255 255 / 7%);
	color: rgb(248 241 231 / 78%);
	cursor: pointer;
}

.share-close:hover {
	border-color: rgb(133 208 255 / 46%);
	background: rgb(133 208 255 / 12%);
	color: #fff;
}

.share-close svg,
.share-copy svg {
	width: 20px;
	height: 20px;
	stroke-width: 2.2;
}

.share-dialog-body {
	display: grid;
	grid-template-columns: minmax(300px, 1fr) minmax(340px, 520px);
	align-items: center;
	gap: clamp(24px, 4vw, 52px);
}

.share-details {
	display: grid;
	align-content: center;
	gap: 28px;
	min-width: 0;
}

.share-section {
	display: grid;
	gap: 10px;
	min-width: 0;
}

.share-section + .share-section {
	padding-top: 28px;
	border-top: 1px solid rgb(255 255 255 / 12%);
}

.share-label {
	color: rgb(248 241 231 / 58%);
	font-size: 0.76rem;
	font-weight: 850;
	letter-spacing: 0;
	text-transform: uppercase;
}

.share-room-name {
	color: #f4c152;
	font-size: clamp(2rem, 4.5vw, 4.2rem);
	font-weight: 980;
	letter-spacing: 0;
	line-height: 1;
	overflow-wrap: anywhere;
	text-shadow: 0 0 24px rgb(244 193 82 / 32%);
}

.share-section p,
.share-qr-panel p {
	color: rgb(248 241 231 / 64%);
	font-size: 0.9rem;
	font-weight: 720;
	line-height: 1.45;
}

.share-link-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px;
}

.share-room-link {
	display: block;
	min-width: 0;
	min-height: 50px;
	padding: 12px 13px;
	border: 1px solid rgb(248 244 233 / 24%);
	border-radius: 8px;
	background: rgb(255 255 255 / 10%);
	color: #fffaf0;
	font-family: inherit;
	font-size: 0.88rem;
	font-variant-numeric: tabular-nums;
	font-weight: 650;
	line-height: 1.45;
	overflow-wrap: anywhere;
}

.share-copy {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 98px;
	padding: 0 14px;
	border: 1px solid rgb(133 208 255 / 32%);
	border-radius: 8px;
	background: rgb(133 208 255 / 12%);
	color: #ccecff;
	font-weight: 900;
	cursor: pointer;
}

.share-copy:hover,
.share-copy.is-copied {
	border-color: rgb(74 210 125 / 52%);
	background: rgb(74 210 125 / 15%);
	color: #baf4ce;
}

.share-close:focus-visible,
.share-copy:focus-visible {
	outline: 3px solid #85d0ff;
	outline-offset: 2px;
}

.share-copy-status {
	min-height: 1.3em;
	color: #baf4ce;
}

.share-copy-status.is-error {
	color: #ffb2af;
}

.share-qr-panel {
	display: grid;
	justify-items: center;
	gap: 12px;
	min-width: 0;
	text-align: center;
}

.share-qr-frame {
	display: grid;
	place-items: center;
	width: min(100%, 520px);
	aspect-ratio: 1;
	padding: clamp(12px, 1.5vw, 20px);
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 24px 64px rgb(0 0 0 / 38%), 0 0 42px rgb(133 208 255 / 14%);
}

.share-qr-frame[aria-busy="true"] {
	opacity: 0.72;
}

.share-qr-frame img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.game-result {
	--winner-rgb: 35 114 170;
	--winner-solid: #2372aa;

	position: fixed;
	z-index: 30;
	inset: 0;
	overflow: hidden;
	visibility: hidden;
	pointer-events: none;
}

.game-result.winner-red {
	--winner-rgb: 169 52 55;
	--winner-solid: #a93437;
}

.game-result.is-active {
	visibility: visible;
}

.game-result-dim,
.game-result-danger-grid,
.game-result-danger-scan,
.game-result-warning-band,
.game-result-assassin-message,
.game-result-victory-wash,
.game-result-victory-rays,
.game-result-victory-trace,
.game-result-victory-message {
	position: absolute;
	pointer-events: none;
}

.game-result-dim {
	inset: 0;
	background: #050707;
	opacity: 0;
}

.game-result[data-effect="assassin"].is-active .game-result-dim {
	animation: game-result-danger-dim 3.1s ease-out both;
}

.game-result-danger-grid {
	inset: 0;
	background:
		linear-gradient(rgb(255 74 62 / 10%) 1px, transparent 1px) 0 0 / 48px 48px,
		linear-gradient(90deg, rgb(255 74 62 / 8%) 1px, transparent 1px) 0 0 / 48px 48px,
		radial-gradient(circle, transparent 24%, rgb(0 0 0 / 78%) 82%);
	opacity: 0;
}

.game-result[data-effect="assassin"].is-active .game-result-danger-grid {
	animation: game-result-danger-grid 3.1s ease-out both;
}

.game-result-danger-scan {
	right: 0;
	left: 0;
	height: 18vh;
	background: linear-gradient(180deg, transparent, rgb(255 60 47 / 22%), transparent);
	filter: blur(8px);
	opacity: 0;
}

.game-result[data-effect="assassin"].is-active .game-result-danger-scan {
	animation: game-result-danger-scan 2.4s 150ms cubic-bezier(0.22, 0.7, 0.22, 1) both;
}

.game-result-warning-band {
	right: -12vw;
	left: -12vw;
	height: clamp(30px, 5vh, 58px);
	border-block: 1px solid rgb(255 197 76 / 50%);
	background: repeating-linear-gradient(115deg, #f1b832 0 24px, #171817 24px 48px);
	box-shadow: 0 0 32px rgb(255 70 58 / 34%);
	opacity: 0;
}

.game-result-warning-top {
	top: 17%;
	transform: rotate(-4deg) scaleX(0);
	transform-origin: left;
}

.game-result-warning-bottom {
	bottom: 17%;
	transform: rotate(4deg) scaleX(0);
	transform-origin: right;
}

.game-result[data-effect="assassin"].is-active .game-result-warning-top {
	animation: game-result-warning-top 2.65s 200ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.game-result[data-effect="assassin"].is-active .game-result-warning-bottom {
	animation: game-result-warning-bottom 2.65s 280ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.game-result-assassin-message,
.game-result-victory-message {
	top: 50%;
	left: 50%;
	display: grid;
	justify-items: center;
	width: min(88vw, 760px);
	text-align: center;
	transform: translate(-50%, -50%);
}

.game-result-assassin-message {
	opacity: 0;
}

.game-result[data-effect="assassin"].is-active .game-result-assassin-message {
	animation: game-result-assassin-message 2.55s 350ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.game-result-assassin-seal {
	display: grid;
	place-items: center;
	width: clamp(92px, 15vw, 180px);
	aspect-ratio: 1;
	margin-bottom: 8px;
	border: 2px solid rgb(255 92 80 / 68%);
	border-radius: 50%;
	background: rgb(6 8 8 / 84%);
	box-shadow: 0 0 0 8px rgb(255 61 48 / 10%), 0 0 70px rgb(255 61 48 / 48%);
}

.game-result-assassin-seal img {
	width: 92%;
	height: 92%;
	object-fit: contain;
	filter: invert(1) sepia(0.4) saturate(3) hue-rotate(320deg);
	opacity: 0.74;
}

.game-result-kicker {
	color: #ffc64f;
	font-size: clamp(0.68rem, 1.4vw, 0.92rem);
	font-weight: 900;
	text-transform: uppercase;
}

.game-result-assassin-message strong,
.game-result-victory-message strong {
	font-size: clamp(3.2rem, 11vw, 9.5rem);
	font-weight: 950;
	line-height: 0.86;
	text-transform: uppercase;
}

.game-result-assassin-message strong {
	color: #fff1e8;
	text-shadow: 0 0 12px rgb(255 255 255 / 20%), 0 0 52px rgb(255 55 42 / 65%);
}

.game-result-detail {
	margin-top: 14px;
	color: rgb(255 241 232 / 78%);
	font-size: clamp(0.9rem, 2vw, 1.3rem);
	font-weight: 780;
}

.game-result-victory-wash {
	inset: 0;
	background:
		radial-gradient(circle at 50% 52%, rgb(244 193 82 / 24%), transparent 28%),
		linear-gradient(115deg, rgb(var(--winner-rgb) / 88%), rgb(var(--winner-rgb) / 46%));
	opacity: 0;
	transform: scaleX(0);
	transform-origin: left;
}

.game-result.winner-red .game-result-victory-wash {
	transform-origin: right;
}

.game-result[data-effect="victory"].is-active .game-result-victory-wash {
	animation: game-result-victory-wash 3s cubic-bezier(0.18, 0.8, 0.2, 1) both;
}

.game-result-victory-rays {
	top: 50%;
	left: 50%;
	width: max(130vw, 130vh);
	aspect-ratio: 1;
	background: repeating-conic-gradient(
		from 8deg,
		rgb(255 230 163 / 13%) 0 4deg,
		transparent 4deg 16deg
	);
	opacity: 0;
	transform: translate(-50%, -50%) rotate(-9deg) scale(0.5);
}

.game-result[data-effect="victory"].is-active .game-result-victory-rays {
	animation: game-result-victory-rays 3s 150ms ease-out both;
}

.game-result-victory-trace {
	top: 49%;
	left: 50%;
	width: min(86vw, 980px);
	height: 2px;
	background: linear-gradient(90deg, transparent, #ffe196 16% 84%, transparent);
	box-shadow: 0 0 18px #f4c152;
	opacity: 0;
	transform: translate(-50%, -50%) scaleX(0);
}

.game-result[data-effect="victory"].is-active .game-result-victory-trace {
	animation: game-result-victory-trace 2.3s 380ms ease-out both;
}

.game-result-victory-message {
	opacity: 0;
}

.game-result[data-effect="victory"].is-active .game-result-victory-message {
	animation: game-result-victory-message 2.6s 280ms cubic-bezier(0.18, 0.85, 0.2, 1) both;
}

.game-result-trophy {
	width: clamp(58px, 9vw, 112px);
	height: clamp(58px, 9vw, 112px);
	margin-bottom: 12px;
	color: #ffe196;
	filter: drop-shadow(0 0 22px rgb(244 193 82 / 55%));
	stroke-width: 1.35;
}

.game-result-victory-message strong {
	color: #fff8e8;
	text-shadow: 0 0 42px rgb(var(--winner-rgb) / 88%);
}

.spymaster-alert {
	position: fixed;
	z-index: 20;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 18px;
	background:
		radial-gradient(circle at 50% 44%, rgb(244 193 82 / 24%), transparent 34%),
		rgb(8 10 10 / 74%);
	opacity: 0;
	pointer-events: none;
}

.spymaster-alert.is-visible {
	opacity: 1;
	animation: spymaster-alert 3.4s ease-out both;
}

.spymaster-alert-panel {
	display: grid;
	justify-items: center;
	gap: 10px;
	width: min(860px, 94vw);
	padding: clamp(22px, 4vw, 48px);
	border: 2px solid rgb(244 193 82 / 70%);
	border-radius: 14px;
	background:
		linear-gradient(135deg, rgb(244 193 82 / 20%), rgb(169 52 55 / 18%)),
		rgb(10 12 12 / 92%);
	box-shadow:
		0 0 80px rgb(244 193 82 / 34%),
		inset 0 1px 0 rgb(255 255 255 / 16%);
	text-align: center;
	text-transform: uppercase;
}

.spymaster-alert-title {
	color: #f4c152;
	font-size: clamp(2rem, 7vw, 6.8rem);
	font-weight: 980;
	line-height: 0.9;
	text-shadow: 0 0 26px rgb(244 193 82 / 62%);
}

.spymaster-alert-panel span {
	color: #fff4d7;
	font-size: clamp(0.92rem, 2vw, 1.5rem);
	font-weight: 900;
	letter-spacing: 0.08em;
}

.spymaster-alert-name {
	color: #f4c152;
	font-size: 1.1em;
	font-weight: 980;
	text-shadow: 0 0 14px rgb(244 193 82 / 58%);
}

@keyframes game-result-danger-dim {
	0%,
	100% {
		opacity: 0;
	}

	10%,
	78% {
		opacity: 0.88;
	}
}

@keyframes game-result-danger-grid {
	0%,
	100% {
		opacity: 0;
		transform: scale(1.08);
	}

	18%,
	76% {
		opacity: 1;
		transform: scale(1);
	}
}

@keyframes game-result-danger-scan {
	0% {
		top: -24vh;
		opacity: 0;
	}

	15% {
		opacity: 1;
	}

	85% {
		opacity: 0.72;
	}

	100% {
		top: 108vh;
		opacity: 0;
	}
}

@keyframes game-result-warning-top {
	0%,
	100% {
		opacity: 0;
		transform: rotate(-4deg) scaleX(0);
	}

	18%,
	75% {
		opacity: 0.86;
		transform: rotate(-4deg) scaleX(1);
	}
}

@keyframes game-result-warning-bottom {
	0%,
	100% {
		opacity: 0;
		transform: rotate(4deg) scaleX(0);
	}

	18%,
	75% {
		opacity: 0.86;
		transform: rotate(4deg) scaleX(1);
	}
}

@keyframes game-result-assassin-message {
	0% {
		opacity: 0;
		transform: translate(-50%, -46%) scale(1.14);
	}

	18% {
		opacity: 0;
		transform: translate(-50%, -46%) scale(1.14);
	}

	34%,
	76% {
		opacity: 1;
		transform: translate(-50%, -50%) scale(1);
	}

	100% {
		opacity: 0;
		transform: translate(-50%, -53%) scale(0.97);
	}
}

@keyframes game-result-victory-wash {
	0% {
		opacity: 0;
		transform: scaleX(0);
	}

	22% {
		opacity: 0.84;
		transform: scaleX(1);
	}

	72% {
		opacity: 0.7;
		transform: scaleX(1);
	}

	100% {
		opacity: 0;
		transform: scaleX(1);
	}
}

@keyframes game-result-victory-rays {
	0% {
		opacity: 0;
		transform: translate(-50%, -50%) rotate(-9deg) scale(0.5);
	}

	30% {
		opacity: 0.8;
	}

	75% {
		opacity: 0.48;
	}

	100% {
		opacity: 0;
		transform: translate(-50%, -50%) rotate(8deg) scale(1);
	}
}

@keyframes game-result-victory-trace {
	0%,
	100% {
		opacity: 0;
		transform: translate(-50%, -50%) scaleX(0);
	}

	26%,
	72% {
		opacity: 1;
		transform: translate(-50%, -50%) scaleX(1);
	}
}

@keyframes game-result-victory-message {
	0% {
		opacity: 0;
		transform: translate(-50%, -42%) scale(0.78);
	}

	30%,
	76% {
		opacity: 1;
		transform: translate(-50%, -50%) scale(1);
	}

	100% {
		opacity: 0;
		transform: translate(-50%, -54%) scale(1.03);
	}
}

@keyframes share-dialog-in {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.985);
	}

	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes turn-pulse {
	0% {
		opacity: 0.55;
		transform: scale(1);
	}

	38% {
		opacity: 0.98;
		transform: scale(1.04);
	}

	100% {
		opacity: 0.82;
		transform: scale(1);
	}
}

@keyframes toast-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes toast-out {
	from {
		opacity: 1;
		transform: translateY(0);
	}

	to {
		opacity: 0;
		transform: translateY(8px);
	}
}

@keyframes turn-relay-out {
	to {
		opacity: 0;
		transform: translateX(var(--turn-exit-x));
	}
}

@keyframes turn-relay-in {
	from {
		opacity: 0;
		transform: translateX(var(--turn-enter-x));
	}

	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes spymaster-alert {
	0% {
		opacity: 1;
		transform: scale(0.98);
	}

	12%,
	82% {
		opacity: 1;
		transform: scale(1);
	}

	100% {
		opacity: 0;
		transform: scale(1.02);
	}
}

@keyframes score-count-down {
	0% {
		opacity: 0.42;
		transform: translateY(-12px);
	}

	52% {
		opacity: 1;
		transform: translateY(3px);
	}

	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes score-panel-flash {
	0% {
		box-shadow:
			inset 0 1px 0 rgb(255 255 255 / 10%),
			0 18px 42px rgb(0 0 0 / 22%),
			0 0 0 rgb(var(--score-rgb) / 0%);
	}

	42% {
		border-color: rgb(var(--score-rgb) / 64%);
		box-shadow:
			inset 0 0 0 2px rgb(var(--score-rgb) / 26%),
			0 18px 42px rgb(0 0 0 / 22%),
			0 0 42px rgb(var(--score-rgb) / 42%);
	}

	100% {
		box-shadow:
			inset 0 1px 0 rgb(255 255 255 / 10%),
			0 18px 42px rgb(0 0 0 / 22%),
			0 0 0 rgb(var(--score-rgb) / 0%);
	}
}

@keyframes stat-count-lift {
	0% {
		filter: drop-shadow(0 0 0 rgb(244 193 82 / 0%));
		transform: translateY(4px) scale(0.96);
	}

	52% {
		filter: drop-shadow(0 0 16px rgb(244 193 82 / 28%));
	}

	100% {
		filter: drop-shadow(0 0 0 rgb(244 193 82 / 0%));
		transform: translateY(0) scale(1);
	}
}

@media (width <= 700px) {
	.game-result-warning-top {
		top: 13%;
	}

	.game-result-warning-bottom {
		bottom: 13%;
	}

	.game-result-assassin-message,
	.game-result-victory-message {
		width: 94vw;
	}
}

@media (prefers-reduced-motion: reduce) {
	.game-shell.turn-pulse::before,
	.team-score-progress,
	.share-dialog[open],
	.turn-label.turn-relay .turn-copy,
	.game-toast,
	.spymaster-alert.is-visible,
	.score strong.score-count-down,
	.score.score-panel-flash,
	.stat strong.is-counting {
		animation: none;
		transition: none;
	}

	.game-result[data-effect].is-active .game-result-dim,
	.game-result[data-effect].is-active .game-result-danger-grid,
	.game-result[data-effect].is-active .game-result-danger-scan,
	.game-result[data-effect].is-active .game-result-warning-band,
	.game-result[data-effect].is-active .game-result-assassin-message,
	.game-result[data-effect].is-active .game-result-victory-wash,
	.game-result[data-effect].is-active .game-result-victory-rays,
	.game-result[data-effect].is-active .game-result-victory-trace,
	.game-result[data-effect].is-active .game-result-victory-message {
		animation: none;
	}

	.game-result[data-effect="assassin"].is-active .game-result-dim {
		opacity: 0.88;
	}

	.game-result[data-effect="assassin"].is-active .game-result-danger-grid {
		opacity: 0.7;
		transform: scale(1);
	}

	.game-result[data-effect="assassin"].is-active .game-result-danger-scan,
	.game-result[data-effect="assassin"].is-active .game-result-warning-band {
		display: none;
	}

	.game-result[data-effect="assassin"].is-active .game-result-assassin-message,
	.game-result[data-effect="victory"].is-active .game-result-victory-message {
		opacity: 1;
		transform: translate(-50%, -50%);
	}

	.game-result[data-effect="victory"].is-active .game-result-victory-wash {
		opacity: 0.72;
		transform: scaleX(1);
	}

	.game-result[data-effect="victory"].is-active .game-result-victory-rays {
		opacity: 0.4;
		transform: translate(-50%, -50%) rotate(0) scale(1);
	}

	.game-result[data-effect="victory"].is-active .game-result-victory-trace {
		opacity: 1;
		transform: translate(-50%, -50%) scaleX(1);
	}

	.turn-label.turn-relay .turn-current {
		opacity: 0;
	}

	.turn-label.turn-relay .turn-next {
		opacity: 1;
	}

	.spymaster-alert.is-visible {
		opacity: 1;
	}
}

@media (width >= 821px) {
	.game-shell {
		height: 100svh;
	}
}

@media (width >= 1200px) and (height >= 800px) {
	.game-shell {
		--board-tv-extra: 18px;
		--card-font-size: clamp(1rem, 1.45vw, 1.7rem);
		--card-tv-ratio: 1.52;
	}
}

@media (width <= 820px) {
	.share-dialog {
		width: calc(100vw - 20px);
		max-height: calc(100svh - 20px);
	}

	.share-dialog-content {
		gap: 20px;
		padding: 16px;
	}

	.share-dialog-header h2 {
		font-size: 1.65rem;
	}

	.share-dialog-body {
		grid-template-columns: minmax(0, 1fr);
		gap: 22px;
	}

	.share-details {
		gap: 20px;
	}

	.share-section + .share-section {
		padding-top: 20px;
	}

	.share-room-name {
		font-size: clamp(1.8rem, 10vw, 2.8rem);
	}

	.share-qr-frame {
		width: min(100%, 320px);
	}

	.shell {
		background:
			linear-gradient(180deg, rgb(12 17 16 / 95%), rgb(12 17 16 / 48%)),
			url("/assets/hero-game-table.png?v=c8511b94febc") center / cover;
	}

	.hero {
		grid-template-columns: 1fr;
		min-height: auto;
		padding: 28px 18px 22px;
	}

	.hero h1 {
		max-width: 10ch;
		font-size: clamp(2.85rem, 14vw, 5.3rem);
	}

	.preview {
		grid-template-columns: 1fr;
	}

	.game-shell {
		--card-font-size: clamp(0.58rem, 2.68vw, 0.9rem);

		grid-template-rows: auto auto auto;
		gap: 10px;
		min-height: auto;
		padding: 12px;
	}

	.topbar {
		grid-template-columns: 1fr 1fr;
	}

	.turn-panel {
		grid-column: 1 / -1;
		grid-row: 1;
	}

	.score {
		min-height: 72px;
	}

	.turn-label {
		min-height: 44px;
		font-size: clamp(1rem, 6vw, 1.75rem);
	}

	.board-grid {
		gap: 5px;
		width: 100%;
		padding: 7px;
		border-radius: 12px;
	}

	.word-card {
		aspect-ratio: 1.04;
		padding: 4px;
		border-radius: 9px;
	}

	.bottom-console {
		grid-template-columns: 1fr;
	}

	.players-box {
		display: grid;
		grid-template-columns: auto auto minmax(0, 1fr);
		align-items: center;
		gap: 8px;
	}

	.connection-indicator {
		grid-column: 1;
		grid-row: 1;
	}

	.presence-divider {
		display: block;
		grid-column: 2;
		grid-row: 1;
		min-height: 22px;
	}

	.nicknames {
		grid-column: 3;
		grid-row: 1;
	}

	.spy-divider {
		display: none;
	}

	.spy-names {
		grid-column: 1 / -1;
	}

	.overlay-rail {
		width: 100%;
	}

	.controls-box {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.control {
		min-width: 0;
		padding: 0 8px;
		white-space: normal;
	}

	.control svg {
		width: 18px;
		height: 18px;
	}
}
