/* Стили интерфейса Rewily (раньше жили внутри frontend/index.html).
   Пути в url() — от этого файла: он сам лежит в assets/. */

  /* ============================================================
     Rewily — оформление приложения в стиле сайта rewily.com, но спокойнее:
     приглушённые текст и акцент, тёплый светлый фон, Inter, кнопки-«пилюли»,
     карточки со скруглением и лёгкой тенью.

     Источников два — Яндекс и Google. Где данные или действие относятся к
     одному источнику, стоит его настоящий логотип (assets/yandex.svg,
     assets/google.svg): в шапке таблицы карточки, на кнопках синхронизации,
     на отзывах, у состояния подключения в шапке.

     Концепция — «разговор». Логотип Rewily — облачко-реплика, а сервис —
     диалог компании с клиентами. Поэтому:
       • форма: у карточек, таблиц, окон один угол почти острый (--bubble) —
         как у облачка, откуда растёт «хвостик»;
       • отзывы — реплики клиентов, ответ компании — встречная реплика;
       • у каждой организации видно, как идёт разговор: сколько отзывов и
         сколько ждут ответа (облачко-счётчик);
       • пустые места — «тишина в разговоре» с контурным облачком;
       • на главной — диалог из тех же облачков.

     Имена переменных и классов прежние — разметка из JS не меняется.
     ============================================================ */

  :root {
    --bg:          #f8f7f4;
    --surface:     #ffffff;
    --surface-2:   #f4f3ef;
    --surface-3:   #eae7e0;

    --border:      #ebe8e2;
    --border-soft: #f1efea;
    --border-firm: #ddd9d0;

    --text:      #34323b;
    --text-dim:  #5c5a64;
    --muted:     #8d8b94;

    --accent:       #6a62c4;
    --accent-hover: #5d55b6;
    --accent-soft:  #f0effa;
    --accent-ink:   #ffffff;

    --ok:        #4a8a66;
    --ok-soft:   #edf5f0;
    --warn:      #a9793f;
    --warn-soft: #f8f1e7;
    --danger:      #b5625a;
    --danger-soft: #f8eeec;
    --star:        #d9a43a;

    /* Источники */
    --ya-tint:  rgba(252, 63, 29, .018);
    --gg-tint:  rgba(26, 115, 232, .02);

    --r-sm: 10px;
    --r:    14px;
    --r-lg: 18px;
    --pill: 999px;
    --head-bg:   #f2f0f9;
    --head-line: rgba(106, 98, 196, .14);
    --dot:       rgba(52, 50, 59, .075);
    --bubble:    4px var(--r) var(--r) var(--r);
    --bubble-lg: 4px var(--r-lg) var(--r-lg) var(--r-lg);

    --shadow-1: none;
    --shadow-2: 0 1px 2px rgba(20, 18, 30, .025), 0 4px 14px rgba(20, 18, 30, .03);
    --shadow-3: 0 2px 6px rgba(20, 18, 30, .05), 0 20px 50px -18px rgba(20, 18, 30, .2);
    --ring: 0 0 0 4px rgba(106, 98, 196, .12);

    --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --serif: var(--sans);
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --ease: 140ms cubic-bezier(.4, 0, .2, 1);

    --topbar-h: 64px;
    --col: 920px;
    --aside-w: 256px;
    color-scheme: light;
  }

  /* Тёмная тема: по выбору (кнопка в шапке → data-theme) или, пока ничего
     не выбрано, как в системе. */
  :root[data-theme="dark"] {
      --bg:          #111116;
      --surface:     #1a1a21;
      --surface-2:   #22222b;
      --surface-3:   #2c2c37;
      --border:      #2e2e38;
      --border-soft: #26262f;
      --border-firm: #3a3a46;
      --text:      #dddce3;
      --text-dim:  #b3b1bc;
      --muted:     #8b8996;
      --accent:       #9d97e0;
      --accent-hover: #aaa5e6;
      --accent-soft:  #24233a;
      --accent-ink:   #111116;
      --ok:        #6fae8a;
      --ok-soft:   #16301f;
      --warn:      #cfa06a;
      --warn-soft: #33250f;
      --danger:      #d98a82;
      --danger-soft: #3a1a18;
      --star:        #d9b25a;
      --ya-tint:  rgba(255, 106, 77, .025);
      --gg-tint:  rgba(110, 168, 255, .025);
      --shadow-1: none;
      --shadow-2: none;
      --shadow-3: 0 24px 60px -18px rgba(0, 0, 0, .6);
      --ring: 0 0 0 4px rgba(157, 151, 224, .18);
      color-scheme: dark;
      --head-bg:   #1f1e2c;
      --head-line: rgba(157, 151, 224, .16);
      --dot:       rgba(255, 255, 255, .045);
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg:          #111116;
      --surface:     #1a1a21;
      --surface-2:   #22222b;
      --surface-3:   #2c2c37;
      --border:      #2e2e38;
      --border-soft: #26262f;
      --border-firm: #3a3a46;
      --text:      #dddce3;
      --text-dim:  #b3b1bc;
      --muted:     #8b8996;
      --accent:       #9d97e0;
      --accent-hover: #aaa5e6;
      --accent-soft:  #24233a;
      --accent-ink:   #111116;
      --ok:        #6fae8a;
      --ok-soft:   #16301f;
      --warn:      #cfa06a;
      --warn-soft: #33250f;
      --danger:      #d98a82;
      --danger-soft: #3a1a18;
      --star:        #d9b25a;
      --ya-tint:  rgba(255, 106, 77, .025);
      --gg-tint:  rgba(110, 168, 255, .025);
      --shadow-1: none;
      --shadow-2: none;
      --shadow-3: 0 24px 60px -18px rgba(0, 0, 0, .6);
      --ring: 0 0 0 4px rgba(157, 151, 224, .18);
      color-scheme: dark;
      --head-bg:   #1f1e2c;
      --head-line: rgba(157, 151, 224, .16);
      --dot:       rgba(255, 255, 255, .045);
    }
  }

  * { box-sizing: border-box; }
  [hidden] { display: none !important; }

  body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 14.5px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }
  a { color: var(--accent); }

  ::selection { background: var(--accent-soft); }
  * { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
  ::-webkit-scrollbar { width: 9px; height: 9px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 9px; }
  ::-webkit-scrollbar-thumb:hover { background: var(--border-firm); }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

  h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
  svg.i { width: 1em; height: 1em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2;
          stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.125em; }

  /* --- Знаки источников ------------------------------------------ */

  /* Настоящие логотипы (assets/yandex.svg, assets/google.svg — официальные
     значки с Wikimedia Commons). Цвет даёт сам логотип, подпись — спокойная. */
  .src-badge {
    display: inline-flex; align-items: center; gap: 6px; vertical-align: middle;
    font-size: 12px; font-weight: 600; line-height: 1;
    padding: 4px 9px 4px 5px; border-radius: var(--pill);
    background: var(--surface-2); color: var(--text-dim);
  }
  .src-badge::before, .sync-btn::before, .src-logo::before, #ysessBox::before, #gsessBox::before {
    content: ""; flex-shrink: 0;
    background: center / contain no-repeat;
  }
  .src-badge::before { width: 15px; height: 15px; }
  .src-yandex::before, .sync-yandex::before, #ysessBox::before { background-image: url("yandex.svg"); }
  .src-google::before, .sync-google::before, #gsessBox::before { background-image: url("google.svg"); }

  /* --- Шапка ------------------------------------------------------ */

  .topbar {
    position: sticky; top: 0; z-index: 40;
    height: var(--topbar-h);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 24px;
    padding: 0 28px;
  }
  .brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0;
           text-decoration: none; color: var(--text); cursor: pointer; }

  .topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

  .account { display: flex; align-items: center; gap: 9px; margin-left: 6px; }
  .avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--accent); color: var(--accent-ink);
    display: grid; place-items: center; font-size: 12px; font-weight: 700;
    flex-shrink: 0; letter-spacing: .02em;
  }
  .acct { position: relative; display: inline-flex; }
  .acct-wide { display: contents; }
  .acct-menu {
    position: absolute; top: calc(100% + 10px); right: 0; z-index: 60; min-width: 220px;
    display: flex; flex-direction: column; padding: 6px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-3);
  }
  .acct-menu button { text-align: left; min-height: 44px; padding: 10px 12px; border: 0; border-radius: var(--r-sm);
    background: none; color: var(--text); font: 600 14.5px var(--sans); cursor: pointer; }
  .acct-menu button:hover { background: var(--surface-2); }
  .acct-email { padding: 8px 12px 10px; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--border-soft);
    margin-bottom: 4px; overflow-wrap: anywhere; }
  .admin-tag {
    font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    color: var(--accent); background: var(--accent-soft);
    border-radius: var(--pill); padding: 4px 9px;
  }

  /* --- Каркас ----------------------------------------------------- */

  .layout {
    display: grid; grid-template-columns: var(--aside-w) 1fr;
    min-height: calc(100vh - var(--topbar-h));
  }
  .layout.no-aside { grid-template-columns: 1fr; }

  aside {
    border-right: 1px solid var(--border);
    background: var(--surface);
    padding: 24px 18px 30px;
    display: flex; flex-direction: column; gap: 12px;
    height: calc(100vh - var(--topbar-h));
    position: sticky; top: var(--topbar-h);
    overflow-y: auto;
  }
  .aside-head { display: flex; align-items: center; gap: 6px; padding: 0 8px 2px; }
  .aside-head .aside-title {
    flex: 1; margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
    color: var(--muted); font-weight: 700;
  }

  main { padding: 40px 48px 80px; min-width: 0; }

  /* --- Поля и кнопки ---------------------------------------------- */

  input, textarea, select {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 10px 14px;
    color: var(--text);
    font-size: 14.5px;
    font-family: inherit;
    transition: border-color var(--ease), box-shadow var(--ease);
  }
  input::placeholder, textarea::placeholder { color: var(--muted); }
  input:focus, textarea:focus, select:focus {
    outline: none; border-color: var(--accent); box-shadow: var(--ring);
  }

  button { font-family: inherit; transition: all var(--ease); }
  button:disabled { opacity: .5; cursor: default !important; }

  /* Главная кнопка — залитая «пилюля», как на rewily.com. */
  .btn, .modal .primary, .reply-editor button.primary,
  .admin .grant-form button, .ysess button.ask {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--accent); color: var(--accent-ink);
    border: 1px solid var(--accent); border-radius: var(--pill);
    padding: 10px 20px; font-size: 14px; font-weight: 600; cursor: pointer;
    white-space: nowrap; text-decoration: none;
  }
  .btn:hover, .modal .primary:hover, .reply-editor button.primary:hover,
  .admin .grant-form button:hover, .ysess button.ask:hover {
    background: var(--accent-hover); border-color: var(--accent-hover);
  }

  .btn-ghost, .reply-editor button,
  .admin td button, .modal .ghost {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--pill);
    padding: 8px 16px; font-size: 13.5px; font-weight: 600; cursor: pointer;
    text-decoration: none; white-space: nowrap;
  }
  .btn-ghost:hover:hover, .reply-editor button:hover,
  .admin td button:hover, .modal .ghost:hover {
    border-color: var(--border-firm); background: var(--surface-2);
  }

  /* Кнопки синхронизации — со знаком своего источника. */
  .sync-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--pill);
    padding: 8px 16px 8px 11px; font-size: 13.5px; font-weight: 600; cursor: pointer;
    white-space: nowrap; box-shadow: var(--shadow-1);
  }
  .sync-btn::before { width: 18px; height: 18px; }
  .sync-btn:hover { border-color: var(--border-firm); background: var(--surface-2); }

  /* --- Список локаций ---------------------------------------------- */

  .loc-list { display: flex; flex-direction: column; gap: 2px; }
  .loc-item {
    padding: 9px 10px; cursor: pointer; border-radius: var(--r-sm); color: inherit; text-decoration: none;
    display: flex; justify-content: space-between; align-items: center; gap: 8px;
    transition: background var(--ease);
  }
  .loc-item:hover { background: var(--surface-2); }
  .loc-item.active { background: var(--accent-soft); }
  .loc-item.active .name { color: var(--accent); font-weight: 700; }
  .loc-item .name-wrap { display: flex; flex-direction: column; min-width: 0; }
  .loc-item .name { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
  .loc-select-wrap { display: none; }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .loc-item .addr {
    font-size: 12px; color: var(--muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .loc-list .empty, .empty { color: var(--muted); font-size: 13px; padding: 6px 8px; }

  /* --- Подключение источников в шапке ------------------------------ */

  .ysess {
    position: relative;
    display: flex; align-items: center; gap: 7px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--pill); padding: 5px 11px 5px 7px; font-size: 13px;
    cursor: default;
  }
  #ysessBox::before, #gsessBox::before { width: 18px; height: 18px; }
  .ysess.bad { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); background: var(--danger-soft); }
  .ysess .row { display: flex; align-items: center; gap: 7px; }
  .ysess .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex-shrink: 0; order: 2; }
  .ysess.ok .dot { background: var(--ok); }
  .ysess.bad .dot { background: var(--danger); }
  .ysess .t { white-space: nowrap; color: var(--text-dim); font-weight: 600; order: 1; }
  .ysess.bad .t { color: var(--danger); }
  .ysess .row button { order: 3; }
  .ysess button {
    background: none; border: none; color: var(--muted); cursor: pointer;
    font-size: 15px; padding: 0; line-height: 1;
  }
  .ysess .row button { width: 28px; height: 28px; margin: -6px -6px -6px 0; display: grid; place-items: center; border-radius: 50%; }
  .ysess .row button:hover { background: var(--accent-soft); }
  .ysess button:hover { color: var(--accent); }
  .ysess button.ask:hover { color: var(--accent-ink); }
  .ysess .when, .ysess .hint, .ysess button.ask { display: none; }
  .ysess:hover .details, .ysess:focus-within .details { display: block; }
  .ysess .details {
    display: none; position: absolute; top: calc(100% + 10px); right: 0; z-index: 50;
    width: 310px; padding: 16px 18px; text-align: left;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r); box-shadow: var(--shadow-3); cursor: auto;
  }
  .ysess .details .when { display: block; color: var(--muted); font-size: 12px; }
  .ysess .details .hint { display: block; color: var(--text-dim); font-size: 13px; margin-top: 9px; line-height: 1.55; }
  .ysess .details .hint.wait { color: var(--accent); }
  .ysess .details .hint.err { color: var(--danger); }
  .ysess .details .hint code {
    font-family: var(--mono); font-size: 11.5px; background: var(--surface-2);
    padding: 2px 7px; border-radius: 6px; display: inline-block; margin-top: 4px;
  }
  .ysess .details button.ask { display: flex; width: 100%; margin-top: 12px; }
  /* Вход в Google через сайт: форма держится открытой, пока не закончили */
  .ysess.open .details { display: block; width: 340px; max-width: calc(100vw - 32px); }
  .ysess .gconnect-steps { margin: 0 0 10px; padding-left: 18px; color: var(--text-dim); font-size: 13px; line-height: 1.55; }
  .ysess .gconnect-steps li + li { margin-top: 4px; }
  .ysess #gconnectUrl {
    width: 100%; box-sizing: border-box; font: inherit; font-size: 12.5px; padding: 8px 10px;
    border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text);
  }
  .ysess .gconnect-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; }
  .ysess .gconnect-actions button.ask { width: auto; margin-top: 0; }
  .ysess .gconnect-actions a { color: var(--accent); }

  /* --- Модальные окна ---------------------------------------------- */

  .backdrop {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(17, 17, 22, .35); backdrop-filter: blur(2px);
    display: grid; place-items: center; padding: 20px;
  }
  .modal {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-3); width: 100%; max-width: 440px;
    padding: 30px; display: flex; flex-direction: column; gap: 12px;
    animation: pop 160ms cubic-bezier(.2, .8, .3, 1);
  }
  @keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
  .modal h2 { font-size: 24px; font-weight: 700; }
  .modal .sub { color: var(--muted); font-size: 13.5px; margin: -4px 0 4px; line-height: 1.55; }
  .modal .actions { display: flex; gap: 8px; margin-top: 6px; }
  .modal .actions button { flex: 1; }
  .modal hr { border: none; border-top: 1px solid var(--border); margin: 8px 0; }
  .modal .err { color: var(--danger); font-size: 13px; min-height: 16px; }
  .modal .login-form { display: flex; flex-direction: column; gap: 12px; }
  .modal .sub.no-access { margin: 10px 0 0; padding-top: 14px; border-top: 1px solid var(--border); }
  .modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .modal-close {
    background: var(--surface-2); border: none; color: var(--text-dim); flex-shrink: 0;
    width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
    font-size: 18px; line-height: 1; cursor: pointer; padding: 0;
  }
  .modal-close:hover { color: var(--text); }
  .modal.reply-modal { max-width: 720px; max-height: calc(100vh - 40px); overflow-y: auto; padding: 26px 28px; }
  .reply-modal .sub a { color: var(--accent); font-weight: 600; }
  .reply-modal .reply-editor .actions button { flex: 0 1 auto; }
  .reply-modal .reply-editor textarea { min-height: 130px; }
  .modal .field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text-dim); }
  .modal .field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
  .modal .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
  .modal .sub.fine { font-size: 12.5px; margin: 0; }
  .lead-modal { max-width: 480px; }
  .lead-done { text-align: center; padding: 10px 0 4px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
  .lead-done .ok-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
    font-size: 26px; color: var(--ok); background: var(--ok-soft); }
  .lead-done h3 { margin: 6px 0 0; font-size: 20px; font-weight: 800; }
  .lead-done p { margin: 0 0 10px; color: var(--text-dim); }

  /* --- Карточка точки ----------------------------------------------- */

  .loc-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 24px; margin-bottom: 26px;
  }
  .loc-header h1 { font-size: 34px; font-weight: 700; line-height: 1.12; margin-bottom: 6px; letter-spacing: -0.02em; }
  .loc-header .addr { color: var(--text-dim); font-size: 15.5px; }
  .sync-meta { font-size: 13px; color: var(--muted); margin-top: 8px; }
  /* Кнопки шапки точки — ровной сеткой 2×2, а не рваными строками. */
  .toolbar {
    display: grid; grid-template-columns: repeat(2, minmax(0, auto));
    gap: 8px; align-items: stretch; flex-shrink: 0;
  }
  .toolbar > * { justify-content: center; }
  .toolbar > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .msg { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.55; }

  /* Таблицы — в карточке со скруглением. */
  table.facts, .admin table {
    width: 100%; border-collapse: separate; border-spacing: 0;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r); box-shadow: var(--shadow-2); overflow: hidden;
  }
  table.facts { max-width: 720px; }
  table.facts thead { display: none; }
  .admin th, table.facts.cmp th {
    text-align: left; font-size: 12px; font-weight: 700; color: var(--muted);
    padding: 12px 16px; background: var(--surface-2);
    border-bottom: 1px solid var(--border); vertical-align: middle;
  }
  table.facts td, .admin td {
    padding: 12px 16px; border-bottom: 1px solid var(--border-soft);
    font-size: 14px; vertical-align: top;
  }
  table.facts tr:last-child td, .admin tr:last-child td { border-bottom: none; }
  table.facts td:first-child { width: 160px; }
  .field-name { font-size: 13px; font-weight: 600; color: var(--muted); }
  .value { font-size: 14px; white-space: pre-wrap; color: var(--text); }
  .value.empty { color: var(--muted); }

  /* «Поле | Яндекс | Google»: колонки подкрашены цветом источника. */
  table.facts.cmp { max-width: 1000px; table-layout: fixed; }
  table.facts.cmp thead { display: table-header-group; }
  table.facts.cmp th:first-child, table.facts.cmp td:first-child { width: 160px; }
  table.facts.cmp td:nth-child(2) { background: var(--ya-tint); }
  table.facts.cmp td:nth-child(3) { background: var(--gg-tint); }
  table.facts.cmp th .src-badge { background: var(--surface); }
  table.facts.cmp td { overflow-wrap: anywhere; }
  table.facts.cmp td.unlinked { vertical-align: middle; text-align: center; font-size: 13px; }
  .th-note { display: block; font-weight: 500; color: var(--muted); font-size: 12px; margin-top: 6px; }

  .chips { margin-top: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
  .photos { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
  .photos img {
    width: 88px; height: 88px; object-fit: cover;
    border-radius: var(--r-sm); border: 1px solid var(--border);
  }
  .open-src {
    margin-top: 18px; font-size: 13px; color: var(--muted);
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    padding: 12px 16px; border: 1px dashed var(--border-firm); border-radius: var(--r);
    max-width: 1000px;
  }

  /* --- Отзывы -------------------------------------------------------- */

  .reviews-section { margin-top: 48px; }
  /* Одна ширина колонки на страницах точки, ленты, шаблонов и поиска. */
  .col { max-width: var(--col); }
  .reviews-header {
    display: flex; justify-content: space-between; align-items: flex-end;
    gap: 16px; margin-bottom: 16px;
  }
  .reviews-header h2 { font-size: 26px; font-weight: 700; }
  .reviews-header .sub { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
  .sync-history { margin-top: 18px; font-size: 13.5px; max-width: 1000px; }
  .sync-history summary { cursor: pointer; color: var(--muted); font-weight: 600; list-style: none;
    display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
  .sync-history summary::-webkit-details-marker { display: none; }
  .sync-history summary::before, .tpl-picker summary::before {
    content: ""; width: 14px; height: 14px; flex-shrink: 0; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform var(--ease);
  }
  .sync-history[open] summary::before { transform: rotate(90deg); }
  .sync-log {
    margin-top: 10px; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r); padding: 4px 16px;
  }
  .sync-log-row {
    display: grid; grid-template-columns: 110px 200px 1fr; gap: 12px;
    padding: 8px 0; border-bottom: 1px solid var(--border-soft);
  }
  .sync-log-row:last-child { border-bottom: none; }
  .sync-log-row.bad .sl-msg { color: var(--danger); }
  .sl-when { color: var(--muted); font-variant-numeric: tabular-nums; }
  @media (max-width: 640px) {
    .sync-log-row { grid-template-columns: 1fr; gap: 2px; }
  }
  .review-list { display: flex; flex-direction: column; gap: 12px; }

  /* Отзывы — диалог, как в логотипе-облачке: отзыв — реплика клиента слева
     (кружок с инициалами и облачко с «хвостиком»), ответ компании —
     встречная реплика справа в мягком тоне бренда. */
  .review-card {
    display: grid; grid-template-columns: 38px 1fr; gap: 12px;
    padding: 6px 0;
  }
  .rv-avatar {
    width: 38px; height: 38px; border-radius: 50%; margin-top: 2px;
    display: grid; place-items: center;
    font-size: 13px; font-weight: 700; letter-spacing: .02em;
    background: hsl(var(--h, 250) 28% 92%); color: hsl(var(--h, 250) 22% 40%);
  }
  :root[data-theme="dark"] .rv-avatar { background: hsl(var(--h, 250) 16% 24%); color: hsl(var(--h, 250) 28% 78%); }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .rv-avatar { background: hsl(var(--h, 250) 16% 24%); color: hsl(var(--h, 250) 28% 78%); }
  }
  .rv-main { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
  .rv-bubble {
    position: relative; padding: 14px 18px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 4px 18px 18px 18px; box-shadow: var(--shadow-1);
    display: flex; flex-direction: column; gap: 8px;
  }
  .rv-bubble::before {
    content: ""; position: absolute; left: -6px; top: 12px; width: 10px; height: 10px;
    background: var(--surface); border-left: 1px solid var(--border); border-bottom: 1px solid var(--border);
    transform: rotate(45deg);
  }
  .review-card .row1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .review-card .stars { font-size: 14px; letter-spacing: 1px; color: var(--star); }
  .review-card .stars.r-low { color: var(--danger); }
  .review-card .author { font-size: 15px; font-weight: 700; }
  .review-card .date { font-size: 13px; color: var(--muted); margin-left: auto; }
  .review-card .text { font-size: 15.5px; line-height: 1.6; color: var(--text); }
  .review-card .reply-flag, .reply-flag {
    display: inline-flex; align-items: center; gap: 5px;
    align-self: flex-start; margin-left: 4px;
    font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: var(--pill);
    background: var(--surface-2); color: var(--muted);
  }
  .review-card .reply-flag.answered { background: var(--ok-soft); color: var(--ok); }
  .review-card .reply-flag.unanswered { background: var(--danger-soft); color: var(--danger); }
  .reply-flag.queued { background: var(--accent-soft); color: var(--accent); }
  .reviews-empty {
    color: var(--muted); font-size: 14px; padding: 22px;
    background: var(--surface); border: 1px dashed var(--border-firm); border-radius: var(--r);
  }
  .reviews-empty.notice { border-style: solid; border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }

  /* --- Правка данных карточки -------------------------------------------- */

  .worker-status .edit-check { padding: 4px 12px; font-size: 12px; margin-left: 8px; }

  .value-wanted { font-size: 13px; color: var(--warn); margin-top: 4px; }
  .data-editor {
    max-width: 600px; margin: 22px 0 8px; padding: 22px 24px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r); box-shadow: var(--shadow-2);
  }
  .data-editor .section-label { border: none; padding: 0; }
  .data-editor .sub { color: var(--muted); font-size: 13.5px; margin: 6px 0 18px; max-width: 60ch; }
  .data-editor .sub strong { color: var(--warn); font-weight: 600; }
  .edit-field { display: block; margin-bottom: 14px; }
  .edit-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; }
  .edit-field input { width: 100%; }
  .edit-hint { display: block; font-size: 12.5px; color: var(--muted); margin-top: 5px; }
  .data-editor .actions { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
  .data-editor .msg { margin: 0; }

  /* --- Шаблоны ответов --------------------------------------------------- */

  .tpl-picker { margin-bottom: 2px; }
  .tpl-picker summary {
    display: inline-flex; align-items: center; gap: 7px;
    list-style: none; cursor: pointer; width: fit-content;
    font-size: 13px; font-weight: 600; color: var(--accent);
    padding: 4px 0;
  }
  .tpl-picker summary::-webkit-details-marker { display: none; }
  .tpl-picker summary::before { transform: rotate(90deg); }
  .tpl-picker[open] summary::before { transform: rotate(-90deg); }
  .tpl-n {
    font-size: 11px; color: var(--accent); background: var(--accent-soft);
    border-radius: var(--pill); padding: 1px 7px;
  }
  .tpl-list {
    display: flex; flex-direction: column;
    border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-sm);
    margin: 4px 0 10px; max-height: 260px; overflow-y: auto;
  }
  .tpl-item {
    text-align: left; background: transparent; border: none;
    border-bottom: 1px solid var(--border-soft);
    padding: 11px 14px; cursor: pointer;
    font-size: 14px; line-height: 1.5; color: var(--text-dim);
  }
  .tpl-item:last-child { border-bottom: none; }
  .tpl-item:hover { background: var(--accent-soft); color: var(--text); }

  /* --- Ответ на отзыв -------------------------------------------------- */

  .reply-editor { margin-top: 4px; display: flex; flex-direction: column; gap: 10px; }
  .reply-editor textarea {
    width: 100%; min-height: 96px; resize: vertical;
    background: var(--bg); border-radius: var(--r-sm); padding: 12px 14px;
    font-size: 15px; line-height: 1.55;
  }
  .reply-editor textarea:focus { background: var(--surface); }
  .reply-editor .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
  .reply-editor .text { font-size: 14px; line-height: 1.6; color: var(--text-dim); }
  .draft-badge {
    font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: var(--pill);
    display: inline-block; background: var(--surface-2); color: var(--muted);
  }
  .draft-badge.draft { background: var(--warn-soft); color: var(--warn); }
  .draft-badge.queued { background: var(--accent-soft); color: var(--accent); }
  .draft-badge.posted { background: var(--ok-soft); color: var(--ok); }
  .reply-hint { font-size: 13px; color: var(--muted); }

  .text.quoted {
    align-self: flex-end; max-width: 88%;
    background: var(--accent-soft); border: none;
    border-radius: 18px 4px 18px 18px;
    padding: 12px 16px; font-size: 14px; color: var(--text-dim);
  }
  .text.quoted::before {
    content: "Ваш ответ"; display: block;
    font-size: 11.5px; font-weight: 600; color: var(--accent); margin-bottom: 4px;
  }
  .text.quoted.posted::before { content: "Ваш ответ · опубликован"; }
  .text.quoted.queued::before { content: "Ваш ответ · публикуется"; }
  .text.quoted.queued.deleting::before { content: "Ваш ответ · удаляется"; }
  .review-card .reply-editor { padding-left: 24px; }
  .rv-status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
  .rv-status:empty { display: none; }
  .rv-status .reply-flag { margin-left: 4px; }

  /* Рейтинги Яндекса и Google рядом — в шапке карточки точки. */
  .rate-strip { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 2px; }
  .rate-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px 6px 10px; border-radius: var(--pill);
    background: var(--surface); border: 1px solid var(--border);
    font-size: 13px; color: var(--muted);
  }
  .rate-pill b { font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
  .rate-pill .stars { color: var(--star); letter-spacing: 1px; font-size: 12.5px; }
  .src-logo { display: inline-flex; }
  .src-logo::before { width: 18px; height: 18px; }

  .worker-status {
    display: flex; align-items: center; gap: 10px; font-size: 13px;
    padding: 10px 14px; border-radius: var(--r-sm); margin-top: 10px; max-width: 1000px;
    background: var(--surface-2); color: var(--text-dim);
  }
  .worker-status .wtime { margin-left: auto; font-size: 12px; color: var(--muted); }
  .worker-status.ok { color: var(--ok); background: var(--ok-soft); }
  .worker-status.bad { color: var(--danger); background: var(--danger-soft); }
  .wspin {
    width: 13px; height: 13px; flex-shrink: 0; border-radius: 50%;
    border: 2px solid var(--border-firm); border-top-color: var(--accent);
    animation: spin .8s linear infinite;
  }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* --- Админка ---------------------------------------------------------- */

  .admin { max-width: 1000px; }
  .admin h1 { font-size: 34px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.02em; }
  .admin .sub { color: var(--muted); font-size: 14.5px; margin-bottom: 32px; line-height: 1.6; }
  .admin .sub.tight { margin-bottom: 14px; }
  .admin section {
    margin-bottom: 28px; padding: 24px 26px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-lg); box-shadow: var(--shadow-2);
  }
  .admin section h2 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
  .admin section table { box-shadow: none; }
  .admin .grant-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 0 0 14px; }
  .admin .ff { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--text-dim); min-width: 0; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin .table-wrap table { min-width: 560px; }
  .admin .grant-form select { min-width: 210px; max-width: 320px; }
  .admin td .mono { font-family: var(--mono); font-size: 12px; color: var(--muted); }
  .admin td.muted, .muted { color: var(--muted); }
  .admin td button { color: var(--danger); padding: 5px 12px; font-size: 12.5px; }
  .admin td button:hover { border-color: var(--danger); background: var(--danger-soft); }
  .admin .msg { font-size: 13px; color: var(--muted); margin-top: 12px; }
  .admin td button.add { color: var(--accent); }
  .admin td button.add:hover { border-color: var(--accent); background: var(--accent-soft); }
  .admin td select { max-width: 220px; }
  .admin .kind-client { color: var(--ok); font-weight: 600; }
  .admin .note-input {
    width: 100%; min-width: 160px; padding: 6px 10px; font-size: 13.5px;
    border-color: transparent; background: transparent;
  }
  .admin .note-input:hover { border-color: var(--border); }
  .admin .note-input:focus { background: var(--surface); border-color: var(--accent); }
  .admin .note-input.saved { border-color: var(--ok); }

  /* --- CRM: клиенты Rewily --------------------------------------------- */

  .crm { max-width: 1120px; }
  .crm .page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
  .crm .rv-filters input[type=search] { min-width: 240px; height: 38px; box-sizing: border-box; padding: 8px 14px; border-radius: 10px; }
  .crm .rv-filters .chips { flex-wrap: wrap; }
  .crm .rv-filters .chip span { color: var(--muted); font-weight: 600; }
  .crm .rv-filters .chip.on span { color: inherit; }
  .crm #crmTable { overflow-x: auto; }
  .crm #crmTable table { min-width: 760px; }
  .crm table tr.row { cursor: pointer; }
  .crm table tr.row:hover td { background: var(--surface-2); }
  .crm td .cname { font-weight: 700; color: var(--text); text-decoration: none; display: block; }
  .crm td a.cname:hover { color: var(--accent); }
  .crm td .csub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
  .crm td.num { text-align: right; white-space: nowrap; }
  .crm .due-bad { color: var(--danger); font-weight: 600; }
  .crm .due-today { color: var(--warn); font-weight: 600; }
  .st-pill { display: inline-block; padding: 3px 10px; border-radius: var(--pill); font-size: 12.5px; font-weight: 700;
    white-space: nowrap; background: var(--warn-soft); color: var(--warn); }
  .st-pill.st-new { background: var(--accent-soft); color: var(--accent); }
  .st-pill.st-won { background: var(--ok-soft); color: var(--ok); }
  .st-pill.st-lost { background: var(--surface-2); color: var(--muted); }
  .crm-back { display: inline-flex; align-items: center; gap: 6px; border: none; background: none; color: var(--accent); font-weight: 700; cursor: pointer; padding: 0; margin-bottom: 14px; font-size: 14px; }
  .crm .empty-card::before { display: none; }
  .crm-card { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  @media (max-width: 1000px) { .crm-card { grid-template-columns: 1fr; } }
  .crm .an-card .card-h { margin-bottom: 16px; }
  .crm-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
  .crm-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 700; color: var(--muted); min-width: 0; }
  .crm-form label.wide { grid-column: 1 / -1; }
  .crm-form input, .crm-form select, .crm-form textarea { width: 100%; box-sizing: border-box; font-weight: 400; }
  .crm-form textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
  @media (max-width: 560px) { .crm-form { grid-template-columns: 1fr; } }
  .crm-actions { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
  .crm-actions .grow { flex: 1; }
  .crm-actions .danger { color: var(--danger); }
  .crm-status { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
  .crm-status select { padding: 8px 12px; border-radius: 10px; }
  .touch-form { display: grid; grid-template-columns: auto 1fr; gap: 8px; margin-bottom: 16px; }
  .touch-form textarea { grid-column: 1 / -1; min-height: 70px; resize: vertical; }
  .touch-form .btn { grid-column: 1 / -1; justify-self: start; }
  .touches { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
  .touch { border-left: 3px solid var(--border-firm); padding: 2px 0 2px 12px; }
  .touch.k-status { border-left-color: var(--accent); }
  .touch-head { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; color: var(--muted); }
  .touch-head b { color: var(--text); font-size: 13px; }
  .touch-head .x { margin-left: auto; border: none; background: none; color: var(--muted); cursor: pointer; font-size: 12.5px; }
  .touch-head .x:hover { color: var(--danger); }
  .touch-text { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 3px; }
  .touch.k-status .touch-text { color: var(--text-dim); }

  /* --- Поиск в шапке ---------------------------------------------- */

  .search { flex: 1; max-width: 440px; position: relative; }
  .search input {
    width: 100%; padding: 9px 16px 9px 38px; font-size: 14px;
    border-radius: var(--pill); background: var(--surface);
  }
  .search .search-ic {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--muted); font-size: 16px; pointer-events: none;
  }
  .search-drop {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r); box-shadow: var(--shadow-3); overflow: hidden;
    padding: 6px;
  }
  .search-row {
    display: flex; align-items: baseline; gap: 10px; width: 100%;
    padding: 10px 12px; border-radius: var(--r-sm); cursor: pointer;
    color: var(--text); text-decoration: none; background: none; border: 0; font: inherit; text-align: left;
  }
  .search-row:hover { background: var(--accent-soft); }
  .search-row.empty { cursor: default; }
  .search-row.empty:hover { background: transparent; }
  .search-row.empty .search-name { color: var(--muted); }
  .search-name { font-size: 14px; font-weight: 600; flex: 1; }
  .search-hint { font-size: 12.5px; color: var(--muted); white-space: nowrap; }

  /* --- Организации в боковой панели --------------------------------- */

  .org-list { display: flex; flex-direction: column; gap: 2px; }
  .org-item {
    padding: 10px; cursor: pointer; border-radius: var(--r-sm); color: inherit; text-decoration: none;
    display: flex; flex-direction: column; gap: 1px;
    transition: background var(--ease);
  }
  .org-item:hover { background: var(--surface-2); }
  .org-item:hover .org-name { color: var(--accent); }
  .org-name { font-size: 14.5px; font-weight: 700; }
  .org-note { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .back-link {
    background: none; border: none; color: var(--muted); cursor: pointer;
    font-size: 13.5px; font-weight: 600; padding: 0 0 12px; text-align: left;
    display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  }
  .back-link:hover { color: var(--accent); }
  aside .back-link { padding-left: 8px; }

  .org-head { margin-bottom: 26px; }
  .org-head h1 { font-size: 36px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.02em; }
  .org-head .sub { color: var(--muted); font-size: 14.5px; }
  .org-sync { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
  .org-head .msg { font-size: 13px; color: var(--muted); margin-top: 10px; }
  .org-kind {
    display: inline-block; font-size: 12.5px; font-weight: 600; margin: 2px 0 10px;
    padding: 4px 11px; border-radius: var(--pill);
    background: var(--surface-2); color: var(--muted);
  }
  .org-kind.client { background: var(--ok-soft); color: var(--ok); }

  /* --- Аватар как кнопка -------------------------------------------- */

  button.avatar { border: none; cursor: pointer; font-family: inherit; }
  button.avatar:hover { background: var(--accent-hover); }
  .btn-ghost.on { background: var(--accent-soft); border-color: transparent; color: var(--accent); }

  /* --- Главная страница ---------------------------------------------- */


  /* --- Управление шаблонами ---------------------------------------------- */

  .tpl-manager {
    margin-top: 0; padding: 24px 26px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-lg); box-shadow: var(--shadow-2);
  }
  .tpl-manager .section-label { border: none; padding: 0; }
  .tpl-manager .sub { color: var(--muted); font-size: 14px; margin: 6px 0 20px; max-width: 62ch; }
  .tpl-manager .sub code {
    font-family: var(--mono); font-size: 12.5px;
    background: var(--surface-2); padding: 1px 6px; border-radius: 6px;
  }
  .tpl-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 4px;
    overflow-x: auto; scrollbar-width: none; }
  .tpl-tab { display: inline-flex; align-items: center; gap: 6px; flex: none;
    padding: 10px 14px; margin-bottom: -1px; cursor: pointer; white-space: nowrap;
    background: none; border: none; border-bottom: 2px solid transparent;
    font: 700 14px var(--sans); color: var(--text-dim); }
  .tpl-tab:hover { color: var(--text); }
  .tpl-tab.on { color: var(--accent); border-bottom-color: var(--accent); }
  .tpl-tab-star { display: inline-flex; color: var(--star); }
  .tpl-tab-star.r-low { color: var(--danger); }
  .tpl-tab .tpl-n { color: var(--text-dim); background: var(--surface-2); }
  .tpl-tab.on .tpl-n { color: var(--accent); background: var(--accent-soft); }
  .tpl-rows { display: flex; flex-direction: column; }
  .tpl-row {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 0; border-bottom: 1px solid var(--border-soft);
  }
  .tpl-row.editing { flex-direction: column; align-items: stretch; gap: 10px; }
  .tpl-view { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.55; cursor: text;
    padding: 6px 8px; margin: -6px -8px; border-radius: var(--r-sm); white-space: pre-wrap; overflow-wrap: anywhere; }
  .tpl-view:hover { background: var(--surface-2); }
  .tpl-row textarea { width: 100%; resize: vertical; font-size: 14.5px; line-height: 1.5; }
  .tpl-acts { display: flex; align-items: center; gap: 4px; flex: none; }
  .tpl-row.editing .tpl-acts { gap: 8px; }
  .tpl-act { display: inline-flex; align-items: center; gap: 5px; background: none; border: none; cursor: pointer;
    padding: 6px 10px; border-radius: 10px; font: 600 13px var(--sans); color: var(--text-dim); }
  .tpl-act:hover { background: var(--surface-2); color: var(--text); }
  .tpl-act.danger:hover { background: var(--danger-soft); color: var(--danger); }
  .tpl-saved { font-size: 12.5px; font-weight: 700; color: var(--ok); }
  .tpl-none { padding: 14px 0; color: var(--muted); font-size: 14px; }
  .tpl-add {
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: none; color: var(--accent);
    font-family: inherit; font-size: 13.5px; font-weight: 700;
    padding: 12px 0 0; cursor: pointer;
  }
  .tpl-add:hover { text-decoration: underline; }
  .tpl-manager #tplMsg { color: var(--ok); font-weight: 600; min-height: 20px; }

  /* --- Личный кабинет -------------------------------------------------- */

  .cabinet { max-width: 1000px; }
  .cabinet h1 { font-size: 36px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.02em; }
  .cabinet .sub { color: var(--muted); font-size: 14.5px; margin-bottom: 30px; }
  .section-label {
    font-size: 18px; font-weight: 700; color: var(--text);
    margin: 30px 0 12px; letter-spacing: -0.01em;
  }
  .cabinet .section-label:first-of-type { margin-top: 0; }
  .org-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .org-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r); padding: 20px 22px; box-shadow: var(--shadow-2);
    display: flex; flex-direction: column; gap: 4px;
    transition: border-color var(--ease), transform var(--ease);
  }
  .org-card:hover { border-color: var(--accent); transform: translateY(-1px); }
  /* Вся карточка — ссылка на организацию (растянутая ссылка-название),
     вложенная ссылка «Отзывы →» лежит поверх неё. */
  .org-card-link { position: relative; }
  a.org-card-name { color: inherit; text-decoration: none; }
  a.org-card-name::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
  a.org-card-name:focus-visible { outline: none; }
  .org-card-link:has(a.org-card-name:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
  .org-card-links a { position: relative; z-index: 1; }
  .org-card-name { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
  .org-card-note { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
  .org-card-go { font-size: 13.5px; font-weight: 600; color: var(--accent); margin-top: 10px; }
  .empty-card {
    grid-column: 1 / -1;
    background: transparent; border: 1px dashed var(--border-firm); border-radius: var(--r);
    padding: 18px 20px; color: var(--muted); font-size: 14px; line-height: 1.6;
  }

  /* Главная кабинета: приветствие, итоги, свежие отзывы. */
  .cabinet { max-width: 1160px; }
  .dash-hero { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap;
    padding: 30px 32px; margin-bottom: 18px; border-radius: var(--r-lg); color: #fff;
    background: linear-gradient(120deg, #2c3352 0%, #3a4672 55%, #3d6f7c 100%); }
  .dash-hero h1 { color: #fff; margin: 0; }
  .cabinet .dash-hero .sub { color: rgba(255, 255, 255, .7); margin: 0; }
  .dash-greet { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; }
  .dash-date { font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .78); }
  .dash-hero-note { font-size: 15px; color: rgba(255, 255, 255, .85); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
  .dash-cta { font: 700 15px var(--sans); color: #1c2233; background: #fff; border: 1px solid #fff; border-radius: 12px;
    padding: 11px 18px; cursor: pointer; white-space: nowrap; }
  .dash-cta:hover { background: #eef0f7; }
  .dash-cta:focus-visible { outline-color: #fff; }
  .dash-hero-neg { font-size: 13.5px; color: rgba(255, 255, 255, .8); }
  .nw { white-space: nowrap; }
  .dash-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
  .kpi-tile { position: relative; }
  .kpi-tile.click { cursor: pointer; transition: transform var(--ease), border-color var(--ease); }
  .kpi-tile.click:hover { transform: translateY(-1px); border-color: var(--danger); }
  .kpi-tile.alert { border-color: color-mix(in srgb, var(--danger) 35%, var(--glass-line)); }
  .kpi-ic { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; font-size: 13px;
    background: var(--accent-soft); color: var(--accent); }
  .kpi-ic svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
  .kpi-tile.alert .kpi-ic { background: var(--danger-soft); color: var(--danger); }
  .kpi-value .delta { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 700; margin-left: 8px; vertical-align: middle; letter-spacing: 0; }
  .delta.up { color: var(--ok); } .delta.down { color: var(--danger); }
  .kpi-bar { height: 6px; border-radius: 4px; background: var(--surface-3); margin-top: 10px; overflow: hidden; }
  .kpi-bar i { display: block; height: 100%; background: var(--ok); border-radius: 4px; }
  .dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 10px; align-items: start; }
  .dash-side { display: flex; flex-direction: column; gap: 16px; }
  .dash-rv { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 12px 8px; margin: 0 -8px;
    border-top: 1px solid var(--border); border-radius: 10px; position: relative; }
  .dash-rv-link { color: inherit; text-decoration: none; }
  .dash-rv-link::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
  .dash-rv-link:focus-visible { outline: none; }
  .dash-rv:has(.dash-rv-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 0; }
  .dash-rv .dash-reply, .dash-rv .src-badge { position: relative; z-index: 1; }
  .dash-rv:first-of-type { border-top: none; }
  .dash-rv:hover { background: color-mix(in srgb, var(--surface) 70%, transparent); }
  .dash-rv .rv-avatar { width: 34px; height: 34px; margin: 0; font-size: 12px; }
  .dash-rv .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
  .dash-rv .meta .stars { color: var(--star); letter-spacing: 1px; }
  .dash-rv .meta .stars.r-low { color: var(--danger); }
  .dash-rv .age { margin-left: auto; color: var(--muted); font-size: 12px; }
  .dash-rv p { margin: 4px 0 6px; font-size: 14px; color: var(--text-dim); line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .dash-rv .where { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
  .dash-rv .where .ok { color: var(--ok); font-weight: 700; }
  .dash-quick .qa { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; cursor: pointer;
    padding: 10px 12px; margin-top: 6px; border-radius: 12px; border: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--text); }
  .dash-quick .qa:hover { border-color: var(--accent); }
  .dash-quick .qa svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: var(--accent); stroke-width: 1.9;
    stroke-linecap: round; stroke-linejoin: round; }
  .dash-quick .qa b { display: block; font-size: 14px; } .dash-quick .qa small { color: var(--muted); font-size: 12.5px; }
  .org-facts { display: flex; gap: 16px; margin: 10px 0 4px; }
  .org-facts span { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
  .org-facts b { font-size: 18px; color: var(--text); font-weight: 800; }
  .org-card-links { display: flex; gap: 16px; }
  a.org-card-go { text-decoration: none; } a.org-card-go:hover { text-decoration: underline; }
  @media (max-width: 1100px) { .dash-kpis { grid-template-columns: repeat(2, 1fr); } .dash-grid { grid-template-columns: 1fr; } }
  @media (max-width: 760px) {
    .dash-hero { padding: 20px; }
    .cabinet .dash-hero h1 { font-size: 28px; }
    .dash-hero-note { align-items: flex-start; width: 100%; }
    .dash-cta { width: 100%; text-align: center; }
    .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .dash-kpis .an-card { padding: 14px; }
    .dash-kpis .kpi-value { font-size: 24px; }
    .dash-kpis .kpi-label { font-size: 12.5px; align-items: flex-start; }
    .dash-kpis .kpi-note { font-size: 12px; }
  }

  /* Раздел «Отзывы»: фильтры и лента. */
  .rv-filters { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: flex-end; padding: 16px 20px;
    border-radius: var(--r-lg); margin-bottom: 14px; background: var(--surface); border: 1px solid var(--glass-line);
    box-shadow: var(--shadow-2); }
  .rv-fgroup { display: flex; flex-direction: column; gap: 6px; }
  .rv-flabel { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
  .rv-filters .chips { display: flex; gap: 6px; }
  .rv-filters .chip { display: inline-flex; align-items: center; gap: 4px; padding: 7px 11px; border-radius: 10px; cursor: pointer;
    border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 700; font-size: 13.5px; }
  .rv-filters .chip .star-ic { color: var(--star); display: inline-flex; }
  .rv-filters .chips { margin-top: 0; }
  .rv-filters .chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
  .rv-filters .seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
  .rv-filters .seg button { border: none; background: transparent; padding: 8px 13px; font-size: 13.5px; font-weight: 600; cursor: pointer; color: var(--text-dim); }
  .rv-filters .seg button + button { border-left: 1px solid var(--border); }
  .rv-filters .seg button.on { background: var(--accent); color: var(--accent-ink); }
  .rv-filters select { padding: 8px 12px; border-radius: 10px; max-width: 280px; }
  .rv-filters .chip, .rv-filters .seg, .rv-filters select, .rv-reset { height: 38px; box-sizing: border-box; }
  .rv-filters .seg button { height: 100%; }
  .admin .kind-bad { color: var(--danger); font-weight: 600; }
  .rv-reset { border: none; background: none; color: var(--accent); font-weight: 700; cursor: pointer; padding: 8px 4px; }
  .rv-summary { font-size: 14px; color: var(--muted); margin: 0 0 12px 4px; min-height: 18px; }
  .rv-summary b { color: var(--text); }
  .rv-loc { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-top: -2px;
    align-self: flex-start; }
  a.rv-loc { text-decoration: none; }
  a.rv-loc:hover { color: var(--accent); text-decoration: underline; }
  .rv-loc svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }
  .review-card .text.muted { color: var(--muted); font-style: italic; font-size: 14px; }
  .rv-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin-top: 2px; padding-top: 10px; border-top: 1px solid var(--border-soft); }
  .rv-foot .reply-flag { margin-left: 0; }
  .rv-foot .rv-reply { margin-left: auto; }
  .rv-more { display: flex; justify-content: center; margin-top: 18px; }
  .nav-count { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--muted); }

  /* --- Поиск по открытым источникам (админ) ------------------------- */

  .demo-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12.5px; font-weight: 600; margin: 4px 0 12px;
    padding: 4px 11px; border-radius: var(--pill);
    background: var(--warn-soft); color: var(--warn);
  }
  .search-form {
    display: flex; gap: 10px; margin: 12px 0 34px; flex-wrap: wrap;
    padding: 16px; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-lg); box-shadow: var(--shadow-2); max-width: 640px;
  }
  .search-form input { flex: 1; min-width: 220px; border-radius: var(--pill); }
  .found-list {
    margin-top: 14px; max-width: 860px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r); box-shadow: var(--shadow-2); overflow: hidden;
  }
  .found-row {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 14px 18px; border-bottom: 1px solid var(--border-soft);
  }
  .found-row:last-child { border-bottom: none; }
  .found-row.pick { justify-content: flex-start; cursor: pointer; }
  .found-row.pick .found-meta { margin-left: auto; }
  a.found-row, button.found-row { cursor: pointer; color: inherit; text-decoration: none; }
  button.found-row { width: 100%; text-align: left; font: inherit; background: none; border: 0;
    border-bottom: 1px solid var(--border-soft); }
  a.found-row:hover, button.found-row:hover { background: var(--accent-soft); }
  a.found-row:hover .found-name, button.found-row:hover .found-name { color: var(--accent); }
  .found-meta .i { color: var(--star); }
  .found-empty { padding: 14px 18px; color: var(--muted); font-size: 14px; }
  .found-name { font-weight: 700; }
  .found-addr { color: var(--muted); font-size: 13px; }
  .found-meta { color: var(--muted); font-size: 13px; white-space: nowrap; }
  .save-org { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 14px 0 6px; }
  .save-org input { min-width: 260px; border-radius: var(--pill); }


  /* --- Концепция «разговор» ------------------------------------------ */

  table.facts, .admin table, .org-card, .empty-card, .data-editor, .open-src,
  .sync-log, .reviews-empty, .found-list, .search-drop, .ysess .details,
  .tpl-list, .worker-status, .photos img {
    border-radius: var(--bubble);
  }
  .modal, .admin section, .tpl-manager, .search-form {
    border-radius: var(--bubble-lg);
  }

  /* Облачко-значок: контур реплики, рисуется рамкой. */
  .talk-ico {
    display: inline-block; flex-shrink: 0; width: 13px; height: 11px;
    border: 1.5px solid currentColor; border-radius: 1.5px 6px 6px 6px;
    vertical-align: -1px;
  }
  .talk {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin-top: 10px; font-size: 13px; color: var(--muted);
  }
  .talk-wait {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 9px; border-radius: 3px 10px 10px 10px;
    background: var(--surface-2); color: var(--text-dim); font-weight: 600; font-size: 12px;
  }
  .talk-neg {
    padding: 2px 9px; border-radius: 10px;
    background: var(--danger-soft); color: var(--danger); font-weight: 600; font-size: 12px;
  }
  .neg-note { color: var(--danger); font-weight: 700; }
  .talk-ok { color: var(--ok); font-weight: 600; font-size: 12px; }
  .org-item .org-row { display: flex; align-items: center; gap: 8px; }
  .org-item .org-name { flex: 1; min-width: 0; }
  .talk-dot {
    flex-shrink: 0; min-width: 20px; height: 18px; padding: 0 6px;
    display: grid; place-items: center;
    border-radius: 3px 9px 9px 9px;
    background: var(--danger-soft); color: var(--danger);
    font-size: 11px; font-weight: 700;
  }

  /* Пустые места — «тишина в разговоре». */
  .empty-card, .reviews-empty:not(.notice) { display: flex; align-items: center; gap: 12px; }
  .empty-card::before, .reviews-empty:not(.notice)::before {
    content: ""; flex-shrink: 0; width: 22px; height: 22px; background: var(--muted);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z'/%3E%3C/svg%3E") center / contain no-repeat;
  }




  /* Кнопка темы в шапке. */
  .theme-btn {
    width: 34px; height: 34px; flex-shrink: 0; cursor: pointer;
    display: grid; place-items: center; padding: 0;
    background: var(--surface); color: var(--text-dim);
    border: 1px solid var(--border); border-radius: 50%;
  }
  .theme-btn:hover { color: var(--accent); border-color: var(--border-firm); }
  .theme-btn svg { width: 16px; height: 16px; }

  /* --- Адаптив и доступность ----------------------------------------------- */


  @media (max-width: 1040px) {
    .layout { grid-template-columns: 1fr; }
    aside {
      height: auto; position: static;
      border-right: none; border-bottom: 1px solid var(--border);
      padding: 18px 16px;
    }
    main { padding: 26px 16px 56px; }
    .loc-header { flex-direction: column; }
    .toolbar { justify-content: flex-start; }
    .search { display: none; }
    .topbar { padding: 0 16px; gap: 12px; }
    .ysess .t { display: none; }
    .ysess { padding-right: 8px; }
    table.facts.cmp th:first-child, table.facts.cmp td:first-child { width: 110px; }
  }

  @media (prefers-reduced-motion: reduce) {
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  }

  .data-editor .section-label, .tpl-manager .section-label { margin: 0 0 4px; }
  /* --- Спокойная тема: палитра, стекло, логотип ------------------------------
     Приглушённый сине-сиреневый акцент на почти нейтральном фоне с еле
     заметной «авророй». Панели — полупрозрачные «стёкла». */

  :root {
    --bg: #f6f7f9; --surface: #ffffff; --surface-2: #f2f3f7; --surface-3: #e6e8ef;
    --border: #e7e9ef; --border-soft: #eff1f5; --border-firm: #d9dce5;
    --text: #1c2233; --text-dim: #4d5568; --muted: #636979;
    --accent: #4c5795; --accent-hover: #414b85; --accent-soft: #eef0f7; --accent-ink: #ffffff;
    --ok: #3d6b56; --ok-soft: #e8f1ec; --warn: #94703f; --warn-soft: #f6efe4;
    --danger: #9a4a44; --danger-soft: #f6e9e8; --star: #b07d22;
    --bubble: var(--r); --bubble-lg: var(--r-lg);
    --display: var(--sans);
    --sans: Manrope, Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --shadow-2: 0 1px 2px rgba(28, 34, 51, .04), 0 10px 32px rgba(40, 50, 80, .05);
    --ring: 0 0 0 4px rgba(76, 87, 149, .14);
    --glass: rgba(255, 255, 255, .76); --glass-line: rgba(255, 255, 255, .9);
    --grad: linear-gradient(95deg, #8b80b8 0%, #6f7fb6 45%, #5d93a6 100%);
    --heat: 92, 104, 160; --ya-line: #c0634f; --go-line: #5b7fc4;
    --aurora:
      radial-gradient(760px 520px at 8% 0%, rgba(226, 220, 238, .55) 0%, transparent 62%),
      radial-gradient(820px 560px at 96% 0%, rgba(214, 224, 240, .75) 0%, transparent 60%),
      radial-gradient(900px 600px at 85% 85%, rgba(218, 236, 232, .55) 0%, transparent 60%),
      radial-gradient(700px 500px at 0% 95%, rgba(220, 228, 240, .55) 0%, transparent 60%);
  }
  :root[data-theme="dark"] {
    --bg: #12141b; --surface: #1a1d27; --surface-2: #222632; --surface-3: #2c3140;
    --border: #2a2f3c; --border-soft: #232733; --border-firm: #374055;
    --text: #dfe2ea; --text-dim: #b2b7c6; --muted: #8a90a2;
    --accent: #8d97d6; --accent-hover: #9ea7df; --accent-soft: #252a40; --accent-ink: #12141b;
    --glass: rgba(26, 29, 39, .72); --glass-line: rgba(255, 255, 255, .06);
    --grad: linear-gradient(95deg, #a99fd6 0%, #8b9bd2 45%, #79b2c2 100%);
    --heat: 141, 151, 214; --ya-line: #d98a78; --go-line: #8aa6e0;
    --aurora:
      radial-gradient(760px 520px at 8% 0%, rgba(120, 100, 170, .14) 0%, transparent 62%),
      radial-gradient(820px 560px at 96% 0%, rgba(80, 110, 170, .16) 0%, transparent 60%),
      radial-gradient(900px 600px at 85% 85%, rgba(60, 130, 130, .1) 0%, transparent 60%);
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #12141b; --surface: #1a1d27; --surface-2: #222632; --surface-3: #2c3140;
      --border: #2a2f3c; --border-soft: #232733; --border-firm: #374055;
      --text: #dfe2ea; --text-dim: #b2b7c6; --muted: #8a90a2;
      --accent: #8d97d6; --accent-hover: #9ea7df; --accent-soft: #252a40; --accent-ink: #12141b;
      --glass: rgba(26, 29, 39, .72); --glass-line: rgba(255, 255, 255, .06);
      --grad: linear-gradient(95deg, #a99fd6 0%, #8b9bd2 45%, #79b2c2 100%);
      --heat: 141, 151, 214; --ya-line: #d98a78; --go-line: #8aa6e0;
      --aurora:
        radial-gradient(760px 520px at 8% 0%, rgba(120, 100, 170, .14) 0%, transparent 62%),
        radial-gradient(820px 560px at 96% 0%, rgba(80, 110, 170, .16) 0%, transparent 60%),
        radial-gradient(900px 600px at 85% 85%, rgba(60, 130, 130, .1) 0%, transparent 60%);
    }
  }

  body { background: var(--aurora), var(--bg); background-attachment: fixed; }

  .brand .logo {
    font: 800 24px/1 Unbounded, var(--sans); letter-spacing: -0.02em; margin: 0;
    background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .topbar { background: color-mix(in srgb, var(--surface) 62%, transparent); border-bottom-color: var(--border-soft); }
  aside { background: color-mix(in srgb, var(--surface) 58%, var(--bg)); border-right-color: var(--border-soft); }

  /* Панели: сплошная поверхность (размытие под ними на однотонном фоне не
     видно, а прокрутку длинных лент на слабых телефонах тормозит). */
  .org-card, table.facts, .admin table, .modal, .admin section, .tpl-manager, .search-form,
  .loc-header, .org-head, .page-head, .data-editor, .empty-card, .an-card, .lp-card {
    background: var(--surface); border: 1px solid var(--glass-line);
    box-shadow: var(--shadow-2);
  }
  .loc-header, .org-head, .page-head { padding: 26px 30px; margin-bottom: 20px; border-radius: var(--r-lg); }

  .loc-header h1, .org-head h1, .page-head h1, .modal h2, .reviews-header h2, .org-card-name,
  .section-label, .admin section h2, .tpl-manager .section-label, .data-editor .section-label {
    font-family: var(--sans); font-weight: 800; letter-spacing: -0.02em;
  }
  .loc-header h1, .org-head h1, .page-head h1 { font-size: 30px; }
  .page-head .sub { margin-bottom: 0 !important; }

  /* Кнопки — мягкие прямоугольники вместо «пилюль» */
  .btn, .modal .primary, .reply-editor button.primary, .admin .grant-form button, .ysess button.ask,
  .btn-ghost, .reply-editor button, .admin td button, .modal .ghost, .sync-btn {
    border-radius: 12px; font-weight: 700;
  }
  .btn-ghost, .reply-editor button, .admin td button, .modal .ghost, .sync-btn {
    background: color-mix(in srgb, var(--surface) 80%, transparent);
  }

  /* --- Меню кабинета в боковой панели --------------------------------------- */
  .side-nav { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
  .side-nav .it {
    display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
    padding: 9px 12px; border-radius: 10px; border: none; background: none; cursor: pointer;
    font: 600 14.5px var(--sans); color: var(--text-dim);
  }
  .side-nav .it:hover { background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--text); }
  .side-nav .it.on { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-2); }
  .side-nav .it svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor;
    stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .side-nav .it .talk-dot { margin-left: auto; }

  /* --- Аналитика организации ------------------------------------------------- */
  .an { display: flex; flex-direction: column; gap: 16px; margin-bottom: 26px; }
  .an-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
  .an-card { border-radius: var(--r-lg); padding: 18px 20px; min-width: 0; }
  .an-card .card-h { margin: 0 0 14px; font-size: 15px; font-weight: 800; display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
  .an-card .card-h span { font-size: 12.5px; font-weight: 600; color: var(--muted); }
  .kpi-label { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--muted); }
  .kpi-label .src-logo::before { width: 15px; height: 15px; }
  .kpi-value { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; margin-top: 6px; line-height: 1.1; }
  .kpi-note { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
  .kpi-value.warn { color: var(--danger); }
  .an-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 16px; align-items: start; }
  .an-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  .an-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  @media (max-width: 700px) { .an-pair { grid-template-columns: 1fr; } }
  .an-meter { height: 8px; border-radius: 5px; background: var(--surface-2); margin: 14px 0 2px; overflow: hidden; }
  .an-meter i { display: block; height: 100%; background: var(--ok); border-radius: 5px; }
  .an-bars.an-age .b { grid-template-columns: 112px 1fr 26px; white-space: nowrap; font-size: 12.5px; }
  .an-age .b span:first-child { color: var(--text-dim); }
  .an-bars .b i.late { background: var(--danger); opacity: .75; }
  .an-bars.an-answered .b { grid-template-columns: 74px 1fr 44px; white-space: nowrap; }
  .an-answered .b i.track { background: var(--surface-2); height: 9px; border-radius: 5px; overflow: hidden; }
  .an-answered .b i.track i { background: var(--ok); height: 100%; border-radius: 5px; min-width: 0; }
  .an-loc { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0;
            border-top: 1px solid var(--border); cursor: pointer; color: inherit; text-decoration: none; }
  .an-loc:first-of-type { border-top: none; }
  .an-loc:hover b { color: var(--accent); }
  .an-loc .meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
  .an-loc .nums { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 12.5px; white-space: nowrap; }
  .an-loc .wait { font-weight: 800; }
  .an-loc .neg { color: var(--danger); font-weight: 700; }
  .an-more { margin-top: 10px; }
  .rv-reply, .dash-reply { padding: 5px 14px; font-size: 13px; }
  .dash-reply { margin-left: 8px; }
  .an-empty { color: var(--muted); font-size: 14px; padding: 18px 0; }
  .an-trend { width: 100%; height: auto; display: block; }
  .an-legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
  .an-legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }
  .an-bars .b { display: grid; grid-template-columns: 74px 1fr 40px; align-items: center; gap: 10px; font-size: 13px; margin: 9px 0; }
  .an-bars .b .stars { color: var(--star); letter-spacing: 1px; }
  .an-bars .b i { display: block; height: 9px; border-radius: 5px; background: rgb(var(--heat)); min-width: 3px; }
  .an-bars .b span:last-child { text-align: right; color: var(--text-dim); }
  .an-heat { display: grid; gap: 4px; font-size: 11px; color: var(--muted); align-items: center; }
  .an-heat i { height: 22px; border-radius: 5px; background: rgba(var(--heat), var(--a)); }
  .an-heat i.none, .an-heat-legend i.none { background: transparent; box-shadow: inset 0 0 0 1px var(--border-firm); }
  .an-heat-note { margin-left: auto; }
  .an-trend-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; color: var(--text-dim); padding: 4px 0; }
  .an-trend-line b { color: var(--text); font-size: 17px; }
  .an-pair.one { grid-template-columns: 1fr; }
  .an-heat-legend { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 12px; }
  .an-heat-legend i { width: 18px; height: 10px; border-radius: 3px; }
  .an-wait .w { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
  .an-wait .w:first-of-type { border-top: none; }
  .an-wait .w .rv-avatar { width: 34px; height: 34px; margin: 0; font-size: 12px; }
  .an-wait .meta { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
  .an-wait .meta .stars { color: var(--star); }
  .an-wait .meta .stars.r-low { color: var(--danger); }
  .an-wait p { margin: 4px 0 8px; font-size: 14px; color: var(--text-dim); line-height: 1.45; }
  .an-wait .age { font-size: 12px; font-weight: 800; color: var(--danger); white-space: nowrap; }
  @media (max-width: 520px) { .topbar .ysess { display: none; } }
  @media (max-width: 1240px) {
    .an-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .an-kpis > :last-child:nth-child(odd) { grid-column: 1 / -1; }
    .an-grid { grid-template-columns: 1fr; }
  }

  /* --- Главная страница ---------------------------------------------------- */
  .home { max-width: 1160px; margin: 0 auto; }
  .lp-h2 { font-size: 40px; line-height: 1.12; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 12px; text-wrap: balance; }
  .lp-sub { font-size: 17.5px; line-height: 1.6; color: var(--text-dim); max-width: 640px; margin: 0; }
  .lp-section { padding-top: 96px; }
  .lp-card { border-radius: var(--r-lg); }

  .lp-actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
  .lp-actions .btn, .lp-actions .btn-ghost { padding: 13px 22px; font-size: 15px; }

  /* Главная, идея «Карта оживает»: точки бизнеса на карте города шлют отзывы
     в одно окно Rewily, ответ улетает обратно, и точка успокаивается.
     Одна сцена, один сюжет, всё остальное на странице тихое. */
  .hx { position: relative; display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 24px; align-items: center;
    min-height: min(760px, calc(100vh - 64px)); padding: 24px 0 40px; }
  .hx-copy { position: relative; z-index: 2; }
  /* наклонённая карта шире экрана телефона: обрезаем по краю страницы, без прокрутки вбок */
  .layout.no-aside main { overflow-x: clip; }
  .hx h1 { font-size: clamp(40px, 4.4vw, 62px); line-height: 1.02; font-weight: 800; letter-spacing: -0.04em; margin: 0 0 22px; text-wrap: balance; }
  .hx h1 em { font-style: normal; color: var(--accent); }
  .hx .lead { font-size: 18px; line-height: 1.6; color: var(--text-dim); margin: 0; max-width: 420px; }
  .hx .lp-actions { margin-top: 30px; }
  .hx-src { display: flex; align-items: center; gap: 16px; margin-top: 34px; font-size: 13.5px; font-weight: 600; color: var(--muted); flex-wrap: wrap; }
  .hx-src span { display: inline-flex; align-items: center; gap: 7px; }
  .hx-src .src-logo::before { width: 16px; height: 16px; }

  /* Сцена */
  .hx-stage { position: relative; height: 620px; margin-right: -40px; }
  .hx-plane { position: absolute; left: -13%; top: 0; width: 100%; height: 100%; transform-style: preserve-3d;
    transform: perspective(1600px) rotateX(38deg) rotateZ(-10deg) scale(1.08); transform-origin: 50% 55%; }
  .hx-map { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible;
    -webkit-mask-image: radial-gradient(closest-side, #000 60%, transparent 100%); mask-image: radial-gradient(closest-side, #000 60%, transparent 100%); }
  /* булавки стоят вертикально над наклонённой картой */
  .hx-pin { transform-style: preserve-3d; }
  .hx-pin .pv { position: absolute; left: 0; top: 0; transform: rotateZ(10deg) rotateX(-38deg); transform-origin: 0 0; transform-style: preserve-3d; }
  .hx-pin::before { content: ""; position: absolute; left: -7px; top: -3px; width: 14px; height: 6px; border-radius: 50%; background: rgba(30,40,80,.25); filter: blur(1.5px); }
  .hx-pin i::after { content: ""; position: absolute; left: 50%; top: 100%; width: 2px; height: 16px; margin-left: -1px; background: inherit; }
  .hx-pin .pv i { top: -30px; }
  .hx-pin .pv .ring { top: -30px; }
  .hx-pin .pv b { top: -33px; }
  .hx-map .st { fill: none; stroke: var(--border); stroke-width: 1.2; stroke-linecap: round; }
  .hx-map .av { fill: none; stroke: var(--border-firm, var(--border)); stroke-width: 3.2; stroke-linecap: round; }
  .hx-map .rv { fill: none; stroke: color-mix(in srgb, var(--accent) 22%, transparent); stroke-width: 9; stroke-linecap: round; }
  .hx-map .park { fill: color-mix(in srgb, var(--ok) 9%, transparent); }
  .hx-map .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: hx-draw 2.4s cubic-bezier(.65,0,.35,1) forwards; animation-delay: var(--d, 0s); }
  @keyframes hx-draw { to { stroke-dashoffset: 0; } }

  .hx-pin { position: absolute; width: 0; height: 0; z-index: 3; }
  .hx-pin i { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent);
    box-shadow: 0 0 0 4px var(--surface), 0 2px 8px rgba(30,40,80,.25); transition: background-color 500ms ease; }
  .hx-pin.hot i { background: var(--danger); }
  .hx-pin.calm i { background: var(--ok); }
  .hx-pin b { position: absolute; left: 14px; top: -9px; white-space: nowrap; font-size: 12px; font-weight: 700; color: var(--text-dim);
    background: color-mix(in srgb, var(--surface) 86%, transparent); padding: 2px 7px; border-radius: 6px; }
  .hx-pin .ring { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; opacity: 0; pointer-events: none; }
  .hx-pin { opacity: 0; transform: scale(.4); transition: opacity 400ms ease, transform 600ms cubic-bezier(.34,1.56,.64,1); }
  .hx-pin.on { opacity: 1; transform: scale(1); }

  /* Летящий отзыв */
  .hx-fly { position: absolute; z-index: 6; width: 236px; left: 0; top: 0; pointer-events: none; will-change: transform, opacity;
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px;
    box-shadow: 0 2px 4px rgba(30,40,80,.06), 0 18px 40px rgba(30,40,80,.16); font-size: 12.5px; line-height: 1.4; }
  .hx-fly .h, .hx-item .h { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text); }
  .hx-fly .h .src-logo::before, .hx-item .h .src-logo::before { width: 14px; height: 14px; }
  .hx-fly .h .s, .hx-item .h .s { color: var(--star); letter-spacing: 1px; font-size: 11px; }
  .hx-fly .h .s.low, .hx-item .h .s.low { color: var(--danger); }
  .hx-fly p { margin: 4px 0 0; color: var(--text-dim); }
  .hx-fly.reply { width: auto; max-width: 220px; background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }

  /* Окно Rewily */
  .hx-win { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 360px; z-index: 5;
    background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 18px 18px 14px;
    box-shadow: 0 2px 6px rgba(30,40,80,.05), 0 30px 70px rgba(30,40,80,.14); }
  .hx-win header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
  .hx-win header b { font: 800 15px var(--sans); color: var(--text); }
  .hx-win header span { font-size: 12.5px; font-weight: 700; color: var(--muted); }
  .hx-win header span em { font-style: normal; color: var(--danger); font-variant-numeric: tabular-nums; display: inline-block; min-width: 1ch; }
  .hx-list { display: flex; flex-direction: column; gap: 8px; height: 404px; overflow: hidden; }
  .hx-item { flex: none; border: 1px solid var(--border-soft, var(--border)); background: var(--surface-2); border-radius: 14px; padding: 10px 12px; font-size: 12.5px; line-height: 1.4; }
  .hx-item p { margin: 4px 0 6px; color: var(--text-dim); }
  .hx-item .m { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); }
  .hx-item .tag { font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--danger-soft); color: var(--danger); white-space: nowrap; transition: background-color 400ms, color 400ms; }
  .hx-item .tag.ok { background: var(--ok-soft); color: var(--ok); }
  .hx-item .ans { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); color: var(--text); min-height: 1.4em; display: none; }
  .hx-item .ans.on { display: block; }
  .hx-item .ans::after { content: ""; display: inline-block; width: 1.5px; height: 1em; background: var(--accent); margin-left: 1px; vertical-align: -2px; animation: hx-caret 1s steps(1) infinite; }
  .hx-item .ans.done::after { display: none; }
  @keyframes hx-caret { 50% { opacity: 0; } }
  .hx-win footer { margin-top: 10px; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); font-weight: 600; }
  .hx-win footer b { color: var(--text); font-variant-numeric: tabular-nums; }

  @media (max-width: 1100px) {
    .hx { grid-template-columns: 1fr; min-height: 0; gap: 10px; }
    .hx-stage { height: 560px; margin: 0; }
    .hx-plane { left: 0; width: 100%; height: 70%; top: 0; }
    .hx-win { top: auto; bottom: 0; transform: none; right: 50%; margin-right: -180px; }
  }
  @media (max-width: 560px) {
    .hx { padding-top: 8px; }
    .hx h1 { font-size: 38px; }
    .hx .lead { font-size: 16.5px; }
    .hx-stage { height: 570px; margin: 0 -16px; }
    .hx-plane { height: 330px; top: -10px; left: 2%; width: 96%; }
    .hx-win { width: auto; left: 12px; right: 12px; margin: 0; padding: 14px 14px 12px; border-radius: 18px; }
    .hx-list { height: 250px; }
    .hx-fly { width: 200px; }
    .hx-pin b { display: none; }
  }
  @media (prefers-reduced-motion: reduce) {
    .hx-map .draw { animation: none; stroke-dashoffset: 0; }
    .hx-pin { transition: none; }
  }
  @media (max-width: 560px) {
    .hx-src { gap: 6px 14px; margin-top: 22px; font-size: 12.5px; }
    .hx .lp-actions { margin-top: 22px; }
  }

  .lp-wait { display: inline-block; font-size: 12px; font-weight: 700; color: var(--danger); background: var(--danger-soft); padding: 3px 9px; border-radius: 8px; }

  /* Ниже первого экрана всё спокойно: заголовок без надписи над ним, иконка
     в строку с заголовком, ровные колонки текста вместо «бенто» из карточек. */
  .lp-feat-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 32px 64px; align-items: start; }
  .lp-feat-intro .lp-h2 { margin-top: 0; }
  .lp-features { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
  .lp-feat { padding: 22px 0; border-top: 1px solid var(--border); }
  .lp-feat h3, .lp-step h3, .lp-q h3 { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; margin: 0 0 8px; letter-spacing: -0.01em; }
  .lp-feat h3 .i { width: 20px; height: 20px; color: var(--accent); stroke-width: 1.9; }
  .lp-feat p, .lp-step p, .lp-q p { color: var(--text-dim); line-height: 1.6; font-size: 15px; margin: 0; }

  .lp-steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; margin: 36px 0 0; }
  .lp-step { padding: 22px 0 0; border-top: 2px solid var(--border-firm); }
  .lp-step .n { font: 800 18px Unbounded, var(--sans); color: var(--accent); min-width: 1.2em; font-variant-numeric: tabular-nums; }

  .lp-split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
  .lp-list { list-style: none; margin: 24px 0 0; padding: 0; }
  .lp-list li { padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 16px; display: flex; gap: 12px; align-items: center; }
  .lp-list li .i { width: 18px; height: 18px; color: var(--accent); stroke-width: 2.4; }
  .lp-an { padding: 20px; display: grid; gap: 14px; margin: 0; }
  .lp-an .box { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
  .lp-an-h { margin: 0 0 12px; font-size: 13px; font-weight: 700; color: var(--text-dim); }
  .lp-note { font-size: 12.5px; color: var(--muted); text-align: right; }

  .lp-faq { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; margin-top: 28px; }
  .lp-q { padding: 20px 0; border-top: 1px solid var(--border); }
  .lp-q h3 { font-size: 17px; }

  .lp-cta { margin-top: 96px; border-radius: 20px; padding: 40px 44px; display: flex; justify-content: space-between; align-items: center; gap: 24px 30px;
    background: var(--surface); border: 1px solid var(--border); }
  .lp-cta h2 { margin: 0 0 6px; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
  .lp-cta p { margin: 0; color: var(--text-dim); font-size: 16.5px; }
  .lp-cta .btn { padding: 14px 24px; font-size: 15px; }
  .lp-foot { display: flex; justify-content: space-between; align-items: center; padding: 44px 0 10px; color: var(--muted); font-size: 14px; }
  .lp-foot .logo { font: 800 20px Unbounded, var(--sans); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

  @media (max-width: 960px) {
    .lp-split, .lp-faq, .lp-feat-wrap { grid-template-columns: 1fr; }
    .lp-steps { grid-template-columns: 1fr; }
    .lp-step { padding-bottom: 18px; }
    .lp-cta { flex-direction: column; align-items: flex-start; padding: 28px 22px; }
    .lp-h2 { font-size: 30px; }
    .lp-section { padding-top: 72px; }
  }
  @media (max-width: 560px) {
    .lp-features { grid-template-columns: 1fr; }
    .lp-foot { flex-direction: column; align-items: flex-start; gap: 8px; }
    .lp-cta .btn { width: 100%; }
  }

  /* --- Телефон (до 760 px) -------------------------------------------------
     Неотвеченный отзыв должен быть виден сразу: меню организации — одной
     строкой вкладок, точки — выпадающим списком, метрики — сеткой 2×2.
     Всё, во что нажимают пальцем, — не меньше 40 px. */
  @media (max-width: 760px) {
    .acct-wide, .admin-tag, .acct-logout { display: none; }
    .theme-btn, .avatar { width: 40px; height: 40px; }
    main { padding: 18px 16px 56px; }

    aside.aside-orgs { display: none; }
    aside { padding: 10px 16px 12px; gap: 8px; }
    aside .back-link { padding: 0 0 0 2px; min-height: 40px; }
    aside .aside-head { padding: 0 2px; }
    .side-nav { flex-direction: row; overflow-x: auto; gap: 4px; margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none; }
    .side-nav::-webkit-scrollbar { display: none; }
    .side-nav .it { width: auto; flex: none; white-space: nowrap; min-height: 40px; padding: 8px 10px; gap: 7px; }
    .side-nav .nav-long, .side-nav .nav-count { display: none; }
    aside .aside-points, aside .loc-list { display: none; }
    .loc-select-wrap { display: block; }
    .loc-select { width: 100%; min-height: 44px; }

    .loc-header, .org-head, .page-head { padding: 18px; }
    .loc-header h1, .org-head h1, .page-head h1, .admin h1 { font-size: 24px; }
    .toolbar { grid-template-columns: 1fr; width: 100%; }

    .review-card { grid-template-columns: 30px minmax(0, 1fr); gap: 8px; }
    .review-card .rv-avatar { width: 30px; height: 30px; font-size: 11px; }
    .rv-bubble { padding: 12px 14px; }
    .review-card .reply-editor { padding-left: 0; }
    .reply-editor .actions { display: grid; grid-template-columns: 1fr 1fr; }
    .reply-editor .actions .primary { grid-column: 1 / -1; }
    .reply-editor .actions button { justify-content: center; min-height: 44px; white-space: normal; }
    .reply-editor .actions button:nth-child(4) { grid-column: 1 / -1; }
    .reply-modal .reply-editor .actions button { flex: initial; }
    .modal { padding: 22px 18px; }
    .modal.reply-modal { padding: 20px 16px; }

    .btn, .btn-ghost, .sync-btn, .rv-reply, .dash-reply, .modal .primary, .modal .ghost,
    .rv-filters .chip, .rv-filters .seg, .rv-filters select, .rv-reset, .tpl-act, .tpl-add, .tpl-tab,
    .crm-back, .admin td button, select, input:not([type=checkbox]):not([type=radio]) { min-height: 40px; }
    .modal-close { width: 40px; height: 40px; }
    .back-link { min-height: 40px; }
    .brand { min-height: 44px; }
    a.rv-loc { padding: 8px 0; margin: -8px 0 -6px; }
    .rv-filters .seg button { min-height: 38px; }

    .admin section { padding: 18px 16px; }
    .admin .grant-form .ff, .admin .grant-form select, .admin .grant-form input { width: 100%; max-width: none; min-width: 0; }
    .admin .grant-form button { width: 100%; }

    .rv-filters { padding: 14px; gap: 12px; }
    .rv-filters label.rv-fgroup { flex: 1 1 140px; min-width: 0; }
    .rv-filters select { max-width: 100%; width: 100%; }
    .crm .rv-filters input[type=search] { min-width: 0; width: 100%; }

    .tpl-manager { padding: 16px; }
    .tpl-tab-word { display: none; }
    .tpl-tabs { gap: 0; }
    .tpl-tab { flex: 1 1 0; justify-content: center; padding: 10px 4px; gap: 4px; }
    .tpl-row:not(.editing) { flex-direction: column; gap: 6px; }
    .an-heat-note { margin-left: 0; flex-basis: 100%; }
  }

  /* ==========================================================================
     «Облако» (направление 11a, утверждено 27.10.2026).
     Лёгкость: холодный светлый фон, много воздуха, крупные заголовки тонким
     Ysabeau Office с курсивным акцентом (позже — Montserrat, см. ниже), текст и интерфейс — Manrope.
     Радужная кайма (мята → роза → фиолетовый) — сквозной знак: полоска по
     верху страницы, кольцо у главной кнопки и у отзывов, которые ждут ответа.
     Отвеченное затихает. Логотип — прежний градиент, на тон темнее.
     ========================================================================== */

  :root {
    --bg: #f6f7f9; --surface: #ffffff; --surface-2: #f0f2f5; --surface-3: #e5e8ee;
    --border: #e3e7ee; --border-soft: #edf0f4; --border-firm: #d4d9e2;
    --text: #2b3140; --text-dim: #4f5768; --muted: #646b7c;
    --accent: #5f40dc; --accent-hover: #4f32c4; --accent-soft: #f1edfd; --accent-ink: #ffffff;
    --ok: #3f7d58; --ok-soft: #e9f3ed; --danger: #a8424d; --danger-soft: #f8eaec; --star: #c08a23;
    --mint: #8fe0c9; --rose: #f3a6c4;
    --iris: linear-gradient(110deg, var(--mint), var(--rose) 50%, var(--accent));
    --grad: linear-gradient(95deg, #6c5fae 0%, #5367a8 45%, #3b7d93 100%);
    --btn: #2b3140; --btn-ink: #ffffff; --btn-hover: #1f2431;
    --display: "Montserrat", var(--sans);
    --heat: 95, 64, 220;
    --shadow-2: 0 1px 2px rgba(43, 49, 64, .03), 0 14px 34px -18px rgba(43, 49, 64, .18);
    --shadow-3: 0 2px 6px rgba(43, 49, 64, .05), 0 30px 60px -24px rgba(43, 49, 64, .28);
    --ring: 0 0 0 4px rgba(95, 64, 220, .14);
    --glass-line: transparent;
    --aurora: none;
  }
  :root[data-theme="dark"] {
    --bg: #14151b; --surface: #1c1d25; --surface-2: #23252e; --surface-3: #2e303a;
    --border: #2e303a; --border-soft: #262832; --border-firm: #3b3e4a;
    --text: #e2e3ea; --text-dim: #b8bcc8; --muted: #9ba0ae;
    --accent: #a996f5; --accent-hover: #b9a9f8; --accent-soft: #272342; --accent-ink: #14151b;
    --ok: #7cc79a; --ok-soft: #1b2f24; --danger: #e48a94; --danger-soft: #3a2328; --star: #e2b25a;
    --grad: linear-gradient(95deg, #a99fd6 0%, #8b9bd2 45%, #79b2c2 100%);
    --btn: #e2e3ea; --btn-ink: #14151b; --btn-hover: #ffffff;
    --heat: 169, 150, 245;
    --shadow-2: 0 14px 34px -18px rgba(0, 0, 0, .55);
    --shadow-3: 0 30px 60px -24px rgba(0, 0, 0, .7);
    --aurora: none;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #14151b; --surface: #1c1d25; --surface-2: #23252e; --surface-3: #2e303a;
      --border: #2e303a; --border-soft: #262832; --border-firm: #3b3e4a;
      --text: #e2e3ea; --text-dim: #b8bcc8; --muted: #9ba0ae;
      --accent: #a996f5; --accent-hover: #b9a9f8; --accent-soft: #272342; --accent-ink: #14151b;
      --ok: #7cc79a; --ok-soft: #1b2f24; --danger: #e48a94; --danger-soft: #3a2328; --star: #e2b25a;
      --grad: linear-gradient(95deg, #a99fd6 0%, #8b9bd2 45%, #79b2c2 100%);
      --btn: #e2e3ea; --btn-ink: #14151b; --btn-hover: #ffffff;
      --heat: 169, 150, 245;
      --shadow-2: 0 14px 34px -18px rgba(0, 0, 0, .55);
      --shadow-3: 0 30px 60px -24px rgba(0, 0, 0, .7);
      --aurora: none;
    }
  }

  body { background: var(--bg); }
  ::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

  /* Шапка: радужная полоска сверху, спокойная подложка */
  .topbar {
    background: var(--iris) top / 100% 3px no-repeat, color-mix(in srgb, var(--bg) 90%, transparent);
    border-bottom: 1px solid var(--border-soft);
    padding-top: 3px;
  }
  .site-nav { display: flex; align-items: center; gap: 26px; margin-left: 18px; min-width: 0; }
  .site-nav a { position: relative; color: var(--text-dim); text-decoration: none; font: 500 15px var(--sans);
    padding: 8px 0; white-space: nowrap; transition: color var(--ease); }
  .site-nav a:hover, .site-nav a.on { color: var(--text); }
  .site-nav a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 1px; background: var(--iris); }
  .site-nav a:focus-visible { outline-offset: 4px; border-radius: 4px; }

  /* Крупные заголовки — тонкое начертание (шрифт — --display) */
  .hx h1, .dash-hero h1, .loc-header h1, .org-head h1, .page-head h1, .lp-h2, .lp-cta h2,
  .reviews-header h2, .modal h2, .admin h1 {
    font-family: var(--display); font-weight: 200; letter-spacing: -0.03em;
  }
  .hx h1 { font-size: clamp(46px, 5.6vw, 84px); line-height: 1.0; }
  .hx h1 em, .lp-h2 em, .lp-cta h2 em {
    font-style: italic; color: var(--accent);
    text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 30%, transparent);
    text-decoration-thickness: .07em; text-underline-offset: .12em; text-decoration-skip-ink: none;
  }
  .lp-h2 em, .lp-cta h2 em { text-decoration: none; }
  .dash-hero h1 { font-size: clamp(34px, 3.6vw, 48px); }
  .loc-header h1, .org-head h1, .page-head h1 { font-size: 40px; font-weight: 200; }
  .reviews-header h2 { font-size: 30px; }
  .modal h2 { font-size: 28px; }
  .kpi-value { font-family: var(--display); font-weight: 300; font-size: 38px; letter-spacing: -0.02em; }

  /* Кнопки: главная — тёмная пилюля с радужным кольцом, второстепенные — тихие */
  .btn, .modal .primary, .reply-editor button.primary, .admin .grant-form button, .ysess button.ask,
  .btn-ghost, .reply-editor button, .admin td button, .modal .ghost, .sync-btn {
    border-radius: 999px; font-weight: 600;
  }
  .btn, .modal .primary, .reply-editor button.primary, .admin .grant-form button, .dash-cta {
    position: relative; background: var(--btn); color: var(--btn-ink); border-color: transparent;
    box-shadow: 0 10px 24px -12px rgba(43, 49, 64, .5);
  }
  .btn:hover, .modal .primary:hover, .reply-editor button.primary:hover, .admin .grant-form button:hover, .dash-cta:hover {
    background: var(--btn-hover); color: var(--btn-ink);
  }
  .btn::after, .modal .primary::after, .reply-editor button.primary::after, .dash-cta::after {
    content: ""; position: absolute; inset: -3px; border-radius: inherit; padding: 1.5px; background: var(--iris); pointer-events: none;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  }
  .btn-ghost, .reply-editor button:not(.primary), .admin td button, .modal .ghost, .sync-btn {
    background: var(--surface); border: 1px solid var(--border); color: var(--text);
  }
  .btn-ghost:hover, .reply-editor button:not(.primary):hover, .admin td button:hover, .modal .ghost:hover, .sync-btn:hover {
    border-color: var(--border-firm); background: var(--surface-2);
  }

  /* Поверхности: мягкая тень вместо рамки, крупные скругления */
  .org-card, table.facts, .admin table, .modal, .admin section, .tpl-manager, .search-form,
  .loc-header, .org-head, .page-head, .data-editor, .empty-card, .an-card, .lp-card {
    border: 1px solid transparent; box-shadow: var(--shadow-2); border-radius: 22px;
  }
  .modal { border-radius: 26px; box-shadow: var(--shadow-3); }
  aside { background: transparent; border-right-color: var(--border-soft); }
  .side-nav .it.on { box-shadow: var(--shadow-2); }
  input, textarea, select { border-radius: 14px; background: var(--surface); }
  input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: var(--ring); outline: none; }

  /* Оценки Яндекса и Google — отдельные карточки, не в строке со «ждут ответа» */
  .rate-strip { gap: 10px; margin: 14px 0 6px; }
  .rate-pill { background: var(--surface); border: 1px solid var(--border-soft); border-radius: 16px;
    padding: 8px 14px 8px 10px; box-shadow: var(--shadow-2); }
  .rate-pill b { font-family: var(--display); font-weight: 300; font-size: 24px; letter-spacing: -0.01em; }

  /* Отзывы — реплики: острый верхний левый угол. Ждёт ответа — радужная кайма */
  .rv-bubble { border-radius: 4px 20px 20px 20px; }
  .review-card.awaiting .rv-bubble { position: relative; background: var(--surface); }
  .review-card.awaiting .rv-bubble::after, .lp-rv.awaiting::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: var(--iris); pointer-events: none;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  }

  /* --- Главная --------------------------------------------------------------- */
  .home { max-width: 1200px; }
  .hx .lead { color: var(--text-dim); }
  .hx-win { border: 0; border-radius: 26px; box-shadow: var(--shadow-3); }
  .hx-win header b { font: 300 24px var(--display); letter-spacing: -0.01em; }
  .hx-win header span em { color: var(--accent); }
  .hx-item { border-radius: 4px 16px 16px 16px; border-color: transparent; }
  .hx-map .rv { stroke: url(#hxIris); stroke-width: 3; opacity: .9; }
  .hx-pin i { background: var(--accent); }

  .lp-band { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 34px; padding: 24px 0;
    border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font: 600 15px var(--sans); color: var(--text-dim); }
  .lp-band b { font: 300 24px var(--display); color: var(--text); letter-spacing: -0.01em; margin-right: 6px; }
  .lp-band span { display: inline-flex; align-items: center; gap: 9px; }
  .lp-band .src-logo::before { width: 17px; height: 17px; }

  .lp-section { padding-top: 110px; }
  .lp-h2 { font-size: clamp(36px, 4.2vw, 56px); line-height: 1.05; margin: 0 0 14px; }
  .lp-sub { font-size: 17px; }

  .lp-line { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; position: relative; }
  .lp-line::before { content: ""; position: absolute; left: 24px; right: 24px; top: 24px; height: 2px; background: var(--iris); }
  .lp-line .n { position: relative; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%;
    background: var(--surface); box-shadow: 0 0 0 6px var(--bg), var(--shadow-2); font: 300 26px var(--display); color: var(--text); }
  .lp-line h3 { font: 300 28px var(--display); letter-spacing: -0.02em; margin: 22px 0 8px; }
  .lp-line p { color: var(--text-dim); font-size: 15.5px; line-height: 1.6; margin: 0; max-width: 26em; }

  #lp-features > .lp-split + .lp-split { margin-top: 110px; }
  .lp-split { grid-template-columns: 1fr 1fr; gap: 70px; }
  .lp-split.rev .lp-txt { order: 2; }
  .lp-txt .lp-h2 { font-size: clamp(32px, 3.4vw, 44px); }
  .lp-dots { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; color: var(--text); }
  .lp-dots li { display: flex; gap: 12px; align-items: baseline; }
  .lp-dots li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--iris); transform: translateY(-1px); }
  .lp-panel { margin: 0; background: var(--surface); border-radius: 28px; padding: 24px; box-shadow: var(--shadow-3); min-width: 0; }
  .lp-panel .lp-note { margin-top: 12px; }
  .lp-rv { position: relative; background: var(--surface); border-radius: 4px 18px 18px 18px; padding: 13px 15px; }
  .lp-rv .h { display: flex; justify-content: space-between; gap: 10px; font: 600 13px var(--sans); flex-wrap: wrap; }
  .lp-rv .h small { color: var(--muted); font-weight: 500; }
  .lp-rv .h b { color: var(--accent); }
  .lp-rv .stars { color: var(--star); letter-spacing: 1px; }
  .lp-rv .stars.r-low { color: var(--danger); }
  .lp-rv p { margin: 4px 0 0; font-size: 15.5px; }
  .lp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
  .lp-chips span { font: 600 13px var(--sans); padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); }
  .lp-chips .on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
  .lp-compose { background: var(--surface-2); border-radius: 16px; padding: 14px 16px; font-size: 15px; line-height: 1.55; }
  .lp-compose mark { background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 0 4px; }
  .lp-pub { display: flex; align-items: center; gap: 14px; margin-top: 16px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
  .lp-pub .btn { padding: 11px 22px; font-size: 14.5px; cursor: default; }
  .lp-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
  .lp-table th { font: 600 11.5px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 0 10px 12px; }
  .lp-table td { padding: 13px 10px; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }
  .lp-table tr.hot td:first-child { font-weight: 700; }
  .lp-n { display: inline-block; min-width: 26px; padding: 2px 9px; border-radius: 999px; font: 700 12.5px var(--sans); text-align: center; background: var(--surface-2); color: var(--muted); }
  .lp-n.a { background: var(--accent-soft); color: var(--accent); }
  .lp-n.b { background: var(--danger-soft); color: var(--danger); }
  .lp-diff { background: #fff4e0; color: #7a5210; border-radius: 8px; padding: 2px 6px; }
  :root[data-theme="dark"] .lp-diff { background: #3a2f1c; color: #f0c98a; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lp-diff { background: #3a2f1c; color: #f0c98a; } }

  .lp-an-wrap { margin-top: 110px; }
  .lp-an-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; margin-top: 40px; }
  .lp-an-h { display: flex; justify-content: space-between; font: 600 14px var(--sans); color: var(--text); margin: 0 0 14px; }
  .lp-an-h span { color: var(--muted); font-weight: 500; }

  .lp-about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 18px; }
  .lp-about-cols p { margin: 0; font-size: 17px; line-height: 1.65; color: var(--text-dim); }
  .lp-faq { margin-top: 36px; }
  .lp-q h3 { font: 300 24px var(--display); letter-spacing: -0.01em; }

  .lp-cta { margin-top: 110px; position: relative; overflow: hidden; border: 0; border-radius: 36px; padding: 56px;
    display: grid; grid-template-columns: 1fr minmax(0, 440px); gap: 56px; align-items: start; box-shadow: var(--shadow-3); }
  .lp-cta::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--iris); }
  .lp-cta h2 { font-size: clamp(34px, 3.8vw, 52px); line-height: 1.05; margin: 0 0 16px; }
  .lp-cta p { font-size: 17px; line-height: 1.6; max-width: 30em; }
  .lp-price { margin-top: 22px; display: flex; align-items: baseline; gap: 12px; color: var(--muted); }
  .lp-price b { font: 300 40px var(--display); color: var(--text); letter-spacing: -0.02em; }
  .lp-form { display: grid; gap: 12px; }
  .lp-form textarea, .lp-form input { background: var(--bg); }
  .lp-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .lp-form .btn { justify-self: start; padding: 15px 30px; font-size: 15.5px; }
  .lp-form small { color: var(--muted); font-size: 12.5px; }
  .lp-form .err:empty { display: none; }
  .lp-cta .lead-done h3 { font: 300 30px var(--display); }

  .lp-foot { margin-top: 90px; border-top: 1px solid var(--border); padding: 34px 0 10px; justify-content: flex-start; gap: 28px; flex-wrap: wrap; }
  .lp-foot a { color: var(--muted); text-decoration: none; }
  .lp-foot a:hover { color: var(--text); }
  .lp-foot-r { margin-left: auto; }

  @media (max-width: 1100px) {
    .site-nav { gap: 18px; }
    .site-nav a { font-size: 14px; }
  }
  @media (max-width: 960px) {
    .site-nav { display: none; }
    .lp-line { grid-template-columns: 1fr; gap: 26px; }
    .lp-line::before { left: 24px; right: auto; top: 24px; bottom: 24px; width: 2px; height: auto; }
    .lp-split, .lp-an-grid, .lp-about-cols { grid-template-columns: 1fr; gap: 28px; }
    .lp-split.rev .lp-txt { order: 0; }
    .lp-cta { grid-template-columns: 1fr; padding: 34px 24px; gap: 28px; }
    .lp-section, .lp-an-wrap, .lp-cta { margin-top: 0; }
    .lp-section { padding-top: 76px; }
    .lp-cta { margin-top: 76px; }
    #lp-features > .lp-split + .lp-split, .lp-an-wrap { margin-top: 76px; }
  }
  @media (max-width: 560px) {
    .lp-form-row { grid-template-columns: 1fr; }
    .lp-panel { padding: 16px; border-radius: 22px; }
    .lp-table { font-size: 13px; }
    .lp-table th, .lp-table td { padding-left: 6px; padding-right: 6px; }
    .lp-band { gap: 10px 22px; font-size: 14px; }
    .lp-foot-r { margin-left: 0; }
    .loc-header h1, .org-head h1, .page-head h1 { font-size: 30px; }
  }

  /* Приветствие в кабинете — светлая карточка с радужной кромкой вместо тёмной плашки */
  .dash-hero { position: relative; overflow: hidden; color: var(--text); background: var(--surface);
    box-shadow: var(--shadow-2); border-radius: 26px; }
  .dash-hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--iris); }
  .dash-hero h1 { color: var(--text); }
  .cabinet .dash-hero .sub, .dash-date, .dash-hero-note, .dash-hero-neg { color: var(--text-dim); }
  .dash-hero-neg .nw { color: var(--danger); font-weight: 700; }
  .dash-cta { font: 600 15px var(--sans); border: 0; border-radius: 999px; padding: 13px 22px; }
  .dash-cta:focus-visible { outline-color: var(--accent); }

  /* Ловушка для ботов в форме на главной — человеку не видна */
  .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

  /* ==========================================================================
     11a, доработка 28.10.2026: главная — точно по макету 11a8, разделы меню —
     отдельные страницы, кабинет — по макету 11a3 (точки слева, отзывы
     посередине, ответ справа), лёгкий рисунок на фоне.
     ========================================================================== */

  /* Фон: не пустой белый — мягкие отсветы каймы и еле видная гряда облаков внизу окна */
  body {
    background:
      url("bg-clouds.svg") center bottom / 100% auto no-repeat fixed,
      radial-gradient(900px 520px at 8% -6%, color-mix(in srgb, var(--mint) 20%, transparent), transparent 70%) fixed,
      radial-gradient(760px 480px at 100% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%) fixed,
      radial-gradient(820px 560px at 70% 108%, color-mix(in srgb, var(--rose) 16%, transparent), transparent 70%) fixed,
      var(--bg);
  }
  .topbar { background: var(--iris) top / 100% 3px no-repeat, color-mix(in srgb, var(--bg) 72%, transparent); }
  aside { background: transparent; }

  .btn-l { padding: 16px 30px; font-size: 16px; }
  .btn-s { padding: 9px 18px; font-size: 14px; min-height: 0; }
  .lnk { font: 500 16px var(--sans); color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border-firm); padding-bottom: 3px; }
  .lnk:hover { border-color: var(--accent); color: var(--accent); }

  /* --- Шапка: меню на телефоне за кнопкой --------------------------------- */
  .site-menu-btn { display: none; }
  @media (max-width: 960px) {
    .site-menu-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px;
      border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 600 14px var(--sans); cursor: pointer; }
    .site-menu-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
    .site-nav.open { display: flex; position: absolute; top: calc(100% + 6px); left: 12px; right: 12px; z-index: 70; flex-direction: column;
      align-items: stretch; gap: 0; margin: 0; padding: 8px; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-3); }
    .site-nav.open a { padding: 12px 14px; border-radius: 12px; font-size: 16px; }
    .site-nav.open a.on { background: var(--accent-soft); }
    .site-nav.open a.on::after { display: none; }
  }

  /* --- Главная: первый экран — прежняя живая сцена, текст по 11a8 ---------- */
  .home { max-width: 1180px; }
  .hx { min-height: 640px; }
  .hx h1 { font-size: clamp(48px, 5.8vw, 82px); margin: 0; }
  .hx .lead { margin: 26px 0 34px; max-width: 28em; font-size: 18px; line-height: 1.65; }
  .hm-acts { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
  .wk-rv.wait::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: var(--iris); pointer-events: none;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }

  /* Полоса источников — во всю ширину окна */
  .lp-band { margin-top: 0; background: var(--surface); box-shadow: 0 0 0 100vmax var(--surface); clip-path: inset(0 -100vmax); border-color: var(--border-soft); }
  .lp-band-note { margin-left: auto; font: 500 12.5px var(--sans); color: var(--muted); }
  .lp-feats > .lp-split + .lp-split { margin-top: 110px; }
  .lp-trend { width: 100%; height: auto; margin-top: 6px; }
  .lp-trend .grid path { stroke: var(--border); }
  .lp-trend .ticks { fill: var(--muted); font: 500 12px var(--sans); }
  .lp-an-note { margin: 14px 0 0; font: 500 13px var(--sans); color: var(--muted); }

  /* --- Страницы сайта ----------------------------------------------------- */
  .lp-page-head { padding: 48px 0 0; max-width: 46em; }
  .lp-page-head h1 { font-family: var(--display); font-weight: 200; letter-spacing: -0.03em; font-size: clamp(44px, 5.4vw, 76px); line-height: 1.02; margin: 0 0 20px; text-wrap: balance; }
  .lp-page-head h1 em { font-style: italic; color: var(--accent); }
  .lp-page-head .lp-sub { font-size: 18px; line-height: 1.65; color: var(--text-dim); }
  .lp-page .lp-first { padding-top: 64px; }
  .lp-h3 { font: 300 30px var(--display); letter-spacing: -0.02em; margin: 0 0 10px; }
  .lp-q p { color: var(--text-dim); line-height: 1.65; }
  .lp-cols { grid-template-columns: 1fr 1fr; gap: 14px 40px; }
  .lp-page-head a, .lp-q a { color: var(--accent); }

  /* --- Кабинет: левая колонка --------------------------------------------- */
  aside .co { padding: 2px 14px 6px; }
  .co-name { font: 200 30px/1.1 var(--display); letter-spacing: -0.01em; color: var(--text); overflow-wrap: anywhere; }
  .co-sub { font: 500 13px var(--sans); color: var(--muted); margin-top: 4px; }
  .pt-list { display: flex; flex-direction: column; gap: 2px; }
  .pt-list .empty { padding: 8px 14px; color: var(--muted); font-size: 13.5px; }
  .pt { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px;
    color: var(--text); text-decoration: none; transition: background var(--ease); }
  .pt:hover { background: color-mix(in srgb, var(--surface) 70%, transparent); }
  .pt.on { background: var(--surface); box-shadow: var(--shadow-2); }
  .pt-t { min-width: 0; }
  .pt b { display: block; font: 600 15px/1.3 var(--sans); overflow-wrap: anywhere; }
  .pt small { display: block; font: 500 12.5px var(--sans); color: var(--muted); }
  .pt .n { flex: none; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--accent-soft); color: var(--accent);
    font: 700 13px/26px var(--sans); text-align: center; }

  /* --- Кабинет: отзывы и ответ -------------------------------------------- */
  .layout:has(.wk) main { padding: 26px 28px 60px; }
  .wk { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 28px; align-items: start; }
  .wk-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
  .wk-head h1 { font: 200 46px/1.05 var(--display); letter-spacing: -0.02em; margin: 0; overflow-wrap: anywhere; }
  .wk-card-link { font: 600 14px var(--sans); color: var(--accent); text-decoration: none; }
  .wk-card-link:hover { text-decoration: underline; }
  .wk-rates { display: flex; flex-wrap: wrap; gap: 12px; margin: 14px 0 6px; }
  .wk-rates:empty { display: none; }
  .wk-rate { display: grid; grid-template-columns: auto auto; column-gap: 10px; align-items: center; background: var(--surface);
    border-radius: 18px; padding: 10px 16px 10px 14px; box-shadow: var(--shadow-2); }
  .wk-rate .src-logo { grid-row: 1 / 3; display: inline-flex; }
  .wk-rate .src-logo::before { width: 28px; height: 28px; }
  .wk-rate b { font: 300 28px/1 var(--display); letter-spacing: -0.01em; }
  .wk-rate b i { font-style: normal; color: var(--star); font-size: 16px; margin-left: 4px; vertical-align: 3px; }
  .wk-rate small { font: 500 12px var(--sans); color: var(--muted); }
  .wk-attn { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 12px 0 14px; padding-top: 12px; border-top: 1px solid var(--border);
    font: 500 13.5px var(--sans); color: var(--muted); }
  .wk-attn:empty { display: none; }
  .wk-attn b { font: 300 24px var(--display); color: var(--text); margin-right: 6px; }
  .wk-attn .a b { color: var(--accent); }
  .wk-attn .b b { color: var(--danger); }
  .wk-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
  .wk-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
  .wk-tabs button { font: 600 13px var(--sans); padding: 8px 15px; min-height: 36px; border-radius: 999px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text-dim); cursor: pointer; }
  .wk-tabs button:hover { color: var(--text); border-color: var(--border-firm); }
  .wk-tabs button.on { background: var(--btn); color: var(--btn-ink); border-color: transparent; }
  .wk-more-in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
  .wk-more-in .chips { margin-top: 0; gap: 6px; }
  .rv-summary:empty { display: none; }
  .wk-list { display: flex; flex-direction: column; gap: 12px; }
  .wk-rv { position: relative; background: var(--surface); border-radius: 4px 20px 20px 20px; padding: 14px 18px; box-shadow: var(--shadow-2);
    cursor: pointer; transition: box-shadow var(--ease); }
  .wk-rv:hover { box-shadow: var(--shadow-3); }
  .wk-rv.done { background: transparent; box-shadow: none; border: 1px solid var(--border); }
  .wk-rv.sel { box-shadow: 0 0 0 2px var(--accent), var(--shadow-3); }
  .wk-rv.wait.sel::after { display: none; }
  .wk-rv .h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font: 600 13px var(--sans); }
  .wk-rv .h > span:first-child { min-width: 0; }
  .wk-rv .st, .wk-where .st { color: var(--star); letter-spacing: 1px; margin-left: 6px; }
  .wk-rv .st.r-low, .wk-where .st.r-low { color: var(--danger); }
  .wk-rv .src { font: 500 12px var(--sans); color: var(--muted); margin-left: 8px; }
  .wk-rv .w { flex: none; font: 700 12.5px var(--sans); color: var(--accent); }
  .wk-rv .q, .wk-rv .d { flex: none; font: 500 12.5px var(--sans); color: var(--muted); }
  .wk-rv p { font-size: 16px; line-height: 1.5; margin: 5px 0 0; }
  .wk-rv p.muted { color: var(--muted); font-size: 14px; }
  .wk-ans { margin-top: 10px; padding: 10px 14px; border-radius: 4px 14px 14px 14px; background: var(--surface-2); color: var(--text-dim); font-size: 14px; line-height: 1.5; }
  .wk-reply { position: sticky; top: calc(var(--topbar-h) + 16px); }
  .wk-reply-in { background: var(--surface); border-radius: 26px; padding: 24px 26px; display: flex; flex-direction: column; gap: 13px; box-shadow: var(--shadow-3); }
  .wk-reply-in h2 { font: 200 32px/1.1 var(--display); letter-spacing: -0.02em; margin: 0; overflow-wrap: anywhere; }
  .wk-lbl { font: 600 11.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
  .wk-where { font: 500 13px var(--sans); color: var(--muted); margin-top: -6px; }
  .wk-where .st { margin: 0 4px 0 0; }
  .wk-where a { color: var(--muted); }
  .wk-reply blockquote { margin: 0; font: 300 italic 17px/1.5 var(--display); color: var(--text-dim); background: var(--surface-2);
    border-radius: 4px 16px 16px 16px; padding: 12px 14px; max-height: 220px; overflow: auto; }
  .wk-reply blockquote.muted { font-style: normal; font-family: var(--sans); font-size: 14px; }
  .wk-reply .reply-editor { margin: 0; padding: 0; border: 0; background: none; display: flex; flex-direction: column; gap: 12px; }
  .wk-reply .reply-editor textarea { min-height: 170px; border-radius: 16px; background: var(--surface-2); font-size: 15.5px; line-height: 1.55; }
  .wk-reply .reply-editor .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .wk-reply .reply-editor button.primary { padding: 13px 26px; font-size: 15px; margin-right: 6px; }
  .wk-reply .reply-editor .actions button:not(.primary) { font-size: 13px; padding: 7px 12px; }
  .wk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -4px; }
  .wk-chips button { font: 600 13px var(--sans); padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2);
    color: var(--text); cursor: pointer; text-align: left; }
  .wk-chips button:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
  .wk-empty p { color: var(--muted); margin: 0; }

  @media (max-width: 1179px) {
    .wk { grid-template-columns: 1fr; }
    .wk-reply { display: none; }
  }
  @media (max-width: 960px) {
    .hx { min-height: 0; }
    .lp-band-note { margin-left: 0; width: 100%; }
    .lp-cols { grid-template-columns: 1fr; }
    .lp-feats > .lp-split + .lp-split { margin-top: 76px; }
  }
  @media (max-width: 760px) {
    .layout:has(.wk) main { padding: 18px 16px 56px; }
    aside .co { padding: 0 2px; }
    .co-name { font-size: 22px; }
    .co-sub { display: none; }
    aside .pt-list { display: none; }
    .wk-head h1 { font-size: 32px; }
    .wk-rv { padding: 12px 14px; }
    .wk-rv .h { flex-wrap: wrap; }
    .acct-cab { display: none; }
  }

  /* Шапка после входа: всё служебное — в меню под аватаром */
  .acct-menu { min-width: 240px; }
  .topbar .search { max-width: 260px; }
  .avatar { cursor: pointer; border: 0; }
  .wk-rv p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

  /* ==========================================================================
     Заголовки — Montserrat (выбран 28.10.2026): тонкое начертание, акцент —
     жирным, без курсива, подчёркивания и цвета.
     ========================================================================== */
  .hx h1, .lp-page-head h1, .lp-h2, .lp-cta h2, .lp-h3, .lp-q h3, .lp-line h3, .lp-line .n, .hx-win header b,
  .wk-head h1, .co-name, .wk-reply-in h2, .wk-rate b, .wk-attn b, .lp-price b, .lp-band b, .modal h2,
  .org-head h1, .loc-header h1, .page-head h1, .dash-hero h1, .admin h1, .reviews-header h2, .kpi-value, .rate-pill b {
    font-weight: 300; letter-spacing: -0.02em;
  }
  .hx h1 em, .lp-h2 em, .lp-cta h2 em, .lp-page-head h1 em {
    font-style: normal; font-weight: 600; color: inherit; text-decoration: none;
  }
  /* «в одном окне» — одной строкой: шире колонка текста, размер по ширине окна */
  @media (min-width: 1101px) { .hx { grid-template-columns: minmax(0, 540px) minmax(0, 1fr); } }
  .hx h1 { font-size: clamp(34px, 4.4vw, 62px); line-height: 1.08; }
  .hx h1 em { white-space: nowrap; }
  .wk-head h1 { font-size: 38px; }
  .co-name { font-size: 25px; }
  .wk-reply-in h2 { font-size: 27px; }
  .lp-page-head h1 { font-size: clamp(36px, 4.4vw, 62px); line-height: 1.08; }
  .lp-h2 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.1; }
  .lp-txt .lp-h2 { font-size: clamp(28px, 2.8vw, 36px); }
  .lp-cta h2 { font-size: clamp(30px, 3.2vw, 44px); line-height: 1.1; }
  .lp-line h3 { font-size: 24px; }
  .lp-h3 { font-size: 26px; }
  .lp-q h3 { font-size: 21px; }
  .wk-reply blockquote { font: 400 15px/1.55 var(--sans); font-style: normal; }

  /* Карточки организаций в кабинете клиента — только на телефоне (на
     компьютере они в левой колонке) */
  @media (min-width: 761px) { .org-cards-phone { display: none; } }

  /* Число точек рядом с заголовком «Точки» в левой колонке */
  .aside-title .aside-n { margin-left: 4px; color: var(--text-dim); font-weight: 600; letter-spacing: 0; }
  aside .co { padding-bottom: 10px; }

  /* «Точки» — пункт меню слева, раскрывается списком точек того же шрифта */
  .side-nav .pt-toggle .nav-count { margin-left: auto; font: 600 12.5px var(--sans); color: var(--muted); }
  .side-nav .pt-toggle .chev { display: inline-flex; margin-left: auto; transition: transform var(--ease); }
  .side-nav .pt-toggle .nav-count + .chev { margin-left: 6px; }
  .side-nav .pt-toggle .chev svg { width: 16px; height: 16px; }
  .side-nav .pt-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
  .side-nav .pt-list { margin: 2px 0 4px; padding-left: 18px; gap: 2px; }
  .side-nav .pt-list[hidden] { display: none; }
  .pt { padding: 9px 12px; border-radius: 10px; }
  .pt b { font: 600 14.5px/1.35 var(--sans); color: var(--text-dim); }
  .pt:hover b, .pt.on b { color: var(--text); }
  .pt.on { box-shadow: var(--shadow-2); }
  .pt.on b { color: var(--accent); }
  @media (max-width: 760px) { .side-nav .pt-toggle, .side-nav .pt-list { display: none; } }

  /* Пункт «Точки» — в рамке: он раскрывает список, а не открывает страницу */
  .side-nav .pt-toggle { border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 55%, transparent); margin-top: 4px; }
  .side-nav .pt-toggle:hover { border-color: var(--border-firm); }
  .side-nav .pt-list .empty { padding: 8px 10px; }

  /* Отзывы: без радужной рамки у ждущих ответа, правая колонка шире */
  .wk-rv.wait::after { display: none; }
  .wk { grid-template-columns: minmax(0, 1fr) 580px; }
  @media (max-width: 1179px) { .wk { grid-template-columns: 1fr; } }

/* Фильтр по оценке и давности — всегда на виду, в стиле табов */
.wk-more-in .chip { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); font: 600 13px var(--sans); cursor: pointer; }
.wk-more-in .chip:hover { color: var(--text); border-color: var(--border-firm); }
.wk-more-in .chip.on { background: var(--btn); color: var(--btn-ink); border-color: transparent; }
.wk-more-in .chip .star-ic { display: inline-flex; color: var(--star); }
.wk-more-in .chip .star-ic svg { width: 13px; height: 13px; fill: currentColor; stroke: none; }
.wk-more-in select { height: 32px; padding: 0 30px 0 12px; border-radius: 999px; border: 1px solid var(--border);
  background-color: var(--surface); color: var(--text-dim); font: 600 13px var(--sans); cursor: pointer; }
.wk-more-in .rv-reset { height: 32px; padding: 0 6px; font-size: 13px; }
.wk { grid-template-columns: minmax(0, 1fr) clamp(480px, 40vw, 600px); }
@media (max-width: 1179px) { .wk { grid-template-columns: 1fr; } }

/* Меню точки: длинный адрес вместо названия организации */
.co-name.is-point { font-size: 21px; line-height: 1.2; }

/* Страница «Возможности»: оглавление, карточки функций */
.ft-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.ft-toc a { padding: 7px 14px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-1, none);
  border: 1px solid var(--border); color: var(--text); text-decoration: none; font: 500 14px var(--sans); }
.ft-toc a:hover { border-color: var(--accent); }
.ft { scroll-margin-top: 80px; }
.ft-h { font: 600 15px var(--sans); color: var(--text); margin: 26px 0 0; letter-spacing: 0; }
.ft .lp-dots { margin-top: 12px; line-height: 1.55; }
.ft-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.ft-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 22px 22px 24px; }
.ft-card h3 { font: 600 17px var(--sans); margin: 0 0 8px; letter-spacing: -0.01em; }
.ft-card p { margin: 0; color: var(--text-dim); font-size: 15px; line-height: 1.6; }
.ft-grid + .lp-an-grid { margin-top: 24px; }
.ft code, .art-body code { font: 500 0.92em ui-monospace, SFMono-Regular, Consolas, monospace; background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-radius: 6px; padding: 1px 6px; }
@media (max-width: 980px) { .ft-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .ft-grid { grid-template-columns: 1fr; } }

/* Полезные статьи: список и статья */
.art-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.art-card a { display: flex; flex-direction: column; gap: 10px; height: 100%; box-sizing: border-box; padding: 24px 26px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px; color: var(--text); text-decoration: none;
  transition: border-color var(--ease), transform var(--ease); }
.art-card a:hover { border-color: var(--accent); transform: translateY(-2px); }
.art-card h2 { font: 600 20px/1.3 var(--sans); margin: 0; letter-spacing: -0.01em; }
.art-card p { margin: 0; color: var(--text-dim); font-size: 15px; line-height: 1.55; }
.art-meta { color: var(--muted); font-size: 13.5px; }
.art-card .art-meta { margin-top: auto; }
@media (max-width: 760px) { .art-list { grid-template-columns: 1fr; } }

.art { max-width: 720px; }
.art-back { display: inline-block; margin-top: 36px; color: var(--muted); text-decoration: none; font-size: 14.5px; }
.art-back:hover { color: var(--text); }
.art .lp-page-head { padding-top: 18px; }
.art .lp-page-head h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.12; margin-bottom: 14px; }
.art-body { font-size: 17px; line-height: 1.7; color: var(--text); padding-top: 18px; }
.art-body .art-lead { font-size: 19px; line-height: 1.65; color: var(--text-dim); margin: 0 0 8px; }
.art-body h2 { font: 600 25px/1.25 var(--sans); letter-spacing: -0.02em; margin: 44px 0 12px; }
.art-body h3 { font: 600 19px/1.3 var(--sans); margin: 30px 0 8px; }
.art-body p { margin: 0 0 14px; }
.art-body ul, .art-body ol { margin: 0 0 16px; padding-left: 1.3em; }
.art-body li { margin: 6px 0; }
.art-body li::marker { color: var(--accent); }
.art-body a { color: var(--accent); }
.art-body blockquote { margin: 14px 0; padding: 14px 18px; border-radius: 4px 18px 18px 18px; font-size: 16px; line-height: 1.6; }
.art-body .art-ex { background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); font-style: italic; }
.art-body .art-ans { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  margin-left: 28px; border-radius: 18px 4px 18px 18px; }
.art-body .art-ex + .art-ans { margin-top: -4px; }
@media (max-width: 640px) {
  .art-body { font-size: 16px; }
  .art-body .art-ans { margin-left: 12px; }
}
