/* ------------ Modal layout ------------ */
.voice-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.voice-modal-card {
  width: min(92%, 28rem);
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
  animation: scaleIn 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 등장 애니메이션 */
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

/* ------------ Prompt text ------------ */
.voice-prompt {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
}

/* ------------ Candidate list ------------ */
.voice-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.voice-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: background 0.15s, backdrop-filter 0.15s;
}

.voice-item:hover {
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: brightness(1.12);
}

.voice-badge {
  flex: 0 0 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #6366f1 0%, #c026d3 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.voice-name {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ------------ Stop button ------------ */
.voice-stop-btn {
  margin-top: 1.5rem;
  padding: 0 1.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(90deg, #c026d3 0%, #4f46e5 100%);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  transition: filter 0.15s;
}

.voice-stop-btn:hover { filter: brightness(1.10); }





/* 우하단 반투명 볼륨 비주얼라이저 */
#voiceViz {
  position: fixed;
  right: 32px;
  bottom: 116px;
  width: 260px;
  height: 44px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(0,64,255,.25);
  box-shadow: 0 4px 24px rgba(0,64,255,.18);
  border: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(6px);
  pointer-events: none;         /* 클릭 막지 않음 */
  opacity: 0;                   /* 기본 숨김 */
  transform: translateY(8px);   /* 등장 애니메이션 */
  transition: opacity .18s ease, transform .18s ease;
  z-index: 9999;
}
#voiceViz.active {
  opacity: 1;
  transform: translateY(0);
}
#voiceViz span {
  flex: 1;
  height: 100%;
  background: linear-gradient(to top, rgba(255,255,255,.35), rgba(255,255,255,.95));
  border-radius: 2px;
  transform-origin: bottom;
  transform: scaleY(0.2);
  transition: transform 80ms linear, opacity 120ms ease;
  opacity: .9;
}
#voiceViz.dim { opacity: .35; }      /* 녹음 중 아님 */
#voiceViz.recording span { opacity: 1; }
