/* PV ANDROID TELEGRAM VISUAL v1 — 2026-10-27
   ONLY CSS. Keeps app navigation, API, subscriptions, authentication, payments and data unchanged.
   Reference: user screenshots IMG_3231.jpeg & IMG_3232.jpeg. No fabricated recipe prices. */

/* Neutral, warm palette across both modes. Green is no longer the UI accent. */
:root {
  --paper:#FAF7F2;--surface:#FFFFFF;--cream:#F7F0E9;
  --ink:#26221F;--quiet:#79716B;--soft:#9A938D;
  --accent:#E66A43;--accent2:#D75C37;--green:#E66A43;
  --reference-green:#E66A43;--reference-muted:#817974;
  --reference-surface:#FAF7F2;--line:#E7DFD8;
  --shadow:0 3px 12px rgba(45,32,21,.04);
}
html[data-theme="dark"] {
  color-scheme:dark;
  --paper:#11100E;--surface:#1B1A16;--cream:#25221E;
  --ink:#F6F3EE;--quiet:#A9A19A;--soft:#8F8780;
  --accent:#E66A43;--accent2:#F08462;--green:#E66A43;
  --reference-green:#E66A43;--reference-muted:#A9A19A;
  --reference-surface:#11100E;--line:#35332E;
  --shadow:none;
  background:#11100E;color:var(--ink);
}
body, .app-shell, .detail-layer, .cook-layer { background:var(--paper); }
html[data-theme="dark"] body,
html[data-theme="dark"] .app-shell,
html[data-theme="dark"] .detail-layer,
html[data-theme="dark"] .cook-layer,
html[data-theme="dark"] .detail-shell,
html[data-theme="dark"] .detail-content {background:var(--paper);color:var(--ink)}

/* Type: less oversized, Telegram-like hierarchy. No layout restructuring. */
body { font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI",Arial,sans-serif; }
.home-intro h1,.welcome h1{font-size:clamp(26px,7vw,30px);line-height:1.12;letter-spacing:-.045em}
.page-heading h1,.ref-catalog-heading h1{font-size:clamp(23px,6.6vw,28px);line-height:1.16}
.profile-head h1{font-size:25px}
.block-title h2,.reference-heading h2,.section-name h2{font-size:19px;line-height:1.2}
.recipe-heading h1{font-size:clamp(23px,6.5vw,28px)}
.home-intro p,.welcome p,.page-heading p{font-size:13px}
.overline,.card-cat{letter-spacing:.105em;text-transform:uppercase}

/* Headers and bottom navigation: warm charcoal/coral, no blue-green slate. */
.topbar{background:rgba(250,247,242,.97);border-bottom-color:var(--line)}
.head-action,.round-back{background:var(--surface);border:1px solid var(--line);color:var(--ink);box-shadow:none}
.brand-wordmark,.profile-wordmark{color:var(--ink)}
.brand-wordmark-dot{background:var(--accent);border-radius:50%}
.bottom-nav{background:rgba(250,247,242,.97);border-top:1px solid var(--line);box-shadow:none}
.navitem{color:var(--quiet);font-size:10px}
.navitem.active{color:var(--accent);background:rgba(230,106,67,.09)}
html[data-theme="dark"] .topbar{background:rgba(17,16,14,.97);border-bottom-color:#34312C}
html[data-theme="dark"] .brand-wordmark,html[data-theme="dark"] .profile-wordmark{color:#F6F3EE}
html[data-theme="dark"] .brand-wordmark-dot{background:#E66A43}
html[data-theme="dark"] .head-action,html[data-theme="dark"] .round-back{background:#1B1A16;color:#F6F3EE;border-color:#36332D}
html[data-theme="dark"] .theme-toggle{color:#F5BE57}
html[data-theme="dark"] .bottom-nav{background:rgba(17,16,14,.98);border-top-color:#33312D;box-shadow:none}
html[data-theme="dark"] .navitem{color:#A9A19A}
html[data-theme="dark"] .navitem.active{color:#F08462;background:rgba(230,106,67,.10)}

/* Catalogue controls and filters. Keep existing 3x2 category arrangement and routing. */
.search,.category-tile,.chip,.filter-drawer,.filter-drawer button,.pv-category-shortcut,
.pv-category-tile,.pv-category-sheet,.pv-category-close,
.pv-selected-category button,.home-categories button {background:var(--surface);color:var(--ink);border-color:var(--line);box-shadow:none}
.search{border-radius:18px}
.search input{color:var(--ink);caret-color:var(--accent);font-size:14px}
.search input::placeholder{color:var(--quiet)}
.chip,.pv-category-shortcut{border-radius:15px;font-size:12px;font-weight:730;min-height:44px}
.chip.active,.pv-category-shortcut.active:not(.pv-all-categories),
.home-categories button.selected,.home-categories button:active,
.filter-drawer button.active,.filter-drawer .pv-adv-group button.on,
.theme-choices button.selected{background:var(--accent);color:white;border-color:var(--accent)}
.pv-all-categories{background:#FFF0E8;color:#9D4A31;border-color:#E8B6A4}
.pv-all-categories.active{outline-color:var(--accent)}
.pv-category-shortcut:focus-visible,.pv-category-tile:focus-visible,.pv-category-close:focus-visible,
.ingredient:focus-visible {outline-color:var(--accent)}
.pv-category-sheet{color:var(--ink)}
.pv-category-sheet .overline{color:var(--accent)}
.pv-category-tile.selected{background:#FFF0E8;border-color:#E9A28B}
.pv-category-emoji{background:#F9EBE3}
.pv-category-close{color:var(--accent)}
.pv-category-tile small,.pv-selected-category{color:var(--quiet)}
.pv-selected-category button{color:var(--accent)}
.filter-line>button,.reference-heading button,.block-title button{color:var(--accent)}
.filter-drawer .pv-adv-group button{background:var(--surface);border-color:var(--line);color:var(--ink)}
.filter-drawer .pv-adv-reset{background:var(--surface);border-color:var(--line);color:var(--accent)}
html[data-theme="dark"] .search,html[data-theme="dark"] .category-tile,
html[data-theme="dark"] .chip,html[data-theme="dark"] .filter-drawer,
html[data-theme="dark"] .filter-drawer button,
html[data-theme="dark"] .filter-drawer .pv-adv-group button,
html[data-theme="dark"] .pv-category-shortcut,
html[data-theme="dark"] .pv-category-sheet,
html[data-theme="dark"] .pv-category-tile,
html[data-theme="dark"] .pv-category-close,
html[data-theme="dark"] .round-back{background:#1B1A16;color:#F5F2ED;border-color:#37342F}
html[data-theme="dark"] .search input{color:#F5F2ED;caret-color:#E66A43}
html[data-theme="dark"] .search input::placeholder{color:#958D86}
html[data-theme="dark"] .chip.active,
html[data-theme="dark"] .pv-category-shortcut.active:not(.pv-all-categories),
html[data-theme="dark"] .home-categories button.selected,
html[data-theme="dark"] .home-categories button:active,
html[data-theme="dark"] .filter-drawer button.active,
html[data-theme="dark"] .filter-drawer .pv-adv-group button.on {background:#E66A43;border-color:#E66A43;color:#FFF}
html[data-theme="dark"] .pv-all-categories{background:#30241E;color:#F0B39E;border-color:#744738}
html[data-theme="dark"] .pv-all-categories.active{outline-color:#E66A43}
html[data-theme="dark"] .pv-category-sheet .overline{color:#F08462}
html[data-theme="dark"] .pv-category-tile.selected{background:#35241D;border-color:#A65840}
html[data-theme="dark"] .pv-category-emoji{background:#322820}
html[data-theme="dark"] .pv-category-tile small,
html[data-theme="dark"] .pv-selected-category{color:#A9A19A}
html[data-theme="dark"] .pv-selected-category button{background:#31221B;border-color:#764E3E;color:#EFAE96}
html[data-theme="dark"] .filter-drawer .pv-adv-reset{background:#201D19;color:#F08462;border-color:#41342F}

/* Recipe cards: Telegram photo-first full panel. Preserve the actual content and tap targets. */
.recipe-grid{gap:12px}
.recipe-card{position:relative;display:flex;flex-direction:column;min-width:0;
  overflow:hidden;border:1px solid #DDD5CD;border-radius:22px;background:#FFF;box-shadow:none}
.card-image{aspect-ratio:1.08;border-radius:0;background:#E8DDD1;flex:none;overflow:hidden}
.card-image img{height:100%;width:100%;object-fit:cover}
.card-time{display:none} /* time is already available below the title */
.card-heart{width:36px;height:36px;right:9px;top:9px;border-radius:12px;
  background:rgba(25,24,22,.85);color:#FFF;box-shadow:none;
  font-size:24px;line-height:1}
.card-heart.selected{background:#E66A43;color:#FFF}
.card-content{position:relative;display:flex;flex:1;flex-direction:column;padding:12px 11px 14px}
.card-cat{display:block;max-width:calc(100% - 31px);font-size:10px;font-weight:850;color:#847A71;letter-spacing:.12em}
.card-content h3{font-size:clamp(13px,3.75vw,15px);font-weight:780;letter-spacing:-.018em;
  line-height:1.28;min-height:0;margin:8px 0 10px;color:var(--ink)}
.server-stars{order:2;gap:6px;align-items:center;margin:0 0 9px;min-height:17px}
.server-stars>span{font-size:15px;letter-spacing:-1px;color:#A57D33}
.server-stars small{font-size:10.5px;color:var(--quiet)}
.card-bottom{order:3;margin-top:auto;justify-content:flex-start;gap:8px;flex-wrap:wrap;
  color:var(--quiet);font-size:11px;font-weight:580}
.card-bottom span,.card-bottom span:first-child{display:inline-flex;align-items:center;gap:3px}
.card-bottom span+span::before{content:"·";margin-right:5px;color:var(--quiet)}
html[data-theme="dark"] .recipe-card{background:#1B1A16;border:1px solid #383630;box-shadow:none;color:#F6F3EE}
html[data-theme="dark"] .card-image{background:#302B25;border-radius:0}
html[data-theme="dark"] .card-heart{background:rgba(24,23,22,.88);color:#FFF}
html[data-theme="dark"] .card-heart.selected{background:#E66A43;color:#FFF}
html[data-theme="dark"] .card-content h3{color:#F6F3EE}
html[data-theme="dark"] .card-cat{color:#AAA098}
html[data-theme="dark"] .server-stars>span{color:#9D7B30}
html[data-theme="dark"] .server-stars small,
html[data-theme="dark"] .card-bottom{color:#AAA198}

/* Remaining app surfaces: neutral instead of teal. No screen or navigation changes. */
.feature-card,.profile-actions,.profile-metrics button,.profile-notice,
.week-meal,.week-strip button,.shop-row,.shopping-actions button,
.ingredients-section,.ingredients-section .ingredient-group,
.ingredients-section .ingredient-group-list,.nutrition,.rating-box,
.theme-settings,.theme-choices button,.step-card,.timer-box,.chef-tip,
.full-catalog-callout,.profile-access{background:var(--surface);color:var(--ink);border-color:var(--line);box-shadow:none}
.detail-primary,.menu-buy,.week-strip button.selected,.detail-action-bar .detail-primary,
.action-btn,.cook-next,.timer-primary,.profile-access button,.full-catalog-callout button {background:var(--accent);color:#FFF;border-color:var(--accent)}
.week-meal span,.week-meal button,.profile-actions button svg,
.recipe-heading .overline,.ingredient-group-title,
.ingredients-section .ingredient-group-title,
.ingredient-actions button,.ios-error-report,.install-detailed-guide {color:var(--accent)}
.ingredients-section .ingredient.done .ing-check,.shop-row.done .shop-check {background:var(--accent);border-color:var(--accent)}
.ingredients-section .ingredient:focus-visible{outline:2px solid var(--accent)}
.detail-action-bar,.cook-head,.cook-footer{background:var(--surface);border-color:var(--line)}
html[data-theme="dark"] .feature-card,
html[data-theme="dark"] .profile-actions,
html[data-theme="dark"] .profile-metrics button,
html[data-theme="dark"] .profile-notice,
html[data-theme="dark"] .week-meal,
html[data-theme="dark"] .week-strip button,
html[data-theme="dark"] .shop-row,
html[data-theme="dark"] .shopping-actions button,
html[data-theme="dark"] .ingredients-section,
html[data-theme="dark"] .ingredients-section .ingredient-group,
html[data-theme="dark"] .ingredients-section .ingredient-group-list,
html[data-theme="dark"] .ingredients-section .ingredients,
html[data-theme="dark"] .nutrition,
html[data-theme="dark"] .rating-box,
html[data-theme="dark"] .theme-settings,
html[data-theme="dark"] .theme-choices button,
html[data-theme="dark"] .step-card,
html[data-theme="dark"] .timer-box,
html[data-theme="dark"] .chef-tip,
html[data-theme="dark"] .profile-access,
html[data-theme="dark"] .full-catalog-callout {background:#1B1A16;color:#F5F2ED;border-color:#37342F;box-shadow:none}
html[data-theme="dark"] .ingredients-section .ingredient,
html[data-theme="dark"] .ingredients-section .ingredient-group-list>.ingredient{background:transparent;border-color:#39352F}
html[data-theme="dark"] .ingredients-section .ing-name,
html[data-theme="dark"] .ingredients-section .ing-amount {color:#EDE9E3}
html[data-theme="dark"] .ingredients-section .ingredient-group-title{color:#F08462;border-color:#403832}
html[data-theme="dark"] .ingredients-section .ing-check{background:#1B1A16;border-color:#716760}
html[data-theme="dark"] .ingredients-section .ingredient.done .ing-check{background:#E66A43;border-color:#E66A43}
html[data-theme="dark"] .profile-actions button svg,
html[data-theme="dark"] .week-meal span,
html[data-theme="dark"] .week-meal button{color:#F08462}
html[data-theme="dark"] .week-strip button.selected,
html[data-theme="dark"] .detail-primary,
html[data-theme="dark"] .menu-buy,
html[data-theme="dark"] .action-btn,
html[data-theme="dark"] .cook-next,
html[data-theme="dark"] .timer-primary,
html[data-theme="dark"] .profile-access button,
html[data-theme="dark"] .full-catalog-callout button{background:#E66A43;border-color:#E66A43;color:#FFF}
html[data-theme="dark"] .detail-action-bar,
html[data-theme="dark"] .cook-head,
html[data-theme="dark"] .cook-footer {background:#1B1A16;border-color:#37342F}
html[data-theme="dark"] .theme-choices button.selected{background:#E66A43;border-color:#E66A43;color:white}
html[data-theme="dark"] .toast{background:#F7F0E8;color:#201E1B}

/* Typography remains compact even on narrow devices. */
@media(max-width:370px){
 .recipe-grid{gap:9px}
 .card-content{padding:10px 9px 12px}
 .card-content h3{font-size:13px}
 .card-cat{font-size:9px}
 .card-bottom{font-size:10px}
 .server-stars>span{font-size:13px}
 .pv-category-shortcut{font-size:11px}
}

/* Modal dialogs and helper controls: remove green accents here too. */
.ios-pair-dialog,.ios-report-dialog,.install-sheet{background:var(--surface);color:var(--ink)}
.pair-number,.pair-graphic{background:var(--cream);color:var(--accent);border-color:var(--line)}
.pair-messenger a,.ios-report-send{background:var(--accent);color:white}
.pair-messenger a+a,.pair-retry{background:var(--surface);color:var(--accent)}
.ios-error-report{background:var(--surface);border-color:var(--line);color:var(--accent)}
.ios-report-dialog textarea{background:var(--surface);border-color:var(--line);color:var(--ink)}
.ingredients-section .ingredient-actions button,
.ingredient-actions button,.detail-cart,
.theme-choices button{background:var(--surface);color:var(--accent);border-color:var(--line)}
html[data-theme="dark"] .ios-pair-dialog,
html[data-theme="dark"] .ios-report-dialog,
html[data-theme="dark"] .install-sheet{background:#1B1A16;color:#F5F2ED}
html[data-theme="dark"] .pair-number,
html[data-theme="dark"] .pair-graphic{background:#2D211B;color:#F08462;border-color:#634539}
html[data-theme="dark"] .pair-messenger a{background:#E66A43;color:white}
html[data-theme="dark"] .pair-messenger a+a,
html[data-theme="dark"] .pair-retry{background:#1B1A16;color:#F08462}
html[data-theme="dark"] .ios-error-report,
html[data-theme="dark"] .detail-cart{background:#1B1A16;color:#F08462;border-color:#37342F}
html[data-theme="dark"] .ios-report-dialog textarea{background:#11100E;color:#F5F2ED;border-color:#37342F}
html[data-theme="dark"] .ingredients-section .ingredient-actions button,
html[data-theme="dark"] .ingredient-actions button{background:#27211C;color:#F08462;border-color:#534035}
html[data-theme="dark"] .profile-access.connected{background:#282019;border-color:#594235}
html[data-theme="dark"] .profile-access.connected button{background:#31241C;color:#F6B098;border-color:#6B4839}

/* Native in-app email / ЮKassa purchase sheet. CSS ONLY; no changes to payment logic. */
html.pv-native .pv-buy-entry {background:var(--surface);border-color:var(--line);box-shadow:var(--shadow)}
.pv-buy-entry b{color:var(--ink);font-size:15px}
.pv-buy-entry p{color:var(--quiet)}
.pv-buy-entry button,.pv-buy-cta{background:#E66A43;color:#fff;box-shadow:none}
.pv-buy-dialog{background:var(--surface);border-color:var(--line);color:var(--ink);box-shadow:0 -8px 26px rgba(0,0,0,.15)}
.pv-buy-brand,.pv-buy-dialog h2,.pv-buy-label{color:var(--ink)}
.pv-buy-brand{font-size:20px}
.pv-buy-dialog h2{font-size:23px;line-height:1.16}
.pv-buy-brand span{color:#E66A43}
.pv-buy-sub,.pv-buy-fine,.pv-buy-plan-copy small{color:var(--quiet)}
.pv-buy-benefits{background:var(--cream);border-color:var(--line);color:var(--ink);font-weight:650}
.pv-buy-x{background:var(--cream);border-color:var(--line);color:var(--ink)}
.pv-buy-dialog input{background:var(--surface);border-color:var(--line);color:var(--ink)}
.pv-buy-dialog input:focus{border-color:#E66A43;box-shadow:0 0 0 2px rgba(230,106,67,.16)}
.pv-buy-section-title{color:var(--quiet)}
.pv-buy-plan{background:var(--surface);border-color:var(--line);color:var(--ink)}
.pv-buy-plan.selected{background:rgba(230,106,67,.10);border-color:#E66A43;box-shadow:0 0 0 1px rgba(230,106,67,.15)}
.pv-buy-plan-copy em{color:#E66A43}
.pv-buy-plan strong{color:var(--ink);font-size:16px}
.pv-buy-secondary{color:#E66A43}
.pv-buy-status{color:var(--quiet)}
.pv-buy-error{color:#D55339}
.pv-buy-loading{color:var(--quiet)}
.pv-buy-payment-icon{background:var(--cream);color:#E66A43}
html[data-theme="dark"] .pv-buy-entry{background:#1B1A16;border-color:#37342F}
html[data-theme="dark"] .pv-buy-entry b{color:#F6F3EE}
html[data-theme="dark"] .pv-buy-entry p{color:#A9A19A}
html[data-theme="dark"] .pv-buy-dialog{background:#1B1A16;border-color:#383630;color:#F6F3EE}
html[data-theme="dark"] .pv-buy-brand,
html[data-theme="dark"] .pv-buy-dialog h2,
html[data-theme="dark"] .pv-buy-label{color:#F6F3EE}
html[data-theme="dark"] .pv-buy-sub,
html[data-theme="dark"] .pv-buy-fine{color:#A9A19A}
html[data-theme="dark"] .pv-buy-benefits{background:#25221E;border-color:#383630;color:#F6F3EE}
html[data-theme="dark"] .pv-buy-x{background:#25221E;border-color:#383630;color:#F6F3EE}
html[data-theme="dark"] .pv-buy-dialog input{background:#11100E;border-color:#4B4640;color:#F6F3EE}
html[data-theme="dark"] .pv-buy-plan{background:#25221E;border-color:#383630;color:#F6F3EE}
html[data-theme="dark"] .pv-buy-plan.selected{background:#39261E;border-color:#E66A43;box-shadow:0 0 0 1px rgba(230,106,67,.13)}
html[data-theme="dark"] .pv-buy-plan strong{color:#F6F3EE}
html[data-theme="dark"] .pv-buy-section-title{color:#A9A19A}
html[data-theme="dark"] .pv-buy-plan-copy small{color:#A9A19A}
html[data-theme="dark"] .pv-buy-status{color:#D2C4B8}
html[data-theme="dark"] .pv-buy-error{color:#FFA28E}
html[data-theme="dark"] .pv-buy-payment-icon{background:#38251C;color:#F08462}


/* v6 improvements: subscription, macro, weekly menu rules, cooking */
/* v5 UI refinement: better tariff card, cleaner nutrition/ingredients, and redesigned cook mode. */
.full-catalog-callout{
  margin:8px 0 18px;
  padding:18px;
  border-radius:22px;
  border:1px solid var(--line);
  background:linear-gradient(180deg,#fff 0%,#faf7f2 100%);
  display:flex;
  gap:14px;
  align-items:flex-start;
  box-shadow:0 8px 24px rgba(29,24,19,.05);
}
.full-catalog-callout>div{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}
.full-catalog-callout strong{display:block;font-size:16px;font-weight:820;line-height:1.25;color:var(--ink)}
.full-catalog-callout p{font-size:12.5px;line-height:1.48;color:var(--quiet);margin:0;max-width:28ch}
.full-catalog-callout button,.profile-access button{
  align-self:flex-end;
  min-height:46px;
  padding:0 18px;
  border-radius:15px;
  font-size:14px;
  font-weight:800;
  white-space:nowrap;
}
.profile-access{
  border-radius:20px;
  padding:18px;
  align-items:flex-start;
  gap:12px;
}
.profile-access b{font-size:15px}
.profile-access p{font-size:12.5px;line-height:1.45}
@media(max-width:520px){
  .full-catalog-callout,.profile-access{display:block}
  .full-catalog-callout button,.profile-access button{width:100%;margin-top:14px}
}

.nutrition{padding:14px 12px 12px;border-radius:18px}
.nutrition-heading{margin:0 2px 10px}
.nutrition-heading h2{font-size:15px;font-weight:780}
.nutrition-heading small{font-size:10px}
.macro,.macro.protein,.macro.fat,.macro.carbs{padding:7px 2px 3px}
.macro strong{font-size:20px}
.macro small,.macro span{font-size:9.5px}
.nutrition-foot{font-size:9.5px;margin:8px 4px 0}

.ingredients-section .ingredient{min-height:50px;padding:11px 11px;font-size:12px}
.ingredients-section .ing-name,.ingredients-section .ing-amount{font-size:12px}
.ingredients-section .ing-progress{font-size:11px}
.ingredients-section .ingredient-hint{font-size:10.5px;line-height:1.45}
.ingredients-section .inline-portions span{font-size:10.5px}

.start-cook{
  display:flex;
  width:100%;
  align-items:center;
  gap:12px;
  text-align:left;
  background:var(--surface);
  color:var(--ink);
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px 15px;
  margin-bottom:14px;
  box-shadow:none;
}
.start-cook>span:first-child{
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  border-radius:14px;
  background:rgba(230,106,67,.12);
  color:var(--accent);
  flex:none;
}
.start-cook div{flex:1;min-width:0}
.start-cook strong{display:block;font-size:15px;line-height:1.2;color:var(--ink)}
.start-cook small{display:block;font-size:11px;line-height:1.35;color:var(--quiet);opacity:1;margin-top:4px}
.start-cook .go-arrow{font-size:20px;color:var(--accent)}

.cook-shell{display:flex;flex-direction:column;height:100dvh;min-height:0;background:var(--paper)}
.cook-head{gap:12px;padding:calc(14px + env(safe-area-inset-top)) 16px 14px;background:var(--surface);border-bottom:1px solid var(--line)}
.cook-head>button{width:40px;height:40px;border-radius:13px;background:var(--surface);border:1px solid var(--line)}
.cook-head b{font-size:17px}
.cook-head small{font-size:11px;margin-top:3px}
.cook-head>span{font-size:13px;font-weight:820;color:var(--accent)}
.cook-progress{height:4px;background:#f1e8df}
.cook-progress span{display:block;height:100%;background:var(--accent);transition:width .2s}
.cook-body{overflow-y:auto;flex:1;padding:18px 16px 16px;display:flex;flex-direction:column;gap:14px}
.cook-stage-card{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:16px}
.cook-stage-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.cook-step-chip{display:inline-flex;align-items:center;height:30px;padding:0 12px;border-radius:999px;background:rgba(230,106,67,.12);color:var(--accent);font-size:12px;font-weight:820;letter-spacing:.01em}
.cook-step-text{margin:0;font-size:22px;line-height:1.46;font-weight:760;letter-spacing:-.02em;color:var(--ink)}
.timer-hint{display:inline-flex;align-items:center;gap:8px;background:#f5eee6;color:#7b5e49;border-radius:999px;font-size:12px;font-weight:760;padding:8px 12px}
.timer-box{margin-top:0;background:var(--surface);border-radius:18px;border:1px solid var(--line);padding:16px;text-align:center}
.timer-box>strong{display:block;font-size:34px;letter-spacing:.01em;font-variant-numeric:tabular-nums;margin:8px 0 14px}
.timer-actions{display:grid;grid-template-columns:1fr 1.15fr 1fr;gap:8px}
.timer-actions button{min-height:46px;padding:10px 4px;border-radius:14px;background:#f5eee7;font-size:13px;font-weight:760}
.timer-actions .timer-primary{background:var(--accent);color:#fff}
.cook-footer{display:grid;grid-template-columns:1fr 1.3fr;gap:10px;background:var(--surface);border-top:1px solid var(--line);padding:12px 16px calc(14px + env(safe-area-inset-bottom))}
.cook-footer button{min-height:52px;border-radius:16px;font-weight:800;font-size:15px;padding:14px}
.cook-footer button:not(.cook-next){background:#f2ebe2;color:var(--ink)}
.cook-footer .cook-next{background:var(--accent);color:#fff}

html[data-theme="dark"] .full-catalog-callout{background:#1f1d18;border-color:#39342d;box-shadow:none}
html[data-theme="dark"] .full-catalog-callout p,
html[data-theme="dark"] .profile-access p{color:#c4beb4}
html[data-theme="dark"] .start-cook,
html[data-theme="dark"] .cook-head,
html[data-theme="dark"] .cook-stage-card,
html[data-theme="dark"] .timer-box,
html[data-theme="dark"] .cook-footer{background:#1B1A16;border-color:#37342F;box-shadow:none}
html[data-theme="dark"] .start-cook strong,
html[data-theme="dark"] .cook-step-text{color:#F5F2ED}
html[data-theme="dark"] .start-cook small,
html[data-theme="dark"] .cook-head small{color:#B7B0A6}
html[data-theme="dark"] .start-cook>span:first-child,
html[data-theme="dark"] .cook-step-chip{background:rgba(240,132,98,.14);color:#F08462}
html[data-theme="dark"] .cook-head>button{background:#24211d;border-color:#3b3731;color:#F5F2ED}
html[data-theme="dark"] .cook-progress{background:#2c2924}
html[data-theme="dark"] .timer-hint{background:#2a251f;color:#F6B098}
html[data-theme="dark"] .timer-actions button{background:#2a251f;color:#F5F2ED}
html[data-theme="dark"] .cook-footer button:not(.cook-next){background:#2a251f;color:#F5F2ED}
html[data-theme="dark"] .cook-footer .cook-next,
html[data-theme="dark"] .full-catalog-callout button,
html[data-theme="dark"] .profile-access button{background:#E66A43;border-color:#E66A43;color:#FFF}

/* FINAL CORAL PALETTE GUARD: all active controls use our Telegram colors. */
:root, html[data-theme="light"] {
 --accent:#E66A43; --accent2:#D75C37; --green:#E66A43; --reference-green:#E66A43;
}
html[data-theme="dark"] {
 --accent:#E66A43; --accent2:#F08462; --green:#E66A43; --reference-green:#E66A43;
}
.chip.active,.pv-category-shortcut.active:not(.pv-all-categories),
.home-categories button.selected,.home-categories button:active,
.week-strip button.selected,.navitem.active,.theme-choices button.selected,
.filter-drawer button.active,.menu-buy,.detail-primary,
.detail-action-bar .detail-primary,.cook-footer .cook-next,.timer-primary,
.ingredients-section .ingredient.done .ing-check,.shop-row.done .shop-check {
 background-color:var(--accent); border-color:var(--accent);
}
.navitem.active{background:rgba(230,106,67,.10);color:var(--accent)}
.chip.active,.pv-category-shortcut.active:not(.pv-all-categories),
.home-categories button.selected,.week-strip button.selected,
.theme-choices button.selected,.filter-drawer button.active,
.menu-buy,.detail-primary,.detail-action-bar .detail-primary,
.cook-footer .cook-next,.timer-primary{color:#fff}
.card-heart.selected,.detail-fav.selected{background:#E66A43;color:#fff;border-color:#E66A43}
.ing-progress,.ingredients-section .ing-progress,.reference-heading>span,
.reference-heading button,.filter-line>button,.pv-buy-plan-copy em{
 color:var(--accent);
}
html[data-theme="dark"] .cook-shell,html[data-theme="dark"] .cook-body{background:#11100E}
html[data-theme="dark"] .macro,
html[data-theme="dark"] .macro.protein,
html[data-theme="dark"] .macro.fat,
html[data-theme="dark"] .macro.carbs{background:#1B1A16;color:#F5F2ED;border-color:#37342F}
html[data-theme="dark"] .cook-footer button:not(.cook-next){background:#2a251f;color:#F5F2ED}
/* Telegram card + recipe detail treatment, carefully layered after v6. */
/* Reference is the user's actual Telegram catalogue screenshot: IMG_3232(2).jpeg. */

/* Catalogue: each recipe is a single uninterrupted photo + content card. */
.recipe-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; align-items:stretch; }
.recipe-card {
  display:flex; flex-direction:column; overflow:hidden; position:relative;
  border-radius:22px; background:#fff; border:1px solid #E0DAD3;
  box-shadow:none; min-width:0; isolation:isolate;
}
.card-image { display:block; position:relative; aspect-ratio:1.10; overflow:hidden; flex:none; border-radius:0; }
.card-image img { width:100%; height:100%; object-fit:cover; border-radius:0; }
.card-time { display:none; }
.card-heart {
  position:absolute; display:grid; place-items:center; top:9px; right:9px;
  width:40px; height:40px; padding:8px; border-radius:14px;
  color:#FFF; background:rgba(24,23,22,.87); border:0;
  box-shadow:none; font-size:0;
}
.card-heart svg {display:block; width:26px; height:26px; color:#FFF; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linejoin:round; }
.card-heart.selected { background:#E66A43; color:#FFF; }
.card-heart.selected svg { fill:currentColor; }
.card-content {display:flex;flex-direction:column;flex:1;min-width:0;padding:13px 12px 16px;}
.card-headline {display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0;}
.card-cat {min-width:0;max-width:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  color:#807971;letter-spacing:.14em;font-size:10px;font-weight:800;line-height:1.25;text-transform:uppercase;}
.card-id {flex:none;font-size:11px;line-height:1.3;font-weight:800;color:#8B837C;white-space:nowrap;}
.card-content h3 {margin:9px 0 12px; min-height:0; color:var(--ink);
 font-size:clamp(14px,3.75vw,17px);font-weight:790;line-height:1.26;letter-spacing:-.019em;overflow-wrap:break-word;}
.card-content .server-stars {order:0;display:flex;align-items:center;gap:7px;margin:0 0 9px;min-height:20px;flex-wrap:wrap;}
.card-content .server-stars>span {color:#A38134;font-size:17px;line-height:1;letter-spacing:-1px;white-space:nowrap;}
.card-content .server-stars>small {font-size:11px;line-height:1.2;color:var(--quiet);white-space:nowrap;}
.card-bottom {order:0;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;
 margin-top:auto;padding-top:1px;gap:4px 5px;color:var(--quiet);font-size:12px;font-weight:520;line-height:1.3;}
.card-bottom span,.card-bottom span:first-child {display:inline-flex;gap:4px;align-items:center;white-space:nowrap;}
.card-bottom span+span::before {content:"·";margin-right:3px;color:var(--quiet);}
.card-bottom .card-meta-emoji {font-size:14px;letter-spacing:0;line-height:1;}
html[data-theme="dark"] .recipe-card {background:#1D1C19;border:1px solid #383630;box-shadow:none;color:#F5F1EC;}
html[data-theme="dark"] .card-image {background:#292621;}
html[data-theme="dark"] .card-content h3 {color:#F5F1EC;}
html[data-theme="dark"] .card-cat {color:#ABA19B;}
html[data-theme="dark"] .card-id {color:#87807A;}
html[data-theme="dark"] .card-content .server-stars>span {color:#866A2F;}
html[data-theme="dark"] .card-content .server-stars>small,
html[data-theme="dark"] .card-bottom {color:#A49C94;}
html[data-theme="dark"] .card-heart{background:rgba(25,24,22,.9);}
html[data-theme="dark"] .card-heart.selected{background:#E66A43;}

/* Recipe detail: the opened item uses the same photo-first identity, category, ID and rating. */
.detail-layer {background:var(--paper);}
.detail-shell{background:var(--paper);}
.detail-image {height:clamp(245px,78vw,360px);background:var(--surface);}
.detail-image>img{width:100%;height:100%;object-fit:cover;}
.detail-floating-actions{top:calc(12px + env(safe-area-inset-top));left:16px;right:16px;}
.detail-back,.detail-fav {
 border:0;display:grid;place-items:center;width:44px;height:44px;border-radius:15px;
 background:rgba(24,23,22,.88);color:#FFF;box-shadow:none;
}
.detail-fav {font-size:27px;line-height:1;}
.detail-fav.selected {background:#E66A43;color:#FFF;}
.detail-content {position:relative;z-index:2;margin-top:-24px;border-radius:24px 24px 0 0;
  background:var(--paper);padding:22px 17px calc(130px + env(safe-area-inset-bottom));}
.pv-detail-kicker{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px;}
.pv-detail-kicker .overline{font-size:11px;line-height:1.3;font-weight:820;letter-spacing:.125em;color:#A08F81;}
.pv-detail-id{font-size:12px;font-weight:800;color:var(--quiet);white-space:nowrap;}
.recipe-heading h1 {margin:0 0 12px;font-size:clamp(23px,6.5vw,29px);font-weight:800;line-height:1.18;letter-spacing:-.028em;}
.pv-detail-rating {margin:0 0 15px;}
.pv-detail-rating .server-stars {display:flex;align-items:center;gap:9px;flex-wrap:wrap;}
.pv-detail-rating .server-stars>span {font-size:21px;color:#977733;letter-spacing:-1px;line-height:1;}
.pv-detail-rating .server-stars>small {font-size:12px;color:var(--quiet);}
.recipe-heading>p{margin:0 0 15px;font-size:13px;line-height:1.56;color:var(--quiet);}
.recipe-heading .price-note {display:inline-flex;gap:5px;align-items:center;margin:0;padding:9px 12px;border-radius:11px;
 background:#F3ECE3;color:#705F4E;font-size:12px;font-weight:700;}
.recipe-info{gap:14px;flex-wrap:wrap;margin:16px 0 18px;}
.recipe-info b{font-size:12.5px;font-weight:750;}
.nutrition{border-radius:18px;}
.ingredients-section .ingredient{line-height:1.4;}
.step-card{border-radius:17px;}
.detail-action-bar{border-color:var(--line);box-shadow:none;}
html[data-theme="dark"] .detail-layer,
html[data-theme="dark"] .detail-shell,
html[data-theme="dark"] .detail-content{background:#11100E;color:#F5F1EC;}
html[data-theme="dark"] .detail-back,
html[data-theme="dark"] .detail-fav{background:rgba(24,23,22,.9);border:0;color:#FFF;}
html[data-theme="dark"] .detail-fav.selected{background:#E66A43;color:#FFF;}
html[data-theme="dark"] .pv-detail-kicker .overline{color:#A9A099;}
html[data-theme="dark"] .pv-detail-id{color:#8E857D;}
html[data-theme="dark"] .recipe-heading h1{color:#F5F1EC;}
html[data-theme="dark"] .pv-detail-rating .server-stars>span{color:#8B7031;}
html[data-theme="dark"] .recipe-heading>p{color:#A9A19A;}
html[data-theme="dark"] .recipe-heading .price-note{background:#24201B;color:#C7B8A9;}
html[data-theme="dark"] .recipe-info b{color:#D7D0C9;}

/* Compact narrow screens, without breaking the two-column Telegram layout. */
@media(max-width:370px) {
 .recipe-grid{gap:9px;}
 .card-content{padding:10px 9px 12px;}
 .card-content h3{font-size:13px;margin:7px 0 10px;}
 .card-cat{font-size:9px;}
 .card-id{font-size:10px;}
 .card-bottom{font-size:10.5px;gap:3px;}
 .card-bottom .card-meta-emoji{font-size:12px;}
 .card-heart{width:36px;height:36px;right:7px;top:7px;}
 .card-heart svg{width:23px;height:23px;}
 .card-content .server-stars>span{font-size:15px;}
 .card-content .server-stars>small{font-size:10px;}
 .detail-content{padding-left:13px;padding-right:13px;}
}


/* v8: shopping actions must never overflow the viewport on narrow Android screens. */
.shopping-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 16px;
  align-items: stretch;
}
.shopping-actions button {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 11px 9px;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
  line-height: 1.25;
  color: var(--ink);
}
.shopping-actions button:first-child {color: var(--accent);}
.shopping-actions button svg {flex: 0 0 auto; max-width: 18px;}
/* Do not let a wide child pull the whole screen sideways. */
.app-shell, .main {min-width: 0; max-width: 100%;}
html, body {overscroll-behavior-x: none;}
@media (max-width: 340px) {
  .shopping-actions {grid-template-columns: minmax(0, 1fr);}
}


/* PV-FAV-SVG-BACK-20261114 */
.card-heart svg,.detail-fav svg{display:block;width:25px;height:25px;flex:none;stroke:currentColor;fill:none}
.card-heart.selected svg,.detail-fav.selected svg{fill:currentColor}
.card-heart:focus-visible,.detail-fav:focus-visible,.detail-back:focus-visible{outline:3px solid #ffb086;outline-offset:2px}


/* PV-HEART-SMALL-NAV2: compact icon, retain an accessible 42px tap target. */
.card-heart{
 width:32px;height:32px;top:8px;right:8px;padding:5px;border-radius:11px;
}
.card-heart svg{width:18px;height:18px;stroke-width:1.9}
.card-heart::before{content:"";position:absolute;inset:-5px}
.detail-fav{width:36px;height:36px;border-radius:12px;padding:5px}
.detail-fav svg{width:20px;height:20px;stroke-width:1.9}
.detail-fav::before{content:"";position:absolute;inset:-4px}
@media (max-width:420px){.card-heart{width:32px;height:32px;top:8px;right:8px}.card-heart svg{width:18px;height:18px}}


/* PV-FAV-OVERLAY-NAV3:
   A static-positioned button had an absolute ::before stretched over the
   entire toolbar, stealing all clicks from the Back arrow. */
.detail-floating-actions > .detail-back{
 position:relative;z-index:2;
}
.detail-floating-actions > .detail-fav{
 position:relative;z-index:1;
}
.detail-floating-actions > .detail-fav::before{
 content:none;display:none;pointer-events:none;
}


/* PV-TELEGRAM-CATALOG-CARDS-V1: list presentation mirrors actual Telegram webapp;
   do not apply these changes to the recipe-detail screen. */
.recipe-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:stretch}
.recipe-card{display:flex;flex-direction:column;overflow:hidden;min-width:0;background:#fff;border:1px solid rgba(127,112,94,.17);border-radius:20px;box-shadow:0 10px 28px rgba(54,43,31,.08)}
.recipe-card .card-image{aspect-ratio:1.1/1;position:relative;overflow:hidden;flex:none;border-radius:0}
.recipe-card .card-image img{display:block;width:100%;height:100%;object-fit:cover}
.recipe-card .card-content{padding:11px 11px 13px;display:flex;flex:1;flex-direction:column;min-width:0}
.recipe-card .card-headline{display:flex;align-items:center;justify-content:space-between;gap:7px;min-width:0}
.recipe-card .card-cat{display:block;min-width:0;max-width:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex:1;font-size:10px;line-height:1.25;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#7d756c}
.recipe-card .card-id{flex:none;font-size:10px;letter-spacing:0;text-transform:none;font-weight:750;opacity:.72;color:#7d756c;white-space:nowrap}
.recipe-card .card-content h3{font-size:15px;line-height:1.2;min-height:0;margin:5px 0 8px;font-weight:770;letter-spacing:-.012em}
.recipe-card .server-stars{order:0;display:flex;align-items:center;gap:6px;min-height:14px;margin:0 0 7px;flex-wrap:wrap}
.recipe-card .server-stars>span{font-size:13px;letter-spacing:-1px;line-height:1;color:#f5b800}
.recipe-card .server-stars.no-rating>span{color:rgba(245,184,0,.5)}
.recipe-card .server-stars>small{font-size:10px;line-height:1.2;color:#7d756c}
.recipe-card .card-bottom{order:0;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:4px;min-height:14px;margin-top:auto;padding-top:0;font-size:11px;line-height:1.3;font-weight:520;color:#7d756c}
.recipe-card .card-bottom span{display:inline-flex;align-items:center;gap:3px;white-space:nowrap}
.recipe-card .card-bottom span+span::before{content:"·";margin-right:3px;color:inherit}
.recipe-card .card-heart{width:32px;height:32px;top:8px;right:8px;padding:5px;border-radius:11px}
.recipe-card .card-heart svg{width:18px;height:18px;stroke-width:1.9}
html[data-theme="dark"] .recipe-card{background:#1c1a17;border:1px solid rgba(255,244,232,.11);box-shadow:0 12px 30px rgba(0,0,0,.17)}
html[data-theme="dark"] .recipe-card .card-content h3{color:#f5f1eb}
html[data-theme="dark"] .recipe-card .card-cat,html[data-theme="dark"] .recipe-card .card-id,
html[data-theme="dark"] .recipe-card .card-bottom,html[data-theme="dark"] .recipe-card .server-stars>small{color:#aaa198}
html[data-theme="dark"] .recipe-card .server-stars>span{color:#f5b800}
html[data-theme="dark"] .recipe-card .server-stars.no-rating>span{color:rgba(245,184,0,.45)}
@media(min-width:620px){.recipe-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:355px){.recipe-grid{gap:9px}.recipe-card .card-content{padding:10px 9px 12px}.recipe-card .card-content h3{font-size:13px}}


/* PV-IOS-TOUCH-BACK-V4: unoccluded, tappable standalone iOS back control. */
.detail-image .detail-floating-actions{
 z-index:60;pointer-events:none;isolation:isolate;
}
.detail-image .detail-floating-actions>.detail-back{
 pointer-events:auto;position:relative;z-index:10;
 touch-action:manipulation;-webkit-tap-highlight-color:transparent;
 user-select:none;-webkit-user-select:none;
 cursor:pointer;min-width:44px;min-height:44px;
}
.detail-image .detail-floating-actions>.detail-fav{
 pointer-events:auto;position:relative;z-index:5;touch-action:manipulation;
}
.detail-image .detail-floating-actions>.detail-back::before,
.detail-image .detail-floating-actions>.detail-fav::before{content:none!important;display:none!important;pointer-events:none!important}

/* PV_IOS_RECIPE_TAP_BRIDGE: accessible portion targets in standalone. */
#detail .ingredients-section .inline-portions button{min-width:44px;min-height:44px;touch-action:manipulation}
