:root{
  --cream:#f6f5eb;
  --paper:#fffdf5;
  --forest:#193b2a;
  --ink:#223829;
  --muted:#66745f;
  --lime:#dce991;
  --border:#dce0cb;
}
*{
  box-sizing:border-box;
}
html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
  color-scheme:light;
}
body{
  margin:0;
  background:var(--cream);
  color:var(--ink);
  font:16px/1.55 "Segoe UI",system-ui,sans-serif;
}
button,input,select{
  font:inherit;
}
button,a{
  -webkit-tap-highlight-color:transparent;
}
a{
  color:inherit;
}
button{
  -webkit-appearance:none;
  appearance:none;
  cursor:pointer;
}
[hidden]{
  display:none!important;
}
svg{
  width:24px;
  height:24px;
  flex-shrink:0;
}
:where(a,button,input):focus-visible{
  outline:3px solid #9aaa51;
  outline-offset:4px;
}
.site-header,main,.site-footer{
  width:min(1160px,calc(100% - 48px));
  margin-inline:auto;
}
.site-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding-block:25px;
}
.brand{
  display:flex;
  align-items:center;
  gap:7px;
  text-decoration:none;
  font-weight:800;
  font-size:1.65rem;
  letter-spacing:-.06em;
}
.brand-mark{
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.brand-mark img{
  display: block;
  width: 100%;
  height: 100%;
}
.header-actions,.account-control{
  display:flex;
  gap:16px;
  align-items:center;
}
.account-control{
  gap:8px;
}
#account-name{
  max-width:150px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.9rem;
  font-weight:650;
}
.language-toggle{
  position:relative;
  isolation:isolate;
  display:grid;
  grid-template-columns:1fr 1fr;
  border:1px solid #bac5a6;
  padding:3px;
  border-radius:100px;
}
.language-toggle::before{
  content:"";
  position:absolute;
  z-index:-1;
  inset:3px auto 3px 3px;
  width:calc((100% - 6px)/2);
  background:var(--forest);
  border-radius:100px;
}
.language-toggle[data-active=en]::before{
  transform:translateX(100%);
}
.language-toggle button{
  border:0;
  border-radius:100px;
  background:transparent;
  color:var(--ink);
  padding:7px 13px;
  font-size:.8rem;
  font-weight:700;
}
.language-toggle button[aria-pressed=true]{
  color:var(--paper);
}
.lang-short{
  display:none;
}
.auth-button,.primary-button,.icon-button{
  display:inline-flex;
  justify-content:center;
  align-items:center;
  gap:10px;
  text-decoration:none;
  border:0;
  font-weight:700;
}
.auth-button{
  min-height:42px;
  padding:8px 16px;
  border-radius:100px;
  background:#e9ecd9;
  color:var(--forest);
  font-size:.9rem;
}
.auth-button svg{
  width:18px;
  height:18px;
}
.icon-button{
  border:1px solid var(--border);
  width:40px;
  height:40px;
  padding:8px;
  background:transparent;
  border-radius:50%;
  color:var(--ink);
}
.icon-button svg{
  width:20px;
  height:20px;
}
.primary-button{
  background:var(--lime);
  color:var(--forest);
  padding:13px 21px;
  border-radius:100px;
  min-height:48px;
  font-size:.95rem;
}
.primary-button svg{
  width:20px;
  height:20px;
}
.eyebrow{
  font-size:.72rem;
  font-weight:750;
  letter-spacing:.17em;
  text-transform:uppercase;
  margin:0 0 20px;
}
.welcome-hero{
  display:grid;
  grid-template-columns:1.15fr 1fr;
  align-items:center;
  min-height:490px;
  padding:52px 60px;
  gap:40px;
  overflow:hidden;
  border-radius:30px;
  background:var(--forest);
  color:var(--paper);
}
.hero-copy{
  position:relative;
  z-index:1;
}
.hero-copy .eyebrow{
  color:var(--lime);
}
h1{
  font-size:clamp(2.8rem,6vw,5.7rem);
  line-height:.99;
  letter-spacing:-.065em;
  font-weight:750;
  margin:0;
}
.hero-intro{
  max-width:34ch;
  color:#d5decd;
  margin:25px 0 27px;
}
.hero-visual{
  position:relative;
  display:grid;
  place-items:center;
  min-width:0;
}
.hero-photo{
  width:100%;
  aspect-ratio:1;
  border-radius:50%;
  object-fit:cover;
  box-shadow:0 18px 35px #0c251f4a;
}
.hero-orbit{
  position:absolute;
  inset:-17px;
  border:1px solid #dce99140;
  border-radius:50%;
}
.photo-caption{
  position:absolute;
  bottom:0;
  left:50%;
  transform:translate(-50%,35%);
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
  padding:10px 18px;
  border-radius:100px;
  background:var(--paper);
  color:var(--forest);
  box-shadow:0 5px 20px #0c251f18;
  font-size:.8rem;
  font-weight:700;
}
.photo-caption svg{
  width:18px;
  height:18px;
}
.welcome-note{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:22px;
  max-width:650px;
  margin:38px auto 0;
}
.welcome-note>svg{
  width:44px;
  height:44px;
  color:#7a8d58;
}
.welcome-note h2{
  margin:0 0 4px;
  font-size:1.15rem;
  letter-spacing:-.03em;
}
.welcome-note p{
  color:var(--muted);
  font-size:.9rem;
  margin:0;
}
.site-footer{
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:12px;
  margin-top:35px;
  padding-block:20px 135px;
  border-top:1px solid var(--border);
  font-size:.75rem;
  color:var(--muted);
}
.site-footer a{
  text-underline-offset:3px;
}
.bottom-nav{
  position:fixed;
  z-index:5;
  bottom:20px;
  bottom:calc(20px + env(safe-area-inset-bottom,0px));
  left:50%;
  transform:translateX(-50%);
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:4px;
  width:min(590px,calc(100% - 28px));
  padding:7px;
  border:1px solid #d1d7c2;
  background:#fffdf5f5;
  border-radius:25px;
  box-shadow:0 7px 32px #193b2a18;
  -webkit-backdrop-filter:blur(14px);
  backdrop-filter:blur(14px);
}
.bottom-nav a{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:4px;
  min-height:63px;
  border-radius:18px;
  text-decoration:none;
  color:var(--muted);
  font-size:.78rem;
  font-weight:650;
}
.bottom-nav a[aria-current]{
  background:var(--forest);
  color:var(--paper);
}
.meal-heading{
  padding-block:28px 35px;
}
.meal-heading .eyebrow{
  color:#6e7e48;
  margin-bottom:13px;
}
.meal-heading h1{
  font-size:clamp(2.5rem,5vw,4.1rem);
  max-width:20ch;
}
.meal-heading>p:not(.eyebrow){
  color:var(--muted);
  max-width:55ch;
  margin:18px 0;
}
.recipe-count{
  display:inline-flex;
  align-items:center;
  gap:9px;
  font-size:.8rem;
  font-weight:650;
}
.recipe-count svg{
  width:18px;
  height:18px;
}
.recipe-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:22px;
}
.recipe-card{
  min-width:0;
  overflow:hidden;
  background:var(--paper);
  border:1px solid var(--border);
  border-radius:23px;
}
.recipe-image{
  position:relative;
  aspect-ratio:1.5;
  background:#e9ecd9;
}
.recipe-photo{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}
.recipe-number{
  position:absolute;
  top:14px;
  left:14px;
  display:grid;
  place-items:center;
  width:32px;
  height:32px;
  border-radius:50%;
  background:var(--paper);
  color:var(--forest);
  font-size:.72rem;
  font-weight:750;
}
.recipe-content{
  padding:23px;
}
.recipe-serving{
  color:var(--muted);
  margin:0 0 6px;
  font-size:.72rem;
}
.recipe-content h2{
  margin:0;
  font-size:1.5rem;
  line-height:1.2;
  letter-spacing:-.04em;
}
.recipe-content h3{
  display:flex;
  align-items:center;
  gap:7px;
  margin:22px 0 9px;
  font-size:.82rem;
}
.recipe-content h3 svg{
  width:16px;
  height:16px;
  color:#7b8e50;
}
.ingredient-list{
  list-style:none;
  margin:0;
  padding:0;
}
.ingredient-list li{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:14px;
  padding-block:8px;
  border-bottom:1px solid #e8eadc;
  font-size:.82rem;
}
.ingredient-list li:last-child{
  border:0;
}
.ingredient-list li span:last-child{
  flex-shrink:0;
  max-width:52%;
  color:var(--muted);
  text-align:right;
}
.photo-placeholder{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:9px;
  width:100%;
  height:100%;
  padding:20px;
  color:#71845c;
}
.photo-placeholder>svg{
  width:52px;
  height:52px;
  stroke-width:1;
}
.photo-placeholder>span{
  font-size:.8rem;
  font-weight:650;
}
.photo-placeholder code{
  font-size:.66rem;
  overflow-wrap:anywhere;
  text-align:center;
}
dialog{
  position:fixed;
  width:min(430px,calc(100% - 32px));
  max-height:calc(100% - 32px);
  padding:34px;
  border:1px solid var(--border);
  border-radius:26px;
  background:var(--paper);
  color:var(--ink);
  box-shadow:0 25px 100px #10271940;
}
dialog::backdrop{
  background:#0d281b70;
  -webkit-backdrop-filter:blur(5px);
  backdrop-filter:blur(5px);
}
.dialog-close{
  position:absolute;
  top:16px;
  right:16px;
}
.dialog-symbol{
  display:grid;
  place-items:center;
  width:54px;
  height:54px;
  margin-bottom:24px;
  border-radius:17px;
  font-size:2.2rem;
  background:var(--lime);
  color:var(--forest);
}
dialog .eyebrow{
  margin-bottom:10px;
  font-size:.65rem;
}
dialog h2{
  font-size:2.1rem;
  font-weight:700;
  line-height:1.05;
  letter-spacing:-.05em;
  margin:0 0 13px;
}
.muted{
  color:var(--muted);
}
dialog .muted{
  font-size:.9rem;
}
#login-form{
  margin-top:25px;
}
#login-form label{
  display:block;
  font-size:.82rem;
  font-weight:700;
  margin-bottom:7px;
}
#name{
  width:100%;
  min-height:48px;
  padding:10px 13px;
  border:1px solid #b5c0a5;
  border-radius:12px;
  background:var(--cream);
  color:var(--ink);
  font-size:.9rem;
}
.full-width{
  width:100%;
  justify-content:space-between;
  margin-top:10px;
}
.cookie-note{
  color:var(--muted);
  font-size:.72rem;
  text-align:center;
  margin:18px 0 0;
}
.form-error{
  font-size:.8rem;
  color:#9f3e2d;
  margin:7px 0;
}
.form-error:empty{
  display:none;
}
.skip-link{
  position:fixed;
  z-index:20;
  top:8px;
  left:8px;
  padding:8px 15px;
  border-radius:8px;
  background:var(--lime);
  transform:translateY(-150%);
}
.skip-link:focus{
  transform:translateY(0);
}
.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
}
@media(prefers-reduced-motion:no-preference){
  .language-toggle::before{
    transition:transform 240ms cubic-bezier(.22,.7,.28,1);
  }
  a,button{
    transition:background-color 160ms ease,color 160ms ease;
  }
}
@media(hover:hover){
  .primary-button:hover{
    background:#cdda7c;
  }
  .auth-button:hover,.icon-button:hover{
    background:var(--border);
  }
  .bottom-nav a:not([aria-current]):hover{
    background:#edf0df;
    color:var(--forest);
  }
}
@media(max-width:900px){
  .welcome-hero{
    padding:42px 36px;
    gap:30px;
    min-height:440px;
  }
  h1{
    font-size:clamp(3rem,6.5vw,5rem);
  }
  .recipe-grid{
    gap:16px;
  }
  .recipe-content{
    padding:20px 16px;
  }
  .ingredient-list li{
    font-size:.78rem;
  }
}
@media(max-width:740px){
  .recipe-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .welcome-hero{
    grid-template-columns:1fr;
    padding:34px;
    gap:35px;
  }
  .hero-visual{
    width:min(270px,80%);
    margin:0 auto 15px;
  }
  .hero-copy h1{
    font-size:clamp(3.2rem,9vw,4.4rem);
  }
  .hero-intro{
    max-width:42ch;
  }
}
@media(max-width:500px){
  .site-header,main,.site-footer{
    width:calc(100% - 32px);
  }
  .site-header{
    padding-block:19px;
    gap:8px;
  }
  .brand{
    font-size:1.4rem;
    gap:4px;
  }
  .brand-mark{
    width: 28px;
    height: 28px;
  }
  .header-actions{
    gap:8px;
  }
  .lang-long,.auth-label,#account-name{
    display:none;
  }
  .lang-short{
    display:inline;
  }
  .language-toggle button{
    padding:8px 10px;
    font-size:.68rem;
    min-height:34px;
  }
  .auth-button{
    width:38px;
    min-height:38px;
    padding:9px;
  }
  .account-control{
    gap:0;
  }
  .welcome-hero{
    padding:30px 25px;
    border-radius:24px;
  }
  .hero-copy h1{
    font-size:3.35rem;
  }
  .hero-copy .eyebrow{
    font-size:.62rem;
    letter-spacing:.13em;
  }
  .hero-intro{
    font-size:.95rem;
    margin-block:21px 24px;
  }
  .hero-visual{
    width:min(230px,84%);
  }
  .welcome-note{
    gap:15px;
    margin-top:28px;
  }
  .welcome-note>svg{
    width:34px;
    height:34px;
  }
  .welcome-note h2{
    font-size:1rem;
  }
  .welcome-note p{
    font-size:.82rem;
  }
  .bottom-nav{
    bottom:12px;
    bottom:calc(12px + env(safe-area-inset-bottom,0px));
  }
  .bottom-nav a{
    min-height:58px;
    font-size:.68rem;
  }
  .bottom-nav svg{
    width:21px;
    height:21px;
  }
  .meal-heading{
    padding-block:20px 27px;
  }
  .meal-heading h1{
    font-size:2.8rem;
  }
  .meal-heading>p:not(.eyebrow){
    font-size:.9rem;
  }
  .recipe-grid{
    grid-template-columns:1fr;
    gap:22px;
  }
  .recipe-content{
    padding:23px;
  }
  .ingredient-list li{
    font-size:.88rem;
  }
  dialog{
    padding:28px;
  }
  .site-footer{
    padding-bottom:120px;
  }
}

.recipe-card {
  display: flex;
  flex-direction: column;
}
.recipe-image {
  flex: 0 0 auto;
}
.recipe-image :is(.recipe-photo, .photo-placeholder) {
  position: absolute;
  inset: 0;
}
.recipe-content {
  display: flex;
  flex: 1;
  flex-direction: column;
}
.recipe-content .ingredient-list {
  margin-bottom: 22px;
}
.recipe-add {
  width: 100%;
  margin-top: auto;
  min-height: 44px;
  scroll-margin-bottom: 120px;
}
.recipe-add svg {
  width: 18px;
  height: 18px;
}
.recipe-popover {
  display: none;
  z-index: 10;
  position: fixed;
  inset: auto;
  margin: 0;
  width: min(320px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  padding: 24px;
  border: 1px solid #bdc9a9;
  border-radius: 22px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 14px 48px #193b2a30;
}
.recipe-popover[data-open=true] {
  display: block;
}
.recipe-popover::backdrop {
  background: transparent;
}
.recipe-popover .eyebrow {
  font-size: .62rem;
  margin-bottom: 9px;
  padding-right: 28px;
  color: var(--muted);
}
.recipe-popover h2 {
  font-size: 1.3rem;
  line-height: 1.2;
  letter-spacing: -.035em;
  margin: 0 0 18px;
}
.popover-close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 30px;
  height: 30px;
  padding: 5px;
}
.recipe-popover label {
  display: block;
  margin: 12px 0 5px;
  font-size: .8rem;
  font-weight: 700;
}
.recipe-popover select {
  width: 100%;
  min-height: 43px;
  padding: 8px 10px;
  border: 1px solid #b5c0a5;
  border-radius: 10px;
  background: var(--cream);
  color: var(--ink);
  font: inherit;
  font-size: .86rem;
}
.recipe-popover .full-width {
  margin-top: 20px;
}
.recipe-popover :is(button, select):focus-visible {
  outline: 3px solid #9aaa51;
  outline-offset: 3px;
}
@media (hover: hover) {
  .recipe-card:hover {
    box-shadow: 0 8px 26px #193b2a16;
  }
}
.recipe-card:focus-within {
  box-shadow: 0 8px 26px #193b2a16;
}
@media (prefers-reduced-motion: no-preference) {
  .recipe-card {
    transition: box-shadow 180ms ease;
  }
  .recipe-popover[data-open=true] {
    transform-origin: bottom center;
    animation: recipe-popup-enter 170ms cubic-bezier(.2, .7, .3, 1) both;
  }
  @keyframes recipe-popup-enter {
    from {
      opacity: 0;
      transform: translateY(5px) scale(.98);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
}

.recipe-add {
  border: 1px solid transparent;
}
.recipe-add[data-selected=true] {
  background: #e9ecd9;
  border-color: #bac5a6;
}
.recipe-add[data-selected=true]:hover {
  background: #e0e6cf;
}
.recipe-add .selection-vertical {
  transform-origin: 12px 12px;
}
.recipe-add[data-selected=true] .selection-vertical {
  transform: rotate(90deg);
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .recipe-add .selection-vertical {
    transition: transform 160ms ease, opacity 160ms ease;
  }
}

@media (max-width: 500px) {
  .welcome-hero {
    row-gap: 0;
  }
  .hero-copy {
    display: contents;
  }
  .hero-visual {
    order: 1;
    margin: 14px auto 30px;
  }
  .hero-copy > .primary-button {
    order: 2;
    justify-self: center;
    margin-top: 12px;
  }
}

.food-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: -8px;
}
.food-toolbar label {
  margin-right: 2px;
  font-size: .8rem;
  font-weight: 650;
}
.sort-select-wrap {
  position: relative;
  min-width: 190px;
}
.sort-select-wrap > svg {
  position: absolute;
  z-index: 1;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: #718452;
  pointer-events: none;
}
.sort-select-wrap::after {
  content: "";
  position: absolute;
  right: 17px;
  top: calc(50% - 5px);
  width: 6px;
  height: 6px;
  border: solid var(--forest);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  pointer-events: none;
}
.food-toolbar select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-height: 44px;
  padding: 10px 35px 10px 40px;
  border: 1px solid #bac5a6;
  border-radius: 100px;
  background: var(--paper);
  color: var(--forest);
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
}
.sort-direction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 160px;
  min-height: 44px;
  padding: 7px 16px 7px 10px;
  border: 1px solid #c7d1b5;
  border-radius: 100px;
  background: #e9ecd9;
  color: var(--forest);
  font: inherit;
  font-size: .8rem;
  font-weight: 650;
}
.sort-direction span {
  white-space: nowrap;
}
.sort-direction svg {
  width: 27px;
  height: 27px;
  padding: 5px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--lime);
}
.sort-direction[data-direction=asc] svg {
  transform: rotate(180deg);
}
.food-toolbar :is(select,button):focus-visible {
  outline: 2px solid #9aaa51;
  outline-offset: 3px;
}
@media (hover: hover) {
  .food-toolbar select:hover {
    border-color: #7f9361;
    background: #fbfcf0;
  }
  .sort-direction:hover {
    background: #dfe7c9;
    border-color: #a5b68e;
    box-shadow: 0 3px 12px #193b2a10;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .food-toolbar select,
  .sort-direction {
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  }
  .sort-direction svg {
    transition: transform 180ms cubic-bezier(.2,.7,.3,1);
  }
}
.nutrition-note {
  margin: 15px 0 24px;
  max-width: 65ch;
  color: var(--muted);
  font-size: .78rem;
}
.nutrition-note summary {
  cursor: pointer;
  text-underline-offset: 3px;
}
.nutrition-note p {
  margin: 9px 0 0;
}
.health-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 11px;
  border: 1px solid #dce0cb80;
  border-radius: 13px;
  background: #fffdf5f5;
  color: var(--forest);
  line-height: 1.1;
}
.health-badge > span {
  font-size: .6rem;
}
.health-badge strong {
  font-size: 1.1rem;
}
.health-badge small {
  margin-left: 2px;
  font-size: .68rem;
  font-weight: 400;
  color: var(--muted);
}
.nutrition-summary {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 8px;
  font-size: .74rem;
  color: var(--muted);
}
.nutrient-bar {
  display: flex;
  height: 8px;
  overflow: hidden;
  border-radius: 100px;
  background: #e9ecd9;
}
.nutrient-bar > span {
  display: block;
}
.macro-0 { background: #47745a; }
.macro-1 { background: #d6b85c; }
.macro-2 { background: #b67755; }
.nutrient-values {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px;
  margin: 11px 0 6px;
}
.nutrient-values dt {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .67rem;
  color: var(--muted);
}
.nutrient-values dt i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.nutrient-values dd {
  margin: 2px 0 0 10px;
  font-size: .86rem;
  font-weight: 650;
}
.macro-caption {
  margin: 0;
  font-size: .6rem;
  color: var(--muted);
}
.hero-visual {
  aspect-ratio: 1;
}
.hero-photo-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #dce99140;
  color: #d5decd;
  font-size: .85rem;
}


/* Full picker support is required; some engines implement appearance first. */
@supports (appearance: base-select) and selector(::picker(select)) {
  #food-sort,
  #food-sort::picker(select) {
    appearance: base-select;
  }
  #food-sort::picker-icon {
    display: none;
  }
  #food-sort::picker(select) {
    min-width: anchor-size(width);
    max-height: min(360px, 60vh);
    max-height: min(360px, 60dvh);
    margin-top: 8px;
    padding: 6px;
    overflow-y: auto;
    border: 1px solid #bac5a6;
    border-radius: 20px;
    background: var(--paper);
    color: var(--forest);
    box-shadow: 0 12px 32px #193b2a20;
  }
  #food-sort option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    margin: 2px 0;
    padding: 10px 12px;
    border-radius: 13px;
    color: var(--forest);
    font-family: inherit;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
  }
  #food-sort option:checked {
    background: var(--forest);
    color: var(--paper);
  }
  #food-sort option:not(:checked):is(:hover, :focus-visible) {
    background: #e9ecd9;
    outline: none;
  }
  #food-sort option::checkmark {
    order: 1;
    margin-left: auto;
    color: var(--lime);
  }
  #food-sort:open {
    border-color: #7f9361;
    box-shadow: 0 0 0 3px #dce99130;
  }
  .sort-select-wrap:has(#food-sort:open)::after {
    transform: rotate(225deg);
  }
  @media (prefers-reduced-motion: no-preference) {
    .sort-select-wrap::after {
      transition: transform 160ms ease;
    }
    #food-sort::picker(select) {
      animation: food-picker-enter 140ms ease-out;
    }
    #food-sort option {
      transition: background-color 120ms ease, color 120ms ease;
    }
    @keyframes food-picker-enter {
      from { opacity: 0; transform: translateY(-3px); }
      to { opacity: 1; transform: translateY(0); }
    }
  }
}

@media (max-width: 500px) {
  .food-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px;
    align-items: center;
  }
  .food-toolbar label {
    grid-column: 1 / -1;
    margin: 0 0 2px;
  }
  .sort-select-wrap > svg {
    display: none;
  }
  .sort-select-wrap {
    min-width: 0;
    width: 100%;
  }
  .food-toolbar select {
    min-width: 0;
    width: 100%;
    height: 44px;
    padding: 10px 34px 10px 14px;
    white-space: nowrap;
    font-size: .8rem;
  }
  .sort-direction {
    position: relative;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 7px;
    gap: 0;
    border-radius: 50%;
  }
  .sort-direction svg {
    width: 26px;
    height: 26px;
  }
  .sort-direction span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  /* Full picker support is required; some engines implement appearance first. */
  @supports (appearance: base-select) and selector(::picker(select)) {
    #food-sort::picker(select) {
      max-width: calc(100vw - 32px);
      max-height: min(340px, 50vh);
      max-height: min(340px, 50dvh);
      margin-top: 6px;
    }
    #food-sort option {
      min-height: 44px;
      padding: 12px;
    }
  }
}

.dialog-symbol img {
  display: block;
  width: 32px;
  height: 32px;
}

.credits-section {
  margin: 32px 0;
}
.credits-section h2 {
  margin-bottom: 16px;
}
.credits-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.credits-list li {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--paper);
  overflow-wrap: anywhere;
}
.credits-list h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}
.credits-list small {
  font-size: .85em;
  font-weight: 400;
}
.credits-list p {
  margin: 6px 0 0;
  font-size: .8rem;
  line-height: 1.65;
}
.credits-list code {
  display: block;
  margin-top: 4px;
}
@media (max-width: 640px) {
  .credits-list { grid-template-columns: 1fr; }
}

/* Native pickers remain usable in Firefox, Safari, and touch browsers. */
.recipe-popover select {
  -webkit-appearance: menulist;
  appearance: auto;
  min-width: 0;
}
@media (max-width: 740px) {
  #name, .recipe-popover select, .food-toolbar select {
    font-size: 16px;
  }
}
@supports not selector(:focus-visible) {
  :where(a, button, input, select):focus {
    outline: 3px solid #9aaa51;
    outline-offset: 3px;
  }
}

/* Meal calendar and per-day shopping list. */
#meal-calendar { margin-top: 48px; padding-top: 38px; border-top: 1px solid var(--border); scroll-margin-top: 24px; }
.planner-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.planner-heading .eyebrow { color: var(--muted); margin-bottom: 12px; }
.planner-heading h2 { font-size: clamp(1.8rem,4vw,2.6rem); letter-spacing: -.05em; line-height: 1.1; margin: 0; }
.planner-heading p:not(.eyebrow) { color: var(--muted); margin: 12px 0 0; }
.planner-heading > svg { width: 42px; height: 42px; color: #7a8d58; }
.planner-gate { display: flex; align-items: center; gap: 20px; padding: 28px; background: #e9ecd9; border-radius: 24px; }
.planner-gate > svg { width: 38px; height: 38px; }
.planner-gate > div { flex: 1; }
.planner-gate h2 { font-size: 1.2rem; margin: 0 0 6px; letter-spacing: -.03em; }
.planner-gate p { color: var(--muted); margin: 0; font-size: .9rem; }
.quiet-button { font: inherit; color: var(--forest); background: var(--paper); border: 1px solid #bac5a6; border-radius: 100px; min-height: 42px; padding: 8px 16px; font-size: .85rem; font-weight: 650; }
.calendar-controls { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin: 28px 0 18px; }
.week-navigation, .calendar-date-control { display: flex; align-items: center; gap: 10px; }
.week-navigation p { margin: 0; font-size: .9rem; font-weight: 650; text-align: center; }
.recipe-popover input[type=date], .planned-servings { min-width: 0; border: 1px solid #bac5a6; border-radius: 12px; padding: 9px 12px; min-height: 42px; font: inherit; color: var(--forest); background: var(--paper); }
.calendar-week { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 8px; }
.calendar-day { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; border: 1px solid var(--border); border-radius: 18px; background: var(--paper); color: var(--ink); padding: 14px 5px; font: inherit; }
.calendar-day > span { font-size: .78rem; text-transform: capitalize; }
.calendar-day strong { font-size: 1.55rem; line-height: 1.3; }
.calendar-day small { font-size: .65rem; color: var(--muted); }
.calendar-day.is-today { border-color: #799261; }
.calendar-day[aria-pressed=true] { background: var(--forest); border-color: var(--forest); color: var(--paper); }
.calendar-day[aria-pressed=true] small { color: var(--lime); }
#calendar-message:empty { display: none; }
.planner-columns { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); gap: 24px; align-items: start; margin-top: 24px; }
.daily-plan, .daily-shopping { min-width: 0; padding: 26px; border-radius: 24px; border: 1px solid var(--border); background: var(--paper); }
.daily-shopping { background: #eef0e2; }
.daily-plan header, .daily-shopping header { margin-bottom: 22px; }
.planner-columns .eyebrow { color: var(--muted); font-size: .65rem; margin-bottom: 10px; }
.planner-columns h3 { font-size: 1.35rem; letter-spacing: -.035em; line-height: 1.25; margin: 0; }
.daily-plan h3::first-letter { text-transform: uppercase; }
.daily-shopping header > p:not(.eyebrow) { font-size: .85rem; color: var(--muted); margin: 7px 0 0; }
.meal-slot + .meal-slot { border-top: 1px solid var(--border); margin-top: 20px; padding-top: 20px; }
.meal-slot-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.meal-slot-heading h4 { display: inline-flex; gap: 9px; align-items: center; margin: 0; font-size: .95rem; }
.meal-slot-heading h4 svg { width: 20px; height: 20px; color: #7a8d58; }
.meal-slot-heading a { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; color: var(--forest); text-decoration: none; padding: 8px 4px; }
.meal-slot-heading a svg { width: 16px; height: 16px; }
.empty-meal { font-size: .85rem; color: var(--muted); margin: 14px 0 0; }
.planned-meals, .shopping-list { list-style: none; padding: 0; margin: 0; }
.planned-meal { display: flex; justify-content: space-between; gap: 10px; align-items: start; padding: 15px 0 0; }
.planned-meal-copy { min-width: 0; }
.planned-meal h5 { font-size: .98rem; line-height: 1.35; margin: 0 0 9px; }
.planned-meal-copy > span { font-size: .75rem; color: var(--muted); margin-right: 8px; }
.planned-servings { min-height: 36px; font-size: .8rem; padding: 5px 8px; }
.planned-remove { width: 32px; height: 32px; padding: 6px; flex-shrink: 0; }
.shopping-caption, .shopping-footnote { font-size: .76rem; color: var(--muted); margin: 0 0 14px; }
.shopping-footnote { margin: 18px 0 0; font-size: .7rem; }
.shopping-item { display: grid; grid-template-columns: 19px minmax(0,1fr) auto; align-items: start; gap: 10px; padding: 12px 0; border-bottom: 1px solid #d9deca; cursor: pointer; }
.shopping-item > span { font-size: .85rem; line-height: 1.4; overflow-wrap: anywhere; }
.shopping-item strong { font-size: .78rem; font-weight: 650; text-align: right; max-width: 12ch; overflow-wrap: anywhere; }
.shopping-item input { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border: 1px solid #8d9f78; border-radius: 5px; background: var(--paper); margin: 2px 0 0; cursor: pointer; }
.shopping-item input:checked { border-color: var(--forest); background-color: var(--forest); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 10 3 3 7-7' stroke='white' fill='none' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.shopping-item.is-checked > span, .shopping-item.is-checked > strong { text-decoration: line-through; opacity: .55; }
.shopping-empty { text-align: center; color: var(--muted); padding: 25px 10px; font-size: .9rem; }
.shopping-empty svg { width: 44px; height: 44px; color: #7a8d58; }
.planner-loading { padding: 30px; margin-top: 24px; border: 1px solid var(--border); background: var(--paper); border-radius: 24px; }
.planner-storage-note { color: var(--muted); font-size: .73rem; margin: 18px 0 0; }
.recipe-popover input[type=date] { display: block; width: 100%; background: var(--cream); font-size: .86rem; }
.recipe-popover input:focus-visible, .planned-servings:focus-visible, .calendar-day:focus-visible, .shopping-item input:focus-visible { outline: 3px solid #9aaa51; outline-offset: 3px; }
.portion-preview { margin-top: 15px; font-size: .76rem; color: var(--muted); }
.portion-preview summary { cursor: pointer; }
.portion-preview ul { list-style: none; padding: 0; margin: 10px 0 0; max-height: 140px; overflow-y: auto; }
.portion-preview li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.portion-preview strong { text-align: right; font-weight: 500; flex-shrink: 0; max-width: 50%; }
.plan-feedback { margin-top: 20px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 14px 18px; border: 1px solid #cbd79d; border-radius: 18px; background: #e9efcd; color: var(--forest); font-size: .85rem; }
.plan-feedback > svg { width: 19px; height: 19px; }
.plan-feedback a { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; margin-left: auto; }
.plan-feedback a svg { width: 17px; height: 17px; }
@media (hover:hover) { .calendar-day:not([aria-pressed=true]):hover, .quiet-button:hover { background: #e9ecd9; border-color: #9aaa80; } }
@media (prefers-reduced-motion:no-preference) { .calendar-day { transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease; } }
@media (max-width:740px) { .planner-columns { grid-template-columns: 1fr; } .planner-gate { flex-wrap: wrap; } .recipe-popover input[type=date], .planned-servings { font-size: 16px; } }
@media (max-width:500px) {
 #meal-calendar { margin-top: 32px; padding-top: 28px; }
 .planner-heading > svg { display: none; }
 .calendar-controls { gap: 14px; }
 .week-navigation { width: 100%; justify-content: space-between; }
 .calendar-date-control { width: 100%; justify-content: flex-end; }
 .calendar-week { gap: 4px; }
 .calendar-day { padding: 10px 3px; border-radius: 13px; }
 .calendar-day > span { font-size: .65rem; }
 .calendar-day strong { font-size: 1.25rem; }
 .calendar-day small { font-size: .55rem; }
 .daily-plan, .daily-shopping { padding: 22px 18px; }
 .planner-gate { gap: 14px; padding: 22px; }
 .planner-gate > svg { display: none; }
 .planner-gate > .primary-button { width: 100%; }
 .plan-feedback { padding: 12px; }
 .plan-feedback a { margin-left: 0; }
}

/* Consistent date-selection menu in Chromium, Firefox, and Safari. */
.date-menu-trigger { display: inline-flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 44px; min-width: 170px; padding: 10px 15px; border: 1px solid #bac5a6; border-radius: 100px; font: inherit; font-size: .85rem; font-weight: 600; color: var(--forest); background: var(--paper); }
.date-menu-trigger svg { width: 18px; height: 18px; color: #718452; }
.date-menu-trigger[aria-expanded=true] { border-color: #7f9361; box-shadow: 0 0 0 3px #dce99140; }
.date-menu-panel { display: none; position: fixed; z-index: 20; inset: auto; margin: 0; width: min(336px,calc(100vw - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 18px; border: 1px solid #bac5a6; border-radius: 24px; background: var(--paper); color: var(--ink); box-shadow: 0 15px 45px #193b2a30; }
.date-menu-panel[data-open=true] { display: block; }
.date-menu-panel::backdrop { background: transparent; }
.date-menu-top { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; }
.date-menu-top p { margin: 0; font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 750; color: var(--muted); }
.date-menu-panel .icon-button { width: 34px; height: 34px; padding: 7px; flex-shrink: 0; }
.date-menu-panel .icon-button svg { width: 18px; height: 18px; }
.date-menu-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.date-menu-heading h3 { margin: 0; text-align: center; font-size: 1.08rem; line-height: 1.3; letter-spacing: -.03em; }
.date-menu-selects { display: grid; grid-template-columns: minmax(0,1fr) 96px; gap: 8px; margin-bottom: 15px; }
.date-menu-selects select { min-width: 0; width: 100%; min-height: 38px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 12px; background: var(--cream); color: var(--forest); font: inherit; font-size: .8rem; text-transform: capitalize; }
.date-menu-row { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 3px; }
.date-menu-weekdays { margin: 0 0 6px; }
.date-menu-weekdays span { font-size: .67rem; font-weight: 700; text-align: center; padding: 5px 0; color: var(--muted); }
.date-menu-day { position: relative; display: block; width: 100%; min-width: 0; height: 36px; border: 1px solid transparent; border-radius: 11px; padding: 6px 0; background: transparent; color: var(--forest); font: inherit; font-size: .8rem; font-weight: 600; }
.date-menu-day.is-other-month { color: #9ca58f; font-weight: 400; }
.date-menu-day.is-today { border-color: #8a9c6b; }
.date-menu-panel [aria-selected=true] .date-menu-day { background: var(--forest); color: var(--paper); border-color: var(--forest); font-weight: 750; }
.date-menu-dot { position: absolute; bottom: 3px; left: calc(50% - 2px); width: 4px; height: 4px; border-radius: 50%; background: #7d9153; }
.date-menu-panel [aria-selected=true] .date-menu-dot { background: var(--lime); }
.date-menu-panel button:disabled { opacity: .3; cursor: default; }
.date-menu-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--border); padding-top: 14px; margin-top: 12px; }
.date-menu-footer > span { color: var(--muted); font-size: .7rem; max-width: 21ch; }
.date-menu-footer .quiet-button { min-height: 36px; padding: 6px 13px; background: #e9ecd9; font-size: .78rem; }
.date-menu-panel :is(button,select):focus-visible, .date-menu-trigger:focus-visible { outline: 3px solid #9aaa51; outline-offset: 2px; }
@media (hover:hover) { .date-menu-trigger:hover { border-color: #7f9361; background: #fbfcf0; } .date-menu-panel [aria-selected=false] .date-menu-day:not(:disabled):hover { background: #e9ecd9; color: var(--forest); } }
@media (prefers-reduced-motion:no-preference) {
 .date-menu-panel[data-open=true] { animation: date-menu-enter 160ms cubic-bezier(.2,.7,.3,1) both; }
 .date-menu-day, .date-menu-trigger { transition: background-color 140ms ease,border-color 140ms ease,color 140ms ease; }
 @keyframes date-menu-enter { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
}
@media (max-width:500px) { .date-menu-trigger { min-width: 163px; font-size: .85rem; } .date-menu-panel { padding: 16px; } .date-menu-selects select { min-height: 42px; font-size: 16px; } .date-menu-day { height: 40px; } .date-menu-panel .icon-button { width: 38px; height: 38px; } }
