.voice-search {
  margin: 28px auto 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  text-align: left;
}

.voice-search-page {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
}

.voice-chat {
  background: #fff;
  color: #243447;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(16, 42, 67, 0.18);
  display: flex;
  flex-direction: column;
  min-height: 420px;
  padding: 16px;
}

.voice-search-page .voice-chat {
  min-height: 70vh;
}

.voice-thread {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.voice-search-page .voice-thread {
  max-height: min(62vh, 720px);
}

.voice-bubble {
  max-width: min(85%, 640px);
  padding: 12px 14px;
  border-radius: 14px;
}

.voice-bubble p {
  margin: 0;
  color: inherit;
  line-height: 1.45;
}

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

.voice-chip {
  border: 1px solid #d5e3ee;
  border-radius: 999px;
  background: #fff;
  color: #140c40;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
}

.voice-chip.is-selected {
  border-color: #4DB7FE;
  background: #e8f6ff;
  box-shadow: 0 0 0 2px rgba(77, 183, 254, 0.35);
}

.voice-bubble-user {
  align-self: flex-end;
  background: #e8f6ff;
  color: #140c40;
}

.voice-bubble-assistant {
  align-self: flex-start;
  background: #f4f7f8;
  color: #243447;
}

.voice-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.voice-composer {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.voice-composer input {
  flex: 1;
  min-width: 0;
  border: 1px solid #d5e3ee;
  border-radius: 8px;
  padding: 10px 12px;
  color: #243447;
}

.voice-talk,
.voice-send,
.voice-detail-close {
  border: 0;
  border-radius: 30px;
  background: #4DB7FE;
  color: #fff;
  font-weight: 700;
  padding: 12px 18px;
}

.voice-talk.is-live {
  background: #FF6F00;
}

.voice-status {
  color: #40566c;
  min-height: 1.4em;
  margin: 10px 0 0;
}

.voice-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.voice-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  color: #243447;
  background: #fff;
  border: 1px solid #e6eef5;
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
}

.voice-card.is-selected {
  border-color: #4DB7FE;
  box-shadow: 0 0 0 2px rgba(77, 183, 254, 0.35);
}

.voice-card img {
  width: 92px;
  height: 68px;
  object-fit: cover;
  border-radius: 8px;
  background: #e7f4fd;
}

.voice-card strong,
.voice-card span {
  display: block;
  color: #243447;
}

.voice-card span {
  color: #40566c;
  font-size: 14px;
}

.voice-empty {
  color: #60788c;
  margin: 0;
}

.voice-detail {
  background: #fff;
  color: #243447;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(16, 42, 67, 0.18);
  padding: 16px;
  position: sticky;
  top: 110px;
  scroll-margin-top: 110px;
}

.voice-search:not(.voice-search-page) .voice-detail {
  display: none;
  position: static;
}

.voice-search:not(.voice-search-page) .voice-detail.is-open {
  display: block;
}

.voice-detail-hero {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: 12px;
  background: #e7f4fd;
  margin-bottom: 14px;
}

.voice-detail h2 {
  color: #140c40;
  font-size: 26px;
  margin: 0 0 6px;
}

.voice-detail p {
  color: #40566c;
  margin: 0 0 10px;
}

.voice-detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.voice-detail-facts li {
  background: #f4f7f8;
  color: #140c40;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 700;
}

.voice-detail-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 14px;
}

.voice-detail-photos img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  background: #e7f4fd;
}

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

.voice-detail a,
.voice-detail a:hover {
  color: #0b6fa8;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.voice-detail:popover-open {
  position: fixed;
  inset: auto 0 0 0;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: min(85vh, 640px);
  margin: 0;
  border: 0;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -12px 40px rgba(16, 42, 67, 0.28);
  padding: 18px 16px 28px;
  overflow: auto;
}

.voice-detail::backdrop {
  background: rgba(20, 12, 64, 0.45);
}

@media (max-width: 767px) {
  .voice-search,
  .voice-search-page {
    grid-template-columns: 1fr;
  }

  .voice-search-page .voice-chat,
  .voice-chat {
    min-height: 0;
  }

  .voice-thread,
  .voice-search-page .voice-thread {
    max-height: 52vh;
  }

  .voice-composer {
    flex-wrap: wrap;
  }

  .voice-composer input {
    flex: 1 1 100%;
  }

  .voice-search .voice-detail,
  .voice-search .voice-detail.is-open {
    display: none;
  }

  .voice-search .voice-detail:popover-open {
    display: block;
  }
}
