/* Filip's Workshop - shared styles. Colours and fonts live in :root so the whole site can be re-themed there. */
/* Warm lantern-lit workshop: honey wood, leather, brick and soft cream. */
:root {
	--walnut-950: #1e130c;
	--walnut-900: #2a1a10;
	--walnut-800: #3a2416;
	--walnut-700: #4d311d;
	--walnut-600: #6a4427;
	--brass: #e5a95a;
	--brass-light: #f7cd8a;
	--brass-dark: #a8702f;
	--cream: #fcf1de;
	--cream-dim: #e3cfb0;
	--paper: #f6e8cf;
	--ink: #3a2414;
	--felt: #6f8a4a;
	--felt-light: #8fab62;
	--red: #b5553a;
	--red-dark: #8c3d27;
	--leather: #b8703f;
	--good: #9cc26d;
	--bad: #e0876a;

	--font-display: "Fraunces", Georgia, "Times New Roman", serif;
	--font-body: "Nunito", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--radius: 14px;
	--radius-lg: 22px;
	--shadow: 0 14px 40px rgba(20, 10, 4, 0.45), 0 0 0 1px rgba(247, 205, 138, 0.06);
	--shadow-soft: 0 6px 18px rgba(20, 10, 4, 0.35);
	--glow: 0 0 40px rgba(247, 180, 90, 0.18);
	--max: 1200px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background:
		radial-gradient(900px 520px at 12% -120px, rgba(247, 180, 90, 0.22), transparent 70%),
		radial-gradient(700px 480px at 92% 8%, rgba(229, 140, 70, 0.16), transparent 70%),
		radial-gradient(900px 700px at 50% 110%, rgba(184, 112, 63, 0.18), transparent 70%),
		linear-gradient(180deg, var(--walnut-800), var(--walnut-900) 45%, var(--walnut-950));
	background-attachment: fixed;
	color: var(--cream);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

main {
	flex: 1;
	position: relative;
	z-index: 1;
}

/* Soft out-of-focus lantern lights, like the background of the workshop picture. */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	background:
		radial-gradient(circle at 8% 22%, rgba(255, 196, 110, 0.16) 0 26px, transparent 60px),
		radial-gradient(circle at 18% 70%, rgba(255, 180, 100, 0.1) 0 18px, transparent 46px),
		radial-gradient(circle at 86% 30%, rgba(255, 206, 130, 0.14) 0 30px, transparent 70px),
		radial-gradient(circle at 94% 64%, rgba(255, 170, 90, 0.1) 0 20px, transparent 52px),
		radial-gradient(circle at 70% 88%, rgba(255, 196, 120, 0.08) 0 24px, transparent 60px),
		radial-gradient(circle at 40% 12%, rgba(255, 210, 140, 0.07) 0 16px, transparent 44px);
	filter: blur(6px);
}

img,
video {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--brass-light);
	text-decoration: none;
}

a:hover {
	color: var(--cream);
}

h1,
h2,
h3 {
	font-family: var(--font-display);
	font-weight: 600;
	line-height: 1.15;
	margin: 0 0 0.5em;
	letter-spacing: 0.01em;
}

p {
	margin: 0 0 1em;
}

.container {
	width: min(var(--max), 100% - 2.5rem);
	margin-inline: auto;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- Header ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: linear-gradient(180deg, rgba(58, 36, 22, 0.94), rgba(42, 26, 16, 0.9));
	box-shadow: 0 8px 30px rgba(20, 10, 4, 0.3);
	border-bottom: 1px solid rgba(229, 169, 90, 0.35);
	backdrop-filter: blur(6px);
}

.site-header .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	height: 68px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	color: var(--cream);
}

.brand-mark {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: radial-gradient(circle at 35% 30%, var(--brass-light), var(--brass-dark));
	color: var(--walnut-900);
	box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.25), var(--shadow-soft);
}

.brand-name {
	font-family: var(--font-display);
	font-size: 1.3rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.brand-name small {
	display: block;
	font-family: var(--font-body);
	font-size: 0.62rem;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: var(--brass);
	margin-top: -2px;
}

.nav {
	display: flex;
	gap: 0.3rem;
}

.nav a {
	color: var(--cream-dim);
	padding: 0.5rem 0.85rem;
	border-radius: 999px;
	font-size: 0.93rem;
	font-weight: 500;
	transition: background 0.2s, color 0.2s;
}

.nav a:hover,
.nav a.active {
	color: var(--cream);
	background: rgba(229, 169, 90, 0.14);
}

.nav-toggle {
	display: none;
	background: none;
	border: 1px solid rgba(229, 169, 90, 0.4);
	color: var(--cream);
	width: 42px;
	height: 42px;
	border-radius: 50%;
	cursor: pointer;
}

@media (max-width: 760px) {
	.nav-toggle {
		display: grid;
		place-items: center;
	}

	.nav {
		position: absolute;
		top: 68px;
		left: 0;
		right: 0;
		flex-direction: column;
		padding: 0.6rem 1rem 1rem;
		background: var(--walnut-800);
		border-bottom: 1px solid rgba(229, 169, 90, 0.35);
		display: none;
	}

	.nav.open {
		display: flex;
	}

	.nav a {
		border-radius: var(--radius);
	}
}

/* ---------- Buttons ---------- */

.btn {
	--btn-bg: linear-gradient(180deg, var(--brass-light), var(--brass));
	--btn-fg: var(--walnut-900);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	padding: 0.8rem 1.4rem;
	border: 0;
	border-radius: 999px;
	background: var(--btn-bg);
	color: var(--btn-fg);
	font: 600 0.98rem/1 var(--font-body);
	letter-spacing: 0.02em;
	cursor: pointer;
	box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
	transition: transform 0.15s, filter 0.15s;
	text-decoration: none;
}

.btn:hover {
	color: var(--btn-fg);
	filter: brightness(1.07);
	transform: translateY(-1px);
}

.btn:active {
	transform: translateY(1px);
}

.btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
}

.btn-felt {
	--btn-bg: linear-gradient(180deg, var(--felt-light), var(--felt));
	--btn-fg: #fff;
}

.btn-red {
	--btn-bg: linear-gradient(180deg, #cf5642, var(--red));
	--btn-fg: #fff;
}

.btn-ghost {
	--btn-bg: transparent;
	--btn-fg: var(--cream);
	box-shadow: inset 0 0 0 1px rgba(229, 169, 90, 0.55);
}

.btn-ghost:hover {
	--btn-fg: var(--cream);
	background: rgba(229, 169, 90, 0.12);
}

.btn-lg {
	padding: 1rem 1.8rem;
	font-size: 1.08rem;
}

.btn-sm {
	padding: 0.5rem 0.9rem;
	font-size: 0.85rem;
}

/* ---------- Plaque headings (like the paper labels in SpringBall) ---------- */

.plaque {
	display: inline-block;
	position: relative;
	padding: 0.45rem 1.3rem;
	background: linear-gradient(180deg, #f6ead3, #e6d4b2);
	color: var(--ink);
	font-family: var(--font-display);
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	border-radius: 4px;
	box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(90, 58, 34, 0.35);
	margin-bottom: 1.4rem;
}

.section {
	padding: 4rem 0;
}

.section-head {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

.section-head p {
	color: var(--cream-dim);
	max-width: 46ch;
}

/* ---------- Home hero ---------- */

.hero {
	padding: 3rem 0 2rem;
}

.hero-grid {
	display: grid;
	grid-template-columns: 1.35fr 1fr;
	gap: 3rem;
	align-items: center;
}

/* A broken-off patch of brick wall with the framed picture hanging from one nail on a wire. */
.wall {
	--nail-y: 20px;
	--gap: 36px;
	position: relative;
	padding: calc(var(--nail-y) + var(--gap)) 26px 20px;
	filter: drop-shadow(0 16px 30px rgba(15, 6, 2, 0.55));
}

.wall-bricks {
	position: absolute;
	inset: -3% -2% -2%;
	background: url("/assets/img/board.png") center / 100% 100% no-repeat;
}

/* Rusty nail head: pitted orange-brown rust over dark iron. */
.wall-nail {
	position: absolute;
	z-index: 3;
	top: var(--nail-y);
	left: 50%;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	transform: translate(-50%, -50%);
	background:
		radial-gradient(ellipse 5px 3px at 70% 70%, rgba(35, 14, 5, 0.55), transparent),
		radial-gradient(ellipse 4px 5px at 25% 65%, rgba(190, 98, 40, 0.8), transparent),
		radial-gradient(ellipse 4px 3px at 60% 25%, rgba(120, 52, 20, 0.7), transparent),
		radial-gradient(circle at 38% 32%, #b87444, #8a4420 40%, #5a2a12 68%, #2b140a 92%);
	box-shadow: 0 0 0 1px rgba(20, 8, 2, 0.6), 2px 4px 5px rgba(10, 4, 1, 0.65);
}

/* The frame and its wire turn together around the nail, like a pendulum. */
.hang {
	position: relative;
	transform-origin: 50% calc(-1 * var(--gap));
	animation: hang-swing 7s ease-in-out infinite;
}

@keyframes hang-swing {
	0%,
	100% {
		transform: rotate(-1.3deg);
	}

	50% {
		transform: rotate(1.3deg);
	}
}

.hang-wire {
	position: absolute;
	top: calc(-1 * var(--gap));
	left: 22%;
	width: 56%;
	height: calc(var(--gap) + 14px);
	overflow: visible;
}

.hang-wire polyline {
	fill: none;
	stroke: #2a2019;
	stroke-width: 2.5;
	stroke-linejoin: round;
	vector-effect: non-scaling-stroke;
	filter: drop-shadow(1px 3px 2px rgba(15, 6, 2, 0.5));
}

@media (prefers-reduced-motion: reduce) {
	.hang {
		animation: none;
		transform: rotate(-0.6deg);
	}
}

/* Old wooden picture frame: four planks with mitred corners, held by a nail in each corner. */
.wood-frame {
	--plank: 26px;
	position: relative;
	z-index: 1;
	padding: var(--plank);
	background:
		repeating-linear-gradient(180deg, rgba(58, 28, 10, 0.4) 0 1px, transparent 1px 4px),
		repeating-linear-gradient(180deg, rgba(255, 214, 160, 0.09) 0 2px, transparent 2px 11px),
		repeating-linear-gradient(180deg, rgba(40, 18, 6, 0.25) 0 3px, transparent 3px 23px),
		linear-gradient(90deg, #6e4122, #8c5631 22%, #764627 48%, #93603a 74%, #6f4223);
	box-shadow:
		inset 0 2px 0 rgba(255, 222, 170, 0.28),
		inset 0 -3px 0 rgba(20, 8, 2, 0.45),
		0 18px 40px rgba(20, 10, 4, 0.55),
		0 3px 6px rgba(20, 10, 4, 0.4);
}

.wood-frame::before,
.wood-frame::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	width: var(--plank);
	background:
		repeating-linear-gradient(90deg, rgba(58, 28, 10, 0.4) 0 1px, transparent 1px 4px),
		repeating-linear-gradient(90deg, rgba(255, 214, 160, 0.09) 0 2px, transparent 2px 11px),
		repeating-linear-gradient(90deg, rgba(40, 18, 6, 0.25) 0 3px, transparent 3px 23px),
		linear-gradient(180deg, #74462a, #8f5a34 30%, #6c4022 55%, #8a5531 80%, #704324);
	z-index: 1;
}

.wood-frame::before {
	left: 0;
	clip-path: polygon(0 0, 100% var(--plank), 100% calc(100% - var(--plank)), 0 100%);
	box-shadow: inset 2px 0 0 rgba(255, 222, 170, 0.22);
}

.wood-frame::after {
	right: 0;
	clip-path: polygon(0 var(--plank), 100% 0, 100% 100%, 0 calc(100% - var(--plank)));
	box-shadow: inset -3px 0 0 rgba(20, 8, 2, 0.4);
}

.wood-frame img {
	position: relative;
	width: 100%;
	border: 3px solid #24140a;
	box-shadow: 0 0 0 1px rgba(255, 214, 160, 0.18), inset 0 0 20px rgba(0, 0, 0, 0.6);
	filter: sepia(0.12) saturate(1.05);
}

.nail {
	position: absolute;
	z-index: 2;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #efe9df, #9b958b 45%, #4a4540 80%);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.35), 1px 2px 3px rgba(20, 8, 2, 0.5);
}

.nail.tl {
	top: calc(var(--plank) / 2 - 5.5px);
	left: calc(var(--plank) / 2 - 5.5px);
}

.nail.tr {
	top: calc(var(--plank) / 2 - 5.5px);
	right: calc(var(--plank) / 2 - 5.5px);
}

.nail.bl {
	bottom: calc(var(--plank) / 2 - 5.5px);
	left: calc(var(--plank) / 2 - 5.5px);
}

.nail.br {
	bottom: calc(var(--plank) / 2 - 5.5px);
	right: calc(var(--plank) / 2 - 5.5px);
}

@media (max-width: 600px) {
	.wood-frame {
		--plank: 16px;
	}

	.wall {
		--nail-y: 14px;
		--gap: 26px;
		padding: calc(var(--nail-y) + var(--gap)) 14px 12px;
	}

	.wall-bricks {
		inset: -2% -2% -1%;
	}

	.wall-nail {
		width: 12px;
		height: 12px;
	}

	.nail {
		width: 8px;
		height: 8px;
	}
}

.hero-copy .eyebrow {
	color: var(--brass);
	letter-spacing: 0.3em;
	text-transform: uppercase;
	font-size: 0.78rem;
	font-weight: 600;
}

.hero-copy h1 {
	font-size: clamp(2.3rem, 5vw, 3.6rem);
	margin-top: 0.4rem;
}

.hero-copy p {
	color: var(--cream-dim);
	font-size: 1.08rem;
	max-width: 42ch;
}

.hero-actions {
	display: flex;
	gap: 0.8rem;
	flex-wrap: wrap;
	margin-top: 1.6rem;
}

@media (max-width: 900px) {
	.hero-grid {
		grid-template-columns: 1fr;
		gap: 2rem;
	}
}

/* ---------- Featured game ---------- */

.featured {
	display: grid;
	grid-template-columns: 1.5fr 1fr;
	border-radius: var(--radius-lg);
	overflow: hidden;
	background: linear-gradient(135deg, var(--walnut-700), var(--walnut-800));
	box-shadow: var(--shadow);
	border: 1px solid rgba(229, 169, 90, 0.25);
	color: var(--cream);
}

.featured:hover {
	color: var(--cream);
}

.featured-media {
	position: relative;
	min-height: 280px;
	background: #000;
}

.featured-media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s;
}

.featured:hover .featured-media img {
	transform: scale(1.03);
}

.featured-body {
	padding: 2rem;
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
}

.featured-body h3 {
	font-size: 2.2rem;
	margin: 0;
}

.featured-body p {
	color: var(--cream-dim);
	margin: 0;
}

.featured-body .btn {
	align-self: flex-start;
	margin-top: auto;
}

@media (max-width: 800px) {
	.featured {
		grid-template-columns: 1fr;
	}

	.featured-media {
		aspect-ratio: 16 / 9;
		min-height: 0;
	}
}

.ribbon {
	position: absolute;
	top: 16px;
	left: 16px;
	background: var(--red);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	padding: 0.35rem 0.8rem;
	border-radius: 4px;
	box-shadow: var(--shadow-soft);
}

/* ---------- Tags / chips ---------- */

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.chip {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.25rem 0.65rem;
	border-radius: 999px;
	background: rgba(229, 169, 90, 0.13);
	color: var(--brass-light);
	font-size: 0.8rem;
	font-weight: 500;
	white-space: nowrap;
}

.chip svg {
	width: 14px;
	height: 14px;
}

/* ---------- Card grid ---------- */

.grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.4rem;
}

.card {
	display: flex;
	flex-direction: column;
	border-radius: var(--radius-lg);
	overflow: hidden;
	background: var(--walnut-800);
	border: 1px solid rgba(229, 169, 90, 0.18);
	color: var(--cream);
	transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

a.card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow), var(--glow);
	border-color: rgba(229, 169, 90, 0.5);
	color: var(--cream);
}

.card-media {
	aspect-ratio: 16 / 9;
	background: #000;
	overflow: hidden;
}

.card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.card-body {
	padding: 1.1rem 1.2rem 1.3rem;
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	flex: 1;
}

.card-body h3 {
	font-size: 1.35rem;
	margin: 0;
}

.card-body p {
	color: var(--cream-dim);
	font-size: 0.93rem;
	margin: 0;
}

/* ---------- About ---------- */

.about {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	align-items: center;
}

.about p {
	color: var(--cream-dim);
}

.values {
	display: grid;
	gap: 1rem;
}

.value {
	display: flex;
	gap: 1rem;
	padding: 1.1rem 1.2rem;
	border-radius: var(--radius);
	background: var(--walnut-800);
	border: 1px solid rgba(229, 169, 90, 0.18);
}

.value strong {
	display: block;
	font-family: var(--font-display);
	font-size: 1.15rem;
	color: var(--cream);
}

.value span {
	color: var(--cream-dim);
	font-size: 0.93rem;
}

.value-icon {
	flex: none;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: rgba(229, 169, 90, 0.14);
	color: var(--brass-light);
}

@media (max-width: 800px) {
	.about {
		grid-template-columns: 1fr;
	}
}

/* ---------- Footer ---------- */

.site-footer {
	position: relative;
	z-index: 1;
	margin-top: 3rem;
	border-top: 1px solid rgba(229, 169, 90, 0.25);
	background: var(--walnut-950);
	color: var(--cream-dim);
	font-size: 0.9rem;
}

.site-footer .container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	padding: 1.6rem 0;
}

.site-footer nav {
	display: flex;
	gap: 1.2rem;
	flex-wrap: wrap;
}

.site-footer a {
	color: var(--cream-dim);
}

.site-footer a:hover {
	color: var(--cream);
}

.made-with {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
}

.made-with a {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-weight: 600;
}

/* The logo files are one-colour shapes; they take the text colour, so they turn cream on hover like the links. */
.credit-logo {
	width: 22px;
	height: 22px;
	background: currentColor;
	-webkit-mask: var(--logo) center / contain no-repeat;
	mask: var(--logo) center / contain no-repeat;
}

/* ---------- Game page ---------- */

.game-head {
	padding: 2rem 0 1.2rem;
}

.crumbs {
	font-size: 0.85rem;
	color: var(--cream-dim);
	margin-bottom: 0.4rem;
}

.crumbs a {
	color: var(--cream-dim);
}

.crumbs a:hover {
	color: var(--cream);
}

.game-head h1 {
	font-size: clamp(2.2rem, 5vw, 3.2rem);
	margin: 0;
}

.game-head .subtitle {
	color: var(--brass);
	font-size: 1.05rem;
	margin: 0.2rem 0 0;
}

.game-top {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
	gap: 1.6rem;
	align-items: start;
}

@media (max-width: 960px) {
	.game-top {
		grid-template-columns: minmax(0, 1fr);
	}
}

.panel {
	background: linear-gradient(180deg, rgba(90, 58, 34, 0.72), rgba(58, 36, 22, 0.82));
	border: 1px solid rgba(229, 169, 90, 0.22);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-soft);
}

/* Media carousel */

.viewer {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: var(--radius-lg) var(--radius-lg) 0 0;
	overflow: hidden;
}

.viewer-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.5s ease;
	pointer-events: none;
}

.viewer-slide.active {
	opacity: 1;
	pointer-events: auto;
}

.viewer-slide img,
.viewer-slide video {
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #000;
}

.viewer-slide .backfill {
	position: absolute;
	inset: -20px;
	background-size: cover;
	background-position: center;
	filter: blur(22px) brightness(0.45);
	z-index: -1;
}

.viewer-slide img.shot {
	position: relative;
	background: transparent;
	cursor: zoom-in;
}

.viewer-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 0;
	display: grid;
	place-items: center;
	background: rgba(30, 19, 12, 0.65);
	color: var(--cream);
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.2s, background 0.2s;
	z-index: 3;
}

.viewer:hover .viewer-nav,
.viewer-nav:focus-visible {
	opacity: 1;
}

.viewer-nav:hover {
	background: rgba(229, 169, 90, 0.85);
	color: var(--walnut-900);
}

.viewer-nav.prev {
	left: 14px;
}

.viewer-nav.next {
	right: 14px;
}

@media (hover: none) {
	.viewer-nav {
		opacity: 1;
		width: 40px;
		height: 40px;
	}
}

.viewer-full {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 0;
	display: grid;
	place-items: center;
	background: rgba(30, 19, 12, 0.65);
	color: var(--cream);
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.2s, background 0.2s;
	z-index: 3;
}

.viewer:hover .viewer-full,
.viewer-full:focus-visible {
	opacity: 1;
}

.viewer-full:hover {
	background: rgba(229, 169, 90, 0.85);
	color: var(--walnut-900);
}

@media (hover: none) {
	.viewer-full {
		opacity: 1;
	}
}

.viewer:fullscreen {
	aspect-ratio: auto;
	width: 100vw;
	height: 100vh;
	border-radius: 0;
}

.viewer:fullscreen img.shot {
	cursor: default;
}

.viewer-progress {
	position: absolute;
	left: 0;
	bottom: 0;
	height: 3px;
	width: 0;
	background: var(--brass);
	z-index: 3;
}

.strip {
	display: flex;
	gap: 8px;
	padding: 10px;
	overflow-x: auto;
	scrollbar-width: thin;
	scrollbar-color: var(--brass-dark) transparent;
}

.strip button {
	position: relative;
	flex: none;
	width: 124px;
	aspect-ratio: 16 / 9;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 6px;
	overflow: hidden;
	background: #000;
	cursor: pointer;
	opacity: 0.6;
	transition: opacity 0.2s, border-color 0.2s;
}

.strip button img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.strip button:hover {
	opacity: 0.9;
}

.strip button.active {
	opacity: 1;
	border-color: var(--brass);
}

.strip .play-badge {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	color: #fff;
	background: rgba(0, 0, 0, 0.3);
}

/* Download bar under the carousel */

.download-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	padding: 1.1rem 1.3rem;
	border-top: 1px solid rgba(229, 169, 90, 0.2);
	background: linear-gradient(90deg, rgba(78, 106, 54, 0.22), transparent 70%);
	border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.download-bar h2 {
	font-size: 1.3rem;
	margin: 0;
}

.download-bar p {
	margin: 0.15rem 0 0;
	color: var(--cream-dim);
	font-size: 0.9rem;
}

.download-actions {
	display: flex;
	gap: 0.6rem;
	flex-wrap: wrap;
}

/* Sidebar */

.side {
	overflow: hidden;
}

.side-cover {
	aspect-ratio: 16 / 9;
	width: 100%;
	object-fit: cover;
}

.side-body {
	padding: 1.2rem 1.3rem 1.4rem;
	display: grid;
	gap: 1rem;
}

.side-body > p {
	margin: 0;
	color: var(--cream-dim);
	font-size: 0.95rem;
}

.facts {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.35rem 1rem;
	margin: 0;
	font-size: 0.88rem;
}

.facts dt {
	color: var(--cream-dim);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.74rem;
	padding-top: 0.15rem;
}

.facts dd {
	margin: 0;
	color: var(--cream);
}

.review-summary {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	font-size: 0.9rem;
}

.review-summary strong {
	color: var(--good);
}

/* Content sections below */

.game-body {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
	gap: 1.6rem;
	margin-top: 1.6rem;
	align-items: start;
}

@media (max-width: 960px) {
	.game-body {
		grid-template-columns: minmax(0, 1fr);
	}
}

.block {
	padding: 1.5rem 1.6rem;
}

.block + .block {
	margin-top: 1.6rem;
}

.block h2 {
	font-size: 1.5rem;
}

.block p,
.block li {
	color: var(--cream-dim);
}

.features {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 0.7rem;
}

.features li {
	display: flex;
	gap: 0.8rem;
	align-items: flex-start;
}

.features li::before {
	content: "";
	flex: none;
	width: 10px;
	height: 10px;
	margin-top: 0.55em;
	border-radius: 50%;
	background: var(--brass);
	box-shadow: 0 0 0 3px rgba(229, 169, 90, 0.2);
}

.features strong {
	color: var(--cream);
}

.reqs {
	display: grid;
	gap: 1.2rem;
}

.reqs h3 {
	font-size: 1.1rem;
	margin-bottom: 0.4rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.reqs ul {
	margin: 0;
	padding-left: 1.1rem;
	font-size: 0.92rem;
}

/* Reviews */

.reviews-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1.2rem;
}

.reviews-head h2 {
	margin: 0;
}

.review-list {
	display: grid;
	gap: 1rem;
}

.review {
	padding: 1rem 1.2rem;
	border-radius: var(--radius);
	background: rgba(30, 19, 12, 0.45);
	border: 1px solid rgba(229, 169, 90, 0.15);
}

.review-top {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	margin-bottom: 0.5rem;
}

.thumb {
	width: 38px;
	height: 38px;
	border-radius: 8px;
	display: grid;
	place-items: center;
	flex: none;
}

.thumb.up {
	background: rgba(127, 174, 90, 0.2);
	color: var(--good);
}

.thumb.down {
	background: rgba(200, 100, 79, 0.2);
	color: var(--bad);
}

.thumb.down svg {
	transform: rotate(180deg);
}

.review-who strong {
	display: block;
	color: var(--cream);
}

.review-who span {
	font-size: 0.8rem;
	color: var(--cream-dim);
}

.review p {
	margin: 0;
	color: var(--cream);
	white-space: pre-line;
}

.empty {
	padding: 1.4rem;
	text-align: center;
	color: var(--cream-dim);
	border: 1px dashed rgba(229, 169, 90, 0.3);
	border-radius: var(--radius);
}

/* ---------- Dialogs and forms ---------- */

dialog.modal {
	width: min(520px, 100% - 2rem);
	padding: 0;
	border: 1px solid rgba(229, 169, 90, 0.4);
	border-radius: var(--radius-lg);
	background: linear-gradient(180deg, var(--walnut-700), var(--walnut-800));
	color: var(--cream);
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}

dialog.modal::backdrop {
	background: rgba(10, 6, 4, 0.72);
	backdrop-filter: blur(3px);
}

.modal-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.1rem 1.3rem 0.4rem;
}

.modal-head h2 {
	margin: 0;
	font-size: 1.45rem;
}

.modal-close {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 0;
	background: rgba(229, 169, 90, 0.14);
	color: var(--cream);
	cursor: pointer;
	display: grid;
	place-items: center;
}

.modal-close:hover {
	background: rgba(229, 169, 90, 0.3);
}

.modal-body {
	padding: 0.4rem 1.3rem 1.4rem;
}

.modal-body > p {
	color: var(--cream-dim);
	font-size: 0.94rem;
}

.form {
	display: grid;
	gap: 0.95rem;
}

.field {
	display: grid;
	gap: 0.35rem;
}

.field > label,
.field > legend {
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--brass-light);
	padding: 0;
}

.field input,
.field textarea,
.field select {
	width: 100%;
	padding: 0.75rem 0.9rem;
	border-radius: var(--radius);
	border: 1px solid rgba(229, 169, 90, 0.3);
	background: rgba(30, 19, 12, 0.55);
	color: var(--cream);
	font: inherit;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.field textarea {
	min-height: 110px;
	resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
	outline: none;
	border-color: var(--brass);
	box-shadow: 0 0 0 3px rgba(229, 169, 90, 0.2);
}

.field input.code-input {
	font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
	font-size: 1.35rem;
	letter-spacing: 0.25em;
	text-align: center;
	text-transform: uppercase;
}

fieldset.field {
	border: 0;
	margin: 0;
	padding: 0;
}

.choice-row {
	display: flex;
	gap: 0.6rem;
	flex-wrap: wrap;
}

.choice {
	flex: 1 1 120px;
	position: relative;
}

.choice input {
	position: absolute;
	opacity: 0;
	inset: 0;
	cursor: pointer;
}

.choice span {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	padding: 0.7rem 0.8rem;
	border-radius: 999px;
	border: 1px solid rgba(229, 169, 90, 0.35);
	color: var(--cream-dim);
	font-size: 0.92rem;
	font-weight: 500;
	transition: all 0.15s;
}

.choice input:checked + span {
	background: rgba(229, 169, 90, 0.2);
	border-color: var(--brass);
	color: var(--cream);
}

.choice input:focus-visible + span {
	box-shadow: 0 0 0 3px rgba(229, 169, 90, 0.3);
}

.choice span svg {
	width: 18px;
	height: 18px;
}

.check {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	font-size: 0.86rem;
	color: var(--cream-dim);
}

.check input {
	margin-top: 0.25rem;
	accent-color: var(--brass);
}

.hp {
	position: absolute;
	left: -9999px;
}

.form-note {
	font-size: 0.82rem;
	color: var(--cream-dim);
	margin: 0;
}

.form-msg {
	padding: 0.75rem 0.9rem;
	border-radius: var(--radius);
	font-size: 0.92rem;
	display: none;
}

.form-msg.show {
	display: block;
}

.form-msg.ok {
	background: rgba(127, 174, 90, 0.16);
	border: 1px solid rgba(127, 174, 90, 0.45);
	color: #cfe6bb;
}

.form-msg.err {
	background: rgba(200, 100, 79, 0.16);
	border: 1px solid rgba(200, 100, 79, 0.45);
	color: #f0c4b9;
}

.done {
	text-align: center;
	padding: 0.6rem 0 0.4rem;
}

.done-icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 0.8rem;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: rgba(127, 174, 90, 0.2);
	color: var(--good);
}

.done h3 {
	font-size: 1.4rem;
	margin-bottom: 0.4rem;
}

.done p {
	color: var(--cream-dim);
}

.download-links {
	display: grid;
	gap: 0.6rem;
	margin-top: 1rem;
}

/* Install help (download box and "How to install" section) */

.install-help {
	text-align: left;
	margin-top: 1.3rem;
	padding-top: 1rem;
	border-top: 1px solid rgba(229, 169, 90, 0.2);
}

.install-help:empty {
	display: none;
}

.install-help h4 {
	margin: 0 0 0.5rem;
	font-size: 1.05rem;
}

.install-steps {
	margin: 0;
	padding-left: 1.3rem;
	display: grid;
	gap: 0.5rem;
	color: var(--cream-dim);
	font-size: 0.92rem;
}

.install-steps b {
	color: var(--cream);
	font-weight: 700;
}

.install-steps li::marker {
	color: var(--brass);
	font-weight: 700;
}

.install-intro {
	color: var(--cream-dim);
	font-size: 0.92rem;
}

details.install {
	border: 1px solid rgba(229, 169, 90, 0.22);
	border-radius: var(--radius);
	padding: 0.2rem 0.9rem;
	margin-top: 0.6rem;
}

details.install summary {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.6rem 0;
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}

details.install summary::-webkit-details-marker {
	display: none;
}

details.install summary::after {
	content: "+";
	margin-left: auto;
	color: var(--brass);
	font-size: 1.2rem;
}

details.install[open] summary::after {
	content: "–";
}

details.install .install-steps {
	padding-bottom: 0.9rem;
}

/* Lightbox */

dialog.lightbox {
	width: 100vw;
	height: 100vh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(8, 5, 3, 0.94);
}

dialog.lightbox img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	cursor: zoom-out;
}

dialog.lightbox .modal-close {
	position: fixed;
	top: 16px;
	right: 16px;
}

.spinner {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid currentColor;
	border-right-color: transparent;
	animation: spin 0.7s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* ---------- Admin page ---------- */

.admin-login {
	max-width: 420px;
	margin: 0 auto;
	padding: 2rem;
}

.admin-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1.2rem;
}

.admin-head h1 {
	margin: 0;
	font-size: 2rem;
}

.admin-who {
	color: var(--cream-dim);
	display: flex;
	align-items: center;
	gap: 0.7rem;
}

.admin-tabs {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin-bottom: 1rem;
}

.admin-tab {
	padding: 0.55rem 1.1rem;
	border-radius: 999px;
	border: 1px solid rgba(229, 169, 90, 0.35);
	background: transparent;
	color: var(--cream-dim);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.admin-tab.active {
	background: rgba(229, 169, 90, 0.2);
	border-color: var(--brass);
	color: var(--cream);
}

.admin-tab .count:not(:empty) {
	display: inline-grid;
	place-items: center;
	min-width: 1.4rem;
	height: 1.4rem;
	margin-left: 0.3rem;
	padding: 0 0.35rem;
	border-radius: 999px;
	background: var(--red);
	color: #fff;
	font-size: 0.75rem;
}

.admin-filter {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-bottom: 1rem;
	color: var(--cream-dim);
}

.admin-filter select {
	padding: 0.45rem 0.8rem;
	border-radius: 999px;
	border: 1px solid rgba(229, 169, 90, 0.3);
	background: rgba(30, 19, 12, 0.55);
	color: var(--cream);
	font: inherit;
}

.admin-list {
	display: grid;
	gap: 0.8rem;
}

.admin-card {
	display: grid;
	gap: 0.6rem;
	padding: 1.1rem 1.2rem;
	border-radius: var(--radius);
	background: rgba(58, 36, 22, 0.7);
	border: 1px solid rgba(229, 169, 90, 0.18);
	border-left: 4px solid var(--brass);
}

.admin-card.status-approved {
	border-left-color: var(--felt-light);
}

.admin-card.status-rejected {
	border-left-color: var(--red);
	opacity: 0.75;
}

.admin-card-top {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}

.admin-card-top a {
	color: var(--brass-light);
	margin-left: 0.3rem;
}

.admin-meta {
	font-size: 0.85rem;
	color: var(--cream-dim);
}

.admin-status {
	align-self: flex-start;
	padding: 0.2rem 0.7rem;
	border-radius: 999px;
	background: rgba(229, 169, 90, 0.16);
	color: var(--brass-light);
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	white-space: nowrap;
}

.admin-message {
	margin: 0;
	padding-left: 0.8rem;
	border-left: 3px solid rgba(229, 169, 90, 0.4);
	white-space: pre-line;
}

.admin-actions {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.admin-code {
	font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
	letter-spacing: 0.15em;
	user-select: all;
}

.admin-note {
	color: var(--cream-dim);
	max-width: 70ch;
}

.admin-file-fields {
	display: grid;
	grid-template-columns: 2fr 2fr 1fr;
	gap: 0.7rem;
}

@media (max-width: 700px) {
	.admin-file-fields {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
		animation: none !important;
		scroll-behavior: auto !important;
	}
}
