/* Порция v2 — трекер калорий. Дизайн-система по мотивам Lull. */
:root {
  --bg: #F3F3F5;
  --card: #FFFFFF;
  --card-2: #F3F3F5;
  --ink: #141416;
  --ink-inv: #FFFFFF;
  --g70: #6E6E74;
  --g60: #8A8A90;
  --g40: #B9B9BE;
  --g20: #E6E6EA;
  --g10: #EFEFF2;
  --line: rgba(20, 20, 22, .07);
  --overlay: rgba(20, 20, 22, .34);
  --shadow: none;
  --shadow-lg: none;
  --hair: rgba(20, 20, 22, .07);

  --cal-a: #6553E0; --cal-b: #9A8EF2; --cal-c: #CBCAFB;
  --pro-a: #EE6079; --pro-b: #F6967B; --pro-c: #FDBE86;
  --carb-a: #43A469; --carb-b: #6DBC7C; --carb-c: #C6DC6C;
  --fat-a: #5B7FEC; --fat-b: #8DAFF2; --fat-c: #C2D3FB;

  --cal-t: #5A49D6; --pro-t: #D9485F; --carb-t: #2F8A52; --fat-t: #4468D6;

  --g-cal: linear-gradient(140deg, var(--cal-a) 0%, var(--cal-b) 60%, var(--cal-c) 100%);
  --g-pro: linear-gradient(140deg, var(--pro-a) 0%, var(--pro-b) 58%, var(--pro-c) 100%);
  --g-carb: linear-gradient(140deg, var(--carb-a) 0%, var(--carb-b) 58%, var(--carb-c) 100%);
  --g-fat: linear-gradient(140deg, var(--fat-a) 0%, var(--fat-b) 58%, var(--fat-c) 100%);

  --ok: #3FAE62;
  --warn: #EE6079;

  --r-xl: 26px; --r-lg: 20px; --r-md: 16px; --r-sm: 12px;
  --pad: 22px;
  --ease: cubic-bezier(.25, .8, .25, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.3, 1.3, .55, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --tg-top: 0px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0E0E14;
  --card: #1A1A23;
  --card-2: #24242E;
  --ink: #F3F3F5;
  --ink-inv: #141416;
  --g70: #A5A5B0;
  --g60: #8C8C98;
  --g40: #5E5E6A;
  --g20: #2E2E3A;
  --g10: #24242E;
  --line: rgba(255, 255, 255, .07);
  --overlay: rgba(0, 0, 0, .58);
  --shadow: none;
  --shadow-lg: none;
  --hair: rgba(255, 255, 255, .08);
  --cal-t: #B4ACF7; --pro-t: #F9A58C; --carb-t: #93D49E; --fat-t: #A9C2F6;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
  font-feature-settings: "cv11" 1, "ss01" 1;
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; animation-timing-function: cubic-bezier(.4,0,.2,1); }
button, input, select { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
input { border: 0; outline: 0; background: none; min-width: 0; }
svg.i { width: 20px; height: 20px; flex: none; }

/* Типографика чисел: плотнее, табличные цифры */
.num, .display { font-optical-sizing: auto; font-variation-settings: "opsz" 32; letter-spacing: -0.045em; font-feature-settings: "tnum" 1, "cv11" 1; }
.display.t { letter-spacing: -0.03em; font-feature-settings: normal; }

#app { max-width: 480px; margin: 0 auto; min-height: 100%; position: relative; }

/* ---------- Screens ---------- */
.screen {
  display: none; min-height: 100vh;
  padding: calc(14px + var(--safe-t) + var(--tg-top)) 16px calc(124px + var(--safe-b));
}
.screen.active { display: block; animation: screenIn .45s var(--ease-out) both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(6px); } }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0; }
.top .date { color: var(--g60); font-size: 14px; margin-top: 4px; }
.top h1 { margin: 0; font-size: 28px; font-weight: 500; line-height: 1.15; letter-spacing: -0.025em; }
.avatar {
  width: 46px; height: 46px; border-radius: 50%; flex: none; overflow: hidden;
  background: var(--card); color: var(--ink); display: grid; place-items: center;
  font-weight: 500; font-size: 17px; transition: transform .35s var(--spring);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar:active { transform: scale(.93); }

/* ---------- Week strip ---------- */
.wk-head { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 6px; min-height: 32px; }
.wk-month { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 500; letter-spacing: -0.01em; padding: 6px 2px; }
.wk-month svg { width: 16px; height: 16px; color: var(--g60); transition: transform .3s var(--ease); }
.wk-today { font-size: 13px; font-weight: 500; height: 32px; padding: 0 12px; border-radius: 99px; background: var(--card); box-shadow: var(--shadow); display: inline-flex; align-items: center; gap: 6px; opacity: 0; transform: scale(.9); pointer-events: none; transition: opacity .3s var(--ease), transform .4s var(--spring); }
.wk-today.show { opacity: 1; transform: none; pointer-events: auto; }
.wk-today svg { width: 14px; height: 14px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; position: relative; touch-action: pan-y; }
.week .day {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 10px 0 9px; border-radius: 18px; position: relative; z-index: 1; color: var(--g60);
}
.week .day .wd { font-size: 12px; }
.week .day .dn { font-size: 18px; font-weight: 500; color: var(--g70); transition: color .3s; letter-spacing: -0.02em; }
.week .day.today .dn { color: var(--ink); }
.week .day.sel .dn { color: var(--ink); }
.week .day.today .wd { color: var(--ink); }
.week .day .mark { width: 5px; height: 5px; border-radius: 50%; background: var(--g20); transition: background .3s; }
.week .day.st-in .mark { background: var(--ok); }
.week .day.st-ov .mark { background: var(--pro-b); }
.week .day.st-un .mark { background: var(--g40); }
.week .day[disabled] { opacity: .35; }
.week .pill { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); transition: transform .5s var(--ease-out); z-index: 0; will-change: transform; }

/* ---------- Cards ---------- */
.card { background: var(--card); border-radius: var(--r-xl); padding: var(--pad); box-shadow: var(--shadow); }
.grad { color: #fff; position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 17px var(--pad) calc(var(--pad) + 2px); isolation: isolate; }
.g-cal { background: var(--g-cal); }
.g-pro { background: var(--g-pro); }
.g-carb { background: var(--g-carb); }
.g-fat { background: var(--g-fat); }
.tap { cursor: pointer; transition: transform .35s var(--spring); }
.tap:active { transform: scale(.985); }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gap { height: 8px; }

.c-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 32px; }
.c-title { font-size: 14px; display: flex; align-items: center; gap: 10px; font-weight: 500; }
.ic { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.22); display: grid; place-items: center; flex: none; }
.ic svg { width: 17px; height: 17px; }
#c-p .ic svg, .tip-ic svg.nudge { transform: translate(-1px, 1px); } /* курица (белок) в карточке «Белки» и в советах: на 1px левее и ниже, по просьбе владельца */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; height: 28px; padding: 0 12px; border-radius: 99px; background: rgba(255,255,255,.2); white-space: nowrap; }
.chev { width: 16px; height: 16px; opacity: .7; flex: none; }

.big { font-size: 50px; font-weight: 400; line-height: 1; margin-top: 22px; display: flex; align-items: baseline; gap: 8px; }
.big .of { font-size: 17px; opacity: .85; letter-spacing: -0.01em; font-feature-settings: "tnum" 1; }
.mid { font-size: 36px; font-weight: 400; line-height: 1; margin-top: 24px; display: flex; align-items: baseline; gap: 4px; }
.mid .u { font-size: 17px; opacity: .85; letter-spacing: 0; }
.sub { font-size: 12.5px; opacity: .85; margin-top: 6px; }

/* Ряды точек: прогресс */
.drow { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; height: 8px; }
.drow i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.3); display: block; transition: background-color .5s var(--ease), transform .5s var(--spring); }
.drow i.on { background: #fff; }
.drow i.ov { background: transparent; box-shadow: inset 0 0 0 1.5px #fff; } /* сверх нормы: кольцо вместо точки */
.drow.anim i { transform: scale(0); }
.drow.anim.go i { transform: scale(1); }
.drow.sm { margin-top: 16px; }
.drow.ink i { background: var(--g20); }
.drow.ink i.on { background: var(--cal-b); }

.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.2); }
.stats3 > div + div { padding-left: 14px; border-left: 1px solid rgba(255,255,255,.2); }
.stats3 > div > span { display: block; font-size: 12px; opacity: .8; }
.stats3 b { display: block; font-size: 17px; font-weight: 500; margin-top: 2px; }

/* ---------- Insight ---------- */
.insight { display: flex; gap: 14px; align-items: flex-start; }
.ins-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.ins-ic svg { width: 19px; height: 19px; }
.t-cal { background: color-mix(in srgb, var(--cal-b) 18%, transparent); color: var(--cal-t); }
.t-pro { background: color-mix(in srgb, var(--pro-b) 20%, transparent); color: var(--pro-t); }
.t-carb { background: color-mix(in srgb, var(--carb-b) 20%, transparent); color: var(--carb-t); }
.t-fat { background: color-mix(in srgb, var(--fat-b) 22%, transparent); color: var(--fat-t); }
.t-n { background: var(--card-2); color: var(--g70); }
.ins-t { flex: 1; min-width: 0; padding-top: 1px; }
.ins-t b { display: block; font-weight: 500; font-size: 15px; letter-spacing: -0.01em; }
.ins-t p { margin: 4px 0 0; font-size: 13px; color: var(--g60); line-height: 1.5; }
.ins-t .btn { margin-top: 14px; }

/* ---------- Meals ---------- */
.section-h { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 10px; }
.section-h h2 { font-size: 21px; font-weight: 500; margin: 0; letter-spacing: -0.025em; }
.section-h .muted { font-size: 13px; }
.muted { color: var(--g60); }
.meal-group { background: var(--card); border-radius: var(--r-xl); padding: 8px; box-shadow: var(--shadow); }
.meal-group + .meal-group { margin-top: 12px; }
.mg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 12px 6px; min-height: 48px; }
.mg-head .mg-t { display: flex; align-items: baseline; gap: 8px; font-weight: 500; font-size: 16px; }
.mg-head .mg-t em { font-style: normal; font-weight: 400; font-size: 13px; color: var(--g60); }
.mg-head .mg-t svg { width: 17px; height: 17px; color: var(--g60); }
.mg-head .mg-r { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--g60); }
.mg-save { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--g60); background: var(--card-2); transition: transform .3s var(--spring); }
.mg-save svg { width: 15px; height: 15px; }
.mg-save:active { transform: scale(.93); }
.mg-save.on, .btn.ghost.icon-btn.on { color: var(--cal-t); }
.mg-save.on { background: color-mix(in srgb, var(--cal-b) 18%, transparent); }

.item-wrap { position: relative; border-radius: 20px; overflow: hidden; }
.item-del { position: absolute; inset: 1px; background: var(--warn); color: #fff; display: flex; align-items: center; justify-content: flex-end; padding-right: 24px; border-radius: 20px; opacity: 0; transition: opacity .2s; }
.item-del svg { width: 20px; height: 20px; transition: transform .3s var(--spring); }
.item-wrap.swiping .item-del { opacity: 1; }
.item-wrap.armed .item-del svg { transform: scale(1.22); }
.item {
  display: flex; align-items: center; gap: 14px; padding: 11px 12px; border-radius: 20px; background: var(--card);
  position: relative; transition: transform .45s var(--ease-out), background-color .25s; touch-action: pan-y;
}
.item:active { background: var(--card-2); }
.item.dragging { transition: none; }
.fic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; overflow: hidden; }
.fic svg { width: 21px; height: 21px; }
.fic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item .it { flex: 1; min-width: 0; }
.item .it b { font-weight: 500; font-size: 15px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
.item .it span { font-size: 12.5px; color: var(--g60); display: block; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .kc { text-align: right; font-size: 15px; font-weight: 500; white-space: nowrap; }
.item .kc span { display: block; font-size: 12px; color: var(--g60); font-weight: 400; margin-top: 2px; }
.item.fresh { animation: freshIn .7s var(--ease-out) both; }
@keyframes freshIn { from { opacity: 0; transform: translateY(8px); background-color: color-mix(in srgb, var(--cal-b) 18%, var(--card)); } 60% { opacity: 1; transform: none; } }

.empty { text-align: center; padding: 36px 24px 34px; color: var(--g60); }
.empty .em { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: var(--card-2); color: var(--g70); }
.empty .em svg { width: 24px; height: 24px; }
.empty b { color: var(--ink); font-weight: 500; font-size: 16px; display: block; margin-bottom: 6px; letter-spacing: -0.01em; }
.empty p { margin: 0 auto; max-width: 280px; font-size: 13.5px; line-height: 1.5; }
.empty .btn { margin-top: 18px; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; z-index: 30;
  transition: transform .5s var(--ease-out), opacity .35s;
}
.tabbar.hide { transform: translate(-50%, 150%); opacity: 0; }
.navp {
  --tw: 46px; --aw: 124px;
  position: relative; display: flex; align-items: center; height: 58px; padding: 0 6px; border-radius: 99px;
  width: calc(var(--aw) + var(--tw) * 3 + 14px);
  background: color-mix(in srgb, var(--card) 90%, transparent); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--hair);
}
.navp .nk {
  position: absolute; left: 6px; top: 50%; margin-top: -23px; height: 46px; width: var(--aw); border-radius: 99px; background: var(--ink);
  transform: translateX(calc(var(--tw) * var(--i, 0))); transition: transform .55s cubic-bezier(.32,.72,0,1);
  will-change: transform;
}
.tab {
  position: relative; z-index: 1; height: 46px; width: var(--tw); flex: none; border-radius: 99px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  color: var(--g60); font-size: 13.5px; font-weight: 500; white-space: nowrap;
  transition: width .55s cubic-bezier(.32,.72,0,1), color .35s var(--ease);
}
.tab svg { width: 21px; height: 21px; flex: none; transition: transform .4s var(--spring); }
.tab span { max-width: 0; opacity: 0; margin-left: 0; overflow: hidden; transition: max-width .55s cubic-bezier(.32,.72,0,1), opacity .25s, margin-left .55s cubic-bezier(.32,.72,0,1); }
.tab.on { width: var(--aw); color: var(--ink-inv); }
.tab.on span { max-width: 80px; opacity: 1; margin-left: 6px; transition-delay: 0s, .15s, 0s; }
.tab:active svg { transform: scale(.86); }
.fab {
  width: 58px; height: 58px; border-radius: 50%; background: var(--g-pro); color: #fff; display: grid; place-items: center; flex: none;
  transition: transform .35s var(--spring);
}
.fab .gi { display: contents; }
.fab svg { width: 24px; height: 24px; }
.fab:active { transform: scale(.9); }

/* ---------- Buttons, inputs ---------- */
.btn {
  height: 54px; border-radius: 99px; padding: 0 24px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ink); color: var(--ink-inv); font-weight: 500; font-size: 15.5px; width: 100%; white-space: nowrap;
  transition: transform .3s var(--spring), opacity .25s;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: scale(.97); }
.btn.ghost { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.card .btn.ghost, .portion .btn.ghost, .sheet .card .btn.ghost { background: var(--card-2); box-shadow: none; }
.btn.white { background: #fff; color: #141416; }
.btn.glass { background: rgba(255,255,255,.2); color: #fff; }
.btn.danger { background: var(--warn); color: #fff; }
.btn[disabled] { opacity: .35; pointer-events: none; }
.btn.sm { height: 40px; font-size: 14px; padding: 0 16px; width: auto; }
.btn.sm svg { width: 16px; height: 16px; }
.icon-btn { width: 54px; height: 54px; padding: 0; flex: none; }

.seg { display: flex; background: var(--card); border-radius: 99px; padding: 4px; position: relative; box-shadow: var(--shadow); }
.card .seg, .sheet .seg.flat { background: var(--card-2); box-shadow: none; }
.seg button { flex: 1; height: 40px; border-radius: 99px; position: relative; z-index: 1; color: var(--g60); font-size: 14px; font-weight: 500; transition: color .35s var(--ease); white-space: nowrap; padding: 0 8px; }
.seg button.on { color: var(--ink-inv); }
.seg .knob { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 99px; background: var(--ink); transition: transform .5s var(--ease-out), width .5s var(--ease-out); z-index: 0; will-change: transform; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 2px 18px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.fchip { height: 38px; padding: 0 16px; border-radius: 99px; background: var(--card); box-shadow: var(--shadow); font-size: 14px; font-weight: 500; color: var(--g70); display: inline-flex; align-items: center; gap: 7px; flex: none; transition: background-color .3s, color .3s, transform .3s var(--spring); }
.fchip svg { width: 16px; height: 16px; }
.fchip.on { background: var(--ink); color: var(--ink-inv); }
.fchip:active { transform: scale(.95); }
.card .fchip, .portion .fchip { background: var(--card-2); box-shadow: none; }
.card .fchip.on, .portion .fchip.on { background: var(--ink); }

.field { background: var(--card); border-radius: var(--r-md); padding: 11px 16px 10px; display: block; box-shadow: var(--shadow); transition: box-shadow .25s; }
.field:focus-within { box-shadow: 0 0 0 2px var(--ink) inset; }
.field span { font-size: 12px; color: var(--g60); display: block; }
.field input { width: 100%; font-size: 17px; padding: 3px 0 1px; }
.card .field { background: var(--card-2); box-shadow: none; }
.search { display: flex; align-items: center; gap: 10px; background: var(--card); box-shadow: var(--shadow); border-radius: 99px; padding: 0 6px 0 18px; height: 52px; }
.search svg { width: 19px; height: 19px; color: var(--g60); flex: none; }
.search input { flex: 1; font-size: 15.5px; height: 100%; }
.search .clr { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--g60); opacity: 0; pointer-events: none; transition: opacity .2s; }
.search .clr.show { opacity: 1; pointer-events: auto; }
.search .clr svg { width: 15px; height: 15px; }

.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button { width: 40px; height: 40px; border-radius: 50%; background: var(--card-2); display: grid; place-items: center; transition: transform .25s var(--spring); }
.stepper button svg { width: 16px; height: 16px; }
.stepper button:active { transform: scale(.86); }
.stepper .val { min-width: 84px; text-align: center; font-size: 17px; font-weight: 500; cursor: text; letter-spacing: -0.02em; font-feature-settings: "tnum" 1; }
.val-in { width: 70px; text-align: center; font-size: 17px; font-weight: 500; background: var(--bg); border-radius: 10px; padding: 5px 0; }
.stepper.big .val { font-size: 22px; min-width: 110px; }
.stepper.big button { width: 48px; height: 48px; }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; background: transparent; margin: 8px 0 0; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--ink) var(--p, 50%), var(--g20) var(--p, 50%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; margin-top: -11px; box-shadow: 0 0 0 1px var(--hair), 0 0 0 0 transparent; }
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--g20); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--ink); }
input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 1px var(--hair); }

.toggle { width: 50px; height: 30px; border-radius: 99px; background: var(--g20); position: relative; transition: background-color .3s; flex: none; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: none; transition: transform .45s var(--spring); }
.toggle.on { background: var(--ok); }
.toggle.on::after { transform: translateX(20px); }

/* ---------- Sheet ---------- */
.scrim { position: fixed; inset: 0; background: transparent; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .4s var(--ease), background-color 0s .4s, visibility 0s .4s; z-index: 40; }
.scrim.open { background: var(--overlay); opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .4s var(--ease); }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 480px; z-index: 41;
  background: var(--bg); border-radius: 30px 30px 0 0; max-height: 92vh; display: flex; flex-direction: column;
  transform: translateY(104%); visibility: hidden; transition: transform .42s cubic-bezier(.32,.72,0,1), visibility 0s .42s; will-change: transform;
}
.sheet.open { transform: none; visibility: visible; transition: transform .55s cubic-bezier(.32,.72,0,1), visibility 0s; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--g40); opacity: .5; margin: 10px auto 2px; flex: none; }
.sheet .sh-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px 12px; flex: none; }
.sheet .sh-head h3 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -0.025em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet .sh-head .sh-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sheet .x, .sheet .bk { width: 38px; height: 38px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; flex: none; transition: transform .3s var(--spring); }
.sheet .x:active, .sheet .bk:active { transform: scale(.9); }
.sheet .x svg, .sheet .bk svg { width: 16px; height: 16px; }
.sheet .bk { display: none; }
.sheet.has-back .bk { display: grid; }
.sheet .sh-body { overflow-y: auto; padding: 2px 16px 24px; flex: 1; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sheet .sh-foot { padding: 12px 16px 14px; flex: none; }
.sh-body.swap { animation: swapIn .4s var(--ease-out) both; }
@keyframes swapIn { from { opacity: 0; transform: translateX(16px); } }
.sh-body.swap-back { animation: swapBack .4s var(--ease-out) both; }
@keyframes swapBack { from { opacity: 0; transform: translateX(-16px); } }
.fade-sw { animation: fadeSw .35s var(--ease-out) both; }
@keyframes fadeSw { from { opacity: 0; transform: translateY(6px); } }

/* Photo */
.shoot { border-radius: var(--r-xl); background: var(--g-cal); color: #fff; padding: 24px; display: flex; flex-direction: column; }
.shoot .tile { width: 52px; height: 52px; border-radius: 16px; background: rgba(255,255,255,.22); display: grid; place-items: center; }
.shoot .tile svg { width: 26px; height: 26px; }
.shoot h4 { margin: 28px 0 0; font-size: 26px; font-weight: 500; line-height: 1.15; letter-spacing: -0.03em; }
.shoot p { margin: 8px 0 0; opacity: .88; font-size: 13.5px; line-height: 1.5; }
.shoot .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.shoot .acts .btn { height: 50px; font-size: 15px; }
.tips { margin-top: 12px; }
.tips .tip { display: flex; gap: 12px; align-items: flex-start; padding: 12px 6px; font-size: 13.5px; color: var(--g70); }
.tips .tip svg { width: 18px; height: 18px; color: var(--g60); flex: none; margin-top: 1px; }
.preview { border-radius: var(--r-xl); overflow: hidden; position: relative; aspect-ratio: 4/3; background: var(--card-2); }
.preview img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transform: scale(1.03); transition: opacity .5s var(--ease), transform 1s var(--ease-out), filter .6s; }
.preview.loaded img { opacity: 1; transform: none; }
.preview.scanning img { filter: brightness(.78) saturate(.9); }
.preview .scan { position: absolute; left: 0; right: 0; top: 0; height: 100%; background: linear-gradient(to bottom, transparent 0%, rgba(203,202,251,.0) 35%, rgba(203,202,251,.35) 50%, transparent 65%); opacity: 0; transform: translateY(-100%); }
.preview.scanning .scan { opacity: 1; animation: scan 2.2s var(--ease) infinite; }
@keyframes scan { to { transform: translateY(100%); } }
.preview .status { position: absolute; left: 14px; bottom: 14px; background: rgba(20,20,22,.55); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff; border-radius: 99px; height: 36px; padding: 0 14px; font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 9px; opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .4s var(--ease-out); }
.preview.scanning .status { opacity: 1; transform: none; }
.preview .retake { position: absolute; right: 12px; top: 12px; height: 34px; padding: 0 12px; border-radius: 99px; background: rgba(20,20,22,.5); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.preview .retake svg { width: 15px; height: 15px; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: rot .8s linear infinite; flex: none; }
.spin.dark { border-color: var(--g20); border-top-color: var(--ink); }
@keyframes rot { to { transform: rotate(360deg); } }
.note { font-size: 12.5px; color: var(--g60); padding: 12px 6px 0; line-height: 1.5; margin: 0; }
.note a { color: var(--ink); }
.alert { background: var(--card); box-shadow: var(--shadow); border-radius: var(--r-lg); padding: 18px; font-size: 13.5px; line-height: 1.5; color: var(--g70); display: flex; gap: 12px; align-items: flex-start; }
.alert .ins-ic { width: 36px; height: 36px; }
.alert .ins-ic svg { width: 17px; height: 17px; }
.alert b { display: block; color: var(--ink); font-weight: 500; font-size: 14.5px; margin-bottom: 3px; }
.btn-row { display: flex; gap: 10px; margin-top: 12px; }

.res-item { background: var(--card); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); animation: fadeSw .5s var(--ease-out) both; }
.res-item + .res-item { margin-top: 10px; }
.res-top { display: flex; align-items: flex-start; gap: 12px; }
.res-top .fic { width: 40px; height: 40px; }
.res-top textarea { font: inherit; font-size: 16px; font-weight: 500; line-height: 1.3; flex: 1; min-width: 0; letter-spacing: -0.01em; resize: none; overflow: hidden; background: none; border: 0; outline: 0; color: inherit; padding: 4px 0; display: block; }
.res-top .del { width: 32px; height: 32px; border-radius: 50%; background: var(--card-2); display: grid; place-items: center; color: var(--g60); flex: none; }
.res-top .del svg { width: 14px; height: 14px; }
.res-bot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.macros { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.mtag { font-size: 12px; font-weight: 500; height: 26px; padding: 0 10px; border-radius: 99px; display: inline-flex; align-items: center; background: var(--card-2); color: var(--g70); font-feature-settings: "tnum" 1; }
.mtag.k { background: color-mix(in srgb, var(--cal-b) 16%, transparent); color: var(--cal-t); }
.mtag.p { background: color-mix(in srgb, var(--pro-b) 18%, transparent); color: var(--pro-t); }
.mtag.c { background: color-mix(in srgb, var(--carb-b) 18%, transparent); color: var(--carb-t); }
.mtag.f { background: color-mix(in srgb, var(--fat-b) 22%, transparent); color: var(--fat-t); }
.res-sum { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 6px 2px; }
.res-sum b { font-size: 28px; font-weight: 400; }

/* Search list */
.flist { margin-top: 6px; }
.fitem { display: flex; align-items: center; gap: 14px; padding: 10px 8px; border-radius: 20px; width: 100%; text-align: left; transition: background-color .2s; }
.fitem:active { background: var(--card); }
.fitem .ft { flex: 1; min-width: 0; }
.fitem .ft b { font-weight: 500; display: block; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fitem .ft span { font-size: 12.5px; color: var(--g60); display: block; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fitem .plus { width: 36px; height: 36px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; flex: none; }
.fitem .plus svg { width: 16px; height: 16px; }
.subh { font-size: 13px; color: var(--g60); margin: 22px 8px 6px; font-weight: 500; }
.subh:first-child { margin-top: 10px; }
.stagger > * { animation: fadeSw .45s var(--ease-out) both; }

/* Portion editor */
.portion { background: var(--card); border-radius: var(--r-xl); padding: var(--pad); box-shadow: var(--shadow); }
.portion .pn { display: flex; align-items: center; gap: 14px; }
.portion .pn .fic { width: 52px; height: 52px; }
.portion .pn .fic svg { width: 24px; height: 24px; }
.portion .pn b { font-size: 19px; font-weight: 500; display: block; letter-spacing: -0.02em; }
.portion .pn span { font-size: 13px; color: var(--g60); }
.portion .kbig { font-size: 46px; font-weight: 400; margin-top: 22px; line-height: 1; display: flex; align-items: baseline; gap: 8px; }
.portion .kbig .u { font-size: 17px; color: var(--g60); letter-spacing: 0; }
.prow-ln { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.presets .fchip { justify-content: center; padding-left: 0; padding-right: 0; }

/* ---------- Onboarding ---------- */
.ob { min-height: 100vh; padding: calc(20px + var(--safe-t) + var(--tg-top)) 16px 0; display: flex; flex-direction: column; }
.ob-prog { display: flex; gap: 6px; padding: 0 4px; }
.ob-prog i { flex: 1; height: 4px; border-radius: 4px; background: var(--g20); overflow: hidden; position: relative; }
.ob-prog i::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease-out); }
.ob-prog i.done::after { transform: scaleX(1); }
.ob-q { border-radius: var(--r-xl); padding: 24px; margin-top: 18px; color: #fff; position: relative; overflow: hidden; }
.ob-q.s0 { background: var(--g-cal); } .ob-q.s1 { background: var(--g-pro); } .ob-q.s2 { background: var(--g-carb); } .ob-q.s3 { background: var(--g-fat); }
.ob-q .n { font-size: 12.5px; opacity: .85; font-weight: 500; }
.ob-q h2 { font-size: 28px; font-weight: 500; margin: 40px 0 8px; line-height: 1.1; letter-spacing: -0.03em; }
.ob-q p { margin: 0; opacity: .88; font-size: 13.5px; line-height: 1.5; }
.ob-body { flex: 1; padding-top: 14px; }
.ob-body > * { animation: fadeSw .5s var(--ease-out) both; }
.ob-body > *:nth-child(2) { animation-delay: .05s; } .ob-body > *:nth-child(3) { animation-delay: .1s; } .ob-body > *:nth-child(4) { animation-delay: .15s; } .ob-body > *:nth-child(5) { animation-delay: .2s; }
.opt { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; background: var(--card); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow); transition: transform .35s var(--spring), background-color .35s, color .35s; }
.opt + .opt { margin-top: 10px; }
.opt .oi { width: 42px; height: 42px; border-radius: 50%; background: var(--card-2); display: grid; place-items: center; flex: none; color: var(--g70); transition: background-color .35s, color .35s; }
.opt .oi svg { width: 20px; height: 20px; }
.opt b { font-weight: 500; font-size: 16px; display: block; letter-spacing: -0.01em; }
.opt .os { font-size: 13px; color: var(--g60); transition: color .35s; display: block; margin-top: 1px; }
.opt .rad { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--g40); flex: none; display: grid; place-items: center; transition: background-color .3s, border-color .3s; }
.opt .rad svg { width: 13px; height: 13px; color: #fff; opacity: 0; transform: scale(.4); transition: opacity .25s, transform .4s var(--spring); }
.opt.on { background: var(--ink); color: var(--ink-inv); }
.opt.on .os { color: color-mix(in srgb, var(--ink-inv) 62%, transparent); }
.opt.on .oi { background: color-mix(in srgb, var(--ink-inv) 14%, transparent); color: var(--ink-inv); }
.opt.on .rad { border-color: var(--ok); background: var(--ok); }
.opt.on .rad svg { opacity: 1; transform: none; }
.opt:active { transform: scale(.98); }
.nrow { background: var(--card); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nrow + .nrow, .nrow + .field, .field + .nrow { margin-top: 10px; }
.nrow b { font-weight: 500; font-size: 15.5px; display: block; letter-spacing: -0.01em; }
.nrow .ns { font-size: 12.5px; color: var(--g60); display: block; margin-top: 1px; }
.nrow .seg { box-shadow: none; background: var(--card-2); width: 196px; }
.nrow .seg button { height: 36px; font-size: 13.5px; }
.ob-foot { display: flex; gap: 10px; position: sticky; bottom: 0; z-index: 5; background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 0%, transparent) 0, color-mix(in srgb, var(--bg) 85%, transparent) 22px, var(--bg) 40px); margin: -20px -16px 0; padding: 34px 16px calc(14px + var(--safe-b)); pointer-events: none; }
.ob-foot .back { width: 54px; height: 54px; border-radius: 50%; background: var(--card); flex: none; display: grid; place-items: center; box-shadow: var(--shadow); }
.ob-foot .back svg { width: 18px; height: 18px; }

.ring-wrap { position: relative; width: 232px; height: 232px; margin: 18px auto 6px; }
.ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring-wrap .center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring-seg { fill: none; stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset 1.3s var(--ease-out); }
.ring-bg { fill: none; stroke: var(--g20); stroke-width: 12; }

/* ---------- Detail sheets ---------- */
.d-hero { border-radius: var(--r-xl); padding: var(--pad); color: #fff; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 12px; color: var(--g60); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend span { line-height: 16px; }
.legend i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; transform: translateY(.5px); }
.legend i.ln { width: 14px; height: 0; border-radius: 0; border-top: 1.5px solid var(--g40); }
.mbar { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.mbar + .mbar { border-top: 1px solid var(--line); }
.mbar .ml { width: 92px; flex: none; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.mbar .ml svg { width: 16px; height: 16px; color: var(--g60); }
.mbar .drow { flex: 1; margin: 0; }
.mbar .mv { width: 62px; text-align: right; font-size: 14px; font-weight: 500; font-feature-settings: "tnum" 1; }
.src { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.src + .src { border-top: 1px solid var(--line); }
.src .fic { width: 38px; height: 38px; }
.src .fic svg { width: 18px; height: 18px; }
.src .st { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src .sv { font-size: 14px; font-weight: 500; }
.src .sv span { color: var(--g60); font-weight: 400; font-size: 12.5px; margin-left: 4px; }
.card-t { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.card-s { font-size: 13px; color: var(--g60); margin-top: 3px; line-height: 1.5; }

/* Hours chart (dots) */
.hours { display: grid; grid-template-columns: repeat(18, 1fr); height: 84px; margin-top: 18px; align-items: end; }
.hours .hc { display: flex; flex-direction: column-reverse; align-items: center; gap: 5px; }
.hours i { width: 6px; height: 6px; border-radius: 50%; background: var(--g20); transform: scale(0); transition: transform .5s var(--spring); }
.hours.go i { transform: scale(1); }
.hours i.on { background: var(--cal-b); }
.axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--g60); margin-top: 10px; font-feature-settings: "tnum" 1; }

/* Week balance */
.wbal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 18px; }
.wbal .wb { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.wbal .wb .dcol { min-height: 64px; display: flex; flex-direction: column-reverse; gap: 4px; align-items: center; }
.wbal .wb .dcol i { width: 6px; height: 6px; border-radius: 50%; background: var(--g20); transform: scale(0); transition: transform .45s var(--spring); }
.wbal.go .dcol i { transform: scale(1); }
.wbal .dcol i.on { background: var(--cal-b); }
.wbal .dcol i.ov { background: var(--pro-b); }
.wbal .wb span { font-size: 11.5px; color: var(--g60); }
.wbal .wb.today span { color: var(--ink); font-weight: 500; }

/* ---------- Calendar ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-head b { font-size: 17px; font-weight: 500; letter-spacing: -0.02em; text-transform: capitalize; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav button { width: 36px; height: 36px; border-radius: 50%; background: var(--card-2); display: grid; place-items: center; transition: transform .3s var(--spring), opacity .2s; }
.cal-nav button svg { width: 16px; height: 16px; }
.cal-nav button:active { transform: scale(.9); }
.cal-nav button[disabled] { opacity: .3; pointer-events: none; }
.cal-wd { display: grid; grid-template-columns: repeat(7, 1fr); margin-top: 18px; font-size: 12px; color: var(--g60); text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 4px; margin-top: 8px; }
.cal-grid .cd { aspect-ratio: 1 / 1.1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border-radius: 16px; font-size: 15px; font-weight: 500; color: var(--ink); transition: background-color .25s, transform .3s var(--spring); font-feature-settings: "tnum" 1; }
.cal-grid .cd:active { transform: scale(.92); }
.cal-grid .cd i { width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.cal-grid .cd.in i { background: var(--ok); }
.cal-grid .cd.ov i { background: var(--pro-b); }
.cal-grid .cd.un i { background: var(--g40); }
.cal-grid .cd.out { color: var(--g40); }
.cal-grid .cd.fut { color: var(--g40); pointer-events: none; }
.cal-grid .cd.today { background: var(--card-2); }
.cal-grid .cd.sel { background: var(--ink); color: var(--ink-inv); }
.cal-grid.anim { animation: calIn .42s var(--ease-out) both; }
.cal-grid.anim.back { animation-name: calInB; }
@keyframes calIn { from { opacity: 0; transform: translateX(14px); } }
@keyframes calInB { from { opacity: 0; transform: translateX(-14px); } }
.msum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.stat { background: var(--card); border-radius: var(--r-lg); padding: 16px 14px 15px 16px; min-width: 0; display: flex; flex-direction: column; }
.stat .sl { font-size: 12px; color: var(--g60); display: block; }
.stat b { font-size: 24px; font-weight: 400; display: flex; align-items: baseline; gap: 5px; margin-top: 12px; line-height: 1; white-space: nowrap; }
.stat b .u { font-size: 13px; color: var(--g60); letter-spacing: 0; margin: 0; }
.stat .ss { font-size: 12px; color: var(--g60); display: block; margin-top: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- History chart ---------- */
.hbars-wrap { position: relative; margin-top: 22px; }
.hbars { display: flex; align-items: flex-end; height: 152px; position: relative; z-index: 1; }
.hbars .hb { flex: 1; display: flex; flex-direction: column-reverse; align-items: center; gap: 4px; height: 100%; border-radius: 10px; padding-bottom: 2px; }
.hbars .hb i { width: 6px; height: 6px; border-radius: 50%; background: var(--g20); transition: background-color .3s; flex: none; }
.hbars .hb { clip-path: inset(100% 0 0 0); transition: clip-path .7s var(--ease-out); }
.hbars.go .hb { clip-path: inset(0 0 0 0); }
.hbars.month .hb i { width: 4px; height: 4px; gap: 3px; }
.hbars.month .hb { gap: 3px; }
.hbars .hb i.on { background: var(--cal-c); }
.hbars .hb i.ov { background: var(--pro-c); }
.hbars .hb.sel i.on { background: var(--cal-a); }
.hbars .hb.sel i.ov { background: var(--pro-a); }
.norm-ln { position: absolute; left: 0; right: 0; height: 0; border-top: 1.5px solid var(--g20); z-index: 0; }
.norm-tag { position: absolute; right: 0; transform: translateY(50%); font-size: 11px; font-weight: 500; color: var(--g60); background: var(--card); padding: 2px 8px; border-radius: 99px; border: 1px solid var(--g20); z-index: 2; font-feature-settings: "tnum" 1; }
.hlabels { display: flex; margin-top: 10px; }
.hlabels span { flex: 1; text-align: center; font-size: 11.5px; color: var(--g60); }
.hlabels span.sel { color: var(--ink); font-weight: 500; }

/* Weight */
.wchart { height: 150px; margin-top: 22px; position: relative; }
.wchart svg { width: 100%; height: 100%; overflow: visible; display: block; }
.wline { fill: none; stroke: var(--fat-a); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; transition: stroke-dashoffset 1.5s var(--ease-out); }
.warea { opacity: 0; transition: opacity 1s .5s var(--ease); }
.wchart.go .warea { opacity: 1; }
.wgrid { stroke: var(--g20); stroke-width: 1; stroke-dasharray: 2 5; }
.wlab { position: absolute; left: 0; font-size: 11px; color: var(--g60); transform: translateY(-50%); background: var(--card); padding-right: 6px; font-feature-settings: "tnum" 1; }
.wdot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--card); border: 2px solid var(--fat-a); transform: scale(0); transition: transform .45s var(--spring); }
.wchart.go .wdot { transform: scale(1); }
.wdot.last { background: var(--fat-a); box-shadow: 0 0 0 5px color-mix(in srgb, var(--fat-b) 25%, transparent); }

/* ---------- Profile ---------- */
.p-card { padding: 20px; }
.p-row { display: flex; align-items: center; gap: 14px; }
.p-ava { width: 64px; height: 64px; border-radius: 50%; background: var(--card-2); color: var(--ink); display: grid; place-items: center; font-size: 26px; font-weight: 500; position: relative; flex: none; transition: transform .35s var(--spring); }
.p-ava img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.p-ava:active { transform: scale(.94); }
.p-ava-edit { position: absolute; right: -3px; bottom: -3px; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--ink-inv); display: grid; place-items: center; border: 2.5px solid var(--card); }
.p-ava-edit svg { width: 12px; height: 12px; }
.p-id { flex: 1; min-width: 0; }
.p-id b { display: block; font-size: 20px; font-weight: 500; letter-spacing: -0.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-id span { display: block; font-size: 13px; color: var(--g60); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-edit { width: 40px; height: 40px; border-radius: 50%; background: var(--card-2); display: grid; place-items: center; flex: none; color: var(--g70); transition: transform .3s var(--spring); }
.p-edit svg { width: 16px; height: 16px; }
.p-edit:active { transform: scale(.9); }
.p-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line, rgba(127,127,127,.14)); }
.p-stats > div + div { padding-left: 14px; border-left: 1px solid var(--line, rgba(127,127,127,.14)); }
.p-stats > div > span { display: block; font-size: 12px; color: var(--g60); white-space: nowrap; }
.p-stats b { display: block; font-size: 20px; font-weight: 500; margin-top: 3px; }
.p-stats b .u { font-size: 12px; color: var(--g60); margin-left: 4px; font-weight: 400; letter-spacing: 0; }
.p-tdee { margin-top: 16px; font-size: 12.5px; opacity: .8; }
.ptitle { font-size: 13px; color: var(--g60); margin: 28px 6px 10px; font-weight: 500; }
.list { background: var(--card); border-radius: var(--r-xl); box-shadow: var(--shadow); padding: 4px 20px; }
.prow { display: flex; align-items: center; gap: 12px; padding: 15px 0; width: 100%; text-align: left; }
.prow + .prow { border-top: 1px solid var(--line); }
.prow .pi { width: 34px; height: 34px; border-radius: 50%; background: var(--card-2); display: grid; place-items: center; flex: none; color: var(--g70); }
.prow .pi svg { width: 17px; height: 17px; }
.prow .pl { flex: 1; min-width: 0; }
.prow .pl b { font-weight: 500; display: block; font-size: 15px; letter-spacing: -0.01em; }
.prow .pl span { font-size: 12.5px; color: var(--g60); display: block; margin-top: 1px; }
.prow .pv { color: var(--g60); font-size: 14.5px; display: flex; align-items: center; gap: 6px; text-align: right; }
.prow .pv svg { width: 15px; height: 15px; }
.prow.danger b { color: var(--warn); }
.norm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 20px; }
.norm-grid div { background: rgba(255,255,255,.18); border-radius: 16px; padding: 11px 6px; text-align: center; }
.norm-grid b { display: block; font-size: 18px; font-weight: 500; letter-spacing: -0.03em; font-feature-settings: "tnum" 1; }
.norm-grid span { font-size: 11px; opacity: .85; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; top: calc(12px + var(--safe-t) + var(--tg-top)); transform: translate(-50%, -160%); z-index: 60;
  background: var(--card); color: var(--ink); border: 1px solid var(--hair); height: 46px; padding: 0 8px 0 12px; border-radius: 99px; font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-lg); transition: transform .55s var(--ease-out); white-space: nowrap; max-width: calc(100vw - 32px);
}
.toast.show { transform: translate(-50%, 0); }
.toast .tic { width: 24px; height: 24px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; color: #fff; flex: none; }
.toast .tic svg { width: 13px; height: 13px; }
.toast .tx { padding-right: 8px; overflow: hidden; text-overflow: ellipsis; }
.toast button { height: 32px; padding: 0 12px; border-radius: 99px; background: var(--card-2); color: var(--ink); font-weight: 600; font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 360px) {
  :root { --pad: 18px; }
  .screen { padding-left: 12px; padding-right: 12px; }
  .big { font-size: 42px; }
  .mid { font-size: 30px; }
  .top h1 { font-size: 24px; }
  .chip { font-size: 11.5px; padding: 0 10px; }
  .nrow .seg { width: 170px; }
  .stats3 b { font-size: 15px; }
}

/* v2 additions */
.w-now { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.w-now .mid { margin: 0; }
.ins-ic.sm { width: 34px; height: 34px; }
.ins-ic.sm svg { width: 17px; height: 17px; }
.prow .pi.pd { font-size: 13px; font-weight: 600; font-feature-settings: "tnum" 1; }
.prow .pv.pv2 { flex-direction: column; align-items: flex-end; gap: 1px; }
.prow .pv.pv2 b { color: var(--ink); font-weight: 500; font-feature-settings: "tnum" 1; }
.prow .pv.pv2 span { font-size: 12px; }
.chips.mgrid { display: grid; grid-template-columns: 1fr 1fr; }
.chips.mgrid .fchip { justify-content: center; }
.prow .pi.t-cal { background: color-mix(in srgb, var(--cal-b) 18%, transparent); color: var(--cal-t); }
.prow .pi.t-pro { background: color-mix(in srgb, var(--pro-b) 20%, transparent); color: var(--pro-t); }
.card .fitem { padding: 10px 0; border-radius: 0; }
.card .fitem:active { background: none; opacity: .6; }
.card .fitem .plus { background: var(--card-2); box-shadow: none; }
.stats3 > div > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mg-save { white-space: nowrap; flex: none; }
.mg-r { white-space: nowrap; }
.c-head .c-title { min-width: 0; }
@media (max-width: 360px) {
  .mg-save span { display: none; }
  .mg-save { width: 28px; padding: 0; justify-content: center; }
  .row2 .grad .chev { display: none; }
  .stats3 > div + div { padding-left: 10px; }
  .stats3 > div > span { font-size: 11px; }
}
.nrow.col { flex-direction: column; align-items: stretch; gap: 12px; }
.nrow.col .seg { width: 100%; }
.nrow > span:first-child { min-width: 0; }
.hbars.month { height: 118px; }
@media (max-width: 380px) {
  .navp { --aw: 46px; }
  .tab span, .tab.on span { max-width: 0; opacity: 0; margin-left: 0; }
}

/* ---------- Серия ---------- */
.boot .tabbar, .boot .tabbar *, .boot .screen { transition: none !important; animation: none !important; }
.top-r { display: flex; align-items: center; gap: 8px; flex: none; }
.streak {
  height: 46px; padding: 0 15px 0 12px; border-radius: 99px; display: flex; align-items: center; gap: 2px;
  background: var(--card); box-shadow: var(--shadow); color: var(--g60); font-size: 16px; font-weight: 500;
  transition: transform .35s var(--spring), background-color .4s, color .4s;
}
.streak svg { width: 18px; height: 18px; }
.streak .num { letter-spacing: -0.03em; }
.streak.on { color: var(--ink); }
.streak.on svg { fill: currentColor; }
.streak.risk { color: var(--g60); }
.streak.risk .num { color: var(--pro-t); }
.streak:active { transform: scale(.93); }
.streak.bump { animation: bump .7s var(--spring); }
@keyframes bump { 30% { transform: scale(1.14); } 60% { transform: scale(.97); } }
.toast .tic.tic-bolt { background: var(--g-pro); }
.toast .tic.tic-bolt svg { fill: currentColor; }
.st-hero { position: relative; }
.st-ic { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.22); display: grid; place-items: center; }
.st-ic svg { width: 22px; height: 22px; fill: currentColor; }
.st-hero .big { margin-top: 18px; }
.st-msg { margin: 8px 0 0; font-size: 14px; line-height: 1.45; opacity: .9; }
.st-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.2); }
.st-week div { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.st-week span { width: 32px; height: 32px; border-radius: 50%; border: 1.5px dashed rgba(255,255,255,.45); display: grid; place-items: center; }
.st-week .on span { background: #fff; border: 0; color: var(--pro-a); }
.st-week span svg { width: 15px; height: 15px; fill: currentColor; }
.st-week em { font-style: normal; font-size: 11.5px; opacity: .8; }
.st-week .today em { opacity: 1; font-weight: 600; }
.ach { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.ach div { background: var(--card-2); border-radius: 18px; padding: 14px 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--g40); }
.ach span { width: 46px; height: 46px; border-radius: 50%; border: 1.5px dashed currentColor; display: grid; place-items: center; position: relative; }
.ach span svg { width: 15px; height: 15px; position: absolute; top: 5px; opacity: .8; }
.ach span b { font-size: 17px; font-weight: 500; }
.ach em { font-style: normal; font-size: 12px; color: var(--g60); }
.ach .got { color: #fff; }
.ach .got span { background: var(--g-pro); border: 0; }
.ach .got span svg { fill: currentColor; }
.ach .got em { color: var(--ink); }
@media (max-width: 360px) { .streak { padding: 0 11px 0 9px; height: 42px; } .avatar { width: 42px; height: 42px; } }

/* ---------- Прелоадер ---------- */
.loader { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; transition: opacity .45s var(--ease), visibility 0s .45s; }
.loader.out { opacity: 0; visibility: hidden; }
.ld-name { font: 500 26px/1 Inter, -apple-system, system-ui, sans-serif; letter-spacing: -0.035em; color: var(--ink); display: flex; }
.ld-name span { opacity: 0; transform: translateY(6px); animation: ldL .6s var(--ease-out) forwards; }
@keyframes ldL { to { opacity: 1; transform: none; } }
.ld-bar { width: 72px; height: 2px; border-radius: 2px; background: var(--g20); margin-top: 18px; overflow: hidden; }
.ld-bar i { display: block; height: 100%; width: 40%; border-radius: 2px; background: var(--ink); animation: ldB 1.1s cubic-bezier(.65,0,.35,1) infinite; }
@keyframes ldB { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .ld-bar i, .ld-name span { animation: none; opacity: 1; transform: none; } }
#w-card:empty { min-height: 300px; }

/* разделитель шапки окна при прокрутке */
.sheet .sh-head, .sheet .sh-foot { position: relative; }
.sheet .sh-head::after, .sheet .sh-foot::before { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: var(--hair); opacity: 0; transition: opacity .25s var(--ease); }
.sheet .sh-head::after { bottom: 0; }
.sheet .sh-foot::before { top: 0; }
.sheet.scrolled .sh-head::after, .sheet.more .sh-foot::before { opacity: 1; }
.bfade { position: fixed; left: 0; right: 0; bottom: 0; height: calc(96px + var(--safe-b)); z-index: 29; pointer-events: none; background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 0%, transparent), color-mix(in srgb, var(--bg) 82%, transparent) 72%); transition: opacity .4s; }
.tabbar.hide ~ .bfade { opacity: 0; }
/* плавное раскрытие */
.collapse { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .45s var(--ease-out), opacity .3s var(--ease); }
.collapse.open { grid-template-rows: 1fr; opacity: 1; }
.collapse > div { overflow: hidden; min-height: 0; }
.collapse + .nrow { margin-top: 10px; }

/* ---------- Экран добавления ---------- */
.mpick { background: var(--card); border-radius: var(--r-lg); }
.mp-btn { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; text-align: left; }
.mp-ic { width: 40px; height: 40px; border-radius: 50%; background: var(--card-2); display: grid; place-items: center; flex: none; color: var(--ink); }
.mp-ic svg { width: 19px; height: 19px; }
.mp-t { flex: 1; min-width: 0; }
.mp-t em { display: block; font-style: normal; font-size: 12px; color: var(--g60); }
.mp-t b { display: block; font-size: 16px; font-weight: 500; margin-top: 1px; }
.mp-ch { width: 18px; height: 18px; color: var(--g60); transition: transform .45s var(--ease-out); }
.mpick.open .mp-ch { transform: rotate(180deg); }
.mpick .fchip { background: var(--card-2); }
.mpick .fchip.on { background: var(--ink); color: var(--ink-inv); }
.hshot { margin-top: 8px; border-radius: var(--r-xl); padding: 22px; color: #fff; display: flex; flex-direction: column; align-items: flex-start; }
.hs-ic { width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.2); display: grid; place-items: center; }
.hs-ic svg { width: 21px; height: 21px; }
.hshot > b { font-size: 22px; font-weight: 500; letter-spacing: -0.025em; margin-top: 18px; line-height: 1.2; }
.hs-s { font-size: 14px; opacity: .85; margin-top: 6px; line-height: 1.4; max-width: 290px; }
.hs-acts { display: flex; gap: 8px; width: 100%; margin-top: 20px; }
.hs-acts .btn.white { flex: 1; }
.hs-acts .icon-btn { width: 54px; flex: none; padding: 0; }
.hs-key { margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #fff; opacity: .9; }
.hs-key svg { width: 14px; height: 14px; }
.atiles { margin-top: 8px; }
.atile { background: var(--card); border-radius: var(--r-lg); padding: 16px; text-align: left; display: flex; flex-direction: column; align-items: flex-start; transition: transform .3s var(--spring); }
.atile:active { transform: scale(.97); }
.at-ic { width: 40px; height: 40px; border-radius: 50%; background: var(--card-2); display: grid; place-items: center; color: var(--ink); }
.at-ic svg { width: 18px; height: 18px; }
.atile b { font-size: 15.5px; font-weight: 500; margin-top: 22px; }
.atile span:last-child { font-size: 12.5px; color: var(--g60); margin-top: 2px; }

/* ---------- Серия v2 ---------- */
.st-fz { display: inline-flex; align-items: center; gap: 6px; }
.st-fz svg { width: 14px; height: 14px; }
.st-week > div { opacity: 0; transform: translateY(6px); }
.st-hero.go .st-week > div { animation: stIn .5s var(--ease-out) forwards; }
@keyframes stIn { to { opacity: 1; transform: none; } }
.st-week .fz span { background: rgba(255,255,255,.28); border: 0; }
.st-week .fz span svg { fill: none; }
.lv-card .c-head { align-items: flex-end; }
.lv-n { font-size: 40px; font-weight: 500; line-height: 1; margin-top: 4px; letter-spacing: -0.04em; }
.lv-xp { text-align: right; }
.lv-xp b { display: block; font-size: 20px; font-weight: 500; }
.lv-xp span { font-size: 12px; color: var(--g60); }
.lv-card .drow { margin-top: 16px; }
.xp-rules { margin-top: 16px; border-top: 1px solid var(--hair); padding-top: 6px; }
.xp-rules div { display: flex; justify-content: space-between; font-size: 13.5px; padding: 7px 0; color: var(--g70); }
.xp-rules b { font-weight: 500; color: var(--ink); font-feature-settings: "tnum" 1; }
.track { position: relative; height: 74px; margin: 14px 14px 6px 4px; }
.tr-line { position: absolute; left: 0; right: 0; top: 18px; height: 4px; border-radius: 4px; background: var(--card-2); overflow: hidden; }
.tr-line i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--g-pro); transition: width 1.1s var(--ease-out) .2s; }
.track.go .tr-line i { width: var(--w); }
.tr-m { position: absolute; top: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tr-m span { width: 40px; height: 40px; border-radius: 50%; background: var(--card-2); color: var(--g40); display: grid; place-items: center; border: 3px solid var(--card); transition: background-color .4s, color .4s; }
.tr-m span svg { width: 15px; height: 15px; }
.tr-m b { font-size: 12.5px; font-weight: 500; color: var(--g60); }
.tr-m.got span { background: var(--g-pro); color: #fff; }
.tr-m.got span svg { fill: currentColor; }
.tr-m.got b { color: var(--ink); }
.ach2 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.ach2 > div { background: var(--card-2); border-radius: 18px; padding: 14px 6px 12px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.ar { position: relative; width: 52px; height: 52px; display: grid; place-items: center; }
.ar > svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.rg-bg { fill: none; stroke: var(--hair); stroke-width: 3; }
.rg-v { fill: none; stroke: var(--pro-b); stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset 1s var(--ease-out); }
.ai { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--g60); }
.ai svg { width: 18px; height: 18px; position: static; transform: none; }
.ach2 .got .ai { background: var(--g-pro); color: #fff; }
.ach2 .got .rg-v { stroke: transparent; }
.ach2 b { font-size: 12.5px; font-weight: 500; margin-top: 10px; line-height: 1.25; }
.ach2 em { font-style: normal; font-size: 11.5px; color: var(--g60); margin-top: 3px; font-feature-settings: "tnum" 1; }
.ach2 > div:not(.got) b { color: var(--g70); }
.toast .tic.tic-snow { background: var(--fat-b); }
/* праздник */
.celeb { position: fixed; inset: 0; z-index: 90; background: rgba(10,10,14,.45); display: grid; place-items: center; padding: 24px; opacity: 0; transition: opacity .35s var(--ease); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.celeb.on { opacity: 1; }
.cb-card { position: relative; width: 100%; max-width: 320px; background: var(--g-pro); color: #fff; border-radius: 30px; padding: 34px 24px 22px; display: flex; flex-direction: column; align-items: center; text-align: center; transform: scale(.86) translateY(20px); transition: transform .6s var(--spring); overflow: hidden; }
.celeb.on .cb-card { transform: none; }
.cb-ic { width: 76px; height: 76px; border-radius: 50%; background: #fff; color: var(--pro-a); display: grid; place-items: center; position: relative; z-index: 1; }
.cb-ic svg { width: 34px; height: 34px; }
.cb-card em { font-style: normal; font-size: 13px; opacity: .85; margin-top: 18px; position: relative; }
.cb-card b { font-size: 24px; font-weight: 500; letter-spacing: -0.025em; margin-top: 4px; position: relative; }
.cb-card p { margin: 6px 0 22px; font-size: 14px; opacity: .9; position: relative; }
.cb-card .btn { position: relative; }
.cb-burst { position: absolute; left: 50%; top: 72px; width: 0; height: 0; }
.cb-burst i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #fff; opacity: 0; transform: rotate(var(--a)) translateY(0); }
.celeb.on .cb-burst i { animation: burst 1s var(--ease-out) .25s forwards; }
@keyframes burst { 0% { opacity: 0; transform: rotate(var(--a)) translateY(-30px) scale(.4); } 30% { opacity: .9; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-96px) scale(1); } }

/* карточки макросов */
.mc { width: 100%; position: relative; overflow: hidden; isolation: isolate; background: var(--card); border-radius: var(--r-xl); padding: 18px 18px 20px; display: flex; flex-direction: column; align-items: stretch; text-align: left; transition: transform .35s var(--spring); }
.mc:active { transform: scale(.98); }
.mc-bg { position: absolute; right: -18px; bottom: -22px; width: 112px; height: 112px; z-index: -1; transform: rotate(-14deg); opacity: .08; }
.mc.wide .mc-bg { right: 18px; bottom: -34px; transform: rotate(-12deg); }
.mc-bg svg { width: 100%; height: 100%; stroke-width: 1.2; }
.mc-h { display: flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 500; color: var(--ink); }
.mc-h .chev { margin-left: auto; color: var(--g40); opacity: 1; }
.mc-i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.mc-i svg { width: 17px; height: 17px; }
.mc-row { display: flex; flex-direction: column; margin-top: 18px; }
.mc.wide .mc-row { flex-direction: row; align-items: baseline; justify-content: space-between; }
.mc-v { display: flex; align-items: baseline; gap: 4px; }
.mc-v .num { font-size: 40px; font-weight: 500; line-height: 1; letter-spacing: -0.045em; color: var(--ink); }
.mc-v .u { font-size: 16px; color: var(--g60); }
.mc-s { font-size: 13px; color: var(--g60); margin-top: 6px; }
.mc .drow { margin-top: 18px; }
.mc .drow i { background: var(--g20); }
.k-pro .mc-i { background: color-mix(in srgb, var(--pro-b) 18%, transparent); color: var(--pro-t); }
.k-carb .mc-i { background: color-mix(in srgb, var(--carb-b) 18%, transparent); color: var(--carb-t); }
.k-fat .mc-i { background: color-mix(in srgb, var(--fat-b) 20%, transparent); color: var(--fat-t); }
.k-pro .mc-bg { color: var(--pro-b); } .k-carb .mc-bg { color: var(--carb-b); } .k-fat .mc-bg { color: var(--fat-b); }
.k-pro .drow i.on { background: var(--pro-b); }
.k-carb .drow i.on { background: var(--carb-b); }
.k-fat .drow i.on { background: var(--fat-b); }
@media (max-width: 360px) { .mc { padding: 16px 14px 18px; } .mc-v .num { font-size: 34px; } .row2 .mc .chev { display: none; } }

.screen.quiet * { transition: none !important; animation: none !important; }
.screen.active { animation-name: screenFade; animation-duration: .28s; }
@keyframes screenFade { from { opacity: 0; } }
/* вода */
.k-water .mc-i { background: color-mix(in srgb, #3FA7F5 18%, transparent); color: #2486D4; }
.k-water .mc-bg { color: #3FA7F5; }
.k-water .drow i.on { background: #3FA7F5; }
.w-plus { margin-left: auto; width: 32px; height: 32px; border-radius: 50%; background: var(--card-2); display: grid; place-items: center; color: var(--ink); transition: transform .35s var(--spring); }
.w-plus svg { width: 15px; height: 15px; }
.w-plus:active { transform: scale(.85); }
.w-plus.pop { animation: wpop .5s var(--spring); }
@keyframes wpop { 40% { transform: scale(1.2); background: color-mix(in srgb, #3FA7F5 25%, var(--card-2)); } }
.w-dots { margin-top: 22px; }
.w-dots i.on { background: #3FA7F5 !important; }
.w-acts { display: flex; gap: 10px; margin-top: 26px; }
.w-acts .btn:not(.icon-btn) { flex: 1; }
.hbars .hb i.x { background: transparent; }
.wbal i.x { background: transparent !important; }
/* приём пищи: строка и меню */
.mline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 4px 0; font-size: 14px; color: var(--g60); }
.mline:first-child { margin-top: 2px; margin-bottom: 12px; }
.mchip { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px 0 14px; border-radius: 99px; background: var(--card); color: var(--ink); font-size: 14.5px; transition: transform .3s var(--spring), background-color .3s; }
.portion ~ .mline .mchip, .sheet .card ~ .mline .mchip { background: var(--card); }
.mchip b { font-weight: 500; }
.mchip svg { width: 17px; height: 17px; }
.mchip .mc-ch { width: 15px; height: 15px; color: var(--g60); transition: transform .25s var(--ease); }
.mchip.open .mc-ch { transform: rotate(180deg); }
.mchip:active { transform: scale(.95); }
.menu { position: fixed; z-index: 95; background: var(--card); border-radius: 20px; padding: 6px; border: 1px solid var(--hair); opacity: 0; transform: scale(.92) translateY(-6px); transform-origin: top right; transition: opacity .2s var(--ease), transform .35s cubic-bezier(.32,.72,0,1); }
.menu.up { transform-origin: bottom right; transform: scale(.92) translateY(6px); }
.menu.on { opacity: 1; transform: none; }
.menu button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; text-align: left; color: var(--ink); transition: background-color .2s; }
.menu button:active { background: var(--card-2); }
.menu button.on { background: var(--card-2); }
.menu button > svg { width: 19px; height: 19px; flex: none; }
.menu button span { flex: 1; min-width: 0; }
.menu b { display: block; font-size: 15px; font-weight: 500; }
.menu em { display: block; font-style: normal; font-size: 12px; color: var(--g60); margin-top: 1px; }
.menu .mk { width: 16px; height: 16px; color: var(--ink); }

/* итог онбординга */
.rs-head { text-align: center; margin-top: 28px; }
.res-goal { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border-radius: 99px; background: var(--card); font-size: 13px; color: var(--g70); }
.res-goal svg { width: 15px; height: 15px; }
.rs-head h2 { font-size: 26px; font-weight: 500; letter-spacing: -0.03em; margin: 14px 0 0; }
.dring { position: relative; width: 260px; height: 260px; margin: 22px auto 6px; }
.dring > i { position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px; border-radius: 50%; transform: rotate(var(--r)) translateY(-118px) scale(0); opacity: 0; transition: transform .7s cubic-bezier(.34,1.56,.64,1), opacity .3s; }
.dring.on > i { transform: rotate(var(--r)) translateY(-118px) scale(1); opacity: 1; }
.dring > i.k-pro { background: var(--pro-b); } .dring > i.k-carb { background: var(--carb-b); } .dring > i.k-fat { background: var(--fat-b); }
.dr-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; transform: scale(.9); transition: opacity .6s var(--ease) .2s, transform .9s cubic-bezier(.34,1.56,.64,1) .2s; }
.dring.on .dr-c { opacity: 1; transform: none; }
.dr-c .num { font-size: 58px; font-weight: 500; line-height: 1; letter-spacing: -0.05em; }
.dr-c span { font-size: 14px; color: var(--g60); margin-top: 8px; }
.res-legend { background: var(--card); border-radius: var(--r-xl); padding: 6px 20px; margin-top: 14px; }
.res-legend > div { display: flex; align-items: center; gap: 12px; padding: 14px 0; animation: fadeSw .5s var(--ease-out) both; }
.res-legend > div + div { border-top: 1px solid var(--hair); }
.res-legend i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.res-legend i.k-pro { background: var(--pro-b); } .res-legend i.k-carb { background: var(--carb-b); } .res-legend i.k-fat { background: var(--fat-b); }
.res-legend span { flex: 1; font-size: 15px; }
.res-legend b { font-weight: 500; font-size: 16px; }
.res-legend em { font-style: normal; font-size: 13px; color: var(--g60); width: 40px; text-align: right; font-feature-settings: "tnum" 1; }
.res-note { text-align: center; padding: 14px 8px 0; animation: fadeSw .5s var(--ease-out) 1.4s both; }
.stats3.two { grid-template-columns: 1fr 1fr; }
.stats3.two > div + div { padding-left: 18px; }

.st-next { display: flex; align-items: center; gap: 14px; }
.sn-ic { width: 48px; height: 48px; border-radius: 50%; background: color-mix(in srgb, var(--pro-b) 16%, transparent); color: var(--pro-t); display: grid; place-items: center; flex: none; }
.sn-ic svg { width: 21px; height: 21px; }
.sn-t em { display: block; font-style: normal; font-size: 12px; color: var(--g60); }
.sn-t b { display: block; font-size: 16px; font-weight: 500; margin-top: 2px; }
.sn-t span { display: block; font-size: 13px; color: var(--g60); margin-top: 2px; }
.ach3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 8px; margin-top: 18px; }
.ach3 > div { display: flex; flex-direction: column; align-items: center; text-align: center; animation: fadeSw .45s var(--ease-out) both; }
.ab { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); color: var(--g40); border: 1.5px dashed var(--g20); }
.ab svg { width: 24px; height: 24px; }
.ach3 .got .ab { background: var(--g-pro); color: #fff; border: 0; }
.ach3 b { font-size: 13px; font-weight: 500; margin-top: 9px; line-height: 1.2; }
.ach3 em { font-style: normal; font-size: 11.5px; color: var(--g60); margin-top: 3px; line-height: 1.3; }
.ach3 > div:not(.got) b { color: var(--g60); }

.mrow { width: 100%; margin-top: 8px; background: var(--card); border-radius: var(--r-lg); padding: 14px 16px; display: flex; align-items: center; gap: 14px; text-align: left; transition: transform .3s var(--spring); }
.mrow:active { transform: scale(.98); }
.mrow .mr-t { flex: 1; min-width: 0; }
.mrow b { display: block; font-size: 15.5px; font-weight: 500; }
.mrow .mr-t span { display: block; font-size: 12.5px; color: var(--g60); margin-top: 2px; }
.mrow .chev { width: 16px; height: 16px; color: var(--g40); flex: none; }
.fitem.sug { padding: 10px 0; }
.sg-v { font-size: 15px; font-weight: 500; font-feature-settings: "tnum" 1; }

/* размытая шапка окна */
.sheet .grab { position: absolute; top: 10px; left: 50%; margin: 0 0 0 -20px; z-index: 3; }
.sheet .sh-head { position: absolute; top: 0; left: 0; right: 0; z-index: 2; padding: 24px 16px 12px; border-radius: 30px 30px 0 0;
  background: color-mix(in srgb, var(--bg) 72%, transparent); -webkit-backdrop-filter: blur(20px) saturate(1.8); backdrop-filter: blur(20px) saturate(1.8); }
.sheet .sh-body { padding-top: calc(var(--hh, 78px) + 2px); }
.sheet.scrolled .sh-head::after { opacity: .7; }
.sheet { overflow: hidden; }
.cd-head { align-items: flex-start; }
.cd-date { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
.cd-head .mtag { margin-top: 1px; }

/* цели */
.goal-cta, .goal-card { width: 100%; text-align: left; display: block; transition: transform .3s var(--spring); }
.goal-cta:active, .goal-card:active { transform: scale(.98); }
.goal-cta { display: flex; align-items: center; gap: 14px; }
.gc-ic { width: 48px; height: 48px; border-radius: 50%; background: color-mix(in srgb, var(--carb-b) 18%, transparent); color: var(--carb-t); display: grid; place-items: center; flex: none; }
.gc-ic svg { width: 21px; height: 21px; }
.gc-t { flex: 1; min-width: 0; }
.gc-t b { display: block; font-size: 16px; font-weight: 500; }
.gc-t span { display: block; font-size: 13px; color: var(--g60); margin-top: 3px; line-height: 1.35; }
.goal-cta .chev { width: 16px; height: 16px; color: var(--g40); }
.gs { font-size: 12px; font-weight: 500; height: 26px; padding: 0 10px; border-radius: 99px; display: inline-flex; align-items: center; }
.gs.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.gs.warn { background: color-mix(in srgb, var(--pro-b) 16%, transparent); color: var(--pro-t); }
.gc-row { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.gc-pct { font-size: 46px; font-weight: 500; line-height: 1; letter-spacing: -0.05em; }
.gc-pct small { font-size: 20px; color: var(--g60); margin-left: 2px; letter-spacing: 0; }
.gc-sub { font-size: 13px; color: var(--g60); line-height: 1.45; }
.goal-card .drow { margin-top: 16px; }
.goal-card .drow i.on { background: var(--ok); }
.gc-m { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--hair); font-size: 13.5px; }
.gc-m svg { width: 15px; height: 15px; color: var(--carb-t); }
.msl { margin-top: 14px; }
.msl > div { display: flex; align-items: center; gap: 12px; padding: 11px 0; }
.msl > div + div { border-top: 1px solid var(--hair); }
.msl .mk { width: 30px; height: 30px; border-radius: 50%; background: var(--card-2); color: var(--g60); display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.msl .mk svg { width: 16px; height: 16px; }
.msl .ok .mk { background: var(--ok); color: #fff; }
.msl .cur .mk { background: var(--ink); color: var(--ink-inv); }
.msl .miss .mk { background: color-mix(in srgb, var(--pro-b) 18%, transparent); color: var(--pro-t); }
.msl .ml { flex: 1; min-width: 0; }
.msl .ml b { display: block; font-size: 15px; font-weight: 500; }
.msl .ml em, .msl .mv em { display: block; font-style: normal; font-size: 12px; color: var(--g60); margin-top: 1px; }
.msl .mv { text-align: right; font-size: 15px; font-weight: 500; font-feature-settings: "tnum" 1; }
.msl > div:not(.ok):not(.cur):not(.miss) .ml b, .msl > div:not(.ok):not(.cur):not(.miss) .mv { color: var(--g60); }
.ps-row { display: flex; justify-content: space-between; padding: 9px 0; font-size: 14.5px; }
.ps-row + .ps-row { border-top: 1px solid var(--hair); }
.ps-row span { color: var(--g60); }
.ps-row b { font-weight: 500; }
.ps-warn { display: flex; gap: 10px; margin-top: 10px; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--pro-b) 12%, transparent); color: var(--pro-t); font-size: 13px; line-height: 1.4; }
.ps-warn svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.w-goal { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 13px; color: var(--g60); }
.w-goal svg { width: 14px; height: 14px; color: var(--carb-t); }
.rw-dots { margin-top: 14px; }
.rw-dots i.on { background: var(--pro-b) !important; }

.gc-due span:first-of-type { flex: 1; color: var(--g70); }
.gc-due svg { color: var(--fat-t) !important; }
.gc-btn { height: 32px; padding: 0 13px; border-radius: 99px; background: var(--ink); color: var(--ink-inv); display: inline-flex; align-items: center; font-size: 13px; font-weight: 500; flex: none; }
.pc-hero { text-align: center; padding: 12px 10px 18px; }
.pc-ic { width: 64px; height: 64px; border-radius: 50%; display: inline-grid; place-items: center; }
.pc-ic svg { width: 28px; height: 28px; }
.pc-ic.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.pc-ic.warn { background: color-mix(in srgb, var(--pro-b) 16%, transparent); color: var(--pro-t); }
.pc-hero b { display: block; font-size: 22px; font-weight: 500; letter-spacing: -0.02em; margin-top: 14px; }
.pc-hero p { margin: 8px auto 0; max-width: 320px; font-size: 14px; line-height: 1.5; color: var(--g70); }
.pc-acts .btn { flex: 1; }
/* достижения с этапами */
.lvl { display: flex; align-items: center; gap: 16px; }
.lv-badge { width: 74px; height: 74px; border-radius: 24px; background: var(--g-cal); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.lv-badge .num { font-size: 32px; font-weight: 500; line-height: 1; letter-spacing: -0.04em; }
.lv-badge em { font-style: normal; font-size: 10.5px; opacity: .85; margin-top: 3px; }
.lv-b { flex: 1; min-width: 0; }
.lv-b b { display: block; font-size: 17px; font-weight: 500; }
.lv-b > span { display: block; font-size: 12.5px; color: var(--g60); margin-top: 3px; line-height: 1.35; }
.lvl .tr-bar { margin-top: 12px; }
.lvl .tr-bar i { background: var(--g-cal); }
.trs { display: flex; flex-direction: column; gap: 8px; }
.tr { background: var(--card); border-radius: var(--r-lg); padding: 16px; display: flex; gap: 14px; align-items: flex-start; animation: fadeSw .45s var(--ease-out) both; }
.tr-ic { width: 46px; height: 46px; border-radius: 15px; background: var(--card-2); color: var(--g40); display: grid; place-items: center; flex: none; }
.tr-ic svg { width: 22px; height: 22px; }
.tr.got.c-pro .tr-ic { background: var(--g-pro); color: #fff; }
.tr.got.c-cal .tr-ic { background: var(--g-cal); color: #fff; }
.tr.got.c-carb .tr-ic { background: var(--g-carb); color: #fff; }
.tr.got.c-fat .tr-ic { background: var(--g-fat); color: #fff; }
.tr-b { flex: 1; min-width: 0; }
.tr-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tr-h b { font-size: 15.5px; font-weight: 500; }
.tr-st { font-size: 11.5px; font-weight: 500; height: 22px; padding: 0 9px; border-radius: 99px; background: var(--card-2); color: var(--g60); display: inline-flex; align-items: center; flex: none; }
.tr.got .tr-st { color: var(--ink); }
.tr-d { font-size: 13px; color: var(--g60); margin-top: 3px; line-height: 1.35; }
.tr-bar { height: 6px; border-radius: 6px; background: var(--card-2); margin-top: 12px; overflow: hidden; }
.tr-bar i { display: block; height: 100%; width: 0; border-radius: 6px; transition: width 1s var(--ease-out) .15s; }
.tr-bar.go i { width: var(--w); }
.c-pro .tr-bar i { background: var(--g-pro); } .c-cal .tr-bar i { background: var(--g-cal); } .c-carb .tr-bar i { background: var(--g-carb); } .c-fat .tr-bar i { background: var(--g-fat); }
.tr-n { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--g60); margin-top: 6px; font-feature-settings: "tnum" 1; }

.gk-row { display: flex; align-items: center; gap: 14px; }
.gk-ic { width: 44px; height: 44px; border-radius: 50%; background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); display: grid; place-items: center; flex: none; }
.gk-ic svg { width: 20px; height: 20px; }
.gk-t { flex: 1; min-width: 0; }
.gk-t b { display: block; font-size: 16px; font-weight: 500; }
.gk-t span { display: block; font-size: 13px; color: var(--g60); margin-top: 2px; }
.gk-p { font-size: 32px; font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.gk-p small { font-size: 15px; color: var(--g60); margin-left: 1px; letter-spacing: 0; }
.goal-card .drow { margin-top: 16px; }

.big .num { letter-spacing: -0.055em; }
/* цель: средний вариант */
.gk-w { display: flex; align-items: flex-end; gap: 14px; margin-top: 18px; }
.gk-w > span { flex: none; }
.gk-w em { display: block; font-style: normal; font-size: 11.5px; color: var(--g60); }
.gk-w b { display: block; font-size: 15px; font-weight: 500; margin-top: 2px; }
.gk-w .drow { flex: 1; margin: 0 0 6px; }
.goal-card .gk-w .drow i.on { background: var(--ok); }
.gc-m span { flex: 1; }
/* уровень */
.lvl { display: flex; align-items: center; gap: 18px; }
.lv-ring { position: relative; width: 84px; height: 84px; flex: none; display: grid; place-items: center; }
.lv-ring > i { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: var(--g20); transform: rotate(var(--r)) translateY(-38px) scale(.4); opacity: 0; transition: transform .6s cubic-bezier(.34,1.56,.64,1), opacity .3s, background-color .3s; }
.lv-ring.go > i { transform: rotate(var(--r)) translateY(-38px); opacity: 1; }
.lv-ring > i.on { background: var(--cal-b); }
.lv-ring .num { font-size: 34px; font-weight: 500; letter-spacing: -0.05em; }
.lv-b em { display: block; font-style: normal; font-size: 12px; color: var(--g60); }
.lv-b b { display: block; font-size: 19px; font-weight: 500; margin-top: 2px; letter-spacing: -0.02em; }
.lv-b > span { margin-top: 4px; }
/* уведомление о достижении */
.ach-ban { position: fixed; left: 50%; top: calc(10px + var(--safe-t) + var(--tg-top)); z-index: 70; width: min(calc(100vw - 32px), 420px); transform: translate(-50%, -140%); transition: transform .6s cubic-bezier(.32,.72,0,1); background: var(--card); color: var(--ink); border: 1px solid var(--hair); border-radius: 22px; padding: 10px 14px 10px 10px; display: flex; align-items: center; gap: 12px; text-align: left; }
.ach-ban.on { transform: translate(-50%, 0); }
.ab-ic { width: 40px; height: 40px; border-radius: 14px; background: var(--g-pro); color: #fff; display: grid; place-items: center; flex: none; }
.ab-ic svg { width: 19px; height: 19px; }
.ab-t { flex: 1; min-width: 0; }
.ab-t em { display: block; font-style: normal; font-size: 11.5px; color: var(--g60); }
.ab-t b { display: block; font-size: 14.5px; font-weight: 500; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ach-ban .chev { width: 16px; height: 16px; opacity: .5; }
.streak { position: relative; }
.sbadge { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #F2545B; color: #fff; font-size: 11px; font-weight: 600; font-style: normal; display: grid; place-items: center; border: 2px solid var(--bg); animation: bump .5s var(--spring); }

/* подсказка дня */
.tip { padding: 18px 20px 19px; }
.tip-h { display: flex; align-items: center; gap: 10px; }
.tip-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--card-2); }
.tip-ic svg { width: 15px; height: 15px; }
.c-cal .tip-ic { color: var(--cal-t); } .c-pro .tip-ic { color: var(--pro-t); } .c-carb .tip-ic { color: var(--carb-t); }
.tip-h b { font-size: 15.5px; font-weight: 500; letter-spacing: -0.01em; }
.tip p { margin: 8px 0 0; font-size: 13.5px; color: var(--g70); line-height: 1.5; }

.big .num, .big .of, .mid .num, .kbig .num, .gk-p, .mc-v .num, .dr-c .num, .lv-n, .gc-pct { font-feature-settings: "tnum" 0, "pnum" 1; font-variant-numeric: proportional-nums; }
.gk-ic svg { width: 23px; height: 23px; }

.c-cal .tip-ic { background: color-mix(in srgb, var(--cal-b) 15%, transparent); } .c-pro .tip-ic { background: color-mix(in srgb, var(--pro-b) 16%, transparent); } .c-carb .tip-ic { background: color-mix(in srgb, var(--carb-b) 17%, transparent); }
.mid .num { letter-spacing: 0; }
.big .of { letter-spacing: -0.025em; }
.mg-head .mg-t { align-items: center; }
.mg-head .mg-t svg { width: 18px; height: 18px; color: var(--g60); margin-right: 2px; flex: none; }
.mg-head .mg-t em { margin-left: 2px; }
.mg-n { display: inline-flex; align-items: baseline; gap: 8px; }
.mg-head .mg-t em { margin-left: 0; }

/* иконка на экран «Домой» */
.home-card { width: 100%; display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: var(--r-lg); padding: 14px 14px 14px 14px; margin-bottom: 8px; text-align: left; transition: transform .3s var(--spring); }
.home-card:active { transform: scale(.98); }
.home-card img { width: 56px; height: 56px; border-radius: 15px; flex: none; }
.hc-t { flex: 1; min-width: 0; }
.hc-t b { display: block; font-size: 15.5px; font-weight: 500; }
.hc-t span { display: block; font-size: 12.5px; color: var(--g60); margin-top: 2px; line-height: 1.35; }
.hc-btn { height: 34px; padding: 0 14px; border-radius: 99px; background: var(--ink); color: var(--ink-inv); font-size: 13.5px; font-weight: 500; display: inline-flex; align-items: center; flex: none; }
.hs-big { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 0 22px; }
.hs-big img { width: 104px; height: 104px; border-radius: 26px; }
.hs-big b { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.ld-name { font-weight: 600; letter-spacing: 0.06em; font-size: 28px; }
.streak .num, .streak.risk .num { color: var(--ink); }
.streak.on svg { color: #F28A5B; fill: #F28A5B; }
.streak.risk svg { color: #F28A5B; fill: none; }

.home-card { padding: 14px 16px 14px 14px; }
.home-card img { width: 52px; height: 52px; border-radius: 14px; }
.hc-t b { white-space: nowrap; }
.hc-t span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-btn { width: 40px; height: 40px; padding: 0; border-radius: 50%; justify-content: center; }
.hc-btn svg { width: 18px; height: 18px; }

.w-meta { display: flex; gap: 24px; margin-top: 12px; }
.w-meta:empty { display: none; }
.w-meta em { display: block; font-style: normal; font-size: 12px; color: var(--g60); }
.w-meta b { display: block; font-size: 15px; font-weight: 500; margin-top: 2px; }
.w-meta b.good { color: var(--ok); } .w-meta b.bad { color: var(--pro-t); }

.tr.fresh { box-shadow: 0 0 0 2px var(--pro-b) inset; }
.tr-new { font-size: 11px; font-weight: 600; height: 22px; padding: 0 9px; border-radius: 99px; background: #F2545B; color: #fff; display: inline-flex; align-items: center; margin-left: auto; margin-right: 6px; }
.tr-h b { margin-right: auto; }
.gc-done svg { color: var(--ok) !important; }
.gc-m .gc-btn { flex: none; }

/* фото: описание и результаты */
.hint-box { background: var(--card); border-radius: var(--r-lg); padding: 14px 16px; margin-top: 8px; }
.hint-box label { display: flex; align-items: baseline; justify-content: space-between; font-size: 14px; font-weight: 500; }
.hint-box label em { font-style: normal; font-weight: 400; font-size: 12px; color: var(--g60); }
.hint-box textarea { width: 100%; border: 0; outline: 0; resize: none; background: transparent; font: inherit; font-size: 15px; line-height: 1.45; color: var(--ink); margin-top: 8px; padding: 0; min-height: 44px; }
.hint-box textarea::placeholder { color: var(--g40); }
.hb-note { display: block; font-size: 12px; color: var(--g60); margin-top: 6px; }
#p-res .subh:first-child { margin-top: 18px; }
.res-top textarea { padding: 4px 0; }
.res-mac { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 10px; gap: 8px; }
.res-mac .macros { margin: 0; }
.res-mac > svg { width: 16px; height: 16px; color: var(--g40); flex: none; transition: color .2s; }
.res-mac.on > svg { color: var(--ink); }
.re-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding-top: 10px; }
.re-grid .field { padding: 8px 10px; }
.re-grid .field span { font-size: 11px; }
.re-grid .field input { font-size: 15px; }
.res-addi { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; height: 50px; margin-top: 8px; border-radius: var(--r-lg); border: 1.5px dashed var(--g20); color: var(--g70); font-size: 14px; font-weight: 500; }
.res-addi svg { width: 16px; height: 16px; }
.sh-foot .btn .spin { margin-right: 8px; }
.res-item .field { background: var(--card-2); }

.src .st em { display: block; font-style: normal; font-size: 12px; color: var(--g60); margin-top: 1px; }
.mw { margin-top: 18px; }
.tip-line { display: flex; gap: 10px; padding: 16px 6px 4px; font-size: 13px; line-height: 1.5; color: var(--g70); }
.tip-line svg { width: 17px; height: 17px; flex: none; color: var(--g60); margin-top: 1px; }
.mw.k-pro .dcol i.on { background: var(--pro-b); } .mw.k-carb .dcol i.on { background: var(--carb-b); } .mw.k-fat .dcol i.on { background: var(--fat-b); }
.mw .dcol i.ov { background: var(--g60); }
/* стабильный слой для закреплённых элементов: без мерцания при прокрутке */
.tabbar { will-change: transform; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.navp, .fab, .bfade { transform: translateZ(0); -webkit-backface-visibility: hidden; backface-visibility: hidden; }

/* ноутбуки и ПК: без backdrop-filter у меню — на десктопных WebView он мерцает при прокрутке */
@media (hover: hover) and (pointer: fine) {
  .navp { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--card); }
  .tabbar { will-change: auto; }
  .navp, .fab, .bfade { transform: none; }
}
@media (max-width: 360px) { .stat .ss { white-space: normal; } .stat { padding: 14px 12px 13px 13px; } .stat b { font-size: 22px; } }
@media (max-width: 360px) { .p-id span { font-size: 12px; white-space: normal; } }
.pe-name { display: block; width: 100%; font-size: 19px; font-weight: 500; letter-spacing: -0.02em; padding: 2px 0; border-radius: 8px; }
.pe-name:focus { outline: none; box-shadow: 0 1px 0 var(--ink); border-radius: 0; }
.portion .pn .pe-name + span { display: block; }
.portion #pe-mb { margin-top: 12px; }
.portion .re-grid .field { background: var(--card-2); }
/* списки в карточках: последний ряд без нижнего отступа, чтобы поле снизу равнялось полю сверху */
.card .src:last-child, .card .mbar:last-child, .card .fitem:last-child, .card .ps-row:last-child, .card .msl > div:last-child, .card .res-legend > div:last-child { padding-bottom: 0; }
/* шапка окна: размытие только когда контент прокручен под неё. В покое шапка сплошная,
   иначе при перетаскивании и возврате окна iOS отрисовывает слой blur с запаздыванием и сверху «пробивает» полоса */
.sheet:not(.scrolled) .sh-head { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
.scrim { touch-action: none; }
/* дни тренировок */
.wdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; width: 100%; }
.wdc { height: 40px; border-radius: 12px; background: var(--card-2); font-size: 13.5px; font-weight: 500; color: var(--g70); transition: background-color .2s var(--ease), color .2s var(--ease), transform .25s var(--spring); }
.wdc:active { transform: scale(.94); }
.wdc.on { background: var(--ink); color: var(--bg); }
.tday { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; background: var(--card); border-radius: var(--r-lg, 22px); padding: 12px 12px 12px 14px; margin-top: 10px; box-shadow: var(--shadow); transition: transform .3s var(--spring); }
.tday:active { transform: scale(.98); }
.td-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--card-2); color: var(--g70); }
.tday.on .td-ic { background: color-mix(in srgb, var(--carb-b) 18%, transparent); color: var(--carb-t); }
.td-ic svg { width: 18px; height: 18px; }
.td-t { flex: 1; min-width: 0; }
.td-t b { display: block; font-size: 15px; font-weight: 500; }
.td-t span { display: block; font-size: 12.5px; color: var(--g60); margin-top: 1px; }
.td-sw { flex: none; font-size: 13px; font-weight: 500; height: 32px; padding: 0 12px; border-radius: 99px; display: inline-flex; align-items: center; background: var(--card-2); color: var(--ink); }

/* без двойного тапа-зума в Safari */
html, body, button, a, input, textarea, label, [role="button"] { touch-action: manipulation; }
/* «Новое» рядом с этапом */
.tr-h { gap: 6px; }
.tr-new { margin-left: 0; margin-right: 0; }
.tr-h b + .tr-new { margin-left: auto; }
/* цифра в красном кружке по центру */
.sbadge { display: flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; line-height: 1; font-feature-settings: "tnum" 1; letter-spacing: 0; box-sizing: border-box; }
/* день тренировки в ленте недели: маленькая гантель вместо точки, цвет по статусу дня */
.week .day.trd .mark { width: 14px; height: 5px; background: none; color: var(--g40); display: flex; align-items: center; justify-content: center; overflow: visible; }
.week .day.trd .mark svg { width: 14px; height: 14px; stroke-width: 2.3; }
.week .day.trd.st-in .mark { color: var(--ok); }
.week .day.trd.st-ov .mark { color: var(--pro-b); }
.week .day.trd.st-un .mark { color: var(--g60); }
.d-hero + #t-train .tday { margin-top: 10px; }
.c-lbl[hidden] { display: none; }
.tchip { margin-left: 2px; gap: 5px; height: 30px; font-size: 13px; padding: 0 10px 0 8px; background: rgba(255,255,255,.28); color: #fff; transition: background-color .25s var(--ease), transform .25s var(--spring); }
.tchip svg { width: 14px; height: 14px; }
.tchip.off { background: rgba(255,255,255,.12); color: rgba(255,255,255,.85); }
.tchip:active { transform: scale(.94); }
.tchip[hidden] { display: none; }

/* календарь: гантель в дни тренировок */
.cal-grid .cd.trd i { width: 14px; height: 6px; border-radius: 0; background: none !important; display: flex; align-items: center; justify-content: center; overflow: visible; color: var(--g40); }
.cal-grid .cd.trd i svg { width: 14px; height: 14px; }
.cal-grid .cd.trd.in i { color: var(--ok); } .cal-grid .cd.trd.ov i { color: var(--pro-b); } .cal-grid .cd.trd.un i { color: var(--g60); }
.cal-grid .cd.trd.sel i { color: var(--ink-inv); }
/* тренировки на неделе */
.trw-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.trw-r { flex: none; font-size: 13px; font-weight: 500; height: 30px; padding: 0 12px; border-radius: 99px; background: var(--card-2); color: var(--ink); }
.trw-d { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 14px; }
.trw-b { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 9px 0 10px; border-radius: 14px; background: var(--card-2); color: var(--g60); font-size: 12.5px; font-weight: 500; transition: background-color .25s var(--ease), color .25s var(--ease), transform .25s var(--spring); }
.trw-b svg { width: 18px; height: 18px; opacity: .35; transition: opacity .25s var(--ease); }
.trw-b.on { background: var(--ink); color: var(--ink-inv); }
.trw-b.on svg { opacity: 1; }
.trw-b.now span { font-weight: 600; }
.trw-b:active { transform: scale(.93); }

/* переключатель темы: пилюля едет быстрее, тема меняется после неё короткой сменой кадра */
[data-seg="theme"] .knob { transition: transform .26s cubic-bezier(.32,.72,0,1), width .26s cubic-bezier(.32,.72,0,1); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .3s; }
/* подпись в меню на пиксель ниже, ровно по центру иконки */
.tab span { position: relative; top: 1px; }

/* тренировки: мягкая отметка вместо чёрной, сброс иконкой */
.trw-b { background: var(--card-2); color: var(--g60); }
.trw-b.on { background: color-mix(in srgb, var(--carb-b) 16%, transparent); color: var(--carb-t); }
.trw-b.on svg { opacity: 1; }
.trw-r { width: 32px; height: 32px; padding: 0; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); color: var(--g60); }
.trw-r svg { width: 16px; height: 16px; }

.week .day.trd .mark svg, .cal-grid .cd.trd i svg { flex: none; }

/* переключатели: при появлении без анимаций (в Safari текст выбранной кнопки проявлялся с задержкой),
   пилюля без отдельного слоя, чтобы не перекрывать подписи */
.seg { isolation: isolate; }
.seg:not(.ready) button, .seg:not(.ready) .knob { transition: none !important; }
.seg .knob, .week .pill { will-change: auto; }
.sheet.fresh .sh-body *, .sheet.fresh .sh-foot * { transition: none !important; }

/* подпись между карточками: отступ и снизу, чтобы не прилипала */
.note + .list, .note + .card, .note + .grp { margin-top: 14px; }
#p-res > .alert:first-child, #p-res > .card:first-child, #p-res > .loading:first-child { margin-top: 10px; }
/* тренд веса: спокойная пунктирная линия поверх графика */
.wtrend { fill: none; stroke: var(--ink); stroke-opacity: .35; stroke-width: 1.5; stroke-dasharray: 3 4; stroke-linecap: round; opacity: 0; transition: opacity .6s var(--ease) .9s; }
.wchart.go .wtrend { opacity: 1; }
.w-leg { margin-top: 10px; }
.legend .lg-dash { width: 14px; height: 0; border-radius: 0; background: none !important; border-top: 1.5px dashed var(--g60); }
.tip-acts { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.tip-acts .btn { flex: none; }
.lnk { color: inherit; text-decoration: underline; text-underline-offset: 2px; font: inherit; padding: 0; opacity: .9; }
/* этап цели пройден */
.celeb.stg { z-index: 95; }
.celeb.stg.lose .cb-card { background: var(--g-carb); }
.celeb.stg.gain .cb-card { background: var(--g-pro); }
.celeb.stg .cb-card { max-width: 340px; padding: 30px 22px 14px; }
.celeb.stg.lose .cb-ic { color: var(--carb-a); }
.celeb.stg .cb-ic { box-shadow: 0 0 0 10px rgba(255,255,255,.14), 0 0 0 22px rgba(255,255,255,.07); transform: scale(.6); transition: transform .7s var(--spring) .15s; }
.celeb.stg.on .cb-ic { transform: none; }
.celeb.stg .cb-card em { margin-top: 26px; }
.celeb.stg .cb-card b { font-size: 28px; }
.celeb.stg .cb-card p { margin: 8px 0 0; line-height: 1.45; }
.stg-seg { display: flex; gap: 4px; width: 100%; margin: 20px 0 0; position: relative; }
.stg-seg i { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.25); position: relative; overflow: hidden; }
.stg-seg i.on { background: #fff; }
.stg-seg i.now::after { content: ""; position: absolute; inset: 0; background: #fff; border-radius: inherit; transform: scaleX(0); transform-origin: left; }
.celeb.on .stg-seg i.now::after { animation: stgFill .9s var(--ease-out) .5s forwards; }
@keyframes stgFill { to { transform: none; } }
.stg-st { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; margin: 20px 0 22px; padding: 16px 0 0; border-top: 1px solid rgba(255,255,255,.2); position: relative; text-align: center; }
.stg-st > div { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.stg-st > div + div { border-left: 1px solid rgba(255,255,255,.2); }
.celeb.stg .stg-st em { margin: 0; font-size: 12px; opacity: .8; }
.celeb.stg .stg-st b { margin: 0; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; font-feature-settings: "tnum" 1; }
.celeb.stg .btn { width: 100%; background: #fff; color: #121216; }
.celeb.stg .lnk { margin-top: 6px; padding: 12px; text-decoration: none; font-size: 15px; position: relative; }
@media (max-width: 360px) { .celeb.stg .stg-st b { font-size: 15px; } .celeb.stg .stg-st em { font-size: 11.5px; } }
/* совет дня */
.coach { position: fixed; left: 50%; bottom: calc(14px + var(--safe-b) + 58px + 12px); z-index: 32; width: min(calc(100vw - 24px), 440px);
  background: var(--card); border-radius: 24px; border: 1px solid var(--hair); box-shadow: 0 12px 40px rgba(10,10,20,.16), 0 2px 8px rgba(10,10,20,.06);
  transform: translate(-50%, 24px); opacity: 0; transition: transform .55s var(--spring), opacity .3s var(--ease); padding: 16px 18px 18px; }
.coach.on { transform: translate(-50%, 0); opacity: 1; }
.coach.off { transform: translate(-50%, 24px); opacity: 0; transition: transform .35s var(--ease), opacity .25s var(--ease); }
.coach .tip-h { padding-right: 34px; position: relative; }
.coach-x { position: absolute; right: -8px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--g60); }
.coach-x svg { width: 16px; height: 16px; }
.coach-x:active { background: var(--card-2); }
.coach p { margin: 8px 0 0; }
.c-fat .tip-ic { color: var(--fat-t); background: color-mix(in srgb, var(--fat-b) 16%, transparent); }
:root[data-theme="dark"] .coach { box-shadow: 0 12px 40px rgba(0,0,0,.55); }
/* строки онбординга: подпись в одну строку, поле ввода с единицей в одну линию */
.nrow:not(.col) > span:first-child { flex: 1 0 auto; }
.nrow:not(.col) .ns { white-space: nowrap; }
.nrow .stepper { flex: 0 1 auto; min-width: 0; }
.stepper .val { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.stepper .val-in { width: 52px; padding: 5px 2px; }
@media (max-width: 374px) {
  .nrow { padding: 14px 14px 14px 16px; gap: 8px; }
  .nrow .stepper { gap: 4px; }
  .nrow .stepper button { width: 36px; height: 36px; }
  .nrow .stepper .val { min-width: 58px; font-size: 16px; }
  .nrow .stepper .val-in { width: 44px; font-size: 16px; }
  .nrow .seg { width: 160px; }
  .nrow .seg button { font-size: 13px; }
}
.ob-foot > * { pointer-events: auto; }
/* активность: тренировки одной карточкой */
.stepper button { flex: none; }
.tcard { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 6px 18px; }
.tcard + .tcard { margin-top: 10px; }
.tc-h { display: flex; align-items: center; gap: 10px; padding: 12px 0 6px; }
.tc-h b { font-weight: 500; font-size: 16.5px; letter-spacing: -0.01em; }
.tc-ic { width: 30px; height: 30px; border-radius: 50%; background: var(--card-2); display: grid; place-items: center; flex: none; color: var(--g70); }
.tc-ic svg { width: 15px; height: 15px; }
.trow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; min-height: 60px; }
.trow > span { font-size: 15px; white-space: nowrap; }
.tc-l { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; font-size: 15.5px !important; }
.tcard .collapse > div > * { border-top: 1px solid var(--hair); }
.tcard > .tc-h + .trow { border-top: 1px solid var(--hair); }
.tsec { padding: 14px 0 16px; }
.tsec > span { display: block; font-size: 15px; margin-bottom: 10px; }
.tsec > span em { font-style: normal; color: var(--g60); font-size: 13px; margin-left: 4px; }
.tsec .seg { width: 100%; box-shadow: none; background: var(--card-2); }
.tsec .seg button { height: 38px; font-size: 13.5px; }
.tc-note { margin: 10px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--g60); }
@media (max-width: 374px) { .tcard { padding: 4px 14px; } .tcard .stepper { gap: 4px; } .tcard .stepper button { width: 36px; height: 36px; } .tcard .stepper .val { min-width: 58px; font-size: 16px; } }
.tcard .stepper .val { min-width: 72px; }
@media (max-width: 374px) { .tcard { padding: 4px 12px; } .trow { gap: 6px; } .trow > span { font-size: 14px; } .tcard .stepper .val { min-width: 56px; } }
@media (max-width: 374px) { .tc-l { font-size: 14px !important; } }
@media (max-width: 374px) { .tsec .seg button { font-size: 12.5px; } }
#s-onboard { padding-top: 0; padding-bottom: 0; }
.seg button { flex: 1 1 0; min-width: 0; padding: 0 4px; }
/* пока печатаешь описание к фото, превью сворачивается, чтобы поле было видно над клавиатурой */
/* пока печатаешь, снизу появляется запас, чтобы поле можно было поднять над клавиатурой, фото не меняется */
/* окно с полями ввода держится за верх экрана (top задаёт pinSheet), низ идёт за клавиатурой */
.sheet.pin { max-height: none; bottom: 0; }
/* переключатели: у каждой кнопки одинаковый отступ вокруг текста */
.seg button { flex: 1 1 auto; padding: 0 10px; }
/* своя камера */
.cam { position: fixed; inset: 0; z-index: 96; background: #000; opacity: 0; transition: opacity .25s var(--ease); display: flex; align-items: center; justify-content: center; }
.cam.on { opacity: 1; }
.cam video { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s var(--ease); }
.cam.live video { opacity: 1; }
.cam-top { position: absolute; top: calc(12px + var(--safe-t) + var(--tg-top)); left: 16px; right: 16px; display: flex; justify-content: flex-end; }
.cam-x, .cam-g { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.16); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: #fff; display: grid; place-items: center; }
.cam-x svg, .cam-g svg { width: 20px; height: 20px; }
.cam-bot { position: absolute; left: 0; right: 0; bottom: calc(28px + var(--safe-b)); display: flex; align-items: center; justify-content: space-between; padding: 0 36px; }
.cam-sp { width: 46px; }
.cam-s { width: 76px; height: 76px; border-radius: 50%; border: 4px solid #fff; display: grid; place-items: center; transition: transform .2s var(--spring); }
.cam-s i { width: 60px; height: 60px; border-radius: 50%; background: #fff; transition: transform .2s var(--spring); }
.cam-s:active i { transform: scale(.88); }
.cam.flash::after { content: ""; position: absolute; inset: 0; background: #fff; animation: camFlash .3s ease-out forwards; }
@keyframes camFlash { from { opacity: .8; } to { opacity: 0; } }
.res-meal { background: var(--card); border-radius: var(--r-lg); padding: 10px 14px 10px 18px; margin-top: 10px; } .res-meal .mline { margin: 0; color: var(--ink); font-size: 15px; }
.btn-row.al { justify-content: flex-start; margin-left: 0; } .alert .btn-row.al .btn.ghost { background: var(--card-2); box-shadow: none; }

/* звезда Telegram (XTR) рядом с ценой */
svg.xtr { width: 16px !important; height: 16px !important; color: #ffb21e; flex: none; position: relative; top: -1px; margin: 0 1px 0 -2px; }
.btn svg.xtr { margin: 0 -3px 0 -4px; top: .5px; }
/* статус доступа к Gemini в карточке съёмки */
.hs-top { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.hs-chip { height: 32px; padding: 0 12px; border-radius: 999px; background: rgba(255,255,255,.2); color: #fff; font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 7px; transition: transform .3s var(--spring), background .2s; }
.hs-chip:active { transform: scale(.95); background: rgba(255,255,255,.3); }
.ai-dot { width: 7px; height: 7px; border-radius: 50%; background: #ffc24a; flex: none; box-shadow: 0 0 0 3px rgba(255,194,74,.25); }
.ai-dot.on { background: #4fe08f; box-shadow: 0 0 0 3px rgba(79,224,143,.25); }
.ai-cur { font-style: normal; font-size: 12px; font-weight: 500; color: var(--g60); background: var(--g10, rgba(127,127,127,.12)); border-radius: 6px; padding: 2px 6px; margin-left: 8px; vertical-align: 2px; }
/* блок «Нейросеть»: минимальная карточка Gemini */
.ai-card { margin-top: 8px; background: var(--card); border-radius: var(--r-xl); padding: 14px 16px 14px 14px; display: flex; align-items: center; gap: 14px; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .3s var(--spring); }
.ai-card:active { transform: scale(.98); }
.ai-logo { width: 46px; height: 46px; border-radius: 15px; flex: none; display: grid; place-items: center; background: var(--g10); }
.ai-logo img { width: 24px; height: 24px; display: block; }
.ai-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ai-name b { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.ai-name span { font-size: 13.5px; color: var(--g60); margin-top: 2px; }
.ai-buy { flex: none; height: 34px; padding: 0 12px 0 13px; border-radius: 999px; display: flex; align-items: center; background: var(--ink); color: var(--ink-inv); font-size: 14px; font-weight: 500; }
.ai-buy svg.xtr { margin: 0 -2px 0 3px; }
.ai-ok { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.ai-ok svg { width: 15px; height: 15px; }
.ai-chev { width: 15px; height: 15px; color: var(--g40); flex: none; }
/* шапка окна доступа: большой переливающийся логотип */
.ai-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 12px 22px; }
.ai-big { position: relative; width: 92px; height: 92px; display: grid; place-items: center; }
.ai-big img { position: relative; width: 76px; height: 76px; animation: aiHue 6s ease-in-out infinite alternate, aiFloat 4s ease-in-out infinite; }
.ai-shine { position: absolute; left: 8px; top: 8px; width: 76px; height: 76px; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.8) 50%, transparent 65%) 0 0 / 300% 100% no-repeat; -webkit-mask: url(gemini.png?v=1) center / contain no-repeat; mask: url(gemini.png?v=1) center / contain no-repeat; animation: aiShine 3.6s ease-in-out infinite, aiFloat 4s ease-in-out infinite; }
.ai-hero b { font-size: 24px; font-weight: 500; letter-spacing: -0.025em; margin-top: 14px; }
.ai-hero > span { font-size: 14.5px; color: var(--g60); margin-top: 6px; line-height: 1.45; max-width: 300px; }
@keyframes aiHue { from { filter: hue-rotate(-18deg) saturate(1.05); } to { filter: hue-rotate(28deg) saturate(1.15); } }
@keyframes aiFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes aiGlow { 0%, 100% { opacity: .65; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes aiShine { 0% { background-position: 120% 0; } 55%, 100% { background-position: -20% 0; } }
@media (prefers-reduced-motion: reduce) { .ai-big img, .ai-shine { animation: none; } }
/* тарифы в окне доступа */
.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tier { position: relative; background: var(--card); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; align-items: flex-start; text-align: left; color: var(--ink); box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .25s var(--ease), transform .3s var(--spring); -webkit-tap-highlight-color: transparent; }
.tier:not(:disabled):active { transform: scale(.97); }
.tier:disabled { cursor: default; opacity: 1; }
.tier.sel { box-shadow: inset 0 0 0 2px var(--ink); }
.tier b small { font-size: 18px; font-weight: 500; letter-spacing: 0; }
.btn.pop { animation: btnPop .35s var(--ease-out); }
@keyframes btnPop { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.t-now { flex: none; position: relative; top: 2px; font-size: 11.5px; line-height: 16px; font-weight: 500; color: var(--g70); background: var(--g10); border-radius: 999px; padding: 3px 8px; }
.tr-h { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; min-height: 22px; }
.tr-n { font-size: 14px; line-height: 22px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.tier b { font-size: 34px; font-weight: 500; letter-spacing: -0.03em; margin-top: 14px; line-height: 1; }
.t-u { font-size: 13.5px; color: var(--g60); margin-top: 4px; }
.t-q { font-size: 13px; font-weight: 500; margin-top: 12px; }
.tier .t-q { color: var(--g70); }
.tier.pro .t-q { color: var(--ok); }
.why { margin-top: 8px; background: var(--card); border-radius: var(--r-lg); padding: 16px; display: flex; gap: 12px; font-size: 13.5px; line-height: 1.45; color: var(--g60); transition: box-shadow .4s; }
.why b { display: block; color: var(--ink); font-size: 15px; font-weight: 500; margin-bottom: 3px; }
.why-ic { width: 32px; height: 32px; border-radius: 10px; background: var(--g10); color: var(--g70); display: grid; place-items: center; flex: none; }
.why-ic svg { width: 17px; height: 17px; }
button.link { color: var(--cal-t); font: inherit; padding: 0; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }

/* плашка плана на экране фото: только для Free Plan, до распознавания */
.plan-note { width: 100%; margin-top: 8px; background: var(--card); border-radius: var(--r-lg); padding: 12px 14px; display: flex; align-items: center; gap: 12px; text-align: left; -webkit-tap-highlight-color: transparent; transition: transform .3s var(--spring); }
.plan-note:active { transform: scale(.98); }
.pn-ic { width: 36px; height: 36px; border-radius: 12px; background: var(--g10); display: grid; place-items: center; flex: none; }
.pn-ic img { width: 18px; height: 18px; }
.pn-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pn-t b { font-size: 14.5px; font-weight: 500; }
.pn-t span { font-size: 13px; color: var(--g60); margin-top: 2px; line-height: 1.3; }
.pn-a { flex: none; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--g10); color: var(--ink); font-size: 13px; font-weight: 500; display: grid; place-items: center; }
/* цель в профиле: три кнопки одной ширины, если помещаются; на узком экране ширина по тексту */
.seg[data-seg="goal"] button { flex: 1 1 0; min-width: max-content; padding: 0 8px; }
@media (max-width: 374px) { .seg[data-seg="goal"] button { font-size: 12.5px; padding: 0 5px; } }

/* нижний отступ под полоску iPhone: внутри прокрутки и под кнопкой, а не сплошной полосой у края окна */
.sheet .sh-foot { padding-bottom: calc(14px + var(--safe-b)); }
.sheet:has(.sh-foot:empty) .sh-body { padding-bottom: calc(24px + var(--safe-b)); }

/* иллюстрации достижений */
.aa { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; flex: none; color: #fff; --aa-k: #6553E0; background: var(--g-cal); }
.aa svg { width: 46px; height: 46px; display: block; }
.aa.c-pro { background: var(--g-pro); --aa-k: #E0566C; }
.aa.c-cal { background: var(--g-cal); --aa-k: #6553E0; }
.aa.c-carb { background: var(--g-carb); --aa-k: #3E9A61; }
.aa.c-fat { background: var(--g-fat); --aa-k: #5B7FEC; }
.aa.c-sun { background: linear-gradient(140deg, #F28A2E 0%, #F7B04B 58%, #FCD77A 100%); --aa-k: #E57C22; }
.aa.c-teal { background: linear-gradient(140deg, #23968F 0%, #4CB8AB 58%, #9EDDC8 100%); --aa-k: #1F8A84; }
.aa.c-pink { background: linear-gradient(140deg, #D9508F 0%, #EE7FAE 58%, #F8B6CF 100%); --aa-k: #D24A89; }
.aa.off { background: var(--card-2); --aa-k: #fff; }
.aa.off svg { filter: brightness(0); opacity: .14; }
:root[data-theme="dark"] .aa.off svg { filter: brightness(0) invert(1); opacity: .18; }
.aa > svg:not([viewBox="0 0 64 64"]) { width: 24px; height: 24px; }
.tr .tr-aa { margin: -2px 0 0 -2px; }
.tr.fresh .tr-aa:not(.off) svg { animation: aaIn .8s var(--spring) both .2s; }
@keyframes aaIn { 0% { transform: scale(.3) rotate(-12deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.ab-aa { width: 44px; height: 44px; border-radius: 14px; }
.ab-aa svg { width: 36px; height: 36px; }

/* ---------- итоги месяца (сторис) ---------- */
.wrap { position: fixed; inset: 0; z-index: 97; background: #0E0E14; color: #fff; opacity: 0; transition: opacity .4s var(--ease); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.wrap.on { opacity: 1; }
.wr-bars-top { position: absolute; z-index: 3; top: calc(var(--tg-top) + 12px); left: 20px; right: 20px; display: flex; gap: 4px; }
.wr-bars-top i { flex: 1; height: 2px; border-radius: 1px; background: rgba(255,255,255,.3); overflow: hidden; }
.wr-bars-top i s { display: block; height: 100%; width: 0; background: #fff; text-decoration: none; }
.wr-bars-top i.done s { width: 100%; }
.wr-bars-top i.run s { animation: wrBar var(--dur, 6500ms) linear forwards; }
.wrap.paused .wr-bars-top i.run s { animation-play-state: paused; }
@keyframes wrBar { from { width: 0; } to { width: 100%; } }
.wr-x { position: absolute; z-index: 3; top: calc(var(--tg-top) + 22px); right: 10px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: none; }
.wr-x svg { width: 20px; height: 20px; }
.wr-stage { position: absolute; inset: 0; }
.wr-s { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .5s var(--ease), visibility 0s .5s; background-size: 160% 160%; }
.wr-s.on { opacity: 1; visibility: visible; transition: opacity .5s var(--ease); animation: wrBg 14s var(--ease) infinite alternate; }
@keyframes wrBg { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
.wr-s.g1 { background-image: linear-gradient(160deg, #2E2296 0%, #5847DA 45%, #9A8EF2 100%); }
.wr-s.g2 { background-image: linear-gradient(160deg, #2F8A52 0%, #4FAE6C 50%, #B9D766 100%); }
.wr-s.g3 { background-image: linear-gradient(160deg, #D9405F 0%, #F07C7A 50%, #FDBE86 100%); }
.wr-s.g4 { background-image: linear-gradient(160deg, #3A5ED6 0%, #6E95EF 50%, #BBD0FB 100%); }
.wr-s.g5 { background-image: linear-gradient(160deg, #4636C4 0%, #7C6EEA 50%, #CBCAFB 100%); }
.wr-s.g6 { background-image: linear-gradient(160deg, var(--t1) 0%, var(--t2) 50%, var(--t3) 100%); }
.wr-s.g7 { background: #111116; animation: none; }
.wr-s.g8 { background-image: linear-gradient(160deg, #1F8A84 0%, #4CB8AB 50%, #9EDDC8 100%); }
.wr-s.g9 { background-image: linear-gradient(160deg, #E57C22 0%, #F7A64B 50%, #FCD77A 100%); }
.wr-note { margin: 14px 0 0; font-size: 14px; line-height: 1.4; opacity: .85; }
.wr-hist { margin-top: 28px; height: 84px; display: flex; align-items: flex-end; gap: 4px; }
.wr-hist i { flex: 1; height: var(--h); border-radius: 3px; background: rgba(255,255,255,.28); transform: scaleY(0); transform-origin: bottom; }
.wr-hist i.on { background: #fff; }
.wr-s.in .wr-hist i { animation: wrGrow .7s var(--ease-out) forwards; animation-delay: calc(.35s + var(--d)); }
.wr-axis { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11.5px; opacity: .7; }
.wr-hist.wa, .wr-split.wa { clip-path: none; }
.wr-split { margin-top: 28px; height: 14px; display: flex; gap: 3px; }
.wr-split i { width: var(--w); border-radius: 4px; transform: scaleX(0); transform-origin: left; }
.wr-s.in .wr-split i { animation: wrGrowX .9s var(--ease-out) forwards; }
.wr-s.in .wr-split i:nth-child(2) { animation-delay: .15s; } .wr-s.in .wr-split i:nth-child(3) { animation-delay: .3s; }
@keyframes wrGrowX { to { transform: none; } }
.s-p { background: #fff; } .s-f { background: rgba(255,255,255,.62); } .s-c { background: rgba(255,255,255,.32); }
.wr-leg { margin-top: 12px; display: flex; gap: 16px; font-size: 13px; opacity: .9; }
.wr-leg span { display: flex; align-items: center; gap: 6px; }
.wr-leg i { width: 8px; height: 8px; border-radius: 50%; }
.wt-cal { --t1: #4636C4; --t2: #7C6EEA; --t3: #CBCAFB; }
.wt-pro { --t1: #D9405F; --t2: #F07C7A; --t3: #FDBE86; }
.wt-carb { --t1: #2F8A52; --t2: #4FAE6C; --t3: #B9D766; }
.wt-fat { --t1: #3A5ED6; --t2: #6E95EF; --t3: #BBD0FB; }
.wr-in { position: relative; height: 100%; display: flex; flex-direction: column; padding: calc(var(--tg-top) + 34px) 24px calc(var(--safe-b) + 48px); }
.wr-top { display: flex; gap: 8px; font-size: 13px; font-weight: 500; opacity: .75; padding-right: 40px; position: relative; z-index: 2; }
.wr-top span + span::before { content: "·"; margin-right: 8px; }
.wr-body { margin-top: auto; display: flex; flex-direction: column; position: relative; z-index: 2; }
.wr-body.c { margin: auto 0; align-items: center; }
.wr-cover { font-size: 76px; line-height: .95; font-weight: 400; letter-spacing: -.055em; display: flex; flex-direction: column; }
.wr-cover em { font-style: normal; opacity: .45; }
.wr-sub { margin: 18px 0 0; font-size: 17px; opacity: .8; }
.wr-num { display: flex; align-items: baseline; gap: 6px; font-size: 120px; line-height: .86; font-weight: 400; letter-spacing: -.06em; }
.wr-num b, .wr-st b, .wc-grid b, .wc-dish b, .wr-rank b, .wc-type { font-weight: 400; }
.wr-st b, .wc-grid b { font-weight: 500; }
.wr-num > span { font-size: 30px; letter-spacing: -.02em; opacity: .7; font-weight: 400; }
.wr-t { margin: 14px 0 0; font-size: 20px; line-height: 1.2; font-weight: 500; letter-spacing: -.015em; }
.wr-p { margin: 14px 0 0; font-size: 17px; line-height: 1.45; opacity: .85; max-width: 320px; }
.wr-dish { font-size: 50px; line-height: 1; font-weight: 400; letter-spacing: -.045em; overflow-wrap: anywhere; }
.wr-type { font-size: 54px; line-height: 1; font-weight: 400; letter-spacing: -.05em; }
.wr-bc { margin-top: 30px; height: 64px; display: flex; align-items: flex-end; gap: 3px; }
.wr-bc i { flex: 1; height: 38%; border-radius: 2px; background: rgba(255,255,255,.28); transform: scaleY(0); transform-origin: bottom; }
.wr-bc i.on { height: 100%; background: #fff; }
.wr-s.in .wr-bc i { animation: wrGrow .6s var(--ease-out) forwards; animation-delay: calc(.35s + var(--d)); }
@keyframes wrGrow { to { transform: none; } }
.wr-rank { margin-top: 26px; display: flex; flex-direction: column; }
.wr-rank > div { display: flex; align-items: baseline; gap: 14px; padding: 11px 0; border-top: 1px solid rgba(255,255,255,.25); font-size: 15.5px; }
.wr-rank span { width: 14px; opacity: .6; font-weight: 500; }
.wr-rank b { flex: 1; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-rank em { font-style: normal; opacity: .7; }
.wr-st { margin-top: 28px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.25); display: flex; }
.wr-st > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.wr-st > div + div { padding-left: 16px; border-left: 1px solid rgba(255,255,255,.25); }
.wr-st b { font-size: 20px; font-weight: 500; letter-spacing: -.02em; white-space: nowrap; }
.wr-st span { font-size: 12.5px; opacity: .75; margin-top: 2px; }
.wr-rank + .wr-st { margin-top: 0; }
.wr-line { margin-top: 30px; width: 100%; height: 90px; overflow: visible; }
.wr-s.in .wr-line .ln { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: wrLine 1.8s var(--ease-out) .45s forwards; }
@keyframes wrLine { to { stroke-dashoffset: 0; } }
.wr-dots { display: flex; justify-content: space-between; align-items: center; margin-top: 30px; height: 8px; }
.wr-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.3); transform: scale(0); }
.wr-dots i.on { background: #fff; }
.wr-s.in .wr-dots i { animation: wrPop .45s var(--spring) forwards; animation-delay: calc(.45s + var(--d)); }
@keyframes wrPop { to { transform: none; } }
/* появление: строки выезжают из-под маски */
.wa { opacity: 0; transform: translateY(26px); clip-path: inset(0 0 100% 0); }
.wr-s.in .wa { animation: wrIn .8s var(--ease-out) forwards; }
.wr-s.in .wa:nth-child(2) { animation-delay: .07s; } .wr-s.in .wa:nth-child(3) { animation-delay: .14s; } .wr-s.in .wa:nth-child(4) { animation-delay: .21s; } .wr-s.in .wa:nth-child(5) { animation-delay: .28s; } .wr-s.in .wa:nth-child(n+6) { animation-delay: .35s; }
.wr-s.in .wr-top.wa { animation-delay: 0s; }
@keyframes wrIn { to { opacity: 1; transform: none; clip-path: inset(0 0 -20% 0); } }
.wr-bc.wa, .wr-dots.wa, .wr-line.wa, .wr-card.wa { clip-path: none; }
/* карточка для сторис */
.wr-card { width: min(310px, 80vw); border-radius: 26px; padding: 20px; position: relative; overflow: hidden; background: linear-gradient(160deg, var(--t1) 0%, var(--t2) 50%, var(--t3) 100%); display: flex; flex-direction: column; text-align: left; box-shadow: 0 30px 70px rgba(0,0,0,.5); }
.wc-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 500; }
.wc-top span { display: flex; align-items: center; gap: 7px; }
.wc-top span:last-child { opacity: .75; }
.wc-top img { width: 22px; height: 22px; border-radius: 7px; }
.wc-type { margin-top: 64px; font-size: 32px; line-height: 1.02; font-weight: 400; letter-spacing: -.04em; position: relative; }
.wc-pat { position: absolute; left: 0; top: 0; width: 100%; height: 150px; pointer-events: none; }
.wc-top { position: relative; }
.wc-dots { margin-top: 16px; display: flex; justify-content: space-between; }
.wc-dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.3); }
.wc-dots i.on { background: #fff; }
.wc-grid { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid rgba(255,255,255,.25); }
.wc-grid > div { padding: 10px 0; display: flex; flex-direction: column; }
.wc-grid > div:nth-child(even) { padding-left: 14px; border-left: 1px solid rgba(255,255,255,.25); }
.wc-grid > div:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.25); }
.wc-grid b { font-size: 21px; font-weight: 500; letter-spacing: -.02em; line-height: 1.1; }
.wc-grid span { font-size: 11px; opacity: .75; line-height: 1.25; margin-top: 1px; }
.wc-dish { padding: 10px 0 0; border-top: 1px solid rgba(255,255,255,.25); display: flex; flex-direction: column; }
.wc-dish span { font-size: 11px; opacity: .75; }
.wc-dish b { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-bot { margin-top: 10px; font-size: 11px; opacity: .6; font-weight: 500; }
.wr-acts { position: relative; z-index: 3; margin-top: 22px; width: min(310px, 80vw); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wr-acts .btn { width: 100%; }
.wr-acts .lnk { color: rgba(255,255,255,.65); text-decoration: none; padding: 10px; }
.wrap.last .wr-x { display: none; }
/* плашка на главной */
.wr-ban { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-xl); background: linear-gradient(140deg, #2E2296, #5847DA 60%, #9A8EF2); color: #fff; text-align: left; }
.wb-n { font-size: 34px; font-weight: 400; letter-spacing: -.06em; line-height: 1; opacity: .9; width: 46px; flex: none; }
.wb-t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.wb-t b { font-size: 16px; font-weight: 500; }
.wb-t span { font-size: 13px; opacity: .8; }
.wb-ch { width: 18px; height: 18px; opacity: .7; }
.wr-pat { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 1s var(--ease) .2s; }
.wr-s.on .wr-pat { opacity: 1; }
.wr-body.c .wr-card { z-index: 2; }
@media (prefers-reduced-motion: reduce) { .wa, .wr-bc i, .wr-dots i { opacity: 1 !important; transform: none !important; clip-path: none !important; animation: none !important; } .wr-s.on { animation: none; } }
/* итоги v7: графики */
.wr-vis { flex: 1; min-height: 0; display: grid; place-items: center; position: relative; z-index: 2; padding: 14px 0; }
.wr-vs { align-self: center; margin-left: 10px; font-size: 13px; font-weight: 500; letter-spacing: 0; opacity: 1; padding: 5px 10px; border-radius: 99px; background: rgba(255,255,255,.22); white-space: nowrap; }
.wr-num > .wr-vs { font-size: 13px; opacity: 1; }
.wr-heat { width: 100%; max-width: 330px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; clip-path: none !important; }
.wr-heat em { font-style: normal; font-size: 11px; opacity: .7; text-align: center; }
.wr-heat i { aspect-ratio: 1; border-radius: 9px; background: rgba(255,255,255,.12); display: grid; place-items: center; transform: scale(.6); opacity: 0; }
.wr-heat i.on { background: rgba(255,255,255,var(--a)); }
.wr-heat i span { font-size: 11px; font-weight: 500; color: rgba(255,255,255,.75); }
.wr-heat i.on span { color: rgba(0,0,0,.45); }
.wr-heat i.e { visibility: hidden; }
.wr-s.in .wr-heat i { animation: wrPop2 .5s var(--spring) forwards; animation-delay: calc(.2s + var(--d)); }
@keyframes wrPop2 { to { transform: none; opacity: 1; } }
.wr-clock { width: min(76vw, 300px); height: auto; clip-path: none !important; overflow: visible; }
.wr-clock text { fill: #fff; fill-opacity: .7; font-size: 11px; font-family: inherit; }
.wr-clock circle { transform-box: fill-box; transform-origin: center; transform: scale(0); }
.wr-s.in .wr-clock circle { animation: wrPop .5s var(--spring) forwards; animation-delay: calc(.3s + var(--d)); }
.wr-badge { align-self: flex-start; font-size: 13px; font-weight: 500; padding: 5px 11px; border-radius: 99px; background: rgba(255,255,255,.22); margin-bottom: 14px; }
.wr-rank > div { position: relative; }
.wr-rank s { position: absolute; left: 0; bottom: -1px; height: 2px; width: var(--w); background: #fff; text-decoration: none; transform: scaleX(0); transform-origin: left; }
.wr-s.in .wr-rank s { animation: wrGrowX .9s var(--ease-out) .5s forwards; }
.wr-mac { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.wr-mac > div { display: grid; grid-template-columns: 1fr auto; row-gap: 8px; font-size: 14.5px; font-weight: 500; }
.wr-mac em { font-style: normal; }
.wr-mac small { font-size: 12px; opacity: .7; font-weight: 400; }
.wr-mac i { grid-column: 1 / -1; position: relative; height: 8px; border-radius: 4px; background: rgba(255,255,255,.25); }
.wr-mac s { display: block; height: 100%; width: var(--w); border-radius: 4px; background: #fff; text-decoration: none; transform: scaleX(0); transform-origin: left; }
.wr-s.in .wr-mac s { animation: wrGrowX 1s var(--ease-out) .45s forwards; }
.wr-mac u { position: absolute; left: 66.67%; top: -4px; bottom: -4px; width: 2px; border-radius: 1px; background: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.08); }
.wr-mac .wa { clip-path: none; }
.wr-goal { margin-top: 22px; display: grid; grid-template-columns: 1fr auto; font-size: 14.5px; font-weight: 500; clip-path: none !important; }
.wr-goal .wr-dots { grid-column: 1 / -1; margin-top: 12px; }
.wr-goal em { font-style: normal; }
.wr-wch { width: 100%; height: auto; max-height: 100%; overflow: visible; clip-path: none !important; }
.wr-wch text { fill: #fff; font-size: 14px; font-weight: 500; font-family: inherit; }
.wr-wch .ln { stroke-dasharray: 1400; stroke-dashoffset: 1400; }
.wr-s.in .wr-wch .ln { animation: wrLine 1.8s var(--ease-out) .4s forwards; }
.wr-wch circle { transform-box: fill-box; transform-origin: center; transform: scale(0); }
.wr-s.in .wr-wch circle { animation: wrPop .45s var(--spring) forwards; animation-delay: var(--d); }
.wr-days { width: 100%; height: min(34vh, 220px); display: flex; align-items: flex-end; gap: 3px; position: relative; clip-path: none !important; }
.wr-days i { flex: 1; height: var(--h); border-radius: 3px 3px 1px 1px; background: rgba(255,255,255,.18); transform: scaleY(0); transform-origin: bottom; }
.wr-days i.on { background: rgba(255,255,255,.55); }
.wr-days i.in { background: #fff; }
.wr-s.in .wr-days i { animation: wrGrow .7s var(--ease-out) forwards; animation-delay: calc(.3s + var(--d)); }
.wr-nl { position: absolute; left: 0; right: 0; bottom: var(--y); border-top: 1.5px dashed rgba(255,255,255,.85); opacity: 0; }
.wr-nl em { position: absolute; right: 0; top: -22px; font-style: normal; font-size: 11.5px; font-weight: 500; }
.wr-s.in .wr-nl { animation: wrFade .5s var(--ease) 1.1s forwards; }
@keyframes wrFade { to { opacity: 1; } }
.wr-in .wr-body .wr-st:last-child { margin-bottom: 0; }
.wr-heat i { font-style: normal; }
.wr-num > span { white-space: nowrap; }
.wr-num.sm { font-size: 92px; }
.wr-clock path { stroke-dasharray: 60; stroke-dashoffset: 60; }
.wr-s.in .wr-clock path { animation: wrArc .6s var(--ease-out) forwards; animation-delay: calc(.3s + var(--d)); }
@keyframes wrArc { to { stroke-dashoffset: 0; } }
.wr-clock .ct { font-size: 34px; fill-opacity: 1; letter-spacing: -.04em; }
.wr-top5 { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.wr-top5 > div { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; overflow: hidden; font-size: 15px; opacity: 0; transform: translateX(-16px); }
.wr-top5 s { position: absolute; inset: 0 auto 0 0; width: var(--w); background: rgba(255,255,255,.2); text-decoration: none; z-index: -1; transform: scaleX(0); transform-origin: left; }
.wr-top5 > div:first-child s { background: rgba(255,255,255,.34); }
.wr-top5 span { width: 16px; opacity: .7; }
.wr-top5 b { flex: 1; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-top5 em { font-style: normal; opacity: .85; }
.wr-top5 > div { isolation: isolate; }
.wr-s.in .wr-top5 > div { animation: wrIn .6s var(--ease-out) forwards; animation-delay: var(--d); }
.wr-s.in .wr-top5 s { animation: wrGrowX 1s var(--ease-out) forwards; animation-delay: calc(var(--d) + .2s); }
.wr-why { width: 100%; display: flex; flex-direction: column; }
.wr-why > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.28); opacity: 0; transform: translateY(12px); }
.wr-why > div:last-child { border-bottom: 1px solid rgba(255,255,255,.28); }
.wr-why b { font-size: 30px; font-weight: 400; letter-spacing: -.03em; white-space: nowrap; }
.wr-why span { font-size: 14px; opacity: .85; text-align: right; }
.wr-s.in .wr-why > div { animation: wrIn .6s var(--ease-out) forwards; animation-delay: var(--d); }
/* итоги v8 */
.wrap .num, .wrap b, .wrap .wr-cover { font-feature-settings: "tnum" 0, "pnum" 1, "cv11" 1; font-variant-numeric: proportional-nums; }
.wr-cover { letter-spacing: -.06em; }
.wr-num { letter-spacing: -.065em; }
.wr-num > span { margin-left: 6px; }
.wr-t { margin-top: 26px; }
.wr-num + .wr-t { margin-top: 26px; }
.wr-st > div { padding-right: 12px; }
.wr-st > div + div { padding-left: 14px; }
.wr-st span { line-height: 1.3; margin-top: 4px; }
.wr-st b { letter-spacing: -.03em; }
.wr-top5 b { display: flex; flex-direction: column; }
.wr-top5 b small { font-size: 12px; font-weight: 400; opacity: .75; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }
.wr-top5 > div { padding: 11px 16px; }
.wr-rings { width: 100%; display: flex; align-items: center; gap: 18px; }
.wr-rings svg { width: 48%; max-width: 190px; flex: none; overflow: visible; clip-path: none !important; }
.wr-rings .rg { stroke-dashoffset: var(--c); }
.wr-s.in .wr-rings .rg { animation: wrRing 1.4s var(--ease-out) forwards; animation-delay: var(--d); }
@keyframes wrRing { to { stroke-dashoffset: 0; } }
.wr-rleg { flex: 1; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.wr-rleg > div { display: grid; grid-template-columns: 10px 1fr; column-gap: 8px; align-items: center; clip-path: none !important; }
.wr-rleg i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,var(--o)); }
.wr-rleg span { font-size: 13px; opacity: .85; }
.wr-rleg b { grid-column: 2; font-size: 24px; font-weight: 400; letter-spacing: -.03em; line-height: 1.1; }
.wr-rleg em { grid-column: 2; font-style: normal; font-size: 12px; opacity: .75; }
.wr-wch text, .wr-kch text { fill: #fff; fill-opacity: .8; font-size: 12px; font-weight: 500; font-family: inherit; }
.wr-wch .ar { opacity: 0; }
.wr-s.in .wr-wch .ar { animation: wrFade .8s var(--ease) 1.2s forwards; }
.wr-kch { width: 100%; height: auto; overflow: visible; clip-path: none !important; }
.wr-kch .ln { stroke-dasharray: 1400; stroke-dashoffset: 1400; }
.wr-s.in .wr-kch .ln { animation: wrLine 2s var(--ease-out) .4s forwards; }
.wr-kch circle { transform-box: fill-box; transform-origin: center; transform: scale(0); }
.wr-s.in .wr-kch circle { animation: wrPop .4s var(--spring) forwards; animation-delay: var(--d); }
.wr-kch .band { transform-box: fill-box; transform-origin: left; transform: scaleX(0); }
.wr-s.in .wr-kch .band { animation: wrGrowX 1s var(--ease-out) .2s forwards; }
.wr-kleg { display: flex; gap: 16px; margin-top: 10px; font-size: 12px; opacity: .85; clip-path: none !important; }
.wr-kleg span { display: flex; align-items: center; gap: 6px; }
.wr-kleg i { display: block; }
.wr-kleg .bd { width: 14px; height: 10px; border-radius: 3px; background: rgba(255,255,255,.3); }
.wr-kleg .ln { width: 14px; height: 3px; border-radius: 2px; background: #fff; }
.wr-kleg .dt { width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.wr-clock .ct { font-size: 30px; }
.wr-rings svg { width: 50%; max-width: 200px; }
/* итоги v9 */
.wr-cover { letter-spacing: -.075em; }
.wr-num { letter-spacing: -.08em; }
.wr-dish, .wr-type { letter-spacing: -.055em; }
.wr-st b, .wr-why b, .wr-rleg b { letter-spacing: -.045em; }
.wr-head { position: relative; z-index: 2; margin-top: 28px; display: flex; flex-direction: column; }
.wr-head .wr-st { margin-top: 22px; }
.wr-top5 { gap: 8px; }
.wr-top5 > div { background: #fff; color: #1C1C22; border-radius: 18px; padding: 12px 16px; }
.wr-top5 s { background: rgba(217,64,95,.12); }
.wr-top5 > div:first-child s { background: rgba(217,64,95,.18); }
.wr-top5 span { color: #D9405F; opacity: 1; font-weight: 600; }
.wr-top5 b small { opacity: .55; }
.wr-top5 em { color: #D9405F; font-weight: 600; opacity: 1; }
.wr-rings { flex-direction: column; justify-content: center; }
.wr-rings svg { width: min(62vw, 240px); max-width: none; }
.wr-rleg { flex-direction: row; gap: 0; margin-top: 24px; width: 100%; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.25); clip-path: none !important; }
.wr-rleg > div { flex: 1; display: flex; flex-direction: column; gap: 2px; padding-right: 10px; }
.wr-rleg > div + div { padding-left: 14px; border-left: 1px solid rgba(255,255,255,.25); }
.wr-rleg span { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.wr-rleg b { font-size: 22px; }
.wr-gw { width: 100%; display: flex; flex-direction: column; align-items: center; }
.wr-gauge { width: min(86vw, 330px); overflow: visible; clip-path: none !important; }
.wr-gauge text { fill: #fff; fill-opacity: .75; font-size: 11px; font-weight: 500; font-family: inherit; }
.wr-gauge .gz { stroke-dasharray: 80; stroke-dashoffset: 80; }
.wr-s.in .wr-gauge .gz { animation: wrArc 1s var(--wr-ease) .4s forwards; }
.wr-gauge .gn { transform: rotate(-90deg); }
.wr-s.in .wr-gauge .gn { animation: wrNeedle 1.8s var(--wr-ease) .5s forwards; }
@keyframes wrNeedle { 0% { transform: rotate(-90deg); } 70% { transform: rotate(calc(var(--r) + 4deg)); } 100% { transform: rotate(var(--r)); } }
.wr-split3 { width: 100%; display: flex; gap: 6px; margin-top: 26px; clip-path: none !important; }
.wr-split3 > div { flex: var(--f); display: flex; flex-direction: column; min-width: 64px; }
.wr-split3 i { display: block; height: 10px; border-radius: 5px; background: rgba(255,255,255,var(--o)); transform: scaleX(0); transform-origin: left; }
.wr-s.in .wr-split3 i { animation: wrGrowX .9s var(--wr-ease) forwards; animation-delay: var(--d); }
.wr-split3 b { font-size: 22px; font-weight: 400; margin-top: 8px; letter-spacing: -.04em; }
.wr-split3 span { font-size: 12px; opacity: .8; }
.wr-why { margin-top: 0; }
/* плавнее: мягкая кривая, длиннее, с лёгким размытием */
.wrap { --wr-ease: cubic-bezier(.22, 1, .36, 1); }
.wa { opacity: 0; transform: translateY(22px); filter: blur(6px); clip-path: none; }
.wr-s.in .wa { animation: wrIn2 1.1s var(--wr-ease) forwards; }
@keyframes wrIn2 { to { opacity: 1; transform: none; filter: blur(0); } }
.wr-s.in .wa:nth-child(2) { animation-delay: .09s; } .wr-s.in .wa:nth-child(3) { animation-delay: .18s; } .wr-s.in .wa:nth-child(4) { animation-delay: .27s; } .wr-s.in .wa:nth-child(5) { animation-delay: .36s; } .wr-s.in .wa:nth-child(n+6) { animation-delay: .45s; }
.wr-s { transition: opacity .7s var(--wr-ease), visibility 0s .7s; }
.wr-s.on { transition: opacity .7s var(--wr-ease); }
.wr-s .wr-in { transform: scale(1.015); transition: transform 1.2s var(--wr-ease); }
.wr-s.on .wr-in { transform: none; }
.wr-s.in .wr-top5 > div, .wr-s.in .wr-why > div { animation: wrIn2 1s var(--wr-ease) forwards; animation-delay: var(--d); }
.wr-top5 > div, .wr-why > div { filter: blur(6px); }
.wr-s.in .wr-heat i { animation-timing-function: var(--wr-ease); animation-duration: .8s; }
.wr-s.in .wr-clock path { animation: wrArc .9s var(--wr-ease) forwards; animation-delay: calc(.35s + var(--d)); }
.wr-s.in .wr-rings .rg { animation: wrRing 1.8s var(--wr-ease) forwards; animation-delay: var(--d); }
.wr-s.in .wr-wch .ln { animation: wrLine 2.2s var(--wr-ease) .4s forwards; }
@media (prefers-reduced-motion: reduce) { .wa, .wr-top5 > div, .wr-why > div { filter: none !important; opacity: 1 !important; transform: none !important; animation: none !important; } }
/* итоги v10: без размытия, ровная скорость линий, мелкие цифры свободнее, подгонка по высоте */
.wa, .wr-top5 > div, .wr-why > div { filter: none !important; }
@keyframes wrIn2 { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.wr-wch .ln, .wr-clock path, .wr-gauge .gz { stroke-dasharray: 1; stroke-dashoffset: 1; }
.wr-s.in .wr-wch .ln { animation: wrLine 2.6s var(--wr-ease) .4s forwards; }
.wr-s.in .wr-clock path { animation: wrLine 1.1s var(--wr-ease) forwards; animation-delay: calc(.35s + var(--d) * 1.4); }
.wr-s.in .wr-gauge .gz { animation: wrLine 1.4s var(--wr-ease) .4s forwards; }
.wr-s.in .wr-wch circle { animation-duration: .7s; animation-timing-function: var(--wr-ease); }
.wr-s.in .wr-wch .ar { animation: wrFade 1.2s var(--wr-ease) 1.8s forwards; }
.wr-s.in .wr-heat i { animation-duration: .9s; }
.wr-s.in .wr-split3 i { animation-duration: 1.2s; }
.wr-s.in .wr-dots i, .wr-s.in .wr-clock circle { animation-timing-function: var(--wr-ease); animation-duration: .7s; }
.wr-st b, .wr-rleg b, .wr-split3 b, .wc-grid b, .wr-why b, .wr-top5 em, .wr-top5 span, .wr-clock .ct, .wr-badge, .wr-goal em { letter-spacing: -.005em !important; }
.wr-num > span { letter-spacing: -.01em; }
/* t1..t3: экран невысокий, ужимаем по шагам */
.wr-s.t1 .wr-num { font-size: 96px; } .wr-s.t1 .wr-num.sm { font-size: 76px; }
.wr-s.t1 .wr-dish { font-size: 40px; } .wr-s.t1 .wr-type { font-size: 44px; } .wr-s.t1 .wr-cover { font-size: 64px; }
.wr-s.t1 .wr-t { font-size: 18px; margin-top: 18px; }
.wr-s.t1 .wr-st { margin-top: 18px; padding-top: 12px; }
.wr-s.t1 .wr-head { margin-top: 18px; }
.wr-s.t1 .wr-top5 > div { padding: 9px 14px; }
.wr-s.t1 .wr-top5 { gap: 6px; }
.wr-s.t1 .wr-heat { max-width: 290px; gap: 5px; }
.wr-s.t1 .wr-clock { width: min(60vw, 240px); }
.wr-s.t1 .wr-rings svg { width: min(52vw, 200px); }
.wr-s.t1 .wr-gauge { width: min(74vw, 290px); }
.wr-s.t1 .wr-why > div { padding: 10px 0; } .wr-s.t1 .wr-why b { font-size: 24px; }
.wr-s.t1 .wr-in { padding-bottom: calc(var(--safe-b) + 28px); }
.wr-s.t2 .wr-num { font-size: 80px; } .wr-s.t2 .wr-num.sm { font-size: 64px; }
.wr-s.t2 .wr-dish { font-size: 34px; } .wr-s.t2 .wr-type { font-size: 38px; }
.wr-s.t2 .wr-top5 > div:nth-child(n+5) { display: none; }
.wr-s.t2 .wr-note { display: none; }
.wr-s.t2 .wr-heat { max-width: 250px; } .wr-s.t2 .wr-clock { width: min(52vw, 200px); } .wr-s.t2 .wr-rings svg { width: min(44vw, 170px); } .wr-s.t2 .wr-gauge { width: min(64vw, 250px); }
.wr-s.t2 .wr-vis { padding: 6px 0; }
.wr-s.t2 .wr-p { font-size: 15px; }
.wr-s.t3 .wr-top5 > div:nth-child(n+4) { display: none; }
.wr-s.t3 .wr-head .wr-st { display: none; }
.wr-s.t3 .wr-heat { max-width: 210px; } .wr-s.t3 .wr-clock { width: min(44vw, 170px); } .wr-s.t3 .wr-rings svg { width: min(38vw, 140px); } .wr-s.t3 .wr-gauge { width: min(54vw, 210px); }
.wr-s.t3 .wr-why > div:nth-child(n+4) { display: none; }
.wr-s.t3 .wr-goal { display: none; }
.wr-vis { flex: 1 0 auto; min-height: auto; }
.wr-s.t1 .wr-card .wc-type { margin-top: 36px; font-size: 28px; }
.wr-s.t2 .wc-dish, .wr-s.t2 .wc-bot { display: none; }
.wr-s.t2 .wr-card .wc-type { margin-top: 22px; }
.wr-s.t3 .wc-grid > div:nth-child(n+3) { display: none; }
.wr-s.t3 .wr-wch { max-width: 240px; }
.wr-s.t2 .wr-wch { max-width: 290px; }
.wr-s.g7 .wr-in { gap: 14px; }
.wr-heat em { opacity: .95; font-weight: 600; }
.wr-acts .btn:disabled { opacity: .7; }
.wc-bars { margin-top: 18px; height: 54px; display: flex; align-items: flex-end; gap: 2px; }
.wc-bars i { flex: 1; height: var(--h); border-radius: 2px; background: rgba(255,255,255,.3); }
.wc-bars i.on { background: #fff; }
.wc-cap { margin-top: 8px; font-size: 11px; opacity: .75; }
.wr-gcap { margin: 6px 0 0; font-size: 12.5px; opacity: .8; text-align: center; }
.wr-gauge text { font-size: 12.5px; }
.wr-gcap { max-width: 250px; margin: 16px auto 4px; line-height: 1.45; }
.wr-gw .wr-split3 { margin-top: 30px; }
.wr-card .wc-dots { margin-top: 18px; }
.wc-grid > div { padding-right: 12px; min-width: 0; }
.wc-grid span { overflow-wrap: anywhere; }
.wr-dish { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; padding-bottom: .06em; }
.wr-dish.long { font-size: 34px; -webkit-line-clamp: 2; }
.wr-s.t1 .wr-dish.long, .wr-s.t2 .wr-dish.long { font-size: 28px; }
.wr-top5 b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wr-top5 b small { white-space: nowrap; }
.wr-top5 b { display: block; min-width: 0; }
.wr-top5 b small { display: block; overflow: hidden; text-overflow: ellipsis; }
.wr-split3 { flex-direction: column; gap: 0; }
.wr-split3 .sb { display: flex; gap: 4px; width: 100%; }
.wr-split3 .sb i { flex: var(--f); min-width: 6px; display: block; height: 10px; border-radius: 5px; background: rgba(255,255,255,var(--o)); transform: scaleX(0); transform-origin: left; }
.wr-s.in .wr-split3 .sb i { animation: wrGrowX 1.2s var(--wr-ease) forwards; animation-delay: var(--d); }
.wr-split3 .sl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.wr-split3 .sl > div { display: flex; flex-direction: column; min-width: 0; }
.wr-split3 .sl b { display: flex; align-items: center; gap: 6px; font-size: 22px; font-weight: 400; letter-spacing: -.005em; }
.wr-split3 .sl em { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,var(--o)); flex: none; }
.wr-split3 .sl span { font-size: 12px; opacity: .8; line-height: 1.3; margin-top: 2px; overflow-wrap: anywhere; }
.wr-split3 > .sb { flex: none; flex-direction: row; min-width: 0; height: 10px; }
.wr-split3 > .sl { flex: none; min-width: 0; }
.wr-split3 .sb i { height: 10px; }
.wr-num { flex-wrap: wrap; row-gap: 4px; }
.wr-num.xs, .wr-s.t1 .wr-num.xs, .wr-s.t2 .wr-num.xs { font-size: 56px; }
.usd { opacity: .7; font-weight: 400; margin: 0 3px 0 1px; white-space: nowrap; }
.ai-buy .usd { margin: 0 0 0 4px; }
.alert > div { min-width: 0; }
.alert .btn-row.al { flex-wrap: wrap; gap: 8px; }
.ai-buy .usd { font-size: 12px; margin-left: 3px; }
.ai-name > span { line-height: 1.3; overflow-wrap: anywhere; } /* на узких экранах подпись переносится, а не обрезается многоточием */
.ai-name { min-width: 0; }
.ai-buy:has(.usd) { padding: 0 11px; }
.pm { white-space: nowrap; }
.pm .usd { margin: 0; }
.ai-buy svg.xtr { top: .5px; }
.btn svg.xtr { top: 0; }
.btn .pm { margin-left: -2px; }
/* цена в долларах отделена тонкой чертой: 100 ⭐ | $1.99 */
.usd { position: relative; padding-left: 9px; margin-left: 7px !important; }
.usd::before { content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: 1em; transform: translateY(-50%); background: currentColor; opacity: .45; }
.btn .pm { margin-left: 0; }
.ai-buy .usd { padding-left: 8px; margin-left: 7px !important; }
.btn .usd { margin-left: 1px !important; }
/* кнопка «?» у подписей в карточке калорий */
.stats3 > div > span:has(.qm) { display: flex; align-items: center; min-width: 0; }
.stats3 .qm { flex: none; display: grid; place-items: center; width: 16px; height: 16px; margin: 0 0 0 3px; padding: 0; border: 0; background: none; color: inherit; opacity: .55; position: relative; cursor: pointer; }
.stats3 .qm svg { width: 16px; height: 16px; display: block; }
.stats3 .qm::before { content: ""; position: absolute; inset: -12px; }
.stats3 .lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qa-t { margin: 0 0 12px; font-size: 16px; line-height: 1.45; }
/* кнопка внизу окна мягко появляется на новом месте после смены высоты экрана (клавиатура) */
@keyframes footIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.sheet .sh-foot.kbin { animation: footIn .26s cubic-bezier(.32,.72,0,1); }

.pm-until { margin-top: 8px; background: var(--card); border-radius: var(--r-lg); padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.pm-until span { color: var(--g60); }
.pm-until b { color: var(--ink); font-weight: 500; }

.priv { padding-bottom: 6px; }
.pv-b { background: var(--card); border-radius: var(--r-lg); padding: 14px 16px 15px; margin-top: 8px; }
.pv-b:first-child { margin-top: 0; }
.pv-b b { display: block; font-size: 15px; font-weight: 500; color: var(--ink); margin-bottom: 4px; }
.pv-b p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--g60); }

.sup { text-align: center; padding: 6px 4px 4px; }
.sup-ic { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--card); display: grid; place-items: center; color: var(--ink); }
.sup-ic svg { width: 28px; height: 28px; }
.sup p { margin: 0 0 8px; font-size: 15px; line-height: 1.45; color: var(--g60); }
.sup p:first-of-type { color: var(--ink); }

/* штрихкод (2.1.105) */
.bc-cam { position: relative; border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 1 / 1; background: #111; }
.bc-cam video { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .4s var(--ease); }
.bc-cam.live video { opacity: 1; }
.bc-frame { position: absolute; left: 8%; right: 8%; top: 25%; height: 50%; border-radius: 22px; box-shadow: 0 0 0 999px rgba(0,0,0,.38); }
.bc-frame:before { content: ""; position: absolute; inset: 0; border-radius: 22px; border: 3px solid #fff; -webkit-mask: linear-gradient(#000,#000) top left/34px 34px no-repeat, linear-gradient(#000,#000) top right/34px 34px no-repeat, linear-gradient(#000,#000) bottom left/34px 34px no-repeat, linear-gradient(#000,#000) bottom right/34px 34px no-repeat; mask: linear-gradient(#000,#000) top left/34px 34px no-repeat, linear-gradient(#000,#000) top right/34px 34px no-repeat, linear-gradient(#000,#000) bottom left/34px 34px no-repeat, linear-gradient(#000,#000) bottom right/34px 34px no-repeat; }
.bc-line { position: absolute; left: 12%; right: 12%; top: 50%; height: 2px; background: rgba(255,255,255,.9); box-shadow: 0 0 12px rgba(255,255,255,.8); border-radius: 2px; animation: bcLine 2.4s ease-in-out infinite; }
@keyframes bcLine { 0%, 100% { transform: translateY(-48px); } 50% { transform: translateY(48px); } }
.bc-tip { position: absolute; left: 0; right: 0; bottom: 16px; text-align: center; pointer-events: none; }
.bc-tip span { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 99px; background: rgba(20,20,22,.55); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff; font-size: 14px; font-weight: 500; }
.bc-cam.off { aspect-ratio: auto; background: var(--card); display: grid; place-items: center; padding: 34px 18px; }
.bc-off { text-align: center; display: grid; justify-items: center; gap: 4px; color: var(--g60); font-size: 13.5px; }
.bc-off svg { width: 28px; height: 28px; margin-bottom: 6px; }
.bc-off b { color: var(--ink); font-size: 16px; font-weight: 600; }
.bc-man > div { padding-top: 12px; }
.bc-man input { font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.bc-info { display: flex; gap: 14px; background: var(--card); border-radius: var(--r-lg); padding: 16px; margin-top: 12px; font-size: 13.5px; line-height: 1.45; color: var(--g60); }
.bc-info b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; font-weight: 600; }
.bc-info .at-ic { flex: none; }
.portion .pn .bc-src { display: flex; align-items: center; gap: 6px; margin: 2px 0 1px; }
.bc-src svg { width: 15px; height: 15px; opacity: .75; flex: none; }
.portion .pn .bc-src + span { display: block; }
.presets.bc-pre { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.bc-nf { background: var(--card); border-radius: var(--r-lg); padding: 22px 18px; text-align: center; }
.bc-nf .at-ic { margin: 0 auto 12px; width: 52px; height: 52px; }
.bc-nf .at-ic svg { width: 24px; height: 24px; }
.bc-nf b { display: block; font-size: 18px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.bc-nf .bc-name { display: block; font-size: 15px; color: var(--ink); margin: -2px 0 6px; }
.bc-nf p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--g60); }
.bc-code { display: inline-block; margin-top: 10px; font-variant-numeric: tabular-nums; letter-spacing: .06em; font-size: 13px; color: var(--g60); background: var(--card-2); border-radius: 8px; padding: 4px 10px; }
.bc-note { text-align: center; font-size: 12.5px; color: var(--g60); margin: 10px 0 0; }
@media (prefers-reduced-motion: reduce) { .bc-line { animation: none; } }
.bc-cam.mini { aspect-ratio: 2 / 1; transition: aspect-ratio .35s var(--ease-out); }
.bc-cam.mini .bc-frame { top: 18%; height: 64%; }
.bc-cam.mini .bc-line { animation: none; }
.bc-cam.mini .bc-tip { display: none; }
.bc-cam.off.mini { aspect-ratio: auto; }

/* Nomi AI (2.1.107): наш логотип вместо значка Gemini; блик и звёздочки медленные и мягкие */
.nl { position: relative; display: block; overflow: hidden; flex: none; isolation: isolate; border-radius: 30%; background: url(logo.png?v=1) center / cover; }
.nl:after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 28%, rgba(255,255,255,.12) 40%, rgba(255,255,255,.55) 50%, rgba(255,255,255,.12) 60%, transparent 72%) 0 0 / 300% 100% no-repeat; animation: nlShine 8s ease-in-out infinite; mix-blend-mode: screen; }
@keyframes nlShine { 0%, 40% { background-position: 150% 0; } 75%, 100% { background-position: -50% 0; } }
.ai-logo.nlw { background: none; }
.ai-logo.nlw .nl { width: 46px; height: 46px; border-radius: 15px; }
.pn-ic.nlw { background: none; }
.pn-ic.nlw .nl { width: 36px; height: 36px; border-radius: 12px; }
.nl-hero { position: relative; width: 84px; height: 84px; margin: 14px 0 4px; }
.nl-hero .nl { width: 84px; height: 84px; border-radius: 26px; animation: nlHue 8s ease-in-out infinite alternate; }
.nl-hero .nl:after { background: linear-gradient(115deg, transparent 28%, rgba(255,255,255,.12) 40%, rgba(255,255,255,.6) 50%, rgba(255,255,255,.12) 60%, transparent 72%) 0 0 / 300% 100% no-repeat; animation-duration: 7s; }
@keyframes nlHue { from { filter: hue-rotate(-10deg) saturate(1.02); } to { filter: hue-rotate(16deg) saturate(1.1); } }
.nl-sp { position: absolute; width: 14px; height: 14px; color: #8b7bff; opacity: 0; animation: nlTw 5.5s ease-in-out infinite; pointer-events: none; }
.nl-sp svg { width: 100%; height: 100%; display: block; }
.nl-sp.a { top: 2px; right: -18px; animation-delay: .3s; }
.nl-sp.b { bottom: 10px; left: -20px; width: 10px; height: 10px; animation-delay: 2.2s; color: #5aa0ff; }
.nl-sp.c { top: 18px; left: -28px; width: 8px; height: 8px; animation-delay: 3.9s; color: #d27bff; }
@keyframes nlTw { 0% { opacity: 0; transform: scale(.4) rotate(0); } 30% { opacity: .9; transform: scale(1) rotate(30deg); } 60% { opacity: 0; transform: scale(.5) rotate(60deg); } 100% { opacity: 0; transform: scale(.4) rotate(60deg); } }
.pw-by { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 26px; font-size: 12.5px; line-height: 16px; color: var(--g50, var(--g60)); }
.pw-by img { width: 12px; height: 12px; display: block; flex: none; position: relative; top: 0; } /* выровнено по iPhone (SF): центр значка = середина заглавных букв */
@media (prefers-reduced-motion: reduce) { .nl:after, .nl-hero .nl, .nl-sp { animation: none; } .nl-sp { opacity: 0; } }
