@font-face {
  font-family: DinnerIcons;
  src: url('./assets/icons.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: block;
}

:root {
  color-scheme: light;
  --paper: #f8f5ec;
  --white: #fffcf6;
  --ink: #243329;
  --muted: #575f52;
  --green: #234536;
  --mint: #e4ecdc;
  --line: #dfded0;
  --rust: #9d422d;
  --peach: #f2dbcb;
  --serif: Georgia, 'Times New Roman', serif;
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-content-safe-area-inset-bottom, 0px));
  color: var(--ink);
  background: var(--paper);
  font-family: system-ui, 'Segoe UI', sans-serif;
  font-size: 100%;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, select, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .58; }
button, a, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
a { color: var(--green); text-underline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -.035em; }
h1 { font-size: clamp(2.15rem, 7vw, 3.35rem); line-height: 1; }
h2 { font-size: clamp(1.6rem, 5vw, 2.12rem); line-height: 1.12; }
h3 { font-size: 1.04rem; line-height: 1.28; }
p { line-height: 1.55; }
.icon {
  font-family: DinnerIcons;
  font-weight: 400;
  font-style: normal;
  font-size: 1.3rem;
  line-height: 1;
  display: inline-block;
  flex: none;
  width: 1em;
  white-space: nowrap;
  overflow: hidden;
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}
.layout { max-width: 1260px; margin: 0 auto; }
.layout.credits { display: block; max-width: 42rem; padding: 22px 18px; }
.credits > p { margin: 10px 0 18px; }
.credits li { margin-bottom: 6px; }
.credit-sources { margin-top: 8px; }
.credit-sources summary { color: var(--green); cursor: pointer; font-weight: 650; padding: 6px 0; }
.brandbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; }
.brand, .plus-tag, .tabs button { border: 0; background: none; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.06rem; font-weight: 770; padding: 0; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; object-fit: cover; }
.plus-tag { display: flex; align-items: center; gap: 5px; min-height: 42px; padding: 0 12px; border-radius: 20px; color: #7b3423; background: var(--peach); font-size: .89rem; font-weight: 730; }
.plus-tag .icon { font-size: 1.05rem; }
.tabs { z-index: 2; position: fixed; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(4, 1fr); padding: 5px 12px calc(6px + var(--safe-bottom)); border-top: 1px solid var(--line); background: var(--white); }
.tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; font-size: .875rem; color: var(--muted); border-radius: 17px; }
.tabs button[aria-current] { background: var(--mint); color: var(--green); font-weight: 720; }
.profile-icon { position: relative; display: block; width: 1.3rem; height: 1.3rem; flex: none; }
.profile-icon::before, .profile-icon::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); border: 1.6px solid currentColor; }
.profile-icon::before { width: 6px; height: 6px; top: 2px; border-radius: 50%; }
.profile-icon::after { width: 13px; height: 6px; bottom: 1px; border-radius: 9px 9px 3px 3px; }
#screen { padding: 9px 18px calc(93px + var(--safe-bottom)); outline: 0; }
.loading { padding: 30px 10px; color: var(--muted); }
.today-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 13px; margin-top: 12px; }
.today-tools button { display: inline-flex; align-items: center; gap: 4px; }
.today-head { margin: clamp(12px, 3vw, 24px) 0 12px; }
.today-head h1 { color: var(--green); }
.today-head p { margin-top: 8px; }
.today-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 9px; }
.search-button { display: inline-flex; align-items: center; gap: 5px; color: var(--green); padding-inline: 4px; }
.plus-prompt { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 14px; margin: 18px 0 0; padding: 9px 14px; border-radius: 15px; background: var(--mint); color: var(--green); }
.plus-prompt small { display: block; margin-top: 3px; color: var(--muted); }
.plus-prompt button { display: inline-flex; align-items: center; gap: 5px; padding-inline: 6px; }
.plus-prompt .icon { font-size: 1.05rem; }
#selected-title { margin-top: 0; }
section[aria-labelledby="selected-title"] { margin-top: 18px; }
.plus-benefits { padding: 10px 4px; }
.plus-benefits ul { margin: 0; padding-inline-start: 20px; line-height: 1.8; }
.page-head { margin: 13px 0 22px; }
.page-head p, .dim { color: var(--muted); }
.page-head p { margin-top: 8px; }
.portion { background: var(--mint); border: 0; flex-shrink: 0; display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 11px; border-radius: 999px; font-size: .875rem; font-weight: 700; }
.portion .icon { font-size: 1.08rem; }
.cards { display: grid; gap: 9px; }
.recipe { display: flex; gap: 12px; align-items: center; text-align: left; padding: 13px; min-height: 78px; width: 100%; border-radius: 16px; border: 1px solid var(--line); background: var(--white); }
.recipe:hover, .pick:hover, .secondary:hover { border-color: var(--green); }
.recipe > span:nth-child(2) { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.recipe strong { display: block; margin-bottom: 4px; line-height: 1.26; }
.glyph { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; flex: none; background: var(--mint); color: var(--green); }
.glyph.clay { background: var(--peach); color: var(--rust); }
.glyph.gold { background: #f1e1b5; color: #65541f; }
.meta { color: var(--muted); display: inline-flex; align-items: center; gap: 5px; font-size: .875rem; }
.meta .icon { font-size: 1rem; }
.recipe-meta { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; }
.rating { color: #714318; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.rating small, .rating.unrated { color: var(--muted); font-size: .8rem; font-weight: 450; }
.recipe-action { font-size: .875rem; color: var(--green); font-weight: 700; }
.recipe[data-action="shopping-recipe"] .recipe-action { max-width: 62px; text-align: right; }
.recipe-thumb { width: 70px; height: 58px; flex: none; overflow: hidden; border-radius: 10px; background: var(--mint); }
.recipe-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.recipe-detail-photo { width: 100%; height: clamp(122px, 30vw, 192px); object-fit: cover; border-radius: 14px; background: var(--mint); }
.recipe-thumb .original-photo, .recipe-detail-photo.original-photo { object-fit: contain; }
.meal-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-bottom: 12px; padding: 4px; border-radius: 15px; background: #efebdf; }
.meal-filter { display: grid; place-items: center; min-height: 44px; padding: 0 2px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: var(--muted); font-size: clamp(.72rem, 3.35vw, .875rem); line-height: 1.2; font-weight: 650; }
.meal-filter[aria-pressed="true"] { background: var(--white); color: var(--green); border-color: var(--line); box-shadow: 0 1px 3px #23332410; }
.meal-filter:focus-visible { outline: 0; text-decoration: underline; text-underline-offset: 3px; }
.recipe, .primary, .secondary, .meal-filter, .pass-option { transition: background-color 150ms ease, border-color 150ms ease, transform 120ms ease; }
.recipe:active, .primary:active, .secondary:active, .meal-filter:active, .pass-option:active { transform: scale(.98); }
.panel { padding: 19px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); }
.panel p + p, .panel h2 + p, .panel h3 + p { margin-top: 7px; }
.panel + .panel { margin-top: 12px; }
.panel.tint { background: var(--mint); }
.stack { display: grid; align-content: start; gap: 12px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.primary, .secondary, .quiet, .pick, .round { min-height: 45px; padding: 10px 14px; border: 1px solid transparent; border-radius: 12px; font-weight: 675; }
.primary { background: var(--green); color: #fffaf0; }
.primary:hover:enabled { background: #315a47; }
.secondary { background: var(--white); border-color: var(--line); }
.quiet { background: transparent; color: var(--green); padding-inline: 3px; text-decoration: underline; text-underline-offset: 4px; }
.wide { width: 100%; }
.empty { display: grid; justify-items: start; gap: 9px; padding: 25px 21px; }
.empty p { max-width: 37rem; }
.empty .primary { margin-top: 6px; }
.plan-days { display: grid; gap: 8px; margin: 14px 0; }
.plan-days .recipe { min-height: 70px; }
.day { font-size: .875rem; color: var(--rust); font-weight: 700; }
.grid { display: grid; align-items: start; gap: 12px; }
.grid > .panel { margin-top: 0; }
.plan-grid > .stack > .quiet, .shopping-grid > .stack > .quiet { justify-self: start; padding-inline: 12px; }
.pick { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; background: var(--white); border-color: var(--line); }
.pick[aria-pressed="true"] { background: var(--mint); border-color: #a8ba9f; }
.pick small { display: block; font-size: .875rem; font-weight: 450; color: var(--muted); margin-top: 2px; }
.shopping-items { list-style: none; padding: 0; margin: 0; }
.shopping-items li { border-top: 1px solid var(--line); }
.shopping-items .item { border: 0; background: transparent; width: 100%; padding: 12px 0; display: flex; gap: 10px; align-items: center; text-align: left; }
.item-copy { flex: 1; min-width: 0; }
.item-copy strong { display: block; line-height: 1.35; overflow-wrap: anywhere; }
.item-copy small, .quantity { font-size: .875rem; color: var(--muted); }
.quantity { flex: 0 0 auto; max-width: 37%; text-align: right; }
.item-status { box-sizing: content-box; width: 19px; height: 19px; flex: none; border: 1px solid #a6af9f; border-radius: 6px; color: var(--green); background: var(--white); display: grid; place-items: center; }
.item-status.marked { background: var(--mint); border-color: #a0b498; }
.item-status .icon { font-size: 1rem; }
.ingredients { padding: 0; list-style: none; margin: 0; }
.ingredients li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); line-height: 1.42; }
.ingredients li span:nth-child(2) { text-align: right; max-width: 44%; font-size: .9rem; }
.ingredient-note { font-size: .875rem; color: var(--muted); }
.pass-options { display: grid; gap: 7px; }
.pass-option { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: baseline; min-height: 60px; padding: 11px 12px; text-align: left; border: 1px solid var(--line); border-radius: 13px; background: var(--white); }
.pass-option[aria-pressed="true"] { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.pass-option span { grid-column: 2; grid-row: 1 / 3; align-self: center; font-weight: 700; color: var(--green); }
.pass-option small { grid-column: 1; color: var(--muted); font-size: .875rem; }
.plus-panel { background: var(--mint); }
.plus-panel ul { margin: 5px 0 8px; padding-left: 21px; line-height: 1.6; }
.radio-row { display: flex; gap: 8px; align-items: flex-start; line-height: 1.45; }
.radio-row input { accent-color: var(--green); width: 18px; height: 18px; flex: 0 0 auto; }
.support { padding: 10px 3px; }
.round { width: 44px; display: grid; place-items: center; padding: 0; background: var(--paper); }
dialog { position: fixed; inset: auto 0 0; border: 0; margin: 0 auto; width: min(100%, 34rem); max-width: 100%; max-height: min(85dvh, 780px); overflow: auto; background: var(--white); color: var(--ink); border-radius: 25px 25px 0 0; padding: 0; box-shadow: 0 12px 50px #151d1440; }
dialog::backdrop { background: #17251bb5; }
dialog[open] .sheet-inner { animation: lift-sheet 190ms ease-out both; }
@keyframes lift-sheet { from { opacity: .6; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.sheet-inner { position: relative; padding: 23px 20px calc(24px + var(--safe-bottom)); }
.sheet-inner h2 { padding-right: 46px; }
.sheet-close, .sheet-close:focus-visible { position: absolute; top: 14px; right: 14px; padding: 0; border: 0; background: transparent; outline: 0; box-shadow: none; appearance: none; }
.sheet-close .icon { font-size: 1.5rem; }
.finish-button { width: 100%; }
.profile-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.profile-stats > div { min-width: 0; border-radius: 12px; background: var(--mint); padding: 12px; font-size: .92rem; }
.profile-stats strong { display: block; font-size: 1.5rem; color: var(--green); }
.ticket-title { min-width: 0; overflow-wrap: anywhere; }
.photo-credits { justify-self: start; font-size: .9rem; }
.favorite-panel { grid-column: 1 / -1; }
.favorite-panel > button { justify-self: start; }
.favorite-toggle[aria-pressed="true"] { border-color: #a8ba9f; background: var(--mint); color: var(--green); }
.profile-settings { grid-column: 1 / -1; }
.profile-settings > button { justify-self: start; }
.setting-up .tabs, .setting-up .plus-tag { display: none; }
.setting-up #screen { grid-column: 1 / -1; display: grid; justify-items: center; padding-bottom: calc(30px + var(--safe-bottom)); }
.setup-card { --setup-shift: 13px; display: grid; gap: 15px; width: min(100%, 34rem); padding: clamp(16px, 4vw, 29px); animation: setup-enter 250ms ease-out both; }
.setup-card.backwards { --setup-shift: -13px; }
.setup-card h1 { font-size: clamp(1.95rem, 7vw, 2.75rem); line-height: 1.1; outline: 0; }
.setup-progress { display: flex; gap: 5px; }
.setup-progress span { flex: 1; height: 3px; border-radius: 4px; background: var(--line); }
.setup-progress .filled { background: var(--green); }
.setup-photo { width: 100%; height: clamp(120px, 34vw, 192px); object-fit: cover; border-radius: 14px; }
.setup-equipment { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.setup-option { min-height: 48px; padding: 9px; text-align: left; overflow-wrap: anywhere; }
.setup-option[aria-pressed="true"] { background: var(--mint); border-color: #748f75; color: var(--green); }
.setup-styles .setup-option { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 13px; }
.setup-styles small { display: block; margin-top: 3px; }
.setup-check { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid #829582; border-radius: 6px; }
.setup-check .icon { visibility: hidden; font-size: .95rem; }
[aria-pressed="true"] .setup-check { background: var(--green); border-color: var(--green); color: var(--white); }
[aria-pressed="true"] .setup-check .icon { visibility: visible; }
.setup-option small { color: var(--muted); font-size: .88rem; font-weight: 400; }
.setup-actions { display: flex; align-items: center; gap: 9px; }
.setup-actions .primary { margin-inline-start: auto; min-width: 110px; }
.setup-loader { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--mint); border-top-color: var(--green); animation: setup-spin .85s linear infinite; }
@keyframes setup-enter { from { transform: translateX(var(--setup-shift)); opacity: .55; } to { transform: translateX(0); opacity: 1; } }
@keyframes setup-spin { to { transform: rotate(1turn); } }
.field { display: grid; gap: 7px; }
.field input, .field textarea { display: block; width: 100%; padding: 11px 12px; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.field textarea { resize: vertical; }
.review-stars { display: flex; gap: 4px; justify-content: space-between; }
.star-button { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #8a4d22; font-size: 1.6rem; }
.star-button[aria-pressed="true"] { background: var(--peach); }
.submitted-text, .message-list p { white-space: pre-wrap; overflow-wrap: anywhere; }
.message-list { display: grid; gap: 7px; padding: 0; margin: 0; list-style: none; }
.message-list li { border-radius: 12px; background: var(--paper); padding: 10px 12px; }
.sheet-actions { display: grid; gap: 8px; }
.portions-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.portions-grid button[aria-pressed="true"] { background: var(--green); color: var(--white); }
.notice { position: fixed; z-index: 5; left: 50%; bottom: calc(75px + var(--safe-bottom)); transform: translateX(-50%); padding: 10px 14px; background: var(--green); color: var(--white); border-radius: 12px; width: max-content; max-width: calc(100% - 32px); box-shadow: 0 4px 16px #2333242b; }
.notice:empty { display: none; }
.sheet-notice { margin-top: 10px; color: var(--rust); font-size: .9rem; }
.sheet-notice:empty { display: none; }

@media (min-width: 700px) {
  .layout { display: grid; grid-template-columns: 176px 1fr; grid-template-rows: auto 1fr; padding: 16px 24px; column-gap: 22px; }
  .brandbar { grid-column: 1 / -1; padding: 0 0 18px; border-bottom: 1px solid var(--line); }
  .tabs { position: sticky; top: 22px; align-self: start; display: grid; grid-template-columns: 1fr; gap: 5px; background: none; border: 0; padding: 21px 0; }
  .tabs button { flex-direction: row; justify-content: flex-start; gap: 9px; min-height: 51px; padding: 0 13px; font-size: .97rem; }
  #screen { min-width: 0; padding: 21px 0 45px; }
  dialog { inset: 0; margin: auto; border-radius: 23px; }
  .notice { bottom: 25px; }
}
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-grid { grid-template-columns: minmax(0, 1.55fr) minmax(13rem, 1fr); }
  .shopping-grid { grid-template-columns: minmax(10rem, 13rem) minmax(0, 1fr); }
  .recipe[data-action="shopping-recipe"] .recipe-action { max-width: none; }
}
@media (min-width: 1000px) {
  .layout { gap: 0 30px; grid-template-columns: 190px 1fr; padding-inline: 32px; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards .recipe { min-height: 126px; align-items: start; flex-direction: column; }
  .cards .recipe.with-photo { padding: 8px 8px 13px; gap: 10px; }
  .cards .recipe.with-photo > span:nth-child(2) { padding-inline: 5px; }
  .cards .recipe-thumb { width: 100%; height: 125px; }
  .cards .recipe-action { display: none; }
}
@media (max-width: 359px) {
  #screen, .brandbar { padding-inline: 12px; }
  .recipe-action { display: none; }
  .recipe[data-action="shopping-recipe"] .recipe-action { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  .recipe, .primary, .secondary, .meal-filter, .pass-option { transition: none; }
  .recipe:active, .primary:active, .secondary:active, .meal-filter:active, .pass-option:active { transform: none; }
  dialog[open] .sheet-inner, .setup-card, .setup-loader { animation: none; }
}
