/* атрибут hidden всегда скрывает элемент, даже если у класса задан display */
[hidden] { display: none !important; }
/* ==========================================================
   Анонимка — дизайн-система v2 (светлая тема по умолчанию)
   ========================================================== */
:root {
  --bg: #f6f6fa;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-2: #f3f3f8;
  --surface-3: #ebebf3;
  --border: #e9e9f1;
  --border-strong: #dcdce8;
  --text: #16162b;
  --muted: #646480;
  --dim: #9c9cb3;
  --accent: #6c5ce7;
  --accent-hover: #5a4ad6;
  --accent-soft: #f0eeff;
  --accent-ring: rgba(108, 92, 231, .22);
  --accent-2: #e8508f;
  --accent-3: #e8930c;
  --ok: #17a34a;
  --ok-soft: #e9f8ef;
  --danger: #e5484d;
  --danger-soft: #fdeeee;
  --grad: linear-gradient(135deg, #7b6bff 0%, #b46cf5 52%, #ff7aa6 100%);
  --grad-soft: linear-gradient(135deg, #f2efff, #fbefff 55%, #fff0f5);
  --me: linear-gradient(135deg, #6c5ce7, #8a6bf4);
  --them: #f1f1f7;
  --scroll: #d4d4e2;
  --scroll-hover: #a9a3ea;
  --shadow-sm: 0 1px 2px rgba(22, 22, 50, .05);
  --shadow: 0 1px 2px rgba(22, 22, 50, .04), 0 8px 24px -10px rgba(22, 22, 50, .10);
  --shadow-lg: 0 2px 6px rgba(22, 22, 50, .04), 0 28px 60px -24px rgba(50, 35, 140, .28);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --emoji-font: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", "Noto Color Emoji", sans-serif;
  --display: var(--font);
  --header-h: 60px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e0e16;
  --surface: #16161f;
  --surface-solid: #16161f;
  --surface-2: #1d1d28;
  --surface-3: #252532;
  --border: #262634;
  --border-strong: #33334a;
  --text: #ececf4;
  --muted: #a0a0b8;
  --dim: #6e6e88;
  --accent: #8b7cff;
  --accent-hover: #9d90ff;
  --accent-soft: #232042;
  --accent-ring: rgba(139, 124, 255, .3);
  --ok-soft: #12291c;
  --danger-soft: #2e1618;
  --grad-soft: linear-gradient(135deg, #1e1b38, #251b33 55%, #2b1a26);
  --them: #22222e;
  --scroll: #32324a;
  --scroll-hover: #5b52b8;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -10px rgba(0, 0, 0, .5);
  --shadow-lg: 0 28px 60px -24px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---------- база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px);
  scrollbar-width: thin; scrollbar-color: var(--scroll) transparent; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.6;
  overflow-x: hidden; min-height: 100vh; -webkit-font-smoothing: antialiased; transition: background-color .3s var(--ease), color .3s; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--accent-ring); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { line-height: 1.18; letter-spacing: -0.025em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.85rem, 4vw, 2.9rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.95rem); }
h3 { font-size: 1.02rem; font-weight: 650; }
p { margin: 0 0 1em; }
code { font-size: .88em; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); }
.muted { color: var(--muted); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.section { padding: clamp(28px, 4.5vw, 48px) 0; position: relative; }
.section-tight { padding-top: 0; }
.section-head { max-width: 620px; margin-bottom: 28px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--muted); }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; font-size: .78rem; font-weight: 600; color: var(--accent);
  margin-bottom: 12px; padding: 4px 11px 4px 9px; border-radius: 999px; background: var(--accent-soft); }
.eyebrow .lucide { width: 14px; height: 14px; }
.lucide { width: 18px; height: 18px; stroke-width: 2; flex: none; }

/* скроллбары — везде одинаково тонкие и аккуратные */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scroll); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--scroll-hover); background-clip: padding-box; border: 2px solid transparent; }
::-webkit-scrollbar-corner { background: transparent; }

/* мягкий фон */
.bg-orbs { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.bg-orbs span { position: absolute; border-radius: 50%; filter: blur(80px); animation: float 26s ease-in-out infinite alternate; }
.bg-orbs span:nth-child(1) { width: 460px; height: 460px; background: #e3ddff; top: -180px; left: -140px; opacity: .8; }
.bg-orbs span:nth-child(2) { width: 380px; height: 380px; background: #ffe0ee; top: 15%; right: -170px; animation-delay: -8s; opacity: .7; }
.bg-orbs span:nth-child(3) { width: 340px; height: 340px; background: #ffeedb; bottom: -200px; left: 35%; animation-delay: -15s; opacity: .5; }
:root[data-theme="dark"] .bg-orbs span { opacity: .12; }
:root[data-theme="dark"] .bg-orbs span:nth-child(1) { background: #6a4cff; }
:root[data-theme="dark"] .bg-orbs span:nth-child(2) { background: #ff4f9a; }
@keyframes float { to { transform: translate(50px, 40px) scale(1.1); } }

/* прогресс прокрутки */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; background: var(--grad);
  transform-origin: 0 50%; transform: scaleX(var(--p, 0)); pointer-events: none; }

/* ---------- кнопки ---------- */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--border-strong); background: var(--surface);
  font-weight: 600; font-size: .93rem; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-sm);
  transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .2s, color .2s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.97); }
.btn .lucide { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); border-color: transparent; color: #fff;
  box-shadow: 0 1px 2px rgba(60, 40, 180, .2), inset 0 1px 0 rgba(255, 255, 255, .18), 0 6px 16px -6px rgba(108, 92, 231, .6); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 10px 22px -8px rgba(108, 92, 231, .75); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0) scale(.97); }
.btn-grad { background: var(--grad); border: 0; color: #fff; box-shadow: 0 8px 22px -8px rgba(180, 108, 245, .7); background-size: 140% 140%; background-position: 0 0; transition: background-position .5s var(--ease), transform .15s, box-shadow .2s; }
.btn-grad:hover { background: var(--grad); background-size: 140% 140%; background-position: 100% 100%; transform: translateY(-1px); box-shadow: 0 12px 28px -8px rgba(180, 108, 245, .8); }
.btn-lg { height: 48px; padding: 0 22px; font-size: 1rem; border-radius: 13px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: .86rem; border-radius: 9px; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { color: var(--danger); }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: currentColor; opacity: .18; animation: ripple .6s var(--ease); pointer-events: none; }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; border: 1px solid transparent;
  background: transparent; cursor: pointer; transition: background .2s, color .2s, transform .15s; color: var(--muted); flex: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.bordered { border-color: var(--border); background: var(--surface); }

/* ---------- шапка ---------- */
.header { position: sticky; top: 0; z-index: 50; transition: background .3s, box-shadow .3s, border-color .3s;
  background: color-mix(in srgb, var(--bg) 70%, transparent); border-bottom: 1px solid transparent;
  backdrop-filter: blur(14px) saturate(1.6); -webkit-backdrop-filter: blur(14px) saturate(1.6); }
.header.scrolled { background: color-mix(in srgb, var(--surface) 82%, transparent); border-color: var(--border); box-shadow: 0 6px 20px -16px rgba(22, 22, 50, .25); }
.header .container { display: flex; align-items: center; gap: 12px; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.05rem; letter-spacing: -.03em; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 4px 12px -4px rgba(180, 108, 245, .7); transition: transform .3s var(--ease); }
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.05); }
.logo-mark svg { width: 17px; height: 17px; }
.nav { display: flex; gap: 2px; margin-left: 20px; }
.nav a { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px; color: var(--muted); font-weight: 550; font-size: .92rem; transition: color .2s, background .2s; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--text); }
.nav a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -11px; height: 2px; border-radius: 2px; background: var(--accent); }
.nav .lucide { width: 15px; height: 15px; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.online-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--muted); background: var(--ok-soft); }
.online-pill b { color: var(--ok); font-variant-numeric: tabular-nums; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 0 0 rgba(23, 163, 74, .5); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(23, 163, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(23, 163, 74, 0); } }
.avatar-chip { display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px 3px 3px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: .88rem; transition: border-color .2s, box-shadow .2s; }
.avatar-chip:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-soft); font-size: .95rem; flex: none; }
.crown { color: var(--accent-3); }
.burger { display: none; }
.theme-icon-dark { display: none; }
:root[data-theme="dark"] .theme-icon-dark { display: block; }
:root[data-theme="dark"] .theme-icon-light { display: none; }
@media (max-width: 860px) {
  .nav { position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; margin: 0; padding: 8px 16px 14px;
    background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .2s, transform .25s var(--ease); }
  .nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 11px 12px; }
  .nav a.active::after { display: none; }
  .nav a.active { background: var(--accent-soft); color: var(--accent); }
  .burger { display: inline-grid; }
  .online-pill .lbl, .avatar-chip .name { display: none; }
  .avatar-chip { padding: 3px; }
}

/* ---------- hero ---------- */
.hero { padding: clamp(32px, 6vw, 64px) 0 clamp(28px, 5vw, 48px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 16px; }
.hero .lead { font-size: clamp(1rem, 1.4vw, 1.1rem); color: var(--muted); max-width: 520px; margin-bottom: 24px; }
.hero-meta { display: flex; gap: 8px 20px; margin-top: 18px; flex-wrap: wrap; color: var(--muted); font-size: .86rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta .lucide { width: 15px; height: 15px; color: var(--accent); }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } .phone-wrap { display: none; } }

/* мокап телефона */
.phone-wrap { position: relative; display: grid; place-items: center; padding: 20px 0; }
.phone { width: 270px; height: 470px; border-radius: 38px; padding: 9px; background: #fff; border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); animation: phoneIn 1s var(--ease) both; }
@keyframes phoneIn { from { opacity: 0; transform: translateY(24px) rotate(2deg); } }
:root[data-theme="dark"] .phone { background: #1b1b26; }
.phone-screen { height: 100%; border-radius: 30px; background: var(--bg); overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--border); }
.phone-top { padding: 12px 14px; display: flex; gap: 9px; align-items: center; background: var(--surface); border-bottom: 1px solid var(--border); font-size: .86rem; }
.phone-top small { display: block; color: var(--ok); font-size: .7rem; line-height: 1.2; }
.phone-msgs { flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 6px; justify-content: flex-end; overflow: hidden; }
.phone .bubble { font-size: .8rem; padding: 7px 11px; }
.phone .sys { font-size: .7rem; margin: 4px 0; }
.float-badge { position: absolute; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow); font-weight: 600; font-size: .8rem; display: flex; gap: 7px; align-items: center; animation: bob 6s ease-in-out infinite; }
.float-badge .lucide { width: 15px; height: 15px; }
.float-badge.b1 { top: 130px; left: -18px; color: var(--accent-2); }
.float-badge.b2 { bottom: 70px; right: 4px; animation-delay: -3s; color: var(--accent); }
.float-badge span { color: var(--text); }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* ---------- виджет старта ---------- */
.starter { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); max-width: 600px; }
.starter-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.starter-row .select { flex: 1; min-width: 170px; height: 44px; }
.starter-row .btn { height: 44px; }
.starter .chips { margin-bottom: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; font-weight: 550; font-size: .86rem; transition: background .2s, border-color .2s, color .2s, transform .15s; user-select: none; color: var(--muted); }
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip:active { transform: scale(.96); }
.chip.active, .chip:has(input:checked) { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.select, .input, .textarea { width: 100%; height: 40px; padding: 0 13px; border-radius: 11px; border: 1px solid var(--border-strong); background: var(--surface);
  outline: none; transition: border-color .2s, box-shadow .2s; font-size: .93rem; }
.select { appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%239c9cb3' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; }
.select option { background: var(--surface); color: var(--text); }
.textarea { height: auto; min-height: 84px; padding: 10px 13px; resize: vertical; line-height: 1.5; }
.input:hover, .select:hover, .textarea:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--border-strong)); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
label.field, div.field { display: block; margin-bottom: 14px; }
label.field > span, div.field > span:first-child { display: block; font-size: .82rem; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.field-row { display: flex !important; justify-content: space-between; align-items: baseline; gap: 10px; }
.field-link { color: var(--accent); font-weight: 600; font-size: .8rem; }
.field-link:hover { text-decoration: underline; }

/* ---------- вход через соцсети ---------- */
.social-login { display: grid; gap: 8px; }
.btn-social { justify-content: center; gap: 10px; width: 100%; font-weight: 700; }
.btn-social svg { width: 20px; height: 20px; flex: none; }
.btn-vk { background: #0077ff; border-color: #0077ff; color: #fff; }
.btn-vk:hover { background: #0068e0; border-color: #0068e0; color: #fff; }
.btn-ya, .btn-tg { background: var(--surface); }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--dim); font-size: .8rem; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-legal { font-size: .76rem; text-align: center; margin: 10px 0 0; }
.auth-legal a { color: var(--accent); }
.login-methods { display: grid; gap: 10px; }
.login-method { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.login-method .lm-name { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.login-method .lm-name svg { width: 22px; height: 22px; }
.login-method small { display: block; color: var(--muted); font-weight: 500; font-size: .78rem; }
.pw-change { margin-top: 12px; }
.pw-change summary { list-style: none; width: fit-content; }
.pw-change summary::-webkit-details-marker { display: none; }
.pw-form { margin-top: 12px; padding: 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); }

/* ---------- объявление над шапкой ---------- */
.announce { position: relative; z-index: 60; display: flex; justify-content: center; align-items: center; gap: 10px;
  padding: 9px 44px; font-size: .88rem; font-weight: 600; text-align: center; color: #fff;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.announce a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.announce-promo { background: linear-gradient(90deg, #ff7aa6, #ffb648); }
.announce-warn { background: #f59e0b; color: #1c1c28; }
.announce-close { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0;
  border-radius: 8px; background: transparent; color: inherit; font-size: 1.1rem; cursor: pointer; opacity: .8; }
.announce-close:hover { opacity: 1; background: rgba(255, 255, 255, .15); }

/* ---------- карточки и сетки ---------- */
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; position: relative;
  box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.card p { color: var(--muted); margin: 0; font-size: .92rem; }
.card h3 { margin-bottom: 6px; }
.card-link:hover, .card.hoverable:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px;
  transition: transform .3s var(--ease); }
.ico .lucide { width: 19px; height: 19px; }
.card:hover .ico { transform: scale(1.08) rotate(-4deg); }
.ico.pink { background: #fdeef5; color: var(--accent-2); }
.ico.amber { background: #fdf3e1; color: var(--accent-3); }
.ico.green { background: var(--ok-soft); color: var(--ok); }
:root[data-theme="dark"] .ico.pink { background: #33192a; }
:root[data-theme="dark"] .ico.amber { background: #33281a; }
.card.feature-big { grid-column: span 2; background: var(--grad-soft); border-color: transparent; }
@media (max-width: 620px) { .card.feature-big { grid-column: auto; } }
.topic-card { display: flex; flex-direction: column; gap: 2px; }
.topic-card .emoji { font-size: 1.6rem; margin-bottom: 8px; transition: transform .3s var(--ease); display: inline-block; width: fit-content; }
.topic-card:hover .emoji { transform: scale(1.15) rotate(-6deg); }
.topic-card .go { margin-top: 12px; font-weight: 600; color: var(--accent); font-size: .86rem; display: inline-flex; align-items: center; gap: 4px; }
.topic-card .go .lucide { width: 15px; height: 15px; transition: transform .2s var(--ease); }
.topic-card:hover .go .lucide { transform: translateX(3px); }

.steps { counter-reset: s; }
.step { padding-top: 56px; }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: 20px; left: 20px; width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: #fff; background: var(--accent); }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0; }
.stat { text-align: center; padding: 18px 10px; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat b { display: block; font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .82rem; }
@media (max-width: 720px) { .stats-row { grid-template-columns: repeat(2, 1fr); } .stat:nth-child(3) { border-left: 0; } .stat:nth-child(n+3) { border-top: 1px solid var(--border); } }

.qotd { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--grad-soft); border-color: transparent; padding: 24px; }
.qotd q { font-size: clamp(1.05rem, 2vw, 1.35rem); font-weight: 650; letter-spacing: -.02em; quotes: "«" "»"; }
.qotd .eyebrow { background: var(--surface); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 24px; } }
.check-list { display: grid; padding: 6px 20px; }
.check-list div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: .93rem; }
.check-list div:last-child { border: 0; }
.check-list .lucide { color: var(--ok); width: 17px; height: 17px; }

/* ---------- города ---------- */
.city-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.city-cloud a { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-weight: 550; font-size: .88rem; color: var(--muted); transition: all .2s var(--ease); }
.city-cloud a:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }

/* ---------- FAQ (плавное раскрытие — в app.js) ---------- */
.faq { display: grid; gap: 8px; max-width: 760px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); transition: border-color .2s, box-shadow .2s; overflow: hidden; }
.faq details:hover { border-color: var(--border-strong); }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary { cursor: pointer; list-style: none; padding: 14px 18px; font-weight: 600; font-size: .95rem; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 20px; height: 20px; border-radius: 6px; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='none' stroke='%236c5ce7' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M5 1v8M1 5h8'/%3E%3C/svg%3E") center no-repeat; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(135deg); }
.faq .faq-body { padding: 0 18px 14px; color: var(--muted); font-size: .92rem; }
.faq .faq-body p { margin: 0; }

/* ---------- premium ---------- */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.plans.plans-3 { grid-template-columns: repeat(3, 1fr); max-width: 860px; margin: 0 auto; }
@media (max-width: 1000px) { .plans, .plans.plans-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .plans, .plans.plans-3 { grid-template-columns: 1fr; } }
.plan { display: flex; flex-direction: column; gap: 4px; }
.plan .price { font-size: 1.9rem; font-weight: 800; letter-spacing: -.04em; margin-top: 6px; }
.plan .price small { font-size: .95rem; color: var(--muted); font-weight: 600; }
.plan .per { color: var(--muted); font-size: .84rem; margin-bottom: 14px; }
.plan .badge { position: absolute; top: 16px; right: 16px; }
.plan .btn { margin-top: auto; }
.plan.featured { border: 1.5px solid var(--accent); box-shadow: 0 20px 40px -24px rgba(108, 92, 231, .5); }
.plan:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.badge.hot { background: var(--grad); color: #fff; }
.compare { width: 100%; border-collapse: collapse; font-size: .93rem; }
.compare th, .compare td { padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: left; }
.compare th { font-size: .8rem; color: var(--muted); font-weight: 600; }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; width: 120px; }
.compare tr:last-child td { border: 0; }
.compare tbody tr { transition: background .15s; }
.compare tbody tr:hover { background: var(--surface-2); }
.compare .lucide { margin: 0 auto; width: 17px; height: 17px; }
.yes { color: var(--ok); font-weight: 700; }
.no { color: var(--dim); }
.table-wrap { overflow-x: auto; }

/* ---------- футер ---------- */
.footer { border-top: 1px solid var(--border); padding: 40px 0 28px; margin-top: 32px; color: var(--muted); font-size: .88rem; background: color-mix(in srgb, var(--surface) 60%, transparent); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.footer h4 { color: var(--text); margin: 0 0 12px; font-size: .88rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer ul a { transition: color .2s; }
.footer ul a:hover { color: var(--accent); }
.footer-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: var(--dim); }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* наверх */
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 42px; height: 42px; border-radius: 13px; border: 1px solid var(--border);
  background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; cursor: pointer; color: var(--muted);
  opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none; transition: opacity .25s, transform .3s var(--ease), color .2s; }
.to-top.on { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { color: var(--accent); transform: translateY(-2px); }

/* ---------- лендинги ---------- */
.breadcrumbs { display: flex; gap: 6px; flex-wrap: wrap; font-size: .82rem; color: var(--dim); margin-bottom: 16px; align-items: center; }
.breadcrumbs a:hover { color: var(--accent); }
.prose { max-width: 680px; font-size: 1rem; }
.prose p { color: var(--muted); }
.live-card { display: grid; gap: 4px; }
.live-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.live-row:last-of-type { border: 0; margin-bottom: 8px; }
.live-row b { font-variant-numeric: tabular-nums; }

/* ---------- auth / profile ---------- */
.auth-box { max-width: 400px; margin: 48px auto; padding: 28px; box-shadow: var(--shadow); }
.auth-box h2 { font-size: 1.45rem; margin-bottom: 4px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 550; font-size: .9rem; animation: slideDown .4s var(--ease); }
.alert .lucide { width: 17px; height: 17px; margin-top: 2px; }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-warn { background: #fdf3e1; color: #a36404; }
:root[data-theme="dark"] .alert-warn { background: #33281a; color: #f2b347; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: var(--muted); margin-bottom: 16px; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.check a { color: var(--accent); }
.auth-switch { text-align: center; margin: 16px 0 0; font-size: .9rem; color: var(--muted); }
.auth-switch a { color: var(--accent); font-weight: 600; }
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { padding-right: 44px; }
.pw-wrap .icon-btn { position: absolute; right: 2px; top: 2px; }
.profile-grid { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .profile-grid { grid-template-columns: 1fr; } .profile-card { position: static !important; } }
.profile-card { text-align: center; position: sticky; top: calc(var(--header-h) + 16px); }
.profile-card h2 { font-size: 1.25rem; margin-bottom: 2px; }
.big-avatar { width: 80px; height: 80px; margin: 4px auto 12px; border-radius: 24px; font-size: 2.4rem; display: grid; place-items: center; background: var(--grad-soft); }
.progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--grad); border-radius: inherit; transform-origin: left; animation: grow 1.2s var(--ease) both .2s; }
@keyframes grow { from { transform: scaleX(0); } }
.mini-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 16px 0; }
.mini-stats div { padding: 10px; border-radius: var(--radius-sm); background: var(--surface-2); }
.mini-stats b { display: block; font-size: 1.1rem; font-weight: 750; }
.mini-stats span { font-size: .76rem; color: var(--muted); }
.avatar-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.avatar-pick label { position: relative; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 1.3rem; border: 1px solid var(--border); cursor: pointer; background: var(--surface); transition: transform .15s, border-color .2s, background .2s; }
.avatar-pick label:hover { transform: translateY(-2px); }
.avatar-pick input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-pick label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-ring); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.card-title { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; font-size: 1rem; }
.card-title .lucide { color: var(--accent); }
.stack { display: grid; gap: 16px; }
.save-bar { display: flex; justify-content: flex-end; padding-top: 6px; }

.message-page { text-align: center; padding: 80px 0; }
.message-page .emoji { font-size: 3.4rem; margin-bottom: 10px; animation: popIn .6s var(--ease); }
.message-page h1 { font-size: clamp(1.5rem, 3vw, 2rem); }
.message-page p { max-width: 460px; margin: 0 auto 24px; }
@keyframes popIn { from { transform: scale(.4); opacity: 0; } }

/* ---------- reveal-анимации при прокрутке ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease) var(--d, 0s), transform .7s var(--ease) var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
/* первый экран появляется сразу при загрузке, без ожидания прокрутки */
.hero .reveal, .auth-box.reveal { opacity: 1; transform: none; transition: none; animation: fadeUp .7s var(--ease) both var(--d, 0s); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }

/* ==========================================================
   ЧАТ
   ========================================================== */
body.chat-body { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
body.chat-body > main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
body.chat-body .footer, body.chat-body .to-top, body.chat-body .scroll-progress { display: none; }
.chat-app { flex: 1; min-height: 0; display: flex; justify-content: center; padding: 8px 16px 16px; }
.chat-shell { width: min(780px, 100%); display: flex; flex-direction: column; min-height: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); position: relative; }
@media (max-width: 640px) { .chat-app { padding: 0; } .chat-shell { border-radius: 0; border: 0; box-shadow: none; } }
.screen { display: none; flex: 1; min-height: 0; flex-direction: column; }
.screen.active { display: flex; animation: screenIn .35s var(--ease); }
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } }

/* настройки */
.setup { overflow-y: auto; padding: 24px 24px 0; }
.setup-head h1 { font-size: 1.45rem; margin-bottom: 4px; }
.setup-head p { color: var(--muted); font-size: .9rem; margin-bottom: 20px; }
.setup-head a { color: var(--accent); font-weight: 600; }
.setup-block { margin-bottom: 18px; }
.setup-block > .lbl { font-size: .78rem; color: var(--muted); font-weight: 600; margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.setup-block > .lbl .lucide { width: 14px; height: 14px; }
.setup-block > .lbl small { color: var(--dim); font-weight: 500; font-size: .76rem; }
.topic-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
@media (max-width: 720px) { .topic-grid { grid-template-columns: repeat(2, 1fr); } }
.topic-opt { position: relative; padding: 11px 12px; border-radius: 13px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: border-color .2s, background .2s, transform .15s, box-shadow .2s; }
.topic-opt:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.topic-opt input { position: absolute; opacity: 0; pointer-events: none; }
.topic-opt:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.topic-opt .e { font-size: 1.25rem; display: block; margin-bottom: 4px; }
.topic-opt b { display: block; font-size: .88rem; font-weight: 650; }
.topic-opt small { color: var(--muted); font-size: .73rem; line-height: 1.3; display: block; }
.setup-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; }
@media (max-width: 720px) { .setup-cols { grid-template-columns: 1fr; } }
.premium-lock.locked .chips { opacity: .45; pointer-events: none; filter: grayscale(.4); }
.premium-hint { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; color: var(--accent-3); font-weight: 600; margin-top: 8px; }
.premium-hint:hover { text-decoration: underline; }
.premium-hint .lucide { width: 14px; height: 14px; }
.setup-footer { position: sticky; bottom: 0; padding: 14px 0 18px; margin-top: 4px; background: linear-gradient(to bottom, transparent, var(--surface) 35%); display: flex; gap: 12px; align-items: center; }
.setup-footer .btn { flex: 1; }
.setup-footer .hint { color: var(--dim); font-size: .8rem; white-space: nowrap; }
@media (max-width: 520px) { .setup-footer .hint { display: none; } }
.kbd { display: inline-block; padding: 0 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; font-size: .74rem; color: var(--muted); font-family: ui-monospace, Consolas, monospace; background: var(--surface); line-height: 1.6; }
.btn-primary .kbd { color: #fff; border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .12); }

/* поиск */
.searching { align-items: center; justify-content: center; text-align: center; padding: 30px; gap: 4px; }
.radar { width: 150px; height: 150px; position: relative; margin-bottom: 22px; display: grid; place-items: center; }
.radar::before, .radar::after, .radar i { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); opacity: 0; animation: radar 2.7s var(--ease) infinite; }
.radar::after { animation-delay: .9s; }
.radar i { animation-delay: 1.8s; }
.radar .core { width: 64px; height: 64px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; color: #fff; z-index: 1;
  box-shadow: 0 10px 30px -6px rgba(180, 108, 245, .7); animation: breathe 2.7s ease-in-out infinite; }
.radar .core .lucide { width: 26px; height: 26px; }
@keyframes radar { 0% { transform: scale(.4); opacity: .22; } 100% { transform: scale(1.15); opacity: 0; } }
@keyframes breathe { 50% { transform: scale(1.06); } }
.searching h2 { font-size: 1.25rem; margin-bottom: 2px; }
.search-stage { color: var(--muted); font-size: .9rem; min-height: 1.5em; transition: opacity .3s; }
.search-filters { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 14px 0 6px; }
.search-tip { max-width: 360px; color: var(--dim); font-size: .84rem; min-height: 2.8em; transition: opacity .4s; margin: 10px 0 0; }
.timer { font-variant-numeric: tabular-nums; font-size: .82rem; color: var(--dim); }

/* диалог */
.chat-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface); z-index: 2; }
.chat-top .avatar { width: 38px; height: 38px; font-size: 1.15rem; position: relative; }
.chat-top .avatar::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); border: 2px solid var(--surface); transition: background .3s; }
.chat-shell.ended .chat-top .avatar::after { background: var(--dim); }
.chat-top .who { flex: 1; min-width: 0; }
.chat-top .who b { display: block; font-size: .95rem; line-height: 1.3; }
.chat-top .who small { color: var(--muted); font-size: .78rem; display: flex; gap: 5px; flex-wrap: wrap; align-items: center; min-height: 1.3em; }
.status-line.typing-now { color: var(--accent); font-weight: 550; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); font-size: .74rem; font-weight: 600; color: var(--muted); }
.tag.common { background: var(--accent-soft); color: var(--accent); }
.messages-wrap { position: relative; flex: 1; min-height: 0; display: flex; }
.messages { flex: 1; overflow-y: auto; padding: 16px 16px 8px; display: flex; flex-direction: column; gap: 3px; overscroll-behavior: contain; }
.msg { display: flex; max-width: min(76%, 520px); position: relative; animation: msgIn .28s var(--ease); }
@keyframes msgIn { from { transform: translateY(6px) scale(.98); opacity: 0; } }
.msg.me { align-self: flex-end; animation-name: msgInMe; }
@keyframes msgInMe { from { transform: translate(6px, 6px) scale(.98); opacity: 0; } }
.msg.them { align-self: flex-start; }
.msg.me + .msg.them, .msg.them + .msg.me, .sys + .msg { margin-top: 8px; }
.bubble { padding: 8px 12px 6px; border-radius: 16px; overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.45; font-size: .93rem; position: relative; }
.me .bubble { background: var(--me); color: #fff; border-bottom-right-radius: 5px; box-shadow: 0 4px 12px -6px rgba(108, 92, 231, .6); }
.them .bubble { background: var(--them); border-bottom-left-radius: 5px; }
.msg.me + .msg.me .bubble { border-top-right-radius: 6px; }
.msg.them + .msg.them .bubble { border-top-left-radius: 6px; }
.bubble time { font-size: .66rem; opacity: .55; margin-left: 8px; float: right; margin-top: 5px; font-variant-numeric: tabular-nums; }
.bubble .quote { display: block; font-size: .78rem; padding: 3px 9px; margin: 2px 0 5px; border-left: 2px solid currentColor; border-radius: 4px; background: rgba(0, 0, 0, .06); opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .bubble .quote { background: rgba(255, 255, 255, .16); }
.reactions { position: absolute; bottom: -11px; display: flex; gap: 2px; z-index: 1; }
.me .reactions { right: 8px; }
.them .reactions { left: 8px; }
.reactions span { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 0 5px; font-size: .76rem; box-shadow: var(--shadow-sm); animation: popIn .35s var(--ease); }
.msg.has-react { margin-bottom: 12px; }
.msg-tools { position: absolute; top: 50%; display: flex; gap: 1px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 2px; box-shadow: var(--shadow); z-index: 3;
  opacity: 0; visibility: hidden; transform: translateY(-50%) scale(.9);
  /* прячем с задержкой — успеваете довести курсор до реакции */
  transition: opacity .15s .35s, transform .2s var(--ease) .35s, visibility 0s .5s; }
.me .msg-tools { right: calc(100% + 6px); }
.them .msg-tools { left: calc(100% + 6px); }
/* невидимый «мостик» между сообщением и реакциями, чтобы курсор не терял наведение */
.msg-tools::before { content: ""; position: absolute; top: -12px; bottom: -12px; width: 16px; }
.me .msg-tools::before { right: -14px; }
.them .msg-tools::before { left: -14px; }
.msg:hover .msg-tools, .msg.tools-open .msg-tools, .msg-tools:hover { opacity: 1; visibility: visible; transform: translateY(-50%);
  transition: opacity .12s, transform .2s var(--ease), visibility 0s; }
.msg-tools button { border: 0; background: none; cursor: pointer; width: 28px; height: 28px; border-radius: 50%; font-size: .85rem; display: grid; place-items: center; color: var(--muted); transition: background .15s, transform .15s; }
.msg-tools button:hover { background: var(--surface-2); transform: scale(1.15); }
.msg-tools .lucide { width: 15px; height: 15px; }
.sys { align-self: center; text-align: center; font-size: .78rem; color: var(--muted); padding: 4px 12px; margin: 8px 0; border-radius: 999px; background: var(--surface-2); max-width: 92%; animation: fadeIn .3s var(--ease); }
.sys.highlight { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
@keyframes fadeIn { from { opacity: 0; } }
.read-mark { align-self: flex-end; font-size: .7rem; color: var(--dim); margin: 2px 4px 0; display: inline-flex; align-items: center; gap: 3px; animation: fadeIn .3s; }
.typing { display: none; align-self: flex-start; padding: 11px 14px; border-radius: 16px; border-bottom-left-radius: 5px; background: var(--them); margin-top: 6px; gap: 4px; }
.typing.on { display: inline-flex; animation: msgIn .25s var(--ease); }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.jump-down { position: absolute; right: 16px; bottom: 10px; z-index: 2; height: 34px; padding: 0 12px 0 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow);
  display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 600; cursor: pointer; color: var(--muted);
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s, transform .25s var(--ease), color .2s; }
.jump-down.on { opacity: 1; transform: none; pointer-events: auto; }
.jump-down:hover { color: var(--accent); }
.jump-down .lucide { width: 16px; height: 16px; }
.jump-down .count { min-width: 18px; height: 18px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .7rem; display: none; place-items: center; padding: 0 5px; }
.jump-down .count.on { display: inline-grid; }

.bottom-bar { border-top: 1px solid var(--border); background: var(--surface); position: relative; }
.toolbar { display: flex; gap: 2px; padding: 6px 10px 0; overflow-x: auto; scrollbar-width: none; }
.toolbar::-webkit-scrollbar { display: none; }
.tool { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 9px; border: 0; background: transparent; cursor: pointer; font-size: .8rem; font-weight: 550; white-space: nowrap; color: var(--muted); transition: background .15s, color .15s, transform .15s; }
.tool:hover { background: var(--surface-2); color: var(--text); }
.tool:active { transform: scale(.95); }
.tool .lucide { width: 15px; height: 15px; }
.tool.liked { color: var(--accent-2); background: #fdeef5; }
.tool.liked .lucide { fill: currentColor; animation: heart .5s var(--ease); }
:root[data-theme="dark"] .tool.liked { background: #33192a; }
@keyframes heart { 40% { transform: scale(1.35); } }
.tool-report { margin-left: auto; }
.tool-report:hover { color: var(--danger); background: var(--danger-soft); }
@media (max-width: 520px) { .tool .t { display: none; } .tool { padding: 0 9px; } }
.reply-bar { display: flex; margin: 0 12px; padding: 0 6px 0 10px; border-left: 2px solid var(--accent); background: var(--accent-soft); border-radius: 8px; font-size: .82rem; color: var(--muted); align-items: center; gap: 8px;
  max-height: 0; opacity: 0; overflow: hidden; transition: max-height .25s var(--ease), opacity .2s, padding .25s, margin .25s; }
.reply-bar.on { max-height: 50px; opacity: 1; padding-block: 6px; margin-top: 8px; }
.reply-bar span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reply-bar .icon-btn { width: 26px; height: 26px; }
.reply-bar .lucide { width: 14px; height: 14px; }
.composer { display: flex; gap: 8px; padding: 8px 12px 12px; align-items: flex-end; }
.composer-field { flex: 1; position: relative; display: flex; }
.composer textarea { flex: 1; resize: none; max-height: 140px; min-height: 42px; padding: 10px 14px; border-radius: 13px; border: 1px solid var(--border-strong); background: var(--surface-2); outline: none; line-height: 1.4; font-size: .93rem; transition: border-color .2s, background .2s, box-shadow .2s; }
.composer textarea:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-ring); }
.char-count { position: absolute; right: 12px; top: -18px; font-size: .68rem; color: var(--dim); opacity: 0; transition: opacity .2s; pointer-events: none; }
.char-count.on { opacity: 1; }
.char-count.warn { color: var(--danger); }
.send-btn { width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--accent); color: #fff; cursor: pointer; display: grid; place-items: center; flex: none;
  transition: transform .15s var(--ease), background .2s, opacity .2s, box-shadow .2s; box-shadow: 0 6px 14px -6px rgba(108, 92, 231, .7); }
.send-btn:hover { background: var(--accent-hover); }
.send-btn:active { transform: scale(.9); }
.send-btn:disabled { opacity: .35; box-shadow: none; cursor: default; transform: none; }
.send-btn .lucide { width: 18px; height: 18px; }
.next-btn { height: 42px; border-radius: 12px; padding: 0 14px; min-width: 88px; }
.next-btn.confirm { background: var(--danger); color: #fff; border-color: var(--danger); animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.emoji-pop { position: absolute; bottom: calc(100% + 8px); left: 12px; width: min(330px, calc(100% - 24px)); display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); z-index: 5;
  opacity: 0; transform: translateY(8px) scale(.97); transform-origin: bottom left; pointer-events: none; transition: opacity .18s, transform .22s var(--ease); max-height: 220px; overflow-y: auto; }
.emoji-pop.on { opacity: 1; transform: none; pointer-events: auto; }
.emoji-pop button { border: 0; background: none; font-size: 1.25rem; cursor: pointer; aspect-ratio: 1; border-radius: 9px; transition: background .12s, transform .12s; }
.emoji-pop button:hover { background: var(--surface-2); transform: scale(1.15); }

/* итог диалога */
.ended-panel { padding: 14px; display: none; flex-direction: column; gap: 10px; align-items: center; text-align: center; border-top: 1px solid var(--border); }
.ended-panel.on { display: flex; animation: screenIn .35s var(--ease); }
.ended-panel b { font-size: .95rem; }
.rate-row { display: flex; gap: 6px; align-items: center; font-size: .86rem; color: var(--muted); }
.rate-row .icon-btn { border: 1px solid var(--border); }
.rate-row .icon-btn[data-rate="1"]:hover { color: var(--ok); border-color: var(--ok); background: var(--ok-soft); }
.rate-row .icon-btn[data-rate="-1"]:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.ended-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* модалка */
.modal { position: fixed; inset: 0; background: rgba(20, 18, 40, .35); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 100; padding: 16px;
  opacity: 0; pointer-events: none; transition: opacity .2s; }
.modal.on { opacity: 1; pointer-events: auto; }
.modal-box { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px; box-shadow: var(--shadow-lg); transform: translateY(10px) scale(.97); transition: transform .3s var(--ease); }
.modal.on .modal-box { transform: none; }
.modal-box h3 { font-size: 1.05rem; }
.modal-box p { font-size: .88rem; }
.modal-box .chips { margin: 14px 0 18px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* взаимная симпатия */
.match-burst { position: absolute; inset: 0; display: none; place-items: center; z-index: 20; pointer-events: none; background: radial-gradient(circle, rgba(255, 122, 166, .22), transparent 60%); }
.match-burst.on { display: grid; animation: fadeout 3s forwards; }
.match-burst > div { text-align: center; background: var(--surface); padding: 18px 26px; border-radius: 18px; box-shadow: var(--shadow-lg); font-weight: 700; animation: popIn .5s cubic-bezier(.2, 1.6, .4, 1); }
.match-burst .hearts { font-size: 2.4rem; }
.match-burst .muted { font-weight: 500; font-size: .88rem; }
@keyframes fadeout { 80% { opacity: 1; } 100% { opacity: 0; } }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 16px); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .25s, transform .3s var(--ease); z-index: 200; font-weight: 550; font-size: .88rem; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
canvas.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 300; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- выбор города с поиском ---------- */
.combo { position: relative; flex: 1; min-width: 190px; }
.combo-field { position: relative; display: flex; align-items: center; }
.combo-input { width: 100%; height: 40px; padding: 0 60px 0 36px; border-radius: 11px; border: 1px solid var(--border-strong); background: var(--surface);
  outline: none; font-size: .93rem; transition: border-color .2s, box-shadow .2s; text-overflow: ellipsis; }
.combo-input::placeholder { color: var(--muted); opacity: 1; }
.combo-input:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--border-strong)); }
.combo.open .combo-input, .combo-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.combo-pin { position: absolute; left: 12px; color: var(--dim); pointer-events: none; transition: color .2s; }
.combo.has-value .combo-pin, .combo.open .combo-pin { color: var(--accent); }
.combo-chevron { position: absolute; right: 12px; color: var(--dim); cursor: pointer; transition: transform .25s var(--ease); }
.combo.open .combo-chevron { transform: rotate(180deg); }
.combo-clear { position: absolute; right: 32px; width: 22px; height: 22px; border-radius: 6px; border: 0; background: var(--surface-2); color: var(--muted);
  display: grid; place-items: center; cursor: pointer; opacity: 0; transform: scale(.7); pointer-events: none; transition: opacity .15s, transform .2s var(--ease), background .15s; }
.combo.has-value .combo-clear { opacity: 1; transform: none; pointer-events: auto; }
.combo-clear:hover { background: var(--surface-3); color: var(--text); }
.starter .combo-input { height: 44px; }
.combo-pop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; max-height: 300px; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px;
  opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top center; pointer-events: none; transition: opacity .16s, transform .22s var(--ease); }
.combo.up .combo-pop { top: auto; bottom: calc(100% + 6px); transform-origin: bottom center; transform: translateY(6px) scale(.98); }
.combo.open .combo-pop { opacity: 1; transform: none; pointer-events: auto; }
.combo-group { font-size: .72rem; font-weight: 600; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; padding: 6px 10px 4px; }
.combo-opt { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: .9rem; transition: background .1s; }
.combo-opt .n { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo-opt .r { font-size: .76rem; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; min-width: 0; }
.combo-opt mark { background: none; color: var(--accent); font-weight: 700; }
.combo-opt.active { background: var(--surface-2); }
.combo-opt.selected .n { color: var(--accent); }
.combo-opt.selected::after { content: ""; flex: none; width: 14px; height: 14px; align-self: center; margin-left: -4px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c5ce7' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat; }
.combo-opt.any { border-bottom: 1px solid var(--border); border-radius: 9px 9px 0 0; margin-bottom: 4px; }
.combo-empty, .combo-hint { padding: 12px 10px; font-size: .84rem; color: var(--muted); text-align: center; }
.combo-hint { font-size: .76rem; color: var(--dim); padding: 8px; }

/* ---------- выравнивание: центрированные секции ---------- */
.faq { margin-inline: auto; }
.city-cloud.center { justify-content: center; }
.prose-center { max-width: 720px; margin-inline: auto; }
.prose-center h2 { text-align: center; }
.landing-hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .landing-hero { grid-template-columns: 1fr; gap: 24px; } }
.live-panel { padding: 0; overflow: hidden; box-shadow: var(--shadow); }
.live-panel .live-head { padding: 16px 20px; background: var(--grad-soft); display: flex; align-items: center; gap: 10px; }
.live-panel .live-head .ico { margin: 0; background: var(--surface); }
.live-panel .live-head b { display: block; font-size: .98rem; }
.live-panel .live-head small { color: var(--muted); font-size: .8rem; }
.live-panel .live-body { padding: 8px 20px 20px; }
.live-panel .live-row:last-of-type { margin-bottom: 14px; }
.live-num { font-variant-numeric: tabular-nums; }
.stat-pill { display: inline-flex; align-items: center; gap: 6px; }
.article { max-width: 760px; margin-inline: auto; display: grid; gap: 14px; }
.article p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.article .lead-p { color: var(--text); font-size: 1.06rem; }

/* страница городов */
.city-search { max-width: 460px; margin: 0 auto 28px; position: relative; }
.city-search .input { height: 46px; padding-left: 40px; border-radius: 13px; font-size: .98rem; box-shadow: var(--shadow-sm); }
.city-search svg { position: absolute; left: 14px; top: 15px; color: var(--dim); pointer-events: none; }
.letter-groups { columns: 4 220px; column-gap: 28px; }
.letter-group { break-inside: avoid; margin-bottom: 20px; }
.letter-group h3 { font-size: .8rem; color: var(--accent); margin: 0 0 6px; letter-spacing: .04em; }
.letter-group a { display: flex; justify-content: space-between; gap: 8px; padding: 5px 8px; margin: 0 -8px; border-radius: 8px; font-size: .92rem; transition: background .15s, color .15s; }
.letter-group a:hover { background: var(--accent-soft); color: var(--accent); }
.letter-group a small { color: var(--dim); font-size: .76rem; font-variant-numeric: tabular-nums; }
.no-results { text-align: center; color: var(--muted); padding: 30px 0; display: none; }

/* ---------- выбор тарифа и оплата ---------- */
.plan-pick { cursor: pointer; }
.plan-pick input { position: absolute; opacity: 0; pointer-events: none; }
.plan-pick:has(input:checked) { border: 1.5px solid var(--accent); box-shadow: 0 0 0 4px var(--accent-ring), 0 20px 40px -24px rgba(108, 92, 231, .5); }
.plan-pick:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.plan-check { position: absolute; right: 16px; bottom: 16px; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--border-strong);
  display: grid; place-items: center; color: transparent; transition: all .2s var(--ease); }
.plan-check .lucide { width: 14px; height: 14px; }
.plan-pick:has(input:checked) .plan-check { background: var(--accent); border-color: var(--accent); color: #fff; transform: scale(1.05); }
.plan .per { min-height: 2.6em; }
.pay-box { max-width: 620px; margin: 16px auto 0; padding: 22px; box-shadow: var(--shadow); }
.pay-summary { display: flex; align-items: center; gap: 14px; justify-content: center; text-align: center; flex-wrap: wrap; }
.pay-summary > div { display: grid; gap: 2px; }
.pay-summary span { font-size: .8rem; }
.pay-summary b { font-size: 1.15rem; letter-spacing: -.02em; }
.pay-arrow { color: var(--dim); }
.pay-note { text-align: center; color: var(--muted); font-size: .85rem; margin: 10px 0 16px; }
.consent { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); line-height: 1.5; transition: border-color .2s, background .2s; }
.consent:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.consent a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.btn-grad:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; filter: grayscale(.3); }
.pay-secure { display: flex; gap: 6px; justify-content: center; align-items: center; font-size: .8rem; margin: 12px 0 0; }
.pay-secure .lucide { width: 15px; height: 15px; }

/* ---------- подписка в профиле ---------- */
.sub-status { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px; border-radius: 12px; background: var(--surface-2); margin-bottom: 14px; }
.sub-status b { display: block; }
.sub-status small { color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.pill-on { background: var(--ok-soft); color: var(--ok); }
.pill-off { background: var(--surface-3); color: var(--muted); }
.pill-warn { background: var(--danger-soft); color: var(--danger); }
.code-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.code-input { width: 160px; letter-spacing: .4em; font-size: 1.1rem; text-align: center; font-variant-numeric: tabular-nums; }

/* свои стикеры в профиле */
.my-stickers { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.my-sticker { position: relative; aspect-ratio: 1; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; transition: transform .2s, opacity .2s; }
.my-sticker img { width: 80%; height: 80%; object-fit: contain; }
.my-sticker button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow-sm); cursor: pointer; font-size: .7rem; color: var(--danger); opacity: 0; transition: opacity .15s; }
.my-sticker:hover button { opacity: 1; }
@media (hover: none) { .my-sticker button { opacity: 1; } }
.my-sticker.removing { transform: scale(.6); opacity: 0; }

/* недоступный тариф (пробный уже использован) */
.plan-disabled { opacity: .5; cursor: not-allowed; filter: grayscale(.4); }
.plan-disabled:hover { transform: none; box-shadow: var(--shadow-sm); }

/* ===== мини-приложения Telegram / MAX ===== */
.mini-header { position: sticky; top: 0; z-index: 50; display: flex; justify-content: space-around; gap: 4px; padding: 6px 8px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); border-bottom: 1px solid var(--border); backdrop-filter: blur(12px); }
.mini-tab { flex: 1; display: grid; justify-items: center; gap: 1px; padding: 5px 4px; border-radius: 10px; font-size: .7rem; font-weight: 600;
  color: var(--muted); transition: background .15s, color .15s; }
.mini-tab .lucide { width: 20px; height: 20px; }
.mini-tab .avatar { width: 22px; height: 22px; font-size: .8rem; }
.mini-tab.active { color: var(--accent); background: var(--accent-soft); }
body.miniapp .bg-orbs, body.miniapp .scroll-progress, body.miniapp .to-top { display: none; }
body.miniapp .hero { padding-top: 20px; }
body.miniapp .section { padding: 20px 0; }
/* высота экрана — по данным Telegram, чтобы клавиатура не перекрывала поле ввода */
body.miniapp.chat-body { height: var(--tg-viewport-stable-height, 100dvh); }
body.miniapp .chat-app { padding: 0; }
body.miniapp .chat-shell { border-radius: 0; border: 0; box-shadow: none; width: 100%; }

/* ---------- переключатель ---------- */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: .88rem; }
.switch input { position: absolute; opacity: 0; }
.switch .knob { width: 42px; height: 24px; border-radius: 999px; background: var(--surface-3); position: relative; transition: background .2s; flex: none; }
.switch .knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s var(--ease); }
.switch input:checked + .knob { background: var(--accent); }
.switch input:checked + .knob::after { transform: translateX(18px); }
.switch input:focus-visible + .knob { box-shadow: 0 0 0 4px var(--accent-ring); }
.switch input:disabled + .knob { opacity: .6; cursor: not-allowed; }

/* ---------- согласие на cookie ---------- */
.cookie-bar { position: fixed; left: 50%; bottom: 16px; z-index: 90; width: min(860px, calc(100% - 24px)); transform: translateX(-50%);
  display: flex; gap: 14px 20px; align-items: center; padding: 14px 16px 14px 20px; border-radius: var(--radius);
  background: var(--surface-solid); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  animation: cookieIn .45s var(--ease) both .4s; }
.cookie-bar.hide { animation: cookieOut .25s var(--ease) both; }
@keyframes cookieIn { from { opacity: 0; transform: translate(-50%, 20px); } }
@keyframes cookieOut { to { opacity: 0; transform: translate(-50%, 20px); } }
.cookie-text { flex: 1; min-width: 0; font-size: .85rem; line-height: 1.5; color: var(--muted); }
.cookie-text b { display: block; color: var(--text); font-size: .92rem; margin-bottom: 2px; }
.cookie-text a { color: var(--accent); font-weight: 600; }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
@media (max-width: 720px) {
  .cookie-bar { flex-direction: column; align-items: stretch; bottom: 10px; padding: 14px; gap: 12px; }
  .cookie-text { font-size: .8rem; }
  .cookie-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .cookie-actions .btn { justify-content: center; white-space: nowrap; padding-left: 8px; padding-right: 8px; }
  .cookie-actions .btn-primary { grid-column: 1 / -1; order: -1; }
}
body.chat-body .cookie-bar { bottom: auto; top: calc(var(--header-h) + 10px); }
body.miniapp .cookie-bar { bottom: 8px; }
.consent-modal { width: min(480px, 100%); }
.consent-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); cursor: pointer; }
.consent-row b { display: block; font-size: .92rem; }
.consent-row small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.45; margin-top: 2px; }
.consent-modal .modal-actions { margin-top: 10px; }
