/* Окно ассистента (Игорь 10.09.2026, мок /admin/test/chat-ui?v=7&f=b): одна страница без вложенного скролла,
   скроллится только лента, белое окно по центру на фоне сайта, прямоугольная рамка 1px, прилипает к шапке,
   кнопки полоской сверху, поле и отправить снизу, настройки шторкой. Грузится ПОСЛЕ assistant.css и
   переопределяет только раскладку: узлы и классы старые, скрипт чата работает как раньше. */

/* фон вокруг окна - тот же градиент сайта, что на главной (body в main.css), свой не задаём (Игорь 10.09) */
body[data-page="assistant"] { overflow: hidden; }
body[data-page="assistant"] .footer { display: none; }

/* высота по реальной видимой области: на телефоне (особенно во встроенном браузере Телеграма) 100vh больше
   экрана из-за панелей, и поле ввода уезжало под панель браузера. --vh ставит скрипт из window.innerHeight. */
.cw { height: calc(100vh - var(--hdr, 57px)); height: calc(var(--vh, 100dvh) - var(--hdr, 57px)); display: flex;
  justify-content: center; align-items: stretch; padding: 0 16px 14px; box-sizing: border-box; }
.cw-win { width: min(720px, 100%); background: #fff; border: 1px solid #111827; border-top: 0;
  display: flex; flex-direction: column; min-height: 0; position: relative; overflow: hidden; }

/* ── полоса кнопок ── */
/* полоса переносится: при 720px правый край (тон, счётчик, шестерёнка) уезжал за рамку окна (10.09) */
.cw-bar { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px 10px; border-bottom: 1px solid #111827; background: #fff; }
@media (max-width: 860px) { .cw-ic span { display: none; } .cw-ic { padding: 0 8px; } }
.cw-ic { height: 36px; padding: 0 10px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; font-size: .9rem;
  display: inline-flex; align-items: center; gap: 6px; color: #111827; font-family: inherit; white-space: nowrap; }
.cw-ic:hover { background: #f4f4f5; }
a.cw-ic { text-decoration: none; }   /* «🗂 История» - ссылка на страницу (патч 828) */
.cw-ic.is-on { background: #111827; color: #fff; }
.cw-ic[disabled] { opacity: .4; cursor: default; }
.cw-ic[disabled]:hover { background: transparent; }
.cw-mod { border: 1px solid #e5e7eb; }
.cw-sp { flex: 1; }
.cw-chip { font-size: .78rem; padding: 3px 9px; border-radius: 999px; background: #111827; color: #fff; white-space: nowrap; }
.cw-cnt { font-size: .82rem; color: #64748b; display: inline-flex; align-items: center; gap: 4px; margin: 0 4px; white-space: nowrap; }
.cw-cnt #quota-total-num { font-weight: 700; color: #111827; }
.cw-cnt .as-quota__plus { display: inline-flex; width: 20px; height: 20px; border-radius: 50%; border: 1px solid #e5e7eb;
  align-items: center; justify-content: center; text-decoration: none; color: #111827; font-weight: 700; font-size: .85rem; }

/* ── галочки полоской под кнопками: режим админ, локальная модель / тестовый режим ── */
.cw-flags { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 6px 12px;
  border-bottom: 1px solid #e5e7eb; background: #fff; font-size: .86rem; }
.cw-flag { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; padding: 4px 10px;
  border: 1px dashed #cbd5e1; border-radius: 999px; color: #111827; }
.cw-flag.as-admin-local9b { border-color: #7dd3fc; }
.cw-flag.as-admin-bridge { border-color: #f0abfc; }
.cw-flag b { font-weight: 700; }
.cw-flag #admin-local9b-alive { color: #64748b; font-size: .78rem; }
/* обращение «ты» / «вы» - видно всем (Игорь 12.09) */
.cw-address__label { color: #64748b; }
.cw-addr { border: 1px solid #cbd5e1; background: #fff; color: #111827; border-radius: 999px; padding: 3px 12px;
  font: inherit; cursor: pointer; }
.cw-addr.is-on { background: #111827; color: #fff; border-color: #111827; }

/* ── лента: единственное, что скроллится ── */
.cw-win .as-log { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; -webkit-overflow-scrolling: touch;
  margin: 0; border: 0; border-radius: 0; background: #fff; padding: 16px 18px 20px; gap: 1rem; }
.cw-win .as-msg { max-width: 100%; }
.cw-win .as-msg--assistant .as-msg__bubble { padding: 0; background: transparent; color: #1f2937; line-height: 1.55; }
.cw-win .as-msg--user { align-self: flex-end; max-width: 80%; }
.cw-win .as-msg--user .as-msg__bubble { background: #f4f4f5; color: #111827; border-radius: 16px 16px 4px 16px; padding: 9px 14px; }
.cw-win .as-msg--assistant { flex-direction: column; }
.cw-note { padding: 8px 12px; border-radius: 10px; font-size: .88rem; line-height: 1.45; border: 1px solid #e5e7eb; background: #fff; color: #374151; }
.cw-note--horary { border-color: #c4b5fd; background: #f5f3ff; text-decoration: none; color: inherit; display: block; }
.cw-note a { color: #1d4ed8; }
.cw-win .as-empty { padding: 4px 0; }

/* ── подтверждение готового вопроса ── */
.cw-win .as-confirm { flex: 0 0 auto; margin: 0; border-top: 1px solid #e5e7eb; padding: 8px 14px; border-radius: 0; }

/* ── поле и отправить ── */
.cw-win .as-form { flex: 0 0 auto; margin: 0; padding: 10px 14px 14px; border-top: 1px solid #111827; background: #fff;
  display: flex; align-items: flex-end; gap: 8px; position: relative; }
.cw-win .as-form textarea { min-height: 44px; height: auto; max-height: 40vh; resize: none; border: 1px solid #e5e7eb; border-radius: 14px; box-sizing: border-box;
  padding: 10px 14px; font-size: .95rem; line-height: 1.45; background: #fff; }
.cw-win .as-form textarea:focus { outline: 0; border-color: #a1a1aa; }
.cw-win .as-form button[type="submit"] { width: 42px; height: 42px; border-radius: 50%; background: #18181b; color: #fff; padding: 0;
  font-size: 1rem; line-height: 1; flex: 0 0 auto; }
.cw-win .as-form button[type="submit"]:disabled { opacity: .4; }
.cw-win .as-charcount { position: absolute; left: 28px; bottom: 1px; font-size: .66rem; color: #a1a1aa; margin: 0; }

/* ── история: панель под полосой кнопок ── */
.cw-win .as-history-panel { position: absolute; top: var(--bar, 53px); left: 0; right: 0; z-index: 20; margin: 0; border: 0;
  border-bottom: 1px solid #111827; border-radius: 0; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.08); max-height: 60%; overflow: auto; }

/* ── настройки шторкой ── */
.cw-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: 340px; max-width: 100%; background: #fff; border-left: 1px solid #111827;
  box-shadow: -10px 0 30px rgba(0,0,0,.08); padding: 14px 18px; transform: translateX(105%); transition: transform .2s; z-index: 30;
  overflow: auto; font-size: .9rem; }
.cw-drawer.open { transform: translateX(0); }
.cw-drawer h3 { margin: 0 0 12px; font-size: 1rem; display: flex; justify-content: space-between; align-items: center; }
.cw-drawer h3 button { border: 0; background: transparent; cursor: pointer; font-size: 1rem; }
.cw-drawer h4 { margin: 14px 0 6px; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: #64748b; }
.cw-drawer .as-quota { margin: 0; padding: 0; border: 0; background: transparent; }
.cw-drawer .as-admin-bridge, .cw-drawer .as-admin-local9b { margin: 8px 0 !important; }
.cw-drawer .as-meta { margin: 8px 0 0; }
.cw-drawer .as-card { white-space: pre-wrap; font-size: .8rem; }

/* ── заблокировано (нет премиума и пакета) ── */
.cw-lock { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 24px 18px; }
.cw-lock .as-lock { margin: 0 auto 16px; max-width: 520px; }
.cw-lock .as-form--disabled { margin: 0 auto; max-width: 520px; }

/* ── «Почитайте дополнительно»: карточка ссылок, три строки, остальное под «ещё N статей» ── */
/* плашка как .mm-group на /natal/marriage/multiple: серая шапка-раскрывашка, пилюля-счётчик, белые строки */
.as-links { margin: 12px 0 4px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fafafa; overflow: hidden; }
.as-links > summary { cursor: pointer; padding: 9px 12px; font-size: .9rem; font-weight: 700; color: #111827; list-style: none;
  display: flex; gap: 8px; align-items: center; }
.as-links > summary::-webkit-details-marker { display: none; }
.as-links > summary .cnt { margin-left: auto; font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 99px;
  background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; white-space: nowrap; }
.as-links > summary .cnt::after { content: ' ▾'; }
.as-links[open] > summary .cnt::after { content: ' ▴'; }
.as-links__list { display: flex; flex-direction: column; }
.as-links__item { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: center; padding: 7px 12px; border-top: 1px solid #eef2f7;
  background: #fff; color: #374151; text-decoration: none; font-size: .88rem; line-height: 1.4; }
.as-links__item::before { content: '→'; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 800; color: #fff; background: #cbd5e1; }
.as-links__item:hover { color: #9a3412; }
.as-links__item:hover::before { background: #ea580c; }
.as-links__more { display: block; width: 100%; text-align: left; padding: 7px 12px 8px 46px; border: 0; border-top: 1px solid #eef2f7;
  background: #fff; color: #9a3412; font: inherit; font-size: .8rem; cursor: pointer; }
.as-links__more:hover { background: #fff7ed; }
.as-links__more.is-open { color: #64748b; }

/* ── ответ на «когда»: плитка с датой, лента петель флагом, волны по градусам (Игорь 12.09, вариант 5) ── */
.as-retro { margin: 2px 0 14px; }
.as-retro .wa-tile { display: flex; gap: 16px; align-items: stretch; }
.as-retro .wa-cal { flex: 0 0 96px; border: 1px solid #e5e7eb; border-radius: 14px; overflow: hidden; text-align: center; background: #fff; }
.as-retro .wa-cal .m { background: #111827; color: #fff; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; padding: 5px 0; }
.as-retro .wa-cal .d { font-size: 2rem; font-weight: 800; line-height: 1.05; padding: 6px 0 0; color: #111827; }
.as-retro .wa-cal .y { font-size: .78rem; color: #6b7280; padding-bottom: 8px; }
.as-retro .wa-cal.past .m { background: #a8a29e; }
.as-retro .wa-cal.past .d { color: #57534e; }
.as-retro .wa-cal.now .m { background: #059669; }
.as-retro .wa-kv { flex: 1 1 auto; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: .9rem; align-content: center; margin: 0; }
.as-retro .wa-kv dt { color: #6b7280; } .as-retro .wa-kv dd { margin: 0; color: #111827; font-weight: 500; }
.as-retro .wa-count { font-size: .82rem; color: #059669; font-weight: 600; }
.as-retro .wa-graph { margin: 6px 0 4px; }
.as-retro .wa-graph svg { width: 100%; height: auto; display: block; }
.as-retro .wa-legend { display: flex; gap: 12px; font-size: .78rem; color: #6b7280; margin-top: 6px; flex-wrap: wrap; }
.as-retro .wa-legend i { display: inline-block; width: 12px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.as-retro .wa-legend i.line { height: 3px; width: 18px; }
.as-retro .wa-sub { font-size: .78rem; color: #6b7280; margin: 12px 0 2px; text-transform: uppercase; letter-spacing: .05em; }
.as-retro .wa-touch { font-size: .82rem; color: #374151; margin: 4px 0 0; line-height: 1.5; }
.as-retro .wa-touch b { font-weight: 600; color: #111827; }
.as-retro .wa-touch i { font-style: normal; font-weight: 600; }
@media (max-width: 480px) { .as-retro .wa-tile { flex-direction: column; } .as-retro .wa-cal { flex-basis: auto; width: 110px; } }

/* ── баллы по месяцам в ответе (Игорь 12.09, вариант 2 тест-страницы month-scores): столбики + таблица по темам ── */
.as-months { margin: 2px 0 14px; }
.as-months .ms-graph svg { width: 100%; height: auto; display: block; }
.as-months .ms-sub { font-size: .78rem; color: #6b7280; margin: 10px 0 6px; text-transform: uppercase; letter-spacing: .05em; }
.as-months .ms-tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.as-months .ms-tbl th { text-align: left; font-weight: 600; color: #6b7280; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; padding: 6px 8px; border-bottom: 1px solid #e5e7eb; }
.as-months .ms-tbl th.num, .as-months .ms-tbl td.num { text-align: center; }
.as-months .ms-tbl td { padding: 8px 8px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.as-months .ms-tbl tr.cur td { background: #fafafa; }
.as-months .ms-tbl td.mon { font-weight: 600; color: #111827; white-space: nowrap; }
.as-months .ms-tbl td.mon small { font-weight: 400; color: #9ca3af; font-size: .74rem; }
.as-months .ms-cell { display: inline-block; min-width: 40px; padding: 3px 8px; border-radius: 8px; font-weight: 600; font-size: .86rem; }
.as-months .ms-cell.g { background: #dcfce7; color: #166534; } .as-months .ms-cell.y { background: #fef9c3; color: #854d0e; }
.as-months .ms-cell.o { background: #ffedd5; color: #9a3412; } .as-months .ms-cell.r { background: #fee2e2; color: #991b1b; }
.as-months details { margin: 0; }
.as-months summary { list-style: none; cursor: pointer; color: #1d4ed8; font-size: .8rem; }
.as-months summary::-webkit-details-marker { display: none; }
.as-months .ms-desc { font-size: .84rem; color: #374151; line-height: 1.5; padding: 6px 0 2px; }
.as-months .ms-days { display: flex; gap: 8px; flex-wrap: wrap; font-size: .8rem; margin-top: 4px; }
.as-months .ms-days span { padding: 2px 8px; border-radius: 999px; background: #f3f4f6; color: #374151; }
.as-months .ms-days span.good { background: #ecfdf5; color: #065f46; } .as-months .ms-days span.bad { background: #fef2f2; color: #991b1b; }
.as-months .ms-legend { display: flex; gap: 12px; font-size: .78rem; color: #6b7280; margin-top: 8px; flex-wrap: wrap; }
.as-months .ms-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
@media (max-width: 480px) { .as-months .ms-tbl { font-size: .8rem; } .as-months .ms-tbl td, .as-months .ms-tbl th { padding: 6px 4px; } }

/* ── дерево людей блоком в чате: та же страница /family?embed=1 во вкладке, плашка как .mm-group ── */
.as-tree-embed { margin: 12px 0 4px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fafafa; overflow: hidden; }
.as-tree-embed > summary { cursor: pointer; padding: 9px 12px; font-size: .9rem; font-weight: 700; color: #111827; list-style: none;
  display: flex; gap: 8px; align-items: center; }
.as-tree-embed > summary::-webkit-details-marker { display: none; }
.as-tree-embed > summary .cnt { margin-left: auto; font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 99px;
  background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; white-space: nowrap; text-decoration: none; }
.as-tree-embed > summary .cnt:hover { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.as-tree-embed iframe { display: block; width: 100%; height: 520px; border: 0; border-top: 1px solid #eef2f7; background: #fff; }
.as-tree-embed__note { padding: 6px 12px 8px; font-size: .78rem; color: #64748b; background: #fff; border-top: 1px solid #eef2f7; }
/* сообщение - flex-строка, пузырь ужимался по содержимому и блок занимал половину: ширина явно */
.cw-win .as-msg--assistant { width: 100%; }
.cw-win .as-msg--assistant .as-msg__bubble { width: 100%; min-width: 0; }
.cw-win .as-msg--tree { flex-direction: column; width: 100%; }
.cw-win .as-msg--tree .as-msg__bubble { padding: 0; background: transparent; width: 100%; }
/* блок дерева раскрывается на всю ширину окна чата: выходим из отступов ленты до рамок окна (Игорь 10.09) */
.cw-win .as-tree-embed { margin: 12px -18px 4px; border-radius: 0; border-left: 0; border-right: 0; width: calc(100% + 36px); }
.cw-win .as-tree-embed iframe { height: 60vh; min-height: 420px; }

@media (max-width: 640px) {
  .as-tree-embed iframe { height: 420px; }
  .cw-win .as-tree-embed { margin-left: -12px; margin-right: -12px; width: calc(100% + 24px); }
  .cw { padding: 0 4px 6px; }
  .cw-bar { padding: 6px 6px; gap: 2px; }
  .cw-ic { padding: 0 7px; }
  .cw-ic span { display: none; }
  .cw-chip { display: none; }
  .cw-win .as-log { padding: 12px 12px 16px; }
  .cw-win .as-msg--user { max-width: 90%; }
  .cw-drawer { width: 100%; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Стиль окна как на демо-странице /admin/test/ready-questions (Игорь 21.09.2026; патч 614):
   скруглённое окно, мягкие светлые рамки, системный шрифт, кнопки-пилюли, сиреневый акцент.
   Это только оформление - разметка и скрипты прежние; откат = снять этот кусок.
   ───────────────────────────────────────────────────────────────────────────── */
.cw-win {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  border: 1px solid #e6e6ee;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(20, 21, 26, 0.07);
  margin: 10px 0 0;
}
.cw { padding: 0 16px 16px; }

/* полоса кнопок - пилюли со светлой рамкой */
.cw-bar { border-bottom: 1px solid #ecedf1; gap: 6px; padding: 9px 12px; }
.cw-ic {
  height: 32px;
  padding: 0 11px;
  border: 1px solid #e0e1e8;
  border-radius: 999px;
  background: #fff;
  font-size: 0.84rem;
}
.cw-ic:hover { background: #f7f7fb; border-color: #d3d4de; }
.cw-ic.is-on {
  background: rgba(127, 90, 240, 0.12);
  border-color: rgba(127, 90, 240, 0.55);
  color: #4a2fb0;
  font-weight: 600;
}
.cw-ic[disabled] { background: #fff; }
.cw-mod { border: 1px solid #e0e1e8; }
.cw-chip {
  background: rgba(127, 90, 240, 0.12);
  color: #4a2fb0;
  border: 1px solid rgba(127, 90, 240, 0.35);
  font-weight: 600;
}
.cw-cnt #quota-total-num { color: #4a2fb0; }
.cw-addr { border-radius: 999px; border-color: #e0e1e8; }
.cw-addr.is-on { background: rgba(127, 90, 240, 0.12); color: #4a2fb0; border-color: rgba(127, 90, 240, 0.55); }
.cw-flags { border-bottom: 1px solid #ecedf1; }
.cw-flag { border-color: #e0e1e8; }

/* сообщения: свой вопрос - сиреневый пузырь, ответ - как был, простым текстом */
.cw-win .as-msg--user .as-msg__bubble {
  background: #7f5af0;
  color: #fff;
  border-radius: 16px 16px 4px 16px;
  padding: 9px 14px;
}
.cw-win .as-msg--user .as-qlink { border-bottom-color: rgba(255, 255, 255, 0.6); }
.cw-note { border-color: #ecedf1; border-radius: 12px; }

/* поле ввода и отправка */
.cw-win .as-form { border-top: 1px solid #ecedf1; }
.cw-win .as-form textarea {
  border: 1.5px solid #dcdde4;
  border-radius: 14px;
}
.cw-win .as-form textarea:focus { border-color: rgba(127, 90, 240, 0.65); }
.cw-win .as-form button[type="submit"] {
  background: #7f5af0;
  border-radius: 14px;
  width: 44px;
  height: 44px;
}
.cw-win .as-form button[type="submit"]:hover { background: #6c47e0; }
.cw-win .as-confirm { border-top: 1px solid #ecedf1; }

/* пилюли подсказок и готовых вопросов - как на демо-странице */
.as-followup,
.as-suggestion,
.as-ready__btn {
  border: 1px solid rgba(127, 90, 240, 0.28);
  background: rgba(127, 90, 240, 0.07);
  border-radius: 999px;
  color: inherit;
}
.as-followup:hover,
.as-suggestion:hover,
.as-ready__btn:hover {
  background: rgba(127, 90, 240, 0.15);
  border-color: rgba(127, 90, 240, 0.5);
}
.as-ready { border-radius: 14px; }
.as-links { border-color: #ecedf1; border-radius: 14px; }
.as-links > summary { border-radius: 14px 14px 0 0; }

/* на телефоне окно занимает весь экран - скругление и тень там лишние */
@media (max-width: 560px) {
  .cw { padding: 0 8px 10px; }
  .cw-win { border-radius: 14px; margin-top: 6px; }
}

/* Настройки под шестерёнкой и доводка до вида демо-страницы (Игорь 21.09.2026; патч 616) */
.cw-drawer { border-left: 1px solid #e6e6ee; border-radius: 18px 0 0 18px; font-size: 0.92rem; }
.cw-drawer h4 { color: #6a6d75; letter-spacing: 0.04em; }
.cw-set__row { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.cw-set__row .as-mode__btn,
.cw-set__row .cw-addr {
  padding: 6px 12px;
  border: 1px solid #e0e1e8;
  border-radius: 999px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
.cw-set__row .as-mode__btn.is-active,
.cw-set__row .cw-addr.is-on {
  background: rgba(127, 90, 240, 0.12);
  border-color: rgba(127, 90, 240, 0.55);
  color: #4a2fb0;
  font-weight: 600;
}
.cw-set__flags { flex-direction: column; align-items: flex-start; gap: 8px; border: 0; padding: 0; background: transparent; }
.cw-set__flags .cw-flag { border-color: #e0e1e8; font-size: 0.85rem; }

/* лента и полоса кнопок - размеры как на демо-странице */
.cw-win .as-log { padding: 18px 20px 22px; }
.cw-bar { font-size: 0.84rem; }
.cw-cnt { color: #6a6d75; }

/* Доводка под демо-страницу: пузырь ответа, размеры, счётчик, полоса кнопок (Игорь 21.09.2026; патч 618) */
.cw-win .as-msg--assistant .as-msg__bubble {
  background: #f4f4f8;
  border: 0;
  border-radius: 16px 16px 16px 4px;
  padding: 12px 15px;
  color: #26282e;
  font-size: 0.86rem;
  line-height: 1.46;
}
.cw-win .as-msg--assistant { max-width: 94%; }
.cw-win .as-msg--user .as-msg__bubble { font-size: 0.86rem; line-height: 1.46; border-radius: 16px 16px 4px 16px; }
.cw-win .as-log { font-size: 0.86rem; line-height: 1.46; }
.cw-win .as-form textarea { font-size: 0.88rem; }
.cw-win .as-msg--assistant .as-msg__bubble p { margin: 0 0 0.5rem 0; }
.cw-win .as-msg--assistant .as-msg__bubble h1,
.cw-win .as-msg--assistant .as-msg__bubble h2,
.cw-win .as-msg--assistant .as-msg__bubble h3,
.cw-win .as-msg--assistant .as-msg__bubble h4 { font-size: 0.92rem; margin: 0.7rem 0 0.3rem; }
.cw-win .as-msg--assistant .as-msg__bubble ul,
.cw-win .as-msg--assistant .as-msg__bubble ol { margin: 0.2rem 0 0.5rem; padding-left: 1.1rem; }

/* счётчик знаков - только когда до предела меньше 500 (на демо его нет) */
.cw-win .as-charcount { display: none; }
.cw-win .as-charcount.is-near { display: block; }

/* нерабочие пилюли «скоро» прячем: из-за них полоса переносилась на вторую строку */
.cw-bar .cw-ic[data-soon="1"] { display: none; }
.cw-bar { flex-wrap: wrap; row-gap: 4px; }
.cw-cnt { margin-left: auto; }

/* Готовые вопросы: поиск и плитка (Игорь 22.09.2026, выбор 4-го варианта с тест-страницы; патч 671) */
.as-ready__srch { width: 100%; padding: 8px 11px; margin: 0 0 8px; border: 1px solid #e0e1e8; border-radius: 12px;
  font: inherit; font-size: 0.86rem; background: #fff; }
.as-ready__tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.as-ready__tile { display: block; text-align: left; border: 1px solid #ece9fb; border-radius: 13px; padding: 8px 10px;
  background: #fff; color: #3a3c46; font: inherit; font-size: 0.8rem; line-height: 1.35; cursor: pointer; }
.as-ready__tile b { display: block; font-size: 0.75rem; color: #7a7f95; font-weight: 500; margin-bottom: 3px; }
.as-ready__tile:hover { border-color: #7f5af0; }
.as-ready__tile[aria-pressed="true"] { border-color: #7f5af0; background: rgba(127, 90, 240, 0.08); }
.as-ready__tile--wide { grid-column: 1 / -1; cursor: default; }
.as-ready__tile--wide .as-ready__d { display: block; margin-bottom: 6px; color: #6a6d75; }
.as-ready__planets { display: flex; flex-wrap: wrap; gap: 5px; }
.as-ready__pl { padding: 5px 10px; border: 1px solid #ded8fb; border-radius: 999px; background: #fff;
  color: #4a2fb0; font: inherit; font-size: 0.78rem; cursor: pointer; }
.as-ready__pl:hover { background: #7f5af0; color: #fff; border-color: #7f5af0; }
.as-ready__pl[aria-pressed="true"] { background: #7f5af0; color: #fff; border-color: #7f5af0; }
.as-ready__empty { padding: 8px 2px 2px; color: #9aa0ad; font-size: 0.8rem; }

/* Панель готовых вопросов выросла до полусотни плиток - даём ей свою прокрутку (Игорь 22.09; патч 700) */
.as-ready__body { max-height: 54vh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.as-ready__srch { position: sticky; top: 0; z-index: 2; }
.as-ready__body::-webkit-scrollbar { width: 8px; }
.as-ready__body::-webkit-scrollbar-thumb { background: rgba(127, 90, 240, 0.28); border-radius: 8px; }
.as-ready__body::-webkit-scrollbar-track { background: transparent; }
