.week-overview{display:grid;gap:12px;width:100%;min-width:0;color:#274559}
.week-overview-day{min-width:0;padding:12px;border:1px solid #dce9f2;border-radius:16px;background:#f7fbff;box-shadow:0 3px 12px #355c7810;scroll-margin-top:12px}
.week-overview-day-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:3px 8px;padding:0 2px 8px;border-bottom:1px solid #e1ebf2}
.week-overview-day-heading h2{min-width:0;margin:0;text-transform:capitalize}
.week-overview-day-heading h2>button{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:2px 8px;width:100%;min-height:58px;padding:8px 10px;border:1px solid #c8ddeb;border-radius:14px;background:linear-gradient(135deg,#f0f8ff,#fff);color:#234f6d;font:inherit;line-height:1.15;box-shadow:0 2px 7px #315f7910;text-align:center;text-transform:capitalize}
.week-overview-day-heading h2>button:hover{background:#e8f4fc;border-color:#93bdd8}
.week-overview-day-heading h2>button>span{font-size:calc(var(--app-text-scale, 1) * 18px);font-weight:800}
.week-overview-day-heading h2>button>strong{font-size:calc(var(--app-text-scale, 1) * 18px);font-weight:700;white-space:nowrap}
.week-overview-day-heading h2>button>small{flex-basis:100%;padding:1px 6px;border-radius:99px;color:#286d9f;font-size:calc(var(--app-text-scale, 1) * 11px);font-weight:750}
.week-overview-day-kcal{grid-column:1;grid-row:2;color:#a33d45;font-size:calc(var(--app-text-scale, 1) * 12px);font-weight:700;font-variant-numeric:tabular-nums}
.week-overview-clear-day{grid-column:2;grid-row:1;justify-self:end;min-width:44px;min-height:44px;padding:5px;border:1px solid transparent;border-radius:10px;background:transparent;color:#6b7e8a;box-shadow:none}
.week-overview-clear-day:disabled{opacity:.45}
.week-overview-nutrition{margin:6px 0 0;color:#536f82;font-size:calc(var(--app-text-scale, 1) * 12px)}
.week-overview-nutrition summary{min-height:32px;padding:7px 2px;cursor:pointer;font-weight:650}
.week-overview-macros{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;padding:0 0 6px}
.week-overview-slots{display:grid;gap:7px;padding-top:8px}
.week-overview-slot{display:grid;grid-template-columns:minmax(78px,104px) minmax(0,1fr) auto;align-items:center;gap:7px;min-width:0;padding:7px;border:1px solid #e2ebf1;border-radius:11px;background:#fff}
.week-overview-slot-heading{display:grid;gap:3px;min-width:0}
.week-overview-slot-heading h3{display:flex;align-items:center;gap:5px;min-width:0;margin:0;color:#385d76;font-size:calc(var(--app-text-scale, 1) * 13px);line-height:1.2}
.week-overview-slot-heading h3>span{display:block;width:19px;height:19px;flex:0 0 19px}
.week-overview-slot-heading h3 svg{display:block;width:100%;height:100%}
.week-overview-slot-kcal{font-size:calc(var(--app-text-scale, 1) * 11px);line-height:1.25;color:#a33d45;font-weight:700;font-variant-numeric:tabular-nums}
.week-overview-empty{grid-column:2;margin:0;color:#758795;font-size:calc(var(--app-text-scale, 1) * 12px);line-height:1.3}
.week-overview-meals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;min-width:0}
.week-overview-meal{display:grid;grid-template-columns:52px minmax(0,1fr);grid-template-rows:minmax(0,1fr) 36px;align-items:center;gap:2px 6px;min-width:0;padding:4px;border:1px solid #edf1f4;border-radius:9px;background:#fbfdff}
.week-overview-recipe{grid-column:1;grid-row:1 / span 2;display:block;width:52px;height:54px;min-width:44px;min-height:44px;margin:0;padding:0;overflow:hidden;border:0;border-radius:7px;background:#edf4fa;box-shadow:none}
.week-overview-recipe .food-photo{position:relative;width:100%;height:100%;min-height:0;margin:0;overflow:hidden;border-radius:7px;aspect-ratio:auto}
.week-overview-recipe .food-photo img{display:block;width:100%;height:100%;object-fit:cover}
.week-overview-recipe .food-photo figcaption{display:none}
.week-overview-no-photo,.week-overview-quick-icon{display:grid;place-items:center;width:100%;height:100%;min-height:44px;background:#edf4fa;color:#607b91;font-size:20px}
.week-overview-quick-icon{grid-column:1;grid-row:1 / span 2;width:52px;height:54px;border-radius:7px}
.week-overview-meal-content{grid-column:2;grid-row:1;align-self:end;display:grid;gap:2px;min-width:0}
.week-overview-meal-content strong{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow-wrap:anywhere;color:#274559;font-size:calc(var(--app-text-scale, 1) * 12px);line-height:1.25}
.week-overview-meal-kcal{color:#a33d45;font-size:calc(var(--app-text-scale, 1) * 11px);line-height:1.2;font-weight:700;font-variant-numeric:tabular-nums}
.week-overview-meal-actions{grid-column:2;grid-row:2;display:flex;justify-content:flex-end;align-items:center;gap:2px;min-width:0}
.week-overview-meal-actions button{display:grid;place-items:center;width:36px;height:36px;min-width:36px;min-height:36px;margin:0;padding:0;border:0;border-radius:8px;background:transparent;color:#536b7b;box-shadow:none}
.week-overview-meal-actions svg{display:block;width:15px;height:15px}
.week-overview-meal-actions button>span{font-size:calc(var(--app-text-scale, 1) * 18px);line-height:1}
.week-overview-slot-actions{grid-column:3;display:grid;gap:3px;justify-items:stretch;min-width:58px}
.week-overview-add,.week-overview-paste{min-height:44px;padding:4px 6px;border:1px dashed #b9cedd;border-radius:8px;background:#f5faff;color:#346784;font:inherit;font-size:calc(var(--app-text-scale, 1) * 11px);font-weight:650;line-height:1.2;box-shadow:none;white-space:nowrap}
.week-overview-paste{border-style:solid;border-color:#8cbce0;background:#fff;color:#276b98}
.week-overview button:focus-visible,.week-overview summary:focus-visible{outline:3px solid #1687bd;outline-offset:2px}
.recipe-view-toggle:has([data-view="small"]){display:flex;flex-wrap:wrap;gap:7px;margin:8px 0 14px}
.recipe-view-toggle [data-action="recipe-view"][aria-pressed="true"]{border-color:#3489bd;background:#e4f3fc;color:#173f5c;box-shadow:0 2px 7px #226e9d18}
#recipeResults .recipe-grid.recipe-grid--small{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
#recipeResults .recipe-grid--small .recipe-tile{min-width:0;border-radius:11px;background:#fff;box-shadow:0 2px 8px #355c7810}
#recipeResults .recipe-grid--small .recipe-card-media{position:relative;min-width:0;aspect-ratio:4/5;overflow:hidden;border-radius:10px 10px 8px 8px;background:#e8f1f7}
#recipeResults .recipe-grid--small .recipe-card-media>.food-photo,#recipeResults .recipe-grid--small .recipe-card-media>.food-placeholder{width:100%;height:100%;min-height:0;margin:0;aspect-ratio:auto}
#recipeResults .recipe-grid--small .recipe-card-media>.food-photo img{width:100%;height:100%;object-fit:cover}
#recipeResults .recipe-grid--small .recipe-card-media>.food-photo figcaption{display:none}
#recipeResults .recipe-grid--small .recipe-card-media>.recipe-time{display:none}
#recipeResults .recipe-grid--small .recipe-preview-hit{z-index:1}
#recipeResults .recipe-grid--small .favorite-button{z-index:2;top:3px;right:3px;width:42px;height:42px;min-width:42px;min-height:42px;padding:0;font-size:calc(var(--app-text-scale, 1) * 20px)}
#recipeResults .recipe-grid--small .recipe-small-overlay{position:absolute;z-index:1;right:0;bottom:0;left:0;display:grid;gap:3px;padding:17px 5px 5px;background:linear-gradient(transparent,#102b3be8);color:#fff;pointer-events:none}
#recipeResults .recipe-grid--small .recipe-small-overlay strong{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow-wrap:anywhere;font-size:calc(var(--app-text-scale, 1) * 11px);font-weight:750;line-height:1.15;text-shadow:0 1px 2px #0008}
#recipeResults .recipe-grid--small .recipe-small-overlay>span{font-size:calc(var(--app-text-scale, 1) * 10px);font-weight:700;line-height:1.1}
#recipeResults .recipe-grid--small .food-placeholder{display:grid;place-items:center;padding:3px;text-align:center;font-size:10px}
@media(min-width:760px){.week-overview{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:14px}.week-overview-day:last-child:nth-child(odd){grid-column:1 / -1}}
@media(max-width:420px){
 .week-overview-day{padding:9px;border-radius:13px}
 .week-overview-slot{grid-template-columns:minmax(68px,82px) minmax(0,1fr) auto;gap:5px;padding:5px}
 .week-overview-slot-heading h3{font-size:calc(var(--app-text-scale, 1) * 12px);gap:3px}
 .week-overview-slot-heading h3>span{width:17px;height:17px;flex-basis:17px}
 .week-overview-meals{grid-template-columns:minmax(0,1fr)}
 .week-overview-meal{grid-template-columns:44px minmax(0,1fr);gap:2px 5px;padding:3px}
 .week-overview-recipe,.week-overview-quick-icon{width:44px;height:48px}
 .week-overview-meal-actions button{width:32px;height:32px;min-width:32px;min-height:32px}
 .week-overview-slot-actions{min-width:52px}
 .week-overview-add,.week-overview-paste{padding:3px;font-size:calc(var(--app-text-scale, 1) * 10px);white-space:normal}
}
@media(max-width:350px){
 .week-overview-slot{grid-template-columns:minmax(62px,70px) minmax(0,1fr) 48px}
 .week-overview-day-heading h2>button{min-height:54px;padding:7px 5px;gap:2px 5px}
 .week-overview-day-heading h2>button>span,.week-overview-day-heading h2>button>strong{font-size:calc(var(--app-text-scale, 1) * 16px)}
 .week-overview-clear-day{padding:4px}
}
@media(prefers-reduced-motion:reduce){.week-overview *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Dense recipe photos keep time and protein readable over any photo. */
#recipeResults .recipe-grid--small .recipe-small-time,
#recipeResults .recipe-grid--small .recipe-small-protein{position:absolute;top:3px;z-index:2;display:inline-flex;align-items:center;gap:1px;padding:3px 2px;border-radius:5px;background:#102b3be8;color:#fff;font-size:11px;line-height:1.1;font-weight:700;white-space:nowrap;pointer-events:none;font-variant-numeric:tabular-nums}
#recipeResults .recipe-grid--small .recipe-small-time{left:2px}
#recipeResults .recipe-grid--small .recipe-small-protein{right:2px}
#recipeResults .recipe-grid--small .recipe-small-overlay>span{font-size:calc(var(--app-text-scale, 1) * 12px)}
#recipeResults .recipe-grid--small .recipe-card-media{aspect-ratio:3/4}
@media(max-width:360px){#recipeResults .recipe-grid--small .recipe-small-time,#recipeResults .recipe-grid--small .recipe-small-protein{font-size:calc(var(--app-text-scale, 1) * 9px);padding:3px 1px;gap:0}#recipeResults .recipe-grid--small .recipe-small-time{left:1px}#recipeResults .recipe-grid--small .recipe-small-protein{right:1px}}

/* Compact captions leave the food photo unobstructed. */
#recipeResults .recipe-grid--small .recipe-card-media{aspect-ratio:1;border-radius:10px 10px 0 0}
#recipeResults .recipe-grid--small .recipe-small-time{font-size:calc(var(--app-text-scale, 1) * 11px);padding:3px;left:3px;background:#fffffff2;color:#173f5c}
#recipeResults .recipe-grid--small .recipe-small-caption{padding:5px 3px 6px;text-align:center;color:#18374c}
#recipeResults .recipe-grid--small .recipe-small-caption strong{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere;font-size:calc(var(--app-text-scale, 1) * 11px);line-height:1.2;min-height:2.4em;font-weight:750}
#recipeResults .recipe-grid--small .recipe-small-nutrients{display:flex;justify-content:center;flex-wrap:wrap;gap:2px 4px;margin-top:4px;font-size:calc(var(--app-text-scale, 1) * 10px);line-height:1.3;font-variant-numeric:tabular-nums}
#recipeResults .recipe-grid--small .recipe-small-nutrients>span{white-space:nowrap}
