/* /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 {
	font-style: normal;
}
.draw-live .sec-line {
	margin: 0;
	max-width: 62ch;
	font-size: var(--t-base);
	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;
	gap: 14px;
	padding: 36px 16px 28px;
	border-radius: var(--r-xl);
	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;
}
/* The clock holds the countdown's units, the draw block's number or a line
   of words (live.ts sets the class). Each is sized against the column it
   sits in, so the longest of each kind fits: four units the first hours of a
   week, #101,510,951, "the block is in". The figures are Figtree 700, the
   words italic Bodoni. */
.clock {
	margin: 0;
	max-width: 100%;
	font: 700 min(120px, 20cqi) / 1 var(--sans);
	letter-spacing: -0.035em;
	color: var(--bone);
	font-variant-numeric: tabular-nums;
	text-shadow: 0 0 40px rgba(var(--gold-hi-rgb), 0.3);
	text-wrap: balance;
}
/* The countdown: a row of units, each a number with its name under it. The
   numbers grow as the empty units drop away, so the last minute is one huge
   number counting down alone. */
.clock.count {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: center;
	gap: 0 max(18px, 0.4em);
	font-size: min(76px, 17cqi);
}
.clock.u3 {
	font-size: min(104px, 23cqi);
}
.clock.u2 {
	font-size: min(128px, 33cqi);
}
.clock.u1 {
	font-size: min(156px, 44cqi);
}
.clock .unit {
	display: grid;
	justify-items: center;
	gap: 6px;
}
.clock .unit b {
	font-weight: inherit;
	line-height: 1;
}
.clock .unit i {
	font: 600 clamp(9px, 0.14em, 13px) / 1 var(--sans);
	white-space: nowrap;
	font-style: normal;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--soft);
	text-shadow: none;
}
.clock.block {
	font-size: min(96px, 15cqi);
}
.clock.said {
	font: italic 600 min(60px, 28cqi) / 1.05 var(--serif);
	letter-spacing: -0.02em;
}
.stage-s {
	margin: 0;
	max-width: 36em;
	font-size: var(--t-note);
	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;
}
/* Both fill their column: sized to their content, the clock would spill past
   the card. The clock measures itself against this one (cqi). */
.stage-copy {
	container-type: inline-size;
}
@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: var(--t-ui);
	color: var(--soft);
}
.chain-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--live);
	box-shadow: 0 0 10px var(--live);
	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: var(--r-sm);
	background: rgba(var(--void-rgb), 0.5);
	box-shadow: inset 0 0 0 1px var(--line);
	font-size: var(--t-xs);
	opacity: 0.7;
}
.blocks li:first-child {
	opacity: 1;
	box-shadow:
		inset 0 0 0 1px rgba(var(--live-rgb), 0.6),
		0 0 24px rgba(var(--live-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 var(--t-ui) var(--sans);
	color: var(--bone);
	font-variant-numeric: tabular-nums;
}
.blocks code {
	font: var(--t-xs) 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: var(--t-sm) / 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: var(--r-xl);
	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);
}
/* Waiting for the first pick: a muse from the draw under a question mark,
   the same mark the empty places wear. */
.spin img,
.spin-q {
	grid-area: 1 / 1;
}
.spin-q {
	display: none;
	place-items: center;
	/* The dimmed art is a filtered box, which paints over its plain siblings. */
	position: relative;
	z-index: 1;
	font: 600 min(110px, 22vw) / 1 var(--serif);
	color: var(--bone);
	text-shadow: 0 0 30px rgba(var(--void-rgb), 0.9);
}
.spin.waiting .spin-q {
	display: grid;
}
.spin.waiting img {
	filter: saturate(0.2) brightness(0.4);
}
.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 var(--d-2) / 1.1 var(--serif);
	color: var(--bone);
}
.math {
	margin: 0;
	max-width: 40em;
	min-height: 3em;
	font-size: var(--t-note);
	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: var(--r-xl);
	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: var(--r-lg);
	overflow: hidden;
	background: rgba(var(--void-rgb), 0.5);
	font: 600 var(--d-4) 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: var(--t-ui);
	color: var(--bone);
}
.slot-n {
	margin: 0;
}
.slot-n b {
	font: 700 var(--t-body) var(--sans);
	color: var(--bone);
	font-variant-numeric: tabular-nums;
}
.slot-usd {
	margin: 0;
	min-height: 1.2em;
	font-size: var(--t-sm);
	color: var(--soft);
	font-variant-numeric: tabular-nums;
}
.slot-s {
	margin: 0;
	font-size: var(--t-sm);
	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: var(--r-sm);
	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: var(--r-sm);
	font: 700 var(--t-xs) var(--sans);
	color: var(--void);
	background: var(--gold-hi);
}
