:focus-visible { outline: 3px solid #b98732; outline-offset: 4px; }
.nav-item[aria-current=page] { background: #e0e9df; color: #204e3e; font-weight: 750; }
[hidden] { display: none !important; }

.kitchen-main {
 --kitchen-ink: #244636;
 --kitchen-muted: #586a5b;
 --kitchen-border: #dce3d7;
 --kitchen-paper: #fffdf8;
 --kitchen-green: #edf2e7;
 max-width: 1120px;
 margin: auto;
 padding: 36px 32px 76px;
 color: var(--kitchen-ink);
}
.kitchen-heading {
 display: flex;
 justify-content: space-between;
 align-items: end;
 gap: 18px;
 margin-bottom: 26px;
}
.kitchen-heading h1 {
 margin: 5px 0 9px;
 color: var(--kitchen-ink);
 font-family: Georgia, serif;
 font-size: clamp(34px, 5vw, 56px);
 letter-spacing: -.04em;
 line-height: 1.05;
}
.kitchen-heading p:last-child { margin: 0; color: var(--kitchen-muted); }
.kitchen-companion { flex: none; white-space: nowrap; text-decoration: none; }
.kitchen-companion span { margin-left: 4px; }
.kitchen-feedback { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
#kitchen-status { margin: 0 0 12px; font-size: 14px; line-height: 1.55; }
#kitchen-status:empty, #plan-error:empty { margin: 0; }
#kitchen-status.error, #plan-error { color: #962c23; }
#kitchen-reload { margin-bottom: 12px; }
#kitchen-content[aria-busy=true], #plan-form[aria-busy=true] .picker-body { opacity: .68; }
.kitchen-main button:disabled, .kitchen-dialog button:disabled { opacity: .56; cursor: default; }

.week-overview {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 16px;
 padding: 20px 24px;
 border: 1px solid #d9e4d4;
 border-radius: 18px;
 background: linear-gradient(120deg, #e8efe3, #f3f3e8);
}
.week-overview h2 {
 margin: 5px 0;
 font-family: Georgia, serif;
 font-size: clamp(22px, 3vw, 32px);
 line-height: 1.16;
 letter-spacing: -.025em;
}
.week-overview p:last-child, .week-shopping p {
 margin: 5px 0 0;
 color: var(--kitchen-muted);
 font-size: 14px;
}
.week-navigation { display: flex; gap: 5px; align-items: center; flex: none; }
.kitchen-icon, .kitchen-text {
 color: #285341;
 background: transparent;
 border: 0;
 border-radius: 10px;
 font: inherit;
 font-weight: 750;
 cursor: pointer;
}
.kitchen-icon {
 display: inline-grid;
 place-items: center;
 min-width: 42px;
 min-height: 42px;
 border: 1px solid #d3dfd1;
 background: #fffdf8;
 font-size: 25px;
 line-height: 1;
}
.kitchen-text { padding: 9px 10px; min-height: 42px; font-size: 14px; }
.kitchen-text.danger { color: #932f26; }
.kitchen-icon:hover, .kitchen-text:hover { background: #e5eee0; }

.kitchen-week {
 display: grid;
 gap: 9px;
 margin: 14px 0;
}
.kitchen-day {
 display: grid;
 grid-template-columns: minmax(110px, 144px) minmax(0, 1fr) auto;
 align-items: start;
 gap: 16px;
 padding: 14px 16px;
 border: 1px solid var(--kitchen-border);
 border-radius: 14px;
 background: var(--kitchen-paper);
}
.kitchen-day.today {
 border-color: #a2b79c;
 box-shadow: inset 4px 0 #67856a;
}
.day-date { align-self: center; }
.day-date h3 { margin: 0; font-size: 16px; line-height: 1.3; }
.day-date span { display: block; margin-top: 4px; color: var(--kitchen-muted); font-size: 13px; }
.today .day-date span { color: #396344; font-weight: 750; }
.day-content { display: grid; gap: 6px; align-self: center; }
.day-empty { margin: 0; color: var(--kitchen-muted); font-size: 14px; }
.day-add {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 gap: 6px;
 min-width: 44px;
 min-height: 44px;
 padding: 0 11px;
 border: 1px solid #d3dfd1;
 border-radius: 10px;
 background: #f1f5eb;
 color: #285341;
 font: inherit;
 font-size: 13px;
 font-weight: 750;
 cursor: pointer;
}
.day-add:hover, .kitchen-meal:hover, .picker-recipe:hover { background: #e8f0e1; border-color: #b9cdb5; }
.day-add span:first-child { font-size: 20px; line-height: 1; }
.kitchen-meal {
 display: flex;
 gap: 12px;
 justify-content: space-between;
 align-items: center;
 text-align: left;
 min-width: 0;
 width: 100%;
 padding: 9px 12px;
 border: 1px solid #e2e8db;
 border-radius: 10px;
 background: #f6f8f1;
 color: #244636;
 font: inherit;
 cursor: pointer;
}
.meal-copy { display: grid; gap: 2px; overflow-wrap: anywhere; }
.meal-copy small { color: var(--kitchen-muted); font-size: 12px; }
.meal-copy strong { font-size: 15px; }
.meal-listed { color: #386344; font-size: 12px; }
.meal-arrow { color: #58735d; font-size: 23px; }
.week-shopping {
 display: flex;
 justify-content: space-between;
 align-items: center;
 flex-wrap: wrap;
 gap: 14px;
 padding: 18px 20px;
 border: 1px solid var(--kitchen-border);
 border-radius: 14px;
 background: #f3f1e5;
}
.week-shopping h2, .shopping-header h2 { margin: 0; font-size: 20px; }
.week-shopping a { text-decoration: none; }
.kitchen-panel {
 padding: clamp(16px, 3.5vw, 28px);
 border: 1px solid var(--kitchen-border);
 border-radius: 18px;
 background: var(--kitchen-paper);
}
.shopping-header, .shopping-actions {
 display: flex;
 align-items: center;
 justify-content: space-between;
 flex-wrap: wrap;
 gap: 12px;
}
.shopping-header .eyebrow { margin-bottom: 5px; }
.shopping-actions { justify-content: start; margin-top: 10px; gap: 4px; }
.kitchen-progress {
 display: block;
 width: 100%;
 height: 7px;
 margin: 15px 0 0;
 accent-color: #537658;
}
.kitchen-add { display: flex; gap: 8px; margin: 18px 0 8px; }
.kitchen-add input { flex: 1; }
.kitchen-empty { color: var(--kitchen-muted); line-height: 1.65; }
.kitchen-shopping { list-style: none; padding: 0; margin: 0; }
.kitchen-shopping li { border-bottom: 1px solid #e8eae1; }
.kitchen-shopping label {
 display: flex;
 gap: 12px;
 align-items: flex-start;
 min-height: 48px;
 padding: 11px 3px;
 cursor: pointer;
 overflow-wrap: anywhere;
}
.kitchen-shopping input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: #315c42; }
.kitchen-shopping small { display: block; margin-top: 3px; color: var(--kitchen-muted); font-size: 12px; }
.kitchen-shopping .done strong { text-decoration: line-through; color: #667465; }
.shopping-done-heading { margin: 18px 0 0; font-size: 14px; }
.kitchen-panel details { margin-top: 12px; border-top: 1px solid #e8eae1; padding-top: 12px; }
.kitchen-panel summary, .picker-options summary { cursor: pointer; font-weight: 700; }
.kitchen-source { display: flex; justify-content: space-between; gap: 12px; align-items: center; border-bottom: 1px solid #e4e8df; }
.kitchen-source span { overflow-wrap: anywhere; }

.kitchen-dialog {
 width: min(540px, calc(100% - 24px));
 max-height: min(88dvh, 760px);
 padding: 0;
 border: 1px solid #d5dfce;
 border-radius: 20px;
 background: #fffdf8;
 color: #244636;
 box-shadow: 0 20px 70px #15342148;
 overflow: auto;
}
.kitchen-dialog::backdrop { background: #122d23a8; }
.picker-header, .picker-footer {
 display: flex;
 justify-content: space-between;
 align-items: center;
 gap: 10px;
 padding: 16px 20px;
 background: #edf2e7;
}
.picker-header h2 { margin: 3px 0 0; font-family: Georgia, serif; font-size: clamp(23px, 5vw, 30px); line-height: 1.14; }
.picker-body { padding: 15px 20px; }
.picker-footer { justify-content: flex-end; background: #f6f7ef; border-top: 1px solid #e2e9de; }
.picker-footer .danger { margin-right: auto; }
.kitchen-dialog .field { display: flex; flex-direction: column; gap: 5px; }
.kitchen-dialog input:not([type=checkbox]), .kitchen-dialog select, .kitchen-add input {
 width: 100%;
 min-width: 0;
 min-height: 44px;
 border: 1px solid #becdbd;
 border-radius: 9px;
 padding: 9px 12px;
 background: #fff;
 color: #244636;
 font: inherit;
}
.picker-label { margin: 10px 0 5px; font-size: 12px; color: #586a5b; }
.picker-results {
 display: grid;
 gap: 5px;
 align-content: start;
 list-style: none;
 padding: 4px;
 margin: 0 -4px;
 max-height: min(42dvh, 310px);
 overflow-y: auto;
}
.picker-recipe {
 display: flex;
 align-items: center;
 gap: 8px;
 width: 100%;
 min-height: 50px;
 padding: 8px 10px;
 border: 1px solid #dfe7d9;
 border-radius: 9px;
 background: #fafbf6;
 color: #244636;
 text-align: left;
 font: inherit;
 cursor: pointer;
}
.picker-recipe-text { display: grid; gap: 1px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.picker-recipe-text small { color: #586a5b; font-size: 12px; }
.picker-favorite { color: #9a681e; }
.picker-add { color: #386344; font-size: 22px; line-height: 1; }
.picker-selection {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 10px;
 padding: 7px 12px;
 border: 1px solid #dfe7d9;
 border-radius: 10px;
 background: #f3f6eb;
 overflow-wrap: anywhere;
}
.picker-options { margin-top: 14px; padding: 10px 12px; border: 1px solid #dfe7d9; border-radius: 10px; }
.kitchen-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.picker-check { display: flex; align-items: center; gap: 8px; margin-top: 12px; cursor: pointer; }
.picker-check input { width: 19px; height: 19px; flex: none; accent-color: #315c42; }
.kitchen-hint { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: #586a5b; }
#plan-error { margin: 12px 0 0; font-size: 14px; }

@media (max-width: 650px) {
 .kitchen-main { padding: 24px 15px 60px; }
 .kitchen-heading { align-items: start; flex-direction: column; gap: 12px; margin-bottom: 18px; }
 .week-overview { padding: 14px; }
 .week-navigation { gap: 0; }
 .week-navigation .kitchen-icon { min-width: 37px; }
 .week-navigation .kitchen-text { padding: 8px 6px; }
 .kitchen-day { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 10px 12px; }
 .day-content { grid-column: 1 / -1; grid-row: 2; }
 .day-add { grid-column: 2; grid-row: 1; }
 .day-add-label { display: none; }
 .day-empty { display: none; }
 .day-content:has(.day-empty) { display: none; }
 .kitchen-add { flex-wrap: wrap; }
 .kitchen-add input { flex-basis: 100%; }
 .header-tools > a { font-size: 12px; padding: 8px; }
 .picker-header, .picker-footer, .picker-body { padding-left: 13px; padding-right: 13px; }
 .picker-results { max-height: 36dvh; }
}
@media (max-width: 365px) {
 .week-overview { flex-wrap: wrap; }
 .kitchen-form-grid { grid-template-columns: 1fr; }
}
@media print {
 .app-sidebar, .nav-scrim, .topbar, .skip-link, .kitchen-companion, .kitchen-feedback,
 .shopping-header button, .shopping-actions, .kitchen-add, .kitchen-panel details,
 .kitchen-heading .eyebrow, .shopping-done-heading, .kitchen-shopping .done { display: none !important; }
 #app-shell, body { padding: 0 !important; }
 .kitchen-main { max-width: none; margin: 0 !important; padding: 0 !important; }
 .kitchen-panel { border: 0; }
 body { background: white !important; }
}
