/* ═══════════════════════════════════════════════════════════════════════════
   GRAMATON.PRO — WEB UI-KIT  (v1.0, 2026-09-19)
   ТЗ T1: единый дизайн-код веб-ЛК по эталону мобильного приложения Flutter
   (gramaton_app_new/lib/config/theme.dart + screens/*_screen.dart).

   СЛОЙ 1 — ТОКЕНЫ (--ui-*): типографика, радиусы, отступы, тени, цвета.
   Токены выводятся из переменных активной темы (--om-*), поэтому ui-kit
   корректно работает во всех 5 темах: Космо / ОлдМани / Неон / Крем / Роял.
   СЛОЙ 2 — КОМПОНЕНТЫ (.ui-*): карточка, кнопка, поле, бейдж, аватар,
   список, таб-бар, модалка, пустое состояние, волосок-разделитель.
   СЛОЙ 3 — ИКОНКИ (.ic): единый линейный набор, stroke=currentColor.

   Подключение: <link rel="stylesheet" href="/css/ui-kit.css?v=1">
   Никаких !important по токенам — темы переопределяют значения переменных.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── СЛОЙ 1. ТОКЕНЫ ─────────────────────────────────────────────────────── */
:root {
  /* Типографика: Playfair Display для заголовков/цифр, Inter для текста */
  --ui-font-display: var(--om-font-display, 'Playfair Display', Georgia, 'Times New Roman', serif);
  --ui-font-body: var(--om-font-body, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  --ui-font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  --ui-fs-xs: 10px;
  --ui-fs-sm: 11px;
  --ui-fs-base: 13px;
  --ui-fs-md: 14px;
  --ui-fs-lg: 16px;
  --ui-fs-xl: 20px;
  --ui-fs-2xl: 24px;
  --ui-fs-display: 30px;

  --ui-lh-tight: 1.2;
  --ui-lh-base: 1.45;
  --ui-track-wide: 0.08em;   /* uppercase-подписи, как в приложении */
  --ui-track-tight: -0.01em;

  /* Радиусы — 1:1 с theme.dart (10 / 12) + расширение для веба */
  --ui-radius-xs: 4px;
  --ui-radius-sm: var(--om-radius-sm, 6px);
  --ui-radius: var(--om-radius, 10px);
  --ui-radius-md: var(--om-radius-md, 12px);
  --ui-radius-lg: var(--om-radius-lg, 16px);
  --ui-radius-pill: 999px;

  /* Шаг сетки — 4px, как в мобильном приложении */
  --ui-space-1: 4px;
  --ui-space-2: 8px;
  --ui-space-3: 12px;
  --ui-space-4: 16px;
  --ui-space-5: 24px;
  --ui-space-6: 32px;
  --ui-space-7: 40px;
  --ui-tap: 44px;              /* минимальная тап-зона */

  /* Цвета — берём из активной темы (--om-*), с фолбэком на палитру приложения */
  --ui-bg: var(--om-bg, #05010e);
  --ui-bg-card: var(--om-bg-card, #0c0820);
  --ui-bg-elevated: var(--om-bg-elevated, #1a0f2e);
  --ui-bg-hover: var(--om-bg-hover, rgba(201, 168, 76, 0.06));
  --ui-bg-sunken: color-mix(in srgb, var(--ui-bg) 92%, #000 8%);

  --ui-text: var(--om-text, #f0edfc);
  --ui-text-secondary: var(--om-text-secondary, #b8a9d4);
  --ui-text-muted: var(--om-text-muted, #6a5a8a);

  --ui-accent: var(--om-gold, #c9a84c);
  --ui-accent-ink: var(--om-gold-ink, var(--om-gold, #c9a84c)); /* цвет текста/иконок акцента */
  --ui-accent-contrast: var(--om-gold-contrast, #120e08);       /* текст ПОВЕРХ золота */
  --ui-grad-accent: var(--om-grad-gold, linear-gradient(135deg, #8e7027, #c9a84c));

  --ui-success: var(--om-success, #4abb5e);
  --ui-warning: var(--om-warning, #d9a13a);
  --ui-error: var(--om-error, #cf7a7a);

  --ui-border: var(--om-gold-border-light, rgba(201, 168, 76, 0.16));
  --ui-border-strong: var(--om-gold-border, rgba(201, 168, 76, 0.32));
  --ui-hairline: var(--om-gold-border-light, rgba(201, 168, 76, 0.14));

  --ui-shadow-sm: var(--om-shadow-sm, 0 2px 10px rgba(0, 0, 0, 0.30));
  --ui-shadow: var(--om-shadow, 0 6px 26px rgba(0, 0, 0, 0.40));
  --ui-shadow-lg: var(--om-shadow-lg, 0 12px 40px rgba(0, 0, 0, 0.45));

  --ui-duration: var(--om-duration, 0.25s ease);
  --ui-focus: 0 0 0 2px var(--ui-bg-card), 0 0 0 4px var(--ui-accent);
}

/* ── СЛОЙ 2. БАЗА КОМПОНЕНТОВ ───────────────────────────────────────────── */
.ui-card {
  background: var(--ui-bg-card);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-md);
  box-shadow: var(--ui-shadow-sm);
  padding: var(--ui-space-5);
  position: relative;
}
.ui-card--flat { box-shadow: none; }
.ui-card--tight { padding: var(--ui-space-4); }
.ui-card--pad-lg { padding: var(--ui-space-6); }

/* Заголовок раздела в стиле экранов приложения */
.ui-section-title {
  font-family: var(--ui-font-body);
  font-size: var(--ui-fs-sm);
  font-weight: 600;
  letter-spacing: var(--ui-track-wide);
  text-transform: uppercase;
  color: var(--ui-text-muted);
  margin: 0 0 var(--ui-space-3) 2px;
}
.ui-title {
  font-family: var(--ui-font-display);
  font-size: var(--ui-fs-xl);
  font-weight: 700;
  color: var(--ui-text);
  letter-spacing: var(--ui-track-tight);
}
/* Золотой волосок-разделитель (в светлых темах тёплый, в тёмных червонный) */
.ui-hairline {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--ui-border-strong), transparent);
  margin: var(--ui-space-4) 0;
}

/* ── Кнопки ─────────────────────────────────────────────────────────────── */
.ui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ui-space-2);
  min-height: var(--ui-tap);
  padding: 10px var(--ui-space-5);
  border-radius: var(--ui-radius);
  border: 1px solid transparent;
  font-family: var(--ui-font-body);
  font-size: var(--ui-fs-md);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--ui-duration), border-color var(--ui-duration),
              box-shadow var(--ui-duration), transform var(--ui-duration);
  -webkit-tap-highlight-color: transparent;
}
.ui-btn:active { transform: translateY(1px); }
.ui-btn:focus-visible { outline: none; box-shadow: var(--ui-focus); }
.ui-btn[disabled], .ui-btn.is-disabled { opacity: 0.5; cursor: not-allowed; }

.ui-btn--primary {
  background: var(--ui-grad-accent);
  color: var(--ui-accent-contrast);
  box-shadow: var(--ui-shadow-sm);
}
.ui-btn--primary:hover { box-shadow: var(--ui-shadow); filter: brightness(1.04); }

.ui-btn--secondary {
  background: var(--ui-bg-card);
  color: var(--ui-text);
  border-color: var(--ui-border-strong);
}
.ui-btn--secondary:hover { background: var(--ui-bg-hover); }

.ui-btn--ghost {
  background: transparent;
  color: var(--ui-text-secondary);
  border-color: transparent;
}
.ui-btn--ghost:hover { background: var(--ui-bg-hover); color: var(--ui-text); }

.ui-btn--sm { min-height: 34px; padding: 7px var(--ui-space-3); font-size: var(--ui-fs-base); }
.ui-btn--lg { min-height: 52px; padding: 14px var(--ui-space-6); font-size: var(--ui-fs-lg); }
.ui-btn--block { width: 100%; }
.ui-btn--icon { min-width: var(--ui-tap); padding: 10px; }

/* ── Поля ввода ─────────────────────────────────────────────────────────── */
.ui-field { display: block; margin-bottom: var(--ui-space-4); }
.ui-label {
  display: block;
  font-size: var(--ui-fs-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ui-text-muted);
  margin-bottom: var(--ui-space-2);
}
.ui-input, .ui-select, .ui-textarea {
  width: 100%;
  min-height: var(--ui-tap);
  padding: 11px var(--ui-space-3);
  background: var(--ui-bg-sunken);
  color: var(--ui-text);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  font-family: var(--ui-font-body);
  font-size: var(--ui-fs-md);
  transition: border-color var(--ui-duration), box-shadow var(--ui-duration);
}
.ui-input::placeholder, .ui-textarea::placeholder { color: var(--ui-text-muted); }
.ui-input:hover, .ui-select:hover { border-color: var(--ui-border-strong); }
.ui-input:focus, .ui-select:focus, .ui-textarea:focus {
  outline: none;
  border-color: var(--ui-accent);
  box-shadow: var(--ui-focus);
}
.ui-input--invalid { border-color: var(--ui-error); }
.ui-hint { font-size: var(--ui-fs-sm); color: var(--ui-text-muted); margin-top: var(--ui-space-1); }
.ui-error-text { font-size: var(--ui-fs-sm); color: var(--ui-error); margin-top: var(--ui-space-1); }

/* ── Бейдж / «печать» ───────────────────────────────────────────────────── */
.ui-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--ui-radius-xs);
  border: 1px solid var(--ui-border-strong);
  background: var(--ui-bg-hover);
  color: var(--ui-accent-ink);
  font-size: var(--ui-fs-xs);
  font-weight: 700;
  letter-spacing: var(--ui-track-wide);
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 253, 248, 0.35);
}
.ui-badge--ok { color: var(--ui-success); border-color: color-mix(in srgb, var(--ui-success) 40%, transparent); }
.ui-badge--warn { color: var(--ui-warning); border-color: color-mix(in srgb, var(--ui-warning) 40%, transparent); }
.ui-badge--error { color: var(--ui-error); border-color: color-mix(in srgb, var(--ui-error) 40%, transparent); }
.ui-badge--solid { background: var(--ui-grad-accent); color: var(--ui-accent-contrast); border-color: transparent; }

/* ── Аватар ─────────────────────────────────────────────────────────────── */
.ui-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ui-grad-accent);
  color: var(--ui-accent-contrast);
  font-family: var(--ui-font-display);
  font-size: var(--ui-fs-lg);
  font-weight: 700;
  border: 2px solid var(--ui-border);
  overflow: hidden;
  user-select: none;
}
.ui-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ui-avatar--sm { width: 30px; height: 30px; font-size: var(--ui-fs-base); }
.ui-avatar--lg { width: 80px; height: 80px; font-size: 32px; }

/* ── Список ─────────────────────────────────────────────────────────────── */
.ui-list { display: flex; flex-direction: column; }
.ui-list-item {
  display: flex;
  align-items: center;
  gap: var(--ui-space-3);
  min-height: 56px;
  padding: var(--ui-space-3) 0;
  border-bottom: 1px solid var(--ui-hairline);
  color: var(--ui-text);
  text-decoration: none;
  transition: background var(--ui-duration);
}
.ui-list-item:last-child { border-bottom: none; }
.ui-list-item:hover { background: var(--ui-bg-hover); }
.ui-list-item__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: var(--ui-radius-sm);
  background: var(--ui-bg-hover);
  border: 1px solid var(--ui-border);
  color: var(--ui-accent-ink);
}
.ui-list-item__body { flex: 1 1 auto; min-width: 0; }
.ui-list-item__title {
  font-size: var(--ui-fs-md);
  font-weight: 600;
  color: var(--ui-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ui-list-item__sub {
  font-size: var(--ui-fs-sm);
  color: var(--ui-text-muted);
  margin-top: 2px;
}
.ui-list-item__tail { flex: 0 0 auto; color: var(--ui-text-secondary); font-size: var(--ui-fs-base); }

/* ── Таб-бар (нижняя навигация приложения) ──────────────────────────────── */
.ui-tabbar {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: var(--ui-space-1);
  padding: var(--ui-space-2) var(--ui-space-2) calc(var(--ui-space-2) + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--ui-bg-card) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--ui-hairline);
}
.ui-tabbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1 1 0;
  min-height: var(--ui-tap);
  padding: var(--ui-space-1) 0;
  border-radius: var(--ui-radius-sm);
  color: var(--ui-text-muted);
  font-size: var(--ui-fs-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--ui-duration), background var(--ui-duration);
}
.ui-tabbar__item:hover { background: var(--ui-bg-hover); color: var(--ui-text-secondary); }
.ui-tabbar__item.is-active { color: var(--ui-accent-ink); }
.ui-tabbar__item.is-active .ic { stroke: var(--ui-accent-ink); }

/* ── Модалка ────────────────────────────────────────────────────────────── */
.ui-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--ui-space-4);
}
.ui-modal.is-open { display: flex; }
.ui-modal__backdrop {
  position: absolute;
  inset: 0;
  background: var(--bg-overlay, rgba(0, 0, 0, 0.55));
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.ui-modal__card {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 88vh;
  overflow: auto;
  background: var(--ui-bg-card);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-lg);
  box-shadow: var(--ui-shadow-lg);
  padding: var(--ui-space-5);
}
.ui-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ui-space-3);
  margin-bottom: var(--ui-space-4);
}
.ui-modal__title {
  font-family: var(--ui-font-display);
  font-size: var(--ui-fs-xl);
  font-weight: 700;
  color: var(--ui-text);
}
.ui-modal__actions {
  display: flex;
  gap: var(--ui-space-3);
  margin-top: var(--ui-space-5);
}
.ui-modal__actions > .ui-btn { flex: 1 1 0; }

/* ── Пустое состояние ───────────────────────────────────────────────────── */
.ui-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ui-space-3);
  padding: var(--ui-space-6) var(--ui-space-4);
  text-align: center;
  color: var(--ui-text-muted);
  border: 1px dashed var(--ui-border);
  border-radius: var(--ui-radius-md);
}
.ui-empty__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ui-bg-hover);
  color: var(--ui-accent-ink);
}
.ui-empty__title {
  font-family: var(--ui-font-display);
  font-size: var(--ui-fs-lg);
  font-weight: 700;
  color: var(--ui-text);
}
.ui-empty__text { font-size: var(--ui-fs-base); max-width: 34ch; line-height: var(--ui-lh-base); }

/* ── Утилиты раскладки ──────────────────────────────────────────────────── */
.ui-row { display: flex; align-items: center; gap: var(--ui-space-3); }
.ui-row--between { justify-content: space-between; }
.ui-row--wrap { flex-wrap: wrap; }
.ui-col { display: flex; flex-direction: column; gap: var(--ui-space-3); }
.ui-grid { display: grid; gap: var(--ui-space-4); }
.ui-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ui-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ui-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ui-spacer { flex: 1 1 auto; }
.ui-mt-4 { margin-top: var(--ui-space-4); }
.ui-mb-4 { margin-bottom: var(--ui-space-4); }
.ui-muted { color: var(--ui-text-muted); }
.ui-mono { font-family: var(--ui-font-mono); }
.ui-value { font-family: var(--ui-font-display); font-size: var(--ui-fs-2xl); font-weight: 700; color: var(--ui-text); }
.ui-value--accent { color: var(--ui-accent-ink); }

@media (max-width: 768px) {
  .ui-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ui-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ui-card { padding: var(--ui-space-4); }
}
@media (max-width: 480px) {
  .ui-grid--2 { grid-template-columns: 1fr; }
}

/* ── СЛОЙ 3. ИКОНКИ: единый линейный набор (SVG, stroke=currentColor) ───── */
.ic {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
  pointer-events: none;
}
.ic--sm { width: 16px; height: 16px; }
.ic--md { width: 22px; height: 22px; }
.ic--lg { width: 28px; height: 28px; }
.ic--xl { width: 34px; height: 34px; }
/* Инлайновый спрайт: сам контейнер не занимает места в потоке */
.ic-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* Модалка/оверлей/панель: контейнер иконки без влияния на базовую линию */
.ic-box { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }

/* Доступность: уважаем системную настройку «меньше анимаций» */
@media (prefers-reduced-motion: reduce) {
  .ui-btn, .ui-list-item, .ui-tabbar__item, .ui-input { transition: none; }
}

/* Иконка в строке с текстом (кнопки, заголовки, метаданные) */
.ic-inline {
  display: inline-block;
  vertical-align: -0.16em;
  margin-right: 6px;
}
.ic-inline:last-child { margin-right: 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   СЛОЙ 4. T5 — АДАПТИВ ПОД МОБИЛЬНЫЕ (mobile-first, 2026-09-19, builder)
   ТЗ T5. Дополняет T1 (слои 1–3 выше) и НЕ меняет существующие компоненты.
   Эталон: gramaton_app_new/lib/screens/main_screen.dart (нижнее меню
   с центральным шариком «Ассистент», _AssistantBall: градиент DC7FF0→7C3AED).
   Брейкпоинты: база от 360px → 480 → 768 → 1024 → 1200 → 1600.
   Все цвета — через токены (--ui-*), поэтому 5 тем работают без правок.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 4.1. Нижняя навигация приложения (fixed, safe-area, центр. кнопка) ──── */
.ui-tabbar--app {
  display: none;                       /* показывается только на мобильном */
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 80;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;                            /* T5 п.3: зазор между тач-таргетами ≥ 8px */
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--ui-bg-card) 94%, transparent);
  border-top: 1px solid var(--ui-hairline);
  box-shadow: 0 -8px 26px rgba(0, 0, 0, 0.30);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.ui-tabbar--app .ui-tabbar__item {
  min-width: 44px;                     /* T5 п.3: ≥44×44 */
  min-height: 48px;
  gap: 3px;
  padding: 6px 2px 4px;
  border-radius: 10px;
  font-size: 12px;                     /* T5 п.4: подписи ≥12px */
  letter-spacing: 0.01em;
}
.ui-tabbar--app .ui-tabbar__item .ic { width: 22px; height: 22px; }
.ui-tabbar__label { font-size: 12px; line-height: 1.1; white-space: nowrap; }

/* Центральная кнопка «Ассистент» — пульсирующий шарик (эталон _AssistantBall) */
.ui-tabbar__center { flex: 0 0 auto; display: flex; align-items: flex-end; justify-content: center; }
.ui-fab-assistant {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; min-width: 56px; min-height: 56px;
  margin-top: -20px;
  padding: 0;
  border: 0; border-radius: 50%; cursor: pointer;
  background: linear-gradient(135deg, #DC7FF0 0%, #7C3AED 100%);
  color: #fff;
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--ui-bg-card) 72%, transparent),
    0 8px 22px rgba(124, 58, 237, 0.55);
  animation: uiAssistantPulse 1.4s ease-in-out infinite alternate;
}
.ui-fab-assistant .ic { width: 26px; height: 26px; stroke: #fff; }
.ui-fab-assistant:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ui-accent), 0 8px 22px rgba(124, 58, 237, 0.55); }
@keyframes uiAssistantPulse { from { transform: scale(0.94); } to { transform: scale(1.05); } }

/* ── 4.2. Кнопка-иконка: площадь клика ≥44×44 (T5 п.3) ───────────────────── */
.ui-iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px;
  padding: 0; margin: 0;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-sm);
  background: transparent;
  color: var(--ui-text-secondary);
  cursor: pointer;
  transition: background var(--ui-duration), color var(--ui-duration), border-color var(--ui-duration);
  -webkit-tap-highlight-color: transparent;
}
.ui-iconbtn:hover { background: var(--ui-bg-hover); color: var(--ui-text); border-color: var(--ui-border-strong); }
.ui-iconbtn:focus-visible { outline: none; box-shadow: var(--ui-focus); }

/* ── 4.3. Модалка-«bottom sheet» (T5 п.7: на мобильном — на всю ширину) ──── */
.ui-sheet__handle {
  width: 40px; height: 4px;
  margin: 0 auto 14px;
  border-radius: 2px;
  background: var(--ui-border-strong);
}
.ui-modal__text { font-size: var(--ui-fs-md); line-height: var(--ui-lh-base); color: var(--ui-text-secondary); }
.ui-modal__close { position: absolute; top: 10px; right: 10px; }

/* ── 4.4. Медиа: не выходят за контейнер, SVG масштабируются (T5 п.9) ────── */
img, picture, video, canvas, iframe, embed, object { max-width: 100%; height: auto; }
svg:not(.ic-sprite) { max-width: 100%; }

/* ── 4.5. Поля ввода ≥16px — иначе iOS зумит при фокусе (T5 п.4) ─────────── */
@media (max-width: 768px), (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  textarea, select,
  .ui-input, .ui-select, .ui-textarea { font-size: 16px; }
  .ui-input, .ui-select, .ui-textarea { min-height: 48px; }
}

/* ── 4.6. Мобильные брейкпоинты для компонентов ui-kit (T5 п.1) ─────────── */
@media (max-width: 768px) {
  .ui-tabbar--app { display: flex; }              /* нижнее меню приложения */
  .ui-modal--sheet { align-items: flex-end; padding: 0; }
  .ui-modal--sheet .ui-modal__card {
    width: 100%; max-width: 100%;
    max-height: 86dvh;
    overflow-y: auto;                              /* T5 п.7: скролл внутри */
    border-radius: var(--ui-radius-lg) var(--ui-radius-lg) 0 0;
    padding: 12px var(--ui-space-4) calc(var(--ui-space-4) + env(safe-area-inset-bottom, 0px));
    animation: uiSheetUp 0.28s ease-out;
  }
  .ui-modal--sheet .ui-modal__actions { position: sticky; bottom: 0; }
}
@keyframes uiSheetUp { from { transform: translateY(26px); opacity: 0.55; } to { transform: none; opacity: 1; } }

/* Уважаем системную настройку «меньше анимаций» */
@media (prefers-reduced-motion: reduce) {
  .ui-fab-assistant { animation: none; }
  .ui-modal--sheet .ui-modal__card { animation: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   СЛОЙ 7. T6 — ЛЕНДИНГ СЕРВИСОВ (/services.html), 2026-09-19
   ТЗ T6: лендинг сервисов «в языке» открытой дизайн-системы
   alfa-laboratory/core-components (MIT): радиусы 8/12/16 + pill 99px,
   8-шкала отступов (8/12/16/24/32/40/48/64), типографика
   48/40/30/24/20/16/14/13/12, мягкие тени, светлый фон по умолчанию.
   Бренд НЕ копируется: акцент Gramaton — золото #C9A84C / бордо #7A1F33,
   шрифты Inter + Playfair Display (не Styrene), логотип/контент — свои.

   Слой добавляется В КОНЕЦ ui-kit.css и не меняет существующие компоненты
   T1/T0/T5 (все селекторы — .lp-*, кроме двух безопасных утилитных правил
   в .lp-page-скоупе). Корректно работает в 5 темах кабинета: значения
   --lp-* берутся из --om-* активной темы.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 7.1. ТОКЕНЫ ЛЕНДИНГА ─────────────────────────────────────────────────
   База (светлая, «по умолчанию»): белый фон, тёмный текст, мягкие тени.   */
:root {
  /* Радиусы: 8 / 12 / 16 + pill (язык эталона) */
  --lp-radius-s: 8px;
  --lp-radius-m: 12px;
  --lp-radius-l: 16px;
  --lp-radius-pill: 99px;

  /* 8-шкала отступов */
  --lp-sp-1: 8px;
  --lp-sp-2: 12px;
  --lp-sp-3: 16px;
  --lp-sp-4: 24px;
  --lp-sp-5: 32px;
  --lp-sp-6: 40px;
  --lp-sp-7: 48px;
  --lp-sp-8: 64px;

  /* Типографика: 12/13/14/16/20/24/30/40/48 */
  --lp-fs-12: 12px;
  --lp-fs-13: 13px;
  --lp-fs-14: 14px;
  --lp-fs-16: 16px;
  --lp-fs-20: 20px;
  --lp-fs-24: 24px;
  --lp-fs-30: 30px;
  --lp-fs-40: 40px;
  --lp-fs-48: 48px;

  --lp-font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --lp-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Палитра (светлая) */
  --lp-bg: #ffffff;
  --lp-surface: #ffffff;
  --lp-surface-2: #f6f7f9;
  --lp-hover: rgba(26, 29, 33, 0.05);
  --lp-text: #1a1d21;            /* 16.4:1 на #fff */
  --lp-text-2: #4a5158;          /* 8.6:1  на #fff */
  --lp-text-3: #6b7480;          /* 5.0:1  на #fff */
  --lp-border: #e4e7eb;
  --lp-border-strong: #cdd3da;
  --lp-accent: #c9a84c;          /* золото Gramaton — графика/фон */
  --lp-accent-ink: #7a5f1e;      /* золото для ТЕКСТА (7.3:1 на #fff) */
  --lp-accent-contrast: #ffffff; /* текст поверх золота/бордо */
  --lp-accent-soft: rgba(201, 168, 76, 0.14);
  --lp-accent-border: rgba(201, 168, 76, 0.42);
  --lp-bordeaux: #7a1f33;        /* бордо Gramaton — вторичный акцент */
  --lp-success: #12703f;         /* 5.4:1 на #fff */
  --lp-success-soft: rgba(18, 112, 63, 0.10);
  --lp-icon-bg: #f6f7f9;

  /* Мягкие тени (низкая интенсивность, как в эталоне) */
  --lp-shadow-s: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --lp-shadow-m: 0 0 16px rgba(16, 24, 40, 0.05), 0 8px 16px rgba(16, 24, 40, 0.08);
  --lp-shadow-l: 0 0 24px rgba(16, 24, 40, 0.07), 0 12px 28px rgba(16, 24, 40, 0.12);
  --lp-duration: 200ms cubic-bezier(0.22, 1, 0.36, 1);
  --lp-focus: 0 0 0 2px var(--lp-bg), 0 0 0 4px var(--lp-accent-ink);
}

/* Тёмные темы кабинета → лендинг берёт их палитру (проверено контрастами) */
[data-theme="cosmic"], [data-theme="old-money"], [data-theme="neon"], [data-theme="royal"] {
  --lp-bg: var(--om-bg, #05010e);
  --lp-surface: var(--om-bg-card, #0c0820);
  --lp-surface-2: var(--om-bg-elevated, #1a0f2e);
  --lp-hover: rgba(255, 255, 255, 0.06);
  --lp-text: var(--om-text, #f0edfc);
  --lp-text-2: var(--om-text-secondary, rgba(240, 237, 252, 0.68));
  --lp-text-3: var(--om-text-muted, rgba(240, 237, 252, 0.62));
  --lp-border: var(--om-gold-border-light, rgba(201, 168, 76, 0.16));
  --lp-border-strong: var(--om-gold-border, rgba(201, 168, 76, 0.32));
  --lp-accent: var(--om-gold, #c9a84c);
  --lp-accent-ink: var(--om-gold, #c9a84c);
  --lp-accent-soft: rgba(201, 168, 76, 0.12);
  --lp-accent-border: var(--om-gold-border, rgba(201, 168, 76, 0.32));
  --lp-success: var(--om-success, #4abb5e);
  --lp-success-soft: rgba(74, 187, 94, 0.14);
  --lp-icon-bg: var(--om-gold-pale, rgba(201, 168, 76, 0.06));
  --lp-shadow-s: var(--om-shadow-sm, 0 2px 10px rgba(0, 0, 0, 0.30));
  --lp-shadow-m: var(--om-shadow, 0 6px 26px rgba(0, 0, 0, 0.40));
  --lp-shadow-l: var(--om-shadow-lg, 0 12px 40px rgba(0, 0, 0, 0.45));
  --lp-focus: 0 0 0 2px var(--lp-bg), 0 0 0 4px var(--lp-accent);
}

/* Тема «Крем» — тоже светлая, но с кремовой бумагой и своими акцентами */
[data-theme="cream"] {
  --lp-bg: var(--om-bg, #faf6ef);
  --lp-surface: var(--om-bg-card, #fffdf8);
  --lp-surface-2: var(--om-bg-sunken, #f6f0e4);
  --lp-hover: rgba(90, 70, 34, 0.06);
  --lp-text: var(--om-text, #2c2318);
  --lp-text-2: var(--om-text-secondary, #4e4536);
  --lp-text-3: var(--om-text-muted, #6b6152);
  --lp-border: var(--om-gold-border-light, rgba(140, 108, 44, 0.16));
  --lp-border-strong: var(--om-gold-border, rgba(140, 108, 44, 0.32));
  --lp-accent: var(--om-gold, #a8842c);
  --lp-accent-ink: var(--om-gold-ink, #8a6a22);
  --lp-accent-soft: var(--om-gold-tint, rgba(168, 132, 44, 0.14));
  --lp-accent-border: var(--om-gold-border, rgba(140, 108, 44, 0.32));
  --lp-success: var(--om-success, #2f6b3c);
  --lp-success-soft: rgba(47, 107, 60, 0.12);
  --lp-icon-bg: var(--om-bg-sunken, #f6f0e4);
  --lp-shadow-s: var(--om-shadow-sm, 0 2px 10px rgba(90, 70, 34, 0.07));
  --lp-shadow-m: var(--om-shadow, 0 8px 30px rgba(90, 70, 34, 0.10));
  --lp-shadow-l: var(--om-shadow-lg, 0 16px 44px rgba(90, 70, 34, 0.14));
  --lp-focus: 0 0 0 2px var(--lp-bg), 0 0 0 4px var(--lp-accent-ink);
}

/* ── 7.2. КАРКАС ─────────────────────────────────────────────────────────── */
.lp-page {
  /* Локально переопределяем токены ui-kit — если ниже используются ui-*
     компоненты (иконки, бейджи), они наследуют палитру лендинга. */
  --ui-bg: var(--lp-bg);
  --ui-bg-card: var(--lp-surface);
  --ui-text: var(--lp-text);
  --ui-text-secondary: var(--lp-text-2);
  --ui-text-muted: var(--lp-text-3);
  --ui-accent: var(--lp-accent-ink);
  --ui-border: var(--lp-border);
  --ui-border-strong: var(--lp-border-strong);

  margin: 0;
  background: var(--lp-bg);
  color: var(--lp-text);
  font-family: var(--lp-font-body);
  font-size: var(--lp-fs-16);
  line-height: 1.5;
  overflow-x: hidden;                 /* страховка: без горизонтального скролла */
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); /* место под tabbar */
}
@media (min-width: 768px) { .lp-page { padding-bottom: 0; } }
.lp-page * { box-sizing: border-box; }
.lp-page h1, .lp-page h2, .lp-page h3 { font-family: var(--lp-font-display); margin: 0; }
.lp-page p { margin: 0; }
.lp-page img, .lp-page svg { max-width: 100%; }
.lp-page a { color: inherit; }
.lp-page :focus-visible { outline: none; box-shadow: var(--lp-focus); border-radius: var(--lp-radius-s); }

.lp-container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--lp-sp-3); }
@media (min-width: 768px) { .lp-container { padding: 0 var(--lp-sp-4); } }
@media (min-width: 1440px) { .lp-container { max-width: 1280px; padding: 0 var(--lp-sp-5); } }

.lp-section { padding: var(--lp-sp-6) 0; }
@media (min-width: 1024px) { .lp-section { padding: var(--lp-sp-8) 0; } }

.lp-skip {
  position: absolute; left: var(--lp-sp-2); top: -60px; z-index: 200;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--lp-sp-3);
  background: var(--lp-accent); color: var(--lp-accent-contrast);
  border-radius: var(--lp-radius-pill); font-weight: 600; text-decoration: none;
  transition: top var(--lp-duration);
}
.lp-skip:focus { top: var(--lp-sp-2); }

.lp-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Заголовки секций */
.lp-eyebrow {
  display: inline-flex; align-items: center; gap: var(--lp-sp-1);
  font-size: var(--lp-fs-13); font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--lp-accent-ink);
}
.lp-h1 { font-size: var(--lp-fs-30); line-height: 1.12; font-weight: 600; letter-spacing: -0.01em; }
@media (min-width: 768px) { .lp-h1 { font-size: var(--lp-fs-40); } }
@media (min-width: 1024px) { .lp-h1 { font-size: var(--lp-fs-48); line-height: 1.08; } }
.lp-h2 { font-size: var(--lp-fs-24); line-height: 1.18; font-weight: 600; }
@media (min-width: 768px) { .lp-h2 { font-size: var(--lp-fs-30); } }
.lp-h3 { font-size: var(--lp-fs-20); line-height: 1.25; font-weight: 600; }
.lp-lead { font-size: var(--lp-fs-16); line-height: 1.55; color: var(--lp-text-2); max-width: 62ch; }
.lp-note { font-size: var(--lp-fs-13); color: var(--lp-text-3); }

/* ── 7.3. КНОПКИ (pill) ────────────────────────────────────────────────── */
.lp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--lp-sp-1);
  min-height: 44px; padding: 0 var(--lp-sp-4);
  border: 1px solid transparent; border-radius: var(--lp-radius-pill);
  font-family: var(--lp-font-body); font-size: var(--lp-fs-14); font-weight: 600;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform var(--lp-duration), background var(--lp-duration),
              border-color var(--lp-duration), box-shadow var(--lp-duration), color var(--lp-duration);
  -webkit-tap-highlight-color: transparent;
}
.lp-btn .ic { width: 18px; height: 18px; }
.lp-btn--primary { background: var(--lp-accent); color: var(--lp-accent-contrast); box-shadow: var(--lp-shadow-s); }
.lp-btn--primary:hover { transform: translateY(-1px); box-shadow: var(--lp-shadow-m); }
.lp-btn--bordeaux { background: var(--lp-bordeaux); color: #ffffff; box-shadow: var(--lp-shadow-s); }
.lp-btn--bordeaux:hover { transform: translateY(-1px); box-shadow: var(--lp-shadow-m); }
.lp-btn--secondary { background: var(--lp-surface); border-color: var(--lp-border-strong); color: var(--lp-text); }
.lp-btn--secondary:hover { background: var(--lp-hover); }
.lp-btn--ghost { background: transparent; color: var(--lp-text-2); }
.lp-btn--ghost:hover { background: var(--lp-hover); color: var(--lp-text); }
.lp-btn--sm { min-height: 44px; padding: 0 var(--lp-sp-3); font-size: var(--lp-fs-13); }
.lp-btn[disabled], .lp-btn.is-disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }
.lp-cta-row { display: flex; flex-wrap: wrap; gap: var(--lp-sp-2); align-items: center; }

/* ── 7.4. STICKY-ХЕДЕР ─────────────────────────────────────────────────── */
.lp-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--lp-bg) 86%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--lp-border);
  transition: background var(--lp-duration), border-color var(--lp-duration);
}
.lp-header__inner { display: flex; align-items: center; gap: var(--lp-sp-2); min-height: 68px; transition: min-height var(--lp-duration); }
.lp-header.is-compact .lp-header__inner { min-height: 56px; }
.lp-logo {
  display: inline-flex; align-items: center; gap: var(--lp-sp-1);
  font-family: var(--lp-font-display); font-size: var(--lp-fs-20); font-weight: 700;
  text-decoration: none; color: var(--lp-text); min-height: 44px; white-space: nowrap;
}
.lp-logo__dot { color: var(--lp-accent); }
.lp-logo__mark {
  width: 28px; height: 28px; border-radius: var(--lp-radius-s);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--lp-accent-soft); border: 1px solid var(--lp-accent-border);
  color: var(--lp-accent-ink);
}
.lp-logo__mark .ic { width: 16px; height: 16px; }

.lp-nav { display: none; align-items: center; gap: 2px; margin-left: var(--lp-sp-2); }
.lp-nav__link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--lp-sp-2);
  border-radius: var(--lp-radius-pill); font-size: var(--lp-fs-14); font-weight: 500;
  color: var(--lp-text-2); text-decoration: none; transition: background var(--lp-duration), color var(--lp-duration);
}
.lp-nav__link:hover { background: var(--lp-hover); color: var(--lp-text); }
.lp-header__actions { display: flex; align-items: center; gap: var(--lp-sp-1); margin-left: auto; }

.lp-search { display: none; position: relative; align-items: center; }
.lp-search__icon { position: absolute; left: 12px; color: var(--lp-text-3); pointer-events: none; }
.lp-search__input {
  min-height: 44px; width: 210px; padding: 0 40px 0 38px;
  border: 1px solid var(--lp-border); border-radius: var(--lp-radius-pill);
  background: var(--lp-surface-2); color: var(--lp-text);
  font-family: var(--lp-font-body); font-size: var(--lp-fs-16);
}
.lp-search__input::placeholder { color: var(--lp-text-3); }
.lp-search__reset {
  position: absolute; right: 4px; width: 36px; height: 36px; padding: 0;
  display: none; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--lp-text-3); cursor: pointer;
}
.lp-search__input:not(:placeholder-shown) ~ .lp-search__reset { display: inline-flex; }

.lp-burger {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0;
  border: 1px solid var(--lp-border); border-radius: var(--lp-radius-s);
  background: var(--lp-surface); color: var(--lp-text); cursor: pointer;
}
.lp-burger[aria-expanded="true"] { background: var(--lp-accent-soft); border-color: var(--lp-accent-border); color: var(--lp-accent-ink); }

@media (min-width: 1024px) {
  .lp-nav, .lp-search { display: flex; }
  .lp-burger { display: none; }
}

/* Переключатель тем: цветовой индикатор + текст (без цветных эмодзи) */
.lp-themes { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--lp-border); border-radius: var(--lp-radius-pill); background: var(--lp-surface-2); }
.lp-theme__btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 var(--lp-sp-2);
  border: 0; border-radius: var(--lp-radius-pill); background: transparent;
  color: var(--lp-text-2); font-family: var(--lp-font-body); font-size: var(--lp-fs-13);
  font-weight: 500; cursor: pointer; transition: background var(--lp-duration), color var(--lp-duration);
}
.lp-theme__btn:hover { background: var(--lp-hover); color: var(--lp-text); }
.lp-theme__btn.is-active { background: var(--lp-accent-soft); color: var(--lp-accent-ink); }
.lp-theme__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--lp-dot, var(--lp-accent)); box-shadow: 0 0 0 1px var(--lp-border-strong) inset; }
.lp-themes--header { display: none; }
@media (min-width: 1200px) { .lp-themes--header { display: flex; } }

/* Мобильное меню-панель */
.lp-mobilemenu {
  position: fixed; inset: 0 0 auto 0; top: 0; z-index: 90;
  max-height: 100dvh; overflow-y: auto;
  padding: var(--lp-sp-3) var(--lp-sp-3) calc(var(--lp-sp-5) + env(safe-area-inset-bottom, 0px));
  background: var(--lp-bg); border-bottom: 1px solid var(--lp-border);
  box-shadow: var(--lp-shadow-l);
}
.lp-mobilemenu[hidden] { display: none; }
.lp-mobilemenu__head { display: flex; align-items: center; justify-content: space-between; gap: var(--lp-sp-2); margin-bottom: var(--lp-sp-3); }
.lp-mobilemenu__nav { display: flex; flex-direction: column; gap: 2px; margin-bottom: var(--lp-sp-3); }
.lp-mobilemenu__nav a {
  display: flex; align-items: center; min-height: 48px; padding: 0 var(--lp-sp-2);
  border-radius: var(--lp-radius-m); font-size: var(--lp-fs-16); font-weight: 500; text-decoration: none;
}
.lp-mobilemenu__nav a:hover { background: var(--lp-hover); }
.lp-mobilemenu__group-title { font-size: var(--lp-fs-12); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lp-text-3); margin: var(--lp-sp-2) 0 var(--lp-sp-1); }
.lp-mobilemenu__cta { display: flex; flex-direction: column; gap: var(--lp-sp-1); margin-top: var(--lp-sp-3); }
.lp-mobilemenu__cta .lp-btn { width: 100%; }
body.lp-noscroll { overflow: hidden; }

/* ── 7.5. HERO + СЛАЙДЕР ───────────────────────────────────────────────── */
.lp-hero { position: relative; overflow: hidden; padding: var(--lp-sp-5) 0 var(--lp-sp-4); }
.lp-hero__glow {
  position: absolute; inset: -20% -10% auto -10%; height: 380px; pointer-events: none;
  background:
    radial-gradient(38% 60% at 18% 30%, var(--lp-accent-soft) 0%, transparent 70%),
    radial-gradient(30% 50% at 78% 12%, rgba(122, 31, 51, 0.10) 0%, transparent 72%);
}
.lp-hero__grid { position: relative; display: grid; gap: var(--lp-sp-4); }
@media (min-width: 1024px) { .lp-hero__grid { grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: var(--lp-sp-6); } }
.lp-hero__copy { display: flex; flex-direction: column; gap: var(--lp-sp-2); }
.lp-hero__facts { display: flex; flex-wrap: wrap; gap: var(--lp-sp-2) var(--lp-sp-3); margin-top: 2px; }
.lp-fact { display: inline-flex; align-items: center; gap: 6px; font-size: var(--lp-fs-13); color: var(--lp-text-2); }
.lp-fact .ic { width: 16px; height: 16px; color: var(--lp-accent-ink); }

.lp-slider {
  position: relative; display: flex; flex-direction: column; gap: var(--lp-sp-3);
  padding: var(--lp-sp-4); border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-l); background: var(--lp-surface); box-shadow: var(--lp-shadow-m);
}
.lp-slider__track { position: relative; min-height: 168px; }
@media (min-width: 768px) { .lp-slider__track { min-height: 150px; } }
.lp-slide {
  position: absolute; inset: 0; opacity: 0; transform: translateY(8px);
  transition: opacity var(--lp-duration), transform var(--lp-duration);
  visibility: hidden; display: flex; flex-direction: column; gap: var(--lp-sp-2);
}
.lp-slide.is-active { position: relative; opacity: 1; transform: none; visibility: visible; }
.lp-slide__top { display: flex; align-items: center; gap: var(--lp-sp-2); }
.lp-slide__icon {
  width: 44px; height: 44px; border-radius: var(--lp-radius-m);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--lp-accent-soft); border: 1px solid var(--lp-accent-border); color: var(--lp-accent-ink);
}
.lp-slide__icon .ic { width: 22px; height: 22px; }
.lp-slide__title { font-family: var(--lp-font-display); font-size: var(--lp-fs-20); font-weight: 600; }
.lp-slide__text { font-size: var(--lp-fs-14); color: var(--lp-text-2); }
.lp-slide__link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: var(--lp-fs-14); font-weight: 600; color: var(--lp-accent-ink); text-decoration: none; }
.lp-slide__link:hover { text-decoration: underline; }
.lp-slider__nav { display: flex; align-items: center; justify-content: space-between; gap: var(--lp-sp-2); border-top: 1px solid var(--lp-border); padding-top: var(--lp-sp-2); }
.lp-dots { display: flex; align-items: center; gap: 2px; }
.lp-dots__btn {
  width: 44px; height: 44px; padding: 0; border: 0; background: transparent;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.lp-dots__btn::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--lp-border-strong); transition: background var(--lp-duration), width var(--lp-duration); }
.lp-dots__btn.is-active::before { width: 22px; border-radius: var(--lp-radius-pill); background: var(--lp-accent); }
.lp-slider__arrows { display: flex; gap: var(--lp-sp-1); }
.lp-slider__arrow {
  width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--lp-border); border-radius: 50%; background: var(--lp-surface);
  color: var(--lp-text); cursor: pointer; transition: background var(--lp-duration), border-color var(--lp-duration);
}
.lp-slider__arrow:hover { background: var(--lp-hover); border-color: var(--lp-border-strong); }

/* ── 7.6. БЫСТРЫЕ ДЕЙСТВИЯ ──────────────────────────────────────────────── */
.lp-quick { padding-bottom: var(--lp-sp-4); }
.lp-quick__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--lp-sp-1); }
@media (min-width: 768px) { .lp-quick__list { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--lp-sp-2); } }
.lp-quick__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 84px; padding: var(--lp-sp-1);
  border: 1px solid var(--lp-border); border-radius: var(--lp-radius-m);
  background: var(--lp-surface); color: var(--lp-text);
  font-size: var(--lp-fs-12); font-weight: 500; text-align: center; text-decoration: none;
  transition: transform var(--lp-duration), box-shadow var(--lp-duration), border-color var(--lp-duration);
}
.lp-quick__item:hover { transform: translateY(-2px); box-shadow: var(--lp-shadow-m); border-color: var(--lp-accent-border); }
.lp-quick__icon { width: 34px; height: 34px; border-radius: var(--lp-radius-s); display: inline-flex; align-items: center; justify-content: center; background: var(--lp-icon-bg); color: var(--lp-accent-ink); }
.lp-quick__icon .ic { width: 20px; height: 20px; }

/* ── 7.7. СЕТКА 15 СЕРВИСОВ ────────────────────────────────────────────── */
.lp-section__head { display: flex; flex-direction: column; gap: var(--lp-sp-2); margin-bottom: var(--lp-sp-4); }
@media (min-width: 768px) { .lp-section__head { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: var(--lp-sp-4); } }
.lp-section__head-copy { display: flex; flex-direction: column; gap: var(--lp-sp-1); }

.lp-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--lp-sp-1); }
@media (min-width: 768px) { .lp-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--lp-sp-2); } }
@media (min-width: 1024px) { .lp-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--lp-sp-3); } }
@media (min-width: 1440px) { .lp-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.lp-tile {
  position: relative; display: flex; flex-direction: column; gap: var(--lp-sp-1);
  min-height: 148px; padding: var(--lp-sp-2);
  border: 1px solid var(--lp-border); border-radius: var(--lp-radius-m);
  background: var(--lp-surface); color: var(--lp-text); text-decoration: none;
  transition: transform var(--lp-duration), box-shadow var(--lp-duration), border-color var(--lp-duration);
}
.lp-tile[hidden] { display: none; }
.lp-tile:hover { transform: translateY(-2px); box-shadow: var(--lp-shadow-m); border-color: var(--lp-accent-border); }
.lp-tile__icon {
  width: 40px; height: 40px; border-radius: var(--lp-radius-m);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--lp-icon-bg); border: 1px solid var(--lp-border); color: var(--lp-accent-ink);
}
.lp-tile__icon .ic { width: 22px; height: 22px; }
.lp-tile__name { font-size: var(--lp-fs-14); font-weight: 600; line-height: 1.25; }
.lp-tile__desc { font-size: var(--lp-fs-12); line-height: 1.35; color: var(--lp-text-2); }
.lp-tile__badge { margin-top: auto; align-self: flex-start; }
.lp-tile--soon { background: var(--lp-surface-2); }
.lp-tile--soon .lp-tile__name { color: var(--lp-text-2); }
.lp-tile--soon .lp-tile__icon { color: var(--lp-text-3); }
.lp-tile--soon:hover { transform: none; border-color: var(--lp-border); box-shadow: none; }

.lp-badge {
  display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 var(--lp-sp-1);
  border-radius: var(--lp-radius-pill); border: 1px solid var(--lp-border);
  font-size: var(--lp-fs-12); font-weight: 600; color: var(--lp-text-2); background: var(--lp-surface);
}
.lp-badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.lp-badge--live { color: var(--lp-success); background: var(--lp-success-soft); border-color: transparent; }
.lp-badge--soon { color: var(--lp-text-3); background: var(--lp-surface-2); }
.lp-search-empty { padding: var(--lp-sp-4); text-align: center; color: var(--lp-text-2); font-size: var(--lp-fs-14); }
.lp-search-empty[hidden] { display: none; }
.lp-tiles-note { margin-top: var(--lp-sp-3); }

/* ── 7.8. ЦИФРЫ ЭКОСИСТЕМЫ ────────────────────────────────────────────── */
.lp-numbers[hidden] { display: none; }
.lp-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--lp-sp-2); }
@media (min-width: 768px) { .lp-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--lp-sp-3); } }
.lp-stat {
  display: flex; flex-direction: column; gap: 6px; padding: var(--lp-sp-3);
  border: 1px solid var(--lp-border); border-radius: var(--lp-radius-l);
  background: var(--lp-surface); box-shadow: var(--lp-shadow-s);
}
.lp-stat__value { font-family: var(--lp-font-display); font-size: var(--lp-fs-30); font-weight: 600; line-height: 1.1; }
@media (min-width: 1024px) { .lp-stat__value { font-size: var(--lp-fs-40); } }
.lp-stat__label { font-size: var(--lp-fs-13); color: var(--lp-text-2); }

/* ── 7.9. ПОЧЕМУ GRAMATON ─────────────────────────────────────────────── */
.lp-cards { display: grid; gap: var(--lp-sp-2); }
@media (min-width: 768px) { .lp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--lp-sp-3); } }
@media (min-width: 1024px) { .lp-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.lp-card {
  display: flex; flex-direction: column; gap: var(--lp-sp-1);
  padding: var(--lp-sp-4); border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-l); background: var(--lp-surface); box-shadow: var(--lp-shadow-s);
}
.lp-card__icon {
  width: 44px; height: 44px; border-radius: var(--lp-radius-m);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--lp-accent-soft); border: 1px solid var(--lp-accent-border); color: var(--lp-accent-ink);
}
.lp-card__icon .ic { width: 22px; height: 22px; }
.lp-card__text { font-size: var(--lp-fs-14); color: var(--lp-text-2); }

/* ── 7.10. МОБИЛЬНОЕ ПРИЛОЖЕНИЕ ───────────────────────────────────────── */
.lp-app__grid { display: grid; gap: var(--lp-sp-4); }
@media (min-width: 1024px) { .lp-app__grid { grid-template-columns: 0.9fr 1.1fr; align-items: center; gap: var(--lp-sp-6); } }
.lp-app__panel {
  display: flex; flex-direction: column; gap: var(--lp-sp-3);
  padding: var(--lp-sp-4); border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-l); background: var(--lp-surface); box-shadow: var(--lp-shadow-s);
}
.lp-app__row { display: flex; flex-wrap: wrap; gap: var(--lp-sp-4); align-items: center; }
.lp-qr {
  display: flex; flex-direction: column; gap: var(--lp-sp-1); align-items: center;
  padding: var(--lp-sp-2); border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-m); background: #ffffff;
}
.lp-qr img { width: 148px; height: 148px; display: block; }
.lp-qr__caption { font-size: var(--lp-fs-12); color: #4a5158; text-align: center; max-width: 160px; }
.lp-app__meta { display: flex; flex-direction: column; gap: var(--lp-sp-1); font-size: var(--lp-fs-13); color: var(--lp-text-2); }
.lp-app__meta strong { color: var(--lp-text); }
.lp-shots { display: flex; gap: var(--lp-sp-3); overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px var(--lp-sp-2); -webkit-overflow-scrolling: touch; }
.lp-phone {
  flex: 0 0 auto; width: 214px; scroll-snap-align: start;
  padding: 8px; border: 1px solid var(--lp-border); border-radius: 30px;
  background: var(--lp-surface); box-shadow: var(--lp-shadow-l);
}
.lp-phone__screen { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 24px; background: var(--lp-surface-2); min-height: 348px; }
.lp-phone__bar { width: 62px; height: 5px; border-radius: var(--lp-radius-pill); background: var(--lp-border-strong); margin: 0 auto 4px; }
.lp-phone__title { font-family: var(--lp-font-display); font-size: var(--lp-fs-16); font-weight: 600; }
.lp-phone__label { font-size: var(--lp-fs-12); color: var(--lp-text-3); }
.lp-phone__balance { padding: 10px; border-radius: var(--lp-radius-m); background: var(--lp-surface); border: 1px solid var(--lp-border); }
.lp-phone__amount { font-family: var(--lp-font-display); font-size: var(--lp-fs-20); font-weight: 600; }
.lp-phone__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.lp-phone__tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: var(--lp-radius-s); background: var(--lp-surface); border: 1px solid var(--lp-border); font-size: 9px; color: var(--lp-text-2); text-align: center; }
.lp-phone__tile .ic { width: 16px; height: 16px; color: var(--lp-accent-ink); }
.lp-phone__row { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: var(--lp-radius-s); background: var(--lp-surface); border: 1px solid var(--lp-border); font-size: 11px; }
.lp-phone__row .ic { width: 16px; height: 16px; color: var(--lp-accent-ink); }
.lp-phone__tabs { display: flex; justify-content: space-around; align-items: center; gap: 4px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--lp-border); }
.lp-phone__tabs .ic { width: 18px; height: 18px; color: var(--lp-text-3); }
.lp-shots__caption { font-size: var(--lp-fs-12); color: var(--lp-text-3); margin-top: var(--lp-sp-1); }

/* ── 7.11. КАК НАЧАТЬ ─────────────────────────────────────────────────── */
.lp-steps { display: grid; gap: var(--lp-sp-2); counter-reset: lpstep; }
@media (min-width: 768px) { .lp-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--lp-sp-3); } }
.lp-step { display: flex; flex-direction: column; gap: var(--lp-sp-1); padding: var(--lp-sp-4); border: 1px solid var(--lp-border); border-radius: var(--lp-radius-l); background: var(--lp-surface); }
.lp-step__num {
  width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--lp-accent-soft); border: 1px solid var(--lp-accent-border);
  color: var(--lp-accent-ink); font-weight: 700; font-size: var(--lp-fs-14);
}
.lp-step__text { font-size: var(--lp-fs-14); color: var(--lp-text-2); }
.lp-step__link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: var(--lp-fs-14); font-weight: 600; color: var(--lp-accent-ink); text-decoration: none; }
.lp-step__link:hover { text-decoration: underline; }

/* ── 7.12. FAQ ─────────────────────────────────────────────────────────── */
.lp-faq { display: flex; flex-direction: column; gap: var(--lp-sp-1); max-width: 900px; }
.lp-faq__item { border: 1px solid var(--lp-border); border-radius: var(--lp-radius-m); background: var(--lp-surface); overflow: hidden; }
.lp-faq__q {
  display: flex; align-items: center; justify-content: space-between; gap: var(--lp-sp-2);
  min-height: 60px; padding: var(--lp-sp-2) var(--lp-sp-3);
  font-size: var(--lp-fs-16); font-weight: 600; cursor: pointer; list-style: none;
}
.lp-faq__q::-webkit-details-marker { display: none; }
.lp-faq__q:focus-visible { outline: none; box-shadow: inset var(--lp-focus); }
.lp-faq__icon { color: var(--lp-text-3); transition: transform var(--lp-duration); flex: 0 0 auto; }
.lp-faq__item[open] .lp-faq__icon { transform: rotate(180deg); }
.lp-faq__item[open] { border-color: var(--lp-accent-border); }
.lp-faq__a { padding: 0 var(--lp-sp-3) var(--lp-sp-3); font-size: var(--lp-fs-14); line-height: 1.6; color: var(--lp-text-2); max-width: 78ch; }
.lp-faq__a a { color: var(--lp-accent-ink); }
@media (prefers-reduced-motion: reduce) { .lp-faq__icon { transition: none; } }

/* ── 7.13. ФУТЕР ──────────────────────────────────────────────────────── */
.lp-footer { border-top: 1px solid var(--lp-border); background: var(--lp-surface-2); padding: var(--lp-sp-5) 0 calc(var(--lp-sp-4) + env(safe-area-inset-bottom, 0px)); }
.lp-footer__grid { display: grid; gap: var(--lp-sp-4); }
@media (min-width: 768px) { .lp-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .lp-footer__grid { grid-template-columns: 1.2fr 1fr 1fr 1.3fr; gap: var(--lp-sp-5); } }
.lp-footer__col { display: flex; flex-direction: column; gap: 2px; }
.lp-footer__title { font-size: var(--lp-fs-12); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lp-text-3); margin-bottom: var(--lp-sp-1); }
.lp-footer__link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: var(--lp-fs-14); color: var(--lp-text-2); text-decoration: none; }
.lp-footer__link:hover { color: var(--lp-text); text-decoration: underline; }
.lp-footer__requisites { font-size: var(--lp-fs-12); line-height: 1.6; color: var(--lp-text-3); }
.lp-footer__bottom { display: flex; flex-wrap: wrap; gap: var(--lp-sp-2); align-items: center; justify-content: space-between; margin-top: var(--lp-sp-4); padding-top: var(--lp-sp-3); border-top: 1px solid var(--lp-border); }
.lp-footer__legal { display: flex; flex-wrap: wrap; gap: var(--lp-sp-1) var(--lp-sp-3); font-size: var(--lp-fs-12); color: var(--lp-text-3); }

/* ── 7.14. МОБИЛЬНОЕ НИЖНЕЕ МЕНЮ + ЛИПКИЙ CTA (как в приложении) ──────── */
.lp-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  display: flex; align-items: center; justify-content: space-around; gap: 2px;
  padding: 6px var(--lp-sp-1) calc(6px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--lp-bg) 92%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  border-top: 1px solid var(--lp-border);
}
.lp-tabbar__item {
  flex: 1 1 0; min-width: 56px; min-height: 52px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: var(--lp-radius-m); font-size: 11px; font-weight: 500;
  color: var(--lp-text-3); text-decoration: none;
}
.lp-tabbar__item .ic { width: 22px; height: 22px; }
.lp-tabbar__item.is-active { color: var(--lp-accent-ink); background: var(--lp-accent-soft); }
.lp-tabbar__cta {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 var(--lp-sp-3); margin: 0 2px;
  border-radius: var(--lp-radius-pill); background: var(--lp-accent); color: var(--lp-accent-contrast);
  font-size: var(--lp-fs-13); font-weight: 700; text-decoration: none; box-shadow: var(--lp-shadow-m);
}
.lp-tabbar__cta .ic { width: 18px; height: 18px; }
@media (min-width: 768px) { .lp-tabbar { display: none; } }

/* ── 7.15. ПОЯВЛЕНИЕ СЕКЦИЙ ───────────────────────────────────────────── */
.lp-reveal { opacity: 0; transform: translateY(10px); transition: opacity 280ms ease, transform 280ms ease; }
.lp-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .lp-reveal { opacity: 1; transform: none; transition: none; }
  .lp-slide, .lp-tile, .lp-quick__item, .lp-btn { transition: none; }
}

/* ── 7.16. T6: инлайн-форма поиска (секция сервисов + панель меню) ──────── */
.lp-search--inline { display: flex; width: 100%; max-width: 520px; margin-bottom: var(--lp-sp-3); }
.lp-search--inline .lp-search__input { width: 100%; }
.lp-mobilemenu .lp-search--inline { max-width: none; margin: 0 0 var(--lp-sp-3); }
@media (min-width: 1024px) {
  .lp-search--inline { display: none; }                     /* на десктопе — поиск в хедере */
  .lp-mobilemenu .lp-search--inline { display: flex; }      /* внутри панели меню — всегда */
}

/* ── 7.17. T6: гарантированный контраст вторичных подписей и тач-таргет поиска
   Расчёт (sRGB, WCAG 2.1): все пары текста лендинга ≥ 4.5:1 в каждой из тем.
   Значения --lp-text-3 выводятся color-mix'ом из токенов темы, поэтому при
   смене палитры темы контраст не «проваливается» (см. отчёт T6, §контраст). */
:root { --lp-text-3: #5f6874; }                    /* 5.65:1 на #fff, 5.25:1 на #f6f7f9 */
[data-theme="cosmic"], [data-theme="old-money"], [data-theme="neon"], [data-theme="royal"] {
  --lp-text-3: var(--om-text-muted, rgba(240, 237, 252, 0.62));
  --lp-text-3: color-mix(in srgb, var(--om-text, #f0edfc) 72%, var(--om-bg, #05010e));
}
[data-theme="cream"] {
  --lp-text-3: var(--om-text-muted, #6b6152);
  --lp-text-3: color-mix(in srgb, var(--om-text, #2c2318) 70%, var(--om-bg, #faf6ef));
}
.lp-search__input { padding-right: 48px; }
.lp-search__reset { right: 0; width: 44px; height: 44px; }

/* ── 7.18. T6: контраст primary-кнопки (текст-«чернила» на золоте) и
   тач-таргеты inline-ссылок в тексте (≥44px). Значения рассчитаны по WCAG 2.1:
   #1d1600 на #c9a84c = 5.9:1; на тёмных темах берём --om-gold-contrast темы
   (#120e08 на #c9a84c ≈ 8.4:1; в «Неоне» #120e08 на #C084FC ≈ 7.1:1). */
:root { --lp-accent-contrast: #1d1600; }
[data-theme="cosmic"], [data-theme="old-money"], [data-theme="neon"], [data-theme="royal"] {
  --lp-accent-contrast: var(--om-gold-contrast, #120e08);
}
[data-theme="cream"] { --lp-accent-contrast: var(--om-gold-contrast, #241c12); }
.lp-inlink { display: inline-block; padding: 14px 0; }

/* ── 7.19. T6: мобильный блок приложения — мета-колонка сжимается (без h-скролла)
   Проверка 390px: до правки .lp-app__meta не сжималась и «выдавливала» страницу
   до 694px; после — flex:1 1 220px + min-width:0 → ширина 390 = innerWidth. */
.lp-app__row { flex-wrap: wrap; align-items: flex-start; }
.lp-app__meta { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.lp-qr { flex: 0 0 auto; }

/* ── 7.20. T6: устранение горизонтального скролла на мобильных (360/390/414)
   Причина: в блоке приложения горизонтальная лента «скриншотов» (.lp-shots,
   3 макета по 214px) задавала min-content грид-колонке 674px, из-за чего
   страница «расползалась» до 694px. Лечение: grid-колонки minmax(0,1fr) и
   min-width:0 у грид-элементов; лента скроллится ВНУТРИ себя (overflow-x:auto).
   Замер после правки: 360/390/414 → doc scrollWidth == innerWidth. */
.lp-app__grid { grid-template-columns: minmax(0, 1fr); }
.lp-app__grid > * { min-width: 0; }
.lp-app__panel { min-width: 0; }
.lp-shots { min-width: 0; max-width: 100%; }
@media (min-width: 1024px) {
  .lp-app__grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
}
/* Общая страховка: грид/флекс-элементы лендинга не расширяют страницу */
.lp-container > *, .lp-hero__grid > *, .lp-tiles > *, .lp-cards > *, .lp-steps > *, .lp-stats > *, .lp-quick__list > * { min-width: 0; }

/* ── 7.21. T6: явные цвета CTA-компонентов (выше по каскаду, чем .lp-page a).
   Найдено замерами в тёмных темах: правило-страховка `.lp-page a {color:inherit}`
   (0,1,1) перебивало `.lp-btn--primary` (0,1,0) → текст на золоте становился
   светлым (1.74–2.64:1). Теперь у компонентов специфичность (0,2,0):
   «чернила на золоте» = 7.9–8.4:1 в тёмных темах и 7.4:1 в светлой. */
.lp-page .lp-btn--primary { background: var(--lp-accent); color: var(--lp-accent-contrast); }
.lp-page .lp-btn--bordeaux { background: var(--lp-bordeaux); color: #ffffff; }
.lp-page .lp-btn--secondary { color: var(--lp-text); }
.lp-page .lp-btn--ghost { color: var(--lp-text-2); }
.lp-page .lp-tabbar__cta { background: var(--lp-accent); color: var(--lp-accent-contrast); }
.lp-page .lp-tabbar__item { color: var(--lp-text-3); }
.lp-page .lp-tabbar__item.is-active { color: var(--lp-accent-ink); }
.lp-page .lp-quick__item, .lp-page .lp-tile { color: var(--lp-text); }
.lp-page .lp-footer__link { color: var(--lp-text-2); }
.lp-page .lp-nav__link { color: var(--lp-text-2); }
.lp-page .lp-slide__link, .lp-page .lp-step__link, .lp-page .lp-faq__a a { color: var(--lp-accent-ink); }
