:root {
	--bg: #f4f7fb;
	--surface: #ffffff;
	--text: #152033;
	--muted: #5f6f86;
	--accent: #3df9ff;
	--accent-strong: #24bde3;
	--ring: #ffd8cc;
	--shadow: 0 12px 30px rgba(21, 32, 51, 0.12);
	--radius: 22px;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: "Space Grotesk", sans-serif;
	min-height: 100dvh;
	color: var(--text);
	background:
		radial-gradient(circle at 15% 15%, #d7ecff 0%, transparent 40%),
		radial-gradient(circle at 80% 25%, #fff1cc 0%, transparent 45%),
		var(--bg);
	overflow-x: hidden;
	padding: 24px;
}

.bg-shape {
	position: fixed;
	border-radius: 999px;
	filter: blur(40px);
	opacity: 0.55;
	z-index: -1;
}

.bg-shape-a {
	width: 280px;
	height: 280px;
	background: #cae2ff;
	top: -70px;
	left: -60px;
}

.bg-shape-b {
	width: 320px;
	height: 320px;
	background: #ffe4ba;
	bottom: -90px;
	right: -90px;
}

.planner {
	width: min(860px, 100%);
	margin: 24px auto 40px;
	display: grid;
	gap: 18px;
	grid-template-columns: 1fr;
}

h1 {
	margin: 0;
	font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.muted {
	margin: 8px 0 0;
	color: var(--muted);
}

.save-page-btn {
	border: 0;
	border-radius: 14px;
	background: var(--accent);
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	padding: 12px 16px;
	cursor: pointer;
	transition: transform 140ms ease, background-color 140ms ease, opacity 140ms ease;
	box-shadow: 0 10px 24px rgba(36, 189, 227, 0.22);
	justify-self: center;
	width: min(260px, 100%);
}

.save-page-btn:hover {
	background: var(--accent-strong);
	transform: translateY(-1px);
}

.save-page-btn:focus-visible {
	outline: 3px solid var(--ring);
	outline-offset: 2px;
}

.save-page-btn:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

.save-status {
	min-height: 1.25rem;
	margin: -4px 0 0;
	color: var(--muted);
	text-align: center;
}

.days-container {
	display: grid;
	gap: 18px;
}

.day-card {
	background: color-mix(in oklab, var(--surface) 92%, white 8%);
	border: 1px solid rgba(255, 255, 255, 0.95);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 24px;
	backdrop-filter: blur(8px);
	animation: rise 420ms ease both;
}

.day-name {
	margin: 0;
	font-size: clamp(1.5rem, 2vw, 2.1rem);
}

.meal-label {
	display: block;
	margin: 14px 0 8px;
	font-size: 1.1rem;
	color: var(--muted);
}

.meal-input-wrap {
	position: relative;
}

.meal-input {
	width: 100%;
	border: 1px solid #e2eaf4;
	border-radius: 14px;
	background: #fbfdff;
	color: var(--text);
	font-size: 1rem;
	padding: 12px 14px;
}

.meal-input:focus {
	outline: 3px solid var(--ring);
	outline-offset: 2px;
}

.search-results {
	display: none;
	list-style: none;
	margin: 8px 0 0;
	padding: 6px;
	border-radius: 14px;
	border: 1px solid #e2eaf4;
	background: #ffffff;
	max-height: 210px;
	overflow: auto;
	box-shadow: 0 12px 24px rgba(21, 32, 51, 0.08);
}

.search-results.open {
	display: block;
}

.result-item {
	padding: 9px 10px;
	border-radius: 10px;
	cursor: pointer;
}

.result-item:hover {
	background: #edf3fb;
}

.day-actions {
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid #e2eaf4;
}

.toggle-recipe-btn {
	background: #edf3fb;
	border: 1px solid #e2eaf4;
	border-radius: 13px;
	color: #1f3554;
	font-size: 1rem;
	padding: 9px 16px;
	cursor: pointer;
	transition: transform 140ms ease, background-color 140ms ease, opacity 140ms ease;
}

.toggle-recipe-btn:hover {
	transform: translateY(-1px);
}

.toggle-recipe-btn:focus-visible {
	outline: 3px solid var(--ring);
	outline-offset: 2px;
}

.toggle-recipe-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.recipe-panel {
	margin-top: 14px;
	color: #243d5f;
}

.recipe-title {
	margin: 0 0 10px;
	font-size: 1.25rem;
}

.recipe-ingredients {
	margin: 0;
	padding-left: 24px;
	font-size: 0.98rem;
}

.recipe-instructions {
	margin: 14px 0 0;
	font-size: 0.98rem;
	white-space: pre-wrap;
}

@keyframes rise {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 700px) {
	body {
		padding: 16px;
	}

	.save-page-btn {
		width: 100%;
	}

	.day-name {
		font-size: 1.4rem;
	}

	.meal-label,
	.meal-input,
	.recipe-title,
	.recipe-ingredients,
	.recipe-instructions,
	.toggle-recipe-btn {
		font-size: 0.95rem;
	}
}
