@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Onest:wght@400;500;600;700&display=swap");

/* Тёмная тема (часть 3): фон #1c1c1f, карточки #232327, линии #2e2e33, текст #f2f1ee, акцент #a78bfa */
:root {
  --ink: #f2f1ee;
  --muted: #9a9aa3;
  --soft: #cfcdd6;
  --line: #2e2e33;
  --bg: #1c1c1f;
  --paper: #232327;
  --sunk: #19191c;
  --hover: #2a2a2f;
  --accent: #a78bfa;
  --accent-soft: #3b2f6b;
  --accent-ink: #1c1c1f;
  --gold: #d4b27c;
  --kaspi: #e4002b;
  --ok: #6fcf97;
  --err: #ff8a80;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 40px rgba(0, 0, 0, .35);
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }

button, .btn {
  min-height: 42px; padding: 0 18px; border: 0; border-radius: 14px; background: var(--ink); color: var(--accent-ink);
  font: 600 14.5px var(--font); letter-spacing: .01em; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
button:hover, .btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0, 0, 0, .35); }
button:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
button:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }
button.ghost { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
button.link { background: none; color: var(--muted); padding: 0 6px; min-height: 32px; font-weight: 500; }
button.link:hover { box-shadow: none; color: var(--ink); }

.top {
  position: sticky; top: 0; z-index: 5; height: 60px; display: flex; align-items: center; gap: 14px; padding: 0 20px;
  background: rgba(28, 28, 31, .78); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line);
}
.logo { font-size: 19px; font-weight: 700; letter-spacing: -.02em; display: inline-flex; align-items: center; gap: 10px; }
.logo::before {
  content: ""; width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #5b4fd6 60%, var(--gold));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.status { color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.plan { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.plan.pro { background: linear-gradient(135deg, #f6ecd9, #efe0c2); border-color: #e2cfa8; color: #7a5a2a; }
.who { color: var(--muted); font-size: 13.5px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
main { height: calc(100dvh - 60px); }

/* Landing */
.intro { max-width: 1040px; margin: 0 auto; padding: 72px 24px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.intro > .copy { display: grid; gap: 16px; align-content: start; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.intro h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.04; letter-spacing: -.035em; margin: 0; font-weight: 700; text-wrap: balance; }
.intro p { margin: 0; font-size: 17px; color: var(--soft); max-width: 46ch; }
.intro .muted { font-size: 14px; color: var(--muted); }
.intro button { min-height: 50px; padding: 0 26px; font-size: 15.5px; border-radius: 14px; justify-self: start; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 13.5px; }
.trust span::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.preview { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.preview .bar { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 600; }
.preview .ava { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 700; background: linear-gradient(135deg, #2f9e6a, #46b884); }
.preview .msgs { display: grid; gap: 8px; padding: 18px; background: var(--sunk); }
.preview .b { max-width: 80%; padding: 9px 13px; border-radius: 16px; font-size: 14px; line-height: 1.4; }
.preview .in { background: var(--paper); border: 1px solid var(--line); justify-self: start; border-bottom-left-radius: 6px; }
.preview .out { background: var(--accent-soft); justify-self: end; border-bottom-right-radius: 6px; }
.preview .ai { justify-self: center; font-size: 12.5px; color: #7a5a2a; background: #f6ecd9; border-radius: 999px; padding: 5px 12px; }
#queue, #denied { grid-template-columns: minmax(0, 640px); justify-content: center; }
#queue h1, #denied h1 { font-size: 34px; }

.muted { color: var(--muted); font-size: 14px; }
.error { color: var(--err); font-size: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }

/* Dialogs */
dialog { border: 0; border-radius: 22px; padding: 28px; width: min(440px, calc(100vw - 32px)); box-shadow: 0 24px 80px rgba(20, 22, 31, .28); font-family: var(--font); color: var(--ink); }
dialog::backdrop { background: rgba(20, 22, 31, .45); backdrop-filter: blur(4px); }
dialog h2 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; }
dialog ul { padding-left: 0; list-style: none; display: grid; gap: 10px; margin: 16px 0; }
dialog li { padding-left: 28px; position: relative; }
dialog li::before { content: "✦"; position: absolute; left: 4px; color: var(--gold); }
dialog .close { position: absolute; right: 14px; top: 10px; }
dialog .close button { background: none; color: var(--muted); font-size: 24px; min-height: 32px; padding: 0 8px; }
dialog .close button:hover { box-shadow: none; transform: none; color: var(--ink); }
#pro-pay .btn, #pro-buy { width: 100%; margin-top: 8px; min-height: 50px; }
#pro-buy, .kaspi { background: var(--kaspi); }
.qr { display: block; width: 240px; height: 240px; margin: 14px auto; border: 1px solid var(--line); border-radius: 16px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100vw - 32px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; z-index: 10; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow); white-space: pre-line; }
.toast button { min-height: 32px; background: #fff; color: var(--ink); }

/* /club and /admin */
.page { max-width: 480px; margin: 0 auto; padding: 56px 20px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 24px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.card .btn, .card button { width: 100%; min-height: 50px; }
.stats { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; }
.stats b { font-size: 22px; text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 860px) {
  .intro { grid-template-columns: minmax(0, 1fr); padding: 40px 20px; gap: 32px; }
}
@media (max-width: 640px) {
  .who, .status { display: none; }
  .top { gap: 8px; padding: 0 10px; }
  button { padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ===== Почта: дополнения к основе дизайна ===== */
:root { --gold-soft: #3a3020; --gold-ink: #e8cf9f; }
a { color: var(--accent); }
main { height: auto; min-height: calc(100dvh - 60px); }
.top .btn, .top button { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn.ghost, a.btn.ghost { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.btn.accent { background: var(--accent); }
.btn.gold { background: linear-gradient(135deg, #c9a46c, var(--gold)); color: #fff; }
.btn.big { min-height: 50px; padding: 0 26px; font-size: 15.5px; border-radius: 14px; }
.wide { width: 100%; }
.status[data-kind="warn"] { color: #8a5a00; }
.status[data-kind="error"] { color: var(--err); }
.status[data-kind="ok"] { color: var(--ok); }
.user { display: flex; align-items: center; gap: 8px; min-width: 0; }
.user-pic { width: 30px; height: 30px; border-radius: 50%; box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--line); }

.gsi { min-height: 44px; }

/* Первый экран: действия под текстом */
.intro .actions { display: grid; gap: 12px; justify-items: start; }
.intro .actions .muted { margin: 0; }
.connect-box { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.connect-box .muted { flex-basis: 100%; }
.queued { padding: 18px 20px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; gap: 8px; }
.queued h2 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.queued p { font-size: 14.5px; }
.queued button { min-height: 42px; font-size: 14.5px; padding: 0 18px; }
.preview .bar .sub { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.preview .bar .grow { flex: 1; }
.preview .who-line { display: grid; line-height: 1.25; }
.preview .reply { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; align-items: center; }
.preview .reply span { flex: 1; padding: 9px 12px; border-radius: 12px; background: var(--sunk); border: 1px solid var(--line); }
.preview .reply i { width: 34px; height: 34px; border-radius: 12px; background: var(--accent); display: grid; place-items: center; color: #fff; font-style: normal; }

/* Чат */
.chat-wrap { height: calc(100dvh - 60px); padding: 14px; }
.chat-wrap vue-advanced-chat { display: block; height: 100%; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: var(--paper); }

/* Диалоги */
.field { display: grid; gap: 6px; margin: 0 0 14px; font-size: 14px; color: var(--muted); }
.field input { font: 15px var(--font); color: var(--ink); padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--sunk); }
.field input:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); background: var(--paper); }
.form-error { color: var(--err); font-size: 14px; margin: 0 0 10px; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }
.pro-dialog { width: min(460px, calc(100vw - 32px)); }
.pro-dialog .eyebrow { margin: 0 0 6px; }
.price { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 14px; }
.price .muted { font-weight: 500; letter-spacing: 0; }
.perks { margin: 14px 0 16px; }

/* /club */
.club-page .page { min-height: 100dvh; display: grid; align-content: center; }
.club-page h1 { font-size: clamp(28px, 6vw, 38px); line-height: 1.08; letter-spacing: -.03em; margin: 0; }
.club-page .lead { margin: 0; color: var(--soft); font-size: 16px; }
.done { color: var(--ok); font-weight: 700; font-size: 20px; margin: 0; }
#qrBox, #start, #done { display: grid; gap: 10px; }

/* /admin */
.admin { max-width: 1000px; margin: 0 auto; padding: 32px 20px 56px; }
.admin h1 { letter-spacing: -.02em; }
.admin h2 { margin: 28px 0 4px; letter-spacing: -.01em; }
.admin .panel { max-width: 520px; margin: 40px auto; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 14px 0 8px; }
.cards .card { gap: 4px; padding: 18px; }
.cards .card span { color: var(--muted); font-size: 13px; }
.cards .card b { font-size: 36px; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cards .card small { color: var(--muted); font-size: 12.5px; }
.cards .card.gold b { color: var(--gold); }
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; font-size: 14px; box-shadow: var(--shadow); }
.table th, .table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: 0; }
.table th { color: var(--muted); font-weight: 600; background: var(--sunk); }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: var(--shadow); }

@media (max-width: 860px) {
  .preview { order: 2; }
}
@media (max-width: 640px) {
  .user-email { display: none; }
  .chat-wrap { padding: 0; }
  .chat-wrap vue-advanced-chat { border-radius: 0; border: 0; }
  .top .btn, .top button { padding: 0 10px; font-size: 13px; }
}
.gold-text { color: var(--gold); }
.club-page .card .eyebrow { margin: 0; }

/* ===== Часть 3: тёмная тема, засечки, акцент фиолетовый ===== */
h1, h2, .logo, .price, .cards .card b, .done, dialog h2, .queued h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
.intro h1 { font-size: clamp(44px, 6.4vw, 72px); line-height: .98; letter-spacing: -.02em; font-weight: 600; }
dialog h2 { font-size: 32px; }
.club-page h1 { font-size: clamp(36px, 7vw, 48px); line-height: 1; }
.price { font-size: 38px; }
.cards .card b { font-size: 44px; }
.eyebrow { color: var(--accent); }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.gold { background: linear-gradient(135deg, #e2c08a, #c49a5c); color: #1c1c1f; }
.kaspi, .btn.kaspi, #pro-buy { background: var(--kaspi); color: #fff; }
button.ghost, .btn.ghost, a.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button.ghost:hover, .btn.ghost:hover { background: var(--hover); }
.logo::before { background: linear-gradient(135deg, #a78bfa, #6d5bd0 60%, #3b2f6b); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.plan { background: var(--paper); }
.plan.pro { background: linear-gradient(135deg, #3a3020, #2c2518); border-color: #5a4a2c; color: #e8cf9f; }
.trust span::before { color: var(--accent); }
.preview .out { background: #3b2f6b; color: var(--ink); }
.preview .in { color: var(--ink); }
.preview .ai { background: #2a2440; color: #d9ccff; border: 1px solid #3b2f6b; }
.preview .ava { background: linear-gradient(135deg, #a78bfa, #6d5bd0); }
.preview .reply i { background: var(--accent); color: var(--accent-ink); }
dialog { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
dialog::backdrop { background: rgba(10, 10, 12, .6); }
dialog li::before { color: var(--accent); }
.field input { color: var(--ink); }
.field input:focus { outline-color: var(--accent-soft); }
.qr { background: #fff; }
.toast { background: var(--paper); border: 1px solid var(--line); }
.status[data-kind="warn"] { color: #f2c46d; }
.cards .card.gold b { color: var(--gold); }
.user-pic { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--line); }
::selection { background: #3b2f6b; color: #fff; }

/* Умный ящик: переключатель над списком (слот rooms-header компонента) */
.inbox-bar { display: flex; gap: 4px; padding: 10px 12px 6px; font-family: var(--font); }
.inbox-bar .seg { flex: 1; min-height: 34px; padding: 0 8px; border-radius: 12px; background: transparent; color: var(--muted); border: 1px solid transparent; font: 500 13px var(--font); gap: 6px; box-shadow: none; transform: none; transition: background-color .18s ease, color .18s ease, border-color .18s ease; }
.inbox-bar .seg:hover { background: var(--hover); color: var(--ink); box-shadow: none; transform: none; }
.inbox-bar .seg.on { background: var(--accent-soft); color: var(--ink); border-color: #4a3d85; }
.inbox-bar .cnt:empty { display: none; }
.inbox-bar .cnt { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }

/* Онбординг: три экрана с точками-прогрессом, справа живое превью */
.onb { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(12, 12, 14, .72); backdrop-filter: blur(8px); animation: fade-in .22s ease both; }
.onb-card { width: min(980px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 22px 28px 28px; }
.onb-dots { display: flex; gap: 8px; justify-content: center; margin-bottom: 18px; }
.onb-dots i { width: 28px; height: 4px; border-radius: 999px; background: var(--line); transition: background-color .2s ease, width .2s ease; }
.onb-dots i.on { background: var(--accent); width: 44px; }
.onb-screen { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; animation: screen-in .22s var(--ease) both; }
.onb-copy { display: grid; gap: 14px; align-content: start; }
.onb-copy h2 { font-size: clamp(32px, 4vw, 44px); line-height: 1.02; margin: 0; }
.onb-copy .eyebrow, .onb-copy p { margin: 0; }
.onb-actions { display: flex; gap: 10px; margin-top: 6px; }
.choice { display: grid; gap: 10px; }
.opt { display: grid; gap: 2px; justify-items: start; text-align: left; min-height: 0; padding: 14px 16px; border-radius: 16px; background: var(--sunk); color: var(--ink); border: 1px solid var(--line); font-weight: 400; transition: border-color .18s ease, background-color .18s ease, transform .18s ease; }
.opt b { font-size: 15.5px; }
.opt span { color: var(--muted); font-size: 13.5px; }
.opt.on { border-color: var(--accent); background: #26213a; }
.onb-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.onb-list li { padding-left: 24px; position: relative; color: var(--soft); }
.onb-list li::before { content: "✦"; position: absolute; left: 2px; color: var(--accent); }
.tag-pro { font: 700 12px/1 var(--font); letter-spacing: .08em; vertical-align: middle; padding: 5px 8px; border-radius: 999px; background: linear-gradient(135deg, #3a3020, #2c2518); color: #e8cf9f; border: 1px solid #5a4a2c; }
.onb-bar { height: 8px; border-radius: 999px; background: var(--sunk); border: 1px solid var(--line); overflow: hidden; }
.onb-bar i { display: block; height: 100%; width: 8%; border-radius: inherit; background: linear-gradient(90deg, #7c5cdb, var(--accent)); transition: width .25s ease; }
.onb-preview { background: var(--sunk); border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: grid; gap: 10px; min-height: 280px; align-content: start; }
.pv-tabs { display: flex; gap: 6px; }
.pv-tabs span { flex: 1; text-align: center; padding: 7px; border-radius: 12px; font-size: 12.5px; color: var(--muted); border: 1px solid var(--line); }
.pv-tabs span.on { background: var(--accent-soft); color: var(--ink); border-color: #4a3d85; }
.onb-preview.list .pv-tabs { display: none; }
.onb-preview.smart .pv-notify { display: none; }
.pv-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); animation: screen-in .22s var(--ease) both; }
.pv-row div { display: grid; gap: 2px; min-width: 0; }
.pv-row b { font-size: 13.5px; }
.pv-row s { text-decoration: none; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-row em { font-style: normal; font-size: 11px; font-weight: 700; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 2px 7px; }
.pv-ava { width: 36px; height: 36px; border-radius: 50%; background: var(--line); }
.pv-ava.a1 { background: linear-gradient(135deg, #a78bfa, #6d5bd0); }
.pv-ava.a2 { background: linear-gradient(135deg, #6fcf97, #2f7d5b); }
.pv-ava.a3 { background: linear-gradient(135deg, #9a9aa3, #55555d); }
.pv-ava.a4 { background: linear-gradient(135deg, #e2c08a, #c0612b); }
.pv-row.skeleton b, .pv-row.skeleton s { display: block; height: 10px; border-radius: 6px; background: var(--line); }
.pv-row.skeleton b { width: 40%; }
.pv-row.skeleton s { width: 75%; }
.pv-row.skeleton { animation: pulse 1.4s ease-in-out infinite; }
.pv-b { max-width: 82%; padding: 9px 13px; border-radius: 16px; font-size: 13.5px; line-height: 1.4; }
.pv-b.in { background: var(--paper); border: 1px solid var(--line); justify-self: start; border-bottom-left-radius: 6px; }
.pv-b.out { background: #3b2f6b; justify-self: end; border-bottom-right-radius: 6px; }
.pv-ai { font-size: 13px; line-height: 1.5; padding: 10px 12px; border-radius: 14px; background: #2a2440; border: 1px solid #3b2f6b; color: #e4dcff; }
.pv-draft { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); }
.pv-draft span { flex: 1; padding: 9px 12px; border-radius: 12px; background: var(--paper); border: 1px dashed #4a3d85; }
.pv-draft i { width: 32px; height: 32px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-style: normal; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { opacity: .55; } }
@media (max-width: 760px) {
  .onb-screen { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .onb-preview { min-height: 0; }
  .onb-card { padding: 18px; }
}

/* Виджеты справа, когда ни один чат не открыт (слот no-room-selected) */
.widgets { height: 100%; overflow: auto; padding: 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-content: start; font-family: var(--font); color: var(--ink); background: var(--bg); animation: screen-in .22s var(--ease) both; }
.widget { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 18px 18px 16px; display: grid; gap: 10px; align-content: start; box-shadow: var(--shadow); min-height: 220px; }
.widget header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.widget h2 { margin: 0; font-size: 28px; }
.widget .muted { margin: 0; font-size: 13px; }
.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tasks li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 9px 10px; border-radius: 14px; background: var(--sunk); border: 1px solid var(--line); transition: background-color .18s ease, opacity .18s ease; }
.tasks li:hover { background: var(--hover); }
.tasks input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); cursor: pointer; }
.tasks .task-open { all: unset; cursor: pointer; display: grid; gap: 2px; min-width: 0; }
.tasks .task-open b { font-size: 14px; }
.tasks .task-open span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tasks .task-open:focus-visible { outline: 2px solid var(--accent); border-radius: 8px; }
.tasks li.done { opacity: .55; }
.tasks li.done b, .tasks li.done span { text-decoration: line-through; }
.btn.small { min-height: 32px; font-size: 13px; padding: 0 12px; justify-self: start; }
.notes { width: 100%; min-height: 220px; resize: vertical; font: 14.5px/1.55 var(--font); color: var(--ink); background: var(--sunk); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; transition: border-color .18s ease; }
.notes:focus { outline: none; border-color: var(--accent); }

/* ===== Шаг 25: главная до подключения Gmail ===== */
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
.lnav { display: flex; gap: 4px; margin-left: 8px; }
.lnav a { color: var(--muted); text-decoration: none; font-size: 14px; padding: 8px 10px; border-radius: 10px; transition: color .18s ease, background-color .18s ease; }
.lnav a:hover { color: var(--ink); background: var(--hover); }
.landing { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.landing h2 { font-size: clamp(36px, 5vw, 56px); line-height: 1; margin: 0; }
.landing h3 { font-family: var(--serif); font-size: 26px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.landing em { font-style: italic; color: var(--accent); }
.landing .eyebrow { margin: 0; }
.small { font-size: 13px; }

/* Первый экран */
.hero { min-height: calc(100dvh - 60px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; padding: 48px 0 72px; position: relative; }
.hero-copy { display: grid; gap: 18px; align-content: center; animation: screen-in .24s var(--ease) both; }
.hero h1 { font-size: clamp(46px, 6.6vw, 84px); line-height: .95; letter-spacing: -.025em; margin: 0; font-weight: 600; }
.hero h1 em { display: inline-block; }
.hero-sub { margin: 0; color: var(--soft); font-size: 17.5px; max-width: 48ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin: 0; }
.scroll-hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); color: var(--muted); text-decoration: none; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; display: grid; justify-items: center; gap: 2px; }
.scroll-hint span { animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(5px); } }
.attention { animation: attention .6s ease 2; border-radius: 16px; }
@keyframes attention { 50% { box-shadow: 0 0 0 4px rgba(167, 139, 250, .35); } }

/* Макеты интерфейса из блоков */
.mock { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; font-size: 13.5px; }
.mock-chat { display: grid; grid-template-columns: 210px 1fr; min-height: 420px; animation: screen-in .24s var(--ease) .08s both; }
.mock-side { border-right: 1px solid var(--line); padding: 12px; display: grid; gap: 6px; align-content: start; background: var(--sunk); }
.mock-tabs { display: flex; gap: 4px; margin-bottom: 4px; }
.mock-tabs span { flex: 1; text-align: center; padding: 6px 4px; border-radius: 10px; color: var(--muted); font-size: 11.5px; border: 1px solid var(--line); }
.mock-tabs span.on { background: var(--accent-soft); color: var(--ink); border-color: #4a3d85; }
.mock-room { display: grid; grid-template-columns: 32px 1fr auto; gap: 8px; align-items: center; padding: 8px; border-radius: 12px; }
.mock-room.on { background: #2f2a45; }
.mock-room div { display: grid; min-width: 0; }
.mock-room b { font-size: 12.5px; }
.mock-room s, .row span { text-decoration: none; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-room em { font-style: normal; font-size: 10.5px; font-weight: 700; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 1px 6px; }
.av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; color: #fff; }
.av.v1 { background: linear-gradient(135deg, #a78bfa, #6d5bd0); }
.av.v2 { background: linear-gradient(135deg, #6fcf97, #2f7d5b); }
.av.v3 { background: linear-gradient(135deg, #e2c08a, #c0612b); }
.mock-thread { display: grid; gap: 8px; align-content: start; padding: 14px; background: var(--bg); }
.mock-head { display: flex; gap: 10px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.bub { max-width: 82%; padding: 9px 13px; border-radius: 16px; line-height: 1.45; }
.bub.in { background: #2a2a2f; justify-self: start; border-bottom-left-radius: 6px; }
.bub.out { background: #3b2f6b; justify-self: end; border-bottom-right-radius: 6px; }
.bub.ai { background: #2a2440; border: 1px solid #3b2f6b; color: #e4dcff; justify-self: start; border-bottom-left-radius: 6px; }
.bub.ai small { display: block; margin-top: 6px; color: var(--muted); font-size: 11.5px; }
.bub.file { display: flex; gap: 10px; align-items: center; background: #2a2a2f; justify-self: start; }
.bub.file i { font-style: normal; font-size: 10px; font-weight: 700; padding: 8px 6px; border-radius: 8px; background: var(--accent-soft); color: #d9ccff; }
.bub.file small { color: var(--muted); }
.mock-input { display: flex; gap: 8px; align-items: center; margin-top: 6px; color: var(--muted); }
.mock-input span { flex: 1; padding: 9px 12px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.mock-input i { width: 32px; height: 32px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-style: normal; }

/* Секции */
.lsec { padding: 88px 0; border-top: 1px solid var(--line); }
.lsec-head { display: grid; gap: 12px; max-width: 660px; margin-bottom: 36px; }
.lsec-head .muted { font-size: 16.5px; margin: 0; }
.ba { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 20px; align-items: center; }
.ba-col { display: grid; gap: 10px; }
.ba-label { justify-self: start; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); }
.ba-label.on { color: var(--accent); border-color: #4a3d85; background: #26213a; }
.ba-arrow { color: var(--accent); font-size: 28px; }
.mock-mail .mail { padding: 18px; display: grid; gap: 8px; background: #f2f1ee; color: #2a2a2f; font-family: Georgia, "Times New Roman", serif; font-size: 13.5px; min-height: 240px; }
.mock-mail small { color: #6b6b75; }
.mock-mail p { margin: 0; }
.mock-mail .q { color: #6b6b75; border-left: 3px solid #c9c8d0; padding-left: 10px; }
.mock-mail .sig { color: #8a8a94; font-size: 12.5px; }
.mock-bubbles { padding: 18px; display: grid; gap: 8px; background: var(--bg); min-height: 240px; align-content: center; }
.mock-list, .mock-search { padding: 8px; display: grid; gap: 2px; min-height: 240px; align-content: start; background: #f2f1ee; color: #2a2a2f; }
.row { display: grid; grid-template-columns: auto 110px 1fr auto; gap: 10px; align-items: center; padding: 10px; border-radius: 8px; border-bottom: 1px solid #e2e0da; }
.mock-search .row { grid-template-columns: 110px 1fr; }
.row i { font-style: normal; color: #b0afb8; }
.row i.star { color: #e3a008; }
.row b { font-size: 12.5px; font-weight: 500; }
.row.unread b, .row.unread span { font-weight: 700; color: #14161f; }
.mock-list .row span, .mock-search .row span { color: #55555d; }
.row small { color: #8a8a94; font-size: 11px; }
.search { padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid #e2e0da; margin-bottom: 6px; color: #55555d; }
.mock-search .muted { color: #8a8a94; margin: 6px 10px; }
.mock-tasks { padding: 16px; display: grid; gap: 8px; min-height: 240px; align-content: center; background: var(--bg); }
.task { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 12px 14px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); }
.task div { display: grid; gap: 2px; }
.task a { color: var(--accent); font-size: 12.5px; }
.task .box { width: 18px; height: 18px; border-radius: 6px; border: 2px solid #4a4a52; display: grid; place-items: center; font-style: normal; font-size: 12px; }
.task .box.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.task.done b { text-decoration: line-through; color: var(--muted); }
.cards3, .cards4 { display: grid; gap: 14px; margin-top: 32px; }
.cards3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 0; }
.fcard { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: grid; gap: 10px; align-content: start; transition: transform .2s ease, border-color .2s ease; }
.fcard:hover { transform: translateY(-3px); border-color: #4a3d85; }
.fcard p { margin: 0; color: var(--muted); font-size: 14.5px; }
.ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: #d9ccff; font-size: 18px; }
.privacy { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; align-items: start; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 36px; }
.plist { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.plist li { padding-left: 28px; position: relative; color: var(--soft); }
.plist li::before { content: "✓"; position: absolute; left: 2px; color: var(--accent); font-weight: 700; }
.plist.small li { font-size: 14.5px; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); gap: 16px; }
.pcard { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 26px; display: grid; gap: 14px; align-content: start; }
.pcard.pro { border-color: #4a3d85; background: linear-gradient(180deg, #26213a, var(--paper) 60%); }
.pprice { font-family: var(--serif); font-size: 44px; font-weight: 600; margin: 0; line-height: 1; }
.pprice small { font-family: var(--font); font-size: 14px; color: var(--muted); font-weight: 400; }
.final { text-align: center; display: grid; gap: 14px; justify-items: center; padding: 56px 24px; border-radius: 22px; background: radial-gradient(120% 140% at 50% 0%, #2f2a45, var(--paper) 70%); border: 1px solid var(--line); }
.final p { margin: 0; }
.footer { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; padding: 28px 0 40px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
.footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* Появление при прокрутке */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .25s ease, transform .25s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .lnav { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 32px; }
  .cards3, .cards4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .privacy { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 26px; }
}
@media (max-width: 680px) {
  .landing { padding: 0 16px; }
  .mock-chat { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .mock-side { display: none; }
  .ba { grid-template-columns: minmax(0, 1fr); }
  .ba-arrow { transform: rotate(90deg); justify-self: center; }
  .cards3, .cards4, .plans { grid-template-columns: minmax(0, 1fr); }
  .lsec { padding: 56px 0; }
  .row { grid-template-columns: auto 80px 1fr; }
  .row small { display: none; }
  .hero-actions .btn { flex: 1 1 100%; }
  .scroll-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ===== Плавность: 150–250 мс; при prefers-reduced-motion всё мгновенно ===== */
dialog[open] { animation: dialog-in .22s var(--ease) both; }
dialog[open]::backdrop { animation: fade-in .2s ease both; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.intro > .copy { animation: screen-in .24s var(--ease) both; }
.intro > .preview { animation: screen-in .24s var(--ease) .06s both; }
.chat-wrap:not([hidden]) { animation: fade-in .2s ease both; }
.queued:not([hidden]), .connect-box:not([hidden]) { animation: screen-in .2s var(--ease) both; }
.opt:hover { transform: translateY(-1px); border-color: #4a3d85; }
.pv-row:hover { transform: translateX(2px); }
.preview .b { transition: transform .18s ease; }
.preview:hover .b.out { transform: translateX(-2px); }
.top a.logo { transition: opacity .18s ease; }
.top a.logo:hover { opacity: .85; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, dialog[open], dialog[open]::backdrop { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
