:root {
  --bg: #FFF7EE;
  --card: #FFFFFF;
  --ink: #2B2118;
  --muted: #9A8B7D;
  --line: #F1E6DA;
  --accent: #FF6B3D;
  --accent-2: #FFB547;
  --leaf: #3FAE5A;
  --p: #FF7A59;   /* белки */
  --f: #FFB547;   /* жиры */
  --c: #5BB0F0;   /* углеводы */
  --fib: #3FAE5A; /* клетчатка */
  --water: #4FA8F5;
  --radius: 20px;
  --shadow: 0 6px 20px rgba(120, 72, 30, .07);
  --nav-h: 64px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font: 15px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
[hidden] { display: none !important; }
#app { max-width: 520px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; position: sticky; top: 0; z-index: 5; background: linear-gradient(var(--bg) 80%, rgba(255,247,238,0)); }
.brand { display: flex; align-items: center; gap: 10px; }
.logo { width: 40px; height: 40px; border-radius: 50%; flex: none; }  /* круглый значок, как на сайте tarelka-bot.ru */
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: -.2px; }
.brand-name b { color: var(--accent); font-weight: 800; }
.brand-sub { font-size: 12px; color: var(--muted); }
.date-switch { display: flex; align-items: center; gap: 4px; background: var(--card); border-radius: 999px; padding: 4px; box-shadow: var(--shadow); }
.date-pill { font-weight: 700; padding: 0 6px; min-width: 70px; text-align: center; }
.icon-btn { width: 30px; height: 30px; border-radius: 50%; font-size: 20px; line-height: 1; color: var(--accent); }
.icon-btn:disabled { color: #D8CCC0; cursor: default; }

.banner { margin: 4px 16px 0; padding: 10px 12px; border-radius: 14px; font-size: 13px; line-height: 1.35; }
.demo-banner { background: #FFF0D9; color: #8A5A16; }

main { padding: 8px 16px 0; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.card-title { font-weight: 700; font-size: 16px; }
.muted { color: var(--muted); font-size: 13px; }

/* ring */
.ring-card { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 4px; padding: 18px 12px; }
.ring-side { text-align: center; }
.side-val { font-weight: 800; font-size: 20px; }
.side-lbl { color: var(--muted); font-size: 12px; }
.ring-wrap { position: relative; width: 168px; height: 168px; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: #FBEDE0; stroke-width: 11; }
.ring-fg { fill: none; stroke: url(#ringGrad); stroke-width: 11; stroke-linecap: round; transition: stroke-dashoffset .8s cubic-bezier(.2,.8,.2,1), stroke .3s; }
.ring-fg.over { stroke: #E5484D; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-val { font-size: 38px; font-weight: 800; letter-spacing: -1px; }
.ring-lbl { font-size: 12px; color: var(--muted); }
.ring-center.over .ring-val { color: #E5484D; }

/* macros */
.macros { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 16px; }
.macro .m-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.macro .m-name { font-weight: 600; }
.macro .m-val { color: var(--muted); }
.macro .m-val b { color: var(--ink); font-weight: 700; }
.bar { height: 8px; border-radius: 99px; background: #F6EDE4; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; width: 0; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.macro.over .m-val b { color: #E5484D; }

/* actions */
.actions { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; margin-bottom: 12px; }
.btn { height: 50px; border-radius: 16px; font-weight: 700; font-size: 15px; }
.btn.primary { color: #fff; background: linear-gradient(135deg, var(--accent-2), var(--accent)); box-shadow: 0 8px 18px rgba(255,107,61,.28); }
.btn.ghost { background: var(--card); box-shadow: var(--shadow); color: var(--ink); }
.btn:active { transform: scale(.98); }
.btn.wide { width: 100%; margin-top: 12px; }

/* water */
.glasses { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.glass { position: relative; aspect-ratio: 3/4; border-radius: 6px 6px 10px 10px; border: 2px solid #CFE6FA; background: #F5FAFF; overflow: hidden; transition: transform .15s; }
.glass::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(#7CC0F8, var(--water)); transition: height .35s ease; }
.glass.full { border-color: var(--water); }
.glass.full::after { height: 82%; }
.glass.next::before { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--water); font-weight: 800; font-size: 18px; z-index: 1; }
.glass:active { transform: scale(.92); }
.water-ctrl { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.chip { padding: 8px 12px; border-radius: 999px; background: #F2F7FC; color: #2E7CC4; font-weight: 600; font-size: 13px; }
.chip.strong { background: var(--water); color: #fff; }
.chip:disabled { opacity: .4; cursor: default; }

/* meals */
.slot { border-top: 1px solid var(--line); padding: 12px 0; }
.slot:first-child { border-top: 0; padding-top: 2px; }
.slot-head { display: flex; align-items: center; gap: 10px; }
.slot-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: #FFF3E6; flex: none; }
.slot-name { font-weight: 700; }
.slot-sub { color: var(--muted); font-size: 12px; }
.slot-kcal { margin-left: auto; font-weight: 700; white-space: nowrap; }
.slot-add { width: 30px; height: 30px; border-radius: 50%; background: #FFEFE6; color: var(--accent); font-size: 20px; font-weight: 700; margin-left: 8px; flex: none; }
.meal { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0 0 48px; font-size: 14px; }
.meal-name { overflow-wrap: anywhere; }
.meal-macro { color: var(--muted); font-size: 12px; }
.meal-kcal { white-space: nowrap; color: var(--muted); font-size: 13px; }

.foot-note { color: var(--muted); font-size: 11px; text-align: center; margin: 4px 0 12px; }

/* stubs (legacy) */
.stub { text-align: center; padding: 28px 20px; }
.stub-emoji { font-size: 40px; }
.stub-title { font-weight: 800; font-size: 18px; margin: 6px 0; }
.stub p { color: var(--muted); margin: 0 0 12px; }

/* stats week bars */
.week-bars { display: flex; align-items: flex-end; gap: 8px; height: 140px; padding: 4px 0 0; }
.week-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.week-bar .col { width: 100%; border-radius: 8px 8px 4px 4px; background: #FBE3D2; min-height: 4px; transition: height .5s cubic-bezier(.2,.8,.2,1); position: relative; }
.week-bar .col.over { background: #F5B5B8; }
.week-bar.today .col { background: linear-gradient(var(--accent-2), var(--accent)); }
.week-bar.today .col.over { background: linear-gradient(#FF8A80, #E5484D); }
.week-bar .kcal { font-size: 10px; color: var(--muted); font-weight: 600; }
.week-bar .lbl { font-size: 11px; color: var(--muted); font-weight: 600; }
.week-bar.today .lbl { color: var(--accent); }
.week-avg { margin-top: 12px; font-size: 13px; }

/* weight */
.weight-big { font-size: 48px; font-weight: 800; letter-spacing: -1px; text-align: center; margin: 8px 0 4px; }
.weight-big small { font-size: 18px; color: var(--muted); font-weight: 600; }
.weight-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 14px 0 8px; }
.weight-form input { height: 50px; border-radius: 16px; border: 1px solid var(--line); padding: 0 14px; background: #FFFCF8; font: inherit; }
.weight-form input:focus { outline: 2px solid #FFD0B8; border-color: var(--accent); }
.weight-form .btn { height: 50px; padding: 0 18px; }
.weight-hist { margin-top: 8px; }
.wh-row { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.wh-row:first-child { border-top: 0; }

/* profile */
.profile-rows { display: flex; flex-direction: column; }
.pr-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pr-row:last-child { border-bottom: 0; }
.pr-row span { color: var(--muted); }
.pr-row b { font-weight: 700; text-align: right; }
.profile-hint { margin: 12px 0 0; font-size: 13px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

.fc-tip { margin: 14px 0 8px; padding: 12px 14px; border-radius: 14px; background: #FFF3E6; font-size: 14px; line-height: 1.4; }
.fc-tip.ok { background: #EAF7EE; }
.fc-tip.low { background: #FFF0D9; }
.fc-tip.high { background: #FDECEC; }
.fc-disclaimer { color: var(--muted); font-size: 12px; margin: 8px 0 0; }

/* bottom nav */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(5, 1fr); max-width: 520px; margin: 0 auto; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--muted); filter: grayscale(1); opacity: .75; }
.nav-item .ni { font-size: 20px; }
.nav-item.active { color: var(--accent); filter: none; opacity: 1; font-weight: 700; }

/* sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(43,33,24,.35); z-index: 20; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-width: 520px; margin: 0 auto; background: var(--bg); border-radius: 24px 24px 0 0; padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 82vh; overflow: auto; animation: up .25s ease; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: #E3D5C7; margin: 4px auto 12px; }
.sheet-title { font-weight: 800; font-size: 18px; margin-bottom: 4px; }
.sheet-body .lead { color: var(--muted); margin: 0 0 12px; font-size: 14px; }
.sug { background: var(--card); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow); }
.sug-top { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; }
.sug-kcal { color: var(--accent); white-space: nowrap; }
.sug-macro { color: var(--muted); font-size: 12px; margin-top: 2px; }
.sug-how { font-size: 13px; margin-top: 6px; }
.fc-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }

.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #2B2118; color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 13px; z-index: 30; max-width: 90vw; text-align: center; }

@media (max-width: 360px) {
  .ring-wrap { width: 140px; height: 140px; }
  .ring-val { font-size: 30px; }
  .side-val { font-size: 17px; }
}

/* status chips (streak / weight) */
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.status-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: #FFF0E4; color: var(--accent); box-shadow: var(--shadow);
}
.status-chip.muted-chip { background: var(--card); color: var(--ink); font-weight: 600; }
.status-chip[hidden] { display: none !important; }

/* meal cards denser / livelier */
.meal-card {
  background: #FFFCF8; border: 1px solid var(--line); border-radius: 16px;
  padding: 12px 14px; margin: 8px 0 0 0; box-shadow: 0 2px 10px rgba(120,72,30,.04);
}
.meal-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.meal-card-name { font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
.meal-card-kcal { font-size: 22px; font-weight: 800; color: var(--accent); letter-spacing: -.4px; white-space: nowrap; }
.meal-card-kcal small { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.meal-card-macro { color: var(--muted); font-size: 12px; margin-top: 4px; }
.meal-card-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 8px; }
.meal-card-actions .time { font-size: 12px; color: var(--muted); font-weight: 600; }
.btn-link {
  color: var(--leaf); font-weight: 700; font-size: 13px; padding: 4px 0;
}
.btn-link:active { opacity: .7; }

/* water remaining text */
.water-left { margin-top: 8px; font-size: 12px; color: var(--muted); }

/* stats segments */
.seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  background: var(--card); border-radius: 14px; padding: 4px; margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.seg-btn {
  height: 36px; border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--muted);
}
.seg-btn.active {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff; box-shadow: 0 4px 12px rgba(255,107,61,.25);
}
.seg-btn:disabled { opacity: .45; cursor: default; }
.stats-goal { margin: -4px 0 10px; font-size: 13px; }
.week-chart { position: relative; min-height: 180px; padding-bottom: 4px; }
.week-bars { height: 160px; }
.goal-line {
  position: absolute; left: 0; right: 0; height: 0;
  border-top: 2px dashed rgba(255,107,61,.55);
  pointer-events: none;
}
.goal-line::after {
  content: "цель"; position: absolute; right: 0; top: -16px;
  font-size: 10px; font-weight: 700; color: var(--accent); opacity: .85;
}
.week-bar .col {
  background: linear-gradient(180deg, #FFD29A, #FFB547);
}
.week-bar.today .col {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
}

/* profile hero + subscription */
.profile-hero { display: flex; gap: 14px; align-items: center; }
.ph-avatar {
  width: 56px; height: 56px; border-radius: 18px; flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: 22px; color: #fff;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 6px 16px rgba(255,107,61,.28);
}
.ph-name { font-weight: 800; font-size: 18px; }
.ph-sub { font-size: 13px; margin-top: 2px; }
.sub-card {
  background: linear-gradient(135deg, #FFF3E6, #FFE8D6);
  border: 1px solid #FFD7B8;
}
.sub-card .card-title { color: var(--ink); }

/* ===== v2 ===== */
.err-banner { background: #FDECEC; color: #9B2C2C; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.promo-banner { background: #EAF7EE; color: #22663A; font-weight: 600; }
.btn-mini { padding: 6px 12px; border-radius: 999px; background: #fff; color: #9B2C2C; font-weight: 700; font-size: 13px; flex: none; }
.water-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.water-row .water-ctrl { margin-top: 0; }
.water-row .water-left { margin-top: 0; }
.glass:disabled { cursor: default; }
button.meal-card { display: block; width: 100%; text-align: left; }
.empty { text-align: center; padding: 18px 8px 8px; }
.empty-emoji { font-size: 36px; }
.empty-title { font-weight: 800; font-size: 16px; margin: 6px 0 4px; }
.empty p { color: var(--muted); font-size: 13px; margin: 0 auto; max-width: 300px; }
.items-table { background: var(--card); border-radius: 16px; padding: 4px 14px; box-shadow: var(--shadow); }
.it-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.it-row:last-child { border-bottom: 0; }
.it-name { font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
.it-macro { color: var(--muted); font-size: 12px; margin-top: 2px; }
.it-macro.center { text-align: center; margin-top: 6px; }
.it-right { text-align: right; display: flex; flex-direction: column; white-space: nowrap; }
.it-right b { color: var(--accent); }
.it-total { display: flex; justify-content: space-between; padding: 12px 4px 0; font-weight: 700; }
.hint { font-size: 13px; color: var(--ink); background: #FFF3E6; border-radius: 12px; padding: 10px 12px; margin: 12px 0 0; }

/* загрузка */
.skeleton { height: 64px; border-radius: 16px; margin: 8px 0; background: linear-gradient(90deg, #F6ECE2 0%, #FFF8F1 50%, #F6ECE2 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
.skeleton.tall { height: 220px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
body.is-loading .ring-card, body.is-loading .macros, body.is-loading .meals, body.is-loading .water { opacity: .55; transition: opacity .2s; }

/* меню на неделю */
.menu-lead { color: var(--muted); font-size: 13px; margin: 0 2px 10px; }
.day-chips { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 12px; }
.day-chip { display: flex; flex-direction: column; align-items: center; padding: 8px 0; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.day-chip .dc-wd { font-size: 11px; color: var(--muted); font-weight: 600; }
.day-chip .dc-d { font-size: 17px; font-weight: 800; }
.day-chip.active { background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: #fff; }
.day-chip.active .dc-wd { color: #fff; opacity: .9; }
.menu-day-title { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; font-size: 17px; margin: 4px 2px 10px; }
.menu-meal { padding: 14px; }
.mm-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--muted); }
.mm-kcal { color: var(--accent); }
.mm-name { font-weight: 700; font-size: 15px; margin: 4px 0 2px; overflow-wrap: anywhere; }
.mm-macro { color: var(--muted); font-size: 12px; }
.mm-how { margin-top: 8px; font-size: 13px; }
.mm-how summary { color: var(--leaf); font-weight: 700; cursor: pointer; list-style: none; }
.mm-how summary::-webkit-details-marker { display: none; }
.mm-how summary::after { content: " ›"; }
.mm-how[open] summary::after { content: " ⌄"; }
.mm-how p { margin: 6px 0 0; line-height: 1.45; }
.paywall { background: linear-gradient(135deg, #FFF3E6, #FFE8D6); border: 1px solid #FFD7B8; }
.paywall-title { font-weight: 800; font-size: 17px; }
.paywall p { font-size: 14px; margin: 8px 0; }
.paywall-price { font-weight: 800; color: var(--accent); margin: 6px 0; }
.shop-cat .card-title { margin-bottom: 6px; }
.shop-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; cursor: pointer; }
.shop-item:first-of-type { border-top: 0; }
.shop-item input { width: 20px; height: 20px; accent-color: var(--leaf); flex: none; }
.shop-item .si-name { flex: 1; }
.shop-item.done .si-name { text-decoration: line-through; color: var(--muted); }

/* итоги */
.week-bars.month { gap: 2px; }
.week-bars.month .col { border-radius: 4px 4px 2px 2px; }
.week-bar .col.nodata { background: #F3E9DF !important; }
.stat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.tile { background: var(--card); border-radius: 16px; padding: 12px 8px; text-align: center; box-shadow: var(--shadow); }
.tile-v { font-weight: 800; font-size: 18px; }
.tile-l { color: var(--muted); font-size: 11px; margin-top: 2px; }
.macro.wide { margin-bottom: 12px; }
.macro.wide:last-child { margin-bottom: 0; }

/* вес */
.weight-delta { text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); min-height: 18px; }
.weight-delta.good { color: var(--leaf); }
.spark { margin: 8px 0 0; }
.spark svg { width: 100%; height: 70px; display: block; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.spark-area { fill: rgba(255,107,61,.10); }
.spark-dot { fill: var(--accent); stroke: #fff; stroke-width: 2; }

.sub-status { font-weight: 800; color: var(--accent); font-size: 14px; }
.sub-pitch { font-size: 14px; margin: 4px 0 8px; }
.seg3 { grid-template-columns: 1fr 1fr; }
@media (max-width: 360px) { .nav-item { font-size: 10px; } .day-chip .dc-d { font-size: 15px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* итоги: столбики в пикселях, линия цели считается от той же высоты */
.week-chart { min-height: 0; padding-bottom: 0; }
.week-bars { height: 160px; padding: 0; gap: 8px; }
.week-bar { gap: 0; }
.week-bar .kcal { height: 18px; line-height: 18px; margin-bottom: 4px; }
.week-bar .lbl { height: 16px; line-height: 16px; margin-top: 6px; }
.week-bar { flex: 1 1 0; min-width: 0; }
.week-bars.month .week-bar .lbl { overflow: visible; white-space: nowrap; }
.week-bar .col.nodata { height: 4px !important; min-height: 4px; }
.week-bars.month { gap: 3px; }

/* предложения партнёров (реклама) — см. results/ads_mockups */
.ad-card { background: #FFFDF9; border: 1.5px solid #FBD9C6; border-radius: 18px; padding: 14px; margin-bottom: 12px; position: relative; }
.ad-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.ad-tag { background: #FFF0E6; color: #C4562C; border-radius: 6px; padding: 2px 7px; font-weight: 700; letter-spacing: .2px; margin-right: 6px; }
.ad-hide { font-size: 12px; color: var(--muted); padding: 4px 0 4px 8px; }
.ad-row { display: flex; gap: 12px; align-items: center; }
.ad-logo { width: 46px; height: 46px; border-radius: 14px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 24px; background: #E6F4EA; }
.ad-title { font-weight: 700; font-size: 15px; }
.ad-text { font-size: 13px; color: #6f6255; margin-top: 2px; }
.ad-promo { display: inline-block; margin-top: 10px; border: 1.5px dashed var(--accent); color: var(--accent); border-radius: 10px; padding: 5px 10px; font-weight: 800; font-size: 13px; letter-spacing: .5px; }
.ad-cta { width: 100%; margin-top: 12px; height: 44px; }
.ad-legal { font-size: 10.5px; color: #a89888; margin-top: 10px; line-height: 1.35; }
.ad-example { position: absolute; top: -9px; right: 12px; background: var(--ink); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; letter-spacing: .3px; }
.sheet .ad-card { margin-top: 4px; }
.switch-row { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.sw-text { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.sw-sub { font-size: 13px; line-height: 1.35; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { flex: none; width: 50px; height: 30px; border-radius: 999px; background: #E3D6C9; position: relative; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.15); transition: transform .2s; }
.switch-row input:checked + .switch { background: var(--leaf); }
.switch-row input:checked + .switch::after { transform: translateX(20px); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 2px; }

/* экран «войдите через бота» — без подписи данные не показываем */
[hidden] { display: none !important; }
.gate { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 32px 24px; gap: 12px; background: #FFF7EE; color: #2b2118; box-sizing: border-box; }
.gate h1 { font-size: 22px; line-height: 1.25; margin: 8px 0 0; }
.gate p { font-size: 16px; line-height: 1.45; margin: 0; max-width: 360px; color: #5b4a3c; }
.gate-logo { border-radius: 50%; }
.gate-btn { display: block; width: 100%; max-width: 320px; padding: 14px 16px; border-radius: 14px; font-weight: 600;
  font-size: 16px; text-decoration: none; background: #E8834A; color: #fff; }
.gate-btn-2 { background: #fff; color: #2b2118; border: 1px solid #ead9c6; }
.gate .gate-hint { font-size: 14px; color: #8a7867; }
