/* Nullifier Agent Studio. */

/* --- The page: edge to edge, no template title --------------------------- */

html body.nfa-on .wp-site-blocks > main {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	padding: 0 !important;
}

body.nfa-on main .wp-block-post-title {
	display: none;
}

body.nfa-on main > .wp-block-group {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

body.nfa-on .entry-content {
	margin-top: 0 !important;
}

body.nfa-on {
	overflow-x: clip;
}

.nfa {
	--night: #07071a;
	--ink: #eef0ff;
	--muted: rgba(228, 231, 255, 0.68);
	--line: rgba(107, 138, 255, 0.22);
	--blue: #0000fe;
	--lit: #6b8aff;
	font-family: "Outfit", system-ui, sans-serif;
	color: var(--ink);
}

body.nfa-on .nfa {
	width: auto;
	max-width: none !important;
	margin: 0 !important;
	background: var(--night);
}

.nfa *,
.nfa *::before,
.nfa *::after {
	box-sizing: border-box;
}

.nfa canvas {
	image-rendering: pixelated;
	image-rendering: crisp-edges;
}

.nfa .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.nfa-kicker {
	margin: 0 0 0.45rem;
	font-size: 0.72rem;
	letter-spacing: 0.32em;
	text-transform: uppercase;
	color: var(--lit);
}

/* Buttons. */
.nfa .nfa-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45em;
	min-height: 2.75rem;
	padding: 0.65rem 1.2rem;
	border: 1px solid rgba(160, 180, 255, 0.35);
	border-radius: 0;
	background: rgba(255, 255, 255, 0.04);
	color: #fff;
	font: 600 0.9rem/1.1 "Outfit", system-ui, sans-serif;
	letter-spacing: 0.04em;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.nfa .nfa-btn:hover,
.nfa .nfa-btn:focus-visible {
	border-color: var(--lit);
	background: rgba(107, 138, 255, 0.12);
	color: #fff;
}

.nfa .nfa-btn--primary {
	border-color: var(--blue);
	background: var(--blue);
	box-shadow: 0 0 22px rgba(0, 0, 254, 0.45);
}

.nfa .nfa-btn--primary:hover,
.nfa .nfa-btn--primary:focus-visible {
	background: #1d1dff;
	border-color: var(--lit);
}

.nfa .nfa-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	box-shadow: none;
}

.nfa :focus-visible {
	outline: 2px solid var(--lit);
	outline-offset: 2px;
}

/* ==========================================================================
   The shop
   ========================================================================== */

.nfa-shop__view {
	position: relative;
	height: clamp(
		min(26rem, 52svh),
		calc(100svh - var(--nf-header-h, 69px) - var(--wp-admin--admin-bar--height, 0px) - 11rem),
		56.25vw
	);
	overflow: hidden;
	container: nfaview / size;
	background: #0b0a1d;
}

.nfa-shop__ambient {
	position: absolute;
	inset: -8%;
	background-position: center;
	background-size: cover;
	filter: blur(28px) brightness(0.42) saturate(1.3);
	transform: scale(1.08);
}

.nfa-shop__view::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(7, 7, 26, 0.55) 100%),
		linear-gradient(to bottom, transparent 80%, rgba(11, 10, 29, 0.8));
}

.nfa-shop__scene {
	--cell: calc(100cqi / 192);
	--w: min(100cqw, 100cqh * 16 / 9);
	position: absolute;
	bottom: 0;
	left: calc((100cqw - var(--w)) / 2);
	width: var(--w);
	aspect-ratio: 16 / 9;
	container-type: inline-size;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 3.5%, #000 96.5%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 3.5%, #000 96.5%, transparent);
}

/* Narrow screens: a taller crop, on the counter. */
@container nfaview (aspect-ratio < 1.3) {
	/* Cells 40 to 160: your agent, the change room, the counter and the keeper. */
	.nfa-shop__scene {
		--w: calc(100cqw * 1.6);
		left: calc(100cqw * -0.3333);
		-webkit-mask-image: none;
		mask-image: none;
	}

	.nfa-shop__neon {
		left: 58% !important;
	}

	.nfa-shop__open {
		display: none;
	}

	.nfa .nfa-shop__scene .nfa-shop__bubble {
		max-width: 34%;
	}

	/* Only cells 40–160 show here: keep the keeper's bubble inside them. */
	.nfa .nfa-shop__scene .nfa-shop__bubble--keeper {
		left: 61%;
		max-width: 20%;
	}

	.nfa-shop__bubble--keeper::after {
		left: calc(var(--cell) * 30);
	}
}

.nfa-shop__scene > * {
	position: absolute;
	margin: 0;
}

.nfa .nfa-shop__room,
.nfa .nfa-shop__counter {
	inset: 0;
	width: 100%;
	max-width: none;
	height: 100%;
	image-rendering: pixelated;
}

.nfa-shop__rain {
	left: 9.375%;
	top: 12.963%;
	width: 40.625%;
	height: 46.296%;
	background-position: 0 0;
	background-size: calc(var(--cell) * 48) calc(var(--cell) * 72);
	background-repeat: repeat;
	image-rendering: pixelated;
	opacity: 0.55;
	animation: nfa-rain 0.9s steps(18) infinite;
}

@keyframes nfa-rain {
	to {
		background-position: 0 calc(var(--cell) * 72);
	}
}

.nfa-shop__lamp {
	top: 9.6%;
	width: 24%;
	height: 78%;
	transform: translateX(-50%);
	background: radial-gradient(50% 62% at 50% 0%, rgba(255, 214, 140, 0.3), rgba(255, 214, 140, 0.07) 55%, transparent 75%);
	mix-blend-mode: screen;
	pointer-events: none;
	animation: nfa-breathe 5.5s ease-in-out infinite alternate;
}

.nfa-shop__lamp--a {
	left: 69.3%;
}

.nfa-shop__lamp--b {
	left: 82.8%;
	animation-delay: -2.2s;
}

@keyframes nfa-breathe {
	from {
		opacity: 0.75;
	}

	to {
		opacity: 1;
	}
}

.nfa-shop__neon {
	left: 29.7%;
	top: 2.4%;
	transform: translateX(-50%);
	padding: 0.14em 0.45em 0.1em;
	border: calc(var(--cell) * 0.7) solid rgba(160, 180, 255, 0.55);
	border-radius: 0.22em;
	font: 700 calc(var(--cell) * 6)/1 "Outfit", system-ui, sans-serif;
	letter-spacing: 0.16em;
	white-space: nowrap;
	color: #eef1ff;
	text-shadow: 0 0 0.06em #fff, 0 0 0.2em #6b8aff, 0 0 0.5em #0000fe, 0 0 1.1em #0000fe;
	box-shadow: 0 0 0.4em rgba(0, 0, 254, 0.7), 0 0 1.4em rgba(0, 0, 254, 0.45), inset 0 0 0.35em rgba(0, 0, 254, 0.55);
	background: rgba(0, 0, 254, 0.08);
}

.nfa-shop__flicker {
	animation: nfa-flicker 7s steps(1) infinite;
}

@keyframes nfa-flicker {
	0%, 62%, 66%, 70%, 100% {
		opacity: 1;
	}

	63%, 68% {
		opacity: 0.25;
		text-shadow: none;
	}
}

.nfa-shop__open {
	left: 55.2%;
	top: 21%;
	transform: translateX(-50%);
	padding: 0.2em 0.4em 0.14em;
	border: calc(var(--cell) * 0.5) solid rgba(255, 190, 110, 0.6);
	border-radius: 0.2em;
	font: 700 calc(var(--cell) * 2.8)/1 "Outfit", system-ui, sans-serif;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: #ffe2b8;
	text-shadow: 0 0 0.2em #ffb347, 0 0 0.6em #ff8a1f;
	box-shadow: 0 0 0.6em rgba(255, 150, 50, 0.5), inset 0 0 0.3em rgba(255, 150, 50, 0.4);
}

/*
 * People in the shop. One sprite pixel is one cell of the picture. The
 * keeper stands behind the counter (the counter layer is drawn over him);
 * visitors and your own agent stand on the shop floor. studio.js moves them
 * by setting left/top in cells of the 192 × 108 picture.
 *
 * Layers: room < booth back < keeper < counter < curtain < visitor < you.
 * Inside the change room, you go between the booth's back and its curtain.
 */
.nfa .nfa-shop__keeper {
	left: 71.87%;
	top: 48.15%;
	width: 12.5%;
	height: 33.33%;
	max-width: none;
	z-index: 1;
}

.nfa .nfa-shop__counter {
	z-index: 1;
}

/* Only the change room takes clicks in the picture. */
.nfa .nfa-shop__room,
.nfa .nfa-shop__counter,
.nfa-shop__scene > span,
.nfa-shop__scene > p,
.nfa-shop__scene > canvas {
	pointer-events: none;
}

.nfa-shop__visitor,
.nfa-player {
	left: -14%;
	top: 60.2%;
	width: 12.5%;
	height: 33.33%;
	display: none;
	pointer-events: none;
	filter: drop-shadow(0 calc(var(--cell) * 0.8) 0 rgba(0, 0, 0, 0.35));
}

.nfa-shop__visitor {
	z-index: 4;
}

.nfa-player {
	z-index: 5;
}

.nfa-player.is-inside {
	z-index: 2;
	filter: none;
}

.nfa-shop__visitor.is-here,
.nfa-player.is-here {
	display: block;
}

.nfa-shop__visitor canvas,
.nfa-player canvas {
	display: block;
	width: 100%;
	height: 100%;
}

/* The change room: a free-standing booth with a curtain. */
.nfa .nfa-booth {
	position: absolute;
	left: 41.15%;
	top: 44.44%;
	width: 15.625%;
	height: 50%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	cursor: pointer;
	/* No z-index here: the back and the curtain stack separately. */
}

.nfa .nfa-booth:disabled {
	cursor: default;
}

.nfa-booth__back,
.nfa-booth__curtain {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	transition: filter 0.2s ease;
}

.nfa-booth__back {
	z-index: 1;
}

.nfa-booth__curtain {
	z-index: 3;
}

.nfa-booth:not(:disabled):hover .nfa-booth__back,
.nfa-booth:not(:disabled):hover .nfa-booth__curtain,
.nfa-booth:not(:disabled):focus-visible .nfa-booth__back,
.nfa-booth:not(:disabled):focus-visible .nfa-booth__curtain {
	filter: brightness(1.25) drop-shadow(0 0 calc(var(--cell) * 1.2) rgba(107, 138, 255, 0.85));
}

.nfa .nfa-booth:focus-visible {
	outline: none;
}

.nfa-booth__sign {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	z-index: 3;
	display: grid;
	place-items: center;
	height: calc(100% * 5 / 54);
	font: 700 max(8px, calc(var(--cell) * 2.1))/1 "Outfit", system-ui, sans-serif;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	white-space: nowrap;
	color: #dfe5ff;
	text-shadow: 0 0 0.2em #6b8aff, 0 0 0.6em #0000fe;
	pointer-events: none;
	transition: color 0.2s ease, text-shadow 0.2s ease;
}

.nfa-booth:not(:disabled):hover .nfa-booth__sign,
.nfa-booth:not(:disabled):focus-visible .nfa-booth__sign {
	color: #fff;
	text-shadow: 0 0 0.2em #fff, 0 0 0.5em #6b8aff, 0 0 1em #0000fe;
}

/* A bobbing arrow until the first visit. */
.nfa-booth__hint {
	position: absolute;
	left: 50%;
	bottom: calc(100% + var(--cell) * 1.4);
	z-index: 3;
	display: none;
	width: calc(var(--cell) * 3);
	height: calc(var(--cell) * 2);
	transform: translateX(-50%);
	background: #ffd66a;
	clip-path: polygon(0 0, 100% 0, 50% 100%);
	filter: drop-shadow(0 0 4px rgba(255, 214, 106, 0.9));
	pointer-events: none;
}

.nfa-booth.is-hint:not(:disabled) .nfa-booth__hint {
	display: block;
	animation: nfa-hint 0.9s steps(2) infinite;
}

@keyframes nfa-hint {
	50% {
		translate: 0 calc(var(--cell) * -1);
	}
}

/* Stepping out of the change room. */
.nfa-sparkle {
	z-index: 6;
	width: calc(var(--cell) * 26);
	height: calc(var(--cell) * 26);
	transform: translate(-50%, -50%);
	background:
		radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 4%, transparent 5%) 50% 10% / 30% 30% no-repeat,
		radial-gradient(circle, rgba(255, 214, 106, 0.95) 0 4%, transparent 5%) 15% 45% / 30% 30% no-repeat,
		radial-gradient(circle, rgba(107, 138, 255, 0.95) 0 4%, transparent 5%) 85% 40% / 30% 30% no-repeat,
		radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 4%, transparent 5%) 25% 85% / 30% 30% no-repeat,
		radial-gradient(circle, rgba(255, 143, 184, 0.95) 0 4%, transparent 5%) 80% 85% / 30% 30% no-repeat,
		radial-gradient(closest-side, rgba(107, 138, 255, 0.35), transparent);
	pointer-events: none;
	animation: nfa-sparkle 1.1s steps(6) both;
}

@keyframes nfa-sparkle {
	from {
		opacity: 0;
		scale: 0.4;
	}

	30% {
		opacity: 1;
	}

	to {
		opacity: 0;
		scale: 1.25;
	}
}

.nfa .nfa-shop__bubble {
	z-index: 6;
	max-width: min(26%, 19rem);
	padding: 0.55em 0.75em 0.5em;
	background: #f3f4ff;
	color: #0b0a1d;
	font: 600 clamp(11px, calc(var(--cell) * 2.4), 16px)/1.3 "Outfit", system-ui, sans-serif;
	box-shadow:
		0 0 0 calc(var(--cell) * 0.7) #0b0a1d,
		calc(var(--cell) * 0.9) calc(var(--cell) * 0.9) 0 calc(var(--cell) * 0.7) rgba(0, 0, 254, 0.6);
}

.nfa .nfa-shop__bubble[hidden] {
	display: none;
}

.nfa-shop__bubble.is-in {
	animation: nfa-say 0.45s steps(3) both;
}

.nfa-shop__bubble--keeper {
	/* To the right of the notice board (which ends at cell 116), over the keeper. */
	left: 61.5%;
	bottom: 55%;
}

.nfa-shop__bubble--keeper::after,
.nfa-shop__bubble--visitor::after,
.nfa-shop__bubble--player::after {
	content: "";
	position: absolute;
	bottom: calc(var(--cell) * -2);
	width: calc(var(--cell) * 2);
	height: calc(var(--cell) * 2);
	background: #f3f4ff;
	box-shadow: calc(var(--cell) * 0.7) 0 0 #0b0a1d, 0 calc(var(--cell) * 0.7) 0 #0b0a1d;
}

.nfa-shop__bubble--keeper::after {
	/* Points down at the keeper's head (cell 150). */
	left: calc(var(--cell) * 30);
}

.nfa-shop__bubble--visitor {
	left: 49%;
	bottom: 43%;
	background: #fff6e6;
}

.nfa-shop__bubble--player {
	left: 32%;
	bottom: 43%;
	transform: translateX(-50%);
	background: #e6fff4;
}

.nfa-shop__bubble--player.is-in {
	animation-name: nfa-say-c;
}

.nfa-shop__bubble--player::after {
	left: calc(50% - var(--cell));
	background: #e6fff4;
}

@keyframes nfa-say-c {
	from {
		opacity: 0;
		transform: translate(-50%, 20%) scale(0.9);
	}

	to {
		opacity: 1;
		transform: translateX(-50%);
	}
}

.nfa-shop__bubble--visitor::after {
	left: 72%;
	background: #fff6e6;
}

@keyframes nfa-say {
	from {
		opacity: 0;
		transform: translateY(20%) scale(0.9);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.nfa .nfa-shop__who,
.nfa .nfa-player__tag {
	z-index: 6;
	left: 62.5%;
	top: 94%;
	transform: translateX(-50%);
	padding: 0.2em 0.6em;
	border: 1px solid rgba(255, 255, 255, 0.2);
	background: rgba(7, 7, 26, 0.85);
	font: 600 clamp(10px, calc(var(--cell) * 1.9), 13px)/1.2 "Outfit", system-ui, sans-serif;
	letter-spacing: 0.06em;
	white-space: nowrap;
	color: #fff;
}

.nfa .nfa-shop__who[hidden],
.nfa .nfa-player__tag[hidden],
.nfa-player.is-inside ~ .nfa-player__tag {
	display: none;
}

.nfa .nfa-player__tag {
	border-color: rgba(86, 208, 106, 0.7);
}

.nfa-shop__who.is-uncommon,
.nfa-player__tag.is-uncommon { border-color: #2f8f7c; }
.nfa-shop__who.is-rare,
.nfa-player__tag.is-rare { border-color: #0000fe; box-shadow: 0 0 10px rgba(0, 0, 254, 0.6); }
.nfa-shop__who.is-legendary,
.nfa-player__tag.is-legendary { border-color: #e8a91c; box-shadow: 0 0 10px rgba(232, 169, 28, 0.5); }
.nfa-shop__who.is-mythic,
.nfa-player__tag.is-mythic { border-color: #7a2cff; box-shadow: 0 0 12px rgba(122, 44, 255, 0.7); }

/* The shop's sign, under the room. */
.nfa-shop__band {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1.1rem 2rem;
	padding: clamp(1.1rem, 2.4vw, 1.75rem) max(16px, 4vw);
	border-top: 1px solid rgba(107, 138, 255, 0.28);
	background: linear-gradient(#0b0a1d, var(--night));
}

.nfa-shop__band::before {
	content: "";
	position: absolute;
	left: 10%;
	right: 10%;
	top: -1px;
	height: 1px;
	background: linear-gradient(90deg, transparent, #6b8aff, #0000fe, #6b8aff, transparent);
	box-shadow: 0 0 18px 2px rgba(0, 0, 254, 0.7);
}

.nfa .nfa-shop__title {
	margin: 0;
	font-size: clamp(2rem, 4vw, 3.25rem);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.02em;
	color: #fff;
	text-shadow: 0 0 28px rgba(0, 0, 254, 0.55);
}

.nfa .nfa-shop__tagline {
	max-width: 64ch;
	margin: 0.6rem 0 0;
	color: var(--muted);
	line-height: 1.5;
}

.nfa .nfa-shop__go {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0;
}

/* ==========================================================================
   The studio
   ========================================================================== */

.nfa-group {
	margin-top: 1rem;
}

.nfa .nfa-group__title {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0 0 0.55rem;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--lit);
}

.nfa .nfa-group__title::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--line);
}

/* Option tiles: a little picture and a name. */
.nfa-opts {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(4.4rem, 1fr));
	gap: 0.45rem;
}

.nfa-opts--wide {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nfa-opts--bodies {
	grid-template-columns: repeat(auto-fill, minmax(5.2rem, 1fr));
}

.nfa .nfa-opt {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
	min-width: 0;
	margin: 0;
	padding: 0.45rem 0.3rem 0.4rem;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 0;
	background: rgba(255, 255, 255, 0.03);
	color: var(--muted);
	font: 500 0.7rem/1.15 "Outfit", system-ui, sans-serif;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.nfa .nfa-opt canvas {
	display: block;
	height: 3.4rem;
	width: auto;
}

.nfa-opts--heads .nfa-opt canvas {
	height: 2.8rem;
}

.nfa-opts--bodies .nfa-opt canvas {
	height: 4.6rem;
}

.nfa-opts--wide .nfa-opt canvas {
	height: 4.2rem;
}

.nfa .nfa-opt:hover {
	border-color: rgba(107, 138, 255, 0.55);
	background: rgba(107, 138, 255, 0.08);
	color: #fff;
}

.nfa .nfa-opt.is-on {
	border-color: var(--lit);
	background: rgba(0, 0, 254, 0.18);
	color: #fff;
	box-shadow: inset 0 0 0 1px var(--lit), 0 0 14px rgba(0, 0, 254, 0.35);
}

.nfa-opt__label {
	display: block;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Colour swatches. */
.nfa-sws {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.nfa .nfa-sw {
	width: 1.9rem;
	height: 1.9rem;
	margin: 0;
	padding: 0;
	border: 2px solid rgba(255, 255, 255, 0.18);
	border-radius: 50%;
	background: var(--sw);
	cursor: pointer;
	transition: transform 0.15s ease, border-color 0.15s ease;
}

.nfa .nfa-sw:hover {
	transform: scale(1.08);
}

.nfa .nfa-sw.is-on {
	border-color: #fff;
	box-shadow: 0 0 0 2px var(--blue), 0 0 12px rgba(107, 138, 255, 0.7);
}

.nfa-dye {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem 0.9rem;
	min-height: 2.2rem;
	margin-bottom: 0.9rem;
}

.nfa-dye__label {
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--lit);
}

.nfa .nfa-note {
	margin: 0 0 0.8rem;
	padding: 0.55rem 0.7rem;
	border-left: 2px solid var(--lit);
	background: rgba(107, 138, 255, 0.08);
	font-size: 0.8rem;
	color: var(--muted);
}

.nfa-stage__frame {
	position: relative;
	padding: 6px;
	border: 1px solid rgba(107, 138, 255, 0.4);
	background: #04040c;
	box-shadow: 0 0 40px rgba(0, 0, 254, 0.25);
}

.nfa-stage__frame::before,
.nfa-stage__frame::after {
	content: "";
	position: absolute;
	width: 14px;
	height: 14px;
	border: 2px solid var(--lit);
	pointer-events: none;
}

.nfa-stage__frame::before {
	top: -1px;
	left: -1px;
	border-right: 0;
	border-bottom: 0;
}

.nfa-stage__frame::after {
	right: -1px;
	bottom: -1px;
	border-left: 0;
	border-top: 0;
}

.nfa .nfa-stage__canvas {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
}

.nfa-stage__tools {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
}

.nfa .nfa-tool {
	margin: 0;
	padding: 0.45rem 0.85rem;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 0;
	background: rgba(255, 255, 255, 0.03);
	color: var(--muted);
	font: 600 0.78rem/1 "Outfit", system-ui, sans-serif;
	cursor: pointer;
}

.nfa .nfa-tool:hover {
	color: #fff;
	border-color: var(--lit);
}

.nfa-mint {
	display: grid;
	gap: 0.75rem;
	padding: 1rem;
	border: 1px solid var(--line);
	background: rgba(11, 11, 30, 0.72);
}

.nfa-mint[hidden] {
	display: none;
}

.nfa-mint__name {
	display: grid;
	gap: 0.35rem;
}

.nfa-mint__name span {
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--lit);
}

.nfa .nfa-mint__name input {
	width: 100%;
	min-height: 2.75rem;
	padding: 0.55rem 0.8rem;
	border: 1px solid rgba(160, 180, 255, 0.35);
	border-radius: 0;
	background: #05050f;
	color: #fff;
	font: 600 1.05rem/1.2 "Outfit", system-ui, sans-serif;
}

.nfa .nfa-mint__name input:focus {
	border-color: var(--lit);
	outline: none;
	box-shadow: 0 0 0 2px rgba(0, 0, 254, 0.5);
}

.nfa-mint__shop {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-size: 0.85rem;
	color: var(--muted);
}

.nfa-mint__shop input {
	margin-top: 0.2rem;
	accent-color: var(--blue);
}

.nfa .nfa-mint__go {
	width: 100%;
	min-height: 3.1rem;
	font-size: 1rem;
}

.nfa .nfa-mint__go.is-confirm {
	background: #7a2cff;
	border-color: #b58cff;
	box-shadow: 0 0 26px rgba(122, 44, 255, 0.6);
}

.nfa .nfa-mint__status {
	margin: 0;
	font-size: 0.84rem;
	line-height: 1.45;
	color: var(--muted);
}

.nfa .nfa-mint__status:empty {
	display: none;
}

.nfa .nfa-mint__status.is-error {
	color: #ff9aa6;
}

.nfa .nfa-mint__status.is-confirm {
	color: #e0d2ff;
}

.nfa .nfa-link {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--lit);
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}

.nfa-odds {
	font-size: 0.84rem;
	color: var(--muted);
}

.nfa-odds summary {
	cursor: pointer;
	color: #fff;
	font-weight: 600;
}

.nfa-odds p {
	margin: 0.6rem 0 0;
	line-height: 1.5;
}

.nfa .nfa-odds__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0.7rem 0 0;
	padding: 0;
	list-style: none;
}

.nfa-odds__list li {
	padding: 0.25rem 0.6rem;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 99px;
	color: #fff;
}

.nfa-odds__list li span {
	color: var(--muted);
}

.nfa-odds__uncommon { border-color: #2f8f7c !important; }
.nfa-odds__rare { border-color: #0000fe !important; }
.nfa-odds__legendary { border-color: #e8a91c !important; }
.nfa-odds__mythic { border-color: #7a2cff !important; }

/* The reveal. */
.nfa-reveal {
	display: grid;
	gap: 0.8rem;
	justify-items: center;
}

.nfa-reveal[hidden] {
	display: none;
}

.nfa .nfa-reveal__head {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 700;
	color: #fff;
}

.nfa-reveal__card {
	position: relative;
	width: min(100%, 22rem);
}

.nfa-reveal__card.is-arriving {
	animation: nfa-arrive 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes nfa-arrive {
	from {
		opacity: 0;
		transform: translateY(24px) scale(0.92);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.nfa-reveal__card::before {
	content: "";
	position: absolute;
	inset: -30%;
	z-index: -1;
	opacity: 0;
	pointer-events: none;
	background: radial-gradient(closest-side, var(--burst, rgba(200, 205, 220, 0.5)), transparent);
}

.nfa-reveal__card.is-burst::before {
	animation: nfa-burst 1.6s ease-out 0.2s both;
}

.nfa-reveal__card.is-uncommon { --burst: rgba(47, 143, 124, 0.7); }
.nfa-reveal__card.is-rare { --burst: rgba(0, 0, 254, 0.8); }
.nfa-reveal__card.is-legendary { --burst: rgba(255, 212, 94, 0.85); }
.nfa-reveal__card.is-mythic { --burst: rgba(122, 44, 255, 0.95); }

@keyframes nfa-burst {
	0% {
		opacity: 0;
		transform: scale(0.4);
	}

	30% {
		opacity: 1;
	}

	100% {
		opacity: 0.35;
		transform: scale(1);
	}
}

.nfa .nfa-reveal__links {
	display: grid;
	gap: 0.5rem;
	justify-items: center;
	margin: 0;
	text-align: center;
}

.nfa-reveal__hint {
	font-size: 0.8rem;
	color: var(--muted);
}

.nfa-noscript {
	text-align: center;
	color: var(--muted);
}

/* ==========================================================================
   Screens: sign in, build, shop
   ========================================================================== */

.nfa:not([data-screen="loading"]):not([data-screen="gate"]) .nfa-gate,
.nfa:not([data-screen="build"]) .nfa-build,
.nfa:not([data-screen="shop"]) .nfa-cardbay,
.nfa[data-screen="build"] .nfa-shop,
.nfa[data-screen="loading"] .nfa-shop__band,
.nfa[data-screen="gate"] .nfa-shop__band {
	display: none;
}

html.nfa-lock,
html.nfa-lock body {
	overflow: hidden;
}

/* --- Sign in: a panel over the shop ---------------------------------------- */

.nfa-gate {
	position: absolute;
	inset: 0;
	z-index: 8;
	display: grid;
	place-items: center;
	padding: max(16px, 3vw);
	background:
		radial-gradient(60% 70% at 50% 50%, rgba(7, 7, 26, 0.5), rgba(7, 7, 26, 0.82)),
		rgba(7, 7, 26, 0.2);
}

.nfa-gate__box {
	position: relative;
	width: min(100%, 34rem);
	padding: clamp(1.4rem, 3vw, 2.2rem);
	border: 1px solid rgba(107, 138, 255, 0.4);
	background: rgba(8, 8, 24, 0.86);
	text-align: center;
	box-shadow: 0 0 60px rgba(0, 0, 254, 0.3);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.nfa-gate__box::before,
.nfa-gate__box::after,
.nfa-deck-panel::before,
.nfa-deck-panel::after {
	content: "";
	position: absolute;
	width: 16px;
	height: 16px;
	border: 2px solid var(--lit);
	pointer-events: none;
}

.nfa-gate__box::before,
.nfa-deck-panel::before {
	top: -1px;
	left: -1px;
	border-right: 0;
	border-bottom: 0;
}

.nfa-gate__box::after,
.nfa-deck-panel::after {
	right: -1px;
	bottom: -1px;
	border-left: 0;
	border-top: 0;
}

.nfa .nfa-gate__title {
	margin: 0;
	font-size: clamp(1.7rem, 3.4vw, 2.6rem);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.02em;
	color: #fff;
	text-shadow: 0 0 28px rgba(0, 0, 254, 0.55);
}

.nfa .nfa-gate__text {
	margin: 0.8rem auto 0;
	max-width: 44ch;
	color: var(--muted);
	line-height: 1.5;
}

.nfa .nfa-gate__go {
	display: flex;
	justify-content: center;
	margin: 1.2rem 0 0;
}

.nfa .nfa-gate__go:empty {
	display: none;
}

.nfa .nfa-gate__go .nfa-btn {
	min-width: min(100%, 16rem);
	min-height: 3.1rem;
	font-size: 1rem;
}

.nfa .nfa-btn--discord {
	border-color: #5865f2;
	background: #5865f2;
	box-shadow: 0 0 24px rgba(88, 101, 242, 0.55);
}

.nfa .nfa-btn--discord:hover,
.nfa .nfa-btn--discord:focus-visible {
	border-color: #aab2ff;
	background: #4752e0;
}

.nfa .nfa-btn.is-off {
	opacity: 0.6;
	box-shadow: none;
	cursor: default;
}

.nfa .nfa-gate__small {
	margin: 1rem auto 0;
	max-width: 46ch;
	font-size: 0.76rem;
	line-height: 1.45;
	color: rgba(228, 231, 255, 0.5);
}

.nfa[data-screen="loading"] .nfa-gate__small {
	display: none;
}

/* --- The band under the shop ------------------------------------------------ */

.nfa .nfa-preview {
	margin: 0;
	padding: 0.55rem max(16px, 4vw);
	border-bottom: 1px solid rgba(255, 214, 106, 0.35);
	background: rgba(255, 179, 71, 0.1);
	font-size: 0.8rem;
	text-align: center;
	color: #ffe2b8;
}

/* --- Shared: a panel with a decorated heading and round icon tabs ----------- */

.nfa-deck-panel {
	position: relative;
	min-width: 0;
	padding: clamp(1rem, 2vw, 1.4rem);
	border: 1px solid var(--line);
	background: linear-gradient(rgba(14, 14, 36, 0.92), rgba(8, 8, 22, 0.92));
}

.nfa .nfa-deco {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	margin: 0 0 1rem;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: #fff;
}

.nfa-deco::before,
.nfa-deco::after {
	content: "";
	flex: 1;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(160, 180, 255, 0.55));
}

.nfa-deco::after {
	background: linear-gradient(90deg, rgba(160, 180, 255, 0.55), transparent);
}

.nfa-deco span {
	white-space: nowrap;
}

.nfa-icons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.45rem;
	margin-bottom: 0.4rem;
}

.nfa .nfa-icon {
	position: relative;
	display: grid;
	place-items: center;
	width: 2.9rem;
	height: 2.9rem;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.04);
	color: rgba(228, 231, 255, 0.6);
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.nfa .nfa-icon:hover {
	border-color: rgba(107, 138, 255, 0.6);
	color: #fff;
}

.nfa .nfa-icon.is-on {
	border-color: #fff;
	background: rgba(107, 138, 255, 0.2);
	color: #fff;
	box-shadow: 0 0 16px rgba(107, 138, 255, 0.45);
}

.nfa .nfa-icon.has-one::after {
	content: "";
	position: absolute;
	top: 1px;
	right: 1px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--lit);
	box-shadow: 0 0 6px var(--lit);
}

.nfa-scroll {
	min-height: 0;
	overflow: auto;
	padding-right: 0.3rem;
	scrollbar-width: thin;
	scrollbar-color: rgba(107, 138, 255, 0.4) transparent;
}

/* Tiles get corner brackets, like a character select screen. */
.nfa .nfa-opts--bodies .nfa-opt,
.nfa .nfa-opts--heads .nfa-opt {
	background:
		linear-gradient(rgba(160, 180, 255, 0.45) 0 0) top left / 9px 1px no-repeat,
		linear-gradient(rgba(160, 180, 255, 0.45) 0 0) top left / 1px 9px no-repeat,
		linear-gradient(rgba(160, 180, 255, 0.45) 0 0) top right / 9px 1px no-repeat,
		linear-gradient(rgba(160, 180, 255, 0.45) 0 0) top right / 1px 9px no-repeat,
		linear-gradient(rgba(160, 180, 255, 0.45) 0 0) bottom left / 9px 1px no-repeat,
		linear-gradient(rgba(160, 180, 255, 0.45) 0 0) bottom left / 1px 9px no-repeat,
		linear-gradient(rgba(160, 180, 255, 0.45) 0 0) bottom right / 9px 1px no-repeat,
		linear-gradient(rgba(160, 180, 255, 0.45) 0 0) bottom right / 1px 9px no-repeat,
		rgba(20, 22, 44, 0.8);
	border-color: rgba(255, 255, 255, 0.06);
}

.nfa .nfa-opts--bodies .nfa-opt.is-on,
.nfa .nfa-opts--heads .nfa-opt.is-on {
	background-color: rgba(0, 0, 254, 0.2);
}

.nfa .nfa-opt--none canvas {
	opacity: 0.35;
}

.nfa-tools {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.nfa-dye__none {
	font-size: 0.8rem;
	color: var(--muted);
}

/* --- Build ------------------------------------------------------------------ */

.nfa-build {
	scroll-margin-top: calc(var(--nf-header-h, 69px) + 12px);
	padding: clamp(1.5rem, 3.5vw, 3rem) max(16px, 3vw) clamp(2rem, 4vw, 3.5rem);
	background:
		radial-gradient(60% 420px at 50% 0%, rgba(0, 0, 254, 0.18), transparent 70%),
		var(--night);
}

.nfa-build__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: clamp(1rem, 2.5vw, 2rem);
	align-items: start;
	max-width: 1180px;
	margin: 0 auto;
}

.nfa-build__stage {
	position: sticky;
	top: calc(var(--nf-header-h, 69px) + var(--wp-admin--admin-bar--height, 0px) + 1rem);
	display: grid;
	gap: 0.8rem;
}

.nfa .nfa-build__note {
	margin: 0;
	font-size: 0.85rem;
	line-height: 1.5;
	color: var(--muted);
	text-align: center;
}

.nfa-build__panel {
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
}

.nfa-build__panel .nfa-deco {
	margin: 0;
}

.nfa-build__body {
	max-height: min(46svh, 26rem);
}

.nfa-build__body .nfa-group:first-child {
	margin-top: 0.2rem;
}

.nfa-genders {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.6rem;
}

.nfa .nfa-gender {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 3rem;
	margin: 0;
	padding: 0.5rem;
	border: 1px solid rgba(160, 180, 255, 0.3);
	border-radius: 0;
	background: rgba(30, 36, 60, 0.6);
	color: #fff;
	font: 600 0.85rem/1 "Outfit", system-ui, sans-serif;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	cursor: pointer;
}

.nfa .nfa-gender:hover {
	border-color: var(--lit);
}

.nfa .nfa-gender.is-on {
	border-color: #fff;
	background: rgba(64, 76, 110, 0.85);
	box-shadow: 0 0 16px rgba(107, 138, 255, 0.35);
}

.nfa-gender__sym {
	font-size: 1.15rem;
	letter-spacing: 0;
}

.nfa-build__panel .nfa-tools {
	justify-content: center;
}

.nfa .nfa-build__go {
	width: 100%;
	min-height: 3.1rem;
	font-size: 1rem;
}

.nfa .nfa-build__status {
	margin: 0;
	font-size: 0.84rem;
	color: #ff9aa6;
}

.nfa .nfa-build__status:empty {
	display: none;
}

/* --- Your card, under the shop ------------------------------------------------ */

.nfa-cardbay {
	overflow-x: clip;
	scroll-margin-top: calc(var(--nf-header-h, 69px) + 12px);
	padding: clamp(1.75rem, 4vw, 3rem) max(16px, 4vw);
	border-top: 1px solid var(--line);
	background:
		radial-gradient(60% 420px at 50% 0%, rgba(0, 0, 254, 0.14), transparent 70%),
		var(--night);
}

.nfa-cardbay__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(300px, 25rem);
	gap: clamp(1.25rem, 3vw, 2.5rem);
	align-items: start;
	max-width: 1100px;
	margin: 0 auto;
}

.nfa .nfa-cardbay__intro h2 {
	margin: 0;
	font-size: clamp(1.5rem, 2.8vw, 2.2rem);
	font-weight: 700;
	color: #fff;
}

.nfa .nfa-cardbay__intro > p {
	margin: 0.5rem 0 1rem;
	max-width: 56ch;
	line-height: 1.5;
	color: var(--muted);
}

.nfa-cardbay .nfa-reveal {
	grid-column: 2;
	grid-row: 1 / span 2;
}

/* --- The change room ----------------------------------------------------------- */

.nfa-room {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	padding: clamp(0.75rem, 2.5vw, 2rem);
	background: rgba(3, 3, 12, 0.74);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}

.nfa-room[hidden] {
	display: none;
}

.nfa-room__box {
	display: grid;
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
	gap: clamp(0.9rem, 2vw, 1.5rem);
	width: min(1060px, 100%);
	height: min(46rem, calc(100svh - 2rem));
	animation: nfa-room-in 0.35s steps(4) both;
}

@keyframes nfa-room-in {
	from {
		opacity: 0;
		transform: scale(0.96);
	}
}

.nfa-room__mirror {
	display: grid;
	place-items: center;
	min-height: 0;
	border: 1px solid rgba(107, 138, 255, 0.3);
	background: repeating-linear-gradient(90deg, #141428 0 5px, #18183a 5px 6px);
}

.nfa .nfa-room__mirror canvas {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	aspect-ratio: 40 / 46;
	width: 100%;
}

.nfa-room__panel {
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	min-width: 0;
	min-height: 0;
}

.nfa-room__panel .nfa-deco {
	margin: 0;
}

.nfa-room__body {
	flex: 1;
}

.nfa-room__body .nfa-group:first-child {
	margin-top: 0.3rem;
}

.nfa-room__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem;
	padding-top: 0.8rem;
	border-top: 1px solid var(--line);
}

.nfa .nfa-room__done {
	min-width: 10rem;
}

/* --- Tablets and phones ----------------------------------------------------- */

@media (max-width: 900px) {
	.nfa-build__inner,
	.nfa-cardbay__inner {
		grid-template-columns: minmax(0, 1fr);
	}

	.nfa-cardbay .nfa-reveal {
		grid-column: auto;
		grid-row: auto;
	}

	.nfa-build__stage {
		position: sticky;
		z-index: 4;
		padding-bottom: 0.5rem;
		background: var(--night);
		justify-items: center;
	}

	.nfa-build__stage .nfa-stage__frame {
		width: min(100%, 22rem);
	}

	.nfa-build__note {
		display: none;
	}

	.nfa-build__body {
		max-height: none;
		overflow: visible;
	}
}

@media (max-width: 760px) {
	.nfa[data-screen="shop"] .nfa-shop__view {
		height: min(92vw, 68svh);
	}

	.nfa[data-screen="gate"] .nfa-shop__view,
	.nfa[data-screen="loading"] .nfa-shop__view {
		height: max(31rem, 72svh);
	}

	.nfa .nfa-shop__go {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		width: 100%;
	}

	.nfa .nfa-shop__go .nfa-btn--primary {
		grid-column: 1 / -1;
	}

	.nfa-build__stage .nfa-stage__frame {
		width: min(72%, 17rem);
	}

	.nfa-room {
		padding: 0;
		place-items: stretch;
		grid-template-rows: minmax(0, 1fr);
	}

	.nfa-room__box {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto minmax(0, 1fr);
		gap: 0.6rem;
		width: 100%;
		height: auto;
		min-height: 0;
		padding: 0.75rem 16px calc(0.75rem + env(safe-area-inset-bottom));
		border: 0;
	}

	.nfa-room__box::before,
	.nfa-room__box::after {
		display: none;
	}

	.nfa-room__mirror {
		height: min(30svh, 15rem);
	}

	.nfa .nfa-room__mirror canvas {
		width: auto;
		height: 100%;
	}

	.nfa .nfa-icon {
		width: 2.6rem;
		height: 2.6rem;
	}

	.nfa-room__foot {
		padding-top: 0.6rem;
	}

	.nfa .nfa-room__done {
		flex: 1;
	}

	.nfa .nfa-opts--bodies {
		grid-template-columns: repeat(auto-fill, minmax(4.4rem, 1fr));
	}
}

/* ==========================================================================
   Minted agents
   ========================================================================== */

.nfa-minted {
	scroll-margin-top: calc(var(--nf-header-h, 69px) + 12px);
	padding: clamp(2rem, 5vw, 4rem) max(16px, 4vw) clamp(2.5rem, 6vw, 5rem);
	border-top: 1px solid var(--line);
	background:
		radial-gradient(60% 420px at 50% 0%, rgba(0, 0, 254, 0.16), transparent 70%),
		var(--night);
}

.nfa-minted__head {
	max-width: 1500px;
	margin: 0 auto 1.5rem;
}

.nfa .nfa-minted__head h2 {
	margin: 0;
	font-size: clamp(1.6rem, 3vw, 2.4rem);
	font-weight: 700;
	color: #fff;
}

.nfa .nfa-minted__head p,
.nfa .nfa-minted__empty {
	margin: 0.4rem 0 0;
	color: var(--muted);
}

.nfa .nfa-minted__empty {
	max-width: 1500px;
	margin: 0 auto;
}

.nfa-deck {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr));
	gap: clamp(1.25rem, 2.5vw, 2rem);
	max-width: 1500px;
	margin: 0 auto;
}

.nfa .nfa-disclaimer {
	margin: 0;
	padding: 1rem max(16px, 4vw) 1.5rem;
	font-size: 0.75rem;
	text-align: center;
	color: rgba(228, 231, 255, 0.45);
	background: var(--night);
}

/* ==========================================================================
   The card (the same frames as the Midnight City cards)
   ========================================================================== */

.nfa-slot {
	container-type: inline-size;
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	perspective: 900px;
	width: 100%;
}

.nfa-card {
	--frame: linear-gradient(145deg, #c9ced8, #7d828d 45%, #d7dbe3);
	--tone: #cfd3dc;
	--rx: 0deg;
	--ry: 0deg;
	--gx: 50%;
	--gy: 50%;
	--flip: 0deg;
	position: relative;
	aspect-ratio: 63 / 88;
	min-height: 0;
	padding: 3.2cqi;
	border-radius: 4.5cqi;
	background: var(--frame);
	box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.55);
	transform: rotateX(var(--rx)) rotateY(calc(var(--ry) + var(--flip)));
	transform-style: preserve-3d;
	transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
	color: #f2f3f7;
	font-family: "Outfit", system-ui, sans-serif;
	cursor: pointer;
	-webkit-user-select: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.nfa-card--uncommon {
	--frame: linear-gradient(145deg, #b8f0e2, #2f8f7c 45%, #1d5c52 75%, #b8f0e2);
	--tone: #8fe6cf;
}

.nfa-card--rare {
	--frame: linear-gradient(145deg, #6b8aff, #0000fe 40%, #1a1a8a 70%, #6b8aff);
	--tone: #9fb2ff;
}

.nfa-card--legendary {
	--frame: linear-gradient(145deg, #fff4c2, #e8a91c 30%, #8a560c 55%, #ffd45e 80%, #fff4c2);
	--tone: #ffd45e;
}

.nfa-card--mythic {
	--frame: linear-gradient(145deg, #6b8aff, #0000fe 30%, #7a2cff 55%, #ffb347 85%, #6b8aff);
	--tone: #ffc978;
}

.nfa-card.is-live {
	transition: transform 0.08s linear;
}

.nfa-card.is-flipped {
	--flip: 180deg;
}

.nfa-card.is-turning {
	transition: transform 0.65s cubic-bezier(0.3, 0.7, 0.2, 1);
}

.nfa-card__face {
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 3.5cqi 4cqi 3cqi;
	border-radius: 2.8cqi;
	background:
		radial-gradient(120% 60% at 50% 0%, rgba(0, 0, 254, 0.18), transparent 60%),
		#0c0c11;
	overflow: hidden;
}

.nfa-card__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 2cqi;
	min-height: calc(7.2cqi * 1.05 * 2);
}

.nfa .nfa-card .nfa-card__name,
.nfa-card .nfa-card__name {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	font-size: 7.2cqi;
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.01em;
	color: #fff;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	word-break: break-word;
}

.nfa-card__rarity {
	display: inline-flex;
	align-items: center;
	gap: 1.4cqi;
	flex: 0 0 auto;
	margin-top: 1.4cqi;
	font-size: 3.1cqi;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--tone);
}

.nfa-card__gem {
	width: 2.6cqi;
	height: 2.6cqi;
	background: var(--frame);
	transform: rotate(45deg);
	box-shadow: 0 0 2cqi rgba(107, 138, 255, 0.6);
}

.nfa-card--uncommon .nfa-card__gem { box-shadow: 0 0 2cqi rgba(143, 230, 207, 0.55); }
.nfa-card--legendary .nfa-card__gem { box-shadow: 0 0 2cqi rgba(255, 212, 94, 0.75); }

.nfa-card__art {
	position: relative;
	flex: 0 0 auto;
	aspect-ratio: 3 / 2;
	margin: 2.4cqi 0 0;
	border: 0.8cqi solid rgba(255, 255, 255, 0.12);
	border-radius: 1.6cqi;
	overflow: hidden;
	background: #05050f;
}

.nfa .nfa-card__art canvas,
.nfa-card__art canvas {
	display: block;
	width: 100%;
	height: 100%;
	image-rendering: pixelated;
}

.nfa .nfa-card .nfa-card__title,
.nfa-card .nfa-card__title {
	margin: 2.4cqi 0 0;
	padding: 1.2cqi 2.4cqi;
	border-radius: 1cqi;
	background: rgba(255, 255, 255, 0.06);
	font-size: 3.4cqi;
	font-weight: 600;
	letter-spacing: 0.1em;
	line-height: 1.25;
	text-transform: uppercase;
	color: var(--tone);
}

.nfa-card .nfa-card__stats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.6cqi 4cqi;
	margin: 2.8cqi 0 0;
}

.nfa-card__stat {
	display: grid;
	gap: 0.7cqi;
}

.nfa-card .nfa-card__stat dt {
	margin: 0;
	font-size: 2.8cqi;
	letter-spacing: 0.16em;
	line-height: 1.1;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.6);
}

.nfa-card .nfa-card__stat dd {
	display: flex;
	align-items: center;
	gap: 1.6cqi;
	margin: 0;
	line-height: 1;
}

.nfa-card__stat b {
	min-width: 4cqi;
	font-size: 3.8cqi;
	font-weight: 800;
	color: #fff;
}

.nfa-card__bar {
	display: inline-flex;
	flex: 1;
	gap: 0.5cqi;
}

.nfa-card__bar i {
	flex: 1;
	height: 1.6cqi;
	background: rgba(255, 255, 255, 0.1);
}

.nfa-card__bar i.on {
	background: var(--frame);
	box-shadow: 0 0 1.2cqi rgba(107, 138, 255, 0.4);
}

.nfa-card__foot {
	display: flex;
	justify-content: space-between;
	margin-top: auto;
	padding-top: 2cqi;
	font-size: 2.6cqi;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.42);
}

.nfa-card__shine {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	opacity: 0;
	mix-blend-mode: screen;
	background:
		radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, 0.28), transparent 45%),
		linear-gradient(115deg, transparent 30%, rgba(107, 138, 255, 0.18) 45%, rgba(255, 179, 71, 0.14) 55%, transparent 70%);
	transition: opacity 0.3s ease;
}

.nfa-card--rare.is-live .nfa-card__shine,
.nfa-card--legendary.is-live .nfa-card__shine,
.nfa-card--mythic.is-live .nfa-card__shine {
	opacity: 1;
}

.nfa-card.is-flipped .nfa-card__shine {
	opacity: 0;
}

.nfa-card--legendary::before,
.nfa-card--mythic::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	padding: 3.2cqi;
	background: linear-gradient(115deg, transparent 35%, rgba(255, 246, 210, 0.55) 48%, transparent 60%) no-repeat;
	background-size: 250% 100%;
	background-position: 150% 0;
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	animation: nfa-legend 5.5s ease-in-out infinite;
}

@keyframes nfa-legend {
	0%, 55% { background-position: 150% 0; }
	100% { background-position: -60% 0; }
}

/* The back. */
.nfa-card__back {
	position: absolute;
	inset: 3.2cqi;
	display: flex;
	flex-direction: column;
	padding: 5cqi 5.5cqi 4cqi;
	border-radius: 2.8cqi;
	overflow: hidden;
	transform: rotateY(180deg);
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	background:
		radial-gradient(90% 55% at 100% 0%, rgba(0, 0, 254, 0.35), transparent 60%),
		radial-gradient(70% 45% at 0% 100%, rgba(107, 138, 255, 0.14), transparent 60%),
		repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4cqi),
		repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4cqi),
		#0b0b12;
	color: #f2f3f7;
}

.nfa-card__back p,
.nfa-card__back h4,
.nfa-card__back ul {
	margin: 0;
}

.nfa-back__top {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-size: 2.8cqi;
	letter-spacing: 0.2em;
	color: rgba(255, 255, 255, 0.55);
}

.nfa-back__mark {
	font-weight: 800;
	letter-spacing: 0.32em;
	color: #fff;
}

.nfa-card__back .nfa-back__class {
	margin-top: 5cqi;
	font-size: 3.2cqi;
	font-weight: 600;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--tone);
}

.nfa-card__back .nfa-back__name {
	margin-top: 1cqi;
	font-size: 7.4cqi;
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -0.02em;
	color: #fff;
}

.nfa-back__block {
	margin-top: 3.6cqi;
	padding-top: 2.6cqi;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.nfa-back__label {
	font-size: 2.7cqi;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.5);
}

.nfa-card__back .nfa-back__ability {
	margin-top: 1.2cqi;
	font-size: 4.6cqi;
	font-weight: 700;
	color: #fff;
}

.nfa-card__back .nfa-back__text {
	margin-top: 1cqi;
	font-size: 3.5cqi;
	line-height: 1.38;
	color: rgba(255, 255, 255, 0.8);
}

.nfa-back__lore {
	font-style: italic;
}

.nfa-card__back .nfa-back__traits {
	display: flex;
	flex-wrap: wrap;
	gap: 1.2cqi;
	margin-top: 3cqi;
	padding: 0;
	list-style: none;
}

.nfa-back__traits li {
	margin: 0;
	padding: 0.7cqi 2cqi;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 99px;
	font-size: 2.6cqi;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.75);
}

.nfa-card__back .nfa-back__foot {
	display: flex;
	justify-content: space-between;
	gap: 2cqi;
	margin-top: auto;
	padding-top: 2.4cqi;
	font-size: 2.4cqi;
	letter-spacing: 0.12em;
	white-space: nowrap;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.42);
}

.nfa-slot__shop {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.85rem;
	color: var(--muted);
}

/* The account tab. */
.nfa-account .nfa-account__lead {
	max-width: 62ch;
	line-height: 1.5;
}

.nfa-account .nfa-deck {
	margin: 1.25rem 0 1.5rem;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
}

@media (prefers-reduced-motion: reduce) {
	.nfa-shop__rain,
	.nfa-shop__lamp,
	.nfa-shop__flicker,
	.nfa-card--legendary::before,
	.nfa-card--mythic::before {
		animation: none;
	}

	.nfa-card,
	.nfa-card.is-live,
	.nfa-card.is-turning {
		transition: none;
	}

	.nfa-card {
		--rx: 0deg !important;
		--ry: 0deg !important;
	}
}

/* Save a card as a JPG. */
.nfa-save {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
}

.nfa-save[hidden] {
	display: none;
}

.nfa .nfa-save .nfa-btn {
	min-height: 2.4rem;
	padding: 0.5rem 0.9rem;
	font-size: 0.82rem;
}

.nfa .nfa-save .nfa-btn:first-child {
	border-color: var(--blue);
	background: var(--blue);
}

/* ==========================================================================
   Rewards, quests and the leaderboard
   ========================================================================== */

.nfa .nfa-opt.is-locked {
	cursor: help;
	color: rgba(228, 231, 255, 0.45);
}

.nfa .nfa-opt.is-locked canvas {
	filter: grayscale(0.85) brightness(0.55);
}

.nfa-padlock {
	position: absolute;
	top: 4px;
	right: 4px;
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 1px 5px 1px 4px;
	border: 1px solid rgba(255, 214, 106, 0.55);
	background: rgba(7, 7, 26, 0.85);
	font: 700 0.62rem/1.2 "Outfit", system-ui, sans-serif;
	color: #ffe2b8;
}

.nfa-padlock__icon {
	position: relative;
	width: 7px;
	height: 6px;
	margin-top: 3px;
	background: #ffd66a;
}

.nfa-padlock__icon::before {
	content: "";
	position: absolute;
	left: 1px;
	bottom: 5px;
	width: 3px;
	height: 3px;
	border: 1px solid #ffd66a;
	border-bottom: 0;
}

.nfa .nfa-sw.is-locked {
	position: relative;
	opacity: 0.45;
	cursor: help;
}

.nfa .nfa-sw.is-locked::after {
	content: "";
	position: absolute;
	right: -3px;
	bottom: -3px;
	width: 9px;
	height: 8px;
	background: #ffd66a;
	box-shadow: 0 0 0 1px #07071a;
}

.nfa .nfa-toast {
	margin: 0;
	padding: 0.6rem 0.8rem;
	border-left: 2px solid #ffd66a;
	background: rgba(255, 214, 106, 0.08);
	font-size: 0.84rem;
	line-height: 1.45;
	color: #ffe9c4;
	display: none;
}

.nfa .nfa-toast.is-in {
	display: block;
}

.nfa-pts {
	display: inline-grid;
	place-items: center;
	min-width: 1.6em;
	padding: 0.1em 0.45em;
	border-radius: 99px;
	background: #ffd66a;
	color: #1a1206;
	font-size: 0.78em;
	font-weight: 700;
}

.nfa .nfa-room__pts {
	margin: -0.3rem 0 0;
	text-align: center;
	font-size: 0.82rem;
	color: var(--muted);
}

/* The notice board on the shop wall. */
.nfa .nfa-noticeboard {
	position: absolute;
	z-index: 1;
	display: block;
	cursor: pointer;
	transition: filter 0.2s ease;
}

.nfa-noticeboard canvas {
	display: block;
	width: 100%;
	height: 100%;
}

.nfa .nfa-noticeboard:hover,
.nfa .nfa-noticeboard:focus-visible {
	filter: brightness(1.25) drop-shadow(0 0 calc(var(--cell) * 1.2) rgba(255, 214, 106, 0.8));
	outline: none;
}

.nfa-noticeboard__pip {
	position: absolute;
	top: -18%;
	left: -22%;
	display: grid;
	place-items: center;
	width: calc(var(--cell) * 4);
	height: calc(var(--cell) * 4);
	border-radius: 50%;
	background: #ffd66a;
	color: #1a1206;
	font: 800 calc(var(--cell) * 3)/1 "Outfit", system-ui, sans-serif;
	box-shadow: 0 0 8px rgba(255, 214, 106, 0.9);
	animation: nfa-hint 0.9s steps(2) infinite;
}

.nfa-noticeboard__pip[hidden] {
	display: none;
}

.nfa[data-screen="loading"] .nfa-noticeboard,
.nfa[data-screen="gate"] .nfa-noticeboard {
	pointer-events: none;
}

/* The quests section. */
.nfa:not([data-screen="shop"]):not([data-screen="gate"]) .nfa-quests {
	display: none;
}

.nfa-quests {
	scroll-margin-top: calc(var(--nf-header-h, 69px) + 12px);
	padding: clamp(1.75rem, 4vw, 3rem) max(16px, 4vw);
	border-top: 1px solid var(--line);
	background:
		radial-gradient(60% 420px at 50% 0%, rgba(255, 179, 71, 0.08), transparent 70%),
		var(--night);
}

.nfa-quests__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
	gap: clamp(1rem, 2.5vw, 2rem);
	align-items: start;
	max-width: 1180px;
	margin: 0 auto;
}

.nfa .nfa-quests__lead {
	margin: -0.3rem 0 1rem;
	text-align: center;
	color: var(--muted);
	font-size: 0.9rem;
}

.nfa-progress {
	margin-bottom: 1rem;
}

.nfa-progress[hidden] {
	display: none;
}

.nfa .nfa-progress__top {
	margin: 0 0 0.4rem;
	font-size: 0.88rem;
	color: var(--muted);
}

.nfa-progress__n {
	font-size: 1.5rem;
	color: #ffd66a;
}

.nfa-progress__bar {
	height: 10px;
	border: 1px solid rgba(255, 214, 106, 0.4);
	background: rgba(255, 255, 255, 0.04);
}

.nfa-progress__bar span {
	display: block;
	height: 100%;
	background: repeating-linear-gradient(90deg, #ffd66a 0 8px, #f2b93a 8px 10px);
	transition: width 0.6s ease;
}

.nfa .nfa-questlist {
	display: grid;
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nfa-quest {
	padding: 0.8rem 0.9rem;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(20, 22, 44, 0.7);
}

.nfa-quest.is-done {
	opacity: 0.6;
}

.nfa-quest__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.8rem;
}

.nfa .nfa-quest__title {
	margin: 0;
	font-size: 0.98rem;
	font-weight: 700;
	color: #fff;
}

.nfa-quest__pts {
	flex: none;
	font-weight: 800;
	color: #ffd66a;
}

.nfa .nfa-quest__text,
.nfa .nfa-quest__note {
	margin: 0.3rem 0 0;
	font-size: 0.84rem;
	line-height: 1.45;
	color: var(--muted);
}

.nfa .nfa-quest__note {
	color: #ff9aa6;
}

.nfa-quest__act {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.45rem;
	margin-top: 0.6rem;
}

.nfa .nfa-quest__act .nfa-btn {
	min-height: 2.3rem;
	padding: 0.4rem 0.9rem;
	font-size: 0.82rem;
}

.nfa .nfa-quest__proof {
	flex: 1 1 14rem;
	min-width: 0;
	min-height: 2.3rem;
	padding: 0.4rem 0.6rem;
	border: 1px solid rgba(160, 180, 255, 0.35);
	border-radius: 0;
	background: #05050f;
	color: #fff;
	font: 500 0.85rem/1.2 "Outfit", system-ui, sans-serif;
}

.nfa-quest__state {
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}

.nfa-quest__state.is-done {
	color: #56d06a;
}

.nfa-quest__state.is-done::before {
	content: "\2713  ";
}

.nfa-quest__state.is-pending {
	color: #ffd66a;
}

.nfa .nfa-quests__toast {
	margin: 0.8rem 0 0;
	font-size: 0.86rem;
	color: #b8f5c2;
}

.nfa .nfa-quests__toast.is-error {
	color: #ff9aa6;
}

.nfa .nfa-quests__toast:empty {
	display: none;
}

/* The leaderboard. */
.nfa .nfa-leaderlist {
	display: grid;
	gap: 0.3rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nfa-leaderrow {
	display: grid;
	grid-template-columns: 1.8rem 2.2rem minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.55rem;
	padding: 0.35rem 0.55rem;
	border: 1px solid rgba(255, 255, 255, 0.06);
	background: rgba(20, 22, 44, 0.6);
}

.nfa-leaderrow canvas {
	width: 2.2rem;
	height: 2.2rem;
	background: #1c1d38;
}

.nfa-leaderrow__rank {
	font-weight: 800;
	text-align: center;
	color: var(--muted);
}

.nfa-leaderrow.is-top1 .nfa-leaderrow__rank { color: #ffd66a; }
.nfa-leaderrow.is-top2 .nfa-leaderrow__rank { color: #d7dbe3; }
.nfa-leaderrow.is-top3 .nfa-leaderrow__rank { color: #d99a5a; }

.nfa-leaderrow.is-me {
	border-color: var(--lit);
	background: rgba(0, 0, 254, 0.18);
}

.nfa-leaderrow__name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 600;
	color: #fff;
}

.nfa-leaderrow__pts {
	font-weight: 700;
	color: #ffd66a;
	font-size: 0.85rem;
}

.nfa-leaderlist__empty {
	color: var(--muted);
	font-size: 0.88rem;
}

.nfa-leader__show {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.9rem;
	font-size: 0.84rem;
	color: var(--muted);
}

.nfa-leader__show[hidden] {
	display: none;
}

.nfa .nfa-leader__note {
	margin: 0.6rem 0 0;
	font-size: 0.75rem;
	color: rgba(228, 231, 255, 0.45);
}

.nfa-reveal__update {
	display: grid;
	gap: 0.5rem;
	justify-items: center;
	max-width: 22rem;
	padding: 0.8rem;
	border: 1px dashed rgba(255, 214, 106, 0.5);
	text-align: center;
	font-size: 0.85rem;
	color: var(--muted);
}

.nfa-reveal__update p {
	margin: 0;
}

@media (max-width: 900px) {
	.nfa-quests__inner {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Dressing the shopkeeper (shop managers). */
.nfa-room:not(.is-keeper) .nfa-icon--keeper {
	display: none;
}

.nfa-room.is-keeper .nfa-room__pts {
	display: none;
}

.nfa .nfa-btn--keeper {
	border-color: rgba(255, 214, 106, 0.55);
	color: #ffe2b8;
}

.nfa .nfa-btn--keeper[hidden] {
	display: none;
}
