:root {
	--scale: 1;
	--text: #f4f1ea;
	--muted: #c9c3b6;
	--pill: rgb(18 16 22 / 0.55);
	--accent: #e8b75c;
	--font: "Inter", "Segoe UI", system-ui, sans-serif;
	--edge: calc(28px * var(--scale));
	--size: calc(20px * var(--scale));
}

html, body {
	margin: 0;
	background: transparent;
	overflow: hidden;
	width: 100vw;
	height: 100vh;
}

body {
	font-family: var(--font);
	font-size: var(--size);
	color: var(--text);
	-webkit-font-smoothing: antialiased;
}

#corner {
	position: fixed;
	display: flex;
	flex-direction: column;
	gap: calc(8px * var(--scale));
}

[data-corner^="bottom"] #corner { bottom: var(--edge); }
[data-corner^="top"] #corner { top: var(--edge); flex-direction: column-reverse; }
[data-corner$="left"] #corner { left: var(--edge); align-items: flex-start; }
[data-corner$="right"] #corner { right: var(--edge); align-items: flex-end; }

#stack {
	display: flex;
	flex-direction: column;
	gap: calc(6px * var(--scale));
	align-items: inherit;
}

.line {
	margin: 0;
	padding: calc(5px * var(--scale)) calc(12px * var(--scale));
	border-radius: calc(8px * var(--scale));
	background: var(--pill);
	line-height: 1.3;
	letter-spacing: 0.01em;
	text-shadow: 0 1px 2px rgb(0 0 0 / 0.6);
	white-space: nowrap;
	transition: opacity 600ms ease;
}

.line.collapsed { display: none; }

#schedule { color: var(--muted); font-size: 0.85em; }

#rage .count, #lurkers .count {
	color: var(--accent);
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	display: inline-block;
}

#doener {
	display: flex;
	align-items: center;
	gap: calc(10px * var(--scale));
	font-size: 0.85em;
}

#doener.collapsed { display: none; }

#doener .bar {
	width: calc(90px * var(--scale));
	height: calc(6px * var(--scale));
	border-radius: 999px;
	background: rgb(255 255 255 / 0.15);
	overflow: hidden;
}

#doener .fill {
	display: block;
	height: 100%;
	width: 0;
	background: var(--accent);
	transition: width 1.2s ease;
}

.count.bump { animation: bump 700ms ease; }

@keyframes bump {
	0% { transform: translateY(0); opacity: 1; }
	40% { transform: translateY(calc(-4px * var(--scale))); opacity: 0.6; }
	100% { transform: translateY(0); opacity: 1; }
}

/* !gn: name drifts up slowly and fades out */
#floaters {
	position: relative;
	width: calc(360px * var(--scale));
	height: calc(260px * var(--scale));
	pointer-events: none;
}

[data-corner$="right"] #floaters { align-self: flex-end; }

.floater {
	position: absolute;
	bottom: 0;
	left: var(--x, 0px);
	white-space: nowrap;
	color: var(--text);
	text-shadow: 0 1px 3px rgb(0 0 0 / 0.7);
	opacity: 0;
	animation: drift 7s cubic-bezier(0.25, 0.1, 0.35, 1) forwards;
}

[data-corner$="right"] .floater { left: auto; right: var(--x, 0px); }

.floater.toast {
	padding: calc(4px * var(--scale)) calc(10px * var(--scale));
	border-radius: calc(8px * var(--scale));
	background: var(--pill);
}

.floater small {
	color: var(--muted);
	font-size: 0.75em;
	margin-left: 0.4em;
}

@keyframes drift {
	0% { transform: translateY(0); opacity: 0; }
	12% { opacity: 1; }
	60% { opacity: 0.8; }
	100% { transform: translateY(calc(-230px * var(--scale))); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.floater { animation-duration: 4s; }
}
