/* ==========================================================================
   Nasouh web console
   Ported from the Claude Design artboard "Nasouh Web App.dc.html".
   The artboard carries its styling inline because the design canvas requires
   it; here the same values live in classes. Tokens, ramps and keyframes are
   copied verbatim so the product and the design stay in step.
   ========================================================================== */

/* --- Accent ramp: #8F83FF is the only colour in the product. ------------- */
:root {
  --color-accent-100: #f2f0ff;
  --color-accent-200: #e4e0ff;
  --color-accent-300: #cdc6ff;
  --color-accent-400: #b0a6ff;
  --color-accent-500: #8F83FF;
  --color-accent-600: #7568ef;
  --color-accent-700: #5c4fd6;
  --color-accent-800: #40358f;
  --color-accent-900: #2b2361;

  --ac: var(--color-accent-500);
  --radius-pill: 99px;
  --measure: 760px;
  --rail-w: 280px;

  /* Light theme — the design's default token set. */
  --ac-d: #5c4fd6;
  --ink: #2a2545;
  --ink2: rgba(42, 37, 69, .6);
  --ink3: rgba(42, 37, 69, .42);
  --glass: rgba(255, 255, 255, .66);
  --glassb: rgba(255, 255, 255, .9);
  --botb: rgba(255, 255, 255, .8);
  --hair: rgba(42, 37, 69, .1);
  --rail: rgba(255, 255, 255, .5);
  --sheet: #fbfaff;
  --danger: #b03a53;
  --b0: #eae7f6;
  --b1: #dfe8f8;
  --b2: #efe4fb;
  --b3: #f6effc;
}

/* Explicit choice wins in both directions; "system" falls through to the
   media query below. */
:root[data-theme="dark"] {
  --ac-d: #b7aeff;
  --ink: #ece9fb;
  --ink2: rgba(236, 233, 251, .62);
  --ink3: rgba(236, 233, 251, .42);
  --glass: rgba(255, 255, 255, .07);
  --glassb: rgba(255, 255, 255, .13);
  --botb: rgba(255, 255, 255, .09);
  --hair: rgba(255, 255, 255, .12);
  --rail: rgba(255, 255, 255, .04);
  --sheet: #221c3a;
  --danger: #ff9aac;
  --b0: #15121f;
  --b1: #221c3d;
  --b2: #2b2154;
  --b3: #1b1730;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ac-d: #b7aeff;
    --ink: #ece9fb;
    --ink2: rgba(236, 233, 251, .62);
    --ink3: rgba(236, 233, 251, .42);
    --glass: rgba(255, 255, 255, .07);
    --glassb: rgba(255, 255, 255, .13);
    --botb: rgba(255, 255, 255, .09);
    --hair: rgba(255, 255, 255, .12);
    --rail: rgba(255, 255, 255, .04);
    --sheet: #221c3a;
    --danger: #ff9aac;
    --b0: #15121f;
    --b1: #221c3d;
    --b2: #2b2154;
    --b3: #1b1730;
  }
}

/* --- Keyframes, verbatim from the design --------------------------------- */
@keyframes fw     { from { opacity: 0; transform: translateY(4px) } to { opacity: 1; transform: none } }
@keyframes flo    { 0%, 100% { transform: translateY(0) rotate(-1deg) } 50% { transform: translateY(-6px) rotate(1.5deg) } }
@keyframes glo    { 0%, 100% { opacity: .55; transform: scale(1) } 50% { opacity: .9; transform: scale(1.07) } }
@keyframes blink  { 0%, 92%, 100% { transform: scaleY(1) } 96% { transform: scaleY(.12) } }
@keyframes dot    { 0%, 80%, 100% { opacity: .25; transform: translateY(0) } 40% { opacity: 1; transform: translateY(-3px) } }
@keyframes breathe{ 0%, 100% { transform: scale(.82); opacity: .5 } 50% { transform: scale(1.12); opacity: .95 } }
@keyframes rise   { from { opacity: 0; transform: translateY(12px) } to { opacity: 1; transform: none } }

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

/* --- Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "IBM Plex Sans Arabic", "Barlow", system-ui, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(90% 60% at 8% 0%, var(--b1) 0%, transparent 62%),
    radial-gradient(80% 70% at 96% 10%, var(--b2) 0%, transparent 60%),
    radial-gradient(120% 80% at 50% 106%, var(--b3) 0%, transparent 70%),
    var(--b0);
  background-attachment: fixed;
}

button { font-family: inherit; color: inherit; }
input  { font-family: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--ac);
  outline-offset: 2px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--hair); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }

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

/* --- The blob avatar ----------------------------------------------------- */
/* An irregular border-radius plus two blinking eyes. Pure CSS, no asset. */
.blob {
  flex: none;
  border-radius: 44% 40% 46% 42% / 40% 46% 42% 46%;
  background: radial-gradient(120% 120% at 30% 25%, #cfc7ff, #9186ff 60%, #7466ee);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(110, 95, 230, .26);
  animation: flo 6s ease-in-out infinite;
}
.blob i {
  display: block;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .92);
  animation: blink 5s ease-in-out infinite;
}

.blob--sm   { width: 34px; height: 34px; gap: 5px; }
.blob--sm i { width: 3px; height: 7px; }

.blob--msg  { width: 32px; height: 32px; gap: 5px; margin-top: 3px; animation: none;
              box-shadow: 0 6px 14px rgba(110, 95, 230, .22); }
.blob--msg i{ width: 3px; height: 7px; animation: none; }

.blob--empty   { width: 48px; height: 48px; gap: 7px; opacity: .85; animation: none;
                 background: radial-gradient(120% 120% at 30% 25%, #e2ddff, #bcb2ff 60%, #a79bfb); }
.blob--empty i { width: 3px; height: 8px; background: #fff; animation: none; }

.blob--hero {
  width: 100px; height: 100px; gap: 16px;
  border-radius: 42% 46% 40% 44% / 46% 40% 46% 42%;
  background: radial-gradient(120% 120% at 30% 22%, #cfc7ff 0%, #9d92ff 42%, #7365ee 100%);
  box-shadow: 0 18px 34px rgba(110, 95, 230, .32),
              inset 0 -10px 18px rgba(80, 64, 190, .35),
              inset 0 8px 14px rgba(255, 255, 255, .5);
}
.blob--hero i { width: 7px; height: 15px; }

.blob--auth { width: 124px; height: 124px; gap: 19px; }
.blob--auth i { width: 8px; height: 18px; }

.blob-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.blob-wrap::before {
  content: "";
  position: absolute;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(143, 131, 255, .5), transparent 68%);
  filter: blur(6px);
  animation: glo 5.5s ease-in-out infinite;
}
.blob-wrap--hero { width: 150px; height: 150px; }
.blob-wrap--auth { width: 190px; height: 190px; }
.blob-wrap--auth::before { width: 164px; height: 164px; filter: blur(8px); }

/* --- Shared primitives --------------------------------------------------- */
.btn-primary {
  border: 0;
  cursor: pointer;
  border-radius: var(--radius-pill);
  background: var(--ac);
  color: #fff;
  font: 600 14px/1 inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 12px 24px rgba(110, 95, 230, .28);
  transition: background .16s ease;
}
.btn-primary:hover { background: var(--color-accent-600); }
.btn-primary:active { background: var(--color-accent-700); }
.btn-primary:disabled { opacity: .55; cursor: default; }

.btn-ghost {
  border: 1px solid var(--hair);
  cursor: pointer;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  font: 500 14px/1 inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: background .16s ease, border-color .16s ease;
}
.btn-ghost:hover { background: rgba(143, 131, 255, .12); border-color: var(--color-accent-400); }

.btn-danger {
  border: 0; cursor: pointer; border-radius: var(--radius-pill);
  background: var(--danger); color: #fff; font: 600 14px/1 inherit;
}
.btn-danger:hover { opacity: .88; }

.icon-btn {
  border: 0;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink3);
  transition: background .16s ease, color .16s ease;
}
.icon-btn:hover { background: rgba(143, 131, 255, .14); color: var(--ac-d); }

.round-btn {
  border: 1px solid var(--glassb);
  background: var(--glass);
  width: 38px; height: 38px; flex: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--ac-d);
  display: flex; align-items: center; justify-content: center;
  transition: background .16s ease;
}
.round-btn:hover { background: rgba(143, 131, 255, .16); }

/* Segmented pill toggles (language, theme). */
.seg {
  display: flex;
  gap: 5px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--glass);
  border: 1px solid var(--glassb);
}
.seg button {
  position: relative;
  border: 0;
  background: transparent;
  border-radius: var(--radius-pill);
  padding: 7px 13px;
  cursor: pointer;
  font: 500 12px/1 inherit;
  color: var(--ink);
}
.seg button::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: var(--radius-pill);
  background: var(--ac);
  opacity: 0;
  transition: opacity .16s ease;
}
.seg button[aria-pressed="true"] { color: #fff; }
.seg button[aria-pressed="true"]::before { opacity: 1; }
.seg button > span { position: relative; }

/* Bordered variant used inside the settings rows. */
.seg--bare { background: transparent; border: 0; padding: 0; gap: 6px; }
.seg--bare button { border: 1px solid var(--hair); padding: 8px 14px; }

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: start;
}
.field > span {
  font: 500 11.5px/1 inherit;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink3);
}
.field input {
  width: 100%;
  border: 1px solid var(--hair);
  background: var(--glass);
  border-radius: 14px;
  padding: 14px 16px;
  outline: none;
  font: 400 14px/1.4 inherit;
  color: var(--ink);
}
.field input:focus {
  border-color: var(--ac);
  box-shadow: 0 0 0 3px rgba(143, 131, 255, .2);
}
.field input.ltr { direction: ltr; text-align: start; }

/* Sits under an input, in sentence case — unlike .field > span, which is the
   uppercase label. Used to say what the access code is, since the field looks
   like a password field and isn't one. */
.field__hint {
  font: 400 11.5px/1.45 inherit;
  color: var(--ink3);
}

.dots {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 3px 2px;
}
.dots i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ac);
  animation: dot 1.2s ease-in-out infinite;
}
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
.dots--light i { background: #fff; }

/* ==========================================================================
   Auth
   ========================================================================== */
.auth {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
}

.auth__brand {
  width: 46%;
  flex: none;
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--rail);
  border-inline-end: 1px solid var(--hair);
}
.auth__logo { display: flex; align-items: center; gap: 11px; }
.auth__logo span { font: 600 17px/1 inherit; color: var(--ink); }
.auth__pitch { display: flex; flex-direction: column; align-items: center; text-align: center; }
.auth__pitch h2 {
  margin: 22px 0 0;
  font: 700 28px/1.4 inherit;
  color: var(--ac-d);
  max-width: 340px;
  text-wrap: balance;
}
.auth__pitch p {
  margin: 12px 0 0;
  font: 400 14px/1.8 inherit;
  color: var(--ink2);
  max-width: 320px;
  text-wrap: pretty;
}
.auth__fine {
  font: 400 11.5px/1.7 inherit;
  color: var(--ink3);
  max-width: 320px;
  text-align: start;
}

.auth__panel {
  flex: 1;
  min-width: 0;
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
}
.auth__topbar { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.auth__form {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
}
.auth__form h1 { margin: 0; font: 700 30px/1.35 inherit; color: var(--ink); text-align: start; }
.auth__form > p { margin: 8px 0 0; font: 400 13.5px/1.7 inherit; color: var(--ink2); text-align: start; }
.auth__fields { margin-top: 26px; display: flex; flex-direction: column; gap: 14px; }
.auth__submit { margin-top: 4px; width: 100%; padding: 17px; font-size: 15px; gap: 10px;
                box-shadow: 0 14px 28px rgba(110, 95, 230, .3); }
.auth__guest { width: 100%; padding: 16px; }
.auth__or { display: flex; align-items: center; gap: 12px; margin: 6px 0; }
.auth__or span:first-child, .auth__or span:last-child { flex: 1; height: 1px; background: var(--hair); }
.auth__or span:nth-child(2) { font: 400 11px/1 inherit; color: var(--ink3); }
.auth__switch {
  margin-top: 24px;
  display: flex; align-items: center; gap: 7px;
  justify-content: center; flex-wrap: wrap;
  font: 400 13px/1 inherit; color: var(--ink2);
}
.auth__switch button {
  border: 0; background: transparent; cursor: pointer; padding: 2px;
  font: 600 13px/1 inherit; color: var(--ac-d);
  text-decoration: underline; text-underline-offset: 3px;
}
.auth__switch button:hover { color: var(--ac); }
.auth__terms { font: 400 11px/1.6 inherit; color: var(--ink3); text-align: center; }

.alert-error {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 14px; border-radius: 12px;
  background: rgba(176, 58, 83, .1);
  border: 1px solid rgba(176, 58, 83, .3);
  font: 500 12px/1.5 inherit; color: var(--danger);
  text-align: start;
}
.alert-error svg { flex: none; }

/* ==========================================================================
   Console shell
   ========================================================================== */
.app { display: flex; height: 100vh; overflow: hidden; }

/* --- History rail -------------------------------------------------------- */
.rail {
  width: var(--rail-w);
  flex: none;
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  gap: 16px;
  background: var(--rail);
  border-inline-end: 1px solid var(--hair);
}
.rail__brand { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.rail__brand-text { flex: 1; min-width: 0; text-align: start; }
.rail__brand-text b { display: block; font: 600 16px/1.25 inherit; }
.rail__brand-text span { display: block; font: 400 11px/1.3 inherit; color: var(--ink2); }

.rail__new { width: 100%; padding: 13px; }

.rail__search {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  background: var(--glass);
  border: 1px solid var(--glassb);
}
.rail__search svg { color: var(--ink3); flex: none; }
.rail__search input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font: 400 12.5px/1 inherit; color: var(--ink);
}
.rail__search input::placeholder { color: var(--ink3); }

.rail__list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin: 0 -4px; }
.rail__group {
  font: 500 10px/1 inherit;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink3);
  padding: 14px 8px 8px;
}
.rail__item {
  position: relative;
  width: 100%;
  text-align: start;
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.rail__item:hover { background: rgba(143, 131, 255, .12); }
.rail__item[aria-current="true"] {
  background: rgba(143, 131, 255, .16);
  border: 1px solid rgba(143, 131, 255, .4);
  padding: 9px 11px;
}
.rail__dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: none; }
.rail__item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rail__item-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.rail__item-title {
  font: 500 13px/1.35 inherit; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rail__item-time { font: 400 10.5px/1 inherit; color: var(--ink3); flex: none; }
.rail__item-snippet {
  font: 400 11.5px/1.5 inherit; color: var(--ink2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.rail__empty {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; gap: 10px; padding: 0 10px;
}
.rail__empty b { font: 600 13.5px/1.4 inherit; }
.rail__empty span { font: 400 12px/1.6 inherit; color: var(--ink2); }

.rail__foot {
  display: flex; flex-direction: column; gap: 2px;
  padding-top: 12px;
  border-top: 1px solid var(--hair);
}
.rail__link {
  border: 0; background: transparent; border-radius: 10px;
  padding: 10px 12px; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); font: 400 13px/1 inherit;
  text-align: start;
}
.rail__link:hover { background: rgba(143, 131, 255, .12); }
.rail__link svg { flex: none; color: var(--ac-d); }

.account { position: relative; margin-top: 6px; }
.account__btn {
  width: 100%;
  border: 1px solid transparent;
  display: flex; align-items: center; gap: 10px;
  padding: 12px; border-radius: 12px;
  background: var(--glass);
  cursor: pointer;
}
.account__btn:hover { border-color: rgba(143, 131, 255, .4); }
.account__avatar {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: linear-gradient(145deg, #b0a6ff, #7568ef);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font: 600 12px/1 inherit;
}
.account__meta { flex: 1; min-width: 0; text-align: start; }
.account__meta b {
  display: block; font: 500 12.5px/1.3 inherit; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.account__meta span { display: block; font: 400 10.5px/1.3 inherit; color: var(--ink3); }
.account__chev { flex: none; color: var(--ink3); }

.account__menu {
  position: absolute;
  bottom: calc(100% + 8px);
  inset-inline: 0;
  z-index: 30;
  background: var(--sheet);
  border: 1px solid var(--hair);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 20px 44px rgba(28, 22, 58, .22);
  animation: rise .18s ease both;
}
.account__menu-head {
  padding: 8px 10px 10px;
  text-align: start;
  border-bottom: 1px solid var(--hair);
}
.account__menu-head b { display: block; font: 500 12.5px/1.4 inherit; color: var(--ink); }
.account__menu-head span { display: block; font: 400 10.5px/1.4 inherit; color: var(--ink3); }
.account__menu button {
  width: 100%; border: 0; background: transparent; border-radius: 10px;
  padding: 10px; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  font: 400 12.5px/1 inherit; color: var(--ink); text-align: start;
}
.account__menu button:hover { background: rgba(143, 131, 255, .14); }
.account__menu button svg { flex: none; color: var(--ac-d); }
.account__menu button.is-danger { color: var(--danger); font-weight: 500; }
.account__menu button.is-danger svg { color: var(--danger); }
.account__menu button.is-danger:hover { background: rgba(176, 58, 83, .1); }

/* --- Main column --------------------------------------------------------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 68px;
  flex: none;
  display: flex; align-items: center; gap: 14px;
  padding: 0 26px;
  border-bottom: 1px solid var(--hair);
}
.topbar__title { flex: 1; min-width: 0; text-align: start; }
.topbar__title-row { display: flex; align-items: center; gap: 8px; }
.topbar__pip { width: 8px; height: 8px; border-radius: 50%; background: var(--ac); flex: none; }
.topbar__title-row b {
  font: 600 15.5px/1.3 inherit;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar__status {
  font: 400 11.5px/1.4 inherit;
  color: var(--ink2);
  padding-inline-start: 16px;
}
.topbar__help {
  border: 1px solid rgba(143, 131, 255, .45);
  background: rgba(143, 131, 255, .12);
  border-radius: var(--radius-pill);
  padding: 10px 15px;
  cursor: pointer;
  color: var(--ac-d);
  display: flex; align-items: center; gap: 8px;
  font: 500 12.5px/1 inherit;
  flex: none; white-space: nowrap;
}
.topbar__help:hover { background: rgba(143, 131, 255, .22); }

.scroll { flex: 1; overflow-y: auto; padding: 24px 26px 8px; }
.measure { max-width: var(--measure); margin: 0 auto; }

.banner {
  max-width: var(--measure);
  margin: 0 auto 18px;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(143, 131, 255, .14);
  border: 1px solid rgba(143, 131, 255, .35);
  font: 500 12.5px/1.4 inherit;
  color: var(--ac-d);
}
.banner svg { flex: none; }

/* --- Welcome ------------------------------------------------------------- */
.welcome {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 38px 0 10px;
  animation: rise .4s ease both;
}
.welcome__badge {
  margin-top: 12px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--glass);
  border: 1px solid var(--glassb);
  font: 500 11.5px/1 inherit;
  color: var(--ac-d);
  white-space: nowrap;
}
.welcome h2 {
  margin: 20px 0 0;
  font: 700 34px/1.32 inherit;
  color: var(--ac-d);
  letter-spacing: -.01em;
  max-width: 560px;
  text-wrap: balance;
}
.welcome p {
  margin: 12px 0 0;
  font: 400 15px/1.8 inherit;
  color: var(--ink2);
  max-width: 470px;
  text-wrap: pretty;
}
.starters {
  margin-top: 32px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.starter {
  text-align: start;
  border: 1px solid var(--glassb);
  background: var(--glass);
  border-radius: 18px;
  padding: 18px;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color .16s ease, background .16s ease;
}
.starter:hover { border-color: var(--color-accent-400); background: rgba(143, 131, 255, .1); }
.starter b { font: 500 14px/1.4 inherit; color: var(--ink); }
.starter span { font: 400 12px/1.6 inherit; color: var(--ink2); }

/* --- Conversation -------------------------------------------------------- */
.thread { display: flex; flex-direction: column; gap: 18px; }

.disclaimer {
  align-self: center;
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  background: var(--glass);
  border: 1px solid var(--glassb);
  font: 400 11.5px/1.5 inherit;
  color: var(--ink2);
  text-align: center;
}

.turn { display: flex; flex-direction: column; gap: 6px; }

.bubble-row { display: flex; align-items: flex-start; gap: 12px; padding-inline-end: 110px; }

.bubble--bot {
  padding: 15px 19px;
  border-radius: 20px 20px 20px 6px;
  background: var(--botb);
  border: 1px solid var(--glassb);
  color: var(--ink);
  font: 400 14.5px/1.85 inherit;
  text-align: start;
  box-shadow: 0 8px 22px rgba(60, 50, 120, .06);
  min-width: 0;
  overflow-wrap: anywhere;
}
/* The crisis block arrives with its own line breaks and rules — keep them. */
.bubble--bot .body { white-space: pre-wrap; }

/* Words fade in one at a time as the reply is revealed. The spacing comes
   from real space characters, not a margin, so the bubble does not reflow
   when the finished text is rendered back as plain text. */
.bubble--bot .word {
  display: inline-block;
  animation: fw .42s ease both;
}
.caret {
  display: inline-block;
  width: 7px; height: 15px;
  border-radius: 3px;
  background: var(--ac);
  opacity: .5;
  vertical-align: -2px;
  animation: glo 1.1s ease-in-out infinite;
}

.user-row { display: flex; justify-content: flex-end; padding-inline-start: 110px; }
.bubble--user {
  padding: 15px 19px;
  border-radius: 20px 20px 6px 20px;
  background: var(--ac);
  color: #fff;
  font: 400 14.5px/1.8 inherit;
  text-align: start;
  box-shadow: 0 12px 26px rgba(110, 95, 230, .26);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.tools { display: flex; gap: 4px; padding-inline-start: 44px; align-items: center; }
.tools .icon-btn { width: 30px; height: 30px; }
.tools .icon-btn[aria-pressed="true"] { color: var(--ac-d); background: rgba(143, 131, 255, .14); }
.tools__model {
  font: 400 10.5px/1 inherit;
  color: var(--ink3);
  direction: ltr;
  margin-inline-start: 6px;
}

.fail-row {
  display: flex; justify-content: flex-end; align-items: center;
  gap: 10px; padding-inline-start: 110px;
}
.fail-row span { font: 400 11.5px/1.3 inherit; color: var(--danger); }
.fail-row button {
  flex: none; white-space: nowrap;
  border: 1px solid rgba(176, 58, 83, .4);
  background: transparent;
  border-radius: var(--radius-pill);
  padding: 6px 13px; cursor: pointer;
  font: 500 11.5px/1.3 inherit; color: var(--danger);
  display: flex; align-items: center; gap: 6px;
}
.fail-row button:hover { background: rgba(176, 58, 83, .1); }

/* --- Composer ------------------------------------------------------------ */
.composer-wrap { flex: none; padding: 10px 26px 20px; }
.composer-inner {
  max-width: var(--measure);
  margin: 0 auto;
  display: flex; flex-direction: column; gap: 10px;
}
.quicks { display: flex; flex-wrap: wrap; gap: 8px; }
.quick {
  border: 1px solid rgba(143, 131, 255, .45);
  background: var(--glass);
  border-radius: var(--radius-pill);
  padding: 9px 15px;
  cursor: pointer;
  font: 400 12.5px/1.3 inherit;
  color: var(--ac-d);
  white-space: nowrap;
}
.quick:hover { background: rgba(143, 131, 255, .16); }

.composer {
  display: flex; align-items: flex-end; gap: 10px;
  padding-block: 8px;
  padding-inline: 18px 8px;
  border-radius: 26px;
  background: var(--glass);
  border: 1px solid var(--glassb);
  box-shadow: 0 12px 28px rgba(60, 50, 120, .08);
}
.composer textarea {
  flex: 1; min-width: 0;
  border: 0; outline: none; background: transparent;
  font: 400 14.5px/1.6 inherit;
  color: var(--ink);
  padding: 10px 0;
  resize: none;
  max-height: 140px;
  font-family: inherit;
}
.composer textarea::placeholder { color: var(--ink3); }
.composer__send { height: 40px; padding: 0 18px; flex: none; font-size: 13px;
                  box-shadow: 0 8px 18px rgba(110, 95, 230, .3); }
.composer__stop {
  border: 0; background: var(--ink); height: 40px; padding: 0 16px; flex: none;
  border-radius: var(--radius-pill); cursor: pointer; color: var(--sheet);
  display: flex; align-items: center; gap: 8px; font: 500 13px/1 inherit;
}
.composer__stop i { width: 10px; height: 10px; border-radius: 2px; background: currentColor; }
/* The send arrow points at the text, so it mirrors with the writing direction. */
[dir="rtl"] .composer__send svg { transform: scaleX(-1); }

.composer-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 0 6px;
  font: 400 11px/1.4 inherit; color: var(--ink3);
}

/* ==========================================================================
   Dialogs
   ========================================================================== */
.scrim {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  background: rgba(28, 22, 58, .34);
  backdrop-filter: blur(6px);
}

.sheet {
  max-height: 100%;
  overflow-y: auto;
  background: var(--sheet);
  border: 1px solid var(--glassb);
  border-radius: 26px;
  padding: 30px;
  box-shadow: 0 40px 90px rgba(28, 22, 58, .3);
  animation: rise .3s ease both;
}
.sheet--checkin  { width: 520px; }
.sheet--settings { width: 600px; }
.sheet--logout   { width: 420px; border-radius: 24px; text-align: start; }
.sheet--safety   { width: 560px; border: 0; color: #fff; padding: 32px;
                   background: linear-gradient(170deg, #2b2361 0%, #3a2f7d 55%, #251e55 100%);
                   box-shadow: 0 40px 90px rgba(20, 14, 45, .5); }

.sheet__head { display: flex; align-items: flex-start; gap: 14px; }
.sheet__head-text { flex: 1; text-align: start; }
.sheet__head h3 { margin: 0; font: 700 22px/1.35 inherit; color: var(--ink); }
.sheet__head p { margin: 7px 0 0; font: 400 13.5px/1.7 inherit; color: var(--ink2); }

.sheet__close {
  border: 0;
  background: rgba(42, 37, 69, .06);
  width: 34px; height: 34px; flex: none;
  border-radius: 50%; cursor: pointer;
  color: var(--ink2);
  display: flex; align-items: center; justify-content: center;
}
.sheet__close:hover { background: rgba(143, 131, 255, .18); }
.sheet--safety .sheet__close { background: rgba(255, 255, 255, .14); color: #fff; }
.sheet--safety .sheet__close:hover { background: rgba(255, 255, 255, .26); }

/* --- Check-in ------------------------------------------------------------ */
.moods { margin-top: 22px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; }
.mood {
  position: relative;
  border: 1px solid var(--hair);
  background: transparent;
  border-radius: 18px;
  padding: 15px 4px 12px;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.mood:hover { border-color: var(--color-accent-400); }
.mood[aria-pressed="true"]::before {
  content: "";
  position: absolute; inset: -1px;
  border-radius: 19px;
  border: 2px solid var(--ac);
  background: rgba(143, 131, 255, .1);
}
.mood__face {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 44% 40% 46% 42% / 40% 46% 42% 46%;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.mood__face i { width: 3px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, .92); }
.mood > span { position: relative; font: 500 11px/1.2 inherit; color: var(--ink); }

.row-between { display: flex; align-items: center; justify-content: space-between; }
.row-between b { font: 500 13px/1 inherit; }
.row-between .value { font: 500 13px/1 inherit; color: var(--ac-d); }

.levels { margin-top: 12px; display: flex; gap: 8px; }
.level {
  position: relative; flex: 1; height: 40px;
  border: 1px solid var(--hair);
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 10px;
}
.level:hover { border-color: var(--color-accent-400); }
.level::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 12px;
  background: var(--ac);
  opacity: 0;
}
.level[aria-pressed="true"]::before { opacity: 1; }
.level i {
  position: relative;
  width: 4px;
  border-radius: var(--radius-pill);
  background: var(--ac);
}
.level[aria-pressed="true"] i { background: #fff; }

.chips { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative;
  border: 1px solid var(--hair);
  background: transparent;
  border-radius: var(--radius-pill);
  padding: 10px 16px;
  cursor: pointer;
  font: 400 13px/1 inherit;
  color: var(--ink);
}
.chip:hover { border-color: var(--color-accent-400); }
.chip[aria-pressed="true"]::before {
  content: "";
  position: absolute; inset: -1px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--ac);
  background: rgba(143, 131, 255, .14);
}
.chip > span { position: relative; }

.sheet__actions { margin-top: 28px; display: flex; align-items: center; gap: 12px; }
.sheet__actions .btn-primary { flex: 1; padding: 16px; font-size: 15px;
                               box-shadow: 0 14px 28px rgba(110, 95, 230, .3); }
.sheet__skip {
  border: 0; background: transparent; cursor: pointer;
  padding: 16px 18px; font: 500 13.5px/1 inherit; color: var(--ink2);
}
.sheet__skip:hover { color: var(--ac-d); }

/* --- Settings ------------------------------------------------------------ */
.settings-body { margin-top: 24px; display: flex; flex-direction: column; gap: 24px; }
.settings-label {
  font: 500 10.5px/1 inherit;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 8px;
}
.settings-card { border: 1px solid var(--hair); border-radius: 18px; padding: 2px 18px; }
.settings-card--pad { padding: 18px; }
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 0;
  border-bottom: 1px solid var(--hair);
  font: 400 14px/1.4 inherit;
}
.settings-row:last-child { border-bottom: 0; }
.settings-row svg { color: var(--ac-d); flex: none; }
.settings-row .grow { flex: 1; text-align: start; }
.settings-row .muted { font: 400 12.5px/1 inherit; color: var(--ink2); }
.settings-row input[type="number"], .settings-row select {
  border: 1px solid var(--hair);
  background: transparent;
  color: var(--ink);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  font: 500 12px/1 inherit;
  outline: none;
}
.settings-row input[type="number"] { width: 90px; text-align: center; }

.danger-row {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 16px 0; border: 0; background: transparent; cursor: pointer;
  font: 400 14px/1.4 inherit; color: var(--danger); text-align: start;
}
.danger-row:hover { opacity: .7; }
.danger-row svg { color: var(--danger); flex: none; }
.danger-row .grow { flex: 1; text-align: start; }

.toggle {
  position: relative; width: 48px; height: 28px;
  border-radius: var(--radius-pill); border: 0; cursor: pointer;
  flex: none; padding: 0;
  background: var(--hair);
  transition: background .22s ease;
}
.toggle[aria-pressed="true"] { background: var(--ac); }
.toggle i {
  position: absolute; top: 3px; inset-inline-start: 3px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .2);
  transition: inset-inline-start .22s ease;
}
.toggle[aria-pressed="true"] i { inset-inline-start: 23px; }

.account-card { display: flex; align-items: center; gap: 12px; }
.account-card .account__avatar { width: 40px; height: 40px; font-size: 14px; }
.account-card__meta { flex: 1; min-width: 0; text-align: start; }
.account-card__meta b { display: block; font: 500 14px/1.35 inherit; color: var(--ink); }
.account-card__meta span { display: block; font: 400 12px/1.4 inherit; color: var(--ink3); }
.account-card button {
  flex: none; white-space: nowrap;
  border: 1px solid rgba(176, 58, 83, .4);
  background: transparent;
  border-radius: var(--radius-pill);
  padding: 10px 16px; cursor: pointer;
  font: 500 12.5px/1 inherit; color: var(--danger);
  display: flex; align-items: center; gap: 7px;
}
.account-card button:hover { background: rgba(176, 58, 83, .1); }

.settings-version { font: 400 11.5px/1.6 inherit; color: var(--ink3); }

/* --- Logout -------------------------------------------------------------- */
.sheet--logout h3 { margin: 0; font: 700 20px/1.4 inherit; color: var(--ink); }
.sheet--logout p { margin: 9px 0 0; font: 400 13.5px/1.75 inherit; color: var(--ink2); }
.sheet--logout .sheet__actions > button { flex: 1; padding: 15px; }

/* --- Safety -------------------------------------------------------------- */
.sheet--safety .sheet__head { justify-content: flex-end; }
.safety__hero {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; margin-top: -14px;
}
.safety__ring {
  position: relative;
  width: 124px; height: 124px;
  display: flex; align-items: center; justify-content: center;
}
.safety__ring::before, .safety__ring::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  animation: breathe 7s ease-in-out infinite;
}
.safety__ring::before { width: 124px; height: 124px; border: 1px solid rgba(255, 255, 255, .25); }
.safety__ring::after {
  width: 90px; height: 90px;
  background: radial-gradient(circle, rgba(143, 131, 255, .6), transparent 70%);
}
.safety__ring span { position: relative; font: 500 12px/1.4 inherit; color: rgba(255, 255, 255, .85); }
.safety__hero h3 { margin: 18px 0 0; font: 700 25px/1.4 inherit; }
.safety__hero p {
  margin: 10px 0 0;
  font: 400 13.5px/1.8 inherit;
  color: rgba(255, 255, 255, .72);
  max-width: 400px;
  text-wrap: pretty;
}
.safety__actions { margin-top: 24px; display: flex; gap: 10px; }
.safety__call {
  flex: 1; border: 0; cursor: pointer; padding: 17px;
  border-radius: var(--radius-pill);
  background: var(--ac); color: #fff;
  font: 600 14.5px/1 inherit;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .28);
  text-decoration: none;
}
.safety__call:hover { background: #a49aff; }
.safety__alt {
  flex: 1; border: 1px solid rgba(255, 255, 255, .35); cursor: pointer; padding: 17px;
  border-radius: var(--radius-pill);
  background: transparent; color: #fff;
  font: 500 14px/1 inherit;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  text-decoration: none;
}
.safety__alt:hover { background: rgba(255, 255, 255, .12); }

.safety__steps {
  margin-top: 22px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 18px;
  padding: 18px 20px 6px;
}
.safety__steps-label {
  font: 500 10.5px/1 inherit;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
  margin-bottom: 14px;
}
.safety__step { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 14px; }
.safety__step b {
  width: 22px; height: 22px; flex: none;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35);
  display: flex; align-items: center; justify-content: center;
  font: 500 11px/1 "Barlow Condensed", sans-serif;
  color: rgba(255, 255, 255, .8);
}
.safety__step span { font: 400 13px/1.7 inherit; color: rgba(255, 255, 255, .82); text-align: start; }

/* ==========================================================================
   Narrow windows
   The design is a 1320×840 desktop console. Below the rail's breathing room
   the rail collapses so the conversation keeps its measure.
   ========================================================================== */
@media (max-width: 900px) {
  .rail { display: none; }
  .auth { flex-direction: column; }
  .auth__brand { width: auto; padding: 32px 24px; }
  .auth__brand .auth__pitch, .auth__brand .auth__fine { display: none; }
  .auth__panel { padding: 24px; }
  .starters { grid-template-columns: 1fr; }
  .bubble-row { padding-inline-end: 24px; }
  .user-row, .fail-row { padding-inline-start: 24px; }
  .scroll, .composer-wrap { padding-inline: 16px; }
  .scrim { padding: 16px; }
  .sheet--checkin, .sheet--settings, .sheet--safety, .sheet--logout { width: 100%; }
}

/* ---- v2 assistant (?v2=1): cards under replies, consent checkbox ---- */
.v2-cards { display: grid; gap: 8px; margin: 8px 44px 0 0; max-width: 520px; }
[dir="ltr"] .v2-cards { margin: 8px 0 0 44px; }
.v2-card { border: 1px solid rgba(143, 131, 255, .35); border-radius: 14px; padding: 12px 14px;
  background: rgba(143, 131, 255, .06); display: grid; gap: 6px; }
.v2-card b { font-size: 14px; }
.v2-card p { margin: 0; font-size: 13px; opacity: .85; }
.v2-card--crisis_contacts { border-color: rgba(220, 80, 80, .5); background: rgba(220, 80, 80, .06); }
.v2-card__contacts { display: grid; gap: 4px; }
.v2-card__contacts a { font-size: 13px; color: inherit; }
.v2-card__filters { font-size: 11px; opacity: .6; direction: ltr; text-align: start; }
.v2-card__cta { justify-self: start; border: 0; border-radius: 10px; padding: 6px 12px;
  background: #8f83ff; color: #fff; font: inherit; font-size: 13px; cursor: pointer; }
.v2-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; opacity: .8;
  margin: 0 4px 6px; cursor: pointer; }
.v2-card__doctors { display: grid; gap: 8px; }
.v2-doctor { display: grid; gap: 4px; padding: 10px; border-radius: 12px; background: rgba(143, 131, 255, .08); }
.v2-doctor small { opacity: .7; font-size: 12px; }
.v2-doctor__reasons { margin: 0; padding-inline-start: 18px; font-size: 12px; }
.v2-summary-btn { margin: 8px 44px 0 0; }
.v2-avatar { flex: none; margin-top: 2px; }

/* Review item 6: three support numbers, each its own button; wrap on narrow screens. */
.safety__actions { flex-wrap: wrap; }
.safety__actions > a { flex: 1 1 200px; }

/* v2: a 1–5 scale tapped as faces */
.quick--face, .starter.quick--face {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 2px; min-width: 0; flex: 1 1 0; max-width: 84px; text-align: center;
}
.quick--face span { font-size: 11px; line-height: 1.2; white-space: nowrap; }
.quick--face nasouh-mascot { pointer-events: none; transition: transform .18s ease; }
.quick--face:hover nasouh-mascot, .quick--face:focus-visible nasouh-mascot { transform: translateY(-3px) scale(1.08); }
.starters--faces { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.starters--faces .starter { flex: 0 0 auto; }
nasouh-mascot { cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .quick--face nasouh-mascot { transition: none; } }

/* v2: a minute of breathing */
.v2-card--breathing { text-align: center; }
.breath { position: relative; width: 190px; height: 190px; margin: 6px auto 2px; display: grid; place-items: center; }
.breath__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.breath__track { fill: none; stroke: rgba(143, 131, 255, .15); stroke-width: 4; }
.breath__fill { fill: none; stroke: #8f83ff; stroke-width: 4; stroke-linecap: round; }
.breath__orb { transition-property: transform; transition-timing-function: ease-in-out; transform: scale(1);
  border-radius: 50%; padding: 6px; background: radial-gradient(circle, rgba(143, 131, 255, .22), transparent 70%); }
.breath__phase { min-height: 1.6em; font-size: 18px; font-weight: 600; color: #6c5ce7; }
.breath__bar { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 6px; }
.breath__sound { border: 1px solid rgba(143, 131, 255, .35); background: transparent; border-radius: 999px;
  width: 36px; height: 36px; cursor: pointer; font-size: 16px; }
@media (prefers-reduced-motion: reduce) { .breath__orb { transition: none !important; transform: none !important; } }

/* v2: the breathing shortcut beside the message box */
.composer__breathe { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto;
  border: 1px solid rgba(143, 131, 255, .35); background: rgba(143, 131, 255, .08); color: #6c5ce7;
  border-radius: 999px; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.composer__breathe:hover { background: rgba(143, 131, 255, .16); }
.composer__breathe[hidden] { display: none; }

/* v2: breathing — Nasouh puffs up like a balloon and lets the air out */
.breath__orb { position: relative; transition: none; transform-origin: 50% 60%; }
.breath__orb.is-inhale { animation: nasouh-inflate var(--d, 4s) cubic-bezier(.33, 0, .2, 1) forwards; }
.breath__orb.is-hold { animation: nasouh-hold var(--d, 2s) ease-in-out forwards; }
.breath__orb.is-exhale { animation: nasouh-deflate var(--d, 6s) cubic-bezier(.4, 0, .6, 1) forwards; }
@keyframes nasouh-inflate {
  0%   { transform: scale(1, 1); }
  15%  { transform: scale(1.04, .96); }            /* a breath in: squeeze first */
  75%  { transform: scale(1.62, 1.56); }
  88%  { transform: scale(1.56, 1.64); }           /* the balloon wobbles full */
  100% { transform: scale(1.6, 1.6); }
}
@keyframes nasouh-hold {
  0%, 100% { transform: scale(1.6, 1.6); }
  50%      { transform: scale(1.62, 1.58); }
}
@keyframes nasouh-deflate {
  0%   { transform: scale(1.6, 1.6); }
  10%  { transform: scale(1.64, 1.54); }
  85%  { transform: scale(.97, 1.03); }
  100% { transform: scale(1, 1); }
}
.breath__shine { position: absolute; top: 18%; inset-inline-start: 24%; width: 18%; height: 12%;
  border-radius: 50%; background: rgba(255, 255, 255, .55); filter: blur(1px); opacity: 0;
  transform: rotate(-30deg); transition: opacity .8s; pointer-events: none; z-index: 1; }
.breath__orb.is-inhale .breath__shine, .breath__orb.is-hold .breath__shine { opacity: 1; transition-duration: var(--d, 4s); }
@media (prefers-reduced-motion: reduce) {
  .breath__orb.is-inhale, .breath__orb.is-hold, .breath__orb.is-exhale { animation: none; }
  .breath__intake, .breath__mist { display: none; }
}

/* v2: breathing — a soft mist breathed out */
/* the mist: soft breath leaving, like on a cold morning */
.breath__mist { position: absolute; left: 50%; top: 62%; width: 46px; height: 30px; margin: -15px 0 0 -23px;
  border-radius: 50%; background: radial-gradient(ellipse, rgba(255, 255, 255, .95), rgba(200, 192, 255, .55) 50%, transparent 72%);
  filter: blur(4px); opacity: 0; pointer-events: none; z-index: 2; }
.breath:has(.is-exhale) .breath__mist { animation: nasouh-mist 2.1s ease-out infinite; animation-delay: var(--w); }
@keyframes nasouh-mist {
  0%   { opacity: 0;   transform: translate(var(--x), 0) scale(.5); }
  20%  { opacity: .9; }
  100% { opacity: 0;   transform: translate(calc(var(--x) * 2.4), 46px) scale(2.1); }
}

/* v2: breathing — soft air drawn into Nasouh's mouth on the in-breath */
.breath__intake { position: absolute; left: 50%; top: 57%; width: 40px; height: 28px; margin: -14px 0 0 -20px;
  border-radius: 50%; background: radial-gradient(ellipse, rgba(214, 208, 255, .95), rgba(180, 170, 255, .6) 40%, transparent 70%);
  filter: blur(3px); opacity: 0; pointer-events: none; z-index: 2; }
.breath:has(.is-inhale) .breath__intake { animation: nasouh-intake 1.4s ease-in infinite; animation-delay: var(--w); }
@keyframes nasouh-intake {
  0%   { opacity: 0;  transform: translate(var(--sx), var(--sy)) scale(1.4); }
  30%  { opacity: .95; }
  80%  { opacity: .7; }
  100% { opacity: 0;  transform: translate(0, 0) scale(.2); }      /* into the mouth */
}
