/* biome-ignore-all lint/style/noDescendingSpecificity: moved as is from index.html, where the cascade order is deliberate */
/* The "online now" pill, the same in every page's header (and in the home
   page's stats): its look, the skeleton before the first count, the tick
   and +1 when someone arrives, and the pulse on a tap. live.js runs it. */
.now {
	position: relative;
	background: linear-gradient(90deg, rgba(var(--live-rgb), 0.12), rgba(var(--live-rgb), 0.04));
	box-shadow: inset 0 0 0 1px rgba(var(--live-rgb), 0.28);
}
.now b {
	font-weight: 700;
	color: #eafff4;
	font-variant-numeric: tabular-nums;
}
.now b.tick {
	animation: tick-up 0.45s var(--ease);
}
@keyframes tick-up {
	from {
		transform: translateY(60%);
		opacity: 0;
	}
}
.now > span:last-child {
	color: #a8dcc1;
}
.now-dot {
	position: relative;
	flex: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--live);
	box-shadow: 0 0 8px rgba(var(--live-rgb), 0.9);
}
.now-dot::before {
	content: "";
	position: absolute;
	inset: -5px;
	border-radius: 50%;
	background: rgba(var(--live-rgb), 0.35);
	animation: radar 2.4s ease-out infinite;
}
@keyframes radar {
	from {
		transform: scale(0.4);
		opacity: 0.9;
	}
	to {
		transform: scale(1.9);
		opacity: 0;
	}
}
.now-dot::after {
	content: "";
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	border: 1.5px solid #8ff0bf;
	opacity: 0;
}
.now.bump .now-dot::after {
	animation: now-ping 1s cubic-bezier(0, 0, 0.2, 1);
}
@keyframes now-ping {
	from {
		transform: scale(0.6);
		opacity: 1;
	}
	to {
		transform: scale(2.2);
		opacity: 0;
	}
}
.now.bump {
	animation: now-glow 1.2s ease-out;
}
/* Hover glows; a tap sends a pulse out from the dot. */
.now {
	user-select: none;
	-webkit-user-select: none;
	-webkit-touch-callout: none;
	cursor: pointer;
	transition:
		box-shadow 0.35s var(--ease),
		background-color 0.35s;
	-webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
	.now:hover {
		box-shadow:
			inset 0 0 0 1px rgba(143, 240, 191, 0.6),
			0 0 28px rgba(var(--live-rgb), 0.35),
			0 0 60px rgba(var(--live-rgb), 0.12);
	}
}
/* A pill that wasn't showing eases in (live.js adds .arrive). */
.now.arrive {
	animation: now-arrive 0.5s ease-out both;
}
@keyframes now-arrive {
	from {
		opacity: 0;
		transform: scale(0.92);
	}
}
.now.tap {
	animation: now-tap 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes now-tap {
	0% {
		transform: scale(0.97);
	}
	35% {
		transform: scale(1.03);
		box-shadow:
			inset 0 0 0 1px rgba(143, 240, 191, 0.9),
			0 0 0 6px rgba(var(--live-rgb), 0.18),
			0 0 40px rgba(var(--live-rgb), 0.45);
	}
	100% {
		transform: none;
	}
}
.now.tap .now-dot::after {
	animation: now-ping 1s cubic-bezier(0, 0, 0.2, 1);
}
.now-wave {
	position: absolute;
	left: var(--x, 50%);
	top: var(--y, 50%);
	width: 12px;
	height: 12px;
	margin: -6px 0 0 -6px;
	border-radius: 50%;
	border: 2px solid #8ff0bf;
	pointer-events: none;
	animation: now-wave 0.8s ease-out forwards;
}
@keyframes now-wave {
	from {
		transform: scale(0.4);
		opacity: 0.9;
	}
	to {
		transform: scale(9);
		opacity: 0;
	}
}
.now {
	overflow: visible;
}
@keyframes now-glow {
	20% {
		box-shadow:
			inset 0 0 0 1px rgba(143, 240, 191, 0.7),
			0 0 26px rgba(var(--live-rgb), 0.35);
	}
}
.plus-one {
	position: absolute;
	right: 12px;
	top: -4px;
	font: 800 var(--t-xs) var(--sans);
	color: #8ff0bf;
	pointer-events: none;
	animation: plus-up 1.2s ease-out forwards;
}
@keyframes plus-up {
	from {
		opacity: 1;
		transform: translateY(0);
	}
	to {
		opacity: 0;
		transform: translateY(-18px);
	}
}
/* Before the first count: a shimmering bar where the number goes (the
   skeleton fill in site.css, in the pill's green). */
.now.loading {
	cursor: default;
	--skel-lo: rgba(143, 240, 191, 0.12);
	--skel-hi: rgba(143, 240, 191, 0.32);
	--skel-flat: rgba(143, 240, 191, 0.2);
}
/* The placeholder holds "00" in transparent ink, so it is exactly as wide
   and as tall as a real two-digit count and nothing moves when one lands. */
.now.loading b {
	border-radius: 6px;
	color: transparent;
}
.now.loading .now-dot {
	background: #3f8f68;
	box-shadow: none;
}
.now.loading .now-dot::before {
	animation: none;
	opacity: 0;
}
.now b {
	display: inline-block;
	min-width: 2ch;
	text-align: center;
	font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion: reduce) {
	.now-dot::before,
	.now.bump,
	.now.bump .now-dot::after,
	.plus-one {
		animation: none;
	}
}

/* Live moments: one toast at a time, bottom left, above the dock on phones
   (lib/toast.ts; the home page's home/feed.ts and the sales page's
   sales/poll.ts raise them). */
.toasts {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: calc(84px + env(safe-area-inset-bottom));
	z-index: 40;
	pointer-events: none;
	display: flex;
	justify-content: flex-start;
}
.toast-in {
	pointer-events: auto;
	max-width: 420px;
	text-decoration: none;
	opacity: 0;
	transform: translateY(12px);
	transition:
		opacity 0.35s,
		transform 0.35s var(--ease);
}
.toast-in.on {
	opacity: 1;
	transform: none;
}
.toast {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	padding: 6px 16px 6px 8px;
	border-radius: var(--r-pill);
	background: rgba(18, 14, 9, 0.94);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	box-shadow:
		0 0 0 1px rgba(var(--gold-rgb), 0.35),
		0 12px 30px rgba(0, 0, 0, 0.55);
	color: var(--bone);
	font-size: var(--t-ui);
	white-space: nowrap;
}
.toast-live {
	flex: none;
	width: 8px;
	height: 8px;
	margin-left: 6px;
	border-radius: 50%;
	background: var(--live);
	box-shadow: 0 0 0 3px rgba(var(--live-rgb), 0.18);
	animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink {
	50% {
		opacity: 0.35;
	}
}
.toast-av {
	flex: none;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	overflow: hidden;
	box-shadow: 0 0 0 1.5px rgba(var(--gold-rgb), 0.5);
}
.toast-av img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.toast-text {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}
.toast-text b {
	font-weight: 700;
}
/* Each kind of moment has its own light: gold for a claim, sky for the
   bell, violet for a blessing, ember for a burn. The ring, the live dot and one gradient word
   carry it. */
.toast {
	--k1: var(--gold-hi);
	--k2: var(--gold);
	--kr: var(--gold-rgb);
}
.toast.rang {
	--k1: #bfe6ff;
	--k2: var(--bell);
	--kr: 111, 184, 238;
}
.toast.blessed {
	--k1: #e2d4ff;
	--k2: var(--bless);
	--kr: 169, 139, 240;
}
.toast.burned {
	--k1: #ffd2c2;
	--k2: var(--burn);
	--kr: 255, 122, 82;
}
.toast {
	box-shadow:
		0 0 0 1px rgba(var(--kr), 0.5),
		0 0 24px rgba(var(--kr), 0.18),
		0 12px 30px rgba(0, 0, 0, 0.55);
	background: linear-gradient(90deg, rgba(var(--kr), 0.14), rgba(18, 14, 9, 0.94) 45%);
}
.toast .toast-live {
	background: var(--k2);
	box-shadow:
		0 0 0 3px rgba(var(--kr), 0.22),
		0 0 10px var(--k2);
}
.toast .toast-av {
	box-shadow: 0 0 0 1.5px var(--k2);
}
.toast-text em {
	font-style: normal;
	font-weight: 800;
	background: linear-gradient(90deg, var(--k1), var(--k2));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.toast time {
	flex: none;
	font-size: var(--t-xs);
	color: var(--dim);
	font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion: reduce) {
	.toast-live {
		animation: none;
	}
}
@media (min-width: 760px) {
	.toasts {
		left: 24px;
		bottom: 24px;
	}
}

.mg-engine {
	color: #ff8a5c;
	text-shadow: none;
}
@supports (-webkit-background-clip: text) or (background-clip: text) {
	.mg-engine {
		background:
			linear-gradient(100deg, #ff5a3a 0%, #ff8a4c 25%, #ffc27a 50%, #ff8a4c 75%, #ff5a3a 100%) 0 0 /
			200% 100%;
		-webkit-background-clip: text;
		background-clip: text;
		color: transparent;
		-webkit-text-fill-color: transparent;
		animation: mg-engine-glow 7s linear infinite;
	}
}
@keyframes mg-engine-glow {
	to {
		background-position: -200% 0;
	}
}
@media (prefers-reduced-motion: reduce) {
	.mg-engine {
		animation: none;
	}
}

/* Numbers that roll (lib/odometer.ts, mgOdometer): the real text holds the width, under
   a layer of digit wheels. */
.odo {
	font-variant-numeric: lining-nums tabular-nums;
}
.odo {
	position: relative;
	display: inline-block;
	white-space: nowrap;
	font-kerning: none;
	line-height: var(--lh, 1.2);
}
.odo > .odo-t {
	color: transparent;
}
.odo-w {
	position: absolute;
	left: 0;
	top: 0;
	display: flex;
	align-items: flex-start;
	pointer-events: none;
	user-select: none;
	opacity: 0;
}
.odo-w.on {
	opacity: 1;
	transition: opacity 0.3s;
}
.odo-c {
	display: block;
	height: calc(var(--lh, 1.2) * 1em);
	overflow: hidden;
	-webkit-mask: linear-gradient(transparent, #000 0.12em, #000 calc(100% - 0.12em), transparent);
	mask: linear-gradient(transparent, #000 0.12em, #000 calc(100% - 0.12em), transparent);
}
.odo-s {
	display: block;
	white-space: pre;
	will-change: transform;
}
.odo-x {
	display: block;
	white-space: pre;
}

/* Every popup (lib/modal.ts, mgModal): a <dialog class="mg-dlg"> with one .mg-panel.
   A panel over a dimmed page; on phones a bottom sheet that rises from the
   bottom edge, scrolls inside itself, keeps clear of the home indicator and
   shows a grab bar. A page styles what is inside its own panels. */
html.locked {
	overflow: hidden;
	/* A reserved scrollbar gutter (the Altar keeps one) would leave an empty
	   strip down the right edge beside a full-width sheet while the page is
	   locked, so the gutter goes with the scrollbar. */
	scrollbar-gutter: auto;
}
.mg-dlg {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
	border: 0;
	background: transparent;
	color: var(--bone);
	overflow-y: auto;
	overscroll-behavior: contain;
}
.mg-dlg[open] {
	display: grid;
	place-items: center;
}
.mg-dlg::backdrop {
	background: rgba(var(--void-rgb), 0.84);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}
.mg-dlg.closing::backdrop {
	opacity: 0;
	transition: opacity 0.22s;
}
.mg-panel {
	position: relative;
	background: var(--card);
	border: 1px solid var(--line-hi);
	border-radius: var(--r-xl);
	box-shadow:
		var(--e-2),
		0 40px 90px rgba(var(--void-rgb), 0.7),
		0 0 120px rgba(var(--gold-rgb), 0.06);
}
/* The panel takes focus on open, so no button starts out ringed. */
.mg-dlg:focus,
.mg-panel:focus {
	outline: none;
}
.mg-dlg[open] .mg-panel {
	animation: mg-rise 0.5s var(--ease);
}
.mg-dlg.closing .mg-panel {
	animation: mg-sink 0.22s ease-in forwards;
}
.mg-close {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 1;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--soft);
	cursor: pointer;
	transition:
		color 0.3s,
		background-color 0.3s;
}
.mg-close:hover {
	color: var(--bone);
	background: var(--card-hi);
}
.mg-close .i {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}
@keyframes mg-rise {
	from {
		opacity: 0;
		transform: translateY(14px) scale(0.98);
	}
}
@keyframes mg-sink {
	to {
		opacity: 0;
		transform: translateY(10px) scale(0.98);
	}
}
@media (max-width: 640px) {
	.mg-dlg {
		padding: max(24px, env(safe-area-inset-top)) 0 0;
		overflow: hidden;
	}
	/* Pinned to the bottom edge outright, not placed by the grid, so the very
	   first frame is already at the bottom and the sheet only ever slides up. */
	.mg-dlg[open] {
		display: block;
	}
	.mg-panel {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		max-height: calc(100% - max(24px, env(safe-area-inset-top)));
		overflow-y: auto;
		overscroll-behavior: contain;
		border-width: 1px 0 0;
		border-radius: var(--r-xl) var(--r-xl) 0 0;
		transition: transform 0.25s var(--ease);
	}
	.mg-panel::before {
		content: "";
		position: absolute;
		top: 10px;
		left: 50%;
		width: 40px;
		height: 5px;
		margin-left: -20px;
		border-radius: 3px;
		background: rgba(var(--bone-rgb), 0.28);
	}
	.mg-dlg[open] .mg-panel {
		animation: mg-sheet-up 0.38s var(--ease);
	}
	.mg-dlg.closing .mg-panel {
		animation: mg-sheet-down 0.24s ease-in forwards;
	}
	.mg-close {
		top: 12px;
	}
}
@keyframes mg-sheet-up {
	from {
		transform: translateY(100%);
	}
}
@keyframes mg-sheet-down {
	to {
		transform: translateY(100%);
	}
}
@media (prefers-reduced-motion: reduce) {
	.mg-dlg[open] .mg-panel,
	.mg-dlg.closing .mg-panel {
		animation: none;
	}
}

/* The sign sheet (lib/sign-sheet.ts) inside .mg-panel: what the signature
   does, the exact line in a mono box, the wallet that signs and whether it
   holds the muse, the three steps, the gold button and the status line. */
.ss-panel {
	width: min(100%, 480px);
	padding: 28px 20px 20px;
	display: grid;
	gap: 12px;
}
:where(.ss-panel) > * {
	margin: 0;
}
.ss-title {
	padding-right: 40px;
	font: 700 var(--t-lead) / 1.3 var(--sans);
	color: var(--bone);
}
.ss-does {
	font-size: var(--t-note);
	line-height: 1.5;
	color: var(--soft);
}
.ss-line {
	display: grid;
	gap: 8px;
}
.ss-text {
	margin: 0;
	max-height: 132px;
	overflow: auto;
	padding: 12px;
	font: 400 var(--t-xs) / 1.55 var(--mono);
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	color: var(--bone);
	background: rgba(var(--void-rgb), 0.5);
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
}
.ss-text.empty {
	color: var(--dim);
}
.ss-fine {
	font-size: var(--t-xs);
	line-height: 1.45;
	color: var(--dim);
}
.ss-wallet {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	padding: 12px;
	font-size: var(--t-ui);
	color: var(--soft);
	background: var(--card-hi);
	border: 1px solid var(--line);
	border-radius: var(--r-md);
}
.ss-wallet.other {
	background: rgba(var(--warn-rgb), 0.08);
	border-color: rgba(var(--warn-rgb), 0.22);
}
.ss-addr {
	font-family: var(--mono);
	color: var(--bone);
}
.ss-holds {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--live);
}
.ss-warn {
	flex-basis: 100%;
	margin: 0;
	line-height: 1.45;
	color: var(--warn);
}
.ss-steps {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}
.ss-steps li {
	padding: 8px 4px;
	text-align: center;
	font-size: var(--t-xs);
	color: var(--dim);
	background: rgba(var(--bone-rgb), 0.04);
	border-radius: var(--r-pill);
	transition:
		color 0.3s,
		background-color 0.3s;
}
.ss-steps li[aria-current] {
	color: var(--bone);
	background: rgba(var(--bone-rgb), 0.08);
}
.ss-steps li.on {
	color: var(--live);
	background: rgba(var(--live-rgb), 0.1);
}
.ss-result {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 12px;
	font-size: var(--t-note);
	line-height: 1.5;
	color: var(--bone);
	background: rgba(var(--live-rgb), 0.1);
	border-radius: var(--r-md);
}
.ss-result .i {
	width: 18px;
	height: 18px;
	margin-top: 2px;
	color: var(--live);
}
.ss-go {
	width: 100%;
}
.ss-status {
	font-size: var(--t-sm);
	line-height: 1.45;
	color: var(--soft);
}
.ss-status:empty {
	display: none;
}
.ss-status[data-kind] {
	padding: 10px 12px;
	border-radius: var(--r-sm);
}
.ss-status[data-kind="ok"] {
	color: var(--live);
	background: rgba(var(--live-rgb), 0.1);
}
.ss-status[data-kind="warn"] {
	color: var(--warn);
	background: rgba(var(--warn-rgb), 0.1);
}
.ss-spin {
	animation: ss-spin 0.9s linear infinite;
}
@keyframes ss-spin {
	to {
		transform: rotate(360deg);
	}
}
@media (max-width: 640px) {
	.ss-panel {
		width: 100%;
		padding: 32px 16px max(20px, calc(env(safe-area-inset-bottom) + 16px));
	}
}
@media (prefers-reduced-motion: reduce) {
	.ss-spin {
		animation: none;
	}
	.ss-steps li {
		transition: none;
	}
}

/* The tiers in their colors (tier in lib/tier.ts, tierHtml in src/muse/tile.ts),
   climbing the way the art does: commons on plain black in muted bone,
   faint stars in champagne, the starfield in silver stardust, the aura
   streams in lavender night, the heavens in rose, and the divine tiers in
   the gold of the halos, wings and Molten Gold, the one of ones gilded like
   their frames. The three divine tiers are small badges: a hairline gradient
   frame, one star and a faint glow. Each tier from Legendary up also has a
   glow (--glow), which a muse tile of that tier wears (site.css .tiles). */
.tier {
	--tg: linear-gradient(100deg, #cfc4ad, var(--dim));
}
.t-common {
	--tg: linear-gradient(100deg, #cfc4ad, var(--dim));
}
.t-uncommon {
	--tg: linear-gradient(100deg, #f1e7cf, #c2b28c);
}
.t-rare {
	--tg: linear-gradient(100deg, #f5f7fc, #a9b4c8);
}
.t-legendary {
	--tg: linear-gradient(100deg, #e6dbff, #9d88d8);
	--glow: rgba(157, 136, 216, 0.32);
}
.t-mythic {
	--tg: linear-gradient(100deg, #ffd9ea, #c9a7f0);
	--glow: rgba(201, 167, 240, 0.4);
}
.t-divine {
	--tg: linear-gradient(100deg, #fff1cf, #e8bc62);
	--glow: rgba(232, 188, 98, 0.35);
}
.t-godhead {
	--tg: linear-gradient(100deg, #fffbea, #ffd77a 45%, #e0a63a 75%, #fff0c0);
	--glow: rgba(255, 215, 122, 0.45);
}
.t-ascended {
	--tg: linear-gradient(100deg, #fff3d4, var(--gold-hi) 40%, #f1b6c4 75%, #fbe3ff);
	--glow: rgba(241, 182, 196, 0.4);
}
.tier,
.tier-b > span,
.tier-b::before {
	background-image: var(--tg);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}
.tier,
.tier-b > span {
	font-weight: 600;
}
.tier-b {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
	padding: 0.12em 0.6em 0.12em 0.5em;
	border: 1px solid transparent;
	border-radius: var(--r-pill);
	background:
		linear-gradient(#120e08, #120e08) padding-box,
		var(--tg) border-box;
	-webkit-text-fill-color: initial;
	box-shadow: 0 0 12px -4px var(--glow, transparent);
	line-height: 1.35;
	white-space: nowrap;
}
.tier-b::before {
	content: "\2726";
	font-size: 0.7em;
}

/* What a blessing dialog puts inside .mg-panel: the kick line, the big italic
   head and the line under it. The claim card is the rewards page's, the
   agent-NFT explainer the home page's. */
.blessing h2 {
	margin: 12px 0 0;
	font-family: var(--serif);
	font-style: italic;
	font-weight: 600;
	font-size: clamp(38px, 10vw, 56px);
	line-height: 1;
	letter-spacing: -0.03em;
}
.btn.ic::after {
	display: none;
}
.bl-panel {
	width: min(100%, 860px);
	padding: 40px 16px 24px;
	display: grid;
	justify-items: center;
	text-align: center;
}
.bl-kick {
	margin: 0;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: var(--t-base);
	font-weight: 600;
	color: var(--gold);
}
.bl-kick .i {
	width: 16px;
	height: 16px;
}
.bl-sub {
	margin: 12px 0 0;
	font-size: var(--t-body);
	line-height: 1.5;
	color: var(--soft);
}
.bl-sub > span {
	--lh: 1.2;
	font-weight: 700;
	color: var(--gold-hi);
}
.bl-panel > .chip {
	position: relative;
	z-index: 1;
	margin-top: 16px;
}
@media (min-width: 760px) {
	.bl-panel {
		padding: 48px 40px 32px;
	}
}
@media (max-width: 640px) {
	.bl-panel {
		padding: 32px 16px max(24px, calc(env(safe-area-inset-bottom) + 16px));
	}
}
