/* Qozonly — styles follow «Qozonly — дизайн приложения»: Rubik for the interface, Cormorant Garamond
   for the wordmark only, spice colours. Font files are the ones packed in the design (SIL OFL,
   see fonts/LICENSE-OFL.txt); rarely used ranges load from Google Fonts exactly as in the design. */

/* latin */
@font-face {
  font-family: 'Rubik'; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(/static/fonts/rubik-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Rubik'; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(https://fonts.gstatic.com/s/rubik/v31/iJWKBXyIfDnIV7nPrXyi0A.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* cyrillic */
@font-face {
  font-family: 'Rubik'; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(/static/fonts/rubik-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Rubik'; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(https://fonts.gstatic.com/s/rubik/v31/iJWKBXyIfDnIV7nMrXyi0A.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* Cormorant Garamond 700, latin — the wordmark */
@font-face {
  font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/static/fonts/cormorant-garamond-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Calm palette (2026-10-23): a light warm background and one accent, Rayhon green. Large bright yellow
     surfaces tired people's eyes, so --zafaron is now a pale green tint for cards and strips; red stays for
     spicy and warnings only. */
  --zafaron: #E6F0E8;   /* soft accent surface (was saffron) */
  --accent: #2E6B45;    /* the one accent: buttons, active tab, progress */
  --accent-ink: #1F4A30;
  --qalampir: #C2410C;  /* Qalampir — pepper */
  --dolchin: #7A3E1D;   /* Dolchin — cinnamon */
  --rayhon: #2E6B45;    /* Rayhon — basil */
  --komir: #1E1A16;     /* Ko'mir — charcoal */
  --sut: #FAF8F4;       /* Sut — page background, warm white */
  --oq: #FFFFFF;        /* Oq — white */
  /* Supporting tones from the screens */
  --text-2: #3E2C1C;
  --muted: #6B4A33;
  --line: #E8E2D8;
  --line-2: #D6CEC2;
  --divider: #EFEBE4;
  --beige: #F2EEE7;
  --beige-2: #EFEAE2;
  --done: #8F7A66;
  --ok-bg: #E3EFE6; --ok-text: #1F4A30;
  --bad-bg: #FBE3D6; --bad-text: #8A2E08;
  --tag-bg: #F2EEE7; --tag-text: #5C3A1C;
  --note-bg: #F3EFE8;
  --nav-muted: #BFB3A3;
  --dark-2: #2E2722; --dark-line: #4A3F36; --dark-muted: #CFC4B6; --dark-faint: #A89C8C;
  --safe-b: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--sut); }
body {
  min-height: 100vh;
  background: var(--sut); color: var(--komir);
  font-family: 'Rubik', system-ui, sans-serif; font-size: 15px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
body.dark { background: var(--komir); }
body.saffron { background: var(--sut); }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1 { font-weight: 700; text-wrap: balance; }
p { text-wrap: pretty; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#app { position: relative; max-width: 480px; margin: 0 auto; min-height: 100vh; }
.page { padding: 20px 20px calc(120px + var(--safe-b)); display: flex; flex-direction: column; gap: 16px; }
.page.tight { padding-left: 16px; padding-right: 16px; }
.page.with-bar { padding-bottom: calc(112px + var(--safe-b)); }
.page.plain { padding-bottom: calc(36px + var(--safe-b)); }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.grow { flex-grow: 1; min-width: 0; }

.title { font-size: 28px; line-height: 34px; }
.sub { font-size: 15px; line-height: 21px; color: var(--muted); }
.label { font-size: 12px; color: var(--muted); }
.h2 { margin: 0; font-size: 17px; font-weight: 600; }
.small { font-size: 13px; color: var(--muted); }

/* Surfaces */
.card { background: var(--oq); border-radius: 22px; padding: 14px 16px; }
.card.r20 { border-radius: 20px; }
.card.r24 { border-radius: 24px; }
.note { display: flex; gap: 12px; padding: 14px 16px; border-radius: 22px; background: var(--note-bg); }
.note.ok { background: var(--ok-bg); }
.note b { font-size: 15px; font-weight: 600; }
.note span { font-size: 14px; line-height: 20px; color: var(--text-2); }

/* Buttons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; padding: 0 18px; border: none; border-radius: 18px;
  font-size: 17px; font-weight: 600; text-decoration: none;
  transition-property: scale, opacity; transition-duration: 150ms; transition-timing-function: ease-out;
}
.btn.md { height: 52px; font-size: 16px; }
.btn.sm { height: 48px; border-radius: 16px; font-size: 15px; }
.btn.red { background: var(--accent); color: var(--oq); }
.btn.dark { background: var(--komir); color: var(--oq); }
.btn.saffron { background: var(--accent); color: var(--oq); }
.btn.outline { background: transparent; border: 2px solid var(--komir); color: var(--komir); }
.btn.dashed { height: 52px; border-radius: 20px; border: 2px dashed var(--line-2); background: transparent; color: var(--muted); font-size: 15px; font-weight: 500; }
.btn:disabled { opacity: .5; cursor: default; }
.square {
  width: 44px; height: 44px; flex-shrink: 0; border: none; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; background: var(--oq); color: var(--komir);
  transition-property: scale; transition-duration: 150ms; transition-timing-function: ease-out;
}
.square.beige { background: var(--beige); font-size: 22px; }
.square.glass { background: rgba(255, 255, 255, 0.45); }
.square.dark { background: var(--dark-2); color: var(--oq); }
.ghost-icon { width: 44px; height: 44px; flex-shrink: 0; border: none; background: transparent; display: flex; align-items: center; justify-content: center; }
@media (prefers-reduced-motion: no-preference) {
  .btn:not(:disabled):active, .square:active, .tile:active, .tap:active, .chip:active { scale: 0.96; }
}
.bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; max-width: 480px; margin: 0 auto;
  padding: 12px 20px calc(28px + var(--safe-b));
  background: linear-gradient(to top, var(--sut) 70%, rgba(255, 246, 234, 0));
  display: grid; gap: 10px;
}
.bottom-bar.dark { background: linear-gradient(to top, var(--komir) 70%, rgba(30, 26, 22, 0)); }
.bottom-bar.saffron-bg { background: linear-gradient(to top, var(--sut) 70%, rgba(250, 248, 244, 0)); }
.bottom-bar.two { grid-template-columns: 1fr 1fr; }
.bottom-bar.one-two { grid-template-columns: 1fr 2fr; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll-x { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips.scroll-x .chip { flex-shrink: 0; }
.chip {
  height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--oq); color: var(--komir); font-size: 14px;
  transition-property: scale, background-color, color; transition-duration: 150ms;
}
.chip[aria-pressed="true"] { border-color: var(--komir); background: var(--komir); color: var(--oq); font-weight: 500; }
.seg { height: 44px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--oq); font-size: 14px; }
.seg[aria-pressed="true"] { border-color: var(--komir); background: var(--komir); color: var(--oq); font-weight: 600; }
.pill { padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.6); font-size: 13px; font-weight: 500; white-space: nowrap; }
.pill.beige { background: var(--beige); }
.tag { align-self: flex-start; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--tag-bg); color: var(--tag-text); white-space: nowrap; }
.tag.ok { background: var(--ok-bg); color: var(--ok-text); }
.tag.bad { background: var(--bad-bg); color: var(--bad-text); }
.badge { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; flex-shrink: 0; }
.badge.ok { background: var(--ok-bg); color: var(--ok-text); }
.badge.bad { background: var(--bad-bg); color: var(--bad-text); }

/* Progress (onboarding steps, recipe steps) */
.steps-bar { flex-grow: 1; display: grid; gap: 6px; }
.steps-bar div { height: 6px; border-radius: 3px; background: var(--line); }
.steps-bar div.on { background: var(--komir); }
.steps-bar.red { gap: 4px; }
.steps-bar.red div { height: 5px; }
.steps-bar.red div.on { background: var(--accent); }
.count-pill { padding: 6px 12px; border-radius: 999px; background: var(--komir); color: var(--oq); font-size: 13px; font-weight: 600; }

/* Rows: dish rows, member rows, list rows */
.rows { display: flex; flex-direction: column; gap: 8px; }
.dish { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 20px; background: var(--oq); text-align: left; border: none; width: 100%; color: inherit; }
.dish .name { font-size: 15px; font-weight: 600; }
.dish .meta { font-size: 13px; color: var(--muted); }
.dish svg { flex-shrink: 0; }
.member { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 20px; background: var(--oq); }
.avatar { width: 44px; height: 44px; border-radius: 22px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; }
.avatar.sm { width: 28px; height: 28px; border-radius: 14px; font-size: 12px; font-weight: 600; border: 2px solid var(--oq); }
.av-me { background: var(--zafaron); color: var(--komir); }
.av-spouse { background: var(--komir); color: var(--oq); }
.av-kids { background: var(--rayhon); color: var(--oq); font-size: 15px; }
.av-elder { background: var(--dolchin); color: var(--oq); }
.av-other { background: var(--beige); color: var(--komir); }

/* Home (Bugun) */
/* The hero grows with the dish name; its bottom padding is the strip the float card overlaps (36px) plus air,
   so the time and people pills always stay visible above the card. */
.hero {
  position: relative; min-height: 268px; flex-shrink: 0; background: var(--zafaron);
  border-radius: 0 0 36px 36px; overflow: hidden; padding: 20px 20px 56px;
}
.hero .plate-big { position: absolute; right: -40px; top: 56px; }
.hero-text { position: relative; display: flex; flex-direction: column; gap: 6px; }
/* The plate takes the right ~146px; the title keeps clear of it. */
.hero h1 { margin: 0; font-size: 30px; line-height: 35px; max-width: calc(100% - 150px); overflow-wrap: break-word; }
.hero h1.long { font-size: 24px; line-height: 29px; }
/* Narrow phones: a smaller plate leaves the title a readable column. */
@media (max-width: 380px) {
  .hero .plate-big { right: -50px; top: 64px; }
  .hero .plate-big svg { width: 150px; height: 150px; }
  .hero h1 { max-width: calc(100% - 106px); }
  .hero h1.long { font-size: 22px; line-height: 27px; }
}
.float-card { margin: -36px 16px 0; position: relative; padding: 16px; border-radius: 24px; background: var(--oq); display: flex; flex-direction: column; gap: 12px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.facts > div { display: flex; flex-direction: column; gap: 4px; }
.facts b { font-size: 14px; font-weight: 600; }
.flames { display: flex; align-items: center; gap: 2px; }
.strip { margin: 12px 16px 0; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-radius: 20px; background: var(--zafaron); color: var(--accent-ink); }
.strip span { flex-grow: 1; font-size: 14px; line-height: 19px; }
.strip button { width: 44px; height: 44px; border-radius: 14px; border: none; background: var(--oq); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tiles { margin: 12px 16px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile {
  display: flex; flex-direction: column; gap: 6px; padding: 12px; min-height: 78px; border: none;
  border-radius: 20px; background: var(--oq); text-align: left; color: var(--komir);
  transition-property: scale; transition-duration: 150ms; transition-timing-function: ease-out;
}
.tile .head { display: flex; align-items: center; gap: 8px; }
.tile .ico { width: 28px; height: 28px; border-radius: 14px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.tile b { font-size: 15px; font-weight: 600; }
.tile small { font-size: 12px; color: var(--muted); }
.mini { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 18px; border: 1px solid var(--line); background: transparent; text-align: left; color: inherit; width: 100%; }
.mini small { font-size: 12px; color: var(--muted); }
.mini b { font-size: 14px; font-weight: 600; display: block; }

/* Bottom navigation: a light bar with five plain tabs, so it does not pull the eye away from the content. */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  max-width: 480px; margin: 0 auto; height: calc(64px + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--oq); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgb(30 26 22 / 0.04);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center;
}
.nav button.tab {
  display: flex; flex-direction: column; align-items: center; gap: 4px; border: none; background: none;
  color: var(--muted); font-size: 11px; font-weight: 500; height: 64px;
}
.nav button.tab[aria-current="page"] { color: var(--accent); font-weight: 600; }
.nav .cam-wrap { display: flex; justify-content: center; }
.nav .cam {
  width: 62px; height: 62px; margin-top: -34px; border-radius: 31px; border: 5px solid var(--sut);
  background: var(--zafaron); display: flex; align-items: center; justify-content: center;
}

/* Recipe steps */
.ring { position: relative; width: 150px; height: 150px; flex-shrink: 0; }
.ring .t { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .t b { font-size: 34px; font-weight: 600; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.ring .t small { font-size: 12px; color: var(--muted); }
.ring circle.prog { transition: stroke-dashoffset 900ms linear; }
@media (prefers-reduced-motion: reduce) { .ring circle.prog { transition: none; } }

/* Shopping list */
.sum-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 24px; background: var(--zafaron); }
.bar { height: 8px; border-radius: 4px; background: rgba(30, 26, 22, 0.18); overflow: hidden; }
.bar div { height: 8px; border-radius: 4px; background: var(--komir); transition: width 200ms ease-out; }
.group { display: flex; flex-direction: column; padding: 8px 14px; border-radius: 22px; background: var(--oq); }
.group > .gname { padding: 4px 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.item { display: flex; align-items: center; gap: 6px; }
.item + .item { border-top: 1px solid var(--divider); }
.item .nm { flex-grow: 1; font-size: 15px; }
.item .qt { font-size: 14px; color: var(--muted); white-space: nowrap; }
.item.done .nm { color: var(--done); text-decoration: line-through; }
.item.done .qt { color: var(--done); }
.check { width: 44px; height: 44px; margin-left: -10px; border: none; background: transparent; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.check .box { width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--line-2); display: flex; align-items: center; justify-content: center; }
.check[aria-pressed="true"] .box { border: none; background: var(--rayhon); }
.ing { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.ing + .ing { border-top: 1px solid var(--divider); }
.ing .nm { flex-grow: 1; font-size: 15px; }
.ing .qt { font-size: 14px; color: var(--muted); }
.ing.staple .nm { color: var(--muted); }

/* Vote */
.opt { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 14px 12px; border-radius: 24px; background: var(--oq); border: 2px solid transparent; }
.opt.lead { border-color: var(--accent); }
.meter { flex-grow: 1; height: 10px; border-radius: 5px; background: var(--beige-2); overflow: hidden; }
.meter div { height: 10px; border-radius: 5px; background: var(--line-2); }
.opt.lead .meter div { background: var(--accent); }
.chat-preview { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 22px; background: var(--divider); }
.bubble { align-self: flex-start; max-width: 300px; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 4px 16px 16px 16px; background: var(--oq); }
.radio { width: 16px; height: 16px; border-radius: 8px; border: 2px solid var(--line-2); flex-shrink: 0; }

/* Pilaf (dark screen) */
.dark-page { color: var(--oq); }
.dark-page .sub { color: var(--dark-muted); }
.big-num { font-size: 84px; line-height: 1; font-weight: 700; color: #7FC29B; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.range { width: 100%; height: 30px; margin: 0; accent-color: var(--accent); }
.dtiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dtiles > div { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 18px; background: var(--dark-2); }
.dtiles small { font-size: 13px; color: var(--dark-muted); }
.dtiles b { font-size: 21px; font-weight: 600; }

/* Welcome */
.welcome { position: relative; min-height: 100vh; overflow: hidden; background: var(--sut); }
.wordmark { margin: 0; font-family: 'Cormorant Garamond', serif; font-size: 64px; line-height: 1; font-weight: 700; }

/* Fields */
.input { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--oq); font-size: 16px; }
textarea.input { min-height: 96px; resize: vertical; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); }
.switch { position: relative; width: 50px; height: 30px; flex-shrink: 0; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; }
.switch span { position: absolute; inset: 0; border-radius: 15px; background: var(--line); transition: background-color 150ms ease-out; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 12px; background: var(--oq); transition: translate 150ms ease-out; }
.switch input:checked + span { background: var(--rayhon); }
.switch input:checked + span::after { translate: 20px 0; }
.switch input:focus-visible + span { outline: 2px solid var(--qalampir); outline-offset: 2px; }
.set-row { display: flex; align-items: center; gap: 12px; min-height: 52px; }
.set-row + .set-row { border-top: 1px solid var(--divider); }

/* Sheet */
.backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(30, 26, 22, 0.45); opacity: 0; transition: opacity 200ms ease-out; }
.backdrop.open { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; max-width: 480px; margin: 0 auto;
  max-height: 88vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--sut); border-radius: 28px 28px 0 0; padding: 8px 20px calc(24px + var(--safe-b));
  translate: 0 100%; transition: translate 250ms cubic-bezier(0.2, 0, 0, 1);
}
.sheet.open { translate: 0 0; }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 4px auto 14px; }
@media (prefers-reduced-motion: reduce) {
  .sheet { translate: 0 0; opacity: 0; transition: opacity 200ms ease-out; }
  .sheet.open { opacity: 1; }
}
details.sos { background: var(--oq); border-radius: 20px; padding: 0 16px; }
details.sos summary { list-style: none; min-height: 52px; display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; cursor: pointer; }
details.sos summary::-webkit-details-marker { display: none; }
details.sos p { padding: 0 0 14px; font-size: 14px; line-height: 20px; color: var(--text-2); }

.toast {
  position: fixed; left: 50%; bottom: calc(104px + var(--safe-b)); z-index: 40; translate: -50% 0;
  width: max-content; max-width: calc(100% - 40px); padding: 12px 16px; border-radius: 16px;
  background: var(--komir); color: var(--oq); font-size: 14px; line-height: 19px;
  opacity: 0; pointer-events: none; transition: opacity 150ms ease-out;
}
.toast.show { opacity: 1; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); margin: 32px auto; }
@media (prefers-reduced-motion: no-preference) { .spinner { animation: spin 800ms linear infinite; } }
@keyframes spin { to { rotate: 360deg; } }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }

@media (hover: hover) {
  .btn:not(:disabled):hover, .tile:hover, .dish:hover { opacity: .94; }
  .chip:hover { border-color: var(--komir); }
}

/* A frame from the recipe video showing how the step is done. */
.step-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 24px; outline: 1px solid oklch(0 0 0 / 0.1); outline-offset: -1px; background: var(--beige); }

/* Shopping list: «at home» button on each row and the «Uyda bor» section. */
.item .have { display: block; font-size: 12px; color: var(--rayhon); }
.home-btn { width: 44px; height: 44px; margin-right: -10px; border: none; background: transparent; color: var(--muted);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; -webkit-tap-highlight-color: transparent; }
.home-btn svg { width: 20px; height: 20px; }
.home-group .item .nm { color: var(--text-2); }
.chip.sm { height: 32px; padding: 0 12px; font-size: 13px; flex-shrink: 0; }

/* Home: the kids' lunchbox strip. */
.lb-strip { background: var(--ok-bg); color: var(--komir); }
.lb-strip small { font-size: 13px; color: var(--muted); }

/* Home v2: one dinner card with one main action, today's menu, small helpers. */
.home2 { gap: 18px; padding-bottom: calc(110px + var(--safe-b)); }
.dinner-card { border-radius: 28px; background: var(--oq); overflow: hidden; box-shadow: 0 1px 2px rgb(30 26 22 / 0.06), 0 8px 24px rgb(30 26 22 / 0.06); border: 1px solid transparent; }
.dc-photo { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; outline: 1px solid oklch(0 0 0 / 0.1); outline-offset: -1px; background: var(--beige); }
.dc-plate { display: flex; justify-content: center; padding: 20px 0 4px; background: var(--zafaron); }
.dc-body { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 14px; }
.dc-name { margin: 0; font-size: 26px; line-height: 31px; font-weight: 700; text-wrap: balance; }
.dc-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: var(--muted); }
.link-btn { align-self: center; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: none; background: none; color: var(--accent-ink); font-size: 15px; font-weight: 500; }
.help-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.help-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 84px; padding: 10px 6px; border-radius: 18px; border: 1px solid var(--line); background: var(--oq); color: var(--komir); font-size: 13px; line-height: 16px; text-align: center; }
.help-chip span { font-size: 22px; line-height: 1; }
@media (hover: hover) { .help-chip:hover { background: var(--beige); } }
.home2 .strip { margin: 0; }

/* Recipe v2: photo, a segmented control for products / preparation / steps. */
.rc-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 24px; outline: 1px solid oklch(0 0 0 / 0.1); outline-offset: -1px; background: var(--beige); }
.rc-plate { display: flex; justify-content: center; padding: 12px 0; border-radius: 24px; background: var(--zafaron); }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 16px; background: var(--beige); }
.seg-btn { min-height: 44px; border: none; border-radius: 12px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; }
.seg-btn[aria-pressed="true"] { background: var(--oq); color: var(--komir); font-weight: 600; box-shadow: 0 1px 2px rgb(30 26 22 / 0.08); }
.step-list { margin: 0; padding: 4px 4px 4px 24px; display: flex; flex-direction: column; gap: 12px; font-size: 16px; line-height: 23px; }
.step-list li::marker { color: var(--accent); font-weight: 700; }
.badge.mid { background: var(--beige); color: var(--text-2); }

/* Onboarding v2: one question per screen. */
.ob-bar { flex-grow: 1; height: 6px; border-radius: 3px; background: var(--beige); overflow: hidden; }
.ob-bar div { height: 100%; border-radius: 3px; background: var(--accent); transition-property: width; transition-duration: 300ms; transition-timing-function: cubic-bezier(0.2, 0, 0, 1); }
@media (prefers-reduced-motion: reduce) { .ob-bar div { transition: none; } }
.ob-opt { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 14px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--oq); color: var(--komir); font-size: 16px; }
.ob-opt small { font-size: 13px; color: var(--muted); }
.ob-opt[aria-pressed="true"] { border-color: var(--accent); background: var(--zafaron); }
.ob-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--beige); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.ob-tick { width: 24px; height: 24px; border-radius: 12px; border: 2px solid var(--line-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ob-opt[aria-pressed="true"] .ob-tick, .ob-tick.on { border: none; background: var(--accent); }

/* Nutrition per portion. */
.macros { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; text-align: center; }
.macros span { display: flex; flex-direction: column; gap: 2px; }
.macros b { font-size: 18px; font-weight: 700; }
.macros small { font-size: 12px; color: var(--muted); }

/* Cook step v2: the action first, then how to tell it is done, then stove and timer in one strip. */
.cook .step-head { font-size: 22px; line-height: 28px; font-weight: 700; text-wrap: balance; }
.cook .step-head.big { font-size: 27px; line-height: 32px; }
.cook .step-rest { font-size: 17px; line-height: 25px; color: var(--text-2); }
.cook .step-photo { aspect-ratio: 16 / 10; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.uses { display: flex; flex-wrap: wrap; gap: 8px; }
.use { padding: 8px 12px; border-radius: 14px; background: var(--oq, #fff); border: 1px solid var(--line); font-size: 15px; }
.use b { font-weight: 600; }
.use .num { color: var(--accent); font-weight: 600; }
.note.big { padding: 16px 18px; }
.note.big b { font-size: 16px; }
.note.big span { font-size: 16px; line-height: 23px; color: var(--text); }
.note.warn { background: #FBF1E6; }
.stove b { font-size: 16px; font-weight: 600; }
.stove .timer-num { font-size: 34px; font-weight: 700; letter-spacing: -0.5px; min-width: 104px; }
.timer-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.timer-bar div { height: 100%; background: var(--accent); border-radius: 4px; transition: width 900ms linear; }
@media (prefers-reduced-motion: reduce) { .timer-bar div { transition: none; } }

/* Library folders: a photo tile per kind of dish. */
.folders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.folder { position: relative; display: block; aspect-ratio: 1 / 1; border: none; padding: 0; border-radius: 22px; overflow: hidden;
  background: var(--zafaron); text-align: left; }
.folder img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.folder-plate { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding-bottom: 40px; }
.folder-txt { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 2px; padding: 28px 14px 12px;
  background: linear-gradient(to top, oklch(0.2 0.02 60 / 0.78), oklch(0.2 0.02 60 / 0)); color: #fff; }
.folder-txt b { font-size: 16px; font-weight: 700; line-height: 20px; }
.folder-txt small { font-size: 13px; opacity: 0.9; }

/* «Wow» pass: big photos, soft entrances, a small celebration at the end of cooking. */
.dinner-card.cover .dc-hero { position: relative; display: block; width: 100%; border: none; padding: 0; background: none; }
.dinner-card.cover .dc-photo { aspect-ratio: 4 / 3.4; }
.dc-over { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 4px; padding: 56px 18px 16px;
  background: linear-gradient(to top, oklch(0.18 0.02 60 / 0.82), oklch(0.18 0.02 60 / 0)); color: #fff; text-align: left; }
.dc-kicker { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.9; }
.dinner-card.cover .dc-name { font-size: 28px; line-height: 32px; font-weight: 700; color: #fff; text-wrap: balance; }
.rc-hero { position: relative; margin: -20px -20px 0; }
.rc-hero img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 0.9; object-fit: cover; background: var(--beige);
  border-radius: 0 0 32px 32px; }
.rc-hero-bar { position: absolute; top: 16px; left: 16px; right: 16px; display: flex; justify-content: space-between; }
.rc-hero-bar .square.glass { background: rgba(255, 255, 255, 0.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.done-photo { width: 220px; height: 220px; object-fit: cover; border-radius: 50%; box-shadow: 0 12px 32px rgb(30 26 22 / 0.18);
  animation: pop 520ms cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.confetti i { position: absolute; top: -20px; left: calc(var(--k) * 5.5% + 2%); width: 8px; height: 14px; border-radius: 2px;
  background: hsl(calc(var(--k) * 37) 70% 55%); animation: fall calc(1400ms + var(--k) * 60ms) ease-in calc(var(--k) * 40ms) forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(calc(var(--k) * 70deg)); opacity: 0.2; } }
#app > .enter { animation: pageIn 220ms ease-out both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tap:active, .btn:active, .folder:active, .help-chip:active { transform: scale(0.98); transition: transform 80ms; }
@media (prefers-reduced-motion: reduce) {
  #app > .enter, .done-photo { animation: none; }
  .confetti { display: none; }
}

/* Ads: a quiet card with an honest label, never louder than the food. */
.ad-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 22px;
  background: var(--oq, #fff); text-align: left; }
.ad-card img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; flex-shrink: 0; }
.ad-card b { font-size: 15px; font-weight: 600; }
.ad-label { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
