[hidden] {display:none !important;}
.ad-slot {width:100%;min-width:0;}
.homepage-ad-row {width:100%;margin:0;}
.search-ad {height:280px;margin-top:0;}
.grid-ad {height:275px;min-height:275px;}
.browse-directory-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:32px 0;}
.browse-directory-card {padding:24px;background:var(--surface);border:1px solid var(--border);border-radius:16px;text-decoration:none;}
.browse-directory-card h2 {font-family:Manrope,sans-serif;font-size:20px;line-height:26px;}
.auth-heading {font-size:32px;line-height:36px;}
.account-form input:not([type=checkbox]) {width:100%;min-height:52px;border:1px solid var(--border);border-radius:12px;padding:12px;background:white;}
.account-form label {display:block;font-weight:700;}
.account-form .helptext,.account-form ul {font-size:13px;color:var(--text-muted);}
.account-form .errorlist {color:var(--error);}
.auth-green-col-div {height:100%;background:var(--primary);color:white;padding:40px 32px;}
.auth-green-col-inner h2,.auth-green-col-inner h3 {color:white;}
.auth-social-buttons {display:grid;gap:12px;margin:24px 0;text-align:center;}
.auth-social-buttons a {display:block;border:1px solid var(--border);border-radius:10px;padding:12px;text-decoration:none;}
.auth-social-buttons .facebookButton {color:#fff;background:#4267b2;}
.auth-reset-link {display:block;margin-top:16px;color:var(--primary);}
.auth-dialog {max-width:480px;border:0;border-radius:20px;padding:32px;background:var(--surface);box-shadow:var(--shadow-floating);}
.auth-dialog::backdrop {background:rgba(16,20,18,.46);}
.auth-dialog>button {float:right;border:0;background:transparent;font-size:24px;}

.result-selected-items {margin:0 0 32px;}
.result-selected-heading {display:flex;justify-content:space-between;align-items:center;gap:12px;}
.result-selected-heading h2 {font-size:20px;}
.messages {padding:16px;}
@media(max-width:899px){.browse-directory-grid {grid-template-columns:repeat(2,minmax(0,1fr));}.auth-heading{font-size:28px;}.auth-green-col-div{padding:24px;}}
@media(max-width:991px){.grid-ad{height:170px;min-height:170px;}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;}}

.side-ad{height:100%;min-height:170px;}

.password-field{position:relative;}
.password-toggle{position:absolute;right:14px;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:20px;height:20px;border:0;background:transparent;padding:0;}
.password-toggle .eye-icon{position:static;width:20px;height:20px;}
.social-google,.social-facebook{display:flex;align-items:center;justify-content:center;gap:12px;min-height:48px;border:1px solid var(--border);border-radius:12px;font-size:14px;font-weight:700;text-decoration:none;}
.social-google{background:white;color:#444;}
.social-google span{color:#4285f4;font-size:20px;}
.social-facebook{background:#4267b2;color:white;}
.social-facebook img{width:20px;height:20px;}

.is-sentinel{height:1px;min-height:1px;padding:0;border:0;margin:0;overflow:hidden;font-size:0;}

.recipe-mobile-return a{display:inline-flex;min-height:58px;align-items:center;gap:10px;padding:0 20px;color:var(--text);font-weight:800;text-decoration:none;}

.account-management form{max-width:720px;display:grid;gap:16px;margin:24px 0;}
.account-management button{min-height:44px;border:1px solid var(--border);border-radius:12px;padding:10px 18px;background:var(--primary);color:white;font-weight:700;}
.account-management input:not([type=radio]):not([type=checkbox]){min-height:52px;border:1px solid var(--border);border-radius:12px;padding:12px;}

@media(max-width:767px){.search-ad{height:170px;}}
.social-google,.social-facebook{height:45px;min-height:45px;background:white;color:var(--text);box-shadow:0 4px 12px rgba(31,28,24,.1);}
.social-google svg{width:26px;height:26px;}

.auth-social{display:grid;gap:12px;margin-top:12px;}.auth-social form{margin:0;}

/* UX pass (UX-IMPROVEMENTS.md) */

/* P1-1: reserve ad space on desktop only; collapse slots that stay empty. */
@media(min-width:992px){.ad-slot{min-height:170px;}.home-ad,.top-ad,.footer-ad{min-height:120px;}}
@media(max-width:991px){.wasteys-footer-ad-div{height:auto;}}
ins.adsbygoogle[data-ad-status="unfilled"]{display:none!important}
.ad-slot:has(ins.adsbygoogle[data-ad-status="unfilled"]){min-height:0!important;height:auto!important;margin:0!important}
.ad-slot.is-empty,.homepage-ad-row:has(.ad-slot.is-empty),.wasteys-top-ad-div:has(.ad-slot.is-empty),.wasteys-footer-ad-div:has(.ad-slot.is-empty),
.homepage-ad-row:has(ins.adsbygoogle[data-ad-status="unfilled"]),
.wasteys-top-ad-div:has(ins.adsbygoogle[data-ad-status="unfilled"]),
.wasteys-footer-ad-div:has(ins.adsbygoogle[data-ad-status="unfilled"]){display:none}
body[data-staging="true"] .ad-slot,body[data-staging="true"] .wasteys-top-ad-div,body[data-staging="true"] .wasteys-footer-ad-div,
.ads-unavailable .ad-slot,.ads-unavailable .wasteys-top-ad-div,.ads-unavailable .wasteys-footer-ad-div,
.ads-unavailable .homepage-ad-row,.ads-unavailable .recipe-grid-ad{display:none!important}

/* P1-2 / P1-3: primary CTA with live count, sticky on mobile. */
.cta-label-mobile{display:none;}
@media(max-width:767px){
  .home-hero{height:auto;grid-template-rows:none;}
  .home-hero>.ingredient-composer-card{height:auto;grid-template-rows:none;overflow:visible;}
  .ingredient-composer-card .ingredient-browse{max-height:none;overflow:visible;}
  .composer-footer{position:sticky;bottom:0;z-index:20;margin:0 -16px -16px;border-top:0;border-radius:0 0 20px 20px;padding:12px 16px calc(12px + env(safe-area-inset-bottom));background:linear-gradient(to top,var(--surface) 70%,transparent);}
  .composer-footer .wu-button{width:100%;min-height:52px;font-size:16px;}
  .cta-label-desktop{display:none;}
  .cta-label-mobile{display:inline;}
}
@media(min-width:600px) and (max-width:767px){.composer-footer{margin:0 -24px -24px;padding-right:24px;padding-left:24px;}}

/* P1-4: default selection explained, chip row collapsed. */
.selected-helper{margin:0;color:var(--text-muted);font-size:13px;line-height:18px;}
.selected-ingredients:not(.selected-ingredients-stacked) .selected-chip-line{flex-wrap:wrap;min-width:0;}
.selected-more{display:inline-flex;min-height:36px;flex:0 0 auto;align-items:center;border:1px dashed rgba(31,90,68,.4);border-radius:999px;background:var(--surface);padding:7px 12px;color:var(--primary);font-size:13px;font-weight:800;line-height:18px;}

/* P1-5: featured recipes on the homepage. */
.home-featured{padding-top:8px;}
.home-featured .home-section-heading{margin-bottom:20px;}
.home-featured-grid{margin-bottom:24px;}
.home-category-links{margin:0 0 16px;}
.home-featured-all{color:var(--primary);font-weight:800;text-decoration:none;}
.home-featured-all:hover{color:var(--primary-hover);text-decoration:underline;}
@media(max-width:767px){
  .home-featured-grid{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:70vw;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;margin-right:calc(var(--gutter) * -1);padding-right:var(--gutter);scrollbar-width:none;}
  .home-featured-grid::-webkit-scrollbar{display:none;}
  .home-featured-grid>.recipe-card{scroll-snap-align:start;}
  .home-category-links{flex-wrap:nowrap;overflow-x:auto;margin-right:calc(var(--gutter) * -1);padding-right:var(--gutter);scrollbar-width:none;}
  .home-category-links a{flex:0 0 auto;}
}

/* P1-6: hero copy flows naturally. */
.home-intro h1 span,.home-intro .large-body span{display:inline;}
.home-intro h1{text-wrap:balance;}
.home-intro .large-body{text-wrap:pretty;}
.home-sub-mobile{display:none;}
@media(max-width:767px){.home-sub-mobile{display:block;margin:8px 0 0;color:var(--text-muted);font-size:15px;line-height:22px;}}

/* P1-7: slim informational cookie notice. */
.cookie-banner{gap:12px;border-radius:14px;padding:10px 12px 10px 16px;}
.cookie-banner button{min-height:36px;}
@media(max-width:767px){
  .cookie-banner{right:12px;left:12px;bottom:calc(84px + env(safe-area-inset-bottom));max-height:56px;padding:8px 8px 8px 12px;}
  .cookie-banner p{font-size:12px;line-height:16px;}
}

/* P2-1: header labels, count badge and recipe search. */
.nav-count{display:inline-flex;min-width:20px;height:20px;margin-left:6px;padding:0 6px;align-items:center;justify-content:center;border-radius:999px;background:var(--primary);color:#fff;font-size:11px;font-weight:800;line-height:1;vertical-align:1px;}
.header-search{display:flex;width:220px;min-height:44px;flex:0 0 220px;align-items:center;gap:8px;margin-left:auto;border:1px solid var(--border);border-radius:12px;background:var(--surface);padding:0 12px;color:var(--text-muted);}
.header-search:focus-within{border-color:var(--primary);}
.header-search input,.mobile-header-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:var(--text);font-size:14px;}
.header-search+.desktop-account{margin-left:0;}
.mobile-search-button{display:none;width:48px;height:48px;align-items:center;justify-content:center;border:1px solid var(--border);border-radius:14px;background:var(--surface);color:var(--text);box-shadow:var(--shadow-floating);}
.mobile-header-search{width:min(var(--max-content),calc(100% - (var(--gutter) * 2)));margin:0 auto;padding:0 0 12px;}
.mobile-header-search form{display:flex;align-items:center;gap:8px;border:1px solid var(--border);border-radius:12px;background:var(--surface);padding:4px 4px 4px 12px;color:var(--text-muted);}
.mobile-header-search input{font-size:16px;}
.mobile-header-search .wu-button{min-height:40px;padding:8px 16px;}
/* Side-ad columns narrow the header between 1200 and 1439px. */
.desktop-nav a{white-space:nowrap;}
@media(max-width:1099px),(min-width:1200px) and (max-width:1439px){.header-search{display:none;}.header-search+.desktop-account{margin-left:auto;}.mobile-search-button{display:inline-flex;}}
@media(max-width:899px){.mobile-search-button{margin-left:auto;}.mobile-search-button+.mobile-menu-button{margin-left:0;}}

/* P2-2: one category list, active chip highlighted. */
.category-filter-chip.active{background:var(--primary);color:#fff;}

/* P2-3: result cards say what is already at home. */
.recipe-match-badge{position:absolute;top:10px;left:10px;z-index:1;border-radius:999px;background:var(--primary);padding:4px 10px;color:#fff;font-size:12px;font-weight:800;line-height:16px;box-shadow:var(--shadow-floating);}
.recipe-card p.recipe-missing-line{margin:-4px 0 0;color:var(--accent);font-weight:700;}
.recipe-missing-overlay{display:none;}
@media(hover:hover) and (min-width:900px){
  .recipe-missing-overlay{display:grid;opacity:0;transition:opacity 160ms ease-out;}
  .recipe-card-link:hover .recipe-missing-overlay,.recipe-card-link:focus-visible .recipe-missing-overlay{opacity:1;}
}

/* P2-4: recipe page pantry summary, share, step progress, similar recipes. */
.recipe-detail-buttons{position:absolute;right:20px;bottom:20px;z-index:2;display:flex;align-items:center;gap:10px;}
.recipe-detail-buttons .recipe-detail-favorite-button{position:static;}
.recipe-detail-buttons.no-image{position:static;justify-content:flex-end;}
.recipe-share{position:relative;}
.recipe-share-button{display:inline-flex;width:52px;height:52px;align-items:center;justify-content:center;border:1px solid rgba(255,255,255,.72);border-radius:50%;background:rgba(255,255,255,.94);color:var(--primary);box-shadow:var(--shadow-floating);}
.recipe-share-menu{position:absolute;right:0;bottom:calc(100% + 8px);display:grid;min-width:200px;border:1px solid var(--border);border-radius:14px;background:var(--surface);padding:6px;box-shadow:var(--shadow-floating);}
.recipe-share-menu a,.recipe-share-menu button{display:block;width:100%;border:0;border-radius:10px;background:transparent;padding:10px 12px;color:var(--text);font-size:14px;font-weight:700;line-height:20px;text-align:left;text-decoration:none;}
.recipe-share-menu a:hover,.recipe-share-menu button:hover{background:var(--primary-soft);color:var(--primary-active);}
.recipe-pantry{margin:0 0 12px;border-radius:12px;background:var(--primary-soft);padding:10px 14px;color:var(--primary-active);font-size:14px;font-weight:700;line-height:20px;}
.recipe-public-steps li[data-step]{cursor:pointer;}
.recipe-public-steps li.done p{color:var(--text-muted);text-decoration:line-through;}
.recipe-public-steps li.done span{color:var(--text-muted);}
.recipe-similar{border-top:1px solid var(--border);margin:0 32px;padding:28px 0 32px;}
.recipe-similar h2{margin-bottom:18px;font-size:26px;line-height:32px;}
.recipe-similar-grid{grid-template-columns:repeat(4,minmax(0,1fr));}
.drawer-mode .recipe-similar-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
@media(max-width:899px){
  .recipe-detail-buttons{right:16px;bottom:16px;}
  .recipe-share-button{width:48px;height:48px;}
  .recipe-similar{margin:0 20px;padding-bottom:24px;}
  .recipe-similar-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}

/* P2-5: footer groups; accordions on mobile. */
.footer-group summary{list-style:none;}
.footer-group summary::-webkit-details-marker{display:none;}
.footer-group summary h2{margin-bottom:14px;}
.footer-links{display:grid;gap:10px;}
@media(min-width:768px){.footer-group summary{pointer-events:none;}}
@media(max-width:767px){
  .site-footer-inner{grid-template-columns:1fr;gap:0;padding:28px 0 12px;}
  .footer-brand{padding-bottom:16px;}
  .footer-brand img{width:100px;}
  .footer-brand p{margin-top:8px;font-size:14px;line-height:20px;}
  .footer-contact{gap:4px;margin-top:10px;}
  .footer-group{border-top:1px solid rgba(251,248,242,.14);}
  .footer-group summary{display:flex;min-height:46px;align-items:center;justify-content:space-between;cursor:pointer;}
  .footer-group summary h2{margin:0;}
  .footer-group summary::after{content:'+';color:#FBF8F2;font-size:20px;line-height:1;}
  .footer-group details[open] summary::after{content:'−';}
  .footer-links{padding:0 0 14px;}
  .footer-bottom{padding:12px 0 16px;}
}

/* P3-2: selected ingredient chips are unmistakable. */
.ingredient-item.selected{border-color:var(--primary);background:var(--primary);color:#fff;}
.ingredient-item.selected span::before{content:'✓ ';}

/* P3-3: no exact matches on /result. */
.results-no-exact{display:grid;gap:12px;margin:0 0 24px;border:1px solid var(--border);border-radius:16px;background:var(--surface);padding:20px;}
.results-no-exact h2{margin:0;font-size:20px;line-height:26px;}
.results-no-exact-actions{display:flex;flex-wrap:wrap;gap:10px;}

/* P3-6: ingredient tabs fade out where more tabs are hidden. */
@media(max-width:767px){.ingredient-tabs-wrap.can-scroll-end .ingredient-tabs{-webkit-mask-image:linear-gradient(to right,#000 78%,transparent);mask-image:linear-gradient(to right,#000 78%,transparent);}}
