/* Справочные модули кабинета: материалы, база знаний, шаблоны сообщений, наборы работ,
   предложенные работы. Здесь только то, чего нет в app.css; цвета, кнопки (.btn-amber,
   .btn-ghost), чипы статусов (.chip), поля (.field), пустые состояния (.empty) и окна
   (.modal) — общие. Все классы с префиксом ct-. */

/* ---------- Панель над списком: поиск и фильтры ---------- */
.ct-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 16px; }
.ct-search { position: relative; flex: 1 1 260px; min-width: 0; max-width: 460px; }
.ct-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); pointer-events: none; }
.ct-search input {
  width: 100%; height: 42px; padding: 0 12px 0 38px; border: 1px solid var(--line-bright); border-radius: 10px;
  background: var(--bg-card); color: var(--ink); font: 15px var(--body); outline: none;
}
.ct-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(10,77,166,.12); }

.ct-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; min-width: 0; }
.ct-chips::-webkit-scrollbar { display: none; }
.ct-chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 13px;
  border: 1px solid var(--line-bright); border-radius: 999px; background: var(--bg-card);
  color: var(--ink-dim); font: 600 13px var(--body); white-space: nowrap;
}
.ct-chip:hover { color: var(--ink); border-color: var(--ink-faint); }
.ct-chip.on { color: var(--accent); border-color: var(--accent); background: var(--client-soft); }
.ct-chip i { font: 500 11.5px var(--mono); font-style: normal; opacity: .75; }

/* Переключатель из двух-трёх пунктов */
.ct-seg { display: inline-flex; gap: 3px; padding: 3px; background: var(--surface-sunken); border: 1px solid var(--line); border-radius: 10px; max-width: 100%; }
.ct-seg button, .ct-seg a {
  border: 1px solid transparent; background: none; border-radius: 8px; padding: 7px 13px;
  font: 600 13px var(--body); color: var(--ink-dim); white-space: nowrap;
}
.ct-seg .on { color: var(--accent); background: var(--bg-card); border-color: var(--line-bright); box-shadow: 0 1px 2px rgba(16,24,40,.12); }

/* ---------- Карточка-список ---------- */
.ct-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 3px rgba(16,24,40,.06); overflow: hidden; }
.ct-card + .ct-card { margin-top: 14px; }
.ct-card-head {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--surface-sunken);
  border-bottom: 1px solid var(--line); font: 700 11.5px var(--body); letter-spacing: .05em; text-transform: uppercase; color: var(--accent);
}
.ct-card-head span { font: 500 12px var(--mono); color: var(--ink-faint); letter-spacing: 0; }
.ct-row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-top: 1px solid var(--line); min-width: 0; }
.ct-row:first-child, .ct-card-head + .ct-row { border-top: none; }
.ct-row.tap { cursor: pointer; }
.ct-row.tap:hover { background: var(--bg-raise); }
.ct-row.dim { opacity: .55; }
.ct-main { flex: 1; min-width: 0; }
.ct-title { font-weight: 600; font-size: 14px; color: var(--ink); line-height: 1.35; overflow-wrap: anywhere; }
.ct-sub { font-size: 12px; color: var(--ink-faint); margin-top: 2px; overflow-wrap: anywhere; }
.ct-sub b { color: var(--ink-dim); font-weight: 600; }
.ct-num { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ct-prices { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; font-size: 13px; }
.ct-prices .lbl { font: 600 10px var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); margin-right: 6px; }
.ct-client { color: var(--client); font-weight: 600; }
.ct-master { color: var(--master); }
.ct-margin { color: var(--margin); }
.ct-note { font-size: 12.5px; color: var(--ink-dim); margin-top: 4px; }
.ct-hint { font-size: 12.5px; color: var(--ink-faint); line-height: 1.5; }
.ct-go { color: var(--ink-faint); display: inline-flex; flex: none; }
.ct-link { background: none; border: none; padding: 0; color: var(--accent); font: 600 13px var(--body); cursor: pointer; }
.ct-link:hover { text-decoration: underline; }

/* Цена, которую можно поправить прямо в списке */
.ct-price-btn { border: 1px dashed transparent; background: none; border-radius: 6px; padding: 2px 6px; font: inherit; color: inherit; }
.ct-price-btn:hover { border-color: var(--line-bright); background: var(--bg-raise); }
.ct-price-input { width: 96px; height: 30px; padding: 0 8px; border: 1px solid var(--accent); border-radius: 6px; font: 13px var(--mono); text-align: right; outline: none; color: var(--ink); background: var(--bg-card); }

.ct-thumb {
  width: 44px; height: 44px; flex: none; border-radius: 9px; object-fit: cover; background: var(--surface-sunken);
  border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-faint);
}
.ct-icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none;
  border: 1px solid transparent; border-radius: 9px; background: none; color: var(--ink-faint);
}
.ct-icon-btn:hover { color: var(--accent); border-color: var(--line-bright); background: var(--bg-card); }
.ct-icon-btn.danger:hover { color: var(--red); }

/* Строка спецификации объекта: отметка · название · статус · сумма */
.ct-srow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(86px, auto); align-items: center; gap: 4px 12px; padding: 11px 16px; border-top: 1px solid var(--line); }
.ct-card-head + .ct-srow { border-top: none; }
.ct-srow.done .ct-title { color: var(--ink-dim); }
.ct-srow .ct-main:hover .ct-title { color: var(--accent); }

/* ---------- Итоги (спецификация объекта) ---------- */
.ct-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ct-stat { background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.ct-stat .k { font: 700 11px var(--body); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint); }
.ct-stat .v { font: 600 21px var(--mono); margin-top: 5px; color: var(--ink); white-space: nowrap; }
.ct-stat .s { font-size: 12px; color: var(--ink-dim); margin-top: 3px; }
.ct-stat.ok .v { color: var(--green); }
.ct-stat.todo .v { color: var(--amber-deep); }
.ct-stat .progress { margin-top: 9px; }
.ct-stat .progress > i { background: linear-gradient(90deg, #17804a, var(--green)); }

/* Статус закупки */
.ct-status {
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 11px; flex: none;
  border: 1px solid var(--line-bright); border-radius: 999px; background: var(--bg-card);
  font: 700 11.5px var(--body); letter-spacing: .03em; color: var(--ink-dim); white-space: nowrap;
}
.ct-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
button.ct-status:hover { border-color: currentColor; }
.ct-status.need { color: var(--amber-deep); border-color: rgba(224,138,0,.4); background: rgba(224,138,0,.08); }
.ct-status.ordered { color: var(--accent); border-color: rgba(10,77,166,.35); background: var(--client-soft); }
.ct-status.bought { color: var(--green); border-color: rgba(31,157,87,.4); background: rgba(31,157,87,.08); }
.ct-status.onsite { color: var(--violet); border-color: rgba(105,65,198,.35); background: var(--master-soft); }
.ct-status.pending { color: var(--amber-deep); border-color: rgba(224,138,0,.4); background: rgba(224,138,0,.08); }
.ct-status.accepted { color: var(--green); border-color: rgba(31,157,87,.4); background: rgba(31,157,87,.08); }
.ct-status.rejected { color: var(--red); border-color: rgba(217,45,32,.35); background: rgba(217,45,32,.06); }
.ct-tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font: 600 11px var(--body); color: var(--ink-dim); background: var(--surface-sunken); border: 1px solid var(--line); white-space: nowrap; }
.ct-tag.client { color: var(--violet); background: var(--master-soft); border-color: rgba(105,65,198,.25); }

/* Круглая отметка «куплено» */
.ct-check {
  width: 30px; height: 30px; flex: none; border-radius: 50%; border: 2px solid var(--line-bright);
  background: var(--bg-card); color: transparent; display: grid; place-items: center; padding: 0;
}
.ct-check:hover { border-color: var(--green); }
.ct-check.on { background: var(--green); border-color: var(--green); color: #fff; }
.ct-check:disabled { opacity: 1; cursor: default; }

/* Выбор из нескольких крупных вариантов в окне (статус закупки и т. п.) */
.ct-options { display: grid; gap: 8px; }
.ct-options button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 14px; text-align: left;
  border: 1px solid var(--line-bright); border-radius: 10px; background: var(--bg-card); font: 600 14.5px var(--body); color: var(--ink);
}
.ct-options button:hover, .ct-options button.on { border-color: var(--accent); background: var(--client-soft); }

/* ---------- Формы: то, чего нет у .field в app.css ---------- */
.ct-form .field textarea, .ct-form .field select, .ct-input {
  width: 100%; background: var(--bg); border: 1px solid var(--line-bright); border-radius: 10px;
  padding: 12px 14px; color: var(--ink); font: 15px var(--body); outline: none;
}
.ct-form .field textarea { min-height: 110px; resize: vertical; line-height: 1.5; display: block; }
.ct-form .field textarea:focus, .ct-form .field select:focus, .ct-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(10,77,166,.15); }
.ct-form .field .ct-under { font-size: 12px; color: var(--ink-faint); margin-top: 6px; }
.modal.ct-wide { max-width: 660px; }
.modal .ct-row3 { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 12px; }
.modal .ct-danger { margin-right: auto; }
.ct-stepper { display: flex; align-items: stretch; gap: 6px; }
.ct-stepper button { width: 46px; flex: none; border: 1px solid var(--line-bright); border-radius: 10px; background: var(--bg-card); font: 600 20px var(--body); color: var(--ink-dim); }
.ct-stepper button:hover { border-color: var(--accent); color: var(--accent); }
.ct-stepper input { text-align: center; font-family: var(--mono); }
.ct-photo { display: flex; align-items: center; gap: 12px; }
.ct-photo .ct-thumb { width: 64px; height: 64px; }
.ct-pick { max-height: min(46vh, 380px); overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.ct-pick .ct-row { padding: 9px 12px; }
.ct-pick .ct-row.on { background: var(--client-soft); }
.ct-pick-empty { padding: 22px 14px; text-align: center; color: var(--ink-faint); font-size: 13px; }
.ct-qty { width: 74px; height: 36px; padding: 0 8px; border: 1px solid var(--line-bright); border-radius: 8px; font: 14px var(--mono); text-align: center; outline: none; background: var(--bg-card); color: var(--ink); flex: none; }
.ct-qty:focus { border-color: var(--accent); }
.ct-x { font: 500 12.5px var(--mono); color: var(--ink-faint); flex: none; }

.empty .ct-empty-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 20px; }
.ct-sec { font: 700 11px var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin: 22px 0 10px; }
.ct-sec:first-child { margin-top: 0; }

/* Кнопка добавления под большим пальцем — только на телефоне */
.ct-fab { display: none; }

/* ---------- Сетка карточек (наборы работ, предложения) ---------- */
.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 16px; align-items: start; }
.ct-panel { background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 3px rgba(16,24,40,.06); padding: 16px 18px; min-width: 0; }
.ct-panel h3 { font: 600 16px var(--disp); color: var(--ink); overflow-wrap: anywhere; }
.ct-panel-head { display: flex; align-items: flex-start; gap: 10px; }
.ct-panel-head > :first-child { flex: 1; min-width: 0; }
.ct-priceline { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 8px; font: 500 12.5px var(--mono); color: var(--ink-dim); }
.ct-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ct-actions .btn-amber { padding: 9px 16px; font-size: 13.5px; box-shadow: none; }
.ct-actions .btn-ghost { padding: 9px 14px; }
.ct-lines { margin-top: 12px; border-top: 1px solid var(--line); }
.ct-line { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.ct-line:last-child { border-bottom: none; }
.ct-line .nm { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ct-line.off .nm { color: var(--ink-faint); text-decoration: line-through; }
.ct-kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 13px; margin-top: 10px; }
.ct-kv dt { color: var(--ink-faint); }
.ct-kv dd { color: var(--ink); min-width: 0; overflow-wrap: anywhere; }

/* ---------- База знаний ---------- */
.ct-kb { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 22px; align-items: start; }
.ct-kb-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 76px; }
.ct-kb-nav button {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: none; background: none;
  border-radius: 8px; padding: 9px 12px; font: 600 13.5px var(--body); color: var(--ink-dim);
}
.ct-kb-nav button:hover { background: var(--bg-card); color: var(--ink); }
.ct-kb-nav button.on { background: var(--client-soft); color: var(--accent); }
.ct-kb-nav button span { margin-left: auto; font: 500 11.5px var(--mono); color: var(--ink-faint); }
.ct-kb-nav .ct-link { padding: 9px 12px; text-align: left; }
.ct-kb-item { display: block; padding: 14px 18px; border-top: 1px solid var(--line); color: var(--ink); }
.ct-kb-item:first-child { border-top: none; }
.ct-kb-item:hover { background: var(--bg-raise); }
.ct-kb-item h4 { font: 600 15.5px var(--disp); display: flex; align-items: center; gap: 7px; }
.ct-kb-item h4 svg { color: var(--amber); flex: none; }
.ct-kb-item p { font-size: 13.5px; color: var(--ink-dim); margin-top: 4px; line-height: 1.5; overflow-wrap: anywhere; }
.ct-kb-item .meta, .ct-article-meta { font-size: 12px; color: var(--ink-faint); margin-top: 6px; }

.ct-article { max-width: 760px; }
.ct-article-body { font-size: 16px; line-height: 1.65; color: var(--ink); overflow-wrap: anywhere; }
.ct-article-body > :first-child { margin-top: 0; }
.ct-article-body h2 { font: 600 22px var(--disp); margin: 28px 0 10px; line-height: 1.3; }
.ct-article-body h3 { font: 600 18px var(--disp); margin: 24px 0 8px; line-height: 1.3; }
.ct-article-body h4 { font: 700 15.5px var(--body); margin: 20px 0 6px; }
.ct-article-body p { margin: 0 0 14px; }
.ct-article-body ul, .ct-article-body ol { margin: 0 0 14px; padding-left: 24px; }
.ct-article-body li { margin-bottom: 6px; }
.ct-article-body a { text-decoration: underline; text-underline-offset: 2px; }
.ct-article-body blockquote { margin: 0 0 14px; padding: 12px 16px; border-left: 3px solid var(--amber); background: rgba(224,138,0,.07); border-radius: 0 10px 10px 0; }
.ct-article-body hr { border: none; border-top: 1px solid var(--line-bright); margin: 22px 0; }
.ct-article-body img { display: block; max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); margin: 4px 0 14px; }
.ct-video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 20px; border-radius: 12px; overflow: hidden; background: #0b1730; }
.ct-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ct-video-link { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 20px; padding: 11px 16px; border: 1px solid var(--line-bright); border-radius: 10px; background: var(--bg-card); font-weight: 600; }

.ct-editor { max-width: 860px; }
.ct-editor-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ct-editor-tools button { min-width: 40px; height: 38px; padding: 0 11px; border: 1px solid var(--line-bright); border-radius: 8px; background: var(--bg-card); font: 600 13px var(--body); color: var(--ink-dim); }
.ct-editor-tools button:hover { color: var(--accent); border-color: var(--accent); }
.ct-editor textarea.ct-body { min-height: 340px; font-size: 15.5px; background: var(--bg-card); }
.ct-preview { border: 1px solid var(--line); border-radius: 10px; background: var(--bg-card); padding: 18px 20px; min-height: 340px; }
.ct-editor-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.ct-check-line { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-dim); }
.ct-check-line input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ---------- Шаблоны сообщений ---------- */
.ct-two { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 22px; align-items: start; }
.ct-tpl { display: block; width: 100%; text-align: left; border: none; background: none; padding: 13px 16px; border-top: 1px solid var(--line); color: var(--ink); }
.ct-tpl:first-child { border-top: none; }
.ct-tpl:hover { background: var(--bg-raise); }
.ct-tpl.on { background: var(--client-soft); box-shadow: inset 3px 0 0 var(--accent); }
.ct-tpl p { font-size: 12.5px; color: var(--ink-dim); margin-top: 3px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ct-tpl .tags { display: flex; gap: 6px; margin-top: 7px; }
.ct-bench { position: sticky; top: 76px; }
.ct-bubble-wrap { background: var(--surface-sunken); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-top: 14px; }
.ct-bubble {
  max-width: 520px; background: #E7F6E1; border-radius: 4px 14px 14px 14px; padding: 11px 14px; font-size: 14.5px; line-height: 1.5;
  white-space: pre-wrap; overflow-wrap: anywhere; color: #14181F; box-shadow: 0 1px 1px rgba(16,24,40,.08);
}
.ct-bubble.email { background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px; max-width: none; }
.ct-bubble .subj { display: block; font-weight: 700; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.ct-bubble mark { background: none; color: inherit; border-bottom: 2px dashed var(--amber); padding: 0 1px; }
.ct-bubble mark.miss { background: rgba(224,138,0,.18); border-radius: 4px; border-bottom: none; padding: 1px 4px; color: var(--amber-deep); font-weight: 600; }
.ct-meter { font: 500 12px var(--mono); color: var(--ink-faint); margin-top: 9px; }
.ct-vars { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-var { border: 1px solid rgba(10,77,166,.25); background: var(--client-soft); color: var(--accent); border-radius: 7px; padding: 6px 10px; font: 600 12.5px var(--body); }
.ct-var:hover { border-color: var(--accent); }
.ct-fill { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 12px; margin-top: 12px; }
.ct-fill label { display: block; font: 600 11.5px var(--body); color: var(--ink-faint); margin-bottom: 4px; }
.ct-fill input, .ct-fill select { width: 100%; height: 40px; padding: 0 11px; border: 1px solid var(--line-bright); border-radius: 9px; background: var(--bg-card); font: 14px var(--body); color: var(--ink); outline: none; }
.ct-fill input:focus, .ct-fill select:focus { border-color: var(--accent); }
.ct-fill input.miss { border-color: rgba(224,138,0,.6); background: rgba(224,138,0,.05); }
.ct-back { display: none; }

/* ---------- Планшет и телефон ---------- */
@media (max-width: 900px) {
  .ct-kb { grid-template-columns: 1fr; gap: 12px; }
  .ct-kb-nav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; gap: 6px; padding-bottom: 2px; }
  .ct-kb-nav::-webkit-scrollbar { display: none; }
  .ct-kb-nav button { width: auto; flex: none; white-space: nowrap; border: 1px solid var(--line-bright); border-radius: 999px; background: var(--bg-card); padding: 7px 13px; font-size: 13px; }
  .ct-kb-nav button.on { border-color: var(--accent); }
  .ct-kb-nav button span { margin-left: 2px; }
  .ct-kb-nav .ct-link { flex: none; white-space: nowrap; }
  .ct-two { grid-template-columns: 1fr; }
  .ct-two[data-pane="detail"] > .ct-pane-list, .ct-two[data-pane="list"] > .ct-pane-detail { display: none; }
  .ct-bench { position: static; }
  .ct-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; }
}
@media (max-width: 640px) {
  .ct-search { max-width: none; flex-basis: 100%; }
  .ct-search input { height: 44px; font-size: 16px; }   /* 16px — iOS не увеличивает страницу при вводе */
  .ct-form .field textarea, .ct-form .field select, .ct-input, .ct-fill input, .ct-fill select, .ct-qty, .ct-price-input { font-size: 16px; }
  .ct-row { padding: 12px 13px; gap: 10px; }
  /* строка с ценами: на телефоне цены уходят второй строкой, название не сжимается */
  .ct-row.stack { flex-wrap: wrap; }
  .ct-row.stack .ct-main { flex: 1 1 60%; }
  .ct-row.stack .ct-prices { flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: baseline; gap: 2px 18px; }
  .ct-row.stack .ct-thumb + .ct-main + .ct-prices { padding-left: 54px; }
  .ct-row.stack .ct-go { display: none; }
  .ct-srow { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "check main main" ". status sum"; padding: 12px 13px; gap: 8px 10px; }
  .ct-srow .ct-check { grid-area: check; align-self: start; }
  .ct-srow .ct-main { grid-area: main; }
  .ct-srow .ct-status { grid-area: status; justify-self: start; }
  .ct-srow .ct-prices { grid-area: sum; }
  .ct-card-head { padding: 9px 13px; }
  .ct-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .ct-stat { padding: 11px 12px; }
  .ct-stat .v { font-size: 17px; }
  .ct-stat.full { grid-column: 1 / -1; }
  .modal .row2.ct-pair { grid-template-columns: 1fr 1fr; }      /* короткие поля остаются парой и на телефоне */
  .modal .row2.ct-pair.q { grid-template-columns: 1.5fr 1fr; }
  .ct-stepper button { width: 40px; }
  .modal .ct-row3 { grid-template-columns: 1fr 1fr; }
  .modal .ct-row3 > :first-child { grid-column: 1 / -1; }
  .modal .ct-danger { margin-right: 0; }
  .ct-status { min-height: 34px; }
  .ct-check { width: 34px; height: 34px; }
  .ct-panel { padding: 14px; }
  .ct-actions > * { flex: 1 1 auto; }
  .ct-article-body { font-size: 16.5px; }
  .ct-article-body h2 { font-size: 20px; }
  .ct-preview { padding: 14px; }
  .ct-editor-foot .btn-amber { flex: 1; }
  .ct-fill { grid-template-columns: 1fr; }
  .ct-head-add { display: none; }
  .ct-fab {
    display: inline-flex; align-items: center; gap: 8px; position: fixed; right: 14px; bottom: 16px; z-index: 40;
    height: 52px; padding: 0 20px; border: none; border-radius: 26px; background: var(--accent); color: #fff;
    font: 800 15px var(--body); box-shadow: 0 10px 24px rgba(10,77,166,.35);
  }
  .ct-has-fab { padding-bottom: 76px; }
}
