:root {
  color-scheme: light;
  --bg: #f5f6f4;
  --surface: #fff;
  --surface-2: #fafbf9;
  --text: #111613;
  --muted: #5f6a64;
  --line: #e3e8e4;
  --accent: #1f7a5a;
  --accent-soft: #e8f5ef;
  --bad: #b3261e;
  --bad-soft: #fdecea;
  --warn: #8a5a00;
  --warn-soft: #fff5e0;
  --up: #1d4f91;
  --up-soft: #e9f0fb;
  --radius: 12px;
}
/* Тёмная: по системе, если не выбрана светлая; или выбрана вручную (1.29.0). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1311;
    --surface: #171c19;
    --surface-2: #1d2320;
    --text: #eef2ef;
    --muted: #9aa69f;
    --line: #29302c;
    --accent: #5cc79c;
    --accent-soft: #15291f;
    --bad: #f28b82;
    --bad-soft: #3a1b19;
    --warn: #f0c060;
    --warn-soft: #33280f;
    --up: #8ab4f8;
    --up-soft: #182538;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1311;
  --surface: #171c19;
  --surface-2: #1d2320;
  --text: #eef2ef;
  --muted: #9aa69f;
  --line: #29302c;
  --accent: #5cc79c;
  --accent-soft: #15291f;
  --bad: #f28b82;
  --bad-soft: #3a1b19;
  --warn: #f0c060;
  --warn-soft: #33280f;
  --up: #8ab4f8;
  --up-soft: #182538;
}
:root[data-theme="light"] {
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    14px / 1.45 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
}
main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}
footer {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 16px 24px;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  gap: 4px 10px;
  flex-wrap: wrap;
  align-items: center;
}
footer .ver {
  color: inherit;
  text-decoration: none;
}
footer .ver:hover {
  text-decoration: underline;
}
/* «Что нового» (src/web/whats-new.ts): версии — якорями, разделы — по версии. */
.whats-new-index {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 8px 0 16px;
  font-size: 13px;
}
.release {
  max-width: 820px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.release h2 {
  font-size: 18px;
}
/* «Описание сервиса» (src/web/docs.ts): документ — текстом, не шире строки чтения. */
.doc {
  max-width: 820px;
}
.doc h1 {
  margin-top: 0;
}
.doc h2 {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.doc pre {
  overflow-x: auto;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 13px;
}
.doc blockquote {
  margin: 8px 0;
  padding-left: 12px;
  border-left: 3px solid var(--line);
}
.doc .table-wrap {
  overflow-x: auto;
}
/* Бейдж студии, вариант B «Промпт» из ipshutenko.ru/brand/badge: цвет берёт у подвала. */
.shk {
  font:
    500 12px / 1 ui-monospace,
    "JetBrains Mono",
    "SF Mono",
    Menlo,
    Consolas,
    monospace;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  white-space: nowrap;
  letter-spacing: 0;
  vertical-align: middle;
}
@keyframes shk-b {
  50% {
    opacity: 0;
  }
}
.shk-prompt {
  color: inherit;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.shk-prompt:hover,
.shk-prompt:focus-visible {
  opacity: 1;
}
.shk-prompt .d {
  color: #34c27a;
}
.shk-prompt .w {
  display: inline-flex;
  align-items: center;
  min-width: calc(var(--n) * 1ch + 0.7em);
}
.shk-prompt b {
  font-weight: 700;
  display: inline-block;
  overflow: hidden;
  white-space: pre;
  width: calc(var(--n) * 1ch);
  animation: shk-t 8s infinite;
}
.shk-prompt .k {
  display: inline-block;
  width: 0.6em;
  height: 1.05em;
  background: #34c27a;
  margin-left: 0.1em;
  animation: shk-b 1.1s steps(1) infinite;
}
@keyframes shk-t {
  0% {
    width: calc(var(--k) * 1ch);
    animation-timing-function: steps(6, end);
  }
  30% {
    width: calc(var(--n) * 1ch);
  }
  60% {
    width: calc(var(--n) * 1ch);
    animation-timing-function: steps(6, end);
  }
  75% {
    width: calc(var(--k) * 1ch);
  }
  100% {
    width: calc(var(--k) * 1ch);
  }
}
@media (prefers-reduced-motion: reduce) {
  .shk,
  .shk * {
    animation: none !important;
    transition: none !important;
  }
  .shk-prompt b {
    width: calc(var(--n) * 1ch);
  }
}
h1 {
  font-size: 20px;
  margin: 0 0 4px;
}
.muted {
  color: var(--muted);
}
.meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 4px 0 16px;
  color: var(--muted);
}
.meta b {
  color: var(--text);
  font-weight: 600;
}
.stale {
  color: var(--bad);
}
.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 10px;
}
.chip {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
}
.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
form.search {
  margin: 0 0 12px;
}
form.search input {
  width: min(420px, 100%);
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
table {
  border-collapse: collapse;
  width: 100%;
}
th,
td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  font-weight: 600;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
td.num,
th.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
tr:last-child td {
  border-bottom: 0;
}
td.position {
  min-width: 240px;
}
.mask {
  font-weight: 600;
  white-space: nowrap;
}
.name {
  color: var(--muted);
  font-size: 12px;
}
details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
}
details ul {
  margin: 4px 0 0;
  padding-left: 16px;
  font-size: 12px;
}
.status {
  font-size: 12px;
  white-space: nowrap;
  padding: 2px 8px;
  border-radius: 6px;
}
.s-bad {
  background: var(--bad-soft);
  color: var(--bad);
}
.s-warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.s-up {
  background: var(--up-soft);
  color: var(--up);
}
.s-down {
  background: var(--accent-soft);
  color: var(--accent);
}
.s-none {
  color: var(--muted);
}
.split {
  color: var(--warn);
  font-size: 12px;
}
section.note {
  margin: 16px 0 0;
  padding: 12px 14px;
  background: var(--warn-soft);
  border-radius: var(--radius);
}
section.block {
  margin: 18px 0 0;
}
section.block h2 {
  font-size: 16px;
  margin: 0 0 8px;
}
form.inline,
div.inline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: end;
}
div.inline label.check {
  display: flex;
  align-items: center;
  gap: 6px;
}
form.inline label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: var(--muted);
}
form.inline input,
form.inline select {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  min-width: 140px;
}
form.inline label.check {
  flex-direction: row;
  align-items: center;
  gap: 6px;
}
form.inline label.check input {
  min-width: 0;
}
/*
 * Все кнопки одной высоты с полями ввода (1.106.0, владелец: «почему размер
 * кнопок везде разный»): прозрачная рамка 1px у залитых, тот же отступ у серых.
 */
button {
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  cursor: pointer;
}
button.quiet {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}
/*
 * Ссылка-кнопка (1.111.3, владелец: «почему Отмена просто ссылка»): «Отмена»
 * и «Назад» рядом с кнопкой — a.button.quiet в том же div.actions, той же
 * высоты и вида, что button.quiet.
 */
a.button {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  line-height: inherit;
  text-decoration: none;
  cursor: pointer;
}
a.button.quiet {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}
a.button.quiet:hover {
  color: var(--text);
}
button.second {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
}
details.group {
  margin: 8px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
details.group > summary {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 14px;
  cursor: pointer;
  color: var(--text);
  font-size: 14px;
}
details.group > summary::-webkit-details-marker {
  display: none;
}
details.group > summary .title {
  font-weight: 600;
}
details.group > summary .title::before {
  content: "▸";
  display: inline-block;
  width: 1.2em;
  color: var(--muted);
}
details.group[open] > summary .title::before {
  content: "▾";
}
details.group > summary .sum {
  color: var(--muted);
  font-size: 13px;
}
details.group > .inner {
  padding: 0 14px 12px;
}
details.group > .inner > .table-wrap {
  border-radius: 8px;
}
nav.attention {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
nav.attention a,
nav.attention span {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}
nav.attention .bad {
  background: var(--bad-soft);
  color: var(--bad);
}
nav.attention .warn {
  background: var(--warn-soft);
  color: var(--warn);
}
nav.attention .up {
  background: var(--up-soft);
  color: var(--up);
}
nav.attention .down {
  background: var(--accent-soft);
  color: var(--accent);
}
nav.attention .plain {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}
nav.attention .active {
  border-color: currentColor;
}
p.more {
  margin: 8px 0 0;
  font-size: 13px;
}
nav.subtabs {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--line);
}
nav.subtabs a {
  padding: 7px 12px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
nav.subtabs a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}
div.bulkbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 8px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: sticky;
  top: 0;
  z-index: 5;
}
div.bulkbar input {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
div.bulkbar label.check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
section.panel {
  margin: 12px 0 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
div.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
  margin: 10px 0;
}
div.metric {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
}
div.metric .label {
  font-size: 12px;
  color: var(--muted);
}
div.metric .value {
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
div.metric .hint {
  font-size: 12px;
  color: var(--muted);
}
div.bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 72px;
  margin: 6px 0;
  padding: 6px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
div.bars span {
  flex: 1;
  min-width: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
  opacity: 0.85;
}
.rise {
  color: var(--up);
}
.flash {
  padding: 10px 14px;
  border-radius: var(--radius);
  margin: 0 0 12px;
}
.flash.ok {
  background: var(--accent-soft);
  color: var(--accent);
}
.flash.error {
  background: var(--bad-soft);
  color: var(--bad);
}

/*
 * Отступы и мелкая раскладка классами — вместо style="…" в разметке.
 * !important — как было у style="…": правило сильнее любого селектора.
 */
.m-0 {
  margin: 0 !important;
}
.small {
  font-size: 0.85em;
}
.mt-6 {
  margin-top: 6px !important;
}
.mt-8 {
  margin-top: 8px !important;
}
.mt-10 {
  margin-top: 10px !important;
}
.mt-12 {
  margin-top: 12px !important;
}
.mt-14 {
  margin-top: 14px !important;
}
.mb-6 {
  margin: 0 0 6px !important;
}
.mb-8 {
  margin: 0 0 8px !important;
}
.mb-10 {
  margin: 0 0 10px !important;
}
.mb-14 {
  margin: 0 0 14px !important;
}
.top-4 {
  margin: 4px 0 0 !important;
}
.top-6 {
  margin: 6px 0 0 !important;
}
.top-8 {
  margin: 8px 0 0 !important;
}
.inline-form {
  display: inline !important;
}
.between {
  justify-content: space-between !important;
}
.center-y {
  align-items: center !important;
}
.w-full {
  width: 100% !important;
}
.nowrap {
  white-space: nowrap !important;
}

/* Сортировка, поиск и фильтры таблиц — table.js (1.22.0, docs/tables.md). */
th.mm-sortable {
  cursor: pointer;
  user-select: none;
}
th.mm-sortable:hover,
th.mm-sortable:focus-visible {
  color: var(--text);
}
th.mm-sortable::after {
  content: " ↕";
  opacity: 0.35;
}
th[aria-sort="ascending"]::after {
  content: " ▲";
  opacity: 1;
  color: var(--accent);
}
th[aria-sort="descending"]::after {
  content: " ▼";
  opacity: 1;
  color: var(--accent);
}
tr.mm-filters th {
  position: static;
  padding: 4px 6px;
  background: var(--surface);
}
tr.mm-filters input {
  width: 100%;
  min-width: 60px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 400;
  font-size: 12px;
}
div.mm-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
}
div.mm-tools input {
  flex: 1 1 220px;
  max-width: 360px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
div.mm-tools button.mm-on {
  color: var(--accent);
  border-color: var(--accent);
}
.mm-count {
  font-size: 12px;
}
p.mm-note {
  margin: 0 0 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 12px;
}
.mm-tools [hidden],
p.mm-note[hidden],
tr.mm-filters[hidden] {
  display: none;
}

/*
 * Меню (1.29.0, docs/navigation.md): разделы — слева, сворачиваются в
 * значки; вкладки раздела — в строке сверху; телефон — нижняя панель.
 * Ширина меню: широко на большом экране, значками — на ноутбуке поуже,
 * а выбор «свернуть/развернуть» (cookie mz_nav → data-nav) главнее.
 */
:root {
  --rail: 252px;
  --rail-icons: 60px;
  --topbar: 52px;
}
@media (max-width: 1100px) {
  :root {
    --rail: var(--rail-icons);
  }
}
:root[data-nav="icons"] {
  --rail: var(--rail-icons);
}
@media (min-width: 761px) {
  :root[data-nav="wide"] {
    --rail: 252px;
  }
}
svg.i {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body.shell .frame {
  margin-left: var(--rail);
  min-width: 0;
}
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 8px max(10px, env(safe-area-inset-bottom));
  background: var(--surface);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  container: rail / inline-size;
}
.rail .grp {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 10px 10px 4px;
  white-space: nowrap;
}
.rail .spacer {
  flex: 1;
  min-height: 12px;
}
.rail form {
  margin: 0;
}
.item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  font: inherit;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
}
.item:hover {
  background: var(--surface-2);
  color: var(--text);
}
.item.on {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.item .lbl {
  overflow: hidden;
  text-overflow: ellipsis;
}
.item .ava {
  width: 20px;
  height: 20px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
.badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--bad);
  color: var(--surface);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
/* Переключатель кабинетов. */
details.cab {
  position: relative;
}
details.cab > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text);
}
details.cab > summary::-webkit-details-marker {
  display: none;
}
.rail details.cab {
  margin-bottom: 8px;
}
.rail details.cab > summary {
  border: 1px solid var(--line);
  background: var(--surface-2);
}
details.cab > summary > svg {
  flex: none;
}
details.cab .txt {
  display: grid;
  min-width: 0;
}
details.cab .nm {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
details.cab .sub {
  font-size: 12px;
  color: var(--muted);
}
details.cab .menu {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  z-index: 40;
  min-width: 220px;
  max-height: 60vh;
  overflow-y: auto;
  display: grid;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.12);
}
details.cab .menu a {
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
}
details.cab .menu a:hover,
details.cab .menu a.on {
  background: var(--accent-soft);
}
details.cab .menu a.all {
  color: var(--muted);
  border-top: 1px solid var(--line);
  border-radius: 0;
  margin-top: 4px;
}
/* Меню значками: подписи прячутся, счётчик — в углу значка. */
@container rail (max-width: 120px) {
  .item .lbl,
  .grp,
  details.cab .txt {
    display: none;
  }
  .rail .grp {
    display: block;
    height: 1px;
    padding: 0;
    margin: 8px 10px;
    font-size: 0;
    background: var(--line);
  }
  .item {
    justify-content: center;
    padding: 9px 0;
  }
  .item .badge {
    position: absolute;
    top: 1px;
    right: 2px;
    min-width: 15px;
    height: 15px;
    font-size: 10px;
  }
  details.cab > summary {
    justify-content: center;
    padding: 6px 0;
  }
}
/* Строка сверху: раздел и его вкладки. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.topbar .row {
  display: flex;
  align-items: stretch;
  gap: 6px;
  min-height: var(--topbar);
  padding: 0 16px;
  max-width: 1320px;
  margin: 0 auto;
}
.topbar .heading {
  align-self: center;
  font-weight: 700;
  font-size: 15px;
  margin-right: 12px;
  white-space: nowrap;
}
.toptabs {
  display: flex;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.toptabs::-webkit-scrollbar {
  display: none;
}
.toptabs a {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.toptabs a:hover {
  color: var(--text);
}
.toptabs a.on {
  color: var(--text);
  border-bottom-color: var(--accent);
}
/* Счётчик на вкладке: сколько ждёт ответа именно здесь. */
.toptabs .badge {
  margin-left: 6px;
}
.topbar .acts {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.iconbtn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.iconbtn:hover {
  background: var(--surface-2);
  color: var(--text);
}
.iconbtn .kbd {
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 4px;
}
.m-only,
.dock {
  display: none;
}
/* Поиск по Ctrl+K. */
dialog.jump {
  width: min(520px, calc(100vw - 32px));
  margin: 12vh auto auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 16px 48px rgb(0 0 0 / 0.25);
}
dialog.jump::backdrop {
  background: rgb(0 0 0 / 0.3);
}
dialog.jump input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}
dialog.jump ul {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  max-height: 50vh;
  overflow-y: auto;
}
dialog.jump a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
}
dialog.jump a.on,
dialog.jump a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
dialog.jump .ai-answer {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-2);
}
dialog.jump .ai-answer p {
  margin: 0;
  white-space: pre-line;
}
dialog.jump .ai-answer {
  max-height: 50vh;
  overflow-y: auto;
}
dialog.jump .ai-answer p + p,
dialog.jump .ai-answer details {
  margin-top: 8px;
}
dialog.jump .ai-answer p.q {
  margin-top: 12px;
  font-weight: 600;
}
dialog.jump .ai-answer p.pending {
  color: var(--muted);
}
dialog.jump .ai-answer input.more {
  margin-top: 8px;
  font-size: 15px;
}
dialog.jump .ai-answer .go {
  display: inline-block;
  margin-top: 8px;
  padding: 0;
  color: var(--accent);
}
dialog.jump .ai-answer button.miss {
  display: inline-block;
  margin: 8px 0 0 12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
dialog.jump .ai-answer button.miss:disabled {
  cursor: default;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* Шапка таблицы не уезжает: длинная таблица листается внутри своей рамки. */
.table-wrap {
  max-height: calc(100dvh - var(--topbar) - 96px);
  overflow: auto;
}
th {
  z-index: 2;
}

/* Телефон и узкое окно: меню слева нет — нижняя панель и «Ещё». */
@media (max-width: 760px) {
  .rail {
    display: none;
  }
  body.shell .frame {
    margin-left: 0;
  }
  body.with-dock {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }
  .m-only {
    display: block;
  }
  .topbar .row {
    flex-wrap: wrap;
    padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
    gap: 0 4px;
  }
  .topbar details.cab {
    flex: 1;
    min-width: 0;
    align-self: center;
  }
  .topbar details.cab .sub {
    display: none;
  }
  .topbar .heading {
    display: none;
  }
  .topbar .acts {
    order: 1;
  }
  .iconbtn .kbd {
    display: none;
  }
  .iconbtn {
    padding: 10px;
  }
  .toptabs {
    order: 2;
    flex-basis: 100%;
    gap: 6px;
    padding: 2px 0 10px;
  }
  .toptabs a {
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-2);
    font-size: 13px;
  }
  .toptabs a.on {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: transparent;
    font-weight: 600;
  }
  main {
    padding: 14px max(12px, env(safe-area-inset-right)) 32px max(12px, env(safe-area-inset-left));
  }
  .dock {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    inset: auto 0 0;
    z-index: 30;
    padding: 4px 4px max(6px, env(safe-area-inset-bottom));
    background: var(--surface);
    border-top: 1px solid var(--line);
  }
  .dock > a,
  .dock summary {
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 6px 0;
    color: var(--muted);
    font-size: 11px;
    text-decoration: none;
    position: relative;
    cursor: pointer;
    list-style: none;
    min-width: 0;
  }
  .dock span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .dock summary::-webkit-details-marker {
    display: none;
  }
  .dock .on {
    color: var(--accent);
    font-weight: 600;
  }
  .dock .badge {
    position: absolute;
    top: 0;
    left: calc(50% + 6px);
    margin: 0;
    min-width: 16px;
    height: 16px;
    font-size: 10px;
  }
  .dock .sheet {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgb(0 0 0 / 0.35);
    display: flex;
    align-items: flex-end;
  }
  .dock .panel {
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    display: grid;
    gap: 2px;
    padding: 12px 12px max(16px, env(safe-area-inset-bottom));
    background: var(--surface);
    border-radius: 18px 18px 0 0;
  }
  .dock .panel .item {
    padding: 11px 10px;
  }
  /* Без зума при вводе на iPhone: поле не мельче 16px. */
  input,
  select,
  textarea {
    font-size: 16px;
  }
  /* Первый столбец не уезжает при прокрутке таблицы вбок. */
  .table-wrap td:first-child,
  .table-wrap th:first-child {
    position: sticky;
    left: 0;
    background: var(--surface);
  }
  .table-wrap th:first-child {
    z-index: 3;
    background: var(--surface-2);
  }
  /* <table data-stack>: строка — карточкой, подписи — из шапки (nav.js). */
  .table-wrap:has(table[data-stack]) {
    max-height: none;
    overflow: visible;
    background: none;
    border: 0;
  }
  table[data-stack] thead {
    display: none;
  }
  table[data-stack],
  table[data-stack] tbody {
    display: block;
  }
  table[data-stack] tr {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 10px;
    margin: 0 0 8px;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }
  table[data-stack] td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    grid-column: 1 / -1;
    padding: 2px 0;
    border: 0;
    text-align: right;
    position: static;
    background: none;
  }
  table[data-stack] td::before {
    content: attr(data-label);
    color: var(--muted);
    text-align: left;
  }
  table[data-stack] td[data-label=""]::before,
  table[data-stack] td:not([data-label])::before {
    content: none;
  }
  table[data-stack] td.position {
    display: block;
    text-align: left;
    border: 0;
    padding: 0 0 4px;
    font-weight: 600;
  }
  table[data-stack] td.position::before {
    content: none;
  }
}
/* «Связь» → «Чаты»: переписка пузырями, покупатель слева, продавец справа. */
.chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}
.chat .msg {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.chat .msg.in {
  align-self: flex-start;
}
.chat .msg.out {
  align-self: flex-end;
  background: var(--accent-soft, transparent);
}
b.waiting {
  color: var(--warn);
  font-size: 12px;
}
/* «Связь» → «Возвраты»: заявка карточкой. */
div.claim {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
/* Задачи и решения в «Обзоре» разделов и в календаре (1.39.0). */
ul.todo {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
ul.todo li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
ul.todo li.done {
  opacity: 0.6;
}
ul.todo li.done b {
  text-decoration: line-through;
}
ul.todo .todo-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
ul.todo .todo-head .when {
  margin-left: auto;
  font-size: 12px;
}
ul.todo form.tick {
  display: inline;
  margin: 0;
}
ul.todo form.tick button {
  font-size: 18px;
  line-height: 1;
  padding: 2px 4px;
  min-height: 0;
}
/* Карточки и РК внутри задачи от сервиса — каждая своей ссылкой (1.91.0). */
ul.todo ul.service-items {
  margin: 2px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
ul.todo ul.service-items li {
  display: list-item;
  border: 0;
  background: none;
  padding: 0;
}
ul.todo .ai-result {
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 8px 10px;
  white-space: pre-line;
}
h3.day {
  font-size: 14px;
  margin: 14px 0 6px;
  color: var(--muted);
}
div.cal-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 860px) {
  div.cal-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
form.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
form.stack label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
form.stack input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
form.stack select {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  max-width: 420px;
}
form.stack label.check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
form.stack fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
form.stack textarea {
  font: inherit;
  width: 100%;
  box-sizing: border-box;
}

/* Текст обращения покатушек (1.54.0): переносы как в тексте, без горизонтальной прокрутки. */
pre.wrap {
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 60ch;
}

/*
 * Плашка-предупреждение (1.66.0): мягкий фон, тонкая рамка в тон, скругление
 * как у карточек. Цвет — вторым классом: bad (срочно), warn, ok, info.
 * Первой пришла «Заблокировано WB» (раньше — жёсткая красная рамка).
 */
.alert {
  --tone: var(--muted);
  --tone-soft: var(--surface-2);
  margin: 16px 0;
  padding: 14px 16px;
  background: var(--tone-soft);
  border: 1px solid color-mix(in srgb, var(--tone) 22%, transparent);
  border-radius: var(--radius);
}
.alert.bad {
  --tone: var(--bad);
  --tone-soft: var(--bad-soft);
}
.alert.warn {
  --tone: var(--warn);
  --tone-soft: var(--warn-soft);
}
.alert.ok {
  --tone: var(--accent);
  --tone-soft: var(--accent-soft);
}
.alert.info {
  --tone: var(--up);
  --tone-soft: var(--up-soft);
}
.alert > h2,
.alert > h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--tone);
}
.alert > h2::before,
.alert > h3::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tone);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone) 18%, transparent);
}
/* Плашка, которую можно свернуть до строки: <details class="alert …"> (1.81.0). */
details.alert > summary {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin: 0 0 10px;
  cursor: pointer;
}
details.alert > summary::-webkit-details-marker {
  display: none;
}
details.alert > summary > h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 15px;
  color: var(--tone);
}
details.alert > summary > h2::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tone);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone) 18%, transparent);
}
details.alert > summary .next {
  font-size: 13px;
}
details.alert > summary::after {
  content: "Свернуть";
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
}
details.alert:not([open]) > summary {
  margin: 0;
}
details.alert:not([open]) > summary::after {
  content: "Развернуть";
}
details.alert:not([open]) {
  padding-top: 10px;
  padding-bottom: 10px;
}
.alert > :last-child {
  margin-bottom: 0;
}
.alert ul.todo li {
  border-color: color-mix(in srgb, var(--tone) 14%, var(--line));
}
.alert > p.muted {
  margin: 10px 0 0;
  font-size: 13px;
}
.flash.warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.warn {
  color: var(--warn);
}

/* Черновик ИИ: что не уходило в WB — бледно (1.62.0). */
tr.not-sent td,
.diff-row.not-sent {
  opacity: 0.55;
}
.sent-summary {
  margin: 8px 0;
}

/* Страница карточки: вкладки и строка статуса (1.65.0). */
.card-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 12px 0 16px;
  border-bottom: 1px solid var(--line, #ddd);
}
.card-tabs a {
  padding: 8px 14px;
  text-decoration: none;
  color: inherit;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.card-tabs a.active {
  border-bottom-color: currentColor;
  font-weight: 600;
}
.card-tabs .badge {
  font-size: 0.8em;
  padding: 0 6px;
  border-radius: 8px;
  background: var(--warn-soft, #fff4d6);
}
/* Красная точка у карточки, позиции и категории со срочным делом (1.96.0). */
.urgent-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 5px;
  border-radius: 50%;
  background: var(--bad);
  vertical-align: middle;
}
/* Красная точка: на вкладке есть что-то не так (1.91.0). */
.card-tabs .tab-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 4px;
  border-radius: 50%;
  background: var(--bad);
  vertical-align: super;
}
.card-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.card-status a.status {
  text-decoration: none;
}

/*
 * Поля ввода по всему сайту (1.66.0): скруглённые, в цвет темы, с мягкой
 * подсветкой фокуса — раньше textarea без своего класса были квадратными
 * браузерными (ответ на отзыв, чаты, возвраты). :where() — чтобы правила
 * отдельных форм (form.inline, form.search) по-прежнему брали верх.
 */
:where(
  textarea,
  select,
  input:not(
    [type="checkbox"],
    [type="radio"],
    [type="hidden"],
    [type="file"],
    [type="range"],
    [type="color"],
    [type="submit"],
    [type="button"]
  )
) {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  max-width: 100%;
}
:where(textarea) {
  line-height: 1.45;
  resize: vertical;
}
textarea:focus-visible,
select:focus-visible,
input:not([type="checkbox"], [type="radio"]):focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
:where(textarea, input)::placeholder {
  color: var(--muted);
  opacity: 0.8;
}

/* «Сегодня» первым блоком «Сводки» и главной (1.83.0). */
details.today ul.todo {
  margin-bottom: 10px;
}
form.today-add {
  margin: 4px 0 6px;
}
form.today-add input[name="title"] {
  flex: 1 1 260px;
  min-width: 0;
}
/* «удалить» у задачи — мелкой ссылкой, а не крупной кнопкой галочки. */
ul.todo > li > form.tick {
  align-self: flex-start;
}
ul.todo > li > form.tick button {
  font-size: 12px;
  color: var(--muted);
}

/* Правки черновика ИИ (1.93.0): поле — строкой, «Было» и «Станет» поровну. */
.diff {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.diff-row {
  padding: 12px 14px;
}
.diff-row + .diff-row {
  border-top: 1px solid var(--line);
}
.diff-head {
  margin: 0 0 8px;
}
.diff-head label.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.diff-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 20px;
}
.diff-label {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 4px;
}
.diff-was > .muted,
.diff-now > div:not(.diff-label) {
  overflow-wrap: anywhere;
}
@media (max-width: 720px) {
  .diff-cols {
    grid-template-columns: minmax(0, 1fr);
  }
}
.pre-line {
  white-space: pre-line;
}
.diff-long {
  max-height: 320px;
  overflow-y: auto;
  padding: 8px 10px;
  background: var(--surface-2);
  border-radius: 8px;
}

/*
 * Галочка вместо слов (1.95.0): «сделано» у своих задач и «просмотрено» у напоминаний
 * сервиса — квадратик со скруглением; при наведении проступает ✓, отмеченная — зелёная.
 */
button.check-btn {
  flex: none;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1.5px solid color-mix(in srgb, var(--muted) 70%, transparent);
  border-radius: 6px;
  background: var(--surface);
  color: transparent;
  font-size: 0;
  line-height: 0;
  min-height: 0;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
}
button.check-btn::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1.5px;
  width: 5px;
  height: 10px;
  border: solid transparent;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
button.check-btn:hover {
  border-color: var(--accent);
}
button.check-btn:hover::after {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}
button.check-btn.on {
  background: var(--accent);
  border-color: var(--accent);
}
button.check-btn.on::after {
  border-color: #fff;
}
form.ack {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  vertical-align: middle;
}
ul.todo ul.service-items {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
ul.todo ul.service-items > li {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  padding: 0;
  background: none;
  border: 0;
}
ul.todo li > span > a + form.ack {
  margin-left: 8px;
}
ul.todo ul.service-items > li > form.ack {
  margin-top: 1px;
}
ul.todo form.tick button.check-btn {
  padding: 0;
  font-size: 0;
}

/*
 * Карточки «парят» над страницей, а сквозь них проступает один большой мягкий
 * рисунок (1.97.0; с 1.100.0 — «мягкий круг», выбрал владелец): два пятна, тающие градиентом. Рисунок закреплён за окном
 * (background-attachment: fixed), поэтому в каждой карточке видна своя часть, а не
 * одно и то же. На iPhone Safari рисунок прокручивается вместе с карточкой.
 */
:root {
  --art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-267 -167 2133 1333' preserveAspectRatio='xMidYMid slice'%3E%3Cdefs%3E%3CradialGradient id='g1'%3E%3Cstop offset='0' stop-color='%231f7a5a' stop-opacity='1'/%3E%3Cstop offset='1' stop-color='%231f7a5a' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='g2'%3E%3Cstop offset='0' stop-color='%231f7a5a' stop-opacity='1'/%3E%3Cstop offset='1' stop-color='%231f7a5a' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='409' cy='231' r='560' fill='url(%23g1)' opacity='0.176'/%3E%3Ccircle cx='1563' cy='880' r='420' fill='url(%23g2)' opacity='0.110'/%3E%3C/svg%3E");
  --float: 0 1px 2px rgb(17 22 19 / 6%), 0 6px 18px -6px rgb(17 22 19 / 15%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-267 -167 2133 1333' preserveAspectRatio='xMidYMid slice'%3E%3Cdefs%3E%3CradialGradient id='g1'%3E%3Cstop offset='0' stop-color='%235cc79c' stop-opacity='1'/%3E%3Cstop offset='1' stop-color='%235cc79c' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='g2'%3E%3Cstop offset='0' stop-color='%235cc79c' stop-opacity='1'/%3E%3Cstop offset='1' stop-color='%235cc79c' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='409' cy='231' r='560' fill='url(%23g1)' opacity='0.176'/%3E%3Ccircle cx='1563' cy='880' r='420' fill='url(%23g2)' opacity='0.110'/%3E%3C/svg%3E");
    --float: 0 1px 2px rgb(0 0 0 / 45%), 0 8px 22px -8px rgb(0 0 0 / 80%);
  }
}
:root[data-theme="dark"] {
  --art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-267 -167 2133 1333' preserveAspectRatio='xMidYMid slice'%3E%3Cdefs%3E%3CradialGradient id='g1'%3E%3Cstop offset='0' stop-color='%235cc79c' stop-opacity='1'/%3E%3Cstop offset='1' stop-color='%235cc79c' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='g2'%3E%3Cstop offset='0' stop-color='%235cc79c' stop-opacity='1'/%3E%3Cstop offset='1' stop-color='%235cc79c' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='409' cy='231' r='560' fill='url(%23g1)' opacity='0.176'/%3E%3Ccircle cx='1563' cy='880' r='420' fill='url(%23g2)' opacity='0.110'/%3E%3C/svg%3E");
  --float: 0 1px 2px rgb(0 0 0 / 45%), 0 8px 22px -8px rgb(0 0 0 / 80%);
}
div.metric,
section.panel,
ul.todo > li,
details.group,
div.claim,
.diff,
div.bars {
  background-image: var(--art);
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: var(--float);
}
.table-wrap {
  box-shadow: var(--float);
}
/* Внутри плашки-тревоги карточки без рисунка и тени — плашка сама выделена. */
.alert ul.todo > li {
  background-image: none;
  box-shadow: none;
}

/*
 * Кружок ⓘ с подсказкой (1.101.0): у заголовка вместо серого абзаца под ним.
 * Наведение показывает, нажатие закрепляет (nav.js ставит .open), Esc закрывает.
 */
.tip {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
  margin-left: 6px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: normal;
  text-transform: none;
}
button.tip-i {
  width: 18px;
  height: 18px;
  min-height: 0;
  padding: 0;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: help;
  display: inline-grid;
  place-items: center;
  opacity: 0.75;
}
button.tip-i::before {
  content: "!";
  font:
    700 11px / 1 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
}
.tip:hover button.tip-i,
.tip.open button.tip-i,
button.tip-i:focus-visible {
  color: var(--accent);
  opacity: 1;
}
.tip-body,
.tip-float {
  display: none;
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: -10px;
  width: max-content;
  max-width: min(380px, calc(100vw - 32px));
  padding: 10px 12px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 30px -8px rgb(0 0 0 / 25%);
  white-space: normal;
  text-align: left;
  max-height: min(60vh, 520px);
  overflow-y: auto;
}
@media (hover: hover) {
  .tip:hover > .tip-body {
    display: block;
  }
}
.tip.open > .tip-body {
  display: block;
}
.tip-body p {
  margin: 8px 0 0;
}
.tip-body > p:first-child {
  margin-top: 0;
}
/*
 * Та же подсказка у всего, что объясняется наведением (title="…"): вместо
 * системной жёлтой плашки браузера — такое же окошко (1.105.0, nav.js).
 */
.tip-float {
  position: fixed;
  z-index: 60;
  font-size: 13px;
  line-height: 1.4;
  max-width: min(320px, calc(100vw - 24px));
  pointer-events: none;
}
.tip-float.on {
  display: block;
}

/* «Админка → Оформление» (1.103.0). */
.look-form {
  display: grid;
  gap: 10px;
}
.look-form label.chip {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.look-form label.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.look-form label.chip[style]::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--sw);
}
.look-range {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.look-range input[type="range"] {
  width: 140px;
  accent-color: var(--accent);
  padding: 0;
  border: 0;
}
.look-range output {
  min-width: 44px;
  font-variant-numeric: tabular-nums;
}

/* 1.104.0: «Ещё ▾» для вкладок раздела, которые не влезли в строку. */
details.tabs-more {
  position: relative;
  align-self: stretch;
  display: flex;
  flex-shrink: 0;
}
details.tabs-more > summary {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}
details.tabs-more > summary::-webkit-details-marker {
  display: none;
}
details.tabs-more > summary:hover,
details.tabs-more[open] > summary {
  color: var(--text);
}
details.tabs-more.dot > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--bad);
}
details.tabs-more .tabs-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 25;
  min-width: 200px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--float, 0 8px 24px rgb(0 0 0 / 12%));
  display: flex;
  flex-direction: column;
}
details.tabs-more .tabs-menu a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
details.tabs-more .tabs-menu a:hover {
  background: var(--surface-2);
}
.topbar .acts,
.iconbtn .kbd {
  flex-shrink: 0;
  white-space: nowrap;
}

/* 1.104.0: кнопки длинной формы липнут к низу экрана. */
.sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 6;
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 -6px 18px rgb(0 0 0 / 8%);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
@media (max-width: 760px) {
  body.with-dock .sticky-actions {
    bottom: calc(64px + env(safe-area-inset-bottom));
  }
}

/* 1.104.0: «Показать все» под свёрнутой таблицей обзора. */
button.rows-more {
  margin: 8px 0 4px;
}

/* 1.104.0: сверху страницы — ссылки на предупреждения ниже. */
.alert.warn-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
  margin-bottom: 14px;
}
tr.mm-fold {
  display: none;
}

/*
 * Ряд кнопок под полем ответа (отзывы, вопросы, чаты, возвраты; 1.106.0):
 * всё по центру по высоте, кружок «!» на одной линии с кнопками.
 * div.actions — тот же ряд для кнопок под любым полем (1.109.2); кнопку
 * соседней формы ставим сюда атрибутом form="id", а не отдельной формой ниже.
 */
div.reply-actions,
form.reply-actions,
div.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
div.reply-actions .tip,
form.reply-actions .tip {
  margin-left: 2px;
}
form.reply-actions input {
  flex: 0 1 320px;
  min-width: 0;
}

/* Фото и видео покупателя — одинаковые плитки (1.106.0). */
div.media-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}
a.media-tile {
  position: relative;
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 8px;
  overflow: hidden;
  background: #2b302d;
  color: #fff;
  text-decoration: none;
  flex: none;
}
a.media-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
a.media-tile.video span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  text-align: center;
  font-size: 12px;
}
a.media-tile.video::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 50%;
  background:
    rgb(0 0 0 / 55%)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7l9 5-9 5z' fill='white'/%3E%3C/svg%3E")
    center / 20px no-repeat;
}
a.media-tile:hover {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/*
 * Форма в сетку (1.112.1, владелец: «поля ввода гуляют»): подпись слева,
 * поля одной ширины одним столбцом, единица справа. Строка — label.fg-row
 * (display: contents), широкая ячейка (сегменты) — div.fg-wide.
 */
div.field-grid {
  display: grid;
  grid-template-columns: max-content 160px minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  margin: 4px 0 4px;
}
div.field-grid label.fg-row {
  display: contents;
}
div.field-grid .fg-label {
  color: var(--text);
}
div.field-grid input {
  width: 100%;
  box-sizing: border-box;
}
div.field-grid .fg-wide {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* Переключатель-сегменты вместо радиокнопок (1.112.1). */
div.seg {
  display: inline-flex;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}
div.seg label {
  position: relative;
  display: flex;
  cursor: pointer;
}
div.seg label + label {
  border-left: 1px solid var(--line);
}
div.seg input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
div.seg span {
  padding: 7px 12px;
  color: var(--muted);
  line-height: 1.45;
  white-space: nowrap;
}
div.seg label:hover span {
  color: var(--text);
}
div.seg input:checked + span {
  background: var(--accent);
  color: #fff;
}
div.seg input:focus-visible + span {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent);
}

/* Пороги своего автопилота РК: видны только поля выбранной цели. */
form.pilot-form:has(input[name="goal"][value="new"]:checked) label.fg-row:not([data-g~="new"]),
form.pilot-form:has(input[name="goal"][value="growth"]:checked)
  label.fg-row:not([data-g~="growth"]),
form.pilot-form:has(input[name="goal"][value="hold"]:checked) label.fg-row:not([data-g~="hold"]),
form.pilot-form:has(input[name="goal"][value="profit"]:checked)
  label.fg-row:not([data-g~="profit"]),
form.pilot-form:has(input[name="goal"][value="clearance"]:checked)
  label.fg-row:not([data-g~="clearance"]) {
  display: none;
}

@media (max-width: 640px) {
  div.field-grid {
    grid-template-columns: minmax(0, 1fr) 110px;
  }
  div.field-grid label.fg-row > .muted {
    grid-column: 1 / -1;
    margin: -6px 0 2px;
    font-size: 12px;
  }
  div.field-grid > .fg-label {
    grid-column: 1 / -1;
  }
  div.field-grid .fg-wide {
    grid-column: 1 / -1;
  }
  /* На телефоне сегменты переносятся — каждый отдельной плашкой. */
  div.seg {
    gap: 6px;
    border: 0;
    background: none;
    overflow: visible;
  }
  div.seg label + label {
    border-left: 0;
  }
  div.seg span {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
  }
  div.seg input:checked + span {
    border-color: var(--accent);
  }
}

/*
 * Кнопки-значки у полей (1.111.4, владелец: «копировать и сохранить —
 * иконками, как в меню»): значки из src/web/nav-icons.ts, button.iconbtn.
 * details.copyable — «Копировать» на одной строке с заголовком свёрнутого текста;
 * span.field-btn — значок «Сохранить» внутри поля справа.
 */
details.copyable > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
details.copyable > summary::before {
  content: "▸";
  color: var(--muted);
}
details.copyable[open] > summary::before {
  content: "▾";
}
details.copyable > summary::-webkit-details-marker {
  display: none;
}
details.copyable > summary {
  list-style: none;
}
details.copyable .iconbtn,
span.field-btn .iconbtn {
  padding: 4px;
}
details.copyable .iconbtn svg.i,
span.field-btn .iconbtn svg.i {
  width: 18px;
  height: 18px;
}
.iconbtn.done {
  color: var(--accent);
}
span.field-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
}
span.field-btn input {
  padding-right: 36px;
}
span.field-btn .iconbtn {
  position: absolute;
  right: 4px;
}
