@font-face { font-family: 'Nohemi'; src: url('fonts/Nohemi-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Nohemi'; src: url('fonts/Nohemi-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }

:root {
  --bg: #F3F4F6;
  --card: #FFFFFF;
  --ink: #0C1231;
  --muted: #A4A9B6;
  --soft: #6B7083;
  --line: #DCDFE6;
  --blue: #4D5EE1;
  --blue-soft: #EEF0FD;
  --green: #6BC93A;
  --amber: #F3CF83;
  --red: #F48A78;
  --radius: 22px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); }
body {
  font-family: 'Nohemi', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }

#app { max-width: 440px; margin: 0 auto; min-height: 100dvh; }

.screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
  animation: in .28s ease;
}
@keyframes in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Top bar: back + progress dashes */
.top { display: flex; align-items: center; gap: 10px; height: 28px; margin-bottom: 28px; }
.back { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); flex: none; }
.back svg { width: 18px; height: 18px; }
.dashes { display: flex; gap: 4px; flex: 1; }
.dashes i { flex: 1; height: 3px; border-radius: 2px; background: var(--line); }
.dashes i.on { background: var(--blue); }

h1 {
  font-weight: 500;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.sub { margin-top: 12px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.body { flex: 1; display: flex; flex-direction: column; }
.content { margin-top: 28px; display: flex; flex-direction: column; gap: 12px; }

/* Bottom CTA */
.foot { padding-top: 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.next {
  min-width: 120px; height: 62px; padding: 0 36px;
  border-radius: 999px; background: var(--ink); color: #fff;
  font-size: 18px; font-weight: 500;
  transition: opacity .2s, transform .1s;
}
.next:active { transform: scale(.97); }
.next[disabled] { opacity: .25; cursor: default; }
.next.wide { width: 100%; }
.link { color: var(--soft); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

/* Option cards */
.opt {
  width: 100%; text-align: left;
  background: var(--card); border-radius: 18px;
  padding: 22px 24px; min-height: 86px;
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  transition: transform .1s;
}
.opt:active { transform: scale(.985); }
.opt b { font-weight: 500; font-size: 16px; }
.opt span { font-size: 14px; color: var(--ink); }
.opt.sel { background: var(--blue) url('assets/poly-texture.svg') center / cover; color: #fff; }
.opt.sel span { color: #fff; }

/* Unit toggle */
.toggle {
  align-self: center; display: flex; padding: 4px; border-radius: 999px;
  background: #fff; box-shadow: 0 4px 14px rgba(12,18,49,.08); margin-bottom: 6px;
}
.toggle button { min-width: 86px; padding: 10px 18px; border-radius: 999px; font-size: 15px; font-weight: 500; }
.toggle button.on { background: var(--bg); }

.hint { text-align: center; font-size: 14px; color: var(--soft); min-height: 20px; line-height: 1.4; padding: 0 8px; }
.opt-s { min-height: 56px; padding: 16px 24px; }
.opt[disabled] { opacity: .45; cursor: default; }
.opt[disabled] span { color: var(--soft); font-size: 12.5px; }

/* Text inputs */
.field { width: 100%; height: 60px; border-radius: 16px; border: 1.5px solid transparent; background: #fff; padding: 0 20px; font: inherit; font-size: 17px; color: var(--ink); outline: none; }
.field:focus { border-color: var(--blue); }
.fine { font-size: 12.5px; color: var(--muted); line-height: 1.5; text-align: center; }
.fine a { color: var(--soft); }

/* Summary (BMI) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--blue); color: #fff; border-radius: 999px; padding: 9px 16px; font-size: 14px; }
.card { background: var(--card); border-radius: var(--radius); padding: 20px 18px; }
.card h3 { font-size: 15px; font-weight: 500; }
.big { font-size: 44px; font-weight: 500; letter-spacing: -0.02em; margin-top: 6px; }
.big small { font-size: 15px; color: var(--muted); font-weight: 400; margin-left: 4px; letter-spacing: 0; }
.scale { margin-top: 16px; }
.scale-nums, .scale-labels { display: grid; grid-template-columns: repeat(4, 1fr); font-size: 13px; }
.scale-nums span:last-child, .scale-labels span:last-child { text-align: right; }
.scale-labels { font-size: 10.5px; color: var(--muted); letter-spacing: .04em; margin-top: 8px; }
.scale-labels span { text-align: center; }
.scale-labels span:first-child { text-align: left; }
.scale-labels .on { color: var(--ink); font-weight: 500; }
.bar { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 8px; }
.bar i { height: 8px; border-radius: 4px; }
.dot { position: absolute; top: 50%; width: 20px; height: 20px; border-radius: 50%; background: var(--amber); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); transform: translate(-50%,-50%); }
.note { margin-top: 16px; border: 1px solid #D9DDF8; background: #F7F8FE; border-radius: 12px; padding: 12px 14px; font-size: 13.5px; line-height: 1.45; }
.note b { color: var(--blue); font-weight: 500; display: block; margin-bottom: 2px; }

/* Plan */
.label { font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; font-weight: 500; margin: 22px 2px 10px; }
.kcal { font-size: 52px; font-weight: 500; letter-spacing: -0.03em; }
.kcal small { font-size: 16px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.muted { color: var(--muted); font-size: 14.5px; line-height: 1.45; margin-top: 6px; }
.slider { position: relative; height: 6px; border-radius: 3px; background: #E3E6FB; margin: 22px 0 10px; }
.slider i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--blue); }
.slider b { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; background: var(--blue); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); transform: translate(-50%,-50%); }
.row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.row b { color: var(--ink); font-weight: 500; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cell { background: var(--bg); border-radius: 16px; padding: 14px; }
.cell .ico { font-size: 18px; }
.cell p { font-size: 14px; margin-top: 18px; }
.cell strong { display: block; font-size: 26px; font-weight: 500; margin-top: 2px; }
.cell strong small { font-size: 15px; color: var(--muted); font-weight: 400; }
.target { background: var(--blue); color: #fff; border-radius: var(--radius); padding: 18px; position: relative; overflow: hidden; }
.target p { font-size: 14px; margin-top: 40px; }
.target strong { font-size: 26px; font-weight: 500; }
.target svg { position: absolute; right: 0; top: 0; width: 70%; height: 70%; }
.white { background: var(--card); }
.white p { margin-top: 26px; }
details { margin-top: 14px; font-size: 14px; }
details summary { cursor: pointer; color: var(--blue); list-style: none; }
details summary::-webkit-details-marker { display: none; }
.calc { margin-top: 10px; display: grid; gap: 6px; color: var(--soft); }
.calc div { display: flex; justify-content: space-between; }
.calc .tot { color: var(--ink); font-weight: 500; border-top: 1px solid var(--line); padding-top: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { font-size: 12.5px; padding: 6px 10px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); }
.tag.g { background: #EEEFF2; color: var(--soft); }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cols2 h4 { font-size: 14px; font-weight: 500; }
.promo { margin-top: 16px; background: linear-gradient(135deg, #5466E8, #3446C8); color: #fff; border-radius: 18px; padding: 16px 16px 16px 92px; position: relative; font-size: 14.5px; line-height: 1.45; min-height: 96px; display: flex; align-items: center; }
.promo img { position: absolute; left: 6px; bottom: 0; width: 84px; }
.disclaimer { font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.5; margin-top: 16px; }

/* Center screens (mascot) */
.center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 8px; }
.center img { width: 150px; height: auto; }
.center h1 { margin-top: 18px; }
.pct { font-size: 46px; font-weight: 500; margin-top: 18px; }
.checklist { width: 100%; background: #F9FAFB; border-radius: 18px; padding: 18px 22px; margin-top: 26px; text-align: left; }
.checklist h4 { font-size: 14px; font-weight: 500; margin-bottom: 10px; }
.checklist div { display: flex; justify-content: space-between; align-items: center; font-size: 14.5px; height: 28px; }
.ok { width: 20px; height: 20px; border-radius: 50%; background: var(--blue); display: grid; place-items: center; transform: scale(0); transition: transform .25s; }
.ok.on { transform: scale(1); }
.ok svg { width: 12px; }

/* Chart */
.chart { background: var(--card); border-radius: var(--radius); padding: 18px 0 10px; margin-top: 30px; position: relative; }
.chart h3 { font-size: 15px; font-weight: 500; padding: 0 18px; }
.chart svg { display: block; width: 100%; height: auto; margin-top: 8px; }
.chart .berry { position: absolute; width: 54px; }
.chart-x { display: flex; justify-content: space-between; padding: 0 18px; font-size: 11px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.caption { text-align: center; color: var(--muted); font-size: 14px; line-height: 1.5; margin-top: 22px; padding: 0 12px; }

/* Welcome */
.welcome { padding: 0 0 calc(24px + env(safe-area-inset-bottom)); }
.hero { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; display: block; flex: none; }
.welcome .w-body { flex: 1; display: flex; flex-direction: column; padding: 26px 20px 0; text-align: center; }
.welcome h1 { font-size: 34px; }
.welcome .sub { color: var(--soft); }
.welcome .foot { padding: 20px 16px 0; }
.trust { font-size: 13px; color: var(--muted); }

/* Paywall */
.timeline { display: grid; gap: 0; margin-top: 4px; }
.tl { display: grid; grid-template-columns: 36px 1fr; gap: 12px; position: relative; padding-bottom: 18px; }
.tl:not(:last-child)::before { content: ''; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: #D9DDF8; }
.tl .ic { width: 36px; height: 36px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 16px; }
.tl b { font-weight: 500; font-size: 15px; display: block; margin-top: 2px; }
.tl span { color: var(--soft); font-size: 13.5px; line-height: 1.4; }
.plan-opt { width: 100%; text-align: left; background: #fff; border: 2px solid transparent; border-radius: 18px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; position: relative; }
.plan-opt.sel { border-color: var(--blue); }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; }
.plan-opt.sel .radio { border-color: var(--blue); }
.plan-opt.sel .radio::after { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--blue); }
.plan-opt .pt { flex: 1; }
.plan-opt b { font-weight: 500; font-size: 16px; display: block; }
.plan-opt span { font-size: 13px; color: var(--soft); }
.plan-opt .pp { text-align: right; font-weight: 500; font-size: 16px; }
.plan-opt .badge, .badge { color: #fff; font-size: 11px; }
.plan-opt .pd { font-weight: 400; font-size: 12px; color: var(--soft); }
.badge { position: absolute; top: -10px; right: 16px; background: var(--blue); color: #fff; font-size: 11px; font-weight: 500; letter-spacing: .04em; border-radius: 999px; padding: 4px 10px; }
.reassure { display: flex; justify-content: center; gap: 18px; font-size: 13.5px; color: var(--soft); }
.reassure span::before { content: '✓ '; color: var(--blue); }
.mini { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.mini span { background: #fff; border-radius: 999px; padding: 8px 12px; font-size: 13px; }
.mini b { font-weight: 500; }

.toast { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 14px; padding: 12px 18px; border-radius: 12px; max-width: 90%; text-align: center; z-index: 9; }

@media (min-width: 480px) { #app { padding-top: 12px; } }

/* ---------- Variants ---------- */
/* Live recalculation: компактная плашка под прогресс-баром */
.live:not([hidden]) { position: sticky; top: 8px; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #fff; border-radius: 16px; padding: 10px 14px; margin: -14px 0 18px; box-shadow: 0 6px 22px rgba(12,18,49,.10); animation: in .25s ease; }
.live-l { font-size: 13px; font-weight: 500; }
.live-s { font-size: 11.5px; color: var(--soft); margin-top: 2px; }
.live-n { font-size: 28px; font-weight: 500; letter-spacing: -0.02em; color: var(--blue); white-space: nowrap; text-align: right; line-height: 1; }
.live-n small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-top: 3px; }

/* Aha scan */
.meals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.meal { border-radius: 16px; overflow: hidden; aspect-ratio: 1; border: 3px solid transparent; padding: 0; }
.meal img { width: 100%; height: 100%; object-fit: cover; display: block; }
.meal.sel { border-color: var(--blue); }
.detect { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 16px; padding: 14px; margin-top: 12px; font-size: 13.5px; line-height: 1.45; }
.detect b { font-weight: 500; }
.detect-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--blue); color: #fff; display: grid; place-items: center; flex: none; }
.cam { min-height: 100dvh; background: #000; display: flex; flex-direction: column; animation: in .2s ease; }
.cam-view { flex: 1; position: relative; display: grid; place-items: center; padding: 60px 20px; overflow: hidden; }
.cam-view img { width: 100%; max-width: 380px; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.cr { position: absolute; width: 46px; height: 46px; border: 0 solid #fff; }
.cr.tl { top: 22%; left: 14px; border-top-width: 4px; border-left-width: 4px; }
.cr.tr { top: 22%; right: 14px; border-top-width: 4px; border-right-width: 4px; }
.cr.bl { bottom: 22%; left: 14px; border-bottom-width: 4px; border-left-width: 4px; }
.cr.br { bottom: 22%; right: 14px; border-bottom-width: 4px; border-right-width: 4px; }
.scanline { position: absolute; left: 20px; right: 20px; height: 3px; background: #7BE07B; box-shadow: 0 0 18px 6px rgba(123,224,123,.55); top: 25%; animation: scan 1.6s ease-in-out infinite alternate; }
@keyframes scan { to { top: 75%; } }
.cam-bar { border-top: 1px solid #333; padding: 18px 0 calc(28px + env(safe-area-inset-bottom)); }
.cam-modes { display: flex; justify-content: center; gap: 46px; color: #fff; font-size: 16px; letter-spacing: .04em; }
.cam-modes .on { color: #F5B90B; }
.cam-ctrl { display: flex; justify-content: center; align-items: center; gap: 44px; margin-top: 20px; }
.cam-side { width: 52px; height: 52px; border-radius: 50%; background: #2B2B2B; color: #888; display: grid; place-items: center; font-size: 20px; }
.shutter { width: 76px; height: 76px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px #000, 0 0 0 7px #fff; }
.shutter:disabled { opacity: .6; }
.res { padding-top: 0; }
.res-img { margin: 0 -16px; }
.res-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.res .body { background: var(--bg); border-radius: 24px 24px 0 0; margin: -24px -16px 0; padding: 22px 16px 0; position: relative; }
.res-tag { color: #3A9B3A; font-size: 13.5px; font-weight: 500; margin-bottom: 6px; }
.res h1 { font-size: 28px; }
.res-kcal { font-size: 48px; font-weight: 500; letter-spacing: -0.02em; margin-top: 10px; }
.res-kcal small { font-size: 16px; color: var(--muted); font-weight: 400; }
.res-mac { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.res-mac span { background: #fff; border-radius: 12px; padding: 10px; font-size: 12.5px; color: var(--soft); }
.res-mac b { display: block; color: var(--ink); font-size: 18px; font-weight: 500; margin-top: 2px; }

/* Guess game */
.hl { color: var(--blue); }
.guess-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 18px; margin-top: 18px; display: block; }
.guess { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.g-opt { background: #fff; border-radius: 14px; padding: 12px; display: flex; gap: 10px; align-items: flex-start; text-align: left; border: 2px solid transparent; }
.g-opt b { font-weight: 500; font-size: 15px; display: block; }
.g-opt small { font-size: 11.5px; color: var(--soft); }
.g-l { width: 24px; height: 24px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 12px; display: grid; place-items: center; flex: none; }
.g-opt.sel { border-color: var(--blue); }
.g-opt.g-ok { border-color: #3A9B3A; background: #EEF8EE; }
.g-opt.g-ok .g-l { background: #3A9B3A; }
.g-opt.g-bad { border-color: #D9534F; background: #FDF0EF; }
.g-opt.g-bad .g-l { background: #D9534F; }
#app .hint b { font-weight: 500; color: var(--ink); }

/* Promise pad */
.pad { position: relative; background: #fff; border-radius: 18px; height: 120px; margin-top: 10px; }
.pad canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.pad-x { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 22px; }

/* Chat */
.chat .msgs { display: flex; flex-direction: column; gap: 10px; padding-bottom: 30px; }
.msg { display: flex; gap: 8px; align-items: flex-end; animation: in .25s ease; }
.msg img, .typing img { width: 40px; height: 40px; flex: none; }
.msg p { background: #fff; border-radius: 18px 18px 18px 6px; padding: 12px 14px; font-size: 15px; line-height: 1.4; max-width: 78%; }
.msg p small { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.msg.me { justify-content: flex-end; }
.msg.me p { background: linear-gradient(135deg, #3446C8, #2232A8); color: #fff; border-radius: 18px 18px 6px 18px; }
.typing { display: flex; gap: 8px; align-items: flex-end; }
.typing span { background: #fff; border-radius: 18px; padding: 14px 16px; display: flex; gap: 4px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { opacity: .3; transform: translateY(-2px); } }
.chips-opts { display: flex; flex-direction: column; gap: 8px; padding-left: 48px; animation: in .25s ease; }
.chips-opts button { background: #fff; border: 1.5px solid #D9DDF8; border-radius: 999px; padding: 12px 18px; font-size: 15px; text-align: left; }
.chips-opts button:active { background: var(--blue-soft); }
.chips-opts button:disabled { opacity: .4; }
.chat-end { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-top: 8px; animation: in .3s ease; }
.chat-end img { width: 140px; }

/* Chat v2: email и карточка плана в переписке */
.chat-input { padding-left: 48px; animation: in .25s ease; }
.chat-row { display: flex; gap: 8px; }
.chat-row .field { height: 52px; border-radius: 999px; border: 1.5px solid #D9DDF8; }
.send { width: 52px; height: 52px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 18px; flex: none; }
.send:disabled { opacity: .35; }
.chat-input .fine { text-align: left; margin-top: 8px; }
.plan-msg { background: linear-gradient(135deg, #4D5EE1, #2E3FC4); color: #fff; border-radius: 18px 18px 18px 6px; padding: 16px; max-width: 82%; flex: 1; }
.pm-l { font-size: 13px; opacity: .85; }
.pm-k { font-size: 38px; font-weight: 500; letter-spacing: -0.02em; margin-top: 2px; }
.pm-k small { font-size: 14px; opacity: .8; font-weight: 400; }
.pm-m { display: flex; gap: 6px; margin-top: 8px; }
.pm-m span { background: rgba(255,255,255,.16); border-radius: 999px; padding: 5px 10px; font-size: 12.5px; }
.pm-m b { font-weight: 500; }
.pm-g { font-size: 13.5px; margin-top: 10px; }
.pm-g b { font-weight: 500; }
.plan-msg .next { margin-top: 14px; background: #fff; color: var(--ink); height: 50px; font-size: 16px; }
.msg .plan-msg p { background: none; padding: 0; max-width: none; border-radius: 0; line-height: 1.4; }

/* Guess: прогресс по блюдам */
.g-dots { display: flex; gap: 6px; margin-top: 16px; }
.g-dots i { width: 22px; height: 6px; border-radius: 3px; background: var(--line); }
.g-dots i.on { background: var(--blue); }
.g-dots i.cur { background: #A9B2F2; }

/* Exit-оффер при закрытии пейволла */
.exit-ov { position: fixed; inset: 0; z-index: 20; background: rgba(12,18,49,.55); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.ex-sheet { width: 100%; max-width: 440px; background: var(--bg); border-radius: 26px 26px 0 0; padding: 26px 20px calc(22px + env(safe-area-inset-bottom)); text-align: center; animation: up .3s ease; display: flex; flex-direction: column; align-items: center; gap: 12px; max-height: 92dvh; overflow-y: auto; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
.ex-mascot { width: 92px; margin-top: -4px; }
.ex-sheet h2 { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.12; }
.ex-lead { color: var(--soft); font-size: 15px; line-height: 1.45; }
.ex-price { display: flex; align-items: baseline; justify-content: center; gap: 8px; flex-wrap: wrap; }
.ex-price s { color: var(--muted); font-size: 18px; }
.ex-price b { font-size: 36px; font-weight: 500; color: var(--blue); }
.ex-price span { width: 100%; font-size: 13px; color: var(--soft); }
.ex-sheet [data-res] { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.wheel-w { position: relative; width: 230px; height: 230px; margin: 6px 0; }
.wheel-svg { width: 100%; height: 100%; transition: transform 3.2s cubic-bezier(.17,.67,.12,.99); filter: drop-shadow(0 6px 16px rgba(12,18,49,.2)); }
.wheel-pin { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); z-index: 2; width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent; border-top: 22px solid var(--ink); }

/* Paywall B: plan — длинный персональный лендинг */
.pw-long .body { padding-bottom: 10px; }
.pw-goal { background: linear-gradient(135deg, #4D5EE1, #2E3FC4); color: #fff; border-radius: 22px; padding: 18px; margin-top: 20px; }
.pw-goal-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pw-goal small { display: block; font-size: 12px; opacity: .8; }
.pw-goal b { font-size: 26px; font-weight: 500; }
.pw-arrow { font-size: 22px; opacity: .8; }
.pw-goal svg { width: 100%; height: 54px; display: block; margin-top: 8px; }
.pw-goal p { font-size: 13px; opacity: .9; margin-top: 4px; }
.pw-daily { background: #fff; border-radius: 18px; padding: 14px 16px; margin-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pw-daily small { display: block; font-size: 12px; color: var(--soft); }
.pw-daily b { font-size: 28px; font-weight: 500; }
.pw-daily b i { font-style: normal; font-size: 14px; color: var(--muted); font-weight: 400; }
.pw-mac { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pw-mac span { background: var(--blue-soft); color: var(--blue); border-radius: 999px; padding: 5px 9px; font-size: 12px; }
.pw-inline { padding-top: 14px; }
.pw-feats { display: grid; gap: 8px; }
.pw-feats div { background: #fff; border-radius: 16px; padding: 14px; display: flex; gap: 12px; align-items: flex-start; }
.pw-feats span { font-size: 22px; }
.pw-feats p { font-size: 13.5px; color: var(--soft); line-height: 1.4; }
.pw-feats b { display: block; color: var(--ink); font-weight: 500; font-size: 15px; margin-bottom: 2px; }
.pw-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pw-steps div { background: #fff; border-radius: 16px; padding: 14px 10px; text-align: center; }
.pw-steps i { font-style: normal; width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; margin: 0 auto 8px; font-size: 14px; }
.pw-steps p { font-size: 13px; line-height: 1.35; }
.pw-faq { display: grid; gap: 8px; }
.pw-faq details { background: #fff; border-radius: 14px; padding: 14px 16px; margin: 0; }
.pw-faq summary { color: var(--ink); font-weight: 500; font-size: 14.5px; }
.pw-faq p { color: var(--soft); font-size: 13.5px; line-height: 1.45; margin-top: 8px; }
.pw-sticky { position: sticky; bottom: 0; background: linear-gradient(rgba(243,244,246,0), var(--bg) 22%); padding-top: 26px; z-index: 2; }

/* Paywall C: focus — один план */
.pf-hero { position: relative; border-radius: 22px; overflow: hidden; margin-top: 4px; }
.pf-hero img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.pf-tag { position: absolute; left: 14px; bottom: 14px; background: rgba(255,255,255,.94); border-radius: 14px; padding: 10px 14px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.pf-tag b { display: block; font-size: 22px; font-weight: 500; }
.pf-tag span { font-size: 12px; color: var(--soft); }
.pf-checks { margin: 18px auto 0; display: grid; gap: 8px; font-size: 15px; }
.pf-checks p { background: #fff; border-radius: 14px; padding: 12px 16px; }
.pf-price { text-align: center; margin-top: 18px; font-size: 15px; color: var(--soft); }
.pf-price b { color: var(--ink); font-weight: 500; font-size: 17px; }
[data-others]:not([hidden]) { display: grid; gap: 12px; margin-top: 18px; }
.pf-more { display: block; margin: 12px auto 0; }
.pw-sticky.off { opacity: 0; pointer-events: none; } .pw-sticky { transition: opacity .2s; }

/* Прогресс: маскот на конце линии */
.chart-plot { position: relative; }
.chart .berry { position: absolute; width: 78px; transform: translate(-50%, -92%); filter: drop-shadow(0 6px 10px rgba(12,18,49,.18)); }
.end-dot { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #4D5EE1; border: 3px solid #fff; transform: translate(-50%, -50%); box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.target svg { width: 62%; height: auto; top: 14px; right: 12px; }

/* Пейволл: крестик справа */
.pw-top { justify-content: flex-end; }
.close { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(12,18,49,.06); color: var(--soft); }
.close svg { width: 16px; height: 16px; }

/* График прогресса v2 (по макету) */
.chart { padding: 18px 0 14px; overflow: visible; }
.chart-plot { position: relative; margin-top: 14px; }
.chart-plot svg { display: block; width: 100%; height: auto; margin: 0; overflow: visible; }
.chart-plot .grid path { stroke: #E6E8F0; stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.chart-plot .drops path { stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart-plot .pt { position: absolute; width: 13px; height: 13px; border-radius: 50%; background: #4D5EE1; border: 2.5px solid #fff; box-shadow: 0 1px 3px rgba(12,18,49,.25); transform: translate(-50%, -50%); }
.chart .berry { position: absolute; width: 62px; transform: translate(-50%, -100%); filter: drop-shadow(0 5px 8px rgba(12,18,49,.16)); }
.chart-x { position: relative; height: 18px; margin-top: 8px; padding: 0; display: block; }
.chart-x span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.chart-x span:first-child { transform: none; margin-left: -4px; }
.chart-x span:last-child { transform: translateX(-80%); }

/* Target по макету */
.tc { position: relative; overflow: hidden; background: #4557E0; color: #fff; border-radius: 22px; padding: 18px 20px 18px; height: 135px; display: flex; flex-direction: column; justify-content: flex-end; }
.tc-line { position: absolute; inset: 0; width: 100%; height: 100%; }
.tc-ico { position: absolute; left: 18px; top: 16px; width: 26px; height: 26px; }
.tc-ico svg { width: 100%; height: 100%; }
.tc p { position: relative; font-size: 15px; font-weight: 500; }
.tc strong { position: relative; font-size: 30px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.15; margin-top: 2px; }
.tc-arr { color: rgba(255,255,255,.5); margin: 0 2px; }
.tc-cards { margin-top: 10px; }
.tc-card { background: #fff; border-radius: 20px; padding: 18px 16px; }
.tc-card svg { width: 22px; height: 22px; display: block; }
.tc-card p { font-size: 14.5px; font-weight: 500; margin-top: 26px; }
.tc-card b { display: block; font-size: 28px; font-weight: 500; letter-spacing: -0.01em; margin-top: 4px; }
.tc-card p { font-size: 13.5px; white-space: nowrap; }

/* Отступы: число под «Daily goal», подсказка под вариантами угадайки */
.card h3 + .kcal { margin-top: 10px; line-height: 1.05; }
.guess + .hint { margin-top: 14px; }
.g-opt small { white-space: nowrap; font-size: 11px; letter-spacing: -0.01em; }
.consent { margin-top: 2px; padding: 0 6px; } .consent a { color: var(--soft); }

/* Hero: scan */
.hs-stage { position: relative; padding: 22px 16px 0; display: flex; justify-content: center; }
.hs-phone { position: relative; width: 74%; max-width: 300px; aspect-ratio: 9 / 13; border-radius: 34px; overflow: hidden; background: #000; border: 6px solid #0C1231; box-shadow: 0 18px 40px rgba(12,18,49,.25); }
.hs-phone img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .3s; }
.hs-phone .cr { width: 30px; height: 30px; border-color: #fff; }
.hs-phone .cr.tl, .hs-phone .cr.tr { top: 16%; } .hs-phone .cr.bl, .hs-phone .cr.br { bottom: 26%; }
.hs-phone .cr.tl, .hs-phone .cr.bl { left: 10px; } .hs-phone .cr.tr, .hs-phone .cr.br { right: 10px; }
.hs-line { position: absolute; left: 12px; right: 12px; height: 3px; top: 18%; background: #7BE07B; box-shadow: 0 0 16px 5px rgba(123,224,123,.5); animation: hsScan 1.5s ease-in-out infinite alternate; }
@keyframes hsScan { to { top: 70%; } }
.hs-tag { position: absolute; left: 12px; right: 12px; bottom: 12px; background: rgba(255,255,255,.95); border-radius: 16px; padding: 10px 14px; opacity: 0; transform: translateY(12px); transition: all .35s ease; }
.hs-tag.on { opacity: 1; transform: none; }
.hs-tag b { display: block; font-size: 22px; font-weight: 500; }
.hs-tag span { font-size: 12px; color: var(--soft); }
.hs-berry { position: absolute; right: calc(13% - 26px); bottom: -14px; width: 92px; filter: drop-shadow(0 8px 12px rgba(12,18,49,.2)); }
.hs-badge { display: inline-block; align-self: center; background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(12,18,49,.06); }
.hs .w-body { padding-top: 26px; }
.hs-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 16px; }
.hs-chips span { background: #fff; border-radius: 999px; padding: 7px 12px; font-size: 13px; }

/* Hero: goal */
.hg .w-body { padding-top: 34px; }
.hg-berry { width: 110px; align-self: center; margin-bottom: 10px; filter: drop-shadow(0 8px 12px rgba(12,18,49,.16)); }
.hg-goals { display: grid; gap: 10px; margin-top: 22px; text-align: left; }
.hg-goal { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 18px; padding: 16px 18px; transition: transform .1s; }
.hg-goal:active { transform: scale(.98); background: var(--blue-soft); }
.hg-i { width: 44px; height: 44px; border-radius: 14px; background: var(--blue-soft); display: grid; place-items: center; font-size: 22px; flex: none; }
.hg-t { flex: 1; }
.hg-t b { display: block; font-weight: 500; font-size: 17px; }
.hg-t small { font-size: 13px; color: var(--soft); }
.hg-arr { font-size: 26px; color: var(--muted); }
.hg .foot { padding-top: 14px; }
.hs-phone { width: 60%; aspect-ratio: 9 / 12; } .hs-berry { right: calc(20% - 30px); width: 84px; }
.hg-goal, .hg-t { text-align: left; }

/* Иконки вместо эмодзи */
.ic { width: 1.15em; height: 1.15em; vertical-align: -0.22em; flex: none; }
.hs-badge .ic, .hs-chips .ic, .mini .ic { color: var(--blue); }
.hg-i { color: var(--blue); }
.hg-i .ic { width: 24px; height: 24px; vertical-align: 0; }
.cell .ico { color: var(--blue); }
.cell .ico .ic { width: 24px; height: 24px; vertical-align: 0; }
.rec-ic { color: var(--blue); }
.rec-ic .ic { width: 24px; height: 24px; vertical-align: 0; }
.tl .ic-c { width: 36px; height: 36px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; }
.tl .ic-c .ic { width: 18px; height: 18px; vertical-align: 0; }
.pw-feats .ft { width: 40px; height: 40px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; flex: none; font-size: 0; }
.pw-feats .ft .ic { width: 22px; height: 22px; vertical-align: 0; }
.detect-ic .ic { width: 20px; height: 20px; vertical-align: 0; }
.chips-opts .ic { color: var(--blue); margin-right: 4px; }
.msg.me .ic { color: #fff; margin-right: 4px; }
.send .ic { width: 20px; height: 20px; vertical-align: 0; }
.pm-g .ic { margin-right: 2px; }

/* Hero scan: экран 9:16 */
.hs-stage { padding-top: 16px; }
.hs-phone { width: min(56vw, 236px); aspect-ratio: 9 / 16; border-radius: 30px; }
.hs-phone .cr.tl, .hs-phone .cr.tr { top: 24%; } .hs-phone .cr.bl, .hs-phone .cr.br { bottom: 30%; }
.hs-line { top: 26%; animation-name: hsScan916; }
@keyframes hsScan916 { to { top: 66%; } }
.hs-berry { right: calc(50% - min(28vw, 118px) - 34px); bottom: -10px; width: 86px; }
.hs .w-body { padding-top: 20px; }
.hs h1 { font-size: 30px; }
.hs-chips { margin-top: 12px; }

/* Hero scan v2: плавная смена фото, скан low-poly паттерном, плашка с названием */
.hs-phone .hs-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s ease; }
.hs-phone .hs-img.on { opacity: 1; }
.hs-poly { position: absolute; inset: 0; background: url('assets/poly-scan.svg') center / 100% 100%; opacity: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 35%, #000 65%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0%, #000 35%, #000 65%, transparent 100%);
  -webkit-mask-size: 100% 42%; mask-size: 100% 42%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.hs-poly.run { animation: polyScan 1.5s ease-in-out 1 both; }
@keyframes polyScan {
  0% { opacity: 0; -webkit-mask-position: 0 -80%; mask-position: 0 -80%; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { opacity: 0; -webkit-mask-position: 0 180%; mask-position: 0 180%; }
}
.hs-tag small { display: block; font-size: 12px; color: var(--soft); margin-bottom: 1px; }
.hs-tag b { color: var(--blue); }
.hs-line { display: none; }
.hs-tag small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Скан-паутинка внутри рамки камеры */
.hs-poly { display: none; }
.hs-frame { position: absolute; left: 12px; right: 12px; top: 24%; bottom: 30%; pointer-events: none; }
.hs-mesh { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 2px rgba(77,94,225,.9)); transition: opacity .5s ease; }
.hs-mesh line { stroke: #fff; stroke-width: .45; stroke-opacity: .9; stroke-dasharray: 1; stroke-dashoffset: 1; }
.hs-mesh circle { fill: #fff; opacity: 0; }
.hs-mesh.run line { animation: meshDraw .45s ease-out forwards; }
.hs-mesh.run circle { animation: meshDot .3s ease-out forwards; }
.hs-mesh.done { opacity: 0; }
@keyframes meshDraw { to { stroke-dashoffset: 0; } }
@keyframes meshDot { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: none; } }
.hs-mesh circle { transform-box: fill-box; transform-origin: center; }

/* Карточки планов с реальными ценами */
.plan-opt .pt b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.trial-chip { font-style: normal; font-size: 11.5px; font-weight: 500; color: var(--blue); background: var(--blue-soft); border-radius: 999px; padding: 3px 8px; }
.plan-opt .pp { white-space: nowrap; font-size: 18px; }
.plan-opt .pp s { display: block; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.plan-opt .pp small { font-size: 13px; font-weight: 400; color: var(--soft); }
.ex-badge { background: var(--blue); color: #fff; font-size: 12px; font-weight: 500; border-radius: 999px; padding: 5px 12px; letter-spacing: .03em; }
