/* Four Corners Games — shared by every page. Fonts are self-hosted
   (assets/fonts/), so visiting the site never contacts a third party.

   Studio pages use the neutral studio look (Lato, blue accent). A game's
   pages add a theme class on <body> (e.g. .theme-yarntoss) that swaps the
   colour tokens and display font for that game's own. The game page also
   reads four game tokens: --pop (the title and number badges), --ink (their
   outline), and --go / --go-shade (the hero's main button), with --on-go
   for that button's text (white unless the green is too light for it).

   Contrast: the text colours (--fg, --muted, --accent, --on-accent,
   --on-go) were checked against WCAG AA (4.5:1) on --bg, --surface,
   --card and --accent-soft, in light and dark (November 2026). Check a
   new colour the same way before adding it. */

@font-face {
	font-family: "Lato";
	src: url("/fonts/lato-semibold.woff2") format("woff2");
	font-weight: 600;
	font-display: swap;
}
@font-face {
	font-family: "Baloo 2";
	src: url("/fonts/baloo2.woff2") format("woff2");
	font-weight: 400 800;
	font-display: swap;
}

:root {
	--bg: #ffffff;
	--surface: #f5f6f8;
	--card: #ffffff;
	--fg: #16191d;
	--muted: #5d6673;
	--line: #e5e8ec;
	--accent: #3347c4;
	--accent-soft: #eef0fc;
	--on-accent: #ffffff;
	--shadow: 0 1px 2px rgb(16 20 30 / 0.05), 0 12px 32px -12px rgb(16 20 30 / 0.18);
	--display: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--radius: 18px;
	--max: 1080px;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0f1216;
		--surface: #161a20;
		--card: #1a1f26;
		--fg: #e9ebee;
		--muted: #9aa3af;
		--line: #262c34;
		--accent: #97a6ff;
		--accent-soft: #1a1f33;
		--on-accent: #0f1216;
		--shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 16px 40px -16px rgb(0 0 0 / 0.6);
		color-scheme: dark;
	}
}

/* YarnToss: the game's own cream, coral and yellow, and its Baloo 2 font. */
.theme-yarntoss {
	--bg: #fffaf0;
	--surface: #fbefd8;
	--card: #fffdf8;
	--fg: #3a2a20;
	--muted: #7a6353;
	--line: #eedfc6;
	--accent: #b23a2f;
	--accent-soft: #fde6df;
	--on-accent: #ffffff;
	--pop: #fbd94b;
	--ink: #3a2410;
	--go: #58b44c;
	--go-shade: #3c8a33;
	--on-go: var(--ink); /* white on this green is only 2.6:1 */
	--shadow: 0 1px 2px rgb(80 50 20 / 0.08), 0 14px 34px -14px rgb(80 50 20 / 0.3);
	--display: "Baloo 2", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
	.theme-yarntoss {
		--bg: #1c1612;
		--surface: #251d17;
		--card: #2a211a;
		--fg: #f5ead9;
		--muted: #bba58f;
		--line: #3a2e24;
		--accent: #ff8b7b;
		--accent-soft: #3a211c;
		--on-accent: #1c1612;
	}
}

/* Whiskers Cafe: the bakery's cream, terracotta and sage, the icon's peach, and
   Baloo 2 (the game's own font too). */
.theme-catcafe {
	--bg: #fdf8ef;
	--surface: #f6ecdc;
	--card: #fffdf8;
	--fg: #3b2a1f;
	--muted: #776354;
	--line: #ecdfca;
	--accent: #a2481f;
	--accent-soft: #fbe4d5;
	--on-accent: #ffffff;
	--pop: #f7b36b;
	--ink: #3b2416;
	--go: #4f7d45;
	--go-shade: #3a5f33;
	--shadow: 0 1px 2px rgb(80 50 20 / 0.08), 0 14px 34px -14px rgb(80 50 20 / 0.3);
	--display: "Baloo 2", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
	.theme-catcafe {
		--bg: #1b1714;
		--surface: #241e19;
		--card: #29221c;
		--fg: #f4eadc;
		--muted: #b9a693;
		--line: #3a3028;
		--accent: #f2a07c;
		--accent-soft: #3a241b;
		--on-accent: #1b1714;
	}
}

/* Pocket Quest: a storybook fantasy look: parchment, forest green, the
   heroes' crimson and a gold title, in Baloo 2. */
.theme-idleadventure {
	--bg: #fbf7ee;
	--surface: #f1ead9;
	--card: #fffdf7;
	--fg: #26231d;
	--muted: #6a6253;
	--line: #e4dac4;
	--accent: #2f6b4a;
	--accent-soft: #e2efe5;
	--on-accent: #ffffff;
	--pop: #f4c64e;
	--ink: #2a1d12;
	--go: #b8402f;
	--go-shade: #8a2c20;
	--shadow: 0 1px 2px rgb(50 40 20 / 0.08), 0 14px 34px -14px rgb(50 40 20 / 0.3);
	--display: "Baloo 2", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
	.theme-idleadventure {
		--bg: #15181a;
		--surface: #1c2123;
		--card: #212729;
		--fg: #ece6d8;
		--muted: #a9a291;
		--line: #2f3638;
		--accent: #8fd1a6;
		--accent-soft: #1f3328;
		--on-accent: #15181a;
	}
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font: 17px/1.7 var(--body);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; margin: 0; }
.theme-yarntoss h1, .theme-yarntoss h2, .theme-yarntoss h3,
.theme-catcafe h1, .theme-catcafe h2, .theme-catcafe h3,
.theme-idleadventure h1, .theme-idleadventure h2, .theme-idleadventure h3 { font-weight: 800; letter-spacing: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- header ---------- */
.top {
	position: sticky;
	top: 0;
	z-index: 10;
	background: color-mix(in srgb, var(--bg) 82%, transparent);
	-webkit-backdrop-filter: saturate(1.4) blur(14px);
	backdrop-filter: saturate(1.4) blur(14px);
	border-bottom: 1px solid var(--line);
}
.top .bar {
	max-width: var(--max);
	margin: 0 auto;
	padding: 14px 24px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 28px;
}
.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: "Lato", var(--body);
	font-weight: 600;
	font-size: 1.08rem;
	color: var(--fg);
	text-decoration: none;
	white-space: nowrap;
}
.mark { width: 26px; height: 26px; flex: none; }
.mark path { fill: none; stroke: currentColor; stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; }
.mark .accent { stroke: #3347c4; }
@media (prefers-color-scheme: dark) { .mark .accent { stroke: #97a6ff; } }
.brand:hover .mark .accent { animation: blink 0.8s ease-in-out 2; }
@keyframes blink { 50% { opacity: 0.25; } }

.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; font-size: 0.95rem; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current] { color: var(--fg); }
.top nav a.lang {
	color: var(--fg);
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 2px 12px;
	font-size: 0.85rem;
}
.top nav a.lang:hover { background: var(--surface); }
.top nav a.icon-link { display: inline-flex; padding: 4px; margin: -4px 0; border-radius: 8px; }
.top nav a.icon-link svg { width: 20px; height: 20px; }
.top nav a.icon-link:hover { color: #5865f2; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.discord { background: #5865f2; color: #fff; }

/* ---------- buttons, pills ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 20px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.98rem;
	text-decoration: none;
	background: var(--accent);
	color: var(--on-accent);
	border: 1px solid transparent;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface); }
.btn .arrow { transition: transform 0.15s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--accent);
	background: var(--accent-soft);
	border-radius: 999px;
	padding: 3px 12px;
	line-height: 1.5;
}
.pill.dot::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
	animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill.plain { color: var(--muted); background: var(--surface); }

.eyebrow {
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
	margin: 0 0 14px;
	font-family: var(--body);
}

/* ---------- studio hero ---------- */
.hero { padding: 96px 0 72px; }
.framed {
	position: relative;
	display: inline-block;
	padding: 34px 44px;
	margin-left: -44px;
}
.framed .c {
	position: absolute;
	width: 38px;
	height: 38px;
	border: 7px solid var(--fg);
	animation: corner-out 1.1s cubic-bezier(0.65, 0, 0.35, 1) 0.9s both;
}
.framed .c.tl { left: 0; top: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 12px; --dx: 40px; --dy: 18px; }
.framed .c.tr { right: 0; top: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 12px; --dx: -40px; --dy: 18px; }
.framed .c.bl { left: 0; bottom: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 12px; --dx: 40px; --dy: -18px; }
.framed .c.br {
	right: 0; bottom: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 12px; --dx: -40px; --dy: -18px;
	border-color: var(--accent);
	animation: corner-out 1.1s cubic-bezier(0.65, 0, 0.35, 1) 0.9s both, blink 0.36s ease-in-out 0.1s 2;
}
@keyframes corner-out { from { transform: translate(var(--dx), var(--dy)); opacity: 0.001; } 30% { opacity: 1; } }
.hero h1 {
	font-size: clamp(2.5rem, 7vw, 4.6rem);
	max-width: 14ch;
	text-wrap: balance;
	animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 1.2s both;
}
.hero .lead {
	margin: 26px 0 0;
	max-width: 50ch;
	color: var(--muted);
	font-size: clamp(1.1rem, 2.2vw, 1.3rem);
	line-height: 1.55;
	animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 1.35s both;
}
.hero .actions { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 1.5s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---------- sections ---------- */
.section { padding: 72px 0; border-top: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.section-head p { margin: 0; color: var(--muted); max-width: 42ch; }

/* ---------- game card (studio home) ---------- */
/* Home page games: one row of equal, quiet cards (art, icon, name, tagline,
   status). Each game's own page carries its full personality. */
.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.game-card {
	display: flex;
	flex-direction: column;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 18px;
	overflow: hidden;
	color: inherit;
	text-decoration: none;
	transition: border-color 0.2s ease, transform 0.2s ease;
}
.game-card:hover { border-color: color-mix(in srgb, var(--fg) 25%, var(--line)); transform: translateY(-2px); }
.game-card .art { overflow: hidden; background: var(--surface); aspect-ratio: 1024 / 500; border-bottom: 1px solid var(--line); }
.game-card .art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.game-card:hover .art img { transform: scale(1.03); }
.game-card .info { display: flex; align-items: flex-start; gap: 14px; padding: 18px 18px 20px; flex: 1; }
.game-card .icon { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.game-card .info > div { flex: 1; min-width: 0; }
.game-card h3 { font-family: var(--display); font-weight: 600; font-size: 1.1rem; line-height: 1.3; }
.game-card p { margin: 2px 0 0; color: var(--muted); font-size: 0.92rem; line-height: 1.45; }
.game-card .status { margin-top: 8px; font-size: 0.8rem; }
.game-card .go { color: var(--muted); transition: transform 0.15s ease, color 0.15s ease; }
.game-card:hover .go { color: var(--fg); transform: translateX(3px); }

.next-card {
	margin-top: 20px;
	border: 1.5px dashed var(--line);
	border-radius: 24px;
	padding: 28px 32px;
	display: flex;
	align-items: center;
	gap: 20px;
	color: var(--muted);
}
.next-card .mark { width: 40px; height: 40px; color: var(--muted); opacity: 0.6; }
.next-card strong { color: var(--fg); display: block; font-family: var(--display); font-weight: 600; font-size: 1.1rem; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.about p { margin: 0 0 1em; }
.about .big { font-family: var(--display); font-size: clamp(1.35rem, 2.6vw, 1.7rem); line-height: 1.4; color: var(--fg); }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.facts li {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 16px 20px;
	display: flex;
	justify-content: space-between;
	gap: 16px;
}
.facts span { color: var(--muted); }
.facts b { font-weight: 600; text-align: right; }

/* ---------- contact ---------- */
.contact-card {
	background: var(--fg);
	color: var(--bg);
	border-radius: 24px;
	padding: 48px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	position: relative;
	overflow: hidden;
}
.contact-card h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.contact-card p { margin: 8px 0 0; opacity: 0.75; max-width: 44ch; }
.contact-card .btn { background: var(--bg); color: var(--fg); }
.contact-card .btn.discord { background: #5865f2; color: #fff; }
.contact-card .deco { position: absolute; right: -30px; bottom: -30px; width: 180px; height: 180px; opacity: 0.08; color: var(--bg); pointer-events: none; }

/* ---------- game page ---------- */
.game-hero { position: relative; padding: 64px 0 40px; overflow: hidden; }
.game-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(60% 70% at 85% 30%, color-mix(in srgb, var(--pop) 35%, transparent), transparent 70%),
		radial-gradient(50% 60% at 10% 90%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
	pointer-events: none;
}
.game-hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.game-hero .icon { width: 84px; height: 84px; border-radius: 20px; box-shadow: var(--shadow); margin-bottom: 22px; }
.logo-title {
	font-size: clamp(3.2rem, 9vw, 5.6rem);
	line-height: 1;
	color: var(--pop);
	-webkit-text-stroke: 0.09em var(--ink);
	paint-order: stroke fill;
	text-shadow: 0 0.06em 0 var(--ink);
	letter-spacing: 0.01em;
}
.tagline { font-family: var(--display); font-weight: 700; font-size: clamp(1.3rem, 3vw, 1.7rem); margin: 10px 0 0; }
.game-hero .lead { color: var(--muted); font-size: 1.12rem; max-width: 46ch; margin: 16px 0 20px; }
.game-hero .btn { background: var(--go); color: var(--on-go, #fff); box-shadow: 0 4px 0 var(--go-shade); }
.game-hero .btn:hover { box-shadow: 0 6px 0 var(--go-shade); }
.game-hero .btn.ghost { background: transparent; color: var(--fg); box-shadow: none; }

.stage { position: relative; justify-self: center; width: min(300px, 78vw); }
.phone {
	position: relative;
	border-radius: 38px;
	padding: 10px;
	background: #20160f;
	box-shadow: 0 30px 60px -20px rgb(60 30 10 / 0.55), inset 0 0 0 2px #3b2c20;
	transform: rotate(3deg);
	animation: float 6s ease-in-out infinite;
}
.phone img { border-radius: 29px; aspect-ratio: 9 / 16; width: 100%; object-fit: cover; }
@keyframes float { 50% { transform: rotate(3deg) translateY(-10px); } }
.stage .cat { position: absolute; width: 58%; left: -38%; bottom: -4%; transform: scaleX(1); filter: drop-shadow(0 10px 12px rgb(60 30 10 / 0.25)); animation: pounce 3.4s ease-in-out infinite; }
.stage .yarn { position: absolute; width: 26%; right: -12%; top: 6%; filter: drop-shadow(0 8px 10px rgb(60 30 10 / 0.25)); animation: spin 6s ease-in-out infinite; }
@keyframes pounce { 0%, 60%, 100% { transform: translateY(0); } 70% { transform: translate(6px, -14px) rotate(-4deg); } 80% { transform: translateY(0); } }
@keyframes spin { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-14px) rotate(14deg); } }

/* Whiskers Cafe is a landscape game: its hero is a shop window onto the village
   instead of a phone, with the chef cat in front and a pastry bobbing. */
.stage.wide { width: min(460px, 86vw); }
.shopwin {
	position: relative;
	border-radius: 20px;
	padding: 12px;
	background: #9a6a42;
	box-shadow: 0 30px 60px -20px rgb(60 30 10 / 0.5), inset 0 0 0 2px #6e4527, inset 0 -6px 0 #7a4f2e;
	transform: rotate(-2deg);
	animation: float-l 6s ease-in-out infinite;
}
.shopwin img { border-radius: 10px; aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
.shopwin::after { content: ""; position: absolute; top: 12px; bottom: 12px; left: calc(50% - 5px); width: 10px; background: #9a6a42; box-shadow: inset 2px 0 0 #6e4527, inset -2px 0 0 #6e4527; }
@keyframes float-l { 50% { transform: rotate(-2deg) translateY(-10px); } }
.stage.wide .cat { width: 30%; left: -10%; bottom: -26%; }
.stage .treat { position: absolute; width: 22%; right: -3%; top: -17%; filter: drop-shadow(0 8px 10px rgb(60 30 10 / 0.25)); animation: spin 6s ease-in-out infinite; }

/* Pocket Quest: a framed storybook picture of the heroes facing the
   monsters, with the knight in front and the dragon bobbing. */
.storyframe {
	position: relative;
	border-radius: 20px;
	padding: 10px;
	background: #6b4a2e;
	box-shadow: 0 30px 60px -20px rgb(40 30 10 / 0.5), inset 0 0 0 2px #4a311d, inset 0 -6px 0 #563a22;
	transform: rotate(-2deg);
	animation: float-l 6s ease-in-out infinite;
}
.storyframe img { border-radius: 12px; aspect-ratio: 1024 / 500; width: 100%; object-fit: cover; }
.stage.wide .hero-knight { position: absolute; width: 26%; left: -9%; bottom: -30%; filter: drop-shadow(0 10px 12px rgb(40 30 10 / 0.3)); animation: pounce 3.4s ease-in-out infinite; }

/* landscape screenshots, two side by side (one a row on phones) */
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.shots figure { margin: 0; }
.shots img { border-radius: 16px; aspect-ratio: 16 / 9; width: 100%; object-fit: cover; box-shadow: var(--shadow); border: 1px solid var(--line); }
.shots figcaption { text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: 10px; }

/* a row of characters, each with a name and a line about them */
.cast { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cast figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 16px 18px; text-align: center; box-shadow: var(--shadow); }
.cast img { width: 96px; margin: 0 auto 10px; filter: drop-shadow(0 6px 8px rgb(60 30 10 / 0.18)); }
.cast b { display: block; font-family: var(--display); font-weight: 800; font-size: 1.15rem; }
.cast figcaption span { display: block; color: var(--muted); font-size: 0.9rem; line-height: 1.45; margin-top: 4px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 26px;
	box-shadow: var(--shadow);
}
.feature .num {
	display: inline-grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 12px;
	background: var(--pop);
	color: var(--ink);
	font-family: var(--display);
	font-weight: 800;
	font-size: 1.1rem;
	margin-bottom: 14px;
}
.feature h3 { font-size: 1.35rem; margin-bottom: 8px; }
.feature ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.feature li { margin: 4px 0; }

.gallery {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(200px, 1fr);
	gap: 18px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding: 6px 24px 22px;
	margin: 0 -24px;
	scrollbar-width: thin;
}
.gallery figure { margin: 0; scroll-snap-align: center; }
.gallery img { border-radius: 22px; aspect-ratio: 9 / 16; width: 100%; object-fit: cover; box-shadow: var(--shadow); border: 1px solid var(--line); }
.gallery figcaption { text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: 10px; }

.band {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 28px;
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 32px;
	align-items: center;
	padding: 36px 44px;
}
.band img { width: 100%; max-width: 220px; filter: drop-shadow(0 12px 16px rgb(60 30 10 / 0.2)); }
.band h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
.band p { color: var(--muted); margin: 10px 0 0; max-width: 52ch; }
.band .actions { margin-top: 20px; }
@media (max-width: 640px) { .band .actions { justify-content: center; } }

.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.links a {
	display: block;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 16px;
	padding: 18px 20px;
	color: var(--fg);
	text-decoration: none;
	transition: border-color 0.15s ease, transform 0.15s ease;
}
.links a:hover { border-color: var(--accent); transform: translateY(-2px); }
.links b { display: block; font-weight: 600; }
.links span { overflow-wrap: anywhere; color: var(--muted); font-size: 0.9rem; line-height: 1.45; display: block; margin-top: 4px; }

/* sub-navigation shown on a game's legal pages */
.subnav { border-bottom: 1px solid var(--line); background: var(--surface); }
.subnav .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; padding-top: 10px; padding-bottom: 10px; font-size: 0.92rem; }
.subnav .game { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 800; font-size: 1.05rem; color: var(--fg); text-decoration: none; margin-right: auto; }
.subnav .game img { width: 26px; height: 26px; border-radius: 7px; }
.subnav a:not(.game) { color: var(--muted); text-decoration: none; }
.subnav a:not(.game):hover, .subnav a[aria-current] { color: var(--fg); }
.subnav a[aria-current] { font-weight: 600; }

/* ---------- legal documents ---------- */
.doc { max-width: 720px; margin: 0 auto; padding: 56px 24px 40px; overflow-wrap: break-word; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.7rem); }
.doc .meta { margin: 10px 0 28px; color: var(--muted); font-size: 0.9rem; }
.doc h2 { font-size: 1.3rem; margin: 2.4rem 0 0.4rem; }
.theme-yarntoss .doc h2, .theme-catcafe .doc h2, .theme-idleadventure .doc h2 { font-size: 1.4rem; }
.doc .callout + h2 { margin-top: 2.2rem; }
.doc p { margin: 0.7rem 0; }
.doc ul, .doc ol { padding-left: 1.25rem; margin: 0.6rem 0; }
.doc li { margin: 0.35rem 0; }
.callout {
	background: var(--surface);
	border: 1px solid var(--line);
	border-left: 4px solid var(--accent);
	border-radius: 12px;
	padding: 14px 18px;
	margin: 0 0 8px;
}
.callout p { margin: 0; }

/* redirect stubs and 404 */
.notice { max-width: 560px; margin: 0 auto; padding: 120px 24px; text-align: center; }
.notice h1 { font-size: clamp(2rem, 5vw, 2.6rem); }
.notice p { color: var(--muted); }

/* ---------- footer ---------- */
footer.site { margin-top: 72px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }
footer.site .cols {
	max-width: var(--max);
	margin: 0 auto;
	padding: 44px 24px 24px;
	display: grid;
	grid-template-columns: 1.4fr 1fr 1.4fr auto;
	gap: 28px;
}
footer.site h3 { font-family: var(--body); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg); margin-bottom: 12px; }
footer.site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
footer.site a { color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
footer.site a:hover { color: var(--fg); text-decoration: underline; }
footer.site .brand { margin-bottom: 10px; }
footer.site p { margin: 0; max-width: 32ch; }
footer.site .base { max-width: var(--max); margin: 0 auto; padding: 18px 24px 40px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
	.about, .game-hero .wrap { grid-template-columns: 1fr; }
	.game-grid { grid-template-columns: 1fr; gap: 12px; }
	.game-card .art { display: none; }
	.features { grid-template-columns: 1fr; }
	footer.site .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	footer.site .cols > div:first-child, footer.site .cols > div:last-child { grid-column: 1 / -1; }
	.stage { margin: 24px auto 20px; }
	.stage .cat { left: -30%; }
	.stage.wide { margin-bottom: 56px; }
	.stage.wide .cat { left: -4%; }
	.stage.wide .hero-knight { left: -2%; }
}
@media (max-width: 640px) {
	body { font-size: 16.5px; }
	/* One line: logo, Discord, language. Games/About/Contact are home-page
	   sections, also linked from the footer. */
	.top .bar { padding: 10px 16px; flex-wrap: nowrap; }
	.brand { font-size: 1rem; gap: 8px; }
	.top nav { flex-wrap: nowrap; gap: 12px; font-size: 0.9rem; }
	.top nav a:not(.icon-link):not(.lang) { display: none; }
	/* A game's sub-menu is one row that scrolls sideways. */
	.subnav .wrap { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; gap: 20px; padding-top: 8px; padding-bottom: 8px; }
	.subnav .wrap::-webkit-scrollbar { display: none; }
	.subnav .wrap { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
	.subnav .wrap > * { flex: none; }
	.subnav .game { margin-right: 4px; }
	.contact-card .actions { width: 100%; }
	.contact-card .actions .btn { flex: 1 1 auto; justify-content: center; font-size: 0.9rem; padding: 11px 14px; overflow-wrap: anywhere; }
	.wrap { padding: 0 16px; }
	.hero { padding: 56px 0 48px; }
	.framed { padding: 24px 26px; margin-left: -8px; }
	.framed .c { width: 26px; height: 26px; border-width: 5px; }
	.section { padding: 52px 0; }
	.next-card { padding: 22px; }
	.contact-card { padding: 32px 24px; }
	.band { grid-template-columns: 1fr; padding: 28px 24px; text-align: center; }
	.band img { max-width: 160px; margin: 0 auto; }
	.band p { margin-inline: auto; }
	.links { grid-template-columns: 1fr; }
	.cast { grid-template-columns: 1fr 1fr; gap: 12px; }
	.shots { grid-template-columns: 1fr; }
	.gallery { padding-inline: 16px; margin-inline: -16px; grid-auto-columns: 62%; }
	.doc { padding: 36px 16px 32px; }
	footer.site .cols { padding: 36px 16px 20px; }
	footer.site .base { padding: 16px 16px 32px; }
}

/* The smallest phones (320-374px): tighten the header so it stays one line. */
@media (max-width: 374px) {
	.brand { font-size: 0.92rem; gap: 7px; }
	.mark { width: 22px; height: 22px; }
	.top nav { gap: 8px; }
	.top nav a.lang { padding: 2px 9px; font-size: 0.8rem; }
}

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

/* DubTrackr portrait credit in the footer (2026-11-18). */
footer.site p.credit { max-width: none; margin: 0.75rem 0 0; font-size: 0.875em; opacity: 0.85; }
