:root {
	color-scheme: light;
	--ink: #2f3640;
	--muted: #5c6570;
	--brand: #6f8599;
	--rose: #c45b7a;
	--rose-deep: #9e3d5c;
	--paper: rgba(255, 250, 251, 0.9);
	--line: rgba(47, 54, 64, 0.12);
	--shadow: 0 24px 60px rgba(42, 36, 48, 0.16);
	--font-display: "Fraunces", "Noto Sans SC", serif;
	--font-body: "Noto Sans SC", "PingFang SC", sans-serif;
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	min-height: 100%;
}

body {
	font-family: var(--font-body);
	color: var(--ink);
	background:
		radial-gradient(900px 520px at 12% -10%, rgba(196, 91, 122, 0.28), transparent 55%),
		radial-gradient(700px 420px at 100% 10%, rgba(111, 133, 153, 0.18), transparent 50%),
		linear-gradient(165deg, #f8eef3, #f4f7fa 55%, #efe8f0);
	background-attachment: fixed;
}

button,
input,
textarea {
	font: inherit;
}

.app {
	min-height: 100vh;
}

.panel {
	width: min(440px, calc(100vw - 2rem));
	margin: 0 auto;
	padding: 1.5rem;
}

.boot,
.login-shell {
	min-height: 100vh;
	display: grid;
	align-content: center;
	justify-items: stretch;
	animation: rise 0.7s ease both;
}

.brand-mark {
	letter-spacing: 0.18em;
	font-size: 0.72rem;
	color: var(--brand);
	margin: 0 0 0.75rem;
}

h1,
h2 {
	font-family: var(--font-display);
	font-weight: 700;
	letter-spacing: 0.01em;
	margin: 0;
}

h1 {
	font-size: clamp(2rem, 6vw, 2.6rem);
	line-height: 1.15;
}

h2 {
	font-size: 1.35rem;
}

.muted,
.hint {
	color: var(--muted);
	line-height: 1.6;
}

.err {
	color: var(--rose-deep);
	margin: 0.75rem 0 0;
}

.login-card,
.home-card,
.album-card,
.setup-card {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 1.25rem;
	padding: 1.35rem 1.4rem;
	box-shadow: var(--shadow);
	backdrop-filter: blur(8px);
}

.login-card label {
	display: grid;
	gap: 0.4rem;
	margin: 1rem 0 0;
	font-size: 0.95rem;
}

.login-card input[type="text"],
.login-card input[type="password"],
.composer input[type="text"] {
	border: 1px solid rgba(47, 54, 64, 0.18);
	border-radius: 0.8rem;
	padding: 0.85rem 1rem;
	background: #fff;
}

.remember {
	display: flex !important;
	align-items: center;
	gap: 0.5rem;
	grid-template-columns: none;
}

.btn {
	appearance: none;
	border: 0;
	border-radius: 999px;
	padding: 0.85rem 1.15rem;
	background: var(--rose);
	color: #fff;
	cursor: pointer;
	transition: transform 0.2s ease, background 0.2s ease;
}

.btn:hover {
	background: var(--rose-deep);
	transform: translateY(-1px);
}

.btn:disabled {
	opacity: 0.6;
	cursor: wait;
	transform: none;
}

.btn.ghost {
	background: transparent;
	color: var(--brand);
	border: 1px solid rgba(111, 133, 153, 0.35);
}

.btn.block {
	width: 100%;
	margin-top: 1rem;
}

.shell {
	width: min(920px, calc(100vw - 1.25rem));
	margin: 0 auto;
	padding: 1.25rem 0 6.5rem;
	animation: rise 0.55s ease both;
}

.topbar {
	display: flex;
	justify-content: space-between;
	align-items: end;
	gap: 1rem;
	margin-bottom: 1.25rem;
}

.eyebrow {
	margin: 0;
	letter-spacing: 0.16em;
	font-size: 0.7rem;
	color: var(--brand);
}

.days {
	margin: 0.35rem 0 0;
	font-size: 0.95rem;
	color: var(--muted);
}

.grid {
	display: grid;
	gap: 1rem;
}

@media (min-width: 800px) {
	.grid.two {
		grid-template-columns: 1.1fr 0.9fr;
	}
}

.home-card p {
	margin: 0.65rem 0 0;
	color: var(--muted);
	line-height: 1.65;
}

.stat {
	margin-top: 1rem;
	font-family: var(--font-display);
	font-size: 2.4rem;
	color: var(--rose);
}

.nav {
	position: fixed;
	left: 50%;
	bottom: 1rem;
	transform: translateX(-50%);
	width: min(920px, calc(100vw - 1.25rem));
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.4rem;
	padding: 0.45rem;
	background: rgba(255, 250, 251, 0.92);
	border: 1px solid var(--line);
	border-radius: 999px;
	box-shadow: var(--shadow);
	backdrop-filter: blur(10px);
	z-index: 10;
}

.nav button {
	border: 0;
	background: transparent;
	border-radius: 999px;
	padding: 0.75rem 0.5rem;
	color: var(--muted);
	cursor: pointer;
}

.nav button.active {
	background: rgba(196, 91, 122, 0.12);
	color: var(--rose-deep);
	font-weight: 700;
}

.composer {
	display: grid;
	gap: 0.75rem;
	margin: 1rem 0;
}

.composer .row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	align-items: center;
}

.album-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
	gap: 0.75rem;
}

.photo {
	position: relative;
	border-radius: 1rem;
	overflow: hidden;
	border: 1px solid var(--line);
	background: #fff;
	aspect-ratio: 1;
	animation: fade 0.45s ease both;
}

.photo img,
.photo video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.photo .meta {
	position: absolute;
	inset: auto 0 0 0;
	padding: 0.55rem 0.65rem;
	background: linear-gradient(transparent, rgba(20, 18, 24, 0.72));
	color: #fff;
	font-size: 0.78rem;
}

.photo .del {
	position: absolute;
	top: 0.45rem;
	right: 0.45rem;
	border: 0;
	border-radius: 999px;
	padding: 0.25rem 0.55rem;
	background: rgba(255, 255, 255, 0.9);
	color: var(--rose-deep);
	cursor: pointer;
}

.setup-card ol {
	margin: 0.75rem 0 0;
	padding-left: 1.15rem;
	color: var(--muted);
	line-height: 1.7;
}

.setup-card code {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.86em;
	background: rgba(111, 133, 153, 0.12);
	padding: 0.1rem 0.35rem;
	border-radius: 0.35rem;
}

.empty {
	margin: 0.5rem 0 0;
	padding: 1rem;
	border: 1px dashed rgba(111, 133, 153, 0.35);
	border-radius: 1rem;
	color: var(--muted);
	text-align: center;
}

.hidden {
	display: none !important;
}

@keyframes rise {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes fade {
	from {
		opacity: 0;
		transform: scale(0.98);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		animation: none !important;
		transition: none !important;
	}
}
