/* ===========================================================================
   Voice Lab — call page.

   Built from design_handoff_voice_agent. The handoff is high fidelity, so the
   numbers here are its numbers: colours, type, spacing and motion are copied
   rather than approximated. Agent and user colours live as rgb triples in
   custom properties so the canvas layers and the DOM stay in step.
   =========================================================================== */

:root {
  --bg:        #08080a;
  --ink:       #f3efe8;
  --ink-78:    rgba(243, 239, 232, 0.78);
  --ink-62:    rgba(243, 239, 232, 0.62);
  --ink-55:    rgba(243, 239, 232, 0.55);
  --ink-50:    rgba(243, 239, 232, 0.50);
  --ink-40:    rgba(243, 239, 232, 0.40);
  --hair:      rgba(243, 239, 232, 0.14);
  --hair-soft: rgba(243, 239, 232, 0.06);

  /* Ember palette. */
  --agent: 255, 146, 86;
  --user:   92, 212, 228;
  --danger: #e8553f;

  /* The live status colour, set per phase from JS. */
  --status: 255, 146, 86;

  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --serif: 'Newsreader', 'Noto Serif Tamil', 'Noto Serif Devanagari', serif;
  --sans: 'Instrument Sans', 'Noto Sans Tamil', 'Noto Sans Devanagari', ui-sans-serif, system-ui, sans-serif;

  --spring: cubic-bezier(0.3, 1.4, 0.5, 1);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html, body { margin: 0; padding: 0; background: var(--bg); }

body {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button { font: inherit; color: inherit; border: 0; background: none; }

h1, h2 { margin: 0; }
p { margin: 0; }

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

.is-hidden { display: none !important; }

.mono-10 { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; color: var(--ink-50); }
.mono-11 { font-family: var(--mono); font-size: 11px; color: rgba(243, 239, 232, 0.6); }

/* --------------------------------------------------------------- the stage */

.stage {
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 700px;
  overflow: hidden;
  background: var(--bg);
}

.layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.layer-bot { z-index: 1; }

/* ------------------------------------------------------------------ header */

.head {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 28px;
  z-index: 6;
}

.brand {
  display: flex; align-items: center; gap: 12px;
  color: inherit; text-decoration: none;
  transition: opacity 0.25s ease;
}

.brand:hover { opacity: 0.78; }

/* The way back to the site. Hidden on narrow screens, where the header has to
   fit the status pill first. */
.brand-back {
  font-family: var(--mono, 'IBM Plex Mono', monospace);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(243, 239, 232, 0.5);
  padding-left: 12px;
  border-left: 1px solid var(--hair);
}

@media (max-width: 760px) { .brand-back { display: none; } }

.brand-ring {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
}

.brand-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }

.brand-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }

.status-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--hair);
  background: rgba(8, 8, 10, 0.45);
  backdrop-filter: blur(12px);
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgb(var(--status));
  box-shadow: 0 0 12px rgb(var(--status));
  transition: background 0.4s, box-shadow 0.4s;
}

.head-name { font-size: 14px; font-weight: 500; }
.head-role { font-size: 14px; color: var(--ink-62); }

.head-end { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.chip-btn {
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--hair);
  background: rgba(8, 8, 10, 0.45);
  backdrop-filter: blur(12px);
  font-size: 13px;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ------------------------------------------------------- remembered chips */

.facts-row {
  position: absolute;
  left: 0; right: 0; top: 72px;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  z-index: 4;
  pointer-events: none;
}

.facts-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-50);
  align-self: center;
}

.facts-list { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }

.fact {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(var(--agent), 0.3);
  background: rgba(var(--agent), 0.1);
  backdrop-filter: blur(12px);
  animation: fact-in 0.8s var(--ease) both;
  transition: all 0.8s var(--ease);
}

.fact.is-fresh { border-color: rgba(var(--agent), 0.7); background: rgba(var(--agent), 0.2); }

.fact-dot { width: 5px; height: 5px; border-radius: 50%; background: rgb(var(--agent)); }
.fact-k { font-size: 12px; color: var(--ink-55); }
.fact-v { font-size: 13px; color: var(--ink); }

@keyframes fact-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.94); }
  to   { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------- views */

.view { display: none; }
.view.is-active { display: block; }

/* ------------------------------------------------------------------- idle */

.idle-top {
  position: absolute;
  left: 0; right: 0; top: 9%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  padding: 0 24px;
  z-index: 3;
}

.picker-group { display: flex; flex-direction: column; align-items: center; gap: 12px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(243, 239, 232, 0.6);
}

.picker {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(243, 239, 232, 0.12);
  background: rgba(14, 13, 15, 0.6);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.persona {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 20px 7px 7px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  transform: scale(0.96);
  transition: all 0.45s var(--spring);
}

.persona:hover { border-color: rgba(243, 239, 232, 0.4); }

.persona.is-on {
  border-color: rgba(var(--agent), 0.7);
  background: rgba(243, 239, 232, 0.08);
  box-shadow: 0 0 30px rgba(var(--agent), 0.25);
  transform: scale(1);
}

.persona-orb {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  gap: 5px;
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.25), 0 0 0 3px transparent;
  transition: box-shadow 0.45s;
}

.persona.is-on .persona-orb {
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.25), 0 0 0 3px rgba(var(--agent), 0.35);
}

.persona-orb.is-f { background: radial-gradient(circle at 35% 30%, #fff 0%, #f1ece4 45%, #b9ad9c 100%); }
.persona-orb.is-m { background: radial-gradient(circle at 35% 30%, #aebbc9 0%, #565d68 50%, #2b3038 100%); }

.persona-eye { border-radius: 3px; background: rgb(var(--agent)); }
.persona-orb.is-f .persona-eye { width: 5px; height: 10px; }
.persona-orb.is-m .persona-eye { width: 9px; height: 5px; }

.persona-text { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.persona-name { font-size: 15px; font-weight: 600; color: var(--ink-62); transition: color 0.3s; }
.persona.is-on .persona-name { color: var(--ink); }
.persona-desc { font-size: 12px; color: var(--ink-55); }

.headline {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  pointer-events: none;
}

.headline em { font-style: italic; }

.bubble {
  position: absolute;
  left: calc(50% + clamp(84px, 10vh, 120px));
  top: 37%;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px) scale(0.92);
  transform-origin: 0% 100%;
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.bubble.is-on { opacity: 1; transform: none; }

.bubble-text {
  padding: 12px 16px;
  border-radius: 18px 18px 18px 4px;
  background: var(--ink);
  color: var(--bg);
  font-size: 15px;
  line-height: 1.35;
  max-width: 220px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.idle-bottom {
  position: absolute;
  left: 0; right: 0; bottom: 6%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  text-align: center;
  z-index: 2;
}

.hero-text {
  max-width: 520px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-78);
  text-wrap: pretty;
  text-shadow: 0 2px 20px var(--bg);
}

.start-btn {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 26px 10px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 0 0 8px rgba(243, 239, 232, 0.06), 0 0 80px rgba(255, 150, 90, 0.3);
  transition: transform 0.3s var(--ease);
}

.start-btn:hover { transform: scale(1.04); }
.start-btn:disabled { opacity: 0.6; cursor: progress; transform: none; }

.start-mic {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
}

/* ---------------------------------------------------------------- in call */

.caption-block {
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  bottom: 188px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
  text-shadow: 0 2px 24px var(--bg), 0 0 2px var(--bg);
}

.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgb(var(--status));
  transition: color 0.4s;
}

.status-line .status-dot { width: 6px; height: 6px; box-shadow: none; }

.caption {
  max-width: 860px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 0.26em;
  row-gap: 0.06em;
  text-align: center;
}

.caption.is-agent {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(22px, 2.5vw, 38px);
  line-height: 1.18;
  letter-spacing: -0.015em;
}

.caption.is-user {
  max-width: 800px;
  font-size: clamp(20px, 2.1vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: rgb(var(--user));
}

.word {
  display: inline-block;
  opacity: 0.14;
  filter: blur(6px);
  transform: translateY(10px);
  transition: opacity 0.5s ease, filter 0.5s ease, transform 0.7s var(--ease);
}

.caption.is-user .word { transition: opacity 0.35s ease, filter 0.35s ease, transform 0.5s var(--ease); }

.word.is-on { opacity: 1; filter: none; transform: none; }

.prompts {
  position: absolute;
  left: 0; right: 0; bottom: 92px;
  display: flex;
  justify-content: center;
  padding: 0 24px;
  z-index: 3;
  pointer-events: none;
}

.prompt-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 720px;
}

/* Read-aloud suggestions: things to say, not buttons to press. */
.prompt {
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid rgba(243, 239, 232, 0.16);
  background: rgba(8, 8, 10, 0.4);
  color: var(--ink-78);
  font-size: 13.5px;
  backdrop-filter: blur(12px);
  transition: all 0.35s;
}

.prompt.is-dim { opacity: 0.4; }

.prompt.is-live {
  border-color: rgba(var(--agent), 0.8);
  background: rgba(var(--agent), 0.16);
  color: var(--ink);
  opacity: 1;
}

.dock {
  position: absolute;
  left: 0; right: 0; bottom: 24px;
  display: flex;
  justify-content: center;
  padding: 0 24px;
  z-index: 3;
  pointer-events: none;
}

.dock-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--hair);
  background: rgba(8, 8, 10, 0.6);
  backdrop-filter: blur(16px);
  pointer-events: auto;
}

.mute-btn {
  cursor: pointer;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(243, 239, 232, 0.16);
  background: transparent;
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s;
}

.mute-btn .ic-off { display: none; }
.mute-btn[aria-pressed="true"] { background: rgba(var(--agent), 0.9); color: var(--bg); }
.mute-btn[aria-pressed="true"] .ic-on { display: none; }
.mute-btn[aria-pressed="true"] .ic-off { display: block; }

.clock-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  font-family: var(--mono);
}

.clock { font-size: 17px; font-weight: 500; }
.mic-note { font-size: 10px; color: var(--ink-50); letter-spacing: 0.08em; }

.end-btn {
  cursor: pointer;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.25s;
}

.end-btn:hover { transform: scale(1.04); }

/* ------------------------------------------------------------------ ended */

#view-ended.is-active {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 44px;
  padding: 44vh 24px 24px;
  text-align: center;
  z-index: 2;
}

.end-head { display: flex; flex-direction: column; align-items: center; gap: 20px; }

.end-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(38px, 4.6vw, 66px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}

.end-title em { font-style: italic; }

.summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  border-top: 1px solid rgba(243, 239, 232, 0.1);
  border-bottom: 1px solid rgba(243, 239, 232, 0.1);
  font-family: var(--mono);
}

.summary > div { display: flex; flex-direction: column; gap: 10px; padding: 22px 40px; }
.summary dt { order: 2; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-55); }
.summary dd { order: 1; margin: 0; font-size: 26px; color: var(--ink); }

.again-btn {
  cursor: pointer;
  padding: 15px 30px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.25s;
}

.again-btn:hover { transform: scale(1.04); }

/* The way out. A visitor who has finished the call should not have to hunt for
   the small link in the header, so the ended screen offers it beside Talk
   again, weighted as the secondary of the two. */
.end-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 26px;
  border-radius: 999px;
  border: 1px solid var(--hair);
  background: rgba(8, 8, 10, 0.5);
  backdrop-filter: blur(12px);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease,
              color 0.25s ease;
}

.back-link:hover {
  border-color: rgba(243, 239, 232, 0.4);
  background: rgba(243, 239, 232, 0.08);
  transform: scale(1.03);
  color: var(--ink);
}

/* On the idle screen the same link sits under a cream Start button, so it is
   quieter: visible without competing with the one thing a visitor came to do. */
.back-link--quiet {
  padding: 11px 20px;
  font-size: 14px;
  border-color: transparent;
  background: transparent;
  backdrop-filter: none;
  color: var(--ink-62);
}

.back-link--quiet:hover {
  border-color: var(--hair);
  background: rgba(243, 239, 232, 0.06);
  color: var(--ink);
}

/* -------------------------------------------------------- transcript panel */

.panel {
  position: absolute;
  top: 80px; right: 20px; bottom: 20px;
  width: min(340px, calc(100% - 40px));
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  border: 1px solid transparent;
  background:
    linear-gradient(rgba(13, 12, 15, 0.78), rgba(13, 12, 15, 0.78)) padding-box,
    linear-gradient(160deg, rgba(var(--agent), 0.45), rgba(243, 239, 232, 0.06) 40%,
                    rgba(243, 239, 232, 0.04) 60%, rgba(var(--user), 0.35)) border-box;
  backdrop-filter: blur(26px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  z-index: 5;
  overflow: hidden;
}

.panel-head {
  position: relative;
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-bottom: 1px solid var(--hair-soft);
}

.panel-glow {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 120px;
  background:
    radial-gradient(80% 100% at 20% 0%, rgba(var(--agent), 0.18), transparent 70%),
    radial-gradient(60% 100% at 100% 0%, rgba(var(--user), 0.14), transparent 70%);
  pointer-events: none;
}

.panel-top { position: relative; display: flex; justify-content: space-between; align-items: center; }
.panel-id { display: flex; align-items: center; gap: 10px; }

.panel-orb {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, rgb(var(--agent)) 45%, #3a1a0c 100%);
  box-shadow: 0 0 18px rgba(var(--agent), 0.45);
}

.panel-titles { display: flex; flex-direction: column; gap: 1px; }
.panel-title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }

.panel-actions { display: flex; align-items: center; gap: 8px; }

.panel-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(243, 239, 232, 0.06);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: rgb(var(--status));
}

.panel-status .status-dot { width: 6px; height: 6px; }

.panel-close { cursor: pointer; font-size: 13px; color: rgba(243, 239, 232, 0.7); }

.panel-facts { position: relative; display: flex; flex-direction: column; gap: 8px; }
.panel-facts-label { text-transform: uppercase; }
.panel-facts-list { display: flex; flex-wrap: wrap; gap: 6px; }

.panel-facts-list .fact { padding: 5px 10px; backdrop-filter: none; }
.panel-facts-list .fact-dot { display: none; }
.panel-facts-list .fact-k { font-size: 11.5px; }
.panel-facts-list .fact-v { font-size: 12.5px; }

.turns {
  flex: 1;
  overflow-y: auto;
  padding: 20px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  scrollbar-width: thin;
  scrollbar-color: var(--hair) transparent;
  overscroll-behavior: contain;
  mask-image: linear-gradient(to bottom, transparent 0, #000 18px, #000 calc(100% - 24px), transparent 100%);
}

.turns-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 10px;
  text-align: center;
}

.turns-empty > span {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px dashed rgba(243, 239, 232, 0.25);
}

.turns-empty p { font-size: 13.5px; line-height: 1.5; color: var(--ink-50); max-width: 220px; }

.turn-agent { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; }

.turn-orb {
  width: 22px; height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, rgb(var(--agent)) 45%, #3a1a0c 100%);
}

.turn-live .turn-orb { box-shadow: 0 0 0 4px rgba(var(--agent), 0.18), 0 0 18px rgba(var(--agent), 0.45); }

.turn-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.turn-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.turn-who { font-weight: 600; color: var(--ink); }
.turn-time { font-family: var(--mono); font-size: 10.5px; color: var(--ink-40); }

.turn-state { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; color: rgb(var(--agent)); }

.turn-cut {
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(var(--agent), 0.45);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(var(--agent));
}

.turn-text {
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.45;
  color: rgba(243, 239, 232, 0.94);
  text-wrap: pretty;
}

.caret {
  display: inline-block;
  width: 2px; height: 1em;
  margin-left: 3px;
  vertical-align: -2px;
  background: rgb(var(--agent));
  animation: caret 1s steps(2) infinite;
}

@keyframes caret { 50% { opacity: 0; } }

.turn-user { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.turn-user .turn-meta { justify-content: flex-end; }
.turn-user .turn-who { color: rgb(var(--user)); }
.turn-user .turn-state { color: rgb(var(--user)); }

.turn-bubble {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 16px 16px 4px 16px;
  background: linear-gradient(135deg, rgba(var(--user), 0.2), rgba(var(--user), 0.07));
  border: 1px solid rgba(var(--user), 0.35);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  text-wrap: pretty;
}

.turn-live .turn-bubble { border-style: dashed; background: rgba(var(--user), 0.07); }

.turn-thinking { display: flex; align-items: center; gap: 12px; }

.turn-thinking > span:first-child {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(243, 239, 232, 0.35);
  box-shadow: 0 0 14px rgba(255, 246, 234, 0.35);
}

.turn-thinking > span:last-child {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(243, 239, 232, 0.6);
}

/* ---------------------------------------------------------- narrow screens */

@media (max-width: 1099px) {
  .panel { top: 72px; }
  .facts-row { top: 64px; }
}

@media (max-width: 720px) {
  .head { padding: 16px 18px; }
  .head-role { display: none; }
  .bubble { display: none; }
  .caption-block { bottom: 172px; }
  .prompts { bottom: 86px; }
  .prompt-list { max-width: 100%; }
  #view-ended.is-active { padding-top: 52vh; }
  .summary > div { padding: 18px 24px; }
}

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