:root{color-scheme:dark;--charcoal:#161617;--ink:#faf7ed;--coral:#eb6659;--brand-blue:#306fe0;--top:env(safe-area-inset-top,0px);--bottom:env(safe-area-inset-bottom,0px);--brand-height:calc(clamp(58px,12.63vw,66.1px) + var(--top));--dock-height:calc(55px + var(--bottom))}
[hidden]{display:none!important}
body{margin:0;background:var(--charcoal);color:var(--ink)}
main{position:relative;display:flex;width:100%;max-width:560px;height:100dvh;min-height:0;padding:0;margin:auto;overflow:hidden}
main>header{
 position:absolute;inset:0 0 auto;z-index:4;height:var(--brand-height);align-items:center;padding:var(--top) 0 0;
 background:linear-gradient(to bottom,#101011 0%,#101011c4 58%,#10101100 100%);
}
main>header #home{
 position:static;display:grid;place-items:center;width:min(59.8%,312.8px);height:100%;padding:0;border:0;background:none;cursor:pointer;
}
main>header #home img{display:block;width:auto;max-width:100%;height:calc(var(--brand-height) - var(--top) - 12px);object-fit:contain}
main>nav{
 position:absolute;inset:auto 0 0;z-index:4;display:flex;height:var(--dock-height);padding:3px 0 calc(3px + var(--bottom));margin:0;border:0;
 background:linear-gradient(to top,#101011 0%,#101011d9 50%,#10101100 100%);
}
main>nav button{color:white;flex:1;font-size:.875rem;line-height:1.1;gap:3px;align-self:center;justify-content:center}
main>nav svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
body:not(:has(#cravingDialog[open])) main>nav [aria-current="page"] svg,
body[data-page="results"] main>nav #cravings[data-applied] svg,
body:has(#cravingDialog[open]) main>nav #cravings svg{color:var(--coral)}
body:is([data-page="profile"],[data-page="info"]) main>:is(header,nav),
body[data-page="faves"] main:not(:has(.favTile))>:is(header,nav){background:transparent}
#faves-heading{position:absolute;width:1px;height:1px;margin:0;overflow:hidden;clip-path:inset(50%)}
#otherPage,#otherPage.gridPage,#otherPage.profilePage{position:relative;display:block;width:100%;min-width:0;min-height:0;overflow:auto;padding:var(--brand-height) 0 var(--dock-height)}
#otherPage p,#otherPage small{color:var(--ink)}
#otherPage #summary:empty{display:none}
#otherPage #summary{
 display:grid;
 gap:8px;
 padding:10px 12px 14px;
 overflow-wrap:anywhere;
}
#otherPage #summary p{margin:0;font-size:1rem;line-height:1.42;color:#ded8cf}
#otherPage #summary strong{color:var(--ink)}
#otherPage.gridPage .resultGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none;gap:1px;align-items:start}
#otherPage.gridPage .recipeCard,#otherPage.gridPage .favTile{width:100%;max-width:none;height:auto;max-height:none;aspect-ratio:4/5;border:0;border-radius:0}
#otherPage .favTile .removeFav{
 display:grid;place-items:center;width:40px;height:40px;
 background:transparent;
}
#otherPage .favTile .removeFav::after{
 content:"";
 position:relative;
 width:28px;height:28px;
 background:url("fave-heart.svg") center / contain no-repeat;
 pointer-events:none;
}
#otherPage.gridPage .recipeCard img{display:block;width:100%;height:100%;object-fit:cover}
#otherPage.gridPage .recipeCard span{font-size:clamp(1rem,4.2vw,1.4rem);font-weight:900;line-height:1.15;background:none;color:white;z-index:1}
#otherPage.gridPage>p{padding:62px 14px 14px;text-align:center}
#otherPage.gridPage h1,#otherPage.infoContent h1{font-size:clamp(1.18rem,5.4vw,1.75rem);text-align:center;margin:23px 12px}
#otherPage.infoContent .infoIntro{max-width:440px;margin:20px auto;padding:0 22px;font-size:1rem;line-height:1.45}
#otherPage.infoContent .infoList{list-style:none;display:grid;gap:15px;max-width:440px;margin:auto;padding:0 22px 20px}
#otherPage.infoContent .infoList li{display:block;min-width:0}
.infoLink{
 display:grid;grid-template-columns:24px minmax(0,1fr);align-items:start;gap:12px;
 width:100%;min-height:44px;border:0;border-radius:8px;padding:6px 0;
 background:none;color:var(--ink);text-align:left;font:400 1rem/1.45 Nunito,system-ui;
}
.infoLink svg{width:24px;height:24px;fill:none;stroke:var(--coral);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#otherPage.profilePage{padding-inline:24px}
#otherPage.profilePage .prefTitle{margin:14px 0 22px!important}
#otherPage.profilePage .prefHeading{margin:0 0 9px;font-size:1.0625rem}
#otherPage.profilePage :is(.prefGrid,.prefEmpty)+.prefHeading{margin-top:20px}
.profilePage .editPreferences{
 display:block;min-height:44px;margin:20px auto 10px;padding:5px 16px;border:1px solid #fff5;
 border-radius:14px;background:transparent;color:var(--ink);font-weight:800;
}
#profileDialog .profile-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.profilePage .prefGrid{
 display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;
 width:100%;max-width:474px;margin-inline:auto;
}
.profilePage .prefGrid>span{grid-column:span 2}
.profilePage .prefGrid>span:last-child:nth-child(odd){grid-column:2 / span 2}
.profilePage .continue{width:auto;min-width:110px;display:block;margin:18px auto;background:transparent;border:1px solid #fff9;color:var(--ink)}
dialog{background:#242426;color:var(--ink);border:1px solid #fff6;max-width:530px;border-radius:19px}
dialog::backdrop{background:#0c0a0980}
dialog h2{font-size:clamp(1.18rem,5.2vw,1.6rem);padding:0 38px 0 15px}
dialog .close,#profileDialog .close{color:var(--ink);min-width:44px;min-height:44px;padding:0;right:12px;top:8px}
dialog input:not([type=checkbox]),dialog select,dialog textarea,dialog button:not(.close),.recipeControls button,.recipeControls select{color:var(--ink);background:#292426;border:1px solid #fff5;border-radius:9px;min-height:44px}
dialog .actions button.apply{color:#261c18;background:var(--coral);border-color:var(--coral)}
#profileDialog[open]{display:flex;flex-direction:column;overflow:hidden}
#profileDialog .profileFields{min-height:0;overflow:auto;overscroll-behavior:contain}
#profileDialog .actions{flex:none}
#profileDialog.keyboard-visible:has(#firstName:focus){
 position:fixed;inset:calc(var(--viewport-top,0px) + 12px) 0 auto;
 margin:0 auto;max-height:calc(var(--visible-height,100dvh) - 24px);
}
#profileDialog .nameRow:focus{outline:none}
.profilePage .prefGrid span,#profileDialog .profile-options label{
 min-height:36px;padding:4px 6px;border:1px solid #fff5;border-radius:14px;
 background:#181617;color:var(--ink);font-size:.875rem;line-height:1.2;
}
.profilePage .prefGrid span,#profileDialog .profile-options label:has(:checked){
 background:color-mix(in srgb,var(--coral) 13%,transparent);border-color:var(--coral);
}
#profileDialog .profile-options label:has(:checked)::after{content:"✓";top:2px;right:5px;color:var(--coral)}
body[data-page="detail"] #otherPage{padding:0}
.charcoalRecipe{touch-action:pan-y pinch-zoom;position:relative;isolation:isolate;display:flex;align-items:end;min-height:100%;padding:calc(var(--brand-height) + 165px) 12px calc(var(--dock-height) + 12px)}
.charcoalRecipe>img{position:absolute;inset:0;z-index:-2;width:100%;height:100%;object-fit:cover;object-position:center}
.charcoalRecipe::before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(#141314d9,transparent 24%,transparent 38%,#14131468 56%,#141314db 83%,#141314b8)}
.charcoalDetails{width:100%;text-align:center;text-shadow:0 1px 5px #101010}
#otherPage .charcoalDetails h1{font-size:clamp(2rem,8vw,3rem);line-height:1.12;margin:0 0 9px}
#otherPage .charcoalDetails p{font-size:1rem;line-height:1.35;margin:3px 0}
#otherPage .charcoalDetails .recipeTiming{white-space:nowrap}
#otherPage .charcoalDetails p+p{font-size:.9rem}
#otherPage .charcoalDetails .faveNotes{max-width:410px;margin:8px auto;white-space:pre-wrap;overflow-wrap:anywhere}
#otherPage .charcoalDetails .faveNotes:empty{display:none}
.charcoalActionRow{margin:13px auto 0;max-width:410px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
.charcoalActionRow .charcoalAction{display:flex;position:static;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:47px;padding:3px;color:var(--ink);background:none;border:0;font:800 .875rem Nunito,system-ui;cursor:pointer}
.charcoalAction svg{width:23px;height:23px;filter:drop-shadow(0 1px 3px #111)}
.charcoalActionRow .openRecipe{color:var(--coral)}
.charcoalAction[aria-label="Edit favorite"] svg{fill:var(--coral);stroke:var(--coral)}
#full-recipe-sheet{position:fixed;inset:calc(var(--brand-height) + 7px) 0 calc(8px + var(--bottom));margin:0 auto;width:min(calc(100% - 16px),544px);max-height:none;height:auto;padding:0;overflow:hidden;background:#211d1bad;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}
#full-recipe-sheet[open]{display:flex;flex-direction:column}
.charcoalSheetTop{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:8px;border-bottom:1px solid #fff5}
.charcoalTabs{display:flex;border:1px solid #fff5;border-radius:100px;padding:2px}
#full-recipe-sheet .charcoalTabs button{font:800 .875rem Nunito,system-ui;padding:0 10px;min-height:40px;border:0;border-radius:100px;background:transparent}
#full-recipe-sheet .charcoalTabs button[aria-pressed="true"]{background:#fff2}
#full-recipe-sheet .charcoalSheetClose{width:44px;flex:none;border-radius:100px;background:transparent;font-size:1.4rem}
.charcoalPanel{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:12px clamp(8px,3vw,17px) 24px;font-size:1.0625rem}
.charcoalPanel .recipeControls{margin:0}
.charcoalPanel ul,.charcoalPanel ol{padding-left:23px}
.charcoalPanel li{margin-bottom:9px}
.charcoalPanel small{display:block;margin-top:8px;color:#ded8cf}
button:focus-visible,input:focus-visible,select:focus-visible,dialog .close:focus-visible,#profileDialog .close:focus-visible{outline:2px solid var(--ink);outline-offset:-2px}

#otherPage.gridPage .recipeCard::after{content:"";position:absolute;inset:auto 0 0;height:46%;background:linear-gradient(to bottom,transparent,rgba(0,0,0,.24) 49%,rgba(0,0,0,.67));pointer-events:none}
#otherPage .searchFilterNote{text-align:center;margin:0;padding:0 14px 14px;color:#ded8cf}

#cravingDialog{
 position:fixed;
 inset:calc(var(--brand-height) + 8px) 0 auto;
 width:min(calc(100% - 24px),470px);
 max-height:calc(100dvh - var(--brand-height) - var(--dock-height) - 16px);
 margin:0 auto;
 padding:0;
 border:0;
 border-radius:0;
 background:transparent;
}
#cravingDialog::backdrop{background:transparent}
body:has(#cravingDialog[open]) #otherPage #summary{display:none}
body:has(#cravingDialog[open]) main::after{
 content:"";
 position:absolute;
 inset:0;
 z-index:3;
 -webkit-backdrop-filter:blur(5px);
 backdrop-filter:blur(5px);
 pointer-events:none;
}
#cravingDialog[open]{display:flex;flex-direction:column;overflow:hidden}
#cravingDialog .fields{flex:0 1 auto;min-height:0;grid-template-columns:minmax(0,1fr);align-content:start;gap:5px;overflow:auto;overscroll-behavior:contain}
#cravingDialog .fields:focus{outline:none}
#cravingDialog #selects,#cravingDialog .actions{
 display:grid;
 grid-template-columns:repeat(2,minmax(0,1fr));
 gap:5px;
}
#cravingsSearch{width:100%;min-width:0}
#cravingDialog #selects select,#cravingDialog .ingredients input,#cravingsSearch,#cravingDialog .actions button,#cravingDialog .chips button{
 background:#101011b8;
}
#cravingDialog input::placeholder{color:#ded8cf;opacity:1}
#cravingDialog #selects select,#cravingDialog .ingredients input,#cravingsSearch,#cravingDialog .actions button{
 height:44px;
 min-height:44px;
 padding:5px 9px;
 font-size:1rem;
 line-height:1.15;
}
#cravingDialog .cravingSelect{position:relative;min-width:0}
#cravingDialog .cravingSelect::after{
 content:"";
 position:absolute;
 right:13px;
 top:50%;
 width:6px;
 height:6px;
 border:solid var(--ink);
 border-width:0 1.5px 1.5px 0;
 transform:translateY(-70%) rotate(45deg);
 pointer-events:none;
}
#cravingDialog #selects select{appearance:none;min-width:0;width:100%;padding-inline-end:28px;font-size:.9375rem;text-overflow:ellipsis}
#cravingDialog .actions{flex:none;margin:5px 0 0;padding:0}
#cravingDialog .actions .apply,.saveFavoriteDialog .actions .apply{
 background:#af5047;
 background:color-mix(in srgb,color-mix(in srgb,var(--coral) 72%,var(--charcoal)) 95%,transparent);
 border-color:var(--coral);
 color:#fff;
}
#cravingDialog .ingredients{padding:0;border:0;background:transparent;color:var(--ink)}
#cravingDialog .chips{gap:4px}
#cravingDialog .chips:not(:empty){margin-bottom:5px}
#cravingDialog .chips button{
 min-height:30px;
 padding:2px 5px;
 border:0;
 border-radius:999px;
 font-size:.875rem;
}
#cravingDialog #suggestions{border-color:#fff3;padding:3px 0}
#cravingDialog #suggestions button{background:#292426;color:var(--ink);padding:6px 8px;border-color:transparent}

.charcoalRecipe{overflow:hidden}


#cravingDialog.typing{
 --cravings-typing-top:max(var(--viewport-top,0px),var(--brand-height));
 inset:calc(var(--cravings-typing-top) + 8px) 0 auto;
 max-height:calc(var(--viewport-top,0px) + var(--visible-height,100dvh) - var(--cravings-typing-top) - 16px);
}
#cravingDialog.typing .actions{display:none}


.saveFavoriteDialog{
 position:fixed;
 --note-viewport:100dvh;
 --note-top:0px;
 inset:calc(var(--note-top) + var(--note-viewport) / 2) 0 auto;
 transform:translateY(-50%);
 width:min(calc(100% - 24px),470px);
 max-height:calc(var(--note-viewport) - 24px);
 margin:0 auto;padding:0;border:0;border-radius:0;background:transparent;
}
.saveFavoriteDialog:has(textarea:focus){--note-viewport:var(--visible-height,100dvh);--note-top:var(--viewport-top,0px)}
.saveFavoriteDialog[open]{display:flex;flex-direction:column;overflow:hidden}
.saveFavoriteDialog::backdrop{
 background:#10101155;
 -webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);
}
.saveFavoriteDialog h2{flex:none;margin:0 0 10px;padding:0;text-shadow:0 1px 4px #101011}
.saveFavoriteDialog .saveFields{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;gap:5px;overflow:auto}
.saveFavoriteDialog .saveFields label{flex:none;text-shadow:0 1px 4px #101011}
.saveFavoriteDialog .saveFields textarea{
 min-height:52px;height:clamp(70px,calc(var(--note-viewport) - 150px),155px);
 color:var(--ink);background:#211d1ceb;border-color:#fff6;resize:none;
}
.saveFavoriteDialog .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.saveFavoriteDialog .actions{flex:none;gap:5px;margin-top:8px}
.saveFavoriteDialog .actions button{min-height:44px}
#profileDialog .close:focus-visible{border-radius:50%}
.adaptDialog{
 width:min(calc(100% - 24px),470px);
 max-height:calc(100dvh - 24px);
 margin:auto;
}
.adaptDialog:has(input[type="search"]:focus){max-height:calc(var(--visible-height,100dvh) - 24px)}
.adaptDialog[open]{display:flex;flex-direction:column;overflow:hidden}
.adaptDialog .adaptHeader{display:flex;align-items:center;flex:none;gap:6px;margin-bottom:8px}
.adaptDialog .adaptHeader h2{flex:1;margin:0;padding:0;text-align:center}
.adaptDialog .close{position:static;flex:none;width:44px;border:1px solid #fff5;border-radius:50%}
.adaptDialog .close:focus-visible{outline-offset:-5px}
.adaptDialog .adaptFields{flex:0 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain}
.adaptDialog .actions{flex:none}
.servingsDialog{width:min(calc(100% - 24px),360px)}
.servingsDialog h2{padding:0}
.servingsDialog .servingOptions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.servingsDialog .servingOptions [aria-pressed="true"]{border-color:var(--coral);color:var(--coral)}
.servingsDialog .cancelServings{width:100%;margin-top:8px}
