/* Horizon Demo — mobile-first, работает внутри Telegram Mini App и в браузере */
:root {
  --bg: #0B0B0E; --surface: #131317; --card: #1A1A20; --card2: #22222A; --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.14);
  --text: #F2F2EE; --muted: #9C9CA6; --faint: #6B6B75;
  --c1: #3D5AFE; --c2: #8B6CF0; --c3: #FF5A2C; --c4: #5FDDC8;
  --good: #3CCB7F; --warn: #F5B544; --bad: #FF6B57;
  --accent: #6F86FF; --accent-ink: #fff;
  --chart: #6F86FF; --chart2: #B4A3FF; --chart3: #FF8A5C;
  --grad: linear-gradient(100deg, #3D5AFE 0%, #8B6CF0 55%, #FF5A2C 100%);
  --r: 16px; --r-sm: 12px;
  --f: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fd: "Inter Tight", "Inter", system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F3F3F0; --surface: #FFFFFF; --card: #FFFFFF; --card2: #F1F1EE; --line: rgba(10,10,12,.08); --line2: rgba(10,10,12,.14);
  --text: #0E0E11; --muted: #62626B; --faint: #9A9AA2; --accent: #3D5AFE; --chart: #3D5AFE; --chart2: #8B6CF0; --chart3: #E5532A;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--f); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
.hidden, [hidden] { display: none !important; }

/* оболочка */
.shell { min-height: 100vh; }
.side { display: none; }
.main { min-height: 100vh; padding-bottom: calc(78px + var(--safe-b)); }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); min-height: 56px; }
.top__back { border: 0; background: var(--card); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: none; }
.top__title { font-weight: 600; font-size: 16px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-family: var(--fd); font-weight: 700; font-size: 19px; letter-spacing: -.03em; }
.logo__mark { width: 22px; height: 22px; border-radius: 7px; background: conic-gradient(from 200deg, #3D5AFE, #B4A3FF, #FF5A2C, #5FDDC8, #3D5AFE); box-shadow: 0 0 18px rgba(111,134,255,.45); }
.logo--top { flex: 1; }
.top.sub .logo--top { display: none; }
.mode { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line2); color: var(--muted); display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.lang { margin-left: auto; font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: var(--muted); cursor: pointer; }
.lang:hover { color: var(--text); border-color: var(--muted); }
.lang + .mode { margin-left: 8px; }
.mode::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.mode.live::before { background: var(--good); }
.view { padding: 16px 16px 24px; max-width: 1040px; margin: 0 auto; }

/* нижние вкладки */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px calc(6px + var(--safe-b)); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; font-size: 11px; color: var(--faint); font-weight: 500; }
.tab svg { width: 22px; height: 22px; }
.tab.on { color: var(--text); }
.tab--plus .tab__ico { width: 44px; height: 44px; margin-top: -14px; border-radius: 15px; background: var(--grad); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 20px rgba(111,108,255,.45); }
.tab--plus .tab__ico svg { width: 24px; height: 24px; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 240px 1fr; }
  .side { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; padding: 22px 16px; border-right: 1px solid var(--line); background: var(--surface); }
  .side__nav { display: flex; flex-direction: column; gap: 2px; }
  .side__nav a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; }
  .side__nav a svg { width: 20px; height: 20px; }
  .side__nav a.on, .side__nav a:hover { background: var(--card2); color: var(--text); }
  .side__nav a.cta { background: var(--grad); color: #fff; margin: 6px 0; }
  .side__foot { margin-top: auto; font-size: 12px; color: var(--faint); }
  .tabs { display: none; }
  .main { padding-bottom: 24px; }
  .logo--top { display: none; }
  .view { padding: 24px 32px 40px; }
}

/* типографика и блоки */
.h1 { font-family: var(--fd); font-size: 26px; font-weight: 700; letter-spacing: -.035em; line-height: 1.1; }
.h2 { font-family: var(--fd); font-size: 19px; font-weight: 700; letter-spacing: -.025em; }
.h3 { font-size: 15px; font-weight: 600; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 22px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sec-head a { font-size: 13px; color: var(--accent); font-weight: 500; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card--flat { background: var(--card2); border: 0; }
.card--hero { position: relative; overflow: hidden; padding: 20px; background: radial-gradient(120% 140% at 100% 0%, rgba(61,90,254,.35), transparent 55%), radial-gradient(90% 120% at 0% 100%, rgba(255,90,44,.22), transparent 60%), var(--card); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid4 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 700px) { .grid4 { grid-template-columns: repeat(4, 1fr); } .grid-md-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; } }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 13px 18px; font-weight: 600; font-size: 15px; cursor: pointer; background: var(--card2); color: var(--text); transition: transform .12s, opacity .12s; text-align: center; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px rgba(111,108,255,.3); }
.btn--ghost { background: transparent; border: 1px solid var(--line2); }
.btn--sm { padding: 9px 13px; font-size: 13px; border-radius: 11px; }
.btn--block { width: 100%; }
.btn--danger { color: var(--bad); }
.btn svg { width: 18px; height: 18px; }
.sticky-cta { position: sticky; bottom: calc(84px + var(--safe-b)); z-index: 5; padding-top: 8px; }
@media (min-width: 900px) { .sticky-cta { bottom: 16px; } }
.link { color: var(--accent); font-weight: 500; cursor: pointer; background: none; border: 0; padding: 0; }

/* чипы и бейджи */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chips--wrap-all { flex-wrap: wrap; overflow: visible; }
.chips--wrap-all .chip { white-space: normal; text-align: left; }
@media (min-width: 900px) { .chips--wrap { flex-wrap: wrap; overflow: visible; } }
.chip { flex: none; padding: 8px 13px; border-radius: 999px; background: var(--card2); border: 1px solid transparent; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; color: var(--muted); }
.chip.on { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--card2); color: var(--muted); white-space: nowrap; }
.badge--good { background: rgba(60,203,127,.14); color: var(--good); }
.badge--warn { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line2); }
.badge--bad { background: rgba(255,107,87,.14); color: var(--bad); }
.badge--accent { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.badge--grad { background: var(--grad); color: #fff; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }

/* KPI */
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.kpi b { display: block; font-family: var(--fd); font-size: 26px; font-weight: 700; letter-spacing: -.035em; line-height: 1.05; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12.5px; color: var(--muted); }
.kpi em { font-style: normal; font-size: 11.5px; color: var(--faint); display: block; margin-top: 4px; }

/* баннер демо */
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r); background: color-mix(in srgb, var(--accent) 8%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent); }
.banner__ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }

/* карточки роликов */
.vlist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .vlist { grid-template-columns: repeat(4, 1fr); } }
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: 42%; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; scroll-snap-type: x mandatory; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; }
@media (min-width: 700px) { .hscroll { grid-auto-columns: 23%; } }
.vcard { position: relative; display: block; border-radius: 14px; overflow: hidden; background: var(--card2); aspect-ratio: 9/16; }
.vcard img { width: 100%; height: 100%; object-fit: cover; }
.vcard__meta { position: absolute; inset: auto 0 0 0; padding: 26px 10px 10px; background: linear-gradient(transparent, rgba(0,0,0,.82)); color: #fff; }
.vcard__meta b { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vcard__meta span { font-size: 11px; opacity: .75; }
.vcard__st { position: absolute; top: 8px; left: 8px; }
.vcard__prog { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; text-align: center; padding: 10px; }
.vcard--new { display: grid; place-items: center; border: 1.5px dashed var(--line2); background: transparent; color: var(--muted); text-align: center; font-size: 13px; }

/* шаги */
.steps { display: flex; gap: 6px; }
.steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--card2); }
.steps i.on { background: var(--grad); }
.step-title { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

/* выбор товара */
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 700px) { .pgrid { grid-template-columns: repeat(5, 1fr); } }
.ptile { position: relative; border-radius: 14px; overflow: hidden; background: var(--card2); aspect-ratio: 4/5; cursor: pointer; border: 2px solid transparent; }
.ptile img { width: 100%; height: 100%; object-fit: cover; }
.ptile.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.ptile span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 7px; font-size: 11.5px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.75)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptile--add { display: grid; place-items: center; border: 1.5px dashed var(--line2); background: transparent; color: var(--muted); text-align: center; font-size: 12.5px; padding: 8px; }
.ptile--add svg { width: 26px; height: 26px; margin: 0 auto 4px; }
.ptile .x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; border: 0; display: grid; place-items: center; cursor: pointer; }

/* форматы / тренды */
.fopt { display: flex; gap: 12px; padding: 14px; border-radius: 14px; background: var(--card); border: 1.5px solid var(--line); cursor: pointer; }
.fopt.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.fopt__lift { flex: none; width: 64px; text-align: center; border-radius: 12px; background: var(--card2); padding: 8px 4px; }
.fopt__lift b { display: block; font-family: var(--fd); font-size: 19px; letter-spacing: -.03em; }
.fopt__lift span { font-size: 10.5px; color: var(--muted); line-height: 1.1; display: block; }
.meter { height: 6px; border-radius: 6px; background: var(--card2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 6px; background: var(--chart); }

/* формы */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.input, .textarea, .select { width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card2); font-size: 16px; outline: none; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); }
.textarea { resize: vertical; min-height: 84px; }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--card2); border: 1px solid var(--line2); transition: .2s; cursor: pointer; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + i { background: var(--good); border-color: transparent; }
.switch input:checked + i::after { transform: translateX(20px); }
.colorin { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line2); }
.colorin input { width: 34px; height: 34px; border: 0; padding: 0; background: none; border-radius: 8px; cursor: pointer; }
.seg { display: flex; padding: 3px; border-radius: 12px; background: var(--card2); }
.seg button { flex: 1; border: 0; background: none; padding: 9px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.2); }

/* экран ролика */
.player { position: relative; width: 100%; max-width: 340px; margin: 0 auto; aspect-ratio: 9/16; border-radius: 24px; overflow: hidden; background: #000; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.player video, .player img { width: 100%; height: 100%; object-fit: cover; }
.player__snd { position: absolute; right: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; cursor: pointer; }
.gen { position: relative; overflow: hidden; }
.gen__img { filter: blur(2px) saturate(.9); opacity: .55; }
.gen__over { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; background: linear-gradient(transparent 30%, rgba(0,0,0,.85)); color: #fff; }
.gen__pct { font-family: var(--fd); font-size: 44px; font-weight: 700; letter-spacing: -.04em; }
.gen__bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,.18); overflow: hidden; margin-top: 8px; }
.gen__bar i { display: block; height: 100%; background: var(--grad); transition: width .6s ease; }
.shimmer { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.18) 50%, transparent 70%); animation: sh 1.6s infinite; }
@keyframes sh { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.checklist { display: flex; flex-direction: column; gap: 10px; }
.checklist div { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--faint); }
.checklist div i { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line2); flex: none; display: grid; place-items: center; }
.checklist div.done { color: var(--text); }
.checklist div.done i { background: var(--good); border-color: var(--good); }
.checklist div.done i::after { content: ""; width: 8px; height: 4px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.checklist div.now { color: var(--text); font-weight: 600; }
.checklist div.now i { border-color: var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.logbox { font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.scene { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.scene:first-child { border-top: 0; }
.scene__n { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--card2); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.prov { display: flex; gap: 6px; flex-wrap: wrap; }

/* списки */
.list { display: flex; flex-direction: column; }
.li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.li:first-child { border-top: 0; }
.li__thumb { width: 44px; height: 60px; border-radius: 8px; object-fit: cover; flex: none; background: var(--card2); }
.li__ico { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--card2); color: var(--muted); }
.li__ico svg { width: 20px; height: 20px; }
.menu a { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-top: 1px solid var(--line); }
.menu a:first-child { border-top: 0; }
.menu a .chev { margin-left: auto; color: var(--faint); }

/* план */
.day { display: grid; grid-template-columns: 52px 1fr; gap: 12px; }
.day__d { text-align: center; padding-top: 4px; }
.day__d b { display: block; font-family: var(--fd); font-size: 22px; letter-spacing: -.03em; line-height: 1; }
.day__d span { font-size: 11.5px; color: var(--muted); text-transform: uppercase; }

/* графики */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line2); border-radius: 10px; padding: 8px 10px; font-size: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.3); white-space: nowrap; transform: translate(-50%, -100%); opacity: 0; transition: opacity .1s; z-index: 3; }
.chart .tip.on { opacity: 1; }
.funnel { display: flex; flex-direction: column; gap: 12px; }
.funnel__row { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: center; }
.funnel__bar { height: 30px; border-radius: 0 6px 6px 0; background: var(--chart); min-width: 4px; position: relative; }
.funnel__val { font-family: var(--fd); font-weight: 700; font-size: 17px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.funnel__conv { font-size: 12px; color: var(--muted); margin-left: 102px; margin-top: -6px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.tbl td.r { white-space: nowrap; }
.tbl td { padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl-wrap { overflow-x: auto; margin: 0 -4px; }
.acc + .acc { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.acc__kpi { display: flex; flex-direction: column; align-items: flex-end; margin-left: 14px; line-height: 1.2; }
.acc__kpi b { font-size: 16px; font-variant-numeric: tabular-nums; }
.tbl--acc td:first-child { max-width: 360px; }
.tbl--acc td:first-child a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* шторка */
.sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet__bg { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.sheet__card { position: relative; width: 100%; max-width: 520px; background: var(--surface); border-radius: 22px 22px 0 0; padding: 20px 18px calc(22px + var(--safe-b)); max-height: 88vh; overflow: auto; animation: up .22s ease; }
@media (min-width: 700px) { .sheet { align-items: center; } .sheet__card { border-radius: 22px; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }

.toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translate(-50%, 20px); z-index: 70; background: var(--text); color: var(--bg); padding: 11px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: .2s; max-width: 90vw; text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.empty { text-align: center; padding: 30px 16px; color: var(--muted); }
.skel { background: linear-gradient(90deg, var(--card) 25%, var(--card2) 50%, var(--card) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 14px; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.fade-in { animation: fi .25s ease; }
@keyframes fi { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.offer li { margin: 6px 0; }
.big-num { font-family: var(--fd); font-size: 40px; font-weight: 700; letter-spacing: -.05em; line-height: 1; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.kbd { background: var(--card2); border-radius: 6px; padding: 2px 6px; }

/* агент-маркетолог */
.agent { display: flex; flex-direction: column; gap: 12px; }
.agent__log { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 11px 14px; border-radius: 16px; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.msg p + p { margin-top: 6px; }
.msg--me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 6px; }
.msg--ag { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg--ag ul { margin: 6px 0 2px; padding-left: 18px; }
.msg--ag li { margin: 2px 0; }
.msg__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.msg__src { margin-top: 6px; font-size: 11px; color: var(--faint); }
.typing { display: inline-flex; gap: 5px; align-items: center; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: tp 1.1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tp { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .typing i { animation: none; opacity: .6; } }
.agent__form { position: sticky; bottom: calc(84px + var(--safe-b)); display: flex; gap: 8px; align-items: flex-end; padding: 8px; background: var(--surface); border: 1px solid var(--line2); border-radius: 18px; }
.agent__form textarea { flex: 1; resize: none; border: 0; background: transparent; outline: none; padding: 8px 6px; font-size: 16px; max-height: 140px; }
.agent__send { flex: none; width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--grad); color: #fff; display: grid; place-items: center; cursor: pointer; }
.agent__send:disabled { opacity: .45; cursor: default; }
.agent__send svg { width: 20px; height: 20px; }
@media (min-width: 900px) { .agent__form { bottom: 16px; } }

/* ---------- адаптив под телефон ---------- */
.plancard .grow, .insight .grow { min-width: 0; }
.ptile .x { width: 32px; height: 32px; }
.colorin input { width: 40px; height: 40px; }
.sec-head a { padding: 8px 0; }
.link.tiny, .link.small { display: inline-block; padding: 8px 0; }
.vcard__meta span { font-size: 12px; }
.ptile span { white-space: normal; line-height: 1.2; font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 899px) {
  /* плеер не съедает весь экран: под ним видно название и кнопку публикации */
  .player { max-width: min(340px, calc(60vh * 9 / 16)); }
  .hero-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .hero-acts > :first-child { grid-column: 1 / -1; }
  .hero-acts .btn { width: 100%; padding: 12px 10px; font-size: 14px; }
  .insight { flex-wrap: wrap; }
  .insight .grow { flex: 1 1 200px; }
  .insight .btn { margin-left: 46px; }
}
@media (max-width: 520px) {
  /* в шапке телефона места нет: заголовок важнее плашки сервисов */
  .mode { display: none !important; }
  .tbl--roliki th:nth-child(2), .tbl--roliki td:nth-child(2),
  .tbl--roliki th:nth-child(4), .tbl--roliki td:nth-child(4) { display: none; }
  .plancard .li__thumb { width: 40px; height: 52px; }
  .plancard .btn--sm { padding: 9px 12px; }
}
@media (max-width: 899px) { .hero-acts .btn { white-space: nowrap; font-size: 13.5px; gap: 6px; } }
@media (max-width: 520px) { .row-between:has(> .chips) { flex-wrap: wrap; gap: 10px; } }
@media (max-width: 899px) {
  .hero-acts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-acts .btn { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 359px) { .hero-acts { grid-template-columns: 1fr; } }
