:root {
	--ink: #171713;
	--paper: #f2efe3;
	--yellow: #f5c542;
	--red: #d94b35;
	--green: #238c64;
	--line: #171713;
	--shadow: 8px 8px 0 var(--ink);
}

* {
	box-sizing: border-box;
}

html {
	min-height: 100%;
	background: var(--yellow);
}

body {
	min-height: 100vh;
	min-height: 100dvh;
	margin: 0;
	color: var(--ink);
	background-color: var(--yellow);
	background-image:
		linear-gradient(rgba(23, 23, 19, 0.08) 1px, transparent 1px),
		linear-gradient(90deg, rgba(23, 23, 19, 0.08) 1px, transparent 1px);
	background-size: 28px 28px;
	font-family: "Trebuchet MS", Verdana, sans-serif;
}

button,
video {
	font: inherit;
}

button:focus-visible {
	outline: 4px solid #fff;
	outline-offset: 4px;
}

[hidden] {
	display: none !important;
}

.bridge-shell {
	width: min(760px, calc(100% - 28px));
	min-height: 100vh;
	min-height: 100dvh;
	margin: 0 auto;
	padding: clamp(18px, 4vw, 44px) 0;
}

.bridge-logo {
	display: block;
	width: min(320px, 72vw);
	height: auto;
	margin-bottom: 18px;
}

.bridge-panel {
	padding: clamp(22px, 5vw, 48px);
	border: 4px solid var(--ink);
	background: var(--paper);
	box-shadow: var(--shadow);
}

.bridge-kicker {
	margin: 0 0 8px;
	font-weight: 900;
	text-transform: uppercase;
}

.bridge-panel h1,
.bridge-panel h2 {
	margin: 0 0 22px;
	font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
	font-size: clamp(2.3rem, 8vw, 4.8rem);
	font-weight: 400;
	line-height: 0.95;
	letter-spacing: 0;
	text-transform: uppercase;
}

.bridge-step > label,
.bridge-question,
.bridge-step legend {
	display: block;
	margin-bottom: 14px;
	font-size: clamp(1.25rem, 3vw, 2rem);
	font-weight: 900;
}

.bridge-step input[type="text"] {
	width: 100%;
	min-height: 56px;
	margin-bottom: 18px;
	padding: 10px 14px;
	border: 3px solid var(--ink);
	border-radius: 0;
	background: #fff;
	font: inherit;
	font-size: 1.25rem;
}

.bridge-step fieldset {
	margin: 0 0 18px;
	padding: 0;
	border: 0;
}

.bridge-step fieldset label {
	min-height: 48px;
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 800;
}

.bridge-step input[type="radio"] {
	width: 22px;
	height: 22px;
}

.bridge-action {
	min-height: 52px;
	padding: 12px 18px;
	border: 3px solid var(--ink);
	border-radius: 0;
	color: var(--ink);
	background: var(--yellow);
	box-shadow: 3px 3px 0 var(--ink);
	font: inherit;
	font-weight: 900;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
}

.home-actions {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
}

.home-summary,
.home-panel {
	margin: 0 0 24px;
	padding: 18px;
	border: 3px solid var(--ink);
	background: #fff;
}

.home-panel {
	margin-top: 24px;
}

.home-panel input {
	width: 100%;
	min-height: 52px;
	margin: 10px 0 14px;
	padding: 10px 12px;
	border: 3px solid var(--ink);
	font: inherit;
}

.home-stat-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.home-stat {
	min-width: 0;
}

.home-stat span {
	display: block;
	font-size: 0.7rem;
	font-weight: 900;
	text-transform: uppercase;
}

.home-stat strong {
	display: block;
	font-size: clamp(1.3rem, 4vw, 2.2rem);
	overflow-wrap: anywhere;
}

.bridge-choices {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.bridge-exit {
	background: #fff;
}

.bridge-warning {
	padding: 16px;
	border-left: 5px solid var(--red);
	background: #fff;
}

.bridge-warning p {
	margin: 0 0 8px;
}

.bridge-warning p:last-child {
	margin-bottom: 0;
}

.bridge-error {
	min-height: 1.3em;
	margin-bottom: 0;
	color: var(--red);
	font-weight: 900;
}

.waiting-step {
	text-align: center;
}

.lobby-detail {
	margin: 6px 0;
	font-size: clamp(1rem, 2.5vw, 1.4rem);
	font-weight: 900;
}

.lobby-player-count {
	font-size: clamp(1.1rem, 3vw, 1.6rem);
	font-weight: 900;
}

#round-countdown {
	display: block;
	font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
	font-size: clamp(4rem, 18vw, 9rem);
	font-weight: 400;
	line-height: 1;
}

.game-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.game-shell {
	width: min(1180px, calc(100% - 32px));
	min-height: 100vh;
	min-height: 100dvh;
	margin: 0 auto;
	padding: clamp(18px, 4vw, 44px) 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.game-header {
	margin-bottom: clamp(16px, 3vw, 30px);
}

h1 {
	margin: 0;
}

.brand-logo {
	display: block;
	width: min(100%, 420px);
	height: auto;
}

.game-board {
	display: grid;
	grid-template-columns: minmax(210px, 0.32fr) minmax(0, 1fr);
	border: 3px solid var(--line);
	background: var(--paper);
	box-shadow: var(--shadow);
}

.status-panel {
	display: grid;
	align-content: start;
	border-right: 3px solid var(--line);
	background: var(--ink);
	color: #fff;
}

.stat-block,
.meter-block {
	padding: clamp(16px, 2.5vw, 26px);
}

.stat-block {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	border-bottom: 2px solid #55554e;
}

.stat-label {
	font-size: clamp(0.72rem, 1.5vw, 0.9rem);
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.stat-value {
	color: var(--yellow);
	font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
	font-size: clamp(2rem, 4vw, 3.3rem);
	font-weight: 400;
	line-height: 1;
}

.meter-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

#meter-value {
	white-space: nowrap;
}

.meter {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 6px;
}

.meter-segment {
	aspect-ratio: 1.5;
	border: 2px solid #77776e;
	background: #33332e;
}

.meter-segment.is-filled {
	border-color: var(--red);
	background: var(--red);
}

.scenario-panel {
	min-width: 0;
	padding: clamp(20px, 4vw, 46px);
	display: grid;
	grid-template-rows: auto minmax(150px, 1fr) auto auto;
	gap: clamp(18px, 3vw, 34px);
}

.round-heading {
	min-height: 56px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	border-bottom: 3px solid var(--line);
	font-size: clamp(0.78rem, 1.5vw, 0.95rem);
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.timer {
	display: flex;
	align-items: center;
	gap: 10px;
}

.timer strong {
	min-width: 42px;
	color: var(--ink);
	font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
	font-size: clamp(2.2rem, 5vw, 4rem);
	font-weight: 400;
	line-height: 1;
	text-align: right;
}

.timer strong.is-urgent {
	color: var(--red);
	text-decoration: underline;
	text-decoration-thickness: 4px;
	text-underline-offset: 5px;
}

.question-wrap {
	display: flex;
	align-items: center;
}

.scenario-text {
	max-width: 30ch;
	margin: 0;
	font-size: clamp(1.5rem, 3.5vw, 3rem);
	font-weight: 800;
	line-height: 1.08;
}

.answers {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(12px, 2vw, 20px);
}

.feedback {
	min-height: 1.3em;
	margin: -12px 0 0;
	color: var(--green);
	font-weight: 800;
}

.feedback.is-error {
	color: var(--red);
}

.answer-button {
	min-height: clamp(76px, 9vw, 104px);
	padding: 14px clamp(14px, 2vw, 24px);
	display: grid;
	grid-template-columns: 46px 1fr;
	align-items: center;
	gap: 14px;
	border: 3px solid var(--line);
	border-radius: 0;
	color: var(--ink);
	background: #fff;
	box-shadow: 4px 4px 0 var(--ink);
	cursor: pointer;
	text-align: left;
	touch-action: manipulation;
}

@media (hover: hover) {
	.answers:not(.suppress-hover) .answer-button:hover:not(:disabled) {
		background: #fff4bd;
	}
}

.answer-button:active:not(:disabled) {
	transform: translate(3px, 3px);
	box-shadow: 1px 1px 0 var(--ink);
}

.answer-button:disabled {
	cursor: default;
	opacity: 0.62;
}

.answer-key {
	width: 46px;
	height: 46px;
	display: grid;
	place-items: center;
	border: 2px solid var(--line);
	background: var(--yellow);
	font-size: 1.25rem;
	font-weight: 900;
}

.answer-text {
	overflow-wrap: anywhere;
	font-size: clamp(1rem, 2vw, 1.3rem);
	font-weight: 800;
	line-height: 1.2;
}

.punishment-overlay {
	position: fixed;
	z-index: 100;
	inset: 0;
	padding: clamp(10px, 3vw, 32px);
	place-items: center;
	background: #000;
}

.punishment-overlay:not([hidden]) {
	display: grid;
}

.punishment-overlay video {
	grid-area: 1 / 1;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.punishment-play-button {
	grid-area: 1 / 1;
	z-index: 1;
	min-height: 56px;
	padding: 14px 20px;
	border: 3px solid #fff;
	color: #fff;
	background: var(--red);
	font-weight: 800;
	cursor: pointer;
}

@media (max-width: 760px) {
	.home-actions,
	.home-stat-grid {
		grid-template-columns: 1fr;
	}
	.bridge-choices {
		grid-template-columns: 1fr;
	}
	.game-shell {
		width: min(100% - 22px, 620px);
		justify-content: flex-start;
		padding: 14px 0 22px;
	}

	.game-header {
		margin-bottom: 12px;
	}

	.brand-logo {
		width: min(100%, 320px);
	}

	.game-board {
		grid-template-columns: 1fr;
		box-shadow: 5px 5px 0 var(--ink);
	}

	.status-panel {
		grid-template-columns: 0.65fr 0.65fr 2fr;
		border-right: 0;
		border-bottom: 3px solid var(--line);
	}

	.stat-block,
	.meter-block {
		padding: 12px;
	}

	.stat-block {
		display: block;
		border-right: 2px solid #55554e;
		border-bottom: 0;
	}

	.stat-label {
		display: block;
		margin-bottom: 5px;
		font-size: 0.62rem;
	}

	.stat-value {
		font-size: 2rem;
	}

	.meter-heading {
		margin-bottom: 8px;
	}

	#meter-value {
		font-size: 0.78rem;
	}

	.meter {
		grid-template-columns: repeat(5, 1fr);
		gap: 4px;
	}

	.meter-segment {
		border-width: 1px;
	}

	.scenario-panel {
		min-height: calc(100dvh - 158px);
		padding: clamp(16px, 5vw, 26px);
		grid-template-rows: auto minmax(130px, 1fr) auto auto;
		gap: 16px;
	}

	.round-heading {
		min-height: 45px;
	}

	.scenario-text {
		font-size: clamp(1.45rem, 6.5vw, 2.2rem);
	}

	.answers {
		grid-template-columns: 1fr;
		gap: 11px;
	}

	.answer-button {
		min-height: 72px;
		grid-template-columns: 42px 1fr;
		box-shadow: 3px 3px 0 var(--ink);
	}

	.answer-key {
		width: 42px;
		height: 42px;
	}
}

@media (max-height: 520px) and (orientation: landscape) {
	.game-shell {
		width: min(100% - 24px, 1100px);
		padding: 10px 0 16px;
	}

	.game-header {
		margin-bottom: 8px;
	}

	.brand-logo {
		width: min(28vw, 165px);
	}

	.game-board {
		grid-template-columns: minmax(165px, 0.28fr) 1fr;
	}

	.status-panel {
		grid-template-columns: 1fr;
		border-right: 3px solid var(--line);
		border-bottom: 0;
	}

	.stat-block,
	.meter-block {
		padding: 10px 14px;
	}

	.stat-block {
		display: flex;
		border-right: 0;
		border-bottom: 2px solid #55554e;
	}

	.stat-label {
		margin: 0;
	}

	.stat-value {
		font-size: 1.65rem;
	}

	.scenario-panel {
		min-height: 0;
		padding: 14px 20px;
		grid-template-rows: auto minmax(76px, 1fr) auto auto;
		gap: 9px;
	}

	.round-heading {
		min-height: 36px;
	}

	.timer strong {
		font-size: 2rem;
	}

	.scenario-text {
		font-size: clamp(1.25rem, 4vh, 1.8rem);
	}

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

	.answer-button {
		min-height: 66px;
		padding-block: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
	}
}


.site-footer {
	width: min(1180px, calc(100% - 28px));
	margin: 0 auto;
	padding: 18px 14px 24px;
	color: #171713;
	font-family: "Trebuchet MS", Verdana, sans-serif;
	font-size: 0.85rem;
	font-weight: 800;
	text-align: center;
}
.site-footer a { color: inherit; font-weight: 900; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.site-footer a:hover { text-decoration-thickness: 3px; }
.site-footer a:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
