/* Blips Games: the studio's site. A game's page (and its band on the home
   page) sets --bg, --ink, --accent and --card from site/games.json; the rest
   follows from those four. */

@font-face { font-family: "Fredoka"; src: url("fonts/Fredoka.ttf") format("truetype"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Anton"; src: url("fonts/Anton-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/BarlowCondensed-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Patrick Hand"; src: url("fonts/PatrickHand-Regular.ttf") format("truetype"); font-display: swap; }

:root {
	--bg: #1d1b2a;
	--ink: #f4efe4;
	--accent: #f2b84b;
	--card: #2a2740;
	--muted: color-mix(in srgb, var(--ink) 66%, transparent);
	--line: color-mix(in srgb, var(--ink) 14%, transparent);
	--soft: color-mix(in srgb, var(--ink) 7%, transparent);
	--on-accent: #1d1b2a;
	--radius: 18px;
	--gutter: clamp(1rem, 5vw, 4rem);
	--display: "Fredoka", system-ui, sans-serif;
	--body: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
	--ease: cubic-bezier(.2, .8, .2, 1);
	--spring: cubic-bezier(.34, 1.56, .64, 1);
	color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 17px/1.65 var(--body);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
body.locked { overflow: hidden; }
img, video, canvas { max-width: 100%; }
h1, h2, h3, .brand span, .button, .kicker, .num, .price, summary { font-family: var(--display); }
h1, h2, h3 { font-weight: 600; line-height: 1.08; letter-spacing: -0.01em; margin: 0.2em 0 0.45em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.3rem; }
a { color: var(--accent); text-underline-offset: 0.18em; }
p { margin: 0 0 1em; }
code { font: 0.88em/1.4 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; background: var(--soft); padding: 0.18em 0.45em; border-radius: 6px; overflow-wrap: anywhere; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr, .skip:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; top: 10px; left: 10px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 0.5em 1em; border-radius: 999px; }

/* The studio's own pages: a dark night with warm glows and a little grain. */
.page-home, .page-press, .page-support, .page-privacy, .page-lost {
	background:
		radial-gradient(60rem 40rem at 10% -10%, rgba(242, 184, 75, 0.16), transparent 60%),
		radial-gradient(50rem 36rem at 100% 10%, rgba(138, 124, 240, 0.16), transparent 60%),
		radial-gradient(40rem 40rem at 50% 120%, rgba(156, 197, 107, 0.10), transparent 60%),
		var(--bg);
}
body::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 90;
	opacity: 0.06;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	mix-blend-mode: overlay;
}

/* --- Header ------------------------------------------------------------------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, #f2b84b, #d9682b, #e63a2e, #9cc56b); }
.top {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.85rem var(--gutter);
	transition: background 0.3s, box-shadow 0.3s, padding 0.3s;
}
.top.scrolled, .menu-open .top {
	background: color-mix(in srgb, var(--bg) 80%, transparent);
	-webkit-backdrop-filter: blur(14px) saturate(1.3);
	backdrop-filter: blur(14px) saturate(1.3);
	box-shadow: 0 1px 0 var(--line);
	padding-top: 0.55rem; padding-bottom: 0.55rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; font-size: 1.35rem; font-weight: 600; }
.brand .mark { width: 56px; height: 21px; fill: var(--accent); overflow: visible; }
.brand .mark circle { transform-box: fill-box; transform-origin: center; transition: transform 0.35s var(--spring); }
.brand:hover .mark circle { animation: hop 0.6s var(--spring) both; }
.brand:hover .mark circle:nth-child(2) { animation-delay: 0.05s; }
.brand:hover .mark circle:nth-child(3) { animation-delay: 0.1s; }
.brand:hover .mark circle:nth-child(4) { animation-delay: 0.15s; }
.brand:hover .mark circle:nth-child(5) { animation-delay: 0.2s; }
@keyframes hop { 40% { transform: translateY(-30%) scale(1.15); } }
#nav { display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; }
#nav a, .sound {
	color: var(--ink);
	text-decoration: none;
	font: 600 0.95rem/1 var(--display);
	padding: 0.6em 0.85em;
	border-radius: 999px;
	transition: background 0.2s, color 0.2s;
}
#nav a:hover, #nav a[aria-current] { background: var(--soft); }
#nav a.g i { display: inline-block; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--dot); margin-right: 0.45em; vertical-align: 0.05em; box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot) 25%, transparent); }
.sound { background: none; border: 1px solid var(--line); cursor: pointer; margin-left: 0.4rem; display: inline-flex; align-items: center; gap: 0.4em; }
.sound .note::before { content: "\266A"; }
.sound[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.no-js .sound { display: none; }
.menu { display: none; background: none; border: 0; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; color: var(--ink); position: relative; }
.menu .bars, .menu .bars::before, .menu .bars::after { position: absolute; left: 11px; width: 22px; height: 2.5px; border-radius: 2px; background: currentColor; transition: transform 0.3s var(--ease), opacity 0.2s; }
.menu .bars { top: 21px; }
.menu .bars::before, .menu .bars::after { content: ""; left: 0; }
.menu .bars::before { top: -7px; }
.menu .bars::after { top: 7px; }
.menu[aria-expanded="true"] .bars { background: transparent; }
.menu[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
.menu[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 900px) {
	.js .menu { display: block; }
	.js #nav {
		position: fixed;
		inset: 64px 0 auto 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0.2rem;
		padding: 1rem var(--gutter) 1.6rem;
		background: color-mix(in srgb, var(--bg) 96%, transparent);
		-webkit-backdrop-filter: blur(14px);
		backdrop-filter: blur(14px);
		box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
		transform: translateY(-12px);
		opacity: 0;
		visibility: hidden;
		transition: transform 0.3s var(--ease), opacity 0.25s, visibility 0s 0.3s;
	}
	.js .menu-open #nav { transform: none; opacity: 1; visibility: visible; transition: transform 0.3s var(--ease), opacity 0.25s; }
	.js #nav a, .js .sound { font-size: 1.25rem; padding: 0.75em 0.9em; }
	.sound { margin: 0.6rem 0 0; justify-content: center; }
}

/* --- Buttons and bits ----------------------------------------------------------- */
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1rem; }
.button {
	--shade: color-mix(in srgb, var(--accent) 55%, #000);
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	background: var(--accent);
	color: var(--on-accent);
	padding: 0.72em 1.3em;
	border: 0;
	border-radius: 999px;
	font-size: 1.05rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	box-shadow: 0 5px 0 var(--shade), 0 14px 26px -12px color-mix(in srgb, var(--accent) 70%, transparent);
	transition: transform 0.18s var(--spring), box-shadow 0.18s;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--shade), 0 18px 30px -12px color-mix(in srgb, var(--accent) 70%, transparent); }
.button:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--shade); }
.button.big { font-size: 1.2rem; padding: 0.85em 1.6em; }
.button small { font-weight: 400; opacity: 0.75; font-size: 0.8em; }
.button.ghost, .button.soon { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.button.ghost:hover { box-shadow: inset 0 0 0 2px var(--accent); transform: translateY(-2px); }
.button.soon { box-shadow: inset 0 0 0 2px var(--accent); cursor: default; }
.button.soon:hover, .button.soon:active { transform: none; }
.pulse { width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: ping 1.8s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent); } 80%, 100% { box-shadow: 0 0 0 0.6em transparent; } }
.kicker { display: inline-flex; align-items: center; gap: 0.55em; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 0 0 0.6rem; }
.live { width: 0.55em; height: 0.55em; border-radius: 50%; background: #ff5a4e; animation: ping 1.6s infinite; --accent: #ff5a4e; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink); max-width: 40em; }
.price { font-size: 1.15rem; font-weight: 600; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem; padding: 0; margin: 1rem 0; }
.chips li { padding: 0.32em 0.85em; border-radius: 999px; background: var(--soft); box-shadow: inset 0 0 0 1px var(--line); font-size: 0.9rem; }
.more-link { font: 600 1.05rem var(--display); text-decoration: none; display: inline-flex; gap: 0.4em; }
.more-link span { transition: transform 0.25s var(--spring); }
.more-link:hover span { transform: translateX(6px); }
.sec-head { max-width: 760px; margin: 0 auto 2.2rem; text-align: center; }
.sec-head p:last-child { color: var(--muted); }
.copy { font: 600 0.8rem/1 var(--display); padding: 0.45em 0.8em; border-radius: 999px; border: 1px solid var(--line); background: var(--soft); color: var(--ink); cursor: pointer; vertical-align: 0.1em; transition: background 0.2s; }
.copy:hover { background: var(--accent); color: var(--on-accent); }
.copy.done { background: #9cc56b; color: #1d1b2a; }
.no-js .copy { display: none; }

/* Slide in as they're scrolled to (site.js adds .in; without it, all shows). */
.js .reveal:not(.in) { opacity: 0; transform: translateY(30px); }
.js .reveal { transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js:not(.ready) .reveal { animation: failsafe 0s 2.5s forwards; }
@keyframes failsafe { to { opacity: 1; transform: none; } }

main { display: block; }
section { position: relative; }

/* --- Home: the hero and its blip -------------------------------------------- */
.hero { min-height: max(640px, 100svh); display: flex; align-items: center; padding: 110px var(--gutter) 90px; overflow: hidden; }
.drift { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-in { position: relative; z-index: 1; width: 100%; max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 3rem; align-items: center; }
.headline { font-size: clamp(3.2rem, 8.6vw, 7.4rem); line-height: 0.92; letter-spacing: -0.035em; margin: 0.1em 0 0.35em; font-weight: 700; }
.headline .w { display: inline-block; animation: rise 0.9s var(--spring) both; animation-delay: calc(0.12s + var(--i) * 0.11s); }
.headline .w:nth-child(2) { color: var(--accent); animation: rise 0.9s var(--spring) both 0.23s, wobble 3.2s ease-in-out infinite 1.4s; transform-origin: 50% 80%; }
/* The gradient word paints only inside its box: room for the g's tail and the full stop. */
.headline .w:nth-child(4) { background: linear-gradient(100deg, #f2b84b, #d9682b 30%, #e63a2e 55%, #9cc56b 80%, #8a7cf0); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 100%; padding: 0.04em 0.12em 0.2em 0.02em; margin: -0.04em -0.12em -0.2em -0.02em; animation: rise 0.9s var(--spring) both 0.45s, sheen 6s linear infinite; }
@keyframes rise { from { opacity: 0; transform: translateY(0.5em) rotate(4deg); } }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 10% { transform: rotate(-6deg); } 20% { transform: rotate(5deg); } 30% { transform: rotate(-3deg); } 40% { transform: rotate(0); } }
@keyframes sheen { to { background-position: 200% 0; } }
.hero-copy .lead { color: var(--muted); }
.clicker {
	position: relative;
	padding: 1.6rem 1.4rem 1.2rem;
	border-radius: 30px;
	background: color-mix(in srgb, var(--card) 72%, transparent);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 40px 80px -30px rgba(0, 0, 0, 0.6);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	text-align: center;
	animation: rise 1s var(--spring) both 0.5s;
}
.no-js .clicker { display: none; }
.clicker-count { font: 700 clamp(2.4rem, 4.5vw, 3.2rem)/1 var(--display); margin: 0; font-variant-numeric: tabular-nums; }
.clicker-count span { font-size: 0.45em; color: var(--muted); font-weight: 500; }
.clicker-rate { color: var(--muted); font-size: 0.95rem; margin: 0.35rem 0 0.9rem; min-height: 1.5em; }
.clicker-note { font-size: 0.82rem; color: var(--muted); margin: 0.9rem 0 0; }
.blip { position: relative; width: 190px; height: 190px; border-radius: 50%; border: 0; padding: 0; background: none; cursor: pointer; display: block; margin: 0 auto; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.blip .core {
	position: absolute; inset: 18px; border-radius: 50%;
	background: radial-gradient(circle at 34% 28%, #fff1c9 0, #ffd47a 18%, #f2b84b 45%, #d68a26 80%, #b46b17 100%);
	box-shadow: inset -10px -14px 26px rgba(120, 60, 0, 0.35), inset 8px 10px 20px rgba(255, 255, 255, 0.5), 0 18px 40px -10px rgba(242, 184, 75, 0.7);
	transition: transform 0.2s var(--spring);
}
.blip:hover .core { transform: scale(1.04); }
.blip:active .core { transform: scale(0.92); }
.blip.hit .core { animation: squish 0.35s var(--spring); }
@keyframes squish { 0% { transform: scale(0.88, 0.94); } 50% { transform: scale(1.06, 0.98); } 100% { transform: scale(1); } }
.blip .ring { position: absolute; inset: 18px; border-radius: 50%; border: 3px solid rgba(242, 184, 75, 0.6); animation: halo 2.4s ease-out infinite; }
.blip .ring.two { animation-delay: 1.2s; }
@keyframes halo { from { transform: scale(1); opacity: 0.9; } to { transform: scale(1.5); opacity: 0; } }
.shop { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 1.1rem; text-align: left; }
.up-btn {
	position: relative;
	display: grid;
	gap: 0.1rem;
	padding: 0.6rem 0.75rem 0.6rem 0.9rem;
	border-radius: 14px;
	border: 0;
	background: var(--soft);
	color: var(--ink);
	box-shadow: inset 3px 0 0 var(--accent), inset 0 0 0 1px var(--line);
	cursor: pointer;
	font: inherit;
	transition: transform 0.15s var(--spring), background 0.2s, opacity 0.2s;
	animation: rise 0.5s var(--spring) both;
}
.up-btn[hidden] { display: none; }
.up-btn:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 22%, transparent); transform: translateY(-2px); }
.up-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.up-name { font: 600 0.9rem/1.2 var(--display); }
.up-does { font-size: 0.75rem; color: var(--muted); line-height: 1.25; }
.up-cost { font: 600 0.8rem var(--display); color: var(--accent); }
.up-cost::before { content: ""; display: inline-block; width: 0.6em; height: 0.6em; border-radius: 50%; background: #f2b84b; margin-right: 0.35em; }
.up-owned { position: absolute; top: 0.45rem; right: 0.6rem; font: 600 0.75rem var(--display); color: var(--muted); }
.scroll-cue { position: absolute; left: 50%; bottom: 24px; width: 30px; height: 48px; margin-left: -15px; border-radius: 999px; box-shadow: inset 0 0 0 2px var(--line); z-index: 2; }
.scroll-cue span { position: absolute; left: 50%; top: 9px; width: 6px; height: 10px; margin-left: -3px; border-radius: 3px; background: var(--accent); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(16px); opacity: 0; } 100% { opacity: 0; } }

/* Words that float up from a click. */
.float { position: fixed; z-index: 80; pointer-events: none; transform: translate(-50%, -50%); font: 700 1.5rem var(--display); color: #fff1c9; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25), 0 0 18px rgba(242, 184, 75, 0.8); animation: floatUp 1.05s var(--ease) forwards; }
.float.heart { color: #ff7aa8; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.2); font-size: 1.7rem; }
.float.confetti { font-size: 1.6rem; text-shadow: none; animation-duration: 1.1s; }
.float.c0 { color: #f2b84b; } .float.c1 { color: #e63a2e; } .float.c2 { color: #9cc56b; } .float.c3 { color: #8a7cf0; }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.6); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.1); } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -240%) scale(0.9); } }

/* --- Home: the headline ticker ------------------------------------------------------ */
.ticker { display: flex; align-items: stretch; background: #0f0d18; border-block: 1px solid var(--line); overflow: hidden; position: relative; z-index: 3; }
.ticker-label { flex: 0 0 auto; margin: 0; display: flex; align-items: center; padding: 0 1.1rem; background: #e63a2e; color: #fff; font: 700 0.85rem/1 var(--display); letter-spacing: 0.16em; text-transform: uppercase; position: relative; z-index: 1; box-shadow: 12px 0 18px #0f0d18; }
.ticker-label span::before { content: ""; display: inline-block; width: 0.55em; height: 0.55em; border-radius: 50%; background: #fff; margin-right: 0.55em; animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.2; } }
.ticker-view { overflow-x: auto; flex: 1; scrollbar-width: none; }
.ticker-view::-webkit-scrollbar { display: none; }
.ticker-track { list-style: none; display: flex; width: max-content; margin: 0; padding: 0; }
.ticker-track.moving { animation: tick var(--ticker-time, 120s) linear infinite; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
.ticker-view:has(.moving) { overflow: hidden; }
@keyframes tick { to { transform: translateX(-50%); } }
.ticker-track a, .ticker-track .item { display: flex; align-items: center; gap: 0.7rem; padding: 0.85rem 2rem 0.85rem 0; color: var(--ink); text-decoration: none; white-space: nowrap; font-size: 0.98rem; }
.ticker-track a:hover span { text-decoration: underline; text-decoration-color: var(--accent); }
.ticker-track .item b + span, .ticker-track .item > span:first-child { margin-left: 0; }
.page-game .ticker { background: color-mix(in srgb, var(--bg) 70%, #000); }
.page-game .ticker-label { background: var(--accent); color: var(--on-accent); box-shadow: 12px 0 18px color-mix(in srgb, var(--bg) 70%, #000); }
.page-game .ticker-label span::before { background: currentColor; }
.page-game .ticker-track .item { color: #f4efe4; padding-left: 2rem; }
.page-game .ticker-track .item b { margin-left: 0; }
.game-dough .ticker { background: #3b2a1a; }
.ticker-track b { font: 600 0.72rem/1 var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); padding: 0.35em 0.6em; border-radius: 6px; box-shadow: inset 0 0 0 1.5px var(--accent); margin-left: 2rem; }

/* --- Home: a band per game -------------------------------------------------------------- */
.shows { padding-top: 70px; }
.show {
	--edge: 60px;
	margin-top: calc(-1 * var(--edge));
	padding: calc(var(--edge) + 6rem) var(--gutter) 7rem;
	background: linear-gradient(to bottom, transparent var(--edge), var(--bg) var(--edge));
	color: var(--ink);
	overflow: hidden;
	--muted: color-mix(in srgb, var(--ink) 70%, transparent);
	--line: color-mix(in srgb, var(--ink) 16%, transparent);
	--soft: color-mix(in srgb, var(--ink) 8%, transparent);
	--on-accent: var(--bg);
}
.show .edge { position: absolute; top: 0; left: 0; width: 100%; height: var(--edge); fill: var(--bg); display: block; }
.show-gains .edge .stripe { fill: var(--accent); }
/* Dough's edge: round bubbles of dough rising, each one whole at any width. */
.show .edge.bubbles {
	background:
		radial-gradient(circle at 50% 100%, var(--bg) 33px, transparent 34px) 60px 100% / 163px 50px repeat-x,
		radial-gradient(circle at 50% 100%, var(--bg) 26px, transparent 27px) 0 100% / 97px 44px repeat-x,
		radial-gradient(circle at 50% 100%, var(--bg) 19px, transparent 20px) 30px 100% / 71px 36px repeat-x,
		linear-gradient(var(--bg), var(--bg)) 0 100% / 100% 14px no-repeat;
}
.show-in { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.show:nth-child(even) .show-in { grid-template-columns: 0.85fr 1.15fr; }
.show:nth-child(even) .show-media { order: 2; }
.bigword { position: absolute; bottom: -0.16em; left: -5%; z-index: 0; white-space: nowrap; pointer-events: none; font: 700 clamp(8rem, 22vw, 20rem)/0.8 var(--display); letter-spacing: -0.04em; color: transparent; -webkit-text-stroke: 2px color-mix(in srgb, var(--accent) 34%, transparent); opacity: 0.55; will-change: transform; }
.show-media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	border-radius: 24px;
	overflow: hidden;
	background: #000;
	transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
	transition: transform 0.5s var(--ease), box-shadow 0.4s;
	box-shadow: 0 0 0 7px color-mix(in srgb, var(--ink) 9%, transparent), 0 40px 70px -30px rgba(0, 0, 0, 0.65);
}
.show-media.tilting { transition: transform 0.08s linear; }
.show-media:hover { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 55%, transparent), 0 50px 80px -30px rgba(0, 0, 0, 0.7); }
.show-media video, .show-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.glare { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.28), transparent 45%); opacity: 0; transition: opacity 0.3s; mix-blend-mode: soft-light; }
.tilting .glare { opacity: 1; }
.badge { position: absolute; left: 14px; bottom: 14px; font: 600 0.75rem/1 var(--display); letter-spacing: 0.12em; text-transform: uppercase; color: #fff; background: rgba(0, 0, 0, 0.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); padding: 0.55em 0.8em; border-radius: 999px; display: inline-flex; align-items: center; gap: 0.5em; }
.badge::before { content: ""; width: 0; height: 0; border-left: 0.6em solid #fff; border-top: 0.36em solid transparent; border-bottom: 0.36em solid transparent; }
.show-text h2 { margin: 0 0 0.6rem; }
.show-text h2 a { color: var(--ink); text-decoration: none; display: block; }
.show-logo { display: block; width: auto; max-width: min(460px, 100%); height: auto; aspect-ratio: 16 / 9; object-fit: contain; object-position: left center; margin: -1.5rem 0 -1rem -0.5rem; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.25)); transition: transform 0.4s var(--spring); }
.show-text h2 a:hover .show-logo { transform: rotate(-2deg) scale(1.03); }
.num { font-size: 0.9rem; font-weight: 600; letter-spacing: 0.2em; color: var(--accent); display: flex; align-items: center; gap: 0.8rem; margin: 0; }
.num::after { content: ""; width: 3rem; height: 2px; background: currentColor; opacity: 0.6; }
.show-text > p { color: var(--muted); }

/* Each game's band in its own look: a pattern under it (below the edge). */
.show::before { content: ""; position: absolute; inset: var(--edge) 0 0; background: var(--pattern, none); background-size: var(--pattern-size, auto); pointer-events: none; }
.show-dough { --pattern: radial-gradient(color-mix(in srgb, var(--ink) 9%, transparent) 1.2px, transparent 1.6px); --pattern-size: 26px 26px; }
.show-dough .show-media { border-radius: 40px 40px 40px 12px; }
.show-gains { --pattern: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 14px, transparent 14px 28px); }
.page-game.game-gains { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 14px, transparent 14px 28px); }
.show-gains .bigword, .game-gains h1, .game-gains h2, .game-gains .glogo-text { font-family: "Anton", "Fredoka", sans-serif; font-weight: 400; text-transform: uppercase; letter-spacing: 0.01em; }
.show-gains .show-media { border-radius: 6px; transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) skewY(-1.5deg); }
.show-gains .chips li, .game-gains .chips li { border-radius: 3px; transform: skewX(-8deg); font-family: "Barlow Condensed", var(--body); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.show-gains .button, .game-gains .button { border-radius: 4px; font-family: "Barlow Condensed", var(--display); text-transform: uppercase; letter-spacing: 0.05em; font-size: 1.15rem; transform: skewX(-6deg); }
.show-gains .button:hover, .game-gains .button:hover { transform: skewX(-6deg) translateY(-2px); }
.show-gains .button:active, .game-gains .button:active { transform: skewX(-6deg) translateY(4px); }
.show-petrock { --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' shape-rendering='crispEdges'%3E%3Cg fill='%23f3ecd8' fill-opacity='.18'%3E%3Crect x='10' y='14' width='2' height='2'/%3E%3Crect x='60' y='8' width='2' height='2'/%3E%3Crect x='38' y='50' width='2' height='2'/%3E%3Crect x='82' y='66' width='2' height='2'/%3E%3Crect x='20' y='80' width='2' height='2'/%3E%3Crect x='72' y='34' width='4' height='4' fill-opacity='.1'/%3E%3C/g%3E%3C/svg%3E"); }
.show-petrock .show-media, .game-petrock .screen, .game-petrock .shot img {
	border-radius: 0;
	clip-path: polygon(0 12px, 6px 12px, 6px 6px, 12px 6px, 12px 0, calc(100% - 12px) 0, calc(100% - 12px) 6px, calc(100% - 6px) 6px, calc(100% - 6px) 12px, 100% 12px, 100% calc(100% - 12px), calc(100% - 6px) calc(100% - 12px), calc(100% - 6px) calc(100% - 6px), calc(100% - 12px) calc(100% - 6px), calc(100% - 12px) 100%, 12px 100%, 12px calc(100% - 6px), 6px calc(100% - 6px), 6px calc(100% - 12px), 0 calc(100% - 12px));
}
.show-petrock .show-media { box-shadow: none; }
.show-petrock .chips li, .game-petrock .chips li { border-radius: 0; box-shadow: inset 0 0 0 2px var(--line); }
.show-petrock .button, .game-petrock .button {
	border-radius: 0;
	clip-path: polygon(0 6px, 6px 6px, 6px 0, calc(100% - 6px) 0, calc(100% - 6px) 6px, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 6px calc(100% - 6px), 0 calc(100% - 6px));
	box-shadow: inset 0 -5px 0 var(--shade);
	padding-bottom: 0.9em;
}
.show-petrock .button.soon, .game-petrock .button.soon, .game-petrock .button.ghost { box-shadow: inset 0 0 0 3px var(--accent); }
.game-petrock .button:active { box-shadow: inset 0 -1px 0 var(--shade); }
.pixel img, .pixel canvas { image-rendering: pixelated; }

/* --- Home: house rules and the games to come ------------------------------------- */
.rules { padding: 7rem var(--gutter) 3rem; }
.tiles { list-style: none; margin: 0 auto; padding: 0; max-width: 1180px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.tiles li { padding: 1.6rem 1.4rem; border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; }
.tiles b { font: 700 clamp(3.2rem, 6vw, 4.6rem)/1 var(--display); color: var(--accent); font-variant-numeric: tabular-nums; display: block; }
.tiles b.landed { animation: land 0.5s var(--spring); }
@keyframes land { 0% { transform: scale(1.25); } 100% { transform: scale(1); } }
.tiles span { font: 600 1.15rem/1.25 var(--display); margin-top: 0.4rem; }
.tiles small { color: var(--muted); margin-top: 0.5rem; font-size: 0.9rem; }
.upcoming { max-width: 1180px; margin: 2rem auto 6rem; padding: 2rem; border-radius: 26px; border: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent); display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center; margin-inline: max(var(--gutter), calc((100% - 1180px) / 2)); }
.ghosts { display: flex; gap: 0.8rem; }
.ghosts span { width: 92px; aspect-ratio: 3 / 4; border-radius: 14px; display: grid; place-items: center; font: 700 2rem var(--display); color: var(--muted); background: linear-gradient(110deg, var(--soft) 30%, color-mix(in srgb, var(--accent) 22%, transparent) 50%, var(--soft) 70%); background-size: 250% 100%; animation: shimmer 2.6s linear infinite; box-shadow: inset 0 0 0 1px var(--line); }
.ghosts span:nth-child(2) { animation-delay: 0.3s; transform: rotate(-3deg) translateY(-6px); }
.ghosts span:nth-child(3) { animation-delay: 0.6s; transform: rotate(3deg); }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.upcoming h2 { margin: 0.3rem 0; }
.upcoming p { color: var(--muted); margin: 0; }
.soonart .mark { width: 6.5rem; height: auto; fill: var(--accent); }
.soonart .mark circle { animation: dots 2.4s ease-in-out infinite; }
.soonart .mark circle:nth-child(2) { animation-delay: 0.2s; }
.soonart .mark circle:nth-child(3) { animation-delay: 0.4s; }
.soonart .mark circle:nth-child(4) { animation-delay: 0.6s; }
.soonart .mark circle:nth-child(5) { animation-delay: 0.8s; }
@keyframes dots { 0%, 60%, 100% { opacity: 1; } 30% { opacity: 0.3; } }

/* --- A game's page ---------------------------------------------------------------- */
.page-game { --muted: color-mix(in srgb, var(--ink) 72%, transparent); --line: color-mix(in srgb, var(--ink) 16%, transparent); --soft: color-mix(in srgb, var(--ink) 8%, transparent); --on-accent: var(--bg); }
.game-dough { color-scheme: light; background-image: radial-gradient(color-mix(in srgb, var(--ink) 7%, transparent) 1.2px, transparent 1.6px); background-size: 26px 26px; }
.game-petrock { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' shape-rendering='crispEdges'%3E%3Cg fill='%23f3ecd8' fill-opacity='.14'%3E%3Crect x='10' y='14' width='2' height='2'/%3E%3Crect x='60' y='8' width='2' height='2'/%3E%3Crect x='38' y='50' width='2' height='2'/%3E%3Crect x='82' y='66' width='2' height='2'/%3E%3Crect x='20' y='80' width='2' height='2'/%3E%3C/g%3E%3C/svg%3E"); }
.ghero { min-height: min(94svh, 940px); display: flex; align-items: flex-end; padding: 130px var(--gutter) 5rem; overflow: hidden; isolation: isolate; }
.ghero-media { position: absolute; inset: 0; z-index: -1; will-change: transform; }
.ghero-media img, .ghero-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ghero-video { opacity: 0; transition: opacity 1.2s; }
.ghero-video.playing { opacity: 1; }
.ghero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 82%, transparent) 0, color-mix(in srgb, var(--bg) 30%, transparent) 12%, transparent 24%, transparent 38%, color-mix(in srgb, var(--bg) 78%, transparent) 66%, var(--bg) 96%); }
.ghero-in { width: 100%; max-width: 1240px; margin: 0 auto; }
.ghero h1 { margin: 0; }
.glogo { display: block; width: min(620px, 92%); height: auto; aspect-ratio: 16 / 9; object-fit: contain; object-position: left bottom; margin: 0 0 -1.5rem -1rem; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.35)); animation: bob 5s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-1deg); } }
.ghero .lead { max-width: 44em; font-weight: 500; }
.ghero .scroll-cue { bottom: 18px; }
.about, .trailer, .gallery, .facts, .also { padding: 5.5rem var(--gutter); }
.page-game .ticker + .trailer { padding-top: 4rem; }
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); max-width: 1240px; margin: 0 auto; align-items: start; }
.about-text p { font-size: 1.08rem; }
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; counter-reset: f; }
.features li { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; padding: 1.1rem 1.2rem; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); transition: transform 0.3s var(--spring); }
.features li:hover { transform: translateX(6px) rotate(-0.4deg); }
.features .n { font: 700 1.4rem/1 var(--display); color: var(--accent); min-width: 2ch; }
.features p { margin: 0; }
.screen { max-width: 1140px; margin: 0 auto; border-radius: 24px; overflow: hidden; box-shadow: 0 0 0 6px color-mix(in srgb, var(--ink) 10%, transparent), 0 40px 70px -30px rgba(0, 0, 0, 0.6); background: #000; }
.player { position: relative; aspect-ratio: 16 / 9; display: block; width: 100%; border: 0; padding: 0; background: #000; cursor: pointer; }
.player video, .player img, .player iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.player .play { position: absolute; left: 50%; top: 50%; width: 104px; height: 104px; margin: -52px 0 0 -52px; border-radius: 50%; border: 0; background: var(--accent); cursor: pointer; box-shadow: 0 0 0 12px color-mix(in srgb, var(--accent) 30%, transparent), 0 20px 40px rgba(0, 0, 0, 0.4); transition: transform 0.25s var(--spring), opacity 0.3s; animation: ring 2.2s ease-in-out infinite; }
.player .play::before { content: ""; position: absolute; left: 40px; top: 32px; border-left: 34px solid var(--on-accent); border-top: 20px solid transparent; border-bottom: 20px solid transparent; }
.player .play:hover { transform: scale(1.08); }
.player.playing .play { opacity: 0; pointer-events: none; }
@keyframes ring { 50% { box-shadow: 0 0 0 22px color-mix(in srgb, var(--accent) 12%, transparent), 0 20px 40px rgba(0, 0, 0, 0.4); } }
.no-js .player .play { display: none; }
.gallery { padding-inline: 0; }
.gallery .sec-head { padding: 0 var(--gutter); }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: min(80%, 820px); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0.5rem max(var(--gutter), calc((100% - 820px) / 2)) 1.5rem; scroll-padding-inline: max(var(--gutter), calc((100% - 820px) / 2)); scrollbar-width: thin; scrollbar-color: var(--accent) transparent; cursor: grab; }
.strip.dragging { cursor: grabbing; scroll-snap-type: none; }
.strip.dragging .shot { pointer-events: none; }
.shot { scroll-snap-align: center; display: block; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.6); }
.shot img { display: block; width: 100%; height: auto; transition: transform 0.6s var(--ease), filter 0.3s; -webkit-user-drag: none; }
.shot:hover img { transform: scale(1.04); }
.strip-nav { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 0.4rem; }
.no-js .strip-nav .arrow { display: none; }
.arrow { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--card); color: var(--ink); font-size: 1.3rem; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); transition: background 0.2s, transform 0.2s var(--spring); }
.arrow:hover { background: var(--accent); color: var(--on-accent); transform: scale(1.08); }
.strip-count { font: 600 0.95rem var(--display); color: var(--muted); min-width: 6ch; text-align: center; }
.facts { max-width: 1040px; margin: 0 auto; }
.sheet { display: grid; grid-template-columns: max-content 1fr; gap: 0; margin: 0 0 1.6rem; border-radius: 20px; overflow: hidden; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.sheet dt, .sheet dd { padding: 0.85rem 1.3rem; border-bottom: 1px solid var(--line); margin: 0; }
.sheet dt { font: 600 0.8rem/1.9 var(--display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.sheet dt:last-of-type, .sheet dd:last-of-type { border-bottom: 0; }
.also { max-width: 1240px; margin: 0 auto; }
.also-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.also-card { position: relative; display: block; border-radius: 22px; overflow: hidden; color: var(--ink); text-decoration: none; background: var(--bg); transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.5s var(--ease); box-shadow: 0 30px 50px -30px rgba(0, 0, 0, 0.6); }
.also-card.tilting { transition: transform 0.08s linear; }
.also-card img { display: block; width: 100%; height: auto; }
.also-title { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.4rem 1.2rem 1rem; font: 600 1.25rem var(--display); background: linear-gradient(to top, var(--bg) 20%, transparent); }
.also-go { position: absolute; right: 1rem; bottom: 1rem; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 700; transition: transform 0.3s var(--spring); }
.also-card:hover .also-go { transform: translateX(4px) scale(1.1); }

/* Dough's cat, asleep on top of the trailer (the game's own renders). */
.screen-wrap { position: relative; max-width: 1140px; margin: 0 auto; }
.napper { position: absolute; z-index: 2; right: 7%; bottom: calc(100% - 14px); width: clamp(150px, 23%, 270px); padding: 0; border: 0; background: none; cursor: default; -webkit-tap-highlight-color: transparent; }
.napper img { display: block; width: 100%; height: auto; transform-origin: 50% 92%; animation: breathe 3.8s ease-in-out infinite; filter: drop-shadow(0 10px 8px rgba(70, 40, 10, 0.22)); }
.napper .peeking { position: absolute; inset: 0; opacity: 0; }
.napper.peek .peeking { opacity: 1; }
.napper.peek .asleep { opacity: 0; }
.napper:focus-visible { outline-offset: -6px; border-radius: 40%; }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 45% { transform: scale(1.006, 1.022); } }
.page-game .trailer:has(.napper) { padding-top: 7rem; }
.page-game .trailer:has(.napper) .sec-head { margin-bottom: 4.5rem; }

/* A Rock of My Own: its valley behind the whole page (valley.js), in panels
   with windows between them where the scenery shows through. */
.valley-bg { position: fixed; left: 0; top: 0; z-index: -1; max-width: none; image-rendering: pixelated; pointer-events: none; opacity: 0; transition: opacity 0.6s; }
.valley-bg.drawn { opacity: 1; }
.has-valley { background-image: none; }
.has-valley::before { display: none; }
.has-valley .top { background: color-mix(in srgb, var(--bg) 72%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.has-valley .ghero { min-height: max(620px, 92svh); }
.has-valley .ghero::after { background: linear-gradient(to bottom, transparent 55%, color-mix(in srgb, var(--bg) 55%, transparent) 100%); }
.has-valley .ghero-in { max-width: 760px; margin: 0; padding: 0 0 0.4rem; }
.has-valley .ghero-in .lead, .has-valley .ghero-in .row, .has-valley .ghero-in .chips { position: relative; }
.has-valley .ghero-in .lead { background: color-mix(in srgb, var(--bg) 86%, transparent); padding: 1rem 1.2rem; margin-bottom: 1rem; }
.has-valley main > .ticker { margin-bottom: 0; }
.has-valley main > section:not(.ghero):not(.ticker) { background: color-mix(in srgb, var(--bg) 90%, transparent); }
.has-valley main > section.about, .has-valley main > section.gallery, .has-valley main > section.facts, .has-valley main > section.also { margin-top: 34vh; }
/* The panels run the page's width; their contents stay where they were. */
.has-valley .about, .has-valley .also { max-width: none; padding-inline: max(var(--gutter), calc((100% - 1240px) / 2)); }
.has-valley .facts { max-width: none; padding-inline: max(var(--gutter), calc((100% - 1040px) / 2)); }
.valley-hint { font: 600 0.82rem var(--display); letter-spacing: 0.06em; color: var(--ink); background: color-mix(in srgb, var(--bg) 80%, transparent); display: inline-block; padding: 0.45em 0.8em; margin: 0.2rem 0 0; transition: opacity 1s 1.5s; }
.valley-hint:empty { display: none; }
.valley-hint.done { opacity: 0; }
.no-js .has-valley, .has-valley { background-color: var(--bg); }
@media (max-width: 620px) {
	.has-valley .ghero { padding-top: 46vh; min-height: 0; }
	.has-valley .ghero-media { display: none; }
	.has-valley main > section.about, .has-valley main > section.gallery, .has-valley main > section.facts, .has-valley main > section.also { margin-top: 26vh; }
	.napper { right: 4%; bottom: calc(100% - 8px); }
}

/* Pixel-art pages: headings drawn in the game's own font (pixel.js). */
.pixelled { line-height: 0; }
.pixelled canvas { image-rendering: pixelated; max-width: 100%; height: auto; }

/* --- Press, support, privacy, the 404 --------------------------------------------- */
.intro { max-width: calc(1040px + 2 * var(--gutter)); margin: 0 auto; padding: 150px var(--gutter) 2.5rem; }
.press-sheet { margin-top: 2rem; }
.press-game {
	max-width: 1040px;
	margin: 1.4rem auto;
	display: grid;
	grid-template-columns: 0.9fr 1.1fr;
	gap: 0;
	border-radius: 26px;
	overflow: hidden;
	background: var(--bg);
	color: var(--ink);
	box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
	--muted: color-mix(in srgb, var(--ink) 70%, transparent);
	--line: color-mix(in srgb, var(--ink) 16%, transparent);
	--soft: color-mix(in srgb, var(--ink) 8%, transparent);
	--on-accent: var(--bg);
}
.press-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.press-body { padding: 1.8rem 2rem 2rem; }
.press-body h2 { margin-top: 0; }
.blurb { padding: 1rem 1.2rem; border-radius: 14px; background: var(--soft); margin-bottom: 1.2rem; }
.blurb p { margin-bottom: 0.7rem; }
.press-body .sheet { font-size: 0.92rem; }
.press-body .sheet dt, .press-body .sheet dd { padding: 0.5rem 1rem; }
.page-press .press-game, .page-support .saves, .page-support .faq, .page-privacy .promises, .page-privacy .ask { margin-inline: max(var(--gutter), calc((100% - 1040px) / 2)); }
.saves, .faq { max-width: 1040px; margin: 0 auto 2.5rem; }
.tabs { border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); padding: 1rem; }
.tablist { display: inline-flex; gap: 0.3rem; padding: 0.3rem; border-radius: 999px; background: var(--soft); margin-bottom: 0.8rem; flex-wrap: wrap; }
.tab { font: 600 0.95rem var(--display); padding: 0.55em 1.1em; border-radius: 999px; border: 0; background: none; color: var(--ink); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.no-js .tablist { display: none; }
.tabs.ready .panel h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.paths { list-style: none; margin: 0; padding: 0; }
.paths li { display: grid; grid-template-columns: auto 12rem 1fr auto; gap: 0.6rem 1rem; align-items: center; padding: 0.8rem 0.6rem; border-top: 1px solid var(--line); }
.paths .dot { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--accent); }
.faq details { border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 0.7rem; overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 1.1rem 3.2rem 1.1rem 1.3rem; font-size: 1.15rem; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1.2rem; top: 50%; width: 1.7rem; height: 1.7rem; margin-top: -0.85rem; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--accent); font-size: 1.3rem; transition: transform 0.3s var(--spring); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 1.3rem 1.1rem; color: var(--muted); }
.faq details > div p { margin: 0; }
.promises { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.promise { padding: 1.5rem 1.4rem; border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.promise h2 { font-size: 1.3rem; margin: 0.8rem 0 0.4rem; }
.promise p { color: var(--muted); margin: 0; }
.tick { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: color-mix(in srgb, #9cc56b 22%, transparent); }
.tick::before { content: ""; width: 0.9rem; height: 0.5rem; border-left: 3px solid #9cc56b; border-bottom: 3px solid #9cc56b; transform: translateY(-2px) rotate(-45deg); }
.ask { max-width: 1040px; margin: 2rem auto 5rem; color: var(--muted); }
.lost { min-height: 90svh; display: grid; place-content: center; text-align: center; padding: 120px var(--gutter) 4rem; }
.lost .row { justify-content: center; }
.lost .lead { margin-inline: auto; color: var(--muted); }
.pebble-wrap { margin-bottom: 1.5rem; }
.pebble { width: 150px; height: 110px; border: 0; background: none; cursor: pointer; padding: 0; margin: 0 auto; display: block; }
.stone { display: block; width: 100%; height: 100%; border-radius: 52% 48% 44% 56% / 60% 62% 38% 40%; background: radial-gradient(circle at 35% 30%, #c9c3d8, #8f88a6 55%, #5e5874); box-shadow: inset -8px -10px 18px rgba(0, 0, 0, 0.3), 0 16px 0 -6px rgba(0, 0, 0, 0.25); transition: transform 0.2s var(--spring); }
.pebble:hover .stone { transform: scale(1.04) rotate(-2deg); }
.pebble.patted .stone { animation: purr 0.5s var(--spring); }
@keyframes purr { 0% { transform: scale(1.08, 0.9); } 30% { transform: scale(0.96, 1.05) rotate(2deg); } 60% { transform: rotate(-2deg); } 100% { transform: none; } }
.pebble-note { color: var(--muted); min-height: 1.6em; }

/* --- Toasts and the lightbox ------------------------------------------------------- */
.toasts { position: fixed; top: 84px; right: 16px; z-index: 85; display: grid; gap: 0.6rem; width: min(340px, calc(100vw - 32px)); pointer-events: none; }
.toast { --accent: #f2b84b; display: flex; gap: 0.8rem; align-items: center; padding: 0.8rem 1rem; border-radius: 16px; background: #24213a; color: #f4efe4; box-shadow: inset 4px 0 0 var(--accent), 0 20px 40px -14px rgba(0, 0, 0, 0.6); transform: translateX(120%); transition: transform 0.45s var(--spring), opacity 0.4s; pointer-events: auto; }
.toast.in { transform: none; }
.toast.out { opacity: 0; transform: translateX(40%); }
.toast p { margin: 0; line-height: 1.35; display: grid; font-size: 0.9rem; color: rgba(244, 239, 228, 0.75); }
.toast b { font: 600 1rem var(--display); color: #f4efe4; }
.medal { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff1c9, var(--accent) 50%, color-mix(in srgb, var(--accent) 60%, #000)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); animation: land 0.6s var(--spring); }
.lightbox { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; background: rgba(10, 8, 18, 0.92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; transition: opacity 0.25s; padding: 4rem 1rem; }
.lightbox.open { opacity: 1; }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: 0.8rem; }
.lightbox img { max-width: min(92vw, 1600px); max-height: 80vh; border-radius: 12px; opacity: 0; transform: scale(0.97); transition: opacity 0.3s, transform 0.4s var(--ease); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6); }
.lightbox img.shown { opacity: 1; transform: none; }
.pixel .lightbox img { image-rendering: pixelated; }
.lightbox figcaption { color: #f4efe4; font: 600 0.95rem var(--display); opacity: 0.8; }
.lb-close { position: absolute; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 1.8rem; cursor: pointer; }
.lb-prev, .lb-next { position: absolute; top: 50%; margin-top: -24px; background: rgba(255, 255, 255, 0.12); color: #fff; box-shadow: none; }
.lb-prev { left: 16px; } .lb-next { right: 16px; }

/* --- Footer ------------------------------------------------------------------------- */
.foot { background: color-mix(in srgb, var(--bg) 82%, #000); color: var(--ink); padding: 4rem var(--gutter) 2rem; position: relative; --muted: color-mix(in srgb, var(--ink) 65%, transparent); --line: color-mix(in srgb, var(--ink) 14%, transparent); }
.foot-in { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; }
.foot h2 { font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 0.5rem 0 0.8rem; font-family: var(--display); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; color: var(--muted); }
.foot a { color: var(--ink); text-decoration: none; }
.foot a:hover { color: var(--accent); }
.foot-brand p { color: var(--muted); margin-top: 0.6rem; }
.foot-base { max-width: 1240px; margin: 3rem auto 0; padding-top: 1.2rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: 0.92rem; }
.foot-base p { margin: 0; }
.up { color: var(--muted) !important; }
.game-dough .foot, .game-gains .foot, .game-petrock .foot { --ink: #f4efe4; color: #f4efe4; background: #15131f; }
.game-dough .foot { background: #3b2a1a; --accent: #f6b26b; }

/* --- Narrow screens ------------------------------------------------------------------- */
@media (max-width: 980px) {
	.hero-in { grid-template-columns: 1fr; gap: 2rem; }
	.clicker { max-width: 460px; width: 100%; margin: 0 auto; }
	.show-in, .about { grid-template-columns: 1fr; }
	.show:nth-child(even) .show-media { order: 0; }
	.show:nth-child(even) .show-in { grid-template-columns: 1fr; }
	.tiles { grid-template-columns: 1fr 1fr; }
	.foot-in { grid-template-columns: 1fr 1fr; }
	.press-game { grid-template-columns: 1fr; }
	.paths li { grid-template-columns: auto 1fr auto; }
	.paths code { grid-column: 2 / -1; }
}
@media (max-width: 620px) {
	body { font-size: 16px; }
	/* A game's header: its picture on top, the words under it. */
	.ghero { min-height: 0; padding-top: calc(58vw - 2rem); padding-bottom: 3.5rem; }
	.ghero-media { bottom: auto; height: 62vw; }
	.ghero::after { background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 80%, transparent) 0, transparent 70px, transparent 34vw, var(--bg) 62vw); }
	.ghero .scroll-cue { display: none; }
	.glogo { width: 88%; margin-bottom: -0.5rem; }
	.hero { padding-top: 96px; }
	.blip { width: 160px; height: 160px; }
	.upcoming { grid-template-columns: 1fr; text-align: left; }
	.ghosts span { width: 70px; }
	.tiles { grid-template-columns: 1fr; }
	.also-grid { grid-template-columns: 1fr; }
	.foot-in { grid-template-columns: 1fr; }
	.sheet { grid-template-columns: 1fr; }
	.sheet dt { border-bottom: 0; padding-bottom: 0; }
	.sheet dd { padding-top: 0.2rem; }
	.strip { grid-auto-columns: 88%; }
	.lb-prev, .lb-next { top: auto; bottom: 16px; margin: 0; }
}

/* --- Less motion, when asked for ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: 0.001ms !important; }
	html { scroll-behavior: auto; }
	.js .reveal:not(.in) { opacity: 1; transform: none; }
	.headline .w:nth-child(4) { background-position: 0 0; }
}
