/* ==========================================================================
   Agente virtual DEMO — widget flotante texto + voz simulada
   ========================================================================== */

.agent-launcher {
  position: fixed;
  right: 14px;
  bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 1500;
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 9px;
  border: 1px solid rgba(255, 250, 243, 0.18);
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  box-shadow: 0 14px 34px rgba(36, 27, 21, 0.28);
  font-family: var(--font-body);
  cursor: pointer;
  transition:
    transform 0.2s var(--ease),
    opacity 0.2s var(--ease),
    visibility 0.2s,
    box-shadow 0.2s var(--ease);
}

.agent-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(36, 27, 21, 0.34);
}

.agent-launcher:focus-visible {
  outline-color: var(--copper-light);
}

.agent-launcher-icon {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--copper-light);
  color: var(--ink);
}

.agent-launcher-icon svg {
  width: 21px;
  height: 21px;
}

.agent-launcher-copy {
  display: grid;
  text-align: left;
  line-height: 1.15;
}

.agent-launcher-copy strong {
  color: var(--cream);
  font-size: 0.78rem;
  font-weight: 800;
}

.agent-launcher-copy small {
  margin-top: 3px;
  color: rgba(247, 241, 232, 0.62);
  font-size: 0.6rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.agent-launcher-pulse {
  position: absolute;
  top: 1px;
  left: 2px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #82b98b;
}

.agent-launcher-pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(130, 185, 139, 0.65);
  border-radius: 50%;
  animation: agent-pulse 2.2s infinite;
}

@keyframes agent-pulse {
  0% {
    opacity: 0.8;
    transform: scale(0.7);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.6);
  }
}

.agent-open .agent-launcher {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.cookie-visible .agent-launcher {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.agent-open {
  overflow: hidden;
}

/* -------------------------------- Panel ---------------------------------- */

.agent-panel {
  position: fixed;
  right: 10px;
  bottom: 10px;
  z-index: 1600;
  display: flex;
  width: min(424px, calc(100vw - 20px));
  height: min(760px, calc(100dvh - 20px));
  max-height: calc(100dvh - 20px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(36, 27, 21, 0.2);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 28px 90px rgba(20, 13, 9, 0.34);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.985);
  transform-origin: bottom right;
  transition:
    opacity 0.22s var(--ease),
    transform 0.22s var(--ease),
    visibility 0.22s;
}

.agent-panel[data-open="true"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.agent-header {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 13px;
  background:
    radial-gradient(circle at 92% 8%, rgba(197, 138, 93, 0.24), transparent 9rem),
    var(--ink);
  color: var(--cream);
}

.agent-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.agent-avatar {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(247, 241, 232, 0.22);
  border-radius: 50%;
  background: rgba(247, 241, 232, 0.08);
  color: var(--copper-light);
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-style: italic;
}

.agent-avatar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #82b98b;
}

.agent-title-wrap {
  min-width: 0;
}

.agent-title {
  margin: 0;
  overflow: hidden;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-subtitle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 3px 0 0;
  color: rgba(247, 241, 232, 0.62);
  font-size: 0.61rem;
  line-height: 1.25;
}

.agent-subtitle .agent-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #a8d2ad;
}

.agent-live::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.agent-subtitle strong {
  color: var(--copper-light);
  font-weight: 750;
}

.agent-close {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(247, 241, 232, 0.2);
  border-radius: 50%;
  background: rgba(247, 241, 232, 0.05);
  color: var(--cream);
  cursor: pointer;
}

.agent-close:hover {
  background: rgba(247, 241, 232, 0.12);
}

.agent-close svg {
  width: 20px;
  height: 20px;
}

.agent-demo-strip {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 10px;
  background: #eadccb;
  color: #5e4633;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.3;
  text-align: center;
  text-transform: uppercase;
}

.agent-demo-strip svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}

.agent-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 0 0 auto;
  gap: 4px;
  padding: 7px 8px 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.agent-tab {
  position: relative;
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border: 0;
  border-radius: 9px 9px 0 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.agent-tab[aria-selected="true"] {
  background: var(--cream);
  color: var(--ink);
}

.agent-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 0;
  left: 10px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--copper);
}

.agent-tab:hover {
  color: var(--ink);
}

.agent-tab-badge {
  padding: 2px 5px;
  border: 1px solid rgba(143, 80, 44, 0.3);
  border-radius: 3px;
  color: var(--copper-strong);
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.agent-body {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  background: var(--paper);
}

.agent-view {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
}

.agent-view[hidden] {
  display: none !important;
}

/* -------------------------------- Chat ----------------------------------- */

.agent-messages {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 9px;
  overflow-y: auto;
  padding: 14px 13px 8px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #c8b7a4 transparent;
}

.agent-messages::-webkit-scrollbar {
  width: 5px;
}

.agent-messages::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: #c8b7a4;
}

.agent-msg {
  display: flex;
  max-width: 90%;
  flex-direction: column;
  animation: msg-in 0.2s var(--ease);
}

@keyframes msg-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.agent-msg--bot {
  align-self: flex-start;
}

.agent-msg--user {
  align-self: flex-end;
  align-items: flex-end;
}

.agent-msg--system {
  max-width: 100%;
  align-self: center;
}

.agent-bubble {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px 14px 14px 14px;
  background: var(--cream);
  color: var(--ink-soft);
  font-size: 0.81rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.agent-msg--user .agent-bubble {
  border-color: var(--ink);
  border-radius: 14px 4px 14px 14px;
  background: var(--ink);
  color: var(--cream);
}

.agent-msg--system .agent-bubble {
  padding: 7px 10px;
  border-style: dashed;
  border-radius: 8px;
  background: rgba(197, 138, 93, 0.08);
  color: var(--muted);
  font-size: 0.68rem;
  text-align: center;
}

.agent-bubble p {
  margin: 0 0 7px;
}

.agent-bubble p:last-child {
  margin-bottom: 0;
}

.agent-bubble strong {
  color: var(--ink);
  font-weight: 800;
}

.agent-msg--user .agent-bubble strong {
  color: var(--cream);
}

.agent-bubble em {
  color: var(--copper-strong);
  font-style: normal;
  font-weight: 700;
}

.agent-bubble .agent-line {
  display: block;
}

.agent-bubble .agent-line + .agent-line {
  margin-top: 3px;
}

.agent-time {
  margin-top: 3px;
  padding-inline: 3px;
  color: #8a7a6b;
  font-size: 0.52rem;
  line-height: 1.2;
}

.agent-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
}

.agent-typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--copper);
  animation: typing-bounce 1s infinite;
}

.agent-typing span:nth-child(2) {
  animation-delay: 0.14s;
}

.agent-typing span:nth-child(3) {
  animation-delay: 0.28s;
}

@keyframes typing-bounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  30% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

/* Tarjetas dentro del chat */

.agent-card {
  margin-top: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}

.agent-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: #f1e5d7;
  color: var(--ink);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.agent-card-body {
  padding: 9px 10px;
}

.agent-summary {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.agent-summary li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.72rem;
  line-height: 1.4;
}

.agent-summary span:first-child {
  color: var(--muted);
}

.agent-summary span:last-child {
  max-width: 60%;
  color: var(--ink);
  font-weight: 700;
  text-align: right;
}

.agent-code {
  display: inline-flex;
  padding: 3px 6px;
  border: 1px solid rgba(143, 80, 44, 0.35);
  border-radius: 4px;
  background: rgba(197, 138, 93, 0.12);
  color: var(--copper-strong);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.agent-receipt .agent-card-head {
  background: var(--success);
  color: #f4fbf5;
}

.agent-receipt-code {
  margin: 2px 0 7px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  line-height: 1;
}

.agent-reminder {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 9px;
  padding: 7px 8px;
  border-radius: 6px;
  background: rgba(85, 99, 80, 0.1);
  color: #39513d;
  font-size: 0.64rem;
  line-height: 1.4;
}

.agent-reminder svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.agent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.agent-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.67rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.agent-action:hover:not(:disabled) {
  border-color: var(--ink);
  background: var(--cream);
  color: var(--ink);
}

.agent-action:disabled {
  opacity: 0.45;
  cursor: default;
  filter: grayscale(0.6);
}

.agent-action--primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--cream);
}

.agent-action--primary:hover:not(:disabled) {
  border-color: var(--copper-strong);
  background: var(--copper-strong);
  color: var(--cream);
}

.agent-action--danger {
  border-color: rgba(142, 47, 36, 0.4);
  color: var(--danger);
}

.agent-action--danger:hover:not(:disabled) {
  border-color: var(--danger);
  background: rgba(142, 47, 36, 0.06);
  color: var(--danger);
}

.agent-action svg {
  width: 13px;
  height: 13px;
}

.agent-price-list {
  display: grid;
  gap: 0;
  margin-top: 8px;
  border-top: 1px solid var(--line);
}

.agent-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.71rem;
  line-height: 1.3;
}

.agent-price-row:last-child {
  border-bottom: 0;
}

.agent-price-row span:last-child {
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
}

.agent-quick {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 104px;
  overflow-y: auto;
  padding: 3px 13px 8px;
  scrollbar-width: thin;
}

.agent-quick:empty {
  display: none;
}

.agent-chip {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 4px;
  padding: 7px 11px;
  border: 1px solid rgba(143, 80, 44, 0.3);
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.7);
  color: var(--copper-strong);
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  transition:
    border-color 0.16s var(--ease),
    background-color 0.16s var(--ease);
}

.agent-chip:hover {
  border-color: var(--copper);
  background: #f1e4d5;
}

.agent-form {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  gap: 7px;
  padding: 8px 10px 6px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.agent-input {
  display: block;
  width: 100%;
  min-height: 44px;
  max-height: 96px;
  flex: 1 1 auto;
  resize: none;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.78rem;
  line-height: 1.4;
}

.agent-input::placeholder {
  color: #7c6c5d;
  opacity: 1;
}

.agent-input:focus {
  border-color: var(--copper);
  outline: 2px solid rgba(143, 80, 44, 0.25);
  outline-offset: 0;
}

.agent-send {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  cursor: pointer;
}

.agent-send:hover {
  background: var(--copper-strong);
}

.agent-send:disabled {
  opacity: 0.45;
  cursor: wait;
}

.agent-send svg {
  width: 18px;
  height: 18px;
}

.agent-footnote {
  flex: 0 0 auto;
  margin: 0;
  padding: 0 12px 7px;
  color: #867565;
  font-size: 0.56rem;
  line-height: 1.35;
  text-align: center;
}

/* --------------------------------- Voz ----------------------------------- */

.agent-view--voice {
  overflow-y: auto;
  padding: 14px 13px 12px;
  scrollbar-width: thin;
}

.voice-hero {
  text-align: center;
}

.voice-stage {
  position: relative;
  display: grid;
  width: 132px;
  height: 132px;
  margin: 2px auto 8px;
  place-items: center;
}

.voice-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(143, 80, 44, 0.22);
  border-radius: 50%;
}

.voice-ring:nth-child(2) {
  inset: 13px;
  border-color: rgba(143, 80, 44, 0.34);
}

.voice-mic {
  position: relative;
  z-index: 1;
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  box-shadow: 0 10px 25px rgba(36, 27, 21, 0.22);
  cursor: pointer;
  transition:
    transform 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

.voice-mic:hover {
  background: var(--copper-strong);
  transform: scale(1.03);
}

.voice-mic:disabled {
  background: #7f746b;
  cursor: not-allowed;
  transform: none;
}

.voice-mic svg {
  width: 30px;
  height: 30px;
}

.voice-stage[data-listening="true"] .voice-mic {
  background: var(--copper-strong);
}

.voice-stage[data-listening="true"] .voice-ring {
  animation: voice-ring 1.8s infinite;
}

.voice-stage[data-listening="true"] .voice-ring:nth-child(2) {
  animation-delay: 0.4s;
}

@keyframes voice-ring {
  0% {
    opacity: 0.8;
    transform: scale(0.88);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.24);
  }
}

.voice-status {
  min-height: 34px;
  margin: 0 0 7px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.voice-status[data-listening="true"] {
  color: var(--copper-strong);
}

.voice-support {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 auto 10px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 700;
  line-height: 1.3;
}

.voice-support::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sage);
}

.voice-transcript {
  display: flex;
  min-height: 96px;
  max-height: 220px;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  margin-bottom: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(247, 241, 232, 0.72);
  scrollbar-width: thin;
}

.voice-line {
  max-width: 92%;
  padding: 7px 9px;
  border-radius: 4px 10px 10px 10px;
  background: var(--white);
  color: var(--ink-soft);
  font-size: 0.7rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.voice-line strong {
  display: block;
  margin-bottom: 2px;
  color: var(--copper-strong);
  font-size: 0.54rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.voice-line--user {
  align-self: flex-end;
  border-radius: 10px 4px 10px 10px;
  background: var(--ink);
  color: var(--cream);
}

.voice-line--user strong {
  color: var(--copper-light);
}

.voice-line--system {
  max-width: 100%;
  align-self: center;
  border: 1px dashed var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 0.62rem;
  text-align: center;
}

.voice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

.voice-actions:empty {
  display: none;
}

.voice-phrase-title {
  margin: 3px 0 6px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 750;
  line-height: 1.4;
}

.voice-phrases {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.voice-phrase {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.63rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.voice-phrase:hover {
  border-color: var(--copper);
  background: #f2e6d8;
}

.voice-phrase svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  color: var(--copper-strong);
}

.voice-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.voice-sound {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 750;
  cursor: pointer;
}

.voice-sound[aria-pressed="true"] {
  color: var(--copper-strong);
  border-color: rgba(143, 80, 44, 0.32);
}

.voice-sound svg {
  width: 14px;
  height: 14px;
}

.voice-notice {
  display: flex;
  flex: 1 1 180px;
  align-items: flex-start;
  gap: 5px;
  margin: 0;
  color: #7c6c5d;
  font-size: 0.55rem;
  line-height: 1.4;
}

.voice-notice svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.voice-booking-card {
  width: 100%;
  margin-top: 2px;
  padding: 8px;
  border: 1px solid rgba(85, 99, 80, 0.35);
  border-radius: 8px;
  background: rgba(85, 99, 80, 0.09);
  color: var(--ink-soft);
  font-size: 0.65rem;
  line-height: 1.45;
}

.voice-booking-card strong {
  color: var(--success);
}

/* ------------------------------- Responsive ------------------------------- */

@media (min-width: 900px) {
  .agent-launcher {
    right: 24px;
    bottom: 24px;
  }

  .agent-panel {
    right: 24px;
    bottom: 24px;
    width: 398px;
    height: min(720px, calc(100dvh - 48px));
    max-height: calc(100dvh - 48px);
  }
}

@media (max-width: 380px) {
  .agent-launcher {
    right: 10px;
    bottom: calc(86px + env(safe-area-inset-bottom));
    padding-right: 13px;
  }

  .agent-launcher-copy small {
    display: none;
  }

  .agent-panel {
    right: 6px;
    bottom: 6px;
    width: calc(100vw - 12px);
    height: calc(100dvh - 12px);
    max-height: calc(100dvh - 12px);
    border-radius: 17px;
  }

  .agent-header {
    padding: 11px 11px 10px;
  }

  .agent-demo-strip {
    font-size: 0.53rem;
  }

  .agent-messages {
    padding-inline: 10px;
  }

  .agent-quick {
    padding-inline: 10px;
  }

  .agent-view--voice {
    padding-inline: 10px;
  }
}

@media (max-height: 620px) {
  .agent-header {
    padding-block: 9px;
  }

  .agent-avatar {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }

  .agent-demo-strip {
    display: none;
  }

  .agent-messages {
    padding-top: 9px;
  }

  .agent-quick {
    max-height: 52px;
  }

  .voice-stage {
    width: 94px;
    height: 94px;
    margin-bottom: 2px;
  }

  .voice-mic {
    width: 58px;
    height: 58px;
  }

  .voice-mic svg {
    width: 24px;
    height: 24px;
  }

  .voice-transcript {
    max-height: 126px;
    min-height: 70px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .agent-panel,
  .agent-launcher,
  .agent-msg {
    animation: none !important;
    transition: none !important;
  }
}
