/* =========================================================
   NILI'S KITCHEN AI - CLEAN STYLE.CSS
   Old stacked CSS cleaned. Mobile #content / #result are visible.
========================================================= */

*{margin:0;padding:0;box-sizing:border-box}
:root{--page-bg:#f3eee6;--brand-bg:#fff8ef;--card-bg:#fffdf8;--white:#fff;--green:#3e5d47;--green-dark:#20392b;--green-soft:#f1f4ec;--green-border:#dde6d4;--orange:#b86a35;--orange-dark:#8f4f25;--text:#221a14;--muted:#7a6c5f;--border:#eadfce}
html,body{width:100%;min-height:100%;font-family:Georgia,"Times New Roman",serif;background:var(--page-bg);color:var(--text);overflow-x:hidden}body{min-height:100vh}button,input,select{font-family:inherit}button{cursor:pointer}img,video{max-width:100%}

/* LAYOUT */
#sidebar,.sidebar{position:fixed;top:0;left:0;z-index:20;width:360px;height:100vh;padding:16px;overflow:hidden;overflow-x:hidden;background:var(--page-bg);border-right:1px solid rgba(24,34,52,.08);box-shadow:18px 0 48px rgba(24,34,52,.08)}
.sidebar-shell,.sidebar-main,.sidebar-top{display:flex;flex-direction:column;gap:10px}.sidebar-shell{min-height:100%}.sidebar-bottom{display:none}.content,#content{margin-left:360px;min-height:100vh;padding:24px;overflow:hidden;overflow-x:hidden;background:var(--page-bg)}

/* BRAND */
.nk-brand-card,.sidebar-brand,.brand-card{width:100%;min-height:140px;background:var(--brand-bg);border-radius:28px;padding:14px 16px;display:flex;align-items:center;justify-content:center;overflow:visible;box-shadow:0 10px 30px rgba(0,0,0,.04)}
.nk-brand-inner,.brand-main,.brand-row{display:flex;align-items:center;justify-content:center;gap:14px;direction:ltr}.nk-logo,.brand-logo,.logo-shell .logo,.logo{width:82px;height:82px;min-width:82px;min-height:82px;object-fit:contain;display:block}.nk-brand-text,.brand-text{text-align:left;direction:ltr;max-width:190px}.nk-title,.brand-text h1,#sidebar h1,.sidebar h1{margin:0;color:#07172d;font-size:26px;line-height:1.05;font-weight:900;white-space:nowrap}.nk-subtitle,.subtitle,#appSubtitle,.brand-text p{margin:6px 0 0;color:#4b5563;font-size:12px;line-height:1.15;font-weight:800}

/* LANGUAGE */
.floating-lang{position:fixed;top:40px;right:34px;z-index:999999}.lang-wrapper{position:relative;display:inline-block}.lang-btn,#langBtn{border:none;background:transparent;color:#6e747e;font-size:22px;font-weight:900;line-height:1;display:inline-flex;align-items:center;gap:6px}.lang-options,#langOptions{display:none;position:absolute;top:calc(100% + 8px);right:0;width:78px;min-width:78px;background:#fff;border-radius:16px;padding:6px 0;box-shadow:0 14px 30px rgba(0,0,0,.20);overflow:hidden;z-index:1000000}.lang-options.open,#langOptions.open{display:flex;flex-direction:column}.lang-options button,#langOptions button{height:32px;line-height:32px;border:none;background:#fff;font-size:12px;font-weight:800}

/* MOBILE HERO */
.mobile-only,.mobile-hero-big,.mobile-hero-small{display:none}.mobile-hero-big,.mobile-hero-small{position:relative;overflow:hidden;border-radius:16px}.mobile-hero-big img,.mobile-hero-small img{width:100%;object-fit:cover;display:block}.mobile-hero-text{position:absolute;left:14px;right:14px;bottom:16px;z-index:5;color:#fff}.mobile-hero-text .hero-title-text{white-space:normal;word-break:normal;overflow-wrap:anywhere}

/* UPLOAD */
.upload-card,.scan-action,.upload{width:100%;min-height:72px;border:none;border-radius:18px;background:linear-gradient(135deg,var(--green-dark),var(--green));color:#fff;padding:14px 16px;margin:0;display:flex;flex-direction:column;gap:8px;align-items:stretch;justify-content:center;text-align:left;cursor:pointer;box-shadow:0 14px 30px rgba(22,63,49,.22);overflow:hidden}.upload-card-text{display:flex;flex-direction:column;gap:4px}.upload-card-text strong,#scanTitle,.scan-title,#uploadTitle,.upload h3{display:block;color:#fff;font-size:17px;line-height:1.1;font-weight:900}.upload-card-text span,#statusText,.scan-subtitle{display:block;color:rgba(255,255,255,.82);font-size:12px;line-height:1.2;font-weight:700}.gallery-mini-btn{display:none;width:max-content;margin-top:2px;margin-bottom:2px;padding:7px 12px;border-radius:999px;background:rgba(255,255,255,.18);color:#fff;font-size:12px;font-weight:800;border:none}.analyze-progress,.progress{width:100%;height:6px;margin-top:4px;border-radius:999px;overflow:hidden;background:rgba(255,255,255,.22)}#bar,.bar{width:0%;height:100%;border-radius:999px;background:linear-gradient(90deg,#ffb347,#ff7b54);transition:width .35s ease}

/* MANUAL */
.manual-box,.manual-panel{background:var(--card-bg);border-radius:18px;padding:12px}.manual{display:grid;grid-template-columns:1fr 42px;gap:8px;align-items:center}#manualInput{width:100%;height:40px;border:1px solid rgba(24,34,52,.10);border-radius:13px;background:#f9fafb;color:var(--text);padding:0 12px;font-size:13px;font-weight:800;outline:none}#manualInput::placeholder{color:#9ca3af}.manual button{width:42px;height:40px;min-width:42px;border:none;border-radius:13px;background:var(--orange);color:#fff;font-size:22px;font-weight:950;line-height:1}

/* CATEGORY */
.category-box,.category-panel{padding:14px;margin:0;background:#fff;border-radius:20px;overflow:visible;border:1px solid rgba(24,34,52,.08);box-shadow:0 14px 34px rgba(24,34,52,.055)}.section-title,.panel-title,#manualTitle,#categoriesTitle{margin:0 0 10px;color:#182234;font-size:14px;line-height:1.2;font-weight:950}.category-grid,.category-grid.collapsed{display:flex;flex-wrap:wrap;gap:8px;height:auto;min-height:0;max-height:none;margin:0;padding:0;overflow:visible;opacity:1;pointer-events:auto}.category-grid button,.category-btn{width:auto;min-height:27px;padding:6px 10px;border-radius:999px;background:var(--green-soft);color:var(--green);border:1px solid var(--green-border);font-size:11px;font-weight:900;line-height:1;white-space:nowrap}.category-grid button:hover,.category-grid button.active,.category-btn:hover,.category-btn.active{background:var(--green);color:#fff;border-color:var(--green)}.category-toggle,#categoryArrow{display:none}.subcategories,#ingredientModalItems{display:flex;flex-wrap:wrap;gap:8px}.sub-btn,.modal-ingredient-btn{border-radius:999px;background:var(--green-soft);color:#2f4a1f;border:1px solid #d7e8c3;padding:9px 13px;font-size:13px;font-weight:800}

/* AD + CREATOR */
.video-ad-box,.fake-ad-box,.ad-box{display:none}.ad-media-box{width:100%;height:180px;margin:0;border-radius:18px;overflow:hidden;position:relative;background:#f3f4f6;box-shadow:0 12px 28px rgba(0,0,0,.08)}.ad-media-box img,.ad-media-box video{width:100%;height:100%;object-fit:cover;display:block}.creator-card,.creator-panel,.creator-auth-card{padding:10px;border-radius:18px;background:var(--card-bg);border:1px solid rgba(24,34,52,.08);box-shadow:0 14px 34px rgba(24,34,52,.055)}.creator-tabs{height:32px;display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:4px;margin-bottom:8px;background:#f3f4f6;border-radius:14px}.creator-tab{height:24px;border:none;border-radius:10px;background:transparent;color:#6b7280;font-size:10px;font-weight:900}.creator-tab.active{background:#fff;color:#182234}.creator-card-text strong{display:block;color:#182234;font-size:12px;font-weight:950}.creator-card-text span{display:block;color:#6b7280;font-size:11px;line-height:1.25;font-weight:700;margin:2px 0 8px}.creator-card input{width:100%;height:30px;margin-bottom:6px;border:1px solid rgba(24,34,52,.10);border-radius:10px;background:#f9fafb;color:#182234;padding:0 10px;font-size:11px;font-weight:800;outline:none}.creator-password-wrap{display:grid;grid-template-columns:1fr 54px;gap:6px}.creator-password-wrap button{height:30px;border:none;border-radius:10px;background:#eef2f7;color:#374151;font-size:10px;font-weight:900}.creator-continue-btn{width:100%;height:34px;border:none;border-radius:10px;background:#182234;color:#fff;font-size:11px;font-weight:950}

/* DESKTOP HERO */
.hero{width:100%;height:calc(100vh - 48px);overflow:hidden}.hero-bg{width:100%;height:100%;display:grid;grid-template-columns:minmax(0,1.65fr) minmax(320px,.75fr);gap:18px;overflow:hidden}.hero-main-card{position:relative;width:100%;height:100%;border-radius:30px;overflow:hidden;box-shadow:0 24px 70px rgba(0,0,0,.16)}.hero-main-img{width:100%;height:100%;object-fit:cover}.hero-dark{position:absolute;inset:0;background:linear-gradient(90deg,rgba(15,23,42,.82),rgba(15,23,42,.12))}.hero-content{position:absolute;left:48px;top:50%;transform:translateY(-50%);z-index:5;max-width:620px;color:#fff}.hero-badge-text{display:inline-flex;align-items:center;padding:8px 14px;margin-bottom:14px;border-radius:999px;background:linear-gradient(135deg,rgba(255,140,66,.95),rgba(255,94,98,.95));color:#fff;font-size:13px;font-weight:900;line-height:1}.hero-title-text{display:block;margin:0;color:#fff;font-size:54px;font-weight:900;line-height:.98;letter-spacing:-1.2px;text-shadow:0 4px 18px rgba(0,0,0,.30)}.hero-desc-text{display:block;margin-top:16px;max-width:620px;color:rgba(255,255,255,.92);font-size:22px;font-weight:500;line-height:1.45;text-shadow:0 3px 12px rgba(0,0,0,.22)}.hero-side-images{width:100%;height:100%;display:grid;grid-template-rows:repeat(2,minmax(0,1fr));gap:18px}.hero-side-images img{width:100%;height:100%;object-fit:cover;border-radius:28px;box-shadow:0 18px 50px rgba(0,0,0,.12)}

/* RESULTS */
#result,#result.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;width:100%;padding:28px 0 60px;margin:0;visibility:visible;opacity:1}#result p{font-size:18px;color:var(--muted)}.card{width:100%;background:#fff;border-radius:26px;overflow:hidden;box-shadow:0 18px 45px rgba(0,0,0,.08);transition:.25s ease}.card:hover{transform:translateY(-4px)}.card img{width:100%;height:240px;object-fit:cover;display:block}.card-body{padding:18px}.card h3{font-size:20px;line-height:1.25;font-weight:900;color:var(--text);margin-bottom:10px}.time{font-size:14px;font-weight:800;color:var(--muted);margin:8px 0}.ingredients-count{font-size:13px;font-weight:800;color:#4f6f2c;margin-bottom:10px}.ingredients{display:flex;flex-wrap:wrap;gap:8px}.ingredients span{display:inline-flex;align-items:center;background:var(--green-soft);color:#2f4a1f;border-radius:999px;padding:7px 11px;font-size:12px;font-weight:800}

/* SELECTED TRAY */
.selected-tray-modal{position:fixed;inset:0;z-index:999999;display:none;align-items:center;justify-content:center;background:rgba(15,23,42,.55);backdrop-filter:blur(8px);padding:20px}.selected-tray-modal.has-items{display:flex}.selected-tray-box{width:min(390px,92vw);aspect-ratio:9/16;max-height:90vh;background:var(--card-bg);border:1px solid #eadfce;border-radius:28px;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 34px 100px rgba(0,0,0,.34)}.selected-tray-header{padding:22px 22px 18px;display:flex;justify-content:space-between;align-items:flex-start;gap:14px;background:linear-gradient(135deg,#182234,var(--green));color:#fff}.selected-tray-header h2{font-size:24px;line-height:1.05;font-weight:950}.selected-tray-header p{margin-top:7px;font-size:13px;line-height:1.35;color:rgba(255,255,255,.78);font-weight:700}.selected-tray-close{width:34px;height:34px;border:none;border-radius:12px;background:rgba(255,255,255,.16);color:#fff;font-size:24px}#selectedTrayItems{flex:1;display:flex;align-content:flex-start;flex-wrap:wrap;gap:8px;padding:20px;overflow-y:auto}.selected-chip{display:inline-flex;align-items:center;gap:7px;height:34px;padding:0 12px;border-radius:999px;background:#fff;color:#182234;border:1px solid #eadfce;font-size:12px;font-weight:900}.selected-chip button{border:none;background:transparent;color:#c2410c;font-size:15px;font-weight:950}.selected-tray-bottom{padding:16px 18px 18px;background:#fff;border-top:1px solid rgba(15,23,42,.08)}.tray-confirm{display:flex;align-items:center;gap:10px;color:#182234;font-size:14px;font-weight:900;margin-bottom:14px}.tray-confirm input{width:18px;height:18px;accent-color:var(--green)}#trayGetRecipesBtn{width:100%;height:52px;border:none;border-radius:18px;background:linear-gradient(135deg,var(--orange),var(--orange-dark));color:#fff;font-size:17px;font-weight:950}.selected-clear-bottom{align-self:center;margin:0 auto 12px;height:34px;border:none;border-radius:999px;background:rgba(24,34,52,.06);color:#6b7280;padding:0 16px;font-size:12px;font-weight:900}

/* MODALS */
.modal,.ingredient-modal{display:none;position:fixed;inset:0;width:100vw;height:100vh;z-index:9999999;align-items:center;justify-content:center;padding:24px;background:rgba(0,0,0,.65)}.ingredient-modal{background:rgba(20,24,18,.58);backdrop-filter:blur(8px)}.modal-content,.ingredient-modal-content{width:min(900px,92vw);max-height:88vh;overflow-y:auto;background:var(--card-bg);border-radius:28px;padding:30px;position:relative;box-shadow:0 30px 100px rgba(0,0,0,.35)}.ingredient-modal-content{width:min(520px,92vw);max-height:72vh;border:1px solid var(--border)}.close,.ingredient-modal-close{position:absolute;top:18px;right:18px;width:38px;height:38px;border:none;border-radius:50%;background:#111;color:#fff;display:flex;align-items:center;justify-content:center;font-size:26px;z-index:10}.ingredient-modal-close{background:var(--orange)}.modal-content img{width:100%;max-height:340px;object-fit:cover;border-radius:24px;margin-bottom:24px}.modal-content h1{font-size:38px;line-height:1.15;color:var(--text);margin-bottom:14px}.modal-content h2,#ingredientModalTitle{font-size:24px;color:var(--text);margin:24px 0 14px;font-weight:900}.modal-content p{font-size:17px;line-height:1.8;color:#374151}

/* RESPONSIVE */
@media(max-width:1200px){#result,#result.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hero-title-text{font-size:42px}}
@media(max-width:980px){html,body{height:auto;min-height:100%;overflow-x:hidden;overflow-y:auto;background:var(--page-bg)}#sidebar,.sidebar{position:relative;top:auto;left:auto;width:100%;height:auto;min-height:0;max-height:none;padding:12px;margin:0;overflow:visible;border:none;box-shadow:none;background:var(--page-bg)}.sidebar-shell,.sidebar-main,.sidebar-top{height:auto;min-height:0;max-height:none;display:flex;flex-direction:column;gap:10px;overflow:visible;padding:0;margin:0}.content,#content{display:block;margin-left:0;min-height:0;height:auto;padding:12px;overflow:visible;background:var(--page-bg)}.hero{display:none}.mobile-only,.mobile-hero-big,.mobile-hero-small{display:block}.mobile-hero-big{margin-top:0}.mobile-hero-big img{height:320px;border-radius:16px}.mobile-hero-small img{height:150px;border-radius:16px}.mobile-hero-text .hero-badge-text{padding:6px 12px;margin-bottom:10px;font-size:11px}.mobile-hero-text .hero-title-text{font-size:22px;line-height:1.12;letter-spacing:-.4px}.mobile-hero-text .hero-desc-text{margin-top:8px;font-size:13px;line-height:1.25;max-width:280px}.nk-brand-card{min-height:118px;border-radius:24px;padding:10px 12px}.nk-logo{width:74px;height:74px;min-width:74px;min-height:74px}.nk-title{font-size:25px}.nk-subtitle{font-size:12px}.floating-lang{top:18px;right:18px}.floating-lang .lang-btn{color:#07172d;font-size:18px}.lang-options,#langOptions{width:72px;min-width:72px}.gallery-mini-btn{display:inline-flex}.upload-card{min-height:70px;padding:12px 14px;border-radius:16px}.upload-card-text strong,#scanTitle{font-size:16px}.upload-card-text span,#statusText{font-size:11px}.category-box,.category-panel,.creator-card,.ad-media-box,.mobile-hero-small{border-radius:16px}.ad-media-box{height:190px}#result,#result.grid{display:grid;grid-template-columns:1fr;gap:16px;width:100%;min-height:200px;padding:16px 0 60px;margin:0;visibility:visible;opacity:1}.card{border-radius:22px}.card img{height:210px}.card h3{font-size:18px}.modal-content,.ingredient-modal-content{padding:22px;border-radius:24px}.modal-content h1{font-size:28px}.modal-content h2{font-size:20px}}

/* =========================================================
   FINAL STABLE OVERRIDES - KEEP ONLY THIS FINAL BLOCK
========================================================= */

/* Footer */
.site-footer-note{
  display:block;
  width:100%;
  margin:4px 0 0;
  padding:0;
  text-align:center;
  color:#8a7b68;
  font-size:10px;
  line-height:1.15;
  font-weight:700;
  opacity:.75;
}
.site-footer-note span{display:block;margin:0;padding:0;line-height:1.15}

/* Selected ingredients / subcategory active color */
.sub-btn.active,
.modal-ingredient-btn.active,
.category-grid button.active,
.category-btn.active{
  background:#ef6a1a !important;
  color:#fff !important;
  border-color:#ef6a1a !important;
}

/* Desktop layout stabilization */
@media (min-width:981px){
  #sidebar,
  .sidebar{
    width:360px;
    height:100vh;
    padding:14px 16px;
    overflow:hidden;
    background:var(--page-bg);
  }

  .sidebar-shell{
    height:100%;
    min-height:0;
    display:flex;
    flex-direction:column;
    gap:8px;
    overflow:hidden;
  }

  .sidebar-main,
  .sidebar-top{
    flex:0 0 auto;
    min-height:0;
    display:flex;
    flex-direction:column;
    gap:6px;
    overflow:visible;
  }

  .nk-brand-card,
  .sidebar-brand,
  .brand-card{
    min-height:112px;
    padding:10px 14px;
    flex:0 0 auto;
  }

  .nk-logo,
  .brand-logo,
  .logo-shell .logo,
  .logo{
    width:74px;
    height:74px;
    min-width:74px;
    min-height:74px;
  }

  .nk-title,
  .brand-text h1,
  #sidebar h1,
  .sidebar h1{
    font-size:24px;
  }

  .upload-card,
  .scan-action,
  .upload{
    min-height:68px;
    padding:12px 14px;
  }

  .category-box,
  .category-panel{
    padding:12px;
  }

  .category-grid,
  .category-grid.collapsed{
    gap:6px;
  }

  .category-grid button,
  .category-btn{
    min-height:22px;
    padding:5px 9px;
    font-size:10.5px;
  }

  .mobile-only,
  .mobile-hero-big,
  .mobile-hero-small{
    display:none !important;
    height:0 !important;
    margin:0 !important;
    padding:0 !important;
    overflow:hidden !important;
  }

  .ad-media-box{
    height:clamp(160px, 24vh, 215px);
    margin:0;
    flex:0 0 auto;
  }

  .creator-card,
  .creator-panel,
  .creator-auth-card{
    padding:7px;
    margin:0;
    flex:0 0 auto;
  }

  .creator-tabs{height:30px;margin-bottom:5px}
  .creator-tab{height:22px}
  .creator-card input{height:25px;margin-bottom:4px}
  .creator-password-wrap{gap:5px}
  .creator-password-wrap button{height:25px}
  .creator-continue-btn{height:28px}

  .site-footer-note{
    flex:0 0 auto;
    margin-top:4px;
    margin-bottom:0;
    padding-bottom:0;
  }

  .content,
  #content{
    margin-left:360px;
    height:100vh;
    min-height:100vh;
    overflow:hidden;
  }

  .hero,
  .hero-bg,
  .hero-main-card,
  .hero-side-images{
    height:100%;
    overflow:hidden;
  }

  #result,
  #result.grid{
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:24px !important;
    background:transparent !important;
  }
}

/* Mobile stabilization */
@media (max-width:980px){
  /* On the mobile home page, hide the desktop content so it cannot create bottom blank space */
  body:not(.show-recipes-page) #content{
    display:none !important;
    height:0 !important;
    min-height:0 !important;
    padding:0 !important;
    margin:0 !important;
    overflow:hidden !important;
  }

  body.show-recipes-page #sidebar{
    display:none !important;
  }

  body.show-recipes-page #content{
    display:block !important;
    height:auto !important;
    min-height:0 !important;
    padding:12px !important;
    margin:0 !important;
    overflow:visible !important;
  }

  body.show-recipes-page #result,
  body.show-recipes-page #result.grid{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:16px !important;
    background:transparent !important;
    padding:12px 0 60px !important;
  }

  .floating-lang{
    top:18px !important;
    right:24px !important;
    z-index:999999 !important;
  }

  .floating-lang .lang-btn,
  .floating-lang #langBtn{
    color:#07172d !important;
    font-size:10px !important;
    transform:none !important;
  }

  .site-footer-note{
    margin:0 !important;
    padding:0 !important;
    line-height:1 !important;
    font-size:10px !important;
    min-height:0 !important;
    height:auto !important;
  }

  .site-footer-note span{
    margin:0 !important;
    padding:0 !important;
    line-height:1 !important;
  }

  .mobile-hero-text .hero-badge-text{
    background:linear-gradient(135deg, rgba(255,140,66,.95), rgba(255,94,98,.95)) !important;
    color:#fff !important;
    box-shadow:0 10px 24px rgba(255,94,98,.28) !important;
  }

  .mobile-hero-text .hero-title-text{
    color:#fff !important;
    text-shadow:0 4px 18px rgba(0,0,0,.30),0 2px 6px rgba(0,0,0,.22) !important;
  }

  .mobile-hero-text .hero-desc-text{
    color:rgba(255,255,255,.92) !important;
    text-shadow:0 3px 12px rgba(0,0,0,.22) !important;
  }
}

.site-footer-note{
  height:auto !important;
  min-height:24px !important;
  line-height:1.25 !important;
  padding-bottom:4px !important;
  overflow:visible !important;
}

.site-footer-note span{
  display:block !important;
  line-height:1.25 !important;
}

@media (min-width:981px){

  #sidebar,
  .sidebar,
  .sidebar-shell{
    overflow: visible !important;
  }

  .sidebar-main{
    padding-bottom: 0px !important;
  }

  .site-footer-note{
    position: relative !important;
    z-index: 5 !important;
    margin-top: 0px !important;
    padding-bottom: 0px !important;
  }

}

@media (max-width:980px){

  html,
  body{
    width:100%;
    max-width:100%;
    overflow-x:hidden;
  }

  #sidebar,
  .sidebar{
    width:100%;
    max-width:100%;
    padding-left:8px;
    padding-right:8px;
    box-sizing:border-box;
  }

  .sidebar-shell,
  .sidebar-main{
    width:100%;
    max-width:100%;
    box-sizing:border-box;
  }

}

@media (max-width:980px){

  .nk-brand-card{
    position:fixed !important;
    top:0 !important;
    left:8px !important;
    right:8px !important;
    width:auto !important;
    z-index:999998 !important;
  }

  .floating-lang{
    position:fixed !important;
    top:12px !important;
    right:14px !important;
    z-index:999999 !important;
  }

  #sidebar,
  .sidebar{
    padding-top:105px !important;
  }
}

@media (min-width:981px){

  .hero-content{
    top:auto !important;
    bottom:48px !important;
    left:48px !important;
    transform:none !important;
  }

}

@media (max-width:980px){

  #sidebar,
  .sidebar{
    padding-top:115px !important;
  }

  .mobile-hero-big{
    margin-top:8px !important;
  }

}

@media (max-width:980px){

  .nk-brand-card{
    border-radius:0 !important;
  }

}

@media (max-width:980px){

  .mobile-hero-big{
    margin-top:12px !important;
  }

}

/* CATEGORY HORIZONTAL COMPACT */

.category-grid,
.category-grid.collapsed{
  display:flex !important;
  flex-wrap:nowrap !important;
  gap:6px !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  padding-bottom:4px !important;
  max-height:34px !important;
}

.category-grid button,
.category-btn{
  flex:0 0 auto !important;
  width:auto !important;
  min-height:28px !important;
  height:28px !important;
  padding:0 9px !important;
  border-radius:999px !important;
  font-size:10.5px !important;
  display:flex !important;
  align-items:center !important;
  gap:4px !important;
  white-space:nowrap !important;
}

.cat-icon{
  font-size:12px !important;
}

/* CATEGORY 2 COLUMN FINAL */

.category-grid,
.category-grid.collapsed{
  display:grid !important;
  grid-template-columns:repeat(2, 1fr) !important;
  gap:5px 7px !important;
}

.category-grid button,
.category-btn{
  width:100% !important;
  height:28px !important;
  min-height:28px !important;
  padding:0 8px !important;
  border-radius:999px !important;
  font-size:10.5px !important;
  line-height:1 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:5px !important;
  white-space:nowrap !important;
}

.cat-icon{
  font-size:12px !important;
  flex:0 0 auto !important;
}

/* FORCE CATEGORY 2 COLUMNS */

#categoryGrid{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:6px !important;
}

#categoryGrid .category-btn{
  width:auto !important;
  max-width:none !important;
  min-width:0 !important;
  height:30px !important;
}

#categoryGrid{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:6px !important;
  max-height:none !important;
  height:auto !important;
  overflow:visible !important;
}

#categoryGrid .category-btn{
  display:flex !important;
  width:100% !important;
  height:28px !important;
}

/* FOOTER INSIDE SIDEBAR FIX */

@media (min-width:981px){

  .sidebar,
  #sidebar{
    height:100vh !important;
    overflow:hidden !important;
  }

  .sidebar-shell{
    height:100% !important;
    display:flex !important;
    flex-direction:column !important;
  }

  .sidebar-main{
    flex:1 1 auto !important;
    min-height:0 !important;
    overflow:hidden !important;
    gap:6px !important;
  }

  .site-footer-note{
    flex:0 0 auto !important;
    margin-top:4px !important;
    padding-bottom:4px !important;
    font-size:9px !important;
    line-height:1.15 !important;
  }

  .category-panel{
    padding:10px !important;
  }

  #categoryGrid .category-btn{
    height:25px !important;
    min-height:25px !important;
    font-size:10px !important;
  }

}

/* SIDEBAR CENTER ALIGN */

.sidebar,
#sidebar{
  text-align:center;
}

.sidebar .panel-title,
.sidebar .section-title,
.sidebar h1,
.sidebar h2,
.sidebar h3,
.sidebar p,
#appSubtitle,
.site-footer-note{
  text-align:center !important;
}

.manual,
.category-grid,
#categoryGrid{
  justify-content:center !important;
}

.manual input,
#manualInput{
  text-align:center !important;
}

.category-btn{
  justify-content:center !important;
}

.upload-card,
.scan-action,
.upload{
  text-align:center !important;
  align-items:center !important;
}

.upload-card-text{
  align-items:center !important;
  text-align:center !important;
}

/* CREATOR SIGNUP HEIGHT FIX */

.creator-card,
.creator-panel,
.creator-auth-card{
  min-height:178px !important;
}

.creator-card-text span{
  min-height:28px !important;
  display:block !important;
}

.creator-card input{
  height:28px !important;
}

.creator-continue-btn{
  height:32px !important;
}

/* COMPACT FOOTER */

.site-footer-note{
  font-size:8.5px !important;
  line-height:1 !important;
  min-height:0 !important;
  height:12px !important;
  margin:2px 0 0 !important;
  padding:0 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

.site-footer-note span{
  display:inline !important;
  line-height:1 !important;
}

/* CREATOR CARD COMPACT */

.creator-card,
.creator-panel,
.creator-auth-card{
  padding:6px !important;
}

.creator-card-text strong{
  font-size:11px !important;
  line-height:1.05 !important;
  margin-bottom:1px !important;
}

.creator-card-text span{
  font-size:9.5px !important;
  line-height:1.05 !important;
  margin:1px 0 4px !important;
}

.creator-tabs{
  height:20px !important;
  margin-bottom:4px !important;
}

.creator-tab{
  height:20px !important;
  font-size:9px !important;
}

.creator-card input{
  height:23px !important;
  margin-bottom:3px !important;
  font-size:10px !important;
}

.creator-password-wrap button{
  height:15px !important;
  font-size:9px !important;
}

.creator-continue-btn{
  height:20px !important;
  font-size:10px !important;
}

/* CREATOR + FOOTER TEXT DARKER */

.creator-card-text strong,
#creatorCardTitle{
  color:#111827 !important;
}

.creator-card-text span,
#creatorCardDesc{
  color:#4b5563 !important;
  opacity:1 !important;
}

.site-footer-note{
  color:#5f5142 !important;
  opacity:1 !important;
}

/* SIDEBAR + HERO ALIGN / SAME BACKGROUND */

:root{
  --page-bg:#eef0f3;
}

body,
html,
.sidebar,
#sidebar,
.content,
#content{
  background:#eef0f3 !important;
}

@media (min-width:981px){

  #sidebar,
  .sidebar{
    padding:14px 8px !important;
  }

  .content,
  #content{
    padding:14px 14px 14px 14px !important;
  }

  .hero{
    height:calc(100vh - 36px) !important;
  }

}

.creator-card-text{
  margin:0 !important;
  padding:0 !important;
  line-height:1 !important;
}

#creatorCardTitle{
  font-size:9px !important;
  line-height:1 !important;
  margin:0 0 1px 0 !important;
  padding:0 !important;
}

#creatorCardDesc{
  font-size:7.5px !important;
  line-height:1 !important;
  margin:0 0 2px 0 !important;
  padding:0 !important;
}

.compact-creator-card{
  padding:5px !important;
 height:auto !important;
   min-height:auto !important;

}

.compact-creator-card .creator-tabs{
  height:24px !important;
  padding:3px !important;
  margin-bottom:3px !important;
}

.compact-creator-card .creator-tab{
  height:18px !important;
  font-size:8.5px !important;
}

.compact-creator-card .creator-card-text{
  margin:0 !important;
  padding:0 !important;
  line-height:1 !important;
}

.compact-creator-card #creatorCardTitle{
  display:block !important;
  font-size:9px !important;
  line-height:1 !important;
  margin:0 0 1px !important;
  padding:0 !important;
}

.compact-creator-card #creatorCardDesc{
  display:block !important;
  font-size:7.5px !important;
  line-height:1 !important;
  margin:0 0 3px !important;
  padding:0 !important;
}

.compact-creator-card input{
  height:22px !important;
  margin-bottom:3px !important;
  font-size:9.5px !important;
}

.compact-creator-card .creator-password-wrap{
  gap:4px !important;
}

.compact-creator-card .creator-password-wrap button{
  height:22px !important;
  font-size:8.5px !important;
}

.compact-creator-card .creator-continue-btn{
  height:24px !important;
  min-height:24px !important;
  font-size:9.5px !important;
  display:block !important;
}

.compact-creator-card{
  padding:5px !important;
}

.compact-creator-card .creator-tabs{
  height:24px !important;
  padding:3px !important;
  margin-bottom:3px !important;
}

.compact-creator-card .creator-tab{
  height:18px !important;
  font-size:8.5px !important;
}

.compact-creator-card .creator-card-text{
  margin:0 !important;
  padding:0 !important;
  line-height:1 !important;
}

.compact-creator-card #creatorCardTitle{
  display:block !important;
  font-size:9px !important;
  line-height:1 !important;
  margin:0 0 1px !important;
  padding:0 !important;
}

.compact-creator-card #creatorCardDesc{
  display:block !important;
  font-size:7.5px !important;
  line-height:1 !important;
  margin:0 0 3px !important;
  padding:0 !important;
}

.compact-creator-card input{
  height:22px !important;
  margin-bottom:3px !important;
  font-size:9.5px !important;
}

.compact-creator-card .creator-password-wrap{
  gap:4px !important;
}

.compact-creator-card .creator-password-wrap button{
  height:22px !important;
  font-size:8.5px !important;
}

.compact-creator-card .creator-continue-btn{
  height:24px !important;
  min-height:24px !important;
  font-size:9.5px !important;
  display:block !important;
}

.creator-card-text{
  padding:0 !important;
  margin:0 0 2px 0 !important;
  min-height:auto !important;
}

#creatorCardTitle{
  display:block !important;
  font-size:11px !important;
  line-height:1 !important;
  margin:0 !important;
  padding:0 !important;
}

#creatorCardDesc{
  display:block !important;
  font-size:7px !important;
  line-height:1 !important;
  margin:0 !important;
  padding:0 !important;
}

/* CREATOR CONTINUE FORCE FIX */

.creator-card,
.creator-panel,
.creator-auth-card,
.compact-creator-card{
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  overflow:visible !important;
  padding:5px !important;
}

.creator-continue-btn{
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  height:24px !important;
  min-height:24px !important;
  margin-top:3px !important;
  position:relative !important;
  z-index:20 !important;
}

.creator-card input{
  height:21px !important;
  margin-bottom:2px !important;
}

.creator-password-wrap button{
  height:21px !important;
}

.creator-tabs{
  height:22px !important;
  margin-bottom:2px !important;
}

/* ARABIC RTL - KEEP HERO LAYOUT SAME */

html[dir="rtl"] .hero,
html[dir="rtl"] .hero-bg,
html[dir="rtl"] .hero-main-card,
html[dir="rtl"] .hero-side-images{
  direction:ltr !important;
}

html[dir="rtl"] .hero-content{
  direction:rtl !important;
  text-align:right !important;
}
.loading-recipes-box{
  width:100%;
  padding:28px;
  border-radius:22px;
  background:#fff;
  text-align:center;
  font-weight:900;
  box-shadow:0 14px 34px rgba(24,34,52,.08);
}

.loading-recipes-box span{
  display:block;
  margin-top:8px;
  font-size:13px;
  color:#6b7280;
}

 /* PREMIUM SINGLE RECIPE MODAL - FINAL */

.modal,
.ingredient-modal{
  background:rgba(15,23,42,.62) !important;
  backdrop-filter:blur(8px) !important;
}

.modal-content{
  width:min(500px, 92vw) !important;
  max-height:88vh !important;
  padding:10px !important;
  border-radius:28px !important;
  background:#fffaf3 !important;
  overflow-y:auto !important;
  box-shadow:0 40px 120px rgba(0,0,0,.38) !important;
}

.modal-content img{
  width:100% !important;
  height:250px !important;
  max-height:250px !important;
  object-fit:cover !important;
  border-radius:22px !important;
  margin:0 0 14px 0 !important;
}

.modal-content h1{
  font-size:24px !important;
  line-height:1.12 !important;
  margin:0 14px 8px !important;
  color:#07172d !important;
}

.modal-content .time{
  display:inline-flex !important;
  margin:0 14px 16px !important;
  padding:5px 10px !important;
  border-radius:999px !important;
  background:#eef6ec !important;
  color:#315c45 !important;
  font-size:12px !important;
  font-weight:900 !important;
}

.modal-content h2{
  font-size:18px !important;
  line-height:1.15 !important;
  margin:16px 14px 10px !important;
  color:#07172d !important;
}

.modal-content .ingredients{
  margin:0 14px 20px !important;
  gap:7px !important;
}

.modal-content .ingredients span{
  padding:5px 9px !important;
  font-size:10.5px !important;
  border-radius:999px !important;
  background:#eef6ec !important;
  color:#315c45 !important;
  font-weight:850 !important;
}

.modal-content p{
  font-size:14px !important;
  line-height:1.65 !important;
  margin:0 14px 18px !important;
  color:#243044 !important;
}

.close{
  top:18px !important;
  right:18px !important;
  width:36px !important;
  height:36px !important;
  background:#07172d !important;
  color:#fff !important;
  box-shadow:0 10px 24px rgba(0,0,0,.25) !important;
}
.modal-content{
  max-height:88vh !important;
  overflow-y:auto !important;
}
.modal-content img{
  position:sticky !important;
  top:0 !important;
  z-index:2 !important;
}

@media (max-width: 768px){

  .hero-content{
    left:18px !important;
    right:auto !important;
    text-align:left !important;
    align-items:flex-start !important;
  }

  .hero-badge-text,
  .hero-title-text,
  .hero-desc-text{
    text-align:left !important;
  }

}
@media (max-width:768px){
  .mobile-hero-text .hero-badge-text{
    display:block !important;
    text-align:left !important;
    margin-left:0 !important;
    margin-right:auto !important;
    align-self:flex-start !important;
  }
}

@media (max-width:768px){
  .mobile-hero-text{
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
  }

  .mobile-hero-text .hero-badge-text{
    display:inline-flex !important;
    width:auto !important;
    max-width:fit-content !important;
    align-self:flex-start !important;
    padding:6px 10px !important;
  }
}

.favorite-btn{
  border:none;
  background:white;
  border-radius:50%;
  width:38px;
  height:38px;
  font-size:20px;
  cursor:pointer;
  box-shadow:0 6px 16px rgba(0,0,0,.14);
}

.favorite-btn.active{
  transform:scale(1.08);
}

 

.continue-selecting-btn{
  border:none;
  background:linear-gradient(135deg,#f97316,#ea580c);
  color:white;
  padding:10px 12px;
  border-radius:999px;
  font-size:10px;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(249,115,22,.28);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  white-space:nowrap;
}

.continue-selecting-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(249,115,22,.34);
}



.continue-selecting-btn:active{
  transform:scale(.98);
}

.continue-selecting-btn{
  border:none;
  background:#f97316;
  color:white;
  padding:8px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  max-width:100%;
  white-space:normal;
  line-height:1.2;
}

.tray-cancel-btn{
  border:1px solid #e5e7eb;
  background:white;
  color:#374151;
  padding:8px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}

.selected-tray-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.selected-tray-header-actions{
  display:flex;
  align-items:flex-start;
  justify-content:flex-end;
  flex-shrink:0;
}

.tray-cancel-btn{
  border:none;
  background:white;
  color:#182234;
  padding:9px 14px;
  border-radius:999px;
  font-size:13px;
  font-weight:900;
  cursor:pointer;
}

.continue-selecting-btn{
  width:calc(100% - 28px);
  margin:0 14px 10px;
  border:none;
  background:linear-gradient(135deg,#ff7a1a,#ef4f05);
  color:white;
  padding:10px 12px;
  border-radius:999px;
  font-size:13px;
  font-weight:950;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(239,79,5,.22);
}

@media(max-width:480px){
  .selected-tray-header h2{
    font-size:26px;
    line-height:1;
  }

  .selected-tray-header p{
    font-size:13px;
    line-height:1.25;
  }

  .tray-cancel-btn{
    padding:8px 12px;
    font-size:12px;
  }

  .continue-selecting-btn{
    font-size:12px;
    padding:9px 10px;
  }
}

.clear-selected-btn{
  margin-top:8px;
}

.selected-tray-box{
  overflow:hidden;
}

 

.selected-chip{
  background:#fff7ed !important;
  border:1px solid #fed7aa !important;
  border-radius:999px !important;
  padding:9px 12px !important;
  font-size:13px !important;
  font-weight:900 !important;
}

.continue-selecting-btn{
  width:auto !important;
  margin:0 !important;
  padding:9px 14px !important;
  font-size:12px !important;
  border-radius:999px !important;
  box-shadow:none !important;
}

.selected-tray-actions{
  display:flex;
  justify-content:center;
  gap:10px;
  padding:12px 16px;
  background:#fffaf3;
  border-top:1px solid #eadfce;
}

.clear-selected-btn{
  margin:0 !important;
  padding:9px 14px !important;
}

.selected-tray-confirm{
  padding:14px 18px 18px;
  background:white;
}
 

.selected-tray-actions{
  display:flex !important;
  justify-content:center !important;
  align-items:center !important;
  gap:10px !important;
  padding:14px 18px !important;
  background:#fffaf3 !important;
}

.continue-selecting-btn,
.clear-selected-btn{
  border:1px solid #e5e7eb !important;
  background:white !important;
  color:#374151 !important;
  padding:10px 14px !important;
  border-radius:999px !important;
  font-size:13px !important;
  font-weight:900 !important;
  cursor:pointer !important;
  min-width:145px !important;
  box-shadow:none !important;
}

.continue-selecting-btn:hover,
.clear-selected-btn:hover{
  background:#f3f4f6 !important;
}

 

.selected-tray-actions{
  display:flex !important;
  justify-content:center !important;
  align-items:center !important;
  gap:10px !important;
  padding:12px 18px !important;
  background:#fffaf3 !important;
  margin-top:auto !important;
}

.continue-selecting-btn,
.clear-selected-btn{
  border:1px solid #e5e7eb !important;
  background:white !important;
  color:#374151 !important;
  padding:9px 12px !important;
  border-radius:999px !important;
  font-size:12px !important;
  font-weight:900 !important;
  cursor:pointer !important;
  width:145px !important;
  min-height:40px !important;
  white-space:normal !important;
  line-height:1.15 !important;
  text-align:center !important;
  box-shadow:none !important;
}

.selected-tray-confirm{
  margin-top:auto !important;
}

.selected-tray-box{
  display:flex !important;
  flex-direction:column !important;
  min-height:680px !important;
}

 

.selected-tray-actions{
  margin-top:auto !important;
}

.selected-tray-confirm{
  margin-top:0 !important;
  padding:16px 18px 20px !important;
  background:white !important;
  border-top:1px solid #eadfce !important;
}

.selected-tray-box{
  display:flex !important;
  flex-direction:column !important;
  height:82vh !important;
  max-height:760px !important;
  overflow:hidden !important;
}

.selected-tray-header{
  flex-shrink:0 !important;
}

 

.selected-clear-bottom{
  flex-shrink:0 !important;
  margin:0 auto 10px !important;
}

.selected-tray-bottom{
  margin-top:auto !important;
  flex-shrink:0 !important;
  padding:16px 18px 20px !important;
  background:white !important;
  border-top:1px solid #eadfce !important;
}

.tray-bottom-row{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:10px !important;
  margin-bottom:12px !important;
}

.selected-clear-bottom{
  margin:0 !important;
  border:1px solid #e5e7eb !important;
  background:#f9fafb !important;
  color:#374151 !important;
  padding:8px 12px !important;
  border-radius:999px !important;
  font-size:12px !important;
  font-weight:900 !important;
  cursor:pointer !important;
  white-space:nowrap !important;
}

.tray-confirm{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  margin:0 !important;
}

.signup-invite-modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:99999;
  padding:18px;
}

.signup-invite-box{
  width:100%;
  max-width:420px;
  background:white;
  border-radius:28px;
  padding:28px;
  text-align:center;
  position:relative;
  box-shadow:0 25px 80px rgba(0,0,0,.25);
}

.signup-invite-close{
  position:absolute;
  top:14px;
  right:14px;
  border:none;
  background:#f3f4f6;
  width:34px;
  height:34px;
  border-radius:50%;
  font-size:20px;
  cursor:pointer;
}

.signup-invite-box h2{
  font-size:28px;
  margin:10px 0 12px;
}

.signup-invite-box p{
  color:#667085;
  font-weight:700;
  line-height:1.5;
  margin-bottom:22px;
}

.signup-main-btn,
.signup-guest-btn{
  width:100%;
  height:48px;
  border:none;
  border-radius:999px;
  font-weight:900;
  cursor:pointer;
  margin-top:10px;
}

.signup-main-btn{
  background:#f97316;
  color:white;
}

.signup-guest-btn{
  background:#f3f4f6;
  color:#374151;
}

.user-menu{
  position:relative;
}

.user-menu-btn{
  border:none;
  background:#fff3e8;
  color:#9a3412;
  padding:9px 14px;
  border-radius:999px;
  font-weight:900;
  cursor:pointer;
}

.user-menu-dropdown{
  display:none;
  position:absolute;
  right:0;
  top:44px;
  background:white;
  border:1px solid #eadfce;
  border-radius:16px;
  box-shadow:0 14px 35px rgba(0,0,0,.14);
  min-width:170px;
  overflow:hidden;
  z-index:9999;
}

.user-menu-dropdown a,
.user-menu-dropdown button{
  display:block;
  width:100%;
  padding:12px 14px;
  background:white;
  border:none;
  text-align:left;
  font-weight:800;
  color:#182234;
  text-decoration:none;
  cursor:pointer;
}

.user-menu-dropdown a:hover,
.user-menu-dropdown button:hover{
  background:#fff7ed;
}

.user-menu.open .user-menu-dropdown{
  display:block;
}

.floating-lang{
  position:fixed !important;
  top:18px !important;
  right:18px !important;
  z-index:9999 !important;
  display:flex !important;
  flex-direction:column-reverse !important;
  align-items:flex-end !important;
  gap:8px !important;
}

 .floating-lang{
  position:fixed !important;
  top:18px !important;
  right:18px !important;
  z-index:9999 !important;
  display:flex !important;
  flex-direction:row !important;
  align-items:flex-start !important;
  justify-content:flex-end !important;
  gap:10px !important;
}

.lang-wrapper,
.user-menu{
  position:relative !important;
}

.lang-btn,
.user-menu-btn{
  border:none !important;
  background:#fff3e8 !important;
  color:#9a3412 !important;
  padding:9px 14px !important;
  border-radius:999px !important;
  font-weight:900 !important;
  cursor:pointer !important;
  box-shadow:0 8px 20px rgba(0,0,0,.12) !important;
  height:40px !important;
  display:flex !important;
  align-items:center !important;
  gap:6px !important;
}

.lang-options,
.user-menu-dropdown{
  position:absolute !important;
  top:48px !important;
  right:0 !important;
  background:white !important;
  border:1px solid #eadfce !important;
  border-radius:16px !important;
  box-shadow:0 14px 35px rgba(0,0,0,.14) !important;
  min-width:160px !important;
  overflow:hidden !important;
  z-index:99999 !important;
}

.lang-options button,
.user-menu-dropdown a,
.user-menu-dropdown button{
  display:block !important;
  width:100% !important;
  padding:12px 14px !important;
  background:white !important;
  border:none !important;
  text-align:left !important;
  font-weight:800 !important;
  color:#182234 !important;
  text-decoration:none !important;
  cursor:pointer !important;
}

.lang-options button:hover,
.user-menu-dropdown a:hover,
.user-menu-dropdown button:hover{
  background:#fff7ed !important;
}

@media (min-width:981px){

  body.show-recipes-page #content{
    height:100vh !important;
    overflow:hidden !important;
  }

  body.show-recipes-page #result{
    max-height:calc(100vh - 40px) !important;
    padding-bottom:90px !important;
  }

  .show-more-recipes-btn{
    grid-column:1 / -1 !important;
    justify-self:center !important;
    margin:20px auto 40px !important;
  }

}

@media (min-width:981px){

  body.show-recipes-page .hero,
  body.show-recipes-page .hero-bg,
  body.show-recipes-page .mobile-only,
  body.show-recipes-page .mobile-hero-big,
  body.show-recipes-page .mobile-hero-small{
    display:none !important;
    height:0 !important;
    min-height:0 !important;
    margin:0 !important;
    padding:0 !important;
    overflow:hidden !important;
  }

  body.show-recipes-page #content{
    padding-top:0 !important;
    margin-top:0 !important;
  }

  body.show-recipes-page #result{
    margin-top:0 !important;
    padding-top:20px !important;
  }

}

.show-more-recipes-btn{
  display:block !important;
  margin:18px auto 40px !important;
  border:none !important;
  background:#f97316 !important;
  color:white !important;
  padding:13px 24px !important;
  border-radius:999px !important;
  font-weight:900 !important;
  cursor:pointer !important;
  position:relative !important;
  z-index:50 !important;
}

@media (min-width:981px){

  body.show-recipes-page #result{
    display:grid !important;
    grid-template-columns:repeat(3,1fr) !important;
    gap:12px !important;
    padding:10px 18px !important;
  }

  body.show-recipes-page .recipe-card{
    min-height:0 !important;
  }

  body.show-recipes-page .recipe-card-image-wrap img{
    height:115px !important;
    object-fit:cover !important;
  }

  body.show-recipes-page .recipe-card-body{
    padding:10px !important;
  }

  body.show-recipes-page .recipe-card-body h3{
    font-size:14px !important;
    line-height:1.15 !important;
    margin:0 0 5px !important;
  }

  body.show-recipes-page .recipe-time,
  body.show-recipes-page .ingredients-count{
    font-size:12px !important;
    margin:4px 0 !important;
  }

  body.show-recipes-page .recipe-ingredients{
    max-height:28px !important;
    overflow:hidden !important;
  }

  .show-more-recipes-btn{
  display:block !important;
  margin:18px auto 32px !important;
  border:none !important;
  background:#f97316 !important;
  color:white !important;
  padding:13px 24px !important;
  border-radius:999px !important;
  font-weight:900 !important;
  cursor:pointer !important;
}
}

.recipe-result-actions{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:12px;
  margin:18px auto 34px;
}

.recipe-back-btn,
.show-more-recipes-btn{
  border:none;
  border-radius:999px;
  padding:13px 22px;
  font-weight:900;
  cursor:pointer;
}

.recipe-back-btn{
  background:#f3f4f6;
  color:#374151;
}

.show-more-recipes-btn{
  background:#f97316;
  color:white;
}

@media(max-width:768px){
  .recipe-result-actions{
    flex-direction:column;
  }

  .recipe-back-btn,
  .show-more-recipes-btn{
    width:100%;
    max-width:280px;
  }
}

@media (min-width:981px){

  body.show-recipes-page #content{
    min-height:100vh !important;
    height:auto !important;
    overflow:visible !important;
    padding:18px !important;
  }

  body.show-recipes-page #result{
    display:grid !important;
    grid-template-columns:repeat(3,1fr) !important;
    gap:14px !important;
    padding:0 !important;
    margin:0 !important;
  }

  body.show-recipes-page .recipe-card{
    height:265px !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-card-image-wrap img{
    height:120px !important;
    object-fit:cover !important;
  }

  body.show-recipes-page .recipe-card-body{
    padding:10px 12px !important;
  }

  body.show-recipes-page .recipe-card-body h3{
    font-size:15px !important;
    line-height:1.15 !important;
    margin:0 0 6px !important;
  }

  body.show-recipes-page .recipe-time,
  body.show-recipes-page .ingredients-count{
    font-size:12px !important;
    margin:4px 0 !important;
  }

  body.show-recipes-page .recipe-ingredients{
    max-height:32px !important;
    overflow:hidden !important;
  }

  .recipe-result-actions{
    display:flex !important;
    justify-content:center !important;
    gap:12px !important;
    margin:16px auto 0 !important;
  }
}

.recipe-result-actions{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:12px;
  margin:18px auto 34px;
}

.recipe-back-btn,
.recipe-next-btn{
  border:none;
  border-radius:999px;
  padding:13px 22px;
  font-weight:900;
  cursor:pointer;
}

.recipe-back-btn{
  background:#f3f4f6;
  color:#374151;
}

.recipe-next-btn{
  background:#f97316;
  color:white;
}

.recipe-page-info{
  font-weight:900;
  color:#374151;
}

@media (min-width:981px){

  body.show-recipes-page #result{
    grid-template-columns:repeat(3, 1fr) !important;
    gap:22px !important;
    padding:24px 34px 10px !important;
  }

  body.show-recipes-page .recipe-card{
    min-height:310px !important;
  }

  body.show-recipes-page .recipe-card-image-wrap img{
    height:175px !important;
    object-fit:cover !important;
  }

  body.show-recipes-page .recipe-card-body{
    padding:16px !important;
  }

  body.show-recipes-page .recipe-card-body h3{
    font-size:18px !important;
    line-height:1.25 !important;
  }

  .recipe-result-actions{
    margin-top:18px !important;
  }
}

@media (min-width:981px){

  body.show-recipes-page #result{
    grid-template-columns:repeat(3, 1fr) !important;
    gap:22px !important;
    padding:24px 34px 0 !important;
  }

  body.show-recipes-page .recipe-card{
    height:380px !important;
  }

  body.show-recipes-page .recipe-card-image-wrap img{
    height:225px !important;
    object-fit:cover !important;
  }

  body.show-recipes-page .recipe-card-body{
    padding:18px !important;
  }

  body.show-recipes-page .recipe-card-body h3{
    font-size:19px !important;
    line-height:1.25 !important;
  }

  .recipe-result-actions{
    margin:22px auto 0 !important;
  }
}

.user-menu-dropdown a,
.user-menu-dropdown button{
  height:44px !important;
  min-height:44px !important;
  padding:0 16px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  font-size:14px !important;
  line-height:1 !important;
  font-weight:800 !important;
  font-family:Arial, sans-serif !important;
  box-sizing:border-box !important;
}

.user-menu-dropdown{
  min-width:190px !important;
}
 
.custom-upload-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 16px;
  border-radius:10px;
  background:#f3f4f6;
  border:1px solid #d1d5db;
  cursor:pointer;
  font-weight:700;
  color:#374151;
}

.custom-upload-btn:hover{
  background:#e5e7eb;
}

.selected-file-name{
  margin-left:10px;
  font-size:14px;
  color:#6b7280;
}


@media(max-width:768px){

  .floating-lang{
    position:fixed !important;
    top:78px !important;
    left:18px !important;
    right:18px !important;
    display:flex !important;
    justify-content:space-between !important;
    align-items:center !important;
    z-index:99999 !important;
  }

  .lang-wrapper{
  order:1 !important;
}

.user-menu{
  order:2 !important;
}
  .user-menu-btn,
  .lang-btn{
    height:32px !important;
    padding:6px 10px !important;
    font-size:12px !important;
    border-radius:999px !important;
    box-shadow:0 6px 16px rgba(0,0,0,.12) !important;
  }

  .lang-options{
    top:38px !important;
    right:0 !important;
  }

  .user-menu-dropdown{
    top:38px !important;
    left:0 !important;
    right:auto !important;
  }
}

@media(max-width:768px){

  .floating-lang{
    position:fixed !important;
    top:92px !important;
    left:34px !important;
    right:34px !important;
    display:flex !important;
    justify-content:space-between !important;
    align-items:center !important;
    z-index:99999 !important;
  }

  .lang-btn,
  .user-menu-btn{
    background:transparent !important;
    box-shadow:none !important;
    border:none !important;
    padding:0 !important;
    height:auto !important;
    font-size:12px !important;
    color:#6b7280 !important;
    font-weight:800 !important;
  }

  .lang-wrapper{
    order:1 !important;
  }

  .user-menu{
    order:2 !important;
  }

}

@media(max-width:768px){

  .lang-options{
    background:white !important;
    border:1px solid #eadfce !important;
    border-radius:14px !important;
    box-shadow:0 14px 35px rgba(0,0,0,.16) !important;
    overflow:hidden !important;
  }

  .lang-options button{
    display:block !important;
    width:100% !important;
    background:white !important;
    color:#182234 !important;
    padding:10px 14px !important;
    font-size:13px !important;
    font-weight:900 !important;
    text-align:left !important;
  }
}

@media(max-width:768px){

  .floating-lang{
    left:22px !important;
    right:22px !important;
  }

  .lang-options{
    left:0 !important;
    right:auto !important;
    width:72px !important;
    min-width:72px !important;
    max-width:72px !important;
  }

  .lang-options button{
    width:72px !important;
    min-width:72px !important;
    padding:8px 0 !important;
    text-align:center !important;
    font-size:12px !important;
  }

  .user-menu-dropdown{
    right:0 !important;
    left:auto !important;
    width:150px !important;
    min-width:150px !important;
    max-width:150px !important;
  }

  .user-menu-dropdown a,
  .user-menu-dropdown button{
    width:100% !important;
    padding:10px 12px !important;
    font-size:12px !important;
    white-space:normal !important;
    line-height:1.2 !important;
  }
}

@media(max-width:768px){
  .mobile-hero-text .hero-title-text,
  .hero-content .hero-title-text{
    max-width:220px !important;
    white-space:normal !important;
    line-height:1.08 !important;
    font-size:28px !important;
    overflow-wrap:normal !important;
    word-break:normal !important;
  }
}

@media(min-width:981px){

  .hero-main-img{
    filter:none !important;
    opacity:1 !important;
    mix-blend-mode:normal !important;
  }

  .hero-dark{
    background:rgba(0,0,0,.18) !important;
  }

}

.how-modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:999999;
  padding:18px;
}

.how-box{
  width:100%;
  max-width:440px;
  background:white;
  border-radius:28px;
  padding:28px;
  position:relative;
  box-shadow:0 25px 80px rgba(0,0,0,.25);
}

.how-close{
  position:absolute;
  top:14px;
  right:14px;
  border:none;
  background:#f3f4f6;
  width:34px;
  height:34px;
  border-radius:50%;
  font-size:20px;
  cursor:pointer;
}

.how-box h2{
  margin:10px 0 18px;
  font-size:26px;
}

.how-steps p{
  margin:10px 0;
  font-weight:800;
  color:#374151;
  line-height:1.45;
}

.how-start-btn{
  width:100%;
  margin-top:18px;
  height:48px;
  border:none;
  border-radius:999px;
  background:#f97316;
  color:white;
  font-weight:900;
  cursor:pointer;
}

.lang-options{
  width:92px !important;
  min-width:92px !important;
  max-width:92px !important;
}

.lang-options button{
  width:100% !important;
  padding:9px 10px !important;
  font-size:13px !important;
  text-align:left !important;
  white-space:nowrap !important;
}

.lang-options{
  width:94px !important;
  min-width:94px !important;
  max-width:94px !important;
}

.lang-options button{
  display:flex !important;
  align-items:center !important;
  gap:7px !important;
  width:100% !important;
  padding:9px 10px !important;
  font-size:13px !important;
  font-weight:900 !important;
  text-align:left !important;
  white-space:nowrap !important;
}
.lang-options button img{
  width:18px;
  height:18px;
  border-radius:50%;
  object-fit:cover;
  margin-right:7px;
}

.lang-options button{
  display:flex !important;
  align-items:center !important;
  gap:6px !important;
}

.lang-btn{
  display:flex;
  align-items:center;
  gap:8px;
}

.lang-btn img{
  width:18px;
  height:18px;
  border-radius:50%;
  object-fit:cover;
}


.lang-options button{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
}

.lang-options button img{
  width:18px;
  height:18px;
  border-radius:50%;
  object-fit:cover;
}

.how-more-info-link{
  display:block;
  text-align:center;
  margin-top:14px;
  color:#9a3412;
  font-weight:900;
  text-decoration:none;
}

.how-more-info-link:hover{
  text-decoration:underline;
}

@media(max-width:980px){
  body.hide-mobile-top-menu .floating-lang{
    display:none !important;
  }
}

.signup-invite-modal{
  z-index:9999999 !important;
}

.signup-invite-box{
  z-index:10000000 !important;
  position:relative !important;
}

.signup-input{
  width:100%;
  height:46px;
  border:1px solid #eadfce;
  border-radius:14px;
  padding:0 14px;
  margin-top:10px;
  font-size:14px;
  font-weight:800;
  outline:none;
  background:#fffaf3;
  color:#182234;
}

.creator-auth-tabs{
  display:flex;
  gap:8px;
  margin:16px 0 8px;
  background:#f3f4f6;
  padding:5px;
  border-radius:999px;
}

.creator-auth-tabs button{
  flex:1;
  border:none;
  border-radius:999px;
  padding:9px 10px;
  font-weight:900;
  cursor:pointer;
  background:transparent;
  color:#6b7280;
}

.creator-auth-tabs button.active{
  background:white;
  color:#f97316;
  box-shadow:0 4px 12px rgba(0,0,0,.08);
}

.creator-password-wrap{
  display:flex;
  align-items:center;
  gap:8px;
}

.creator-password-wrap .signup-input{
  flex:1;
}

.creator-password-wrap button{
  margin-top:10px;
  height:46px;
  border:none;
  border-radius:14px;
  padding:0 12px;
  background:#f3f4f6;
  color:#374151;
  font-weight:900;
  cursor:pointer;
}

.signup-invite-box{
  max-width:430px;
}

 .signup-invite-box{
  width:min(92vw,430px);
  border-radius:24px;
  padding:24px;
  background:#fff;
  box-shadow:0 25px 60px rgba(0,0,0,.18);
}

.signup-main-btn{
  width:100%;
  height:48px;
  border:none;
  border-radius:14px;
  background:#f97316;
  color:#fff;
  font-weight:900;
  font-size:15px;
  cursor:pointer;
  margin-top:14px;
}

.signup-main-btn:hover{
  transform:translateY(-1px);
}

.signup-guest-btn{
  width:100%;
  height:44px;
  border:none;
  border-radius:14px;
  background:#f3f4f6;
  color:#374151;
  font-weight:800;
  cursor:pointer;
  margin-top:10px;
}

#signupInviteTitle{
  margin-bottom:8px;
  text-align:center;
}

#signupInviteDesc{
  text-align:center;
  color:#6b7280;
  line-height:1.5;
  margin-bottom:14px;
}

.nk-mini-card{
  display:grid;
  grid-template-columns:34px 1fr auto;
  align-items:center;
  gap:8px;
  margin:8px 0 10px;
  padding:10px;
  border-radius:16px;
  background:#fff;
  border:1px solid #f0e4d5;
  box-shadow:0 6px 18px rgba(0,0,0,.04);
}

.nk-mini-icon{
  width:34px;
  height:34px;
  border-radius:10px;
  font-size:17px;
}

.nk-mini-content h4{
  font-size:12px;
  line-height:1.15;
}

.nk-mini-content p{
  font-size:10px;
  line-height:1.25;
}

.nk-mini-card button{
  padding:7px 10px;
  font-size:10px;
  white-space:nowrap;
}

#categoryGrid .category-btn{
  min-height:28px !important;
  font-size:12px !important;
  font-weight:900 !important;
  padding:8px 6px !important;
  border-radius:15px !important;
}

#categoryGrid{
  gap:8px !important;
}

@media(max-width:768px){
  .mobile-hero-small img{
    width:100% !important;
    height:auto !important;
    object-fit:contain !important;
  }

  .mobile-hero-small{
    height:auto !important;
  }

  @media(max-width:768px){
  .mobile-hero-small img{
    width:100% !important;
    height:100% !important;
    object-fit:cover !important;
  }
}
}

.mobile-tip-card{
  display:none;
}

.mobile-feature-strip{
  display:none;
}

@media(max-width:768px){
  .mobile-feature-strip{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:8px;
    margin:14px 0;
  }

  .mobile-feature-strip div{
    background:linear-gradient(135deg,#fff7ed,#ffffff);
    border:1px solid #eadfce;
    border-radius:16px;
    padding:10px 8px;
    text-align:center;
    box-shadow:0 8px 18px rgba(0,0,0,.05);
  }

  .mobile-feature-strip strong{
    display:block;
    font-size:12px;
    color:#182234;
    margin-bottom:4px;
  }

  .mobile-feature-strip span{
    display:block;
    font-size:10px;
    color:#6b7280;
    font-weight:800;
    line-height:1.25;
  }
}

.mobile-hero-small{
  aspect-ratio:1/1 !important;
}

.mobile-hero-small{
  position:relative;
  overflow:hidden;
}

.mobile-hero-small-text{
  position:absolute;
  left:16px;
  right:16px;
  bottom:16px;
  z-index:2;
  color:white;
}

.mobile-hero-small::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(
    to top,
    rgba(0,0,0,.65),
    rgba(0,0,0,.15),
    transparent
  );
}

.mobile-hero-small-text strong{
  display:block;
  font-size:20px;
  font-weight:900;
  margin-bottom:4px;
}

.mobile-hero-small-text span{
  display:block;
  font-size:13px;
  line-height:1.4;
  font-weight:600;
}

@media(min-width:981px){

  .nk-mini-card{
  margin:6px 0 8px;
}

.site-footer-note{
  margin-top:6px;
  padding-top:0;
}
}

@media(min-width:981px){

  #sidebar,
  .sidebar-shell{
    min-height:auto !important;
    height:auto !important;
  }

  .sidebar-main{
    flex:unset !important;
  }

  .site-footer-note{
    margin-top:6px !important;
    margin-bottom:0 !important;
    padding-bottom:0 !important;
  }
}


.join-area{
  margin-top:5px;
  padding:0;
  box-sizing:border-box;
}

.nk-mini-card{
  width:100%;
  max-width:520px;
  margin:0 auto 14px auto;
}

.site-footer-note{
  width:100%;
  clear:both;
  display:block;
  padding:10px 12px;
  box-sizing:border-box;
  text-align:center;
  font-size:12px;
  background:#fffaf3;
}

#joinNiliBtn{
  width:120px !important;
  min-width:120px !important;
  max-width:120px !important;

  min-height:48px !important;

  background:#ef6a1a !important;
  color:#fff !important;

  border:none !important;
  border-radius:14px !important;

  font-size:12px !important;
  font-weight:700 !important;
  line-height:1.15 !important;

  white-space:normal !important;
  text-align:center !important;

  display:flex !important;
  align-items:center !important;
  justify-content:center !important;

  padding:6px 8px !important;
  box-sizing:border-box !important;
}

#joinNiliBtn{
  flex:0 0 120px !important;
}

.nk-mini-content{
  min-width:0 !important;
  flex:1 1 auto !important;
}

.nk-mini-card{
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
}

.nk-mini-icon{
  flex:0 0 34px !important;
}

#joinNiliTitle,
#joinNiliDesc{
  margin-right:8px !important;
}

.floating-lang{
  direction:ltr !important;
  flex-direction:row !important;
}

.floating-lang .user-menu{
  order:1 !important;
  direction:ltr !important;
}

.floating-lang .lang-wrapper{
  order:2 !important;
  direction:ltr !important;
}

.floating-lang .user-menu-dropdown,
.floating-lang .lang-options{
  direction:ltr !important;
}

@media(max-width:600px){

  .user-menu-dropdown{
    position:absolute !important;
    right:0 !important;
    left:auto !important;
    top:calc(100% + 8px) !important;
    width:190px !important;
    max-width:calc(100vw - 24px) !important;
    transform:none !important;
  }

  .lang-options{
    position:absolute !important;
    right:0 !important;
    left:auto !important;
    top:calc(100% + 8px) !important;
    width:120px !important;
    max-width:calc(100vw - 24px) !important;
    transform:none !important;
  }

}

@media(max-width:600px){

  #langOptions{
    width:55px !important;
    min-width:55px !important;
    max-width:55px !important;
    padding:5px !important;
    box-sizing:border-box !important;
  }

  #langOptions button{
    font-size:10px !important;
    padding:3px 5px !important;
    gap:4px !important;
  }

  #langOptions img{
    width:10px !important;
    height:10px !important;
  }

  #userMenuDropdown{
    width:85px !important;
    min-width:85px !important;
    max-width:85px !important;
    padding:5px !important;
    box-sizing:border-box !important;
  }

  #userMenuDropdown a,
  #userMenuDropdown button{
    font-size:10px !important;
    padding:5px 8px !important;
    white-space:nowrap !important;
  }
}

  #userMenuDropdown{

  /* SAĞ-SOL */
  right:auto !important;
  left:8 !important;

  /* YUKARI-AŞAĞI */
  top:100% !important;
  margin-top:6px !important;

  /* BOYUT */
  width:130px !important;
  min-width:130px !important;
  max-width:130px !important;

  /* İÇ BOŞLUK */
  padding:5px !important;

  /* KÖŞE */
  border-radius:14px !important;

  /* GÖLGE */
  box-shadow:0 10px 25px rgba(0,0,0,.15) !important;
}

#userMenuDropdown a,
#userMenuDropdown button{

  font-size:12px !important;
  padding:8px 12px !important;

}

#langOptions{

  /* SAĞ-SOL */
  right:0 !important;
  left:auto !important;

  /* YUKARI-AŞAĞI */
  top:100% !important;
  margin-top:6px !important;

  /* BOYUT */
  width:64px !important;
  min-width:64px !important;
  max-width:64px !important;

  /* İÇ BOŞLUK */
  padding:3px !important;

  /* KÖŞE */
  border-radius:14px !important;

  /* GÖLGE */
  box-shadow:0 10px 25px rgba(0,0,0,.15) !important;
}

#langOptions button{

  font-size:10px !important;
  padding:5px 6px !important;
  gap:4px !important;

}

#langOptions img{

  width:14px !important;
  height:14px !important;

}

.ingredient-modal-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 12px;
}

#ingredientModalTitle{
  font-size:22px;
  font-weight:900;
  color:#e67e22;
  display:flex;
  align-items:center;
  gap:8px;
}

@media (max-width:768px){

  #selectedTrayItems{
    display:block !important;
    height:130px !important;
    min-height:130px !important;
    max-height:130px !important;
    overflow-y:auto !important;
    flex:none !important;
  }

}

/* FINAL desktop recipe studio overrides */
@media(min-width:981px){
  html:has(body.show-recipes-page),body.show-recipes-page{height:100vh!important;min-height:100vh!important;overflow:hidden!important}
  body.show-recipes-page #sidebar,body.show-recipes-page .sidebar{display:block!important;visibility:visible!important;opacity:1!important;position:fixed!important;inset:0 auto 0 0!important;width:300px!important;height:100vh!important;padding:20px!important;overflow:hidden!important;background:linear-gradient(180deg,#172019,#273225)!important}
  body.show-recipes-page #sidebar .sidebar-shell{display:flex!important;visibility:visible!important;opacity:1!important;height:100%!important;min-height:0!important;gap:18px!important}
  body.show-recipes-page #sidebar .sidebar-main,body.show-recipes-page #sidebar .mobile-only,body.show-recipes-page #sidebar .join-area,body.show-recipes-page #sidebar .site-footer-note{display:none!important}
  body.show-recipes-page #sidebar .nk-brand-card{display:flex!important;visibility:visible!important;opacity:1!important;min-height:104px!important;padding:12px!important;border-radius:24px!important;background:rgba(255,250,241,.96)!important}
  body.show-recipes-page .recipe-sidebar-menu{display:flex!important;flex:1!important;min-height:0!important;flex-direction:column!important}
  body.show-recipes-page #content,body.show-recipes-page .content{display:flex!important;flex-direction:column!important;width:calc(100% - 300px)!important;height:100vh!important;min-height:0!important;max-height:100vh!important;margin:0 0 0 300px!important;padding:18px 22px 14px!important;overflow:hidden!important}
  body.show-recipes-page #result,body.show-recipes-page #result.grid{display:grid!important;flex:1 1 auto!important;min-height:0!important;height:auto!important;max-height:none!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;gap:12px!important;padding:0!important;overflow:hidden!important}
  body.show-recipes-page .recipe-card{height:100%!important;min-height:0!important;border-radius:24px!important;overflow:hidden!important}
  body.show-recipes-page .recipe-card-image-wrap{flex:0 0 clamp(145px,19vh,190px)!important;min-height:0!important;overflow:hidden!important}
  body.show-recipes-page .recipe-card-image-wrap img{height:100%!important}
  body.show-recipes-page .recipe-card-body{min-height:0!important;padding:14px 16px 15px!important;gap:9px!important;overflow:hidden!important}
  body.show-recipes-page .recipe-card-body h3{display:-webkit-box!important;margin:0!important;font-size:17px!important;line-height:1.22!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important}
  body.show-recipes-page .recipe-meta-pill{min-height:28px!important;padding:6px 9px!important;font-size:11px!important}
  body.show-recipes-page .recipe-ingredients{gap:5px!important;max-height:30px!important;overflow:hidden!important}
  body.show-recipes-page .recipe-ingredients span{min-height:26px!important;padding:6px 9px!important;font-size:10px!important}
  body.show-recipes-page .recipe-preview{display:-webkit-box!important;margin:0!important;font-size:11px!important;line-height:1.45!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important}
  body.show-recipes-page .recipe-result-actions{display:flex!important;flex:0 0 50px!important;min-height:50px!important;margin:4px 0 0!important;padding:0!important;overflow:visible!important}
  body.show-recipes-page .recipe-back-btn,body.show-recipes-page .recipe-next-btn{display:inline-flex!important;min-width:132px!important;min-height:38px!important;padding:9px 18px!important;font-size:11px!important}
}

/* =========================================================
   HOMEPAGE REFRESH - BRIGHT EDITORIAL LUXURY
========================================================= */

:root{
  --page-bg:#f4efe6;
  --brand-bg:#fbf7f0;
  --card-bg:#fffdf9;
  --white:#fff;
  --green:#415748;
  --green-dark:#233229;
  --green-soft:#eef1eb;
  --green-border:#dde6dc;
  --orange:#b56a3c;
  --orange-dark:#95522a;
  --text:#223028;
  --muted:#756d62;
  --border:#e7dccd;
}

html,body{
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.92), transparent 34%),
    linear-gradient(180deg, #faf7f2 0%, #f1eadd 100%);
  color:var(--text);
}

#sidebar,
.sidebar,
.content,
#content{
  background:transparent;
}

.floating-lang{
  top:26px;
  right:28px;
}

.lang-btn,
.user-menu-btn{
  background:rgba(255,252,248,.88) !important;
  backdrop-filter:blur(12px);
  border:1px solid rgba(120,96,71,.12) !important;
  box-shadow:0 14px 30px rgba(68,49,28,.06);
  border-radius:999px !important;
  padding:11px 14px !important;
  color:#66584b !important;
}

.lang-btn img{
  width:18px;
  height:18px;
}

.nk-brand-card,
.category-panel,
.ad-media-box,
.nk-mini-card,
.manual,
.upload-card{
  border:1px solid rgba(126,101,76,.11);
  box-shadow:0 14px 34px rgba(79,57,31,.06);
}

.nk-brand-card{
  background:
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(250,241,227,.96));
  border-radius:32px;
  min-height:152px;
  position:relative;
  overflow:hidden;
}

.nk-brand-card::after{
  content:"";
  position:absolute;
  inset:auto -30px -36px auto;
  width:150px;
  height:150px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(216,120,61,.18), transparent 68%);
  pointer-events:none;
}

.nk-brand-inner{
  width:100%;
  justify-content:flex-start;
  gap:18px;
}

.nk-logo{
  width:88px;
  height:88px;
  min-width:88px;
  min-height:88px;
  padding:10px;
  border-radius:24px;
  background:rgba(255,255,255,.88);
  box-shadow:0 14px 30px rgba(96,73,48,.08);
}

.nk-brand-text{
  max-width:none;
}

.nk-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-bottom:10px;
  padding:7px 12px;
  border-radius:999px;
  background:rgba(216,120,61,.12);
  color:#a75a2d;
  font-size:11px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.nk-title{
  font-family:Georgia, "Times New Roman", serif;
  font-size:34px;
  font-weight:700;
  letter-spacing:-.04em;
  color:#223328;
}

.nk-subtitle{
  font-size:13px;
  color:#7d7469;
  font-weight:700;
}

.upload-card{
  min-height:112px;
  padding:18px 18px 16px;
  border-radius:24px;
  background:
    linear-gradient(145deg, rgba(255,250,244,.97), rgba(248,240,230,.98));
  color:var(--text);
  box-shadow:0 18px 40px rgba(82,56,30,.08);
}

.upload-card-text strong,
#scanTitle{
  color:#223328;
  font-size:22px;
  font-weight:900;
}

.upload-card-text span,
#statusText{
  color:#7d7469;
  font-size:13px;
}

.gallery-mini-btn{
  display:inline-flex;
  background:#fff;
  color:#8c5833;
  border:1px solid rgba(216,120,61,.18);
  box-shadow:0 10px 24px rgba(101,71,42,.08);
}

.analyze-progress{
  background:rgba(79,107,87,.12);
  height:8px;
}

#bar{
  background:linear-gradient(90deg, #e4a66f, #d8783d);
}

.manual{
  background:rgba(255,253,249,.8);
  border-radius:20px;
  padding:12px;
}

#manualInput{
  height:48px;
  border-radius:15px;
  background:#fff;
  border:1px solid rgba(111,122,115,.14);
  font-size:14px;
}

.manual button{
  width:48px;
  height:48px;
  border-radius:15px;
  background:linear-gradient(135deg, #d8783d, #b85f2b);
  box-shadow:0 12px 24px rgba(184,95,43,.18);
}

.category-panel{
  background:rgba(255,252,247,.9);
  border-radius:24px;
  padding:18px;
}

.panel-title{
  font-size:15px;
  color:#2b3a2f;
  margin-bottom:12px;
}

#categoryGrid .category-btn{
  background:#fff;
  color:#556257;
  border:1px solid rgba(111,122,115,.14);
  box-shadow:0 8px 18px rgba(70,56,40,.04);
  padding:9px 12px !important;
  font-size:12px !important;
}

#categoryGrid .category-btn:hover{
  border-color:rgba(216,120,61,.32);
  color:#8f552f;
}

.ad-media-box{
  height:205px;
  border-radius:28px;
}

.nk-mini-card{
  background:linear-gradient(135deg, rgba(255,255,255,.96), rgba(249,241,230,.96));
  border-radius:22px;
  padding:14px 16px;
}

.nk-mini-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(216,120,61,.12);
  color:#b5612d;
}

#joinNiliBtn{
  background:linear-gradient(135deg, #d8783d, #b85f2b) !important;
  box-shadow:0 12px 24px rgba(184,95,43,.2);
}

.site-footer-note{
  background:transparent;
  color:#8e8376;
}

.hero{
  height:calc(100vh - 54px);
}

.hero-bg{
  grid-template-columns:minmax(0,1.72fr) minmax(300px,.72fr);
  gap:22px;
}

.hero-main-card{
  border-radius:38px;
  box-shadow:0 26px 70px rgba(74,54,31,.12);
}

.hero-main-img{
  transform:scale(1.02);
  filter:saturate(1.01) brightness(.98);
}

.hero-dark{
  background:
    linear-gradient(90deg, rgba(26,35,28,.44) 0%, rgba(26,35,28,.22) 22%, rgba(26,35,28,.06) 42%, rgba(26,35,28,0) 60%),
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(0,0,0,.16));
}

.hero-content{
  left:48px;
  top:30%;
  transform:translateY(-50%);
  max-width:360px;
  padding:0;
  border-radius:0;
  background:transparent;
  border:none;
  box-shadow:none;
  backdrop-filter:none;
  color:#233228;
}

.hero-badge-text{
  background:rgba(255,250,244,.88);
  color:#8b5939;
  box-shadow:0 10px 24px rgba(72,52,31,.08);
  backdrop-filter:blur(8px);
}

.hero-kicker{
  margin:0 0 10px;
  max-width:320px;
  color:rgba(255,247,238,.82);
  font-size:12px;
  line-height:1.55;
  font-weight:700;
  text-shadow:0 2px 14px rgba(0,0,0,.22);
}

.hero-title-text{
  color:#fff8f1;
  font-family:Georgia, "Times New Roman", serif;
  font-size:48px;
  line-height:.96;
  font-weight:700;
  letter-spacing:-.055em;
  text-shadow:0 10px 28px rgba(0,0,0,.3);
}

.hero-desc-text{
  margin-top:12px;
  max-width:330px;
  color:rgba(255,247,239,.88);
  font-size:16px;
  font-weight:600;
  line-height:1.5;
  text-shadow:0 4px 16px rgba(0,0,0,.22);
}

.hero-actions{
  display:flex;
  align-items:center;
  gap:14px;
  margin-top:16px;
  position:relative;
  z-index:7;
}

.hero-primary-btn,
.hero-secondary-btn{
  height:54px;
  border:none;
  border-radius:999px;
  padding:0 24px;
  font-size:14px;
  font-weight:900;
  letter-spacing:.01em;
}

.hero-primary-btn{
  background:linear-gradient(135deg, #b56a3c, #95522a);
  color:#fff;
  box-shadow:0 14px 24px rgba(149,82,42,.22);
}

.hero-secondary-btn{
  background:rgba(255,251,247,.88);
  color:#425345;
  border:1px solid rgba(255,255,255,.22);
  box-shadow:0 10px 22px rgba(69,56,40,.12);
}

.hero-floating-strip{
  position:absolute;
  left:34px;
  right:34px;
  bottom:22px;
  z-index:6;
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
}

.hero-strip-item{
  padding:16px 18px;
  border-radius:22px;
  background:rgba(255,251,247,.95);
  border:1px solid rgba(126,101,76,.11);
  box-shadow:0 14px 26px rgba(70,56,40,.06);
  backdrop-filter:blur(12px);
}

.hero-strip-label{
  display:block;
  margin-bottom:6px;
  color:#936040;
  font-size:11px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.hero-strip-item strong{
  display:block;
  color:#243329;
  font-size:15px;
  line-height:1.35;
}

.hero-side-images img{
  border-radius:32px;
  box-shadow:0 20px 54px rgba(75,57,35,.12);
}

.floating-lang{
  gap:10px;
}

.user-menu-btn{
  color:#745a47 !important;
  font-weight:900 !important;
}

.upload-card{
  min-height:100px;
}

.upload-card-text strong,
#scanTitle{
  font-size:20px;
  line-height:1.05;
}

.panel-title{
  font-size:14px;
}

.hero-main-card::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.14), transparent 20%),
    linear-gradient(90deg, rgba(18,28,22,.38) 0%, rgba(18,28,22,.14) 28%, rgba(18,28,22,0) 54%),
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(0,0,0,.1));
}

.hero-badge-text{
  background:rgba(255,250,244,.88);
  color:#8b5939;
}

@media (min-width:981px){
  #sidebar,
  .sidebar{
    height:100vh !important;
    overflow:hidden !important;
    padding:12px 14px 10px !important;
  }

  .sidebar-shell{
    height:100% !important;
    min-height:0 !important;
    gap:8px !important;
    overflow:hidden !important;
  }

  .sidebar-main{
    flex:1 1 auto !important;
    min-height:0 !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    padding-right:4px !important;
    padding-bottom:10px !important;
    scrollbar-width:thin;
  }

  .sidebar-main::-webkit-scrollbar{
    width:6px;
  }

  .sidebar-main::-webkit-scrollbar-thumb{
    background:rgba(111,122,115,.24);
    border-radius:999px;
  }

  .nk-brand-card{
    min-height:110px !important;
    padding:10px 12px !important;
  }

  .nk-logo{
    width:68px !important;
    height:68px !important;
    min-width:68px !important;
    min-height:68px !important;
  }

  .nk-title{
    font-size:21px !important;
  }

  .nk-subtitle{
    font-size:11px !important;
  }

  .nk-eyebrow{
    margin-bottom:6px !important;
    font-size:10px !important;
    padding:6px 10px !important;
  }

  .upload-card{
    min-height:88px !important;
    padding:14px !important;
  }

  .upload-card-text strong,
  #scanTitle{
    font-size:17px !important;
  }

  .upload-card-text span,
  #statusText{
    font-size:12px !important;
  }

  .manual{
    padding:10px !important;
  }

  #manualInput,
  .manual button{
    height:42px !important;
  }

  .category-panel{
    padding:14px !important;
  }

  #categoryGrid{
    gap:6px !important;
  }

  #categoryGrid .category-btn{
    min-height:0 !important;
    padding:7px 9px !important;
    font-size:11px !important;
  }

  .ad-media-box{
    height:132px !important;
    min-height:132px !important;
    border-radius:22px !important;
  }

  .join-area{
    margin-top:auto !important;
    padding-top:8px !important;
    flex:0 0 auto !important;
  }

  .nk-mini-card{
    margin:0 auto 0 auto !important;
    padding:10px 12px !important;
  }

  .site-footer-note{
    margin-top:4px !important;
    padding:4px 8px 10px !important;
    font-size:10px !important;
    flex:0 0 auto !important;
  }

  #categoryGrid .category-btn{
    white-space:normal !important;
    line-height:1.15 !important;
    min-height:34px !important;
    align-items:center !important;
    justify-content:flex-start !important;
  }
}

/* Compact, readable mobile scan and manual ingredient controls. */
@media(max-width:980px){
  html body #sidebar.sidebar-unified .upload-card{
    width:100% !important;
    height:96px !important;
    min-height:96px !important;
    max-height:96px !important;
    padding:9px 14px !important;
    gap:5px !important;
    justify-content:center !important;
    border:1px solid rgba(226,190,127,.5) !important;
    border-radius:18px !important;
    background:linear-gradient(135deg,#263a2c,#3f5942) !important;
    box-shadow:0 10px 24px rgba(25,43,30,.18) !important;
    overflow:hidden !important;
  }

  html body #sidebar.sidebar-unified .upload-card-text{
    width:100% !important;
    gap:2px !important;
    align-items:center !important;
    text-align:center !important;
  }

  html body #sidebar.sidebar-unified #scanTitle{
    color:#fffaf0 !important;
    font-size:14px !important;
    line-height:16px !important;
    text-align:center !important;
  }

  html body #sidebar.sidebar-unified .upload-card-text span,
  html body #sidebar.sidebar-unified #statusText{
    color:rgba(255,250,240,.84) !important;
    font-size:9px !important;
    line-height:12px !important;
    text-align:center !important;
  }

  html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn{
    min-height:26px !important;
    padding:5px 12px !important;
    border-color:rgba(226,190,127,.5) !important;
    background:#fff8ed !important;
    background-image:none !important;
    color:#304234 !important;
    box-shadow:0 5px 12px rgba(11,22,14,.16) !important;
  }

  html body #sidebar.sidebar-unified .upload-card #galleryBtnText{
    color:#304234 !important;
  }

  html body #sidebar.sidebar-unified .upload-card .progress,
  html body #sidebar.sidebar-unified .upload-card .analyze-progress{
    height:3px !important;
    margin-top:1px !important;
  }

  html body #sidebar.sidebar-unified .manual{
    height:50px !important;
    min-height:50px !important;
    max-height:50px !important;
    padding:5px !important;
    grid-template-columns:minmax(0,1fr) 40px !important;
    gap:6px !important;
    border-radius:16px !important;
  }

  html body #sidebar.sidebar-unified #manualInput,
  html body #sidebar.sidebar-unified .manual button{
    height:40px !important;
    min-height:40px !important;
    max-height:40px !important;
  }

  html body #sidebar.sidebar-unified .manual button{
    width:40px !important;
    min-width:40px !important;
    padding:0 !important;
  }
}

/* Final recipe results: natural page scroll and premium cards. */
html body.show-recipes-page{
  height:auto!important;
  min-height:100vh!important;
  max-height:none!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
}

html body.show-recipes-page #content,
html body.show-recipes-page .content{
  height:auto!important;
  min-height:100vh!important;
  max-height:none!important;
  overflow:visible!important;
  padding-bottom:48px!important;
}

html body.show-recipes-page #result,
html body.show-recipes-page #result.grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-auto-rows:auto!important;
  align-items:stretch!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  gap:18px!important;
  overflow:visible!important;
  padding:8px 0 24px!important;
}

html body.show-recipes-page .recipe-card{
  position:relative!important;
  display:flex!important;
  height:auto!important;
  min-height:520px!important;
  flex-direction:column!important;
  gap:0!important;
  padding:10px!important;
  overflow:hidden!important;
  border:1px solid rgba(151,103,57,.18)!important;
  border-radius:28px!important;
  background:linear-gradient(150deg,#fffdf8,#f5eadb)!important;
  box-shadow:0 18px 42px rgba(54,38,23,.12)!important;
  transition:transform .2s ease,box-shadow .2s ease!important;
}

html body.show-recipes-page .recipe-card:hover{
  transform:translateY(-5px)!important;
  box-shadow:0 26px 54px rgba(42,31,20,.18)!important;
}

html body.show-recipes-page .recipe-card-title{
  min-height:52px!important;
  margin:2px 8px 9px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  color:#29362d!important;
  font-family:"Playfair Display",serif!important;
  font-size:21px!important;
  font-weight:700!important;
  line-height:1.12!important;
  text-align:center!important;
}

html body.show-recipes-page .recipe-card-image-wrap{
  flex:0 0 235px!important;
  width:100%!important;
  height:235px!important;
  min-height:235px!important;
  overflow:hidden!important;
  border-radius:20px!important;
  background:#e6d6c2!important;
}

html body.show-recipes-page .recipe-card-image-wrap img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  transition:transform .35s ease!important;
}

html body.show-recipes-page .recipe-card:hover .recipe-card-image-wrap img{transform:scale(1.035)!important}
html body.show-recipes-page .recipe-card-body{display:flex!important;flex:1 1 auto!important;flex-direction:column!important;padding:13px 8px 7px!important}
html body.show-recipes-page .recipe-card-meta{justify-content:center!important;gap:6px!important}
html body.show-recipes-page .recipe-meta-pill{padding:6px 9px!important;border:1px solid rgba(133,92,52,.12)!important;background:#efe1ce!important;color:#54483d!important;font-size:9px!important;font-weight:800!important}
html body.show-recipes-page .recipe-ingredients{display:flex!important;max-height:none!important;margin:11px 0 8px!important;flex-wrap:wrap!important;justify-content:center!important;gap:5px!important;overflow:visible!important}
html body.show-recipes-page .recipe-ingredients span{padding:5px 8px!important;border-radius:999px!important;background:rgba(255,255,255,.8)!important;color:#4d514c!important;font-size:9px!important}
html body.show-recipes-page .recipe-preview{margin-top:auto!important;padding-top:9px!important;border-top:1px solid rgba(125,86,51,.12)!important;color:#665e55!important;font-size:10px!important;line-height:1.5!important}
html body.show-recipes-page #recipeResultActions{position:relative!important;bottom:auto!important;margin:5px auto 0!important}

@media(max-width:1100px) and (min-width:701px){html body.show-recipes-page #result,html body.show-recipes-page #result.grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:700px){html body.show-recipes-page #result,html body.show-recipes-page #result.grid{grid-template-columns:1fr!important}.recipe-card{min-height:500px!important}}

@media(max-width:980px){
  html body:not(.show-recipes-page) .floating-lang{
    top:112px !important;
  }

  html body #sidebar.sidebar-unified .sidebar-shell>.mobile-world-search-bar{
    position:relative !important;
    top:auto !important;
    left:auto !important;
    right:auto !important;
    z-index:15 !important;
    width:100% !important;
    margin:5px 0 !important;
  }
}

@media(max-width:980px){
  html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn,
  html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn:not(:hover),
  html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn:not(:hover) #galleryBtnText{
    border-color:rgba(226,190,127,.6) !important;
    background:#fff8ed !important;
    background-image:none !important;
    color:#263a2c !important;
    text-shadow:none !important;
  }

  html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn:hover,
  html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn:focus-visible,
  html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn:active{
    border-color:#d5ad6d !important;
    background:#314a37 !important;
    background-image:none !important;
    color:#fffaf0 !important;
  }

  html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn:hover #galleryBtnText,
  html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn:focus-visible #galleryBtnText,
  html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn:active #galleryBtnText{
    color:#fffaf0 !important;
  }
}

@media(max-width:980px){
  body:not(.show-recipes-page) .floating-lang{
    top:112px !important;
  }
}

@media(max-width:1200px){
  .hero-title-text{
    font-size:40px;
  }

  .hero-floating-strip{
    grid-template-columns:1fr;
    left:24px;
    right:24px;
    bottom:20px;
  }

  .hero-content{
    max-width:320px;
    padding:0;
  }
}

@media(max-width:980px){
  html,body{
    background:linear-gradient(180deg, #fbf7f1 0%, #f5efe6 100%);
  }

  .floating-lang{
    top:18px !important;
  }

  .nk-brand-card{
    min-height:136px;
    border-radius:26px;
  }

  .nk-eyebrow{
    margin-bottom:8px;
    font-size:10px;
  }

  .nk-title{
    font-size:29px;
  }

  .mobile-hero-big{
    border-radius:24px;
    overflow:hidden;
    box-shadow:0 22px 44px rgba(74,54,31,.12);
  }

  .mobile-hero-big::after{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(180deg, rgba(255,255,255,.08), rgba(30,38,32,.38));
  }

  .mobile-hero-text{
    z-index:3;
  }

  .mobile-hero-text .hero-badge-text{
    background:rgba(255,255,255,.82);
    color:#9a5c32;
  }

  .mobile-hero-text .hero-title-text{
    color:#fff9f1;
    font-family:Georgia, "Times New Roman", serif;
    text-shadow:0 10px 24px rgba(0,0,0,.2);
  }

  .mobile-hero-text .hero-desc-text{
    color:rgba(255,250,244,.92);
  }

  .upload-card{
    min-height:96px;
    border-radius:20px;
  }

  .upload-card-text strong,
  #scanTitle{
    font-size:18px;
  }

  .manual,
  .category-panel,
  .ad-media-box,
  .mobile-hero-small{
    border-radius:20px;
  }

  .mobile-feature-strip div{
    background:rgba(255,253,249,.9);
    border:1px solid rgba(140,112,79,.12);
  }
}

/* FINAL CLEAN RESULTS: compact cards with no overlap */
@media(min-width:981px){
  body.show-recipes-page #result,
  body.show-recipes-page #result.grid{
    grid-template-rows:repeat(2,minmax(0,clamp(270px,calc((100vh - 160px)/2),320px))) !important;
    gap:16px 20px !important;
    align-content:center !important;
  }

  body.show-recipes-page .recipe-card{
    display:grid !important;
    grid-template-rows:auto 118px minmax(0,1fr) !important;
    height:100% !important;
    min-height:0 !important;
    padding:10px !important;
    gap:8px !important;
    border:1px solid rgba(112,80,49,.14) !important;
    border-radius:22px !important;
    background:#fffaf2 !important;
    box-shadow:0 14px 32px rgba(54,38,23,.11) !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-card-title{
    grid-row:1 !important;
    min-height:36px !important;
    margin:0 !important;
    padding:2px 42px 0 !important;
    display:-webkit-box !important;
    color:#26372c !important;
    font-family:"Sora",sans-serif !important;
    font-size:15px !important;
    font-weight:700 !important;
    line-height:1.18 !important;
    text-align:center !important;
    -webkit-line-clamp:2 !important;
    -webkit-box-orient:vertical !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-card-image-wrap{
    grid-row:2 !important;
    position:relative !important;
    z-index:1 !important;
    width:100% !important;
    height:118px !important;
    min-height:118px !important;
    margin:0 !important;
    display:block !important;
    border-radius:16px !important;
    background:transparent !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-card-image-wrap img{
    width:100% !important;
    height:118px !important;
    min-width:0 !important;
    object-fit:cover !important;
    aspect-ratio:auto !important;
    border-radius:16px !important;
    box-shadow:none !important;
    transform:none !important;
  }

  body.show-recipes-page .recipe-card-image-wrap::after{
    display:none !important;
  }

  body.show-recipes-page .favorite-btn{
    top:8px !important;
    right:8px !important;
    width:34px !important;
    height:34px !important;
  }

  body.show-recipes-page .recipe-card-body{
    grid-row:3 !important;
    position:relative !important;
    z-index:2 !important;
    min-height:0 !important;
    margin:0 !important;
    padding:0 2px 2px !important;
    display:flex !important;
    flex-direction:column !important;
    gap:6px !important;
    background:transparent !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-card-meta{
    position:static !important;
    margin:0 !important;
    padding:0 !important;
    display:flex !important;
    justify-content:center !important;
    gap:5px !important;
    transform:none !important;
  }

  body.show-recipes-page .recipe-meta-pill{
    min-height:23px !important;
    padding:5px 7px !important;
    border:1px solid rgba(130,94,59,.10) !important;
    background:#f0e4d5 !important;
    color:#5c4838 !important;
    font-size:8px !important;
    box-shadow:none !important;
  }

  body.show-recipes-page .recipe-ingredients{
    position:static !important;
    max-height:27px !important;
    margin:0 !important;
    display:flex !important;
    justify-content:center !important;
    gap:5px !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-ingredients span{
    min-height:23px !important;
    padding:5px 7px !important;
    font-size:8px !important;
  }

  body.show-recipes-page .recipe-preview{
    position:static !important;
    margin:0 !important;
    display:-webkit-box !important;
    color:#746355 !important;
    font-size:9px !important;
    line-height:1.35 !important;
    text-align:center !important;
    -webkit-line-clamp:1 !important;
    -webkit-box-orient:vertical !important;
    overflow:hidden !important;
  }

  /* Match the homepage sidebar palette and component surfaces. */
  body.show-recipes-page #sidebar{
    background:linear-gradient(180deg,#f3eadc 0%,#eadfce 100%) !important;
  }

  body.show-recipes-page #sidebar .nk-brand-card{
    min-height:112px !important;
    padding:12px 14px !important;
    border:1px solid rgba(151,113,73,.12) !important;
    border-radius:24px !important;
    background:linear-gradient(145deg,#fffaf3,#f1e4d2) !important;
    box-shadow:0 12px 28px rgba(70,48,27,.07) !important;
  }

  body.show-recipes-page #sidebar .upload-card{
    min-height:112px !important;
    padding:14px 16px !important;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
    border:1px solid rgba(255,255,255,.12) !important;
    border-radius:22px !important;
    background:linear-gradient(145deg,#7a5034,#55331f) !important;
    color:#fffaf4 !important;
    box-shadow:0 14px 30px rgba(72,43,24,.18) !important;
  }

  body.show-recipes-page #sidebar .upload-card-text,
  body.show-recipes-page #sidebar .upload-card-text strong,
  body.show-recipes-page #sidebar .upload-card-text span{
    color:#fffaf4 !important;
    text-align:center !important;
  }

  body.show-recipes-page #sidebar .manual{
    background:transparent !important;
  }

  body.show-recipes-page #sidebar #manualInput{
    background:#fffaf4 !important;
  }

  body.show-recipes-page #sidebar .category-panel{
    border:1px solid rgba(144,107,72,.10) !important;
    background:linear-gradient(180deg,#f8f0e5,#eee2d2) !important;
  }

  body.show-recipes-page #sidebar .category-btn{
    background:rgba(255,251,246,.90) !important;
    color:#5a493b !important;
    border-color:rgba(139,103,70,.12) !important;
  }
}

/* Compact desktop recipe studio: eight cards and controls in one viewport. */
.recipe-sidebar-menu{
  display:none;
}

@media(min-width:981px){
  html:has(body.show-recipes-page),
  body.show-recipes-page{
    height:100vh !important;
    min-height:100vh !important;
    overflow:hidden !important;
    background:#f4eee5 !important;
  }

  body.show-recipes-page #sidebar,
  body.show-recipes-page .sidebar{
    display:block !important;
    position:fixed !important;
    inset:0 auto 0 0 !important;
    width:250px !important;
    height:100vh !important;
    padding:18px !important;
    overflow:hidden !important;
    background:linear-gradient(180deg, #172019 0%, #273225 100%) !important;
    border-right:1px solid rgba(210,174,112,.24) !important;
    box-shadow:18px 0 50px rgba(35,26,17,.14) !important;
  }

  body.show-recipes-page #sidebar .sidebar-shell{
    height:100% !important;
    min-height:0 !important;
    gap:18px !important;
  }

  body.show-recipes-page #sidebar .sidebar-main,
  body.show-recipes-page #sidebar .mobile-only,
  body.show-recipes-page #sidebar .join-area,
  body.show-recipes-page #sidebar .site-footer-note{
    display:none !important;
  }

  body.show-recipes-page #sidebar .nk-brand-card{
    display:flex !important;
    min-height:94px !important;
    padding:10px !important;
    border-radius:24px !important;
    background:rgba(255,250,241,.96) !important;
    box-shadow:0 18px 42px rgba(0,0,0,.18) !important;
  }

  body.show-recipes-page #sidebar .nk-brand-inner{
    gap:8px !important;
  }

  body.show-recipes-page #sidebar .nk-logo-shell,
  body.show-recipes-page #sidebar .nk-logo{
    width:62px !important;
    height:62px !important;
    min-width:62px !important;
    min-height:62px !important;
  }

  body.show-recipes-page #sidebar .nk-title{
    font-size:20px !important;
  }

  body.show-recipes-page #sidebar .nk-subtitle{
    font-size:9px !important;
  }

  body.show-recipes-page .recipe-sidebar-menu{
    display:flex !important;
    flex:1 !important;
    min-height:0 !important;
    flex-direction:column !important;
    padding:8px 4px 4px !important;
    color:#fffaf2 !important;
  }

  .recipe-sidebar-kicker{
    color:#d8ae66 !important;
    font:700 10px/1.2 Manrope,sans-serif !important;
    letter-spacing:.18em !important;
  }

  .recipe-sidebar-menu h2{
    margin:10px 0 4px !important;
    color:#fffaf2 !important;
    font:600 26px/1.05 Sora,sans-serif !important;
    letter-spacing:-.04em !important;
  }

  .recipe-sidebar-menu > p{
    margin:0 !important;
    color:rgba(255,250,242,.60) !important;
    font:600 11px/1.4 Manrope,sans-serif !important;
  }

  .recipe-sidebar-selection{
    margin:24px 0 14px !important;
    padding:14px !important;
    border:1px solid rgba(216,174,102,.20) !important;
    border-radius:18px !important;
    background:rgba(255,255,255,.055) !important;
  }

  .recipe-sidebar-selection > span{
    display:block !important;
    margin-bottom:10px !important;
    color:#e6c58d !important;
    font:700 10px/1.3 Manrope,sans-serif !important;
    text-transform:uppercase !important;
    letter-spacing:.08em !important;
  }

  #recipeSidebarIngredients{
    display:flex !important;
    flex-wrap:wrap !important;
    gap:6px !important;
    max-height:124px !important;
    overflow:hidden !important;
  }

  #recipeSidebarIngredients span{
    padding:6px 9px !important;
    border-radius:999px !important;
    background:rgba(255,250,242,.10) !important;
    color:#fffaf2 !important;
    font:700 10px/1 Manrope,sans-serif !important;
  }

  .recipe-sidebar-primary,
  .recipe-sidebar-secondary{
    width:100% !important;
    min-height:44px !important;
    border-radius:14px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:8px !important;
    font:700 11px/1 Manrope,sans-serif !important;
  }

  .recipe-sidebar-primary{
    margin-top:auto !important;
    border:1px solid #c38a4d !important;
    background:linear-gradient(135deg, #bd793f, #925326) !important;
    color:#fff !important;
  }

  .recipe-sidebar-secondary{
    margin-top:8px !important;
    border:1px solid rgba(255,255,255,.12) !important;
    background:rgba(255,255,255,.06) !important;
    color:#f7ead8 !important;
  }

  body.show-recipes-page #content,
  body.show-recipes-page .content{
    display:flex !important;
    flex-direction:column !important;
    width:calc(100% - 250px) !important;
    height:100vh !important;
    min-height:0 !important;
    max-height:100vh !important;
    margin:0 0 0 250px !important;
    padding:14px 18px 12px !important;
    overflow:hidden !important;
  }

  body.show-recipes-page #result,
  body.show-recipes-page #result.grid{
    flex:1 1 auto !important;
    min-height:0 !important;
    height:auto !important;
    grid-template-columns:repeat(4, minmax(0,1fr)) !important;
    grid-template-rows:repeat(2, minmax(0,1fr)) !important;
    gap:12px !important;
    padding:0 !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-card{
    min-height:0 !important;
    height:100% !important;
    border-radius:20px !important;
    box-shadow:0 12px 26px rgba(54,36,22,.09) !important;
  }

  body.show-recipes-page .recipe-card-image-wrap{
    flex:0 0 clamp(108px, 15vh, 150px) !important;
    min-height:0 !important;
  }

  body.show-recipes-page .recipe-card-image-wrap img{
    height:100% !important;
  }

  body.show-recipes-page .favorite-btn{
    top:9px !important;
    right:9px !important;
    width:34px !important;
    height:34px !important;
  }

  body.show-recipes-page .recipe-card-body{
    min-height:0 !important;
    padding:11px 13px 12px !important;
    gap:7px !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-card-meta{
    gap:5px !important;
  }

  body.show-recipes-page .recipe-meta-pill{
    min-height:24px !important;
    padding:5px 7px !important;
    font-size:9px !important;
  }

  body.show-recipes-page .recipe-card-body h3{
    display:-webkit-box !important;
    margin:0 !important;
    font-size:14px !important;
    line-height:1.18 !important;
    -webkit-line-clamp:2 !important;
    -webkit-box-orient:vertical !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-ingredients{
    gap:4px !important;
    max-height:25px !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-ingredients span{
    min-height:22px !important;
    padding:5px 7px !important;
    font-size:8px !important;
  }

  body.show-recipes-page .recipe-preview{
    display:-webkit-box !important;
    margin:0 !important;
    font-size:9px !important;
    line-height:1.35 !important;
    -webkit-line-clamp:2 !important;
    -webkit-box-orient:vertical !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-result-actions{
    flex:0 0 50px !important;
    min-height:50px !important;
    margin:4px 0 0 !important;
    padding:0 !important;
  }

  body.show-recipes-page .recipe-back-btn,
  body.show-recipes-page .recipe-next-btn{
    min-width:132px !important;
    min-height:38px !important;
    padding:9px 18px !important;
    font-size:11px !important;
  }
}

@media(max-width:980px){
  .recipe-sidebar-menu{
    display:none !important;
  }
}

/* =========================================================
   HOMEPAGE REBUILD V2 - QUIET LUXURY DESKTOP
========================================================= */

@media (min-width:981px){
  html,body{
    background:
      radial-gradient(circle at top right, rgba(210,171,120,.14), transparent 28%),
      radial-gradient(circle at top left, rgba(255,255,255,.94), transparent 32%),
      linear-gradient(180deg, #faf6ef 0%, #f2ebdf 100%) !important;
  }

  .floating-lang{
    top:42px !important;
    right:54px !important;
    z-index:120 !important;
  }

  #content,
  .content{
    margin-left:0 !important;
    min-height:auto !important;
    height:auto !important;
    padding:22px 28px 56px !important;
    overflow:visible !important;
  }

  #sidebar,
  .sidebar{
    position:fixed !important;
    top:98px !important;
    right:36px !important;
    left:auto !important;
    width:332px !important;
    height:calc(100vh - 132px) !important;
    padding:18px 16px 14px !important;
    background:linear-gradient(180deg, rgba(255,251,246,.98), rgba(248,241,231,.98)) !important;
    border:1px solid rgba(124,95,67,.14) !important;
    border-radius:30px !important;
    box-shadow:0 24px 70px rgba(70,50,28,.16) !important;
    z-index:70 !important;
    overflow:hidden !important;
  }

  .sidebar-shell{
    height:100% !important;
    gap:14px !important;
    overflow:hidden !important;
  }

  .sidebar-main{
    flex:1 1 auto !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    padding-right:4px !important;
    padding-bottom:10px !important;
    gap:12px !important;
  }

  .sidebar-main::-webkit-scrollbar{
    width:6px;
  }

  .sidebar-main::-webkit-scrollbar-thumb{
    background:rgba(120,98,71,.18);
    border-radius:999px;
  }

  .nk-brand-card{
    min-height:auto !important;
    padding:0 !important;
    background:transparent !important;
    border:none !important;
    box-shadow:none !important;
    border-radius:0 !important;
  }

  .nk-brand-card::after{
    display:none !important;
  }

  .nk-brand-inner{
    gap:12px !important;
    align-items:center !important;
  }

  .nk-logo{
    width:56px !important;
    height:56px !important;
    min-width:56px !important;
    min-height:56px !important;
    padding:8px !important;
    border-radius:18px !important;
    box-shadow:0 10px 18px rgba(86,63,34,.08) !important;
  }

  .nk-eyebrow{
    font-size:9px !important;
    padding:5px 10px !important;
    margin-bottom:6px !important;
    background:rgba(181,106,60,.08) !important;
    color:#8f603e !important;
  }

  .nk-title{
    font-size:24px !important;
    line-height:1 !important;
    color:#2b241d !important;
  }

  .nk-subtitle{
    font-size:11px !important;
    color:#7a7064 !important;
  }

  .upload-card{
    min-height:auto !important;
    padding:20px 18px !important;
    border-radius:24px !important;
    background:linear-gradient(180deg, rgba(255,255,255,.95), rgba(250,245,237,.96)) !important;
    border:1px dashed rgba(188,149,103,.34) !important;
    box-shadow:none !important;
    align-items:center !important;
    text-align:center !important;
  }

  .upload-card-text{
    align-items:center !important;
  }

  .upload-card-text strong,
  #scanTitle{
    font-family:Georgia, "Times New Roman", serif !important;
    font-size:27px !important;
    line-height:1.08 !important;
    font-weight:500 !important;
    color:#2f261f !important;
  }

  .upload-card-text span,
  #statusText{
    max-width:228px !important;
    color:#7e7367 !important;
    font-size:14px !important;
    line-height:1.45 !important;
    font-weight:600 !important;
  }

  .gallery-mini-btn{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    margin-top:10px !important;
    padding:12px 18px !important;
    border-radius:18px !important;
    background:#fff !important;
    color:#374137 !important;
    border:1px solid rgba(184,151,110,.22) !important;
    box-shadow:none !important;
  }

  .analyze-progress{
    width:100% !important;
    margin-top:12px !important;
  }

  .manual{
    padding:0 !important;
    background:transparent !important;
    border:none !important;
    box-shadow:none !important;
  }

  #manualInput{
    height:50px !important;
    border-radius:18px !important;
    background:rgba(255,255,255,.9) !important;
    border:1px solid rgba(124,95,67,.14) !important;
  }

  .manual button{
    width:50px !important;
    height:50px !important;
    border-radius:18px !important;
    background:linear-gradient(135deg, #b56a3c, #95522a) !important;
  }

  .category-panel{
    padding:16px !important;
    border-radius:24px !important;
    background:rgba(255,255,255,.68) !important;
    border:1px solid rgba(124,95,67,.1) !important;
    box-shadow:none !important;
  }

  .panel-title{
    text-align:center !important;
    font-size:14px !important;
    color:#332a23 !important;
  }

  #categoryGrid{
    gap:8px !important;
  }

  #categoryGrid .category-btn{
    min-height:38px !important;
    padding:8px 12px !important;
    border-radius:999px !important;
    background:rgba(255,252,247,.96) !important;
    border:1px solid rgba(124,95,67,.12) !important;
    box-shadow:none !important;
    color:#4d5148 !important;
    font-size:11px !important;
    font-weight:800 !important;
  }

  .ad-media-box{
    height:122px !important;
    min-height:122px !important;
    border-radius:22px !important;
    box-shadow:none !important;
  }

  .join-area{
    margin-top:auto !important;
    padding-top:4px !important;
  }

  .nk-mini-card{
    background:rgba(255,255,255,.78) !important;
    border:1px solid rgba(124,95,67,.1) !important;
    box-shadow:none !important;
    border-radius:22px !important;
  }

  #joinNiliBtn{
    background:linear-gradient(135deg, #b56a3c, #95522a) !important;
    box-shadow:none !important;
  }

  .site-footer-note{
    padding:4px 8px 0 !important;
    color:#8d8071 !important;
  }

  .hero{
    height:640px !important;
    margin-right:382px !important;
  }

  .hero-bg{
    grid-template-columns:1fr !important;
    height:100% !important;
  }

  .hero-side-images{
    display:none !important;
  }

  .hero-main-card{
    position:relative !important;
    border-radius:34px !important;
    overflow:hidden !important;
    box-shadow:0 28px 70px rgba(47,31,15,.16) !important;
    background:#181811 !important;
  }

  .hero-main-img{
    width:100% !important;
    height:100% !important;
    object-fit:cover !important;
    transform:none !important;
    filter:saturate(.98) brightness(.88) !important;
  }

  .hero-dark{
    background:
      linear-gradient(90deg, rgba(15,18,12,.92) 0%, rgba(15,18,12,.8) 24%, rgba(15,18,12,.42) 46%, rgba(15,18,12,.06) 67%, rgba(15,18,12,0) 100%) !important;
  }

  .hero-main-card::after{
    background:
      radial-gradient(circle at 22% 18%, rgba(123,93,44,.18), transparent 18%),
      linear-gradient(180deg, rgba(255,255,255,.02), rgba(0,0,0,.12)) !important;
  }

  .hero-topbar{
    position:absolute;
    top:22px;
    left:34px;
    right:34px;
    z-index:8;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:24px;
  }

  .hero-branding{
    display:flex;
    align-items:center;
    gap:10px;
    color:#f5edde;
  }

  .hero-brand-mark{
    color:#c59a4f;
    font-size:15px;
  }

  .hero-brand-name{
    font-family:Georgia, "Times New Roman", serif;
    font-size:20px;
    letter-spacing:-.03em;
  }

  .hero-nav{
    display:flex;
    align-items:center;
    gap:28px;
  }

  .hero-nav a{
    position:relative;
    color:rgba(248,240,228,.86);
    text-decoration:none;
    font-size:14px;
    font-weight:500;
  }

  .hero-nav a.active::after{
    content:"";
    position:absolute;
    left:0;
    right:0;
    bottom:-10px;
    height:2px;
    border-radius:999px;
    background:#c59a4f;
  }

  .hero-content{
    top:52% !important;
    left:56px !important;
    max-width:420px !important;
    z-index:9 !important;
  }

  .hero-badge-text{
    display:inline-flex !important;
    align-items:center !important;
    gap:8px !important;
    padding:0 !important;
    margin-bottom:16px !important;
    border-radius:0 !important;
    background:transparent !important;
    color:#c9a45b !important;
    box-shadow:none !important;
    backdrop-filter:none !important;
    font-size:13px !important;
    letter-spacing:.16em !important;
    text-transform:uppercase !important;
  }

  .hero-title-text{
    font-size:82px !important;
    line-height:.92 !important;
    color:#f8f1e3 !important;
    font-weight:500 !important;
    letter-spacing:-.055em !important;
    text-shadow:none !important;
  }

  .hero-kicker{
    display:none !important;
  }

  .hero-desc-text{
    margin-top:18px !important;
    max-width:380px !important;
    color:rgba(244,235,221,.88) !important;
    font-size:17px !important;
    line-height:1.55 !important;
    font-weight:500 !important;
    text-shadow:none !important;
  }

  .hero-stats{
    display:flex;
    align-items:center;
    gap:22px;
    margin-top:30px;
    color:#e8d4a8;
  }

  .hero-stat-item{
    display:flex;
    flex-direction:column;
    gap:4px;
  }

  .hero-stat-item strong{
    font-size:42px;
    font-weight:500;
    font-family:Georgia, "Times New Roman", serif;
    line-height:1;
  }

  .hero-stat-item span{
    font-size:14px;
    color:rgba(244,235,221,.78);
  }

  .hero-stat-divider{
    width:1px;
    height:48px;
    background:rgba(221,198,149,.3);
  }

  .hero-actions{
    position:absolute !important;
    right:-356px !important;
    top:140px !important;
    margin-top:0 !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:10px !important;
    width:292px !important;
    display:none !important;
  }

  .hero-primary-btn,
  .hero-secondary-btn{
    width:100% !important;
    height:50px !important;
    border-radius:18px !important;
    font-size:15px !important;
  }

  .hero-floating-strip{
    left:34px !important;
    right:34px !important;
    bottom:26px !important;
    display:flex !important;
    align-items:center !important;
    gap:14px !important;
    overflow:hidden !important;
  }

  .hero-strip-item{
    min-width:0 !important;
    flex:1 1 0 !important;
    padding:14px 16px !important;
    border-radius:18px !important;
    background:rgba(255,249,241,.95) !important;
    border:1px solid rgba(194,163,122,.16) !important;
    box-shadow:0 12px 24px rgba(59,41,19,.09) !important;
  }

  .hero-strip-item strong{
    font-size:14px !important;
    line-height:1.35 !important;
  }

  #result{
    margin-right:382px !important;
    padding:24px 0 40px !important;
  }
}

/* =========================================================
   DESKTOP STABILITY RESET
========================================================= */

@media (min-width:981px){
  html,
  body:not(.show-recipes-page){
    height:100vh !important;
    overflow:hidden !important;
  }

  body:not(.show-recipes-page) #sidebar,
  body:not(.show-recipes-page) .sidebar{
    position:fixed !important;
    top:0 !important;
    left:0 !important;
    right:auto !important;
    width:320px !important;
    height:100vh !important;
    padding:10px 10px !important;
    border-radius:0 !important;
    background:
      radial-gradient(circle at top left, rgba(255,247,236,.92), transparent 34%),
      linear-gradient(180deg, rgba(240,231,218,.96), rgba(229,217,201,.98)) !important;
    border-right:1px solid rgba(126,101,76,.08) !important;
    box-shadow:20px 0 44px rgba(61,44,24,.07) !important;
    overflow:hidden !important;
    z-index:20 !important;
  }

  body:not(.show-recipes-page) #sidebar::before{
    content:"" !important;
    position:absolute !important;
    inset:14px 12px 14px 12px !important;
    border-radius:30px !important;
    border:1px solid rgba(255,255,255,.28) !important;
    pointer-events:none !important;
    opacity:.7 !important;
  }

  body:not(.show-recipes-page) .sidebar-shell{
    display:flex !important;
    flex-direction:column !important;
    gap:8px !important;
    height:100% !important;
    overflow:hidden !important;
  }

  body:not(.show-recipes-page) .sidebar-main{
    flex:1 1 auto !important;
    display:flex !important;
    flex-direction:column !important;
    gap:8px !important;
    overflow:visible !important;
    padding-right:0 !important;
  }

  body:not(.show-recipes-page) .sidebar-main::-webkit-scrollbar{
    display:none !important;
  }

  body:not(.show-recipes-page) .sidebar-main::-webkit-scrollbar-thumb{
    display:none !important;
  }

  body:not(.show-recipes-page) #content,
  body:not(.show-recipes-page) .content{
    margin-left:320px !important;
    margin-right:0 !important;
    width:auto !important;
    min-height:100vh !important;
    height:100vh !important;
    padding:24px !important;
    overflow:hidden !important;
    background:var(--page-bg) !important;
  }

  body:not(.show-recipes-page) #result,
  body:not(.show-recipes-page) #result.grid{
    display:none !important;
    padding:0 !important;
    margin:0 !important;
    min-height:0 !important;
    height:0 !important;
    overflow:hidden !important;
  }

  body:not(.show-recipes-page) .hero{
    display:block !important;
    width:100% !important;
    height:calc(100vh - 48px) !important;
    min-height:calc(100vh - 48px) !important;
    max-height:calc(100vh - 48px) !important;
    margin:0 !important;
  }

  body:not(.show-recipes-page) .hero-bg{
    display:grid !important;
    grid-template-columns:minmax(0,1.65fr) minmax(320px,.75fr) !important;
    gap:18px !important;
    width:100% !important;
    height:100% !important;
  }

  body:not(.show-recipes-page) .hero-side-images{
    display:grid !important;
    grid-template-rows:repeat(2,minmax(0,1fr)) !important;
    gap:18px !important;
    height:100% !important;
  }

  body:not(.show-recipes-page) .hero-side-images img{
    display:block !important;
    width:100% !important;
    height:100% !important;
    object-fit:cover !important;
    border-radius:28px !important;
  }

  body:not(.show-recipes-page) .hero-main-card{
    position:relative !important;
    height:100% !important;
    border-radius:34px !important;
    overflow:hidden !important;
    box-shadow:0 24px 70px rgba(0,0,0,.16) !important;
    background:transparent !important;
  }

  body:not(.show-recipes-page) .hero-main-img{
    width:100% !important;
    height:100% !important;
    object-fit:cover !important;
    transform:none !important;
  }

  body:not(.show-recipes-page) .hero-topbar,
  body:not(.show-recipes-page) .hero-stats{
    display:none !important;
  }

  body:not(.show-recipes-page) .hero-content{
    position:absolute !important;
    left:44px !important;
    top:46% !important;
    transform:translateY(-50%) !important;
    max-width:500px !important;
    padding:0 0 96px !important;
    z-index:7 !important;
    background:transparent !important;
    border:none !important;
    box-shadow:none !important;
  }

  body:not(.show-recipes-page) .hero-title-text{
    font-size:58px !important;
    line-height:1 !important;
    max-width:520px !important;
  }

  body:not(.show-recipes-page) .hero-desc-text{
    max-width:420px !important;
    font-size:18px !important;
  }

  body:not(.show-recipes-page) .hero-actions{
    position:relative !important;
    right:auto !important;
    top:auto !important;
    width:auto !important;
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    gap:14px !important;
    margin-top:18px !important;
    z-index:8 !important;
  }

  body:not(.show-recipes-page) .hero-primary-btn,
  body:not(.show-recipes-page) .hero-secondary-btn{
    width:auto !important;
    min-width:0 !important;
    height:54px !important;
    border-radius:999px !important;
    padding:0 24px !important;
  }

  body:not(.show-recipes-page) .hero-floating-strip{
    position:absolute !important;
    left:34px !important;
    right:34px !important;
    bottom:22px !important;
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:14px !important;
    z-index:6 !important;
  }

  body:not(.show-recipes-page) #result{
    margin-right:0 !important;
  }

  body:not(.show-recipes-page) .nk-brand-card{
    min-height:108px !important;
    padding:12px 14px !important;
    background:linear-gradient(180deg, rgba(248,241,233,.94), rgba(238,227,213,.86)) !important;
    border:1px solid rgba(142,111,83,.10) !important;
    border-radius:24px !important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.6),
      0 12px 24px rgba(73,51,29,.05) !important;
    position:relative !important;
    overflow:hidden !important;
  }

  body:not(.show-recipes-page) .nk-brand-card::after{
    content:"" !important;
    position:absolute !important;
    right:-26px !important;
    top:-32px !important;
    width:120px !important;
    height:120px !important;
    border-radius:50% !important;
    background:radial-gradient(circle, rgba(187,143,98,.16), transparent 70%) !important;
  }

  body:not(.show-recipes-page) .nk-brand-inner{
    justify-content:flex-start !important;
    gap:14px !important;
    display:grid !important;
    grid-template-columns:88px minmax(0, 1fr) !important;
    align-items:center !important;
  }

  body:not(.show-recipes-page) .nk-logo-shell{
    width:84px !important;
    height:84px !important;
    min-width:84px !important;
    min-height:84px !important;
    border-radius:26px !important;
    overflow:hidden !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    background:
      radial-gradient(circle at 30% 30%, rgba(255,250,245,.96), rgba(243,230,214,.92) 58%, rgba(225,205,181,.92) 100%) !important;
    border:1px solid rgba(162,125,91,.14) !important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.72),
      0 10px 24px rgba(76,54,30,.08) !important;
  }

  body:not(.show-recipes-page) .nk-logo{
    width:82px !important;
    height:82px !important;
    min-width:82px !important;
    min-height:82px !important;
    padding:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    border:none !important;
    box-shadow:none !important;
    mix-blend-mode:multiply !important;
    filter:contrast(1.08) saturate(.88) brightness(.98) !important;
    transform:scale(1.02) !important;
  }

  body:not(.show-recipes-page) .nk-eyebrow{
    display:none !important;
  }

  body:not(.show-recipes-page) .nk-title{
    font-size:28px !important;
    line-height:1.02 !important;
    font-weight:700 !important;
    color:#30241a !important;
    text-align:center !important;
    margin-left:auto !important;
    margin-right:auto !important;
    text-wrap:balance !important;
  }

  body:not(.show-recipes-page) .nk-subtitle{
    font-size:11px !important;
    color:#7a6a5b !important;
    text-align:center !important;
    margin-left:auto !important;
    margin-right:auto !important;
    line-height:1.3 !important;
  }

  body:not(.show-recipes-page) .nk-brand-text{
    display:flex !important;
    flex-direction:column !important;
    justify-content:center !important;
    text-align:center !important;
    width:100% !important;
    max-width:none !important;
    align-items:center !important;
    padding-right:0 !important;
    padding-left:0 !important;
    gap:4px !important;
  }

  body:not(.show-recipes-page) .nk-eyebrow,
  body:not(.show-recipes-page) .nk-title,
  body:not(.show-recipes-page) .nk-subtitle{
    text-align:center !important;
  }

  body:not(.show-recipes-page) .nk-title,
  body:not(.show-recipes-page) .nk-subtitle{
    width:100% !important;
  }

  body:not(.show-recipes-page) .upload-card{
    min-height:112px !important;
    padding:12px 12px !important;
    border-radius:20px !important;
    background:
      radial-gradient(circle at top right, rgba(228,188,145,.18), transparent 34%),
      radial-gradient(circle at bottom left, rgba(255,255,255,.06), transparent 24%),
      linear-gradient(165deg, rgba(116,74,44,.98), rgba(77,47,29,.98)) !important;
    border:1px solid rgba(92,58,34,.28) !important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.08),
      0 16px 26px rgba(67,47,26,.18) !important;
    position:relative !important;
    overflow:hidden !important;
    text-align:center !important;
    align-items:center !important;
    justify-content:center !important;
    gap:8px !important;
  }

  body:not(.show-recipes-page) .upload-card::after{
    content:"" !important;
    position:absolute !important;
    inset:10px !important;
    border-radius:16px !important;
    border:1px solid rgba(255,255,255,.06) !important;
    pointer-events:none !important;
  }

  body:not(.show-recipes-page) .upload-card-text{
    display:flex !important;
    width:100% !important;
    gap:4px !important;
    align-items:center !important;
    text-align:center !important;
    position:relative !important;
    z-index:1 !important;
    white-space:normal !important;
  }

  body:not(.show-recipes-page) .upload-card::before{
    display:none !important;
  }

  body:not(.show-recipes-page) .upload-card-text strong,
  body:not(.show-recipes-page) #scanTitle{
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    width:100% !important;
    font-size:13px !important;
    line-height:1.12 !important;
    font-weight:700 !important;
    color:#fff7ee !important;
    text-shadow:0 1px 10px rgba(0,0,0,.14) !important;
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
    overflow-wrap:anywhere !important;
    word-break:normal !important;
    hyphens:auto !important;
  }

  body:not(.show-recipes-page) .upload-card-text span,
  body:not(.show-recipes-page) #statusText{
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    width:100% !important;
    max-width:none !important;
    font-size:9px !important;
    line-height:1.25 !important;
    color:rgba(255,242,229,.78) !important;
    margin:0 !important;
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
    overflow-wrap:anywhere !important;
    word-break:normal !important;
    hyphens:auto !important;
  }

  body:not(.show-recipes-page) .gallery-mini-btn{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    margin-top:4px !important;
    padding:6px 9px !important;
    border-radius:10px !important;
    background:rgba(255,249,242,.96) !important;
    color:#69472d !important;
    border:1px solid rgba(255,255,255,.22) !important;
    box-shadow:0 8px 18px rgba(42,23,10,.14) !important;
    font-size:8px !important;
    position:relative !important;
    z-index:1 !important;
    white-space:nowrap !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }

  body:not(.show-recipes-page) .analyze-progress{
    display:block !important;
    height:3px !important;
    margin-top:6px !important;
    background:rgba(255,255,255,.14) !important;
  }

  body:not(.show-recipes-page) #bar{
    background:linear-gradient(90deg, #f1d3b1, #ca8b55) !important;
  }

  body:not(.show-recipes-page) .manual{
    gap:6px !important;
    padding:0 !important;
  }

  body:not(.show-recipes-page) #manualInput{
    height:36px !important;
    font-size:11px !important;
    border-radius:16px !important;
    border:1px solid rgba(142,111,83,.10) !important;
    background:rgba(255,250,245,.92) !important;
    color:#413225 !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.65) !important;
    padding:0 14px !important;
  }

  body:not(.show-recipes-page) .manual button{
    width:36px !important;
    height:36px !important;
    border-radius:12px !important;
    background:linear-gradient(135deg, #a56b3d, #84502b) !important;
    box-shadow:0 10px 18px rgba(98,63,35,.14) !important;
  }

  body:not(.show-recipes-page) .category-panel{
    padding:15px !important;
    border-radius:20px !important;
    background:linear-gradient(180deg, rgba(247,240,232,.86), rgba(239,230,217,.76)) !important;
    border:1px solid rgba(142,111,83,.08) !important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.48),
      0 10px 18px rgba(73,51,29,.04) !important;
  }

  body:not(.show-recipes-page) .panel-title{
    font-size:13px !important;
    color:#33261b !important;
    margin-bottom:12px !important;
    text-align:center !important;
    font-weight:700 !important;
    letter-spacing:-.01em !important;
  }

  body:not(.show-recipes-page) #categoryGrid{
    display:grid !important;
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
    gap:9px !important;
  }

  body:not(.show-recipes-page) #categoryGrid .category-btn{
    width:100% !important;
    min-height:36px !important;
    justify-content:flex-start !important;
    padding:8px 11px !important;
    font-size:10px !important;
    color:#544537 !important;
    background:rgba(255,250,244,.86) !important;
    border:1px solid rgba(142,111,83,.08) !important;
    border-radius:999px !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.7) !important;
  }

  body.show-recipes-page #sidebar,
  body.show-recipes-page .sidebar,
  body.show-recipes-page .floating-lang,
  body.show-recipes-page .nk-brand-card,
  body.show-recipes-page .sidebar-shell,
  body.show-recipes-page .sidebar-main{
    display:none !important;
    visibility:hidden !important;
    opacity:0 !important;
    pointer-events:none !important;
  }

  body.show-recipes-page #content,
  body.show-recipes-page .content{
    margin-left:0 !important;
    margin-right:0 !important;
    width:100% !important;
    max-width:none !important;
    padding-left:24px !important;
    padding-right:24px !important;
  }

  body:not(.show-recipes-page) .ad-media-box{
    display:block !important;
    height:auto !important;
    min-height:0 !important;
    aspect-ratio:16 / 9 !important;
    border-radius:18px !important;
    box-shadow:0 14px 24px rgba(71,50,28,.08) !important;
    border:1px solid rgba(142,111,83,.08) !important;
    overflow:hidden !important;
  }

  body:not(.show-recipes-page) .ad-media-box video{
    filter:saturate(.9) contrast(.98) brightness(.96) !important;
  }

  body:not(.show-recipes-page) .nk-mini-card{
    padding:8px 9px !important;
    border-radius:14px !important;
    background:linear-gradient(180deg, rgba(247,239,230,.84), rgba(238,227,213,.82)) !important;
    border:1px solid rgba(142,111,83,.08) !important;
    box-shadow:0 10px 18px rgba(73,51,29,.04) !important;
  }

  body:not(.show-recipes-page) .nk-mini-content h4{
    font-size:10px !important;
    color:#30241a !important;
    margin-bottom:4px !important;
  }

  body:not(.show-recipes-page) .nk-mini-content p{
    font-size:8px !important;
    line-height:1.2 !important;
    color:#746556 !important;
  }

  body:not(.show-recipes-page) #joinNiliBtn{
    min-width:96px !important;
    height:34px !important;
    border-radius:12px !important;
    background:linear-gradient(135deg, #a86b3a, #844d27) !important;
    font-size:9px !important;
    box-shadow:0 12px 18px rgba(98,63,35,.14) !important;
  }

  body:not(.show-recipes-page) .nk-mini-icon{
    width:24px !important;
    height:24px !important;
    border-radius:8px !important;
    background:rgba(255,244,231,.9) !important;
    color:#b16d36 !important;
  }

  body:not(.show-recipes-page) .site-footer-note{
    padding-top:2px !important;
  }

  body:not(.show-recipes-page) #footerNoteText{
    font-size:9px !important;
    color:#887867 !important;
  }
}

@media (max-width:980px){
  body:not(.show-recipes-page) .nk-brand-inner{
    grid-template-columns:86px minmax(0, 1fr) !important;
    column-gap:12px !important;
    align-items:center !important;
  }

  body:not(.show-recipes-page) .floating-lang{
    position:fixed !important;
    top:102px !important;
    left:24px !important;
    right:24px !important;
    bottom:auto !important;
    margin:0 !important;
    width:auto !important;
    z-index:41 !important;
    display:flex !important;
    justify-content:space-between !important;
    align-items:center !important;
    gap:6px !important;
    flex-direction:row !important;
  }

  body:not(.show-recipes-page) .lang-btn,
  body:not(.show-recipes-page) .user-menu-btn{
    height:28px !important;
    padding:5px 9px !important;
    font-size:10px !important;
    border-radius:999px !important;
    background:#fff3e8 !important;
    box-shadow:0 6px 16px rgba(0,0,0,.08) !important;
  }

  body:not(.show-recipes-page) .lang-btn img{
    width:14px !important;
    height:14px !important;
  }

  body:not(.show-recipes-page) .user-menu-dropdown,
  body:not(.show-recipes-page) .lang-options{
    top:calc(100% + 6px) !important;
    right:0 !important;
    left:auto !important;
  }

  body:not(.show-recipes-page) #sidebar,
  body:not(.show-recipes-page) .sidebar{
    position:relative !important;
    top:auto !important;
    left:auto !important;
    right:auto !important;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    padding:142px 12px 12px !important;
    overflow:visible !important;
    box-shadow:none !important;
    border:none !important;
  }

  body:not(.show-recipes-page) .sidebar-shell,
  body:not(.show-recipes-page) .sidebar-main{
    height:auto !important;
    min-height:0 !important;
    overflow:visible !important;
    gap:10px !important;
  }

  body:not(.show-recipes-page) .nk-brand-card{
    position:fixed !important;
    top:12px !important;
    left:12px !important;
    right:12px !important;
    width:auto !important;
    min-height:112px !important;
    padding:10px 12px 44px !important;
    margin:0 !important;
    border-radius:24px !important;
    z-index:40 !important;
  }

  body:not(.show-recipes-page) .nk-logo-shell{
    width:82px !important;
    height:82px !important;
    min-width:82px !important;
    min-height:82px !important;
    border-radius:24px !important;
  }

  body:not(.show-recipes-page) .nk-logo{
    width:80px !important;
    height:80px !important;
    min-width:80px !important;
    min-height:80px !important;
    mix-blend-mode:multiply !important;
    filter:contrast(1.08) saturate(.86) brightness(.98) !important;
    transform:scale(1.02) !important;
  }

  body:not(.show-recipes-page) .nk-title{
    font-size:26px !important;
    text-align:center !important;
    justify-self:center !important;
    align-self:center !important;
    margin-left:auto !important;
    margin-right:auto !important;
    width:100% !important;
  }

  body:not(.show-recipes-page) .nk-subtitle{
    font-size:11px !important;
    text-align:center !important;
    justify-self:center !important;
    align-self:center !important;
    margin-left:auto !important;
    margin-right:auto !important;
    width:100% !important;
  }

  body:not(.show-recipes-page) .nk-brand-text{
    display:grid !important;
    justify-items:center !important;
    align-content:center !important;
    text-align:center !important;
    align-items:center !important;
    justify-content:center !important;
    margin:0 auto !important;
    gap:4px !important;
    padding-right:0 !important;
    padding-left:0 !important;
  }

  body:not(.show-recipes-page) .user-menu{
    order:1 !important;
  }

  body:not(.show-recipes-page) .lang-wrapper{
    order:2 !important;
  }

  body:not(.show-recipes-page) .gallery-mini-btn{
    display:inline-flex !important;
  }
}

/* =========================================================
   FINAL PREMIUM TYPE / COLOR OVERRIDES
========================================================= */

html,
body{
  background:#f4efe6 !important;
  color:#221a14 !important;
}

body,
button,
input,
select,
textarea{
  font-family:"Manrope", Arial, sans-serif !important;
}

#appSubtitle,
.nk-subtitle,
.subtitle,
.brand-text p,
.upload-card-text span,
#statusText,
.category-btn,
.lang-btn,
.user-menu-btn,
#manualInput,
.time,
.ingredients-count,
.ingredients span,
.nk-mini-content p,
.site-footer-note,
#footerNoteText{
  font-family:"Manrope", Arial, sans-serif !important;
}

:root{
  --page-bg:#f4efe6 !important;
  --brand-bg:#fff8ef !important;
  --card-bg:#fffdf8 !important;
  --green:#445f49 !important;
  --green-dark:#22392d !important;
  --green-soft:#f2f4ee !important;
  --green-border:#dde4d8 !important;
  --orange:#b66b38 !important;
  --orange-dark:#8f5128 !important;
  --text:#221a14 !important;
  --muted:#7a6c5f !important;
  --border:#eadfce !important;
}

.nk-title,
.brand-text h1,
#sidebar h1,
.sidebar h1,
.card h3,
.modal-content h1,
.modal-content h2,
#ingredientModalTitle,
.panel-title,
#manualTitle,
#categoriesTitle,
.section-title,
.upload-card-text strong,
#scanTitle,
.scan-title,
#uploadTitle,
.upload h3,
.creator-card-text strong,
.nk-mini-content h4{
  font-family:"Sora", "Manrope", Arial, sans-serif !important;
  color:#221a14 !important;
  letter-spacing:-.035em !important;
  font-weight:600 !important;
}

.hero-title-text{
  font-family:"Sora", "Manrope", Arial, sans-serif !important;
  font-weight:700 !important;
  letter-spacing:-.045em !important;
}

.nk-title,
.brand-text h1,
#sidebar h1,
.sidebar h1{
  font-family:"Playfair Display", Georgia, serif !important;
  font-weight:700 !important;
  letter-spacing:-.03em !important;
}

.hero-title-text{
  color:#fff7ee !important;
  text-shadow:0 10px 28px rgba(0,0,0,.22) !important;
}

.hero-desc-text,
.nk-subtitle,
#appSubtitle,
.time,
.ingredients-count,
.modal-content p{
  color:#7a6c5f !important;
}

.panel-title,
#manualTitle,
#categoriesTitle,
.section-title{
  color:#34271d !important;
  font-weight:700 !important;
  letter-spacing:-.01em !important;
}

body:not(.show-recipes-page) .hero-main-img{
  filter:none !important;
}

body:not(.show-recipes-page) .hero-dark{
  background:linear-gradient(90deg, rgba(15,18,12,.56) 0%, rgba(15,18,12,.34) 28%, rgba(15,18,12,.10) 54%, rgba(15,18,12,0) 76%) !important;
}

body:not(.show-recipes-page) .hero-content{
  top:52% !important;
  padding:0 0 42px !important;
}

@media (max-width:980px){
  .mobile-hero-text .hero-title-text{
    color:#fff7ee !important;
    text-shadow:0 10px 28px rgba(0,0,0,.22) !important;
  }

  .mobile-hero-text .hero-desc-text{
    color:rgba(255,255,255,.92) !important;
    text-shadow:0 3px 12px rgba(0,0,0,.22) !important;
  }
}

.nk-subtitle,
#appSubtitle{
  font-size:11px !important;
  line-height:1.35 !important;
  font-weight:700 !important;
}

.upload-card-text strong,
#scanTitle{
  font-size:16px !important;
  line-height:1.12 !important;
  font-weight:800 !important;
}

.upload-card-text span,
#statusText{
  font-size:11px !important;
  line-height:1.35 !important;
  font-weight:700 !important;
}

.gallery-mini-btn{
  font-size:10px !important;
  font-weight:700 !important;
  letter-spacing:0 !important;
}

.panel-title{
  font-size:15px !important;
  line-height:1.2 !important;
}

#categoryGrid .category-btn,
.category-btn{
  font-size:11px !important;
  line-height:1.15 !important;
  font-weight:700 !important;
}

.nk-mini-content h4{
  font-family:"Sora", "Manrope", Arial, sans-serif !important;
  font-size:12px !important;
  font-weight:700 !important;
  color:#2c2118 !important;
}

.nk-mini-content p{
  font-size:10px !important;
  line-height:1.35 !important;
  color:#7b6d60 !important;
}

.user-menu-btn,
.lang-btn{
  font-size:12px !important;
}

#categoryGrid .category-btn,
.category-btn{
  background:rgba(255,255,255,.86) !important;
  color:#5b5046 !important;
  border:1px solid rgba(126,101,76,.10) !important;
  font-weight:700 !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72) !important;
}

#categoryGrid .category-btn:hover,
#categoryGrid .category-btn.active,
.category-btn:hover,
.category-btn.active{
  background:#b66b38 !important;
  color:#fff !important;
  border-color:#b66b38 !important;
}

.lang-btn,
.user-menu-btn{
  color:#6d5b4c !important;
  font-weight:700 !important;
}

.hero-desc-text,
.upload-card-text strong,
#scanTitle,
.upload-card-text span,
#statusText,
.card-body,
.modal-content p{
  font-family:"Manrope", Arial, sans-serif !important;
}

body:not(.show-recipes-page) .hero-content{
  padding:28px 30px 34px !important;
  border-radius:30px !important;
  background:linear-gradient(135deg, rgba(22,18,14,.54), rgba(22,18,14,.18)) !important;
  box-shadow:0 22px 60px rgba(0,0,0,.16) !important;
  backdrop-filter:blur(3px) !important;
  top:61% !important;
}

body:not(.show-recipes-page) .hero-title-text{
  color:#fffaf4 !important;
  text-shadow:0 10px 26px rgba(0,0,0,.44) !important;
}

body:not(.show-recipes-page) .hero-desc-text{
  color:rgba(255,247,239,.96) !important;
  text-shadow:0 6px 18px rgba(0,0,0,.36) !important;
}

@media (max-width:980px){
  .mobile-hero-text{
    left:16px !important;
    right:16px !important;
    bottom:14px !important;
    padding:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    backdrop-filter:none !important;
    color:#fffaf4 !important;
    -webkit-text-fill-color:#fffaf4 !important;
  }

  .mobile-hero-text,
  .mobile-hero-text span,
  .mobile-hero-text h1,
  .mobile-hero-text p{
    color:#fffaf4 !important;
    -webkit-text-fill-color:#fffaf4 !important;
  }

  .mobile-hero-text .hero-badge-text{
    background:linear-gradient(135deg, rgba(214,132,74,.96), rgba(180,102,56,.96)) !important;
    color:#fff8f0 !important;
    -webkit-text-fill-color:#fff8f0 !important;
    box-shadow:0 10px 24px rgba(72,38,18,.24) !important;
    font-size:10px !important;
    padding:6px 10px !important;
    margin-bottom:8px !important;
  }

  .mobile-hero-text .hero-title-text{
    color:#fffaf4 !important;
    -webkit-text-fill-color:#fffaf4 !important;
    text-shadow:0 10px 26px rgba(0,0,0,.42) !important;
    font-size:18px !important;
    line-height:1.08 !important;
    max-width:210px !important;
    letter-spacing:-.02em !important;
  }

  .mobile-hero-text .hero-desc-text{
    color:rgba(255,247,239,.96) !important;
    -webkit-text-fill-color:rgba(255,247,239,.96) !important;
    text-shadow:0 6px 18px rgba(0,0,0,.34) !important;
    margin-top:6px !important;
    font-size:11px !important;
    line-height:1.28 !important;
    max-width:220px !important;
  }

  .mobile-hero-big::after{
    content:"" !important;
    position:absolute !important;
    inset:0 !important;
    background:linear-gradient(180deg, rgba(0,0,0,0) 46%, rgba(18,14,10,.38) 100%) !important;
  }
}

#manualInput{
  background:#fcfaf7 !important;
  border-color:rgba(111,88,63,.10) !important;
  color:#2b2119 !important;
}

.manual button,
#joinNiliBtn,
.hero-primary-btn,
.recipe-next-btn{
  background:linear-gradient(135deg, #b66b38, #8f5128) !important;
}

.nk-brand-card,
.category-panel,
.ad-media-box,
.nk-mini-card,
.manual,
.card,
.modal-content,
.ingredient-modal-content{
  box-shadow:0 16px 34px rgba(67,47,26,.07) !important;
  border-color:rgba(126,101,76,.10) !important;
}

body.show-recipes-page #sidebar,
body.show-recipes-page .sidebar{
  display:none !important;
}

body.show-recipes-page #content,
body.show-recipes-page .content{
  margin-left:0 !important;
  margin-right:0 !important;
  width:100% !important;
}

body.show-recipes-page .floating-lang,
body.show-recipes-page .user-menu,
body.show-recipes-page .lang-wrapper,
body.show-recipes-page .user-menu-btn,
body.show-recipes-page .lang-btn,
body.show-recipes-page #langBtn,
body.show-recipes-page #langOptions,
body.show-recipes-page .user-menu-dropdown{
  display:none !important;
  visibility:hidden !important;
  opacity:0 !important;
  pointer-events:none !important;
}

/* FINAL PREMIUM POPUPS */
.modal,
.ingredient-modal,
.selected-tray-modal,
.signup-invite-modal,
.how-modal{
  background:rgba(24,18,13,.50) !important;
  backdrop-filter:blur(12px) !important;
}

.modal-content,
.ingredient-modal-content,
.selected-tray-box,
.signup-invite-box,
.how-box{
  position:relative !important;
  background:linear-gradient(180deg, rgba(255,252,247,.98), rgba(248,241,231,.98)) !important;
  border:1px solid rgba(151,118,86,.14) !important;
  border-radius:30px !important;
  box-shadow:0 30px 90px rgba(41,28,18,.22) !important;
  overflow:hidden !important;
}

.modal-content::before,
.ingredient-modal-content::before,
.selected-tray-box::before,
.signup-invite-box::before,
.how-box::before{
  content:"" !important;
  position:absolute !important;
  top:0 !important;
  left:0 !important;
  right:0 !important;
  height:88px !important;
  background:linear-gradient(180deg, rgba(235,215,190,.42), rgba(235,215,190,0)) !important;
  pointer-events:none !important;
}

.modal-content{
  overflow-y:auto !important;
  overflow-x:hidden !important;
  max-height:88vh !important;
}

#modalBody{
  position:relative !important;
  z-index:1 !important;
  overflow:visible !important;
}

.selected-tray-header{
  position:relative !important;
  padding:26px 24px 18px !important;
  background:linear-gradient(135deg, #2f3e34, #7a4c2f) !important;
  border-bottom:1px solid rgba(255,255,255,.10) !important;
}

.selected-tray-header h2,
.ingredient-modal-header h2,
.signup-invite-box h2,
.how-box h2,
.modal-content h1,
.modal-content h2{
  color:#241a13 !important;
  letter-spacing:-.03em !important;
}

.selected-tray-header h2{
  color:#fff6eb !important;
}

.selected-tray-header-actions{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
}

.continue-selecting-btn,
.selected-clear-bottom,
.signup-guest-btn,
.creator-auth-tabs button,
.lang-options button,
.user-menu-dropdown a,
.user-menu-dropdown button{
  border:1px solid rgba(140,109,79,.12) !important;
  box-shadow:0 10px 24px rgba(61,42,25,.06) !important;
}

.continue-selecting-btn,
.selected-clear-bottom,
.signup-guest-btn,
.creator-auth-tabs button{
  background:rgba(255,255,255,.78) !important;
  color:#5a4738 !important;
}

#trayGetRecipesBtn,
.signup-main-btn,
.how-start-btn,
.creator-continue-btn{
  background:linear-gradient(135deg, #b66b38, #8f5128) !important;
  color:#fffaf4 !important;
  box-shadow:0 16px 32px rgba(123,74,40,.28) !important;
}

.signup-main-btn,
.signup-guest-btn,
.how-start-btn,
#trayGetRecipesBtn{
  height:52px !important;
  border-radius:18px !important;
  font-weight:800 !important;
  letter-spacing:-.01em !important;
}

.signup-invite-box,
.how-box{
  max-width:460px !important;
  padding:30px 28px 28px !important;
}

.signup-invite-box p,
.how-steps p,
.modal-content p,
.ingredient-modal-content p{
  color:#736456 !important;
  line-height:1.6 !important;
}

.signup-input,
.creator-card input,
#manualInput{
  background:rgba(255,255,255,.82) !important;
  border:1px solid rgba(140,109,79,.14) !important;
  border-radius:16px !important;
  color:#2d2219 !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72) !important;
}

.creator-password-wrap button{
  background:rgba(255,255,255,.82) !important;
  color:#5a4738 !important;
  border:1px solid rgba(140,109,79,.12) !important;
  border-radius:14px !important;
}

.creator-auth-tabs{
  padding:5px !important;
  border-radius:18px !important;
  background:rgba(103,76,50,.08) !important;
}

.creator-auth-tabs button.active,
.creator-tab.active{
  background:linear-gradient(135deg, #fffaf3, #f4e8d7) !important;
  color:#2d2219 !important;
  box-shadow:0 8px 20px rgba(66,45,26,.08) !important;
}

.ingredient-modal-header{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:16px !important;
  margin-bottom:18px !important;
  position:sticky !important;
  top:0 !important;
  z-index:5 !important;
  padding:0 0 14px !important;
  background:linear-gradient(180deg, rgba(253,249,242,.98), rgba(253,249,242,.88)) !important;
  backdrop-filter:blur(8px) !important;
}

.close,
.ingredient-modal-close,
.signup-invite-close,
.how-close,
.selected-tray-close{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:40px !important;
  height:40px !important;
  border:none !important;
  border-radius:14px !important;
  background:rgba(255,251,246,.84) !important;
  color:#6a4a31 !important;
  box-shadow:0 10px 24px rgba(59,38,22,.10) !important;
  font-weight:900 !important;
}

.ingredient-modal-close.done-close{
  transform:rotate(45deg) !important;
  font-size:32px !important;
  line-height:1 !important;
}

.ingredient-modal-header .ingredient-modal-close{
  position:sticky !important;
  top:0 !important;
  right:0 !important;
  z-index:9 !important;
  flex:0 0 40px !important;
}

.modal-content > .close{
  position:sticky !important;
  top:14px !important;
  left:calc(100% - 54px) !important;
  right:auto !important;
  margin:14px 14px 0 auto !important;
  z-index:12 !important;
  font-size:30px !important;
  line-height:1 !important;
}

/* Results page must grow with all recipe rows and keep navigation reachable. */
html:has(body.show-recipes-page),
body.show-recipes-page{
  height:auto !important;
  min-height:100% !important;
  overflow-x:hidden !important;
  overflow-y:auto !important;
}

body.show-recipes-page #content,
body.show-recipes-page .content{
  display:block !important;
  height:auto !important;
  min-height:100vh !important;
  max-height:none !important;
  padding-bottom:40px !important;
  overflow:visible !important;
}

body.show-recipes-page #result,
body.show-recipes-page #result.grid{
  height:auto !important;
  max-height:none !important;
  overflow:visible !important;
  padding-bottom:20px !important;
}

body.show-recipes-page .recipe-result-actions{
  position:relative !important;
  z-index:5 !important;
  display:flex !important;
  width:100% !important;
  min-height:58px !important;
  margin:10px auto 32px !important;
  padding:0 34px !important;
  justify-content:center !important;
  align-items:center !important;
  gap:14px !important;
  visibility:visible !important;
  overflow:visible !important;
}

body.show-recipes-page .recipe-back-btn,
body.show-recipes-page .recipe-next-btn{
  display:inline-flex !important;
  min-width:150px !important;
  min-height:48px !important;
  align-items:center !important;
  justify-content:center !important;
  visibility:visible !important;
}

@media(max-width:980px){
  body.show-recipes-page .recipe-result-actions{
    padding:0 12px !important;
    margin-bottom:24px !important;
  }
}

#selectedTrayItems,
#ingredientModalItems,
#modalBody{
  position:relative !important;
  z-index:1 !important;
}

.ingredient-modal-content{
  width:min(640px, 92vw) !important;
  max-height:78vh !important;
  padding:26px 24px 22px !important;
}

#ingredientModalTitle{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  margin:0 !important;
  color:#2b2118 !important;
  font-size:28px !important;
  line-height:1.05 !important;
}

#ingredientModalItems{
  display:grid !important;
  grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
  gap:12px !important;
  align-content:flex-start !important;
  max-height:calc(78vh - 110px) !important;
  overflow-y:auto !important;
  padding:4px 2px 2px !important;
}

.selected-chip,
.modal-ingredient-btn,
.ingredients span{
  background:rgba(255,255,255,.86) !important;
  border:1px solid rgba(146,114,83,.12) !important;
  color:#493a2f !important;
}

.modal-ingredient-btn.active,
.sub-btn.active{
  background:linear-gradient(135deg, #b66b38, #8f5128) !important;
  color:#fff7ef !important;
  border-color:#a96334 !important;
}

.modal-ingredient-btn{
  min-height:58px !important;
  padding:14px 16px !important;
  border-radius:18px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  text-align:left !important;
  box-shadow:0 10px 24px rgba(67,47,26,.05) !important;
}

.modal-ingredient-btn span{
  display:block !important;
  font-size:14px !important;
  font-weight:700 !important;
  line-height:1.25 !important;
}

.modal-ingredient-btn .ingredient-mark{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 28px !important;
  width:28px !important;
  height:28px !important;
  border-radius:999px !important;
  background:rgba(182,107,56,.10) !important;
  color:#a45e2f !important;
  font-size:16px !important;
  font-weight:800 !important;
  line-height:1 !important;
}

.modal-ingredient-btn.active .ingredient-mark{
  background:rgba(255,247,239,.18) !important;
  color:#fffaf4 !important;
}

.user-menu-dropdown,
.lang-options,
#langOptions{
  background:linear-gradient(180deg, rgba(255,252,247,.98), rgba(248,241,231,.98)) !important;
  border:1px solid rgba(151,118,86,.14) !important;
  border-radius:18px !important;
  box-shadow:0 20px 48px rgba(46,31,19,.18) !important;
  padding:8px !important;
}

.lang-options button,
#langOptions button,
.user-menu-dropdown a,
.user-menu-dropdown button{
  border-radius:12px !important;
  color:#3c2e24 !important;
  font-weight:700 !important;
}

.lang-options button:hover,
#langOptions button:hover,
.user-menu-dropdown a:hover,
.user-menu-dropdown button:hover{
  background:rgba(182,107,56,.10) !important;
}

@media (max-width:980px){
  .selected-tray-modal{
    padding:10px !important;
    align-items:center !important;
  }

  .ingredient-modal{
    padding:12px !important;
  }

  .modal-content,
  .ingredient-modal-content,
  .selected-tray-box,
  .signup-invite-box,
  .how-box{
    width:min(100%, 94vw) !important;
    border-radius:24px !important;
    padding-left:20px !important;
    padding-right:20px !important;
  }

  .selected-tray-box{
    aspect-ratio:auto !important;
    width:min(100%, 92vw) !important;
    max-height:78vh !important;
    min-height:0 !important;
  }

  .modal-content{
    max-height:84vh !important;
    overflow-y:auto !important;
    -webkit-overflow-scrolling:touch !important;
  }

  .ingredient-modal-content{
    width:min(100%, 94vw) !important;
    max-height:80vh !important;
    padding:18px 16px 16px !important;
  }

  .ingredient-modal-header{
    gap:12px !important;
    padding:0 0 12px !important;
  }

  #ingredientModalTitle{
    font-size:22px !important;
    gap:8px !important;
  }

  #ingredientModalItems{
    grid-template-columns:1fr !important;
    gap:10px !important;
    max-height:calc(80vh - 92px) !important;
    padding-right:2px !important;
  }

  .modal-ingredient-btn{
    min-height:52px !important;
    padding:12px 14px !important;
    border-radius:16px !important;
  }

  .modal-ingredient-btn span{
    font-size:13px !important;
  }

  .modal-ingredient-btn .ingredient-mark{
    flex:0 0 24px !important;
    width:24px !important;
    height:24px !important;
    font-size:14px !important;
  }

  .selected-tray-header{
    padding:18px 16px 12px !important;
    gap:10px !important;
    flex-direction:column !important;
    align-items:stretch !important;
  }

  .selected-tray-header h2{
    font-size:18px !important;
    line-height:1.02 !important;
    max-width:190px !important;
  }

  .selected-tray-header-actions{
    width:100% !important;
    justify-content:flex-end !important;
  }

  .continue-selecting-btn{
    max-width:220px !important;
    margin-left:auto !important;
    padding:10px 12px !important;
    font-size:10px !important;
    line-height:1.15 !important;
    border-radius:14px !important;
    text-align:center !important;
  }

  #selectedTrayItems{
    padding:14px 14px 10px !important;
    gap:7px !important;
    min-height:120px !important;
  }

  .selected-chip{
    height:30px !important;
    padding:0 10px !important;
    font-size:11px !important;
  }

  .selected-tray-bottom{
    padding:12px 14px 14px !important;
  }

  .tray-bottom-row{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:10px !important;
    flex-wrap:nowrap !important;
  }

  .tray-confirm{
    flex:1 1 auto !important;
    font-size:12px !important;
    line-height:1.2 !important;
    margin-bottom:0 !important;
  }

  .selected-clear-bottom{
    flex:0 0 auto !important;
    height:30px !important;
    font-size:11px !important;
    margin-bottom:0 !important;
    padding:0 12px !important;
  }

  #trayGetRecipesBtn{
    height:46px !important;
    font-size:15px !important;
    margin-top:12px !important;
  }

  .signup-invite-box,
  .how-box{
    padding-top:26px !important;
    padding-bottom:22px !important;
  }

  .signup-invite-box h2,
  .how-box h2,
  .modal-content h1{
    font-size:24px !important;
  }
}

/* FINAL PREMIUM RECIPE CARDS */
body.show-recipes-page #result,
body.show-recipes-page #result.grid{
  display:grid !important;
  grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
  gap:22px !important;
  padding:24px 34px 10px !important;
}

body.show-recipes-page .recipe-card{
  display:flex !important;
  flex-direction:column !important;
  height:auto !important;
  min-height:392px !important;
  border-radius:30px !important;
  background:linear-gradient(180deg, rgba(255,253,249,.98), rgba(247,240,231,.98)) !important;
  border:1px solid rgba(151,118,86,.12) !important;
  box-shadow:0 20px 46px rgba(54,36,22,.10) !important;
  overflow:hidden !important;
}

body.show-recipes-page .recipe-card:hover{
  transform:translateY(-6px) !important;
  box-shadow:0 28px 56px rgba(54,36,22,.16) !important;
}

body.show-recipes-page .recipe-card-image-wrap{
  position:relative !important;
  overflow:hidden !important;
}

body.show-recipes-page .recipe-card-image-wrap::after{
  content:"" !important;
  position:absolute !important;
  inset:auto 0 0 0 !important;
  height:42% !important;
  background:linear-gradient(180deg, rgba(0,0,0,0), rgba(31,21,14,.16)) !important;
  pointer-events:none !important;
}

body.show-recipes-page .recipe-card-image-wrap img{
  width:100% !important;
  height:228px !important;
  object-fit:cover !important;
  transform:scale(1.01) !important;
}

body.show-recipes-page .favorite-btn{
  position:absolute !important;
  top:14px !important;
  right:14px !important;
  z-index:4 !important;
  width:42px !important;
  height:42px !important;
  border:none !important;
  border-radius:999px !important;
  background:rgba(255,250,244,.88) !important;
  color:#7b4a28 !important;
  box-shadow:0 12px 28px rgba(39,25,15,.16) !important;
  backdrop-filter:blur(8px) !important;
}

body.show-recipes-page .recipe-card-body{
  display:flex !important;
  flex-direction:column !important;
  gap:12px !important;
  padding:18px 18px 20px !important;
}

body.show-recipes-page .recipe-card-meta{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:8px !important;
}

body.show-recipes-page .recipe-meta-pill{
  display:inline-flex !important;
  align-items:center !important;
  min-height:32px !important;
  padding:0 12px !important;
  border-radius:999px !important;
  background:rgba(255,255,255,.82) !important;
  border:1px solid rgba(146,114,83,.12) !important;
  color:#6a5848 !important;
  font-size:12px !important;
  font-weight:700 !important;
  line-height:1 !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72) !important;
}

body.show-recipes-page .recipe-card-body h3{
  color:#241a13 !important;
  font-size:21px !important;
  line-height:1.18 !important;
  font-weight:700 !important;
  letter-spacing:-.03em !important;
  margin:0 !important;
}

body.show-recipes-page .recipe-ingredients{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:8px !important;
  max-height:none !important;
  overflow:visible !important;
}

body.show-recipes-page .recipe-ingredients span{
  display:inline-flex !important;
  align-items:center !important;
  min-height:30px !important;
  padding:0 11px !important;
  border-radius:999px !important;
  background:rgba(255,255,255,.78) !important;
  border:1px solid rgba(146,114,83,.10) !important;
  color:#4f4236 !important;
  font-size:12px !important;
  font-weight:600 !important;
}

body.show-recipes-page .recipe-preview{
  margin:2px 0 0 !important;
  color:#6f6052 !important;
  font-size:13px !important;
  line-height:1.55 !important;
}

.modal-content{
  width:min(760px, 92vw) !important;
  max-height:88vh !important;
  padding:0 !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
}

.recipe-detail-hero{
  position:relative !important;
}

.recipe-detail-hero img{
  width:100% !important;
  height:320px !important;
  max-height:none !important;
  object-fit:cover !important;
  border-radius:0 !important;
  margin:0 !important;
}

.recipe-detail-content{
  padding:22px 24px 26px !important;
}

.recipe-detail-content h1{
  margin:0 0 14px !important;
}

.recipe-detail-meta{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:10px !important;
  margin:0 0 20px !important;
}

.recipe-detail-pill{
  display:inline-flex !important;
  align-items:center !important;
  min-height:36px !important;
  padding:0 14px !important;
  border-radius:999px !important;
  background:rgba(255,255,255,.82) !important;
  border:1px solid rgba(146,114,83,.12) !important;
  color:#5b4a3d !important;
  font-size:13px !important;
  font-weight:700 !important;
}

.recipe-detail-ingredients,
.recipe-detail-steps{
  list-style:none !important;
  margin:0 !important;
  padding:0 !important;
}

.recipe-detail-ingredients{
  display:grid !important;
  grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
  gap:10px !important;
  margin-bottom:24px !important;
}

.recipe-detail-ingredient{
  display:flex !important;
  align-items:flex-start !important;
  gap:10px !important;
  padding:12px 14px !important;
  border-radius:18px !important;
  background:rgba(255,255,255,.72) !important;
  border:1px solid rgba(146,114,83,.10) !important;
  color:#44362b !important;
  font-size:14px !important;
  line-height:1.45 !important;
}

.recipe-detail-bullet{
  flex:0 0 auto !important;
}

.recipe-detail-steps{
  display:flex !important;
  flex-direction:column !important;
  gap:12px !important;
}

.recipe-detail-step{
  display:grid !important;
  grid-template-columns:34px 1fr !important;
  gap:12px !important;
  align-items:flex-start !important;
  padding:14px 16px !important;
  border-radius:20px !important;
  background:rgba(255,255,255,.70) !important;
  border:1px solid rgba(146,114,83,.10) !important;
  color:#4a3a2d !important;
  font-size:14px !important;
  line-height:1.65 !important;
}

.recipe-step-number{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:34px !important;
  height:34px !important;
  border-radius:999px !important;
  background:linear-gradient(135deg, #b66b38, #8f5128) !important;
  color:#fff9f2 !important;
  font-size:13px !important;
  font-weight:800 !important;
  line-height:1 !important;
}

@media (max-width:1200px){
  body.show-recipes-page #result,
  body.show-recipes-page #result.grid{
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
    gap:18px !important;
    padding:18px 20px 6px !important;
  }

  body.show-recipes-page .recipe-card{
    min-height:372px !important;
  }

  body.show-recipes-page .recipe-card-image-wrap img{
    height:210px !important;
  }

  body.show-recipes-page .recipe-card-body h3{
    font-size:19px !important;
  }

  .recipe-detail-ingredients{
    grid-template-columns:1fr !important;
  }
}

@media (max-width:980px){
  body.show-recipes-page #result,
  body.show-recipes-page #result.grid{
    grid-template-columns:1fr !important;
    gap:16px !important;
    padding:14px 0 4px !important;
  }

  body.show-recipes-page .recipe-card{
    min-height:0 !important;
    border-radius:24px !important;
  }

  body.show-recipes-page .recipe-card-image-wrap img{
    height:214px !important;
  }

  body.show-recipes-page .favorite-btn{
    top:12px !important;
    right:12px !important;
    width:38px !important;
    height:38px !important;
  }

  body.show-recipes-page .recipe-card-body{
    padding:16px 16px 18px !important;
    gap:10px !important;
  }

  body.show-recipes-page .recipe-card-body h3{
    font-size:18px !important;
  }

  body.show-recipes-page .recipe-meta-pill{
    min-height:30px !important;
    font-size:11px !important;
    padding:0 10px !important;
  }

  body.show-recipes-page .recipe-ingredients span{
    font-size:11px !important;
  }

  body.show-recipes-page .recipe-preview{
    font-size:12px !important;
    line-height:1.5 !important;
  }

  .modal-content{
    width:min(100%, 94vw) !important;
    max-height:84vh !important;
  }

  .recipe-detail-hero img{
    height:230px !important;
  }

  .recipe-detail-content{
    padding:18px 16px 20px !important;
  }

  .recipe-detail-pill{
    min-height:32px !important;
    font-size:12px !important;
    padding:0 12px !important;
  }

  .recipe-detail-ingredients{
    grid-template-columns:1fr !important;
    gap:8px !important;
  }

  .recipe-detail-ingredient{
    font-size:13px !important;
    padding:11px 12px !important;
  }

  .recipe-detail-step{
    grid-template-columns:30px 1fr !important;
    gap:10px !important;
    padding:12px 12px !important;
    font-size:13px !important;
    line-height:1.58 !important;
  }

  .recipe-step-number{
    width:30px !important;
    height:30px !important;
    font-size:12px !important;
  }
}

/* LAST WORD: desktop recipe studio layout */
@media(min-width:981px){
  html:has(body.show-recipes-page),body.show-recipes-page{height:100vh!important;min-height:100vh!important;overflow:hidden!important}
  body.show-recipes-page #sidebar,body.show-recipes-page .sidebar{display:block!important;position:fixed!important;inset:0 auto 0 0!important;width:250px!important;height:100vh!important;padding:18px!important;overflow:hidden!important;background:linear-gradient(180deg,#172019,#273225)!important}
  body.show-recipes-page #sidebar .sidebar-shell{display:flex!important;height:100%!important;min-height:0!important;gap:18px!important}
  body.show-recipes-page #sidebar .sidebar-main,body.show-recipes-page #sidebar .mobile-only,body.show-recipes-page #sidebar .join-area,body.show-recipes-page #sidebar .site-footer-note{display:none!important}
  body.show-recipes-page #sidebar .nk-brand-card{display:flex!important;min-height:94px!important;padding:10px!important;border-radius:24px!important;background:rgba(255,250,241,.96)!important}
  body.show-recipes-page .recipe-sidebar-menu{display:flex!important;visibility:visible!important;opacity:1!important;flex:1!important;min-height:0!important;flex-direction:column!important;color:#fffaf2!important}
  body.show-recipes-page .recipe-sidebar-menu *{visibility:visible!important;opacity:1!important}
  body.show-recipes-page #content,body.show-recipes-page .content{display:flex!important;flex-direction:column!important;width:calc(100% - 250px)!important;height:100vh!important;min-height:0!important;max-height:100vh!important;margin:0 0 0 250px!important;padding:14px 18px 12px!important;overflow:hidden!important}
  body.show-recipes-page #result,body.show-recipes-page #result.grid{display:grid!important;flex:1 1 auto!important;min-height:0!important;height:auto!important;max-height:none!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;gap:14px!important;padding:0!important;overflow:hidden!important}
  body.show-recipes-page .recipe-card{height:100%!important;min-height:0!important;border-radius:20px!important;overflow:hidden!important}
  body.show-recipes-page .recipe-card-image-wrap{flex:0 0 clamp(108px,15vh,150px)!important;min-height:0!important;overflow:hidden!important}
  body.show-recipes-page .recipe-card-image-wrap img{height:100%!important}
  body.show-recipes-page .recipe-card-body{min-height:0!important;padding:11px 13px 12px!important;gap:7px!important;overflow:hidden!important}
  body.show-recipes-page .recipe-card-body h3{display:-webkit-box!important;margin:0!important;font-size:14px!important;line-height:1.18!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important}
  body.show-recipes-page .recipe-meta-pill{min-height:24px!important;padding:5px 7px!important;font-size:9px!important}
  body.show-recipes-page .recipe-ingredients{gap:4px!important;max-height:25px!important;overflow:hidden!important}
  body.show-recipes-page .recipe-ingredients span{min-height:22px!important;padding:5px 7px!important;font-size:8px!important}
  body.show-recipes-page .recipe-preview{display:-webkit-box!important;margin:0!important;font-size:9px!important;line-height:1.35!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important}
  body.show-recipes-page .recipe-result-actions{display:flex!important;flex:0 0 50px!important;min-height:50px!important;margin:4px 0 0!important;padding:0!important;overflow:visible!important}
  body.show-recipes-page .recipe-back-btn,body.show-recipes-page .recipe-next-btn{display:inline-flex!important;min-width:132px!important;min-height:38px!important;padding:9px 18px!important;font-size:11px!important}
}

/* RESTORE: classic full-width recipe results */
@media(min-width:981px){
  html:has(body.show-recipes-page),
  body.show-recipes-page{
    height:auto !important;
    min-height:100% !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
    background:#f4eee5 !important;
  }

  body.show-recipes-page #sidebar,
  body.show-recipes-page .sidebar,
  body.show-recipes-page .recipe-sidebar-menu{
    display:none !important;
    visibility:hidden !important;
    opacity:0 !important;
  }

  body.show-recipes-page #content,
  body.show-recipes-page .content{
    display:block !important;
    width:100% !important;
    height:auto !important;
    min-height:100vh !important;
    max-height:none !important;
    margin:0 !important;
    padding:28px 34px 34px !important;
    overflow:visible !important;
  }

  body.show-recipes-page #result,
  body.show-recipes-page #result.grid{
    display:grid !important;
    width:100% !important;
    height:auto !important;
    max-height:none !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    grid-template-rows:none !important;
    gap:24px !important;
    padding:0 0 20px !important;
    overflow:visible !important;
  }

  body.show-recipes-page .recipe-card{
    height:auto !important;
    min-height:430px !important;
    border-radius:28px !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-card-image-wrap{
    height:220px !important;
    min-height:220px !important;
    flex:0 0 220px !important;
  }

  body.show-recipes-page .recipe-card-image-wrap img{
    height:220px !important;
  }

  body.show-recipes-page .recipe-card-body{
    padding:17px 19px 20px !important;
    gap:11px !important;
    overflow:visible !important;
  }

  body.show-recipes-page .recipe-card-body h3{
    display:block !important;
    margin:0 !important;
    font-size:20px !important;
    line-height:1.24 !important;
    overflow:visible !important;
  }

  body.show-recipes-page .recipe-meta-pill{
    min-height:32px !important;
    padding:7px 11px !important;
    font-size:12px !important;
  }

  body.show-recipes-page .recipe-ingredients{
    max-height:none !important;
    gap:7px !important;
    overflow:visible !important;
  }

  body.show-recipes-page .recipe-ingredients span{
    min-height:30px !important;
    padding:7px 10px !important;
    font-size:11px !important;
  }

  body.show-recipes-page .recipe-preview{
    display:block !important;
    margin:0 !important;
    font-size:13px !important;
    line-height:1.55 !important;
    overflow:visible !important;
  }

  body.show-recipes-page .recipe-result-actions{
    display:flex !important;
    width:100% !important;
    min-height:58px !important;
    margin:8px auto 24px !important;
    padding:0 !important;
  }
}

/* FINAL WEB CATEGORY POPUP - same visual language as mobile */
@media(min-width:981px){
  .ingredient-modal{
    padding:28px !important;
    align-items:center !important;
    justify-content:center !important;
    background:rgba(29,23,18,.58) !important;
    backdrop-filter:blur(12px) !important;
  }

  .ingredient-modal-content{
    display:flex !important;
    flex-direction:column !important;
    width:min(660px,calc(100vw - 64px)) !important;
    height:auto !important;
    max-height:82vh !important;
    padding:0 !important;
    overflow:hidden !important;
    border:1px solid rgba(150,116,82,.18) !important;
    border-radius:28px !important;
    background:linear-gradient(180deg,#fffdf9 0%,#f5ecdf 100%) !important;
    box-shadow:0 34px 90px rgba(38,25,15,.30) !important;
  }

  .ingredient-modal-content::before{
    display:none !important;
  }

  .ingredient-modal-header{
    position:relative !important;
    top:auto !important;
    z-index:20 !important;
    flex:0 0 auto !important;
    min-height:86px !important;
    margin:0 !important;
    padding:22px 24px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:18px !important;
    background:linear-gradient(135deg,#2f3e34 0%,#6f4932 100%) !important;
    border-bottom:1px solid rgba(255,255,255,.12) !important;
  }

  .ingredient-modal-header h2,
  #ingredientModalTitle{
    margin:0 !important;
    color:#fffaf2 !important;
    font-family:"Sora",sans-serif !important;
    font-size:25px !important;
    font-weight:700 !important;
    line-height:1.15 !important;
  }

  .ingredient-modal-header .ingredient-modal-close{
    position:relative !important;
    inset:auto !important;
    flex:0 0 42px !important;
    width:42px !important;
    height:42px !important;
    margin:0 !important;
    border:1px solid rgba(255,255,255,.22) !important;
    border-radius:14px !important;
    background:rgba(255,255,255,.12) !important;
    color:#fff !important;
    font-size:32px !important;
    font-weight:900 !important;
    box-shadow:none !important;
  }

  #ingredientModalItems{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:11px !important;
    width:100% !important;
    min-height:0 !important;
    max-height:calc(82vh - 86px) !important;
    margin:0 !important;
    padding:20px 22px 24px !important;
    align-content:start !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
    scrollbar-width:thin !important;
    scrollbar-color:#b9875f transparent !important;
  }

  .modal-ingredient-btn{
    width:100% !important;
    min-height:56px !important;
    margin:0 !important;
    padding:12px 14px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:12px !important;
    border:1px solid rgba(146,114,83,.14) !important;
    border-radius:16px !important;
    background:rgba(255,255,255,.86) !important;
    color:#493a2f !important;
    box-shadow:0 8px 20px rgba(67,47,26,.055) !important;
    text-align:left !important;
  }

  .modal-ingredient-btn span{
    font-family:"Manrope",sans-serif !important;
    font-size:14px !important;
    font-weight:700 !important;
    line-height:1.25 !important;
  }

  .modal-ingredient-btn .ingredient-mark{
    display:inline-flex !important;
    flex:0 0 28px !important;
    width:28px !important;
    height:28px !important;
    align-items:center !important;
    justify-content:center !important;
    border-radius:9px !important;
    background:#f1e4d5 !important;
    color:#9a5e34 !important;
    font-size:16px !important;
    font-weight:900 !important;
  }

  .modal-ingredient-btn.active{
    border-color:#a96334 !important;
    background:linear-gradient(135deg,#b66b38,#8f5128) !important;
    color:#fffaf3 !important;
  }

  .modal-ingredient-btn.active .ingredient-mark{
    background:rgba(255,255,255,.18) !important;
    color:#fff !important;
  }
}

/* FINAL PREMIUM SIX-RECIPE CARDS */
@media(min-width:981px){
  body.show-recipes-page #result,
  body.show-recipes-page #result.grid{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:26px !important;
    padding:4px 8px 24px !important;
  }

  body.show-recipes-page .recipe-card{
    position:relative !important;
    min-height:448px !important;
    isolation:isolate !important;
    border:1px solid rgba(126,91,55,.14) !important;
    border-radius:30px !important;
    background:linear-gradient(160deg,#fffefa 0%,#f7eee2 100%) !important;
    box-shadow:0 18px 46px rgba(58,39,22,.11),inset 0 1px 0 rgba(255,255,255,.9) !important;
    overflow:hidden !important;
    transition:transform .28s ease,box-shadow .28s ease !important;
  }

  body.show-recipes-page .recipe-card::after{
    content:"" !important;
    position:absolute !important;
    inset:auto 22px 0 !important;
    height:3px !important;
    border-radius:999px 999px 0 0 !important;
    background:linear-gradient(90deg,transparent,#c38b4c,transparent) !important;
    opacity:.75 !important;
    z-index:3 !important;
  }

  body.show-recipes-page .recipe-card:hover{
    transform:translateY(-7px) !important;
    box-shadow:0 28px 64px rgba(58,39,22,.17),inset 0 1px 0 rgba(255,255,255,.95) !important;
  }

  body.show-recipes-page .recipe-card-image-wrap{
    position:relative !important;
    height:230px !important;
    min-height:230px !important;
    flex:0 0 230px !important;
    margin:0 !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-card-image-wrap::after{
    content:"" !important;
    position:absolute !important;
    inset:0 !important;
    height:auto !important;
    background:linear-gradient(180deg,rgba(20,15,10,0) 48%,rgba(25,18,12,.48) 100%) !important;
    pointer-events:none !important;
  }

  body.show-recipes-page .recipe-card-image-wrap img{
    width:100% !important;
    height:230px !important;
    object-fit:cover !important;
    transform:scale(1.01) !important;
    transition:transform .5s ease !important;
  }

  body.show-recipes-page .recipe-card:hover .recipe-card-image-wrap img{
    transform:scale(1.055) !important;
  }

  body.show-recipes-page .favorite-btn{
    top:16px !important;
    right:16px !important;
    width:44px !important;
    height:44px !important;
    border:1px solid rgba(255,255,255,.50) !important;
    border-radius:15px !important;
    background:rgba(255,252,246,.90) !important;
    color:#6f4932 !important;
    box-shadow:0 10px 26px rgba(31,21,13,.18) !important;
    backdrop-filter:blur(10px) !important;
  }

  body.show-recipes-page .recipe-card-body{
    position:relative !important;
    z-index:2 !important;
    padding:19px 21px 22px !important;
    display:flex !important;
    flex-direction:column !important;
    gap:12px !important;
    background:transparent !important;
  }

  body.show-recipes-page .recipe-card-meta{
    display:flex !important;
    flex-wrap:wrap !important;
    gap:7px !important;
    margin-top:-35px !important;
    padding-right:48px !important;
    position:relative !important;
    z-index:4 !important;
  }

  body.show-recipes-page .recipe-meta-pill{
    min-height:29px !important;
    padding:7px 10px !important;
    border:1px solid rgba(255,255,255,.46) !important;
    border-radius:999px !important;
    background:rgba(255,250,242,.94) !important;
    color:#594434 !important;
    font-family:"Manrope",sans-serif !important;
    font-size:10px !important;
    font-weight:800 !important;
    box-shadow:0 8px 20px rgba(42,29,18,.13) !important;
    backdrop-filter:blur(8px) !important;
  }

  body.show-recipes-page .recipe-card-body h3{
    margin:4px 0 0 !important;
    color:#25342a !important;
    font-family:"Sora",sans-serif !important;
    font-size:21px !important;
    font-weight:700 !important;
    line-height:1.2 !important;
    letter-spacing:-.025em !important;
  }

  body.show-recipes-page .recipe-ingredients{
    display:flex !important;
    flex-wrap:wrap !important;
    gap:7px !important;
    max-height:68px !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-ingredients span{
    min-height:28px !important;
    padding:7px 10px !important;
    border:1px solid rgba(122,91,61,.10) !important;
    border-radius:10px !important;
    background:rgba(255,255,255,.72) !important;
    color:#665344 !important;
    font-family:"Manrope",sans-serif !important;
    font-size:10px !important;
    font-weight:700 !important;
  }

  body.show-recipes-page .recipe-preview{
    display:-webkit-box !important;
    margin:0 !important;
    color:#756557 !important;
    font-family:"Manrope",sans-serif !important;
    font-size:12px !important;
    line-height:1.55 !important;
    -webkit-line-clamp:2 !important;
    -webkit-box-orient:vertical !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-result-actions{
    margin:4px auto 28px !important;
  }

  body.show-recipes-page .recipe-back-btn,
  body.show-recipes-page .recipe-next-btn{
    min-width:156px !important;
    min-height:46px !important;
    border-radius:999px !important;
    font-family:"Manrope",sans-serif !important;
    font-size:12px !important;
    font-weight:800 !important;
    box-shadow:0 12px 26px rgba(73,48,27,.10) !important;
  }
}

/* FINAL DESKTOP RECIPE VIEWPORT: 3x2, no page scroll */
@media(min-width:981px){
  html:has(body.show-recipes-page),
  body.show-recipes-page{
    width:100% !important;
    height:100vh !important;
    min-height:100vh !important;
    max-height:100vh !important;
    overflow:hidden !important;
  }

  body.show-recipes-page #content,
  body.show-recipes-page .content{
    display:flex !important;
    flex-direction:column !important;
    width:100% !important;
    height:100vh !important;
    min-height:0 !important;
    max-height:100vh !important;
    margin:0 !important;
    padding:14px 26px 10px !important;
    overflow:hidden !important;
  }

  body.show-recipes-page #result,
  body.show-recipes-page #result.grid{
    display:grid !important;
    flex:1 1 auto !important;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    grid-template-rows:repeat(2,minmax(0,1fr)) !important;
    gap:14px 20px !important;
    padding:0 !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-card{
    height:100% !important;
    min-height:0 !important;
    max-height:none !important;
    border-radius:24px !important;
  }

  body.show-recipes-page .recipe-card-image-wrap{
    height:clamp(120px,18vh,180px) !important;
    min-height:clamp(120px,18vh,180px) !important;
    flex:0 0 clamp(120px,18vh,180px) !important;
  }

  body.show-recipes-page .recipe-card-image-wrap img{
    height:100% !important;
  }

  body.show-recipes-page .recipe-card-body{
    flex:1 1 auto !important;
    min-height:0 !important;
    padding:13px 17px 14px !important;
    gap:8px !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-card-meta{
    margin-top:-30px !important;
    gap:5px !important;
  }

  body.show-recipes-page .recipe-meta-pill{
    min-height:26px !important;
    padding:6px 8px !important;
    font-size:9px !important;
  }

  body.show-recipes-page .recipe-card-body h3{
    display:-webkit-box !important;
    margin:2px 0 0 !important;
    font-size:clamp(15px,1.05vw,19px) !important;
    line-height:1.18 !important;
    -webkit-line-clamp:2 !important;
    -webkit-box-orient:vertical !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-ingredients{
    max-height:31px !important;
    gap:5px !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-ingredients span{
    min-height:25px !important;
    padding:6px 8px !important;
    font-size:9px !important;
  }

  body.show-recipes-page .recipe-preview{
    display:-webkit-box !important;
    font-size:10px !important;
    line-height:1.4 !important;
    -webkit-line-clamp:2 !important;
    -webkit-box-orient:vertical !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-result-actions{
    display:flex !important;
    flex:0 0 52px !important;
    width:100% !important;
    height:52px !important;
    min-height:52px !important;
    margin:4px 0 0 !important;
    padding:0 !important;
    align-items:center !important;
    justify-content:center !important;
    gap:14px !important;
    overflow:visible !important;
  }

  body.show-recipes-page .recipe-back-btn,
  body.show-recipes-page .recipe-next-btn{
    min-width:146px !important;
    min-height:40px !important;
    padding:9px 18px !important;
  }
}

/* POLISHED 3x2 DESKTOP SPACING */
@media(min-width:981px){
  body.show-recipes-page #content,
  body.show-recipes-page .content{
    padding:20px 30px 12px !important;
  }

  body.show-recipes-page #result,
  body.show-recipes-page #result.grid{
    width:min(100%,1720px) !important;
    margin:0 auto !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    grid-template-rows:repeat(2,minmax(0,clamp(300px,calc((100vh - 140px)/2),365px))) !important;
    gap:22px 26px !important;
    align-content:center !important;
  }

  body.show-recipes-page .recipe-card{
    height:100% !important;
    min-height:0 !important;
    border-radius:26px !important;
    border:1px solid rgba(130,94,57,.18) !important;
    box-shadow:0 14px 34px rgba(54,37,22,.12),inset 0 1px 0 rgba(255,255,255,.9) !important;
  }

  body.show-recipes-page .recipe-card-image-wrap{
    height:clamp(135px,18vh,175px) !important;
    min-height:clamp(135px,18vh,175px) !important;
    flex-basis:clamp(135px,18vh,175px) !important;
  }

  body.show-recipes-page .recipe-card-body{
    padding:15px 18px 17px !important;
    gap:9px !important;
  }

  body.show-recipes-page .recipe-card-meta{
    margin-top:-31px !important;
    gap:6px !important;
  }

  body.show-recipes-page .recipe-meta-pill{
    min-height:28px !important;
    padding:7px 9px !important;
    font-size:10px !important;
  }

  body.show-recipes-page .recipe-card-body h3{
    margin-top:3px !important;
    font-size:clamp(17px,1.15vw,21px) !important;
    line-height:1.2 !important;
  }

  body.show-recipes-page .recipe-ingredients{
    max-height:34px !important;
    gap:6px !important;
  }

  body.show-recipes-page .recipe-ingredients span{
    min-height:28px !important;
    padding:7px 9px !important;
    font-size:10px !important;
  }

  body.show-recipes-page .recipe-preview{
    font-size:11px !important;
    line-height:1.45 !important;
  }

  body.show-recipes-page .recipe-result-actions{
    flex-basis:48px !important;
    height:48px !important;
    min-height:48px !important;
    margin-top:8px !important;
  }
}

/* SIGNATURE RECIPE GALLERY */
.recipe-page-header{
  display:none;
}

/* FIX: recipe information must sit fully below the image */
@media(min-width:981px){
  body.show-recipes-page .recipe-card{
    display:flex !important;
    flex-direction:column !important;
    padding:9px !important;
  }

  body.show-recipes-page .recipe-card-image-wrap{
    position:relative !important;
    z-index:1 !important;
    width:100% !important;
    height:clamp(112px,15vh,145px) !important;
    min-height:clamp(112px,15vh,145px) !important;
    flex:0 0 clamp(112px,15vh,145px) !important;
    margin:0 !important;
  }

  body.show-recipes-page .recipe-card-body{
    position:relative !important;
    z-index:5 !important;
    flex:1 1 auto !important;
    min-height:0 !important;
    width:100% !important;
    margin:0 !important;
    padding:13px 12px 12px !important;
    display:flex !important;
    flex-direction:column !important;
    gap:8px !important;
    overflow:hidden !important;
    background:linear-gradient(180deg,rgba(255,254,250,.98),rgba(248,239,227,.98)) !important;
    border-radius:0 0 19px 19px !important;
  }

  body.show-recipes-page .recipe-card-meta{
    position:relative !important;
    z-index:1 !important;
    width:100% !important;
    margin:0 !important;
    padding:0 !important;
    display:flex !important;
    flex-wrap:wrap !important;
    gap:5px !important;
  }

  body.show-recipes-page .recipe-meta-pill{
    min-height:25px !important;
    padding:6px 8px !important;
    border-color:rgba(129,92,57,.12) !important;
    background:#f1e5d6 !important;
    color:#5a4737 !important;
    box-shadow:none !important;
    backdrop-filter:none !important;
  }

  body.show-recipes-page .recipe-card-body h3{
    position:relative !important;
    z-index:1 !important;
    margin:1px 0 0 !important;
    color:#26372c !important;
  }

  body.show-recipes-page .recipe-ingredients,
  body.show-recipes-page .recipe-preview{
    position:relative !important;
    z-index:1 !important;
  }
}

/* SQUARE RECIPE THUMBNAIL STAGE */
@media(min-width:981px){
  body.show-recipes-page .recipe-card-image-wrap{
    width:100% !important;
    height:clamp(118px,15vh,150px) !important;
    min-height:clamp(118px,15vh,150px) !important;
    flex-basis:clamp(118px,15vh,150px) !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    border-radius:20px !important;
    background:
      radial-gradient(circle at 50% 45%,rgba(199,151,96,.18),transparent 52%),
      linear-gradient(135deg,#e9ddcc,#d8c6ae) !important;
  }

  body.show-recipes-page .recipe-card-image-wrap img{
    width:clamp(118px,15vh,150px) !important;
    height:clamp(118px,15vh,150px) !important;
    min-width:clamp(118px,15vh,150px) !important;
    object-fit:cover !important;
    aspect-ratio:1/1 !important;
    border-radius:18px !important;
    box-shadow:0 12px 28px rgba(45,30,18,.20) !important;
  }

  body.show-recipes-page .recipe-card-image-wrap::after{
    display:none !important;
  }
}

/* FINAL CARD ORDER: title, square image, details */
@media(min-width:981px){
  body.show-recipes-page #result,
  body.show-recipes-page #result.grid{
    width:min(100%,1480px) !important;
    gap:16px 22px !important;
  }

  body.show-recipes-page .recipe-card{
    padding:12px !important;
    gap:9px !important;
  }

  body.show-recipes-page .recipe-card-title{
    order:1 !important;
    display:-webkit-box !important;
    min-height:40px !important;
    margin:0 !important;
    padding:1px 44px 0 3px !important;
    color:#26372c !important;
    font-family:"Sora",sans-serif !important;
    font-size:17px !important;
    font-weight:700 !important;
    line-height:1.2 !important;
    letter-spacing:-.02em !important;
    -webkit-line-clamp:2 !important;
    -webkit-box-orient:vertical !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-card-image-wrap{
    order:2 !important;
    margin:0 !important;
  }

  body.show-recipes-page .favorite-btn{
    top:12px !important;
    right:12px !important;
  }

  body.show-recipes-page .recipe-card-body{
    order:3 !important;
    padding:0 3px 3px !important;
    gap:7px !important;
    background:transparent !important;
    border-radius:0 !important;
  }

  body.show-recipes-page .recipe-card-meta{
    margin:0 !important;
  }

  body.show-recipes-page .recipe-card-body > h3{
    display:none !important;
  }
}

/* CONSISTENT DESKTOP SIDEBAR + COLLISION-FREE RECIPE CARDS */
@media(min-width:981px){
  body.show-recipes-page #sidebar,
  body.show-recipes-page .sidebar{
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    position:fixed !important;
    top:0 !important;
    left:0 !important;
    bottom:0 !important;
    width:360px !important;
    height:100vh !important;
    padding:16px !important;
    overflow:hidden !important;
    background:var(--page-bg) !important;
    border-right:1px solid rgba(126,101,76,.10) !important;
    box-shadow:18px 0 48px rgba(67,47,26,.08) !important;
  }

  body.show-recipes-page #sidebar .sidebar-shell,
  body.show-recipes-page #sidebar .sidebar-main{
    display:flex !important;
    visibility:visible !important;
    opacity:1 !important;
  }

  body.show-recipes-page #sidebar .sidebar-shell{
    height:100% !important;
    min-height:0 !important;
    flex-direction:column !important;
    gap:8px !important;
  }

  body.show-recipes-page #sidebar .sidebar-main{
    flex:1 1 auto !important;
    min-height:0 !important;
    flex-direction:column !important;
    gap:8px !important;
    overflow:hidden !important;
  }

  body.show-recipes-page #sidebar .nk-brand-card,
  body.show-recipes-page #sidebar .join-area,
  body.show-recipes-page #sidebar .site-footer-note{
    display:flex !important;
    visibility:visible !important;
    opacity:1 !important;
  }

  body.show-recipes-page #sidebar .mobile-only{
    display:none !important;
  }

  body.show-recipes-page #content,
  body.show-recipes-page .content{
    width:calc(100% - 360px) !important;
    margin-left:360px !important;
    margin-right:0 !important;
    padding:14px 24px 10px !important;
  }

  body.show-recipes-page .floating-lang{
    display:flex !important;
    visibility:visible !important;
    opacity:1 !important;
    pointer-events:auto !important;
  }

  body.show-recipes-page .user-menu,
  body.show-recipes-page .lang-wrapper,
  body.show-recipes-page .user-menu-btn,
  body.show-recipes-page .lang-btn,
  body.show-recipes-page #langBtn{
    display:inline-flex !important;
    visibility:visible !important;
    opacity:1 !important;
    pointer-events:auto !important;
  }

  body.show-recipes-page #result,
  body.show-recipes-page #result.grid{
    width:100% !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:14px 18px !important;
  }

  body.show-recipes-page .recipe-card{
    display:grid !important;
    grid-template-columns:1fr !important;
    grid-template-rows:auto clamp(105px,14vh,135px) minmax(0,1fr) !important;
    align-items:stretch !important;
    gap:7px !important;
    padding:10px !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-card-title{
    grid-row:1 !important;
    width:100% !important;
    min-height:38px !important;
    margin:0 !important;
    padding:2px 40px 0 !important;
    text-align:center !important;
    font-size:clamp(14px,.95vw,17px) !important;
    line-height:1.18 !important;
  }

  body.show-recipes-page .recipe-card-image-wrap{
    grid-row:2 !important;
    position:relative !important;
    z-index:1 !important;
    width:100% !important;
    height:clamp(105px,14vh,135px) !important;
    min-height:clamp(105px,14vh,135px) !important;
    margin:0 !important;
  }

  body.show-recipes-page .recipe-card-image-wrap img{
    width:clamp(105px,14vh,135px) !important;
    height:clamp(105px,14vh,135px) !important;
  }

  body.show-recipes-page .recipe-card-body{
    grid-row:3 !important;
    position:relative !important;
    z-index:2 !important;
    min-height:0 !important;
    margin:0 !important;
    padding:2px 3px 3px !important;
    display:flex !important;
    flex-direction:column !important;
    gap:6px !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-card-meta,
  body.show-recipes-page .recipe-ingredients,
  body.show-recipes-page .recipe-preview{
    position:static !important;
    z-index:auto !important;
    margin:0 !important;
    transform:none !important;
  }

  body.show-recipes-page .recipe-card-meta{
    justify-content:center !important;
  }

  body.show-recipes-page .recipe-ingredients{
    justify-content:center !important;
  }

  body.show-recipes-page .recipe-preview{
    text-align:center !important;
  }
}

.recipe-detail-sticky h1,
.recipe-detail-content h1{
  text-align:center !important;
}

/* Recipe detail keeps title and image fixed; only details scroll. */
.modal-content{
  width:min(620px,92vw) !important;
  height:min(88vh,820px) !important;
  max-height:88vh !important;
  padding:0 !important;
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
}

.modal-content > .close{
  position:absolute !important;
  top:14px !important;
  right:14px !important;
  left:auto !important;
  margin:0 !important;
  z-index:30 !important;
}

#modalBody{
  width:100% !important;
  height:100% !important;
  min-height:0 !important;
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
}

.recipe-detail-sticky{
  position:relative !important;
  z-index:5 !important;
  flex:0 0 auto !important;
  padding:20px 24px 14px !important;
  background:linear-gradient(180deg,#fffdf8,#f1e5d5) !important;
  border-bottom:1px solid rgba(128,91,56,.12) !important;
}

.recipe-detail-sticky h1{
  margin:0 48px 14px 0 !important;
  color:#26372c !important;
  font-family:"Sora",sans-serif !important;
  font-size:24px !important;
  font-weight:700 !important;
  line-height:1.18 !important;
  letter-spacing:-.025em !important;
}

.recipe-detail-sticky .recipe-detail-hero{
  width:clamp(180px,27vh,250px) !important;
  height:clamp(180px,27vh,250px) !important;
  margin:0 auto !important;
  border-radius:22px !important;
  overflow:hidden !important;
  box-shadow:0 16px 34px rgba(51,34,20,.18) !important;
}

.recipe-detail-sticky .recipe-detail-hero img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  aspect-ratio:1/1 !important;
  border-radius:22px !important;
  margin:0 !important;
}

.recipe-detail-content{
  flex:1 1 auto !important;
  min-height:0 !important;
  padding:16px 22px 24px !important;
  overflow-x:hidden !important;
  overflow-y:auto !important;
  scrollbar-width:thin !important;
  scrollbar-color:#b57b4b transparent !important;
}

.recipe-detail-content h2{
  margin:18px 0 10px !important;
}

.recipe-detail-ingredients,
.recipe-detail-steps{
  gap:8px !important;
}

.recipe-detail-ingredient,
.recipe-detail-step{
  line-height:1.45 !important;
}

@media(max-width:980px){
  .modal-content{
    width:min(94vw,560px) !important;
    height:86vh !important;
    max-height:86vh !important;
  }

  .recipe-detail-sticky{
    padding:17px 16px 12px !important;
  }

  .recipe-detail-sticky h1{
    margin-right:44px !important;
    font-size:20px !important;
  }

  .recipe-detail-sticky .recipe-detail-hero{
    width:clamp(150px,25vh,210px) !important;
    height:clamp(150px,25vh,210px) !important;
  }

  .recipe-detail-content{
    padding:14px 16px 20px !important;
  }
}

@media(min-width:981px){
  body.show-recipes-page #content,
  body.show-recipes-page .content{
    padding:16px 34px 10px !important;
    background:
      radial-gradient(circle at 8% 4%,rgba(192,139,78,.12),transparent 24%),
      radial-gradient(circle at 92% 96%,rgba(54,78,59,.09),transparent 28%),
      linear-gradient(135deg,#f6f0e7 0%,#eee7dc 100%) !important;
  }

  body.show-recipes-page .recipe-page-header{
    display:flex !important;
    flex:0 0 68px !important;
    width:min(100%,1660px) !important;
    min-height:68px !important;
    margin:0 auto 12px !important;
    padding:0 4px !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:24px !important;
  }

  .recipe-page-heading{
    min-width:0 !important;
  }

  .recipe-page-heading > span{
    display:block !important;
    margin-bottom:5px !important;
    color:#a66a38 !important;
    font-family:"Manrope",sans-serif !important;
    font-size:10px !important;
    font-weight:800 !important;
    line-height:1 !important;
    letter-spacing:.18em !important;
  }

  .recipe-page-heading h2{
    margin:0 !important;
    color:#25352b !important;
    font-family:"Playfair Display",Georgia,serif !important;
    font-size:30px !important;
    font-weight:700 !important;
    line-height:1 !important;
    letter-spacing:-.025em !important;
  }

  .recipe-page-summary{
    display:inline-flex !important;
    min-height:42px !important;
    padding:0 16px !important;
    align-items:center !important;
    gap:9px !important;
    border:1px solid rgba(139,98,58,.14) !important;
    border-radius:999px !important;
    background:rgba(255,252,246,.68) !important;
    color:#655143 !important;
    font-family:"Manrope",sans-serif !important;
    font-size:11px !important;
    font-weight:700 !important;
    box-shadow:0 10px 28px rgba(61,43,27,.07) !important;
    backdrop-filter:blur(10px) !important;
  }

  .recipe-summary-mark{
    color:#bb7a3e !important;
    font-size:15px !important;
  }

  body.show-recipes-page #result,
  body.show-recipes-page #result.grid{
    width:min(100%,1660px) !important;
    margin:0 auto !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    grid-template-rows:repeat(2,minmax(0,1fr)) !important;
    gap:18px 24px !important;
    align-content:stretch !important;
  }

  body.show-recipes-page .recipe-card{
    position:relative !important;
    height:100% !important;
    min-height:0 !important;
    padding:9px 9px 0 !important;
    border:1px solid rgba(113,78,44,.14) !important;
    border-radius:28px !important;
    background:linear-gradient(155deg,rgba(255,254,250,.98),rgba(246,236,223,.98)) !important;
    box-shadow:0 16px 38px rgba(57,39,22,.12),inset 0 1px 0 #fff !important;
  }

  body.show-recipes-page .recipe-card::before{
    content:"" !important;
    position:absolute !important;
    top:42px !important;
    bottom:42px !important;
    left:0 !important;
    width:3px !important;
    border-radius:0 999px 999px 0 !important;
    background:linear-gradient(180deg,#d6a45d,#80512f) !important;
    opacity:.75 !important;
  }

  body.show-recipes-page .recipe-card-image-wrap{
    width:100% !important;
    height:clamp(118px,16vh,158px) !important;
    min-height:clamp(118px,16vh,158px) !important;
    flex:0 0 clamp(118px,16vh,158px) !important;
    border-radius:20px !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-card-image-wrap img{
    border-radius:20px !important;
  }

  body.show-recipes-page .favorite-btn{
    top:18px !important;
    right:18px !important;
    width:38px !important;
    height:38px !important;
    border-radius:13px !important;
  }

  body.show-recipes-page .recipe-card-body{
    padding:13px 15px 15px !important;
    gap:8px !important;
  }

  body.show-recipes-page .recipe-card-meta{
    margin-top:-29px !important;
    padding-right:34px !important;
    gap:5px !important;
  }

  body.show-recipes-page .recipe-meta-pill{
    min-height:26px !important;
    padding:6px 8px !important;
    font-size:9px !important;
  }

  body.show-recipes-page .recipe-card-body h3{
    margin:3px 0 0 !important;
    color:#26372c !important;
    font-family:"Sora",sans-serif !important;
    font-size:clamp(16px,1.02vw,19px) !important;
    font-weight:700 !important;
    line-height:1.2 !important;
  }

  body.show-recipes-page .recipe-ingredients{
    max-height:30px !important;
  }

  body.show-recipes-page .recipe-ingredients span{
    min-height:25px !important;
    padding:6px 8px !important;
    border-radius:9px !important;
    font-size:9px !important;
  }

  body.show-recipes-page .recipe-preview{
    -webkit-line-clamp:1 !important;
    color:#736255 !important;
    font-size:10px !important;
    line-height:1.45 !important;
  }

  body.show-recipes-page .recipe-result-actions{
    flex:0 0 46px !important;
    height:46px !important;
    min-height:46px !important;
    margin:7px 0 0 !important;
  }

  body.show-recipes-page .recipe-back-btn,
  body.show-recipes-page .recipe-next-btn{
    min-height:38px !important;
    border:1px solid rgba(130,91,52,.12) !important;
  }
}

@media(min-width:981px) and (max-height:760px){
  body.show-recipes-page .recipe-page-header{
    flex-basis:56px !important;
    min-height:56px !important;
    margin-bottom:8px !important;
  }

  .recipe-page-heading h2{
    font-size:25px !important;
  }

  body.show-recipes-page #result,
  body.show-recipes-page #result.grid{
    gap:12px 22px !important;
  }
}

@media(min-width:981px) and (max-height:760px){
  body.show-recipes-page #content,
  body.show-recipes-page .content{
    padding-top:12px !important;
  }

  body.show-recipes-page #result,
  body.show-recipes-page #result.grid{
    grid-template-rows:repeat(2,minmax(0,calc((100vh - 102px)/2))) !important;
    gap:14px 24px !important;
  }
}

@media(min-width:981px) and (max-height:760px){
  body.show-recipes-page .recipe-card-image-wrap{
    height:112px !important;
    min-height:112px !important;
    flex-basis:112px !important;
  }

  body.show-recipes-page .recipe-preview{
    -webkit-line-clamp:1 !important;
  }
}

/* ABSOLUTE FINAL RESULTS OVERRIDE */
@media(min-width:981px){
  body.show-recipes-page #result,body.show-recipes-page #result.grid{grid-template-rows:repeat(2,minmax(0,clamp(270px,calc((100vh - 160px)/2),320px)))!important;gap:16px 20px!important;align-content:center!important}
  body.show-recipes-page .recipe-card{display:grid!important;grid-template-rows:auto 118px minmax(0,1fr)!important;height:100%!important;min-height:0!important;padding:10px!important;gap:8px!important;border:1px solid rgba(112,80,49,.14)!important;border-radius:22px!important;background:#fffaf2!important;box-shadow:0 14px 32px rgba(54,38,23,.11)!important;overflow:hidden!important}
  body.show-recipes-page .recipe-card-title{grid-row:1!important;min-height:36px!important;margin:0!important;padding:2px 42px 0!important;color:#26372c!important;font:700 15px/1.18 "Sora",sans-serif!important;text-align:center!important}
  body.show-recipes-page .recipe-card-image-wrap{grid-row:2!important;position:relative!important;z-index:1!important;width:100%!important;height:118px!important;min-height:118px!important;margin:0!important;display:block!important;border-radius:16px!important;background:transparent!important;overflow:hidden!important}
  body.show-recipes-page .recipe-card-image-wrap img{width:100%!important;height:118px!important;min-width:0!important;object-fit:cover!important;aspect-ratio:auto!important;border-radius:16px!important;box-shadow:none!important;transform:none!important}
  body.show-recipes-page .recipe-card-image-wrap::after{display:none!important}
  body.show-recipes-page .favorite-btn{top:8px!important;right:8px!important;width:34px!important;height:34px!important}
  body.show-recipes-page .recipe-card-body{grid-row:3!important;position:relative!important;z-index:2!important;min-height:0!important;margin:0!important;padding:0 2px 2px!important;display:flex!important;flex-direction:column!important;gap:6px!important;background:transparent!important;overflow:hidden!important}
  body.show-recipes-page .recipe-card-meta{position:static!important;margin:0!important;padding:0!important;justify-content:center!important;gap:5px!important;transform:none!important}
  body.show-recipes-page .recipe-meta-pill{min-height:23px!important;padding:5px 7px!important;background:#f0e4d5!important;color:#5c4838!important;font-size:8px!important;box-shadow:none!important}
  body.show-recipes-page .recipe-ingredients{position:static!important;max-height:27px!important;margin:0!important;justify-content:center!important;gap:5px!important;overflow:hidden!important}
  body.show-recipes-page .recipe-ingredients span{min-height:23px!important;padding:5px 7px!important;font-size:8px!important}
  body.show-recipes-page .recipe-preview{position:static!important;margin:0!important;color:#746355!important;font-size:9px!important;line-height:1.35!important;text-align:center!important;-webkit-line-clamp:1!important}
  body.show-recipes-page #sidebar{background:linear-gradient(180deg,#f3eadc,#eadfce)!important}
  body.show-recipes-page #sidebar .nk-brand-card{min-height:112px!important;padding:12px 14px!important;border-radius:24px!important;background:linear-gradient(145deg,#fffaf3,#f1e4d2)!important}
  body.show-recipes-page #sidebar .upload-card{min-height:112px!important;padding:14px 16px!important;align-items:center!important;justify-content:center!important;text-align:center!important;border-radius:22px!important;background:linear-gradient(145deg,#7a5034,#55331f)!important;color:#fffaf4!important}
  body.show-recipes-page #sidebar .upload-card-text,body.show-recipes-page #sidebar .upload-card-text strong,body.show-recipes-page #sidebar .upload-card-text span{color:#fffaf4!important;text-align:center!important}
  body.show-recipes-page #sidebar #manualInput{background:#fffaf4!important}
  body.show-recipes-page #sidebar .category-panel{background:linear-gradient(180deg,#f8f0e5,#eee2d2)!important}
  body.show-recipes-page #sidebar .category-btn{background:rgba(255,251,246,.9)!important;color:#5a493b!important;border-color:rgba(139,103,70,.12)!important}
}

/* EXACT HOMEPAGE BRAND ON RESULTS + SAFE HEADER ACTION SPACE */
@media(min-width:981px){
  body.show-recipes-page #sidebar,
  body.show-recipes-page .sidebar{
    width:320px !important;
  }

  body.show-recipes-page #content,
  body.show-recipes-page .content{
    width:calc(100% - 320px) !important;
    margin-left:320px !important;
  }

  body.show-recipes-page #sidebar .nk-brand-card{
    position:relative !important;
    min-height:108px !important;
    padding:12px 14px !important;
    overflow:hidden !important;
    border:1px solid rgba(142,111,83,.10) !important;
    border-radius:24px !important;
    background:linear-gradient(180deg,rgba(248,241,233,.94),rgba(238,227,213,.86)) !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.6),0 12px 24px rgba(73,51,29,.05) !important;
  }

  body.show-recipes-page #sidebar .nk-brand-card::after{
    content:"" !important;
    position:absolute !important;
    right:-26px !important;
    top:-32px !important;
    width:120px !important;
    height:120px !important;
    border-radius:50% !important;
    background:radial-gradient(circle,rgba(187,143,98,.16),transparent 70%) !important;
  }

  body.show-recipes-page #sidebar .nk-brand-inner{
    position:relative !important;
    z-index:2 !important;
    width:100% !important;
    display:grid !important;
    grid-template-columns:88px minmax(0,1fr) !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:14px !important;
  }

  body.show-recipes-page #sidebar .nk-logo-shell{
    width:84px !important;
    height:84px !important;
    min-width:84px !important;
    min-height:84px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    overflow:hidden !important;
    border:1px solid rgba(162,125,91,.14) !important;
    border-radius:26px !important;
    background:radial-gradient(circle at 30% 30%,rgba(255,250,245,.96),rgba(243,230,214,.92) 58%,rgba(225,205,181,.92) 100%) !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.72),0 10px 24px rgba(76,54,30,.08) !important;
  }

  body.show-recipes-page #sidebar .nk-logo{
    width:82px !important;
    height:82px !important;
    min-width:82px !important;
    min-height:82px !important;
    padding:0 !important;
    border:none !important;
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    mix-blend-mode:multiply !important;
    filter:contrast(1.08) saturate(.88) brightness(.98) !important;
    transform:scale(1.02) !important;
  }

  body.show-recipes-page #sidebar .nk-brand-text{
    width:100% !important;
    max-width:none !important;
    padding:0 !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    gap:4px !important;
    text-align:center !important;
  }

  body.show-recipes-page #sidebar .nk-title{
    width:100% !important;
    margin:0 auto !important;
    color:#30241a !important;
    font-size:28px !important;
    font-weight:700 !important;
    line-height:1.02 !important;
    text-align:center !important;
    white-space:nowrap !important;
  }

  body.show-recipes-page #sidebar .nk-subtitle{
    width:100% !important;
    margin:0 auto !important;
    color:#7a6a5b !important;
    font-size:11px !important;
    line-height:1.3 !important;
    text-align:center !important;
  }

  body.show-recipes-page .recipe-page-summary{
    flex:0 0 auto !important;
    margin-right:190px !important;
  }
}

/* FINAL SIDEBAR FLOW AND TOP-ROW ALIGNMENT */
@media(min-width:981px){
  body.show-recipes-page #sidebar{
    padding:16px !important;
  }

  body.show-recipes-page #sidebar .sidebar-shell{
    display:flex !important;
    flex-direction:column !important;
    height:100% !important;
    min-height:0 !important;
    gap:8px !important;
    overflow:hidden !important;
  }

  body.show-recipes-page #sidebar .sidebar-main{
    display:flex !important;
    flex:1 1 auto !important;
    min-height:0 !important;
    flex-direction:column !important;
    gap:8px !important;
    overflow:hidden !important;
  }

  body.show-recipes-page #sidebar .nk-brand-card,
  body.show-recipes-page #sidebar .upload-card,
  body.show-recipes-page #sidebar .manual,
  body.show-recipes-page #sidebar .category-panel,
  body.show-recipes-page #sidebar .ad-media-box,
  body.show-recipes-page #sidebar .join-area,
  body.show-recipes-page #sidebar .site-footer-note{
    flex-shrink:0 !important;
  }

  body.show-recipes-page #sidebar .ad-media-box{
    display:block !important;
    width:100% !important;
    height:auto !important;
    aspect-ratio:16/9 !important;
    min-height:0 !important;
    border-radius:18px !important;
    overflow:hidden !important;
  }

  body.show-recipes-page #sidebar .join-area{
    display:block !important;
    margin:0 !important;
  }

  body.show-recipes-page #sidebar .nk-mini-card{
    min-height:64px !important;
    padding:8px 10px !important;
  }

  body.show-recipes-page #sidebar .site-footer-note{
    display:flex !important;
    min-height:18px !important;
    margin-top:auto !important;
    padding:0 4px !important;
    align-items:center !important;
    justify-content:center !important;
    visibility:visible !important;
    opacity:1 !important;
    overflow:visible !important;
  }

  body.show-recipes-page #sidebar #footerNoteText{
    display:block !important;
    color:#847466 !important;
    font-size:8px !important;
    line-height:1.2 !important;
    text-align:center !important;
    white-space:normal !important;
  }

  body.show-recipes-page .recipe-page-summary{
    margin-top:10px !important;
    transform:none !important;
  }
}

/* PRECISE RESULTS SIDEBAR HEIGHT + HEADER ALIGNMENT */
@media(min-width:981px){
  body.show-recipes-page #sidebar .upload-card{
    min-height:88px !important;
    height:88px !important;
    max-height:88px !important;
    padding:9px 12px !important;
    gap:5px !important;
  }

  body.show-recipes-page #sidebar .upload-card-text{
    gap:2px !important;
  }

  body.show-recipes-page #sidebar .gallery-mini-btn{
    margin-top:2px !important;
    padding:5px 9px !important;
  }

  body.show-recipes-page #sidebar .analyze-progress{
    margin-top:2px !important;
  }

  body.show-recipes-page #sidebar .join-area,
  body.show-recipes-page #sidebar .site-footer-note{
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
  }

  body.show-recipes-page #sidebar .site-footer-note{
    display:flex !important;
  }

  body.show-recipes-page .recipe-page-summary{
    position:fixed !important;
    top:40px !important;
    right:190px !important;
    z-index:999998 !important;
    margin:0 !important;
    transform:none !important;
  }

  body.show-recipes-page .recipe-page-header{
    position:relative !important;
    align-items:flex-start !important;
    padding-top:15px !important;
  }

  body.show-recipes-page .recipe-page-heading{
    transform:translateY(0) !important;
  }
}

/* EXACT HOMEPAGE SIDEBAR BOX MODEL ON RESULTS */
@media(min-width:981px){
  body.show-recipes-page #sidebar,
  body.show-recipes-page .sidebar{
    width:320px !important;
    padding:10px !important;
    box-sizing:border-box !important;
    background:
      radial-gradient(circle at top left,rgba(255,247,236,.92),transparent 34%),
      linear-gradient(180deg,rgba(240,231,218,.96),rgba(229,217,201,.98)) !important;
  }

  body.show-recipes-page #sidebar::before{
    content:"" !important;
    position:absolute !important;
    inset:14px 12px !important;
    border:1px solid rgba(255,255,255,.28) !important;
    border-radius:30px !important;
    pointer-events:none !important;
    opacity:.7 !important;
  }

  body.show-recipes-page #sidebar .sidebar-shell,
  body.show-recipes-page #sidebar .sidebar-main,
  body.show-recipes-page #sidebar .manual,
  body.show-recipes-page #sidebar .category-panel,
  body.show-recipes-page #sidebar #categoryGrid{
    width:100% !important;
    max-width:100% !important;
    box-sizing:border-box !important;
  }

  body.show-recipes-page #sidebar .manual{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 36px !important;
    gap:6px !important;
  }

  body.show-recipes-page #sidebar #manualInput{
    width:100% !important;
    min-width:0 !important;
  }

  body.show-recipes-page #sidebar .manual button{
    width:36px !important;
    min-width:36px !important;
  }

  body.show-recipes-page #sidebar #categoryGrid{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:9px !important;
  }

  body.show-recipes-page #sidebar .category-btn{
    width:100% !important;
    min-width:0 !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }
}

@media(min-width:981px) and (max-width:1280px){
  body.show-recipes-page .recipe-page-summary{
    right:165px !important;
  }
}

@media(min-width:981px) and (max-width:1280px){
  body.show-recipes-page .recipe-page-summary{
    margin-right:150px !important;
  }
}

/* PERMANENT DESKTOP SIDEBAR SYSTEM - identical on every app state */
@media(min-width:981px){
  #sidebar,
  .sidebar{
    position:fixed !important;
    inset:0 auto 0 0 !important;
    z-index:20 !important;
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    width:320px !important;
    height:100vh !important;
    min-height:100vh !important;
    max-height:100vh !important;
    margin:0 !important;
    padding:10px !important;
    box-sizing:border-box !important;
    overflow:hidden !important;
    border-right:1px solid rgba(126,101,76,.08) !important;
    border-radius:0 !important;
    background:radial-gradient(circle at top left,rgba(255,247,236,.92),transparent 34%),linear-gradient(180deg,rgba(240,231,218,.96),rgba(229,217,201,.98)) !important;
    box-shadow:20px 0 44px rgba(61,44,24,.07) !important;
  }

  #sidebar .sidebar-shell{
    display:flex !important;
    visibility:visible !important;
    opacity:1 !important;
    width:100% !important;
    height:100% !important;
    min-height:0 !important;
    flex-direction:column !important;
    gap:8px !important;
    overflow:hidden !important;
  }

  #sidebar .nk-brand-card{
    flex:0 0 108px !important;
    width:100% !important;
    min-height:108px !important;
    max-height:108px !important;
    margin:0 !important;
    box-sizing:border-box !important;
  }

  #sidebar .sidebar-main{
    display:flex !important;
    visibility:visible !important;
    opacity:1 !important;
    flex:1 1 auto !important;
    width:100% !important;
    min-height:0 !important;
    flex-direction:column !important;
    gap:8px !important;
    overflow:hidden !important;
  }

  #sidebar .upload-card{
    flex:0 0 88px !important;
    width:100% !important;
    height:88px !important;
    min-height:88px !important;
    max-height:88px !important;
    margin:0 !important;
    padding:9px 12px !important;
    box-sizing:border-box !important;
  }

  #sidebar .manual{
    flex:0 0 36px !important;
    width:100% !important;
    height:36px !important;
    min-height:36px !important;
    margin:0 !important;
    padding:0 !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 36px !important;
    gap:6px !important;
    box-sizing:border-box !important;
  }

  #sidebar #manualInput,
  #sidebar .manual button{
    height:36px !important;
    min-height:36px !important;
    box-sizing:border-box !important;
  }

  #sidebar .category-panel{
    flex:0 0 auto !important;
    width:100% !important;
    margin:0 !important;
    box-sizing:border-box !important;
  }

  #sidebar #categoryGrid{
    width:100% !important;
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:9px !important;
  }

  #sidebar .category-btn{
    width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }

  #sidebar .ad-media-box{
    display:block !important;
    flex:0 0 auto !important;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    margin:0 !important;
    aspect-ratio:16/9 !important;
    box-sizing:border-box !important;
  }

  #sidebar .join-area{
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    flex:0 0 auto !important;
    width:100% !important;
    margin:0 !important;
  }

  #sidebar .site-footer-note{
    display:flex !important;
    visibility:visible !important;
    opacity:1 !important;
    flex:0 0 18px !important;
    width:100% !important;
    min-height:18px !important;
    margin-top:auto !important;
    padding:0 4px !important;
    align-items:center !important;
    justify-content:center !important;
    box-sizing:border-box !important;
  }

  #content,
  .content{
    margin-left:320px !important;
    width:calc(100% - 320px) !important;
    box-sizing:border-box !important;
  }
}

/* LOCKED SIDEBAR INSTANCE - cannot vary between page states */
@media(min-width:981px){
  html body #sidebar.sidebar-unified{
    position:fixed !important;
    inset:0 auto 0 0 !important;
    z-index:20 !important;
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    width:320px !important;
    height:100vh !important;
    min-height:100vh !important;
    max-height:100vh !important;
    margin:0 !important;
    padding:10px !important;
    box-sizing:border-box !important;
    overflow:hidden !important;
    border-right:1px solid rgba(126,101,76,.08) !important;
    border-radius:0 !important;
    background:radial-gradient(circle at top left,rgba(255,247,236,.92),transparent 34%),linear-gradient(180deg,rgba(240,231,218,.96),rgba(229,217,201,.98)) !important;
    box-shadow:20px 0 44px rgba(61,44,24,.07) !important;
  }

  html body #sidebar.sidebar-unified .sidebar-shell{
    display:flex !important;
    visibility:visible !important;
    opacity:1 !important;
    width:100% !important;
    height:100% !important;
    min-height:0 !important;
    flex-direction:column !important;
    gap:8px !important;
    overflow:hidden !important;
  }

  html body #sidebar.sidebar-unified .nk-brand-card{
    flex:0 0 108px !important;
    width:100% !important;
    height:108px !important;
    min-height:108px !important;
    max-height:108px !important;
    margin:0 !important;
    padding:12px 14px !important;
    box-sizing:border-box !important;
    border:1px solid rgba(142,111,83,.10) !important;
    border-radius:24px !important;
    background:linear-gradient(180deg,rgba(248,241,233,.94),rgba(238,227,213,.86)) !important;
  }

  html body #sidebar.sidebar-unified .nk-brand-inner{
    width:100% !important;
    display:grid !important;
    grid-template-columns:88px minmax(0,1fr) !important;
    align-items:center !important;
    gap:14px !important;
  }

  html body #sidebar.sidebar-unified .sidebar-main{
    display:flex !important;
    visibility:visible !important;
    opacity:1 !important;
    flex:1 1 auto !important;
    width:100% !important;
    min-height:0 !important;
    flex-direction:column !important;
    gap:8px !important;
    overflow:hidden !important;
  }

  html body #sidebar.sidebar-unified .upload-card{
    flex:0 0 88px !important;
    width:100% !important;
    height:88px !important;
    min-height:88px !important;
    max-height:88px !important;
    margin:0 !important;
    padding:9px 12px !important;
    box-sizing:border-box !important;
    border-radius:20px !important;
    background:radial-gradient(circle at top right,rgba(228,188,145,.18),transparent 34%),linear-gradient(165deg,rgba(116,74,44,.98),rgba(77,47,29,.98)) !important;
  }

  html body #sidebar.sidebar-unified .manual{
    flex:0 0 36px !important;
    width:100% !important;
    height:36px !important;
    min-height:36px !important;
    margin:0 !important;
    padding:0 !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 36px !important;
    gap:6px !important;
  }

  html body #sidebar.sidebar-unified .category-panel{
    flex:0 0 auto !important;
    width:100% !important;
    margin:0 !important;
    padding:15px !important;
    box-sizing:border-box !important;
    border-radius:20px !important;
    background:linear-gradient(180deg,rgba(247,240,232,.86),rgba(239,230,217,.76)) !important;
  }

  html body #sidebar.sidebar-unified #categoryGrid{
    width:100% !important;
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:9px !important;
  }

  html body #sidebar.sidebar-unified .ad-media-box{
    display:block !important;
    flex:0 0 auto !important;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    margin:0 !important;
    aspect-ratio:16/9 !important;
    border-radius:18px !important;
    overflow:hidden !important;
  }

  html body #sidebar.sidebar-unified .join-area{
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    flex:0 0 auto !important;
    width:100% !important;
    margin:0 !important;
  }

  html body #sidebar.sidebar-unified .site-footer-note{
    display:flex !important;
    visibility:visible !important;
    opacity:1 !important;
    flex:0 0 18px !important;
    width:100% !important;
    min-height:18px !important;
    margin-top:auto !important;
    padding:0 4px !important;
    align-items:center !important;
    justify-content:center !important;
    overflow:visible !important;
  }
}

/* LOCKED SIDEBAR INTERNAL GEOMETRY */
@media(min-width:981px){
  html body #sidebar.sidebar-unified .sidebar-main{
    display:flex !important;
    flex-direction:column !important;
    gap:8px !important;
  }

  html body #sidebar.sidebar-unified #manualInput{
    width:100% !important;
    min-width:0 !important;
    height:36px !important;
    min-height:36px !important;
    padding:0 14px !important;
    border:1px solid rgba(142,111,83,.10) !important;
    border-radius:16px !important;
    background:rgba(255,250,245,.92) !important;
    color:#413225 !important;
    box-sizing:border-box !important;
  }

  html body #sidebar.sidebar-unified .manual button{
    width:36px !important;
    min-width:36px !important;
    height:36px !important;
    min-height:36px !important;
    padding:0 !important;
    border:none !important;
    border-radius:12px !important;
    background:linear-gradient(135deg,#a56b3d,#84502b) !important;
    color:#fff !important;
    font-size:20px !important;
    line-height:1 !important;
    box-shadow:0 10px 18px rgba(98,63,35,.14) !important;
  }

  html body #sidebar.sidebar-unified .category-panel{
    flex:0 0 224px !important;
    height:224px !important;
    min-height:224px !important;
    max-height:224px !important;
    overflow:hidden !important;
  }

  html body #sidebar.sidebar-unified .panel-title{
    height:18px !important;
    margin:0 0 10px !important;
    font-size:13px !important;
    line-height:18px !important;
    text-align:center !important;
  }

  html body #sidebar.sidebar-unified #categoryGrid{
    height:166px !important;
    min-height:166px !important;
    max-height:166px !important;
    grid-template-rows:repeat(6,27px) !important;
    gap:1px 9px !important;
    align-content:space-between !important;
    overflow:hidden !important;
  }

  html body #sidebar.sidebar-unified .category-btn{
    height:27px !important;
    min-height:27px !important;
    max-height:27px !important;
    padding:5px 9px !important;
    border:1px solid rgba(139,103,70,.12) !important;
    border-radius:999px !important;
    background:rgba(255,251,246,.90) !important;
    color:#5a493b !important;
    font-size:10px !important;
    line-height:1 !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }

  html body #sidebar.sidebar-unified .ad-media-box{
    flex:1 1 auto !important;
    width:100% !important;
    height:auto !important;
    min-height:82px !important;
    max-height:135px !important;
    aspect-ratio:auto !important;
  }

  html body #sidebar.sidebar-unified .ad-media-box video,
  html body #sidebar.sidebar-unified .ad-media-box img{
    width:100% !important;
    height:100% !important;
    object-fit:cover !important;
  }

  html body #sidebar.sidebar-unified .join-area{
    flex:0 0 64px !important;
    height:64px !important;
    min-height:64px !important;
    max-height:64px !important;
    overflow:hidden !important;
  }

  html body #sidebar.sidebar-unified .nk-mini-card{
    width:100% !important;
    height:64px !important;
    min-height:64px !important;
    max-height:64px !important;
    padding:8px 10px !important;
    box-sizing:border-box !important;
  }

  html body #sidebar.sidebar-unified .site-footer-note{
    flex:0 0 18px !important;
    height:18px !important;
    min-height:18px !important;
    max-height:18px !important;
    margin:0 !important;
  }

  html body #content,
  html body .content{
    margin-left:320px !important;
    width:calc(100vw - 320px) !important;
    max-width:calc(100vw - 320px) !important;
    box-sizing:border-box !important;
  }
}

/* SIDEBAR TYPOGRAPHY RHYTHM + BALANCED VERTICAL FILL */
@media(min-width:981px){
  html body #sidebar.sidebar-unified .upload-card{
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    gap:4px !important;
    overflow:hidden !important;
  }

  html body #sidebar.sidebar-unified .upload-card-text{
    display:flex !important;
    flex:0 0 31px !important;
    width:100% !important;
    height:31px !important;
    min-height:31px !important;
    max-height:31px !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    gap:2px !important;
    overflow:hidden !important;
  }

  html body #sidebar.sidebar-unified .upload-card-text strong,
  html body #sidebar.sidebar-unified #scanTitle{
    display:block !important;
    width:100% !important;
    height:16px !important;
    min-height:16px !important;
    max-height:16px !important;
    margin:0 !important;
    color:#fff7ee !important;
    font-size:13px !important;
    font-weight:700 !important;
    line-height:16px !important;
    text-align:center !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }

  html body #sidebar.sidebar-unified .upload-card-text span,
  html body #sidebar.sidebar-unified #statusText{
    display:block !important;
    width:100% !important;
    height:13px !important;
    min-height:13px !important;
    max-height:13px !important;
    margin:0 !important;
    color:rgba(255,242,229,.80) !important;
    font-size:9px !important;
    font-weight:600 !important;
    line-height:13px !important;
    text-align:center !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }

  html body #sidebar.sidebar-unified .gallery-mini-btn{
    display:inline-flex !important;
    flex:0 0 24px !important;
    width:auto !important;
    height:24px !important;
    min-height:24px !important;
    max-height:24px !important;
    margin:0 !important;
    padding:0 10px !important;
    align-items:center !important;
    justify-content:center !important;
    font-size:8px !important;
    line-height:24px !important;
  }

  html body #sidebar.sidebar-unified .analyze-progress{
    flex:0 0 3px !important;
    width:100% !important;
    height:3px !important;
    min-height:3px !important;
    max-height:3px !important;
    margin:0 !important;
  }

  html body #sidebar.sidebar-unified .category-panel{
    flex:0 0 260px !important;
    height:260px !important;
    min-height:260px !important;
    max-height:260px !important;
  }

  html body #sidebar.sidebar-unified #categoryGrid{
    height:202px !important;
    min-height:202px !important;
    max-height:202px !important;
    grid-template-rows:repeat(6,32px) !important;
    gap:2px 9px !important;
  }

  html body #sidebar.sidebar-unified .category-btn{
    height:32px !important;
    min-height:32px !important;
    max-height:32px !important;
    padding:6px 10px !important;
    font-size:10px !important;
  }

  html body #sidebar.sidebar-unified .site-footer-note{
    margin-top:auto !important;
    margin-bottom:0 !important;
  }
}

@media(max-width:980px){
  html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn,
  html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn *,
  html body #sidebar.sidebar-unified .upload-card #galleryBtnText{
    background-color:#fff8ed !important;
    background-image:none !important;
    color:#263a2c !important;
    -webkit-text-fill-color:#263a2c !important;
    text-shadow:none !important;
  }

  html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn:hover,
  html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn:focus-visible,
  html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn:active{
    background-color:#314a37 !important;
  }

  html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn:hover *,
  html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn:focus-visible *,
  html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn:active *{
    color:#fffaf0 !important;
    -webkit-text-fill-color:#fffaf0 !important;
  }
}

@media(max-width:980px){
  html body:not(.show-recipes-page) .floating-lang{
    top:112px !important;
  }
}

/* MEASURED SIDEBAR PARITY FIX */
@media(min-width:981px){
  html body #sidebar.sidebar-unified .sidebar-main{
    padding:0 !important;
    margin:0 !important;
    width:100% !important;
    max-width:100% !important;
    box-sizing:border-box !important;
  }

  html body #sidebar.sidebar-unified .nk-mini-content{
    min-width:0 !important;
    max-width:none !important;
  }

  html body #sidebar.sidebar-unified #joinNiliTitle{
    height:auto !important;
    min-height:0 !important;
    max-height:23px !important;
    margin:0 !important;
    color:#30241a !important;
    font-size:10px !important;
    font-weight:700 !important;
    line-height:11.5px !important;
    overflow:hidden !important;
  }

  html body #sidebar.sidebar-unified #joinNiliDesc{
    height:auto !important;
    min-height:0 !important;
    max-height:29px !important;
    margin:1px 0 0 !important;
    color:#7a6a5b !important;
    font-size:8px !important;
    font-weight:500 !important;
    line-height:9.6px !important;
    overflow:hidden !important;
  }

  html body #sidebar.sidebar-unified #joinNiliBtn{
    width:120px !important;
    min-width:120px !important;
    height:48px !important;
    min-height:48px !important;
    max-height:48px !important;
    padding:6px 8px !important;
    font-size:9px !important;
    font-weight:800 !important;
    line-height:10.35px !important;
  }

  html body #sidebar.sidebar-unified #footerNoteText{
    margin:0 !important;
    color:#847466 !important;
    font-size:8px !important;
    line-height:10px !important;
    text-align:center !important;
  }
}

/* LET CATEGORIES ABSORB TALL-SCREEN SIDEBAR SPACE */
@media(min-width:981px){
  html body #sidebar.sidebar-unified .category-panel{
    flex:0 0 clamp(260px,34vh,330px) !important;
    height:clamp(260px,34vh,330px) !important;
    min-height:260px !important;
    max-height:330px !important;
  }

  html body #sidebar.sidebar-unified #categoryGrid{
    height:calc(clamp(260px,34vh,330px) - 58px) !important;
    min-height:202px !important;
    max-height:272px !important;
    grid-template-rows:repeat(6,minmax(32px,1fr)) !important;
    gap:2px 9px !important;
  }

  html body #sidebar.sidebar-unified .category-btn{
    width:100% !important;
    height:100% !important;
    min-height:32px !important;
    max-height:none !important;
  }
}

/* RESULTS HEADER FINAL ALIGNMENT */
@media(min-width:981px){
  body.show-recipes-page .recipe-page-summary{
    transform:translateX(-36px) !important;
  }

  body.show-recipes-page .recipe-page-heading > span,
  body.show-recipes-page .recipe-page-heading h2{
    font-family:"Sora",sans-serif !important;
  }

  body.show-recipes-page .recipe-page-heading > span{
    font-size:14px !important;
    font-weight:600 !important;
    line-height:1 !important;
    letter-spacing:.08em !important;
  }

  body.show-recipes-page .recipe-page-heading h2{
    font-size:30px !important;
    font-weight:700 !important;
  }
}

/* REMOVE JOIN-FOOTER GAP; CATEGORIES FILL REMAINING HEIGHT */
@media(min-width:981px){
  html body #sidebar.sidebar-unified .category-panel{
    display:flex !important;
    flex:1 1 260px !important;
    height:auto !important;
    min-height:260px !important;
    max-height:none !important;
    flex-direction:column !important;
  }

  html body #sidebar.sidebar-unified #categoryGrid{
    flex:1 1 auto !important;
    height:auto !important;
    min-height:202px !important;
    max-height:none !important;
    grid-template-rows:repeat(6,minmax(32px,1fr)) !important;
  }

  html body #sidebar.sidebar-unified .ad-media-box{
    flex:0 0 clamp(82px,12vh,120px) !important;
    height:clamp(82px,12vh,120px) !important;
    min-height:82px !important;
    max-height:120px !important;
  }

  html body #sidebar.sidebar-unified .site-footer-note{
    margin-top:0 !important;
    margin-bottom:0 !important;
  }
}

/* BRAND SCRIPT + INTERACTIVE SIDEBAR FINAL FIX */
@media(min-width:981px){
  html body #sidebar.sidebar-unified,
  html body #sidebar.sidebar-unified .sidebar-shell,
  html body #sidebar.sidebar-unified .sidebar-main,
  html body #sidebar.sidebar-unified .upload-card,
  html body #sidebar.sidebar-unified .manual,
  html body #sidebar.sidebar-unified .category-panel,
  html body #sidebar.sidebar-unified #categoryGrid,
  html body #sidebar.sidebar-unified .category-btn,
  html body #sidebar.sidebar-unified .join-area,
  html body #sidebar.sidebar-unified #joinNiliBtn{
    pointer-events:auto !important;
  }

  html body #sidebar.sidebar-unified .nk-title{
    width:100% !important;
    margin:0 auto !important;
    color:#30241a !important;
    font-family:"Parisienne",cursive !important;
    font-size:34px !important;
    font-weight:400 !important;
    line-height:1 !important;
    letter-spacing:0 !important;
    text-align:center !important;
    white-space:nowrap !important;
  }

  body.show-recipes-page .recipe-page-summary{
    transform:translateX(-44px) !important;
  }
}

/* COMPACT BRAND SCRIPT + BALANCED RESULTS HEADING */
@media(min-width:981px){
  html body #sidebar.sidebar-unified .nk-title{
    max-width:176px !important;
    font-family:"Sacramento",cursive !important;
    font-size:31px !important;
    font-weight:400 !important;
    line-height:1 !important;
    letter-spacing:-.01em !important;
    white-space:nowrap !important;
    overflow:visible !important;
  }

  body.show-recipes-page .recipe-page-heading > span{
    font-size:12px !important;
  }

  body.show-recipes-page .recipe-page-heading h2{
    font-size:27px !important;
  }
}

/* CATEGORY INTERACTION + HIGH-CONTRAST LIGHT-SURFACE TEXT */
:root{
  --readable-dark:#343a36;
  --readable-muted:#555d58;
}

html body #sidebar.sidebar-unified .category-btn{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:7px !important;
  color:var(--readable-dark) !important;
  text-align:center !important;
  font-weight:800 !important;
  transition:background-color .18s ease,color .18s ease,border-color .18s ease,transform .18s ease !important;
}

html body #sidebar.sidebar-unified .category-btn > *,
html body #sidebar.sidebar-unified .category-btn::before{
  flex:0 0 auto !important;
  text-align:center !important;
}

html body #sidebar.sidebar-unified .category-btn:hover,
html body #sidebar.sidebar-unified .category-btn:focus-visible{
  border-color:#a86b3a !important;
  background:linear-gradient(135deg,#c1844e,#96592f) !important;
  color:#fffaf3 !important;
  transform:translateY(-1px) !important;
}

html body #sidebar.sidebar-unified .category-btn.active{
  border-color:#84502b !important;
  background:linear-gradient(135deg,#a86b3a,#784522) !important;
  color:#fffaf3 !important;
}

html body .nk-brand-card .nk-subtitle,
html body #sidebar.sidebar-unified .panel-title,
html body #sidebar.sidebar-unified #manualInput,
html body #sidebar.sidebar-unified .nk-mini-content h4,
html body #sidebar.sidebar-unified .nk-mini-content p,
html body #sidebar.sidebar-unified .site-footer-note,
html body .recipe-page-header,
html body .recipe-card-title,
html body .recipe-card-body,
html body .recipe-card-body h3,
html body .recipe-card-body p,
html body .recipe-ingredients span,
html body .modal-content,
html body .modal-content h1,
html body .modal-content h2,
html body .modal-content p,
html body .ingredient-modal-content,
html body .ingredient-modal-content h2,
html body .selected-tray-box{
  color:var(--readable-dark) !important;
}

html body #sidebar.sidebar-unified .nk-mini-content p,
html body #sidebar.sidebar-unified .site-footer-note,
html body .recipe-preview,
html body .modal-content p{
  color:var(--readable-muted) !important;
}

/* Keep contrast on dark and action surfaces. */
html body #sidebar.sidebar-unified .upload-card,
html body #sidebar.sidebar-unified .upload-card *,
html body .hero-content,
html body .hero-content *,
html body .modal-ingredient-btn.active,
html body .modal-ingredient-btn.active *,
html body #trayGetRecipesBtn,
html body .recipe-next-btn,
html body #joinNiliBtn{
  color:#fffaf3 !important;
}

/* LOGO-MATCHED BOLD BRAND WORDMARK */
html body #sidebar.sidebar-unified .nk-title{
  max-width:176px !important;
  color:#2b2119 !important;
  font-family:"Lobster",cursive !important;
  font-size:29px !important;
  font-weight:400 !important;
  line-height:1 !important;
  letter-spacing:.005em !important;
  text-shadow:0 1px 0 rgba(255,255,255,.55) !important;
  white-space:nowrap !important;
}

/* HERO FEATURE STRIP AS NAVIGATION BUTTONS */
.hero-strip-button{
  cursor:pointer !important;
  text-decoration:none !important;
  transition:transform .2s ease,background-color .2s ease,border-color .2s ease,box-shadow .2s ease !important;
}

/* White gallery button needs dark text inside the dark scan card. */
html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn,
html body #sidebar.sidebar-unified .upload-card #galleryBtnText{
  color:#63432d !important;
  font-weight:800 !important;
  text-shadow:none !important;
}

/* TRUE 16:9 AD; CATEGORY GIVES BACK THE SAME HEIGHT */
@media(min-width:981px){
  html body #sidebar.sidebar-unified .ad-media-box{
    flex:0 0 auto !important;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    aspect-ratio:16/9 !important;
  }

  html body #sidebar.sidebar-unified .category-panel{
    --balanced-category-height:calc(clamp(260px,34vh,330px) + clamp(82px,12vh,120px) - 167.625px);
    display:flex !important;
    flex:0 0 var(--balanced-category-height) !important;
    height:var(--balanced-category-height) !important;
    min-height:178px !important;
    max-height:283px !important;
    flex-direction:column !important;
  }

  html body #sidebar.sidebar-unified #categoryGrid{
    flex:1 1 auto !important;
    height:calc(var(--balanced-category-height) - 58px) !important;
    min-height:120px !important;
    max-height:225px !important;
    grid-template-rows:repeat(6,minmax(20px,1fr)) !important;
    gap:2px 9px !important;
  }

  html body #sidebar.sidebar-unified .category-btn{
    height:100% !important;
    min-height:20px !important;
    max-height:none !important;
    padding:4px 8px !important;
    font-size:9px !important;
  }
}

/* REBALANCED SIDEBAR: LARGER FLEXIBLE CATEGORIES, NO BOTTOM GAP */
@media(min-width:981px){
  html body #sidebar.sidebar-unified .sidebar-shell,
  html body #sidebar.sidebar-unified .sidebar-main{
    gap:6px !important;
  }

  html body #sidebar.sidebar-unified .nk-brand-card{
    flex-basis:96px !important;
    height:96px !important;
    min-height:96px !important;
    max-height:96px !important;
    padding:8px 12px !important;
  }

  html body #sidebar.sidebar-unified .nk-logo-shell{
    width:76px !important;
    height:76px !important;
    min-width:76px !important;
    min-height:76px !important;
  }

  html body #sidebar.sidebar-unified .nk-logo{
    width:74px !important;
    height:74px !important;
    min-width:74px !important;
    min-height:74px !important;
  }

  html body #sidebar.sidebar-unified .nk-brand-inner{
    grid-template-columns:80px minmax(0,1fr) !important;
    gap:10px !important;
  }

  html body #sidebar.sidebar-unified .upload-card{
    flex-basis:76px !important;
    height:76px !important;
    min-height:76px !important;
    max-height:76px !important;
    padding:5px 10px !important;
    gap:2px !important;
  }

  html body #sidebar.sidebar-unified .gallery-mini-btn{
    height:20px !important;
    min-height:20px !important;
    max-height:20px !important;
    flex-basis:20px !important;
    line-height:20px !important;
  }

  html body #sidebar.sidebar-unified .manual,
  html body #sidebar.sidebar-unified #manualInput,
  html body #sidebar.sidebar-unified .manual button{
    height:34px !important;
    min-height:34px !important;
    max-height:34px !important;
  }

  html body #sidebar.sidebar-unified .manual{
    flex-basis:34px !important;
    grid-template-columns:minmax(0,1fr) 34px !important;
  }

  html body #sidebar.sidebar-unified .manual button{
    width:34px !important;
    min-width:34px !important;
  }

  html body #sidebar.sidebar-unified .category-panel{
    display:flex !important;
    flex:1 1 auto !important;
    height:auto !important;
    min-height:210px !important;
    max-height:none !important;
    flex-direction:column !important;
  }

  html body #sidebar.sidebar-unified #categoryGrid{
    flex:1 1 auto !important;
    height:auto !important;
    min-height:152px !important;
    max-height:none !important;
    grid-template-rows:repeat(6,minmax(25px,1fr)) !important;
  }

  html body #sidebar.sidebar-unified .category-btn{
    min-height:25px !important;
  }

  html body #sidebar.sidebar-unified .join-area,
  html body #sidebar.sidebar-unified .nk-mini-card{
    height:56px !important;
    min-height:56px !important;
    max-height:56px !important;
  }

  html body #sidebar.sidebar-unified .join-area{
    flex-basis:56px !important;
  }

  html body #sidebar.sidebar-unified #joinNiliBtn{
    height:42px !important;
    min-height:42px !important;
    max-height:42px !important;
  }

  html body #sidebar.sidebar-unified .site-footer-note{
    flex-basis:16px !important;
    height:16px !important;
    min-height:16px !important;
    max-height:16px !important;
    margin:0 !important;
  }
}

/* HERO COPY ALWAYS ENDS ABOVE THE THREE FEATURE BUTTONS */
@media(min-width:981px){
  body:not(.show-recipes-page) .hero-content{
    position:absolute !important;
    top:auto !important;
    bottom:118px !important;
    left:44px !important;
    width:min(520px,calc(100% - 88px)) !important;
    max-width:520px !important;
    margin:0 !important;
    padding:0 !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    transform:none !important;
    overflow:visible !important;
    border:none !important;
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;
  }

  body:not(.show-recipes-page) .hero-content::before,
  body:not(.show-recipes-page) .hero-content::after{
    display:none !important;
    content:none !important;
  }

  body:not(.show-recipes-page) .hero-title-text{
    width:100% !important;
    max-width:500px !important;
    margin:0 !important;
    color:#fff !important;
    font-size:clamp(36px,2.7vw,48px) !important;
    font-weight:700 !important;
    line-height:1.05 !important;
    letter-spacing:-.035em !important;
    text-shadow:0 3px 14px rgba(0,0,0,.34) !important;
  }

  body:not(.show-recipes-page) .hero-kicker{
    margin:0 0 10px !important;
  }

  body:not(.show-recipes-page) .hero-desc-text{
    max-width:440px !important;
    margin-top:10px !important;
    font-size:15px !important;
    line-height:1.35 !important;
  }

  body:not(.show-recipes-page) .hero-badge-text{
    margin-bottom:10px !important;
  }

  body:not(.show-recipes-page) .hero-floating-strip{
    bottom:22px !important;
  }
}

/* MANUAL INGREDIENT AUTOCOMPLETE */
.manual-input-wrap{
  position:relative !important;
  width:100% !important;
  min-width:0 !important;
  height:100% !important;
}

/* ALL RECIPES ON ONE SCROLLING PAGE - LARGE PREMIUM CARDS */
@media(min-width:981px){
  html:has(body.show-recipes-page),
  body.show-recipes-page{
    height:auto !important;
    min-height:100% !important;
    max-height:none !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
  }

  body.show-recipes-page #content,
  body.show-recipes-page .content{
    display:block !important;
    width:calc(100vw - 320px) !important;
    height:auto !important;
    min-height:100vh !important;
    max-height:none !important;
    margin-left:320px !important;
    padding:24px 28px 44px !important;
    overflow:visible !important;
  }

  body.show-recipes-page .recipe-page-header{
    min-height:76px !important;
    margin-bottom:22px !important;
  }

  body.show-recipes-page #result,
  body.show-recipes-page #result.grid{
    display:grid !important;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    grid-template-rows:none !important;
    grid-auto-rows:auto !important;
    gap:30px 24px !important;
    padding:0 0 28px !important;
    align-content:start !important;
    overflow:visible !important;
  }

  body.show-recipes-page .recipe-card{
    display:grid !important;
    grid-template-columns:1fr !important;
    grid-template-rows:auto 280px minmax(270px,auto) !important;
    height:auto !important;
    min-height:620px !important;
    max-height:none !important;
    padding:14px !important;
    gap:12px !important;
    border:1px solid rgba(126,88,51,.16) !important;
    border-radius:30px !important;
    background:linear-gradient(155deg,#fffefb 0%,#f5e9da 100%) !important;
    box-shadow:0 22px 52px rgba(55,37,21,.14),inset 0 1px 0 rgba(255,255,255,.95) !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-card:hover{
    transform:translateY(-7px) !important;
    box-shadow:0 32px 68px rgba(55,37,21,.20),inset 0 1px 0 rgba(255,255,255,.95) !important;
  }

  body.show-recipes-page .recipe-card-title{
    grid-row:1 !important;
    min-height:50px !important;
    margin:0 !important;
    padding:5px 48px 0 !important;
    color:#29372e !important;
    font-family:"Sora",sans-serif !important;
    font-size:20px !important;
    font-weight:700 !important;
    line-height:1.25 !important;
    text-align:center !important;
    -webkit-line-clamp:2 !important;
  }

  body.show-recipes-page .recipe-card-image-wrap{
    grid-row:2 !important;
    position:relative !important;
    width:100% !important;
    height:280px !important;
    min-height:280px !important;
    margin:0 !important;
    border-radius:22px !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-card-image-wrap img{
    width:100% !important;
    height:280px !important;
    min-width:0 !important;
    object-fit:cover !important;
    aspect-ratio:auto !important;
    border-radius:22px !important;
    transform:scale(1.01) !important;
    transition:transform .45s ease !important;
  }

  body.show-recipes-page .recipe-card:hover .recipe-card-image-wrap img{
    transform:scale(1.055) !important;
  }

  body.show-recipes-page .favorite-btn{
    top:14px !important;
    right:14px !important;
    width:44px !important;
    height:44px !important;
    border-radius:15px !important;
  }

  body.show-recipes-page .recipe-card-body{
    grid-row:3 !important;
    min-height:270px !important;
    margin:0 !important;
    padding:6px 8px 12px !important;
    display:flex !important;
    flex-direction:column !important;
    gap:13px !important;
    overflow:visible !important;
  }

  body.show-recipes-page .recipe-card-meta{
    position:static !important;
    margin:0 !important;
    padding:0 !important;
    display:flex !important;
    justify-content:center !important;
    gap:8px !important;
    transform:none !important;
  }

  body.show-recipes-page .recipe-meta-pill{
    min-height:32px !important;
    padding:8px 11px !important;
    border-radius:999px !important;
    background:#eadac7 !important;
    color:#4f4035 !important;
    font-size:11px !important;
    font-weight:800 !important;
  }

  body.show-recipes-page .recipe-ingredients{
    position:static !important;
    max-height:none !important;
    margin:0 !important;
    display:flex !important;
    flex-wrap:wrap !important;
    justify-content:center !important;
    gap:8px !important;
    overflow:visible !important;
  }

  body.show-recipes-page .recipe-ingredients span{
    min-height:31px !important;
    padding:8px 11px !important;
    border-radius:11px !important;
    background:rgba(255,255,255,.82) !important;
    color:#4e443c !important;
    font-size:11px !important;
    line-height:1.25 !important;
  }

  body.show-recipes-page .recipe-preview{
    position:static !important;
    margin:0 !important;
    display:-webkit-box !important;
    color:#555d58 !important;
    font-size:13px !important;
    line-height:1.6 !important;
    text-align:left !important;
    -webkit-line-clamp:4 !important;
    -webkit-box-orient:vertical !important;
    overflow:hidden !important;
  }

  body.show-recipes-page .recipe-result-actions{
    display:flex !important;
    width:100% !important;
    height:auto !important;
    min-height:56px !important;
    margin:4px 0 0 !important;
    padding:0 0 24px !important;
    justify-content:center !important;
    overflow:visible !important;
  }

  body.show-recipes-page .recipe-next-btn{
    display:none !important;
  }
}

/* CATEGORY POPUP SEARCH */
.ingredient-modal-search-wrap{
  position:relative !important;
  z-index:18 !important;
  flex:0 0 48px !important;
  height:48px !important;
  min-height:48px !important;
  margin:16px 22px 8px !important;
  display:flex !important;
  align-items:center !important;
  border:1px solid rgba(137,100,66,.16) !important;
  border-radius:15px !important;
  background:rgba(255,255,255,.90) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8),0 8px 22px rgba(65,43,25,.06) !important;
}

/* EMPHASIZED, READABLE SIDEBAR CATEGORIES */
html body #sidebar.sidebar-unified .category-panel{
  position:relative !important;
  border:1px solid rgba(151,99,49,.24) !important;
  background:linear-gradient(180deg,#f6e8d6 0%,#ead8c2 100%) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.70),0 12px 26px rgba(76,50,27,.10) !important;
}

/* INDEPENDENT CONTENT PAGES MUST ALWAYS SCROLL NATURALLY */
html:has(body.content-page-body),
html body.content-page-body{
  width:100% !important;
  height:auto !important;
  min-height:100% !important;
  max-height:none !important;
  overflow-x:hidden !important;
  overflow-y:auto !important;
  overscroll-behavior-y:auto !important;
  -webkit-overflow-scrolling:touch !important;
}

/* AUTOCOMPLETE ITEMS MUST NOT INHERIT THE MANUAL PLUS BUTTON */
html body #sidebar.sidebar-unified .manual .manual-suggestions{
  width:100% !important;
  min-width:100% !important;
  height:auto !important;
  max-height:226px !important;
  padding:6px !important;
  border:1px solid rgba(126,91,57,.18) !important;
  border-radius:14px !important;
  background:#fffaf4 !important;
  box-shadow:0 18px 38px rgba(49,32,19,.22) !important;
  overflow-x:hidden !important;
  overflow-y:auto !important;
  box-sizing:border-box !important;
}

html body #sidebar.sidebar-unified .manual .manual-suggestions .manual-suggestion-item{
  position:relative !important;
  display:grid !important;
  grid-template-columns:20px minmax(0,1fr) !important;
  align-items:center !important;
  gap:7px !important;
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  height:34px !important;
  min-height:34px !important;
  max-height:34px !important;
  margin:0 !important;
  padding:0 9px !important;
  border:0 !important;
  border-radius:9px !important;
  background:transparent !important;
  color:#343a36 !important;
  box-shadow:none !important;
  transform:none !important;
  text-align:left !important;
  overflow:hidden !important;
  box-sizing:border-box !important;
}

html body #sidebar.sidebar-unified .manual .manual-suggestion-icon{
  display:inline-flex !important;
  width:20px !important;
  height:20px !important;
  align-items:center !important;
  justify-content:center !important;
  color:#a86a35 !important;
  font-size:13px !important;
  font-weight:900 !important;
  line-height:1 !important;
}

html body #sidebar.sidebar-unified .manual .manual-suggestion-label{
  display:block !important;
  min-width:0 !important;
  color:#343a36 !important;
  font-family:"Manrope",sans-serif !important;
  font-size:11px !important;
  font-weight:700 !important;
  line-height:1.2 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

html body #sidebar.sidebar-unified .manual .manual-suggestions .manual-suggestion-item:hover,
html body #sidebar.sidebar-unified .manual .manual-suggestions .manual-suggestion-item:focus-visible{
  background:#ead8c3 !important;
  color:#2f342f !important;
  box-shadow:none !important;
  outline:none !important;
}

html body.content-page-body main,
html body.content-page-body .how-page{
  height:auto !important;
  min-height:100vh !important;
  max-height:none !important;
  overflow:visible !important;
}

html body #sidebar.sidebar-unified .category-panel::before{
  content:"" !important;
  position:absolute !important;
  top:0 !important;
  left:24px !important;
  right:24px !important;
  height:3px !important;
  border-radius:0 0 999px 999px !important;
  background:linear-gradient(90deg,transparent,#a86835,transparent) !important;
}

html body #sidebar.sidebar-unified .panel-title{
  color:#2f342f !important;
  font-family:"Sora",sans-serif !important;
  font-size:14px !important;
  font-weight:800 !important;
  letter-spacing:-.02em !important;
}

html body #sidebar.sidebar-unified .category-btn{
  border:1px solid rgba(125,86,51,.18) !important;
  background:rgba(255,253,249,.96) !important;
  color:#303632 !important;
  font-family:"Manrope",sans-serif !important;
  font-size:11.5px !important;
  font-weight:800 !important;
  line-height:1 !important;
  box-shadow:0 5px 12px rgba(66,44,25,.055) !important;
}

html body #sidebar.sidebar-unified .category-btn .cat-icon{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:14px !important;
  line-height:1 !important;
}

html body #sidebar.sidebar-unified .category-btn:hover,
html body #sidebar.sidebar-unified .category-btn:focus-visible{
  border-color:#9b5d2f !important;
  background:linear-gradient(135deg,#bd7c43,#8d4f27) !important;
  color:#fff !important;
  box-shadow:0 8px 18px rgba(100,59,29,.20) !important;
}

.ingredient-search-icon{
  flex:0 0 42px !important;
  color:#9a6339 !important;
  font-size:24px !important;
  font-weight:800 !important;
  line-height:1 !important;
  text-align:center !important;
}

#ingredientModalSearch{
  flex:1 1 auto !important;
  width:100% !important;
  min-width:0 !important;
  height:46px !important;
  padding:0 14px 0 0 !important;
  border:0 !important;
  outline:0 !important;
  background:transparent !important;
  color:#343a36 !important;
  font-family:"Manrope",sans-serif !important;
  font-size:14px !important;
  font-weight:700 !important;
}

#ingredientModalSearch::placeholder{
  color:#7c817e !important;
  opacity:1 !important;
}

.ingredient-search-empty{
  display:none !important;
  margin:12px 22px !important;
  color:#666d68 !important;
  font:700 13px/1.4 "Manrope",sans-serif !important;
  text-align:center !important;
}

.ingredient-search-empty.show{
  display:block !important;
}

.modal-ingredient-btn[hidden]{
  display:none !important;
}

@media(min-width:981px){
  #ingredientModalItems{
    max-height:calc(82vh - 158px) !important;
  }
}

@media(max-width:980px){
  .ingredient-modal-search-wrap{
    margin:12px 16px 6px !important;
  }

  #ingredientModalItems{
    max-height:calc(80vh - 150px) !important;
  }
}

.manual-input-wrap #manualInput{
  width:100% !important;
}

.manual-suggestions{
  position:absolute !important;
  top:calc(100% + 6px) !important;
  left:0 !important;
  right:0 !important;
  z-index:99999 !important;
  display:none !important;
  max-height:238px !important;
  padding:6px !important;
  overflow-x:hidden !important;
  overflow-y:auto !important;
  border:1px solid rgba(126,91,57,.18) !important;
  border-radius:14px !important;
  background:rgba(255,252,247,.98) !important;
  box-shadow:0 18px 40px rgba(49,32,19,.22) !important;
  backdrop-filter:blur(10px) !important;
}

.manual-suggestions.open{
  display:flex !important;
  flex-direction:column !important;
  gap:3px !important;
}

.manual-suggestion-item{
  width:100% !important;
  min-height:32px !important;
  padding:7px 10px !important;
  border:0 !important;
  border-radius:9px !important;
  background:transparent !important;
  color:#343a36 !important;
  font-family:"Manrope",sans-serif !important;
  font-size:11px !important;
  font-weight:700 !important;
  line-height:1.25 !important;
  text-align:left !important;
  cursor:pointer !important;
}

.manual-suggestion-item:hover,
.manual-suggestion-item:focus-visible{
  background:#ead8c3 !important;
  color:#4e321f !important;
  outline:none !important;
}

html body #sidebar.sidebar-unified .manual{
  overflow:visible !important;
}

.hero-strip-button:hover,
.hero-strip-button:focus-visible{
  transform:translateY(-4px) !important;
  border-color:rgba(169,105,55,.34) !important;
  background:rgba(255,250,243,.96) !important;
  box-shadow:0 16px 34px rgba(53,36,21,.18) !important;
  outline:none !important;
}

.hero-strip-button:focus-visible{
  box-shadow:0 0 0 3px rgba(193,132,78,.28),0 16px 34px rgba(53,36,21,.18) !important;
}

/* World cuisine discovery */
.mobile-world-search-bar{display:none}

.world-search-launcher{
  position:absolute;
  top:22px;
  left:24px;
  right:24px;
  z-index:8;
  display:flex;
  align-items:center;
  gap:18px;
}

.hero-bg{position:relative !important}

.world-search-open{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:42px;
  padding:9px 16px;
  border:1px solid rgba(226,190,127,.55);
  border-radius:999px;
  background:rgba(22,31,24,.82);
  color:#fffaf0;
  box-shadow:0 12px 32px rgba(12,18,13,.25);
  backdrop-filter:blur(8px);
  font:800 12px/1.1 "Manrope",sans-serif;
  letter-spacing:.02em;
  cursor:pointer;
  transition:transform .2s ease,background .2s ease;
}

.world-search-open:hover{transform:translateY(-2px);background:#263426}
.world-search-open-icon{color:#dfb761;font-size:19px;line-height:1}
.world-flag-row{display:flex;flex:1;align-items:center;justify-content:space-around;gap:12px;padding:5px 12px;border:1px solid rgba(226,190,127,.4);border-radius:999px;background:rgba(22,31,24,.74);backdrop-filter:blur(8px)}
.world-flag-row button{display:grid;place-items:center;width:34px;height:30px;padding:3px;border:0;border-radius:8px;background:rgba(255,255,255,.9);font-size:17px;line-height:1;cursor:pointer;transition:transform .18s ease,background .18s ease}
.world-flag-row button img{display:block;width:26px;height:18px;object-fit:cover;border-radius:3px;box-shadow:0 1px 4px rgba(0,0,0,.24)}
.world-flag-row button:hover,.world-flag-row button:focus-visible{transform:translateY(-2px) scale(1.08);background:#fff;outline:none}

.world-search-modal{
  position:fixed;
  inset:0;
  z-index:100000;
  display:none;
  place-items:center;
  padding:24px;
  background:rgba(20,24,20,.65);
  backdrop-filter:blur(10px);
}

.world-search-modal.open{display:grid}
.world-search-active{overflow:hidden !important}

.world-search-panel{
  position:relative;
  width:min(790px,96vw);
  max-height:min(830px,92vh);
  overflow-y:auto;
  padding:34px;
  border:1px solid rgba(177,118,62,.24);
  border-radius:30px;
  background:linear-gradient(145deg,#fffdf8 0%,#f5eadb 100%);
  color:#303732;
  box-shadow:0 35px 90px rgba(27,20,13,.34);
}

.world-search-panel:before{
  content:"";
  position:absolute;
  top:0;left:34px;right:76px;
  height:3px;
  background:linear-gradient(90deg,#a96531,#dfb761,transparent);
}

.world-search-close{
  position:sticky;
  top:0;
  z-index:4;
  float:right;
  width:42px;height:42px;
  margin:-12px -12px 0 12px;
  border:0;border-radius:50%;
  background:#263426;color:#fff;
  font:400 27px/1 "Manrope",sans-serif;
  cursor:pointer;
}

.world-search-eyebrow{display:block;margin:2px 0 7px;color:#a45f2e;font:800 11px/1.2 "Manrope",sans-serif;letter-spacing:.18em}
.world-search-panel h2{margin:0 54px 6px 0;color:#243127;font:700 clamp(28px,4vw,43px)/1.04 "Playfair Display",serif}
.world-search-panel>p{margin:0 0 24px;color:#60645f;font:600 13px/1.55 "Manrope",sans-serif}
.world-search-label{display:block;margin:18px 0 9px;color:#343a36;font:800 12px/1.2 "Manrope",sans-serif}
.world-query-row{display:grid;grid-template-columns:1fr auto;gap:10px}
.world-query-row input{min-width:0;height:50px;padding:0 17px;border:1px solid #dfd2c1;border-radius:14px;background:#fff;color:#303732;font:700 14px "Manrope",sans-serif;outline:none}
.world-query-row input:focus{border-color:#ad713f;box-shadow:0 0 0 3px rgba(173,113,63,.12)}
.world-query-row button{height:50px;padding:0 22px;border:0;border-radius:14px;background:linear-gradient(135deg,#9f592d,#c47737);color:#fff;font:800 13px "Manrope",sans-serif;cursor:pointer;box-shadow:0 10px 24px rgba(143,77,36,.22)}
.world-query-row button:disabled{opacity:.6;cursor:wait}
.world-option-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}
.world-option,.world-category-option{min-height:41px;padding:8px 10px;border:1px solid rgba(126,91,57,.16);border-radius:12px;background:rgba(255,255,255,.75);color:#414641;font:750 11px/1.2 "Manrope",sans-serif;cursor:pointer}
.world-option:hover,.world-category-option:hover,.world-option.selected,.world-category-option.selected{border-color:#a96531;background:#29372b;color:#fff;box-shadow:0 8px 18px rgba(42,55,43,.16)}
.world-category-grid{display:flex;flex-wrap:wrap;gap:8px}
.world-category-option{min-height:36px;border-radius:999px;padding:8px 14px;text-transform:capitalize}
.world-search-panel .world-search-status{min-height:20px;margin:14px 0 0;color:#9f592d;font-size:12px;font-weight:800}
.recipe-source-badge{display:inline-flex;margin-bottom:8px;padding:4px 8px;border-radius:999px;background:#eee2cf;color:#76502f;font:800 9px/1 "Manrope",sans-serif;text-transform:uppercase;letter-spacing:.08em}

@media(max-width:980px){
  html body .hero-bg>.world-search-launcher{display:none !important}
  html body .mobile-world-search-bar{
    display:flex !important;
    position:absolute !important;
    top:8px !important;
    left:8px !important;
    right:8px !important;
    z-index:20 !important;
    width:auto !important;
    margin:0 !important;
    padding:8px !important;
    flex-direction:column !important;
    gap:7px !important;
    border:1px solid rgba(226,190,127,.5) !important;
    border-radius:20px !important;
    background:linear-gradient(135deg,rgba(31,44,34,.98),rgba(44,61,46,.96)) !important;
    box-shadow:0 12px 28px rgba(18,28,20,.2) !important;
  }
  html body .mobile-hero-big{position:relative !important}
  html body .mobile-world-search-open{
    width:100% !important;
    min-height:38px !important;
    justify-content:center !important;
  }
  html body .mobile-world-flags{
    display:flex !important;
    width:100% !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:4px !important;
  }
  html body .mobile-world-flags button{
    display:grid !important;
    place-items:center !important;
    width:28px !important;
    height:25px !important;
    padding:2px !important;
    border:0 !important;
    border-radius:7px !important;
    background:#fff !important;
    background-image:none !important;
    box-shadow:none !important;
  }
  html body .mobile-world-flags img{display:block;width:22px;height:15px;object-fit:cover;border-radius:2px}
  html body #hero .world-search-launcher{
    top:10px !important;
    left:12px !important;
    right:auto !important;
    width:calc(100% - 24px) !important;
    min-height:72px !important;
    display:flex !important;
    align-items:flex-start !important;
    flex-wrap:wrap !important;
    gap:7px !important;
    z-index:30 !important;
  }
  html body #hero .world-search-open{width:auto !important;min-width:176px !important;min-height:38px !important;padding:8px 12px !important;font-size:10px !important}
  html body #hero .world-flag-row{order:2;flex:0 0 100% !important;width:100% !important;min-height:35px !important;gap:5px;padding:5px 7px}
  .world-flag-row button{width:28px;height:25px;padding:2px}
  .world-flag-row button img{width:22px;height:15px}
  .world-search-modal{padding:12px}
  .world-search-panel{width:100%;max-height:88dvh;padding:24px 18px;border-radius:24px}
  .world-search-panel h2{font-size:29px}
  .world-query-row{grid-template-columns:1fr}
  .world-query-row button{width:100%}
  .world-option-grid{grid-template-columns:repeat(2,1fr)}
  .world-search-close{margin:-6px -4px 0 8px}
}

/* Shared premium button skin. Dimensions remain owned by each component. */
html body button:not(.upload-card):not(.world-search-close):not(.ingredient-modal-close):not(.signup-invite-close):not(.favorite-btn),
html body .gallery-mini-btn,
html body .hero-strip-button,
html body #joinNiliBtn{
  border-color:rgba(226,190,127,.55) !important;
  border-radius:999px !important;
  background:linear-gradient(135deg,rgba(31,44,34,.96),rgba(44,61,46,.94)) !important;
  color:#fffaf0 !important;
  box-shadow:0 10px 25px rgba(18,28,20,.18),inset 0 1px 0 rgba(255,255,255,.1) !important;
  backdrop-filter:blur(8px) !important;
  transition:transform .2s ease,background .2s ease,border-color .2s ease,box-shadow .2s ease !important;
}

html body button:not(.upload-card):not(.world-search-close):not(.ingredient-modal-close):not(.signup-invite-close):not(.favorite-btn):hover,
html body button:not(.upload-card):not(.world-search-close):not(.ingredient-modal-close):not(.signup-invite-close):not(.favorite-btn):focus-visible,
html body .gallery-mini-btn:hover,
html body .gallery-mini-btn:focus-visible,
html body .hero-strip-button:hover,
html body .hero-strip-button:focus-visible,
html body #joinNiliBtn:hover,
html body #joinNiliBtn:focus-visible{
  border-color:#e2be7f !important;
  background:linear-gradient(135deg,#354a38,#1f3024) !important;
  color:#fffdf5 !important;
  box-shadow:0 14px 30px rgba(18,28,20,.25),0 0 0 2px rgba(226,190,127,.13) !important;
  transform:translateY(-2px) !important;
  outline:none !important;
}

html body button:not(.upload-card):not(.world-search-close):not(.ingredient-modal-close):not(.signup-invite-close):not(.favorite-btn):disabled{
  opacity:.58 !important;
  transform:none !important;
  cursor:not-allowed !important;
}

/* Keep flag controls visually light while sharing the same interaction quality. */
html body .world-flag-row button{
  border:0 !important;
  background:rgba(255,255,255,.12) !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
}

html body .world-flag-row button:hover,
html body .world-flag-row button:focus-visible{
  background:#fff !important;
  box-shadow:0 6px 14px rgba(16,24,18,.22) !important;
}

html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn,
html body #sidebar.sidebar-unified .upload-card #galleryBtnText{
  color:#fffaf0 !important;
}

html body #sidebar.sidebar-unified #categoryGrid .category-btn,
html body #sidebar.sidebar-unified .gallery-mini-btn,
html body #sidebar.sidebar-unified .manual button,
html body #sidebar.sidebar-unified #joinNiliBtn{
  border-color:rgba(226,190,127,.55) !important;
  border-radius:999px !important;
  background:linear-gradient(135deg,rgba(31,44,34,.96),rgba(44,61,46,.94)) !important;
  color:#fffaf0 !important;
  box-shadow:0 10px 25px rgba(18,28,20,.18),inset 0 1px 0 rgba(255,255,255,.1) !important;
}

html body #sidebar.sidebar-unified #categoryGrid .category-btn:hover,
html body #sidebar.sidebar-unified #categoryGrid .category-btn:focus-visible,
html body #sidebar.sidebar-unified .gallery-mini-btn:hover,
html body #sidebar.sidebar-unified .gallery-mini-btn:focus-visible,
html body #sidebar.sidebar-unified .manual button:hover,
html body #sidebar.sidebar-unified .manual button:focus-visible{
  border-color:#e2be7f !important;
  background:linear-gradient(135deg,#354a38,#1f3024) !important;
  color:#fffdf5 !important;
}

html body #hero .world-search-launcher .world-flag-row button{
  border:0 !important;
  background:rgba(255,255,255,.9) !important;
  background-image:none !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
}

html body #hero .world-search-launcher .world-flag-row button:hover,
html body #hero .world-search-launcher .world-flag-row button:focus-visible{
  background:#fff !important;
  box-shadow:0 6px 14px rgba(16,24,18,.22) !important;
}

/* Keep the hero feature buttons readable on the dark premium surface. */
html body .hero-floating-strip .hero-strip-button,
html body .hero-floating-strip .hero-strip-button span,
html body .hero-floating-strip .hero-strip-button strong{
  color:#fffaf0 !important;
  text-shadow:0 1px 2px rgba(0,0,0,.24) !important;
}

html body .hero-floating-strip .hero-strip-button .hero-strip-label{
  color:#e7c77f !important;
}

/* Categories stay light so the sidebar does not become visually heavy. */
html body #sidebar.sidebar-unified #categoryGrid .category-btn{
  border-color:rgba(157,105,58,.25) !important;
  background:linear-gradient(135deg,#fffaf2,#ead9c5) !important;
  color:#343b36 !important;
  box-shadow:0 5px 13px rgba(67,45,27,.09),inset 0 1px 0 rgba(255,255,255,.85) !important;
}

html body #sidebar.sidebar-unified #categoryGrid .category-btn:hover,
html body #sidebar.sidebar-unified #categoryGrid .category-btn:focus-visible,
html body #sidebar.sidebar-unified #categoryGrid .category-btn.active{
  border-color:#d4aa65 !important;
  background:linear-gradient(135deg,#405640,#26382d) !important;
  color:#fffaf0 !important;
  box-shadow:0 9px 20px rgba(31,48,35,.2) !important;
}

/* Language codes remain readable beside every flag. */
html body .lang-btn,
html body #langBtn,
html body .lang-btn span,
html body #langBtn span{
  color:#fffaf0 !important;
  text-shadow:0 1px 2px rgba(0,0,0,.2) !important;
}

html body #langOptions,
html body .lang-options{
  border:1px solid rgba(226,190,127,.42) !important;
  background:#26382d !important;
  box-shadow:0 14px 32px rgba(18,28,20,.25) !important;
}

html body #langOptions button,
html body .lang-options button,
html body #langOptions button span,
html body .lang-options button span{
  background:#26382d !important;
  background-image:none !important;
  color:#fffaf0 !important;
  text-shadow:none !important;
}

html body #langOptions button:hover,
html body #langOptions button:focus-visible,
html body .lang-options button:hover,
html body .lang-options button:focus-visible{
  background:#3f5942 !important;
  color:#fff !important;
}

/* Desktop scan card uses the shared premium green. */
@media(min-width:981px){
  html body #sidebar.sidebar-unified .upload-card{
    border-color:rgba(226,190,127,.48) !important;
    background:linear-gradient(135deg,rgba(31,44,34,.98),rgba(44,61,46,.96)) !important;
    box-shadow:0 12px 28px rgba(18,28,20,.2),inset 0 1px 0 rgba(255,255,255,.09) !important;
  }
}

/* Final mobile gallery contrast override. */
@media(max-width:980px){
  html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn,
  html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn *,
  html body #sidebar.sidebar-unified .upload-card #galleryBtnText{
    background-color:#fff8ed !important;
    background-image:none !important;
    color:#263a2c !important;
    -webkit-text-fill-color:#263a2c !important;
    text-shadow:none !important;
  }

  html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn:hover,
  html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn:focus-visible,
  html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn:active{
    background-color:#314a37 !important;
  }

  html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn:hover *,
  html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn:focus-visible *,
  html body #sidebar.sidebar-unified .upload-card .gallery-mini-btn:active *{
    color:#fffaf0 !important;
    -webkit-text-fill-color:#fffaf0 !important;
  }
}

/* Final mobile spacing: brand -> world cuisines -> hero. */
@media(max-width:980px){
  html body #sidebar.sidebar-unified .sidebar-shell>.mobile-world-search-bar{
    margin:13px 0 5px !important;
    top:8px !important;
  }

  html body #sidebar.sidebar-unified .sidebar-shell>.mobile-hero-big{
    margin-top:-2px !important;
  }
}

/* Absolute final override for scrollable premium recipe results. */
html body.show-recipes-page{height:auto!important;min-height:100vh!important;max-height:none!important;overflow-x:hidden!important;overflow-y:auto!important}
html body.show-recipes-page #content,html body.show-recipes-page .content{height:auto!important;min-height:100vh!important;max-height:none!important;overflow:visible!important;padding-bottom:48px!important}
html body.show-recipes-page #result,html body.show-recipes-page #result.grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-auto-rows:auto!important;align-items:stretch!important;height:auto!important;min-height:0!important;max-height:none!important;gap:18px!important;overflow:visible!important;padding:8px 0 24px!important}
html body.show-recipes-page .recipe-card{position:relative!important;display:flex!important;height:auto!important;min-height:520px!important;flex-direction:column!important;gap:0!important;padding:10px!important;overflow:hidden!important;border:1px solid rgba(151,103,57,.18)!important;border-radius:28px!important;background:linear-gradient(150deg,#fffdf8,#f5eadb)!important;box-shadow:0 18px 42px rgba(54,38,23,.12)!important;transition:transform .2s ease,box-shadow .2s ease!important}
html body.show-recipes-page .recipe-card:hover{transform:translateY(-5px)!important;box-shadow:0 26px 54px rgba(42,31,20,.18)!important}
html body.show-recipes-page .recipe-card-title{min-height:52px!important;margin:2px 8px 9px!important;display:flex!important;align-items:center!important;justify-content:center!important;color:#29362d!important;font-family:"Playfair Display",serif!important;font-size:21px!important;font-weight:700!important;line-height:1.12!important;text-align:center!important}
html body.show-recipes-page .recipe-card-image-wrap{flex:0 0 235px!important;width:100%!important;height:235px!important;min-height:235px!important;overflow:hidden!important;border-radius:20px!important;background:#e6d6c2!important}
html body.show-recipes-page .recipe-card-image-wrap img{width:100%!important;height:100%!important;object-fit:cover!important}
html body.show-recipes-page .recipe-card-body{display:flex!important;flex:1 1 auto!important;flex-direction:column!important;padding:13px 8px 7px!important}
html body.show-recipes-page .recipe-card-meta{justify-content:center!important;gap:6px!important}
html body.show-recipes-page .recipe-meta-pill{padding:6px 9px!important;background:#efe1ce!important;color:#54483d!important;font-size:9px!important;font-weight:800!important}
html body.show-recipes-page .recipe-ingredients{display:flex!important;max-height:none!important;margin:11px 0 8px!important;flex-wrap:wrap!important;justify-content:center!important;gap:5px!important;overflow:visible!important}
html body.show-recipes-page .recipe-preview{margin-top:auto!important;padding-top:9px!important;border-top:1px solid rgba(125,86,51,.12)!important;color:#665e55!important;font-size:10px!important;line-height:1.5!important}
html body.show-recipes-page #recipeResultActions{position:relative!important;bottom:auto!important;margin:5px auto 0!important}
@media(max-width:1100px) and (min-width:701px){html body.show-recipes-page #result,html body.show-recipes-page #result.grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:700px){html body.show-recipes-page #result,html body.show-recipes-page #result.grid{grid-template-columns:1fr!important}html body.show-recipes-page .recipe-card{min-height:500px!important}}
