/* Unified customer home. Existing recipe, community and account primitives stay native. */
html,body{background:var(--customer-paper);}
#app-shell{--canvas:var(--customer-paper);--surface:var(--customer-card);--ink:var(--customer-ink);--muted:var(--customer-muted);--line:var(--customer-line);--accent:var(--customer-action);--accent-hover:var(--customer-action-hover);--accent-soft:var(--customer-blush);--olive:#62684b;--gutter:clamp(16px,4vw,48px);--content:1280px;}
#app-shell.dark-mode{--canvas:#201915;--surface:#2c211c;--accent:#ffae9e;--accent-hover:#ffc6b9;--accent-soft:#432a23;--olive:#c4c9aa;}
#app-shell :is(h1,h2,h3){text-wrap:balance;}
#app-shell p{text-wrap:pretty;}
#app-shell :is(.screen-title,.app-brand,.section-heading h2,.section-heading h3){letter-spacing:normal;}
.home-header-actions{display:flex;align-items:center;gap:12px;}
.home-language{min-height:44px;display:flex;align-items:center;gap:7px;font-size:12px;font-weight:600;color:var(--muted);}
#home-app-header{min-height:66px;}
#screen-home{--home-card-radius:var(--customer-photo-radius);--home-card-padding:clamp(16px,4vw,28px);}
#greeting-card{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;padding:8px 0 18px;}
.home-welcome-copy{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px;min-width:0;}
.home-eyebrow{color:var(--olive);font-size:12px;font-weight:700;line-height:1.5;margin-bottom:12px;}
.home-welcome-copy #home-title{font-size:clamp(28px,8vw,48px);font-weight:900;line-height:1.08;text-wrap:initial;word-break:keep-all;}
.home-cook-link{display:flex;align-items:center;justify-content:center;gap:5px;max-width:120px;min-height:44px;padding:7px 10px;border-radius:15px;background:#c82b44;color:white;text-align:center;font-size:13px;font-weight:800;line-height:1.25;}
#home-search-pill{grid-column:1 / -1;min-height:48px;margin:0;border-radius:28px;background:var(--surface);}
#home-search-pill input{font-size:16px;}
#home-search-pill button{border-radius:22px;}
.home-feature-gallery,.home-picks{display:grid;gap:12px;min-width:0;}
.home-feature-shopping{display:grid;grid-template-areas:'feature' 'status';grid-template-rows:minmax(0,1fr) auto;min-width:0;}
.home-feature{grid-area:feature;position:relative;isolation:isolate;display:flex;align-items:flex-start;width:100%;min-height:clamp(216px,56vw,304px);overflow:hidden;padding:var(--home-card-padding);border-radius:var(--home-card-radius);background:var(--customer-coral);color:white;text-align:start;}
.home-feature>img{position:absolute;inset:auto 0 0 auto;width:57%;height:77%;object-fit:contain;object-position:right bottom;z-index:-1;pointer-events:none;}
.home-feature-caption{display:grid;justify-items:start;gap:12px;max-width:63%;min-width:0;padding-bottom:52px;}
.home-feature-caption small{font-size:12px;font-weight:800;line-height:1.3;background:white;color:#9f1932;border-radius:9px;padding:7px 9px;}
.home-feature-caption strong{font-size:clamp(23px,6.2vw,36px);font-weight:900;line-height:1.08;word-break:keep-all;overflow-wrap:anywhere;}
.home-feature-panel{grid-area:feature;place-self:end start;z-index:1;margin:var(--home-card-padding);}
.home-feature-panel .home-photo-shopping{width:auto;min-height:44px;padding:8px 12px;border-color:white;background:white;color:#9f1932;font-size:12px;}
#home-shopping-status{grid-area:status;margin:4px var(--home-card-padding) 0;}
.home-popular{display:flex;align-items:center;justify-content:center;gap:10px;min-height:46px;padding:8px 12px;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--accent);font-size:14px;font-weight:800;text-align:center;}
.home-popular span:last-child{font-size:23px;line-height:1;}
.home-pick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.home-pick{position:relative;isolation:isolate;display:block;min-height:clamp(124px,34vw,174px);overflow:hidden;padding:14px;border-radius:var(--home-card-radius);font-size:clamp(16px,4.7vw,23px);font-weight:900;line-height:1.14;overflow-wrap:anywhere;}
.home-pick span{position:relative;display:block;max-width:94%;padding-bottom:61px;}
.home-pick img{position:absolute;inset:auto 0 0 auto;z-index:-1;width:75%;height:74%;object-fit:contain;object-position:right bottom;pointer-events:none;}
.home-pick-recipe{background:#c82b44;color:white;}
.home-pick-ingredients{background:var(--customer-gold);color:#271c0a;}
.home-pick-sauce{background:var(--customer-green);color:white;}
.home-pick-sauce img{inset-inline-end:5px;inset-block-end:4px;width:65%;height:71%;}
.home-pick-challenge{background:var(--customer-grape);color:white;}
.home-feature-companions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.home-photo-recipe{display:grid;grid-template-rows:auto 1fr;min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:18px;background:var(--surface);color:var(--ink);text-align:start;}
.home-photo-recipe img{display:block;width:100%;height:clamp(110px,26vw,210px);object-fit:cover;}
.home-photo-recipe-copy{display:grid;gap:3px;padding:8px 10px;line-height:1.3;}
.home-photo-recipe-copy strong{font-size:clamp(12px,2.5vw,17px);overflow-wrap:anywhere;}
.home-photo-recipe-copy small{color:var(--muted);white-space:nowrap;font-size:11px;}
.home-feature:focus-visible,.home-pick:focus-visible{outline:3px solid currentColor;outline-offset:-5px;}
.home-photo-recipe:focus-visible{outline-offset:-4px;}
.recipe-shopping-panel{padding:14px 16px 0;}
.recipe-shopping-button{display:block;width:100%;min-height:46px;padding:10px 16px;border:1px solid var(--accent);border-radius:26px;background:var(--accent);color:var(--on-accent);font:inherit;font-size:14px;font-weight:700;line-height:1.5;}
.recipe-shopping-button:focus-visible{outline:2px solid var(--ink);outline-offset:3px;}
.recipe-shopping-button:disabled{opacity:.65;cursor:default;}
.recipe-shopping-note,.recipe-shopping-status{margin-top:8px;font-size:12px;line-height:1.6;color:var(--muted);overflow-wrap:anywhere;}
.recipe-shopping-status:empty{display:none;}
#recipe-sheet{background:var(--surface);color:var(--ink);}
.recipe-detail-intro{position:relative;background:var(--surface);}
.recipe-detail-photo{display:block;width:100%;height:clamp(172px,55vw,312px);object-fit:cover;object-position:center;}
.recipe-close{position:absolute;top:10px;right:10px;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:#211713e8;color:white;font-size:26px;}
.recipe-detail-copy{padding:17px 18px 4px;}
.recipe-detail-intro:not(:has(.recipe-detail-photo)) .recipe-detail-copy{padding-right:60px;}
.recipe-detail-source{font-size:11px;font-weight:700;color:var(--muted);margin:0 0 5px;}
.recipe-detail-copy h2{font-size:clamp(24px,4.5vw,36px);line-height:1.2;margin:0 0 8px;}
.recipe-detail-description{color:var(--muted);font-size:14px;line-height:1.55;margin:0 0 12px;}
.recipe-detail-facts{display:flex;flex-wrap:wrap;gap:8px;}
.recipe-detail-facts span{font-size:12px;font-weight:660;background:var(--accent-soft);color:var(--ink);border-radius:20px;padding:5px 10px;}
.home-quick-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 26px;}
.home-quick-links a{display:flex;align-items:center;gap:7px;min-height:52px;padding:7px 9px;border:1px solid var(--line);border-radius:13px;background:var(--surface);font-size:12px;font-weight:680;color:var(--ink);}
.home-quick-links svg{flex:none;color:var(--accent);}
.home-quick-links a>span:last-child{margin-inline-start:auto;color:var(--muted);}
.home-discovery{gap:32px;}
.section-heading{margin-bottom:14px;}
.section-heading :is(h2,h3){font-size:clamp(21px,2.5vw,28px);font-weight:700;}
.section-heading .text-action{font-size:12px;}
.home-shortcuts,.home-recipe-row{gap:20px 12px;}
.home-shortcut,.home-recipe-card{border:0;border-radius:0;background:transparent;overflow:visible;}
.home-shortcut-photo,.home-recipe-photo{border-radius:7px;}
.home-shortcut-photo{aspect-ratio:1.45;}
.home-recipe-photo{aspect-ratio:1.1;}
.home-shortcut-copy,.home-recipe-copy{padding:10px 0 0;gap:6px;}
.home-shortcut-copy strong,.home-recipe-copy strong{font-size:14px;font-weight:700;line-height:1.45;}
.home-recipe-meta{font-size:12px;line-height:1.6;}
.home-gallery-card{display:flex;flex-direction:column;min-width:0;border:1px solid var(--line);border-radius:15px;background:var(--surface);overflow:hidden;}
.home-gallery-card[hidden]{display:none;}
.home-gallery-card .home-recipe-card{flex:1;width:100%;min-width:0;}
.home-gallery-card .home-recipe-photo{border-radius:0;aspect-ratio:1.24;}
.home-gallery-card .home-recipe-copy{padding:10px 12px;}
.gallery-shop-button{min-height:44px;margin:0 10px 10px;padding:6px 8px;border:1px solid var(--line);border-radius:24px;background:var(--accent-soft);color:var(--accent);font-size:12px;font-weight:700;line-height:1.3;}
.gallery-shop-button:hover{border-color:var(--accent);}
.gallery-shop-button:disabled{opacity:.6;cursor:wait;}
.home-gallery-card .recipe-shopping-status{padding:0 10px 10px;}
.home-challenge{grid-template-columns:1fr;border:0;border-radius:8px;background:var(--challenge-panel);}
.home-community-photo{width:100%;height:180px;object-fit:cover;}
.home-challenge-copy{padding:22px;grid-template-columns:1fr;gap:16px;}
.home-challenge .primary-button{justify-self:start;max-width:none;}
.home-pantry{display:grid;gap:22px;padding-block:8px 24px;border-bottom:1px solid var(--line);}
.home-pantry-images{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;align-items:center;background:#efece1;border-radius:8px;padding:16px 10px;}
.home-pantry-images img{width:100%;height:clamp(92px,20vw,165px);object-fit:contain;}
.home-pantry-copy h2{font-family:'Playfair Display',Georgia,serif;font-size:clamp(28px,3vw,36px);font-weight:600;line-height:1.2;}
.home-pantry-copy>p:not(.home-eyebrow){font-size:14px;color:var(--muted);line-height:1.7;margin-top:12px;max-width:38ch;}
.home-pantry-copy .text-action{margin-top:10px;}
.home-content{padding-bottom:42px;}

/* Recipe discovery and community share the same photo card proportions and colors. */
#recipe-app-header,.recipe-workspace{max-width:1100px;}
#recipe-app-header .screen-title,#screen-challenge .screen-title{font-size:clamp(26px,5vw,39px);font-weight:900;}
#recipe-search-pill{border-radius:28px;}
#recipe-search-pill button{border-radius:24px;}
#chat-content:empty{display:none;}
#chat-content:not(:empty) ~ .recipe-photos{display:none;}
.recipe-photos h3{margin-bottom:12px;font-size:clamp(21px,3.2vw,28px);font-weight:850;text-wrap:wrap;}
.recipe-photo-grid,.photo-shortcut-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.recipe-photo-card{display:flex;flex-direction:column;min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:var(--customer-photo-radius);background:var(--surface);color:var(--ink);text-align:start;}
.recipe-photo-card-featured{grid-column:1 / -1;}
.recipe-photo-card img{width:100%;height:clamp(108px,33vw,210px);object-fit:cover;}
.recipe-photo-card-featured img{height:clamp(190px,55vw,330px);}
.recipe-photo-copy{display:grid;gap:4px;padding:12px 14px;line-height:1.25;}
.recipe-photo-copy strong{font-size:clamp(15px,3.95vw,21px);font-weight:850;overflow-wrap:anywhere;}
.recipe-photo-card-featured .recipe-photo-copy strong{font-size:clamp(19px,4.9vw,28px);}
.recipe-photo-copy small{color:var(--muted);font-size:12px;}
.recipe-photo-card:focus-visible,.photo-shortcut:focus-visible{outline-offset:-4px;}
#quick-chips{display:grid;gap:12px;margin:20px 0 0;}
.photo-shortcut{position:relative;isolation:isolate;display:block;min-width:0;min-height:clamp(112px,33vw,155px);overflow:hidden;padding:13px 14px 59px;border-radius:var(--customer-photo-radius);color:white;font-size:clamp(15px,4.2vw,22px);font-weight:850;line-height:1.2;text-align:start;overflow-wrap:anywhere;}
.photo-shortcut img{position:absolute;inset:auto 3px 3px auto;z-index:-1;width:65%;height:70%;object-fit:contain;object-position:right bottom;pointer-events:none;}
.photo-shortcut-coral{background:var(--customer-coral);}
.photo-shortcut-gold{background:var(--customer-gold);color:#271c0a;}
.photo-shortcut-green{background:var(--customer-green);}
.photo-shortcut-grape{background:var(--customer-grape);}
#screen-chatbot .recipe-result-link{grid-template-columns:minmax(0,1fr) auto;padding:0;gap:0;}
#screen-chatbot .recipe-result-link img{grid-column:1 / -1;width:100%;height:clamp(150px,47vw,310px);aspect-ratio:auto;border-radius:0;object-fit:cover;}
#screen-chatbot .recipe-result-copy{padding:13px 15px;}
#screen-chatbot .recipe-result-link>svg{margin-inline-end:14px;}

.challenge-submit{gap:6px;max-width:50%;border-radius:16px;background:var(--customer-coral);color:white;word-break:keep-all;text-align:center;}
.challenge-submit svg{flex:none;}
.challenge-content{max-width:1100px;}
.challenge-feature{position:relative;isolation:isolate;display:block;min-height:250px;border:0;border-radius:var(--customer-photo-radius);background:var(--customer-coral);color:white;}
.challenge-feature-copy{padding:clamp(17px,4vw,36px);}
.challenge-feature h3{max-width:min(65%,18ch);margin-top:14px;font-size:clamp(26px,7vw,48px);font-weight:900;line-height:1.12;letter-spacing:normal;text-wrap:wrap;}
#challenge-timer-badge{display:inline-block;padding:6px 10px;border:0;background:white;color:#9f1932;font-size:12px;}
.challenge-feature>img{position:absolute;inset:auto 3px 8px auto;z-index:-1;width:57%;height:68%;max-height:none;object-fit:contain;object-position:right bottom;pointer-events:none;}
.challenge-facts{display:block;max-width:48%;margin:21px 0 0;}
.challenge-facts dd{font-size:clamp(17px,4.9vw,26px);font-weight:850;overflow-wrap:anywhere;}
.challenge-shortcuts{margin-top:12px;}
.challenge-guide{display:grid;gap:10px;margin-top:14px;padding:12px 14px;border:1px solid var(--line);border-radius:16px;color:var(--muted);font-size:13px;line-height:1.45;overflow-wrap:anywhere;}
#challenge-desc{margin:0;font-size:inherit;line-height:inherit;}
.challenge-guide dl{display:flex;align-items:baseline;gap:8px;}
.challenge-guide dt{flex:none;color:var(--ink);font-weight:800;}
.challenge-board{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;margin-top:22px;}
.challenge-board h3[tabindex]{scroll-margin-top:12px;}
.challenge-entries{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.challenge-entries .board-status{grid-column:1 / -1;}
.challenge-entry-card{display:flex;flex-direction:column;align-items:stretch;gap:0;padding:0;overflow:hidden;border-radius:18px;}
.challenge-entry-link{position:relative;display:grid;align-content:start;gap:0;padding:0;}
.challenge-entry-link img{width:100%;height:auto;aspect-ratio:1.35;border-radius:0;}
.challenge-entry-copy{display:grid;gap:3px;min-width:0;padding:10px 11px;}
.challenge-rank{position:absolute;inset:8px auto auto 8px;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:white;color:#9f1932;}
.challenge-vote{align-self:flex-start;margin:0 10px 10px;padding-inline:12px;border-radius:22px;}
.winner-card{border-radius:18px;}

.profile-destinations{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding-bottom:22px;}
.profile-destinations a{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:62px;padding:14px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--accent);font-size:14px;font-weight:700;}
#saved-recipes{scroll-margin-top:20px;}
#account-refresh-status{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;padding-block:6px;color:var(--muted);font-size:12px;}
#account-refresh-status .text-action{font-size:12px;}
#app-shell.account-refreshing :is(.profile-content,#saved-all-overlay,#recipe-overlay,#editprofile-overlay,#planning-overlay,#privacy-overlay,#notif-overlay,#challenge-submit-overlay,.challenge-board){visibility:hidden;pointer-events:none;}
.nav-tabs{grid-template-columns:repeat(5,minmax(0,1fr));gap:0;}
.nav-tab{min-width:0;padding-inline:2px;font-size:10px;line-height:1.25;gap:5px;}
.nav-tab span{max-width:100%;text-align:center;}
.nav-tab.active{font-weight:800;text-decoration:none;background:var(--accent-soft);border-radius:14px;}
.nav-tab.active svg{stroke-width:2.2;}
#home-dock-search{display:none;}
@media (max-width:819px){
  #bottom-nav{border:0;background:var(--canvas);padding:5px 0 calc(8px + env(safe-area-inset-bottom,0px));}
  #bottom-nav .navigation-content{display:flex;align-items:center;gap:8px;padding-inline:var(--gutter);}
  #bottom-nav .nav-tabs{flex:1;min-width:0;padding:4px;background:var(--surface);border-radius:34px;box-shadow:0 5px 18px #2119171c;}
  #bottom-nav .nav-tab{min-height:52px;border-radius:26px;}
  #app-shell:has(#screen-home.active) #home-dock-search{display:grid;place-items:center;flex:none;width:50px;height:50px;border-radius:50%;background:var(--surface);color:var(--ink);box-shadow:0 5px 18px #2119171c;}
}
@media (min-width:560px){
  .challenge-feature h3{max-width:55%;}
  .challenge-feature>img{width:54%;height:95%;}
  .challenge-guide{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:18px;align-items:center;padding:14px 18px;}
  .challenge-entries{grid-template-columns:repeat(3,minmax(0,1fr));}
  #screen-chatbot .recipe-result-link{grid-template-columns:200px minmax(0,1fr) auto;}
  #screen-chatbot .recipe-result-link img{grid-column:auto;height:135px;}
  .home-challenge{grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);}
  .home-community-photo{height:100%;min-height:240px;}
  .home-quick-links a{font-size:14px;}
  .home-quick-links{gap:36px;}
  .home-shortcuts{grid-template-columns:repeat(4,minmax(0,1fr));}
  .home-recipe-row{grid-template-columns:repeat(4,minmax(0,1fr));}
  .home-pantry{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:32px;align-items:center;}
  .nav-tab{font-size:12px;}
}
@media (min-width:820px){
  .recipe-photo-grid{grid-template-columns:minmax(0,1.65fr) minmax(0,1fr);grid-template-rows:repeat(2,minmax(0,1fr));height:clamp(360px,34vw,460px);}
  .recipe-photo-card{display:grid;grid-template-rows:minmax(0,1fr) auto;}
  .recipe-photo-card-featured{grid-column:1;grid-row:span 2;}
  .recipe-photo-card img{min-height:0;height:100%;}
  #quick-chips{grid-template-columns:repeat(4,minmax(0,1fr));}
  .challenge-feature{min-height:330px;}
  .challenge-shortcuts .photo-shortcut{min-height:142px;}
  #home-app-header{min-height:50px;}
  #greeting-card{gap:18px;padding:10px 0 22px;}
  .home-welcome-copy{grid-template-columns:minmax(0,1fr) auto minmax(230px,335px);gap:18px;}
  .home-welcome-copy #home-title{font-size:clamp(34px,4.45vw,59px);}
  #home-search-pill{grid-column:auto;}
  .home-cook-link{padding-inline:18px;max-width:none;min-height:48px;}
  .home-feature-gallery{grid-template-columns:minmax(0,1.34fr) minmax(0,1fr);gap:16px;}
  .home-feature{min-height:370px;}
  .home-feature-caption{gap:18px;}
  .home-feature-caption strong{font-size:clamp(29px,3.25vw,46px);}
  .home-feature>img{width:57%;height:84%;}
  .home-feature-panel .home-photo-shopping{padding-inline:17px;font-size:14px;}
  .home-picks{grid-template-rows:auto 1fr;}
  .home-pick-grid{gap:12px;}
  .home-pick{min-height:148px;padding:17px;}
  .home-feature-companions{gap:16px;}
  .home-photo-recipe-copy{display:flex;justify-content:space-between;align-items:center;padding:11px 13px;}
  #recipe-overlay{align-items:center;justify-content:center;}
  #recipe-sheet{max-width:712px;border-radius:22px;}
  .home-quick-links{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:40px;}
  .home-discovery{gap:42px;}
  .home-shortcuts,.home-recipe-row{gap:22px;}
  .home-shortcut-copy strong,.home-recipe-copy strong{font-size:16px;}
  .home-shortcut-copy,.home-recipe-copy{padding:12px 0 0;}
  .home-challenge{grid-template-columns:minmax(0,1fr) minmax(0,1.6fr);}
  .home-community-photo{height:260px;}
  .home-challenge-copy{grid-template-columns:minmax(0,1fr) auto;padding:32px;gap:24px;}
  .home-challenge h2{font-size:32px;}
  .nav-tabs{flex-wrap:nowrap;gap:4px;}
  .nav-tab{font-size:13px;padding:10px 12px;}
}
@media (hover:hover){
  .recipe-photo-card:hover{border-color:var(--accent);}
  .photo-shortcut:hover,.challenge-submit:hover{filter:brightness(.95);}
  .home-feature:hover,.home-pick:hover,.home-cook-link:hover{filter:brightness(.95);}
  .home-popular:hover{background:var(--accent-soft);}
  .home-photo-recipe:hover,.home-quick-links a:hover{border-color:var(--accent);}
  .profile-destinations a:hover{background:var(--accent-soft);}
  .home-shortcut:hover,.home-recipe-card:hover{background:transparent;color:var(--accent);}
  .home-quick-links a:hover{color:var(--accent);}
}
