root-app {
	display: block;
	min-height: 100dvh;
}

.app-shell {
	min-height: 100dvh;
	padding-bottom: calc(var(--nav-h) + var(--player-h) + env(safe-area-inset-bottom, 0px));
}

main {
	display: block;
	max-width: 600px;
	margin: 0 auto;
	padding: 16px 16px 24px;
}

.auth-loading {
	position: fixed;
	inset: 0;
	display: grid;
	place-items: center;
}
.auth-loading::after {
	content: "";
	width: 38px;
	height: 38px;
	border: 3px solid var(--surface-3);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.offline-banner {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--accent-grad);
	color: #fff;
	text-align: center;
	padding: 7px 12px;
	font: var(--font-body-small-semibold);
}

/* ─── Scroll-to-top ──────────────────────────────────────────────────────── */
.scroll-top {
	position: fixed;
	right: 16px;
	bottom: calc(var(--nav-h) + var(--player-h) + env(safe-area-inset-bottom, 0px) + 16px);
	z-index: 45;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid var(--border);
	background: var(--surface-2);
	color: var(--text);
	display: grid;
	place-items: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
	cursor: pointer;
	animation: fade-in 0.15s ease;

	&:hover { background: var(--surface-3); }
	& .ms { font-size: 26px; }
}
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } }

/* ─── Bottom navigation ──────────────────────────────────────────────────── */
.bottom-nav {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 40;
	height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
	padding-bottom: env(safe-area-inset-bottom, 0px);
	display: flex;
	background: rgba(14, 14, 18, 0.92);
	backdrop-filter: blur(16px);
	border-top: 1px solid var(--border);
}
.bottom-nav a {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	color: var(--text-faint);
	font: var(--font-body-xsmall-regular);
	transition: color 0.15s;
}
.bottom-nav a.active { color: var(--text); }
.bottom-nav a.active .ms { color: var(--accent); }
.bottom-nav .ms { font-size: 24px; }
