/* Hallmark · genre: playful · theme: custom, by request (a blocky game's title screen: stone buttons, a voxel world turning behind) · posture: committed · hero: the menu, centred, one screen · nav: none, a Game Menu button in the corner · footer: none · job: open one of Ace's profiles · signature: the code-built voxel world turning behind the menu, with achievements to find */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R3 V5 · weakest: R, the eggs could crowd the menu; kept them behind taps and the Game Menu so the first screen is only the menu */
/* Hallmark · waive 2b · stone texture clipped to the name · the game's title letters are textured stone; the texture is the point, not a colour wash */
/* Hallmark · waive 79 · space between the menu and the fold at 1440 · the page is one screen by design: a game menu over a world, and the world is what fills the space */
/* Hallmark · waive 77 · two sections, hero and footer · a link menu has nothing below the menu by design; everything fits one screen on every device */
/* Hallmark · waive 59 · the gap between the menu and the corner toast · there are no sections to space; on wide screens the toast sits in a corner like the game's */
/* Hallmark · waive 44c · the hero ends before the fold · the menu is centred on a full-screen world; a taller hero would only push the buttons down */
/*
 * Ace's links: a blocky title screen, hand-built.
 * Faces: Minecrafter (the name only; free for personal use) and Monocraft (everything else; SIL OFL 1.1).
 * The world behind the menu is six renders of a code-built voxel world (tools/panorama), pasted on the
 * inside of a CSS cube that turns slowly: the same trick the game's title screen uses, with no 3D engine.
 * Day follows a light system theme, night a dark one.
 */

@font-face {
	font-family: "Monocraft";
	src: url(fonts/monocraft.woff) format("woff");
	font-display: swap;
}
@font-face {
	font-family: "Minecrafter";
	src: url(fonts/minecrafter.woff) format("woff");
	font-display: swap;
}

:root {
	--text: #fafafa;
	--text-shadow: #3f3f3f;
	--muted: #aaaaaa;
	--yellow: #ffff55;
	--yellow-shadow: #3f3f15;
	--hover-text: #ffffa0;
	--sky: #a9c8fb;
	/* vertical rhythm: stepped down for shorter screens at the end of this file */
	--pad: 40px;
	--av: 144px;
	--name: 76px;
	--gap-toast: 36px;
	--gap-btns: 28px;
	--btn-h: 54px;
	--btn-gap: 12px;
	--btn-font: 19px;
	color-scheme: light;
	/* tokens collected from the stylesheet */
	--grey-f2: #f2f2f2;
	--c-000000-a0: rgb(0 0 0 / 0);
	--c-000000-a12: rgb(0 0 0 / 0.12);
	--c-000000-a18: rgb(0 0 0 / 0.18);
	--c-000000-a28: rgb(0 0 0 / 0.28);
	--c-000000-a30: rgb(0 0 0 / 0.3);
	--c-000000-a35: rgb(0 0 0 / 0.35);
	--c-000000-a45: rgb(0 0 0 / 0.45);
	--c-000000-a50: rgb(0 0 0 / 0.5);
	--c-000000-a55: rgb(0 0 0 / 0.55);
	--c-000000-a6: rgb(0 0 0 / 0.06);
	--c-100010-a94: rgb(16 0 16 / 0.94);
	--c-101010-a72: rgb(16 16 16 / 0.72);
	--c-101010-a82: rgb(16 16 16 / 0.82);
	--c-23234a: #23234a;
	--c-28007f: #28007f;
	--c-2a292b: #2a292b;
	--c-3f3f28: #3f3f28;
	--c-5000ff: #5000ff;
	--c-7882ff-a32: rgb(120 130 255 / 0.32);
	--c-8f8fff: #8f8fff;
	--c-ffffff-a0: rgb(255 255 255 / 0);
	--c-ffffff-a20: rgb(255 255 255 / 0.2);
	--c-ffffff-a40: rgb(255 255 255 / 0.4);
	--grey-0a: #0a0a0a;
	--grey-21: #212121;
	--grey-2a: #2a2a2a;
	--grey-37: #373737;
	--grey-38: #383838;
	--grey-3f: #3f3f3f;
	--grey-40: #404040;
	--grey-4a: #4a4a4a;
	--grey-55: #555;
	--grey-5c: #5c5c5c;
	--grey-6e: #6e6e6e;
	--grey-77: #777;
	--grey-8b: #8b8b8b;
	--grey-9a: #9a9a9a;
	--grey-a8: #a8a8a8;
	--grey-b0: #b0b0b0;
	--grey-c6: #c6c6c6;
	--grey-e0: #e0e0e0;
	--grey-fa: #fafafa;
	--font-body: "Monocraft", ui-monospace, Menlo, Consolas, monospace;
	--font-title: "Minecrafter", "Monocraft", sans-serif;
}
@media (prefers-color-scheme: dark) {
	:root {
		--sky: #101a36;
		color-scheme: dark;
	}
}

* {
	box-sizing: border-box;
}
html {
	overflow-x: clip;
	background: var(--sky);
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}
body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	color: var(--text);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.4;
	text-shadow: 2px 2px 0 var(--text-shadow);
	-webkit-font-smoothing: none;
	overflow-x: clip;
}
button {
	font: inherit;
	color: inherit;
}
p {
	margin: 0;
}

/* ---------- The panorama ---------- */

.world {
	position: fixed;
	left: 0;
	top: 0;
	width: 100%;
	height: 100vh;
	height: 100lvh; /* the large viewport: it doesn't jump when a phone's toolbar slides away */
	z-index: -1;
	overflow: hidden;
	background: var(--sky);
	pointer-events: none;
}
.pano {
	/* --p is the distance from the eye to each face: about an 80 degree view, never wider than 96 */
	--p: max(60vh, 45vw);
	position: absolute;
	inset: -16px;
	perspective: var(--p);
	filter: blur(2px) brightness(0.9);
}
@supports (height: 1lvh) {
	.pano {
		--p: max(60lvh, 45vw);
	}
}
.cube {
	position: absolute;
	left: 50%;
	top: 50%;
	transform-style: preserve-3d;
	transform: translateZ(var(--p)) rotateX(-11deg) rotateY(0deg);
	animation: pan 240s linear infinite;
	will-change: transform;
}
@keyframes pan {
	to {
		transform: translateZ(var(--p)) rotateX(-11deg) rotateY(-360deg);
	}
}
.face {
	position: absolute;
	/* 2px wider than the cube, so neighbouring faces overlap instead of leaving hairline seams */
	width: calc(var(--p) * 2 + 2px);
	height: calc(var(--p) * 2 + 2px);
	left: calc(var(--p) * -1 - 1px);
	top: calc(var(--p) * -1 - 1px);
	background: center / 100% 100% no-repeat;
	backface-visibility: hidden;
}
.front {
	transform: translateZ(calc(var(--p) * -1));
	background-image: url(pano/day-front.webp);
}
.right {
	transform: rotateY(-90deg) translateZ(calc(var(--p) * -1));
	background-image: url(pano/day-right.webp);
}
.back {
	transform: rotateY(180deg) translateZ(calc(var(--p) * -1));
	background-image: url(pano/day-back.webp);
}
.left {
	transform: rotateY(90deg) translateZ(calc(var(--p) * -1));
	background-image: url(pano/day-left.webp);
}
.up {
	transform: rotateX(-90deg) translateZ(calc(var(--p) * -1));
	background-image: url(pano/day-up.webp);
}
.down {
	transform: rotateX(90deg) translateZ(calc(var(--p) * -1));
	background-image: url(pano/day-down.webp);
}
/* A soft vignette keeps the menu readable over bright sand and sky */
.world::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse 70% 60% at 50% 45%, var(--c-000000-a0) 40%, var(--c-000000-a28)), linear-gradient(var(--c-000000-a6), var(--c-000000-a18));
}
@media (prefers-color-scheme: dark) {
	.pano {
		filter: blur(2px);
	}
	.front {
		background-image: url(pano/night-front.webp);
	}
	.right {
		background-image: url(pano/night-right.webp);
	}
	.back {
		background-image: url(pano/night-back.webp);
	}
	.left {
		background-image: url(pano/night-left.webp);
	}
	.up {
		background-image: url(pano/night-up.webp);
	}
	.down {
		background-image: url(pano/night-down.webp);
	}
}

/* ---------- The menu ---------- */

.menu {
	width: min(100% - 32px, 500px);
	margin: auto; /* centred in the screen when there is room to spare */
	padding: var(--pad) 0;
	text-align: center;
}

.avatar {
	display: block;
	width: var(--av);
	height: var(--av);
	/* no drop shadow: the sticker is cut flat at the bottom, so a shadow draws a hard band under it */
	transform-origin: 50% 100%;
}
/* Ace is a button: boop him. A dropped item bobs; so does Ace. */
.boop {
	position: relative;
	display: block;
	margin: 0 auto;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	animation: bob 3.2s ease-in-out infinite;
	-webkit-tap-highlight-color: transparent;
}
.boop:focus-visible {
	outline: 2px solid var(--grey-fa);
	outline-offset: 4px;
}
.hop {
	display: block;
}
.hop.jumping {
	animation: jump 0.5s both;
}
@keyframes jump {
	0% {
		transform: translateY(0);
		animation-timing-function: cubic-bezier(0.2, 0.6, 0.4, 1);
	}
	45% {
		transform: translateY(-52px);
		animation-timing-function: cubic-bezier(0.6, 0, 0.8, 0.4);
	}
	100% {
		transform: translateY(0);
	}
}
.avatar.booped {
	animation: squish 0.34s ease-out;
}
@keyframes squish {
	30% {
		transform: scale(1.12, 0.86);
	}
	65% {
		transform: scale(0.96, 1.05);
	}
}
.avatar.shaking {
	animation: shake 0.9s ease-in-out;
}
@keyframes shake {
	10%, 30%, 50%, 70% {
		transform: rotate(-9deg) translateX(-4px);
	}
	20%, 40%, 60%, 80% {
		transform: rotate(9deg) translateX(4px);
	}
}
/* Breeding hearts: the game's way of saying aww */
.heart {
	position: absolute;
	width: 24px;
	height: 24px;
	background: url(icons.png) -48px 0 / 216px 24px;
	image-rendering: pixelated;
	pointer-events: none;
	animation: float-up 0.9s ease-out both;
}
@keyframes float-up {
	from {
		opacity: 0;
		transform: translateY(6px) scale(0.6);
	}
	20% {
		opacity: 1;
		transform: translateY(-6px) scale(1);
	}
	to {
		opacity: 0;
		transform: translateY(-46px) scale(1);
	}
}
@keyframes bob {
	50% {
		transform: translateY(-7px);
	}
}

.nameplate {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
}
/* Stone letters with a carved depth, like the game's logo */
.name {
	margin: 0;
	padding: 0 24px;
	background: linear-gradient(var(--c-ffffff-a20), var(--c-ffffff-a0) 55%, var(--c-000000-a12)), var(--grey-9a) url(stone.png) 0 0 / 192px 60px;
	image-rendering: pixelated;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	font-family: var(--font-title);
	font-size: min(var(--name), 15vw);
	font-weight: 400;
	letter-spacing: 0.06em;
	line-height: 1.1;
	text-shadow: none;
	filter: drop-shadow(0 2px 0 var(--c-2a292b)) drop-shadow(0 2px 0 var(--c-2a292b)) drop-shadow(0 2px 0 var(--c-2a292b)) drop-shadow(0 2px 0 var(--c-2a292b)) drop-shadow(0 10px 12px var(--c-000000-a35));
}
/* Yellow, tilted, pulsing: the title screen's splash. Its centre sits on the name's lower right. */
.splash {
	position: absolute;
	z-index: 2;
	left: calc(100% - 8px);
	top: 80%;
	width: max-content;
	color: var(--yellow);
	font-size: 15px;
	text-shadow: 2px 2px 0 var(--yellow-shadow);
	transform: translate(-50%, -50%) rotate(-18deg);
	animation: splash 0.9s ease-in-out infinite alternate;
	cursor: pointer;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}
.splash.popped {
	animation: splash-pop 0.25s ease-out, splash 0.9s ease-in-out 0.25s infinite alternate;
}
@keyframes splash-pop {
	from {
		transform: translate(-50%, -50%) rotate(-18deg) scale(0.6);
	}
}
.name {
	cursor: pointer;
	user-select: none;
}
@keyframes splash {
	to {
		transform: translate(-50%, -50%) rotate(-18deg) scale(1.1);
	}
}

/* The achievement toast */
.toast {
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr);
	align-items: center;
	gap: 16px;
	margin: var(--gap-toast) auto 0;
	padding: 12px 16px 12px 16px;
	border: 2px solid var(--grey-0a);
	background: var(--grey-21);
	box-shadow: inset 0 0 0 2px var(--grey-55), 0 8px 18px var(--c-000000-a30);
	text-align: left;
	animation: toast 0.6s cubic-bezier(0.2, 0.8, 0.3, 1) 0.3s both;
}
.toast-icon {
	display: block;
	width: 48px;
	height: 48px;
	image-rendering: pixelated;
}
/* The log can be punched. Five cracks, then it pops out as an item. */
.log {
	position: relative;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.log:focus-visible {
	outline: 2px solid var(--grey-fa);
	outline-offset: 2px;
}
.crack {
	position: absolute;
	inset: 0;
	background: url(crack.png) 0 0 / 500% 100%;
	image-rendering: pixelated;
	opacity: 0;
	pointer-events: none;
}
.log.hit {
	animation: punch 0.12s ease-out;
}
@keyframes punch {
	50% {
		transform: scale(0.9) rotate(-4deg);
	}
}
.log.gone .toast-icon {
	visibility: hidden;
}
.toast {
	position: relative;
}
.drop {
	position: absolute;
	left: 26px;
	top: 26px;
	width: 26px;
	height: 26px;
	background: url(log.png) 0 0 / 100% 100%;
	image-rendering: pixelated;
	filter: drop-shadow(0 3px 2px var(--c-000000-a50));
	z-index: 1;
	animation: pop-out 0.55s ease-in both, spin 2.4s linear 0.55s infinite;
	pointer-events: none;
}
@keyframes pop-out {
	from {
		transform: translate(8px, 8px) scale(0.4);
	}
	40% {
		transform: translate(14px, -26px) scale(1);
	}
	to {
		transform: translate(20px, 84px) scale(1);
	}
}
@keyframes spin {
	from {
		transform: translate(20px, 84px) rotateY(0deg) translateY(0);
	}
	50% {
		transform: translate(20px, 84px) rotateY(180deg) translateY(-6px);
	}
	to {
		transform: translate(20px, 84px) rotateY(360deg) translateY(0);
	}
}
.drop.picked {
	animation: picked 0.3s ease-in both;
}
@keyframes picked {
	from {
		transform: translate(20px, 84px);
	}
	to {
		opacity: 0;
		transform: translate(0, -60px) scale(0.3);
	}
}

.toast-title {
	color: var(--yellow);
	font-size: 14px;
	text-shadow: 2px 2px 0 var(--yellow-shadow);
}
.toast-name {
	margin-top: 2px;
	font-size: 17px;
}
.toast-text {
	margin-top: 4px;
	color: var(--muted);
	font-size: 13px;
	text-shadow: 2px 2px 0 var(--grey-2a);
	text-wrap: balance;
}
@keyframes toast {
	from {
		opacity: 0;
		transform: translateY(-18px);
	}
}

/* ---------- Buttons ---------- */

.buttons {
	display: grid;
	gap: var(--btn-gap);
	margin: var(--gap-btns) 0 0;
	padding: 0;
	list-style: none;
}
.buttons > li {
	animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.3, 1) both;
	animation-delay: calc(0.45s + var(--i, 0) * 0.07s);
}
@keyframes rise {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
}

.btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: var(--btn-h);
	padding: 8px 16px 8px;
	border: 2px solid var(--grey-0a);
	background: linear-gradient(var(--c-000000-a28), var(--c-000000-a28)), var(--grey-77) url(stone.png) 0 0 / 192px 60px;
	image-rendering: pixelated;
	box-shadow: inset 2px 2px 0 var(--grey-b0), inset -2px -4px 0 var(--grey-4a);
	color: var(--grey-f2);
	font-size: var(--btn-font);
	line-height: 1.2;
	text-decoration: none;
	text-shadow: 2px 2px 0 var(--grey-38);
	cursor: pointer;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}
.btn .icon {
	width: 22px;
	height: 22px;
	flex: none;
	fill: currentColor;
	filter: drop-shadow(2px 2px 0 var(--grey-38));
}
/* Hover: the game's blue-tinted button with a white frame and yellow label */
.btn:hover,
.btn:focus-visible {
	background: linear-gradient(var(--c-7882ff-a32), var(--c-7882ff-a32)), var(--grey-77) url(stone.png) 0 0 / 192px 60px;
	border-color: var(--grey-fa);
	color: var(--hover-text);
	text-shadow: 2px 2px 0 var(--c-3f3f28);
	outline: none;
}
.btn:hover .icon,
.btn:focus-visible .icon {
	filter: drop-shadow(2px 2px 0 var(--c-3f3f28));
}
.btn:active {
	box-shadow: inset 2px 4px 0 var(--grey-4a), inset -2px -2px 0 var(--grey-b0);
	padding-top: 8px;
	padding-bottom: 8px;
}
/* pixel glyphs: 12 pixels drawn at 2 screen pixels each */
.btn .icon.pix {
	width: 24px;
	height: 24px;
}
/* two half-width buttons on the last row, like the title screen's Options and Quit */
.pair {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: var(--btn-gap);
}
.pair .btn {
	padding-left: 8px;
	padding-right: 8px;
}

/* ---------- The sticker chest ---------- */

.chest {
	width: 24px;
	height: 24px;
	flex: none;
	background: url(chest.png) 0 0 / 100% 100%;
	image-rendering: pixelated;
	filter: drop-shadow(2px 2px 0 var(--c-000000-a45));
}
.chest-gui {
	max-width: none;
	max-height: none;
	padding: 0;
	border: 0;
	background: none;
	overflow: visible;
}
.chest-gui::backdrop {
	background: linear-gradient(var(--c-101010-a72), var(--c-101010-a82));
}
.gui {
	/* one slot is 18 game pixels; at 2x that is 36 screen pixels, smaller on narrow phones */
	--slot: min(36px, calc((100vw - 60px) / 9));
	padding: 8px 12px 16px;
	border: 2px solid var(--grey-0a);
	background: var(--grey-c6);
	box-shadow: inset 3px 3px 0 var(--grey-fa), inset -3px -3px 0 var(--grey-55);
	color: var(--grey-40);
	text-shadow: none;
	animation: gui-in 0.14s ease-out both;
	outline: none;
}
@keyframes gui-in {
	from {
		opacity: 0;
		transform: scale(0.94);
	}
}
.gui-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.gui-label {
	margin: 0 0 8px 2px;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.4;
}
.gui > .gui-label {
	margin-top: 12px;
}
.gui-close {
	position: relative;
	width: 26px;
	height: 26px;
	margin: -4px -4px 4px 0;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}
/* a pixel X */
.gui-close::before,
.gui-close::after {
	content: "";
	position: absolute;
	left: 4px;
	right: 4px;
	top: 11px;
	height: 4px;
	background: var(--grey-40);
	transform: rotate(45deg);
}
.gui-close::after {
	transform: rotate(-45deg);
}
.gui-close:hover::before,
.gui-close:hover::after,
.gui-close:focus-visible::before,
.gui-close:focus-visible::after {
	background: var(--grey-0a);
}
.slots {
	display: grid;
	grid-template-columns: repeat(9, var(--slot));
	grid-auto-rows: var(--slot);
	width: calc(var(--slot) * 9);
	/* every slot: dark top-left edge, white bottom-right edge, mid-grey well */
	background:
		linear-gradient(to bottom, var(--grey-37) 0 2px, transparent 2px) 0 0 / var(--slot) var(--slot),
		linear-gradient(to right, var(--grey-37) 0 2px, transparent 2px) 0 0 / var(--slot) var(--slot),
		linear-gradient(to top, var(--grey-fa) 0 2px, transparent 2px) 0 0 / var(--slot) var(--slot),
		linear-gradient(to left, var(--grey-fa) 0 2px, transparent 2px) 0 0 / var(--slot) var(--slot),
		var(--grey-8b);
}
.chest-slots {
	grid-template-rows: repeat(3, var(--slot));
}
.item {
	display: block;
	margin: 2px;
	background: url(items.png) calc(var(--item, 0) * 50%) 0 / 300% 100%;
	image-rendering: pixelated;
	outline: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.hotbar .item {
	background-image: url(icons.png);
	background-position: calc(var(--icon, 0) * 12.5%) 0;
	background-size: 900% 100%;
	cursor: default;
}
/* the game lightens the slot under the pointer */
.item:hover,
.item:focus-visible,
.item.selected {
	box-shadow: inset 0 0 0 40px var(--c-ffffff-a40);
}
.item.got {
	animation: got 0.3s ease-out;
}
@keyframes got {
	from {
		transform: scale(1.5);
	}
}
/* Item tooltips: near-black with a purple edge */
.tip {
	position: fixed;
	z-index: 2;
	padding: 4px 8px 8px;
	border: 2px solid;
	border-image: linear-gradient(var(--c-5000ff), var(--c-28007f)) 1;
	outline: 2px solid var(--c-100010-a94);
	background: var(--c-100010-a94);
	color: var(--grey-fa);
	font-size: 15px;
	line-height: 1.35;
	text-align: left;
	text-shadow: 2px 2px 0 var(--grey-3f);
	white-space: nowrap;
	pointer-events: none;
}
.tip .lore {
	color: var(--grey-a8);
	font-size: 13px;
	text-shadow: 2px 2px 0 var(--grey-2a);
}
.tip .hint {
	color: var(--c-8f8fff);
	font-size: 13px;
	text-shadow: 2px 2px 0 var(--c-23234a);
}

button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ---------- The Game Menu and achievements ---------- */

.corner {
	position: fixed;
	z-index: 5;
	top: 12px;
	right: 12px;
	width: 46px;
	min-height: 46px;
	padding: 0;
}
.corner:active {
	padding: 0;
}
/* three pixel bars */
.bars {
	width: 18px;
	height: 14px;
	background: linear-gradient(currentColor 0 0) 0 0 / 100% 2px no-repeat, linear-gradient(currentColor 0 0) 0 6px / 100% 2px no-repeat, linear-gradient(currentColor 0 0) 0 12px / 100% 2px no-repeat;
	filter: drop-shadow(2px 2px 0 var(--grey-38));
}
.ach-icon {
	display: block;
	width: 32px;
	height: 32px;
	background: url(icons.png) calc(var(--icon, 0) * -32px) 0 / 288px 32px;
	image-rendering: pixelated;
}
.toasts {
	position: fixed;
	z-index: 6;
	inset: 68px 12px auto auto;
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	overflow: visible;
	pointer-events: none;
}
.ach-toast {
	display: grid;
	grid-template-columns: 32px auto;
	align-items: center;
	gap: 12px;
	min-width: 260px;
	padding: 8px 16px 8px 12px;
	border: 2px solid var(--grey-0a);
	background: var(--grey-21);
	box-shadow: inset 0 0 0 2px var(--grey-55), 0 8px 18px var(--c-000000-a35);
	text-align: left;
	animation: slide-in 0.4s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
.ach-toast.leaving {
	animation: slide-out 0.4s ease-in both;
}
@keyframes slide-in {
	from {
		transform: translateX(calc(100% + 24px));
	}
}
@keyframes slide-out {
	to {
		transform: translateX(calc(100% + 24px));
	}
}
.world.flash {
	animation: flash 0.5s ease-out;
}
@keyframes flash {
	from {
		opacity: 0.2;
	}
}

.game-menu {
	width: min(100% - 32px, 520px);
	max-height: calc(100% - 32px);
	padding: 0;
	border: 0;
	background: none;
	color: var(--text);
	overflow: auto;
	text-align: center;
	overscroll-behavior: contain;
}
.game-menu::backdrop {
	background: var(--c-000000-a55);
}
.game-menu[open] {
	animation: rise 0.25s ease-out both;
}
.game-menu h2 {
	text-wrap: balance;
	margin: 8px 0 16px;
	font-size: 20px;
	font-weight: 400;
}
.gm-buttons {
	display: grid;
	gap: 8px;
}
.gm-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 8px;
}
.gm-row .btn {
	font-size: 17px;
	padding-left: 8px;
	padding-right: 8px;
}
/* The achievement list sits in a grey inventory panel, one slot per achievement */
.gm-achievements {
	margin-top: 16px;
	padding: 16px;
	border: 2px solid var(--grey-0a);
	background: var(--grey-c6);
	box-shadow: inset 3px 3px 0 var(--grey-fa), inset -3px -3px 0 var(--grey-55);
	color: var(--grey-40);
	text-align: left;
	text-shadow: none;
}
.gm-achievements h3 {
	margin: 0 0 8px;
	font-size: 16px;
	font-weight: 400;
}
.ach-list {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.ach-list li {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr);
	align-items: center;
	gap: 12px;
}
.slot {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	background: var(--grey-8b);
	box-shadow: inset 2px 2px 0 var(--grey-37), inset -2px -2px 0 var(--grey-fa);
}
.ach-name {
	font-size: 15px;
	line-height: 1.2;
}
.ach-desc {
	margin-top: 2px;
	color: var(--grey-5c);
	font-size: 12px;
	line-height: 1.3;
}
.ach-list .locked .ach-icon {
	filter: grayscale(1) brightness(0.55);
	opacity: 0.6;
}
.ach-list .locked .ach-name {
	color: var(--grey-6e);
}

@media (min-width: 1000px) {
	/* on wide screens the bio is a toast in the corner, after the menu, as the game shows them */
	.toast {
		position: fixed;
		left: 24px;
		bottom: 24px;
		width: 420px;
		margin: 0;
	}
}

/* Narrow phones: keep the splash on screen and the achievement title on one line */
@media (max-width: 420px) {
	.splash {
		left: calc(100% - 24px);
		top: 88%;
		font-size: 12px;
	}
	.toast {
		grid-template-columns: 40px minmax(0, 1fr);
		gap: 12px;
		padding: 12px 12px 12px 12px;
	}
	.toast-icon {
		width: 40px;
		height: 40px;
	}
	.toast-title {
		font-size: 12px;
	}
	.toasts {
		left: 12px;
		width: auto;
	}
	.ach-toast {
		min-width: 0;
	}
	.corner {
		top: 10px;
		right: 10px;
	}
}

@media (max-height: 900px) {
	:root {
		--pad: 28px;
		--av: 124px;
		--name: 66px;
		--gap-toast: 30px;
		--gap-btns: 24px;
		--btn-h: 50px;
		--btn-gap: 8px;
	}
}
@media (max-height: 780px) {
	:root {
		--pad: 18px;
		--av: 104px;
		--name: 58px;
		--gap-toast: 24px;
		--gap-btns: 20px;
		--btn-h: 46px;
		--btn-gap: 8px;
		--btn-font: 18px;
	}
	.toast {
		padding: 8px 12px 8px 8px;
	}
}
@media (max-height: 680px) {
	:root {
		--pad: 12px;
		--av: 88px;
		--name: 50px;
		--gap-toast: 18px;
		--gap-btns: 16px;
		--btn-h: 42px;
		--btn-gap: 8px;
		--btn-font: 17px;
	}
	.nameplate {
		margin-top: 4px;
	}
	.toast {
		grid-template-columns: 36px minmax(0, 1fr);
		gap: 8px;
	}
	.toast-icon {
		width: 36px;
		height: 36px;
	}
	.toast-name {
		font-size: 15px;
	}
	.toast-text {
		font-size: 12px;
	}
	.drop {
		left: 18px;
		top: 18px;
	}
}
@media (max-height: 580px) {
	:root {
		--pad: 8px;
		--av: 68px;
		--name: 42px;
		--gap-toast: 14px;
		--gap-btns: 12px;
		--btn-h: 38px;
		--btn-gap: 8px;
		--btn-font: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}
	.splash {
		transform: translate(-50%, -50%) rotate(-18deg);
	}
}
