:root {
	color-scheme: dark;
	--page: #070707;
	--card: #0e0e0f;
	--raised: #161618;
	--line: #1f1f22;
	--line-strong: #33343a;
	--edge: #f4c4482e;
	--edge-strong: #f4c44873;
	--text: #c9cbd0;
	--title: #f4f4f5;
	--muted: #8a8d94;
	--gold: #f4c448;
	--gold-soft: #f4c4481f;
	--ink: #1a1508;
	--mc-yellow: #ffff55;
	--mc-green: #55ff55;
	--mc-gold: #ffaa00;
	--mc-aqua: #55ffff;
	--mc-gray: #aaaaaa;
	--radius: 12px;
	--bar: 62px;
	--side: max(16px, env(safe-area-inset-left));
	--sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--mc: Minecraft, var(--sans);
	--mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}

@font-face {
	font-family: Inter;
	src: url("/font/inter.ttf") format("truetype");
	font-display: swap;
}

@font-face {
	font-family: Minecraft;
	src: url("/site/minecraft.otf") format("opentype");
	font-display: swap;
}

* {
	box-sizing: border-box;
}

html {
	scrollbar-color: var(--line-strong) transparent;
	scrollbar-width: thin;
}

body {
	margin: 0;
	background-color: var(--page);
	color: var(--text);
	font: 17px / 1.6 var(--sans);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

h1,
h2,
h3,
p,
figure {
	margin: 0;
}

a {
	color: inherit;
	text-decoration: none;
}

code {
	padding: 1px 6px;
	border: 1px solid var(--line);
	border-radius: 5px;
	background: var(--raised);
	color: var(--title);
	font: 0.88em var(--mono);
}

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

[hidden] {
	display: none !important;
}

.mc {
	font-family: var(--mc);
	font-weight: 400;
	letter-spacing: 0.01em;
	text-shadow: 0.09em 0.09em 0 color-mix(in srgb, currentColor 25%, #000);
}

.shadow,
.shadow * {
	text-shadow: 0.09em 0.09em 0 color-mix(in srgb, currentColor 25%, #000);
}

.shadow .gold.glow,
.glow {
	text-shadow:
		0.09em 0.09em 0 color-mix(in srgb, currentColor 25%, #000),
		0 0 14px #f4c44880,
		0 0 34px #f4c44840;
}

.gold {
	color: var(--gold);
}

.c-yellow {
	color: var(--mc-yellow);
}

.c-green {
	color: var(--mc-green);
}

.c-aqua {
	color: var(--mc-aqua);
}

.c-gold {
	color: var(--mc-gold);
}

.notice {
	position: fixed;
	top: calc(var(--bar) + 12px);
	left: 50%;
	z-index: 30;
	width: max-content;
	max-width: calc(100vw - 32px);
	padding: 10px 16px;
	border: 1px solid #e5675f80;
	border-radius: 8px;
	background: var(--card);
	color: var(--title);
	font-size: 14px;
	transform: translateX(-50%);
	transition: opacity 0.4s;
}

.notice.leaving {
	opacity: 0;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 46px;
	padding: 0 22px;
	border-radius: 9px;
	font: 600 15px / 1 var(--sans);
	transition:
		background 0.2s,
		border-color 0.2s,
		box-shadow 0.2s;
}

.btn.big {
	height: 54px;
	padding: 0 30px;
	font-size: 17px;
}

.btn.gold {
	background: var(--gold);
	color: var(--ink);
	box-shadow: 0 0 24px #f4c4484d;
}

.btn.gold:hover {
	background: #f7d06c;
	box-shadow: 0 0 34px #f4c44873;
}

.btn.ghost {
	border: 1px solid var(--edge-strong);
	background: #0e0e0fcc;
	color: var(--gold);
}

.btn.ghost:hover {
	border-color: var(--gold);
}

.cmd-chip {
	display: inline-block;
	padding: 3px 9px;
	border: 1px solid var(--edge-strong);
	border-radius: 6px;
	background: var(--gold-soft);
	color: var(--gold);
	font: 600 13px / 1.35 var(--mono);
}

.chatbox {
	display: flex;
	align-items: center;
	width: min(560px, 100%);
	height: 46px;
	padding: 0 14px;
	border: 1px solid #ffffff24;
	background: #000000b3;
	color: #fff;
	font-size: 20px;
	line-height: 1.3;
	text-align: left;
}

.chat-label {
	color: #aaaaaa;
	white-space: pre;
}

.slot {
	position: relative;
	display: inline-block;
	height: 1.3em;
	overflow: hidden;
	line-height: 1.3em;
	vertical-align: middle;
	white-space: pre;
	transition: width 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.chat-name {
	color: var(--mc-yellow);
}

.chat-caret {
	width: 10px;
	height: 3px;
	margin: 12px 0 0 2px;
	background: #fff;
	animation: blink 1s steps(1) infinite;
}

@keyframes blink {
	50% {
		opacity: 0;
	}
}

.slot {
	transition:
		opacity 0.18s ease,
		transform 0.18s ease;
}

.slot.out {
	opacity: 0;
	transform: translateY(-40%);
}

.slot.in {
	opacity: 0;
	transform: translateY(40%);
	transition: none;
}

body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

html:has(> body.app),
body.app {
	height: 100%;
	overflow: hidden;
}

body.app {
	height: 100dvh;
}

.backdrop {
	position: fixed;
	inset: 0;
	z-index: -2;
	overflow: hidden;
	background: var(--page);
}

.backdrop-layer {
	position: absolute;
	inset: -40px;
	background-position: center;
	background-size: cover;
	opacity: 0;
	transform: scale(1.06);
	transition: opacity 1.1s cubic-bezier(0.4, 0, 0.2, 1);
	will-change: opacity, transform;
}

.backdrop-layer.is-shown {
	opacity: 1;
}

.backdrop-shade {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(
			120% 80% at 50% 30%,
			#07070740 0%,
			#070707a6 60%,
			#070707f2 100%
		),
		linear-gradient(180deg, #07070766 0%, #07070799 70%, #070707e6 100%);
	transition: background 0.6s ease;
}

.dots {
	z-index: -1;
}

.bar {
	position: relative;
	z-index: 30;
	display: flex;
	flex: none;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	height: var(--bar);
	padding: 0 var(--side);
}

.bar-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--title);
	font-size: 22px;
	transition:
		opacity 0.35s ease,
		transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.on-home .bar-brand {
	opacity: 0;
	transform: translateX(-10px);
	pointer-events: none;
}

.bar-brand img {
	border-radius: 50%;
	transition: transform 0.3s ease;
}

.bar-brand:hover img {
	transform: rotate(-12deg) scale(1.08);
}

.bar-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.stage {
	position: relative;
	flex: 1;
	min-height: 0;
	width: min(1280px, 100%);
	margin: 0 auto;
}

.view {
	position: absolute;
	inset: 0;
	padding: 4px var(--side) 18px;
	opacity: 0;
	transform: translateY(18px) scale(0.985);
	filter: blur(6px);
	transition:
		opacity 0.42s cubic-bezier(0.22, 0.8, 0.24, 1),
		transform 0.42s cubic-bezier(0.22, 0.8, 0.24, 1),
		filter 0.42s cubic-bezier(0.22, 0.8, 0.24, 1);
}

.view.is-active {
	opacity: 1;
	transform: none;
	filter: none;
}

.view-home {
	display: grid;
	grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.1fr);
	align-content: center;
	align-items: stretch;
	gap: clamp(20px, 3vw, 44px);
}

.hero {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	gap: clamp(14px, 2.6vh, 26px);
	min-height: 0;
}

.hero-brand {
	display: flex;
	align-items: center;
	gap: clamp(14px, 1.6vw, 22px);
}

.hero-name {
	color: var(--gold);
	font-size: clamp(40px, min(5.4vw, 9vh), 84px);
	line-height: 1;
}

.hero-icon {
	width: clamp(72px, 15vh, 140px);
	height: auto;
	border-radius: 50%;
	filter: drop-shadow(0 0 32px #f4c44838);
	animation: float 6s ease-in-out infinite;
}

@keyframes float {
	50% {
		transform: translateY(-8px);
	}
}

.hero-title {
	color: var(--title);
	font: 400 clamp(32px, min(4.8vw, 8vh), 70px) / 1.08 var(--mc);
}

.tally {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	width: 100%;
	margin: 0;
}

.tally div {
	padding: clamp(10px, 1.8vh, 18px) 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #0e0e0fb3;
	backdrop-filter: blur(6px);
}

.tally dt {
	color: var(--muted);
	font-size: 14px;
	line-height: 1.3;
}

.tally dd {
	margin: 2px 0 0;
	font-size: clamp(20px, 3.6vh, 30px);
	line-height: 1.2;
}

.areas {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-template-rows: repeat(3, minmax(0, 1fr));
	gap: 12px;
	min-height: 0;
}

.area-tile {
	--tile-accent: var(--gold);
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 0;
	padding: 14px 16px;
	overflow: hidden;
	border: 1px solid var(--line-strong);
	border-radius: 16px;
	background: #0e0e0fcc;
	isolation: isolate;
	transition:
		transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1),
		border-color 0.3s ease,
		box-shadow 0.35s ease;
}

.area-tile.is-big {
	grid-column: span 2;
	grid-row: span 2;
}

.area-tile.is-wide {
	grid-column: span 2;
}

.area-tile-media {
	position: absolute;
	inset: 10px 10px 44px;
	z-index: -1;
}

.area-tile-media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	opacity: 0.62;
	filter: saturate(0.7);
	transform: translateY(6px) scale(0.96);
	transition:
		opacity 0.35s ease,
		filter 0.35s ease,
		transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.area-tile-media img.morph-ghost {
	position: absolute;
	inset: 0;
}

.morph-ghost {
	pointer-events: none;
}

.area-tile::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(0deg, #070707f2 8%, #07070700 55%);
}

.area-tile-label {
	color: var(--title);
	font-size: clamp(17px, 1.7vw, 24px);
	line-height: 1.15;
	transition: color 0.25s ease;
}

.area-tile.is-big .area-tile-label {
	font-size: clamp(22px, 2.6vw, 34px);
}

.area-tile-sub {
	color: var(--muted);
	font-size: 13px;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.area-tile:hover,
.area-tile:focus-visible {
	transform: translateY(-4px);
	border-color: var(--tile-accent);
	box-shadow:
		0 18px 50px -24px var(--tile-accent),
		inset 0 0 0 1px #ffffff0d;
	outline: none;
}

.area-tile:hover .area-tile-media img,
.area-tile:focus-visible .area-tile-media img {
	opacity: 1;
	filter: none;
	transform: none;
}

.area-tile:hover .area-tile-label,
.area-tile:focus-visible .area-tile-label {
	color: var(--tile-accent);
}

.view-area {
	display: flex;
	flex-direction: column;
}

.area-head {
	display: flex;
	flex: none;
	align-items: center;
	gap: 16px;
	padding: 6px 0 16px;
}

.area-back {
	height: 38px;
	padding: 0 14px;
	border: 1px solid var(--line-strong);
	border-radius: 10px;
	background: #0e0e0fcc;
	color: var(--text);
	font-size: 16px;
	cursor: pointer;
	transition:
		color 0.2s ease,
		border-color 0.2s ease,
		transform 0.2s ease;
}

.area-back:hover {
	border-color: var(--accent, var(--gold));
	color: var(--accent, var(--gold));
	transform: translateX(-3px);
}

.area-title {
	color: var(--accent, var(--gold));
	font: 400 clamp(26px, 4vw, 44px) / 1 var(--mc);
	transition: color 0.4s ease;
}

.area-body {
	display: grid;
	flex: 1;
	grid-template-columns: 240px minmax(0, 1fr);
	gap: 16px;
	min-height: 0;
}

.area-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-height: 0;
}

.area-item {
	display: flex;
	flex: 0 1 auto;
	flex-direction: column;
	justify-content: center;
	gap: 1px;
	min-height: 0;
	padding: 9px 14px;
	border: 1px solid var(--line);
	border-radius: 11px;
	background: #0e0e0fcc;
	color: var(--text);
	text-align: left;
	cursor: pointer;
	transition:
		border-color 0.2s ease,
		background 0.2s ease,
		transform 0.25s ease;
}

.area-item:hover {
	border-color: var(--line-strong);
	transform: translateX(3px);
}

.area-item.is-active {
	border-color: var(--accent, var(--gold));
	background: #161618e6;
}

.area-item-title {
	color: var(--title);
	font-size: 17px;
	line-height: 1.25;
}

.area-item.is-active .area-item-title {
	color: var(--accent, var(--gold));
}

.area-item-cmd {
	color: var(--muted);
	font: 12px / 1.3 var(--mono);
}

.area-shot {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	min-height: 0;
	padding: 14px;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: #0e0e0fcc;
	backdrop-filter: blur(6px);
}

.area-shot-top {
	display: flex;
	flex: none;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.area-modes {
	min-width: min(260px, 100%);
}

.area-stage {
	display: flex;
	flex: 1;
	gap: 10px;
	min-height: 0;
}

.area-scroll {
	position: relative;
	flex: none;
	width: 8px;
	margin: 18px 0;
	border-radius: 999px;
	background: #ffffff14;
	cursor: pointer;
	touch-action: none;
	transition: width 0.2s ease;
}

.area-scroll:hover,
.area-scroll.is-dragging {
	width: 10px;
}

.area-scroll-thumb {
	position: absolute;
	left: 0;
	right: 0;
	min-height: 14px;
	border-radius: 999px;
	background: var(--accent, var(--gold));
	box-shadow: 0 0 10px
		color-mix(in srgb, var(--accent, var(--gold)) 50%, transparent);
	transition:
		top 0.18s cubic-bezier(0.2, 0.7, 0.2, 1),
		height 0.18s ease;
}

.area-image {
	position: relative;
	flex: 1;
	min-width: 0;
	min-height: 0;
	padding: 0;
	border: 0;
	background: none;
	cursor: zoom-in;
	perspective: 1400px;
}

.area-image img {
	--tilt-x: 0deg;
	--tilt-y: 0deg;
	position: absolute;
	inset: 18px;
	width: calc(100% - 36px);
	height: calc(100% - 36px);
	object-fit: contain;
	transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
	transition:
		opacity 0.22s ease,
		transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1),
		filter 0.3s ease;
	will-change: transform;
}

.area-image img.tilting {
	filter: drop-shadow(0 22px 30px #000000b3);
	transition:
		opacity 0.22s ease,
		transform 0.12s ease-out,
		filter 0.3s ease;
}

.area-shot-top {
	position: relative;
	z-index: 5;
}

.foot {
	display: flex;
	flex: none;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 4px 18px;
	padding: 10px var(--side) 12px;
	border-top: 1px solid var(--line);
	background: #070707cc;
	color: var(--muted);
	font-size: 13px;
}

.foot-links {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.foot-links a:hover {
	color: var(--gold);
}

.foot-note {
	color: var(--muted);
}

@media (max-width: 900px) {
	.view-home {
		display: flex;
		flex-direction: column;
		gap: clamp(10px, 2vh, 18px);
	}

	.hero {
		flex: none;
		align-items: center;
		gap: clamp(8px, 1.6vh, 14px);
		text-align: center;
	}

	.hero-icon {
		width: clamp(40px, 7vh, 72px);
	}

	.hero-name {
		font-size: clamp(30px, 5.4vh, 52px);
	}

	.hero-title {
		font-size: clamp(24px, min(7vw, 5vh), 46px);
	}

	.chatbox {
		height: 40px;
		font-size: 17px;
	}

	.tally {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 6px;
	}

	.tally div {
		padding: 6px 4px;
		text-align: center;
	}

	.tally dt {
		font-size: 10.5px;
	}

	.tally dd {
		font-size: clamp(14px, 2.4vh, 20px);
	}

	.areas {
		flex: 1;
		padding: 0;
		gap: 8px;
	}

	.area-tile {
		padding: 10px 12px;
		border-radius: 12px;
	}

	.area-tile-media {
		inset: 6px 6px 30px;
	}

	.area-tile-sub {
		display: none;
	}
}

@media (max-width: 900px) and (orientation: portrait) {
	.areas {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-rows: repeat(4, minmax(0, 1fr));
	}

	.area-tile.is-big {
		grid-column: span 2;
		grid-row: span 1;
	}

	.area-tile.is-wide {
		grid-column: span 1;
	}
}

@media (max-width: 760px) {
	.area-head {
		padding: 2px 0 10px;
	}

	.area-body {
		display: flex;
		flex-direction: column;
		gap: 10px;
	}

	.area-list {
		flex: none;
		flex-flow: row wrap;
		gap: 6px;
	}

	.area-item {
		flex: 0 0 auto;
		padding: 6px 10px;
		border-radius: 9px;
	}

	.area-item-title {
		font-size: 14px;
	}

	.area-item-cmd {
		display: none;
	}

	.area-shot {
		flex: 1;
		padding: 10px;
	}

	.music-label {
		display: none;
	}

	.music {
		padding-right: 10px;
	}

	.music-volume {
		width: 54px;
	}

	.area-image img {
		inset: 6px;
		width: calc(100% - 12px);
		height: calc(100% - 12px);
	}

	.bar-actions .btn {
		height: 38px;
		padding: 0 12px;
		font-size: 14px;
	}

	.foot {
		justify-content: center;
		padding: 8px var(--side);
		font-size: 12px;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.view {
		filter: none;
	}

	.view,
	.backdrop-layer,
	.area-tile,
	.area-tile-media img,
	.hero-icon {
		transition: none;
		animation: none;
	}
}
