/* ИИ-консультант для WhatsApp. Тёплая «бумага», глубокий зелёный, лаймовый акцент.
   Телефон — нижняя панель, компьютер (от 960px) — боковая. */
:root {
  --bg: #f2ede3; --paper: #fffdf9; --ink: #14211b; --mute: #66726b; --line: #e4dccc; --line2: #cfc5b0;
  --brand: #0b5746; --brand-d: #083f33; --brand-ink: #fff; --soft: #e2f0e6; --lime: #d4f15f; --live: #19b061;
  --warn: #8f4c00; --warn-bg: #ffefcf; --bad: #b0271f; --bad-bg: #fde8e4;
  --client: #fff; --bot: #d5f7c8; --owner: #e3ebff; --chat: #e8dfce;
  --r: 18px; --nav-h: 64px; --side-w: 264px;
  --font: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Unbounded", "Golos Text", system-ui, sans-serif;
  --shadow: 0 1px 0 rgba(20,33,27,.04), 0 10px 26px -18px rgba(20,33,27,.28);
  --dots: radial-gradient(rgba(20,33,27,.05) 1px, transparent 1.2px) 0 0 / 20px 20px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg) var(--dots); color: var(--ink); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
h1 { font: 700 22px/1.2 var(--display); letter-spacing: -.01em; margin: 0 0 10px; }
h2 { font-size: 18px; line-height: 1.25; margin: 0 0 10px; }
h3 { font-size: 15px; margin: 18px 0 6px; }
p { margin: 0 0 10px; }
.mute { color: var(--mute); font-size: 14.5px; }
.center { text-align: center; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1 1 160px; min-width: 0; }
.right { margin-left: auto; }
.wrap { max-width: 720px; margin: 0 auto; padding: 14px 14px 24px; }

/* ---------- кнопки ---------- */
button, a.btn {
  font: 600 16px/1.2 var(--font); cursor: pointer; border: 0; border-radius: 14px; padding: 12px 18px; min-height: 48px;
  background: var(--brand); color: var(--brand-ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; transition: transform .08s, background .15s, box-shadow .15s; -webkit-tap-highlight-color: transparent;
}
button:active, a.btn:active { transform: scale(.98); }
button:focus-visible, a:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
button.ghost { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--line2); }
button.small { min-height: 38px; padding: 7px 13px; font-size: 14px; border-radius: 11px; }
button.wide, a.btn.wide { width: 100%; }
button.lime { background: var(--lime); color: var(--brand-d); }
button.danger { color: var(--bad); }
button.x { background: transparent; color: var(--mute); padding: 0; width: 40px; min-height: 40px; font-size: 22px; flex: none; }
button:disabled { opacity: .55; cursor: default; }
button svg { flex: none; }

/* вариант выбора: значок, заголовок, пояснение, стрелка */
.opt { width: 100%; justify-content: flex-start; text-align: left; gap: 14px; padding: 12px 14px; border-radius: 16px; margin-top: 10px;
  background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line2); }
.opt > span { flex: 1; display: grid; gap: 2px; min-width: 0; }
.opt b { font-size: 16px; }
.opt small { font-size: 13.5px; font-weight: 400; color: var(--mute); line-height: 1.35; }
.opt > svg:first-child { width: 46px; height: 46px; padding: 10px; border-radius: 14px; background: var(--soft); color: var(--brand); }
.opt > svg:last-child { color: var(--line2); }
.opt.main { background: var(--brand); color: #fff; box-shadow: none; }
.opt.main small { color: rgba(255,255,255,.78); }
.opt.main > svg:first-child { background: rgba(255,255,255,.14); color: var(--lime); }
.opt.main > svg:last-child { color: rgba(255,255,255,.6); }
.menu { padding: 6px; }
.menu .opt { margin: 0; box-shadow: none; background: transparent; border-radius: 14px; }
.menu .opt + .opt { border-top: 1px solid var(--line); border-radius: 0; }

/* ---------- каркас кабинета ---------- */
body.app { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
#side { display: none; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 14px;
  background: rgba(255,253,249,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { font: 700 14px/1.2 var(--display); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip { min-height: 36px; padding: 5px 11px; border-radius: 999px; font-size: 13px; gap: 7px; background: #ece6d8; color: var(--mute); flex: none; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip.ok { background: var(--soft); color: var(--brand); }
.chip.ok i { background: var(--live); animation: pulse 1.8s infinite; }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(25,176,97,.55); } 70% { box-shadow: 0 0 0 8px rgba(25,176,97,0); } 100% { box-shadow: 0 0 0 0 rgba(25,176,97,0); } }

#nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--paper); border-top: 1px solid var(--line); }
#nav button { position: relative; flex-direction: column; gap: 2px; padding: 0; min-height: 0; border-radius: 0; background: none; color: var(--mute); font-size: 11.5px; font-weight: 500; }
#nav svg { box-sizing: content-box; padding: 3px 16px; border-radius: 999px; }
#nav button.on { color: var(--brand); font-weight: 700; }
#nav button.on svg { background: var(--soft); }
#nav em, #side em { font-style: normal; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center; }
#nav em { position: absolute; top: 5px; left: calc(50% + 8px); background: var(--bad); color: #fff; }

.subtabs { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 12px; scrollbar-width: none; }
.subtabs:empty { display: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs button { flex: none; min-height: 40px; padding: 8px 15px; font-size: 14.5px; border-radius: 999px; background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); }
.subtabs button.on { background: var(--ink); color: #fff; box-shadow: none; }

/* ---------- карточки, формы ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 0 0 12px; box-shadow: var(--shadow); }
.banner { border-radius: 14px; padding: 11px 13px; margin: 10px 0; font-size: 14.5px; background: var(--soft); }
.banner.warn { background: var(--warn-bg); color: var(--warn); }
.banner.bad { background: var(--bad-bg); color: var(--bad); }

label { display: block; font-size: 14px; color: var(--mute); margin: 12px 0 5px; }
input[type=text], input[type=tel], input[type=password], input[type=number], input[type=time], textarea, select {
  width: 100%; font: 16px/1.4 var(--font); color: inherit; background: #fff; border: 1.5px solid var(--line); border-radius: 13px; padding: 11px 13px; min-height: 48px;
}
input[type=file] { width: 100%; font: inherit; padding: 14px; border: 1.5px dashed var(--line2); border-radius: 14px; background: #fff; }
textarea { resize: vertical; min-height: 76px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11,87,70,.14); }
::placeholder { color: #a9a393; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 2px -8px; padding: 9px 8px; border-radius: 12px; font-size: 15.5px; color: var(--ink); cursor: pointer; }
.check:hover { background: rgba(20,33,27,.035); }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--brand); }
.check small { display: block; color: var(--mute); font-size: 13.5px; line-height: 1.35; margin-top: 2px; }
.hint { display: block; color: var(--mute); font-size: 13.5px; line-height: 1.35; margin: 5px 0 0; }
.hint.warn { color: var(--warn); margin: 6px 0 0 38px; }
label .req { font-weight: 500; font-size: 12px; color: var(--brand); background: var(--soft); border-radius: 6px; padding: 1px 6px; margin-left: 6px; }
.card > details summary { font-size: 16px; padding-top: 2px; padding-bottom: 2px; }
.card > details summary::after { top: -3px; }
.card > details[open] summary { margin-bottom: 8px; }

.sticky { position: sticky; z-index: 4; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); margin: 0 -14px; padding: 16px 14px 10px; background: linear-gradient(transparent, var(--bg) 36%); }
.sticky button { width: 100%; min-height: 52px; background: var(--paper); color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--line2); }
.sticky.dirty button { background: var(--brand); color: #fff; box-shadow: 0 12px 24px -12px rgba(11,87,70,.7); }

.item { border: 1.5px solid var(--line); border-radius: 14px; padding: 10px; margin: 8px 0; background: #fff; }
.item.off { opacity: .55; }
.item input, .item textarea { min-height: 44px; }
/* позиция каталога: на телефоне — строка «название, цена», по нажатию раскрывается форма; на компьютере — сразу строка полей */
.item.it { padding: 0; }
.it-head { display: flex; width: 100%; min-height: 56px; padding: 9px 10px 9px 14px; gap: 10px; align-items: center; justify-content: space-between; background: transparent; color: var(--ink); box-shadow: none; border-radius: 13px; text-align: left; font-weight: 400; }
.it-head span { display: grid; gap: 1px; min-width: 0; }
.it-head b { font-weight: 600; font-size: 15.5px; line-height: 1.3; overflow-wrap: anywhere; }
.it-head small { color: var(--mute); font-size: 13.5px; }
.it-head svg { width: 18px; height: 18px; color: var(--mute); transition: transform .15s; }
.item.open .it-head svg { transform: rotate(90deg); }
.it-form { display: none; grid-template-columns: 1fr 1fr 40px; gap: 6px; padding: 2px 10px 10px; align-items: center; }
.item.open .it-form { display: grid; }
.it-form .nm, .it-form .ds, .it-form .check { grid-column: 1 / -1; }
.it-form .nm { font-weight: 600; }
.it-head img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; margin-right: -2px; }
.it-head span { flex: 1; }
.it-form .ph { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.it-form .ph img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; }
label.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin: 0; cursor: pointer; font: 600 14px/1.2 var(--font); min-height: 38px; padding: 7px 13px; border-radius: 11px; color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--line2); }
label.btn:focus-within { outline: 3px solid var(--lime); outline-offset: 2px; }
/* график бота: дни недели кнопками, часы «с — до» */
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; margin: 4px 0 10px; max-width: 420px; }
.days label { margin: 0; position: relative; }
.days input { position: absolute; opacity: 0; pointer-events: none; }
.days span { display: grid; place-items: center; height: 42px; border-radius: 11px; font-size: 14.5px; font-weight: 600; color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1.5px var(--line2); cursor: pointer; }
.days input:checked + span { background: var(--brand); color: #fff; box-shadow: none; }
.days input:focus-visible + span { outline: 3px solid var(--lime); outline-offset: 2px; }
.times { flex-wrap: nowrap; }
.times input { flex: 1; min-width: 0; }
/* фото товара, которое бот отправил клиенту */
.b.pic { padding: 4px; white-space: normal; }
.b.pic img { display: block; width: 100%; max-width: 260px; border-radius: 12px; }
.b.pic span { display: block; padding: 5px 8px 3px; white-space: pre-wrap; font-size: 14.5px; }
.it-form .check { margin: 0; padding: 4px 2px; font-size: 14.5px; }
.it-form .check input { width: 20px; height: 20px; }
.seg { display: inline-flex; padding: 3px; border-radius: 13px; background: #ece6d8; }
.seg button { min-height: 38px; background: transparent; color: var(--mute); border-radius: 10px; padding: 7px 14px; font-size: 14.5px; }
.seg button.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(20,33,27,.15); }

.pill { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 9px; background: var(--soft); color: var(--brand); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
pre.text { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; margin: 0; }
.spin { display: flex; align-items: center; gap: 12px; padding: 8px 0; color: var(--mute); }
.spin::before { content: ""; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- главная кабинета ---------- */
.home { display: grid; gap: 0; }
.hero { position: relative; overflow: hidden; border-radius: 22px; padding: 20px 18px; margin-bottom: 12px; color: #fff;
  background: linear-gradient(150deg, var(--brand), var(--brand-d)); box-shadow: 0 18px 34px -22px rgba(8,63,51,.9); }
.hero::after { content: ""; position: absolute; width: 240px; height: 240px; right: -90px; top: -110px; border-radius: 50%; background: radial-gradient(closest-side, rgba(212,241,95,.38), transparent); pointer-events: none; }
.hero.off { background: linear-gradient(150deg, #2c3b34, #1a2620); }
.hero.warn { background: linear-gradient(150deg, #7c4b07, #553303); }
.hero.bad { background: linear-gradient(150deg, #93302a, #651c17); }
.hero h1 { display: flex; align-items: center; gap: 10px; font-size: 20px; margin: 0 0 8px; position: relative; z-index: 1; }
.hero p { position: relative; z-index: 1; opacity: .9; margin: 0 0 4px; }
.hero .acts { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hero .acts button { flex: 1 1 150px; }
.hero button.ghost { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.4); }
.live { width: 11px; height: 11px; border-radius: 50%; background: var(--lime); flex: none; animation: pulse2 1.8s infinite; }
@keyframes pulse2 { 0% { box-shadow: 0 0 0 0 rgba(212,241,95,.6); } 70% { box-shadow: 0 0 0 9px rgba(212,241,95,0); } 100% { box-shadow: 0 0 0 0 rgba(212,241,95,0); } }
.quota { position: relative; z-index: 1; margin-top: 14px; font-size: 13.5px; }
.quota div { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; opacity: .9; }
.meter { height: 8px; border-radius: 99px; background: rgba(255,255,255,.2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--lime); }
.card .meter { background: var(--line); }
.card .meter i { background: var(--brand); }

.todo { display: grid; gap: 4px; margin: 0 -6px -6px; }
.todo button { width: 100%; justify-content: flex-start; text-align: left; gap: 12px; padding: 10px; min-height: 60px; border-radius: 14px; background: transparent; color: var(--ink); font-weight: 400; }
.todo .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; font: 700 13px var(--display); color: var(--mute); box-shadow: inset 0 0 0 1.5px var(--line2); }
.todo span { flex: 1; display: grid; gap: 1px; min-width: 0; }
.todo b { font-size: 15.5px; }
.todo small { font-size: 13.5px; color: var(--mute); line-height: 1.35; }
.todo svg:last-child { color: var(--line2); }
.todo .done .n { background: var(--soft); color: var(--brand); box-shadow: none; }
.todo .done .n svg { width: 18px; height: 18px; stroke-width: 2.6; }
.todo .done b { color: var(--mute); font-weight: 500; }
.todo .cur { background: var(--soft); box-shadow: inset 0 0 0 1.5px var(--brand); }
.todo .cur .n { background: var(--brand); color: #fff; box-shadow: none; }
.todo .cur svg:last-child { color: var(--brand); }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.tile { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 4px; padding: 13px 12px; min-height: 92px; border-radius: 16px; text-align: left;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 400; }
.tile b { font: 700 25px/1 var(--display); }
.tile span { font-size: 12.5px; line-height: 1.25; color: var(--mute); }
.tile.alert { background: var(--warn-bg); border-color: transparent; }
.tile.alert b, .tile.alert span { color: var(--warn); }

.ev { display: flex; gap: 11px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); width: 100%; min-height: 0; background: none; color: var(--ink); font-weight: 400; text-align: left; border-radius: 0; justify-content: flex-start; }
.ev:first-of-type { border-top: 0; }
.ev > i { width: 34px; height: 34px; border-radius: 11px; background: var(--soft); display: grid; place-items: center; font-style: normal; flex: none; }
.ev span { flex: 1; font-size: 14.5px; line-height: 1.4; min-width: 0; overflow-wrap: anywhere; }
.ev time { font-size: 12px; color: var(--mute); flex: none; padding-top: 2px; }

/* ---------- чат ---------- */
.chat { background: var(--chat) radial-gradient(rgba(20,33,27,.055) 1px, transparent 1.2px) 0 0 / 16px 16px; border-radius: 16px; padding: 14px 10px;
  min-height: 250px; height: calc(100dvh - 340px); overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 6px; }
.b { max-width: min(84%, 540px); padding: 8px 12px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15.5px; line-height: 1.4; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.b.client { background: var(--client); align-self: flex-start; border-bottom-left-radius: 5px; }
.b.bot { background: var(--bot); align-self: flex-end; border-bottom-right-radius: 5px; }
.b.owner { background: var(--owner); align-self: flex-end; border-bottom-right-radius: 5px; }
.b.typing { color: var(--mute); font-style: italic; }
.b .who { display: block; font-size: 11px; color: var(--mute); }
/* тест-чат: владелец пишет за клиента — его сообщения справа, ответы бота слева */
.chat.test .b.client { align-self: flex-end; background: var(--bot); border-radius: 16px; border-bottom-right-radius: 5px; }
.chat.test .b.bot { align-self: flex-start; background: var(--client); border-radius: 16px; border-bottom-left-radius: 5px; }
.chat.test .fix { align-self: flex-start; }
.test-wrap { display: grid; gap: 14px; }
.test-wrap > .card { margin: 0; }
.test-help { display: none; }
.qn { width: 28px; height: 28px; border-radius: 50%; background: var(--soft); color: var(--brand); display: grid; place-items: center; font: 700 12px var(--display); font-style: normal; flex: none; }
.fix { align-self: flex-end; min-height: 32px; font-size: 13px; font-weight: 500; color: var(--brand); background: rgba(255,253,249,.75); padding: 4px 10px; border-radius: 999px; margin-bottom: 4px; }
.sys { align-self: center; max-width: 94%; background: #fff8dc; border-radius: 12px; padding: 8px 12px; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.sys.error { background: var(--bad-bg); color: var(--bad); }
.fixbox { align-self: stretch; background: #fff; border-radius: 14px; padding: 10px; }
.send { display: flex; gap: 8px; margin-top: 10px; }
.send input { flex: 1; border-radius: 999px; padding-left: 18px; }
.send button { width: 50px; min-width: 50px; padding: 0; border-radius: 50%; font-size: 18px; }

/* ---------- списки, переписки ---------- */
.list > div { display: flex; gap: 12px; align-items: center; border-top: 1px solid var(--line); padding: 11px 6px; cursor: pointer; border-radius: 12px; }
.list > div:first-child { border-top: 0; }
.list > div:hover, .list > div.on { background: var(--soft); border-color: transparent; }
.list > div.on + div, .list > div:hover + div { border-color: transparent; }
.list .body { flex: 1; min-width: 0; }
.list .last { color: var(--mute); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ava { width: 42px; height: 42px; border-radius: 50%; background: var(--brand); color: var(--lime); display: grid; place-items: center; font: 700 15px var(--display); flex: none; }
.chats .chats-thread { display: none; }
.chats.open .chats-list { display: none; }
.chats.open .chats-thread { display: block; }
.chats .chat { height: calc(100dvh - 260px); }
.thread-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.thread-head b { flex: 1; min-width: 120px; overflow-wrap: anywhere; }

/* ---------- подключение WhatsApp ---------- */
.qr { display: block; width: min(300px, 100%); height: auto; margin: 12px auto; border-radius: 18px; border: 1px solid var(--line); background: #fff; padding: 6px; }
.code { font: 700 clamp(26px, 9vw, 38px)/1 var(--display); letter-spacing: .08em; text-align: center; margin: 14px 0; padding: 20px 8px; border-radius: 18px; background: var(--soft); color: var(--brand-d); font-variant-numeric: tabular-nums; }
.howto { margin: 12px 0; padding: 0; list-style: none; counter-reset: h; display: grid; gap: 9px; }
.howto li { counter-increment: h; position: relative; padding-left: 38px; font-size: 15px; line-height: 1.4; min-height: 28px; }
.howto li::before { content: counter(h); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--soft); color: var(--brand); display: grid; place-items: center; font: 700 12px var(--display); }
.okline { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--soft); margin-bottom: 10px; }
.okline > svg { width: 42px; height: 42px; padding: 9px; border-radius: 50%; background: var(--brand); color: var(--lime); stroke-width: 2.4; flex: none; }
.okline div { display: grid; }
.okline span { font: 700 16px var(--display); margin-top: 2px; }
.aside { border: 1.5px dashed var(--line2); border-radius: 16px; padding: 13px; margin: 12px 0; font-size: 14.5px; }
.aside p { margin: 4px 0 10px; color: var(--mute); }

/* ---------- оплата ---------- */
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.plans > * { border: 1.5px solid var(--line); border-radius: 16px; padding: 13px 12px; background: #fff; margin: 0; color: var(--ink); font-size: 14px; }
.plans b { font: 700 21px/1.1 var(--display); }
.plan { cursor: pointer; display: block; }
.plan input { display: none; }
.plan.on { border-color: var(--brand); background: var(--soft); box-shadow: 0 0 0 1.5px var(--brand); }

/* на телефоне — сверху: внизу оно закрывало бы кнопку «Сохранить» */
#toast { position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top)); transform: translateX(-50%) translateY(-8px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14.5px; width: max-content; max-width: 92vw; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 9; box-shadow: 0 14px 30px -14px rgba(0,0,0,.6); }
#toast.on { opacity: 1; transform: translateX(-50%); }
#toast.bad { background: var(--bad); }

/* ---------- главная страница ---------- */
.land { position: relative; overflow: hidden; color: #fff; background: var(--brand-d) radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.2px) 0 0 / 22px 22px; }
.land::before { content: ""; position: absolute; width: 560px; height: 560px; right: -200px; top: -240px; border-radius: 50%; background: radial-gradient(closest-side, rgba(212,241,95,.34), transparent); }
.land-in { position: relative; max-width: 1080px; margin: 0 auto; padding: 14px 18px 40px; }
.land-top { display: flex; align-items: center; gap: 10px; }
.wordmark { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; font: 700 12.5px/1.25 var(--display); }
.logo { width: 36px; height: 36px; border-radius: 12px; background: var(--lime); color: var(--brand-d); display: grid; place-items: center; flex: none; }
.land .seg { background: rgba(255,255,255,.12); }
.land .seg button { color: rgba(255,255,255,.75); min-height: 34px; padding: 5px 11px; font-size: 13.5px; }
.land .seg button.on { background: #fff; color: var(--brand-d); }
.land h1 { font-size: clamp(25px, 6.6vw, 44px); line-height: 1.14; letter-spacing: -.02em; margin: 28px 0 14px; text-wrap: balance; }
.land h1 em { font-style: normal; color: var(--lime); }
.land .lead { font-size: 17px; opacity: .9; max-width: 33em; }
.cta { display: grid; gap: 10px; margin-top: 22px; max-width: 430px; }
.cta button { min-height: 60px; font-size: 16.5px; border-radius: 17px; justify-content: flex-start; padding: 0 18px; gap: 13px; text-align: left; }
.cta .line { background: rgba(255,255,255,.08); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.38); }
.cta input { border-color: transparent; }
.fine { font-size: 13.5px; opacity: .75; margin: 12px 0 0; max-width: 430px; }
.land a, .linkbtn { color: var(--lime); }
.linkbtn { background: none; min-height: 44px; padding: 0; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; justify-content: flex-start; }
.land .banner { max-width: 430px; background: rgba(255,255,255,.12); color: #fff; }
.land .banner.bad { background: #fff; color: var(--bad); }
.mock { margin: 34px auto 0; width: min(330px, 100%); border-radius: 30px; padding: 12px 12px 16px; transform: rotate(-2deg);
  background: var(--chat) radial-gradient(rgba(20,33,27,.055) 1px, transparent 1.2px) 0 0 / 16px 16px; color: var(--ink);
  box-shadow: 0 0 0 7px #0d2a22, 0 40px 70px -30px rgba(0,0,0,.7); display: flex; flex-direction: column; gap: 6px; }
.mock header { display: flex; align-items: center; gap: 10px; padding: 2px 4px 10px; font-size: 14px; line-height: 1.2; }
.mock header .ava { width: 36px; height: 36px; font-size: 13px; }
.mock header small { display: block; color: var(--live); font-size: 12px; }
.mock .b, .mock .sys { opacity: 0; transform: translateY(8px); animation: pop .45s forwards; animation-delay: calc(var(--i) * .55s + .3s); font-size: 14.5px; }
.mock .sys { align-self: stretch; max-width: none; background: #fff; border-left: 4px solid var(--brand); border-radius: 12px; }
@keyframes pop { to { opacity: 1; transform: none; } }
.land-body { max-width: 1080px; padding-top: 22px; }
.steps4 { display: grid; gap: 10px; }
.steps4 > div { border: 1.5px solid var(--line); border-radius: 16px; padding: 14px; background: #fff; font-size: 15px; }
.steps4 b { display: block; font: 700 26px/1 var(--display); color: var(--brand); margin-bottom: 8px; }
details { border-top: 1px solid var(--line); }
details:first-of-type { border-top: 0; }
summary { cursor: pointer; font-weight: 600; padding: 14px 34px 14px 0; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 8px; font: 500 24px var(--font); color: var(--brand); }
details[open] summary::after { content: "–"; }
details p { color: var(--mute); margin: 0 0 14px; }

/* ---------- служебные страницы ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.scroll { overflow-x: auto; }

@media (min-width: 760px) {
  .steps4 { grid-template-columns: repeat(4, 1fr); }
  .plans { grid-template-columns: repeat(4, 1fr); }
  .land-in { padding: 20px 32px 64px; }
  .land-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 44px; align-items: center; }
  .mock { margin-top: 20px; }
}

/* ---------- компьютер ---------- */
@media (min-width: 960px) {
  body.app { padding: 0 0 0 var(--side-w); }
  .top, #nav, .subtabs, .only-phone { display: none !important; }
  #side { display: flex; flex-direction: column; gap: 6px; position: fixed; left: 0; top: 0; bottom: 0; width: var(--side-w); padding: 22px 14px 16px; overflow-y: auto;
    color: #fff; background: var(--brand-d) radial-gradient(rgba(255,255,255,.06) 1px, transparent 1.2px) 0 0 / 22px 22px; }
  .side-brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 12px; }
  .side-brand .brand { color: #fff; white-space: normal; }
  #side .chip { align-self: flex-start; margin: 0 8px 14px; }
  #side nav { display: grid; gap: 2px; }
  #side nav button, .side-foot button { justify-content: flex-start; gap: 12px; padding: 9px 12px; min-height: 44px; border-radius: 12px; background: transparent; color: rgba(255,255,255,.76); font-size: 15px; font-weight: 500; }
  #side nav button:hover, .side-foot button:hover { background: rgba(255,255,255,.07); color: #fff; }
  #side nav button.on { background: rgba(255,255,255,.13); color: #fff; box-shadow: inset 3px 0 0 var(--lime); }
  #side nav button span { flex: 1; text-align: left; }
  #side em { background: var(--lime); color: var(--brand-d); }
  #side h6 { margin: 18px 12px 6px; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: rgba(255,255,255,.45); font-weight: 600; }
  .side-foot { margin-top: auto; display: grid; gap: 2px; padding-top: 16px; }
  .wrap { max-width: 800px; padding: 30px 36px 60px; }
  .wrap.wide { max-width: 1180px; }
  .test-wrap { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .test-help { display: block; position: sticky; top: 16px; }
  .sticky { bottom: 0; margin: 0; padding: 18px 0 14px; }
  .sticky button { width: auto; min-width: 240px; }
  #toast { top: auto; bottom: 28px; left: calc(50% + var(--side-w) / 2); }
  .chat { height: calc(100vh - 300px); }
  .item.it { padding: 8px; }
  .it-head { display: none; }
  .it-form, .item.open .it-form { display: grid; grid-template-columns: 1fr 120px 120px 40px; padding: 0; }
  .it-form .nm { grid-column: 1; }
  .it-form .ds { grid-column: 1 / span 2; }
  .it-form .check { grid-column: 3 / span 2; padding: 0 6px; }
  .chats { display: grid; grid-template-columns: 350px 1fr; gap: 12px; align-items: start; }
  .chats.none { display: block; }
  .chats .chats-list, .chats.open .chats-list { display: block; max-height: calc(100vh - 60px); overflow-y: auto; position: sticky; top: 30px; }
  .chats .chats-thread { display: block; }
  .chats.none .chats-thread, .chats .back { display: none; }
  .chats .chat { height: calc(100vh - 190px); }
  .hero { padding: 26px 26px 24px; }
  .hero h1 { font-size: 24px; }
  .hero .acts button { flex: 0 1 auto; min-width: 200px; }
  .tile b { font-size: 30px; }
  .tile span { font-size: 14px; }
}
@media (min-width: 1180px) {
  .home.two { grid-template-columns: 1.1fr .9fr; gap: 0 14px; align-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01s !important; animation-delay: 0s !important; transition: none !important; }
}
