/* Behrad web app. Pi identity: white, black and greys only; functional colour as a ≤6px dot.
   The "AI" feel comes from motion and light, not colour: a living greyscale halo, an oscilloscope line,
   words that surface out of blur, and a shimmer on what is being worked on. */

@font-face { font-family: "Vazirmatn"; src: url("/fonts/Vazirmatn-wght.woff2") format("woff2-variations"), url("/fonts/Vazirmatn-wght.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #FFFFFF;
  --surface: #F5F5F4;
  --ink: #111111;
  --ink-2: #555555;
  --ink-3: #9A9A9A;
  --line: #E5E5E5;
  --fn-normal: #22A06B;
  --font: "Vazirmatn", Tahoma, sans-serif;
  --gutter: 16px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.8 var(--font); -webkit-font-smoothing: antialiased;
  overflow: hidden; overscroll-behavior: none;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, video, canvas { display: block; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.en { font-family: var(--font); direction: ltr; unicode-bidi: isolate; }
.caps { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); line-height: 1.4; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }

/* ---------- ambient light ---------- */

.aura { position: fixed; inset: -20%; z-index: 0; pointer-events: none; filter: blur(60px); opacity: .9; }
.aura i { position: absolute; border-radius: 50%; mix-blend-mode: multiply; }
.aura i:nth-child(1) { width: 70vmax; height: 70vmax; top: -10%; right: -15%; background: radial-gradient(closest-side, #e6e6e3, transparent 70%); animation: drift1 22s ease-in-out infinite alternate; }
.aura i:nth-child(2) { width: 60vmax; height: 60vmax; bottom: -5%; left: -20%; background: radial-gradient(closest-side, #ececea, transparent 70%); animation: drift2 26s ease-in-out infinite alternate; }
.aura i:nth-child(3) { width: 40vmax; height: 40vmax; top: 35%; left: 30%; background: radial-gradient(closest-side, #f0f0ee, transparent 70%); animation: drift3 30s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(-12vmax, 10vmax) scale(1.1); } }
@keyframes drift2 { to { transform: translate(14vmax, -8vmax) scale(.9); } }
@keyframes drift3 { to { transform: translate(-8vmax, -12vmax) scale(1.2); } }
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 56px; padding: 0 30px; border: 1px solid var(--ink); border-radius: 999px;
  font-weight: 500; font-size: 16px; line-height: 1; background: transparent; color: var(--ink);
  transition: transform .25s var(--ease), background-color .3s ease, color .3s ease;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--ink); color: var(--bg); }
.btn--arrow { padding-inline-end: 8px; }
.btn__chip { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); color: var(--ink); transition: transform .35s var(--ease); }
.btn--arrow:hover .btn__chip { transform: translateX(-4px); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 14px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 50%; color: var(--ink); }
.icon-btn svg { fill: currentColor; }
.icon-btn:active { background: rgba(17,17,17,.06); }
.link { border: 0; background: none; padding: 6px 2px; color: var(--ink-2); font-size: 13px; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* ---------- opening (splash) ---------- */

.splash { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: var(--bg); overflow: hidden; pointer-events: auto; }
.splash > * { grid-area: 1 / 1; }
.sp-mark { width: 34px; height: 34px; opacity: 0; }
.sp-burst { position: relative; width: 120px; height: 120px; opacity: 0; transform-origin: 50% 50%; will-change: transform, filter, opacity; }
.sp-g { position: absolute; inset: 0; width: 100%; height: 100%; }
/* A monochrome "chromatic" fringe: two blurred copies pulled apart, and a soft glow under them */
.sp-g--glow { filter: blur(22px); opacity: .5; transform: scale(1.12); }
.sp-g--a { filter: blur(4px); opacity: .55; transform: translate(calc(var(--fr, 0) * -1px), calc(var(--fr, 0) * .3px)); }
.sp-g--b { filter: blur(9px) invert(1) brightness(.62); opacity: .55; mix-blend-mode: multiply; transform: translate(calc(var(--fr, 0) * 1px), calc(var(--fr, 0) * -.4px)); }
.sp-blob {
  position: relative; width: min(118vw, 620px); aspect-ratio: 1; opacity: 0; transform: scale(.3);
  /* liquid silver: a slow conic sheen in greys, a white core so the wordmark stays readable */
  background:
    radial-gradient(closest-side, rgba(255,255,255,.96) 0%, rgba(255,255,255,.7) 38%, rgba(255,255,255,0) 66%),
    conic-gradient(from 20deg, #f4f4f2, #cdcdca, #ffffff, #bfbfbc, #efefed, #d8d8d5, #ffffff, #c6c6c3, #f4f4f2);
  filter: blur(14px) contrast(1.05); border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%;
  -webkit-mask: radial-gradient(closest-side, #000 72%, transparent 100%); mask: radial-gradient(closest-side, #000 72%, transparent 100%);
  animation: blob 5s ease-in-out infinite alternate;
}
.sp-blob::after { content: ""; position: absolute; inset: 6%; border-radius: inherit; box-shadow: inset 0 0 0 2px rgba(255,255,255,.9), inset 0 0 30px rgba(17,17,17,.12); }
@keyframes blob {
  33% { border-radius: 58% 42% 46% 54% / 44% 58% 42% 56%; rotate: 40deg; }
  66% { border-radius: 42% 58% 54% 46% / 58% 46% 54% 42%; rotate: -25deg; }
  100% { border-radius: 52% 48% 40% 60% / 46% 52% 48% 54%; rotate: 70deg; }
}
.sp-ring { width: min(84vw, 420px); aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(17,17,17,.14); opacity: 0; filter: blur(.4px); box-shadow: 0 0 40px rgba(17,17,17,.05) inset; }
.sp-word { display: flex; align-items: center; gap: 2px; font: 700 40px/1 var(--font); letter-spacing: -.01em; color: var(--ink); }
.sp-disc { width: 46px; height: 46px; margin-right: 10px; opacity: 0; transform: scale(.4); }
.sp-l { display: inline-block; opacity: 0; }
.sp-amp { font-weight: 300; color: #3a3a3a; margin: 0 1px; }
.sp-sub { align-self: center; margin-top: 110px; font-size: 13px; color: var(--ink-2); letter-spacing: .02em; opacity: 0; }
.splash.done { pointer-events: none; }

/* the intro's own entrance after the opening */
.intro.pre > * { opacity: 0; }
.intro.enter > * { animation: introIn .9s var(--ease) both; animation-delay: calc(var(--k, 0) * 90ms); }
@keyframes introIn { from { opacity: 0; transform: translateY(16px); filter: blur(8px); } }

/* ---------- intro ---------- */

.intro {
  position: relative; z-index: 2; height: 100%; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--safe-t) + 14px) var(--gutter) calc(var(--safe-b) + 20px);
  transition: opacity .5s ease, transform .6s var(--ease), filter .6s ease;
  scrollbar-width: none;
}
.intro::-webkit-scrollbar { display: none; }
.intro.leaving { opacity: 0; transform: scale(1.04); filter: blur(8px); pointer-events: none; }
.intro__top { width: 100%; max-width: 440px; display: flex; align-items: center; justify-content: space-between; }
.logo { height: 26px; width: auto; }

.hero { position: relative; width: min(72vw, 290px, 36vh); aspect-ratio: 1; margin: clamp(14px, 4vh, 40px) 0 4px; display: grid; place-items: center; }
.halo { position: absolute; pointer-events: none; }
.halo--hero { inset: -22%; width: 144%; height: 144%; }
.hero__ring {
  position: absolute; inset: 9%; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(17,17,17,0), rgba(17,17,17,.55), rgba(17,17,17,0) 30%, rgba(17,17,17,0) 60%, rgba(17,17,17,.35), rgba(17,17,17,0) 90%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1px));
  animation: spin 9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hero__portrait {
  position: relative; width: 78%; height: 78%; border-radius: 50%; object-fit: cover; object-position: 50% 20%;
  filter: saturate(.85) contrast(1.02); animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: scale(1.015); } }
.hero__tag {
  position: absolute; bottom: 10%; inset-inline-start: 8%;
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 14px; border-radius: 999px;
  background: rgba(255,255,255,.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(17,17,17,.08); font-size: 12px; font-weight: 500; line-height: 1;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--fn-normal); flex: none; position: relative; }
.dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--fn-normal); opacity: 0; animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(.4); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

.intro__copy { text-align: center; max-width: 360px; }
.intro__copy .caps { margin-top: 6px; }
h1 { margin: 0; font-size: clamp(36px, 5.5vh, 46px); line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
.shine {
  background: linear-gradient(100deg, var(--ink) 0%, var(--ink) 40%, #8a8a8a 50%, var(--ink) 60%, var(--ink) 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 5s ease-in-out infinite;
}
@keyframes shine { 0% { background-position: 100% 0; } 60%, 100% { background-position: -50% 0; } }
.lede { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.9; }

.steps { list-style: none; margin: clamp(12px, 2.4vh, 22px) 0 0; padding: 0; width: 100%; max-width: 400px; display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.steps li { padding: 12px 8px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; line-height: 1.6; color: var(--ink-2); }
.steps li + li { border-inline-start: 1px solid var(--line); }
.steps b { font-weight: 600; color: var(--ink); font-size: 14px; }

.intro__cta { margin-top: auto; padding-top: 22px; width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
.intro__cta .btn { width: 100%; justify-content: space-between; padding-inline-start: 28px; }
.fine { margin: 0; text-align: center; font-size: 11.5px; line-height: 1.9; color: var(--ink-3); }

/* ---------- chat shell ---------- */

.chat { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; animation: rise .6s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }

.bar {
  position: relative; flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--safe-t) + 10px) 10px 12px var(--gutter);
  background: rgba(255,255,255,.7); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid rgba(17,17,17,.06); z-index: 3;
}
.who { display: flex; align-items: center; gap: 12px; }
.ava { position: relative; width: 48px; height: 48px; flex: none; display: grid; place-items: center; }
.ava img { position: relative; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.halo--mini { inset: -18px; width: 84px; height: 84px; }
.who__text { display: flex; flex-direction: column; line-height: 1.35; }
.who__text b { font-weight: 600; font-size: 16px; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); }
.status.busy .dot { background: var(--ink); }
.status.busy .dot::after { border-color: var(--ink); }
.status.busy #statusText { background: linear-gradient(90deg, var(--ink-2) 0%, var(--ink-2) 35%, #cfcfcf 50%, var(--ink-2) 65%, var(--ink-2) 100%); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 1.8s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.scope { position: absolute; left: 0; right: 0; bottom: -14px; width: 100%; height: 28px; pointer-events: none;
  -webkit-mask: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }

.menu {
  position: absolute; top: calc(var(--safe-t) + 64px); inset-inline-end: 12px; z-index: 5; min-width: 220px; padding: 6px;
  background: rgba(255,255,255,.92); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; animation: pop .25s var(--ease);
}
.menu button { text-align: start; border: 0; background: none; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.menu button:active { background: var(--surface); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }

.log {
  flex: 1; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth;
  padding: 28px var(--gutter) 24px; display: flex; flex-direction: column; gap: 18px;
}
.log > * { max-width: 560px; width: 100%; margin-inline: auto; }

/* Behrad: text on the page, a thin rule on the reading side (the catalogue voice) */
.b { position: relative; padding-inline-start: 16px; animation: msgIn .55s var(--ease) both; }
.b::before { content: ""; position: absolute; inset-inline-start: 0; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(var(--ink), rgba(17,17,17,.15)); transform-origin: top; animation: rule .7s var(--ease) both; }
@keyframes rule { from { transform: scaleY(0); } }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }
.b__text { white-space: pre-line; font-size: 15.5px; line-height: 1.95; overflow-wrap: anywhere; }
.b__text i, .b__text em { font-style: normal; color: var(--ink-2); }
.b__text b, .b__text strong { font-weight: 600; }
.b__text a { color: var(--ink); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.w { display: inline; animation: word .6s var(--ease) both; animation-delay: calc(var(--i) * 28ms); }
@keyframes word { from { opacity: 0; filter: blur(6px); } }
.cmd { border: 0; background: var(--surface); border-radius: 999px; padding: 0 10px; font-size: .9em; font-weight: 500; }

/* functional colour, as the brand allows it: a 6px dot */
.fn-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-inline-end: 8px; vertical-align: middle; position: relative; top: -1px; }
.fn-dot--ok { background: var(--fn-normal); }
.fn-dot--warn { background: #F5C400; }

/* keyboard chips */
.kb { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.kb button, .kb a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid rgba(17,17,17,.2); background: rgba(255,255,255,.7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-size: 14px; font-weight: 500; line-height: 1.4; text-decoration: none; color: var(--ink); text-align: start;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .2s var(--ease);
  animation: msgIn .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms + 120ms);
}
.kb button:active, .kb a:active { transform: scale(.97); }
.kb .on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.kb .on::before { content: ""; width: 12px; height: 7px; border-left: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg) translate(1px, -2px); }
.kb .primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.kb .ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.kb a::after { content: "↖"; font-size: 13px; opacity: .6; }
.kb.used { opacity: .45; pointer-events: none; }
.kb.used .picked { opacity: 1; }

/* voice */
.voice { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.play {
  position: relative; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--ink); background: var(--bg);
  display: grid; place-items: center; color: var(--ink); transition: background-color .25s ease, color .25s ease;
}
.play svg { fill: currentColor; }
.play .i-pause, .playing .play .i-play { display: none; }
.playing .play .i-pause { display: block; }
.playing .play { background: var(--ink); color: var(--bg); }
.playing .play::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(17,17,17,.25); animation: ping 1.6s var(--ease) infinite; }
.wave { height: 34px; width: 100%; cursor: pointer; touch-action: none; }
.dur { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 32px; text-align: end; }
.cap { margin-top: 10px; white-space: pre-line; font-size: 15.5px; line-height: 1.95; }
.cap .k { color: var(--ink-3); transition: color .25s ease; }
.cap .k.said { color: var(--ink); }
.voice-only .cap .k { color: var(--ink); }

/* video */
.vid { position: relative; border-radius: 4px; overflow: hidden; background: var(--surface); max-width: 320px; }
.vid video { width: 100%; height: auto; }
.vid__sound {
  position: absolute; bottom: 10px; inset-inline-end: 10px; border: 0; border-radius: 999px; padding: 6px 12px; font-size: 12px;
  background: rgba(255,255,255,.85); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}

/* the user */
/* The user's replies sit on the end side (left), Behrad's voice runs from the start side like the page text. */
.u { display: flex; justify-content: flex-end; animation: uIn .4s var(--ease) both; }
@keyframes uIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.u__bubble { max-width: 82%; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 20px 20px 20px 6px; font-size: 15px; line-height: 1.85; white-space: pre-line; overflow-wrap: anywhere; }
.u__bubble.voice { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; min-width: 210px; padding: 8px 10px 8px 14px; }
.u__bubble .play { width: 36px; height: 36px; border-color: var(--bg); background: transparent; color: var(--bg); }
.u__bubble.playing .play { background: var(--bg); color: var(--ink); }
.u__bubble .dur { color: rgba(255,255,255,.6); }
.u__bubble .wave { height: 28px; }

/* thinking */
.think { display: flex; align-items: center; gap: 12px; padding-inline-start: 16px; color: var(--ink-2); font-size: 14px; animation: msgIn .4s var(--ease) both; }
.think__orb { position: relative; width: 22px; height: 22px; flex: none; }
.think__orb::before, .think__orb::after { content: ""; position: absolute; inset: 0; border-radius: 50%; }
.think__orb::before { background: conic-gradient(from 0deg, rgba(17,17,17,0), var(--ink), rgba(17,17,17,0) 70%); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px)); animation: spin 1s linear infinite; }
.think__orb::after { inset: 6px; background: var(--ink); animation: core 1.4s ease-in-out infinite; }
@keyframes core { 50% { transform: scale(.55); opacity: .5; } }
.think__text { background: linear-gradient(90deg, var(--ink-2) 0%, var(--ink-2) 35%, #d4d4d4 50%, var(--ink-2) 65%, var(--ink-2) 100%); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 1.8s linear infinite; }

.gone { animation: out .35s ease both; }
@keyframes out { to { opacity: 0; transform: translateY(-4px); filter: blur(4px); } }
.sys { text-align: center; font-size: 12px; color: var(--ink-3); }

/* ---------- composer ---------- */

.composer {
  flex: none; position: relative; padding: 10px var(--gutter) calc(var(--safe-b) + 12px);
  background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.92) 22%);
}
.cmp { max-width: 560px; margin-inline: auto; display: flex; align-items: flex-end; gap: 10px; }
.field {
  flex: 1; display: flex; align-items: center; min-height: 56px; padding: 8px 18px; border-radius: 28px;
  background: rgba(255,255,255,.8); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid rgba(17,17,17,.14); transition: border-color .25s ease;
}
.field:focus-within { border-color: var(--ink); }
.field textarea, .field input { flex: 1; width: 100%; border: 0; outline: 0; background: transparent; resize: none; font-size: 16px; line-height: 1.7; max-height: 132px; padding: 0; }
.field textarea::placeholder, .field input::placeholder { color: var(--ink-3); }
.field--phone input { letter-spacing: .06em; text-align: left; }
.cmp--phone { flex-wrap: wrap; align-items: center; }
.cmp--phone .field { flex-basis: 100%; }
.cmp--phone .btn { flex: 1; }

.mic {
  position: relative; flex: none; width: 56px; height: 56px; border-radius: 50%; border: 0;
  background: var(--ink); color: var(--bg); display: grid; place-items: center; transition: transform .25s var(--ease);
}
.mic:active { transform: scale(.94); }
.mic:disabled { background: #c9c9c9; }
.mic svg { position: relative; transition: opacity .2s ease, transform .3s var(--ease); }
.mic .i-send { position: absolute; opacity: 0; transform: scale(.6); }
.mic.has-text .i-mic { opacity: 0; transform: scale(.6); }
.mic.has-text .i-send { opacity: 1; transform: none; }
.mic__glow { position: absolute; inset: -10px; border-radius: 50%; background: radial-gradient(closest-side, rgba(17,17,17,.22), transparent); opacity: 0; transform: scale(var(--lv, 1)); transition: opacity .3s ease; }
.mic--send .mic__glow { opacity: 1; }

.cmp--rec { align-items: center; }
.rec { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 16px; border-radius: 28px; background: var(--surface); }
.rec__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); animation: core 1s ease-in-out infinite; }
.rec__wave { flex: 1; height: 36px; width: 100%; }
.rec__time { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ink-2); min-width: 34px; }
.cmp__hint { max-width: 560px; margin: 8px auto 0; text-align: center; font-size: 12px; color: var(--ink-3); }

.toast {
  position: fixed; z-index: 10; left: 50%; bottom: calc(var(--safe-b) + 96px); transform: translateX(-50%);
  max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 12px; background: var(--ink); color: var(--bg);
  font-size: 13px; line-height: 1.7; animation: pop .25s var(--ease);
}

@media (min-width: 720px) {
  .chat { max-width: 720px; margin-inline: auto; border-inline: 1px solid rgba(17,17,17,.06); background: rgba(255,255,255,.5); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
