/* /windows: the street (windows.html, windows/page.ts). A night scene: sky,
   moon and stars behind, nine buildings in a row you walk along sideways,
   lamps between them and a pavement under. Each building wears its house's
   hue (data-house sets --house) and one of six rooflines (data-roof). A lit
   window holds its scene and throws its light on the brick; a dark one is
   glass with its glazing bars, and some have someone home behind the
   curtain. In the holidays (body.wn-holidays) the roofs carry lights, the
   doors a wreath, and snow falls. Every color is a site token, mixed. */

main.wn {
	max-width: 1240px;
	margin: 0 auto;
	padding: 28px var(--pad) calc(56px + env(safe-area-inset-bottom));
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 22px;
}
main.wn > header {
	display: grid;
	gap: 4px;
}

/* ── The scene ─────────────────────────────────────────── */
.wn-scene {
	--night: color-mix(in srgb, var(--cool) 14%, var(--void));
	--night-hi: color-mix(in srgb, var(--bless) 22%, var(--void));
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: grid;
	border: 1px solid var(--line);
	border-radius: var(--r-xl);
	background:
		radial-gradient(120% 70% at 50% 100%, rgba(var(--gold-rgb), 0.1), transparent 60%),
		linear-gradient(180deg, var(--night-hi) 0%, var(--night) 45%, var(--void) 100%);
	box-shadow: var(--e-2);
}
.wn-sky {
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
}
.wn-stars {
	position: absolute;
	inset: 0 0 40% 0;
	background-image:
		radial-gradient(1.2px 1.2px at 12% 18%, var(--bone) 98%, transparent),
		radial-gradient(1px 1px at 27% 9%, var(--bone) 98%, transparent),
		radial-gradient(1.4px 1.4px at 41% 24%, var(--gold-hi) 98%, transparent),
		radial-gradient(1px 1px at 58% 12%, var(--bone) 98%, transparent),
		radial-gradient(1.2px 1.2px at 69% 30%, var(--bone) 98%, transparent),
		radial-gradient(1px 1px at 83% 7%, var(--cool) 98%, transparent),
		radial-gradient(1.3px 1.3px at 92% 21%, var(--bone) 98%, transparent),
		radial-gradient(1px 1px at 5% 34%, var(--bone) 98%, transparent);
	background-size: 520px 300px;
	opacity: 0.75;
	animation: wn-twinkle 5s ease-in-out infinite alternate;
}
.wn-stars.far {
	background-size: 310px 220px;
	background-position: 140px 60px;
	opacity: 0.35;
	animation-duration: 7s;
}
.wn-moon {
	position: absolute;
	top: 34px;
	right: 9%;
	width: 64px;
	aspect-ratio: 1;
	border-radius: 50%;
	box-shadow:
		inset -14px 6px 0 0 var(--bone),
		0 0 60px 6px rgba(var(--bone-rgb), 0.12);
	transform: rotate(-18deg);
}

/* The house links over the street, and the count */
.wn-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 16px;
	padding: 18px 20px 0;
}
.wn-houses {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.wn-houses a {
	padding: 5px 11px;
	border-radius: var(--r-pill);
	background: rgba(var(--house-rgb), 0.12);
	color: var(--house);
	font: 600 var(--t-xs) / 1.2 var(--sans);
	letter-spacing: 0.02em;
	text-decoration: none;
	transition: background 0.2s var(--ease);
}
.wn-houses a:hover,
.wn-houses a:focus-visible {
	background: rgba(var(--house-rgb), 0.24);
}
.wn-tally {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 12px;
}
.wn-views,
.wn-seen {
	margin: 0;
	color: var(--ash);
	font: 600 var(--t-xs) / 1.2 var(--sans);
	font-variant-numeric: tabular-nums;
}
.wn-count {
	color: var(--gold-hi);
	font: 700 var(--t-sm) / 1 var(--sans);
	font-variant-numeric: tabular-nums;
	text-shadow: 0 0 14px rgba(var(--gold-rgb), 0.5);
}

/* ── The row of buildings ──────────────────────────────── */
.wn-row {
	display: flex;
	align-items: flex-end;
	gap: 0;
	padding: 72px 28px 0;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x proximity;
	scrollbar-width: thin;
	scrollbar-color: rgba(var(--gold-rgb), 0.35) transparent;
}
.wn-row:focus-visible {
	outline-offset: -4px;
}
.wn-bldg {
	--brick: color-mix(in srgb, var(--house) 24%, var(--void));
	--brick-hi: color-mix(in srgb, var(--house) 34%, var(--void));
	--mortar: color-mix(in srgb, var(--house) 12%, var(--void));
	--trim: color-mix(in srgb, var(--house) 58%, var(--card));
	flex: 0 0 auto;
	width: 452px;
	display: grid;
	scroll-snap-align: center;
	filter: drop-shadow(0 -2px 18px rgba(var(--void-rgb), 0.6));
}
.wn-bldg.skel-item {
	height: 520px;
	margin-right: 40px;
}

/* The roof and its sign. Each roofline is the ::before of .wn-top. */
.wn-top {
	position: relative;
	display: grid;
	place-items: end center;
	min-height: 64px;
	padding: 0 0 12px;
}
.wn-top::before {
	content: "";
	position: absolute;
	inset: 0 -4px 0 -4px;
	z-index: -1;
	background: linear-gradient(180deg, var(--brick-hi), var(--brick));
}
.wn-bldg[data-roof="gable"] .wn-top {
	min-height: 96px;
}
.wn-bldg[data-roof="gable"] .wn-top::before {
	clip-path: polygon(50% 0, 100% 72%, 100% 100%, 0 100%, 0 72%);
}
.wn-bldg[data-roof="dome"] .wn-top {
	min-height: 104px;
}
.wn-bldg[data-roof="dome"] .wn-top::before {
	inset: 0 64px 0 64px;
	border-radius: 999px 999px 0 0;
	box-shadow: 0 46px 0 0 var(--brick);
}
.wn-bldg[data-roof="dome"] .wn-top::after {
	content: "";
	position: absolute;
	inset: auto -4px 0 -4px;
	height: 44px;
	z-index: -1;
	background: var(--brick);
}
.wn-bldg[data-roof="step"] .wn-top {
	min-height: 100px;
}
.wn-bldg[data-roof="step"] .wn-top::before {
	clip-path: polygon(
		38% 0,
		62% 0,
		62% 22%,
		74% 22%,
		74% 46%,
		86% 46%,
		86% 70%,
		100% 70%,
		100% 100%,
		0 100%,
		0 70%,
		14% 70%,
		14% 46%,
		26% 46%,
		26% 22%,
		38% 22%
	);
}
.wn-bldg[data-roof="tower"] .wn-top {
	min-height: 112px;
}
.wn-bldg[data-roof="tower"] .wn-top::before {
	clip-path: polygon(
		70% 0,
		86% 0,
		86% 8%,
		90% 8%,
		90% 58%,
		100% 58%,
		100% 100%,
		0 100%,
		0 58%,
		66% 58%,
		66% 8%,
		70% 8%
	);
}
.wn-bldg[data-roof="spire"] .wn-top {
	min-height: 132px;
}
.wn-bldg[data-roof="spire"] .wn-top::before {
	clip-path: polygon(
		50% 0,
		56% 40%,
		66% 40%,
		66% 66%,
		100% 66%,
		100% 100%,
		0 100%,
		0 66%,
		34% 66%,
		34% 40%,
		44% 40%
	);
}
.wn-bldg[data-roof="mansard"] .wn-top {
	min-height: 84px;
}
.wn-bldg[data-roof="mansard"] .wn-top::before {
	clip-path: polygon(10% 0, 90% 0, 100% 62%, 100% 100%, 0 100%, 0 62%);
	background:
		repeating-linear-gradient(90deg, transparent 0 18px, rgba(var(--void-rgb), 0.35) 18px 20px),
		linear-gradient(180deg, var(--trim), var(--brick));
}
.wn-sign {
	position: relative;
	padding: 5px 16px 6px;
	border-radius: var(--r-sm);
	background: rgba(var(--void-rgb), 0.55);
	box-shadow:
		inset 0 0 0 1px rgba(var(--house-rgb), 0.55),
		0 0 24px rgba(var(--house-rgb), 0.25);
	color: var(--house);
	font: 600 22px / 1 var(--serif);
	font-style: italic;
	letter-spacing: 0.02em;
	text-shadow: 0 0 14px rgba(var(--house-rgb), 0.7);
}

/* The face: brick, pilasters at each side, a cornice on top. */
.wn-face {
	position: relative;
	padding: 18px 26px 14px;
	border-top: 6px solid var(--trim);
	background:
		linear-gradient(
			90deg,
			var(--brick-hi) 0 14px,
			transparent 14px calc(100% - 14px),
			var(--brick-hi) calc(100% - 14px)
		),
		repeating-linear-gradient(0deg, var(--mortar) 0 1px, transparent 1px 11px),
		repeating-linear-gradient(90deg, var(--mortar) 0 1px, transparent 1px 24px), var(--brick);
}
.wn-grid {
	display: grid;
	grid-template-columns: repeat(10, minmax(0, 1fr));
	gap: 13px 7px;
}
.wn-grid-skel {
	min-height: 360px;
}

/* A window. The arch, the frame and a sill under it. Behind the glass
   stands its muse (img.ghost), dim and frosted in the house's hue; the
   ::after is the glass itself (glazing bars, frost, curtains). A lit window
   puts its scene (img.scene) over all of it. */
.wn-win {
	--cloth: color-mix(in srgb, var(--house) 62%, var(--card-up));
	--bars: rgba(var(--void-rgb), 0.85);
	position: relative;
	aspect-ratio: 4 / 5;
	padding: 0;
	border: 2px solid var(--trim);
	border-radius: 999px 999px 1px 1px;
	background: linear-gradient(
		180deg,
		color-mix(in srgb, var(--cool) 18%, var(--void)),
		var(--void)
	);
	cursor: pointer;
	transition:
		transform 0.25s var(--ease),
		box-shadow 0.25s var(--ease);
}
.wn-win::before {
	content: "";
	position: absolute;
	z-index: 3;
	left: -5px;
	right: -5px;
	bottom: -6px;
	height: 3px;
	border-radius: 1px;
	background: var(--trim);
}
.wn-win::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	border-radius: inherit;
	pointer-events: none;
	background:
		linear-gradient(
			90deg,
			transparent calc(50% - 1px),
			var(--bars) calc(50% - 1px) calc(50% + 1px),
			transparent calc(50% + 1px)
		),
		linear-gradient(
			0deg,
			transparent calc(42% - 1px),
			var(--bars) calc(42% - 1px) calc(42% + 1px),
			transparent calc(42% + 1px)
		),
		var(--curtain, linear-gradient(transparent, transparent)),
		linear-gradient(160deg, rgba(var(--bone-rgb), 0.16) 0 18%, transparent 34%),
		linear-gradient(
			180deg,
			rgba(var(--house-rgb), 0.16),
			rgba(var(--cool-rgb), 0.1) 60%,
			rgba(var(--void-rgb), 0.35)
		);
}
.wn-win.c-l {
	--curtain: linear-gradient(90deg, var(--cloth) 0 22%, transparent 22%);
}
.wn-win.c-r {
	--curtain: linear-gradient(270deg, var(--cloth) 0 22%, transparent 22%);
}
.wn-win.c-both {
	--curtain: linear-gradient(90deg, var(--cloth) 0 16%, transparent 16% 84%, var(--cloth) 84%);
}
.wn-win.c-half {
	--curtain: linear-gradient(180deg, var(--cloth) 0 30%, transparent 30%);
}
.wn-win img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	border-radius: inherit;
}
.wn-win img.ghost {
	z-index: 1;
	opacity: 0.68;
	filter: blur(1px) saturate(0.6) brightness(0.72);
}
/* Someone home: a lamp on behind the glass, the muse warm in it. */
.wn-win.home {
	background: radial-gradient(
		70% 60% at 50% 70%,
		rgba(var(--gold-rgb), 0.5),
		rgba(var(--burn-rgb), 0.2) 70%,
		var(--void)
	);
	--bars: rgba(var(--void-rgb), 0.7);
}
.wn-win.home img.ghost {
	opacity: 0.85;
	filter: blur(0.8px) sepia(0.45) saturate(1.1) brightness(0.85);
}
.wn-win.flick img.ghost {
	animation: wn-lamp 23s ease-in-out var(--d, 0s) infinite;
}
@keyframes wn-lamp {
	0%,
	55% {
		opacity: 0.85;
	}
	60%,
	92% {
		opacity: 0.35;
	}
	96%,
	100% {
		opacity: 0.85;
	}
}

/* What sits on a sill: a candle, a plant (a little tree in the holidays) or
   a cat, inside the glass at its foot. */
.wn-prop {
	position: absolute;
	z-index: 2;
	bottom: 1px;
	left: 50%;
	pointer-events: none;
}
.wn-prop.candle {
	width: 4px;
	height: 8px;
	margin-left: -2px;
	border-radius: 1px;
	background: var(--bone);
	box-shadow: 0 0 10px 3px rgba(var(--gold-rgb), 0.55);
}
.wn-prop.candle::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 8px;
	width: 4px;
	height: 6px;
	margin-left: -2px;
	border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%;
	background: radial-gradient(circle at 50% 70%, var(--bone), var(--gold-hi) 45%, var(--burn));
	animation: wn-flame 1.4s ease-in-out infinite alternate;
}
.wn-prop.plant {
	width: 12px;
	height: 12px;
	margin-left: -6px;
	background:
		linear-gradient(var(--burn), var(--burn)) 50% 100% / 8px 4px no-repeat,
		radial-gradient(circle at 30% 60%, var(--live) 40%, transparent 42%) 0 0 / 7px 8px no-repeat,
		radial-gradient(circle at 70% 60%, var(--live) 40%, transparent 42%) 5px 0 / 7px 8px no-repeat,
		radial-gradient(
			circle at 50% 50%,
			color-mix(in srgb, var(--live) 70%, var(--void)) 40%,
			transparent 42%
		)
		2px -2px / 8px 8px no-repeat;
	opacity: 0.85;
}
.wn-prop.cat {
	width: 11px;
	height: 10px;
	margin-left: -5px;
	background: var(--void);
	clip-path: polygon(0 100%, 4% 40%, 12% 0, 30% 28%, 70% 28%, 88% 0, 96% 40%, 100% 100%);
}
.wn-holidays .wn-prop.plant {
	width: 12px;
	height: 15px;
	margin-left: -6px;
	background: linear-gradient(
		180deg,
		color-mix(in srgb, var(--live) 80%, var(--void)),
		color-mix(in srgb, var(--live) 50%, var(--void))
	);
	clip-path: polygon(
		50% 0,
		70% 30%,
		62% 30%,
		85% 62%,
		74% 62%,
		100% 92%,
		56% 92%,
		56% 100%,
		44% 100%,
		44% 92%,
		0 92%,
		26% 62%,
		15% 62%,
		38% 30%,
		30% 30%
	);
	filter: drop-shadow(0 0 3px rgba(var(--gold-hi-rgb), 0.6));
	opacity: 1;
}
@keyframes wn-flame {
	from {
		transform: scaleY(1) translateX(0);
	}
	to {
		transform: scaleY(1.2) translateX(0.5px);
	}
}

.wn-win:hover,
.wn-win:focus-visible {
	z-index: 4;
	transform: scale(1.9);
	box-shadow: 0 8px 24px rgba(var(--void-rgb), 0.8);
}
.wn-win:hover img.ghost,
.wn-win:focus-visible img.ghost {
	opacity: 0.8;
	filter: blur(0.4px) saturate(0.8) brightness(0.75);
}
.wn-win img.scene {
	z-index: 2;
}
.wn-win.on {
	border-color: color-mix(in srgb, var(--gold-hi) 75%, var(--house));
	box-shadow:
		0 0 0 1px rgba(var(--gold-hi-rgb), 0.5),
		0 0 14px 2px rgba(var(--gold-rgb), 0.55),
		0 14px 22px -4px rgba(var(--gold-rgb), 0.38);
}
.wn-win.on::after {
	z-index: 3;
	background: linear-gradient(180deg, rgba(var(--gold-hi-rgb), 0.18), transparent 40%);
}
.wn-win.on img.ghost,
.wn-win.on .wn-prop {
	display: none;
}

/* The connected holder's own windows: a ring of light all round, which
   breathes while the window is still dark. */
.wn-win.mine {
	border-color: var(--gold-hi);
	box-shadow:
		0 0 0 2px rgba(var(--gold-hi-rgb), 0.75),
		0 0 16px 4px rgba(var(--gold-rgb), 0.5);
}
.wn-win.mine:not(.on) {
	animation: wn-mine 2.4s ease-in-out infinite;
}
.wn-win.mine:not(.on) img.ghost {
	opacity: 0.8;
	filter: blur(0.6px) saturate(0.9) brightness(0.8);
}
.wn-win.called {
	animation: wn-called 0.8s ease-in-out 3;
}
@keyframes wn-mine {
	50% {
		box-shadow:
			0 0 0 2px rgba(var(--gold-hi-rgb), 0.35),
			0 0 6px 1px rgba(var(--gold-rgb), 0.25);
	}
}
@keyframes wn-called {
	50% {
		transform: scale(2.2);
		box-shadow:
			0 0 0 3px var(--gold-hi),
			0 0 30px 8px rgba(var(--gold-rgb), 0.7);
	}
}

/* The line over the street for a holder: how many of theirs are dark. */
.wn-yours {
	flex: 1 1 100%;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 14px;
	margin: 0;
	padding: 10px 10px 10px 16px;
	border-radius: var(--r-lg);
	background: rgba(var(--gold-rgb), 0.12);
	color: var(--bone);
	font-size: var(--t-ui);
}

/* The ground floor: a door in an arch, with steps. */
.wn-base {
	display: grid;
	place-items: end center;
	height: 74px;
	border-top: 4px solid var(--trim);
	background:
		repeating-linear-gradient(0deg, var(--mortar) 0 1px, transparent 1px 11px), var(--brick-hi);
}
.wn-door {
	position: relative;
	width: 52px;
	height: 62px;
	border: 3px solid var(--trim);
	border-bottom: 0;
	border-radius: 999px 999px 0 0;
	background:
		linear-gradient(90deg, transparent 48%, rgba(var(--void-rgb), 0.8) 48% 52%, transparent 52%),
		linear-gradient(
			180deg,
			rgba(var(--gold-rgb), 0.5),
			rgba(var(--burn-rgb), 0.25) 60%,
			var(--void)
		);
	box-shadow: 0 0 30px 4px rgba(var(--gold-rgb), 0.25);
}

/* A lamp between buildings. */
.wn-lamp {
	flex: 0 0 auto;
	position: relative;
	align-self: flex-end;
	width: 40px;
	height: 150px;
}
.wn-lamp::before {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 4px;
	height: 130px;
	margin-left: -2px;
	border-radius: 2px;
	background: linear-gradient(180deg, var(--ash), var(--card-up));
}
.wn-lamp::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 0;
	width: 16px;
	height: 22px;
	margin-left: -8px;
	border-radius: 6px 6px 3px 3px;
	background: var(--gold-hi);
	box-shadow:
		0 0 18px 6px rgba(var(--gold-hi-rgb), 0.55),
		0 40px 80px 30px rgba(var(--gold-rgb), 0.1);
}

/* The pavement, the slider on it. */
.wn-ground {
	height: 22px;
	background:
		repeating-linear-gradient(90deg, transparent 0 58px, rgba(var(--void-rgb), 0.5) 58px 60px),
		linear-gradient(180deg, var(--card-up), var(--card));
	box-shadow: inset 0 3px 0 rgba(var(--bone-rgb), 0.08);
}
.wn-time {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) minmax(9em, auto);
	align-items: center;
	gap: 14px;
	padding: 16px 20px 18px;
	background: var(--card);
}
.wn-time input {
	width: 100%;
	accent-color: var(--gold);
}
.wn-time output {
	color: var(--bone);
	font: 600 var(--t-ui) / 1.2 var(--sans);
	text-align: right;
}

/* ── The holidays ──────────────────────────────────────── */
.wn-holidays .wn-face::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -2px;
	height: 12px;
	background:
		radial-gradient(circle 3.5px, var(--gold-hi) 96%, transparent) 4px 2px / 44px 12px repeat-x,
		radial-gradient(circle 3.5px, var(--warn) 96%, transparent) 15px 6px / 44px 12px repeat-x,
		radial-gradient(circle 3.5px, var(--live) 96%, transparent) 26px 2px / 44px 12px repeat-x,
		radial-gradient(circle 3.5px, var(--bell) 96%, transparent) 37px 6px / 44px 12px repeat-x;
	filter: drop-shadow(0 0 5px rgba(var(--gold-hi-rgb), 0.8));
	animation: wn-twinkle 1.8s ease-in-out infinite alternate;
}
.wn-holidays .wn-win::before {
	left: 2px;
	right: 2px;
	background: linear-gradient(180deg, rgba(var(--bone-rgb), 0.85), rgba(var(--bone-rgb), 0.45));
	border-radius: 3px 3px 1px 1px;
}
.wn-holidays .wn-top::after {
	content: "";
	position: absolute;
	inset: auto -4px 0;
	height: 5px;
	z-index: 1;
	border-radius: 3px;
	background: var(--bone);
	opacity: 0.9;
}
.wn-holidays .wn-door::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 12px;
	width: 22px;
	height: 22px;
	margin-left: -11px;
	border-radius: 50%;
	border: 5px solid color-mix(in srgb, var(--live) 60%, var(--void));
	box-shadow:
		inset 0 0 0 1px rgba(var(--warn-rgb), 0.8),
		0 0 8px rgba(var(--live-rgb), 0.4);
}
/* A garland swagged under the cornice, and icicles along the ground
   floor's trim. */
.wn-holidays .wn-face::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 4px;
	height: 14px;
	pointer-events: none;
	background:
		radial-gradient(
			circle at 50% 0,
			transparent 10px,
			color-mix(in srgb, var(--live) 55%, var(--void)) 10.5px 14px,
			transparent 14.5px
		)
		0 0 / 30px 14px repeat-x;
	opacity: 0.9;
}
.wn-holidays .wn-base {
	position: relative;
}
.wn-holidays .wn-base::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 9px;
	background:
		linear-gradient(135deg, rgba(var(--bone-rgb), 0.85) 25%, transparent 25%) -5px 0 / 10px 9px
		repeat-x,
		linear-gradient(225deg, rgba(var(--bone-rgb), 0.85) 25%, transparent 25%) -5px 0 / 10px 9px
		repeat-x;
	filter: drop-shadow(0 1px 2px rgba(var(--cool-rgb), 0.5));
}
.wn-holidays .wn-ground {
	background: linear-gradient(
		180deg,
		var(--bone),
		color-mix(in srgb, var(--bone) 55%, var(--card))
	);
	box-shadow: 0 -3px 12px rgba(var(--bone-rgb), 0.18);
}
.wn-snow {
	display: none;
}
.wn-holidays .wn-snow {
	display: block;
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	background-image:
		radial-gradient(2px 2px at 10% 20%, rgba(var(--bone-rgb), 0.9) 98%, transparent),
		radial-gradient(1.5px 1.5px at 30% 60%, rgba(var(--bone-rgb), 0.8) 98%, transparent),
		radial-gradient(2.5px 2.5px at 55% 35%, rgba(var(--bone-rgb), 0.7) 98%, transparent),
		radial-gradient(1.5px 1.5px at 75% 75%, rgba(var(--bone-rgb), 0.85) 98%, transparent),
		radial-gradient(2px 2px at 90% 10%, rgba(var(--bone-rgb), 0.8) 98%, transparent);
	background-size: 240px 240px;
	animation: wn-fall 14s linear infinite;
	opacity: 0.7;
}

@keyframes wn-twinkle {
	from {
		opacity: 0.55;
	}
	to {
		opacity: 1;
	}
}
@keyframes wn-fall {
	from {
		background-position: 0 0;
	}
	to {
		background-position: 60px 240px;
	}
}

/* ── The holder's panel ────────────────────────────────── */
.wn-light {
	display: grid;
	gap: 16px;
	padding: 20px;
}
.wn-steps {
	display: grid;
	gap: 16px;
}
.wn-mine {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.wn-mine button {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 12px 4px 4px;
	border: 1px solid var(--line-hi);
	border-radius: var(--r-pill);
	background: var(--card-hi);
	color: var(--bone);
	font: 600 var(--t-sm) / 1.2 var(--sans);
	cursor: pointer;
}
.wn-mine button img {
	width: 32px;
	height: 32px;
	border-radius: 50%;
}
.wn-mine button.lit {
	box-shadow: 0 0 0 1px rgba(var(--gold-rgb), 0.35);
}
.wn-mine button[aria-pressed="true"] {
	background: rgba(var(--gold-rgb), 0.16);
	border-color: var(--gold);
}
.wn-make {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
}
.wn-make-do {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.wn-make label.btn {
	cursor: pointer;
}
.wn-frame {
	width: 128px;
	aspect-ratio: 4 / 5;
	padding: 6px;
	border-radius: 999px 999px var(--r-sm) var(--r-sm);
	background: color-mix(in srgb, var(--gold) 30%, var(--card));
}
.wn-frame canvas {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	border-radius: 999px 999px 6px 6px;
	background: var(--void);
	opacity: 0.25;
}
.wn-make.has .wn-frame canvas {
	opacity: 1;
}
.wn-say,
.wn-note {
	margin: 0;
	color: var(--ash);
	font-size: var(--t-ui);
}
.wn-say:empty {
	display: none;
}
.wn-say[data-kind="ok"] {
	color: var(--live);
}
.wn-say[data-kind="warn"] {
	color: var(--warn);
}

/* ── A window opened big ───────────────────────────────── */
.wn-dlg .mg-panel {
	max-width: 520px;
}
.wn-dlg-in {
	display: grid;
	gap: 12px;
	justify-items: start;
}
.wn-dlg-in h2 {
	margin: 0;
	font: 600 var(--d-4) / 1.1 var(--serif);
}
.wn-dlg-in h2 a {
	color: var(--bone);
	text-decoration: none;
}
.wn-big-frame {
	width: 100%;
	padding: 10px;
	border-radius: 999px 999px var(--r-md) var(--r-md);
	background: linear-gradient(
		180deg,
		color-mix(in srgb, var(--gold) 40%, var(--card)),
		color-mix(in srgb, var(--gold) 18%, var(--card))
	);
	box-shadow: 0 0 40px rgba(var(--gold-rgb), 0.25);
}
.wn-big {
	width: 100%;
	height: auto;
	display: block;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 999px 999px var(--r-sm) var(--r-sm);
}
.wn-big.dark {
	filter: grayscale(0.7) brightness(0.35);
}
.wn-by {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	color: var(--ash);
}

@media (max-width: 640px) {
	.wn-bar {
		padding: 14px 16px 0;
	}
	.wn-houses {
		flex: 1 1 100%;
		min-width: 0;
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		mask-image: linear-gradient(90deg, var(--void) 85%, transparent);
	}
	.wn-houses a {
		flex: 0 0 auto;
	}
	.wn-tally {
		flex: 0 0 auto;
	}
	.wn-scene {
		margin: 0 calc(var(--pad) * -1);
		border-radius: 0;
		border-left: 0;
		border-right: 0;
	}
	.wn-row {
		padding: 56px 16px 0;
	}
	.wn-bldg {
		width: 320px;
	}
	.wn-face {
		padding: 14px 20px 12px;
	}
	.wn-grid {
		gap: 10px 5px;
	}
	.wn-time {
		grid-template-columns: minmax(0, 1fr) auto;
	}
	.wn-time .label {
		display: none;
	}
	.wn-moon {
		width: 44px;
		top: 64px;
	}
}
