@font-face {
	font-family: "Erica One";
	src: url("../../fonts/erica-one-1.003/EricaOne-Regular.ttf") format("truetype");
	font-weight: 400;
	font-display: swap;
}
:root {
	--bar: #101218;
	--ink: #f2f3f5;
	--dim: #b9bec8;
	--line: rgba(255, 255, 255, 0.14);
	--focus: #ffd166;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; color: var(--ink); font: 14px/1.4 -apple-system, "Segoe UI", "Noto Sans", Arial, sans-serif; }
body { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; overscroll-behavior: none; }
a { color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
#top { display: flex; align-items: center; gap: 14px; padding: calc(env(safe-area-inset-top, 0px) + 8px) 16px 8px; background: var(--bar); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
#title { display: block; line-height: 0; color: var(--ink); border-radius: 4px; }
#title .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
#title svg { display: block; height: 22px; width: auto; overflow: visible; }
#links { display: flex; gap: 14px; flex-wrap: wrap; margin-left: auto; align-items: center; }
#links a { color: var(--dim); text-decoration: none; font-size: 13px; }
#links a:hover { color: var(--ink); text-decoration: underline; }
#links button { font: inherit; font-size: 13px; color: var(--dim); background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; cursor: pointer; }
#stage-wrap { position: relative; flex: 1 1 auto; min-height: 0; }
#canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
#engine-progress { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: rgba(255, 255, 255, 0.12); }
#engine-progress div { height: 100%; width: 0; background: var(--ink); transition: width 150ms linear; }
#engine-progress[hidden], #failed[hidden], #desktop-only[hidden] { display: none; }
#desktop-only { position: absolute; left: 16px; right: 16px; top: 16px; margin: 0; color: var(--ink); }
#failed { position: absolute; left: 16px; right: 16px; top: 16px; margin: 0; padding: 12px 14px; background: var(--bar); border: 1px solid #ffb4a2; color: #ffb4a2; border-radius: 8px; }
#credits { position: absolute; right: 16px; top: 12px; max-width: 420px; background: var(--bar); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; font-size: 12px; display: none; z-index: 3; }
#credits.open { display: block; }
#credits ul { margin: 6px 0 0; padding-left: 18px; }
@media (max-width: 640px) {
	#links { gap: 10px; margin-left: 0; width: 100%; }
	#credits { left: 16px; right: 16px; max-width: none; }
}
