/* /pot/live: the weekly draw as it happens (live.ts). The stage holds the
   clock, the chain's last blocks and, at the draw, the block's hash, the
   spinning frame and the math; under it the four slots and the wall of
   muses in the draw. */

.draw-live {
	display: grid;
	gap: 28px;
	max-width: 1080px;
	margin: 0 auto;
	padding: 24px var(--pad) 56px;
}
.draw-live .intro {
	display: grid;
	gap: 10px;
	text-align: center;
	justify-items: center;
}

/* Section heads as /pot sets them: the title snug under its label, the
   line under it. */
.slots-sec h2,
.wall-sec h2 {
	margin: 0;
	font: italic 600 clamp(28px, 6.5vw, 40px) / 1.08 var(--serif);
	letter-spacing: -0.02em;
	text-wrap: balance;
}
.slots-sec h2 em,
.wall-sec h2 em {
	color: var(--gold);
}
.draw-live .sec-line {
	margin: 0;
	max-width: 62ch;
	font-size: 16px;
	line-height: 1.55;
	color: var(--soft);
	text-wrap: pretty;
}
.draw-live .sec-head .label {
	margin: 0;
}

/* The stage. */
.stage {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: grid;
	justify-items: center;
	gap: 14px;
	padding: 36px 16px 28px;
	border-radius: 32px;
	text-align: center;
	background:
		radial-gradient(60% 70% at 50% 40%, rgba(var(--gold-hi-rgb), 0.2), transparent 70%),
		linear-gradient(180deg, var(--card-hi), var(--card));
	box-shadow: inset 0 0 0 1px var(--line);
}
.stage::before {
	content: "";
	position: absolute;
	z-index: -1;
	top: 50%;
	left: 50%;
	width: 160%;
	aspect-ratio: 1;
	translate: -50% -50%;
	pointer-events: none;
	background: repeating-conic-gradient(
		rgba(var(--gold-hi-rgb), 0.07) 0deg 3deg,
		transparent 3deg 15deg
	);
	mask: radial-gradient(closest-side, #000 8%, transparent 60%);
	animation: stage-turn 120s linear infinite;
}
@keyframes stage-turn {
	to {
		rotate: 360deg;
	}
}
.stage .label {
	margin: 0;
}
.clock {
	margin: 0;
	font: 600 clamp(48px, 13vw, 120px) / 1 var(--serif);
	letter-spacing: -0.02em;
	color: var(--gold-hi);
	font-variant-numeric: lining-nums tabular-nums;
	text-shadow: 0 0 40px rgba(var(--gold-hi-rgb), 0.35);
}
.clock.said {
	font-size: clamp(34px, 6vw, 60px);
	line-height: 1.05;
}
.stage-s {
	margin: 0;
	max-width: 36em;
	font-size: 15px;
	color: var(--soft);
}

/* Side by side on a wide screen, so the whole moment fits one screen
   shared in a Space: the words and the math left, the blocks or the
   spinning frame right. */
.stage-copy,
.stage-side {
	display: grid;
	justify-items: center;
	gap: 14px;
	min-width: 0;
}
@media (min-width: 900px) {
	.stage {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
		align-items: center;
		gap: 32px;
		padding: 40px 40px 36px;
		text-align: left;
	}
	.stage-copy {
		justify-items: start;
	}
}
.spin[hidden] {
	display: none;
}

/* The chain's last blocks, newest first. */
.chain {
	display: grid;
	gap: 10px;
	justify-items: center;
	width: 100%;
	margin-top: 8px;
}
.chain[hidden] {
	display: none;
}
.chain-head {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--soft);
}
.chain-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--gold-hi);
	box-shadow: 0 0 10px var(--gold-hi);
	animation: chain-beat 1.2s ease-in-out infinite;
}
@keyframes chain-beat {
	50% {
		opacity: 0.3;
	}
}
.blocks {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	max-width: 100%;
}
.blocks li {
	display: grid;
	gap: 2px;
	padding: 8px 12px;
	border-radius: 12px;
	background: rgba(var(--void-rgb), 0.5);
	box-shadow: inset 0 0 0 1px var(--line);
	font-size: 12px;
	opacity: 0.7;
}
.blocks li:first-child {
	opacity: 1;
	box-shadow:
		inset 0 0 0 1px rgba(var(--gold-hi-rgb), 0.6),
		0 0 24px rgba(var(--gold-hi-rgb), 0.2);
}
.blocks li.fresh {
	animation: block-in 0.5s ease-out;
}
@keyframes block-in {
	from {
		opacity: 0;
		translate: 0 -8px;
	}
}
.blocks b {
	font: 700 14px var(--sans);
	color: var(--bone);
	font-variant-numeric: tabular-nums;
}
.blocks code {
	font: 12px var(--mono);
	color: var(--ash);
}

/* The reveal: the draw block's hash, the spinning frame and the math. */
.reveal {
	display: grid;
	justify-items: center;
	gap: 16px;
	width: 100%;
}
.reveal[hidden] {
	display: none;
}
.drawblock {
	display: grid;
	gap: 6px;
	max-width: 100%;
}
.drawblock code {
	font: 13px / 1.5 var(--mono);
	color: var(--bone);
	overflow-wrap: anywhere;
}
.spin {
	position: relative;
	display: grid;
	justify-items: center;
	gap: 10px;
}
.spin img {
	display: block;
	width: min(300px, 62vw);
	height: auto;
	aspect-ratio: 1;
	border-radius: 28px;
	object-fit: cover;
	background: var(--card-hi);
	box-shadow:
		0 0 0 3px var(--line-hi),
		0 0 50px rgba(var(--gold-rgb), 0.2);
	transition: box-shadow 0.3s ease;
}
.spin.spinning img {
	filter: saturate(0.6) brightness(0.85);
}
.spin.landed img {
	box-shadow:
		0 0 0 4px var(--gold-hi),
		0 0 90px rgba(var(--gold-hi-rgb), 0.6);
	animation: land 0.5s ease-out;
}
@keyframes land {
	from {
		scale: 1.08;
	}
}
.spin b {
	font: 600 26px / 1.1 var(--serif);
	color: var(--bone);
}
.math {
	margin: 0;
	max-width: 40em;
	min-height: 3em;
	font-size: 15px;
	line-height: 1.5;
	color: var(--soft);
	text-wrap: pretty;
}

/* The four slots, 1st first in the page and lit as each is picked. */
.slots-sec,
.wall-sec {
	display: grid;
	gap: 18px;
}
.slots {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}
@media (min-width: 760px) {
	.slots {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}
.slot {
	display: grid;
	gap: 6px;
	align-content: start;
	justify-items: center;
	padding: 18px 14px;
	border-radius: 24px;
	text-align: center;
	background: var(--card);
	box-shadow: inset 0 0 0 1px var(--line);
	transition:
		box-shadow 0.4s ease,
		background 0.4s ease;
}
.slot .label {
	margin: 0;
}
.slot-art {
	display: grid;
	place-items: center;
	width: 100%;
	aspect-ratio: 1;
	border-radius: 18px;
	overflow: hidden;
	background: rgba(var(--void-rgb), 0.5);
	font: 600 44px var(--serif);
	color: var(--dim);
}
.slot-art a,
.slot-art img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.slot-name {
	margin: 0;
	min-height: 1.3em;
	font-size: 14px;
	color: var(--bone);
}
.slot-n {
	margin: 0;
}
.slot-n b {
	font: 700 17px var(--sans);
	color: var(--bone);
	font-variant-numeric: tabular-nums;
}
.slot-usd {
	margin: 0;
	min-height: 1.2em;
	font-size: 13px;
	color: var(--soft);
	font-variant-numeric: tabular-nums;
}
.slot-s {
	margin: 0;
	font-size: 13px;
	color: var(--ash);
}
.slot.won {
	background:
		radial-gradient(80% 90% at 50% 0%, rgba(var(--gold-hi-rgb), 0.16), transparent 70%), var(--card);
	box-shadow:
		inset 0 0 0 1px rgba(var(--gold-hi-rgb), 0.5),
		0 0 40px rgba(var(--gold-hi-rgb), 0.15);
}
.slot.won.p1 {
	box-shadow:
		inset 0 0 0 2px var(--gold-hi),
		0 0 60px rgba(var(--gold-hi-rgb), 0.35);
}
.slot.won .slot-n b {
	color: var(--gold-hi);
}

/* The wall of muses in the draw; a pick wears its place. */
.wall {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
	gap: 6px;
}
.wall li {
	position: relative;
}
.wall a,
.wall img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	border-radius: 10px;
	object-fit: cover;
	background: var(--card-hi);
}
.wall li.picked img {
	box-shadow:
		0 0 0 2px var(--gold-hi),
		0 0 16px rgba(var(--gold-hi-rgb), 0.6);
}
.wall li.picked::after {
	content: attr(data-place);
	position: absolute;
	right: -4px;
	bottom: -6px;
	padding: 1px 5px;
	border-radius: 8px;
	font: 700 10px var(--sans);
	color: var(--void);
	background: var(--gold-hi);
}

.cheer {
	position: fixed;
	inset: 0;
	z-index: 50;
	width: 100%;
	height: 100%;
	pointer-events: none;
}
