/* Dukon — дизайн-система «Спокойный» (вариант А).
   Один шрифт, тёплый светлый фон, почти чёрные кнопки, синий только у ссылок. */

:root {
  --bg: #F6F5F1;
  --surface: #FFFFFF;
  --panel: #EFEDE7;
  --ink: #151617;
  /* цвет бренда (08.10) — как фон знака «D»: синий переход */
  --dk: #0A6CFF;
  --dk-2: #00B4FF;
  --ink-2: #33353A;
  --muted: #5D6066;
  --faint: #6B6E74;
  --line: #E6E3DC;
  --line-2: #EFEDE8;
  --field: #D9D5CC;
  --ring: #A9A59C;
  --beige: #EAE3D8;
  --link: #2848C8;
  --link-hover: #1C359A;
  --ok: #2F6B45;
  --warn-bg: #FDF7EA;
  --warn-line: #D8A640;
  --warn-ink: #7A4E00;
  --err: #A33A2B;
  --brand: #B23A48;
  --r: 12px;
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- шапка ---------- */
.top { height: 64px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
       background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.logo:hover { color: var(--ink); }
.logo i { width: 28px; height: 28px; border-radius: 8px; overflow: hidden; display: block; flex: none; }
.logo i img { width: 100%; height: 100%; display: block; }
/* фирменная надпись DUKON — шрифт Tektur Black (OFL), только латиница, 6 КБ */
@font-face { font-family: "DukonWord"; src: url("/static/fonts/tektur-black-latin.ttf") format("truetype"); font-display: swap; }
.logo .wm, .wm { font-family: "DukonWord", var(--font); text-transform: uppercase; font-weight: 400; letter-spacing: .03em; font-size: 19px; line-height: 1; }
.top-right { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.top-right .muted { color: var(--muted); }
.top a { font-weight: 500; }

/* ---------- каркас мастера ---------- */
.shell { display: grid; grid-template-columns: 300px minmax(0, 1fr) 440px; min-height: calc(100vh - 64px); }
/* выбранный тариф в мастере */
.plan-strip { margin: 0 0 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface, #fff); }
.plan-strip summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 12px 14px; font-size: 14px; }
.plan-strip summary::-webkit-details-marker { display: none; }
.plan-strip .ps-l { color: var(--muted); }
.plan-strip .ps-t { color: var(--muted); font-size: 13px; }
.plan-strip .ps-c { margin-left: auto; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.plan-strip[open] .ps-c { visibility: hidden; }
.ps-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; padding: 0 14px 10px; }
.ps-opt { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font: inherit; cursor: pointer; color: var(--ink); }
.ps-opt b { font-size: 15px; } .ps-opt span { font-size: 13.5px; } .ps-opt small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.ps-opt.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.ps-note { margin: 0; padding: 0 14px 12px; font-size: 12.5px; color: var(--muted); }
.rail { padding: 36px 28px 28px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 22px; }
.rail-head b { display: block; font-size: 15px; font-weight: 600; }
.rail-head span { font-size: 13px; color: var(--muted); }
.rail ol { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.rail li { display: flex; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.rail li + li.now, .rail li.now + li { border-top-color: transparent; }
.rail li.now { margin: 0 -12px; padding: 11px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.rail b { display: block; font-size: 14px; font-weight: 500; }
.rail li.now b { font-weight: 600; }
.rail li.todo b { color: var(--ink-2); }
.rail small { font-size: 12px; color: var(--muted); }
.dot { margin-top: 4px; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.done .dot { background: var(--ink); }
.now .dot { border: 2px solid var(--ink); background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); }
.todo .dot { border: 1.5px solid var(--ring); }

.main { padding: 48px 56px 36px; display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.main > form, .stack { display: flex; flex-direction: column; gap: 28px; flex-grow: 1; }
.head { display: flex; flex-direction: column; gap: 10px; }
.head h1 { font-size: 40px; line-height: 1.08; font-weight: 500; letter-spacing: -0.03em; text-wrap: balance; }
.head p { font-size: 16px; color: var(--muted); max-width: 560px; text-wrap: pretty; }

.aside { border-left: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column;
         align-items: center; justify-content: center; gap: 16px; padding: 24px 0; position: sticky; top: 64px;
         height: calc(100vh - 64px); }
.aside .cap { font-size: 13px; color: var(--muted); }
.phone { width: 332px; height: 668px; padding: 6px; border-radius: 46px; background: var(--ink); flex-shrink: 0; }
.screen { position: relative; width: 320px; height: 656px; border-radius: 40px; overflow: hidden; background: #fff;
          padding: 22px 16px 0; display: flex; flex-direction: column; gap: 12px; }
@media (max-height: 760px) { .phone { transform: scale(.86); margin: -46px 0; } }

/* ---------- низ формы ---------- */
.foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 8px; }
.back { font-size: 14px; font-weight: 500; color: var(--ink); height: 44px; display: flex; align-items: center; }
.back:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- кнопки ---------- */
.btn { height: 46px; padding: 0 24px; border-radius: 10px; border: 0; background: var(--ink); color: #fff;
       font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
       cursor: pointer; white-space: nowrap; }
.btn:hover { color: #fff; background: #2A2C30; }
/* главные кнопки — в цвете бренда; «светлые» и «контурные» остаются как были */
.btn:not(.line):not(.light) { background: linear-gradient(135deg, var(--dk), var(--dk-2)); }
.btn:not(.line):not(.light):hover { background: linear-gradient(135deg, #0058DD, #009BE0); }
.btn.big { height: 52px; padding: 0 28px; font-size: 15px; }
/* длинная надпись на телефоне переносится, а не вылезает за экран (15.10: «Войти через Telegram и стать партнёром») */
@media (max-width: 520px) { .btn { max-width: 100%; } .btn.big { white-space: normal; height: auto; min-height: 52px; padding: 12px 20px; text-align: center; line-height: 1.3; } }
.btn.line { background: var(--surface); color: var(--ink); border: 1px solid var(--field); }
.btn.line:hover { background: var(--bg); color: var(--ink); }
.btn.sm { height: 38px; padding: 0 14px; font-size: 13px; border-radius: 9px; }
.btn[disabled] { opacity: .5; cursor: default; }

/* ---------- поля ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span, .label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.input { height: 52px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--field); background: var(--surface);
         font-size: 16px; width: 100%; outline: none; }
.input:focus { border: 1.5px solid var(--ink); padding: 0 13.5px; }
.input.lg { height: 56px; font-size: 18px; }
.input.mono { font-family: ui-monospace, Menlo, monospace; font-size: 14px; }
.input.ok { border: 1.5px solid var(--ok); }
.row { display: flex; gap: 8px; align-items: stretch; }
.w-460 { max-width: 460px; }
.w-560 { max-width: 560px; }

.note { font-size: 13px; color: var(--muted); }
.okline { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ok); }
.alert { padding: 12px 16px; border-radius: 10px; background: #FBEDEA; color: var(--err); font-size: 14px; border: 1px solid #F0CFC8; }
.hint { padding: 12px 16px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-ink); font-size: 14px; border: 1px solid #F0E4C8; }

/* ---------- чипы и цвета ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--field); background: var(--surface);
             display: inline-flex; align-items: center; font-size: 14px; cursor: pointer; }
.chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--link); outline-offset: 2px; }
.swatches { display: grid; grid-template-columns: repeat(9, 36px); gap: 10px; }
.swatch.own span { background: conic-gradient(from 90deg, #E0674F, #B08419, #2F6B45, #1E7A8C, #2848C8, #6B4FA3, #D0587E, #E0674F); }
.swatch.own input[type=color] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.swatch.own.on span { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink); }
.hexrow { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.hexdot { width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.hexrow .input { width: 130px; height: 42px; text-transform: uppercase; }
.other-kind { margin-top: 12px; max-width: 460px; }
.other-kind[hidden] { display: none; }
.swatch { position: relative; width: 36px; height: 36px; }
.swatch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.swatch span { display: block; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; }
.swatch input:checked + span { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink); }
.swatch input:focus-visible + span { outline: 2px solid var(--link); outline-offset: 4px; }
.logo-pick { display: flex; align-items: center; gap: 14px; }
.logo-pick .ava { width: 80px; height: 80px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 32px;
                  font-weight: 600; display: grid; place-items: center; overflow: hidden; }
.logo-pick .ava img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- плитки с картинками ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tile { position: relative; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
        display: flex; flex-direction: column; gap: 10px; cursor: pointer; }
.tile > input[type=checkbox] { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tile b { font-size: 15px; font-weight: 500; }
.tile small { font-size: 13px; color: var(--muted); }
.tile .tick { position: absolute; top: 14px; right: 14px; width: 22px; height: 22px; border-radius: 50%;
              border: 1.5px solid #C9C4B8; display: grid; place-items: center; }
.tile .tick svg { opacity: 0; }
.tile:has(> input:checked), .tile.on { border: 1.5px solid var(--ink); padding: 15.5px; }
.tile:has(> input:checked) .tick, .tile.on .tick { background: var(--ink); border-color: var(--ink); }
.tile:has(> input:checked) .tick svg, .tile.on .tick svg { opacity: 1; }
.tile:has(> input:focus-visible) { outline: 2px solid var(--link); outline-offset: 2px; }
.tile.later { border-style: dashed; border-color: #C9C4B8; background: transparent; cursor: default; }
.tile .more { display: none; flex-direction: column; gap: 8px; position: relative; z-index: 1; cursor: auto; }
.tile:has(> input:checked) .more { display: flex; }
.tile .more .input { height: 40px; font-size: 14px; border-radius: 9px; }

/* ---------- вкладки ---------- */
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); }
.tabs a { height: 40px; display: flex; align-items: center; font-size: 14px; color: var(--muted); margin-bottom: -1px; }
.tabs a.on { color: var(--ink); font-weight: 500; border-bottom: 2px solid var(--ink); }
.drop { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 12px; border: 1px dashed #C9C4B8;
        background: var(--surface); }
.drop b { font-weight: 500; font-size: 14px; }
.drop .note { margin-top: 2px; }

/* ---------- таблица товаров ---------- */
.table { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tr { display: grid; grid-template-columns: 36px minmax(0, 1fr) 120px 130px 32px; align-items: center; gap: 14px;
      padding: 9px 18px; border-bottom: 1px solid var(--line-2); }
.tr.th { padding: 10px 18px; font-size: 12px; color: var(--muted); border-bottom-color: var(--line); }
.tr.warn { background: var(--warn-bg); border-bottom-color: #F0E4C8; }
.tr .thumb { width: 36px; height: 36px; border-radius: 7px; background: var(--beige); overflow: hidden; }
.tr .thumb img { width: 100%; height: 100%; object-fit: cover; }
.tr .nm { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tr .nm small { display: block; font-size: 12px; color: var(--warn-ink); }
.tr .cat { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr .price { height: 36px; width: 130px; padding: 0 10px; border-radius: 8px; border: 1px solid transparent; background: transparent;
             text-align: right; font-size: 14px; font-variant-numeric: tabular-nums; }
.tr .price:hover { border-color: var(--line); }
.tr .price:focus { border-color: var(--ink); background: #fff; outline: none; }
.tr.warn .price { border-color: var(--warn-line); background: #fff; }
.tr .del { position: relative; width: 28px; height: 28px; }
.tr .del input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.tr .del span { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: var(--faint); }
.tr .del input:checked + span { background: #FBEDEA; color: var(--err); }
.tr:has(.del input:checked) .nm { text-decoration: line-through; color: var(--faint); }
.table .more { padding: 11px 18px; font-size: 13px; color: var(--muted); }
.table details summary { padding: 11px 18px; font-size: 13px; color: var(--link); cursor: pointer; list-style: none; }

/* ---------- кэшбэк ---------- */
.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; position: relative; }
.switch input { position: absolute; opacity: 0; }
.switch i { width: 44px; height: 26px; padding: 3px; border-radius: 999px; background: #CFCBC2; display: flex; transition: background .15s; }
.switch i::after { content: ""; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + i { background: var(--ink); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--link); outline-offset: 2px; }
.pcts { display: grid; grid-template-columns: repeat(4, 96px) 140px; gap: 8px; }
.pct { position: relative; }
.pct input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pct span { height: 64px; border-radius: 12px; border: 1px solid var(--field); background: var(--surface); display: grid;
            place-items: center; font-size: 22px; font-weight: 500; cursor: pointer; }
.pct input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.pct input:focus-visible + span { outline: 2px solid var(--link); outline-offset: 2px; }
.custom { height: 64px; padding: 0 14px; border-radius: 12px; border: 1px dashed var(--ring); background: var(--surface);
          display: flex; align-items: center; gap: 4px; }
.custom input { width: 100%; min-width: 0; border: 0; background: transparent; font-size: 20px; font-weight: 500; text-align: right; outline: none; }
.custom span { font-size: 20px; font-weight: 500; color: var(--muted); }
.custom:focus-within { border: 1.5px solid var(--ink); }
.example { padding: 22px 26px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.example .nums { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.example small { display: block; font-size: 13px; color: var(--muted); }
.example b { font-size: 28px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.example .gain { color: var(--ok); }
.balance { display: flex; align-items: center; gap: 20px; }
.balance .mid { flex-grow: 1; max-width: 200px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.balance .mid i { align-self: stretch; border-top: 1.5px dashed var(--ring); }
.balance .end { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }

/* ---------- бот: шаги-картинки ---------- */
.howto { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.howto li { padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.howto .t { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.num { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600;
       display: grid; place-items: center; flex-shrink: 0; }
.pic { height: 148px; border-radius: 10px; background: #EFECE5; padding: 12px; display: flex; flex-direction: column; justify-content: center; gap: 6px; font-size: 12px; }
.bub { padding: 6px 10px; border-radius: 10px; max-width: 90%; }
.bub.me { align-self: flex-end; background: #DDE8D2; border-bottom-right-radius: 3px; }
.bub.them { align-self: flex-start; background: #fff; border-bottom-left-radius: 3px; }
.mark { align-self: flex-start; padding: 3px 6px; border-radius: 4px; background: #F6DF9A; font-family: ui-monospace, Menlo, monospace; font-size: 11px; }

/* ---------- вход ---------- */
.tg-login { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.qr { width: 172px; height: 172px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); padding: 10px; }
.qr img { width: 100%; height: 100%; }
.wait { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.wait i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* ---------- превью магазина ---------- */
.s-head { display: flex; align-items: center; gap: 10px; }
.s-ava { width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 15px; font-weight: 600;
         display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.s-ava img { width: 100%; height: 100%; object-fit: cover; }
.s-head b { display: block; font-size: 15px; font-weight: 600; }
.s-head small { font-size: 11px; color: var(--faint); }
.s-search { height: 40px; border-radius: 10px; background: #F4F3EF; display: flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 13px; color: var(--faint); }
.s-chips { display: flex; gap: 6px; overflow: hidden; }
.s-chips span { padding: 7px 12px; border-radius: 999px; background: #F4F3EF; font-size: 12px; white-space: nowrap; }
.s-chips span.on { background: var(--brand); color: #fff; }
.s-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
.s-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.s-img { height: 124px; border-radius: 12px; background: #EDE6DA; overflow: hidden; }
.s-img img { width: 100%; height: 100%; object-fit: cover; }
.s-card span { font-size: 12px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.s-card b { font-size: 13px; }
.s-bar { position: absolute; left: 12px; right: 12px; bottom: 14px; height: 50px; border-radius: 14px; background: var(--brand); color: #fff;
         display: flex; align-items: center; justify-content: space-between; padding: 0 16px; font-size: 14px; font-weight: 500; }
.s-bar.center { justify-content: center; }
.s-banner { height: 150px; border-radius: 18px; background: var(--brand); padding: 20px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; color: #fff; }
.s-banner b { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.s-banner span { font-size: 13px; opacity: .9; }
.sk { background: #EEEBE4; border-radius: 4px; }
.sk.l { background: #F4F3EF; }
.s-title { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; padding-top: 4px; }
.s-opt { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); font-size: 14px; }
.s-opt.on { border: 1.5px solid var(--brand); }
.s-opt i { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--ring); flex-shrink: 0; }
.s-opt.on i { border: 5px solid var(--brand); }
.s-opt em { font-style: normal; margin-left: auto; font-size: 13px; color: var(--faint); }
.s-sum { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line-2); font-size: 14px; }
.s-sum div { display: flex; justify-content: space-between; }
.s-sum span { color: var(--faint); }
.s-points { border-radius: 18px; background: var(--brand); color: #fff; padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.s-points small { font-size: 13px; opacity: .85; }
.s-points b { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; }
.chat { position: absolute; inset: 0; background: #E7E2D8; display: flex; flex-direction: column; }
.chat-top { height: 76px; padding: 22px 16px 10px; background: #fff; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.chat-body { flex-grow: 1; padding: 16px 14px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }
.chat-msg { align-self: flex-start; max-width: 86%; border-radius: 14px 14px 14px 4px; background: #fff; overflow: hidden; }
.chat-msg .cover { height: 120px; background: var(--brand); color: #fff; font-size: 26px; font-weight: 600; display: grid; place-items: center; }
.chat-msg p { padding: 10px 12px; font-size: 13px; line-height: 1.45; }
.chat-btn { align-self: flex-start; width: 86%; height: 40px; border-radius: 10px; background: #fff; font-size: 13px; font-weight: 500; display: grid; place-items: center; }
.chat-bottom { height: 76px; padding: 10px 12px 22px; background: #fff; display: flex; align-items: center; gap: 8px; }
.chat-bottom span:first-child { height: 36px; padding: 0 14px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 500; display: flex; align-items: center; }
.chat-bottom span:last-child { flex-grow: 1; height: 36px; border-radius: 18px; background: #F4F3EF; display: flex; align-items: center; padding: 0 14px; font-size: 13px; color: var(--faint); }

/* ---------- страницы без мастера ---------- */
.page { max-width: 1248px; margin: 0 auto; padding: 48px 32px 44px; display: flex; flex-direction: column; gap: 40px; }
.intro { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 72px; padding: 64px 96px; max-width: 1440px; margin: 0 auto; }
.intro-left { display: flex; flex-direction: column; gap: 28px; }
.intro h1 { font-size: 50px; line-height: 1.04; font-weight: 500; letter-spacing: -0.035em; text-wrap: balance; }
.intro .lead { font-size: 17px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.needs { display: flex; flex-direction: column; gap: 10px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.needs b { font-size: 13px; font-weight: 600; color: var(--ink); }
.needs div { display: flex; gap: 12px; }
.needs div span { width: 18px; color: var(--faint); }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card { padding: 22px 24px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.card h2, .card h3 { font-size: 16px; font-weight: 600; }
.card p { font-size: 14px; line-height: 1.45; color: var(--muted); }
.card .demo { margin-top: auto; padding: 10px 12px; border-radius: 10px; background: var(--bg); font-size: 13px; display: flex; align-items: center; gap: 10px; }
.status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ok); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.soon { color: var(--faint); }
.card .act { margin-top: 8px; font-size: 14px; font-weight: 500; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.hero h1 { font-size: 56px; line-height: 1; font-weight: 500; letter-spacing: -0.04em; }
.linkbox { display: flex; align-items: center; gap: 20px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.linkbox .qr { width: 112px; height: 112px; padding: 6px; border-radius: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.later { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.later > div { display: flex; align-items: baseline; gap: 16px; }
.later p { font-size: 13px; color: var(--muted); }

.mprog, .mbar, .peek { display: none; }

/* ---------- узкая середина: подсказки про бота — списком ---------- */
@media (max-width: 1400px) {
  .howto { grid-template-columns: 1fr; gap: 8px; }
  .howto li { flex-direction: row; align-items: center; padding: 10px; }
  .howto .pic { width: 120px; height: 84px; flex-shrink: 0; padding: 6px; font-size: 10px; gap: 3px; order: -1; }
  .howto .pic .bub { padding: 3px 6px; }
  .howto .pic .btn { height: 28px; font-size: 11px; padding: 0 8px; }
  .howto li:first-child .pic > div { display: none !important; }
  .howto li:first-child .pic { padding: 8px !important; }
}

/* ---------- планшет ---------- */
@media (max-width: 1180px) {
  .shell { grid-template-columns: 260px minmax(0, 1fr); }
  /* 18.10: предпросмотр не прячем — маленький телефон над формой меняется вместе с ответами; нажали — во весь экран */
  .aside { order: -1; position: static; height: auto; flex-direction: row; justify-content: flex-start; gap: 16px; padding: 12px 20px;
           border-left: 0; border-bottom: 1px solid var(--line); cursor: zoom-in; }
  .aside .phone { transform: scale(.36); transform-origin: left top; margin: 0 calc(-332px * .64) calc(-668px * .64) 0; pointer-events: none; }
  .aside .cap { font-size: 13px; line-height: 1.4; max-width: 220px; }
  .aside .cap::after { content: " · " attr(data-zoom); color: var(--ink); font-weight: 600; }
  .aside.open { display: flex; position: fixed; inset: 0; z-index: 20; height: auto; top: 0; background: rgba(21, 22, 23, .55);
                flex-direction: column; justify-content: center; align-items: center; cursor: zoom-out; border: 0; padding: 24px 0; }
  .aside.open .phone { transform: none; margin: 0; pointer-events: auto; }
  .aside.open .cap { color: #fff; max-width: none; }
  .aside.open .cap::after { content: ""; }
  .peek { display: inline-flex; }
  .intro { grid-template-columns: 1fr; padding: 48px 32px; gap: 40px; }
}

/* ---------- телефон ---------- */
@media (max-width: 760px) {
  body { font-size: 15px; }
  .top { height: 56px; padding: 0 16px; }
  .top-right .muted, .top-right .quit { display: none; }
  .shell { display: block; }
  .rail { display: none; }
  .mprog { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; padding: 10px 16px 0; }
  .mprog i { height: 3px; border-radius: 2px; background: #E1DDD4; }
  .mprog i.d { background: var(--ink); }
  .mprog i.n { background: linear-gradient(90deg, var(--ink) 50%, #E1DDD4 50%); }
  .main { padding: 20px 16px 120px; gap: 22px; }
  .main > form, .stack { gap: 22px; }
  .head h1 { font-size: 28px; }
  .head p { font-size: 15px; }
  .foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding: 12px 16px 28px; background: var(--bg);
          border-top: 1px solid var(--line); }
  .foot .btn { flex-grow: 1; height: 52px; font-size: 16px; border-radius: 12px; }
  .foot .back { display: none; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .tile { padding: 12px 8px; align-items: center; text-align: center; }
  .tile:has(> input:checked), .tile.on { padding: 11.5px 7.5px; }
  .tile svg.ill { width: 56px; height: 42px; }
  .tile small { font-size: 11px; }
  .tile b { font-size: 13px; }
  .tile .tick { top: 8px; right: 8px; width: 18px; height: 18px; }
  .tile .more { text-align: left; }
  .howto { grid-template-columns: 1fr; gap: 8px; }
  .howto li { flex-direction: row; align-items: center; padding: 10px; }
  .howto .pic { width: 104px; height: 76px; flex-shrink: 0; padding: 6px; font-size: 10px; gap: 3px; order: -1; }
  .howto .pic .bub { padding: 3px 6px; }
  .pcts { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .pct span { height: 60px; font-size: 20px; }
  .custom { height: 60px; padding: 0 8px; }
  .custom input, .custom span { font-size: 15px; }
  .example { padding: 18px; }
  .example b { font-size: 22px; }
  .balance { padding: 14px 16px; border-radius: 16px; background: #EFECE5; justify-content: space-between; }
  .balance .end { flex-direction: column; gap: 4px; font-size: 12px; }
  .tr { grid-template-columns: 40px minmax(0, 1fr) 96px 28px; padding: 10px 12px; }
  .tr .cat { display: none; }
  .tr .price { width: 96px; }
  .tr.th { display: none; }
  .tg-login .qr { display: none; }
  .intro { padding: 12px 16px 120px; gap: 20px; }
  .intro h1 { font-size: 30px; }
  .intro .lead, .needs { display: none; }
  .intro-left .foot .note { display: none; }
  .cards { gap: 10px; }
  .card { padding: 10px; }
  .card p { display: none; }
  .card h2 { font-size: 14px; order: 2; }
  .card .demo { order: 1; margin: 0; height: 96px; }
  .page { padding: 32px 16px 120px; gap: 24px; }
  .hero h1 { font-size: 36px; }
  .linkbox { width: 100%; }
  .linkbox .qr { width: 84px; height: 84px; }
  .grid3 { grid-template-columns: 1fr; }
  .later { grid-template-columns: 1fr; gap: 16px; }
  .swatches { grid-template-columns: repeat(9, 1fr); gap: 6px; }
  .hide-m { display: none !important; }
  .card .demo { font-size: 11px; }
  .swatch, .swatch span { width: 32px; height: 32px; }
}

/* мастер: копирование в шаге «Бот», ручной ввод и «Пропустить» в шаге «Товары» */
.bub.copy { border: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; display: inline-flex; align-items: center; gap: 8px; }
.bub.copy i { font-style: normal; font-size: 10px; opacity: .55; }
.bub.copy.done i { opacity: 1; color: var(--ok); font-weight: 600; }
.input.checking { border-color: var(--ok); }
.manual { display: flex; flex-direction: column; gap: 10px; }
.manual .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.manual .btn { align-self: flex-start; }
.skip { margin-left: auto; margin-right: 16px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.skip:hover { color: var(--ink); }
@media (max-width: 760px) {
  .manual .row { grid-template-columns: 1fr; }
  .foot .skip { flex-basis: 100%; order: 3; margin: 6px 0 0; text-align: center; }
}

/* переключатель языка */
.lang { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--panel); gap: 2px; }
.lang a { padding: 5px 9px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); line-height: 1; }
.lang a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.lang a:hover { color: var(--ink); }

/* ---------- кабинет, оплата, панель платформы ---------- */
.pwrap { max-width: 1040px; margin: 0 auto; padding: 36px 24px 64px; display: flex; flex-direction: column; gap: 20px; }
.pnav { display: flex; gap: 18px; align-items: center; font-size: 14px; }
.pnav a { color: var(--ink-2); font-weight: 500; }
.pnav a.on { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.pnav a.muted { color: var(--muted); }
.ph1 { font-size: 34px; line-height: 1.1; font-weight: 500; letter-spacing: -.03em; margin: 0; }
.psub { color: var(--muted); font-size: 16px; margin-top: 6px; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.pcard h2 { font-size: 18px; font-weight: 600; margin: 0 0 12px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.subline { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.subline b { font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.pill.trial { background: #E4EAFB; color: #1C359A; }
.pill.active { background: #E6F0E8; color: #2F6B45; }
.pill.past_due { background: var(--warn-bg); color: var(--warn-ink); }
.pill.suspended { background: #FBE7E4; color: #A33A2B; }
.pill.none { background: var(--panel); color: var(--muted); }
.shoprow { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.shoprow:first-of-type { border-top: 0; }
.shoprow .sname { flex: 1; min-width: 180px; }
.shoprow .sname b { display: block; font-size: 16px; }
.shoprow .sname small { color: var(--muted); }
.acts { display: flex; gap: 8px; flex-wrap: wrap; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 18px; background: var(--surface);
        border: 1.5px solid var(--line); cursor: pointer; }
.plan.on { border-color: var(--ink); }
.plan input { position: absolute; opacity: 0; }
.plan b { font-size: 18px; }
.plan .pp { font-size: 26px; font-weight: 500; letter-spacing: -.02em; }
.plan .pp small { font-size: 13px; color: var(--muted); font-weight: 400; }
.plan ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.periods { display: flex; gap: 8px; flex-wrap: wrap; }
.periods label { padding: 9px 14px; border-radius: 12px; border: 1.5px solid var(--line); cursor: pointer; font-weight: 500; font-size: 14px; }
.periods label.on { border-color: var(--ink); }
.periods input { position: absolute; opacity: 0; }
.periods em { font-style: normal; color: var(--ok); font-size: 12px; margin-left: 4px; }
.paybox { display: flex; flex-direction: column; gap: 10px; }
.cardnum { font-family: ui-monospace, Menlo, monospace; font-size: 20px; letter-spacing: .06em; }
.ptable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ptable th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.ptable td { padding: 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.kpi b { display: block; font-size: 24px; font-weight: 500; letter-spacing: -.02em; }
.kpi small { color: var(--muted); font-size: 13px; }
.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.inline select, .inline input { height: 34px; border: 1px solid var(--field); border-radius: 9px; padding: 0 8px; background: #fff; font-size: 13px; }
.doc { max-width: 760px; }
.doc h2 { font-size: 20px; margin: 24px 0 8px; font-weight: 600; }
.doc p, .doc li { color: var(--ink-2); line-height: 1.6; }
@media (max-width: 760px) {
  .plans { grid-template-columns: 1fr; }
  .pnav { gap: 12px; font-size: 13px; }
  .top .lang { display: none; }
  .ptable { font-size: 13px; display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }   /* широкая таблица листается сама, страница не едет */
  .ptable .hide-m { display: none; }
}
@media (max-width: 400px) { .pnav { gap: 8px; font-size: 12.5px; } .top-right { min-width: 0; } }

/* ---------- карта и автопродление ---------- */
.cardwrap { max-width: 520px; display: flex; flex-direction: column; gap: 16px; }
.terms-box { display: flex; flex-direction: column; gap: 8px; }
.tline { display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.tline b { font-size: 18px; font-weight: 600; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.agree input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--ink); }
.lose { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.linkbtn { background: none; border: 0; padding: 6px 0; color: var(--muted); text-decoration: underline; font: inherit; font-size: 14px; cursor: pointer; align-self: flex-start; }
.nocard { border: 2px solid var(--ink); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.pill.no_card { background: #FBEDEA; color: var(--err); }
.plan li.miss { color: var(--muted); text-decoration: line-through; opacity: .7; }

/* ---------- тарифы: Бронза → Золото → Алмаз. Чем выше тариф, тем богаче карточка ---------- */
.tier { position: relative; overflow: visible; isolation: isolate; }
.tier-head { display: flex; gap: 14px; align-items: center; }
.tier-head > div { display: flex; flex-direction: column; gap: 3px; }
.tier .emb { width: 50px; height: 50px; flex-shrink: 0; filter: drop-shadow(0 4px 8px rgba(0,0,0,.14)); }
.tier .price-tag { z-index: 2; }

/* Бронза — тёплая медь, спокойно */
.tier.t-start { background: linear-gradient(165deg, #FFF9F3 0%, #F7E7D7 100%); border: 1px solid #E6C7A8; }
.tier.t-start b { color: #7E4119; }
.tier.t-start li svg { color: #B0632E; }
.tier.t-start .tier-btn { background: transparent; color: #7E4119; border: 1.5px solid #C98D5E; box-shadow: none; }
.tier.t-start .tier-btn:hover { background: #F3DDC8; }

/* Золото — главный: золотая рамка, свечение, блик */
.tier.t-business { border: 2px solid transparent;
  background: linear-gradient(165deg, #FFFCEE 0%, #FFF3C9 55%, #FBE39A 100%) padding-box,
              linear-gradient(135deg, #FFF0B8, #D9A21C 30%, #FFF4C8 55%, #B8860B 80%, #F5D46A) border-box;
  box-shadow: 0 26px 60px -22px rgba(201, 146, 20, .6), 0 0 0 6px rgba(245, 212, 106, .18); }
.tier.t-business b { color: #6E4B00; }
.tier.t-business li svg { color: #B07D0C; }
.tier.t-business .price-tag { background: linear-gradient(135deg, #2A1F00, #5A4000); color: #FFE08A; }
.tier.t-business .tier-btn { background: linear-gradient(135deg, #F7D56B, #E1A92A 50%, #C98E12); color: #2A1D00; border: 0;
  box-shadow: 0 10px 24px -10px rgba(176, 125, 12, .9), inset 0 1px 0 rgba(255,255,255,.6); font-weight: 600; }
.tier.t-business .tier-btn:hover { filter: brightness(1.05); }
.tier.t-business::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.8) 50%, transparent 62%) no-repeat;
  background-size: 260% 100%; animation: goldshine 4.5s ease-in-out infinite; }
@keyframes goldshine { 0%, 50% { background-position: 130% 0; } 100% { background-position: -30% 0; } }

/* Алмаз — тёмный, переливается, искры */
.tier.t-pro { color: #EEF3FF; border: 1.5px solid transparent;
  background: radial-gradient(120% 80% at 100% 0%, rgba(126, 178, 255, .32), transparent 60%),
              radial-gradient(90% 70% at 0% 100%, rgba(255, 150, 220, .22), transparent 60%),
              linear-gradient(165deg, #151A3A 0%, #0B0E22 100%) padding-box,
              linear-gradient(135deg, #A8F4FF, #B6A2FF 35%, #FF9FDF 65%, #8FFFE0) border-box;
  box-shadow: 0 26px 60px -24px rgba(90, 80, 200, .65); }
.tier.t-pro b { color: #fff; }
.tier.t-pro small, .tier.t-pro .note, .tier.t-pro .price-sum span, .tier.t-pro .pp small { color: rgba(226, 232, 255, .68); }
.tier.t-pro ul, .tier.t-pro li { color: rgba(236, 240, 255, .92); }
.tier.t-pro li svg { color: #8FF0FF; }
.tier.t-pro .price-sum, .tier.t-pro .pp { background: linear-gradient(90deg, #C9F7FF, #D8CCFF 50%, #FFC6EC); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tier.t-pro .price-sum span { -webkit-text-fill-color: rgba(226, 232, 255, .68); }
.tier.t-pro .price-tag { background: linear-gradient(135deg, #A8F4FF, #B6A2FF, #FF9FDF); color: #120F2E; }
.tier.t-pro .tier-btn { background: linear-gradient(135deg, #E9FBFF, #D6CCFF 50%, #FFD6F0); color: #120F2E; border: 0; font-weight: 600;
  box-shadow: 0 10px 28px -10px rgba(182, 162, 255, .9); }
.tier.t-pro .tier-btn:hover { filter: brightness(1.06); }
.tier.t-pro .emb { filter: drop-shadow(0 0 12px rgba(168, 244, 255, .55)); animation: gem 5s ease-in-out infinite; }
@keyframes gem { 0%, 100% { transform: rotate(-4deg) translateY(0); } 50% { transform: rotate(4deg) translateY(-3px); } }
.spark { position: absolute; width: 12px; height: 12px; pointer-events: none; z-index: 1;
  background: radial-gradient(circle, #fff 0 1.5px, transparent 2px), linear-gradient(#fff, #fff) center / 1.5px 100% no-repeat, linear-gradient(#fff, #fff) center / 100% 1.5px no-repeat;
  border-radius: 50%; opacity: 0; animation: twinkle 3.2s ease-in-out infinite; }
.spark.s1 { top: 18%; right: 12%; } .spark.s2 { top: 44%; right: 7%; animation-delay: .8s; transform: scale(.7); }
.spark.s3 { bottom: 22%; right: 20%; animation-delay: 1.6s; } .spark.s4 { top: 10%; left: 46%; animation-delay: 2.3s; transform: scale(.6); }
@keyframes twinkle { 0%, 100% { opacity: 0; } 45%, 55% { opacity: .9; } }

/* выбор тарифа на странице оплаты */
.plan.tier { padding-top: 22px; }
.plan.tier ul { list-style: none; padding-left: 0; gap: 6px; }
.plan.tier li::before { content: "✓ "; font-weight: 700; }
.plan.tier li.miss::before { content: ""; }
.plan.t-start li::before { color: #B0632E; } .plan.t-business li::before { color: #B07D0C; } .plan.t-pro li::before { color: #8FF0FF; }
.plan.tier.on { outline: 3px solid var(--ink); outline-offset: 3px; }
.plan.t-pro.on { outline-color: #B6A2FF; }
.plan.tier .price-tag { position: absolute; top: -11px; left: 18px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .tier.t-business::after, .tier.t-pro .emb, .spark { animation: none; }
  .spark { opacity: .6; }
}
.tier-value { align-self: flex-start; padding: 6px 11px; border-radius: 10px; font-size: 13px; font-weight: 600; line-height: 1.35;
  color: #5A3E00; background: linear-gradient(135deg, rgba(255,255,255,.75), rgba(255,236,170,.9)); border: 1px solid #E9C45A; }
.tier-nudge { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.4;
  color: #5A3E00; background: linear-gradient(135deg, #FFF8DC, #FCE9A8); border: 1px solid #EBCB6B; }
.tier-nudge .emb { width: 30px; height: 30px; filter: none; }
.tier-nudge span { font-weight: 500; }
.doc h1 { margin-bottom: 6px; }
.doc ul { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.doc .toc { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 14px 16px; margin: 14px 0 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.doc .toc a { color: var(--ink-2); }
.doc h2 { scroll-margin-top: 80px; }
.doc .reqs { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.doc .reqs p { margin: 4px 0; }
.req-miss { background: #FFF1C2; color: #6B4E00; padding: 0 4px; border-radius: 4px; }
.accept { font-size: 13px; margin-top: 10px; }
.accept a { color: inherit; text-decoration: underline; }
.buyers .langs { font-size: 14px; margin-bottom: 8px; } .buyers .langs a { color: var(--muted); } .buyers .langs a.on { color: var(--ink); font-weight: 600; }
.buyers h2 { font-size: 18px; }

/* ---------- AI-кредиты: строго, как баланс в банковском кабинете ---------- */
.credits { display: flex; flex-direction: column; gap: 12px; }
.cr-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap;
  padding: 18px 20px; border-radius: 14px; background: #151617; color: #fff; }
.cr-label { font-size: 13px; color: rgba(255,255,255,.62); letter-spacing: .02em; }
.cr-total { font-size: 34px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.cr-month { min-width: 200px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: rgba(255,255,255,.62); }
.cr-month b { color: #fff; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cr-month small { color: rgba(255,255,255,.55); font-weight: 400; }
.cr-bar { height: 6px; border-radius: 99px; background: rgba(127,127,127,.28); overflow: hidden; }
.cr-bar i { display: block; height: 100%; border-radius: 99px; background: #7FD1A8; }
.cr-use td:nth-child(2), .cr-use td:nth-child(3), .cr-use th:nth-child(2), .cr-use th:nth-child(3) { text-align: right; font-variant-numeric: tabular-nums; }
.cr-buy { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.cr-buy h3 { margin: 0; }
.cr-row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.cr-price { display: flex; flex-direction: column; min-width: 150px; }
.cr-price span { font-size: 13px; color: var(--muted); } .cr-price b { font-size: 22px; font-variant-numeric: tabular-nums; }
.cr-price em { font-style: normal; font-size: 13px; color: var(--ok); min-height: 16px; }
.cr-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.cr-presets button { padding: 7px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); font: inherit; font-size: 13.5px; cursor: pointer; }
.cr-presets button:hover { border-color: var(--ink); }
.cr-mini { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; margin-top: 14px; padding: 12px 14px;
  border-radius: 12px; background: #151617; color: #fff; }
.cr-mini span { font-size: 13px; color: rgba(255,255,255,.62); } .cr-mini b { font-size: 18px; font-variant-numeric: tabular-nums; }
.cr-mini .cr-bar { grid-column: 1 / -1; } .cr-mini em { grid-column: 1 / -1; font-style: normal; color: #FFB4A8; font-size: 13px; }
.cost { color: #9A6B05; }
.eco-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0 8px; }
.eco-grid div { padding: 14px; border-radius: 12px; background: var(--bg); display: flex; flex-direction: column; gap: 3px; }
.eco-grid span { font-size: 13px; color: var(--muted); } .eco-grid b { font-size: 22px; font-variant-numeric: tabular-nums; }
.eco-grid small { font-size: 12.5px; color: var(--muted); }
.eco-grid .minus b { color: var(--err); } .eco-grid .total { background: #151617; } .eco-grid .total b, .eco-grid .total span { color: #fff; }
.eco-grid .total small { color: rgba(255,255,255,.6); }
@media (max-width: 760px) { .eco-grid { grid-template-columns: 1fr 1fr; } }
.funnel { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.fstep { position: relative; display: grid; grid-template-columns: 1fr auto 150px; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 10px; overflow: hidden; background: var(--bg); }
.fstep .fbar { position: absolute; inset: 0 auto 0 0; background: rgba(47, 107, 69, .13); border-radius: 10px; }
.fstep span, .fstep b, .fstep em { position: relative; }
.fstep b { font-variant-numeric: tabular-nums; } .fstep em { font-style: normal; font-size: 13px; color: var(--muted); text-align: right; }
@media (max-width: 640px) { .fstep { grid-template-columns: 1fr auto; } .fstep em { grid-column: 1 / -1; text-align: left; } }

/* ---------- счёт на оплату (печать) ---------- */
.invoice { max-width: 820px; margin: 0 auto; padding: 24px 16px 60px; }
.inv-actions { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.inv-sheet { background: #fff; color: #111; border: 1px solid var(--line); border-radius: 12px; padding: 36px; font-size: 14px; line-height: 1.5; }
.inv-top { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.inv-brand { font-size: 22px; } .inv-seller { color: #555; } .inv-no { text-align: right; font-size: 16px; }
.inv-parties, .inv-items { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
.inv-parties th { width: 120px; text-align: left; vertical-align: top; padding: 6px 10px 6px 0; color: #555; font-weight: 500; }
.inv-parties td { padding: 6px 0; }
.inv-items th, .inv-items td { border: 1px solid #ccc; padding: 8px 10px; text-align: left; }
.inv-items th { background: #f3f3f3; font-weight: 600; }
.inv-items td:nth-child(n+3), .inv-items th:nth-child(n+3) { text-align: right; white-space: nowrap; }
.inv-total { text-align: right; font-size: 16px; margin-bottom: 16px; }
.inv-note { color: #555; font-size: 13px; }
.inv-sign { display: flex; justify-content: space-between; gap: 20px; margin-top: 48px; flex-wrap: wrap; }
@media print {
  .no-print { display: none !important; }
  body { background: #fff !important; }
  .invoice { padding: 0; max-width: none; }
  .inv-sheet { border: 0; padding: 0; }
  .req-miss { background: none; }
}
@media (max-width: 640px) {
  .inv-sheet { padding: 18px; font-size: 13px; overflow-x: auto; }
  .inv-items th, .inv-items td { padding: 6px; }
  .inv-top { flex-direction: column; } .inv-no { text-align: left; }
}
.ig-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 10px; padding: 10px 12px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(254, 218, 117, .18), rgba(214, 41, 118, .10), rgba(79, 91, 213, .10)); font-size: 14px; }
.ig-row > span:not(.ig-ico) { flex: 1; min-width: 180px; }
.ig-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #fff;
  background: linear-gradient(45deg, #F58529, #DD2A7B 50%, #8134AF); }
.pill.pilot { background: #EDE7FF; color: #4B2FB3; }
.stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.stars input { position: absolute; opacity: 0; }
.stars label { font-size: 28px; line-height: 1; color: #D9D6CE; cursor: pointer; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: #E8B634; }
.rv-item { padding: 12px 0; border-top: 1px solid var(--line); }
.rv-item p { margin: 6px 0 8px; color: var(--ink-2); }
/* Выбор языка: RU UZ KG TJ KZ */
.lang-pick { position: relative; }
.lang-pick summary { list-style: none; cursor: pointer; padding: 7px 11px; border-radius: 10px; background: var(--panel); font-size: 12.5px; font-weight: 600; color: var(--ink); }
.lang-pick summary::-webkit-details-marker { display: none; }
.lang-pick summary::after { content: " ▾"; color: var(--muted); }
.lang-pick > div { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 150px; padding: 6px; border-radius: 14px; background: var(--surface); box-shadow: 0 12px 30px rgba(0,0,0,.14); display: flex; flex-direction: column; }
.lang-pick a { padding: 9px 12px; border-radius: 9px; font-size: 14px; color: var(--ink); }
.lang-pick a:hover { background: var(--panel); }
.lang-pick a.on { font-weight: 600; }

/* Ещё возможности */
.mx-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mx { padding: 22px; border-radius: 20px; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.mx b { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.mx p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.mx-ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 4px; background: var(--panel); color: var(--ink); }
@media (max-width: 920px) { .mx-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .mx-grid { grid-template-columns: 1fr; } }
.more-x { padding-top: clamp(56px, 8vw, 104px) !important; }

/* Личная скидка и акции */
.offer-bar { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin: 0 0 22px; border-radius: 18px; background: linear-gradient(135deg, #FFF3E6, #FFE3EC); border: 1px solid #F6C9B8; }
.ob-fire { font-size: 26px; }
.ob-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ob-text b { font-size: 16px; }
.ob-text small { color: #7a5b52; font-size: 13.5px; line-height: 1.4; }
.ob-time { font: 700 24px/1 ui-monospace, Menlo, monospace; color: #C0392B; letter-spacing: .02em; white-space: nowrap; }
.price-old { color: var(--muted); font-weight: 400; font-size: .62em; margin-right: 8px; text-decoration-thickness: 2px; }
.promo-line { margin: 6px 0; padding: 8px 12px; border-radius: 12px; background: var(--panel); font-size: 14px; }
.promo-line.hot { background: #FFF1E6; color: #8a3b12; }
@media (max-width: 560px) { .offer-bar { flex-wrap: wrap; } .ob-time { font-size: 20px; } }
.ad-box { display: flex; gap: 14px; align-items: center; justify-content: space-between; margin-top: 18px; padding: 14px 16px; border: 1px dashed var(--line, #ddd); border-radius: 12px; }
.ad-box p { margin: 4px 0 0; }
@media (max-width: 640px) { .ad-box { flex-direction: column; align-items: stretch; } }
.ig-ico.wa { background: #25D366; }
/* Приглашения и партнёры */
.inv-row { display: flex; gap: 8px; align-items: center; margin: 10px 0 12px; flex-wrap: wrap; }
.inv-row .input { flex: 1 1 260px; }
.inv-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.inv-stats div { border: 1px solid var(--line, #e7e3dc); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.inv-stats b { font-size: 20px; }
.inv-stats span { font-size: 12.5px; color: var(--muted, #6e6a64); }
.steps-ol { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 8px; line-height: 1.5; }
.imp-box { margin: 10px 0; border: 1px dashed var(--line, #ddd); border-radius: 12px; padding: 10px 14px; }
.imp-box summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.imp-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.imp-form .input { flex: 1 1 180px; }

.plan .price-next { display: block; margin-top: 2px; font-size: 13px; opacity: .72; }

.disc-lines { margin: 4px 0 12px; }
.ad-stats { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 13.5px; color: var(--muted, #6b6b6b); }
.ad-stats b { color: var(--ink, #151617); font-size: 15px; }

/* кабинет (17.10): магазин и одна главная кнопка сверху, остальное — тихими ссылками; подключения без цветных переливов */
.cab-head { margin: 4px 0 -6px; } .cab-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.shopcard .sc-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.shopcard .sname b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.shopcard .sname small { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 14px; margin-top: 4px; }
.shopcard .dot { width: 8px; height: 8px; border-radius: 50%; background: #C9C6BF; }
.shopcard .dot.on { background: #2F9E5B; }
.sc-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 14px 0 4px; padding-top: 14px; border-top: 1px solid var(--line-2, #EFEDE8); font-size: 14px; }
.sc-links a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(21, 22, 23, .25); text-underline-offset: 4px; }
.sc-links a:hover { text-decoration-color: currentColor; }
.sc-h { margin: 20px 0 10px; font-size: 15px; font-weight: 600; }
.shopcard .ig-row { background: var(--bg, #F6F5F1); margin: 0 0 8px; }
.shopcard .imp-box { margin: 14px 0 0; border-style: solid; }
.shopcard .imp-box .mig { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2, #EFEDE8); }
@media (max-width: 560px) { .shopcard .sc-top .btn { width: 100%; } }
.shopcard .ig-row .btn:not(.line) { background: var(--surface); color: var(--ink); border: 1px solid var(--field); }
.shopcard .ig-row .btn:not(.line):hover { background: var(--bg, #F6F5F1); color: var(--ink); }

/* мастер (17.10): без длинного списка слева — прогресс полоской сверху; меньше текста, одно действие за раз */
.shell { grid-template-columns: minmax(0, 1fr) 440px; }
.rail { display: none; }
.main { width: 100%; max-width: 820px; margin: 0 auto; }
.mprog { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; padding: 14px 24px 0; max-width: 1200px; margin: 0 auto; }
.mprog i { height: 4px; border-radius: 2px; background: #E1DDD4; }
.mprog i.d { background: var(--ink); }
.mprog i.n { background: linear-gradient(90deg, var(--ink) 50%, #E1DDD4 50%); }
@media (max-width: 1180px) { .shell { display: flex; flex-direction: column; } .main { max-width: none; } }
/* шаг «Бот»: четыре действия, открыто одно */
.bf { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bf-s { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); transition: border-color .15s ease; }
.bf-s.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.bf-h { display: flex; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; }
.bf-h b { font-size: 16px; font-weight: 600; }
.bf-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 13px; font-weight: 600;
        background: var(--bg, #F6F5F1); color: var(--ink); }
.bf-s.on .bf-n { background: var(--ink); color: #fff; }
.bf-s.ok:not(.on) .bf-n { background: #2F9E5B; color: #fff; font-size: 0; }
.bf-s.ok:not(.on) .bf-n::before { content: "✓"; font-size: 14px; }
.bf-s.ok:not(.on) .bf-h b { color: var(--muted); font-weight: 500; }
.bf-b { display: none; flex-direction: column; align-items: flex-start; gap: 14px; padding: 0 18px 18px 58px; }
.bf-s.on .bf-b { display: flex; }
.bf-b p { margin: 0; font-size: 15px; color: var(--ink-2, #33353A); max-width: 520px; }
.bf-copy { display: inline-flex; align-items: center; gap: 14px; max-width: 100%; padding: 12px 14px 12px 16px; border-radius: 12px;
           border: 1px solid var(--field); background: var(--bg, #F6F5F1); font: inherit; cursor: pointer; color: var(--ink);
           transition: transform .16s cubic-bezier(.23, 1, .32, 1), border-color .15s ease; }
.bf-copy:active { transform: scale(.97); }
.bf-copy span { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-copy em { font-style: normal; font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 8px; background: var(--ink); color: #fff; flex: none; }
.bf-copy.done em { background: #2F9E5B; }
.bf-shot { width: 100%; max-width: 360px; border-radius: 16px; border: 1px solid var(--line); display: block; }
.bf-key { width: 100%; max-width: 560px; display: flex; gap: 8px; }
.bf-key .input { flex: 1; min-width: 0; height: 52px; }
.bf-key .btn { height: 52px; border-radius: 12px; }
@media (max-width: 760px) {
  .mprog { padding: 10px 16px 0; gap: 4px; }
  .bf-b { padding: 0 14px 16px; }
  .bf-h { padding: 14px; }
  .bf .btn.big { width: 100%; }
}

/* 18.10: вход — что будет дальше (настоящие экраны мастера) */
.next3 { display: flex; flex-direction: column; gap: 12px; }
.next3 .n3-t { font-size: 14px; color: var(--muted); font-weight: 500; }
.next3 ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.next3 li { display: flex; flex-direction: column; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.next3 img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 14%; border-radius: 8px; border: 1px solid var(--line); }
.next3 li b { font-size: 14px; display: block; }
.next3 li small { font-size: 12px; color: var(--muted); }
@media (max-width: 720px) { .next3 ol { grid-template-columns: 1fr; } .next3 li { flex-direction: row; align-items: center; } .next3 img { width: 84px; aspect-ratio: 4 / 5; } }
/* 18.10: товары — пока разбираем, телефон «сканирует»; после — карточки появляются по одной */
.aside.scanning .sk { animation: pulse 1.2s ease-in-out infinite; }
.aside.scanning .screen::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--brand, #B23A48), transparent); animation: scanline 1.6s linear infinite; }
@keyframes scanline { from { top: 0; } to { top: 100%; } }
.just .s-card, .table.just .tr { animation: appear .4s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 110ms); }
.table.just .tr.th { animation: none; }
@keyframes appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .just .s-card, .table.just .tr, .aside.scanning .sk, .aside.scanning .screen::after { animation: none; } }
/* 18.10: «Разбираем…» показывается только во время разбора (display:flex перебивал hidden) */
.wait[hidden] { display: none; }
/* 18.10: вкладки «откуда товары» на телефоне — одной строкой с прокруткой, а не в два ряда */
@media (max-width: 720px) { .tabs { gap: 18px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; } .tabs::-webkit-scrollbar { display: none; } .tabs a { flex-shrink: 0; font-size: 13.5px; } }

/* 18.10: скриншот перевода при оплате — чек проверяется автоматически */
.receipt-pick { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 12px; cursor: pointer; background: var(--surface); }
.receipt-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.receipt-pick span { font-size: 14px; font-weight: 500; }
.receipt-pick small { font-size: 12px; color: var(--muted); }
.receipt-pick:has(input:valid:not([value=""])):has(input[type=file]:not(:placeholder-shown)) { border-style: solid; }
