/*
 * 261126_091300 lane G (contract 261126_091300_01 §5.4): Games — the /games index, the Orange Horror page, the shared game view
 * (.aou-game, built by the member-only aouGames.js) and the guest cover (.aou-game-cover, built by the public aouGameCover.js or
 * by server markup). Public bytes like every stylesheet: it carries no game logic. Colours follow the prototype's square.
 */

/* ------------------------------------------------------------------------------------------------ pages */
.games-index-list {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	padding: 0;
	margin: 16px 0 0;
	list-style: none;
}

.games-index-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 18px;
	border: 2px solid #1c3a2b;
	border-radius: 18px;
	background: #f8f5dd;
	color: #253c30;
	box-shadow: 0 4px 0 #0b211e;
}

.games-index-card h2 {
	margin: 0;
	font: 700 24px Georgia, serif;
	letter-spacing: -0.03em;
}

.games-index-card p {
	margin: 0;
	line-height: 1.5;
}

.games-index-card .btn {
	align-self: flex-start;
	min-height: 44px;
}

.games-page .games-stage-wrap {
	max-width: 1180px;
	margin: 0 auto;
}

.games-page .games-noscript {
	padding: 12px 16px;
	border-radius: 12px;
	background: #f8f5dd;
	color: #253c30;
}

/* ------------------------------------------------------------------------------------------------ the shared game view */
.aou-game {
	--aou-game-ink: #283b2d;
	--aou-game-panel: #162b29;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 12px;
	border-radius: 20px;
	background: var(--aou-game-panel);
	color: #f7f7e9;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
}

.aou-game *,
.aou-game *::before,
.aou-game *::after {
	box-sizing: border-box;
}

.aou-game-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.aou-game-title {
	flex: 1 1 auto;
	font: 700 20px Georgia, serif;
	letter-spacing: -0.03em;
	min-width: 8em;
}

.aou-game-btn,
.aou-game-item {
	min-width: 44px;
	min-height: 44px;
	cursor: pointer;
	touch-action: manipulation;
	border: 1px solid #718d80;
	border-radius: 12px;
	background: #27473e;
	color: #fff;
	font: 600 15px system-ui, -apple-system, sans-serif;
	padding: 10px 14px;
	box-shadow: 0 2px 0 #0d211e;
}

.aou-game-btn:hover,
.aou-game-item:hover {
	background: #365b4e;
}

.aou-game-btn:focus-visible,
.aou-game-item:focus-visible,
.aou-game-canvas:focus-visible,
.aou-game-cover a:focus-visible {
	outline: 3px solid #f8ca60;
	outline-offset: 3px;
}

.aou-game-btn[hidden],
.aou-game-overlay[hidden] {
	display: none;
}

.aou-game-btn[disabled] {
	opacity: 0.45;
	cursor: default;
}

.aou-game-btn--primary {
	background: #be542c;
	border-color: #75351d;
}

.aou-game-btn--primary:hover {
	background: #d0663c;
}

.aou-game-stage {
	position: relative;
	width: 100%;
	aspect-ratio: 3 / 2;
	min-height: 260px;
	max-height: 78vh;
	background: #b4c9a3;
	border: 2px solid #0b1b16;
	border-radius: 18px;
	overflow: hidden;
}

.aou-game--carousel .aou-game-stage {
	aspect-ratio: 16 / 9;
	max-height: 62vh;
}

.aou-game-canvas {
	display: block;
	width: 100%;
	height: 100%;
	outline: none;
	/* idle / paused: a finger over the game still scrolls the page */
	touch-action: pan-x pan-y pinch-zoom;
}

.aou-game-canvas--active {
	/* running: drag in the square is the joystick */
	touch-action: none;
}

.aou-game-hud {
	position: absolute;
	top: 8px;
	left: 10px;
	right: 10px;
	display: flex;
	justify-content: space-between;
	gap: 6px;
	pointer-events: none;
}

.aou-game-metric {
	font-size: 12px;
	font-weight: 650;
	line-height: 1.5;
	background: #f5f5ddeb;
	color: #203c31;
	padding: 4px 9px;
	border-radius: 10px;
	border: 1px solid #68866a;
}

.aou-game-clock {
	font-variant-numeric: tabular-nums;
}

.aou-game-overlay {
	position: absolute;
	inset: 0;
	display: grid;
	place-content: center;
	padding: 16px;
	text-align: center;
	background: #183b2c8a;
	backdrop-filter: blur(2px);
}

.aou-game-card {
	max-width: 420px;
	padding: 20px;
	border: 2px solid #1c3a2b;
	border-radius: 20px;
	background: #f8f5dd;
	color: #253c30;
	box-shadow: 0 6px 0 #0b211e;
}

.aou-game-card-title {
	margin: 0 0 8px;
	font: 700 24px Georgia, serif;
	letter-spacing: -0.03em;
}

.aou-game-card-text {
	margin: 0 0 14px;
	font-size: 15px;
	line-height: 1.5;
}

.aou-game-card-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.aou-game-inventory {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
	gap: 8px;
}

.aou-game-item {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 56px;
	padding: 6px 8px;
	background: #203d33;
	border-color: #5e7768;
}

.aou-game-item[aria-pressed="true"] {
	border: 2px solid #f2c96d;
	background: #485a35;
}

.aou-game-item-icon {
	font-size: 22px;
	line-height: 1;
}

.aou-game-item-count {
	font-size: 18px;
	font-weight: 750;
	font-variant-numeric: tabular-nums;
}

.aou-game-item-label {
	font-size: 12px;
	font-weight: 500;
	color: #bed4c5;
}

.aou-game-place {
	min-width: 140px;
	background: #f3c96d;
	color: #29372a;
	border-color: #bc924b;
}

.aou-game-place:hover {
	background: #ffdf94;
}

.aou-game-status {
	margin: 0;
	min-height: 1.4em;
	font-size: 13px;
	line-height: 1.4;
	color: #d6e4d8;
}

.aou-game-help {
	font-size: 13px;
	line-height: 1.45;
	color: #c4d7ca;
}

.aou-game-help summary {
	cursor: pointer;
	min-height: 44px;
	display: flex;
	align-items: center;
	font-weight: 600;
}

.aou-game-help p {
	margin: 0 0 8px;
}

/* Portrait phones (390 × 844 and similar): a tall stage, two-row inventory, compact labels. */
@media (max-width: 650px) {
	.aou-game {
		padding: 8px;
		gap: 8px;
		border-radius: 16px;
	}

	.aou-game-stage,
	.aou-game--carousel .aou-game-stage {
		aspect-ratio: 3 / 4;
		max-height: 62vh;
		min-height: 300px;
	}

	.aou-game-title {
		font-size: 18px;
		min-width: 0;
	}

	.aou-game-btn {
		padding: 8px 10px;
	}

	.aou-game-inventory {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 6px;
	}

	.aou-game-item {
		flex-direction: column;
		gap: 0;
		min-height: 62px;
		padding: 4px 2px;
	}

	.aou-game-item-label {
		font-size: 10px;
	}

	.aou-game-place {
		grid-column: 1 / -1;
		min-height: 46px;
	}

	.aou-game-metric {
		font-size: 10px;
		padding: 3px 6px;
	}
}

/* ------------------------------------------------------------------------------------------------ the guest cover */
.aou-game-cover {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	padding: 20px;
	border-radius: 20px;
	background: radial-gradient(circle at calc(100% - 44px) calc(100% - 52px), #eb9a54 0 30px, transparent 31px),
		radial-gradient(circle at calc(100% - 104px) calc(100% - 34px), #4e91c3 0 14px, transparent 15px),
		linear-gradient(160deg, #c4d4a9 0%, #b4c9a3 60%, #9fb78e 100%);
	color: #203c31;
	border: 2px solid #0b1b16;
	min-height: 220px;
}

.aou-game-cover-eyebrow {
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 700;
	color: #3f5a46;
}

.aou-game-cover-title {
	margin: 0;
	font: 700 28px Georgia, serif;
	letter-spacing: -0.03em;
}

.aou-game-cover-blurb {
	margin: 0;
	max-width: 32em;
	line-height: 1.5;
	background: #f5f5ddd9;
	padding: 6px 10px;
	border-radius: 10px;
}

.aou-game-cover-action {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 10px 18px;
	border-radius: 12px;
	background: #be542c;
	border: 1px solid #75351d;
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}

.aou-game-cover-action:hover {
	background: #d0663c;
}

/*
 * 261128_001600 lane A (plan 261127_233042 doc 02 §3): the version choice of the Games index and of the game page — ordinary links
 * outside the game. Appended AFTER the game rules on purpose: everything above this comment is byte for byte the stylesheet of
 * the version A release (games/releases/orange-horror-6c8805769314408d/game/games.css), which is what styles the homepage
 * carousel's in-place game. A game page additionally links its own release's stylesheet after this one.
 */
.games-version-intro {
	margin: 0 0 12px;
}

.games-version-choices {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 14px;
}

.games-version-choice {
	padding: 14px 16px;
	border: 1px solid currentColor;
	border-radius: 10px;
}

.games-version-choice h3 {
	margin: 0 0 6px;
	font-size: 1.05rem;
}

.games-version-choice p {
	margin: 0 0 12px;
}

.games-version-unavailable {
	font-style: italic;
}

.games-version-bar {
	margin: 0 0 14px;
}

.games-version-active,
.games-version-note {
	margin: 0 0 8px;
}

.games-version-note {
	font-size: 0.9rem;
}

.games-version-list {
	list-style: none;
	margin: 0 0 8px;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.games-version-link {
	display: inline-block;
	min-height: 44px;
	box-sizing: border-box;
	padding: 10px 14px;
	border: 1px solid currentColor;
	border-radius: 999px;
	line-height: 20px;
	text-decoration: none;
}

a.games-version-link:hover,
a.games-version-link:focus-visible {
	text-decoration: underline;
}

.games-version-link.is-active {
	border-width: 3px;
	padding: 8px 12px;
	font-weight: 700;
}

.games-version-link.is-active::before {
	content: "\2713\00a0";
}

.games-version-link.is-unavailable {
	border-style: dashed;
	font-style: italic;
}

/* 261128_001600 lane C: the Workshop link above a released game (aouGamesWorkshopTrial.js). Site chrome, outside the game. */
.games-workshop-trial {
	margin: 0 0 12px;
	padding: 10px 14px;
	border: 1px solid currentColor;
	border-radius: 10px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
}

.games-workshop-trial[hidden] {
	display: none;
}

.games-workshop-trial-text {
	margin: 0;
	flex: 1 1 240px;
}

.games-workshop-trial-action {
	display: inline-block;
	min-height: 44px;
	box-sizing: border-box;
	padding: 10px 14px;
	border: 1px solid currentColor;
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	line-height: 20px;
	text-decoration: none;
	cursor: pointer;
}

.games-workshop-trial-action:hover,
.games-workshop-trial-action:focus-visible {
	text-decoration: underline;
}

.games-workshop-trial.is-problem {
	border-style: dashed;
}
