/* Каркас мини-приложения: небо, меню, разговор с Астрой и общий «Набор для экранов».
 * Цвета, шрифты и размеры — только токены из tokens.css (подключён раньше). Дизайн — решение владельца 08.10:
 * заголовки Jura Light, кнопки Comfortaa, фон — небо и медленное колесо, холодные бирюзовые акценты.
 * Навигация по прототипу 08.10: телефон — нижние вкладки (Астра в центре), компьютер (≥ 960 px) — меню слева,
 * раздел по центру, Астра всегда справа. */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--text); }
body { font: 400 15px/1.55 var(--f-body); overflow: hidden; display: flex; flex-direction: column; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
:focus-visible { outline: var(--focus); outline-offset: 2px; }

/* ── небо ─────────────────────────────────────────────────────── */
.sky { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.sky__bg {
  position: absolute; inset: -4%;
  background: url("assets/bg_sky.webp?v=2") center / cover no-repeat,
              linear-gradient(180deg, var(--ink), var(--ink-2) 45%, var(--ink-3));
  animation: drift 60s ease-in-out infinite alternate;
}
.sky__stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.sky__wheel {
  --wheel: min(132vw, 640px);
  position: absolute; left: 50%; top: calc(var(--orb-y, 190px) - var(--wheel) / 2); width: var(--wheel); aspect-ratio: 1;
  margin-left: calc(var(--wheel) / -2);
  background: url("assets/wheel.webp?v=2") center / contain no-repeat;
  opacity: .2;
  animation: spin 240s linear infinite;
  transition: opacity 1.2s ease, filter 1.2s ease, top 1.2s ease;
}
.sky__veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(var(--ink-rgb), .1) 0%, rgba(var(--ink-rgb), 0) 30%, rgba(var(--ink-rgb), .55) 72%, rgba(var(--ink-rgb), .9) 100%);
}
body.is-talking .sky__wheel { opacity: .12; top: -18vh; }
body.is-thinking .sky__wheel { opacity: .34; filter: drop-shadow(0 0 18px rgba(var(--accent-rgb), .35)); animation-duration: 40s; }
body:not([data-view="chat"]) .sky__wheel { opacity: .16; top: calc(180px - var(--wheel) / 2); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 0%,100% { transform: scale(.96); opacity: .85; } 50% { transform: scale(1.04); opacity: 1; } }
@keyframes drift { from { transform: translate3d(0,0,0) scale(1.02); } to { transform: translate3d(-1.5%,-1%,0) scale(1.06); } }
@keyframes pan { 0%, 100% { background-position: 0 50%; } 50% { background-position: 100% 50%; } }

/* ── шапка разговора (внутри экрана Астры) ───────────────────── */
.top {
  position: relative; z-index: 2; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(12px + var(--safe-t)) 16px 6px;
}
.top__name { min-width: 0; }
.top__title { display: block; font: 300 22px/1 var(--f-head); letter-spacing: .14em; color: var(--text); text-transform: uppercase; }
.top__sub { display: block; margin-top: 5px; font-size: 11.5px; letter-spacing: .06em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top__actions { flex: none; display: flex; gap: 8px; align-items: center; }
/* счётчик вопросов Астре (только с подпиской); «подпрыгивает» — в блоке prefers-reduced-motion ниже */
.qcount {
  display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 6px 12px 6px 10px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line); backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur); font: 700 14px var(--f-btn); color: var(--text);
  font-variant-numeric: lining-nums tabular-nums; transition: border-color .3s ease;
}
.qcount[hidden] { display: none; }
.qcount__icon { width: 15px; height: 15px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; filter: drop-shadow(0 0 5px rgba(var(--accent-rgb), .6)); }
.qcount__label { font: 500 12px var(--f-body); color: var(--muted); }
.qcount.is-low { border-color: rgba(245, 194, 122, .6); }
.qcount.is-low .qcount__value { color: var(--warn); }
@keyframes bump { 40% { transform: scale(1.12); } }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 7px 11px; border-radius: 999px; font-size: 13px;
  color: var(--muted); background: var(--panel-3); border: 1px solid var(--line);
}
.chip svg { width: 15px; height: 15px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; }
.chip__emoji { font-style: normal; font-size: 14px; line-height: 1; }
.chip--ideas[aria-pressed="true"] { color: var(--accent); border-color: var(--line-strong); background: rgba(var(--accent-rgb), .12); }
body[data-plan="free"] #ideasBtn { display: none; }
@media (max-width: 959.98px) {
  body:not([data-view="chat"]) #ideasBtn, body:not([data-view="chat"]) #toneBtn { display: none; }
}
@media (max-width: 420px) {
  .chip { padding: 8px; }
  .chip span { display: none; }
}
@media (max-width: 400px) {
  .top { padding-left: 14px; padding-right: 14px; gap: 8px; }
  .top__actions { gap: 6px; }
  .qcount__label { display: none; }
  .top__sub { letter-spacing: .02em; }
}

/* ── лента разговора ──────────────────────────────────────────── */
.scroll {
  position: relative; z-index: 1; flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 0 16px 24px; scroll-behavior: smooth;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22px, #000 calc(100% - 28px), transparent);
          mask-image: linear-gradient(180deg, transparent 0, #000 22px, #000 calc(100% - 28px), transparent);
}

/* приветствие: знак Астры, имя, темы */
.hello { min-height: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 4vh; }
.hello > * { flex-shrink: 0; }
body.is-talking .hello { display: none; }
.hello__title { margin: 18px 0 8px; font: 300 30px/1.15 var(--f-head); letter-spacing: .04em; color: var(--text); }
.hello__text { margin: 0 auto; max-width: 320px; color: var(--muted); font-size: 14.5px; }

/* знак Астры (sign.js): сфера из комет со звездой в центре */
.orb {
  position: relative; width: 128px; height: 128px; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle, #13265a, #070b1e 70%); border: 1px solid var(--line);
  box-shadow: 0 10px 40px rgba(var(--glow-rgb), .35), inset 0 0 30px rgba(var(--glow-rgb), .18);
}
.orb canvas, .nav__orb canvas { display: block; width: 100%; height: 100%; }

.topics {
  margin: 26px 0 8px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; width: 100%; max-width: 360px;
}
/* Появление (прозрачный старт + анимация) — только в блоке prefers-reduced-motion: no-preference ниже. */
.topic { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 4px 0; font-size: 13px; color: var(--text); }
.topic__img {
  width: 72px; height: 72px; border-radius: 50%; background: center / 100% no-repeat;
  box-shadow: 0 0 0 1px var(--line), 0 6px 20px rgba(0, 0, 0, .35);
  transition: transform .4s ease, box-shadow .4s ease;
}
.topic:active .topic__img { transform: scale(.94); box-shadow: 0 0 0 1px var(--line-strong), 0 0 22px rgba(var(--accent-rgb), .4); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* разговор: мои вопросы справа, ответы Астры — стеклянные карточки слева */
body.is-talking .scroll { display: flex; flex-direction: column; }
.talk { display: flex; flex-direction: column; gap: 16px; padding-top: 12px; margin-top: auto; }
.q {
  align-self: flex-end; max-width: 86%; padding: 11px 14px; border-radius: 18px 18px 4px 18px;
  background: rgba(var(--violet-rgb), .22); border: 1px solid rgba(var(--violet-rgb), .3);
  color: var(--text); font: 400 14.5px/1.45 var(--f-body); overflow-wrap: anywhere;
}
.a {
  position: relative; align-self: stretch; padding: 16px 16px 14px; border-radius: 18px 18px 18px 4px;
  background: var(--panel); border: 1px solid var(--line);
  backdrop-filter: var(--blur) saturate(120%); -webkit-backdrop-filter: var(--blur) saturate(120%);
  box-shadow: var(--shadow-card);
  /* появление — в блоке prefers-reduced-motion: no-preference */
}
.a::before {
  content: ""; position: absolute; left: 22px; right: 22px; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .6;
}
.a__mark { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font: 500 12px var(--f-head); letter-spacing: .16em; color: var(--accent); text-transform: uppercase; }
.a__mark i { width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle, #ffffff, #9fd6ff 45%, transparent 72%); box-shadow: 0 0 10px rgba(var(--glow-rgb), .9); }
.a__text { font: 400 15.5px/1.6 var(--f-body); color: var(--text-2); font-variant-numeric: lining-nums; }
.a__text p { margin: 0 0 .7em; }
.a__text p:first-child { font-size: 16.5px; line-height: 1.5; color: var(--text); }
.a__text > :last-child { margin-bottom: 0; }
.a__text strong { font-weight: 600; color: var(--accent); }
.a__text .date {
  white-space: nowrap; padding: 0 .3em; border-radius: 6px; color: var(--text);
  background: rgba(var(--accent-rgb), .12); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .22);
}
.a__text ul { list-style: none; margin: .2em 0 .8em; padding: 0; display: grid; gap: .35em; }
.a__text li { position: relative; padding-left: 1.3em; }
.a__text li::before { content: "✦"; position: absolute; left: 0; top: .05em; font-size: .78em; color: var(--accent); }
@keyframes ink { from { opacity: 0; filter: blur(3px); transform: translateY(4px); } to { opacity: 1; filter: none; transform: none; } }
.a__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.a__foot > .btn { margin-left: auto; }
.a__foot > .btn + .btn { margin-left: 0; }
.a--soft { background: var(--panel-3); }
.a--crisis { border-color: rgba(var(--text-rgb), .35); }
.a--crisis .a__text { white-space: pre-line; }

/* думает: маленький знак рядом с фразой; знак в меню тоже «думает» (sign.js) */
.thinking { display: flex; align-items: center; gap: 12px; padding: 18px 4px; color: var(--muted); font: 400 15px var(--f-head); letter-spacing: .04em; }
.thinking[hidden] { display: none; }
.thinking__orb {
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle, #ffffff, #9fd6ff 45%, rgba(var(--glow-rgb), 0) 72%);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: scale(.8); box-shadow: 0 0 6px rgba(var(--glow-rgb), .9); } 50% { transform: scale(1.15); box-shadow: 0 0 24px rgba(var(--accent-rgb), .9); } }

/* ── поле вопроса ─────────────────────────────────────────────── */
.ask { position: relative; z-index: 2; flex: none; padding: 8px 14px 6px; }
.ask__form {
  display: flex; align-items: flex-end; gap: 8px; padding: 5px 5px 5px 18px; border-radius: 26px;
  background: rgba(4, 8, 24, .62); border: 1px solid var(--line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: border-color .3s ease, box-shadow .3s ease;
}
.ask__form:focus-within { border-color: var(--line-strong); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .08); }
.ask textarea {
  flex: 1; min-width: 0; resize: none; border: 0; outline: 0; background: transparent; color: var(--text);
  font: 400 16px/1.45 var(--f-body); padding: 10px 0; max-height: 120px;
}
.ask textarea::placeholder { color: rgba(var(--text-rgb), .42); }
/* «Спросить» — маленькая сфера Астры */
.ask__send {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, #e9f4ff, #8fb8ff 38%, #3b4fae 72%, #1a2260);
  box-shadow: 0 4px 20px rgba(var(--glow-rgb), .5), inset 0 0 0 1px rgba(255, 255, 255, .25);
  transition: opacity .3s ease, transform .2s ease;
}
.ask__send svg { width: 20px; height: 20px; fill: var(--on-accent); }
.ask__send:disabled { opacity: .35; box-shadow: none; }
.ask__send:not(:disabled):active { transform: scale(.92); }
.ask__meta { display: flex; justify-content: space-between; gap: 10px; min-height: 1.6em; padding: 6px 10px 0; font-size: 11.5px; color: var(--faint); }
#count.is-near { color: var(--accent); }

/* без подписки (body[data-plan="free"], app.js) поля и тем нет — на их месте спокойная карточка */
.subscribe {
  display: none; position: relative; margin: 2px 0 4px; padding: 16px 18px 14px; border-radius: 24px; text-align: center;
  background: var(--grad-card); border: 1px solid var(--line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 -6px 30px rgba(4, 7, 22, .3);
}
.subscribe::before {
  content: ""; position: absolute; left: 26px; right: 26px; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .7;
}
.subscribe__title { margin: 0; font: 300 21px/1.2 var(--f-head); letter-spacing: .04em; color: var(--text); }
.subscribe__text { margin: 6px 0 12px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
body[data-plan="free"] .subscribe { display: block; }
body[data-plan="free"] .ask__form, body[data-plan="free"] .ask__meta, body[data-plan="free"] .topics { display: none; }

/* ── кнопки ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px;
  padding: 11px 20px; border-radius: 999px; font: 700 14px/1.2 var(--f-btn); letter-spacing: .02em; text-align: center;
}
/* главная: переливающаяся «аврора» (прежнее имя класса оставлено — им пользуются все экраны) */
.btn--gold {
  color: var(--on-accent); background: var(--grad-aurora); background-size: 300% 100%;
  box-shadow: 0 8px 28px rgba(var(--violet-rgb), .38);
}
.btn--ghost { color: var(--text); border: 1px solid var(--line-strong); background: rgba(4, 8, 24, .25); }
.btn--more { min-height: 38px; padding: 8px 14px; font-size: 13px; color: var(--accent); border: 1px solid var(--line-strong); background: rgba(var(--accent-rgb), .07); }
.btn--danger { color: #fff3ef; background: linear-gradient(135deg, #e07a86, #a8475a); box-shadow: 0 6px 22px rgba(224, 122, 134, .3); }
.btn--block { width: 100%; }
.btn--small { min-height: 38px; padding: 8px 14px; font-size: 13px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.hint__retry { padding: 0; font-size: inherit; color: var(--accent); text-decoration: underline; text-decoration-color: rgba(var(--accent-rgb), .4); text-underline-offset: 3px; }

/* ── шторка ───────────────────────────────────────────────────── */
.sheet { position: fixed; inset: 0; z-index: 10; display: grid; align-items: end; justify-items: center; background: var(--shade); }
.sheet[hidden] { display: none; }
.sheet__card {
  width: calc(100% - 20px); max-width: 520px;
  margin: 0 10px calc(10px + var(--safe-b)); padding: 24px 22px 18px; border-radius: 26px; text-align: center;
  background: var(--sheet-bg); border: 1px solid var(--line); box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column; gap: 10px;
}
@media (min-width: 640px) { .sheet { align-items: center; } }
.sheet__icon { font-size: 28px; color: var(--accent); text-shadow: 0 0 18px rgba(var(--accent-rgb), .9); }
.sheet__title { margin: 0; font: 300 24px/1.2 var(--f-head); letter-spacing: .04em; color: var(--text); }
.sheet__text { margin: 0 0 8px; color: var(--muted); }
.sheet__text[hidden], .sheet__list[hidden], .sheet__note[hidden], .sheet .btn[hidden] { display: none; }
.sheet__list {
  list-style: none; margin: 0 auto 6px; padding: 0; display: grid; gap: 6px; text-align: left;
  font: 400 15px/1.45 var(--f-body); color: var(--text-2);
}
.sheet__list li { position: relative; padding-left: 1.3em; }
.sheet__list li::before { content: "✦"; position: absolute; left: 0; top: .1em; font-size: .75em; color: var(--accent); }
.sheet__note { margin: 0 0 8px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.sheet__note--strong { font-weight: 600; color: var(--warn); }
@keyframes fade { from { opacity: 0; } }

.tones { display: grid; gap: 8px; margin: 4px 0 6px; text-align: left; }
.tone {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: var(--r-tile);
  border: 1px solid var(--line); background: var(--panel-3); transition: border-color .3s, background .3s;
}
.tone b { font: 400 17px var(--f-head); color: var(--text); }
.tone span { font-size: 13px; color: var(--muted); }
.tone[aria-pressed="true"] { border-color: var(--accent); background: rgba(var(--accent-rgb), .1); }
.tone[aria-pressed="true"] b::after { content: "  ✦"; color: var(--accent); font-size: 14px; }

/* Движение: всё, что появляется из прозрачного (абзацы ответа, темы приветствия, записи, карточки,
 * шторки, экраны), анимируется только когда движение разрешено. Без анимации элемент виден сразу;
 * браузер, не знающий prefers-reduced-motion, сюда не зайдёт и тоже покажет всё сразу.
 * Блок стоит раньше .a--again и .shop--still — те отменяют/меняют анимацию и должны побеждать. */
@media (prefers-reduced-motion: no-preference) {
  .topic { opacity: 0; animation: rise .9s ease forwards; }
  .a__text > * { opacity: 0; animation: ink .7s ease forwards; }
  .a--still .a__text > * { opacity: 1; animation: none; }
  .q { animation: rise .6s ease both; }
  .a { animation: rise .8s ease both; }
  .sheet { animation: fade .3s ease; }
  .sheet__card { animation: rise .4s ease; }
  .view { animation: viewIn .35s ease; }
  .card { animation: rise .6s ease both; }
  .qcount.is-bump { animation: bump .6s ease; }
  .subscribe { animation: rise .6s ease both; }
  .idea { animation: rise .5s ease both; }
  .btn--gold { animation: pan 9s ease-in-out infinite; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  /* страховка: ничего, что проявлялось анимацией, не остаётся прозрачным */
  .topic, .a__text > * { opacity: 1 !important; }
  .btn--gold { background-position: 30% 50%; }
}

.hello__tone { margin-top: 14px; font-size: 13px; color: var(--muted); }
.hello__tone button { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(var(--accent-rgb), .4); text-underline-offset: 3px; font-size: 13px; }

/* ── экраны ───────────────────────────────────────────────────── */
.views { position: relative; z-index: 1; flex: 1; min-height: 0; }
.view { position: absolute; inset: 0; display: flex; flex-direction: column; }
.view[hidden] { display: none; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }
.view__scroll {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: calc(10px + var(--safe-t)) 16px 28px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14px, #000 calc(100% - 24px), transparent);
          mask-image: linear-gradient(180deg, transparent 0, #000 14px, #000 calc(100% - 24px), transparent);
}
/* над экраном раздела «Сегодня» — переключатель «Мой день · Моя неделя · Мой месяц · Выбрать день» (app.js) */
.hub { flex: none; position: relative; z-index: 2; padding: calc(10px + var(--safe-t)) 16px 2px; }
.hub[hidden] { display: none; }
.hub + .view__scroll { padding-top: 10px; }
.hub .seg__btn { min-height: 42px; font-size: 12px; line-height: 1.15; padding: 6px 4px; white-space: normal; }

/* ── меню: телефон — вкладки снизу ────────────────────────────── */
.nav {
  position: relative; z-index: 3; flex: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end;
  padding: 6px 6px calc(8px + var(--safe-b)); background: rgba(8, 12, 32, .86); border-top: 1px solid var(--line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.nav__brand, .nav__sub, .nav__foot { display: none; }
.nav__btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 52px;
  padding: 2px 0; font: 500 11px/1.15 var(--f-body); letter-spacing: .01em; color: var(--muted); text-align: center;
  transition: color .3s ease;
}
.nav__btn > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav__sm { display: none; }
@media (max-width: 369.98px) { .nav__lg { display: none; } .nav__sm { display: inline; } }
.nav__btn svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s ease; }
.nav__btn.is-active { color: var(--accent); }
.nav__btn.is-active svg { filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), .55)); }
.nav__btn:active svg { transform: scale(.9); }
.nav__btn--orb { position: relative; top: -14px; margin-bottom: -14px; }
.nav__orb {
  display: block; width: 60px; height: 60px; border-radius: 50%; overflow: hidden;
  border: 1px solid var(--line); background: radial-gradient(circle, #13265a, #070b1e 72%);
  box-shadow: 0 0 0 4px rgba(8, 12, 32, .9), 0 8px 30px rgba(var(--glow-rgb), .4);
}
.nav__btn--orb.is-active .nav__orb { border-color: var(--line-strong); box-shadow: 0 0 0 4px rgba(8, 12, 32, .9), 0 8px 34px rgba(var(--accent-rgb), .45); }

/* ── компьютер: меню слева, раздел по центру, Астра справа ───── */
@media (min-width: 960px) {
  body { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .nav {
    grid-column: 1; grid-row: 1; display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 20px 12px 16px; overflow-y: auto; border-top: 0; border-right: 1px solid var(--line);
    background: rgba(8, 12, 32, .72);
  }
  .nav__brand { display: block; padding: 6px 12px 20px; font: 300 14px/1.3 var(--f-head); letter-spacing: .3em; text-transform: uppercase; color: var(--text); }
  .nav__btn {
    flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 14px;
    font-size: 15px; color: var(--muted);
  }
  .nav__btn:hover { color: var(--text); background: rgba(255, 255, 255, .03); }
  .nav__btn.is-active { color: var(--accent); background: rgba(var(--accent-rgb), .1); }
  .nav__btn--orb { display: none; }
  .nav__sub { display: flex; flex-direction: column; gap: 0; margin: 0 0 6px 46px; }
  .nav__sub button { padding: 6px 0; text-align: left; font: 400 13px/1.3 var(--f-body); color: var(--muted); }
  .nav__sub button:hover { color: var(--text); }
  .nav__sub button[aria-current="true"] { color: var(--accent); }
  .nav__foot { display: block; margin-top: auto; padding: 12px; font-size: 12px; line-height: 1.45; color: var(--muted); }

  .views { grid-column: 2; grid-row: 1; }
  .view { right: var(--dock-w); }
  .view--chat {
    left: auto; right: 0; width: var(--dock-w); border-left: 1px solid var(--line); background: rgba(8, 12, 32, .72);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  }
  /* шапка разговора в узкой колонке: только значки, без подписей */
  .view--chat .top { padding-top: 18px; }
  .view--chat .top__sub, .view--chat .chip span, .view--chat .qcount__label { display: none; }
  .view--chat .chip { padding: 8px; }
  .view--chat .orb { width: 112px; height: 112px; }
  .view--chat .hello { padding-top: 2vh; }
  .view--chat .hello__title { font-size: 24px; }
  .view--chat .topics { gap: 12px 8px; }
  .view--chat .topic__img { width: 60px; height: 60px; }
  /* раздел по центру — колонкой до 760 px */
  .view:not(.view--chat) .view__scroll, .hub { padding-left: max(24px, calc((100% - 760px) / 2)); padding-right: max(24px, calc((100% - 760px) / 2)); }
  .view:not(.view--chat) .view__scroll, .hub + .view__scroll { padding-top: 22px; }
  .hub { display: none; }                             /* на компьютере эти пункты — в меню слева */
  /* колесо — за разделом по центру, а не за Астрой */
  body:not(.is-splash) .sky__wheel {
    top: calc(200px - var(--wheel) / 2); opacity: .16;
    margin-left: calc(var(--wheel) / -2 + (var(--rail-w) - var(--dock-w)) / 2);
  }
}

/* ── Набор для экранов (общие классы; экраны используют их, а не свои копии) ── */
.page-head { padding: 4px 2px 14px; }
.page-title { margin: 0; font: 300 28px/1.15 var(--f-head); letter-spacing: .05em; color: var(--text); }
.page-sub { margin: 6px 0 0; font-size: 13px; letter-spacing: .02em; color: var(--muted); }
.section-title { margin: 24px 2px 10px; font: 500 12px var(--f-head); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.card {
  position: relative; padding: 16px; border-radius: var(--r-card); margin-bottom: 12px;
  background: var(--panel); border: 1px solid var(--line);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow-card);
}
.card--glow::before {
  content: ""; position: absolute; left: 22px; right: 22px; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .6;
}
.card__title { margin: 0 0 4px; font: 400 19px/1.25 var(--f-head); letter-spacing: .02em; color: var(--text); }
.card__text { margin: 0; font: 400 15px/1.55 var(--f-body); color: var(--text-2); font-variant-numeric: lining-nums; }
.card__meta { font-size: 12.5px; color: var(--muted); }
.row { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px;
  color: var(--text); background: rgba(var(--accent-rgb), .09); border: 1px solid rgba(var(--accent-rgb), .22);
}
.pill--muted { color: var(--muted); background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .08); }
.tone-support { --tone: var(--good); }
.tone-neutral { --tone: #c3c9de; }
.tone-tension { --tone: var(--bad); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tone, var(--accent)); box-shadow: 0 0 8px var(--tone, var(--accent)); }
/* сегменты — как в прототипе: тёмная полоса, выбранное — бирюзовым */
.seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: 16px;
  background: var(--panel-2); border: 1px solid var(--line);
}
.seg__btn {
  min-height: 40px; padding: 8px 6px; border-radius: 12px; font: 700 13px/1.2 var(--f-btn); color: var(--muted);
  transition: background .3s, color .3s;
}
.seg__btn[aria-pressed="true"] { color: var(--accent); background: rgba(var(--accent-rgb), .14); }
.lock {
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 22px 18px;
  border-radius: var(--r-card); border: 1px dashed rgba(var(--violet-rgb), .45); background: rgba(var(--violet-rgb), .07);
}
.lock__icon { font-size: 22px; color: #c8bfff; text-shadow: 0 0 14px rgba(var(--violet-rgb), .8); }
.lock__title { margin: 0; font: 300 21px var(--f-head); letter-spacing: .03em; color: var(--text); }
.lock__text { margin: 0; font-size: 14px; color: var(--muted); }
.empty { padding: 30px 10px; text-align: center; color: var(--muted); }
.skeleton { border-radius: 18px; background: linear-gradient(100deg, rgba(255,255,255,.04) 30%, rgba(255,255,255,.09) 50%, rgba(255,255,255,.04) 70%); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ответ, к которому вернулись по повторной кнопке */
.a--again { animation: again 1.6s ease; }
@keyframes again { 0%, 100% { box-shadow: var(--shadow-card); } 30% { box-shadow: 0 0 0 2px var(--gold-soft), 0 0 34px rgba(var(--accent-rgb), .45); } }

/* ── «💡 Идеи»: готовые вопросы на стартовом экране (app.js, showIdeas) ── */
/* Кнопка в шапке — только в разговоре с Астрой и когда Астра человеку открыта. Из разговора она снова
 * показывает стартовый экран (body.is-ideas), разговор остаётся на месте. */
body.is-ideas .hello { padding-top: 1vh; flex-shrink: 0; }
body.is-ideas .orb { width: 84px; height: 84px; }
body.is-ideas .hello__title { margin-top: 14px; font-size: 26px; }
body.is-ideas .hello { display: flex; }
body.is-ideas .talk, body.is-ideas .thinking { display: none; }
.ideas__back { align-self: flex-start; padding: 6px 2px; font-size: 13.5px; color: var(--accent); }
.ideas__back[hidden] { display: none; }

.ideas { width: 100%; max-width: 420px; margin: 22px 0 4px; text-align: left; }
body[data-plan="free"] .ideas { display: none; }
.ideas__title { margin: 0 2px 10px; text-align: center; font: 500 12px var(--f-head); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.ideas__chips {
  display: flex; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; padding: 2px 10px 8px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 18px), transparent);
          mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 18px), transparent);
}
.ideas__chips::-webkit-scrollbar { display: none; }
.ideas__chip {
  flex: none; display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 7px 12px; border-radius: 999px;
  font-size: 13px; white-space: nowrap; color: var(--muted);
  background: var(--panel-3); border: 1px solid var(--line);
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.ideas__chip[aria-pressed="true"] { color: var(--accent); border-color: var(--line-strong); background: rgba(var(--accent-rgb), .14); }
.ideas__emoji, .idea__emoji { font-style: normal; line-height: 1; }
.ideas__list { display: grid; gap: 8px; margin-top: 4px; }
.idea {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border-radius: var(--r-tile); text-align: left;
  background: var(--panel); border: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: border-color .3s ease, background .3s ease, transform .2s ease;
}
.idea:active { transform: scale(.98); border-color: var(--line-strong); }
.idea__emoji {
  flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-size: 15px;
  background: rgba(var(--accent-rgb), .1); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .18);
}
.idea__text { flex: 1; min-width: 0; font: 400 14.5px/1.35 var(--f-body); color: var(--text-2); overflow-wrap: anywhere; }
.idea--skel { height: 54px; }
.idea-row { display: flex; align-items: stretch; gap: 6px; }
.idea-row .idea { flex: 1; min-width: 0; }
.idea__del {
  flex: none; width: 44px; border-radius: 16px; font-size: 20px; line-height: 1; color: var(--muted);
  border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03);
}
.idea__del:active { color: var(--bad); border-color: rgba(243, 154, 154, .4); }
.idea__del[disabled] { opacity: .45; }
.ideas__empty {
  margin: 0; padding: 14px 12px; text-align: center; font-size: 13.5px; line-height: 1.5; color: var(--muted);
  border-radius: var(--r-tile); border: 1px dashed rgba(var(--accent-rgb), .25);
}
.ideas__count { margin: 0 4px; text-align: right; font-size: 12px; color: var(--faint); }
.ideas__foot { display: flex; justify-content: center; margin-top: 12px; }
.ideas__foot .btn[hidden] { display: none; }

/* звезда у поля ввода: сохранить вопрос в «Мои вопросы» */
.ask__star {
  flex: none; width: 36px; height: 44px; display: grid; place-items: center; font-size: 21px; line-height: 1;
  color: var(--gold-soft); transition: color .2s ease, transform .2s ease;
}
.ask__star[hidden] { display: none; }
.ask__star.is-on { color: var(--accent); text-shadow: 0 0 10px rgba(var(--accent-rgb), .7); }
.ask__star:active { transform: scale(.9); }
.ask__star[disabled] { opacity: .5; }
body[data-plan="free"] .ask__star { display: none; }

/* 👍/👎 под ответом Астры */
.a__rate { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.rate {
  min-height: 36px; padding: 7px 12px; border-radius: 999px; font-size: 12px; line-height: 1.2;
  border: 1px solid var(--line); background: rgba(var(--accent-rgb), .06); color: var(--text);
  transition: filter .2s ease, border-color .2s ease, background .2s ease;
}
.rate[aria-pressed="true"] { border-color: var(--line-strong); background: rgba(var(--accent-rgb), .2); }
