/* Какао — шоколадная тема, светлая и тёмная */
:root {
  --bg: #faf5ef;
  --surface: #ffffff;
  --surface-2: #f3eadf;
  --surface-3: #ead9c7;
  --text: #2a1911;
  --text-2: #5d4436;
  --muted: #8f7666;
  --line: rgba(74, 44, 29, 0.12);
  --choc: #3b2317;
  --choc-2: #5b3725;
  --caramel: #c4834a;
  --caramel-2: #a86a35;
  --caramel-soft: #f4e3cf;
  --on-choc: #fbf3ea;
  --yes: #3f9b6a;
  --no: #d2554c;
  --star: #e1a954;
  --shadow: 0 1px 2px rgba(59, 35, 23, 0.06), 0 8px 24px rgba(59, 35, 23, 0.08);
  --shadow-lg: 0 18px 50px rgba(43, 25, 17, 0.28);
  --r-lg: 26px;
  --r: 18px;
  --r-sm: 12px;
  --tab-h: 64px;
  --safe-b: max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px));
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Unbounded', 'Manrope', system-ui, sans-serif;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #140d09;
  --surface: #1f1510;
  --surface-2: #2a1d16;
  --surface-3: #3a2a20;
  --text: #f7ede3;
  --text-2: #dcc8b8;
  --muted: #a88f7e;
  --line: rgba(247, 237, 227, 0.1);
  --choc: #f1dfcb;
  --choc-2: #e2c7ab;
  --caramel: #e0a266;
  --caramel-2: #eab37d;
  --caramel-soft: #3a2719;
  --on-choc: #1c120c;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  overflow: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { display: block; max-width: 100%; }
a { color: var(--caramel-2); }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Каркас ---------- */
#app { position: fixed; inset: 0; display: flex; flex-direction: column; }
.view { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-bottom: calc(var(--tab-h) + var(--safe-b) + 16px); }
.view.no-scroll { overflow: hidden; padding-bottom: 0; display: flex; flex-direction: column; }

.topbar { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.logo { font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--choc); letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.logo i { width: 28px; height: 28px; border-radius: 9px; background: linear-gradient(145deg, #6b3f28, #2d1a10); display: grid; place-items: center; font-style: normal; font-size: 15px; box-shadow: inset 0 1px 0 rgba(255,255,255,.15); }
.topbar .grow { flex: 1; }
.page-title { font-family: var(--display); font-size: 24px; color: var(--choc); padding: 16px 16px 6px; }
.page-sub { color: var(--muted); padding: 0 16px 12px; font-size: 14px; }

.icon-btn { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow); position: relative; color: var(--text); flex-shrink: 0; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn .badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--caramel); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }

/* ---------- Нижняя навигация ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid var(--line);
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 700; }
.tab svg { width: 24px; height: 24px; transition: transform .2s; }
.tab.active { color: var(--choc); }
.tab.active svg { transform: translateY(-1px) scale(1.06); }
.tab.add span.plus { width: 44px; height: 44px; border-radius: 16px; background: linear-gradient(145deg, var(--caramel), var(--caramel-2)); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(196,131,74,.45); }
.tab.add span.plus svg { width: 24px; height: 24px; }

/* ---------- Чипсы ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; padding: 0; }
.chip {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 700;
  background: var(--surface); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line);
  transition: background .15s, color .15s, transform .1s;
}
.chip:active { transform: scale(.96); }
.chip.on { background: var(--choc); color: var(--on-choc); box-shadow: none; }
.chip .n { opacity: .55; font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--surface-2); color: var(--text-2); }
.pill svg { width: 15px; height: 15px; }
.pill.easy { background: #e3f1e7; color: #2f7a4f; }
.pill.medium { background: #f8ecd8; color: #a3661f; }
.pill.hard { background: #f7e0dd; color: #b24137; }
:root[data-theme='dark'] .pill.easy { background: #1d3325; color: #8fd3a8; }
:root[data-theme='dark'] .pill.medium { background: #3a2b17; color: #f0bf7a; }
:root[data-theme='dark'] .pill.hard { background: #3b1e1b; color: #f29a90; }

/* ---------- Кнопки ---------- */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 22px; border-radius: 16px; font-weight: 800; font-size: 16px; background: var(--choc); color: var(--on-choc); transition: transform .1s, opacity .15s; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.block { width: 100%; }
.btn.caramel { background: linear-gradient(145deg, var(--caramel), var(--caramel-2)); color: #fff; }
.btn.ghost { background: var(--surface-2); color: var(--text); }
.btn.small { height: 40px; padding: 0 16px; font-size: 14px; border-radius: 12px; }
.btn.danger { background: #fbe4e1; color: #b0392f; }
:root[data-theme='dark'] .btn.caramel, :root[data-theme='dark'] .tab.add span.plus { color: #1c120c; }
:root[data-theme='dark'] .btn.danger { background: #3b1e1b; color: #f29a90; }
.btn svg { width: 20px; height: 20px; }
.link-btn { color: var(--caramel-2); font-weight: 700; font-size: 14px; }

/* ---------- Лента (свайпы) ---------- */
.deck-wrap { flex: 1; min-height: 0; position: relative; margin: 2px 16px 22px; }
.deck { position: absolute; inset: 0; }
.card {
  position: absolute; inset: 0; border-radius: var(--r-lg); overflow: hidden;
  background: #2b1a11; box-shadow: var(--shadow-lg);
  touch-action: none; user-select: none; -webkit-user-select: none;
  will-change: transform; transform-origin: 50% 110%;
}
.card.back { transform: scale(.95) translateY(10px); filter: brightness(.85); transition: transform .3s, filter .3s; }
.card.back2 { transform: scale(.9) translateY(20px); filter: brightness(.7); }
.card img.photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.card .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,10,5,.35) 0%, rgba(20,10,5,0) 22%, rgba(20,10,5,0) 45%, rgba(26,13,7,.82) 78%, rgba(26,13,7,.95) 100%); pointer-events: none; }
.card .top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.glass { background: rgba(30, 16, 9, .42); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: #fff; border: 1px solid rgba(255,255,255,.14); }
.card .top .pill { background: rgba(30, 16, 9, .45); color: #fff; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.card .info { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 20px 22px; color: #fff; }
.card .src { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #f1c998; margin-bottom: 6px; }
.card h2 { font-family: var(--display); font-weight: 600; font-size: clamp(21px, 6vw, 27px); line-height: 1.18; text-wrap: balance; }
.card .desc { margin-top: 8px; font-size: 14px; line-height: 1.4; color: rgba(255,255,255,.82); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.card .meta .pill { background: rgba(255,255,255,.14); color: #fff; }
.card .more { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; font-size: 13px; font-weight: 700; color: rgba(255,255,255,.7); }
.stamp { position: absolute; top: 36px; padding: 6px 14px; border: 4px solid; border-radius: 14px; font-family: var(--display); font-weight: 700; font-size: 30px; letter-spacing: .04em; opacity: 0; pointer-events: none; }
.stamp.yes { left: 22px; color: #7be0a4; border-color: #7be0a4; transform: rotate(-14deg); }
.stamp.no { right: 22px; color: #ff8a80; border-color: #ff8a80; transform: rotate(14deg); }
.no-photo { position: absolute; inset: 0; display: grid; place-items: center; font-size: 80px; background: radial-gradient(circle at 30% 20%, #7a4a2e, #2b1810 70%); }

.deck-actions { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 18px; padding: 0 0 calc(var(--tab-h) + var(--safe-b) + 12px); }
.round { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow); transition: transform .12s; }
.round:active { transform: scale(.9); }
.round svg { width: 30px; height: 30px; }
.round.sm { width: 48px; height: 48px; }
.round.sm svg { width: 22px; height: 22px; }
.round.no { color: var(--no); }
.round.yes { color: #fff; background: linear-gradient(145deg, #e0697a, #c9435a); box-shadow: 0 10px 24px rgba(201, 67, 90, .4); }
.round.info { color: var(--caramel-2); }
.round.undo { color: var(--muted); }
.round[disabled] { opacity: .35; pointer-events: none; }

.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 40px 28px; height: 100%; color: var(--muted); }
.empty .emoji { font-size: 56px; }
.empty h3 { color: var(--text); font-family: var(--display); font-size: 20px; }
.empty .row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

/* ---------- Каталог ---------- */
.search { display: flex; gap: 10px; padding: 0 16px 10px; position: sticky; top: 0; z-index: 5; background: var(--bg); padding-top: 12px; }
.search label { flex: 1; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.search label svg { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; }
.list-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 16px 10px; color: var(--muted); font-size: 14px; font-weight: 600; }
.list-head select { border: 0; background: none; font-weight: 700; color: var(--text-2); outline: 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 16px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.tile { position: relative; border-radius: var(--r); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); text-align: left; display: flex; flex-direction: column; animation: rise .35s both; }
.tile .ph { position: relative; aspect-ratio: 4/5; background: var(--surface-3); overflow: hidden; }
.tile .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.tile:active .ph img { transform: scale(1.03); }
.tile .ph .fav { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; }
.tile .ph .fav svg { width: 18px; height: 18px; }
.tile .ph .fav.on { color: #ff7a8c; }
.tile .ph .time { position: absolute; left: 8px; bottom: 8px; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.tile .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.tile .t { font-weight: 800; font-size: 14.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .s { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .lock { position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.sentinel { height: 40px; }
.spinner { width: 28px; height: 28px; margin: 24px auto; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--caramel); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Сегменты ---------- */
.seg { display: flex; margin: 0 16px 14px; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.seg button { flex: 1; min-width: 0; height: 38px; padding: 0 6px; border-radius: 11px; font-weight: 800; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg button .n { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 2px; border-radius: 10px; background: var(--caramel-soft); color: var(--caramel-2); font-size: 12px; line-height: 20px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---------- Нижние листы (фильтры и т.п.) ---------- */
.sheet-back { position: fixed; inset: 0; z-index: 50; background: rgba(20, 10, 5, .45); opacity: 0; transition: opacity .25s; }
.sheet-back.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; max-height: 88vh; display: flex; flex-direction: column;
  background: var(--bg); border-radius: 26px 26px 0 0; transform: translateY(100%); transition: transform .32s cubic-bezier(.2,.8,.2,1);
  padding-bottom: var(--safe-b);
}
.sheet.show { transform: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 10px auto 4px; flex-shrink: 0; }
.sheet .sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 20px 8px; }
.sheet .sheet-head h3 { font-family: var(--display); font-size: 20px; color: var(--choc); }
.sheet .sheet-body { overflow-y: auto; padding: 4px 20px 16px; }
.sheet .sheet-foot { padding: 10px 20px 14px; border-top: 1px solid var(--line); background: var(--bg); }
.fgroup { margin: 14px 0 18px; }
.fgroup > .label { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }

/* ---------- Экран рецепта ---------- */
.page { position: fixed; inset: 0; z-index: 40; background: var(--bg); overflow-y: auto; overflow-x: hidden; transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); -webkit-overflow-scrolling: touch; }
.page.show { transform: none; }
.hero { position: relative; height: min(58vh, 520px); background: var(--surface-3); }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,10,5,.35), rgba(20,10,5,0) 25%, rgba(20,10,5,0) 70%, var(--bg) 100%); pointer-events: none; }
.hero .hero-btns { position: absolute; top: calc(12px + var(--tg-content-safe-area-inset-top, 0px)); left: 14px; right: 14px; display: flex; gap: 10px; z-index: 2; }
.hero .hero-btns .icon-btn { background: rgba(30,16,9,.4); color: #fff; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: none; border: 1px solid rgba(255,255,255,.15); }
.hero .hero-btns .icon-btn.on { color: #ff8193; }
.recipe { position: relative; margin-top: -48px; padding: 0 18px 120px; z-index: 1; }
.recipe .src { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--caramel-2); }
.recipe h1 { font-family: var(--display); font-weight: 600; font-size: clamp(24px, 7vw, 32px); line-height: 1.15; color: var(--choc); margin: 6px 0 10px; text-wrap: balance; }
.recipe .lead { color: var(--text-2); font-size: 15.5px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0 8px; }
.fact { background: var(--surface); border-radius: 16px; padding: 10px 6px; text-align: center; box-shadow: var(--shadow); }
.fact b { display: block; font-size: 16px; font-weight: 800; color: var(--text); }
.fact span { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.recipe .tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 4px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 12px; }
.section-title h2 { font-family: var(--display); font-size: 20px; font-weight: 600; color: var(--choc); }
.stepper { display: flex; align-items: center; gap: 4px; background: var(--surface); border-radius: 14px; padding: 4px; box-shadow: var(--shadow); }
.stepper button { width: 34px; height: 34px; border-radius: 10px; font-size: 20px; font-weight: 700; color: var(--choc); background: var(--surface-2); }
.stepper span { min-width: 76px; text-align: center; font-weight: 800; font-size: 14px; }
.ing-group { font-weight: 800; font-size: 14px; color: var(--caramel-2); margin: 16px 0 6px; }
.ing { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.ing .box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--surface-3); flex-shrink: 0; margin-top: 1px; display: grid; place-items: center; transition: all .15s; }
.ing .box svg { width: 14px; height: 14px; opacity: 0; color: #fff; }
.ing.done .box { background: var(--yes); border-color: var(--yes); }
.ing.done .box svg { opacity: 1; }
.ing .q { font-weight: 800; white-space: nowrap; min-width: 72px; color: var(--text); }
.ing .nm { flex: 1; color: var(--text-2); }
.ing.done .q, .ing.done .nm { text-decoration: line-through; opacity: .5; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding: 0 0 22px 48px; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 11px; background: var(--caramel-soft); color: var(--caramel-2); font-weight: 800; display: grid; place-items: center; font-size: 15px; }
.steps li::after { content: ''; position: absolute; left: 15px; top: 36px; bottom: 6px; width: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.timer-chip { display: inline-flex; align-items: center; gap: 4px; margin: 6px 6px 0 0; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 800; color: var(--caramel-2); }
.timer-chip svg { width: 14px; height: 14px; }
.source-card { margin-top: 24px; padding: 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); display: flex; gap: 12px; align-items: center; }
.source-card .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--caramel-soft); display: grid; place-items: center; font-size: 22px; flex-shrink: 0; }
.source-card .tx { flex: 1; min-width: 0; font-size: 14px; color: var(--muted); }
.source-card .tx b { display: block; color: var(--text); font-size: 15px; }
.credit { margin-top: 10px; font-size: 12px; color: var(--muted); }
.owner-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.cook-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; padding: 12px 16px calc(12px + var(--safe-b)); background: linear-gradient(0deg, var(--bg) 70%, transparent); display: flex; gap: 10px; transform: translateY(120%); transition: transform .3s; }
.cook-bar.show { transform: none; }
.cook-bar .btn { flex: 1; white-space: nowrap; }
.cook-bar .btn.ghost { flex: 0 0 56px; padding: 0; background: var(--surface); box-shadow: var(--shadow); }

/* ---------- Режим готовки ---------- */
.cook { position: fixed; inset: 0; z-index: 60; background: #1a100b; color: #f7ede3; display: flex; flex-direction: column; padding: calc(16px + var(--tg-content-safe-area-inset-top, 0px)) 20px calc(20px + var(--safe-b)); }
.cook .head { display: flex; align-items: center; gap: 12px; }
.cook .head .icon-btn { background: rgba(255,255,255,.08); color: #fff; box-shadow: none; }
.cook .progress { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.cook .progress i { display: block; height: 100%; background: linear-gradient(90deg, #e0a266, #f3c58f); border-radius: 3px; transition: width .3s; }
.cook .num { margin-top: 30px; font-family: var(--display); font-size: 15px; color: #e0a266; }
.cook .text { flex: 1; overflow-y: auto; margin-top: 12px; font-size: clamp(21px, 5.6vw, 27px); line-height: 1.45; font-weight: 600; }
.cook .timers { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.cook .timers button { padding: 10px 16px; border-radius: 14px; background: rgba(224,162,102,.16); color: #f3c58f; font-weight: 800; display: inline-flex; gap: 6px; align-items: center; }
.cook .timers button svg { width: 18px; height: 18px; }
.cook .nav { display: flex; gap: 10px; }
.cook .nav .btn { flex: 1; }
.cook .nav .btn.ghost { background: rgba(255,255,255,.08); color: #fff; }
.cook .nav .btn.caramel { flex: 2; }
.timer-float { position: fixed; right: 14px; bottom: calc(var(--tab-h) + var(--safe-b) + 14px); z-index: 70; display: flex; flex-direction: column; gap: 8px; }
.timer-float .t { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-radius: 16px; background: var(--choc); color: var(--on-choc); box-shadow: var(--shadow-lg); font-weight: 800; font-variant-numeric: tabular-nums; }
.timer-float .t.ring { background: var(--no); color: #fff; animation: pulse 1s infinite; }
.timer-float .t button { width: 28px; height: 28px; border-radius: 9px; background: rgba(255,255,255,.15); display: grid; place-items: center; }
.timer-float .t button svg { width: 16px; height: 16px; }
@keyframes pulse { 50% { transform: scale(1.04); } }

/* ---------- Формы ---------- */
.form { padding: 0 16px; display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 800; color: var(--muted); }
.field input, .field textarea, .field select { width: 100%; border: 0; outline: 0; border-radius: 14px; padding: 13px 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 16px; }
.field input:focus, .field textarea:focus, .field select:focus { box-shadow: inset 0 0 0 2px var(--caramel); }
.field textarea { min-height: 120px; resize: vertical; line-height: 1.45; }
.field .hint { font-size: 12.5px; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.photo-pick { position: relative; aspect-ratio: 16/10; border-radius: var(--r); background: var(--surface-2); border: 2px dashed var(--surface-3); display: grid; place-items: center; overflow: hidden; color: var(--muted); font-weight: 700; }
.photo-pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-pick input { position: absolute; inset: 0; opacity: 0; }
.card-note { margin: 0 16px 16px; padding: 14px 16px; border-radius: var(--r); background: var(--caramel-soft); color: var(--text-2); font-size: 14px; }
.card-note b { color: var(--text); }
.jobs { padding: 0 16px; display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.job { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); font-size: 14px; text-align: left; width: 100%; }
.job .st { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-2); }
.job .tx { flex: 1; min-width: 0; }
.job .tx b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job .tx small { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job.error .tx small { color: var(--no); white-space: normal; }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: var(--surface-2); padding: 10px 12px; border-radius: 12px; word-break: break-all; max-height: 90px; overflow: hidden; }
.bm-link { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 14px; background: var(--choc); color: var(--on-choc); font-weight: 800; text-decoration: none; }
ol.howto { margin: 8px 0 0; padding-left: 20px; color: var(--text-2); font-size: 14px; }
ol.howto li { margin-bottom: 6px; }

/* ---------- Покупки ---------- */
.shop-add { display: flex; gap: 10px; padding: 0 16px 14px; }
.shop-add input { flex: 1; border: 0; outline: 0; border-radius: 14px; padding: 0 14px; height: 48px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 16px; }
.shop-group { margin: 6px 16px 14px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 4px 14px; }
.shop-group h4 { margin: 10px 0 2px; font-size: 13px; color: var(--caramel-2); font-weight: 800; }
.shop-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.shop-item:last-child { border-bottom: 0; }
.shop-item .nm { flex: 1; }
.shop-item.done .nm { text-decoration: line-through; opacity: .45; }
.shop-item .x { color: var(--muted); width: 28px; height: 28px; display: grid; place-items: center; }
.shop-item .x svg { width: 18px; height: 18px; }

/* ---------- Тост ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 20px); transform: translate(-50%, 20px); z-index: 90; background: var(--choc); color: var(--on-choc); padding: 12px 18px; border-radius: 14px; font-weight: 700; font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; transition: all .25s; pointer-events: none; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Первое открытие — подсказка про свайпы */
.coach { position: absolute; inset: 0; z-index: 5; border-radius: var(--r-lg); background: rgba(20,10,5,.62); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; padding: 24px; backdrop-filter: blur(3px); }
.coach .hands { display: flex; gap: 28px; font-weight: 800; }
.coach .hands div { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.coach .hands b { font-size: 34px; }
