/* FORMA — дизайн-система */
:root {
  --bg: #0A0B0D; --s1: #121418; --s2: #1A1D22; --s3: #252930; --line: rgba(255, 255, 255, .07); --line2: rgba(255, 255, 255, .12);
  --text: #F4F6F8; --muted: #8A93A2; --dim: #5C6573;
  --accent: #78DCFF; --accent2: #4F7CFF; --grad: linear-gradient(135deg, #78DCFF 0%, #4F7CFF 100%); --ink: #04131C;
  --ok: #4ADE80; --warn: #FFB547; --bad: #FF5D6C; --fire: linear-gradient(135deg, #FFB547, #FF5D6C);
  --r: 22px; --r2: 16px; --r3: 12px;
  --display: 'Unbounded', 'Manrope', system-ui, sans-serif;
  --body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom); --safe-t: max(env(safe-area-inset-top), var(--tg-top, 0px));
}
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, .msg { -webkit-user-select: text; user-select: text; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 500 15px/1.45 var(--body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overscroll-behavior-y: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
svg.i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 18px; height: 18px; } svg.i.xs { width: 15px; height: 15px; } svg.i.lg { width: 28px; height: 28px; }

/* ---------- заставка ---------- */
#splash { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 14px;
  background: var(--bg); transition: opacity .4s ease, visibility .4s; }
#splash.out { opacity: 0; visibility: hidden; }
.logo-mark { position: relative; width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center;
  font: 800 40px/1 var(--display); background: var(--s1); color: transparent; box-shadow: 0 0 0 1px var(--line), 0 20px 60px rgba(79, 124, 255, .25); }
.logo-mark::before { content: 'F'; position: absolute; inset: 0; display: grid; place-items: center; background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-mark i { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); right: 17px; bottom: 21px; }
#splash .logo-mark { animation: pop .7s cubic-bezier(.2, .9, .3, 1.3) both; }
.logo-word { font: 700 15px/1 var(--display); letter-spacing: .32em; color: var(--muted); animation: fadeUp .6s .15s both; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeUp { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- каркас ---------- */
#app { max-width: 540px; margin: 0 auto; min-height: 100vh; }
#view { padding: calc(10px + var(--safe-t)) 16px calc(110px + var(--safe-b)); animation: fadeUp .28s ease both; }
#view.flush { padding-top: 0; }
#view.no-tabs { padding-bottom: calc(110px + var(--safe-b)); }
.topbar { display: flex; align-items: center; gap: 12px; min-height: 52px; margin: 0 0 14px; }
.topbar h1 { flex: 1; margin: 0; font: 700 24px/1.15 var(--display); letter-spacing: -.02em; }
.topbar .sub { display: block; font: 600 13px var(--body); color: var(--muted); letter-spacing: 0; margin-bottom: 2px; }
.icon-btn { width: 42px; height: 42px; border-radius: 14px; border: 0; background: var(--s1); color: var(--text); display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px var(--line); transition: transform .15s; flex: none; position: relative; }
.icon-btn:active { transform: scale(.92); }
.avatar { width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden;
  font: 700 16px var(--display); color: var(--ink); background: var(--grad); border: 0; padding: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 64px; height: 64px; font-size: 24px; }
.avatar.c1 { background: linear-gradient(135deg, #FFB547, #FF7A59); } .avatar.c2 { background: linear-gradient(135deg, #4ADE80, #22B8A6); }
.avatar.c3 { background: linear-gradient(135deg, #C084FC, #6366F1); } .avatar.c4 { background: linear-gradient(135deg, #F472B6, #FB7185); }

/* ---------- картки ---------- */
.card { background: var(--s1); border-radius: var(--r); padding: 16px; margin-bottom: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.card.tight { padding: 12px 14px; }
.card.tap { cursor: pointer; transition: transform .15s; } .card.tap:active { transform: scale(.985); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-h h3, h3.t { margin: 0; font: 700 16px/1.25 var(--body); }
.label { font: 700 11px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; } .row.between { justify-content: space-between; } .row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sp { height: 12px; } .sp2 { height: 20px; }
.big-num { font: 700 30px/1 var(--display); letter-spacing: -.02em; }
.big-num small { font: 600 14px var(--body); color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.stat { background: var(--s2); border-radius: var(--r2); padding: 12px; }
.stat b { display: block; font: 700 19px/1.1 var(--display); letter-spacing: -.02em; margin-bottom: 3px; }
.stat span { font-size: 12px; color: var(--muted); }
.hero-card { position: relative; overflow: hidden; border-radius: var(--r); padding: 18px; margin-bottom: 12px;
  background: radial-gradient(130% 120% at 100% 0%, rgba(79, 124, 255, .35), transparent 55%), radial-gradient(90% 120% at 0% 100%, rgba(120, 220, 255, .18), transparent 60%), var(--s1);
  box-shadow: inset 0 0 0 1px var(--line2); }
.hero-card h2 { margin: 6px 0 4px; font: 700 21px/1.2 var(--display); letter-spacing: -.02em; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 99px; font: 700 12px/1 var(--body);
  background: var(--s2); color: var(--muted); white-space: nowrap; }
.chip.accent { background: rgba(120, 220, 255, .14); color: var(--accent); } .chip.ok { background: rgba(74, 222, 128, .14); color: var(--ok); }
.chip.warn { background: rgba(255, 181, 71, .15); color: var(--warn); } .chip.bad { background: rgba(255, 93, 108, .15); color: var(--bad); }
.chip.fire { background: var(--fire); color: #2a0a00; }
.badge-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bad); color: #fff; font: 800 11px/20px var(--body); text-align: center; }

/* ---------- кнопки ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 0; border-radius: var(--r2); padding: 15px 18px;
  font: 800 15px/1 var(--body); background: var(--grad); color: var(--ink); transition: transform .15s, opacity .2s; box-shadow: 0 10px 30px rgba(79, 124, 255, .25); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; }
.btn.ghost { background: var(--s2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn.glass { background: rgba(255, 255, 255, .1); color: #fff; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.btn.white { background: #fff; color: #0A0B0D; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.btn.danger { background: rgba(255, 93, 108, .12); color: var(--bad); box-shadow: none; }
.btn.sm { width: auto; padding: 10px 14px; font-size: 13px; border-radius: 12px; box-shadow: none; }
.btn + .btn { margin-top: 10px; }
.link-btn { background: none; border: 0; color: var(--accent); font-weight: 700; padding: 6px 0; }

/* ---------- поля ---------- */
input, textarea, select { width: 100%; background: var(--s2); border: 1px solid transparent; border-radius: var(--r3); padding: 13px 14px; outline: none;
  transition: border-color .2s; -webkit-appearance: none; appearance: none; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--dim); }
label.f { display: block; font: 700 12px var(--body); color: var(--muted); margin: 12px 0 6px; }
.search { position: relative; } .search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--dim); }
.search input { padding-left: 44px; }

/* ---------- таббар ---------- */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-b)); z-index: 20; width: calc(100% - 24px); max-width: 516px;
  display: flex; padding: 6px; border-radius: 26px; background: rgba(22, 24, 29, .82); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: inset 0 0 0 1px var(--line2), 0 20px 50px rgba(0, 0, 0, .5); }
.tabbar button { flex: 1; position: relative; border: 0; background: none; color: var(--dim); padding: 9px 2px 7px; border-radius: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 3px; font: 700 10.5px/1 var(--body); transition: color .2s, background .2s; }
.tabbar button.on { color: var(--text); background: rgba(255, 255, 255, .07); }
.tabbar button.on svg { color: var(--accent); }
.tabbar .badge-n { position: absolute; top: 3px; left: calc(50% + 5px); height: 17px; min-width: 17px; line-height: 17px; font-size: 10px; }

/* ---------- вхідна сторінка ---------- */
.landing { margin: 0 -16px; }
.lp-hero { position: relative; height: min(78vh, 640px); min-height: 460px; overflow: hidden; }
.lp-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; transform: scale(1.04); transform-origin: 50% 0; animation: heroIn 1.2s ease both; }
@keyframes heroIn { from { transform: scale(1.12); opacity: .4; } to { transform: scale(1.04); opacity: 1; } }
.lp-hero::after { content: ''; position: absolute; inset: -2px; background: linear-gradient(180deg, rgba(10, 11, 13, .5) 0%, rgba(10, 11, 13, 0) 14%, rgba(10, 11, 13, 0) 56%, rgba(10, 11, 13, .75) 74%, rgba(10, 11, 13, .96) 88%, var(--bg) 100%); }
.lp-top { position: absolute; z-index: 2; top: calc(14px + var(--safe-t)); left: 16px; right: 16px; display: flex; align-items: center; justify-content: space-between; }
.lp-brand { display: flex; align-items: center; gap: 8px; font: 700 13px/1 var(--display); letter-spacing: .28em; }
.lp-brand .logo-mark { width: 30px; height: 30px; border-radius: 9px; font-size: 15px; box-shadow: none; background: rgba(255, 255, 255, .1); backdrop-filter: blur(10px); }
.lp-brand .logo-mark i { width: 4px; height: 4px; right: 6px; bottom: 8px; }
.lp-info { position: absolute; z-index: 2; left: 0; right: 0; bottom: 6px; text-align: center; padding: 0 20px; }
.lp-name { display: inline-flex; align-items: center; gap: 8px; margin: 0; font: 800 clamp(22px, 7.2vw, 34px)/1.05 var(--display); letter-spacing: -.035em;
  white-space: nowrap; text-shadow: 0 2px 30px rgba(0, 0, 0, .5); }
.lp-name svg { width: .8em; height: .8em; }
.lp-handle { color: rgba(255, 255, 255, .6); font-weight: 600; margin: 8px 0 14px; }
.socials { display: flex; justify-content: center; gap: 12px; margin-bottom: 14px; }
.soc { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 0; text-decoration: none; transition: transform .15s; }
.soc:active { transform: scale(.9); }
.soc.ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.soc.tg { background: #2AABEE; } .soc.tt { background: #000; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); } .soc.yt { background: #FF0000; }
.soc svg.i { width: 22px; height: 22px; }
.lp-pill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; font-size: 13px !important; text-align: left; border-radius: 99px; background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); font-weight: 700; font-size: 14px; }
.lp-body { padding: 18px 16px 30px; }
.lp-bio { text-align: center; color: var(--muted); margin: 0 6px 18px; font-size: 15px; }
.lp-cta { display: grid; gap: 10px; }
.lp-cta .btn { padding: 18px; font-size: 16px; border-radius: 18px; }
.lp-cta .btn .sub { display: block; font-weight: 600; font-size: 12px; opacity: .7; margin-top: 4px; }
.lp-cta .btn.col { flex-direction: column; gap: 0; }
.lp-feats { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 16px; margin: 22px -16px 0; padding: 0 16px 4px; scrollbar-width: none; }
.lp-feats::-webkit-scrollbar { display: none; }
.feat { flex: 0 0 72%; scroll-snap-align: start; background: var(--s1); border-radius: var(--r); padding: 18px; box-shadow: inset 0 0 0 1px var(--line); }
.feat .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(120, 220, 255, .12); color: var(--accent); margin-bottom: 14px; }
.feat b { display: block; font: 700 16px/1.25 var(--display); letter-spacing: -.01em; margin-bottom: 6px; }
.feat span { color: var(--muted); font-size: 14px; }
.lp-trainers { display: grid; gap: 10px; margin-top: 22px; }
.trainer-card { display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--s1); border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.trainer-card img { width: 58px; height: 58px; border-radius: 16px; object-fit: cover; }
.install { display: flex; gap: 12px; align-items: center; padding: 14px; margin-top: 18px; border-radius: var(--r); background: var(--s1); box-shadow: inset 0 0 0 1px var(--line2); }
.install .app-ic { width: 46px; height: 46px; border-radius: 12px; flex: none; }
.foot { text-align: center; color: var(--dim); font-size: 12px; margin-top: 26px; }

/* вхідна: цифри, золота пропозиція, кроки */
.lp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 18px; }
.lp-stats div { text-align: center; padding: 14px 6px; border-radius: 18px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); }
.lp-stats b { display: block; font: 800 22px/1 var(--display); letter-spacing: -.03em; }
.lp-stats span { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.offer { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; border: 0; text-align: left; padding: 12px; border-radius: 22px; overflow: hidden;
  background: linear-gradient(110deg, #2a2108 0%, #8a6a12 45%, #E9B730 75%, #FFD86B 100%); color: #fff; box-shadow: 0 14px 40px rgba(233, 183, 48, .22), inset 0 0 0 1px rgba(255, 216, 107, .35);
  transition: transform .15s; }
.offer:active { transform: scale(.98); }
.offer img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; object-position: 50% 30%; flex: none; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
.offer b { display: block; font: 800 16px/1.2 var(--display); letter-spacing: -.01em; text-shadow: 0 1px 10px rgba(0, 0, 0, .35); }
.offer span { display: block; font-size: 12.5px; font-weight: 700; opacity: .85; margin-top: 4px; }
.offer .go { width: 38px; height: 38px; border-radius: 50%; background: rgba(0, 0, 0, .35); display: grid; place-items: center; flex: none; margin-left: auto; }
.offer.dark { background: var(--s1); box-shadow: inset 0 0 0 1px var(--line2); }
.offer.dark .ic { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; background: rgba(120, 220, 255, .12); color: var(--accent); flex: none; }
.offer.dark .go { background: var(--s2); }
.offer + .offer { margin-top: 10px; }
.lp-h { font: 700 20px/1.2 var(--display); letter-spacing: -.02em; margin: 28px 0 12px; }
.steps { display: grid; gap: 8px; }
.step { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 18px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); }
.step .n { width: 34px; height: 34px; border-radius: 11px; flex: none; display: grid; place-items: center; font: 800 14px var(--display); background: var(--grad); color: var(--ink); }
.step b { display: block; margin-bottom: 2px; }
.step span { font-size: 13.5px; color: var(--muted); }
.sticky-cta { position: fixed; left: 50%; bottom: calc(12px + var(--safe-b)); z-index: 25; width: calc(100% - 24px); max-width: 516px; transform: translate(-50%, 140%);
  transition: transform .35s cubic-bezier(.2, .9, .3, 1); }
.sticky-cta.on { transform: translate(-50%, 0); }
.sticky-cta .btn { padding: 17px; border-radius: 18px; background: linear-gradient(110deg, #E9B730, #FFD86B); color: #1d1500; box-shadow: 0 14px 40px rgba(0, 0, 0, .5); }

/* іконки-чіпи в цифрах */
.si { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 10px; flex: none; }
.si.b { background: rgba(120, 220, 255, .13); color: var(--accent); } .si.o { background: rgba(255, 181, 71, .14); color: var(--warn); }
.si.g { background: rgba(74, 222, 128, .13); color: var(--ok); } .si.v { background: rgba(192, 132, 252, .14); color: #C084FC; }

/* картка тренування з фото тренера */
.hero-card.photo { background: var(--s1); min-height: 210px; display: flex; flex-direction: column; justify-content: flex-end; }
.hero-card.photo .bgimg { position: absolute; z-index: 0; top: 0; right: 0; width: 46%; height: 100%; object-fit: cover; object-position: 18% 40%; }
.hero-card.photo::before { content: ''; position: absolute; z-index: 1; inset: 0;
  background: linear-gradient(90deg, var(--s1) 54%, rgba(18, 20, 24, .55) 68%, rgba(18, 20, 24, 0) 100%), linear-gradient(0deg, rgba(18, 20, 24, .9), transparent 45%); }
.hero-card.photo h2, .hero-card.photo h2 + .muted { max-width: 60%; }
.hero-card.photo > *:not(.bgimg) { position: relative; z-index: 2; }

/* таббар: рухомий індикатор */
.tabbar .ind { position: absolute; top: 6px; bottom: 6px; left: 6px; border-radius: 20px; background: rgba(255, 255, 255, .08); transition: transform .35s cubic-bezier(.2, .9, .3, 1), width .35s; z-index: 0; }
.tabbar button { z-index: 1; } .tabbar button.on { background: none; }
.tabbar button.on span:not(.badge-n) { color: var(--text); }

/* переходи: вперед — виїзд справа */
#view.push { animation: slideIn .32s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes slideIn { from { transform: translateX(28px); opacity: 0; } to { transform: none; opacity: 1; } }

/* інструменти в «Їжі», оцінки, галочки */
.tool { text-align: left; border: 0; padding: 14px; border-radius: var(--r); background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); transition: transform .15s; }
.tool:active { transform: scale(.97); }
.tool .si { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 10px; }
.tool b { display: block; font-size: 14.5px; } .tool span { font-size: 12px; color: var(--muted); }
.scores { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scores button { border: 0; height: 48px; border-radius: 14px; background: var(--s2); font-size: 22px; filter: grayscale(1); opacity: .55; transition: all .15s; }
.scores button.on { filter: none; opacity: 1; background: rgba(120, 220, 255, .14); box-shadow: inset 0 0 0 2px var(--accent); transform: scale(1.04); }
.ck-sm { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--s3); color: transparent; flex: none; }
.ck-sm.on { background: var(--ok); color: #05301a; }

/* ---------- анкета ---------- */
.ob { padding-top: 6px; }
.ob-top { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.ob-h { font: 800 27px/1.15 var(--display); letter-spacing: -.03em; margin: 0 0 8px; }
.ob-opt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 0; padding: 16px; margin-bottom: 10px; border-radius: 20px;
  background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); transition: transform .15s, box-shadow .2s, background .2s; }
.ob-opt:active { transform: scale(.98); }
.ob-opt .ic { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--s2); color: var(--muted); flex: none; transition: all .2s; }
.ob-opt b { display: block; font-size: 16.5px; } .ob-opt span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.ob-opt .rad { width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--s3); flex: none; transition: all .2s; }
.ob-opt.on { background: rgba(120, 220, 255, .08); box-shadow: inset 0 0 0 2px var(--accent); }
.ob-opt.on .ic { background: var(--grad); color: var(--ink); }
.ob-opt.on .rad { box-shadow: inset 0 0 0 7px var(--accent); }
.ob-num { text-align: center; padding: 16px; margin-bottom: 10px; border-radius: 20px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); }
.ob-num input { width: 120px; text-align: center; font: 800 34px var(--display); letter-spacing: -.03em; background: none; padding: 4px; }
.ob-num .stepper { height: 52px; border-radius: 16px; }
.ob-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.ob-days button { border: 0; padding: 18px 4px; border-radius: 18px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); transition: all .2s; }
.ob-days b { display: block; font: 800 26px var(--display); color: var(--text); } .ob-days span { font-size: 12px; font-weight: 700; }
.ob-days button.on { background: var(--grad); box-shadow: 0 10px 30px rgba(79, 124, 255, .35); color: var(--ink); } .ob-days button.on b { color: var(--ink); }
.ob-load { min-height: 80vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 18px; }
.ob-load .logo-mark { animation: breathe 1.4s ease-in-out infinite; }
.ob-load h2 { font: 700 18px var(--display); margin: 0; }
@keyframes breathe { 50% { transform: scale(1.08); box-shadow: 0 0 0 1px var(--line), 0 20px 80px rgba(79, 124, 255, .55); } }
.ob-reveal { text-align: center; padding-top: 4vh; }
.ob-kcal { margin: 18px 0 20px; }
.ob-kcal b { display: block; font: 800 72px/1 var(--display); letter-spacing: -.05em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ob-kcal span { color: var(--muted); font-weight: 700; }
.ob-reveal .stat { text-align: left; }

/* ---------- кільця активності ---------- */
.rings { width: 132px; height: 132px; flex: none; }
.rings .arc { animation: ringFill 1.2s cubic-bezier(.2, .8, .2, 1) .15s forwards; }
@keyframes ringFill { to { stroke-dashoffset: var(--to); } }
.rl { display: grid; gap: 10px; }
.rl div { display: grid; grid-template-columns: 10px 1fr; column-gap: 8px; align-items: center; }
.rl i { width: 10px; height: 10px; border-radius: 50%; grid-row: span 2; }
.rl i.w { background: var(--grad); } .rl i.k { background: var(--fire); } .rl i.p { background: linear-gradient(135deg, #4ADE80, #22B8A6); }
.rl span { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.rl b { font: 700 18px/1.1 var(--display); letter-spacing: -.02em; } .rl b small { font: 600 12px var(--body); color: var(--dim); }

/* ---------- медалі ---------- */
.medal { width: 72px; height: 72px; border-radius: 50%; padding: 4px; margin: 0 auto 10px; flex: none; }
.medal .m-ring { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; background: #15171b; color: #fff;
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, .15), inset 0 -4px 10px rgba(0, 0, 0, .5); }
.medal.sm { width: 46px; height: 46px; padding: 3px; margin: 0; }
.medal.bronze { background: linear-gradient(135deg, #f3c19a, #a8643a 55%, #e8a774); } .medal.bronze .m-ring { color: #f3c19a; }
.medal.silver { background: linear-gradient(135deg, #ffffff, #8c96a5 55%, #e3e8ef); } .medal.silver .m-ring { color: #e3e8ef; }
.medal.gold { background: linear-gradient(135deg, #fff1a8, #d39b14 55%, #ffd86b); box-shadow: 0 6px 24px rgba(233, 183, 48, .35); } .medal.gold .m-ring { color: #ffd86b; }
.medal.legend { background: conic-gradient(from 0deg, #78DCFF, #C084FC, #F472B6, #FFB547, #78DCFF); box-shadow: 0 6px 30px rgba(192, 132, 252, .45); animation: spin 6s linear infinite; }
.medal.legend .m-ring { color: #fff; animation: spin 6s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.medal.locked { background: var(--s3); } .medal.locked .m-ring { color: var(--dim); background: var(--s2); box-shadow: none; }
.medals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mcard { text-align: center; padding: 16px 12px; border-radius: var(--r); background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); }
.mcard b { display: block; font: 700 14px/1.2 var(--display); margin-bottom: 4px; } .mcard > span { display: block; font-size: 12px; color: var(--muted); }
.mcard.off b { color: var(--muted); }
.pr-card { background: linear-gradient(135deg, rgba(233, 183, 48, .14), var(--s1) 60%); box-shadow: inset 0 0 0 1px rgba(255, 216, 107, .3); text-align: left; }
.up-hint { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ok); background: rgba(74, 222, 128, .09); border-radius: 12px; padding: 9px 11px; margin-bottom: 10px; }
.up-hint b { color: var(--text); }

/* ---------- тиждень / кільця ---------- */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.week .d { font: 700 11px var(--body); color: var(--dim); }
.week .c { width: 34px; height: 34px; margin: 6px auto 0; border-radius: 50%; display: grid; place-items: center; background: var(--s2); color: var(--dim); font: 700 12px var(--body); }
.week .c.done { background: var(--grad); color: var(--ink); box-shadow: 0 6px 18px rgba(79, 124, 255, .35); }
.week .c.today { box-shadow: inset 0 0 0 2px var(--accent); color: var(--text); }
.ring { position: relative; width: 120px; height: 120px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .bg { stroke: var(--s3); } .ring .fg { stroke: url(#rg); transition: stroke-dashoffset .8s cubic-bezier(.2, .8, .2, 1); }
.ring .fg.over { stroke: var(--warn); }
.ring .mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .mid b { font: 700 24px/1 var(--display); letter-spacing: -.03em; } .ring .mid span { font-size: 11px; color: var(--muted); margin-top: 4px; }
.ring.sm { width: 64px; height: 64px; } .ring.sm .mid b { font-size: 14px; }
.bars { flex: 1; display: grid; gap: 12px; }
.mbar .top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-weight: 700; }
.mbar .top b { color: var(--text); }
.bar { height: 7px; border-radius: 4px; background: var(--s3); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--grad); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.bar i.p { background: linear-gradient(90deg, #4ADE80, #22B8A6); } .bar i.f { background: linear-gradient(90deg, #FFB547, #FF7A59); } .bar i.c { background: linear-gradient(90deg, #C084FC, #6366F1); }
.bar i.over { background: var(--warn); }

/* ---------- списки ---------- */
.li { display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: var(--s1); border-radius: var(--r2); margin-bottom: 8px; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--line); transition: transform .15s; }
.li:active { transform: scale(.985); }
.li .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .s { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .num { width: 40px; height: 40px; border-radius: 13px; background: var(--s2); display: grid; place-items: center; font: 700 15px var(--display); color: var(--accent); flex: none; }
.chev { color: var(--dim); }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { border: 0; padding: 9px 14px; border-radius: 99px; background: var(--s1); color: var(--muted); font-weight: 700; font-size: 13px; white-space: nowrap;
  box-shadow: inset 0 0 0 1px var(--line); display: inline-flex; gap: 6px; align-items: center; }
.chips button.on { background: var(--text); color: var(--bg); }
.seg { display: flex; padding: 4px; gap: 4px; border-radius: 15px; background: var(--s1); margin-bottom: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.seg button { flex: 1; border: 0; background: none; color: var(--muted); font-weight: 700; font-size: 13px; padding: 9px 4px; border-radius: 11px; white-space: nowrap; }
.seg button.on { background: var(--s3); color: var(--text); }

/* ---------- тренування ---------- */
.wk-top { position: sticky; top: 0; z-index: 10; margin: 0 -16px 12px; padding: calc(10px + var(--safe-t)) 16px 12px; background: rgba(10, 11, 13, .88);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.wk-top h1 { font: 700 18px/1.2 var(--display); margin: 0; letter-spacing: -.01em; }
.progress { height: 5px; border-radius: 3px; background: var(--s3); overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; background: var(--grad); border-radius: 3px; transition: width .4s; }
.ex { background: var(--s1); border-radius: var(--r); padding: 16px; margin-bottom: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.ex.done { box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .35); }
.ex-h { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.ex-h .n { width: 30px; height: 30px; border-radius: 10px; background: var(--s2); color: var(--accent); display: grid; place-items: center; font: 700 13px var(--display); flex: none; }
.ex.done .ex-h .n { background: var(--ok); color: #05301a; }
.ex-h b { display: block; font-size: 16px; line-height: 1.3; }
.ex-h .m { font-size: 13px; color: var(--muted); margin-top: 3px; }
.note { display: flex; gap: 8px; font-size: 13px; color: var(--warn); background: rgba(255, 181, 71, .08); border-radius: 12px; padding: 9px 11px; margin-bottom: 10px; }
.sets-h, .set { display: grid; grid-template-columns: 30px 1fr 1fr 48px; gap: 8px; align-items: center; }
.sets-h { font: 700 11px var(--body); color: var(--dim); text-transform: uppercase; letter-spacing: .06em; text-align: center; margin-bottom: 2px; }
.set { margin-top: 8px; }
.set .k { text-align: center; color: var(--dim); font: 700 13px var(--display); }
.set input { text-align: center; padding: 11px 4px; font-weight: 700; font-size: 16px; border-radius: 12px; }
.set .ck { height: 44px; border-radius: 12px; border: 0; background: var(--s2); color: var(--dim); display: grid; place-items: center; transition: background .2s, transform .15s; }
.set .ck:active { transform: scale(.9); }
.set.done .ck { background: var(--ok); color: #05301a; } .set.done .k { color: var(--ok); }
.set.done input { background: rgba(74, 222, 128, .08); }
.set.warm .k { color: var(--warn); }
.prev { font-size: 12px; color: var(--muted); margin-top: 8px; }
.bottom-cta { position: fixed; left: 50%; transform: translateX(-50%); width: calc(100% - 32px); max-width: 508px; bottom: calc(14px + var(--safe-b)); z-index: 15; }
.rest { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + var(--safe-b)); z-index: 16; width: calc(100% - 32px); max-width: 508px;
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 20px; background: rgba(28, 31, 37, .92);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: inset 0 0 0 1px var(--line2), 0 16px 40px rgba(0, 0, 0, .5); animation: fadeUp .25s both; }
.rest b { font: 700 24px/1 var(--display); letter-spacing: -.02em; min-width: 74px; }
.rest .btn.sm { padding: 10px 12px; }

/* ---------- святкування ---------- */
.celebrate { text-align: center; padding-top: 10vh; }
.celebrate .ok-ic { width: 96px; height: 96px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: var(--ink);
  animation: pop .6s cubic-bezier(.2, .9, .3, 1.4) both; box-shadow: 0 20px 60px rgba(79, 124, 255, .45); }
.celebrate .ok-ic svg { width: 48px; height: 48px; stroke-width: 2.6; }
.celebrate h1 { font: 800 28px/1.1 var(--display); letter-spacing: -.03em; margin: 0 0 8px; }
.confetti { position: fixed; top: -12px; width: 8px; height: 14px; border-radius: 2px; z-index: 50; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------- харчування ---------- */
.daynav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.daynav b { font: 700 16px var(--display); }
.meal { background: var(--s1); border-radius: var(--r); padding: 14px 16px; margin-bottom: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.meal-h { display: flex; align-items: center; justify-content: space-between; }
.meal-h b { font-size: 16px; }
.add-pill { width: 34px; height: 34px; border-radius: 11px; border: 0; background: rgba(120, 220, 255, .12); color: var(--accent); display: grid; place-items: center; }
.fi { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.fi:first-of-type { margin-top: 8px; }
.fi .x { background: none; border: 0; color: var(--dim); padding: 4px; display: grid; }
.pick { display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: var(--s1); border-radius: var(--r2); margin-bottom: 8px; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.pick .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.gram-big { display: flex; align-items: center; gap: 10px; }
.gram-big input { font: 700 30px var(--display); text-align: center; padding: 14px; }
.stepper { width: 52px; height: 58px; border-radius: 14px; border: 0; background: var(--s2); color: var(--text); font-size: 22px; flex: none; }

/* ---------- графік ---------- */
.chart { width: 100%; height: 150px; display: block; overflow: visible; }
.chart .ln { fill: none; stroke: url(#cg); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart .ar { fill: url(#ca); }
.chart text { fill: var(--dim); font: 600 10px var(--body); }
.chart .dot { fill: var(--bg); stroke: var(--accent); stroke-width: 3; }

/* ---------- фото ---------- */
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photos .ph { position: relative; aspect-ratio: 3/4; border-radius: 14px; overflow: hidden; background: var(--s2); cursor: pointer; }
.photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos .d { position: absolute; left: 6px; bottom: 6px; font: 700 11px var(--body); background: rgba(0, 0, 0, .55); padding: 2px 7px; border-radius: 7px; }
.compare { position: relative; aspect-ratio: 3/4; border-radius: var(--r); overflow: hidden; background: var(--s2); user-select: none; touch-action: pan-y; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare .after { clip-path: inset(0 0 0 50%); }
.compare .handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 12px rgba(0, 0, 0, .4); }
.compare .handle::after { content: '‹ ›'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%;
  background: #fff; color: #0A0B0D; display: grid; place-items: center; font: 800 14px var(--body); }
.compare .tag { position: absolute; top: 12px; padding: 4px 10px; border-radius: 99px; background: rgba(0, 0, 0, .55); font: 700 12px var(--body); }

/* ---------- чат ---------- */
.chat-h { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.chat { display: flex; flex-direction: column; gap: 6px; padding-bottom: 80px; }
.msg { max-width: 80%; padding: 10px 13px; border-radius: 20px; white-space: pre-wrap; word-wrap: break-word; animation: fadeUp .2s both; font-size: 15px; }
.msg .tm { display: block; font-size: 10px; opacity: .55; margin-top: 3px; text-align: right; }
.msg.me { align-self: flex-end; background: var(--grad); color: var(--ink); border-bottom-right-radius: 6px; font-weight: 600; }
.msg.them { align-self: flex-start; background: var(--s2); border-bottom-left-radius: 6px; }
.day-sep { align-self: center; font: 700 11px var(--body); color: var(--dim); margin: 10px 0 4px; }
.composer { position: fixed; left: 50%; transform: translateX(-50%); width: calc(100% - 24px); max-width: 516px; bottom: calc(86px + var(--safe-b)); z-index: 18;
  display: flex; gap: 8px; padding: 6px; border-radius: 22px; background: rgba(22, 24, 29, .92); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: inset 0 0 0 1px var(--line2); }
.composer.solo { bottom: calc(12px + var(--safe-b)); }
.composer textarea { resize: none; height: 44px; max-height: 120px; background: transparent; padding: 11px 12px; }
.composer button { flex: none; width: 44px; height: 44px; border-radius: 16px; border: 0; background: var(--grad); color: var(--ink); display: grid; place-items: center; }

/* ---------- шторка ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .55); animation: fadeIn .2s both; }
.sheet { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 540px; z-index: 61; max-height: 90vh; overflow-y: auto;
  background: var(--s1); border-radius: 26px 26px 0 0; padding: 10px 18px calc(22px + var(--safe-b)); box-shadow: 0 -10px 40px rgba(0, 0, 0, .5); animation: sheetUp .32s cubic-bezier(.2, .9, .3, 1) both; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--s3); margin: 0 auto 14px; }
.sheet h2 { font: 700 20px/1.2 var(--display); margin: 0 0 6px; letter-spacing: -.02em; }
@keyframes sheetUp { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }

/* ---------- редактор програми ---------- */
.ed-day { background: var(--s1); border-radius: var(--r); padding: 14px; margin-bottom: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.ed-day > .row input { font-weight: 800; }
.ed-ex { display: grid; grid-template-columns: 56px 14px 92px 1fr 34px; gap: 6px; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.ed-ex input { padding: 10px 8px; font-size: 14px; }
.ed-ex .nm { grid-column: 1 / 5; font-weight: 700; }
.ed-ex .nt { grid-column: 1 / -1; font-size: 13px; }
.ed-ex input[data-k="sets"], .ed-ex input[data-k="reps"] { text-align: center; }
.x-btn { background: none; border: 0; color: var(--dim); display: grid; place-items: center; padding: 6px; }

/* ---------- різне ---------- */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .ic { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center; background: var(--s1); color: var(--accent); box-shadow: inset 0 0 0 1px var(--line); }
.empty b { display: block; color: var(--text); font: 700 18px/1.25 var(--display); margin-bottom: 6px; letter-spacing: -.01em; }
.quote { font: 600 16px/1.45 var(--body); }
.skel { border-radius: var(--r); background: linear-gradient(90deg, var(--s1) 0%, var(--s2) 50%, var(--s1) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; margin-bottom: 12px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.toast { position: fixed; left: 50%; bottom: calc(100px + var(--safe-b)); z-index: 90; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 16px; font-weight: 700; font-size: 14px; max-width: calc(100% - 32px); text-align: center;
  transition: opacity .25s, transform .25s; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
/* смуга демо стоїть під годинником і кнопками Telegram, а не на них */
body.has-demo > :not(.demo-bar) { --safe-t: 0px; }
.demo-bar { display: flex; gap: 6px; overflow-x: auto; padding: calc(8px + var(--safe-t)) 12px 8px; background: linear-gradient(#0A0B0D var(--safe-t), #231a00 0); font-size: 12px; scrollbar-width: none; position: relative; z-index: 30; }
.demo-bar a { white-space: nowrap; padding: 5px 11px; border-radius: 99px; text-decoration: none; background: #3a2c05; color: var(--warn); font-weight: 700; }
.demo-bar a.on { background: var(--warn); color: #231a00; }
.demo-bar span { color: var(--warn); white-space: nowrap; align-self: center; font-weight: 700; }
.kv { display: flex; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.kv:first-of-type { border-top: 0; }
.settings .li { margin-bottom: 6px; }
.settings .li .ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--s2); color: var(--accent); flex: none; }
.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .45; } }

/* ---------- їжа текстом ---------- */
.ate { margin: 0 0 12px; padding: 14px; border-radius: var(--r); background: linear-gradient(160deg, rgba(120, 220, 255, .10), rgba(79, 124, 255, .06) 60%, var(--s1));
  box-shadow: inset 0 0 0 1px rgba(120, 220, 255, .22); }
.ate-h { display: flex; align-items: center; gap: 6px; color: var(--accent); margin-bottom: 10px; }
.ate-h b { color: var(--text); font-size: 15px; }
.ate-box { display: flex; align-items: flex-end; gap: 8px; background: var(--bg); border-radius: 16px; padding: 6px 6px 6px 14px; box-shadow: inset 0 0 0 1px var(--line2); }
.ate-box textarea { flex: 1; border: 0; background: none; resize: none; outline: none; padding: 8px 0; font-size: 15px; line-height: 1.35; min-height: 22px; }
.ate-box textarea::placeholder { color: var(--dim); }
.ate-go { width: 40px; height: 40px; border: 0; border-radius: 13px; background: var(--grad); color: var(--ink); display: grid; place-items: center; flex: none; transition: transform .15s; }
.ate-go:active { transform: scale(.92); }
.ate-go.busy svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ate-ex { display: flex; gap: 6px; overflow-x: auto; margin: 10px -14px 0; padding: 0 14px; scrollbar-width: none; }
.ate-ex::-webkit-scrollbar { display: none; }
.ate-ex button { white-space: nowrap; border: 0; border-radius: 99px; padding: 6px 11px; font-size: 12.5px; background: rgba(255, 255, 255, .06); color: var(--muted); }
.ate-it { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); cursor: pointer; transition: opacity .15s; }
.ate-it.off { opacity: .4; }
.ate-it b { font-size: 14.5px; }
.ate-m { font-size: 12px; color: var(--dim); margin-top: 2px; }
.ate-r { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.ate-r b { font: 700 16px var(--display); } .ate-r > span { font-size: 11px; color: var(--muted); margin-top: -4px; }
.ate-meal { border: 0; border-radius: 99px; padding: 3px 9px; font-size: 11.5px; font-weight: 700; background: rgba(120, 220, 255, .12); color: var(--accent); }
.install .x-mini { border: 0; background: none; color: var(--dim); font-size: 22px; line-height: 1; padding: 0 2px; }
.app-ic.big { width: 84px; height: 84px; border-radius: 22px; display: block; margin: 4px auto 14px; box-shadow: 0 14px 40px rgba(79, 124, 255, .3); }
.install { margin-bottom: 12px; }
#au_forgot { display: block; margin: 8px 0 0 auto; font-size: 13px; }
.reset-ic { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #78DCFF, #4F7CFF); }
#rs_c { letter-spacing: .4em; font-size: 20px; text-align: center; }
.social-auth { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; align-items: stretch; }
.g-btn { display: flex; justify-content: center; min-height: 44px; }
.btn.fb-btn { background: #1877F2; color: #fff; gap: 10px; border-radius: 99px; box-shadow: none; }
.or { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; font-size: 12px; opacity: .6; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .3; }
.ate-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ate-opts button { border: 1px solid var(--line, rgba(255,255,255,.12)); background: transparent; color: inherit; padding: 5px 11px; border-radius: 99px; font: inherit; font-size: 12px; font-weight: 600; min-height: 30px; }
.ate-opts button.on { border-color: transparent; background: linear-gradient(135deg, #78DCFF, #4F7CFF); color: #fff; }
.ate-alt { border: 0; margin-left: 6px; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; background: rgba(255, 181, 71, .14); color: var(--warn); vertical-align: 2px; }
.ate-sum { margin-top: 12px; padding: 12px 14px; border-radius: var(--r2); background: var(--s2); }
.ate-sum span { color: var(--muted); font-size: 13px; } .ate-sum b { font-size: 16px; }
.ate-day { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13.5px; }
.ate-day b { color: var(--accent); font-size: 14px; }
.pw { position: relative; } .pw input { padding-right: 48px; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); padding: 8px; display: grid; }
.or { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--dim); font-size: 12px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line2); }

/* ================= СВІТЛА ТЕМА ================= */
:root[data-theme="light"] {
  --bg: #F3F4F7; --s1: #FFFFFF; --s2: #EEF0F4; --s3: #E2E5EB; --line: rgba(14, 17, 22, .07); --line2: rgba(14, 17, 22, .12);
  --text: #0E1116; --muted: #5B6472; --dim: #8D96A4;
  --accent: #1C8FD6; --accent2: #3D63F0; --ink: #FFFFFF;
  --ok: #16A34A; --warn: #D97706; --bad: #E11D48;
  color-scheme: light;
}
[data-theme="light"] html, [data-theme="light"] body { background: var(--bg); }
[data-theme="light"] .card, [data-theme="light"] .tool, [data-theme="light"] .pick, [data-theme="light"] .li,
[data-theme="light"] .install, [data-theme="light"] .stat { box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(14, 17, 22, .04), 0 6px 18px rgba(14, 17, 22, .04); }
[data-theme="light"] .tabbar { background: rgba(255, 255, 255, .86); box-shadow: inset 0 0 0 1px var(--line2), 0 16px 40px rgba(14, 17, 22, .12); }
[data-theme="light"] .tabbar .ind, [data-theme="light"] .tabbar button.on { background: rgba(14, 17, 22, .06); }
[data-theme="light"] .hero-card { background: radial-gradient(130% 120% at 100% 0%, rgba(79, 124, 255, .16), transparent 55%), radial-gradient(90% 120% at 0% 100%, rgba(120, 220, 255, .14), transparent 60%), var(--s1);
  box-shadow: inset 0 0 0 1px var(--line), 0 6px 18px rgba(14, 17, 22, .05); }
[data-theme="light"] .hero-card.photo::before { background: linear-gradient(90deg, var(--s1) 54%, rgba(255, 255, 255, .55) 68%, rgba(255, 255, 255, 0) 100%), linear-gradient(0deg, rgba(255, 255, 255, .9), transparent 45%); }
[data-theme="light"] .sheet { box-shadow: 0 -10px 40px rgba(14, 17, 22, .15); }
[data-theme="light"] .sheet-bg { background: rgba(14, 17, 22, .35); }
[data-theme="light"] .wk-top { background: rgba(243, 244, 247, .9); }
[data-theme="light"] .medal .m-ring { background: #E9ECF1; color: #0E1116; }
[data-theme="light"] .ate-ex button { background: rgba(14, 17, 22, .05); }
[data-theme="light"] .ate { background: linear-gradient(160deg, rgba(28, 143, 214, .08), rgba(61, 99, 240, .04) 60%, var(--s1)); box-shadow: inset 0 0 0 1px rgba(28, 143, 214, .22); }
[data-theme="light"] .ate-box { background: var(--s2); box-shadow: none; }
[data-theme="light"] .ate-meal { background: rgba(28, 143, 214, .1); }
[data-theme="light"] .ate-go, [data-theme="light"] .btn:not(.ghost):not(.glass):not(.white) { color: #fff; }
[data-theme="light"] .logo-mark { background: var(--s1); box-shadow: 0 0 0 1px var(--line), 0 16px 40px rgba(61, 99, 240, .18); }
[data-theme="light"] #splash { background: var(--bg); }
[data-theme="light"] .lp-body { background: var(--bg); }
.lp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.lp-chips span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 99px; font-size: 13px; font-weight: 600; background: var(--s1); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.lp-chips svg { color: var(--accent); }

/* ---------- активність ---------- */
.act-card .act-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 10px 0 2px; }
.act-card .big-num { font-size: 28px; }
.act-bar { height: 9px; border-radius: 6px; }
.act-bar i { background: linear-gradient(90deg, #4ADE80, #22B8A6); }
.act-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.act-mini div { background: var(--s2); border-radius: var(--r3); padding: 10px; display: grid; grid-template-columns: auto 1fr; column-gap: 6px; align-items: center; }
.act-mini .i { color: var(--muted); }
.act-mini b { font: 700 16px/1.1 var(--display); letter-spacing: -.02em; }
.act-mini span { grid-column: 1 / -1; font-size: 11px; color: var(--muted); margin-top: 3px; }
.act-mini div:nth-child(1) .i { color: var(--warn); } .act-mini div:nth-child(2) .i { color: var(--bad); }
.sbars { margin-top: 4px; }
.sb-area { position: relative; height: 130px; display: flex; align-items: flex-end; gap: 5px; }
.sb-area i { flex: 1; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, rgba(120, 220, 255, .6), rgba(79, 124, 255, .45)); min-height: 0; transition: height .8s cubic-bezier(.2, .8, .2, 1); }
.sb-area i.hit { background: linear-gradient(180deg, #4ADE80, #22B8A6); }
.sb-area i.now { box-shadow: 0 0 0 2px var(--accent); }
.sgoal { position: absolute; left: 0; right: 0; border-top: 1.5px dashed rgba(74, 222, 128, .55); pointer-events: none; }
.sgoal span { position: absolute; left: 0; top: -17px; font: 700 10px var(--body); color: var(--ok); background: var(--s1); padding: 0 4px; border-radius: 4px; }
.sb-lab { display: flex; gap: 5px; margin-top: 6px; }
.sb-lab span { flex: 1; text-align: center; font-size: 10px; color: var(--dim); font-weight: 700; }
.sb-lab span.now { color: var(--accent); }
.tool.wide { width: 100%; display: block; }
.watch-on { box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .3); }
.chips-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chips-pick button { flex: 1 0 28%; border: 0; padding: 14px 6px; border-radius: 14px; background: var(--s2); color: var(--text); font: 700 15px var(--display); box-shadow: inset 0 0 0 1px var(--line); }
.chips-pick button.on { background: var(--grad); color: var(--ink); }
.wstep { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.45; }
.wstep > span { width: 24px; height: 24px; border-radius: 50%; background: rgba(74, 222, 128, .14); color: var(--ok); display: grid; place-items: center; font: 700 12px var(--body); }
.wstep code, .keybox code { font: 600 12px ui-monospace, Menlo, monospace; background: var(--s2); padding: 1px 5px; border-radius: 5px; }
.keybox { margin-top: 12px; padding: 12px; border-radius: var(--r2); background: var(--s2); display: grid; gap: 8px; }
.keybox code { display: block; word-break: break-all; padding: 10px; background: var(--s1); user-select: all; -webkit-user-select: all; }
.burn { display: flex; align-items: center; gap: 7px; margin-top: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(255, 181, 71, .1); color: var(--muted); font-size: 12.5px; }
.burn .i { color: var(--warn); } .burn b { color: var(--text); }
.danger-t { color: var(--bad) !important; }
:root[data-theme="light"] .sgoal span { background: var(--s1); }
.btn-pair .btn { margin: 0; }

/* правка грамів і виправлення текстом у «Ось що я порахував» */
.ate-g { display: inline-flex; align-items: center; gap: 4px; border: 0; background: rgba(120, 220, 255, .1); color: var(--accent); font: 700 12.5px var(--body); padding: 3px 8px; border-radius: 8px; margin: 3px 0 1px; }
.ate-g .i { width: 12px; height: 12px; opacity: .8; }
.ate-gin { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text); }
.ate-gin input { width: 84px; padding: 6px 10px; border-radius: 10px; font: 700 15px var(--body); text-align: center; }
.ate-fix { display: flex; gap: 8px; margin-top: 12px; }
.ate-fix input { flex: 1; min-width: 0; }
.ate-fix button { flex: none; width: 46px; border: 0; border-radius: 14px; background: var(--grad); color: var(--ink); display: grid; place-items: center; }
.ate-fix button.busy { opacity: .5; }
/* видалення акаунта — внизу профілю, тихо, але видно */
.del-acc { display: block; width: 100%; margin: 22px 0 0; padding: 14px; border: 0; border-radius: 14px; background: transparent; color: var(--bad); font: 700 14px var(--body); box-shadow: inset 0 0 0 1px rgba(255, 93, 108, .25); }
.del-acc:active { background: rgba(255, 93, 108, .08); }
.btn:disabled { opacity: .45; }
/* «Зменшення руху» на iPhone: без анімацій, але кільця й цифри одразу в кінцевому стані */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .rings .arc { stroke-dashoffset: var(--to) !important; }
}
/* перший екран: ім'я і нік завжди білі на фото (і у світлій темі) */
.lp-info, .lp-name, .lp-pill { color: #fff; }
:root[data-theme="light"] .lp-hero::after { background: linear-gradient(180deg, rgba(10, 11, 13, .5) 0%, rgba(10, 11, 13, 0) 14%, rgba(10, 11, 13, 0) 52%, rgba(10, 11, 13, .78) 72%, rgba(10, 11, 13, .97) 100%); }
:root[data-theme="light"] .lp-pill { background: rgba(255, 255, 255, .14); }
/* ---------- сканер штрихкоду ---------- */
.search-row { display: flex; gap: 8px; align-items: stretch; }
.search-row .search { flex: 1; min-width: 0; }
.bc-btn { flex: none; width: 52px; border: 0; border-radius: 16px; background: var(--grad); color: var(--ink); display: grid; place-items: center; box-shadow: 0 8px 20px rgba(79, 124, 255, .25); }
.bc-btn:active { transform: scale(.95); }
.tools3 .tool { padding: 12px 10px; }
.tools3 .tool .si { width: 34px; height: 34px; margin-bottom: 8px; }
.tools3 .tool b { font-size: 13.5px; } .tools3 .tool span { font-size: 11.5px; }
.bc { position: fixed; inset: 0; z-index: 200; background: #000; color: #fff; }
.bc video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bc-shade { position: absolute; inset: 0; background: radial-gradient(ellipse 78% 22% at 50% 44%, transparent 0 60%, rgba(0, 0, 0, .62) 61%); pointer-events: none; }
.bc-top { position: absolute; top: 0; left: 0; right: 0; padding: calc(12px + var(--safe-t)) 14px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bc-top b { font: 700 16px var(--body); }
.bc-top span { width: 42px; }
.bc-x { width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; display: grid; place-items: center; backdrop-filter: blur(10px); }
.bc-frame { position: absolute; left: 50%; top: 44%; width: min(78vw, 340px); height: 150px; transform: translate(-50%, -50%); border-radius: 18px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .85); }
.bc-frame i { position: absolute; left: 12px; right: 12px; top: 50%; height: 2px; background: linear-gradient(90deg, transparent, #78DCFF, transparent); box-shadow: 0 0 12px #78DCFF; animation: bcLine 1.6s ease-in-out infinite alternate; }
@keyframes bcLine { from { transform: translateY(-58px); } to { transform: translateY(58px); } }
.bc-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 16px calc(18px + var(--safe-b)); background: linear-gradient(0deg, rgba(0, 0, 0, .75), transparent); }
.bc-hint { text-align: center; font-size: 13.5px; color: rgba(255, 255, 255, .85); margin-bottom: 12px; }
.bc-manual { display: flex; gap: 8px; }
.bc-manual input { flex: 1; min-width: 0; background: rgba(255, 255, 255, .14); color: #fff; border: 0; box-shadow: none; }
.bc-manual input::placeholder { color: rgba(255, 255, 255, .6); }
.bc-manual button { flex: none; width: 48px; border: 0; border-radius: 14px; background: var(--grad); color: var(--ink); display: grid; place-items: center; }
/* ---------- сон ---------- */
.sl-ring { position: relative; width: 72px; height: 72px; flex: none; }
.sl-ring svg { width: 72px; height: 72px; }
.sl-ring .bg { stroke: rgba(192, 132, 252, .15); }
.sl-ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 800 20px var(--display); letter-spacing: -.02em; }
.sl-mini div:nth-child(1) .i, .sl-mini div:nth-child(2) .i { color: #C084FC !important; }
.sbars.sleep .sb-area i { background: linear-gradient(180deg, rgba(192, 132, 252, .55), rgba(99, 102, 241, .45)); }
.sbars.sleep .sb-area i.hit { background: linear-gradient(180deg, #C084FC, #6366F1); }
.sbars.sleep .sgoal { border-top-color: rgba(192, 132, 252, .6); }
.sbars.sleep .sgoal span { color: #C084FC; }