:root {
	color-scheme: light;

	/* Light palette. Every colour below is a variable so the dark theme only has to override these. */
	--ink: #202b26;
	--muted: #68766e;
	--paper: #f2f5f0;
	--dots: #dbe5da;
	--surface: #fff;
	--surface-alt: #f8faf7;
	--surface-faint: #ffffffc9;
	--surface-dim: #f5f7f4;
	--line: #dce4dc;
	--line-soft: #dce4dcaa;
	--line-strong: #9ab9a2;
	--field-border: #cbd7cc;
	--field-bg: #fff;
	--code-bg: #eef2ec;

	--green: #236b4a;
	--green-dark: #174632;
	--green-soft: #e4f0e7;
	--accent: #236b4a;
	--accent-hover: #174632;
	--on-accent: #fff;
	--link: #236b4a;
	--link-hover: #174632;
	--focus-ring: #236b4a24;
	--heading-accent: #174632;
	--tick: #236b4a;

	--coral: #bd563f;
	--on-coral: #fff;
	--coral-soft: #fbe9e2;
	--coral-line: #e8c8bd;
	--coral-ink: #873725;
	--coral-ink-soft: #845c52;
	--event-ink: #783b2c;

	--gold: #9b6a19;
	--on-gold: #fff;
	--gold-soft: #f7efd9;
	--gold-ink: #755019;
	--gold-line: #d5a34b;
	--today-bg: #f4e5b8;

	--done: #88938b;
	--shadow: #263c2c09;
	--shadow-strong: #263c2c13;
	--shadow-card: #263c2c14;
	--day-top: #aec8b4;
	--other-month: #9aa49c;

	/* The header and calendar header are dark green in both themes. */
	--header-bg: #174632;
	--header-ink: #e4eee6;
	--header-mark-border: #b8d0bd;

	--radius: 10px;
	font-family: "Ubuntu Sans", "Trebuchet MS", sans-serif;
	color: var(--ink);
	background: var(--paper);
}

/* Dark palette: used when the system prefers dark (unless the user chose light), or when chosen explicitly. */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		color-scheme: dark;
		--ink: #e5ece7;
		--muted: #9fb2a6;
		--paper: #0e1512;
		--dots: #17231d;
		--surface: #16211b;
		--surface-alt: #1c2a22;
		--surface-faint: #16211bcc;
		--surface-dim: #121b16;
		--line: #2a3b31;
		--line-soft: #2a3b31aa;
		--line-strong: #4b6b58;
		--field-border: #3a4f43;
		--field-bg: #0f1814;
		--code-bg: #1f2d25;

		--green: #5fbf8a;
		--green-dark: #a6e3c0;
		--green-soft: #1d3327;
		--accent: #25794f;
		--accent-hover: #2d8d5c;
		--link: #7fd1a3;
		--link-hover: #a6e3c0;
		--focus-ring: #7fd1a340;
		--heading-accent: #8fd9ae;
		--tick: #5fbf8a;

		--coral: #e07a62;
		--on-coral: #161110;
		--coral-soft: #3a211b;
		--coral-line: #5e3328;
		--coral-ink: #f2b3a3;
		--coral-ink-soft: #d9a090;
		--event-ink: #f2b3a3;

		--gold: #d5a34b;
		--on-gold: #1a1509;
		--gold-soft: #3a3016;
		--gold-ink: #e8c777;
		--today-bg: #4a3d17;

		--done: #74847a;
		--shadow: #00000033;
		--shadow-strong: #00000055;
		--shadow-card: #00000066;
		--day-top: #3b5646;
		--other-month: #5d6f64;

		--header-bg: #0b2418;
		--header-ink: #d3e4d9;
		--header-mark-border: #4b6b58;
	}
}

:root[data-theme="dark"] {
	color-scheme: dark;
	--ink: #e5ece7;
	--muted: #9fb2a6;
	--paper: #0e1512;
	--dots: #17231d;
	--surface: #16211b;
	--surface-alt: #1c2a22;
	--surface-faint: #16211bcc;
	--surface-dim: #121b16;
	--line: #2a3b31;
	--line-soft: #2a3b31aa;
	--line-strong: #4b6b58;
	--field-border: #3a4f43;
	--field-bg: #0f1814;
	--code-bg: #1f2d25;

	--green: #5fbf8a;
	--green-dark: #a6e3c0;
	--green-soft: #1d3327;
	--accent: #25794f;
	--accent-hover: #2d8d5c;
	--link: #7fd1a3;
	--link-hover: #a6e3c0;
	--focus-ring: #7fd1a340;
	--heading-accent: #8fd9ae;
	--tick: #5fbf8a;

	--coral: #e07a62;
	--on-coral: #161110;
	--coral-soft: #3a211b;
	--coral-line: #5e3328;
	--coral-ink: #f2b3a3;
	--coral-ink-soft: #d9a090;
	--event-ink: #f2b3a3;

	--gold: #d5a34b;
	--on-gold: #1a1509;
	--gold-soft: #3a3016;
	--gold-ink: #e8c777;
	--today-bg: #4a3d17;

	--done: #74847a;
	--shadow: #00000033;
	--shadow-strong: #00000055;
	--shadow-card: #00000066;
	--day-top: #3b5646;
	--other-month: #5d6f64;

	--header-bg: #0b2418;
	--header-ink: #d3e4d9;
	--header-mark-border: #4b6b58;
}

:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
	min-width: 320px;
	min-height: 100vh;
	margin: 0;
	background-color: var(--paper);
	background-image: radial-gradient(var(--dots) 0.65px, transparent 0.65px);
	background-size: 18px 18px;
	color: var(--ink);
	font-size: 16px;
	line-height: 1.5;
}

a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }

.site-header {
	color: #fff;
	background: var(--header-bg);
	border-bottom: 4px solid var(--gold-line);
}

.site-nav {
	width: min(100% - 2.5rem, 82rem);
	min-height: 76px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: .7rem;
	flex: 0 0 auto;
	color: #fff;
	font-size: 1.1rem;
	font-weight: 700;
	text-decoration: none;
}

.brand:hover { color: #fff; }

.brand-mark {
	width: 38px;
	height: 38px;
	flex: 0 0 auto;
	border: 1px solid var(--header-mark-border);
	border-radius: 8px;
	object-fit: cover;
}

.site-nav nav {
	display: flex;
	align-items: center;
	gap: .35rem;
}

.site-nav nav a {
	padding: .55rem .7rem;
	border-radius: 6px;
	color: var(--header-ink);
	font-size: .94rem;
	text-decoration: none;
	white-space: nowrap;
}

.site-nav nav a:hover,
.site-nav nav a:focus-visible {
	color: #fff;
	background: #ffffff1c;
}

.page-shell {
	width: min(100% - 2.5rem, 82rem);
	margin: 2.25rem auto 4rem;
}

h1, h2, h3, h4 {
	color: var(--ink);
	line-height: 1.2;
}

h1 {
	margin: 0 0 1.1rem;
	font-family: "Bitstream Charter", Georgia, serif;
	font-size: clamp(1.8rem, 4vw, 2.4rem);
	font-weight: 600;
}

h2 { margin: 2rem 0 .8rem; font-size: 1.25rem; }
h3 { margin: 1.5rem 0 .55rem; font-size: 1.05rem; }
p { margin: .65rem 0; }

button, input, select, textarea { font: inherit; }

button {
	min-height: 40px;
	padding: .5rem .85rem;
	border: 1px solid var(--accent);
	border-radius: 6px;
	color: var(--on-accent);
	background: var(--accent);
	cursor: pointer;
	font-size: .92rem;
	font-weight: 650;
	transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}

button:hover { border-color: var(--accent-hover); background: var(--accent-hover); }
button:active { transform: translateY(1px); }

input:not([type="checkbox"]), select, textarea {
	min-height: 42px;
	padding: .55rem .7rem;
	border: 1px solid var(--field-border);
	border-radius: 6px;
	outline: none;
	color: var(--ink);
	background: var(--field-bg);
}

input::placeholder, textarea::placeholder { color: var(--muted); opacity: .85; }

input:focus, select:focus, textarea:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--focus-ring);
}

input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 0 .45rem 0 0;
	accent-color: var(--tick);
	vertical-align: -3px;
}

label { display: block; margin: .8rem 0; font-weight: 600; }
label.check { display: inline-flex; align-items: center; gap: .2rem; margin: .45rem .9rem .45rem 0; font-weight: 500; }
textarea { width: 100%; min-height: 5.5rem; resize: vertical; }
form.inline { display: inline; }
.page-shell > form:not(.inline) { max-width: 54rem; }

main > ul {
	max-width: 54rem;
	margin: .8rem 0;
	padding: 0;
	list-style: none;
}

main > ul > li {
	min-height: 54px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: .65rem .85rem;
	border-bottom: 1px solid var(--line);
	background: var(--surface-faint);
}

main > ul > li:first-child { border-radius: 7px 7px 0 0; }
main > ul > li:last-child { border-radius: 0 0 7px 7px; }
.page-shell > form.add-ingredient-form,
.add-ingredient-form {
	max-width: none;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .65rem;
	margin: 1.25rem 0 1.5rem;
	padding: .9rem 1rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: 0 2px 8px var(--shadow);
}
.add-ingredient-form .ingredient-name-row { flex: 2; min-width: 0; display: flex; align-items: center; }
.add-ingredient-form .ingredient-name-row input { width: 100%; min-width: 0; }
.add-ingredient-form .ingredient-fields-row {
	flex: 3;
	min-width: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .55rem;
}
.add-ingredient-form .ingredient-fields-row select[name="category"],
.add-ingredient-form .ingredient-fields-row input[name="category"] { flex: 1.2; min-width: 0; }
.add-ingredient-form .ingredient-fields-row select[name="unit"],
.add-ingredient-form .ingredient-fields-row input[name="unit"] { flex: 0.9; min-width: 0; }
.add-ingredient-form .ingredient-fields-row select[name="type"] { flex: 1; min-width: 0; }
.add-ingredient-form .ingredient-fields-row select[name="store"] { flex: 1.4; min-width: 0; }
.add-ingredient-form .ingredient-fields-row button { min-height: 40px; padding: .5rem 1rem; white-space: nowrap; }

.ingredients-list {
	max-width: none;
	margin: .8rem 0;
	padding: 0;
	list-style: none;
}
.ingredients-list > li {
	min-height: 54px;
	display: flex;
	align-items: center;
	padding: .65rem .85rem;
	border-bottom: 1px solid var(--line);
	background: var(--surface-faint);
}
.ingredients-list > li:first-child { border-radius: 7px 7px 0 0; }
.ingredients-list > li:last-child { border-radius: 0 0 7px 7px; }

.ingredient-form {
	width: 100%;
	display: flex;
	align-items: center;
	gap: .65rem;
	flex-wrap: wrap;
}
.ingredient-form .ingredient-name-row {
	flex: 2;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: .5rem;
}
.ingredient-form .ingredient-name-row input[name="name"] {
	flex: 1;
	min-width: 0;
}
.ingredient-form .ingredient-fields-row {
	flex: 3;
	min-width: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .55rem;
}
.ingredient-form .ingredient-fields-row select[name="category"],
.ingredient-form .ingredient-fields-row input[name="category"] { flex: 1.2; min-width: 0; }
.ingredient-form .ingredient-fields-row select[name="unit"],
.ingredient-form .ingredient-fields-row input[name="unit"] { flex: 0.9; min-width: 0; }
.ingredient-form .ingredient-fields-row select[name="type"] { flex: 1; min-width: 0; }
.ingredient-form .ingredient-fields-row select[name="store"] { flex: 1.4; min-width: 0; }
main > ul button, form[data-confirm] button { min-height: 34px; padding: .3rem .65rem; }
.autosave-status {
	display: inline-flex;
	align-items: center;
	font-size: .82rem;
	min-width: 4rem;
	opacity: 0;
	transition: opacity .25s ease;
	pointer-events: none;
}
.autosave-status.saving {
	opacity: 1;
	color: var(--muted);
}
.autosave-status.saved {
	opacity: 1;
	color: var(--green);
	font-weight: 600;
}
.autosave-status.error {
	opacity: 1;
	color: var(--coral);
	font-weight: 600;
}

.row { display: flex; gap: .6rem; margin-bottom: .55rem; }
.row input:first-child { flex: 2; }
.row input, .row select { flex: 1; min-width: 0; }
.row button { min-width: 40px; padding: .3rem; color: var(--coral); border-color: var(--coral-line); background: var(--coral-soft); }
.row button:hover { color: var(--on-coral); border-color: var(--coral); background: var(--coral); }

.weeknav, .pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .55rem;
	margin: 1rem 0 1.35rem;
}

.weeknav a, .pagination a, .pagination span {
	padding: .45rem .75rem;
	border: 1px solid var(--line);
	border-radius: 6px;
	color: var(--heading-accent);
	background: var(--surface-faint);
	font-size: .92rem;
	font-weight: 600;
	text-decoration: none;
}

.weeknav a:hover, .pagination a:hover { border-color: var(--line-strong); background: var(--green-soft); }

.pagination span.current {
	border-color: var(--line-strong);
	background: var(--green-soft);
	color: var(--heading-accent);
}

.pagination span.ellipsis {
	border-color: transparent;
	background: transparent;
	color: var(--muted);
	padding: .45rem .3rem;
}

.week {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	align-items: stretch;
	gap: .7rem;
}

.day {
	min-width: 0;
	min-height: 235px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: .9rem;
	border: 1px solid var(--line);
	border-top: 3px solid var(--day-top);
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: 0 3px 12px var(--shadow);
}

.day.today { border-top-color: var(--gold-line); box-shadow: 0 5px 18px var(--shadow-strong); }
.day h3 { margin: 0 0 .7rem; font-size: .96rem; }
.day .meal { margin: .1rem 0 .55rem; font-family: "Bitstream Charter", Georgia, serif; font-size: 1.25rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.day .meal a {
	color: var(--heading-accent);
	text-decoration: underline;
	text-decoration-color: var(--line-strong);
	text-underline-offset: 3px;
}
.day .meal a:hover {
	color: var(--link-hover);
	text-decoration-color: currentColor;
}
.day .sides-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin: .2rem 0 .4rem; }
.side-tag {
	display: inline-flex;
	align-items: center;
	gap: .25rem;
	padding: .15rem .45rem;
	border-radius: 4px;
	border: 1px solid var(--line);
	background: var(--surface-alt);
	color: var(--ink);
	font-size: .8rem;
	font-weight: 500;
}
.side-tag a {
	color: inherit;
	text-decoration: none;
}
.side-tag a:hover {
	color: var(--link-hover);
	text-decoration: underline;
}
.side-tag button.side-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	min-height: 0;
	padding: 0;
	margin: 0;
	border: none;
	background: transparent;
	color: var(--muted);
	font-size: .95rem;
	line-height: 1;
	cursor: pointer;
}
.side-tag button.side-remove:hover {
	color: var(--coral);
	background: transparent;
}
.day select.side-select {
	width: 100%;
	min-height: 30px;
	margin: .1rem 0 .5rem;
	padding: .2rem .4rem;
	font-size: .8rem;
	color: var(--muted);
	border: 1px dashed var(--line-strong);
	border-radius: 4px;
	background: var(--surface-dim);
}
.day select.side-select:hover, .day select.side-select:focus {
	border-color: var(--accent);
	color: var(--ink);
}
.day .empty, .day .eating { margin: .15rem 0 .6rem; color: var(--muted); font-size: .88rem; }
.day .warn { padding: .3rem .5rem; border-radius: 5px; color: var(--coral-ink); background: var(--coral-soft); font-size: .8rem; }
.badge { display: inline-block; margin: .12rem .15rem .12rem 0; padding: .2rem .5rem; border-radius: 4px; color: var(--gold-ink); background: var(--gold-soft); font-size: .78rem; font-weight: 650; }
.day .eating { margin-top: auto; padding-top: .8rem; }
.day > button { min-height: 34px; margin: .18rem .2rem .18rem 0; padding: .35rem .55rem; font-size: .82rem; }
.day > button + button { color: var(--heading-accent); border-color: var(--line); background: var(--surface-alt); }
.day > button + button:hover { border-color: var(--line-strong); background: var(--green-soft); }

.picker { min-height: 260px; border-top-color: var(--gold); }

/* Meal selection modal */
.meal-modal {
	padding: 0;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--ink);
	width: min(94vw, 560px);
	max-height: 85vh;
	box-shadow: 0 16px 48px var(--shadow-card);
	overflow: hidden;
}

.meal-modal::backdrop {
	background: rgba(14, 21, 18, 0.65);
	backdrop-filter: blur(2px);
}

.meal-modal-content {
	display: flex;
	flex-direction: column;
	max-height: 85vh;
	min-height: 0;
	overflow: hidden;
}

.meal-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.25rem .75rem;
	border-bottom: 1px solid var(--line);
	background: var(--surface);
}

.meal-modal-header h3 {
	margin: 0;
	font-size: 1.15rem;
	color: var(--heading-accent);
}

.meal-modal-subtitle {
	margin: .15rem 0 0;
	font-size: .84rem;
	color: var(--muted);
}

.modal-close-btn {
	width: 36px;
	min-height: 36px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid transparent;
	border-radius: 6px;
	background: transparent;
	color: var(--muted);
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}

.modal-close-btn:hover, .modal-close-btn:focus {
	background: var(--surface-alt);
	color: var(--ink);
	border-color: var(--line);
}

.meal-modal .meal-search-combobox {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	padding: .85rem 1.25rem 0;
}

.meal-modal .search-field {
	margin-bottom: .6rem;
}

.meal-modal .meal-search-input {
	width: 100%;
	min-height: 42px;
	padding: .5rem .75rem;
	border: 1px solid var(--field-border);
	border-radius: 6px;
	background: var(--field-bg);
	color: var(--ink);
	font-size: 1rem;
}

.meal-modal .meal-search-input:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--focus-ring);
}

.meal-modal .meal-dropdown {
	flex: 1 1 auto;
	min-height: 0;
	max-height: 50vh;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--surface-dim);
	padding: .5rem;
	margin-bottom: .75rem;
}

.meal-modal .meal-dropdown h4 {
	margin: .6rem 0 .3rem;
	font-size: .8rem;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: .03em;
}

.meal-modal .meal-dropdown h4:first-child {
	margin-top: .15rem;
}

.meal-modal .meal-option {
	width: 100%;
	min-height: 42px;
	display: flex;
	align-items: center;
	margin: 0 0 .35rem;
	padding: .5rem .75rem;
	text-align: left;
	font-size: .95rem;
	border-radius: 6px;
	border: 1px solid transparent;
	background: var(--surface);
	color: var(--ink);
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease;
}

.meal-modal .meal-option:hover, .meal-modal .meal-option:focus {
	background: var(--green-soft);
	border-color: var(--line-strong);
	color: var(--green-dark);
}

.meal-modal .meal-group-unsuitable .meal-option {
	background: var(--coral-soft);
	border-color: var(--coral-line);
	color: var(--coral-ink);
}

.meal-modal .meal-group-unsuitable .meal-option:hover,
.meal-modal .meal-group-unsuitable .meal-option:focus {
	background: var(--coral-soft);
	border-color: var(--coral);
	color: var(--coral-ink);
}

.meal-modal .empty {
	margin: .4rem;
	padding: .6rem;
	text-align: center;
	color: var(--muted);
	font-size: .9rem;
}

.no-meals-match {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .4rem;
	padding: .8rem;
	margin: 0;
	text-align: center;
	color: var(--muted);
	font-size: .88rem;
}
.no-meals-match p {
	margin: 0;
}
.create-meal-link {
	display: inline-block;
	padding: .35rem .75rem;
	border-radius: 6px;
	border: 1px solid var(--line-strong);
	background: var(--surface-alt);
	color: var(--heading-accent);
	font-size: .88rem;
	font-weight: 500;
	text-decoration: none;
	transition: background .15s ease, border-color .15s ease;
}
.create-meal-link:hover {
	background: var(--green-soft);
	border-color: var(--line-strong);
	color: var(--green-dark);
}

.meal-modal-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .65rem;
	padding: .75rem 1.25rem 1rem;
	border-top: 1px solid var(--line);
	background: var(--surface);
}

.meal-modal .picker-cancel {
	min-height: 38px;
	padding: .45rem 1.1rem;
}

.meal-modal .picker-add-meal {
	min-height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: .45rem 1rem;
	font-weight: 600;
}

.shopping { max-width: 58rem; overflow-anchor: none; }
.shopping > form { display: flex; gap: .55rem; max-width: 40rem; margin: .8rem 0; }
.shopping > form input[name="text"] { flex: 1; min-width: 0; }
.shopping h2 { margin-top: 2rem; padding-bottom: .55rem; border-bottom: 1px solid var(--line); }
.shopping h3 { margin: 1rem 0 .4rem; color: var(--heading-accent); }
.shopping ul { margin: .35rem 0 1rem; padding: 0; list-style: none; }
.shopping li { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .35rem .25rem; border-bottom: 1px solid var(--line-soft); }
.shopping li label { display: flex; align-items: center; gap: .35rem; margin: 0; cursor: pointer; font-weight: 500; }
.shopping li button { width: 34px; min-height: 32px; padding: .1rem; color: var(--coral); border-color: transparent; background: transparent; font-size: 1.2rem; }
.shopping li button:hover { border-color: var(--coral-line); background: var(--coral-soft); }
.done { color: var(--done); text-decoration: line-through; }
.shopping .shopping-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.5rem; }
.shopping .shopping-actions button + button { color: var(--coral); border-color: var(--coral-line); background: var(--surface); }
.shopping .shopping-actions button + button:hover { color: var(--on-coral); border-color: var(--coral); background: var(--coral); }

.absence-entry {
	max-width: 58rem;
	margin-bottom: 2rem;
	padding-bottom: 1.35rem;
	border-bottom: 1px solid var(--line);
}

.absence-entry h2 { margin: 0 0 .8rem; }
.absence-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .15rem 1rem; }
.absence-fields label { margin: .4rem 0; }
.absence-fields input, .absence-fields select { width: 100%; display: block; margin-top: .25rem; }
.absence-fields .absence-note { grid-column: 1 / -1; }
.absence-calendar { max-width: 82rem; }
.calendar-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .8rem; }
.calendar-toolbar h2 { margin: 0; font-family: "Bitstream Charter", Georgia, serif; font-size: 1.65rem; }
.calendar-nav { display: flex; flex-wrap: wrap; gap: .45rem; }
.calendar-nav a { padding: .4rem .7rem; border: 1px solid var(--line); border-radius: 6px; color: var(--heading-accent); background: var(--surface-faint); font-size: .9rem; font-weight: 600; text-decoration: none; }
.calendar-nav a:hover { border-color: var(--line-strong); background: var(--green-soft); }
.calendar-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--line); }
.calendar-grid { min-width: 700px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; }
.calendar-weekday { padding: .55rem .65rem; color: var(--header-ink); background: var(--header-bg); font-size: .82rem; font-weight: 650; }
.calendar-cell { min-width: 0; min-height: 132px; padding: .45rem; background: var(--surface); }
.calendar-cell.other-month { background: var(--surface-dim); }
.calendar-cell.today { box-shadow: inset 0 0 0 2px var(--gold-line); }
.calendar-date { width: 29px; height: 29px; display: grid; place-items: center; margin-bottom: .35rem; border-radius: 50%; color: var(--ink); font-size: .88rem; font-weight: 700; }
.other-month .calendar-date { color: var(--other-month); }
.calendar-cell.today .calendar-date { color: var(--ink); background: var(--today-bg); }
.calendar-events { display: grid; gap: .25rem; }
.absence-event { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 .2rem; padding: .25rem .3rem; border-left: 3px solid var(--coral); border-radius: 3px; color: var(--event-ink); background: var(--coral-soft); font-size: .75rem; line-height: 1.25; }
.absence-event > span:first-child { grid-column: 1; font-weight: 700; overflow-wrap: anywhere; }
.absence-event .absence-event-note { grid-column: 1; color: var(--coral-ink-soft); overflow-wrap: anywhere; }
.absence-event form { grid-column: 2; grid-row: 1 / span 2; }
.absence-event button { width: 22px; min-height: 22px; padding: 0; border-color: transparent; color: var(--coral); background: transparent; font-size: 1rem; line-height: 1; }
.absence-event button:hover { border-color: var(--coral-line); color: var(--on-coral); background: var(--coral); }

:focus-visible { outline: 3px solid var(--gold-line); outline-offset: 2px; }

@media (max-width: 1050px) {
	.site-nav { align-items: flex-start; flex-direction: column; gap: .35rem; padding: .85rem 0 .75rem; }
	.site-nav nav { width: 100%; overflow-x: auto; padding-bottom: .1rem; }
	.week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
	.site-nav, .page-shell { width: min(100% - 1.5rem, 82rem); }
	.page-shell { margin-top: 1.5rem; }
	.site-nav nav { flex-wrap: wrap; overflow: visible; }
	.site-nav nav a { padding: .35rem .5rem; }
	.week { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
	.day { min-height: 210px; padding: .75rem; }
	.weeknav { gap: .4rem; }
	.weeknav a { padding: .4rem .55rem; font-size: .86rem; }
	.absence-fields { grid-template-columns: 1fr; }
	.absence-fields .absence-note { grid-column: auto; }
	.calendar-toolbar { align-items: flex-start; flex-direction: column; }
	.meal-modal {
		width: 100%;
		max-width: 100%;
		max-height: 90dvh;
		margin-top: auto;
		margin-bottom: 0;
		margin-left: 0;
		margin-right: 0;
		border-radius: 16px 16px 0 0;
		border-bottom: none;
		border-left: none;
		border-right: none;
	}
	.meal-modal-content {
		max-height: 90dvh;
	}
	.meal-modal-header {
		padding: .85rem 1rem .65rem;
	}
	.meal-modal .meal-search-combobox {
		padding: .65rem 1rem 0;
	}
	.meal-modal .meal-dropdown {
		max-height: 52dvh;
	}
	.meal-modal .meal-option {
		min-height: 46px;
		font-size: 1rem;
		padding: .6rem .8rem;
		margin-bottom: .45rem;
	}
	.meal-modal-footer {
		display: flex;
		flex-direction: column-reverse;
		gap: .5rem;
		padding: .65rem 1rem max(1rem, env(safe-area-inset-bottom));
	}
	.meal-modal .picker-cancel,
	.meal-modal .picker-add-meal {
		width: 100%;
		min-height: 44px;
	}
	.add-ingredient-form {
		display: flex;
		flex-direction: column;
		gap: .65rem;
		padding: .85rem .9rem;
	}
	.add-ingredient-form .ingredient-name-row,
	.add-ingredient-form .ingredient-fields-row {
		width: 100%;
	}
	.add-ingredient-form .ingredient-fields-row {
		display: flex;
		flex-wrap: wrap;
		gap: .5rem;
	}
	.add-ingredient-form .ingredient-fields-row select[name="category"],
	.add-ingredient-form .ingredient-fields-row input[name="category"] {
		flex: 2 1 130px;
		min-width: 0;
		width: auto;
	}
	.add-ingredient-form .ingredient-fields-row select[name="unit"],
	.add-ingredient-form .ingredient-fields-row input[name="unit"] {
		flex: 1 1 70px;
		min-width: 0;
		max-width: 7rem;
		width: auto;
	}
	.add-ingredient-form .ingredient-fields-row select[name="type"] {
		flex: 1 1 105px;
		min-width: 0;
		width: auto;
	}
	.add-ingredient-form .ingredient-fields-row select[name="store"] {
		flex: 1.5 1 145px;
		min-width: 0;
		width: auto;
	}
	.add-ingredient-form .ingredient-fields-row button {
		flex: 1 1 100%;
		width: 100%;
		min-height: 42px;
		margin-top: .2rem;
	}

	.ingredients-list > li {
		display: block;
		width: 100%;
		margin-bottom: .65rem;
		padding: .85rem .9rem;
		border: 1px solid var(--line);
		border-radius: var(--radius);
		background: var(--surface);
		box-shadow: 0 1px 4px var(--shadow);
	}
	.ingredients-list > li:first-child { border-radius: var(--radius); }
	.ingredients-list > li:last-child { border-radius: var(--radius); }

	.ingredient-form {
		display: flex;
		flex-direction: column;
		gap: .55rem;
		width: 100%;
	}
	.ingredient-form .ingredient-name-row {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: .5rem;
		width: 100%;
	}
	.ingredient-form .ingredient-name-row input[name="name"] {
		flex: 1;
		min-width: 0;
		width: 100%;
		font-size: 1rem;
		font-weight: 600;
	}
	.ingredient-form .autosave-status {
		flex: 0 0 auto;
		min-width: 3.5rem;
		font-size: .8rem;
		text-align: right;
		justify-content: flex-end;
	}
	.ingredient-form .ingredient-fields-row {
		display: flex;
		flex-wrap: wrap;
		gap: .5rem;
		width: 100%;
	}
	.ingredient-form .ingredient-fields-row select[name="category"],
	.ingredient-form .ingredient-fields-row input[name="category"] {
		flex: 2 1 130px;
		min-width: 0;
		width: auto;
	}
	.ingredient-form .ingredient-fields-row select[name="unit"],
	.ingredient-form .ingredient-fields-row input[name="unit"] {
		flex: 1 1 70px;
		min-width: 0;
		max-width: 7rem;
		width: auto;
	}
	.ingredient-form .ingredient-fields-row select[name="type"] {
		flex: 1 1 105px;
		min-width: 0;
		width: auto;
	}
	.ingredient-form .ingredient-fields-row select[name="store"] {
		flex: 1.5 1 145px;
		min-width: 0;
		width: auto;
	}
	.ingredient-form select,
	.ingredient-form input {
		max-width: 100%;
		text-overflow: ellipsis;
	}
	.pagination {
		justify-content: center;
		gap: .35rem;
	}
	.pagination a, .pagination span {
		padding: .35rem .55rem;
		font-size: .85rem;
	}
}

@media (max-width: 420px) {
	.week { grid-template-columns: 1fr; }
	.day { min-height: 0; }
	.day .eating { margin-top: .2rem; }
	.shopping > form { align-items: stretch; flex-direction: column; }
	.row { flex-wrap: wrap; }
	.row input:first-child { flex-basis: 100%; }
	.ingredient-form .ingredient-name-row input[name="name"] { width: 100%; }
}

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

.site-nav nav form { display: inline-flex; margin: 0; }
.site-nav nav .nav-account { margin-left: .6rem; padding-left: 1rem; border-left: 1px solid #ffffff3a; border-radius: 0; font-weight: 650; }
button.link { min-height: 0; padding: .55rem .7rem; border: 0; color: var(--header-ink); background: transparent; font-size: .94rem; font-weight: 400; }
button.link:hover { color: #fff; background: #ffffff1c; }
.auth-card button.link, .panel button.link { color: var(--link); }
.auth-card button.link:hover { color: var(--link-hover); background: transparent; }
button.secondary { color: var(--heading-accent); border-color: var(--line); background: var(--surface-alt); }
button.secondary:hover { border-color: var(--line-strong); background: var(--green-soft); }
button.danger { color: var(--coral); border-color: var(--coral-line); background: var(--surface); }
button.danger:hover { color: var(--on-coral); border-color: var(--coral); background: var(--coral); }
.auth-card { max-width: 26rem; margin: 3rem auto; padding: 1.75rem; border: 1px solid var(--line); border-top: 4px solid var(--gold-line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 6px 24px var(--shadow-card); }
.auth-card h1 { font-size: 1.7rem; }
.auth-card label input { width: 100%; display: block; margin-top: .3rem; }
.auth-card form button:not(.link) { width: 100%; margin-top: .4rem; }
.alert { padding: .65rem .85rem; border-left: 4px solid var(--coral); border-radius: 4px; color: var(--coral-ink); background: var(--coral-soft); }
.notice { padding: .65rem .85rem; border-left: 4px solid var(--accent); border-radius: 4px; color: var(--heading-accent); background: var(--green-soft); }
.muted { color: var(--muted); font-size: .9rem; }
.panel { max-width: 54rem; margin: 1.25rem 0; padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel h2 { margin-top: 0; font-size: 1.15rem; }
.panel form { margin: .75rem 0; }
.panel label input, .panel label select { display: block; margin-top: .3rem; }
.panel ul.plain { margin: 0 0 .8rem; padding: 0; list-style: none; }
.panel ul.plain li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-bottom: 1px solid var(--line); }
ul.codes { columns: 2; margin: .5rem 0; padding: 0; list-style: none; }
ul.codes code, code { padding: .1rem .35rem; border-radius: 4px; background: var(--code-bg); font-size: .95rem; }
/* The QR code keeps its own white background and black modules in both themes so scanners can read it. */
.qr svg { display: block; width: 14rem; max-width: 100%; height: auto; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 8px; shape-rendering: crispEdges; }
.panel:has(table.users) { max-width: none; overflow-x: auto; }
table.users { width: 100%; border-collapse: collapse; }
table.users th, table.users td { padding: .55rem .6rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.users td.actions form { margin: .15rem 0; }
table.users td.actions button, table.users td.actions input { min-height: 34px; padding: .3rem .6rem; font-size: .85rem; }

.day .cook { display: block; width: 100%; margin: .2rem 0 .5rem; font-size: .8rem; font-weight: 600; color: var(--muted); }
.day .cook select { width: 100%; min-height: 34px; margin-top: .2rem; padding: .25rem .4rem; font-size: .88rem; font-weight: 500; }

.manual-key { margin: .9rem 0; }
.manual-key label { margin: 0 0 .3rem; font-weight: 500; color: var(--muted); }
.copy-row { display: flex; gap: .5rem; max-width: 30rem; }
.copy-row input { flex: 1; min-width: 0; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; letter-spacing: .04em; -webkit-user-select: all; user-select: all; }
ul.codes code { -webkit-user-select: all; user-select: all; }

/* Theme toggle in the header */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; min-height: 0; width: 38px; height: 38px; padding: 0; border: 1px solid #ffffff3a; border-radius: 8px; color: var(--header-ink); background: transparent; font-size: 1.1rem; line-height: 1; }
.theme-toggle:hover { color: #fff; border-color: #ffffff66; background: #ffffff1c; }
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-system { display: inline-flex; align-items: center; justify-content: center; }

:root[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
:root[data-theme="dark"] .theme-toggle .icon-moon,
:root[data-theme="dark"] .theme-toggle .icon-system { display: none; }

:root[data-theme="light"] .theme-toggle .icon-moon { display: inline; }
:root[data-theme="light"] .theme-toggle .icon-sun,
:root[data-theme="light"] .theme-toggle .icon-system { display: none; }
.header-tools { display: flex; align-items: center; gap: .6rem; }

.shopping-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin: .8rem 0 1.2rem; }
.shopping-filters-form {
	max-width: none;
	display: flex;
	flex-direction: column;
	gap: .65rem;
	margin: .8rem 0 1.25rem;
	padding: .85rem 1rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: 0 2px 8px var(--shadow);
}
.shopping-filters-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .75rem;
}
.shopping-filter-item {
	display: inline-flex;
	align-items: center;
}
.shopping-filter-search-wrap {
	flex: 1 1 180px;
	min-width: 0;
}
.shopping-filter-search-wrap input {
	width: 100%;
}
.shopping-filter-select-wrap {
	flex: 0 1 180px;
	min-width: 140px;
}
.shopping-filter-select-wrap select {
	width: 100%;
}
.shopping-filter-checkbox-wrap {
	flex: 0 0 auto;
}
.shopping-filter-checkbox-label {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	font-size: .92rem;
	font-weight: 500;
	cursor: pointer;
	user-select: none;
	margin: 0;
}
.shopping-filter-checkbox-label input[type="checkbox"] {
	margin: 0;
	cursor: pointer;
}
.shopping-filters-form .clear-filters-link {
	padding: .4rem .75rem;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--surface-alt);
	color: var(--heading-accent);
	font-size: .88rem;
	font-weight: 600;
	text-decoration: none;
	margin-left: auto;
}
.shopping-filters-form .clear-filters-link:hover {
	border-color: var(--line-strong);
	background: var(--green-soft);
}
.shopping-filter-summary {
	font-size: .85rem;
	color: var(--muted);
	margin: 0;
}
.shopping-empty-filter {
	padding: 1.5rem 1rem;
	text-align: center;
	border: 1px dashed var(--line);
	border-radius: var(--radius);
	background: var(--surface-alt);
	margin: 1.5rem 0;
}
.shopping-empty-filter p {
	margin: .4rem 0;
}
.shopping-item-actions { display: inline-flex; align-items: center; gap: .45rem; flex: 0 0 auto; }
.shopping li.shopping-item-needed {
	background: var(--today-bg);
	border-left: 4px solid var(--gold);
	padding-left: .6rem;
	padding-right: .45rem;
	border-radius: 5px;
}
.shopping li button.need-toggle-btn {
	width: auto;
	min-height: 28px;
	padding: .2rem .55rem;
	border: 1px solid var(--line);
	border-radius: 5px;
	background: var(--surface-alt);
	color: var(--muted);
	font-size: .78rem;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
}
.shopping li button.need-toggle-btn:hover {
	border-color: var(--gold-line);
	background: var(--gold-soft);
	color: var(--gold-ink);
}
.shopping li button.need-toggle-btn.active {
	border-color: var(--gold);
	background: var(--gold);
	color: var(--on-gold);
}
.shopping li button.need-toggle-btn.active:hover {
	border-color: var(--gold-ink);
	background: var(--gold-ink);
	color: var(--on-gold);
}
.tesco-link {
	display: inline-flex;
	align-items: center;
	gap: .2rem;
	padding: .2rem .55rem;
	border: 1px solid var(--line);
	border-radius: 5px;
	background: var(--surface-alt);
	color: var(--heading-accent);
	font-size: .78rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.tesco-link:hover {
	border-color: var(--line-strong);
	background: var(--green-soft);
	color: var(--link-hover);
}

.ingredients-search-form {
	max-width: none;
	display: flex;
	flex-direction: column;
	gap: .65rem;
	margin: 1.25rem 0;
	padding: .9rem 1rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: 0 2px 8px var(--shadow);
}
.ingredients-search-form .search-input-row { display: flex; width: 100%; }
.ingredients-search-form .ingredients-search-input { width: 100%; min-width: 0; }
.ingredients-search-form .search-filters-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .55rem;
}
.ingredients-search-form .search-filters-row select { flex: 1 1 130px; min-width: 0; }
.ingredients-search-form .clear-filters-link {
	padding: .45rem .75rem;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--surface-alt);
	color: var(--heading-accent);
	font-size: .9rem;
	font-weight: 600;
	text-decoration: none;
}
.ingredients-search-form .clear-filters-link:hover {
	border-color: var(--line-strong);
	background: var(--green-soft);
}
#ingredients-clear-wrap:empty { display: none; }
.ingredients-summary { margin: .4rem 0 .6rem; }

.ingredients-list > li.ingredient-card {
	display: flex;
	align-items: center;
	gap: .65rem;
}
.ingredient-card .ingredient-form { flex: 1; min-width: 0; }
.ingredient-delete-form { flex: 0 0 auto; margin: 0; }
.ingredient-delete-btn, .unit-delete-btn {
	min-width: 34px;
	min-height: 34px;
	padding: .2rem .55rem;
	font-size: 1.15rem;
	line-height: 1;
}
.ingredient-meals-badge {
	flex: 0 0 auto;
	white-space: nowrap;
	font-size: .75rem;
	padding: .15rem .45rem;
	cursor: default;
}
.ingredient-meals-badge.ingredient-meals-unused {
	color: var(--muted);
	background: var(--surface-alt);
	border: 1px solid var(--line);
}
button.ingredient-meals-badge {
	min-height: 0;
	margin: 0;
	padding: .2rem .55rem;
	border: 1px solid var(--gold);
	border-radius: 4px;
	color: var(--gold-ink);
	background: var(--gold-soft);
	font-size: .75rem;
	font-weight: 650;
	line-height: 1.2;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
button.ingredient-meals-badge:hover {
	background: var(--gold);
	color: var(--on-gold);
	border-color: var(--gold);
}
button.ingredient-meals-badge:active {
	transform: translateY(1px);
}

.ingredient-meals-modal-body {
	flex: 1 1 auto;
	min-height: 0;
	max-height: 55vh;
	overflow-y: auto;
	padding: .85rem 1.25rem;
}

.modal-meals-list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: .45rem;
}

.modal-meal-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	padding: .65rem .85rem;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--surface-dim);
	color: var(--ink);
	text-decoration: none;
	transition: background .15s ease, border-color .15s ease;
}

.modal-meal-item:hover {
	background: var(--green-soft);
	border-color: var(--line-strong);
	color: var(--green-dark);
}

.modal-meal-name {
	font-weight: 600;
	font-size: .95rem;
}

.modal-meal-type {
	font-size: .72rem;
	text-transform: capitalize;
}

.categories-manager,
.units-manager {
	max-width: none;
}
.categories-manager summary,
.units-manager summary {
	cursor: pointer;
	font-weight: 650;
	color: var(--heading-accent);
	user-select: none;
}
.categories-manager[open] summary,
.units-manager[open] summary { margin-bottom: .65rem; }
.categories-manager .unit-edit-form input[name="name"] { width: 11.5rem; }
.add-unit-form { display: flex; flex-wrap: wrap; gap: .55rem; max-width: 28rem; margin: .75rem 0 1rem; }
.add-unit-form input[name="name"] { flex: 1; min-width: 0; }
.units-list {
	display: flex;
	flex-wrap: wrap;
	gap: .55rem;
	margin: .5rem 0 0;
	padding: 0;
	list-style: none;
}
.unit-chip {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	padding: .35rem .5rem;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--surface-alt);
}
.unit-edit-form {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	margin: 0;
}
.unit-edit-form input[name="name"] {
	width: 6.5rem;
	min-height: 34px;
	padding: .25rem .5rem;
	font-size: .9rem;
}
.unit-edit-form .autosave-status { min-width: auto; font-size: .75rem; }
.unit-delete-form { margin: 0; }

.day .defrost-reminder {
	width: 100%;
	margin: 0 0 .55rem;
	padding: .35rem .5rem;
	border: 1px solid var(--gold-line);
	border-radius: 5px;
	background: var(--gold-soft);
	color: var(--gold-ink);
	font-size: .8rem;
	line-height: 1.3;
}
.day .freezer-toggle {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .25rem;
	width: 100%;
	margin: .2rem 0 .35rem;
	font-size: .82rem;
	font-weight: 500;
	color: var(--ink);
	cursor: pointer;
}
.day .freezer-note {
	color: var(--muted);
	font-size: .78rem;
}

.week-lunch {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .6rem 1rem;
	margin: 0 0 1rem;
	padding: .65rem .9rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: 0 1px 3px var(--shadow-card);
}
.week-lunch-main {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem;
}
.week-lunch-label {
	font-weight: 600;
	color: var(--heading-accent);
}
.week-lunch-select {
	width: auto;
	min-width: 12rem;
	margin: 0;
}
.week-lunch-items,
.week-lunch-empty,
.lunch-item-summary {
	color: var(--muted);
	font-size: .9rem;
}
.week-lunch-manage {
	font-size: .88rem;
}

.lunch-rotation-list,
.takeaway-rotation-list {
	max-width: 54rem;
	margin: .8rem 0;
	padding-left: 1.5rem;
}
.lunch-rotation-list > li,
.takeaway-rotation-list > li {
	padding: .55rem .85rem;
	margin-bottom: .45rem;
	border: 1px solid var(--line);
	border-radius: 7px;
	background: var(--surface-faint);
}
.lunch-rotation-list > li form.inline,
.takeaway-rotation-list > li form.inline {
	margin-left: .25rem;
}
.lunch-rotation-list button,
.takeaway-rotation-list button {
	min-height: 34px;
	padding: .3rem .65rem;
}

.badge-cant-cook {
	display: inline-flex;
	align-items: center;
	gap: .25rem;
	color: var(--coral-ink);
	background: var(--coral-soft);
}
.badge-cant-cook button.cant-cook-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	min-height: 0;
	padding: 0;
	margin: 0;
	border: none;
	background: transparent;
	color: var(--coral-ink);
	font-size: .95rem;
	line-height: 1;
	cursor: pointer;
}
.badge-cant-cook button.cant-cook-remove:hover {
	color: var(--coral);
	background: transparent;
}
.day select.cant-cook-select {
	width: 100%;
	min-height: 30px;
	margin: .1rem 0 .4rem;
	padding: .2rem .4rem;
	font-size: .8rem;
	color: var(--muted);
	border: 1px dashed var(--line-strong);
	border-radius: 4px;
	background: var(--surface-dim);
}
.day select.cant-cook-select:hover,
.day select.cant-cook-select:focus {
	border-color: var(--accent);
	color: var(--ink);
}
.day > button.cant-cook-toggle.active {
	color: var(--coral-ink);
	border-color: var(--coral-line);
	background: var(--coral-soft);
}
.day > button.cant-cook-toggle.active:hover {
	border-color: var(--coral);
	background: var(--coral-soft);
}




