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

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

main {
	display: block;
	max-width: 760px;
	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(--surface-3);
	color: var(--text);
	text-align: center;
	padding: 8px 12px;
	font: var(--font-body-small-semibold);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;

	& .ms { font-size: 18px; }
}

/* ─── Floating add button ─────────────────────────────────────────────────── */
.fab {
	position: fixed;
	right: 18px;
	bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 16px);
	z-index: 45;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	border: none;
	background: var(--accent-grad);
	color: #fff;
	display: grid;
	place-items: center;
	box-shadow: 0 8px 22px rgba(34, 197, 94, 0.4);
	cursor: pointer;
	transition: transform 0.12s;

	&:active { transform: scale(0.93); }
	& .ms { font-size: 30px; }
}

/* ─── 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(13, 16, 14, 0.94);
	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;

	&.active { color: var(--text); }
	&.active .ms { color: var(--accent); }
	& .ms { font-size: 24px; }
}
