.transcript {
  flex: 1;
  min-height: 0;
  padding: 1.25rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 12%);
}

.utterance {
  opacity: 0;
  transform: translateY(12px);
  animation: rise-in 0.35s ease forwards;
}

.utterance-score-bars {
  display: inline-block;
  vertical-align: text-bottom;
  margin-left: 0.4em;
  opacity: 0.8;
  pointer-events: none;
  flex-shrink: 0;
}

.utterance.pending {
  animation: none;
  opacity: 0.5;
  transform: none;
}

.utterance.history-item {
  opacity: 1;
  transform: none;
  animation: none;
}

.utterance.ai-message {
  border-left: 3px solid #1976d2;
  background: #0d2448;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
}

.ai-summary {
  margin: 0.5rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px dashed #2a2f3a;
  font-size: 0.82rem;
  font-style: italic;
  color: #8b919a;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ai-summary-scores {
  display: flex;
  gap: 0.5rem;
  font-style: normal;
}

.ai-summary-score {
  font-size: 0.65rem;
  font-weight: 700;
}

.ai-summary-score--c { color: #ef5350; }
.ai-summary-score--v { color: #66bb6a; }
.ai-summary-score--r { color: #42a5f5; }

.ai-summary-fluency {
  font-size: 1rem;
  font-weight: 700;
  font-style: normal;
  color: #ffffff;
  letter-spacing: 0.03em;
}

.controls--live {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem 1rem;
  background: linear-gradient(to top, #0f1117 70%, transparent);
}

.ai-scores {
  display: flex;
  justify-content: space-around;
  width: 100%;
  padding: 0.25rem 0 0.25rem;
  border-top: 1px solid #2a2f3a;
}

.ai-score {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
}

.ai-score__label {
  font-size: 0.6rem;
  font-weight: 400;
  color: #8b919a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ai-score--complexity { color: #ef5350; }
.ai-score--validity   { color: #66bb6a; }
.ai-score--relevance  { color: #42a5f5; }

@keyframes score-pop {
  0%   { transform: scale(1);                    filter: brightness(1); }
  45%  { transform: scale(var(--pop-scale, 1.3)); filter: brightness(2); }
  100% { transform: scale(1);                    filter: brightness(1); }
}

.ai-score.score-popping {
  animation: score-pop 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.record-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.reward-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.reward-star {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 1.4rem;
  color: #ffd700;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.8);
  opacity: 0;
  --dx: 0px;
  --dy: 0px;
  animation: reward-star-burst 900ms ease-out forwards;
}

.countdown-overlay {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  width: 8rem;
  height: 0.35rem;
  background: #2a2f3a;
  border-radius: 999px;
  overflow: hidden;
  pointer-events: none;
}

.countdown-bar {
  height: 100%;
  width: 100%;
  background: #e53935;
  transition: width 0.05s linear;
}





.record-btn {
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  border: none;
  background: #c62828;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 28px rgba(198, 40, 40, 0.45);
}

.record-btn.recording {
  background: #e53935;
  animation: pulse 1s ease infinite;
}

.record-btn:disabled {
  background: #4a4f5a;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.6;
  animation: none;
}

.record-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}


@keyframes rise-in {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  50% { box-shadow: 0 4px 32px rgba(229, 57, 53, 0.95); }
}


.ai-session-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1.75rem;
  pointer-events: none;
  z-index: 150;
}

.ai-session-bar__fill {
  position: absolute;
  inset: 0;
  width: 100%;
  background: #2e7d32;
}


@keyframes reward-star-burst {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) translate(0, 0) scale(0.4) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) scale(1.3) rotate(180deg);
  }
}
