/* Стили страниц сайта, кроме главной: вход, «Мои сделки», сделка, профиль,
   документы и ошибки. Шрифты, цвета, кнопки, шапка и подвал — общие
   с главной (frame.css, он стоит перед этим файлом): владелец 12 октября
   попросил переделать эти страницы «под лад оформления главной», и они
   взяли её вид — стеклянные карточки, матовые кнопки, мятные огоньки,
   тонкие заголовки. Фон — серый, как первый экран главной, а не её ночь
   ниже: «главный цвет нашего сайта — серый, так как это первое, что видит
   пользователь» (владелец, 12 октября).

   Одним файлом: правило браузера у сайта не пускает встроенных стилей,
   и дописанный в разметку style="…" браузер молча выбросит — ни ошибки,
   ни пустой страницы, просто съедет отступ.

   Порядок: цвета → основа → кнопки и ярлыки → страницы → раскладка для
   планшета и телефона. Одно правило — одно место: повтор ниже перебил бы
   верхнее, и половина правил не работала бы. */

/* ── цвета ────────────────────────────────────────────────────────── */

/* Поверх цветов главной (frame.css: --night, --text, --mist, --line, --glow…)
   — свои у страниц: стекло карточек, поля, ярлыки состояний. Имена, которые
   уже есть у главной, здесь не переписываются: шапка и подвал общие, и их
   цвет не должен зависеть от того, на какой странице они стоят. */
:root {
  --bg: #4a4b4a;
  --panel: linear-gradient(160deg, rgba(222, 222, 216, 0.075), rgba(222, 222, 216, 0.02));
  /* Сплошной тон под стеклом: им кольцо отделяет сеть от монеты. */
  --panel-solid: #3b3d3d;
  --line-strong: rgba(222, 222, 216, 0.24);
  --line-soft: rgba(222, 222, 216, 0.08);
  --tile: rgba(222, 222, 216, 0.07);
  --tile-blue: rgba(26, 134, 230, 0.14);
  --field: rgba(24, 26, 27, 0.4);
  --soft: #dcdcd7;
  --faint: #a4a6a1;
  --discord: #5865F2;
  --discord-tint: rgba(88, 101, 242, 0.16);
  --discord-soft: #a3abf9;
  --link: #cfe3f2;
  --link-hover: #ffffff;
  --accent: #9ad8b6;
  --accent-tint: rgba(154, 216, 182, 0.12);
  --warn-bg: rgba(232, 194, 122, 0.1);
  --warn: #e8c27a;
  --warn-line: rgba(232, 194, 122, 0.34);
  --red-bg: rgba(241, 150, 150, 0.1);
  --red: #f19696;
  --red-line: rgba(241, 150, 150, 0.34);
  --band-line: rgba(26, 134, 230, 0.4);
  --gutter: 80px;
  /* Тон под матовыми кнопками (frame.css берёт его у места): ночь страниц. */
  --tone: #3a3c3d;
  /* Серые вместо синеватых у главной (frame.css): на сером фоне её
     голубоватый туман читался бы чужим. Шапка и подвал держат свои. */
  --mist: #d3d4cf;
  --dim: #a9aba6;
  --line: rgba(222, 222, 216, 0.16);
  --glass: rgba(222, 222, 216, 0.06);
}

/* ── основа ───────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

/* Шапка у всех страниц одна и стоит всегда (frame.css: position: fixed,
   68 точек). К разделу по ссылке — с запасом на неё, иначе она закрыла бы
   начало раздела. */
html { color-scheme: dark; scroll-padding-top: 96px; }

/* Фон — серый первого экрана главной (#5c5c5a — её --hero-low), к низу
   темнее, к графиту подвала. Подвал прижат книзу. */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 16px;
  line-height: 1.55;
  background: var(--bg) linear-gradient(180deg, #5c5c5a 0, #535453 420px, #474948 60%, #3c3e3f 85%, #343739 100%);
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }

h1, h2, h3 { margin: 0; }
/* Последнее слово абзаца не остаётся на строке одно («…сделки живут» /
   «там.»): браузер переносит строки бережнее. Кто не умеет — как раньше. */
p { margin: 0; text-wrap: pretty; }
li { text-wrap: pretty; }
small { font-size: 13px; }
ol, ul { margin: 0; padding: 0; list-style: none; }
img { display: block; }
hr { width: 100%; height: 1px; margin: 0; border: 0; background: var(--line); }

.mono { font-family: var(--mono); font-weight: 500; letter-spacing: 0; }
.dim { color: var(--mist); }
.faint { color: var(--faint); }

.ico { flex-shrink: 0; }
.i14 { width: 14px; height: 14px; }
.i16 { width: 16px; height: 16px; }
.i17 { width: 17px; height: 17px; }
.i18 { width: 18px; height: 18px; }
.i20 { width: 20px; height: 20px; }
.i22 { width: 22px; height: 22px; }
.i24 { width: 24px; height: 24px; }
.i34 { width: 34px; height: 34px; }

/* Под шапкой: она стоит поверх страницы (position: fixed). */
.page { position: relative; z-index: 1; flex: 1 0 auto; width: 100%; max-width: 1440px; margin: 0 auto; padding-top: 68px; }
/* «Обзор» — во всю ширину, с полем шапки у краёв: график тянется почти
   до левого края, ровно под знак в шапке, а колонка сделок — под кружок
   профиля. Владелец: «график должен быть шире, почти до левого края». */
.page-wide { max-width: none; }

/* Карточка — стекло, как доводы на главной: светлее к левому верху,
   тонкая светлая кромка, размытие того, что под ней. */
.panel {
  background: var(--panel);
  border: 1px solid rgba(222, 222, 216, 0.12);
  border-radius: 24px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.well {
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.copy-buffer { position: fixed; left: -9999px; opacity: 0; }

/* Слова в тумане под подвалом здесь нет (оно только у главной), и низ
   подвала держит свой запас, а не прижимается к краю окна. */
.foot-bottom { padding-bottom: 40px; }

/* ── кнопки ───────────────────────────────────────────────────────── */

/* Сама кнопка — матовая, как на главной (frame.css). Здесь — размеры и то,
   чем кнопки отличаются по делу: главная на экране («blue») — с бегущим
   по краю светом, Discord — своим цветом, «опасная» — красными буквами. */
.btn-sm { height: 44px; padding: 0 18px; border-radius: 10px; font-size: 15px; }
.btn-lg { height: 56px; padding: 0 26px; font-size: 16.5px; }
.btn-xl { height: 60px; padding: 0 30px; font-size: 17px; }
.btn-wide { width: 100%; }
.btn:hover { color: #f4f6f7; }
.btn-blue { --tone: #2f3335; color: #ffffff; }
.btn-discord { border-color: rgba(88, 101, 242, 0.55); background: rgba(88, 101, 242, 0.2); color: #ffffff; }
.btn-discord:hover { border-color: rgba(88, 101, 242, 0.8); background-color: rgba(88, 101, 242, 0.3); color: #ffffff; }
/* Кнопка словом: «Отвязать» рядом с меткой «привязан» — не главное. */
.btn-link { padding: 0; border: 0; background: none; color: var(--link); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn-link:hover { color: var(--link-hover); }
.btn-white { --tone: #d9e3e8; color: #0b141b; }
.btn-white:hover { color: #0b141b; }
.btn-danger { height: 48px; padding: 0 20px; border-color: var(--red-line); color: var(--red); font-size: 15px; }
.btn-danger:hover { border-color: var(--red); color: var(--red); }
.btn-tile { height: 44px; padding: 0 16px; border-radius: 10px; font-size: 14px; }
.btn[disabled] { opacity: 0.6; cursor: default; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.actions-center { justify-content: center; }

.copy {
  height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  color: var(--text);
  font: 600 14px/1 var(--sans);
  cursor: pointer;
  transition: background-color 0.25s, border-color 0.25s;
}
.copy:hover { background-color: rgba(255, 255, 255, 0.11); border-color: rgba(255, 255, 255, 0.24); }
.copy.copied { border-color: var(--accent); color: var(--accent); }

/* ── ярлыки ───────────────────────────────────────────────────────── */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.chip-sm { padding: 4px 10px; font-size: 12px; }
.chip-lg { padding: 6px 14px; font-size: 14.5px; }
.chip-blue { background: var(--tile-blue); border-color: rgba(26, 134, 230, 0.3); color: var(--link); }
.chip-warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.chip-red { background: var(--red-bg); border-color: var(--red-line); color: var(--red); }
.chip-ok { background: var(--accent-tint); border-color: rgba(154, 216, 182, 0.3); color: var(--accent); }
.chip-grey { background: var(--tile); border-color: var(--line); color: var(--mist); }
/* Не сложилась — отменена, отклонена, истекла: своим цветом, не серым ожиданием. */
.chip-end { background: rgba(220, 146, 162, 0.1); border-color: rgba(220, 146, 162, 0.3); color: #dc92a2; }
.chip-line { background: transparent; border-color: rgba(222, 222, 216, 0.22); color: var(--text); font-weight: 500; }
.chip-solid { background: var(--accent); color: #0b141b; }

/* Надпись над заголовком — как над разделами главной: заглавными,
   вразрядку, с чертой впереди. */
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font: var(--w-label) 14px/1 var(--label); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--sage); }
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: 0.7; }

/* Буква в кружке — у второй стороны сделки и в сводке. Буква в шапке
   (меню профиля) — своя, у главной (frame.css). */
.person-row .avatar, .avatar-lg { width: 44px; height: 44px; border-radius: 12px; }

/* ── разделы страниц ──────────────────────────────────────────────── */

/* Заголовки — тонкие и крупные, как на главной. */
.head h1 { font: var(--w-h) calc(clamp(36px, 3.6vw, 54px) * var(--k-h))/1.1 var(--serif); letter-spacing: var(--track-h); }
.sec-lead { font-size: 17px; line-height: 1.55; color: var(--mist); }
.lead { font-size: 19px; line-height: 1.55; color: var(--mist); max-width: 580px; }
.head { padding: 64px var(--gutter) 0; display: flex; flex-direction: column; gap: 12px; }
.head-row { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 40px; }
.head-row > div { display: flex; flex-direction: column; gap: 12px; }

.tile-ico {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(222, 222, 216, 0.14);
  background: rgba(222, 222, 216, 0.06);
  color: var(--mist);
}
.tile-ico-lg { width: 56px; height: 56px; border-radius: 16px; }

.ring { position: absolute; border-radius: 50%; pointer-events: none; }

/* ── значок монеты ───────────────────────────────────────────────── */

/* Значок монеты (`parts/coin.html`): круг владельца, а сеть, если монета
   живёт в чужой, — поверх, в правом нижнем углу, отделённая кольцом цвета
   фона (`--ring`). Тонкое светлое кольцо по краю — у всех: иначе тёмные
   (Solana, BNB) сливались бы с тёмной страницей и не читались монетой. */
.coin-ico { position: relative; display: inline-flex; flex-shrink: 0; width: 40px; height: 40px; --ring: var(--panel-solid); }
.coin-ico > img { display: block; width: 100%; height: 100%; border-radius: 50%; }
.coin-ico::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); pointer-events: none; }
.coin-ico > .coin-net { position: absolute; z-index: 1; right: -8%; bottom: -8%; width: 46%; height: 46%; box-shadow: 0 0 0 2px var(--ring); }
.coin-ico-sm { width: 22px; height: 22px; }
.coin-ico-sm > .coin-net { box-shadow: 0 0 0 1.5px var(--ring); }

/* ── вход, ошибки — по центру ─────────────────────────────────────── */

.page-center { display: flex; }
.center {
  position: relative;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  overflow: hidden;
}
.ring-center-a { left: 50%; top: 50%; width: 760px; height: 760px; border: 1px solid var(--line-soft); transform: translate(-50%, -50%); }
.ring-center-b { left: 50%; top: 50%; width: 620px; height: 620px; border: 1px dashed var(--line); transform: translate(-50%, -50%); }
.center-card {
  position: relative;
  width: 540px;
  max-width: 100%;
  padding: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  background: var(--panel);
  border: 1px solid rgba(222, 222, 216, 0.12);
  border-radius: 28px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.center-plain { background: transparent; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.center-card h1 { margin-top: 6px; font: var(--w-h) calc(36px * var(--k-h))/1.15 var(--serif); letter-spacing: var(--track-h); }
/* Короткий текст по центру — строками ровной длины: иначе выходило
   «…нажали «Это не» / «я».» с одним словом внизу. */
.center-card .lead { font-size: 17px; text-wrap: balance; }
/* Значок над заголовком — стеклянная плитка с мятным знаком, как огоньки
   главной. */
.big-ico { width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; border-radius: 22px; border: 1px solid rgba(222, 222, 216, 0.16); background: linear-gradient(160deg, rgba(222, 222, 216, 0.1), rgba(222, 222, 216, 0.03)); color: rgb(var(--glow)); }
.big-ico-warn { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn); }
.big-ico-discord { border-color: rgba(88, 101, 242, 0.4); background: var(--discord-tint); color: var(--discord-soft); }
/* ── вход, запись, сброс — две половины ───────────────────────────── */

/* Форма и тёмная панель с предметами (home/login-scene.js) рядом, ростом
   в экран под шапкой. На входе форма слева, на записи и сбросе — справа
   (data-side): ссылки между ними меняют половины местами без перезагрузки
   (auth.js). Обе половины стоят в одной строке сетки и меняют только
   столбец: скрипт меряет место до и после и ведёт половину между ними. */
.page-auth { display: flex; }
.auth { flex-grow: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: calc(100svh - 68px); }
.auth-form, .auth-scene { grid-row: 1; }
.auth-form { grid-column: 1; position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; padding: 24px 32px; }
/* Панель едет поверх формы: форма проходит под ней, и подмена не видна.
   Рамка — та же, что у карточек кабинета (раздел «кабинет»). */
/* Ростом панель — в экран под шапкой, на любой странице одинаково, а не
   по форме: у записи форма выше, чем у входа, и панель росла вместе с ней
   (владелец, 13 октября: «рамка слева становится больше при регистрации»).
   Размер — 0,79 от половины страницы по обеим сторонам (--k). Во всю
   половину она была вдвое больше формы рядом («где-то 65% от текущего»),
   0,65 вышло мелко («нужно побольше чтобы был, не сильно»), 0,75 — тоже
   («на 5% примерно больше»). Стоит посередине своей половины и своей
   высоты первого экрана.
   Панель — часть страницы, как форма: листается вместе с ней и подвалом.
   Прилипание (sticky) тянуло её за ползунком, прибитая к окну (fixed)
   стояла, пока подвал наезжал на неё снизу; владелец, 13 октября: «должно
   двигаться как форма… оставаться на месте сверху». Ширина — от своей
   половины сетки: страница и так не шире 1440 точек (.page). */
.auth-scene { --k: 0.79; grid-column: 2; position: relative; z-index: 2; justify-self: center; align-self: start;
  width: calc((100% - 32px) * var(--k)); height: calc((100svh - 100px) * var(--k));
  margin-top: calc(16px + (100svh - 100px) * (1 - var(--k)) / 2);
  border: 1px solid var(--line); border-radius: 14px;
  background: radial-gradient(ellipse 62% 44% at 50% 46%, rgba(63, 155, 232, 0.16), transparent 72%), linear-gradient(180deg, #1c2125, #0d1012);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4); }
.auth[data-side="right"] .auth-form { grid-column: 2; }
.auth[data-side="right"] .auth-scene { grid-column: 1; }
.auth-card { width: 440px; padding: 0; gap: 12px; }
/* Форма теснее карточек по центру: вход и запись обязаны влезать в экран
   ноутбука (900 точек) целиком, вместе с окошком Cloudflare. */
.auth-card .big-ico { width: 52px; height: 52px; border-radius: 16px; }
.auth-card .big-ico svg { width: 26px; height: 26px; }
.auth-card h1 { margin-top: 2px; font-size: calc(30px * var(--k-h)); }
.auth-card .lead { font-size: 15.5px; line-height: 1.5; }
.auth-card .login-form { gap: 8px; }
.auth-card .field-label { margin-top: 2px; font-size: 13.5px; }
.auth-card .field-input { padding: 10px 14px; border-radius: 12px; }
.auth-card .field-hint, .auth-card .field-error { font-size: 13px; line-height: 1.4; }
/* Окошко Cloudflare — не поле, а отдельный шаг: вплотную под паролем оно
   читалось его частью (владелец, 13 октября: «чуть увеличить отступ…
   от верхнего поля»). */
.auth-card .login-form .cf-turnstile { margin-top: 8px; }
.auth-card .btn-lg { height: 48px; }
.auth-card .account-form .btn-wide { margin-top: 4px; }
.auth-card .login-links { gap: 2px; margin-top: 0; }
/* «Ещё нет записи?» стоит под кнопкой Телеграма, и общего шага формы
   (8 точек) мало: строка липла к кнопке — владелец, 14 октября, «нужно
   сделать отступ». Правило ниже обнулившего отступ у ссылок — иначе
   оно перебило бы. */
.auth-card .login-signup { margin-top: 14px; }
.auth-card .consent { font-size: 13px; line-height: 1.45; }
/* Холст предметов проявляется на пустой панели, как стекло на первом экране
   главной. Плоский знак — только запасной: без видеокарты (`gl-no` ставит
   скрипт) или когда скрипт так и не пришёл (знак проступает сам через три
   секунды). Стоял он с первого кадра и гас, когда готовы предметы, —
   и при каждом обновлении страницы сперва мелькал знак, потом предметы.
   Владелец, 13 октября: «сначала появляется наш обычный логотип… а уже
   после 3д предметы. Нужно починить». Собирать сцену для видеокарты
   приходится при каждом открытии — файлы при этом берутся из кэша. */
.auth-scene-gl { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.6s ease; }
.auth-scene-mark { position: absolute; left: 50%; top: 50%; width: 128px; height: 128px; transform: translate(-50%, -50%);
  opacity: 0; transition: opacity 0.6s ease; animation: scene-mark-late 0.6s ease 3s forwards; }
@keyframes scene-mark-late { to { opacity: 1; } }
.auth-scene.gl-wait .auth-scene-mark, .auth-scene.gl-on .auth-scene-mark { animation: none; }
.auth-scene.gl-no:not(.gl-on) .auth-scene-mark { animation: none; opacity: 1; }
.auth-scene.gl-on .auth-scene-gl { opacity: 1; }
/* Бегущий по краю свет — тот же, что у кнопок первого экрана главной
   (frame.css, .btn-beam), только золотой. Владелец, 13 октября: «такой
   эффект нравится… в оформлении рамок формы и бокового окна с предметами.
   Только цвет не зелёный, а золотистый». Кабинет с тех пор дважды сменил
   цвета (знака, потом чёрный с платиной), а свет остался золотым, как
   просили: он у входа один, и золото в нём перекликается с золотом
   предметов на панели. Своё --glow у этих рамок — светлее золота
   предметов: на тёмном оно терялось. Поле с курсором светится тем же
   золотом, а не цветом кабинета: свет на форме один.
   У кнопок формы — тот же .btn-beam, у панели — свой: дуга уже, ход
   медленнее (рамка большая, и дуга кнопки легла бы на треть её), и
   кольцо выше холста — иначе предметы закрыли бы свет. Поле, в котором
   пишут, светится тем же светом — только пока в нём курсор: семь бегущих
   огоньков разом рябили бы, а один показывает, где ты. */
.auth-card .btn-beam, .scene-beam, .auth-card .field-input { --glow: 236, 204, 140; }
.scene-beam { position: absolute; inset: -1px; z-index: 1; border-radius: inherit; pointer-events: none; }
.scene-beam::before, .scene-beam::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: conic-gradient(from var(--beam), transparent 0deg 318deg, rgba(var(--glow), 0.35) 328deg, rgb(var(--glow)) 336deg, rgba(var(--glow), 0.35) 344deg, transparent 354deg);
  -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);
  animation: beam 24s linear -6s infinite; }
.scene-beam::after { inset: -3px; padding: 4px; filter: blur(5px); opacity: 0.8; }
.auth-card .login-or + .btn-beam { --beam-at: -4s; }
.auth-card .btn-beam + .btn-beam { --beam-at: -12.5s; }
.cab .auth-card .field-input:focus { border-color: transparent;
  background: linear-gradient(var(--field), var(--field)) padding-box, linear-gradient(var(--ground), var(--ground)) padding-box,
    conic-gradient(from var(--beam), transparent 0deg 250deg, rgba(var(--glow), 0.35) 290deg, rgb(var(--glow)) 315deg, rgba(var(--glow), 0.35) 340deg, transparent 360deg) border-box,
    linear-gradient(rgba(var(--glow), 0.4), rgba(var(--glow), 0.4)) border-box;
  box-shadow: 0 0 0 3px rgba(var(--glow), 0.1);
  animation: beam 8s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  .scene-beam::before, .scene-beam::after, .cab .auth-card .field-input:focus { animation: none; --beam: 315deg; }
}

/* Телефон: предметы — полосой над формой, форма под ними во всю ширину. */
@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; min-height: 0; }
  .auth[data-side] .auth-scene { grid-column: 1; grid-row: 1; justify-self: stretch; width: auto; height: 200px; margin: 12px 16px 0; }
  .auth[data-side] .auth-form { grid-column: 1; grid-row: 2; padding: 28px 16px 40px; }
  .auth-scene-mark { width: 96px; height: 96px; }
}

/* Персонаж на своих местах: «такой страницы нет», ожидание входа, пустые
   «Мои сделки». У картинки прозрачные поля по краям, отсюда отрицательные
   отступы: на глаз персонаж встаёт по краю текста, а не по краю картинки. */
.mascot { display: block; width: 168px; height: 168px; margin: -10px 0 -6px; }
.mascot-start { width: 136px; height: 136px; margin: -10px 0 -6px -10px; }
.error-code { font: 300 112px/1 var(--serif); letter-spacing: -0.03em; color: transparent; -webkit-text-stroke: 1px rgba(222, 222, 216, 0.45); }
.consent { max-width: 400px; font-size: 14px; line-height: 1.5; color: var(--faint); }
.facts {
  align-self: stretch;
  margin-top: 10px;
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
  line-height: 1.5;
  color: var(--soft);
}
.facts li { display: flex; align-items: flex-start; gap: 10px; }
.facts .ico { margin-top: 2px; color: rgb(var(--glow)); }
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--warn-line); background: var(--warn-bg); color: var(--warn); font-size: 15px; line-height: 1.45; text-align: left; }
/* Спрятанное прячется, хоть у записки и свой вид: иначе «дождитесь
   проверки» стояло бы на странице всегда. */
.alert[hidden] { display: none; }
/* Вход: поля, окошко Cloudflare и кнопки — одной формой, во всю ширину.
   Окошко рисует Cloudflare; место под ним держим заранее, чтобы кнопки
   не прыгали, когда оно появится. */
.login-form { align-self: stretch; display: flex; flex-direction: column; gap: 12px; }
.login-form .cf-turnstile { min-height: 65px; }
.login-note { margin-top: -2px; font-size: 13px; line-height: 1.45; color: var(--faint); }
/* Телеграм и Discord — под входом по почте, через «или», запасными. */
/* Строчки под кнопками — по центру, как кнопки над ними: поля формы входа
   читаются слева, а подписи к кнопкам — нет. */
.account-form .login-note { text-align: center; }
.login-or { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--faint); }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
/* Формы записей по почте: поля читаются слева направо, хоть карточка
   и стоит по центру. Отступ над подписью отделяет поле от подсказки
   над ним. */
.account-form { text-align: left; }
.account-form .field-label { margin-top: 4px; }
.account-form .btn-wide { margin-top: 6px; }
.account-again { align-self: center; }
.account-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; font-size: 14px; }
.login-links { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 2px; font-size: 14px; text-align: center; }
.login-form .consent { max-width: none; margin: 0; text-align: center; }
/* Письма — только в окне на вкладке «Сайт»: какими их получит человек.
   Цвета — самого письма, светлого (`mail.как_html`), а не тёмного сайта:
   окно показывает письмо, а не страницу. */
.letters { width: 640px; max-width: 100%; margin: 0 auto; padding: 40px 16px; display: flex; flex-direction: column; gap: 32px; }
.letter { display: flex; flex-direction: column; gap: 10px; }
.letter-subject { font-size: 14px; font-weight: 600; color: var(--soft); }
.letter-card { overflow: hidden; background: #FFFFFF; border: 1px solid #E1E6EE; border-radius: 18px; color: #0F172A; }
.letter-head { padding: 18px 28px; display: flex; align-items: center; gap: 12px; background: #0A0E14; border-bottom: 3px solid #8FD63A; color: #FFFFFF; font-size: 18px; }
.letter-head img { border-radius: 50%; }
.letter-body { padding: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.letter-pill { padding: 6px 12px; border-radius: 999px; background: #EAF2FF; color: #1F56C2; font-size: 13px; font-weight: 600; }
.letter-title { font-size: 22px; line-height: 1.3; color: #0F172A; }
.letter-lead { font-size: 16px; line-height: 1.6; color: #334155; }
.letter-code { align-self: stretch; padding: 18px 12px; border: 1px solid #DCE3EC; border-radius: 14px; background: #F2F5F9; text-align: center; font: 700 34px/1 var(--mono); letter-spacing: 10px; color: #0F172A; }
.letter-note, .letter-fallback { font-size: 14px; line-height: 1.6; color: #64748B; }
.letter-fallback span { color: #3B6FD8; overflow-wrap: anywhere; }
.letter-button { padding: 14px 28px; border-radius: 12px; background: #1F6FE5; color: #FFFFFF; font-weight: 600; }
.letter-footer { text-align: center; font-size: 13px; line-height: 1.6; color: var(--mist); }
/* Ждём «Войти» в боте: «обновить» — для тех, у кого нет скрипта.
   Строки «Ждём, когда вы нажмёте…» с огоньком нет (владелец, 14 октября:
   «нужно эту надпись убрать»), QR-кода тоже (12 октября). */
.login-again { font-size: 14px; color: var(--link); }

/* ── мои сделки ───────────────────────────────────────────────────── */

/* Поиск, отборы и одна таблица — владелец выбрал по наброску (13 октября).
   Числа живут на «Обзоре», здесь только сделки. */
.dl { padding: 28px var(--gutter) 96px; display: flex; flex-direction: column; gap: 16px; }
.dl-search { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.dl-field { flex: 0 1 520px; min-width: 0; height: 46px; padding: 0 18px 0 5px; display: flex; align-items: center; gap: 2px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--field); transition: border-color 0.2s, box-shadow 0.2s; }
.dl-field:focus-within { border-color: rgba(63, 155, 232, 0.6); box-shadow: 0 0 0 3px rgba(63, 155, 232, 0.12); }
.dl-go { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--mist); cursor: pointer; }
.dl-go:hover, .dl-go:focus-visible { color: var(--text); }
.dl-field input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--text); font: 400 15.5px/1 var(--serif); outline: none; }
.dl-field input::placeholder { color: var(--faint); }
.dl-clear { font-size: 14px; color: var(--link); }

.dl-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.dl-filter { height: 36px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; color: var(--soft); white-space: nowrap; transition: border-color 0.2s, color 0.2s, background 0.2s; }
.dl-filter:hover { border-color: var(--line-strong); color: var(--text); }
.dl-filter b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.dl-filter.on { border-color: rgba(63, 155, 232, 0.6); background: rgba(63, 155, 232, 0.18); color: var(--text); }
/* Ход за вами и спор — своим цветом, пока они есть: ноль не зовёт. */
.dl-filter-turn b { color: var(--warn); }
.dl-filter-dispute b { color: var(--red); }
.dl-filter .dl-zero { color: var(--faint); }

/* Шапка таблицы и строка делят одни столбцы. Строка — ссылка на сделку
   и «Квитанция» рядом; столбцы ссылки — те же, что у первых шести
   столбцов шапки: ширина ссылки равна их ширине вместе с зазорами,
   а доли fr делят одно и то же место. Поэтому ширины тут — в px и fr,
   без «auto»: тот рос бы по содержимому каждой строки по-своему. */
.dl-table { --dl-cols: 72px minmax(0, 2fr) minmax(0, 1.2fr) 172px 200px 112px; padding: 4px 0; }
.dl-head { padding: 12px 24px; display: grid; grid-template-columns: var(--dl-cols) 84px; gap: 20px; border-bottom: 1px solid var(--line); font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.dl-row { position: relative; padding: 14px 24px; display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 8px 20px; align-items: center; transition: background 0.2s; }
.dl-row + .dl-row { border-top: 1px solid var(--line); }
.dl-row:hover { background: rgba(220, 235, 240, 0.03); }
.dl-link { display: grid; grid-template-columns: var(--dl-cols); gap: 20px; align-items: center; color: var(--text); }
.dl-link:hover { color: var(--text); }
/* Нажимается вся строка, с подсказкой и полями, — а «Квитанция» стоит
   поверх и ведёт к себе. */
.dl-link::after { content: ""; position: absolute; inset: 0; }
.dl-extra { position: relative; z-index: 1; font-size: 13.5px; }
.dl-extra a { color: var(--link); }
.dl-code { font-size: 14.5px; font-weight: 600; color: var(--mint); }
.dl-what, .dl-sum, .dl-date { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dl-what > span { font-size: 15.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-what small, .dl-sum small, .dl-date small { font-size: 12.5px; color: var(--mist); }
.dl-with { font-size: 14.5px; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-sum .mono { font-size: 14px; }
.dl-date { font-size: 14px; color: var(--soft); font-variant-numeric: tabular-nums; }
/* Подсказка — под «Что», вровень с товаром. */
.dl-hint { grid-column: 1 / -1; padding-left: 92px; display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--warn); }
.dl-hint svg { flex: none; }

.dl-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--mist); }
.dl-pages { display: flex; flex-wrap: wrap; gap: 6px; }
.dl-page, .dl-gap { min-width: 36px; height: 36px; padding: 0 8px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--soft); font-variant-numeric: tabular-nums; }
.dl-gap { border-color: transparent; }
a.dl-page:hover { border-color: var(--line-strong); color: var(--text); }
.dl-page.on { border-color: rgba(63, 155, 232, 0.6); background: rgba(63, 155, 232, 0.18); color: var(--text); }
.dl-none { padding: 28px; display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.dl-none p { font-size: 16px; color: var(--soft); }
.dl-none a { font-size: 15px; color: var(--link); }

.empty { padding: 32px var(--gutter) 96px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.empty-card { padding: 40px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.empty-card h2, .empty-how h2 { font: var(--w-h3) 26px/1.2 var(--serif); }
.empty-card p { font-size: 16px; line-height: 1.55; color: var(--mist); }
.empty-how { padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.numbered { display: flex; flex-direction: column; gap: 16px; }
.numbered li { display: flex; gap: 14px; align-items: flex-start; }
.numbered b { display: block; font-size: 16px; }
.numbered li > span:last-child > span { font-size: 15px; line-height: 1.5; color: var(--mist); }
.num { width: 30px; height: 30px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid rgba(154, 216, 182, 0.35); color: var(--mint); font-size: 14px; font-weight: 600; }

/* ── квитанция ────────────────────────────────────────────────────── */

/* Один лист на экран и на бумагу. На экране «вы» и края номера перевода
   со ссылкой (.rc-screen), на бумаге — имя и номер целиком (.rc-paper):
   лист уходит дальше, и номер с него переписывают в обозреватель. */
.rc { padding: 40px var(--gutter) 96px; display: flex; justify-content: center; }
.rc-card { width: min(100%, 760px); padding: 32px 36px 28px; display: flex; flex-direction: column; gap: 18px; }
.rc-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--mist); }
.rc-brand { font: 400 19px/1.2 var(--name); font-synthesis: none; color: var(--text); }
.rc-title { font: var(--w-h3) 30px/1.15 var(--serif); }
.rc-title .mono { color: var(--mint); }
.rc-state { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; font-size: 15px; color: var(--soft); }
.rc-rows { display: flex; flex-direction: column; }
.rc-rows > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.rc-rows dt { font-size: 14.5px; color: var(--mist); }
.rc-rows dd { min-width: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; font-size: 15px; overflow-wrap: anywhere; }
.rc-rows dd.mono { font-size: 14px; }
.rc-rows small { font: 400 13px/1.5 var(--serif); color: var(--mist); }
.rc-rows small a { color: var(--link); }
.rc-paper { display: none; }
.rc-foot { font-size: 13px; line-height: 1.5; color: var(--faint); }
.rc-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Бумага: чёрным по белому, без шапки, подвала и кнопок. Правила —
   с .cab и .panel: вид кабинета стоит в файле последним и перебил бы
   равные по силе. */
@media print {
  @page { margin: 16mm; }
  body.cab { background: #fff; }
  .cab .nav, .cab .foot, .rc-actions, .rc-screen, .rc-state .chip { display: none !important; }
  .cab .page { padding-top: 0; }
  .rc-paper { display: revert; }
  .rc { padding: 0; display: block; }
  .cab .panel.rc-card { width: auto; padding: 0; border: 0; background: none; box-shadow: none; }
  .rc-card, .rc-brand, .rc-title, .rc-title .mono, .rc-rows dd { color: #16181a; }
  .rc-top, .rc-state, .rc-rows dt, .rc-rows small, .rc-foot { color: #5d6468; }
  .rc-rows > div { border-color: #d9dcde; }
  .rc-foot { padding-top: 10px; border-top: 1px solid #d9dcde; }
  .rc-tx { font-size: 12px; }
}

/* ── обзор кабинета ───────────────────────────────────────────────── */

/* Раскладку нарисовал владелец (14 октября): наверху приветствие, «Обзор»
   и строка под ним, справа от них — коротко о себе; ниже рядом график
   и колонка активных сделок, под ними пополам — недавние контакты и блог.
   График и колонка — один ряд сетки и потому одного роста, верх к верху:
   колонка, начинавшаяся у заголовка, стояла выше графика, и владелец
   попросил ровно. Сделок больше, чем высота графика, — график тянется
   вниз вместе с колонкой, а не обрывается. */
.ov { padding: 40px var(--edge) 96px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  grid-template-areas: "head head" "chart side" "low low"; gap: 24px; align-items: stretch; }
.ov-head { grid-area: head; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; }
.ov-title { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ov-head h1 { font: var(--w-h) calc(clamp(36px, 3.6vw, 54px) * var(--k-h))/1.1 var(--serif); letter-spacing: var(--track-h); }
/* «Добро пожаловать, имя» с аватаркой — левее сводки и вровень с ней
   (владелец, 15 октября: обвёл это место; стояло над «Обзором»). Имя
   светится, как на его образце. На телефоне сводка во всю ширину, и
   приветствие встаёт первой строкой страницы, над «Обзором». */
.ov-me { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 16px 28px; flex-wrap: wrap; }
.ov-hello { margin: 0; display: flex; align-items: center; gap: 12px; font: 500 17px/1.3 var(--nav); color: var(--soft); }
.ov-hello b { font-weight: 650; overflow-wrap: anywhere; }
.ov-hello-ava { width: 40px; height: 40px; border-radius: 50%; }
/* Коротко о себе — справа вверху, на месте, обведённом владельцем: четыре
   числа в строку, между ними черта. «Много не надо, коротко». */
.ov-brief { flex: 0 1 auto; min-width: 0; margin: 0; padding: 16px 4px; display: flex; flex-wrap: wrap; }
.ov-brief > div { min-width: 0; padding: 2px 22px; display: flex; flex-direction: column; gap: 7px; }
.ov-brief > div + div { border-left: 1px solid var(--line); }
.ov-brief dt { font: 500 12.5px/1.2 var(--nav); color: var(--faint); white-space: nowrap; }
.ov-brief dd { margin: 0; display: flex; align-items: baseline; gap: 8px; font: 600 22px/1.1 var(--nav); color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ov-brief dd small { font: 500 13px/1 var(--nav); color: var(--mist); }
.ov .chart { grid-area: chart; min-width: 0; }
.ov-side { grid-area: side; min-width: 0; padding: 24px 24px 20px; display: flex; flex-direction: column; }
.ov-sec { display: flex; flex-direction: column; gap: 6px; }
.ov-sec + .ov-sec { margin-top: 16px; padding-top: 18px; border-top: 1px solid var(--line); }
.ov-sec-head { min-height: 28px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ov-sec-head h2 { font: var(--w-h3) 20px/1.2 var(--serif); }
.ov-sec-head a, .ov-more { font-size: 14px; font-weight: 600; color: var(--link); white-space: nowrap; }
.ov-more { padding-top: 4px; }
.ov-count { min-width: 26px; height: 26px; padding: 0 9px; display: inline-grid; place-items: center; border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: var(--soft); font: 600 13px/1 var(--nav); }
.ov-none { padding: 6px 0 4px; font-size: 14.5px; line-height: 1.45; color: var(--mist); }
/* Строка — ссылка на сделку целиком, в две строчки: что и сумма, под ними
   код со ярлыком шага и чей ход (у кончившихся — когда). Подсветка
   под мышкой выходит за край колонки на свой отступ: так она читается
   кнопкой, а слова стоят ровно по краю заголовка. */
.ov-rows { margin: 0 -12px; display: flex; flex-direction: column; }
.ov-row { padding: 10px 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "what sum" "state when"; gap: 5px 14px; align-items: baseline;
  border-radius: 12px; color: var(--text); text-decoration: none; transition: background-color 0.2s; }
.ov-row:hover, .ov-row:focus-visible { background: rgba(255, 255, 255, 0.05); }
.ov-what { grid-area: what; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; }
.ov-sum { grid-area: sum; white-space: nowrap; text-align: right; font-size: 14.5px; }
.ov-state { grid-area: state; min-width: 0; display: flex; align-items: baseline; gap: 10px; font-size: 13px; color: var(--mist); }
.ov-code { flex: none; font-size: 12.5px; color: var(--mint); }
.ov-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-label::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; vertical-align: 1px; border-radius: 50%; background: currentColor; }
.ov-when { grid-area: when; white-space: nowrap; text-align: right; font-size: 13px; color: var(--faint); }
.ov-turn .ov-when { color: var(--warn); font-weight: 600; }

/* Недавние контакты — таблицей по образцу владельца (14 октября): контакт
   с буквой слева от имени, дата последней сделки с ним, сумма всех сделок
   с ним и кнопка окна на месте карандаша образца. Заголовки столбцов —
   ссылки порядка. Строки отдают столбцы сетке таблицы (subgrid): у каждой
   строки своя сетка, и длинное имя в одной сдвигало бы даты соседних. */
.ov-low { grid-area: low; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.ov-people { min-width: 0; padding: 22px 24px 14px; display: flex; flex-direction: column; }
/* Заголовок — по верху поля поиска, а не по его середине: поле выше строки,
   и заголовок посередине читался ниже поиска (владелец, 15 октября,
   провёл черту по верху поля). */
.ov-people-head { margin-bottom: 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.ov-people-head h2 { font: var(--w-h3) 20px/1.2 var(--serif); }
.ov-find { flex: 0 1 300px; min-width: 0; gap: 12px; }
.ov-find .dl-field { flex: 1 1 auto; height: 40px; }
.ctable { margin: 0 -12px; display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr) minmax(0, 1fr) 40px; column-gap: 16px; }
.ctable-head, .crow { grid-column: 1 / -1; padding: 0 12px; display: grid; grid-template-columns: subgrid; align-items: center; }
.ctable-head { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.ctable-col a { display: inline-flex; align-items: center; gap: 6px; font: 500 13px/1.2 var(--nav); color: var(--faint); text-decoration: none; white-space: nowrap; transition: color 0.2s; }
.ctable-col a:hover, .ctable-col a:focus-visible { color: var(--text); }
.ctable-col svg { flex: none; opacity: 0.55; }
.ctable-col[aria-sort="ascending"] a, .ctable-col[aria-sort="descending"] a { color: var(--soft); }
.ctable-col[aria-sort="ascending"] svg, .ctable-col[aria-sort="descending"] svg { opacity: 1; }
.crow { min-height: 64px; padding-top: 10px; padding-bottom: 10px; border-radius: 12px; transition: background-color 0.2s; }
.crow + .crow { box-shadow: 0 -1px 0 var(--line-soft); }
.crow:not(.crow-ghost):hover { background: rgba(255, 255, 255, 0.035); }
.cwho { position: relative; min-width: 0; }
.cwho-link { max-width: 100%; display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.cwho-ava { width: 40px; height: 40px; border-radius: 50%; }
.cwho-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cwho-text b, .cwho-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cwho-text b { font: 600 15px/1.25 var(--nav); }
.cwho-text small { font-size: 12.5px; color: var(--faint); }
.cwho-link:hover b { text-decoration: underline; text-underline-offset: 3px; }
.crow-last { font: 500 14px/1.2 var(--nav); color: var(--mist); white-space: nowrap; }
.crow-sum { font: 600 15px/1.2 var(--nav); white-space: nowrap; font-variant-numeric: tabular-nums; }
.crow-go { justify-self: end; }
.cbtn { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.03); color: var(--mist);
  transition: color 0.2s, border-color 0.2s, background-color 0.2s; }
.cbtn:hover, .cbtn:focus-visible { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.07); color: var(--text); }
/* Окошко покороче — под мышкой у имени и аватарки и при фокусе
   с клавиатуры; на телефоне наведения нет, и его заменяет окно. Само
   окошко мышь не ловит: уведя её на окошко, человек ушёл с имени. */
.ccard { position: absolute; left: 0; top: calc(100% + 8px); z-index: 30; width: 290px; padding: 14px 16px 15px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 16px;
  background: rgb(16, 16, 16); box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6); pointer-events: none;
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity 0.18s, transform 0.18s, visibility 0s 0.18s; }
.cwho-link:focus-visible + .ccard { opacity: 1; visibility: visible; transform: none; transition: opacity 0.18s, transform 0.18s; }
@media (hover: hover) {
  .cwho-link:hover + .ccard { opacity: 1; visibility: visible; transform: none; transition: opacity 0.18s 0.12s, transform 0.18s 0.12s, visibility 0s 0.12s; }
}
.ccard-head { margin-bottom: 10px; padding-bottom: 12px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.ccard-ava { width: 48px; height: 48px; border-radius: 50%; }
.ccard-head div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ccard-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 650 18px/1.2 var(--nav); }
.ccard-head small { font-size: 13px; color: var(--mist); }
.ccard-facts { margin: 0; display: grid; gap: 7px; }
.ccard-facts div { display: flex; justify-content: space-between; gap: 12px; }
.ccard-facts dt { font-size: 13px; color: var(--faint); }
.ccard-facts dd { margin: 0; text-align: right; font: 600 13.5px/1.2 var(--nav); color: var(--text); }
/* Пока контактов нет — заготовки строк вместо людей: таблица стоит
   готовой, без слов «здесь появятся…» (владелец). */
.crow-ghost .cwho { display: flex; align-items: center; gap: 12px; }
.crow-ghost .cwho-ava { background: rgba(255, 255, 255, 0.05); }
.ghost { width: 60%; max-width: 160px; height: 10px; display: block; border-radius: 999px; background: rgba(255, 255, 255, 0.06); }
.ghost-short { width: 56px; }
.ov-people-more { padding: 12px 0 2px; font-size: 14px; color: var(--mist); }

/* Окно человека — посередине, страница под ним темнеет. Размытия под ним
   нет: под окном движется пыль, и размытие пересчитывалось бы каждый кадр. */
.cdlg { width: min(720px, calc(100vw - 32px)); max-width: none; max-height: min(88vh, 920px); margin: auto; padding: 0; overflow: hidden; color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12); border-top-color: rgba(255, 255, 255, 0.22); border-radius: 22px;
  background: linear-gradient(180deg, #1d1d1d, #101010); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 40px 90px rgba(0, 0, 0, 0.7); }
.cdlg::backdrop { background: rgba(0, 0, 0, 0.66); }
.cdlg[open] { animation: cdlg-rise 0.22s ease-out; }
.cdlg[open]::backdrop { animation: cdlg-dim 0.22s ease-out; }
@keyframes cdlg-rise { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
@keyframes cdlg-dim { from { opacity: 0; } }
.cdlg-in { max-height: min(88vh, 920px); padding: 26px 28px 24px; display: flex; flex-direction: column; gap: 18px; overflow-y: auto; overscroll-behavior: contain; }
.cdlg-head { display: flex; align-items: flex-start; gap: 16px; }
.cdlg-ava { width: 64px; height: 64px; border-radius: 50%; }
.cdlg-who { flex: 1 1 auto; min-width: 0; padding-top: 2px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.cdlg-who h2 { max-width: 100%; overflow-wrap: anywhere; font: 650 24px/1.15 var(--nav); }
.cdlg-who p { font-size: 14px; color: var(--mist); }
.cdlg-tg { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: var(--soft); font: 500 13px/1 var(--nav); text-decoration: none; transition: background-color 0.2s, color 0.2s; }
.cdlg-tg:hover, .cdlg-tg:focus-visible { background: rgba(255, 255, 255, 0.11); color: var(--text); }
.cdlg-x { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: rgba(255, 255, 255, 0.04); color: var(--mist); cursor: pointer;
  transition: background-color 0.2s, color 0.2s; }
.cdlg-x:hover, .cdlg-x:focus-visible { background: rgba(255, 255, 255, 0.09); color: var(--text); }
.cdlg-facts { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cdlg-facts > div { min-width: 0; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; border-radius: 14px; background: var(--ground, #0a0a0a); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5); }
.cdlg-facts dt { font: 500 12px/1.2 var(--nav); color: var(--faint); }
.cdlg-facts dd { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; font: 600 17px/1.2 var(--nav); font-variant-numeric: tabular-nums; }
.contact-live { padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: var(--soft); font: 600 11.5px/1 var(--nav); }
.cdlg-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.cdlg-list { padding-top: 4px; font: var(--w-h3) 18px/1.2 var(--serif); }
.cdeals { margin: -8px -10px 0; padding: 0; display: flex; flex-direction: column; list-style: none; }
.cdeals li + li { box-shadow: 0 -1px 0 var(--line-soft); }
.cdeal { padding: 11px 10px; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; grid-template-areas: "code what sum" "code what state"; gap: 4px 14px; align-items: center;
  border-radius: 12px; color: var(--text); text-decoration: none; transition: background-color 0.2s; }
.cdeal:hover, .cdeal:focus-visible { background: rgba(255, 255, 255, 0.045); }
.cdeal-code { grid-area: code; font-size: 13px; color: var(--mint); }
.cdeal-what { grid-area: what; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cdeal-what b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; }
.cdeal-what small { font-size: 12.5px; color: var(--faint); }
.cdeal-sum { grid-area: sum; text-align: right; white-space: nowrap; font: 600 14.5px/1.2 var(--nav); }
.cdeal-state { grid-area: state; display: flex; justify-content: flex-end; align-items: baseline; gap: 10px; white-space: nowrap; font-size: 12.5px; }
.cdeal-state small { color: var(--faint); }

/* Блог — баннер последней записи: картинка во весь баннер, внизу слева
   заголовок, из правого верхнего угла к левому нижнему — мягкое затемнение
   (владелец, 14 октября). Под мышкой картинки сменяют друг друга (`ui.js`)
   и медленно приближаются; без картинок плывёт свет. Весь баннер — ссылка
   на запись (растянутая ссылка заголовка), «Блог» — своя ссылка поверх. */
.ov-blog { position: relative; min-width: 0; min-height: 340px; padding: 0; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; isolation: isolate; }
.ov-blog-pics { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.ov-blog-pics img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.02); transition: opacity 0.9s ease, transform 6s ease-out; }
.ov-blog-pics img.on { opacity: 1; }
.ov-blog::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom left, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 42%, rgba(0, 0, 0, 0.88) 100%); }
.ov-blog-plain .ov-blog-pics::before, .ov-blog-empty .ov-blog-pics::before { content: ""; position: absolute; inset: -25%;
  background: radial-gradient(38% 42% at 64% 34%, rgba(255, 255, 255, 0.1), transparent 70%), radial-gradient(34% 40% at 30% 70%, rgba(255, 255, 255, 0.06), transparent 70%); }
.ov-blog-chip { position: absolute; top: 18px; left: 18px; z-index: 2; height: 34px; padding: 0 13px 0 11px; display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 999px; background: rgba(10, 10, 10, 0.72); color: var(--text); font: 600 13.5px/1 var(--nav); text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s; }
.ov-blog-chip:hover, .ov-blog-chip:focus-visible { border-color: rgba(255, 255, 255, 0.32); background: rgba(10, 10, 10, 0.88); }
.ov-blog-text { max-width: 82%; padding: 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.ov-blog-text time { font: 500 13px/1 var(--nav); color: rgba(255, 255, 255, 0.72); }
.ov-blog-text h2 { color: #ffffff; font: var(--w-h3) clamp(22px, 1.9vw, 30px)/1.15 var(--serif); text-wrap: balance; }
.ov-blog-text p { font-size: 14.5px; line-height: 1.45; color: var(--mist); }
.ov-blog-link { color: inherit; text-decoration: none; }
.ov-blog-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.ov-blog-link:focus-visible { outline: 0; }
.ov-blog-link:focus-visible::after { outline: 2px solid var(--mint); outline-offset: -4px; border-radius: 18px; }
.ov-blog:hover .ov-blog-link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .ov-blog:hover .ov-blog-pics img.on { transform: scale(1.08); }
  .ov-blog-plain:hover .ov-blog-pics::before, .ov-blog-empty:hover .ov-blog-pics::before { animation: ov-blog-drift 7s ease-in-out infinite alternate; }
}
@keyframes ov-blog-drift { to { transform: translate(-8%, 6%) rotate(8deg); } }

/* График — линией: одна растянутая картинка рисует линию, заливку под ней
   и точки; поверх неё двенадцать месяцев сеткой, у каждого своя картинка
   с чертой и точкой, которые проступают при наведении и фокусе, и подсказка.
   Скрипта нет. Слева шкала: самый крупный месяц, его половина и ноль —
   на тех же высотах, что линии сетки в картинке. */
.chart-sec { padding: 20px var(--gutter) 0; }
.chart { padding: 28px 32px 22px; display: flex; flex-direction: column; gap: 26px; }
.chart-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.chart-head h2 { font: var(--w-h3) 26px/1.2 var(--serif); }
.chart-head p { margin-top: 4px; font-size: 14px; color: var(--faint); }
.chart-total { font: var(--w-big) 28px/1.1 var(--serif); white-space: nowrap; }
.lchart { flex: 1; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: minmax(200px, 1fr) auto; grid-template-areas: "scale plot" ". months"; gap: 10px 14px; }
.lchart-scale { grid-area: scale; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; font-size: 12px; line-height: 1; color: var(--faint); font-variant-numeric: tabular-nums; }
.lchart-scale span { transform: translateY(-50%); }
.lchart-scale span:last-child { transform: translateY(50%); }
/* Год без сделок: на шкале один ноль — у самого низа, где линия. */
.lchart-scale span:only-child { margin-top: auto; }
.lchart-plot { grid-area: plot; position: relative; }
.lchart-plot svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: visible; }
.lchart-grid { fill: none; stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 5; }
.lchart-base { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.lchart-stop-top { stop-color: rgb(var(--glow)); stop-opacity: 0.3; }
.lchart-stop-low { stop-color: rgb(var(--glow)); stop-opacity: 0; }
.lchart-area { stroke: none; }
/* Черта и точки — переливом вдоль картинки (`lchart-stroke`); без кабинета
   оба конца перелива — огонёк сайта, то есть ровный цвет. */
.lchart-stroke-a, .lchart-stroke-b { stop-color: rgb(var(--glow)); }
.lchart-line { fill: none; stroke: url(#lchart-stroke); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.lchart-dots { fill: none; stroke: url(#lchart-stroke); stroke-width: 7; stroke-linecap: round; }
.lcols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.lcol { position: relative; outline: none; cursor: default; }
.lcol-guide { fill: none; stroke: rgba(var(--glow), 0.45); stroke-width: 1; stroke-dasharray: 3 4; opacity: 0; }
.lcol-dot { fill: none; stroke: rgb(var(--glow)); stroke-width: 15; stroke-linecap: round; opacity: 0; }
.lcol:hover .lcol-guide, .lcol:focus-visible .lcol-guide, .lcol:hover .lcol-dot, .lcol:focus-visible .lcol-dot { opacity: 1; }
.lcol-tip { position: absolute; bottom: calc(100% + 10px); left: 50%; z-index: 2; transform: translateX(-50%); padding: 7px 11px; border-radius: 10px; background: var(--panel-solid); border: 1px solid var(--line-strong); font-size: 13px; line-height: 1.35; white-space: nowrap; color: var(--text); pointer-events: none; display: none; }
/* Скрытая подсказка — не прозрачная, а убранная: прозрачная всё равно
   раздвигала бы страницу вбок у крайних месяцев на телефоне. */
.lcol:hover .lcol-tip, .lcol:focus-visible .lcol-tip { display: block; }
.lcol:first-child .lcol-tip { left: 0; transform: none; }
.lcol:last-child .lcol-tip { left: auto; right: 0; transform: none; }
.lcol:focus-visible { outline: 1px solid rgba(var(--glow), 0.6); outline-offset: 2px; }
.lmonths { grid-area: months; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.lmonths li { display: flex; flex-direction: column; align-items: center; font-size: 13px; color: var(--mist); }
.lmonths small { font-size: 11px; color: var(--faint); }
.lmonths .lmonth-empty { color: var(--faint); }

/* ── одна сделка ──────────────────────────────────────────────────── */

.deal-head { padding-top: 40px; gap: 16px; }
.back { align-self: flex-start; display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--mist); }
.back:hover { color: var(--text); }
.deal-title { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.deal-receipt { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--link); }
.deal-head .sec-lead { font-size: 16px; }

.deal {
  padding: 32px var(--gutter) 96px;
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  grid-template-areas:
    "steps side"
    "card side"
    "history side";
  grid-template-rows: auto auto 1fr;
  gap: 16px 20px;
  align-items: start;
}
.deal-steps { grid-area: steps; padding: 28px 32px; }
.deal-card { grid-area: card; padding: 32px; display: flex; flex-direction: column; gap: 22px; }
.deal-side { grid-area: side; display: flex; flex-direction: column; gap: 16px; }
.history { grid-area: history; padding: 28px 32px; display: flex; flex-direction: column; gap: 18px; }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.step { display: flex; flex-direction: column; gap: 10px; }
.step-top { display: flex; align-items: center; }
.step-dot {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--faint);
  font-size: 15px;
  font-weight: 600;
}
.step-line { flex-grow: 1; height: 2px; margin: 0 10px; background: var(--line); }
.step b { font-size: 16px; }
.step small { color: var(--faint); }
.step-done .step-dot { border: 0; background: var(--accent); color: #1b1d1e; }
.step-done .step-line { background: var(--accent); }
.step-now .step-dot { border: 2px solid rgb(var(--glow)); background: rgba(154, 216, 182, 0.12); color: var(--mint); box-shadow: 0 0 14px rgba(154, 216, 182, 0.35); }
.step-now small { color: var(--mint); }
.step-next b, .step-stop b { color: var(--mist); }
.steps-warn .step-now .step-dot { border-color: var(--warn); background: var(--warn-bg); color: var(--warn); }
.steps-warn .step-now small { color: var(--warn); }
.steps-red .step-now .step-dot { border-color: var(--red); background: var(--red-bg); color: var(--red); }
.steps-red .step-now small { color: var(--red); }

.card-blue { border-color: rgba(154, 216, 182, 0.4); }
.card-warn { border-color: var(--warn-line); }
.card-red { border-color: var(--red-line); }
.card-head { display: flex; align-items: center; gap: 14px; }
.card-head > div { display: flex; flex-direction: column; gap: 4px; }
.card-head h2 { font: var(--w-h3) 28px/1.2 var(--serif); letter-spacing: -0.01em; }
.card-head p { font-size: 16px; line-height: 1.5; color: var(--mist); }
.card-ico { width: 48px; height: 48px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.card-face { display: block; width: 92px; height: 92px; flex-shrink: 0; margin: -12px 0 -12px -8px; }
.tone-ok { background: var(--accent-tint); color: var(--accent); }
.tone-blue { background: var(--tile-blue); color: var(--link); }
.tone-warn { background: var(--warn-bg); color: var(--warn); }
.tone-red { background: var(--red-bg); color: var(--red); }
.tone-grey { background: var(--tile); color: var(--mist); }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tiles-one { grid-template-columns: minmax(0, 1fr); }
.tile { padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile small { color: var(--faint); }
.tile > small:first-child { font-weight: 600; }
.tile-value { font-size: 26px; font-weight: 500; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.tile-value.mono { font-size: 24px; font-weight: 500; }
.tile-value.tile-empty { font-size: 20px; font-weight: 600; line-height: 36px; color: var(--faint); }
.tile-link { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 16px; }
.tile-link > small:first-child { flex-basis: 100%; }
.tile-link .tile-value { font-size: 17px; }
.tile-link .btn-tile { margin-left: auto; }

.person { display: flex; flex-direction: column; gap: 10px; }
.person-label { font-size: 13px; font-weight: 600; color: var(--faint); }
.person-row { padding: 16px 20px; display: flex; align-items: center; gap: 16px; }
.person-name { display: flex; flex-direction: column; gap: 2px; }
.person-name small { font-size: 14px; color: var(--mist); }
.person-stats { margin-left: auto; display: flex; gap: 28px; }
.person-stats > span { display: flex; flex-direction: column; gap: 2px; }
.person-stats b { font-size: 17px; font-weight: 600; }
.person-stats small { font-size: 12px; color: var(--faint); }

.quote { margin: 0; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.quote small { font-weight: 600; color: var(--faint); }
.quote p { font-size: 18px; line-height: 1.45; font-weight: 600; overflow-wrap: anywhere; }

.pay { display: flex; flex-direction: column; gap: 12px; }
.pay-grid { display: grid; grid-template-columns: minmax(0, 1fr) 168px; gap: 24px; align-items: start; }
.pay-rows { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pay-row { padding: 18px 20px; display: flex; align-items: center; gap: 16px; }
.pay-row > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pay-row small { font-weight: 600; color: var(--faint); }
.pay-sum { font-size: 28px; }
.pay-coin { font-family: var(--sans); font-size: 20px; color: var(--mist); }
.pay-address { font-size: 17px; line-height: 1.4; word-break: break-all; }
.pay-row .copy { margin-left: auto; }
/* QR-код — тёмным по белому, как его читают сканеры кошельков. */
.pay-qr {
  width: 168px;
  height: 168px;
  margin: 0;
  padding: 12px 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  border-radius: 16px;
}
.pay-qr img { width: 124px; height: 124px; }
.pay-qr figcaption { font-size: 12px; font-weight: 600; color: var(--line-strong); }

.bar { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.bar-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.bar-top small { font-weight: 600; color: var(--faint); }
.bar-top .mono { font-size: 20px; }
.bar > small { color: var(--faint); }
.bar progress { width: 100%; height: 10px; border: 0; border-radius: 999px; background: var(--tile); appearance: none; overflow: hidden; }
.bar progress::-webkit-progress-bar { background: var(--tile); border-radius: 999px; }
.bar progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
.bar progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.bar-warn progress::-webkit-progress-value { background: var(--warn); }
.bar-warn progress::-moz-progress-bar { background: var(--warn); }

.split { display: flex; flex-direction: column; gap: 14px; }
.split-shares { display: flex; flex-wrap: wrap; gap: 10px; }
.split .btn-tile { align-self: flex-start; }
.split-view { display: inline-flex; align-items: center; gap: 10px; }
.split-pot { font-size: 14px; line-height: 1.5; color: var(--mist); }

.notes { display: flex; flex-direction: column; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.45; color: var(--soft); }

/* ── кнопки сделки, ответ сайта, «Точно?» ─────────────────────────── */

.deal-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.deal-actions .btn-danger { height: 52px; }
.action-lead { flex-basis: 100%; margin: 6px 0 0; font-size: 15px; line-height: 1.45; color: var(--mist); }
.notice { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border-radius: 14px; font-size: 15px; line-height: 1.45; }
.notice .ico { flex: none; margin-top: 2px; }
.notice-ok { background: var(--accent-tint); color: var(--accent); }
.notice-ok b, .notice-warn b { color: var(--text); }
.notice-warn { background: var(--warn-bg); color: var(--warn); }
.ask-veil { position: fixed; inset: 0; z-index: 50; padding: 16px; display: flex; align-items: center; justify-content: center; background: rgba(5, 8, 12, 0.72); }
.ask { width: min(520px, 100%); padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.ask h2 { margin: 0; font: var(--w-h3) 28px/1.2 var(--serif); }
.ask p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--soft); }

/* ── поля сделки: слова человека и адрес ──────────────────────────── */

.words, .address { display: flex; flex-direction: column; gap: 10px; }
.words .deal-actions, .address .deal-actions { margin-top: 8px; }
.field-label { font-size: 14px; font-weight: 600; color: var(--soft); }
.field-input { width: 100%; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--field); color: var(--text); font: 400 16px/1.5 var(--sans); }
.field-input.mono { font-family: var(--mono); font-size: 15px; }
textarea.field-input { min-height: 132px; resize: vertical; }
.field-input:focus { outline: none; border-color: rgba(154, 216, 182, 0.6); box-shadow: 0 0 0 3px rgba(154, 216, 182, 0.12); }
.field-input[aria-invalid="true"] { border-color: var(--red-line); }
/* Глазок у пароля (parts/password_eye.html) — внутри поля, у правого края.
   Без скрипта его нет: нажатие ничего бы не сделало. Класс `js` ставит
   ui.js. У Edge в поле пароля свой глазок — со скриптом он прячется,
   иначе их стояло бы два; без скрипта остаётся, раз нашего нет. */
.pw-box { position: relative; display: block; }
.pw-eye { display: none; }
.js .pw-box .field-input { padding-right: 48px; }
.js .pw-box .field-input::-ms-reveal { display: none; }
.js .pw-eye { position: absolute; top: 50%; right: 5px; display: grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border: 0; border-radius: 10px; background: transparent; color: var(--faint); cursor: pointer; transform: translateY(-50%);
  transition: color 0.15s ease, background-color 0.15s ease; }
.pw-eye:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.pw-eye:focus-visible { outline: 2px solid rgba(var(--glow), 0.7); outline-offset: -2px; color: var(--text); }
.pw-eye .ico { width: 20px; height: 20px; }
.pw-eye .ico + .ico, .pw-eye.on .ico:first-child { display: none; }
.pw-eye.on .ico + .ico { display: block; }
.field-hint, .field-error { margin: 0; font-size: 14px; line-height: 1.45; color: var(--mist); }
.field-error { color: var(--red); }
.check-addr { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.check-addr small { color: var(--mist); font-size: 13px; }
.check-addr .mono { font-size: 17px; line-height: 1.6; letter-spacing: 0.04em; word-break: break-all; }
.excess { display: flex; flex-direction: column; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.excess h3 { margin: 0; font-size: 19px; }
.excess > p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--soft); }
.deal.deal-form { grid-template-areas: "card side"; grid-template-rows: auto; }
.how-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.45; color: var(--soft); list-style: decimal; }
.how-steps li::marker { color: var(--faint); font-weight: 600; }

/* ── спор: материалы и переписка с гарантом ─────────────────────── */

.proof, .talk { display: flex; flex-direction: column; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.proof h3, .talk h3 { margin: 0; font-size: 17px; }
/* Свои материалы списком, как на рисунке: имя, размер и где файл. */
.proof-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.proof-head > span { font-size: 13px; color: var(--faint); white-space: nowrap; }
.proof-files { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.proof-file { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; }
.proof-file > svg { flex-shrink: 0; color: var(--mist); }
.proof-name { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.proof-name b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.proof-name small { font-size: 12px; color: var(--faint); }
.proof-where { margin-left: auto; font-size: 12px; color: var(--faint); white-space: nowrap; }
.proof-lost { border-color: var(--red-line); }
.proof-lost .proof-where { color: var(--red); }
/* «Приложить» — пунктирная рамка, а в ней обычное поле выбора файлов без
   своей кнопки: нажать можно на всю рамку, выбранное («2 файла») видно
   и без скрипта. Рамку обводит фокус поля внутри неё. По левому краю,
   а не по центру: строку поля браузер по центру не ставит, и она ехала
   вбок от надписи над ней. */
.proof-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px; border: 1.5px dashed var(--line-strong); border-radius: 14px; color: var(--link); cursor: pointer; }
.proof-pick:hover, .proof-pick:focus-within { border-color: var(--link); }
.proof-pick:focus-within { outline: 2px solid var(--link); outline-offset: 2px; }
.proof-pick-top { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.proof-input { max-width: 100%; margin-left: 28px; color: var(--faint); font: 400 13px/1.4 var(--sans); cursor: pointer; }
.proof-input::file-selector-button { display: none; }
.proof-input:focus { outline: none; }
/* Переписка — как в мессенджере: гарант слева и своим цветом, вы справа. */
.talk-lines { display: flex; flex-direction: column; gap: 10px; }
.talk-line { display: flex; flex-direction: column; gap: 4px; max-width: 88%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; }
.talk-line small { color: var(--faint); font-weight: 600; }
.talk-line p { margin: 0; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.talk-arbiter { align-self: flex-start; background: var(--tile-blue); border-color: var(--band-line); }
.talk-arbiter small { color: var(--link); }
.talk-mine { align-self: flex-end; background: var(--field); }

/* ── «Поправить условия»: выбор плательщика и монеты ──────────────── */

.terms-form .amount-input { max-width: 240px; }
.terms-form > .field-label:not(:first-of-type), .terms-form > .choices { margin-top: 10px; }
.choices { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; display: inline-flex; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
/* `> span`, а не любой span: внутри выбора монеты стоит значок, и он
   получил бы рамку и отступы самого выбора. */
.choice > span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--field); color: var(--soft); font-size: 15px; font-weight: 600; cursor: pointer; --ring: var(--panel-solid); }
.choice input:checked + span { border-color: rgba(154, 216, 182, 0.6); background: rgba(154, 216, 182, 0.1); color: var(--text); --ring: #3b3d3d; }
.choice input:focus-visible + span { outline: 2px solid var(--link); outline-offset: 2px; }
.note-line { display: flex; align-items: flex-start; gap: 10px; }
.note-line .ico { margin-top: 1px; color: var(--link); }
.note-line.note-warn { color: var(--warn); }
.note-line.note-warn .ico { color: currentColor; }

.terms { padding: 28px; display: flex; flex-direction: column; gap: 6px; }
.terms h2, .bot-card h2, .history h2, .profile h2 { font-size: 20px; font-weight: 600; }
.terms h2 { margin-bottom: 10px; }
.terms dl { margin: 0; }
.terms-row { padding: 12px 0; display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.terms-row:last-child { border-bottom: 0; }
.terms-row dt { color: var(--mist); }
.terms-row dd { margin: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.terms-row dd small { font-weight: 400; color: var(--faint); }

.bot-card { padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.bot-card p { font-size: 14px; line-height: 1.55; color: var(--mist); }

.timeline { display: flex; flex-direction: column; }
.timeline li { position: relative; display: flex; gap: 16px; padding-bottom: 18px; }
.timeline li:last-child { padding-bottom: 0; }
.tl-dot { position: relative; width: 12px; height: 12px; flex-shrink: 0; margin-top: 5px; border-radius: 50%; background: var(--line-strong); }
.timeline li:not(:last-child) .tl-dot::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 16px;
  width: 2px;
  height: calc(100% + 18px);
  background: var(--line);
}
.timeline li.now .tl-dot { background: rgb(var(--glow)); box-shadow: var(--glow-shadow); }
.tl-text { display: flex; flex-direction: column; gap: 3px; }
.tl-text b { font-size: 16px; font-weight: 600; }
.tl-text small { color: var(--faint); }

/* ── профиль ──────────────────────────────────────────────────────── */

.profile { padding: 32px var(--gutter) 96px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.profile-main, .profile-side { display: flex; flex-direction: column; gap: 16px; }
.profile .panel { padding: 28px 32px; display: flex; flex-direction: column; gap: 12px; }
.profile .panel > p { font-size: 15px; line-height: 1.55; }
.profile form { margin: 0; }
.profile .btn-danger { align-self: flex-start; }
.way { padding: 16px 0; display: flex; align-items: center; gap: 14px; border-top: 1px solid var(--line-soft); }
.way-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.way-text b { font-size: 17px; }
.way-text small { font-size: 14px; color: var(--mist); }
.way .chip { margin-left: auto; }
.tile-ico-discord { background: var(--discord-tint); color: var(--discord-soft); }
.way-do { margin-left: auto; flex-shrink: 0; }
.way .chip + .way-do { margin-left: 4px; }
.way-said { margin-top: -4px; font-size: 14px; line-height: 1.5; color: var(--accent); }
.way-said-bad { color: var(--warn); }
.way-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 16px; }
.profile .faint { font-size: 13px; }
/* «Где вы вошли»: строка на браузер, этот — первым, с ярлыком. */
/* Своя аватарка в профиле: снимок, выбор файла и кнопки одним рядом,
   на узком экране переносятся. */
.photo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 14px; }
.avatar-xl { width: 72px; height: 72px; border-radius: 50%; }
.photo-input { flex: 1 1 200px; min-width: 0; color: var(--faint); font: 400 13px/1.4 var(--sans); }
.photo-input::file-selector-button { margin-right: 12px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.photo-do { display: flex; align-items: center; gap: 16px; }
.devices { display: flex; flex-direction: column; }
.device { padding: 14px 0; display: flex; align-items: center; gap: 14px; border-top: 1px solid var(--line-soft); }
.device .way-text b { font-size: 16px; }
.device .chip, .device .way-do { margin-left: auto; flex-shrink: 0; }
.device-where { font-weight: 400; color: var(--mist); }

/* ── документы ────────────────────────────────────────────────────── */

.doc-head { gap: 12px; }
.doc-lead { max-width: 760px; font-size: 18px; line-height: 1.55; }
.doc { padding: 40px var(--gutter) 96px; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 56px; align-items: start; }
/* Ниже шапки: она тоже держится сверху (20 над ней, 72 она сама и 20
   зазора) и иначе закрывала бы начало оглавления. */
.doc-toc { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 2px; }
.doc-toc-title { padding: 0 12px 10px; font-size: 13px; font-weight: 600; color: var(--mist); }
.doc-toc a { padding: 8px 12px; display: flex; gap: 10px; border-radius: 10px; font-size: 15px; color: var(--mist); }
.doc-toc a:hover { background: var(--panel); color: var(--text); }
.doc-toc a span { width: 20px; flex-shrink: 0; color: var(--faint); }
.doc-body { max-width: 760px; display: flex; flex-direction: column; gap: 36px; }
.doc-part { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 24px; }
.doc-part h2 { display: flex; align-items: baseline; gap: 14px; font: var(--w-h3) 26px/1.25 var(--serif); letter-spacing: -0.01em; }
/* Номер раздела — ростом с заголовок: мелкий читался сноской (владелец,
   23 октября). Оглавление слева — своё правило, номера там прежние. */
.doc-part h2 span { color: var(--accent); }
.doc-part p { font-size: 17px; line-height: 1.7; color: var(--soft); }
.doc-part ul { padding-left: 22px; display: flex; flex-direction: column; gap: 6px; list-style: disc; font-size: 17px; line-height: 1.7; color: var(--soft); }
.doc-part a { color: var(--link); }
.doc-next { padding: 24px 28px; display: flex; align-items: center; gap: 20px; }
.doc-next > div { display: flex; flex-direction: column; gap: 4px; }
.doc-next b { font-size: 18px; }
.doc-next span { font-size: 15px; color: var(--mist); }
.doc-next .btn { margin-left: auto; }

/* ── блог ─────────────────────────────────────────────────────────── */

/* Список записей — карточками по сетке: обложка сверху, дата, заголовок
   и начало текста. Вся карточка — ссылка на запись (растянутая ссылка
   заголовка). Запись — колонкой для чтения, как документ: текст в 840 точек
   (было 660 — Джексон: «слишком много места слева справа»), строка около
   девяноста знаков — шире читать уже трудно. */
.blog-head { gap: 12px; }
.blog-list { padding: 36px var(--gutter) 96px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 24px; }
.blog-card { position: relative; overflow: hidden; display: flex; flex-direction: column; transition: border-color 0.25s, transform 0.25s; }
.blog-cover { width: 100%; aspect-ratio: 16 / 9; display: block; object-fit: cover; }
.blog-cover-none { display: grid; place-items: center; background: radial-gradient(circle at 72% 22%, rgba(255, 255, 255, 0.1), transparent 60%), linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.18)); }
.blog-cover-none img { width: 64px; height: 64px; opacity: 0.55; filter: grayscale(0.3); }
.blog-card-text { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.blog-card time, .blog-post > time { font-size: 14px; color: var(--faint); }
.blog-card h2 { font: var(--w-h3) 22px/1.25 var(--serif); text-wrap: balance; }
.blog-card h2 a { color: var(--text); text-decoration: none; }
.blog-card h2 a::after { content: ""; position: absolute; inset: 0; }
.blog-card p { font-size: 15.5px; line-height: 1.55; color: var(--mist); text-wrap: pretty; }
.blog-card:hover { border-color: var(--line-strong); }
.blog-card:hover h2 a { text-decoration: underline; text-underline-offset: 4px; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .blog-card:hover { transform: translateY(-3px); } }
.blog-none { margin: 36px var(--gutter) 96px; padding: 28px; font-size: 16px; color: var(--mist); }
.blog-post { width: min(1000px, 100%); margin: 0 auto; padding: 56px var(--gutter) 64px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.blog-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--link); text-decoration: none; }
.blog-back:hover { text-decoration: underline; }
.blog-post h1 { font: var(--w-h) calc(clamp(28px, 2.6vw, 40px) * var(--k-h))/1.14 var(--serif); letter-spacing: var(--track-h); text-wrap: balance; }
/* Обложка — над датой и заголовком, во всю колонку. Высокую не тянем
   выше двух третей экрана: заголовок под ней ушёл бы за нижний край,
   и человек, открыв запись, видел бы одну картинку. */
.blog-cover-top { width: 100%; max-height: 66vh; object-fit: cover; display: block; margin: 4px 0 6px; border-radius: 18px; border: 1px solid var(--line); }
.blog-pics { margin: 12px 0 6px; display: grid; gap: 12px; }
.blog-pics img { width: 100%; display: block; border-radius: 18px; border: 1px solid var(--line); }
.blog-pics-many { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.blog-pics-many img { aspect-ratio: 4 / 3; object-fit: cover; }
.blog-pics-many img:first-child { grid-column: 1 / -1; aspect-ratio: auto; }
.blog-body { display: flex; flex-direction: column; gap: 16px; }
/* Опора пузыря и украшения у слова (ниже, «пузыри записи», «украшения
   записи»): они встают в поле от края текста, по высоте — у своей строки.
   Свой слой (`isolation`) — чтобы украшение посередине встало за словами,
   а не за всей страницей. */
.blog-post > .blog-body { position: relative; isolation: isolate; }
.blog-body p, .blog-body ul { font-size: 17.5px; line-height: 1.7; color: var(--soft); text-wrap: pretty; }
.blog-body ul { padding-left: 22px; display: flex; flex-direction: column; gap: 6px; list-style: disc; }
.blog-body a { color: var(--link); }
.blog-body b { color: var(--text); }
/* Подзаголовок принадлежит тексту под ним: сверху далеко, снизу близко
   (Джексон, 17 октября: «Одинаковый отступ у подзаголовков. Непонятно
   к какому относится подзаголовок»). Блоки стоят через `gap`, поэтому
   низ — отрицательным полем: зазор под заголовком — `gap` минус восемь.
   Первый в тексте и заголовок под заголовком сверху не отодвигаются:
   там нечего отделять. */
.blog-body h2 { margin: 34px 0 -8px; font: var(--w-h3) 28px/1.25 var(--serif); color: var(--text); text-wrap: balance; }
.blog-body h3 { margin: 24px 0 -8px; font: var(--w-h3) 22px/1.3 var(--serif); color: var(--text); text-wrap: balance; }
.blog-body > :is(h2, h3):first-child { margin-top: 0; }
.blog-body > :is(h2, h3) + :is(h2, h3) { margin-top: 2px; }
.blog-body blockquote { padding: 4px 0 4px 18px; border-left: 3px solid var(--line-strong); font-size: 17.5px; line-height: 1.7; color: var(--mist); font-style: italic; }
.blog-body code { padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.07); font: 500 0.88em/1.4 var(--mono); color: var(--text); }
.blog-body u { text-underline-offset: 3px; }
.blog-body s { color: var(--mist); }
/* Картинка между абзацами (`blog.тело`). Во всю ширину, а высокий снимок
   с телефона — не выше экрана, посередине: иначе он один занял бы три. */
.blog-body .blog-fig { margin: 6px 0; }
.blog-body .blog-fig img { display: block; max-width: 100%; height: auto; max-height: 80vh; margin: 0 auto; border-radius: 18px; border: 1px solid var(--line); }
/* Спойлер — как в Телеграме: слова под пятнистой завесой, открываются
   наведением, касанием или фокусом. Без скрипта: tabindex у тега. */
.blog-body .spoiler { border-radius: 4px; color: transparent; cursor: pointer;
  background: repeating-radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.34) 0 1px, transparent 1px 3px), rgba(255, 255, 255, 0.1);
  transition: color 0.2s, background-color 0.2s; }
.blog-body .spoiler:hover, .blog-body .spoiler:focus { color: inherit; background: rgba(255, 255, 255, 0.06); outline: 0; }
@media print { .blog-body .spoiler { color: inherit; background: none; } }
/* Галерея (`blog.ГАЛЕРЕЯ`): раскладка — в `gallery.css`, общем с редактором
   управления; здесь только место в тексте записи и отклик под мышкой. */
.blog-body .blog-gallery { margin: 6px 0; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .blog-gtile img { transition: transform 0.5s ease, filter 0.3s; }
  .js .blog-gtile:hover img { transform: scale(1.035); filter: brightness(1.06); }
}
/* Картинку записи открывают во весь экран (`blog.js`): курсор говорит
   об этом заранее, а фокус с клавиатуры виден, как у ссылки. */
.js .blog-zoomable { cursor: zoom-in; }
.js .blog-zoomable:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
.blog-zoom { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; overflow: hidden; background: transparent; color: #ffffff; }
.blog-zoom[open] { display: grid; place-items: center; }
.blog-zoom::backdrop { background: rgba(4, 5, 7, 0.92); }
.blog-zoom-img { max-width: calc(100vw - 32px); max-height: calc(100dvh - 120px); width: auto; height: auto; display: block; object-fit: contain; border-radius: 10px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6); user-select: none; -webkit-user-drag: none; }
.blog-zoom-x, .blog-zoom-go { position: fixed; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 50%; background: rgba(18, 20, 24, 0.72); color: #ffffff; cursor: pointer; transition: background-color 0.2s, border-color 0.2s; }
.blog-zoom-x { top: 16px; right: 16px; width: 48px; height: 48px; }
.blog-zoom-go { top: 50%; width: 54px; height: 54px; margin-top: -27px; }
.blog-zoom-go[hidden], .blog-zoom-count[hidden] { display: none; }
.blog-zoom-prev { left: 18px; }
.blog-zoom-next { right: 18px; }
.blog-zoom-x:hover, .blog-zoom-x:focus-visible, .blog-zoom-go:hover, .blog-zoom-go:focus-visible { background: rgba(40, 44, 52, 0.9); border-color: rgba(255, 255, 255, 0.4); }
.blog-zoom-count { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); font: 500 14px/1 var(--nav); color: rgba(255, 255, 255, 0.72); font-variant-numeric: tabular-nums; }
@media (min-width: 760px) { .blog-zoom-img { max-width: calc(100vw - 200px); max-height: calc(100dvh - 110px); } }
@media (max-width: 759px) {
  .blog-zoom-go { top: auto; bottom: 12px; margin-top: 0; width: 48px; height: 48px; }
  .blog-zoom-count { bottom: 28px; }
}
@media (prefers-reduced-motion: no-preference) {
  .blog-zoom[open] .blog-zoom-img { animation: blog-zoom-in 0.24s ease-out; }
  .blog-zoom[open]::backdrop { animation: cdlg-dim 0.22s ease-out; }
}
@keyframes blog-zoom-in { from { opacity: 0; transform: scale(0.96); } }
html.blog-zoomed { overflow: hidden; }
.blog-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--faint); }
/* «Поделиться», призыв и «Читайте также» — под текстом записи. Ссылка
   «Телеграм» одета как кнопка «Скопировать»: у них одна строка и одно дело. */
.blog-share { margin-top: 18px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.blog-share > span { margin-right: 6px; font: 500 15px/1 var(--nav); color: var(--mist); }
.blog-share a.copy { text-decoration: none; }
/* Карточка тянется по ширине: слова забирают всё место рядом с кнопками
   (рост 999 против единицы у кнопок), а не уместились рядом — кнопки
   встают строкой ниже во всю ширину, каждая поровну, и на телефоне
   по одной в строку. Слова были ограничены 46 знаками, кнопки — своей
   шириной: стоило им уйти вниз, правая половина карточки пустела. */
.blog-cta { margin-top: 18px; padding: 26px 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.blog-cta-text { flex: 999 1 340px; min-width: 0; }
.blog-cta h2 { font: var(--w-h3) 24px/1.2 var(--serif); }
.blog-cta p { margin-top: 6px; font-size: 15.5px; line-height: 1.55; color: var(--mist); text-wrap: pretty; }
.blog-cta-buttons { flex: 1 1 auto; display: flex; flex-wrap: wrap; gap: 12px; }
.blog-cta-buttons .btn { flex: 1 1 auto; }
.blog-more { width: min(1180px, 100%); margin: 0 auto; padding: 0 var(--gutter) 96px; }
.blog-more > h2 { padding: 0 0 4px; font: var(--w-h3) 26px/1.2 var(--serif); }
.blog-more .blog-list { padding: 20px 0 0; }
.blog-card h3 { font: var(--w-h3) 20px/1.25 var(--serif); text-wrap: balance; }
.blog-card h3 a { color: var(--text); text-decoration: none; }
.blog-card h3 a::after { content: ""; position: absolute; inset: 0; }
.blog-card:hover h3 a { text-decoration: underline; text-underline-offset: 4px; }

/* ── пузыри записи ────────────────────────────────────────────────── */

/* Джексон, 16 октября: «слева и справа добавить пузырики, медленно
   плавающие, при нажатии например там может быть какая-то интересная
   информация, факт, или просто скриншоты/фотки». На широком экране —
   два столбика по бокам текста (опора им — `.blog-post`, у него
   `position: relative`); на узком места
   по бокам нет, и пузыри встают рядом под текстом, с надписью. Пузырь —
   стеклянный шар: блик сверху, свет снизу; на шаре — его первая картинка,
   подпись или значок. Цвет света чередуется: идёт, ждём, закрыто
   (`tone-*` ставит сайт: у пузыря в строке текста соседей нет, и счёт
   по месту в ряду там ничего не значит). Свой цвет и яркость света
   задаёт владелец (Джексон, 17 октября: «Нужны настройки цвета и яркости
   свечения»): цвет — `--bub` правилом по адресу, яркость — множитель
   `--gi` у каждой доли света; ноль — шар без света, два — вдвое ярче. */
.blog-bubbles { margin-top: 18px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: flex-start; gap: 18px 20px; }
.blog-bubbles-head { flex: 0 0 100%; font: 500 15px/1 var(--nav); color: var(--mist); }
.blog-bubbles-side { display: contents; }
.blog-bubble { --bub: var(--c-live); --gi: 1; --d: 92px; position: relative; padding: 0; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer;
  display: inline-flex; flex-direction: column; align-items: center; gap: 8px; -webkit-tap-highlight-color: transparent; }
.blog-bubble.size-s { --d: 68px; }
.blog-bubble.size-l { --d: 120px; }
.blog-bubble.tone-1 { --bub: var(--c-wait); }
.blog-bubble.tone-2 { --bub: var(--c-done); }
.blog-bubble-face { position: relative; width: var(--d); height: var(--d); border-radius: 50%; overflow: hidden; display: grid; place-items: center; color: rgb(var(--bub));
  border: 1px solid rgba(var(--bub), calc(0.42 * min(var(--gi), 1.6)));
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.2), transparent 40%),
    radial-gradient(circle at 50% 118%, rgba(var(--bub), calc(0.36 * var(--gi))), transparent 68%),
    linear-gradient(180deg, #1d1d1d, #0d0d0d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -10px 22px -12px rgba(var(--bub), calc(0.55 * var(--gi))),
    0 0 calc(12px + 16px * var(--gi)) -8px rgba(var(--bub), calc(0.5 * var(--gi))), 0 14px 30px -14px rgba(0, 0, 0, 0.9);
  transition: transform 0.35s ease, border-color 0.3s, box-shadow 0.3s; }
.blog-bubble-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Блик поверх снимка: без него картинка на шаре читалась плоской
   наклейкой, а не пузырём. */
.blog-bubble-face.with-pic::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.3), transparent 36%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 -14px 26px -14px rgba(var(--bub), calc(0.7 * var(--gi))); }
.blog-bubble-label { padding: 0 9px; font: 600 max(12px, calc(var(--d) * 0.155))/1.15 var(--nav); color: var(--text); text-align: center; overflow-wrap: anywhere; }
.blog-bubble-tag { max-width: calc(var(--d) + 44px); padding: 4px 10px; border: 1px solid rgba(var(--bub), 0.32); border-radius: 999px; background: rgba(12, 12, 12, 0.86);
  font: 500 12.5px/1.2 var(--nav); color: var(--soft); text-align: center; }
.blog-bubble:hover .blog-bubble-face, .blog-bubble:focus-visible .blog-bubble-face { border-color: rgba(var(--bub), calc(0.8 * min(var(--gi), 1.25)));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -12px 24px -12px rgba(var(--bub), calc(0.7 * var(--gi))),
    0 0 calc(16px + 24px * var(--gi)) -6px rgba(var(--bub), calc(0.7 * var(--gi))), 0 16px 34px -14px rgba(0, 0, 0, 0.9); }
.blog-bubble:focus-visible { outline: 0; }
.blog-bubble:focus-visible .blog-bubble-face { outline: 2px solid rgb(var(--bub)); outline-offset: 3px; }
/* Плывут сами: длительность и путь у соседей разные, иначе ряд качался
   бы строем. Под мышкой шар подрастает — только где есть мышь. */
@media (prefers-reduced-motion: no-preference) {
  .blog-bubble { animation: bubble-float 9s ease-in-out infinite alternate; }
  .blog-bubble.tone-1 { animation-duration: 11s; animation-delay: -4s; }
  .blog-bubble.tone-2 { animation-name: bubble-float-2; animation-duration: 13s; animation-delay: -7s; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .blog-bubble:hover .blog-bubble-face { transform: scale(1.07); }
}
@keyframes bubble-float { 0% { transform: translate(0, 0); } 50% { transform: translate(5px, -12px); } 100% { transform: translate(-4px, 7px); } }
@keyframes bubble-float-2 { 0% { transform: translate(0, 0); } 50% { transform: translate(-6px, -9px); } 100% { transform: translate(4px, 11px); } }
/* Пузырь у слова (`.at`, Джексон, 17 октября: «поставить в определенном
   месте у какого то слова пузырь, просто потянув его»): кнопка стоит
   в самом тексте, на месте метки. На узком экране полей нет, и она
   спрятана — пузырь стоит в ряду под текстом со всеми. */
.blog-bubble.at { display: none; }
@media (min-width: 1240px) {
  .blog-bubbles { display: contents; }
  .blog-bubbles-head { display: none; }
  /* Столбик — посередине поля, а не у самого текста (Джексон, 17 октября:
     «Пузырь слишком близко находится к тексту посередине»). Поле — от края
     текста до края экрана: половина лишнего у записи и её отступ. */
  .blog-bubbles-side { position: absolute; top: 150px; bottom: 320px; width: 160px; display: flex; flex-direction: column; justify-content: space-around; align-items: center; gap: 40px; pointer-events: none; }
  .blog-bubbles-side .blog-bubble { pointer-events: auto; }
  .blog-bubbles-side .blog-bubble.placed { display: none; }
  .blog-bubbles-left { right: calc(100% - var(--gutter) + max(28px, (100vw - 100%) / 4 + var(--gutter) / 2 - 80px)); }
  .blog-bubbles-right { left: calc(100% - var(--gutter) + max(28px, (100vw - 100%) / 4 + var(--gutter) / 2 - 80px)); }
  .blog-bubbles-left .blog-bubble:nth-child(2n), .blog-bubbles-right .blog-bubble:nth-child(2n+1) { align-self: flex-start; }
  .blog-bubbles-left .blog-bubble:nth-child(2n+1), .blog-bubbles-right .blog-bubble:nth-child(2n) { align-self: flex-end; }
  /* У слова: по высоте — строка метки (место кнопки в тексте, `top`
     не задан), шар серединой на середине строки; вбок — в поле, на долю
     `--f` его свободной части (`data-gap`, 0…10 — как поставили мышью
     в управлении). Доля, а не точки: поле у каждого экрана своё, и пузырь,
     поставленный посередине поля у владельца, стоит посередине и у
     человека с другим экраном. Свободное — поле без самого шара, зазора
     у текста и запаса у края экрана (полоса прокрутки, хвост подписи). */
  .blog-bubble.at { --f: 0.4; --free: max(0px, (100vw - 100%) / 2 - var(--d) - 88px);
    display: inline-flex; position: absolute; z-index: 1; margin-top: calc(0.85em - var(--d) / 2); }
  .blog-bubble.at.side-left { right: calc(100% + 24px + var(--f) * var(--free)); }
  .blog-bubble.at.side-right { left: calc(100% + 24px + var(--f) * var(--free)); }
  :is(.blog-bubble.at, .blog-decor)[data-gap="0"] { --f: 0; }
  :is(.blog-bubble.at, .blog-decor)[data-gap="1"] { --f: 0.1; }
  :is(.blog-bubble.at, .blog-decor)[data-gap="2"] { --f: 0.2; }
  :is(.blog-bubble.at, .blog-decor)[data-gap="3"] { --f: 0.3; }
  :is(.blog-bubble.at, .blog-decor)[data-gap="5"] { --f: 0.5; }
  :is(.blog-bubble.at, .blog-decor)[data-gap="6"] { --f: 0.6; }
  :is(.blog-bubble.at, .blog-decor)[data-gap="7"] { --f: 0.7; }
  :is(.blog-bubble.at, .blog-decor)[data-gap="8"] { --f: 0.8; }
  :is(.blog-bubble.at, .blog-decor)[data-gap="9"] { --f: 0.9; }
  :is(.blog-bubble.at, .blog-decor)[data-gap="10"] { --f: 1; }
}
@media (max-width: 760px) {
  .blog-bubble { --d: 76px; }
  .blog-bubble.size-s { --d: 60px; }
  .blog-bubble.size-l { --d: 96px; }
}
/* Окно пузыря — встроенное (`popover`): щелчок мимо и Esc закрывают его
   сами. Крестик — вне листаемой части. Пока окно закрыто, его прячет
   браузер; показывать его стилями можно только открытым.

   Ширина — по тому, что внутри (Джексон, 17 октября: «окошко появившееся
   маленькое, и с огромными краями… если текста нет, практически
   не должно быть краев у фото»; показал рамку примерно 1200 на 650).
   Одни слова — узкое, как письмо. Снимки со словами — широкое (`wide`).
   Одни снимки (`pics`) — окно по снимку, без полей: снимок до 1200
   точек и до высоты экрана, у одного окно садится по нему самому
   (стороны снимка держит браузер — полос сбоку нет), у нескольких
   галерея во всю ширину (`many`).

   Предел снимка — внутренность окна, а не рамка (`--pic`): рамка окна
   1200 точек, и снимку в те же 1200 не хватало двух точек на края.
   Широкий снимок вылезал на них, и внизу окна вставала полоса прокрутки
   вбок (Джексон, 17 октября: «Почему снизу прокрутка вбок есть?»).
   Ширина окна и предел снимка берутся из одного числа. */
.blog-bubble-pop { width: min(600px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); margin: auto; padding: 0; overflow: hidden; color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12); border-top-color: rgba(255, 255, 255, 0.22); border-radius: 22px;
  background: linear-gradient(180deg, #1d1d1d, #101010); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 40px 90px rgba(0, 0, 0, 0.7); }
.blog-bubble-pop::backdrop { background: rgba(4, 5, 7, 0.72); }
.blog-bubble-in { max-height: calc(100dvh - 50px); padding: 26px 28px 28px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 14px; }
.blog-bubble-pop h2 { padding-right: 44px; font: var(--w-h3) 24px/1.25 var(--serif); text-wrap: balance; }
.blog-bubble-in > .blog-bubble-body:first-child { padding-top: 34px; }
.blog-bubble-body p, .blog-bubble-body ul { font-size: 16.5px; }
.blog-bubble-body .blog-fig img { max-height: 56vh; }
.blog-bubble-pop.wide { width: min(1040px, calc(100vw - 32px)); }
.blog-bubble-pop.wide .blog-bubble-body .blog-fig img { max-height: 70vh; }
.blog-bubble-pop.pics { --pic: min(1198px, calc(100vw - 34px)); width: fit-content; max-width: calc(var(--pic) + 2px); border-radius: 18px; }
.blog-bubble-pop.pics.many { width: calc(var(--pic) + 2px); }
.blog-bubble-pop.pics .blog-bubble-in { padding: 0; }
.blog-bubble-pop.pics .blog-bubble-in > .blog-bubble-body:first-child { padding-top: 0; }
.blog-bubble-pop.pics .blog-fig, .blog-bubble-pop.pics .blog-gallery { margin: 0; border-radius: 0; }
.blog-bubble-pop.pics .blog-fig img { width: auto; height: auto; max-width: var(--pic); max-height: calc(100dvh - 50px);
  border: 0; border-radius: 0; object-fit: contain; }
/* Снимки, которые листают (`slides`; Джексон, 17 октября: «перелистыванием
   вправо влево (чтобы сама картинка была в полный размер, не разделяя свое
   место с другой)»). Лента — своя прокрутка вбок с привязкой к снимку,
   каждый снимок во всю её ширину: так её листают и без скрипта — пальцем,
   колёсиком, полосой. Снимки разной формы стоят посередине кадра, кадр —
   по самому высокому, но не выше окна.

   Стрелки и счёт — только со скриптом (`on` ставит `blog.js`): без него
   нажатие не делало бы ничего, а счёт стоял бы на «1». Полоса прокрутки
   со скриптом спрятана — листают стрелками, клавишами и пальцем. */
.blog-slides { position: relative; margin: 6px 0; }
.blog-slides-track { position: relative; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  border: 1px solid var(--line); border-radius: 18px; background: rgba(0, 0, 0, 0.35); }
.blog-slide { flex: 0 0 100%; min-width: 0; margin: 0; display: grid; place-items: center; scroll-snap-align: center; scroll-snap-stop: always; }
.blog-slide img { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain; }
.blog-slides-go, .blog-slides-count { display: none; }
.js .blog-slides.on .blog-slides-track { scrollbar-width: none; }
.js .blog-slides.on .blog-slides-track::-webkit-scrollbar { display: none; }
.js .blog-slides.on .blog-slides-go { position: absolute; top: 50%; z-index: 1; width: 44px; height: 44px; margin-top: -22px; display: grid; place-items: center; padding: 0; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 50%; background: rgba(18, 20, 24, 0.72); color: #ffffff; transition: background-color 0.2s, border-color 0.2s; }
.js .blog-slides.on .blog-slides-go:hover, .js .blog-slides.on .blog-slides-go:focus-visible { background: rgba(40, 44, 52, 0.92); border-color: rgba(255, 255, 255, 0.4); }
.blog-slides-prev { left: 12px; }
.blog-slides-next { right: 12px; }
.js .blog-slides.on .blog-slides-count { display: block; position: absolute; bottom: 12px; left: 50%; z-index: 1; transform: translateX(-50%); margin: 0; padding: 6px 11px;
  border-radius: 999px; background: rgba(10, 12, 16, 0.66); color: rgba(255, 255, 255, 0.86); font: 500 13px/1 var(--nav); font-variant-numeric: tabular-nums; pointer-events: none; }
.blog-bubble-pop.pics .blog-slides { margin: 0; }
.blog-bubble-pop.pics .blog-slides-track { border: 0; border-radius: 0; }
.blog-bubble-pop.pics .blog-slide img { max-height: calc(100dvh - 50px); }
.blog-bubble-x { position: absolute; top: 14px; right: 14px; z-index: 1; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 50%; background: rgba(18, 20, 24, 0.8); color: var(--text); transition: background-color 0.2s, border-color 0.2s; }
.blog-bubble-x:hover, .blog-bubble-x:focus-visible { background: rgba(40, 44, 52, 0.95); border-color: rgba(255, 255, 255, 0.4); }
@media (prefers-reduced-motion: no-preference) {
  .blog-bubble-pop:popover-open { animation: cdlg-rise 0.22s ease-out; }
  .blog-bubble-pop:popover-open::backdrop { animation: cdlg-dim 0.22s ease-out; }
}
/* Браузер без окон `popover` показал бы их все разом посреди записи —
   там пузырей нет вовсе: записи они только дополняют. */
@supports not selector(:popover-open) {
  .blog-bubbles, .blog-bubble-pop { display: none; }
  .blog-bubble.at { display: none; }
}

/* ── украшения записи ─────────────────────────────────────────────── */

/* Джексон, 17 октября: картинка, плавающая, как пузырь («персонажа какого
   то вставлять»), прозрачная фигура — стекло с картинкой, словами или
   пустое, «просто как стекляшку», — свой фон страницы и своя пыль.
   Значения (ширина, поворот, цвета) — переменные из классов `bl-*`:
   правила под них отдаёт адрес `запись.вид` (`web/look.py`), а стиль
   в теге правило браузера не пускает.

   Картинка и стекло у слова стоят, как пузырь у слова: в строке своей
   метки, в поле на долю `--f` его свободной части. Или за текстом,
   посередине (`side-center`): слоем ниже слов — у текста свой слой
   (`isolation`), — и стекло под словами размывает то, что позади страницы.
   Ширина в поле — не больше самого поля: шире она ушла бы за край экрана.
   Место ставит наружный тег (`translate`), плывёт он же (`transform`),
   а повёрнут внутренний: плыви повёрнутый, под углом в девяносто градусов
   он плыл бы вбок, а не вверх. */
.blog-decor { --f: 0.4; --ww: var(--w); position: absolute; margin-top: 0.85em; translate: 0 -50%;
  font-size: 16px; line-height: 1.45; text-align: center; }
.blog-decor-in { position: relative; display: block; rotate: var(--r, 0deg); }
.blog-decor.kind-image, .blog-decor.kind-glass { width: var(--ww); }
.kind-image { pointer-events: none; }
.kind-image img { display: block; width: 100%; height: auto; opacity: var(--o, 1); }
.kind-image.flip img { scale: -1 1; }
.blog-decor.side-center { left: 50%; translate: -50% -50%; z-index: -1; --ww: min(var(--w), 100%); }
.blog-decor.side-left, .blog-decor.side-right { display: none; }
@media (min-width: 1240px) {
  .blog-decor.side-left, .blog-decor.side-right { display: block;
    --ww: min(var(--w), max(60px, (100vw - 100%) / 2 - 48px));
    --free: max(0px, (100vw - 100%) / 2 - var(--ww) - 88px); }
  .blog-decor.side-left { right: calc(100% + 24px + var(--f) * var(--free)); }
  .blog-decor.side-right { left: calc(100% + 24px + var(--f) * var(--free)); }
}
/* Стекло: тон `--t` с долей `--o` (прозрачность — сколько он пропускает;
   ноль — одно размытие), размытие позади — `--b`, скругление краёв —
   доля `--k` половины меньшей стороны. Ни блика, ни светлой кромки:
   Джексон, 17 октября, о ромбе — «какие-то точки белые по углам и блик.
   Это вообще не нужно». Кромка рамки у многоугольника вылезала ровно
   там, где фигура касается рамки, — точками в вершинах. Тень снаружи
   не рисуется: многоугольник её срезает, а у прочих она читалась
   той же кромкой. Круг и квадрат — ровные: высота по ширине. */
.kind-glass .blog-decor-in { width: 100%; height: var(--h); padding: 14px 18px; overflow: hidden;
  border-radius: calc(min(var(--ww), var(--h)) * var(--k, 0.24) / 2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  border: 0; color: var(--text); background: rgba(var(--t), var(--o));
  -webkit-backdrop-filter: blur(var(--b)) saturate(1.4); backdrop-filter: blur(var(--b)) saturate(1.4); }
.shape-circle .blog-decor-in { border-radius: 50%; height: auto; aspect-ratio: 1; padding: 16%; }
.shape-square .blog-decor-in { border-radius: calc(var(--ww) * var(--k, 0.24) / 2); height: auto; aspect-ratio: 1; }
.shape-rhombus .blog-decor-in { border-radius: 0; padding: 18% 24%; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.shape-triangle .blog-decor-in { border-radius: 0; padding: 34% 22% 8%; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.shape-hexagon .blog-decor-in { border-radius: 0; padding: 12% 20%; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
.shape-star .blog-decor-in { border-radius: 0; padding: 30% 28% 22%; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
/* Зернистость — шум поверх стекла (`blog-grain.svg`), доля `--gr`:
   матовое стекло, а не гладкий лист. Ниже слов и картинки — им зерно
   ни к чему. Крупинки светлые и тёмные, своей прозрачностью, без
   смешения: стекло с размытием — своя группа, и смешение не видит фона
   под ним. */
.kind-glass .blog-decor-in::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url("blog-grain.svg") 0 0 / 180px 180px; opacity: calc(var(--gr, 0) * 0.75); }
.kind-glass .blog-decor-in > * { position: relative; z-index: 1; }
/* Искажение — волны шума сдвигают то, что позади стекла (`look.заготовки`,
   фильтр в странице; Джексон, 17 октября: «Искажение», как на его
   примере). Ссылку на фильтр в размытии позади понимают только браузеры
   на Chromium, а прочие, не поняв её, остались бы и без размытия, —
   поэтому правило только там, где есть `paint()`: его тоже знает один
   Chromium. Остальные показывают просто размытое стекло. */
@supports (background-image: paint(a)) {
  .kind-glass.warp .blog-decor-in { -webkit-backdrop-filter: var(--warp) blur(var(--b)) saturate(1.4);
    backdrop-filter: var(--warp) blur(var(--b)) saturate(1.4); }
}
/* Вырезы и искажения в странице (`parts/blog_defs.html`) места не занимают.
   Не `display: none`: из спрятанного так `<svg>` иные браузеры вырез
   не берут вовсе. */
.blog-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.kind-glass img { display: block; max-width: 100%; max-height: 100%; min-height: 0; flex: 0 1 auto; object-fit: contain; border-radius: 12px; }
.blog-glass-text { display: block; overflow-wrap: anywhere; text-wrap: balance; }
.blog-glass-text a { color: var(--link); }
/* Плывёт — без остановок (Джексон, 17 октября: «Не плавает а застревает»).
   Было два отрезка «туда и обратно» с замедлением на концах: каждые
   несколько секунд стекло вставало на месте. Теперь путь — петля
   из двенадцати точек с ровным ходом: замедлений нет, и после последней
   точки он идёт с первой. Чуть качается — как лист на воде. Плывёт
   наружный тег (`transform`, его ведёт видеокарта, мимо скриптов
   страницы), и картинка со стеклом — каждый по своей петле. */
@media (prefers-reduced-motion: no-preference) {
  .blog-decor.float { animation: decor-drift 16s linear infinite; will-change: transform; }
  .blog-decor.kind-glass.float { animation-duration: 21s; animation-direction: reverse; animation-delay: -7s; }
}
@keyframes decor-drift {
  0%, 100% { transform: translate(0, -14px) rotate(0.6deg); }
  8.3% { transform: translate(4.5px, -12.1px) rotate(1deg); }
  16.7% { transform: translate(7.8px, -7px) rotate(1.1deg); }
  25% { transform: translate(9px, 0) rotate(0.8deg); }
  33.3% { transform: translate(7.8px, 7px) rotate(0.3deg); }
  41.7% { transform: translate(4.5px, 12.1px) rotate(-0.2deg); }
  50% { transform: translate(0, 14px) rotate(-0.6deg); }
  58.3% { transform: translate(-4.5px, 12.1px) rotate(-1deg); }
  66.7% { transform: translate(-7.8px, 7px) rotate(-1.1deg); }
  75% { transform: translate(-9px, 0) rotate(-0.8deg); }
  83.3% { transform: translate(-7.8px, -7px) rotate(-0.3deg); }
  91.7% { transform: translate(-4.5px, -12.1px) rotate(0.2deg); }
}
/* Фон страницы (`запись.фон`): цвет, перелив из двух цветов под углом
   и снимки поверх — размытые (`--bg-x`) и притушенные (`--bg-k`). Стоит
   позади всего, и пыль идёт поверх него: место у фона своё, в рамке
   (`base.html`, `backdrop`), а не на странице — страница слоем выше пыли.
   Снимков несколько — сменяются по ходу чтения (`blog.js`), без скрипта
   стоит первый. Края размытого снимка выносятся за экран: размытие
   у края тянет темноту. */
.blog-bg { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; background: var(--night); }
.blog-bg-color .blog-bg { background: var(--bg-a); }
.blog-bg-gradient .blog-bg { background: linear-gradient(var(--bg-d, 160deg), var(--bg-a), var(--bg-b)); }
.blog-bg-img { position: absolute; top: calc(var(--bg-x, 0px) * -2); left: calc(var(--bg-x, 0px) * -2);
  width: calc(100% + var(--bg-x, 0px) * 4); height: calc(100% + var(--bg-x, 0px) * 4);
  object-fit: cover; filter: blur(var(--bg-x, 0px)); opacity: 0; transition: opacity 1.2s ease; }
.blog-bg-img.on { opacity: 1; }
.blog-bg-dim { position: absolute; inset: 0; background: rgba(0, 0, 0, var(--bg-k, 0)); }
/* Стекло под текстом — когда фон пёстрый, а буквы теряются на нём:
   тёмная полупрозрачная подложка во всю колонку, размывающая фон. Доля —
   `--bg-g`, и прозрачность, и размытие растут вместе. */
.blog-text-glass .blog-post { isolation: isolate; }
.blog-text-glass .blog-post::before { content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: 20px max(0px, var(--gutter) - 28px); border-radius: 28px;
  background: rgba(10, 11, 14, calc(var(--bg-g) * 0.72)); border: 1px solid rgba(255, 255, 255, calc(var(--bg-g) * 0.1));
  -webkit-backdrop-filter: blur(calc(var(--bg-g) * 24px)); backdrop-filter: blur(calc(var(--bg-g) * 24px)); }
@media (prefers-reduced-motion: reduce) { .blog-bg-img { transition: none; } }
@media print { .blog-bg, .blog-decor { display: none; } }

/* ── темы записи ──────────────────────────────────────────────────── */

/* Карточка темы в конце записи — как «Featured In This Story» у GameSpot
   (Джексон, 16 октября): обложка, название, слова о теме и сколько в ней
   записей. Карточка целиком — ссылка на страницу темы. */
.blog-topics { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.blog-topics > h2 { font: var(--w-h3) 22px/1.2 var(--serif); }
.blog-topic { display: grid; grid-template-columns: 176px minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 14px 20px 14px 14px; color: var(--text); text-decoration: none; transition: border-color 0.25s, transform 0.25s; }
.blog-topic-cover { width: 100%; aspect-ratio: 16 / 10; display: block; object-fit: cover; border-radius: 12px; }
/* Без обложки — знак посередине: `display: block` обложки выше перебил бы сетку заглушки. */
.blog-topic .blog-cover-none { display: grid; }
.blog-topic .blog-cover-none img { width: 44px; height: 44px; }
.blog-topic-text { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.blog-topic-text strong { font: var(--w-h3) 21px/1.2 var(--serif); text-wrap: balance; }
.blog-topic-about { font-size: 15px; line-height: 1.5; color: var(--mist); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-topic-all { font: 500 13.5px/1.2 var(--nav); color: var(--link); }
.blog-topic-go { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--mist); transition: color 0.2s, border-color 0.2s, transform 0.25s; }
.blog-topic:hover { border-color: var(--line-strong); }
.blog-topic:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.blog-topic:hover .blog-topic-go, .blog-topic:focus-visible .blog-topic-go { color: var(--text); border-color: var(--line-strong); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .blog-topic:hover { transform: translateY(-2px); }
  .blog-topic:hover .blog-topic-go { transform: translateX(3px); }
}
/* Страница темы: обложка рядом с названием и словами о ней, ниже — её
   записи тем же списком, что у блога. */
.blog-topic-top { display: flex; align-items: center; gap: 28px; }
.blog-topic-top .blog-topic-cover { flex: 0 0 auto; width: 260px; border-radius: 18px; border: 1px solid var(--line); }
.blog-topic-words { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 760px) {
  .blog-topic { grid-template-columns: 104px minmax(0, 1fr); gap: 14px; padding: 12px; }
  .blog-topic-go { display: none; }
  .blog-topic-text strong { font-size: 18px; }
  .blog-topic-top { flex-direction: column; align-items: stretch; gap: 18px; }
  .blog-topic-top .blog-topic-cover { width: 100%; }
}

/* ── колокольчик ──────────────────────────────────────────────────── */

/* Кружок в шапке кабинета, рядом с аватаркой; число нового — точкой
   в углу. Окошко — то же выпадающее меню, что у профиля, только шире
   и со списком вестей. */
.bell > summary { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%;
  background: rgba(255, 255, 255, 0.04); color: var(--soft); transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.bell > summary:hover, .bell[open] > summary { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.09); color: var(--text); }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px;
  background: var(--warn); color: #141414; font: 700 11px/1 var(--nav); box-shadow: 0 0 0 2px #0e0e0e; }
.bell-count[hidden] { display: none; }
.drop-panel.bell-panel { width: min(370px, calc(100vw - 24px)); padding: 6px; gap: 0; }
.bell-head { margin-bottom: 4px; padding: 8px 8px 10px 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
.bell-head b { font: 600 15px/1.2 var(--nav); }
.drop-panel button.bell-mute { width: auto; padding: 6px 10px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; color: var(--mist); font: 500 12.5px/1 var(--nav); }
.drop-panel button.bell-mute[hidden], .bell-mute.off .bell-mute-on, .bell-mute:not(.off) .bell-mute-off { display: none; }
.bell-mute span { display: inline-flex; }
.bell-list { max-height: min(430px, 70vh); margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.drop-panel a.bell-item { padding: 10px; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: start; gap: 12px; }
.bell-ico { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, 0.06); }
.bell-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bell-text b { font: 600 14px/1.3 var(--nav); }
.bell-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--mist); }
.bell-text time { font-size: 12px; color: var(--faint); }
.bell-none { padding: 22px 12px; text-align: center; font-size: 14px; color: var(--mist); }

/* ── планшет ──────────────────────────────────────────────────────── */

@media (max-width: 1180px) {
  :root { --gutter: 40px; }
  /* Шести столбцам тут тесно — строка в два ряда: «с кем» под товаром,
     дата под ярлыком, без шапки. */
  .dl-head { display: none; }
  .dl-link {
    grid-template-columns: 64px minmax(0, 1.5fr) minmax(0, 1fr) 190px;
    grid-template-areas:
      "code what sum state"
      "code with sum date";
    gap: 6px 20px;
  }
  .dl-code { grid-area: code; align-self: start; }
  .dl-state { grid-area: state; justify-self: end; }
  .dl-what { grid-area: what; }
  .dl-what > span { white-space: normal; }
  .dl-with { grid-area: with; }
  .dl-sum { grid-area: sum; }
  .dl-date { grid-area: date; justify-self: end; text-align: right; }
  .dl-hint { padding-left: 84px; }
  .doc { grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
}

@media (max-width: 1000px) {
  .deal { display: flex; flex-direction: column; align-items: stretch; }
  .deal-side { display: contents; }
  .deal-steps { order: 1; }
  .deal-card { order: 2; }
  .bot-card { order: 3; }
  .terms { order: 4; }
  .history { order: 5; }
  .profile, .empty { grid-template-columns: minmax(0, 1fr); }
  .ov { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "chart" "side" "low"; }
  .ov-low { grid-template-columns: minmax(0, 1fr); }
}

/* ── телефон ──────────────────────────────────────────────────────── */

@media (max-width: 760px) {
  :root { --gutter: 16px; }

  html { scroll-padding-top: 84px; }

  .head h1 { font-size: 30px; }
  .eyebrow { font-size: 13px; }
  .sec-lead { font-size: 15px; }
  .head { padding: 22px var(--gutter) 0; }
  .head-row { flex-direction: column; align-items: stretch; gap: 16px; }

  .lead { font-size: 17px; }

  .center-card { padding: 28px 20px; border-radius: 22px; }
  .center-card h1 { font-size: 28px; }
  .error-code { font-size: 72px; }
  .mascot { width: 140px; height: 140px; }
  .mascot-start { width: 116px; height: 116px; }

  .dl { padding-top: 20px; padding-bottom: 48px; gap: 12px; }
  .rc { padding: 20px var(--gutter) 48px; }
  .rc-card { padding: 22px 18px 20px; gap: 14px; }
  .rc-title { font-size: 24px; }
  .rc-rows > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .deal-receipt { margin-left: 0; }
  .dl-field { flex-basis: 100%; }
  .dl-filters { gap: 6px; }
  .dl-filter { height: 34px; padding: 0 12px; font-size: 13.5px; }
  /* На телефоне — карточкой, всё друг под другом. */
  .dl-row { padding: 14px 16px; grid-template-columns: minmax(0, 1fr); }
  .dl-link {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "code state"
      "what what"
      "with with"
      "sum date";
    gap: 8px 16px;
  }
  .dl-extra:empty { display: none; }
  .dl-hint { padding-left: 0; }
  .dl-none { padding: 20px; }
  .empty { padding-top: 20px; }
  .ov { padding: 22px var(--gutter) 48px; gap: 12px; }
  .ov-people { padding: 18px 16px 12px; border-radius: 18px; }
  .ov-find { flex-basis: 100%; }
  /* На телефоне столбцов три: дата уходит под имя, окошко под мышкой
     не нужно — нажатие открывает окно. */
  .ctable { margin: 0 -8px; display: flex; flex-direction: column; }
  .ctable-head, .crow { padding-left: 8px; padding-right: 8px; column-gap: 12px; grid-template-columns: minmax(0, 1fr) auto 40px; }
  .ctable-head { grid-template-areas: "name sum go"; }
  .ctable-head .ctable-last { display: none; }
  .ctable-name { grid-area: name; }
  .ctable-sum { grid-area: sum; }
  .ctable-head > :last-child { grid-area: go; }
  .crow { grid-template-areas: "who sum go" "last last go"; row-gap: 2px; }
  .crow-who { grid-area: who; }
  .crow-sum { grid-area: sum; }
  .crow-go { grid-area: go; }
  .crow-last { grid-area: last; padding-left: 52px; font-size: 12.5px; color: var(--faint); }
  .crow-ghost > :nth-child(2) { display: none; }
  .ccard { display: none; }
  .ov-me { display: contents; }
  .ov-hello { order: -1; flex-basis: 100%; }
  .ov-brief { width: 100%; padding: 14px 12px; }
  .ov-brief > div { flex: 1 1 40%; padding: 8px 10px; }
  .ov-brief > div:nth-child(3) { border-left: 0; }
  .ov-brief dd { font-size: 19px; }
  .ov-blog { min-height: 260px; border-radius: 18px; }
  .ov-blog-text { max-width: none; padding: 18px; }
  .cdlg-in { padding: 20px 18px 18px; }
  .cdlg-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cdlg-ava { width: 52px; height: 52px; }
  .cdlg-who h2 { font-size: 20px; }
  .ov-head h1 { font-size: 30px; }
  .ov-side { padding: 18px 16px 14px; border-radius: 18px; }
  .ov-rows { margin: 0 -8px; }
  .ov-row { padding: 10px 8px; }
  .chart { padding: 18px 16px 14px; gap: 16px; border-radius: 18px; }
  .chart-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .chart-head h2 { font-size: 20px; }
  .chart-total { font-size: 22px; }
  .lchart { gap: 8px; grid-template-rows: minmax(140px, 1fr) auto; }
  .lchart-scale { font-size: 10px; }
  .lmonths li { font-size: 10px; letter-spacing: -0.02em; }
  .lmonths small { font-size: 10px; }
  .lcol-tip { font-size: 12px; }
  .empty-card, .empty-how { padding: 24px 20px; }

  .deal-head { padding-top: 22px; gap: 12px; }
  .deal-title { gap: 10px; }
  .deal-title .chip-lg { padding: 5px 12px; font-size: 13px; }
  .deal-head .sec-lead { font-size: 14px; }
  .deal { padding: 20px var(--gutter) 40px; gap: 12px; }
  .deal-steps { padding: 18px 16px; border-radius: 18px; }
  .steps { gap: 4px; }
  .step { align-items: center; gap: 8px; text-align: center; }
  .step-top { justify-content: center; }
  .step-dot { width: 30px; height: 30px; font-size: 13px; }
  .step-line, .step small { display: none; }
  .step b { font-size: 12px; }
  .step-now b { color: var(--mint); }
  .steps-warn .step-now b { color: var(--warn); }
  .steps-red .step-now b { color: var(--red); }
  .deal-card { padding: 20px 16px; gap: 16px; border-radius: 18px; }
  .card-head { align-items: flex-start; gap: 12px; }
  .card-ico { width: 40px; height: 40px; }
  .card-ico .ico { width: 20px; height: 20px; }
  .card-face { width: 64px; height: 64px; margin: -8px 0 -8px -6px; }
  .card-head h2 { font-size: 21px; }
  .card-head p { font-size: 15px; }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .tile { padding: 14px 16px; }
  .tile-value.mono { font-size: 20px; }
  .tile-link .btn-tile { margin-left: 0; width: 100%; margin-top: 6px; }
  /* Номер перевода и «Смотреть в блокчейне» в одну строку на телефоне не
     влезали и вылезали за край карточки, на узком — и за край экрана. */
  .split .btn-tile { align-self: stretch; height: auto; min-height: 44px; padding: 10px 16px;
    flex-wrap: wrap; justify-content: flex-start; row-gap: 4px; }
  .split-sep { display: none; }
  .person-row { flex-direction: column; align-items: stretch; padding: 14px 16px; }
  .person-row .avatar { align-self: flex-start; }
  .person-stats { margin-left: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .quote p { font-size: 16px; }
  .pay-grid { grid-template-columns: minmax(0, 1fr); }
  .pay-qr { display: none; }
  .pay-row { flex-direction: column; align-items: stretch; padding: 14px 16px; }
  .pay-row .copy { margin-left: 0; justify-content: center; }
  .pay-sum { font-size: 24px; }
  .pay-address { font-size: 15px; }
  .notes { font-size: 14px; }
  .terms { padding: 20px 16px; border-radius: 18px; }
  .terms-row { font-size: 14px; padding: 11px 0; }
  /* Рамка у кабинета есть у каждой панели, и у этой тоже: без своих
     полей кнопка «Открыть сделку в боте» стояла вплотную к рамке,
     а строка под ней — к её нижнему краю. */
  .bot-card { padding: 20px 16px; border-radius: 18px; gap: 12px; }
  .bot-card p { font-size: 13px; line-height: 1.5; }
  .history { padding: 20px 16px; border-radius: 18px; gap: 14px; }
  .tl-text b { font-size: 15px; }

  .profile { padding: 20px var(--gutter) 40px; }
  .profile .panel { padding: 20px 16px; border-radius: 18px; }
  .profile .btn-danger { align-self: stretch; }
  /* На телефоне название держится рядом со значком (56 точек и зазор 14),
     а ярлык и «Отвязать» переносятся под него; кнопка «Привязать Discord» —
     во всю ширину. Без этого длинная строка уезжала под значок целиком,
     и значок оставался стоять один. */
  .way { flex-wrap: wrap; }
  .way-text { flex: 1 1 calc(100% - 70px); }
  .way > .btn.way-do { flex-basis: 100%; margin: 4px 0 0; justify-content: center; }

  .doc-head { gap: 10px; }
  .doc-lead { font-size: 16px; }
  .doc { padding: 24px var(--gutter) 40px; grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .doc-toc { display: none; }
  .doc-body { gap: 28px; }
  .doc-part h2 { font-size: 20px; gap: 10px; }
  .doc-part p, .doc-part ul { font-size: 16px; line-height: 1.65; }
  .doc-next { flex-direction: column; align-items: stretch; padding: 20px 16px; }
  .doc-next .btn { margin-left: 0; }
}

/* ── кабинет: чёрный и платина, с цветами и глубиной ─────────────── */

/* Кабинет — чёрный, серебро и белый. Сперва плоско: тонкая сплошная рамка,
   без теней, уголков и колец, главная кнопка залита серебром, буквы на ней
   тёмные. Владелец выбрал это 14 октября из тех же десяти стилей,
   примеренных на настоящие страницы («Палитры кабинета», вариант 8):
   «Сделаем в варианте 8 + пылинки». Пылинки — та же бледная пыль, что
   на главной ниже первого экрана (dust.js), во всём кабинете, со входом
   и записью.

   Стиль искали три дня. 12 октября кабинет был чёрным с золотыми
   уголками — «слишком много золотого вышло»; 13-го стал сине-графитовым
   в цветах знака (вариант 9) — кольцо рамок из зелёного в синий и кнопка
   тем же переливом; 14-го — этот.

   Класс ставит рамка кабинета (cabinet.html); документы и ошибки
   на витрине его не получают и остаются серыми. Стоит последним нарочно:
   вид кабинета перекрывает вид витрины, в том числе раскладку планшета
   и телефона выше. Бегущий свет у рамок входа остаётся золотым (раздел
   «вход и запись»): его владелец просил золотым отдельно.

   Цвета (14 октября): «нужно добавить цветов кабинету… не должно
   ограничиваться примером». Чёрное осталось, а цвет пришёл туда, где он
   что-то значит, — раздел «цвета кабинета» ниже. Все цвета — здесь,
   тройками чисел (их берут и сплошными, и полупрозрачными): смена набора —
   смена этих строк, а не правил.

   Глубина (14 октября, тем же вечером): владелец показал набросок другого
   ИИ — «хотелось бы добавить какую-то глубину» — и из четырёх примеренных
   вариантов выбрал «Свет в карточках». Плоское ушло: карточка светлее
   к верху, со светлой кромкой сверху и тенью под собой, углы круглее, поля
   и отборы вдавлены, а снизу в карточке — мягкий свет цвета её смысла
   (раздел «глубина» ниже). */
.cab {
  /* По смыслу — одни на весь кабинет: ярлыки шагов, числа «Обзора»,
     отборы списка, шаги сделки. Синий и зелёный — из знака. */
  --c-live: 77, 180, 242;    /* идёт: «в работе», «ждём оплату» */
  --c-done: 126, 216, 98;    /* закрыто: деньги дошли */
  --c-money: 232, 200, 106;  /* деньги: оборот */
  --c-wait: 168, 160, 222;   /* ждём вторую сторону */
  --c-end: 220, 146, 162;    /* не сложилась */
  /* Те же --warn и --red, только тройками: ими светятся карточки, которые
     зовут действовать («ваш ход», недоплата) и спорят. */
  --c-warn: 232, 194, 122;
  --c-red: 241, 150, 150;
  /* Главный цвет и второй: кнопка главного дела и линия графика — переливом
     из главного во второй, как в знаке. Главный же — у всего, что берёт
     огонёк сайта (--glow, --mint из frame.css): черта под разделом в шапке,
     буква профиля, коды сделок, кружок у языка. */
  --acc: var(--c-done);
  --acc-2: var(--c-live);
  --btn-ink: #06110a;
  /* Оборот за год у графика «Обзора» — цветом денег. */
  --lbl-money: var(--c-money);
  --glow: var(--acc);
  --glow-shadow: 0 0 6px rgba(var(--acc), 0.35);
  --accent: rgb(var(--c-done));
  --accent-tint: rgba(var(--c-done), 0.12);
  --mint: rgb(var(--acc));
  --bg: #111111;
  --panel: #1a1a1a;
  --panel-solid: #1a1a1a;
  --line: rgba(255, 255, 255, 0.088);
  --line-soft: rgba(255, 255, 255, 0.055);
  --line-strong: rgba(255, 255, 255, 0.176);
  --tile: rgba(255, 255, 255, 0.044);
  --field: rgba(255, 255, 255, 0.03);
  --text: #f2f2f2;
  --soft: #d6d6d6;
  --mist: #a2a2a2;
  --faint: #767676;
  --tone: #1a1a1a;
  /* Ссылки — светлым оттенком главного цвета: «Все сделки», «Квитанция»,
     «← Мои сделки». */
  --link: color-mix(in srgb, rgb(var(--acc)) 60%, #ffffff);
  --link-hover: color-mix(in srgb, rgb(var(--acc)) 30%, #ffffff);
  --dim: #767676;
  /* Поле страницы там, где стоит форма входа: на нём рисуется свет
     по краю поля с курсором (раздел «вход и запись»). Им же залиты все
     вдавленные поля кабинета — темнее карточки, в которой стоят. */
  --ground: #0a0a0a;
  /* Карточка: поверхность светлее к верху, рамка — тонкая черта, сверху
     светлее (свет падает сверху). */
  --surface-top: #202020;
  --surface-low: #121212;
  --frame: rgba(255, 255, 255, 0.08);
  --frame-top: rgba(255, 255, 255, 0.17);
  /* Фон — почти чёрный, и в углах едва заметный свет знака: зелёный слева
     сверху, синий справа. Карточки над ним — следующий слой. */
  background:
    radial-gradient(55% 40% at 8% -8%, rgba(var(--c-done), 0.07), transparent 70%),
    radial-gradient(50% 45% at 102% 24%, rgba(var(--c-live), 0.06), transparent 70%),
    linear-gradient(180deg, #0f0f0f 0, #060606 100%) #060606;
}

/* Шапка — тёмная полоса с тонкой чертой снизу и тенью под собой: страница
   уходит под неё. */
.cab .nav, .cab .nav.solid { --tone: #1a1a1a; background: rgba(14, 14, 14, 0.9); border-bottom-color: var(--line); box-shadow: 0 12px 32px -20px rgba(0, 0, 0, 0.95); }

/* ── глубина ── */

/* Карточка — слой над фоном: светлее к верху, светлая кромка сверху,
   тень под собой. Снизу в ней — свет цвета её смысла (--lit, сила —
   --lit-a; у прочих карточек он погашен): пятно внутри, светящаяся нижняя
   кромка и отсвет под карточкой, как у выбранной карточки наброска. Кто
   чем светится — ниже, в «цветах кабинета». */
.cab .panel, .cab .center-card:not(.center-plain), .cab .auth-scene {
  --lit: var(--acc);
  --lit-a: 0;
  border-color: var(--frame);
  border-top-color: var(--frame-top);
  border-radius: 20px;
  background:
    radial-gradient(70% 62% at 50% 116%, rgba(var(--lit), var(--lit-a)), transparent 72%),
    linear-gradient(180deg, var(--surface-top), var(--surface-low));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(var(--lit), calc(var(--lit-a) * 1.6)),
    0 2px 4px rgba(0, 0, 0, 0.45),
    0 20px 44px -26px rgba(var(--lit), calc(var(--lit-a) * 1.2)),
    0 26px 50px -26px rgba(0, 0, 0, 0.9);
}
.cab .panel, .cab .center-card:not(.center-plain) {
  position: relative;
  /* Под непрозрачной карточкой размывать нечего, а размытие лишь тратит
     силы — тем более над пылью, которая движется. */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
/* Карточка сделки высокая, и свет снизу ушёл бы за край экрана: у неё он
   сверху, и светится верхняя кромка. Без рамки по делу — главным цветом;
   с рамкой — её цветом («цвета кабинета»). */
.cab .deal-card {
  --lit: var(--acc);
  --lit-a: 0.26;
  background:
    radial-gradient(70% 46% at 50% -12%, rgba(var(--lit), var(--lit-a)), transparent 72%),
    linear-gradient(180deg, var(--surface-top), var(--surface-low));
  box-shadow:
    inset 0 1px 0 rgba(var(--lit), calc(var(--lit-a) * 1.6)),
    0 2px 4px rgba(0, 0, 0, 0.45),
    0 26px 50px -26px rgba(0, 0, 0, 0.9);
}
/* Рамки по делу остаются своего цвета — у них свой смысл: жёлтая зовёт
   назвать адрес или доплатить, красная — спор. Без этого общая черта
   перебила бы их: правило кабинета сильнее и стоит ниже. */
.cab .card-warn { border-color: var(--warn-line); }
.cab .card-red { border-color: var(--red-line); }

/* У списков «Обзора» — точка-квадратик перед заголовком; цвет — в «цветах
   кабинета». */
.cab .ov-sec-head h2 { display: flex; align-items: center; gap: 12px; }
.cab .ov-sec-head h2::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: 1px; background: var(--mint); }

/* Кнопка главного дела — залита переливом главного цвета во второй, буквы
   тёмные (до 14 октября — серебром); сверху на ней блик, под ней — мягкий
   свет её цвета. Прочие кнопки — тёмные, с тонкой кромкой и тенью;
   вторые по важности (`btn-panel`: войти через Telegram и Discord, привязки
   в профиле) — с кромкой главного цвета. Все кнопки — таблетками. */
.cab .btn {
  --tone: #181818;
  border-color: var(--line-strong);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 8px 18px -10px rgba(0, 0, 0, 0.9);
}
.cab .btn-blue, .cab .btn-blue:hover {
  color: var(--btn-ink);
  border-color: transparent;
  background: linear-gradient(100deg, rgb(var(--acc)), rgb(var(--acc-2)));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -2px 6px rgba(0, 0, 0, 0.12), 0 12px 28px -10px rgba(var(--acc), 0.55);
}
.cab .btn-blue:hover { filter: brightness(1.1); }
.cab .btn-blue svg { color: var(--btn-ink); }
.cab .btn-panel { border-color: rgba(var(--acc), 0.32); }
.cab .btn-panel:hover { border-color: rgba(var(--acc), 0.65); }
/* Поля и отборы — вдавлены: темнее карточки, с тенью внутри по верху.
   Под полем входа — тот же тон: оно стоит прямо на фоне, и прозрачное
   пропускало бы пыль, пылинки плыли бы под буквами. */
.cab .field-input, .cab .dl-field {
  background: var(--ground);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.55);
}
.cab .field-input { border-radius: 6px; }
.cab .field-input[aria-invalid="true"] { border-color: var(--red-line); }
.cab .field-input:focus, .cab .dl-field:focus-within { border-color: rgba(var(--acc), 0.6); box-shadow: 0 0 0 3px rgba(var(--acc), 0.14); }
.cab .dl-filter, .cab .dl-page { background: var(--ground); box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.5); }

/* ── цвета кабинета ── */

/* Подзаголовок страницы и слова «пока пусто» — бледным оттенком главного
   цвета: серыми они читались выключенными. */
.cab .sec-lead, .cab .chart-head p, .cab .ov-none {
  color: color-mix(in srgb, rgb(var(--acc)) 42%, #b4b4b4);
}

/* Оборот за год у графика — золотом денег. */
.cab .chart-total { color: rgb(var(--lbl-money)); }

/* Свет в карточках (раздел «глубина») — цветом их смысла: график
   «Обзора» — синим «идёт», колонка активных сделок рядом и список сделок —
   золотом (владелец: голубой «нужно сделать на золотой»), недавние
   контакты — сиреневым второй стороны, панель с предметами у входа —
   золотом предметов. Карточка сделки светится цветом своей рамки (без
   рамки — главным, у самой карточки в «глубине»). Прочие карточки — без
   света. */
.cab .chart { --lit: var(--c-live); --lit-a: 0.22; }
.cab .ov-side { --lit: var(--c-money); --lit-a: 0.16; }
.cab .ov-people { --lit: var(--c-wait); --lit-a: 0.16; }
.cab .ov-brief { --lit: var(--c-money); --lit-a: 0.12; }
.cab .dl-table, .cab .dl-none { --lit: var(--c-money); --lit-a: 0.14; }
.cab .auth-scene { --lit: var(--c-money); --lit-a: 0.22; }
.cab .deal-card.card-blue { --lit: var(--c-live); --lit-a: 0.36; }
.cab .deal-card.card-warn { --lit: var(--c-warn); --lit-a: 0.34; }
.cab .deal-card.card-red { --lit: var(--c-red); --lit-a: 0.34; }

/* Линия оборота — переливом главного во второй, заливка под ней — их
   серединой. */
.cab .lchart-stroke-a { stop-color: rgb(var(--acc)); }
.cab .lchart-stroke-b { stop-color: rgb(var(--acc-2)); }
.cab .lchart-stop-top { stop-color: color-mix(in srgb, rgb(var(--acc)) 50%, rgb(var(--acc-2))); stop-opacity: 0.24; }
.cab .lchart-stop-low { stop-color: color-mix(in srgb, rgb(var(--acc)) 50%, rgb(var(--acc-2))); }

/* Квадратик у заголовка — главным цветом у всех карточек; у активных
   сделок «Обзора» — синим «идёт», у недавних контактов — сиреневым второй
   стороны. */
.cab .terms h2, .cab .history h2, .cab .profile h2 { display: flex; align-items: center; gap: 12px; }
.cab .terms h2::before, .cab .history h2::before, .cab .profile h2::before {
  content: ""; width: 6px; height: 6px; flex: none; border-radius: 1px; background: var(--mint);
}
.cab .ov-live .ov-sec-head h2::before { background: rgb(var(--c-live)); }
.cab .ov-people-head h2 { display: flex; align-items: center; gap: 12px; }
.cab .ov-people-head h2::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: 1px; background: rgb(var(--c-wait)); }

/* В недавних контактах буква человека — сиреневым второй стороны (своя
   буква в шапке и в приветствии — главным цветом: так «я» и «он»
   не путаются), сумма с ним — золотом денег, «идёт» — синим. */
.cab .crow-ghost .cwho-ava { background: rgba(255, 255, 255, 0.05); }
.cab .crow-sum, .cab .ccard-sum dd, .cab .cdlg-money dd { color: rgb(var(--lbl-money)); }
.cab .contact-live { background: rgba(var(--c-live), 0.12); color: rgb(var(--c-live)); }
.cab .cbtn:hover, .cab .cbtn:focus-visible { border-color: rgba(var(--c-wait), 0.5); color: rgb(var(--c-wait)); }

/* Имя в приветствии — переливом главного цвета во второй и со светом
   (образец владельца: имя другим цветом и светится). Прозрачные буквы —
   только где перелив по буквам умеют, иначе имя пропало бы. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .cab .ov-hello b {
    background: linear-gradient(100deg, rgb(var(--acc)), rgb(var(--acc-2)));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 12px rgba(var(--acc), 0.45));
  }
}
.cab .ov-hello-ava { box-shadow: 0 0 18px rgba(var(--acc), 0.25); }
/* Сводка: оборот — золотом денег, в работе — синим «идёт». */
.cab .ov-brief-volume dd { color: rgb(var(--lbl-money)); }
.cab .ov-brief-live dd small { color: rgb(var(--c-live)); }
.cab .ov-brief-done dd { color: rgb(var(--c-done)); }

/* Свет без картинок в баннере блога — цветами знака: им плывёт баннер,
   у которого нечего показать. */
.cab .ov-blog-plain .ov-blog-pics::before, .cab .ov-blog-empty .ov-blog-pics::before {
  background:
    radial-gradient(38% 42% at 64% 34%, rgba(var(--acc-2), 0.3), transparent 70%),
    radial-gradient(34% 40% at 30% 70%, rgba(var(--acc), 0.22), transparent 70%);
}

/* Колокольчик: число нового — тёплым «ваш ход», у заявки значок того же
   цвета, у записи блога — сиреневым. */
.cab .bell-count { background: rgb(var(--c-warn)); }
.cab .bell-deal .bell-ico { background: rgba(var(--c-warn), 0.14); color: rgb(var(--c-warn)); }
.cab .bell-blog .bell-ico { background: rgba(var(--c-wait), 0.14); color: rgb(var(--c-wait)); }

/* Ярлык шага в строке «Обзора» — точкой и словами цвета его смысла, как
   ярлыки в «Моих сделках». */
.cab .ov-blue { color: rgb(var(--c-live)); }
.cab .ov-ok { color: rgb(var(--c-done)); }
.cab .ov-grey { color: rgb(var(--c-wait)); }
.cab .ov-end { color: rgb(var(--c-end)); }
.cab .ov-warn { color: rgb(var(--c-warn)); }
.cab .ov-red { color: rgb(var(--c-red)); }
.cab .ov-turn .ov-when { color: rgb(var(--c-warn)); }

/* Ярлыки шагов — цветами смысла. Серое ожидание второй стороны стало
   сиреневым, «не сложилась» — розой: серое читалось выключенным. */
.cab .chip-blue { background: rgba(var(--c-live), 0.12); border-color: rgba(var(--c-live), 0.34); color: rgb(var(--c-live)); }
.cab .chip-ok { background: rgba(var(--c-done), 0.12); border-color: rgba(var(--c-done), 0.34); color: rgb(var(--c-done)); }
.cab .chip-grey { background: rgba(var(--c-wait), 0.1); border-color: rgba(var(--c-wait), 0.3); color: rgb(var(--c-wait)); }
.cab .chip-end { background: rgba(var(--c-end), 0.1); border-color: rgba(var(--c-end), 0.3); color: rgb(var(--c-end)); }
.cab .tone-blue { background: rgba(var(--c-live), 0.12); color: rgb(var(--c-live)); }
.cab .tone-ok { background: rgba(var(--c-done), 0.12); color: rgb(var(--c-done)); }
.cab .tone-grey { background: rgba(var(--c-wait), 0.1); color: rgb(var(--c-wait)); }

/* Шаги сделки: пройденные — зелёным закрытого, нынешний — синим «идёт». */
.cab .step-done .step-dot, .cab .step-done .step-line { background: rgb(var(--c-done)); }
.cab .step-now .step-dot { border-color: rgb(var(--c-live)); background: rgba(var(--c-live), 0.12); color: rgb(var(--c-live)); box-shadow: 0 0 14px rgba(var(--c-live), 0.35); }
.cab .step-now small, .cab .step-now b { color: rgb(var(--c-live)); }
.cab .steps-warn .step-now .step-dot { border-color: var(--warn); background: var(--warn-bg); color: var(--warn); box-shadow: none; }
.cab .steps-warn .step-now small, .cab .steps-warn .step-now b { color: var(--warn); }
.cab .steps-red .step-now .step-dot { border-color: var(--red); background: var(--red-bg); color: var(--red); box-shadow: none; }
.cab .steps-red .step-now small, .cab .steps-red .step-now b { color: var(--red); }

/* «Мои сделки»: выбранный отбор и лист — главным цветом, число у отбора —
   цветом своего смысла, шапка таблицы — бледным оттенком главного. */
.cab .dl-filter.on, .cab .dl-page.on { border-color: rgba(var(--acc), 0.55); background: rgba(var(--acc), 0.13); }
.cab .dl-filter-all b { color: rgb(var(--acc)); }
.cab .dl-filter-live b { color: rgb(var(--c-live)); }
.cab .dl-filter-closed b { color: rgb(var(--c-done)); }
.cab .dl-filter-failed b { color: rgb(var(--c-end)); }
.cab .dl-filter .dl-zero { color: var(--faint); }
.cab .dl-head { color: color-mix(in srgb, rgb(var(--acc)) 40%, #8a8a8a); }
.cab .dl-row:hover { background: rgba(var(--acc-2), 0.06); }

/* Пыль кабинета (dust.js) — под всем содержимым: у тела страницы свой
   слой наложения (isolation в frame.css), и в нём она ниже карточек,
   но выше фона. На бумаге её нет: квитанция печатается чёрным по белому. */
.dust { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
@media print { .dust { display: none; } }

/* Анимации выключены в настройках системы — без переходов и движения. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
