:root {
  color-scheme: dark;
  --bg: #0d0f14;
  --bg-soft: #11151c;
  --surface: #151922;
  --surface-2: #1b202a;
  --surface-3: #222936;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f7f8fb;
  --muted: #aeb5c2;
  --muted-2: #7f8796;
  --coral: #ff926c;
  --coral-soft: rgba(255, 146, 108, 0.16);
  --purple: #8654ff;
  --purple-soft: rgba(134, 84, 255, 0.18);
  --petrol: #42cbd5;
  --petrol-soft: rgba(66, 203, 213, 0.16);
  --yellow: #ffdf91;
  --yellow-soft: rgba(255, 223, 145, 0.15);
  --danger: #ff6b7a;
  --success: #6ee7a6;
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.34);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 30px;
  --tap: 48px;
  --header-h: 76px;
  --nav-h: 86px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { overflow-x: hidden; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
img, video { display: block; max-width: 100%; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.icon.fill { fill: currentColor; stroke: currentColor; }

.desktop-shell { display: none; }
.app-shell { min-height: 100dvh; background:
  radial-gradient(circle at 85% 0%, rgba(134, 84, 255, .13), transparent 34%),
  radial-gradient(circle at 0% 30%, rgba(66, 203, 213, .08), transparent 27%),
  var(--bg); }

.app-header {
  position: sticky; top: 0; z-index: 20;
  min-height: calc(var(--header-h) + var(--safe-top));
  padding: calc(14px + var(--safe-top)) 18px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(to bottom, rgba(13, 15, 20, .98) 72%, rgba(13,15,20,.78), transparent);
  backdrop-filter: blur(16px);
}

.app-header.is-hidden { display: none; }
.header-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.header-brand img { width: 40px; height: 40px; border-radius: 13px; box-shadow: 0 8px 20px rgba(0,0,0,.28); }
.header-kicker { margin: 0 0 3px; font-size: 12px; color: var(--muted-2); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.header-title { margin: 0; font-size: 20px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: var(--tap); height: var(--tap); border-radius: 16px; border: 1px solid var(--border);
  background: rgba(255,255,255,.04); display: inline-grid; place-items: center; cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.icon-btn:active { transform: scale(.96); }
.icon-btn.active { background: var(--coral-soft); color: var(--coral); border-color: rgba(255,146,108,.35); }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg,var(--petrol),var(--purple),var(--coral)); padding: 2px; }
.avatar-inner { width: 100%; height: 100%; border-radius: inherit; background: var(--surface); display: grid; place-items: center; font-size: 17px; font-weight: 800; }
.badge-dot { position: absolute; top: 7px; right: 8px; min-width: 17px; height: 17px; border-radius: 999px; background: var(--purple); color: white; display: grid; place-items: center; font-size: 10px; font-weight: 800; border: 2px solid var(--bg); }
.relative { position: relative; }

.screen { min-height: calc(100dvh - var(--header-h)); padding: 4px 16px calc(var(--nav-h) + var(--safe-bottom) + 26px); }
.screen.no-nav { padding-bottom: calc(24px + var(--safe-bottom)); }
.screen.fullscreen { padding: 0; min-height: 100dvh; }

.bottom-nav {
  position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
  height: calc(var(--nav-h) + var(--safe-bottom)); padding: 10px 10px calc(8px + var(--safe-bottom));
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  background: rgba(14, 17, 23, .95); border-top: 1px solid var(--border); backdrop-filter: blur(20px);
}
.bottom-nav.is-hidden { display: none; }
.nav-item { min-width: 0; border: 0; background: transparent; color: var(--muted-2); display: grid; justify-items: center; gap: 5px; padding: 7px 2px 4px; font-size: 10.5px; font-weight: 700; cursor: pointer; }
.nav-item .icon { width: 23px; height: 23px; }
.nav-item.active { color: var(--petrol); }
.nav-add { align-self: start; margin-top: -23px; }
.nav-add .nav-add-circle { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--coral), #ff6d72); color: #1b1111; box-shadow: 0 12px 28px rgba(255, 111, 105, .33); border: 5px solid var(--bg-soft); }
.nav-add .icon { width: 27px; height: 27px; stroke-width: 2.2; }
.nav-add span:last-child { margin-top: -1px; }

.page-intro { padding: 8px 2px 12px; }
.page-intro h1 { margin: 0 0 6px; font-size: clamp(28px, 8vw, 36px); line-height: 1.08; letter-spacing: -.035em; }
.page-intro p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.eyebrow { margin: 0 0 7px; color: var(--yellow); text-transform: uppercase; font-size: 11px; font-weight: 800; letter-spacing: .12em; }

.search-row { display: grid; grid-template-columns: 1fr 52px; gap: 10px; margin: 10px 0 18px; }
.search-box { min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 15px; border-radius: 18px; border: 1px solid var(--border); background: rgba(255,255,255,.035); }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 14px; }
.search-box input::placeholder { color: var(--muted-2); }
.filter-btn { width: 52px; height: 52px; border: 0; border-radius: 18px; background: linear-gradient(135deg, var(--purple), #a168ff); display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 22px rgba(134,84,255,.24); }

.section { margin-top: 24px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 2px 12px; }
.section-head h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.section-link { border: 0; background: transparent; color: var(--purple); font-size: 13px; font-weight: 700; padding: 6px 0; cursor: pointer; }

.category-scroller, .chip-row { display: flex; gap: 10px; overflow-x: auto; padding: 2px 1px 7px; scrollbar-width: none; }
.category-scroller::-webkit-scrollbar, .chip-row::-webkit-scrollbar, .horizontal-cards::-webkit-scrollbar { display: none; }
.category-card { flex: 0 0 82px; min-height: 84px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; align-content: center; gap: 8px; padding: 10px 6px; cursor: pointer; }
.category-card.active { border-color: rgba(66,203,213,.44); background: var(--petrol-soft); }
.category-emoji { font-size: 28px; line-height: 1; }
.category-card span:last-child { font-size: 11px; font-weight: 700; text-align: center; }

.chip { flex: 0 0 auto; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); padding: 10px 14px; font-size: 12px; font-weight: 700; cursor: pointer; }
.chip.active { background: var(--purple-soft); border-color: rgba(134,84,255,.45); color: #d8ccff; }

.hero-card { position: relative; overflow: hidden; min-height: 215px; border-radius: 26px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.hero-card img { width: 100%; height: 215px; object-fit: cover; }
.hero-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(7,9,13,.95) 0%, rgba(7,9,13,.18) 62%, transparent 100%); }
.hero-content { position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 16px; }
.hero-label { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 999px; background: var(--coral); color: #21120d; font-weight: 800; font-size: 11px; }
.hero-title { margin: 10px 0 8px; font-size: 23px; letter-spacing: -.03em; }
.meta-row { display: flex; align-items: center; gap: 14px; color: #d4d8df; font-size: 12px; }
.meta { display: inline-flex; align-items: center; gap: 5px; }
.meta .icon { width: 16px; height: 16px; }
.hero-action { position: absolute; z-index: 3; right: 16px; top: 16px; }

.horizontal-cards { display: flex; gap: 12px; overflow-x: auto; padding: 2px 1px 8px; scrollbar-width: none; scroll-snap-type: x proximity; }
.recipe-card { flex: 0 0 72%; max-width: 285px; border-radius: 21px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); scroll-snap-align: start; cursor: pointer; box-shadow: 0 10px 24px rgba(0,0,0,.16); }
.recipe-card.compact { flex-basis: 62%; }
.recipe-image { position: relative; height: 146px; background: var(--surface-2); overflow: hidden; }
.recipe-image img { width: 100%; height: 100%; object-fit: cover; }
.recipe-image .tag { position: absolute; left: 10px; top: 10px; }
.favorite-btn { position: absolute; right: 10px; top: 10px; width: 38px; height: 38px; border-radius: 13px; border: 1px solid rgba(255,255,255,.15); background: rgba(13,15,20,.72); display: grid; place-items: center; color: white; backdrop-filter: blur(10px); cursor: pointer; }
.favorite-btn.active { color: var(--coral); background: rgba(35,18,18,.76); }
.favorite-btn.active .icon { fill: currentColor; }
.recipe-card-body { padding: 13px 14px 15px; }
.recipe-card-title { margin: 0 0 10px; font-size: 16px; line-height: 1.25; letter-spacing: -.01em; }
.recipe-card-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11.5px; }
.star { color: #ffc928; }

.recipe-list { display: grid; gap: 11px; }
.recipe-list-card { min-height: 94px; display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; align-items: center; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); padding: 8px; cursor: pointer; }
.recipe-list-card img { width: 96px; height: 78px; object-fit: cover; border-radius: 14px; }
.recipe-list-card h3 { margin: 0 0 7px; font-size: 15px; line-height: 1.25; }
.recipe-list-card .list-meta { color: var(--muted); display: flex; gap: 9px; font-size: 11px; }
.recipe-list-card .icon-btn { width: 42px; height: 42px; border-radius: 14px; }

.stats-card { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; }
.stat { background: var(--surface); padding: 17px 10px; text-align: center; }
.stat strong { display: block; font-size: 20px; margin-bottom: 4px; }
.stat span { color: var(--muted-2); font-size: 10.5px; }

.empty-state { margin: 28px 0; padding: 30px 22px; text-align: center; border-radius: 24px; border: 1px dashed var(--border-strong); background: rgba(255,255,255,.025); }
.empty-state .empty-icon { width: 62px; height: 62px; border-radius: 21px; display: grid; place-items: center; margin: 0 auto 14px; background: var(--purple-soft); color: #cbbcff; }
.empty-state h3 { margin: 0 0 8px; font-size: 19px; }
.empty-state p { margin: 0 0 17px; color: var(--muted); line-height: 1.5; font-size: 14px; }

.btn { min-height: 52px; border-radius: 16px; border: 1px solid transparent; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 800; cursor: pointer; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--coral), #ff6f74); color: #20100d; box-shadow: 0 12px 25px rgba(255,111,116,.22); }
.btn-secondary { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.btn-petrol { background: linear-gradient(135deg, var(--petrol), #29aab9); color: #07191b; }
.btn-danger { background: rgba(255,107,122,.13); border-color: rgba(255,107,122,.35); color: #ff9da7; }
.btn-full { width: 100%; }
.btn-sm { min-height: 42px; border-radius: 14px; padding: 0 14px; font-size: 13px; }
.sticky-actions { position: sticky; bottom: 0; z-index: 10; margin: 18px -16px -24px; padding: 12px 16px calc(12px + var(--safe-bottom)); display: grid; grid-template-columns: 1fr; gap: 10px; background: linear-gradient(to top, var(--bg) 78%, transparent); }
.sticky-actions.two { grid-template-columns: .72fr 1.28fr; }

.tag { display: inline-flex; align-items: center; min-height: 27px; padding: 0 9px; border-radius: 999px; background: rgba(13,15,20,.74); color: #fff; font-size: 10px; font-weight: 800; backdrop-filter: blur(9px); border: 1px solid rgba(255,255,255,.13); }
.tag.coral { background: var(--coral-soft); color: #ffc4b2; border-color: rgba(255,146,108,.26); }
.tag.petrol { background: var(--petrol-soft); color: #9feef3; border-color: rgba(66,203,213,.25); }
.tag.purple { background: var(--purple-soft); color: #cdbfff; border-color: rgba(134,84,255,.26); }

.detail-hero { position: relative; margin: -4px -16px 0; height: 315px; overflow: hidden; }
.detail-hero img, .detail-hero video { width: 100%; height: 100%; object-fit: cover; }
.detail-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(8,10,14,.18), rgba(8,10,14,.08) 35%, var(--bg) 100%); }
.detail-top-actions { position: absolute; z-index: 3; left: 14px; right: 14px; top: calc(12px + var(--safe-top)); display: flex; justify-content: space-between; }
.detail-top-actions .right { display: flex; gap: 8px; }
.detail-top-actions .icon-btn { background: rgba(11,13,18,.68); backdrop-filter: blur(12px); }
.detail-content { position: relative; z-index: 2; margin-top: -58px; }
.detail-content h1 { margin: 0 0 10px; font-size: 30px; line-height: 1.08; letter-spacing: -.04em; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 10px 16px; color: var(--muted); font-size: 12px; }
.detail-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin: 23px 0 18px; border-bottom: 1px solid var(--border); }
.detail-tab { border: 0; background: transparent; color: var(--muted); padding: 12px 2px 13px; font-size: 12px; font-weight: 750; position: relative; cursor: pointer; }
.detail-tab.active { color: var(--coral); }
.detail-tab.active::after { content: ""; position: absolute; height: 3px; border-radius: 999px 999px 0 0; background: var(--coral); left: 12%; right: 12%; bottom: -1px; }
.detail-section { padding-bottom: 6px; }
.detail-section h2 { font-size: 19px; margin: 22px 0 10px; }
.detail-section p { color: var(--muted); line-height: 1.63; font-size: 14px; }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.info-card { border: 1px solid var(--border); border-radius: 17px; background: var(--surface); padding: 14px; }
.info-card .icon-wrap { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; background: var(--petrol-soft); color: var(--petrol); margin-bottom: 9px; }
.info-card strong { display: block; font-size: 15px; margin-bottom: 3px; }
.info-card span { color: var(--muted-2); font-size: 11px; }

.ingredient-group { margin-top: 20px; }
.ingredient-group h3 { font-size: 15px; color: var(--yellow); margin: 0 0 9px; }
.ingredient-row { min-height: 54px; display: grid; grid-template-columns: 28px 88px 1fr; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); }
.checkbox { width: 22px; height: 22px; border: 1px solid var(--border-strong); border-radius: 8px; display: grid; place-items: center; background: var(--surface); cursor: pointer; }
.checkbox.checked { background: var(--petrol); color: #082023; border-color: transparent; }
.checkbox .icon { width: 15px; height: 15px; stroke-width: 2.4; }
.ingredient-amount { color: #d7dce4; font-weight: 750; font-size: 13px; }
.ingredient-name { color: var(--muted); font-size: 14px; }
.ingredient-row.done .ingredient-amount, .ingredient-row.done .ingredient-name { text-decoration: line-through; opacity: .52; }
.portion-control { display: inline-grid; grid-template-columns: 42px minmax(86px, auto) 42px; align-items: center; border: 1px solid var(--border); border-radius: 15px; overflow: hidden; background: var(--surface); }
.portion-control button { width: 42px; height: 42px; border: 0; background: transparent; color: var(--text); font-size: 22px; cursor: pointer; }
.portion-control span { text-align: center; font-size: 12px; color: var(--muted); }
.portion-control strong { color: var(--text); }

.step-card { border-radius: 21px; border: 1px solid var(--border); background: var(--surface); padding: 15px; margin-bottom: 12px; }
.step-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.step-number { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; flex: 0 0 auto; background: var(--purple); font-weight: 900; color: white; }
.step-card:nth-child(2n) .step-number { background: var(--coral); color: #24100c; }
.step-title { margin: 1px 0 5px; font-size: 16px; }
.step-submeta { display: flex; gap: 10px; color: var(--muted-2); font-size: 11px; }
.step-card p { margin: 0 0 12px; color: var(--muted); line-height: 1.58; font-size: 14px; }
.step-media { position: relative; overflow: hidden; border-radius: 16px; background: var(--surface-2); }
.step-media img, .step-media video { width: 100%; max-height: 310px; object-fit: cover; }
.step-play { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.step-play span { width: 58px; height: 58px; border-radius: 50%; background: rgba(13,15,20,.72); display: grid; place-items: center; backdrop-filter: blur(10px); }
.step-actions { display: flex; gap: 8px; margin-top: 12px; }

.note-card { border-radius: 18px; padding: 15px; background: var(--yellow-soft); border: 1px solid rgba(255,223,145,.2); color: #f8e8bd; line-height: 1.55; font-size: 14px; }

.modal-backdrop { position: fixed; z-index: 80; inset: 0; background: rgba(2,4,7,.72); backdrop-filter: blur(7px); display: flex; align-items: flex-end; justify-content: center; padding: 12px 10px calc(10px + var(--safe-bottom)); animation: fadeIn .16s ease; }
.bottom-sheet { width: min(100%, 520px); max-height: min(88dvh, 820px); overflow-y: auto; background: #151922; border: 1px solid var(--border-strong); border-radius: 28px; box-shadow: var(--shadow); padding: 11px 16px 20px; animation: sheetUp .2s ease; }
.sheet-handle { width: 42px; height: 5px; border-radius: 999px; background: rgba(255,255,255,.16); margin: 2px auto 15px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.sheet-head h2 { margin: 0; font-size: 22px; }
.sheet-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.action-card { min-height: 112px; border-radius: 19px; border: 1px solid var(--border); background: var(--surface-2); padding: 14px; display: grid; align-content: space-between; cursor: pointer; text-align: left; }
.action-card .action-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--purple-soft); color: #cdbfff; }
.action-card:nth-child(2) .action-icon { background: var(--petrol-soft); color: var(--petrol); }
.action-card:nth-child(3) .action-icon { background: var(--yellow-soft); color: var(--yellow); }
.action-card:nth-child(4) .action-icon { background: var(--coral-soft); color: var(--coral); }
.action-card strong { font-size: 14px; }
.action-card small { color: var(--muted-2); line-height: 1.35; }

.form-section { border-radius: 21px; border: 1px solid var(--border); background: var(--surface); padding: 15px; margin-bottom: 13px; }
.form-section h2 { margin: 0 0 14px; font-size: 17px; }
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field label { color: #d9dde5; font-size: 12px; font-weight: 750; }
.input, .textarea, .select { width: 100%; border: 1px solid var(--border); border-radius: 15px; background: var(--surface-2); color: var(--text); outline: 0; padding: 13px 14px; min-height: 48px; }
.textarea { min-height: 104px; resize: vertical; line-height: 1.5; }
.input:focus, .textarea:focus, .select:focus { border-color: rgba(66,203,213,.55); box-shadow: 0 0 0 3px rgba(66,203,213,.09); }
.field-hint { color: var(--muted-2); font-size: 11px; line-height: 1.4; }
.field-error { color: #ff9da7; font-size: 11px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.media-preview { border: 1px dashed var(--border-strong); border-radius: 18px; min-height: 150px; display: grid; place-items: center; overflow: hidden; background: rgba(255,255,255,.02); position: relative; }
.media-preview img, .media-preview video { width: 100%; height: 205px; object-fit: cover; }
.media-preview-empty { text-align: center; color: var(--muted-2); padding: 20px; }
.media-preview-empty .icon { width: 32px; height: 32px; margin-bottom: 8px; }
.hidden-input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.repeat-card { border: 1px solid var(--border); background: var(--surface-2); border-radius: 18px; padding: 12px; margin-top: 10px; }
.repeat-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.repeat-head strong { font-size: 14px; }
.drag-handle { color: var(--muted-2); font-size: 18px; letter-spacing: -2px; }
.inline-actions { display: flex; gap: 8px; }
.inline-actions .icon-btn { width: 39px; height: 39px; border-radius: 13px; }
.ingredient-editor-row { display: grid; grid-template-columns: 74px 78px 1fr; gap: 8px; margin-bottom: 8px; }
.ingredient-editor-row .input { min-width: 0; padding: 11px 10px; }
.step-editor-media { margin-top: 8px; }

.planner-days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 1px 8px; scrollbar-width: none; }
.planner-day { flex: 0 0 65px; border: 1px solid var(--border); background: var(--surface); border-radius: 17px; padding: 10px 5px; text-align: center; cursor: pointer; }
.planner-day strong { display: block; font-size: 18px; margin-top: 4px; }
.planner-day span { color: var(--muted-2); font-size: 11px; }
.planner-day.active { background: var(--purple-soft); border-color: rgba(134,84,255,.48); }
.meal-slot { min-height: 96px; border-radius: 19px; border: 1px solid var(--border); background: var(--surface); padding: 12px; margin-bottom: 11px; }
.meal-slot-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.meal-slot-head strong { font-size: 14px; }
.meal-empty { min-height: 54px; border-radius: 14px; border: 1px dashed var(--border-strong); display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--muted-2); font-size: 12px; cursor: pointer; }
.planned-recipe { display: grid; grid-template-columns: 62px 1fr auto; gap: 10px; align-items: center; }
.planned-recipe img { width: 62px; height: 54px; object-fit: cover; border-radius: 12px; }
.planned-recipe h3 { margin: 0 0 4px; font-size: 14px; }
.planned-recipe span { color: var(--muted-2); font-size: 11px; }

.shopping-group { margin-bottom: 22px; }
.shopping-group h2 { display: flex; align-items: center; gap: 9px; font-size: 16px; margin: 0 0 8px; }
.shopping-item { min-height: 58px; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.shopping-item.done { opacity: .46; }
.shopping-item.done .shopping-name { text-decoration: line-through; }
.shopping-name { font-size: 14px; }
.shopping-source { color: var(--muted-2); font-size: 10.5px; margin-top: 3px; }
.shopping-amount { color: var(--muted); font-weight: 700; font-size: 12px; }

.cook-screen { min-height: 100dvh; background: radial-gradient(circle at 80% 0%, rgba(255,146,108,.14), transparent 32%), var(--bg); padding: calc(13px + var(--safe-top)) 16px calc(18px + var(--safe-bottom)); display: flex; flex-direction: column; }
.cook-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cook-progress-label { text-align: center; }
.cook-progress-label strong { display: block; font-size: 14px; }
.cook-progress-label span { color: var(--muted-2); font-size: 11px; }
.progress-track { height: 6px; border-radius: 999px; background: var(--surface-3); margin: 18px 0 20px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--petrol),var(--purple),var(--coral)); transition: width .3s ease; }
.cook-content { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.cook-number { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; background: var(--coral); color: #23100c; font-weight: 900; font-size: 18px; }
.cook-title { font-size: 28px; line-height: 1.1; letter-spacing: -.04em; margin: 15px 0 10px; }
.cook-text { color: var(--muted); font-size: 16px; line-height: 1.65; margin: 0 0 17px; }
.cook-media { border-radius: 24px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); min-height: 220px; max-height: 38dvh; }
.cook-media img, .cook-media video { width: 100%; height: 100%; min-height: 220px; max-height: 38dvh; object-fit: cover; }
.cook-tools { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin-top: 13px; }
.tool-card { min-height: 68px; border-radius: 17px; border: 1px solid var(--border); background: var(--surface); padding: 12px; display: flex; align-items: center; gap: 10px; }
.tool-card .icon-wrap { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--petrol-soft); color: var(--petrol); }
.tool-card strong { display: block; font-size: 13px; }
.tool-card span { color: var(--muted-2); font-size: 10px; }
.cook-actions { display: grid; grid-template-columns: 54px 1fr; gap: 10px; margin-top: 16px; }
.cook-actions .icon-btn { width: 54px; height: 54px; border-radius: 17px; }
.timer-pill { position: fixed; z-index: 50; left: 14px; right: 14px; bottom: calc(var(--nav-h) + var(--safe-bottom) + 8px); min-height: 58px; border-radius: 18px; background: rgba(21,25,34,.96); border: 1px solid rgba(66,203,213,.38); box-shadow: var(--shadow); padding: 9px 10px 9px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; backdrop-filter: blur(14px); }
.timer-pill.in-cook { bottom: calc(12px + var(--safe-bottom)); }
.timer-main { display: flex; align-items: center; gap: 10px; }
.timer-main .icon-wrap { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--petrol-soft); color: var(--petrol); }
.timer-main strong { font-variant-numeric: tabular-nums; font-size: 19px; }
.timer-main span { display: block; color: var(--muted-2); font-size: 10px; }

.completion { min-height: 100dvh; padding: calc(42px + var(--safe-top)) 22px calc(28px + var(--safe-bottom)); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: radial-gradient(circle at 50% 30%, rgba(134,84,255,.22), transparent 35%), radial-gradient(circle at 70% 60%, rgba(255,146,108,.18), transparent 30%), var(--bg); }
.completion-mark { width: 112px; height: 112px; border-radius: 38px; display: grid; place-items: center; background: linear-gradient(135deg,var(--petrol),var(--purple),var(--coral)); color: white; box-shadow: 0 24px 60px rgba(134,84,255,.3); animation: pop .45s ease; }
.completion-mark .icon { width: 55px; height: 55px; stroke-width: 2.4; }
.completion h1 { margin: 25px 0 9px; font-size: 34px; letter-spacing: -.04em; }
.completion p { margin: 0 0 24px; color: var(--muted); line-height: 1.55; }
.rating-row { display: flex; gap: 8px; margin-bottom: 24px; }
.rating-star { width: 45px; height: 45px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--muted-2); display: grid; place-items: center; cursor: pointer; }
.rating-star.active { color: #ffc928; background: var(--yellow-soft); border-color: rgba(255,223,145,.27); }
.rating-star.active .icon { fill: currentColor; }

.profile-card { display: flex; align-items: center; gap: 14px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); padding: 16px; }
.profile-card .avatar { width: 58px; height: 58px; }
.profile-card h2 { margin: 0 0 4px; font-size: 19px; }
.profile-card p { margin: 0; color: var(--muted); font-size: 12px; }
.settings-list { display: grid; gap: 8px; margin-top: 18px; }
.settings-row { min-height: 58px; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 11px; border-radius: 17px; background: var(--surface); border: 1px solid var(--border); padding: 8px 12px; cursor: pointer; }
.settings-row .icon-wrap { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--purple-soft); color: #cbbcff; }
.settings-row strong { font-size: 13px; }
.settings-row span { display: block; color: var(--muted-2); font-size: 10.5px; margin-top: 3px; }

.toast-root { position: fixed; z-index: 120; left: 12px; right: 12px; top: calc(14px + var(--safe-top)); display: grid; justify-items: center; pointer-events: none; }
.toast { width: min(100%, 440px); min-height: 52px; border-radius: 17px; background: rgba(31,36,47,.98); border: 1px solid var(--border-strong); box-shadow: var(--shadow); display: flex; align-items: center; gap: 10px; padding: 10px 14px; animation: toastIn .22s ease; }
.toast .icon-wrap { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--petrol-soft); color: var(--petrol); }
.toast span { font-size: 13px; font-weight: 700; }

.confirm-dialog { width: min(100%, 420px); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 25px; padding: 20px; box-shadow: var(--shadow); }
.confirm-dialog h2 { margin: 0 0 9px; font-size: 22px; }
.confirm-dialog p { margin: 0 0 18px; color: var(--muted); line-height: 1.55; font-size: 14px; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-backdrop.center { align-items: center; }

.skeleton { position: relative; overflow: hidden; background: var(--surface-2); }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent); animation: shimmer 1.3s infinite; }

@keyframes sheetUp { from { transform: translateY(28px); opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes pop { 0% { transform: scale(.75); opacity: 0; } 70% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }
@keyframes toastIn { from { transform: translateY(-12px); opacity: 0; } }
@keyframes shimmer { to { transform: translateX(100%); } }

@media (min-width: 600px) {
  body { background: #080a0e; }
  .desktop-shell { display: block; position: fixed; inset: 0; background: radial-gradient(circle at 20% 20%, rgba(66,203,213,.1), transparent 28%), radial-gradient(circle at 80% 30%, rgba(134,84,255,.12), transparent 30%), #080a0e; }
  .desktop-copy { position: absolute; left: max(34px, calc(50% - 520px)); top: 50%; transform: translateY(-50%); width: 300px; display: grid; gap: 7px; }
  .desktop-copy img { border-radius: 22px; box-shadow: var(--shadow); }
  .desktop-copy p { margin: 14px 0 0; color: var(--petrol); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
  .desktop-copy strong { font-size: 38px; letter-spacing: -.04em; }
  .desktop-copy span { color: var(--muted); line-height: 1.55; }
  .app-shell { width: 430px; min-height: 100dvh; margin: 0 auto; position: relative; box-shadow: 0 0 80px rgba(0,0,0,.55); border-left: 1px solid rgba(255,255,255,.05); border-right: 1px solid rgba(255,255,255,.05); }
  .bottom-nav { left: 50%; right: auto; width: 430px; transform: translateX(-50%); }
  .timer-pill { left: calc(50% - 201px); right: auto; width: 402px; }
}

@media (max-width: 370px) {
  .screen { padding-left: 13px; padding-right: 13px; }
  .detail-hero { margin-left: -13px; margin-right: -13px; }
  .recipe-card { flex-basis: 78%; }
  .category-card { flex-basis: 76px; }
  .form-grid { grid-template-columns: 1fr; }
  .ingredient-editor-row { grid-template-columns: 64px 68px 1fr; gap: 5px; }
}
