/* Mira's conversation stage (coach-stage.js): Skill Trainer, live Speaking Diagnostic, and the try page. */
.cs-stage { --cs-green: #16a34a; --cs-green-ink: #15803d; --cs-green-soft: #e9f8ee; --cs-red: #ef4444; --cs-ink: #0e1116; --cs-mid: #5b6676;
  width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; color: var(--cs-ink); }
.cs-coach { position: relative; display: flex; align-items: flex-start; justify-content: center; }
.cs-avatar { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; background: #e3f2df; box-shadow: 0 0 0 10px rgba(34,197,94,.08); }
.cs-bubble { position: absolute; right: calc(100% - 6px); top: 34px; width: max-content; max-width: 200px; margin: 0; padding: 12px 18px; border-radius: 22px 22px 6px 22px;
  background: #fff; box-shadow: 0 12px 28px -16px rgba(15,40,30,.35); font-size: 15px; font-weight: 500; line-height: 1.35; transform: rotate(-4deg); color: var(--cs-ink); }
.cs-name { margin: 14px 0 18px; font-size: 15px; color: var(--cs-mid); }
.cs-name strong { color: var(--cs-green-ink); font-weight: 700; }
.cs-card { position: relative; display: flex; gap: 20px; align-items: flex-start; width: min(100%, 860px); padding: 30px 40px; border-radius: 32px; background: #fff;
  box-shadow: 0 18px 44px -26px rgba(15,40,30,.35); text-align: left; }
.cs-card::before { content: ""; position: absolute; left: 50%; top: -9px; width: 18px; height: 18px; background: #fff; transform: translateX(-50%) rotate(45deg); }
.cs-card-icon { flex-shrink: 0; width: 56px; height: 52px; display: grid; place-items: center; border-radius: 50% 50% 50% 10%; background: var(--cs-green-soft); color: var(--cs-green); }
.cs-card-icon svg { width: 22px; height: 22px; }
.cs-stage .cs-question { margin: 0; flex: 1; min-width: 0; font-size: clamp(20px, 2.6vw, 32px); font-weight: 800; line-height: 1.3; letter-spacing: -.5px; color: var(--cs-ink); }
.cs-stage.is-thinking .cs-question { color: var(--cs-green-ink); }
/* Mira saying back what she heard (trial interview), above the question in the same card. */
.cs-text { flex: 1; min-width: 0; }
.cs-stage .cs-reflection { margin: 0 0 8px; font-size: clamp(15px, 1.5vw, 18px); font-weight: 500; line-height: 1.45; color: var(--cs-mid); }
.cs-dots { display: inline-flex; gap: 5px; margin-left: 10px; vertical-align: middle; }
.cs-dots i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: cs-dot 1.2s ease-in-out infinite; }
.cs-dots i:nth-child(2) { animation-delay: .15s; } .cs-dots i:nth-child(3) { animation-delay: .3s; }
.cs-stage .cs-hint { margin: 20px 0 0; font-size: 16px; color: var(--cs-mid); }
.cs-mic { display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.cs-wave { display: flex; align-items: center; gap: 6px; height: 56px; }
.cs-wave i { width: 5px; border-radius: 999px; background: #86d9a0; height: calc(10px + 34px * (1 - (var(--i) - 5) * (var(--i) - 5) / 30)); opacity: .55; }
.cs-wave:first-child i { opacity: calc(.2 + var(--i) * .07); } .cs-wave:last-child i { opacity: calc(.9 - var(--i) * .07); }
.cs-stage.is-listening .cs-wave i, .cs-stage.is-speaking .cs-wave i { animation: cs-wave 1s ease-in-out infinite; animation-delay: calc(var(--i) * -.13s); }
.cs-mic-btn { width: 96px; height: 96px; flex-shrink: 0; display: grid; place-items: center; border: 0; border-radius: 50%; color: #fff; cursor: pointer;
  background: linear-gradient(150deg, #f87171, #dc2626); box-shadow: 0 0 0 16px rgba(239,68,68,.12), 0 16px 34px -12px rgba(220,38,38,.6); transition: transform .15s ease, background .2s ease; }
.cs-mic-btn:hover:not(:disabled) { transform: scale(1.04); }
.cs-mic-btn:focus-visible { outline: 3px solid var(--cs-green); outline-offset: 20px; }
.cs-mic-btn:disabled { cursor: default; }
.cs-stage.is-listening .cs-mic-btn { animation: cs-ring 1.6s ease-in-out infinite; }
.cs-stage.is-speaking .cs-mic-btn, .cs-stage.is-thinking .cs-mic-btn, .cs-stage.is-busy .cs-mic-btn { background: linear-gradient(150deg, #4ade80, var(--cs-green)); box-shadow: 0 0 0 16px rgba(34,197,94,.12), 0 16px 34px -12px rgba(34,197,94,.55); }
.cs-stage.is-muted .cs-mic-btn { background: #8a94a3; box-shadow: 0 0 0 16px rgba(138,148,163,.15); }
.cs-stage .cs-label { margin: 22px 0 0; padding: 8px 18px; border-radius: 999px; background: var(--cs-green-soft); color: var(--cs-green-ink); font-size: 16px; font-weight: 600; }
.cs-stage.is-listening .cs-label { background: #fee4e2; color: #b42318; }
.cs-help { margin-top: 18px; }
/* Nudge when nobody has started answering, or the mic hears nothing. */
.cs-stage.is-nudge .cs-hint { color: #b42318; font-weight: 600; }
.cs-stage.is-nudge .cs-mic-btn { animation: cs-ring 1.2s ease-in-out infinite; }
.sd-focus-stage:has(.cs-stage) { width: min(920px, 100%); padding-top: 32px; }
/* Header icon + title/subtitle used by the full-screen views. */
.cs-head-icon { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft, #e9f8ee); color: var(--green, #16a34a); }
.sd-focus-heading.cs-heading strong { font-size: 18px; }
.sr-page .sd-focus-heading.cs-heading p { margin: 0; font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--ink-mid, #5b6676); }
@keyframes cs-wave { 0%, 100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }
@keyframes cs-ring { 0%, 100% { box-shadow: 0 0 0 12px rgba(239,68,68,.14), 0 16px 34px -12px rgba(220,38,38,.6); } 50% { box-shadow: 0 0 0 22px rgba(239,68,68,.08), 0 16px 34px -12px rgba(220,38,38,.6); } }
@keyframes cs-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .cs-stage *, .cs-stage { animation: none !important; } }
@media (max-width: 640px) {
  .cs-avatar { width: 112px; height: 112px; }
  .cs-bubble { position: static; transform: none; margin: 0 0 10px; max-width: none; border-radius: 18px; font-size: 14px; }
  .cs-coach { flex-direction: column; align-items: center; }
  .cs-card { padding: 20px; gap: 14px; border-radius: 24px; }
  .cs-card-icon { width: 40px; height: 38px; }
  .cs-wave { gap: 4px; } .cs-wave i:nth-child(-n+3) { display: none; }
  .cs-mic-btn { width: 80px; height: 80px; }
  .sr-page .sd-focus-heading.cs-heading p { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cs-head-icon { display: none; }
}
/* The try page's card is narrow: stack the bubble above Mira there too. */
.card .cs-coach { flex-direction: column; align-items: center; }
.card .cs-bubble { position: static; transform: none; margin: 0 0 10px; max-width: none; }
.card .cs-avatar { width: 112px; height: 112px; }
.card .cs-card { padding: 18px; gap: 12px; box-shadow: 0 10px 28px -20px rgba(15,40,30,.4); border: 1px solid #e6e9ed; }
.card .cs-card::before { border-left: 1px solid #e6e9ed; border-top: 1px solid #e6e9ed; }
.card .cs-question { font-size: 19px; }
.card .cs-wave i:nth-child(-n+4) { display: none; }
.card .cs-mic-btn { width: 76px; height: 76px; }
