/* Group "chat": /new/Home/Assistant in the Mira look (Views/Home/_AssistantN10.cshtml).
   Source: mira-prototype/site/shared/consultant.css, scoped with html[data-edition=n10] and adapted to the
   DOM that assistant.js really builds (it is shared with the main site and is not rewritten):
   bubbles are div.nx-msg.nx-msg-bot | .nx-msg-user (+ .nx-msg-limit), answer footer .nx-msg-foot (span +
   button.nx-rate[.on]), typing div.nx-msg.nx-msg-bot.nx-typing > span×3, chips .nx-chip(.nx-chip-link),
   plan pill #ast-plan(.is-on) > .nx-as-plan-label, people buttons (.is-current) > b + span.
   These classes also have legacy rules in base.css (html[data-design] …), so every rule here is one level
   more specific (html[data-edition=n10] .ast …).
   Phone (<900): the chat fills the screen between the header (--bar-h) and the tab bar (--tabbar-h), no footer.
   Desktop (>=900): side panel with Mira's living portrait + glass chat panel.
   Mira's still avatar and portrait poster come in as --ast-ava / --ast-portrait (inline on #ast, versioned
   URLs built by Mira.Media). "Mira is typing" = .ast:has(.nx-typing) — no extra script. */

html[data-edition=n10] .ast { --ast-pad: var(--gutter); position: relative; }
html[data-edition=n10] .ast-side { display: none; }
html[data-edition=n10] .ast-chat { position: relative; display: flex; flex-direction: column; min-height: 380px; overflow: hidden;
  height: calc(100vh - var(--bar-h) - var(--tabbar-h) - env(safe-area-inset-bottom));
  height: calc(100dvh - var(--bar-h) - var(--tabbar-h) - env(safe-area-inset-bottom)); }
@media (max-width: 899px) {
  html[data-edition=n10][data-page="home-assistant"] .footermain { display: none; }
}

/* ---------- top line: Mira (living face) + status + plan; her blurred portrait behind ---------- */
html[data-edition=n10] .ast-top { position: relative; isolation: isolate; display: flex; align-items: center; gap: 10px; padding: 10px var(--ast-pad); border-bottom: 1px solid var(--line); overflow: hidden; flex: none; }
html[data-edition=n10] .ast-top::before { content: ""; position: absolute; z-index: -2; inset: -40px -20px; background: var(--ast-portrait) 85% 30% / 70% auto no-repeat; filter: blur(28px) saturate(1.25); opacity: .55; }
html[data-edition=n10] .ast-top::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(11, 15, 36, .9) 0%, rgba(11, 15, 36, .62) 55%, rgba(11, 15, 36, .45) 100%); }
html[data-edition=n10] .ast .ast-back { flex: none; width: 38px; height: 38px; margin-left: -4px; color: var(--ink); text-decoration: none; }
html[data-edition=n10] .ast .ast-face { --s: 46px; }
html[data-edition=n10] .ast .ast-face > video, html[data-edition=n10] .ast .ast-face > img { object-position: 50% 50%; }   /* the avatar media has the face in the middle */
html[data-edition=n10] .ast:has(.nx-typing) .ast-face { animation: ast-pulse 1.4s ease-in-out infinite; }
@keyframes ast-pulse { 50% { box-shadow: 0 0 0 5px rgba(229, 196, 126, .22), 0 0 26px rgba(229, 180, 90, .75); } }
html[data-edition=n10] .ast-who { flex: none; display: flex; flex-direction: column; min-width: 0; line-height: 1.15; white-space: nowrap; }
html[data-edition=n10] .ast .ast-name { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .14em; font-size: 18px; color: var(--ink); }
html[data-edition=n10] .ast .ast-role { display: none; font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--gold-2); }
html[data-edition=n10] .ast .ast-status { display: inline-flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 12px; color: var(--ok); }
html[data-edition=n10] .ast .ast-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
html[data-edition=n10] .ast:has(.nx-typing) .ast-status { color: var(--gold); }
html[data-edition=n10] .ast .ast-plan { margin-left: auto; flex: 0 1 auto; min-width: 0; max-width: 52%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(11, 15, 36, .6); font-size: 12px; font-weight: 600; color: var(--ink); }
html[data-edition=n10] .ast .ast-plan .nx-as-plan-label { color: var(--ink-2); font-weight: 500; }
html[data-edition=n10] .ast .ast-plan.is-on { background: var(--gold-fill); color: var(--gold-ink); border-color: transparent; box-shadow: var(--gold-glow); }
html[data-edition=n10] .ast .ast-plan.is-on .nx-as-plan-label { color: var(--gold-ink); }
@media (max-width: 419px) { html[data-edition=n10] .ast .ast-plan .nx-as-plan-label { display: none; } }   /* full text stays in title, as renderPlan intends */
/* «Начать заново» (#ast-reset): a round icon on phones, a small pill with the word from 420px; after the plan pill */
html[data-edition=n10] .ast .ast-reset { flex: none; margin-left: auto; width: 38px; height: 38px; color: var(--ink-2); border-color: var(--line-2); cursor: pointer; font: 600 12.5px/1 var(--sans); }
html[data-edition=n10] .ast .ast-plan:not([hidden]) + .ast-reset { margin-left: 0; }
html[data-edition=n10] .ast .ast-reset:hover, html[data-edition=n10] .ast .ast-reset:focus-visible { color: var(--gold); border-color: rgba(229, 196, 126, .6); }
html[data-edition=n10] .ast .ast-reset svg { width: 16px; height: 16px; }
html[data-edition=n10] .ast .ast-reset span { display: none; }
@media (min-width: 420px) {
  html[data-edition=n10] .ast .ast-reset { width: auto; height: 34px; padding: 0 12px 0 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
  html[data-edition=n10] .ast .ast-reset span { display: inline; }
}

/* ---------- who the question is about (✦ = me / nobody yet, a letter = a close person; not Mira) ---------- */
html[data-edition=n10] .ast-person { display: flex; align-items: center; gap: 10px; padding: 8px var(--ast-pad); border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .025); flex: none; }
html[data-edition=n10] .ast .ast-pava { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1px dashed var(--line-2); background: rgba(229, 196, 126, .08);
  color: var(--gold); font-family: var(--serif); font-weight: 600; font-size: 18px; line-height: 1; }
html[data-edition=n10] .ast-pinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
html[data-edition=n10] .ast .ast-pinfo b { font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-edition=n10] .ast .ast-pinfo span { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-edition=n10] .ast-person .btn-sm { min-height: 34px; padding: 0 12px; flex: none; }
html[data-edition=n10] .ast .ast-ideas { flex: none; width: 38px; height: 38px; color: var(--gold); border-color: var(--line-2); cursor: pointer; }
html[data-edition=n10] .ast .ast-ideas span { display: none; }

/* ---------- log ---------- */
html[data-edition=n10] .ast-log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; padding: 16px var(--ast-pad) 14px; scroll-behavior: smooth;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, .5), transparent 60%),
    radial-gradient(1px 1px at 78% 12%, rgba(255, 255, 255, .4), transparent 60%),
    radial-gradient(1.5px 1.5px at 64% 44%, rgba(229, 196, 126, .45), transparent 60%),
    radial-gradient(1px 1px at 30% 66%, rgba(255, 255, 255, .35), transparent 60%),
    radial-gradient(1px 1px at 88% 80%, rgba(255, 255, 255, .45), transparent 60%),
    radial-gradient(1px 1px at 48% 90%, rgba(255, 255, 255, .3), transparent 60%);
  background-size: 320px 320px; background-attachment: local; }
html[data-edition=n10] .ast-log .nx-msg { position: relative; flex: none; max-width: 88%; margin: 0; padding: 12px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
html[data-edition=n10] .ast-log .nx-msg:last-child { animation: m-rise .35s ease both; }
html[data-edition=n10] .ast-log .nx-msg p { margin: 0; }
html[data-edition=n10] .ast-log .nx-msg p + p, html[data-edition=n10] .ast-log .nx-msg p + ul, html[data-edition=n10] .ast-log .nx-msg ul + p { margin-top: 6px; }
html[data-edition=n10] .ast-log .nx-msg ul { margin: 6px 0 2px; padding-left: 18px; }
/* Block headings of the author's scenarios (assistant.js: a line bold as a whole): air above, close to their text. */
html[data-edition=n10] .ast-log .nx-msg p.h { margin-top: 14px; }
html[data-edition=n10] .ast-log .nx-msg p.h:first-child { margin-top: 0; }
html[data-edition=n10] .ast-log .nx-msg p.h + p, html[data-edition=n10] .ast-log .nx-msg p.h + ul { margin-top: 3px; }
html[data-edition=n10] .ast-log .nx-msg li { margin: 3px 0; }
html[data-edition=n10] .ast-log .nx-msg li::marker { color: var(--gold); }
/* Mira's bubble with her small avatar at the bottom left (the avatar is a pseudo-element: assistant.js builds bare bubbles). */
html[data-edition=n10] .ast-log .nx-msg-bot { align-self: flex-start; justify-self: auto; margin-left: 38px; max-width: calc(100% - 38px); background: var(--bubble); color: var(--ink); border: 1px solid var(--line); border-top-left-radius: 6px; }
html[data-edition=n10] .ast-log .nx-msg-bot::before { content: ""; position: absolute; left: -39px; bottom: -1px; width: 28px; height: 28px; box-sizing: border-box; border-radius: 50%; border: 1.5px solid transparent;
  background: var(--ast-ava) 50% 40% / cover no-repeat padding-box, var(--gold-fill) border-box; box-shadow: 0 0 0 3px rgba(229, 196, 126, .1), 0 6px 18px -8px rgba(229, 180, 90, .6); }
html[data-edition=n10] .ast-log .nx-msg-bot b { color: var(--gold-2); font-weight: 700; }
html[data-edition=n10] .ast-log .nx-msg-user { align-self: flex-end; justify-self: auto; margin-left: auto; max-width: 84%; background: var(--gold-fill); color: var(--gold-ink); border: 0; border-top-right-radius: 6px; font-weight: 500; white-space: pre-line; }
/* limit, crisis and send errors (assistant.js marks them all .nx-msg-limit) */
html[data-edition=n10] .ast-log .nx-msg-limit { border: 1px solid rgba(229, 196, 126, .7); background: linear-gradient(135deg, rgba(229, 196, 126, .16), rgba(27, 35, 80, .85)); }
/* answer footer: «ответ по текстам ваших карт» + «Полезно» / «Не то» */
/* ---------- Mira's rich answers (assistant.js card(); server Assistant/AssistantCards.cs) ----------
   From the owner's mockup (scratchpad compat-mock, 14.10.2026): «Стоит ли мне бороться» → the rating card
   .cr, «Кто мой идеальный партнёр» → the partner table .tp, «Для чего мы встретились» → .wm, and the quiet
   sources line under the owner's questions. Built only on the tokens and components of mira.css and this
   file (ring, progress, kicker, badge, nx-chip, nx-msg-foot), one level more specific than the bubble rules. */
html[data-edition=n10] .ast-log .nx-msg-rich { width: 100%; }   /* max-width of .nx-msg-bot still caps it */

/* ---------- card surface inside Mira's bubble ---------- */
html[data-edition=n10] .ast-log .nx-msg-bot :is(.cr, .tp, .wm) { margin: 10px 0 4px; padding: 14px; border-radius: 16px; border: 1px solid var(--line-2);
  background: radial-gradient(120% 90% at 0% 0%, rgba(229, 196, 126, .13), transparent 60%), rgba(11, 15, 36, .42); }
html[data-edition=n10] .ast-log .nx-msg-bot :is(.cr, .tp, .wm) .kicker { margin: 0 0 4px; font-size: 10.5px; color: var(--gold); font-weight: 700; }

/* playing-card pip: a small white card face with a black or red suit */
html[data-edition=n10] .ast-log .nx-msg-bot .pip { display: inline-grid; place-items: center; min-width: 26px; height: 20px; padding: 0 5px; border-radius: 5px; background: #f3ede4; color: #15111f;
  font: 700 11.5px/1 var(--sans); letter-spacing: -.02em; box-shadow: 0 2px 8px -3px rgba(0, 0, 0, .6); vertical-align: 1px; }
html[data-edition=n10] .ast-log .nx-msg-bot .pip.is-red { color: #b4383f; }

/* ---------- (a) rating card ---------- */
html[data-edition=n10] .ast-log .nx-msg-bot .cr > .kicker { margin-bottom: 10px; }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-head { display: flex; align-items: center; gap: 14px; }
html[data-edition=n10] .ast-log .nx-msg-bot .cr .ring { --s: 92px; flex: none; box-shadow: 0 0 0 4px rgba(229, 196, 126, .06), 0 14px 34px -14px rgba(229, 180, 90, .6); }
html[data-edition=n10] .ast-log .nx-msg-bot .cr .ring::before { inset: 6px; background: #141b3f; }
html[data-edition=n10] .ast-log .nx-msg-bot .cr .ring b { font: 400 31px/1 var(--display); color: var(--gold); }
html[data-edition=n10] .ast-log .nx-msg-bot .cr .ring span { display: block; margin-top: 3px; font-size: 10px; line-height: 1.2; color: var(--ink-3); }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-band { display: block; font: 600 22px/1.1 var(--serif); color: var(--ink); }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-pair { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 5px 7px; margin-top: 8px; font-size: 12px; line-height: 1.3; color: var(--ink-2); }

/* where the pair sits among all pairs: three bands, a white mark at R */
html[data-edition=n10] .ast-log .nx-msg-bot .cr-scale { position: relative; margin: 16px 0 2px; }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-zones, html[data-edition=n10] .ast-log .nx-msg-bot .cr-zl { display: grid; grid-template-columns: 33fr 27fr 40fr; gap: 3px; }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-zones { height: 8px; }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-zones i { border-radius: 4px; background: rgba(255, 255, 255, .09); }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-zones i.on { background: var(--gold-fill); box-shadow: 0 0 12px rgba(229, 180, 90, .45); }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-mark { position: absolute; top: -4px; left: calc(var(--p) * 1%); width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: #fff; box-shadow: 0 0 0 2px #141b3f; }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-zl { margin-top: 6px; font-size: 10.5px; line-height: 1.25; color: var(--ink-3); text-align: center; }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-zl .on { color: var(--gold); font-weight: 700; }

/* three bars = the three rings of the compatibility page */
html[data-edition=n10] .ast-log .nx-msg-bot .cr-bars { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 11px; }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-bars li { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 5px 10px; margin: 0; }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-bl { font-size: 13px; color: var(--ink); }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-bl i { display: block; font-style: normal; font-size: 11px; line-height: 1.3; color: var(--ink-3); }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-bars li > b { font: 400 19px/1 var(--display); color: var(--gold); }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-bars .progress { grid-column: 1 / -1; }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-bars li.is-t > b { color: var(--violet); }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-bars li.is-t .progress > i { background: linear-gradient(90deg, #8a74d0, var(--violet)); }

/* Мира 2.5 (14.11.2026): «?» next to the pair's rating and its three bars, and the explanation it unfolds (assistant.js pairInfo) */
html[data-edition=n10] .ast-log .nx-msg-bot .cr-q { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; margin: -2px 0 0 7px; padding: 0; border: 1px solid var(--line-2); border-radius: 50%;
  background: transparent; color: var(--ink-2); font: 700 11px/1 var(--sans); letter-spacing: 0; text-transform: none; vertical-align: middle; cursor: pointer; }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-q::after { content: ""; position: absolute; inset: -11px; }   /* a 40px touch target around the small sign */
html[data-edition=n10] .ast-log .nx-msg-bot .cr-q:hover, html[data-edition=n10] .ast-log .nx-msg-bot .cr-q[aria-expanded="true"] { border-color: var(--gold-2); background: rgba(229, 196, 126, .14); color: var(--gold-2); }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-q:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-info { margin: 10px 0 0; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-bars li > .cr-info { grid-column: 1 / -1; margin-top: 2px; }
html[data-edition=n10] .ast-log .nx-msg-bot .cr > .kicker + .cr-info { margin: -2px 0 12px; }

html[data-edition=n10] .ast-log .nx-msg-bot .cr-text { margin: 14px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink); }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-sec { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-quote { margin: 0; font: italic 500 18px/1.3 var(--serif); color: var(--gold-2); }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-tips { list-style: none; counter-reset: t; margin: 2px 0 0; padding: 0; display: grid; gap: 9px; }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-tips li { counter-increment: t; display: grid; grid-template-columns: 22px 1fr; gap: 9px; margin: 0; font-size: 13.5px; line-height: 1.45; }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-tips li::before { content: counter(t); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(229, 196, 126, .12);
  border: 1px solid var(--line-2); color: var(--gold); font: 700 11px/1 var(--sans); }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-tips small { display: block; margin-top: 1px; font-size: 11px; color: var(--ink-3); }

/* ---------- (b) partner table ---------- */
html[data-edition=n10] .ast-log .nx-msg-bot .tp { padding: 12px 14px 8px; }
html[data-edition=n10] .ast-log .nx-msg-bot .tp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding-bottom: 8px; font-size: 12px; color: var(--ink-2); }
html[data-edition=n10] .ast-log .nx-msg-bot .tp-head .kicker { margin: 0; flex-basis: 100%; }
html[data-edition=n10] .ast-log .nx-msg-bot .tp-head small { margin-left: auto; font-size: 10.5px; font-weight: 600; color: var(--ink-3); }
html[data-edition=n10] .ast-log .nx-msg-bot .tp ol { list-style: none; margin: 0; padding: 0; }
html[data-edition=n10] .ast-log .nx-msg-bot .tp li { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 0 10px; margin: 0; padding: 10px 0; border-top: 1px solid var(--line); }
html[data-edition=n10] .ast-log .nx-msg-bot .tp-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--gold); font: 400 15px/1 var(--display); }
html[data-edition=n10] .ast-log .nx-msg-bot .tp li.is-1 .tp-n { background: var(--gold-fill); color: var(--gold-ink); border-color: transparent; box-shadow: var(--gold-glow); }
html[data-edition=n10] .ast-log .nx-msg-bot .tp-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
html[data-edition=n10] .ast-log .nx-msg-bot .tp-date { font-size: 15px; font-weight: 700; line-height: 1.2; color: var(--ink); }
html[data-edition=n10] .ast-log .nx-msg-bot .tp-date i { font-style: normal; font-weight: 500; font-size: 13px; color: var(--ink-2); }
html[data-edition=n10] .ast-log .nx-msg-bot .tp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 12px; line-height: 1.3; color: var(--ink-2); }
html[data-edition=n10] .ast-log .nx-msg-bot .tp-pc { justify-self: end; text-align: right; font: 400 23px/1 var(--display); color: var(--gold); }
html[data-edition=n10] .ast-log .nx-msg-bot .tp-why { grid-column: 2 / -1; display: grid; gap: 5px; margin-top: 9px; padding: 9px 11px; border-radius: 12px; background: rgba(229, 196, 126, .06); border: 1px solid var(--line); }
html[data-edition=n10] .ast-log .nx-msg-bot .tp-why p { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
html[data-edition=n10] .ast-log .nx-msg-bot .tp-why p i { display: block; font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
html[data-edition=n10] .ast-log .nx-msg-bot .tp-note { display: flex; gap: 9px; align-items: flex-start; margin: 10px 0 0; padding: 10px 12px; border-radius: 12px;
  background: rgba(183, 156, 240, .08); border: 1px solid rgba(183, 156, 240, .24); font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
html[data-edition=n10] .ast-log .nx-msg-bot .tp-note svg { flex: none; width: 16px; height: 16px; margin-top: 1px; color: var(--violet); }

/* ---------- (c) «Для чего встретились» ---------- */
html[data-edition=n10] .ast-log .nx-msg-bot .wm { position: relative; overflow: hidden; padding: 16px 16px 14px; }
html[data-edition=n10] .ast-log .nx-msg-bot .wm::after { content: "\201C"; position: absolute; right: 12px; top: -14px; font: 600 120px/1 var(--serif); color: rgba(229, 196, 126, .13); pointer-events: none; }
html[data-edition=n10] .ast-log .nx-msg-bot .wm-q { position: relative; margin: 2px 0 0; font: italic 500 21px/1.28 var(--serif); color: var(--gold-2); }
html[data-edition=n10] .ast-log .nx-msg-bot .wm-link { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 0; font-size: 12px; line-height: 1.3; color: var(--ink-3); }

/* ---------- «Расчёт для: Анна · 31.03.1990» over an answer counted by the name ---------- */
html[data-edition=n10] .ast-log .nx-msg-bot .nx-calc-for { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 0 0 8px; border-bottom: 1px solid var(--line);
  font-size: 11.5px; line-height: 1.35; color: var(--ink-3); }
html[data-edition=n10] .ast-log .nx-msg-bot .nx-calc-for svg { flex: none; width: 12px; height: 12px; color: var(--gold); opacity: .85; }

/* ---------- «Изменить ответы» under Mira's summary after the short onboarding (assistant.js) ---------- */
html[data-edition=n10] .ast-log .nx-redo { flex: none; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; margin: -4px 0 0 4px; padding: 0 13px;
  border: 1px solid rgba(229, 196, 126, .45); border-radius: 999px; background: rgba(229, 196, 126, .07); color: var(--gold-2); font: 600 12.5px var(--sans); cursor: pointer; }
html[data-edition=n10] .ast-log .nx-redo:hover { background: rgba(229, 196, 126, .14); }
html[data-edition=n10] .ast-log .nx-redo:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }

/* ---------- the quiet sources line in the answer footer ---------- */
html[data-edition=n10] .ast-log .nx-msg-foot .src { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px; }
html[data-edition=n10] .ast-log .nx-msg-foot .src i { display: inline-flex; align-items: center; gap: 4px; font-style: normal; color: var(--ink-2); }
html[data-edition=n10] .ast-log .nx-msg-foot .src i svg { width: 12px; height: 12px; color: var(--gold); opacity: .85; }
html[data-edition=n10] .ast-log .nx-msg-foot .src u { text-decoration: none; color: var(--ink-3); }

html[data-edition=n10] .ast-log .nx-msg-bot .cr .badge.cr-badge { margin-top: 8px; white-space: normal; }
html[data-edition=n10] .ast-log .nx-msg-bot .cr.is-none .ring b { color: var(--ink-2); }
html[data-edition=n10] .ast-log .nx-msg-bot .tp .tp-note { margin: 10px 0 4px; }
html[data-edition=n10] .ast-log .nx-msg-bot .cr-plain { margin: 10px 0 4px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line-2); }
html[data-edition=n10] .ast-log .nx-msg-foot .src { flex-basis: 100%; margin: 0 0 4px; font-size: 11.5px; color: var(--ink-3); }
@media (min-width: 900px) { html[data-edition=n10] .ast-log .nx-msg-bot.nx-msg-rich { max-width: min(80%, 620px); } }

html[data-edition=n10] .ast-log .nx-msg-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-2); }
html[data-edition=n10] .ast-log .nx-msg-foot span { flex-basis: 100%; margin: 0 0 2px; font-size: 11.5px; color: var(--ink-3); }
html[data-edition=n10] .ast-log .nx-rate { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--ink-2);
  font: 600 12.5px/1 var(--sans); cursor: pointer; }
html[data-edition=n10] .ast-log .nx-rate:hover { color: var(--ink); }
html[data-edition=n10] .ast-log .nx-rate.on { background: rgba(229, 196, 126, .16); border-color: var(--gold); color: var(--gold); }
/* Mira asks «Начать заново?» inside the chat (assistant.js .ast-confirm): «Да» in gold, «Нет» plain */
html[data-edition=n10] .ast-log .ast-confirm { border-color: rgba(229, 196, 126, .55); }
html[data-edition=n10] .ast-log .ast-confirm-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
html[data-edition=n10] .ast-log .ast-confirm .nx-chip { display: inline-flex; align-items: center; min-height: 36px; margin: 0; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .04); color: var(--ink); font: 600 13px/1.2 var(--sans); cursor: pointer; }
html[data-edition=n10] .ast-log .ast-confirm .ast-confirm-yes { background: var(--gold-fill); color: var(--gold-ink); border-color: transparent; }
html[data-edition=n10] .ast-log .ast-confirm .nx-chip:disabled { opacity: .55; cursor: default; }
/* typing: three gold dots in Mira's bubble */
html[data-edition=n10] .ast-log .nx-typing { display: inline-flex; align-items: center; gap: 4px; padding: 14px 16px; animation: m-rise .35s ease both; }
html[data-edition=n10] .ast-log .nx-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); opacity: .3; animation: m-dot 1.2s infinite; }
html[data-edition=n10] .ast-log .nx-typing span:nth-child(2) { animation-delay: .15s; }
html[data-edition=n10] .ast-log .nx-typing span:nth-child(3) { animation-delay: .3s; }

/* Mira's card at the start of an empty conversation (phones; desktop has the side panel) */
html[data-edition=n10] .ast-intro { flex: none; display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; padding: 10px; margin-bottom: 6px; border-radius: 20px; border: 1px solid var(--line-2);
  background: linear-gradient(135deg, rgba(229, 196, 126, .1), rgba(255, 255, 255, .02)); animation: m-rise .4s ease both; }
html[data-edition=n10] .ast-intro-media { position: relative; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: #0e1430 var(--ast-portrait) 50% 30% / cover no-repeat; box-shadow: 0 14px 40px -18px rgba(229, 180, 90, .6); }
html[data-edition=n10] .ast-intro-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
html[data-edition=n10] .ast-intro .kicker { margin: 0 0 2px; font-size: 10.5px; }
html[data-edition=n10] .ast .ast-intro-name { margin: 0; font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .14em; font-size: 26px; line-height: 1.05; color: var(--ink); }
html[data-edition=n10] .ast-intro .accent { display: block; margin: 2px 0 8px; font-size: 16px; line-height: 1.2; }
html[data-edition=n10] .ast-intro-tags { display: flex; flex-wrap: wrap; gap: 4px; }
html[data-edition=n10] .ast-intro-tags .badge { font-size: 10.5px; padding: 2px 8px; font-weight: 600; }

/* ---------- dock: chips + input, or the offer when no questions are left ---------- */
html[data-edition=n10] .ast-dock { flex: none; padding: 10px var(--ast-pad); border-top: 1px solid var(--line); background: rgba(11, 15, 36, .82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
html[data-edition=n10] .ast-chips { margin-bottom: 8px; }
html[data-edition=n10] .ast-chips:empty { display: none; }
html[data-edition=n10] .ast-chips .nx-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; margin: 0; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(255, 255, 255, .04); color: var(--ink); font: 500 13px/1.2 var(--sans); white-space: nowrap; text-decoration: none; cursor: pointer; }
html[data-edition=n10] .ast-chips .nx-chip:hover { background: rgba(229, 196, 126, .12); }
html[data-edition=n10] .ast-chips .nx-chip-link { border-color: rgba(229, 196, 126, .6); background: rgba(229, 196, 126, .06); color: var(--gold); }
html[data-edition=n10] .ast .ast-ask { padding-left: 16px; }
html[data-edition=n10] .ast .ast-ask:focus-within { border-color: rgba(229, 196, 126, .6); box-shadow: 0 0 0 3px rgba(229, 196, 126, .12); }
html[data-edition=n10] .ast-cta { text-align: center; padding: 14px 14px 4px; border-radius: 18px; border: 1px solid rgba(229, 196, 126, .45); background: linear-gradient(135deg, rgba(229, 196, 126, .14), rgba(183, 156, 240, .06)); }
html[data-edition=n10] .ast .ast-cta-t { display: block; font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.2; color: var(--ink); }
html[data-edition=n10] .ast .ast-cta p { margin: 6px 0 12px; font-size: 13.5px; color: var(--ink-2); }
html[data-edition=n10] .ast-cta .btn-link { font-size: 14px; }

/* ---------- the sheet (assistant.js: [hidden] + html.nx-sheet-open; backdrop and cross carry [data-close]) ---------- */
html[data-edition=n10] .ast-sheet { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
html[data-edition=n10] .ast-backdrop { position: absolute; inset: 0; }
html[data-edition=n10] .ast-sheet .sheet-panel { z-index: 1; background: linear-gradient(180deg, #171e44 0%, #10162f 100%); }
html[data-edition=n10] .ast-sheet .sheet-x { cursor: pointer; color: var(--ink); }
html[data-edition=n10] .ast-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
html[data-edition=n10] .ast-people button { width: 100%; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-height: 56px; padding: 10px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
html[data-edition=n10] .ast-people button:hover { border-color: var(--line-2); background: rgba(229, 196, 126, .07); }
html[data-edition=n10] .ast-people button b { font-size: 15px; font-weight: 700; color: var(--ink); }
html[data-edition=n10] .ast-people button span { font-size: 12.5px; color: var(--ink-3); }
html[data-edition=n10] .ast-people button span:empty { display: none; }
html[data-edition=n10] .ast-people button.is-current { border-color: rgba(229, 196, 126, .6); background: rgba(229, 196, 126, .1); cursor: default; }
html[data-edition=n10] .ast-people button.is-current b::after { content: " ✓"; color: var(--gold); }
html[data-edition=n10] .ast-ideas-list { display: grid; gap: 6px; }
/* Мира 2.1: the «Темы» sheet, one section per branch */
html[data-edition=n10] .ast-branch { border-bottom: 1px solid var(--line); padding: 4px 0 10px; }
html[data-edition=n10] .ast-branch + .ast-branch { margin-top: 4px; }
html[data-edition=n10] .ast-branch > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; list-style: none; font-weight: 600; }
html[data-edition=n10] .ast-branch > summary::-webkit-details-marker { display: none; }
html[data-edition=n10] .ast-branch > summary svg { width: 18px; height: 18px; color: var(--gold); flex: none; }
html[data-edition=n10] .ast-branch > summary small { margin-left: auto; color: var(--muted, rgba(255,255,255,.55)); font-weight: 400; }
html[data-edition=n10] .ast-branch[open] > summary small::after { content: " ▴"; }
html[data-edition=n10] .ast-branch:not([open]) > summary small::after { content: " ▾"; }
html[data-edition=n10] .ast-ideas-list button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
  color: var(--ink); text-align: left; font: 500 14.5px/1.3 var(--sans); cursor: pointer; }
html[data-edition=n10] .ast-ideas-list button:hover { border-color: var(--line-2); background: rgba(229, 196, 126, .07); }
html[data-edition=n10] .ast-ideas-list svg { flex: none; width: 18px; height: 18px; color: var(--gold); }
html[data-edition=n10] .ast-actions { display: grid; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
html[data-edition=n10] .ast .tile-act { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line-2); background: transparent; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
html[data-edition=n10] .ast .tile-act .ic { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(229, 196, 126, .1); color: var(--gold); }
html[data-edition=n10] .ast .tile-act .ic svg { width: 18px; height: 18px; }
html[data-edition=n10] .ast .tile-act.is-danger .ic { background: rgba(232, 120, 110, .12); color: #e8786e; }   /* Мира 2.1: «Удалить этот разговор» */
html[data-edition=n10] .ast .tile-act > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
html[data-edition=n10] .ast .tile-act b { font-size: 14.5px; color: var(--ink); }
html[data-edition=n10] .ast .tile-act small { font-size: 12.5px; color: var(--ink-3); }
html[data-edition=n10] .ast .tile-act > svg { flex: none; width: 16px; height: 16px; color: var(--gold); }
html[data-edition=n10] .ast .tile-act.is-gold { border-color: rgba(229, 196, 126, .55); background: linear-gradient(135deg, rgba(229, 196, 126, .14), rgba(183, 156, 240, .06)); }
html[data-edition=n10] .ast .ast-note { margin: 12px 0 0; }
html[data-edition=n10] .ast .ast-consult-lead { margin: 0; font-size: 14px; color: var(--ink-2); }
html[data-edition=n10] .ast-consult .textarea { min-height: 86px; }
html[data-edition=n10] .ast .ast-consent { font-size: 12.5px; }
html[data-edition=n10] .ast .nx-consult-done { margin: 6px 0 4px; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(143, 214, 166, .4); background: rgba(143, 214, 166, .08); color: var(--ink) !important; font-weight: 600; }

/* ---------- desktop: side panel + glass chat panel ---------- */
@media (min-width: 900px) {
  html[data-edition=n10] .ast { --ast-pad: 22px; display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 28px; align-items: start; max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 0; }
  html[data-edition=n10] .ast-side { display: block; position: sticky; top: calc(var(--bar-h) + 24px); }
  html[data-edition=n10] .ast-chat { height: calc(100vh - var(--bar-h) - 48px - var(--tabbar-h)); min-height: 600px; border: 1px solid var(--line-2); border-radius: 26px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015)), rgba(11, 15, 36, .55);
    box-shadow: 0 50px 120px -50px rgba(0, 0, 0, .8), 0 0 0 6px rgba(255, 255, 255, .015); }
  html[data-edition=n10] .ast .ast-back { display: none; }
  html[data-edition=n10] .ast-top { padding: 16px var(--ast-pad); gap: 14px; }
  html[data-edition=n10] .ast-top::before { background-size: 46% auto; background-position: 92% 26%; opacity: .5; }
  html[data-edition=n10] .ast .ast-face { --s: 54px; }
  html[data-edition=n10] .ast .ast-name { font-size: 20px; }
  html[data-edition=n10] .ast .ast-role { display: block; margin-top: 2px; }
  html[data-edition=n10] .ast .ast-status { margin-top: 4px; }
  html[data-edition=n10] .ast .ast-plan { font-size: 12.5px; padding: 7px 14px; }
  html[data-edition=n10] .ast-person { padding: 10px var(--ast-pad); }
  html[data-edition=n10] .ast .ast-ideas { width: auto; height: 34px; padding: 0 14px 0 11px; border-radius: 999px; display: inline-flex; gap: 6px; font: 600 13px var(--sans); color: var(--gold); }
  html[data-edition=n10] .ast .ast-ideas span { display: inline; color: inherit; }
  html[data-edition=n10] .ast .ast-ideas svg { width: 15px; height: 15px; }
  html[data-edition=n10] .ast-log { padding: 22px 28px 18px; }
  html[data-edition=n10] .ast-log .nx-msg-bot { margin-left: 42px; max-width: min(76%, 600px); }
  html[data-edition=n10] .ast-log .nx-msg-bot::before { left: -43px; width: 32px; height: 32px; }
  html[data-edition=n10] .ast-log .nx-msg-user { max-width: min(70%, 520px); }
  html[data-edition=n10] .ast-intro { display: none; }
  html[data-edition=n10] .ast-dock { padding: 12px var(--ast-pad) 16px; background: rgba(11, 15, 36, .55); }
  html[data-edition=n10] .ast-chips { flex-wrap: wrap; overflow: visible; margin: 0 0 10px; padding: 0; }
  html[data-edition=n10] .ast-cta { display: grid; grid-template-columns: 1fr auto; gap: 4px 18px; align-items: center; text-align: left; padding: 16px 20px; }
  html[data-edition=n10] .ast-cta [data-for] { display: contents; }
  html[data-edition=n10] .ast .ast-cta-t { grid-column: 1; }
  html[data-edition=n10] .ast .ast-cta p { grid-column: 1; margin: 0; }
  html[data-edition=n10] .ast-cta .btn-gold { grid-column: 2; grid-row: 1; width: auto; }
  html[data-edition=n10] .ast-cta .btn-link { grid-column: 2; grid-row: 2; min-height: 30px; justify-self: center; }

  html[data-edition=n10] .ast-portrait { position: relative; aspect-ratio: 5 / 4; border-radius: 26px; overflow: hidden; border: 1px solid var(--line-2); background: #0e1430 var(--ast-portrait) 50% 30% / cover no-repeat;
    box-shadow: 0 40px 100px -40px rgba(229, 180, 90, .5), 0 0 0 6px rgba(255, 255, 255, .02); }
  html[data-edition=n10] .ast-portrait video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 26%; transition: filter 1.2s ease, transform 6s ease; }
  html[data-edition=n10] .ast:has(.nx-typing) .ast-portrait video { filter: brightness(1.08) saturate(1.06); transform: scale(1.04); }
  html[data-edition=n10] .ast-portrait .sparkles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
  html[data-edition=n10] .ast-portrait::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(180deg, transparent, rgba(11, 15, 36, .5)); pointer-events: none; }
  html[data-edition=n10] .ast .ast-onair { position: absolute; z-index: 2; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(11, 15, 36, .7);
    border: 1px solid rgba(143, 214, 166, .4); color: var(--ok); font-size: 12px; font-weight: 600; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  html[data-edition=n10] .ast .ast-onair i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
  html[data-edition=n10] .ast:has(.nx-typing) .ast-onair { color: var(--gold); border-color: rgba(229, 196, 126, .5); }
  html[data-edition=n10] .ast-side .kicker { margin-top: 22px; }
  html[data-edition=n10] .ast .ast-h1 { font-size: 40px; margin: 0 0 10px; }
  html[data-edition=n10] .ast .ast-h1 .accent { display: block; text-transform: none; letter-spacing: 0; font-size: 26px; margin-top: 2px; }
  html[data-edition=n10] .ast .ast-side-text { margin: 0 0 14px; color: var(--ink-2); font-size: 14.5px; }
  html[data-edition=n10] .ast-facts { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
  html[data-edition=n10] .ast-facts li { display: flex; gap: 10px; align-items: flex-start; }
  html[data-edition=n10] .ast-facts svg { flex: none; width: 18px; height: 18px; color: var(--gold); margin-top: 1px; }
  html[data-edition=n10] .ast .ast-memory { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(229, 196, 126, .06);
    color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
  html[data-edition=n10] .ast .ast-memory:hover { background: rgba(229, 196, 126, .12); }
  html[data-edition=n10] .ast-memory svg { width: 18px; height: 18px; color: var(--gold); flex: none; }
  html[data-edition=n10] .ast-memory svg:last-child { margin-left: auto; width: 16px; height: 16px; }
  html[data-edition=n10] .ast .ast-disc { margin: 0; line-height: 1.5; }
}
@media (min-width: 1100px) {
  html[data-edition=n10] .ast-chat { height: calc(100vh - var(--bar-h) - 48px); min-height: 640px; }
}
@media (min-width: 900px) and (max-height: 899px) {
  html[data-edition=n10] .ast-facts { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-edition=n10] .ast-log .nx-msg, html[data-edition=n10] .ast-intro, html[data-edition=n10] .ast:has(.nx-typing) .ast-face { animation: none; }
  html[data-edition=n10] .ast-log { scroll-behavior: auto; }
}
