/**
 * Styles for the browser voice dock and its sheets only.
 *
 * Every selector is a `.voice-*` class or lives inside one, so this file cannot
 * reach the existing page. The visual values are lifted from
 * `docs/webapp-implementation/design-preview.html` — warm glass, ink backing,
 * champagne and gold — while the character names, sizes and gutters match
 * `landing/src/index.css` and `App.css` (ink #0b0906, cream #f3ece1, gold
 * #c9a227, Cormorant Garamond / Inter).
 *
 * There is deliberately no orb, no waveform, no speaking meter and no chat
 * bubble here: nothing in this file animates in response to a timer.
 */

.voice-dock,
.voice-sheet,
.voice-panel,
.endscreen {
  --voice-ink: #0b0906;
  --voice-cream: #f3ece1;
  --voice-gold: #c9a227;
  --voice-line: rgba(243, 236, 225, 0.18);
  --voice-panel-edge: rgba(187, 166, 128, 0.4);
  --voice-serif: "Cormorant Garamond", Georgia, serif;
  --voice-sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}

.voice-dock *,
.voice-sheet *,
.voice-panel *,
.endscreen * {
  box-sizing: border-box;
}

/* ------------------------------------------------------------------- dock */

/*
 * Fixed, not absolute.
 *
 * An absolutely positioned dock resolves against the nearest positioned
 * ancestor, and the element this mounts inside — `.hero__lede`, the headline
 * and one line of copy — is `position: absolute` and about 115px tall on a
 * phone. The dock and every sheet were therefore laid out inside a 327x115 box
 * in the middle of the portrait: the live dock came out as a 279x44 sliver and
 * an error panel as a two-line window with its own scrollbar. That is the
 * "error window is tiny" a visitor reported, measured in a real browser at
 * 375x812 (`.voice-sheet` 327x115, containing block `.hero__lede`).
 *
 * The viewport is the stage this design describes — "lower dock inside 24px
 * gutters", 180-220px of content, sheets with bounded internal scroll — and it
 * is also the only containing block that does not move when the page behind a
 * live call is scrolled. No ancestor carries a transform, filter or containment
 * that would redefine it (checked in the browser, not assumed).
 */
.voice-dock {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 64px);
  z-index: 3;
  max-width: 432px;
  margin: 0 auto;
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--voice-panel-edge);
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(61, 51, 39, 0.79), rgba(16, 14, 10, 0.93));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.19),
    0 15px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  font-family: var(--voice-sans);
  color: var(--voice-cream);
  text-align: left;
  animation: voice-rise 0.28s ease both;
}

.voice-dock[data-state='ready'] {
  border-color: rgba(187, 166, 128, 0.24);
  background: linear-gradient(155deg, rgba(61, 51, 39, 0.55), rgba(16, 14, 10, 0.72));
}

.voice-dock__eyebrow,
.voice-eyebrow {
  margin: 0;
  font-family: var(--voice-sans);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #d5bc83;
}

.voice-dock__name {
  margin: 2px 0 0;
  font-family: var(--voice-serif);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.14;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 1px 2px rgba(11, 9, 6, 0.8);
  overflow-wrap: break-word;
}

/* The status text is longer than a name when muted, so it gets its own size. */
.voice-dock__name[aria-hidden='true'] {
  font-size: 24px;
}

.voice-status {
  margin: 0;
  font-family: var(--voice-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.01em;
  color: var(--voice-cream);
}

.voice-detail {
  margin: 0;
  font-size: 12px;
  font-weight: 300;
  line-height: 1.55;
  color: #cfc1aa;
}

/* Confirmed session duration. The label is attached, so this can never read as
   an allowance or a countdown. */
.voice-elapsed {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: #cbbda6;
}

.voice-elapsed-value {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.voice-elapsed-label {
  font-size: 11px;
  letter-spacing: 0.02em;
  color: #b9ab94;
}

.voice-budget {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #ead3a2;
}

/* ---------------------------------------------------------------- actions */

.voice-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.voice-actions--stack {
  flex-direction: column;
  align-items: stretch;
}

.voice-btn {
  min-height: 48px;
  padding: 10px 18px;
  font-family: var(--voice-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--voice-cream);
  border: 1px solid rgba(215, 197, 164, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.voice-btn--control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex: 1 1 auto;
  min-width: 44px;
}

.voice-btn--wide {
  width: 100%;
}

.voice-icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.voice-btn--primary {
  color: #3a2a12;
  font-weight: 600;
  border-color: rgba(255, 244, 215, 0.6);
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0) 62%),
    linear-gradient(90deg, #f3e2b5 0%, #e5c98a 45%, #d3ab5e 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 8px 24px rgba(0, 0, 0, 0.32);
}

.voice-btn--primary:hover {
  filter: brightness(1.04);
}

.voice-btn--glass {
  border-color: rgba(255, 255, 255, 0.42);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
  backdrop-filter: blur(18px) saturate(1.4) brightness(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.4) brightness(1.25);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 8px 24px rgba(0, 0, 0, 0.3);
}

.voice-btn--quiet {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(215, 197, 164, 0.35);
}

.voice-btn--end {
  color: #ffe4db;
  border-color: rgba(224, 163, 141, 0.5);
  background: #4c302b;
}

.voice-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
}

.voice-btn--primary:hover:not(:disabled) {
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0.45) 50%, rgba(255, 255, 255, 0) 62%),
    linear-gradient(90deg, #f3e2b5 0%, #e5c98a 45%, #d3ab5e 100%);
}

.voice-btn--end:hover:not(:disabled) {
  background: #5c3a34;
}

.voice-btn:active:not(:disabled) {
  transform: scale(0.99);
}

.voice-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.voice-link {
  min-height: 44px;
  padding: 8px 2px;
  align-self: flex-start;
  font-family: var(--voice-sans);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  color: var(--voice-cream);
  background: transparent;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.voice-actions--stack .voice-link {
  align-self: stretch;
}

/* Focus is always visible and always at least 3:1 against the panel. */
.voice-btn:focus-visible,
.voice-link:focus-visible,
.voice-panel__close:focus-visible,
.voice-check input:focus-visible,
.voice-field input:focus-visible {
  outline: 2px solid #f3e2b5;
  outline-offset: 3px;
}

/* ----------------------------------------------------------------- sheets */

.voice-sheet {
  /* Same containing-block bug as the dock, and the same fix: a consent or error
     sheet belongs over the scene, not inside the lede's box. */
  position: fixed;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  animation: voice-fade 0.2s ease both;
}

.voice-sheet__scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 55% at 50% 100%, rgba(11, 9, 6, 0.72), rgba(11, 9, 6, 0.38) 70%),
    rgba(11, 9, 6, 0.42);
  pointer-events: none;
}

.voice-panel {
  position: relative;
  max-height: calc(100% - 80px);
  /* Centred with the dock's gutters, and never wider than the dock: the sheet
     is the viewport now, so without this the panel would stretch across a
     desktop window. */
  width: min(432px, calc(100% - 48px));
  margin: 0 auto calc(env(safe-area-inset-bottom, 0px) + 20px);
  padding: 22px 22px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--voice-panel-edge);
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(61, 51, 39, 0.93), rgba(16, 14, 10, 0.95));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.19),
    0 15px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  font-family: var(--voice-sans);
  color: var(--voice-cream);
  animation: voice-rise 0.24s ease both;
}

.voice-panel:focus {
  outline: none;
}

.voice-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.voice-panel__title {
  margin: 8px 0 12px;
  font-family: var(--voice-serif);
  font-weight: 500;
  font-size: 27px;
  line-height: 1.14;
  letter-spacing: 0.01em;
  color: #fff;
  text-wrap: balance;
}

.voice-panel__title:focus-visible {
  outline: 1px solid var(--voice-gold);
  outline-offset: 4px;
}

.voice-panel__subtitle {
  margin: 20px 0 6px;
  font-family: var(--voice-serif);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  color: var(--voice-cream);
}

.voice-panel__body {
  margin: 9px 0;
  font-size: 14px;
  line-height: 1.65;
  color: #e4dacb;
}

.voice-panel__callstate {
  margin: 2px 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--voice-line);
  border-radius: 12px;
  background: rgba(11, 9, 6, 0.42);
}

.voice-panel__close {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: -8px -8px 0 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--voice-cream);
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.voice-panel__close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.voice-quote {
  font-family: var(--voice-serif);
  font-size: 21px;
  font-style: italic;
  line-height: 1.35;
  color: #fff;
}

.voice-fine {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: #cfc1aa;
}

.voice-fine--last {
  margin-top: 16px;
}

.voice-error {
  margin: 10px 0;
  padding-left: 12px;
  border-left: 2px solid #e8b4a0;
  font-size: 13.5px;
  line-height: 1.6;
  color: #f3c7b6;
}

.voice-help {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: #cfc1aa;
}

/* ----------------------------------------------------------------- fields */

.voice-check {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-height: 44px;
  margin: 14px 0;
  font-size: 13px;
  line-height: 1.6;
  color: #e4dacb;
  cursor: pointer;
}

.voice-check--tight {
  margin: 8px 0 0;
}

.voice-check input[type='checkbox'] {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: #d9bc77;
}

.voice-check__help {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.55;
  color: #cfc1aa;
}

.voice-field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  font-size: 12px;
  color: #e4dacb;
}

.voice-field__label {
  font-size: 12px;
  letter-spacing: 0.02em;
}

/* 16px keeps iOS from zooming the scene when a field takes focus. */
.voice-field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid rgba(215, 197, 164, 0.35);
  border-radius: 10px;
  background: rgba(11, 9, 6, 0.55);
  color: #fff;
  font-family: var(--voice-sans);
  font-size: 16px;
  letter-spacing: 0.02em;
  -webkit-appearance: none;
  appearance: none;
}

.voice-field input::placeholder {
  color: #b9aa95;
}

/* The intent card's optional sentence (2026-10-01): the input's look, taller. */
.voice-field textarea {
  width: 100%;
  min-height: 64px;
  padding: 10px 13px;
  border: 1px solid rgba(215, 197, 164, 0.35);
  border-radius: 10px;
  background: rgba(11, 9, 6, 0.55);
  color: #fff;
  font-family: var(--voice-sans);
  font-size: 16px;
  line-height: 1.4;
  resize: vertical;
}

.voice-field textarea:focus-visible {
  outline: 2px solid #f3e2b5;
  outline-offset: 3px;
}

.voice-field input:disabled {
  color: rgba(255, 255, 255, 0.6);
}

.voice-form {
  margin: 0;
}

.voice-setting {
  padding: 14px 0;
  border-top: 1px solid var(--voice-line);
}

.voice-setting__label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--voice-cream);
}

/* ------------------------------------------------------------- motion/a11y */

@keyframes voice-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes voice-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .voice-dock,
  .voice-panel,
  .voice-sheet {
    animation: none;
  }

  .voice-btn,
  .voice-link {
    transition: none;
  }

  .voice-btn:active:not(:disabled) {
    transform: none;
  }
}

@media (max-width: 359px) {
  .voice-dock {
    left: 16px;
    right: 16px;
    padding: 16px 16px 14px;
  }

  .voice-panel {
    width: calc(100% - 32px);
    padding: 20px 16px 18px;
  }

  .voice-dock__name {
    font-size: 25px;
  }

  .voice-actions {
    gap: 8px;
  }
}

@media (max-height: 700px) {
  .voice-panel__title {
    font-size: 24px;
  }

  .voice-dock {
    padding: 14px 16px 12px;
  }
}

/* ------------------------------------------------------------------ *
 * The mounted container.
 *
 * The invitation itself — `.voice-talk`, `.voice-disclosure`, `.voice-hint` —
 * is *not* here: the entry renders it before this chunk is fetched, so its
 * styles live in `hero.css` and ship in the entry stylesheet. Do not move them
 * back; a 20px browser-default button as the only way into the product is a
 * regression this file has already caused once.
 * ------------------------------------------------------------------ */

.voice-experience {
  display: block;
}

.voice-experience__surface {
  display: block;
}

.voice-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.voice-quick__button {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(243, 236, 225, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(243, 236, 225, 0.94);
  font: 400 13px/1.2 var(--voice-sans, Inter, system-ui, sans-serif);
  letter-spacing: 0.04em;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 160ms ease, border-color 160ms ease;
}

.voice-quick__button:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(243, 236, 225, 0.45);
}

/* The sample, when one is offered. Same 44px floor as everything else; the
   visible disc stays small because it is a glyph, not a target. */
.voice-sample {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 14px;
  padding: 8px 16px 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(243, 236, 225, 0.24);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(243, 236, 225, 0.9);
  font: 400 12px/1.2 var(--voice-sans, Inter, system-ui, sans-serif);
  letter-spacing: 0.05em;
  cursor: pointer;
}

.voice-sample svg {
  width: 12px;
  height: 12px;
}

.voice-sample__disc {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

/* ---------------------------------------------------------------- pill */

/*
 * The call, folded. Fixed like the dock, but small, draggable and against a
 * side — so the page underneath (the waitlist field, the keyboard) is never
 * behind it. `left`/`top` come from the component; these are the defaults it
 * falls back to before it has measured itself.
 */
.voice-pill {
  position: fixed;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px 7px 7px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: linear-gradient(rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.09));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 10px 26px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(18px) saturate(1.8) brightness(1.7);
  -webkit-backdrop-filter: blur(18px) saturate(1.8) brightness(1.7);
  color: var(--voice-cream);
  font-family: var(--voice-sans);
  font-size: 14px;
  line-height: 1;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: left 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), top 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
  animation: voice-rise 0.24s ease both;
}

.voice-pill--dragging {
  transition: none;
  cursor: grabbing;
}

.voice-pill:focus-visible {
  outline: 2px solid var(--voice-cream);
  outline-offset: 3px;
}

.voice-pill__avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(145deg, #a07a48, #3a2a18);
  box-shadow: 0 0 0 2px #7fd18b;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 16px;
  animation: voicePillRing 2s ease-out infinite;
}

/* 绿色圆环呼吸：静态 2px 环 + 一圈向外扩散淡出的绿环 */
@keyframes voicePillRing {
  0% {
    box-shadow: 0 0 0 2px #7fd18b, 0 0 0 2px rgba(127, 209, 139, 0.55);
  }
  100% {
    box-shadow: 0 0 0 2px #7fd18b, 0 0 0 7px rgba(127, 209, 139, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .voice-pill__avatar {
    animation: none;
  }
}

.voice-pill__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.voice-pill--muted .voice-pill__avatar {
  box-shadow: 0 0 0 2px #e0b84f;
}

.voice-pill__live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7fd18b;
  animation: voice-pill-live 1.4s ease-in-out infinite;
}

.voice-pill--muted .voice-pill__live {
  background: #e0b84f;
  animation: none;
}

.voice-pill__time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  opacity: 0.9;
}

@keyframes voice-pill-live {
  50% {
    opacity: 0.25;
  }
}

/* The full controls, opened from the pill: same surface as the dock, placed
   beside the pill by the component instead of across the bottom. */
/* The microphone check (F12), beside the folded pill. */
.voice-pill-hint {
  position: fixed;
  z-index: 3;
  right: 12px;
  top: calc(58% + 58px);
  box-sizing: border-box;
  max-width: calc(100vw - 24px);
  margin: 0;
  padding: 10px 13px;
  border: 1px solid rgba(217, 188, 119, 0.55);
  border-radius: 12px;
  background: rgba(16, 14, 10, 0.94);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  color: #f3ece1;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  animation: voice-rise 0.24s ease both;
}

.voice-help--attention {
  color: #f3e1b8;
}

.voice-dock.voice-dock--floating {
  right: auto;
  margin: 0;
  max-width: none;
  box-sizing: border-box;
  z-index: 4;
}

.voice-dock--floating .voice-actions {
  flex-wrap: wrap;
}

@media (prefers-reduced-motion: reduce) {
  .voice-pill,
  .voice-pill-hint,
  .voice-pill__live {
    animation: none;
    transition: none;
  }
}

/* ------------------------------------------------------------ early access */

.voice-early {
  margin: 18px 0 4px;
  padding-top: 16px;
  border-top: 1px solid var(--voice-line);
}

.voice-early__title {
  font-family: var(--voice-serif);
  font-size: 21px;
  font-style: italic;
  color: #fff;
}

.voice-early__label {
  margin: 14px 0 0;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: #e4dacb;
}

.voice-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.voice-chip {
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid rgba(215, 197, 164, 0.35);
  border-radius: 999px;
  background: rgba(11, 9, 6, 0.45);
  color: #efe6d8;
  font-family: var(--voice-sans);
  font-size: 13.5px;
  line-height: 1.2;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.voice-chip[aria-pressed='true'],
.voice-chip[aria-checked='true'] {
  border-color: #d9bc77;
  background: rgba(217, 188, 119, 0.2);
  color: #fff;
}

.voice-chip:focus-visible {
  outline: 2px solid #d9bc77;
  outline-offset: 2px;
}

/* ── 全屏通话页 CallScreen ─────────────────────────────────────────────── */
.callscreen {
  position: fixed;
  inset: 0;
  /* 与 #root 一致的居中 480px 列，宽屏下不铺满整屏 */
  max-width: 480px;
  margin: 0 auto;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  background: #0b0906;
}

/* 角色图作背景 + 强模糊 + 深蒙层（与第二屏 closing 背景同一套做法） */
.callscreen__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
  transform: scale(1.15);
  filter: blur(30px) saturate(1.1) brightness(0.7);
  pointer-events: none;
}

.callscreen__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% 22%, rgba(11, 9, 6, 0.12), rgba(11, 9, 6, 0.55) 70%),
    linear-gradient(to bottom, rgba(11, 9, 6, 0.5) 0%, rgba(11, 9, 6, 0.28) 35%, rgba(11, 9, 6, 0.78) 100%);
}

.callscreen__body {
  position: relative;
  z-index: 1;
  margin-top: 22vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px;
}

.callscreen__avatar {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: #2a2018;
  display: flex;
  align-items: center;
  justify-content: center;
}

.callscreen__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* 接通时头像外的白色圆形音频可视化（Canvas，见 AudioRing.tsx） */
.audio-ring-canvas {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.callscreen__avatar span {
  font: 600 44px/1 var(--serif, "Cormorant Garamond", serif);
  color: #f3ece1;
}

.callscreen__name {
  margin: 44px 0 0;
  font: 600 26px/1.2 var(--serif, "Cormorant Garamond", serif);
  letter-spacing: 0.04em;
  color: #fff;
}

.callscreen__timer {
  margin: 8px 0 0;
  font: 400 15px/1.4 var(--sans, "Inter", sans-serif);
  letter-spacing: 0.06em;
  color: rgba(243, 236, 225, 0.72);
  font-variant-numeric: tabular-nums;
}

/* 左上角图标区（最小化 / ✕） */
.callscreen__top {
  position: relative;
  z-index: 2;
  align-self: flex-start;
  margin: max(14px, env(safe-area-inset-top)) 0 0 14px;
}

.callscreen__icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(243, 236, 225, 0.9);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background 160ms ease;
}

.callscreen__icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* 状态提示竖直居中在"头像/时长"与"底部按钮"之间：占满中间的剩余空间并居中 */
.callscreen__status-slot {
  position: relative;
  z-index: 1;
  flex: 1;
  /* A long sentence on a short screen scrolls inside the slot instead of
     pushing Try again off the screen (the call screen is overflow: hidden) or
     spilling over the buttons. Facebook's in-app browser keeps its own bars, so
     a 375x667 phone leaves this page about 560px. */
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px;
}

/* Centred while it fits, top-aligned (and scrollable) when it does not. */
.callscreen__status-slot > .callscreen__status {
  margin: auto 0;
}

/* 底部控件区 */
.callscreen__foot {
  position: relative;
  z-index: 1;
  margin-bottom: max(44px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 状态提示行（请求麦克风 → 正在连接 → 已接通；失败时显示原因，可换行） */
.callscreen__status {
  margin: 0;
  max-width: 320px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-align: center;
  font: 400 14px/1.5 var(--sans, "Inter", sans-serif);
  letter-spacing: 0.04em;
  color: rgba(243, 236, 225, 0.78);
}

/* 连接各阶段的循环加载动画（取代结尾省略号） */
.callscreen__spinner {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(243, 236, 225, 0.28);
  border-top-color: rgba(243, 236, 225, 0.92);
  animation: callscreen-spin 0.7s linear infinite;
}

@keyframes callscreen-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .callscreen__spinner { animation-duration: 1.6s; }
}

.callscreen__status--error {
  color: #f0bda6;
  letter-spacing: 0.02em;
}

/* While the browser's microphone prompt is up: what to tap, and why. Brighter
   and larger than a status line, because it is the one thing on the screen the
   visitor needs to read before answering the prompt in front of it. */
.callscreen__ask {
  flex-direction: column;
  gap: 6px;
  max-width: 300px;
  letter-spacing: 0.01em;
}

.callscreen__ask-title {
  font: 600 18px/1.35 var(--sans, "Inter", sans-serif);
  color: #f6efe4;
  text-wrap: balance;
}

.callscreen__ask-detail {
  font: 400 15px/1.45 var(--sans, "Inter", sans-serif);
  color: rgba(246, 239, 228, 0.9);
}

.callscreen__ask-note {
  font: 400 13px/1.45 var(--sans, "Inter", sans-serif);
  color: rgba(243, 236, 225, 0.62);
}

/* Short screens (an in-app browser's bars, an old iPhone): less air above the
   portrait and a smaller portrait, so the sentence and the buttons both fit. */
@media (max-height: 700px) {
  .callscreen__body { margin-top: 9vh; }
  .callscreen__avatar { width: 112px; height: 112px; }
  /* The ring is drawn for a 140px portrait (AudioRing.tsx): scaled with it. */
  .callscreen__avatar .audio-ring-canvas { transform: translate(-50%, -50%) scale(0.8); }
  .callscreen__name { margin-top: 22px; font-size: 24px; }
  .callscreen__foot { margin-bottom: max(26px, env(safe-area-inset-bottom)); }
}

@media (max-height: 600px) {
  .callscreen__body { margin-top: 5vh; }
  .callscreen__avatar { width: 84px; height: 84px; }
  .callscreen__avatar .audio-ring-canvas { transform: translate(-50%, -50%) scale(0.6); }
  .callscreen__name { margin-top: 12px; font-size: 22px; }
  .callscreen__status { font-size: 13px; }
  .callscreen__ask-title { font-size: 16px; }
  .callscreen__ask-detail { font-size: 14px; }
}

/* 剩 30s 的轻提示：暖一点、稍亮，但不刺眼 */
.callscreen__status--warn {
  color: #e6cf9a;
}

.callscreen__controls {
  display: flex;
  gap: 44px;
  align-items: flex-start;
}

.callscreen__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}

.callscreen__btn-disc {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 160ms ease, transform 160ms ease;
}

.callscreen__btn:hover .callscreen__btn-disc {
  transform: translateY(-1px);
}

/* 静音开启时反白 */
.callscreen__btn.is-active .callscreen__btn-disc {
  background: #fff;
  color: #1c1c1e;
}

.callscreen__btn--end .callscreen__btn-disc {
  background: #e5484d;
}

.callscreen__btn--end:hover .callscreen__btn-disc {
  background: #d33b40;
}

/* "改用真实号码" 的常态绿色拨号盘（放在基础样式之后，保证覆盖生效） */
.callscreen__btn-disc--phone {
  background: #3ba55d;
}
.callscreen__btn:hover .callscreen__btn-disc--phone {
  background: #349152;
}

.callscreen__btn-label {
  font: 400 12px/1 var(--sans, "Inter", sans-serif);
  letter-spacing: 0.04em;
  color: rgba(243, 236, 225, 0.8);
}

/* ── 通话结束页 EndScreen（复用 .callscreen 的定位/背景） ──────────────────── */
.endscreen__body {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 32px max(44px, env(safe-area-inset-bottom));
  width: 100%;
  box-sizing: border-box;
}

.endscreen__avatar {
  width: 96px;
  height: 96px;
  box-shadow: none;
}

.endscreen__copy {
  margin: 30px 0 0;
  max-width: 20em;
  font: 400 15px/1.75 var(--sans, "Inter", sans-serif);
  letter-spacing: 0.01em;
  color: rgba(243, 236, 225, 0.9);
}

/* 结束页顶部:还剩多少免费时长 */
.endscreen__timeleft {
  margin: 30px 0 0;
  font: 400 14px/1.5 var(--sans, "Inter", sans-serif);
  letter-spacing: 0.02em;
  color: rgba(243, 236, 225, 0.7);
}

.endscreen__timeleft-num {
  font-weight: 600;
  font-size: 22px;
  color: #e6cf9a;
  margin-right: 4px;
}

/* 顶部有剩余时长时,下面这句副文案收一点上边距 */
.endscreen__timeleft + .endscreen__copy {
  margin-top: 8px;
}

.endscreen__form {
  margin-top: 24px;
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.endscreen__input {
  height: 50px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #f3ece1;
  font: 400 15px/1 var(--sans, "Inter", sans-serif);
  outline: none;
}

.endscreen__input::placeholder {
  color: rgba(243, 236, 225, 0.45);
}

.endscreen__input:focus {
  border-color: rgba(255, 255, 255, 0.5);
}

.endscreen__error {
  margin: 0;
  font: 400 13px/1.4 var(--sans, "Inter", sans-serif);
  color: #f0bda6;
}

.endscreen__notify {
  height: 50px;
  border: 0;
  border-radius: 12px;
  background: #f3ece1;
  color: #1c1c1e;
  font: 600 15px/1 var(--sans, "Inter", sans-serif);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: opacity 160ms ease;
}

.endscreen__notify:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 提前挂断结束页的主按钮：Call again（比 waitlist 更强的暖色实心药丸） */
.endscreen__callagain {
  margin-top: 26px;
  width: 100%;
  max-width: 320px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(#f3ece1, #e6d9c2);
  color: #1c1c1e;
  font: 600 16px/1 var(--sans, "Inter", sans-serif);
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
  transition: filter 140ms ease;
}

.endscreen__callagain:hover {
  /* 不要悬浮/上浮效果:hover 只做极轻微的提亮,不位移、不加大阴影。 */
  filter: brightness(1.03);
}

/* 次要区分隔标签：上下各留 40px 呼吸 */
.endscreen__seclabel {
  margin: 40px 0;
  font: 400 12px/1 var(--sans, "Inter", sans-serif);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(243, 236, 225, 0.45);
}

/* 标签已经带了 40px 下边距，紧跟其后的表单不再叠加自己的上边距 */
.endscreen__seclabel + .endscreen__form {
  margin-top: 0;
}

/* waitlist 退为次要：Notify me 从实心改成描边 ghost */
.endscreen__notify--secondary {
  background: transparent;
  color: rgba(243, 236, 225, 0.92);
  border: 1px solid rgba(243, 236, 225, 0.35);
}

.endscreen__notnow {
  margin-top: 10px;
  border: 0;
  background: transparent;
  color: rgba(243, 236, 225, 0.7);
  font: 400 14px/1 var(--sans, "Inter", sans-serif);
  padding: 8px;
  cursor: pointer;
}

.endscreen__notnow:hover {
  color: rgba(243, 236, 225, 0.95);
}

.endscreen__done {
  margin: 34px 0 0;
  font: 500 20px/1.4 var(--sans, "Inter", sans-serif);
  color: #e6cf9a;
}

.endscreen__sub {
  margin: 12px 0 0;
  max-width: 20em;
  font: 400 14px/1.6 var(--sans, "Inter", sans-serif);
  color: rgba(243, 236, 225, 0.62);
}

.endscreen__home {
  margin-top: 32px;
  height: 46px;
  padding: 0 28px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #f3ece1;
  font: 500 14px/1 var(--sans, "Inter", sans-serif);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.endscreen__home:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ── 结束页里的付费意愿两题、实验卡片（2026-10-01） ───────────────────────── */
/* The page can now be taller than a small phone: the column scrolls inside
   the screen (the screen itself keeps clipping its scaled, blurred portrait,
   so nothing scrolls sideways), and a tall column starts at the top instead
   of being clipped by centring. */
.endscreen__body {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  justify-content: safe center;
  padding-top: max(32px, env(safe-area-inset-top));
}

/* In a scrolling column nothing may be squeezed to fit: it scrolls instead. */
.endscreen__body > * {
  flex-shrink: 0;
}

.endscreen__seclabel + .endscreen__wtp {
  margin-top: 0;
}

.endscreen__wtp {
  margin-top: 26px;
  width: 100%;
  max-width: 340px;
}

.endscreen__q {
  margin: 18px 0 0;
  font: 400 14px/1.5 var(--sans, "Inter", sans-serif);
  color: rgba(243, 236, 225, 0.82);
}

.endscreen__q:first-child {
  margin-top: 0;
}

.endscreen__chips {
  justify-content: center;
}

.endscreen__wtp + .endscreen__form {
  margin-top: 22px;
}

/* The experiment's intent question and voice-note offer, on the dark page. */
.endscreen__cards {
  margin-top: 26px;
  width: 100%;
  max-width: 340px;
  text-align: center;
}

.endscreen__cards .voice-early {
  margin: 0;
  padding-top: 0;
  border-top: 0;
}

.endscreen__cards .voice-early + .voice-early {
  margin-top: 26px;
}

.endscreen__cards .voice-chips {
  justify-content: center;
}

.endscreen__cards .voice-actions {
  justify-content: center;
}

.endscreen__cards .voice-link {
  align-self: center;
}

.endscreen__cards .voice-panel__body {
  margin: 0;
  color: rgba(243, 236, 225, 0.9);
}

.endscreen__cards .voice-early__title {
  font-size: 20px;
  line-height: 1.35;
}

