:root {
	--fc-ink: #18221d;
	--fc-green: #184d37;
	--fc-green-soft: #e8f2eb;
	--fc-cream: #f6f5f1;
	--fc-card: #ffffff;
	--fc-muted: #7b817d;
	--fc-line: #e6e7e3;
	--fc-red: #de5b54;
	--fc-yellow: #f4c851;
	--fc-shadow: 0 18px 50px rgba(24, 34, 29, .09);
}

* { box-sizing: border-box; }

body.family-cookbook-page {
	margin: 0;
	background: #e9ebe8;
	color: var(--fc-ink);
	font-family: Inter, ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, sans-serif;
}

.fc-page-shell { min-height: 100vh; }

.fc-app {
	min-height: 100vh;
	padding: 28px;
	background:
		radial-gradient(circle at 12% 8%, rgba(215, 231, 218, .9), transparent 32%),
		linear-gradient(135deg, #f5f6f3 0%, #e7ebe6 100%);
}

.fc-app button, .fc-app input, .fc-app select, .fc-app textarea { font: inherit; }
.fc-app button { cursor: pointer; }
.fc-app [hidden] { display: none !important; }

.fc-shell {
	width: min(1180px, 100%);
	margin: 0 auto;
	background: rgba(248, 249, 247, .88);
	border: 1px solid rgba(255, 255, 255, .78);
	border-radius: 34px;
	box-shadow: var(--fc-shadow);
	overflow: hidden;
	backdrop-filter: blur(18px);
}

.fc-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 28px 32px 18px;
}

.fc-brand { display: flex; align-items: center; gap: 14px; }
.fc-brand-mark, .fc-login-mark {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 17px;
	background: var(--fc-green);
	color: #fff;
	font-size: 14px;
	font-weight: 800;
	letter-spacing: .08em;
	box-shadow: 0 10px 24px rgba(24, 77, 55, .23);
}

.fc-brand h1 { margin: 0; font-size: clamp(24px, 3vw, 36px); line-height: 1; letter-spacing: -.04em; }
.fc-brand p { margin: 6px 0 0; color: var(--fc-muted); font-size: 14px; }

.fc-header-actions { display: flex; gap: 10px; }
.fc-header-actions .fc-icon-button { display: none; }
.fc-icon-button, .fc-secondary-button, .fc-primary-button, .fc-danger-button {
	border: 0;
	border-radius: 16px;
	padding: 12px 17px;
	font-weight: 700;
	transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.fc-icon-button:hover, .fc-secondary-button:hover, .fc-primary-button:hover, .fc-danger-button:hover { transform: translateY(-1px); }
.fc-primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--fc-ink); color: #fff; text-decoration: none; }
.fc-primary-button:hover { color: #fff; box-shadow: 0 9px 20px rgba(24, 34, 29, .18); }
.fc-secondary-button { background: #fff; color: var(--fc-ink); border: 1px solid var(--fc-line); }
.fc-danger-button { background: #fff0ef; color: #a82e28; }
.fc-icon-button { width: 46px; height: 46px; padding: 0; background: #fff; color: var(--fc-ink); font-size: 20px; }

.fc-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 16px; padding: 10px 32px 22px; }
.fc-search { position: relative; }
.fc-search span { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: var(--fc-muted); }
.fc-search input { width: 100%; height: 52px; border: 1px solid transparent; border-radius: 18px; background: #fff; padding: 0 18px 0 46px; outline: 0; color: var(--fc-ink); }
.fc-search input:focus { border-color: #9ebdaa; box-shadow: 0 0 0 4px rgba(24, 77, 55, .08); }

.fc-content { padding: 0 32px 126px; }
.fc-section-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 16px; }
.fc-section-heading h2 { margin: 0; font-size: 21px; letter-spacing: -.02em; }
.fc-section-heading p { margin: 5px 0 0; color: var(--fc-muted); font-size: 14px; }

.fc-meal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fc-meal-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 300px;
	border: 0;
	border-radius: 24px;
	padding: 0;
	background: var(--fc-card);
	color: var(--fc-ink);
	text-align: left;
	overflow: hidden;
	box-shadow: 0 7px 22px rgba(24, 34, 29, .055);
	transition: transform .2s ease, box-shadow .2s ease;
}
.fc-meal-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(24, 34, 29, .1); }
.fc-meal-image { position: relative; height: 160px; background: linear-gradient(145deg, #cbdab8, #f0d8a7); overflow: hidden; }
.fc-meal-image img { width: 100%; height: 100%; object-fit: cover; }
.fc-meal-placeholder { display: grid; place-items: center; width: 100%; height: 100%; font-size: 54px; }
.fc-card-badge { position: absolute; left: 13px; top: 13px; padding: 7px 10px; border-radius: 999px; background: rgba(255,255,255,.9); color: var(--fc-green); font-size: 12px; font-weight: 800; backdrop-filter: blur(8px); }
.fc-favorite { position: absolute; right: 13px; top: 13px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--fc-red); font-size: 18px; }
.fc-meal-body { display: flex; flex: 1; flex-direction: column; padding: 18px; }
.fc-meal-body h3 { margin: 0 0 8px; font-size: 20px; letter-spacing: -.025em; }
.fc-meal-body p { margin: 0; color: var(--fc-muted); font-size: 13px; line-height: 1.45; }
.fc-card-meta { display: flex; gap: 13px; align-items: center; margin-top: auto; padding-top: 18px; font-size: 12px; color: #59615c; }
.fc-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fc-red); }
.fc-status-dot.is-ready { background: #58a870; }
.fc-ready-label { margin-left: auto; color: var(--fc-green); font-weight: 800; }
.fc-missing-label { margin-left: auto; color: #a34842; font-weight: 800; }

.fc-inventory { display: grid; gap: 10px; }
.fc-inventory-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: 14px; padding: 15px 17px; background: #fff; border-radius: 18px; border: 1px solid transparent; }
.fc-inventory-row:hover { border-color: var(--fc-line); }
.fc-ingredient-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: #f0f3ec; font-size: 23px; }
.fc-ingredient-icon img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.fc-inventory-name { font-weight: 750; }
.fc-inventory-meta { color: var(--fc-muted); font-size: 12px; margin-top: 3px; }
.fc-switch { position: relative; width: 52px; height: 30px; border: 0; border-radius: 999px; background: #d7dad7; padding: 3px; }
.fc-switch::after { content: ""; display: block; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.17); transition: transform .2s ease; }
.fc-switch.is-on { background: #5ba673; }
.fc-switch.is-on::after { transform: translateX(22px); }
.fc-row-menu { border: 0; background: transparent; color: #9a9e9b; font-size: 20px; padding: 8px; }

.fc-empty { display: grid; place-items: center; min-height: 320px; border: 1px dashed #cfd5d0; border-radius: 24px; text-align: center; padding: 34px; background: rgba(255,255,255,.45); }
.fc-empty span { font-size: 48px; }
.fc-empty h3 { margin: 13px 0 7px; }
.fc-empty p { margin: 0 0 18px; color: var(--fc-muted); max-width: 390px; }

.fc-detail-backdrop, .fc-modal-backdrop { position: fixed; inset: 0; z-index: 99990; background: rgba(16, 23, 19, .42); backdrop-filter: blur(7px); display: grid; place-items: center; padding: 22px; }
.fc-detail, .fc-modal { width: min(720px, 100%); max-height: calc(100vh - 44px); overflow: auto; border-radius: 30px; background: var(--fc-cream); box-shadow: 0 30px 90px rgba(15, 23, 18, .3); }
.fc-detail-hero { position: relative; height: 290px; background: linear-gradient(145deg, #9caf87, #ead29e); overflow: hidden; }
.fc-detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.fc-detail-close, .fc-detail-heart { position: absolute; top: 20px; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.94); font-size: 21px; }
.fc-detail-close { left: 20px; }
.fc-detail-heart { right: 20px; color: var(--fc-red); }
.fc-detail-content { padding: 25px; }
.fc-detail-content h2 { margin: 0; font-size: 30px; letter-spacing: -.035em; }
.fc-detail-description { margin: 9px 0 20px; color: var(--fc-muted); line-height: 1.55; }
.fc-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.fc-stat { padding: 15px; border: 1px solid var(--fc-line); border-radius: 18px; background: rgba(255,255,255,.5); }
.fc-stat-icon { font-size: 20px; }
.fc-stat small { display: block; margin-top: 14px; color: var(--fc-muted); }
.fc-stat strong { display: block; margin-top: 3px; }
.fc-detail-section { margin-top: 24px; }
.fc-detail-section h3 { margin: 0 0 12px; font-size: 19px; }
.fc-required-list { display: grid; gap: 9px; }
.fc-required-item { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 13px; background: #fff; border-radius: 16px; }
.fc-required-item.is-missing { background: #fff5f3; }
.fc-required-item strong { display: block; }
.fc-required-item small { color: var(--fc-muted); }
.fc-availability-pill { padding: 6px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; background: var(--fc-green-soft); color: var(--fc-green); }
.fc-availability-pill.is-missing { background: #fde3df; color: #aa3831; }
.fc-instructions { color: #555d58; line-height: 1.65; white-space: pre-wrap; }
.fc-detail-actions { display: flex; gap: 10px; margin-top: 24px; }

.fc-modal { padding: 25px; }
.fc-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.fc-modal-header h2 { margin: 0; font-size: 25px; }
.fc-modal-header p { margin: 4px 0 0; color: var(--fc-muted); font-size: 13px; }
.fc-modal-close { border: 0; background: #e8eae7; width: 40px; height: 40px; border-radius: 50%; font-size: 20px; }
.fc-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fc-field { display: grid; gap: 7px; }
.fc-field.is-wide { grid-column: 1 / -1; }
.fc-field label { font-size: 12px; font-weight: 800; color: #5c635f; }
.fc-field input, .fc-field select, .fc-field textarea { width: 100%; border: 1px solid var(--fc-line); border-radius: 14px; background: #fff; padding: 12px 13px; color: var(--fc-ink); outline: 0; }
.fc-field textarea { min-height: 90px; resize: vertical; }
.fc-field input:focus, .fc-field select:focus, .fc-field textarea:focus { border-color: #94b7a1; box-shadow: 0 0 0 4px rgba(24,77,55,.07); }
.fc-field input[type="file"] { padding: 9px; background: #f7f8f6; }
.fc-field input[type="file"]::file-selector-button { border: 0; border-radius: 10px; background: var(--fc-ink); color: #fff; padding: 9px 12px; margin-right: 10px; font-weight: 700; cursor: pointer; }
.fc-image-preview { display: grid; gap: 9px; margin-top: 3px; }
.fc-image-preview img { width: 100%; height: 120px; border-radius: 13px; object-fit: cover; }
.fc-form-check { display: flex; gap: 9px; align-items: center; font-weight: 700; }
.fc-form-check input { width: 18px; height: 18px; accent-color: var(--fc-green); }
.fc-picker { display: grid; gap: 8px; max-height: 250px; overflow: auto; padding-right: 3px; }
.fc-picker-row { display: grid; grid-template-columns: auto minmax(0,1fr) 84px 74px; gap: 9px; align-items: center; padding: 10px; background: #fff; border-radius: 13px; }
.fc-picker-row input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--fc-green); }
.fc-picker-row input[type="number"], .fc-picker-row input[type="text"] { min-width: 0; padding: 8px; }
.fc-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.fc-action-sheet { width: min(430px, 100%); padding: 24px; border-radius: 26px; background: var(--fc-cream); box-shadow: 0 30px 90px rgba(15, 23, 18, .3); }
.fc-action-list { display: grid; gap: 9px; }
.fc-action-button { display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 12px; width: 100%; border: 1px solid var(--fc-line); border-radius: 16px; background: #fff; padding: 12px; color: var(--fc-ink); text-align: left; }
.fc-action-button > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--fc-green-soft); color: var(--fc-green); font-size: 20px; }
.fc-action-button strong, .fc-action-button small { display: block; }
.fc-action-button small { margin-top: 3px; color: var(--fc-muted); font-size: 11px; }
.fc-action-button.is-danger { color: #9d302a; }
.fc-action-button.is-danger > span { background: #fff0ef; color: #a82e28; }
.fc-action-button:disabled { cursor: not-allowed; opacity: .48; }
.fc-photo-viewer { position: relative; width: min(600px, 100%); margin: 0; padding: 12px; border-radius: 28px; background: #fff; box-shadow: 0 30px 90px rgba(15, 23, 18, .3); }
.fc-photo-viewer img { display: block; width: 100%; max-height: min(70vh, 640px); border-radius: 20px; object-fit: contain; background: #edf0ec; }
.fc-photo-viewer .fc-modal-close { position: absolute; z-index: 2; right: 23px; top: 23px; background: rgba(255,255,255,.94); box-shadow: 0 5px 16px rgba(0,0,0,.15); }
.fc-photo-viewer figcaption { padding: 14px 8px 5px; font-size: 19px; font-weight: 800; text-align: center; }

.fc-toast { position: fixed; z-index: 100000; left: 50%; bottom: 28px; transform: translateX(-50%); padding: 12px 18px; border-radius: 13px; background: var(--fc-ink); color: #fff; font-size: 13px; font-weight: 700; box-shadow: var(--fc-shadow); }
.fc-toast.is-error { background: #a63d37; }
.fc-bottom-nav {
	position: fixed;
	z-index: 99980;
	left: 50%;
	bottom: max(16px, env(safe-area-inset-bottom));
	transform: translateX(-50%);
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	width: min(390px, calc(100% - 40px));
	padding: 8px;
	border: 1px solid rgba(255, 255, 255, .82);
	border-radius: 24px;
	background: rgba(255, 255, 255, .9);
	box-shadow: 0 14px 45px rgba(24, 34, 29, .2);
	backdrop-filter: blur(18px);
}
.fc-bottom-item {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	border: 0;
	border-radius: 17px;
	background: transparent;
	color: #777e79;
	font-size: 13px;
	font-weight: 750;
	transition: background .18s ease, color .18s ease, transform .18s ease;
}
.fc-bottom-item:hover { color: var(--fc-green); transform: translateY(-1px); }
.fc-bottom-item.is-active { background: var(--fc-ink); color: #fff; }
.fc-bottom-icon { font-size: 21px; line-height: 1; }
.fc-loading { min-height: 100vh; display: grid; place-content: center; text-align: center; color: var(--fc-muted); }
.fc-loader { width: 32px; height: 32px; margin: 0 auto; border: 3px solid #dce4de; border-top-color: var(--fc-green); border-radius: 50%; animation: fc-spin .8s linear infinite; }
@keyframes fc-spin { to { transform: rotate(360deg); } }

.fc-login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(145deg, #eef2ed, #dfe7df); }
.fc-login-card { width: min(410px, 100%); padding: 42px; border-radius: 30px; background: #fff; text-align: center; box-shadow: var(--fc-shadow); }
.fc-login-mark { margin: 0 auto 20px; }
.fc-login-card h1 { margin: 0; }
.fc-login-card p { color: var(--fc-muted); margin: 10px 0 24px; }

@media (max-width: 900px) {
	.fc-meal-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 640px) {
	.fc-app { padding: 0; background: var(--fc-cream); }
	.fc-shell { min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
	.fc-header { padding: max(22px, env(safe-area-inset-top)) 18px 15px; align-items: flex-start; }
	.fc-brand-mark { width: 42px; height: 42px; border-radius: 14px; }
	.fc-brand p { display: none; }
	.fc-brand h1 { font-size: 26px; margin-top: 7px; }
	.fc-header-actions .fc-secondary-button { display: none; }
	.fc-header-actions .fc-header-meal-button { display: none; }
	.fc-header-actions .fc-icon-button { display: grid; }
	.fc-toolbar { grid-template-columns: 1fr; padding: 5px 18px 18px; }
	.fc-toolbar .fc-primary-button { display: none; }
	.fc-content { padding: 0 18px 112px; }
	.fc-bottom-nav { bottom: max(9px, env(safe-area-inset-bottom)); width: calc(100% - 20px); padding: 6px; border-radius: 21px; }
	.fc-bottom-item { min-height: 54px; border-radius: 16px; }
	.fc-bottom-icon { font-size: 20px; }
	.fc-meal-grid { grid-template-columns: 1fr; gap: 11px; }
	.fc-meal-card { min-height: 0; display: grid; grid-template-columns: 92px 1fr; border-radius: 19px; }
	.fc-meal-image { height: 100%; min-height: 112px; }
	.fc-meal-placeholder { font-size: 36px; }
	.fc-card-badge { display: none; }
	.fc-favorite { width: 29px; height: 29px; right: 7px; top: 7px; font-size: 14px; }
	.fc-meal-body { padding: 15px; }
	.fc-meal-body h3 { font-size: 18px; margin-bottom: 5px; }
	.fc-meal-body p { display: none; }
	.fc-card-meta { padding-top: 12px; }
	.fc-detail-backdrop, .fc-modal-backdrop { padding: 0; align-items: end; }
	.fc-detail, .fc-modal { width: 100%; max-height: 96vh; border-radius: 30px 30px 0 0; }
	.fc-detail-hero { height: 260px; }
	.fc-detail-content { padding: 22px 18px max(28px, env(safe-area-inset-bottom)); }
	.fc-form-grid { grid-template-columns: 1fr; }
	.fc-field.is-wide { grid-column: auto; }
	.fc-picker-row { grid-template-columns: auto minmax(0,1fr) 64px 60px; }
	.fc-inventory-row { grid-template-columns: auto minmax(0,1fr) auto auto; gap: 10px; }
	.fc-row-menu { display: block; }
	.fc-action-sheet { width: 100%; border-radius: 28px 28px 0 0; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
	.fc-app *, .fc-app *::before, .fc-app *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; }
}
