@font-face {
	font-family: "Korinna";
	src: url("/css/Korinna-Regular.otf") format("opentype");
	font-style: normal;
	font-weight: 400;
	font-display: swap;
}

:root {
	/* Legacy-inspired palette and typography tokens */
	--legacy-blue: #0015a0;
	--legacy-gold: #efaa50;
	--surface-deep: #000e6f;
	--surface-raised: #001a8f;
	--surface-panel: #001579;
	--surface-muted: #09163b;
	--surface-input: #0f194f;
	--surface-input-hover: #1a2548;
	--surface-hover: #0424b8;
	--surface-overlay: rgba(4, 8, 20, 0.9);
	--surface-modal-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
	--surface-host-fastest: #11422f;
	--surface-host-score-fastest: #11342d;
	--border-strong: #00094d;
	--border-muted: #1a2c5d;
	--border-control: #3c4b69;
	--border-button: #345;
	--text-primary: #ffffff;
	--text-muted: #d7deff;
	--text-subtle: #b4c0f3;
	--text-gold: #ffd57a;
	--text-cell: #ffd166;
	--text-done: #596690;
	--text-revealed: #8d9ac8;
	--text-detail: #8ea2d8;
	--text-highlight: #9fd4ff;
	--text-shadow-strong: #000000;

	--state-correct: #36f28f;
	--state-correct-bg: #0f5a3e;
	--state-correct-border: #27d17d;
	--state-incorrect: #ff6b6b;
	--state-incorrect-bg: #7a2323;
	--state-warning: #ffd166;
	--state-warning-bg: #6f5316;
	--state-warning-strong: #ffc233;
	--state-warning-soft: #ffe7a3;
	--state-correct-strong: #22c55e;
	--state-correct-deep: #166534;
	--state-correct-accent: #28a745;
	--state-incorrect-deep: #9a3412;
	--state-incorrect-accent: #f97316;
	--state-neutral: #3a4b4a;

	--font-body: "Kadwa", Georgia, "Times New Roman", serif;
	--font-display: "Fjalla One", "Segoe UI", Arial, sans-serif;
	--font-clue: "Korinna", "Kadwa", Georgia, "Times New Roman", serif;

	--board-gap: 6px;
	--board-cell-height: 96px;
	--board-cell-pad: 12px;
	--board-clue-size: clamp(1.05rem, 2.5vw, 2rem);
	--board-head-size: clamp(0.95rem, 1.6vw, 1.25rem);
	--board-score-name-size: clamp(0.9rem, 1.3vw, 1.1rem);
	--board-score-value-size: clamp(1.2rem, 2.2vw, 1.8rem);
}

* { box-sizing: border-box; }
html { height: 100%; overflow: hidden; }
body { font-family: var(--font-body); margin: 0; background: var(--surface-deep); color: var(--text-primary); height: 100%; overflow: hidden; }
.container { max-width: 1100px; margin: 0 auto; padding: 16px; height: 100%; overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
header { display: grid; gap: 10px; margin-bottom: 8px; }
.header-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.header-title {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}
.header-live {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	flex: 1;
	min-width: 0;
}
h1 { margin: 0; font-family: var(--font-display); letter-spacing: 0.03em; text-transform: uppercase; text-shadow: 2px 2px var(--text-shadow-strong); }
.title-toggle { cursor: pointer; user-select: none; }
#status { margin-top: 0; font-size: 0.9rem; color: var(--text-subtle); white-space: nowrap; }
.controls {
	display: grid;
	grid-template-columns: minmax(320px, 1fr);
	gap: 10px;
	align-items: stretch;
}
.control-group { display: grid; gap: 4px; }
.control-group label { font-size: 0.8rem; color: var(--text-subtle); text-transform: uppercase; letter-spacing: 0.02em; font-family: var(--font-display); }
.controls input, .controls select { width: 100%; padding: 7px 9px; border-radius: 4px; border: 1px solid var(--border-muted); background: var(--surface-input); color: var(--text-primary); }
.controls button { padding: 7px 10px; border-radius: 4px; background: var(--surface-raised); color: var(--text-primary); border: 1px solid var(--border-muted); cursor: pointer; font-family: var(--font-display); letter-spacing: 0.02em; }
.controls button:hover { background: var(--surface-hover); }
.control-panel { border: 1px solid var(--border-muted); padding: 10px; display: grid; gap: 8px; background: var(--surface-panel); }
.control-panel h2 { margin: 0; font-size: 0.95rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; font-family: var(--font-display); }
.control-panel p { margin: 0; color: var(--text-subtle); font-size: 0.85rem; line-height: 1.3; }
.action-row { display: grid; grid-template-columns: 1fr; gap: 6px; }

.session-header {
	display: grid;
	gap: 10px;
	border: 1px solid var(--border-muted);
	padding: 10px;
	background: var(--surface-panel);
}

.session-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.session-game {
	font-size: 0.95rem;
	color: var(--text-muted);
	display: flex;
	align-items: center;
	gap: 6px;
}

#sessionGameId {
	font-weight: 700;
	color: var(--text-gold);
	font-family: var(--font-display);
}

.icon-btn {
	border: 1px solid var(--border-muted);
	background: var(--surface-input);
	color: var(--text-muted);
	padding: 2px 6px;
	line-height: 1;
	cursor: pointer;
}

.icon-btn:hover {
	background: var(--surface-input-hover);
}

.host-mode-badge {
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 3px 7px;
	background: var(--state-correct-bg);
	border: 1px solid var(--state-correct-border);
	color: #d6ffe9;
	font-family: var(--font-display);
	white-space: nowrap;
}

.session-players {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.session-player {
	padding: 4px 8px;
	border: 1px solid var(--border-muted);
	background: var(--surface-input);
	color: var(--text-muted);
	font-size: 0.86rem;
}

.session-player.empty {
	color: var(--text-subtle);
}

.in-session .container {
	max-width: none;
	padding: 10px 14px 12px;
}

.board-score-header {
	border: 1px solid var(--border-muted);
	background: var(--surface-panel);
	padding: 6px;
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 1;
	min-width: 0;
}

.board-scores {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 6px;
	flex: 1;
	width: 100%;
	min-width: 0;
}

.board-score-player {
	border: 1px solid var(--border-strong);
	background: var(--legacy-blue);
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	min-width: 0;
	width: 100%;
}

.board-score-player-name {
	background: var(--surface-raised);
	color: var(--text-primary);
	font-family: var(--font-display);
	font-size: var(--board-score-name-size);
	line-height: 1.05;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	text-align: center;
	padding: 6px 8px;
	text-shadow: 2px 2px var(--text-shadow-strong);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
}

.board-score-player-value {
	color: var(--text-cell);
	font-family: var(--font-display);
	font-weight: 700;
	font-size: var(--board-score-value-size);
	line-height: 1;
	text-align: center;
	text-transform: uppercase;
	text-shadow: 2px 2px var(--text-shadow-strong);
	padding: 6px 10px;
	white-space: nowrap;
}

.board-score-empty {
	color: var(--text-subtle);
	font-family: var(--font-display);
	font-size: 0.86rem;
	text-transform: uppercase;
	padding: 6px;
}

@media (max-width: 980px) {
	.controls {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	.header-top {
		flex-direction: column;
		align-items: flex-start;
	}
	.header-title {
		width: 100%;
	}
	.header-live {
		width: 100%;
		justify-content: flex-start;
		flex-direction: column;
		align-items: stretch;
	}
	.controls {
		grid-template-columns: 1fr;
	}
	.board-scores {
		grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
	}
}
main { display: block; margin-top: 16px; overflow: hidden; }
.in-session main { margin-top: 10px; }

#board { width: 100%; }
.board-shell { display: grid; gap: 10px; }
.board-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.board-tab {
	background: var(--surface-raised);
	color: var(--text-primary);
	border: 1px solid var(--border-strong);
	border-radius: 4px;
	font-family: var(--font-display);
	font-size: 0.9rem;
	font-weight: 700;
	padding: 7px 10px;
	text-transform: uppercase;
	cursor: pointer;
}
.board-tab.active {
	background: var(--legacy-blue);
	color: var(--text-gold);
}
.board-tab.final-tab {
	border-color: var(--legacy-gold);
}
.board-tab:disabled {
	cursor: default;
	opacity: 0.72;
}
.grid { display: grid; gap: var(--board-gap); width: 100%; }
.grid-row { display: contents; }
.grid-cell {
	background: var(--legacy-blue);
	color: var(--text-cell);
	font-family: var(--font-display);
	font-weight: 700;
	font-size: var(--board-clue-size);
	padding: var(--board-cell-pad);
	min-height: var(--board-cell-height);
	text-align: center;
	border-radius: 0;
	border: 1px solid var(--border-strong);
	cursor: pointer;
	text-transform: uppercase;
	text-shadow: 2px 2px var(--text-shadow-strong);
	display: flex;
	align-items: center;
	justify-content: center;
}
.grid-cell.done { background: var(--surface-muted); color: var(--text-done); cursor: default; }
.grid-cell.revealed { background: #0c1c46; color: var(--text-revealed); cursor: default; }
.grid-cell.done-summary {
	text-transform: none;
	font-size: clamp(0.85rem, 1.8vw, 1.4rem);
	font-family: var(--font-display);
	line-height: 1.25;
	color: var(--text-muted);
	display: grid;
	gap: 4px;
	align-content: center;
	justify-items: center;
}
.grid-cell .done-primary {
	font-weight: 700;
	color: #c7d2fe;
	word-break: break-word;
}

.grid-cell .done-correct-line,
.grid-cell .done-incorrect-line {
	font-weight: 700;
	word-break: break-word;
	max-width: 100%;
}

.grid-cell .done-correct-line {
	color: var(--state-correct);
	text-shadow: 0 0 8px rgba(54, 242, 143, 0.35);
}

.grid-cell .done-incorrect-line {
	color: var(--state-incorrect);
	text-shadow: 0 0 8px rgba(255, 107, 107, 0.35);
}

.grid-cell .done-correct-line span,
.grid-cell .done-incorrect-line span {
	font-weight: 700;
	word-break: break-word;
}
.grid-cell.player-done-hidden {
	visibility: hidden;
	pointer-events: none;
}
.grid-head { background: var(--surface-raised); color: var(--text-primary); font-family: var(--font-display); font-weight: 600; cursor: default; text-transform: uppercase; font-size: var(--board-head-size); }
/* Wrap between words; JS shrinks titles to fit the fixed header cell. */
.grid-head {
	min-width: 0;
	height: var(--board-cell-height);
	white-space: normal;
	overflow-wrap: normal;
	word-break: normal;
	hyphens: none;
	text-align: center;
	line-height: 1.1;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}
.grid-head .category-title {
	width: 100%;
	min-width: 0;
}

.final-jeopardy {
	margin: 0 auto;
	max-height: calc(100vh - 150px);
	overflow: auto;
	box-shadow: var(--surface-modal-shadow);
	width: min(100%, 980px);
}
.final-panel {
	background: var(--surface-panel);
	border: 2px solid var(--border-strong);
	display: grid;
	gap: 10px;
	padding: 12px;
}
.final-topline {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 10px;
	align-items: start;
}
.final-kicker {
	color: var(--text-subtle);
	font-family: var(--font-display);
	font-size: 0.76rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.final-category {
	color: var(--text-gold);
	font-family: var(--font-display);
	font-size: 1.15rem;
	line-height: 1.1;
	text-transform: uppercase;
	text-shadow: 2px 2px var(--text-shadow-strong);
}
.final-question {
	background: var(--legacy-blue);
	border: 1px solid var(--border-strong);
	color: var(--text-primary);
	font-family: var(--font-clue);
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.25;
	padding: 10px;
	text-align: center;
	text-shadow: 2px 2px var(--text-shadow-strong);
	text-transform: uppercase;
}
.final-answer {
	color: var(--text-muted);
	font-family: var(--font-display);
	text-align: center;
	text-transform: uppercase;
}
.final-host-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: flex-end;
}
.final-player-pads,
.final-host-list,
.final-public-list {
	display: grid;
	gap: 8px;
}
.final-draw-card,
.final-host-row,
.final-public-row {
	background: var(--surface-muted);
	border: 1px solid var(--border-muted);
	display: grid;
	gap: 7px;
	padding: 8px;
}
.final-host-row {
	grid-template-columns: minmax(90px, 0.45fr) minmax(0, 1fr) auto;
	align-items: start;
}
.final-public-row {
	grid-template-columns: minmax(90px, 0.45fr) minmax(0, 1fr);
	align-items: start;
}
.final-host-name {
	color: var(--text-muted);
	font-family: var(--font-display);
	line-height: 1.1;
	overflow-wrap: anywhere;
	text-transform: uppercase;
}
.final-reveal-actions {
	display: grid;
	gap: 6px;
	justify-items: stretch;
}
.final-wager-input {
	display: grid;
	gap: 3px;
	color: var(--text-subtle);
	font-family: var(--font-display);
	font-size: 0.76rem;
	text-transform: uppercase;
}
.final-wager-input input {
	background: var(--surface-input);
	border: 1px solid var(--border-muted);
	color: var(--text-primary);
	font-family: var(--font-display);
	padding: 6px 8px;
	width: 100%;
}
.final-mark-controls {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
}
.final-slot-head {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	color: var(--text-subtle);
	font-family: var(--font-display);
	font-size: 0.78rem;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}
.final-canvas-wrap {
	position: relative;
}
.final-canvas {
	background: var(--legacy-blue);
	border: 1px solid var(--legacy-gold);
	display: block;
	height: 260px;
	touch-action: none;
	width: 100%;
}
.final-region-label {
	background: rgba(0, 0, 0, 0.42);
	color: var(--text-gold);
	font-family: var(--font-display);
	font-size: 0.74rem;
	letter-spacing: 0.04em;
	padding: 3px 6px;
	pointer-events: none;
	position: absolute;
	right: 8px;
	text-transform: uppercase;
}
.final-region-label.top {
	top: 8px;
}
.final-region-label.bottom {
	bottom: 8px;
}
.final-draw-card.disabled {
	opacity: 0.62;
}
.final-draw-actions {
	display: flex;
	justify-content: flex-end;
	gap: 6px;
}
.final-action {
	background: var(--surface-raised);
	border: 1px solid var(--border-muted);
	border-radius: 4px;
	color: var(--text-primary);
	cursor: pointer;
	font-family: var(--font-display);
	font-size: 0.78rem;
	letter-spacing: 0.02em;
	padding: 6px 8px;
	text-transform: uppercase;
}
.final-action.primary {
	background: var(--state-correct-bg);
	border-color: var(--state-correct-border);
	color: #d6ffe9;
}
.final-action:disabled {
	cursor: not-allowed;
	opacity: 0.55;
}
.final-panel-preview {
	aspect-ratio: 16 / 9;
	background: var(--legacy-blue);
	border: 1px solid var(--legacy-gold);
	min-height: 150px;
	overflow: hidden;
	position: relative;
}
.final-panel-image {
	display: block;
	height: 100%;
	object-fit: fill;
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
}
.final-panel-preview.show-wager:not(.show-response):not(.host-full) .final-panel-image {
	clip-path: inset(50% 0 0 0);
}
.final-panel-preview.show-response:not(.show-wager):not(.host-full) .final-panel-image {
	clip-path: inset(0 0 50% 0);
}
.final-panel-placeholder {
	color: var(--text-subtle);
	font-family: var(--font-display);
	padding: 12px;
	text-align: center;
	text-transform: uppercase;
}
.final-region-tag {
	background: rgba(0, 0, 0, 0.48);
	color: var(--text-gold);
	font-family: var(--font-display);
	font-size: 0.7rem;
	letter-spacing: 0.04em;
	padding: 3px 6px;
	position: absolute;
	right: 6px;
	text-transform: uppercase;
}
.final-region-tag.response {
	top: 6px;
}
.final-region-tag.wager {
	bottom: 6px;
}
.final-empty {
	border: 1px solid var(--border-muted);
	color: var(--text-subtle);
	padding: 8px;
}
.game-summary-panel {
	max-width: 900px;
	margin: 0 auto;
	width: 100%;
}
.summary-winner {
	background: var(--legacy-blue);
	border: 1px solid var(--legacy-gold);
	color: var(--text-gold);
	font-family: var(--font-display);
	font-size: 1.35rem;
	padding: 12px;
	text-align: center;
	text-shadow: 2px 2px var(--text-shadow-strong);
	text-transform: uppercase;
}
.summary-list {
	display: grid;
	gap: 8px;
}
.summary-row {
	background: var(--surface-muted);
	border: 1px solid var(--border-muted);
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: 10px;
	align-items: center;
	padding: 10px;
}
.summary-row.winner {
	border-color: var(--legacy-gold);
	background: var(--legacy-blue);
}
.summary-place,
.summary-score,
.summary-name {
	font-family: var(--font-display);
	text-transform: uppercase;
}
.summary-place {
	color: var(--text-gold);
	font-size: 1.1rem;
	min-width: 44px;
	text-align: center;
}
.summary-name {
	color: var(--text-primary);
}
.summary-detail {
	color: var(--text-subtle);
	font-size: 0.84rem;
	line-height: 1.25;
}
.summary-score {
	color: var(--text-cell);
	font-size: 1.2rem;
	text-shadow: 2px 2px var(--text-shadow-strong);
}

@media (max-width: 760px) {
	.final-jeopardy {
		max-height: calc(100vh - 190px);
		width: 100%;
	}
	.final-host-row {
		grid-template-columns: 1fr;
	}
	.final-public-row {
		grid-template-columns: 1fr;
	}
	.summary-row {
		grid-template-columns: 1fr;
		text-align: center;
	}
}

/* Full-screen overlay for clues */
.overlay { position: fixed; inset: 0; background: var(--surface-overlay); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.overlay.hidden { display: none; }
.hidden { display: none !important; }
.modal { position: relative; max-width: 800px; width: 90%; }
.modal-close { position: absolute; right: 0; top: -40px; background: transparent; color: var(--text-primary); font-size: 2rem; border: none; cursor: pointer; }
.question-card {
	background: var(--legacy-blue);
	border-radius: 0;
	padding: 24px;
	border: 4px solid transparent;
	box-sizing: border-box;
	box-shadow: var(--surface-modal-shadow);
}
.question-card.buzz-active {
	border: 4px dotted var(--state-warning);
	animation: buzz-border-pulse 0.8s steps(2, end) infinite;
}
.question-card.self-buzzed {
	border: 4px solid var(--state-correct-border);
	box-shadow: 0 0 0 2px rgba(39, 209, 125, 0.45), 0 10px 24px rgba(0,0,0,0.4);
	animation: none;
}
.question-card.buzz-active.self-buzzed {
	border-style: solid;
}
.question-card.host-buzz-received {
	border: 4px solid var(--state-correct-strong);
	box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.5), 0 10px 24px rgba(0,0,0,0.4);
	animation: none;
}
.question-card.buzz-active.host-buzz-received {
	border-style: solid;
}
.question-card.self-answering {
	border: 4px solid #67e8f9;
	box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.5), 0 10px 24px rgba(0,0,0,0.4);
	animation: none;
}
.question-card.buzz-active.self-answering {
	border-style: solid;
	animation: none;
}
@keyframes buzz-border-pulse {
	0% {
		border-color: var(--state-warning-strong);
		box-shadow: 0 0 0 1px rgba(255, 194, 51, 0.3), 0 10px 24px rgba(0,0,0,0.4);
	}
	50% {
		border-color: var(--state-warning-soft);
		box-shadow: 0 0 0 3px rgba(255, 225, 138, 0.45), 0 10px 24px rgba(0,0,0,0.4);
	}
	100% {
		border-color: var(--state-warning-strong);
		box-shadow: 0 0 0 1px rgba(255, 194, 51, 0.3), 0 10px 24px rgba(0,0,0,0.4);
	}
}
.question-card .category { color: var(--text-gold); font-family: var(--font-display); font-weight: 700; margin-bottom: 10px; text-align: center; text-transform: uppercase; text-shadow: 2px 2px var(--text-shadow-strong); }
.question-card .text { font-size: 1.6rem; text-align: center; text-transform: uppercase; font-family: var(--font-clue); font-weight: 700; color: var(--text-primary); text-shadow: 3px 3px var(--text-shadow-strong); }
.host-instructions { margin: 8px 0; font-size: 0.9rem; line-height: 1.4; font-family: var(--font-body); font-weight: normal; color: var(--text-muted); text-transform: none; text-shadow: none; white-space: pre-wrap; }
.question-card .answer { margin-top: 12px; font-size: 1rem; color: var(--text-muted); text-align: center; }
.question-card .result { margin-top: 10px; font-weight: 700; text-align: center; }
.question-card .buzz-status { margin-top: 10px; font-size: 0.95rem; color: var(--text-muted); text-align: center; }
.host-buzz-list { margin-top: 12px; border: 1px solid var(--border-muted); }
.host-buzz-header,
.host-buzz-row {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 8px;
	padding: 8px 10px;
	align-items: center;
}
.host-buzz-header {
	background: var(--surface-raised);
	color: var(--text-subtle);
	font-size: 0.85rem;
	text-transform: uppercase;
	font-family: var(--font-display);
}
.host-buzz-row {
	border-top: 1px solid var(--border-muted);
	color: var(--text-muted);
}
.host-buzz-row .host-buzz-value {
	color: var(--text-detail);
	font-size: 0.92rem;
}
.host-buzz-row.buzzed .host-buzz-value {
	color: var(--text-highlight);
}
.host-buzz-row.fastest {
	background: var(--surface-host-fastest);
	border-left: 4px solid var(--state-correct-border);
}
.host-buzz-row.fastest .host-buzz-name,
.host-buzz-row.fastest .host-buzz-value {
	color: #d6ffe9;
	font-weight: 700;
}
.host-scoring-panel {
	margin-top: 12px;
	border: 1px solid var(--border-muted);
	background: var(--surface-muted);
}
.host-scoring-header {
	padding: 8px 10px;
	background: var(--surface-raised);
	color: var(--text-subtle);
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-family: var(--font-display);
}
.host-scoring-rows {
	display: grid;
	gap: 0;
}
.host-score-row {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 10px;
	align-items: center;
	padding: 7px 10px;
	border-top: 1px solid var(--border-muted);
}
.host-score-row.fastest {
	background: var(--surface-host-score-fastest);
}
.host-score-row.answering {
	box-shadow: inset 3px 0 0 #67e8f9;
}
.host-score-meta {
	display: grid;
	gap: 2px;
}
.host-score-name {
	color: var(--text-muted);
}
.host-score-buzz {
	font-size: 0.8rem;
	color: var(--text-subtle);
}
.host-score-answer-control {
	margin-top: 4px;
}
.answer-select-btn {
	padding: 4px 8px;
	border: 1px solid #1f6672;
	background: #13363d;
	color: #b9f8ff;
	cursor: pointer;
	font-size: 0.78rem;
	font-family: var(--font-display);
	text-transform: uppercase;
	letter-spacing: 0.02em;
}
.answer-select-btn.active {
	border-color: #67e8f9;
	background: #0e4953;
	color: #e0fdff;
}
.answer-select-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}
.host-score-actions {
	display: flex;
	gap: 5px;
	flex-wrap: wrap;
	justify-content: flex-end;
}
.score-choice {
	padding: 4px 7px;
	border: 1px solid var(--border-control);
	background: #1f2b46;
	color: var(--text-muted);
	cursor: pointer;
	font-size: 0.95rem;
	line-height: 1;
	font-family: var(--font-display);
}
.score-correct {
	border-color: #276749;
	background: #14392a;
}
.score-incorrect {
	border-color: #8a2b2b;
	background: #4a1a1a;
}
.score-unmarked {
	border-color: #8d6e1f;
	background: #3e3215;
}
.score-correct.active {
	border-color: var(--state-correct-border);
	background: var(--state-correct-bg);
	color: #d6ffe9;
}
.score-incorrect.active {
	border-color: var(--state-incorrect);
	background: var(--state-incorrect-bg);
	color: #ffe0e0;
}
.score-unmarked.active {
	border-color: var(--state-warning);
	background: var(--state-warning-bg);
	color: #fff2c2;
}
.score-choice:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}
.host-scoring-empty {
	padding: 10px;
	color: var(--text-subtle);
}
.buzz-rankings { margin-top: 10px; display: grid; gap: 4px; }
.ranking-row { text-align: center; color: var(--text-gold); font-weight: 600; font-family: var(--font-display); }
.modal-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	justify-content: center;
	margin-top: 12px;
}
.modal-controls button {
	padding: 8px 12px;
	border-radius: 4px;
	border: 1px solid var(--border-button);
	background: var(--surface-raised);
	color: var(--text-primary);
	font-size: 0.86rem;
	line-height: 1.1;
	min-width: 110px;
	flex: 0 1 130px;
	max-width: 160px;
	font-family: var(--font-display);
}
.modal-controls .host-only { background: var(--state-correct-bg); }
.modal-controls .host-only:disabled { background: var(--state-neutral); opacity: 0.7; }
.btn-buzz-toggle {
	background: linear-gradient(180deg, #2b5db3 0%, #244f9a 100%) !important;
	border-color: #79a7ff !important;
	letter-spacing: 0.02em;
	font-weight: 700;
	box-shadow: inset 0 0 0 1px rgba(198, 219, 255, 0.15), 0 2px 8px rgba(0,0,0,0.28);
	min-width: 150px;
	max-width: none;
	flex: 0 0 auto;
	white-space: nowrap;
}
.btn-buzz-toggle.on {
	background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%) !important;
	border-color: #93c5fd !important;
	box-shadow: inset 0 0 0 1px rgba(219, 234, 254, 0.22), 0 2px 10px rgba(10, 37, 92, 0.38);
}
.btn-confirm {
	background: var(--state-correct-deep) !important;
	border-color: var(--state-correct-accent) !important;
}
.btn-cancel {
	background: var(--state-incorrect-deep) !important;
	border-color: var(--state-incorrect-accent) !important;
}

.buzz-area { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 6px; align-items: center; }
.buzz-area button { padding: 8px 10px; border-radius: 4px; border: none; background: var(--surface-raised); color: var(--text-primary); font-family: var(--font-display); }
.buzz-area input { padding: 8px; border-radius: 4px; border: 1px solid var(--border-muted); background: var(--surface-input); color: var(--text-primary); }

/* Removed players list styling as sidebar is gone */

/* Library selection and host-controlled clue media. */
.library-selectors { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-cell.unavailable { background: var(--surface-muted); color: var(--text-subtle); cursor: default; }
.clue-media { display: grid; justify-items: center; gap: 8px; margin-top: 10px; }
/* Player media is display-only; clicks target the enclosing clue card. */
.clue-media.player-media { pointer-events: none; user-select: none; }
.media-controls { display: grid; gap: 6px; width: 100%; }
.media-controls label { display: flex; align-items: center; gap: 8px; }
.media-controls select { flex: 1; min-width: 0; background: var(--surface-input); color: var(--text-primary); padding: 6px; border: 1px solid var(--border-muted); }
.media-actions, .media-previews { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.clue-media button { padding: 6px 10px; background: var(--surface-raised); color: var(--text-primary); border: 1px solid var(--border-muted); cursor: pointer; }
.clue-media button:disabled { cursor: default; opacity: 0.6; }
.media-previews img { display: block; width: 64px; height: 44px; object-fit: contain; }
.media-image, .media-video { max-width: 100%; width: auto; max-height: 25vh; object-fit: contain; }
.media-status { font-size: 0.85rem; color: var(--text-muted); margin: 0; }
.media-mute { font-size: 0.85rem; }
.modal { max-height: calc(100dvh - 70px); overflow: visible; }
.question-card { max-height: calc(100dvh - 70px); overflow: auto; }
.container { min-height: 0; }
body:not(.in-session) .container { overflow: auto; }
main { overflow: auto; min-height: 0; }
.final-mode main { display: flex; flex-direction: column; }
.final-mode #board { flex: 1; min-height: 0; overflow: auto; }
.final-mode .final-jeopardy { max-height: none; }
#finalMedia { flex-shrink: 0; max-height: 45vh; overflow: auto; border: 1px solid var(--border-muted); background: var(--surface-panel); padding: 10px; }
#finalMedia .media-image, #finalMedia .media-video { max-height: 20vh; }
@media (max-width: 600px) {
  .library-selectors { grid-template-columns: 1fr; }
  #status { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
}
