.call-player {
  max-width: 1120px;
  margin-inline: auto;
  padding-block: 0 clamp(32px, 5vw, 72px);
}

.call-player-head { margin-bottom: clamp(16px, 3vw, 32px); }
.call-player-kicker { margin: 0 0 4px; color: #a33c02; font-weight: 730; }
.call-player h2 { font-size: clamp(2.25rem, 6vw, 4.5rem); line-height: 1.02; letter-spacing: -.055em; }
.call-player [hidden] { display: none; }

.call-stage {
  --caller-width: 50%;
  display: grid;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: clamp(300px, 46vw, 510px);
  grid-template-columns: minmax(0, var(--caller-width)) minmax(0, 1fr);
  border-radius: clamp(14px, 2.5vw, 28px);
  background: #14243d;
}

.call-shot { position: relative; min-width: 0; overflow: hidden; }
.call-shot-aimee { border-inline-start: 2px solid #fff8ee; }
.call-portrait { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.call-shot-caller .call-portrait { object-position: 27% 39%; }
.call-shot-aimee .call-portrait { object-position: var(--aimee-crop, 56%) center; }
.call-shot::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(transparent, rgb(8 16 28 / 88%));
}

.call-identity {
  position: absolute;
  z-index: 1;
  inset: auto 8px clamp(9px, 2vw, 22px) clamp(8px, 2vw, 24px);
  display: flex;
  align-items: center;
  gap: clamp(5px, 1vw, 10px);
  color: white;
  font-size: clamp(.875rem, 1.8vw, 1.25rem);
  font-weight: 700;
  line-height: 1.16;
}

.call-identity small { display: block; font-size: .75em; font-weight: 500; margin-top: 3px; }
.call-identity img { width: clamp(20px, 4vw, 38px); height: auto; }

.call-caption { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.call-bubble {
  position: absolute;
  top: 26%;
  left: min(27%, calc(var(--caller-width) - 34% - 12px));
  width: max-content;
  max-width: 34%;
  margin: 0;
  padding: clamp(12px, 1.8vw, 22px);
  border-radius: clamp(14px, 2vw, 24px);
  background: #fff9f1;
  color: #14243d;
  box-shadow: 0 8px 24px rgb(0 0 0 / 13%);
  font-size: clamp(1.03rem, 2.25vw, 1.72rem);
  font-weight: 720;
  line-height: 1.21;
  letter-spacing: -.035em;
  text-wrap: pretty;
}

.call-bubble.long { font-size: clamp(1rem, 1.7vw, 1.25rem); }
.call-bubble::before {
  content: "";
  position: absolute;
  inset: 54% calc(100% - 1px) auto auto;
  width: clamp(14px, 2.4vw, 28px);
  height: clamp(12px, 2vw, 22px);
  background: inherit;
  clip-path: polygon(0 77%, 100% 0, 100% 100%);
}

.call-stage[data-speaker="aimee"] .call-bubble {
  left: auto;
  right: min(27%, calc(65% - var(--caller-width) - 12px));
  max-width: 35%;
}
.call-stage[data-speaker="aimee"] .call-bubble::before {
  inset: 60% auto auto calc(100% - 1px);
  transform: scaleX(-1);
}

.call-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 15px;
  margin-top: 12px;
  background: #f9ebdb;
  border-radius: 20px;
  padding: 11px;
}

.call-controls button {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.call-controls button:focus-visible { outline: 3px solid #14243d; outline-offset: 3px; }
.call-play { background: #ab3900; color: white; }
.call-play:hover { background: #872d02; }
.call-mute { color: #14243d; background: transparent; border-color: #c9af96; }
.call-mute:hover { background: #fff8ee; }
.call-progress { flex: 1 1 100px; min-width: 0; height: 8px; accent-color: #ab3900; }
.call-time { min-width: 2.1rem; font-variant-numeric: tabular-nums; }
.call-error { color: #8b2d00; }

@media (max-width: 760px) {
  .call-stage { height: clamp(464px, 109vw, 505px); }
  .call-stage[data-speaker="caller"], .call-stage[data-speaker="aimee"] {
    grid-template-columns: minmax(0, 1fr);
  }
  .call-stage[data-speaker="caller"] .call-shot-caller, .call-stage[data-speaker="aimee"] .call-shot-aimee { grid-area: 1 / 1; border: 0; }

  .call-stage[data-speaker="caller"] .call-shot-aimee, .call-stage[data-speaker="aimee"] .call-shot-caller {
    position: absolute;
    z-index: 3;
    top: 12px;
    width: clamp(64px, 20%, 112px);
    aspect-ratio: 1;
    border: 2px solid #fff9f1;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgb(0 0 0 / 24%);
  }

  .call-stage[data-speaker="caller"] .call-shot-aimee { right: 12px; }
  .call-stage[data-speaker="aimee"] .call-shot-caller { left: 12px; }
  .call-stage[data-speaker="caller"] .call-shot-aimee .call-identity,
  .call-stage[data-speaker="aimee"] .call-shot-caller .call-identity,
  .call-stage[data-speaker="caller"] .call-shot-aimee::after,
  .call-stage[data-speaker="aimee"] .call-shot-caller::after { display: none; }

  .call-shot-caller .call-portrait { object-position: 27% center; }
  .call-shot-aimee .call-portrait { object-position: 55% center; }

  .call-bubble, .call-stage[data-speaker="aimee"] .call-bubble {
    inset: 46% auto auto 50%;
    width: max-content;
    max-width: calc(100% - 28px);
    transform: translateX(-50%);
    padding: 11px 13px;
    font-size: clamp(1rem, 4vw, 1.2rem);
  }

  .call-stage .call-bubble.long { font-size: 1rem; }
  .call-bubble::before, .call-stage[data-speaker="aimee"] .call-bubble::before {
    inset: auto auto calc(100% - 1px) 43%;
    width: 20px;
    height: 13px;
    clip-path: polygon(50% 0, 0 100%, 100% 100%);
    transform: none;
  }
  .call-stage[data-speaker="aimee"] .call-bubble::before { left: 57%; }
}


.call-caption-speaker {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.call-play-icon {
  width: 0;
  height: 0;
  flex: none;
  border-width: 7px 0 7px 11px;
  border-style: solid;
  border-color: transparent transparent transparent currentColor;
}

.call-play[aria-pressed="true"] .call-play-icon {
  width: 11px;
  height: 14px;
  border: 0;
  background: linear-gradient(90deg, currentColor 0 4px, transparent 4px 7px, currentColor 7px 11px);
}

.call-duration:not(:empty)::before { content: " / "; }
.call-error { margin-top: .5rem; }
.call-audio { display: block; width: 100%; height: 54px; margin-top: 12px; accent-color: var(--mango-dark); }
.call-details { margin-top: 12px; }
.call-details summary { width: fit-content; padding: 8px 4px; font-weight: 650; cursor: pointer; }
.call-transcript { height: clamp(240px, 50vh, 380px); overflow-y: auto; overscroll-behavior: contain; position: relative; padding: 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); }
.call-cues { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.call-cue-btn { width: 100%; display: grid; gap: 4px; text-align: left; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font: inherit; font-size: .98rem; line-height: 1.5; cursor: pointer; }
.call-cue-btn:hover { background: var(--surface); }
.call-cue.is-active .call-cue-btn { background: var(--mango-wash); box-shadow: inset 3px 0 0 var(--mango-dark); }
.call-cue-meta { display: inline-flex; align-items: center; gap: 10px; font-size: .85rem; }
.call-cue-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.call-cue-speaker { font-weight: 700; color: var(--navy); }
