.voice-button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 52px;
  height: 34px;
  flex: 0 0 52px;
  padding: 0;
  border: 1px solid #71a99c;
  border-radius: 8px;
  background: #122120;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
}
.voice-button::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(110deg, #18342b, #284859, #563849, #18342b);
  background-size: 300% 100%;
  animation: voice-shimmer 7s ease-in-out infinite;
}
.voice-button:disabled {
  opacity: 0.5;
  cursor: default;
}
.voice-button:disabled::before {
  animation: none;
}
.voice-button[aria-pressed="true"] {
  border-color: var(--green);
  color: var(--green);
}
.voice-button[data-status="error"] {
  border-color: var(--red);
}
.voice-button:focus-visible,
.voice-tool:focus-visible,
.voice-copy:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
@keyframes voice-shimmer {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .voice-button::before {
    animation: none;
  }
}

.voice-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px 34px;
  gap: 6px;
  align-items: center;
  flex: 0 0 auto;
  min-height: 44px;
  max-height: 90px;
  margin-top: 6px;
  padding: 5px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  letter-spacing: 0;
  text-align: left;
}
.voice-strip[hidden],
.voice-tool[hidden],
#voiceReadback[hidden],
#sessionStop[hidden] {
  display: none;
}
.voice-visible .setup .range-wrap {
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 8px;
}
.voice-visible .setup .entry-validation,
.voice-visible .setup .start-btn {
  flex-shrink: 0;
}
.voice-copy {
  min-width: 0;
  max-height: 78px;
  overflow-y: auto;
  overflow-wrap: anywhere;
  user-select: text;
}
.voice-status {
  display: block;
  font-size: 11px;
  line-height: 16px;
  color: var(--cyan);
  font-weight: 600;
}
.voice-readback {
  font-size: 11px;
  line-height: 16px;
  color: var(--text);
  white-space: pre-wrap;
}
.voice-tool {
  width: 34px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  position: relative;
}
.voice-icon {
  display: block;
  width: 18px;
  height: 18px;
}
.voice-tool .lucide-mic-off,
.voice-tool[aria-pressed="true"] .lucide-mic {
  display: none;
}
.voice-tool[aria-pressed="true"] .lucide-mic-off {
  display: block;
}
.voice-tool[aria-pressed="true"] {
  border-color: var(--yellow);
  color: var(--yellow);
}
.voice-hangup {
  color: var(--red);
}
.session-meta {
  align-items: center;
}
.session-meta > .mode-pill {
  margin-left: auto;
  flex: 0 0 auto;
  max-width: 100%;
  letter-spacing: 0;
}
.session-meta .mode-status {
  max-width: 12ch;
}
.session-meta .mode-latency-value {
  flex: 0 0 4ch;
  inline-size: 4ch;
}

@media (max-height: 640px) {
  .voice-visible .voice-strip {
    height: 60px;
    max-height: 60px;
  }
  .voice-visible .voice-copy {
    max-height: 48px;
  }
  .voice-visible .score {
    padding-bottom: 3px;
  }
  .voice-visible .result:not(.fit-xs):not(.fit-xxs) {
    font-size: 28px;
  }
  .voice-visible .split {
    margin-top: 4px;
  }
  .voice-visible .metric {
    padding: 5px 4px;
  }
  .voice-visible .metric strong:not(.fit-xs):not(.fit-xxs) {
    font-size: 17px;
  }
  .voice-visible.actual-execution .ip-row div {
    padding: 4px;
  }
  .voice-visible.actual-execution .ip-row strong:not(.fit-xs):not(.fit-xxs) {
    font-size: 18px;
  }
  .voice-visible.actual-execution .ip-row .apr-metric span {
    min-height: 0;
  }
  .voice-visible .session-meta {
    padding-top: 4px;
  }
}
