.dq-launch {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: 56px;
  height: 56px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid #cbc5e9;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 18px #15274445;
  z-index: 12;
  cursor: pointer;
}
.dq-launch[hidden] {
  display: none;
}
.dq-launch img,
.dq-head img {
  border-radius: 50%;
  object-fit: cover;
}
.dq-launch img {
  width: 48px;
  height: 48px;
}
#tech-chat {
  --ink: #102442;
  --sub: #455771;
  --blue: #144fcc;
  --line: #d6e0ef;
  position: fixed;
  inset: auto 1rem 1rem auto;
  margin: 0;
  padding: 0;
  border: 1px solid #bfd0e6;
  width: min(26rem, calc(100vw - 2rem));
  max-width: 100%;
  max-height: calc(100dvh - 2rem);
  border-radius: 1rem;
  color: var(--ink);
  box-shadow: 0 10px 48px #14244044;
}
#tech-chat::backdrop {
  background: #13223d45;
}
.dq-window {
  display: flex;
  flex-direction: column;
  height: min(35rem, calc(100dvh - 3rem));
  background: white;
}
.dq-head,
.dq-compose {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.dq-head {
  padding: 0.8rem 1rem;
  background: #f3f5fc;
  border-bottom: 1px solid var(--line);
}
.dq-head small,
.dq-head strong,
.dq-bubble a {
  display: block;
}
.dq-head button {
  margin-left: auto;
  font-size: 1.6rem;
  color: var(--ink);
  background: none;
  border: 0;
}
.dq-window button {
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}
.dq-feed {
  padding: 1rem;
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.dq-feed > p,
.dq-bubble p {
  margin: 0;
}
.dq-bubble {
  padding: 0.65rem 0.8rem;
  border-radius: 0.65rem;
  margin-top: 0.75rem;
  background: #f1f4fa;
  overflow-wrap: anywhere;
}
.dq-user {
  margin-left: 2rem;
  background: #e7edfc;
}
.dq-bubble p {
  white-space: pre-line;
}
.dq-bubble strong {
  font-size: 0.8rem;
}
.dq-bubble a {
  padding: 0.4rem 0;
  font-weight: 650;
}
#dq-status {
  margin: 0;
  padding: 0 1rem;
  color: var(--sub);
  font-size: 0.85rem;
}
#dq-form {
  padding: 0.5rem 1rem;
}
#dq-form label {
  display: block;
  font-weight: 650;
}
.dq-compose input {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #858fa0;
  border-radius: 0.4rem;
  font: inherit;
}
.dq-compose button {
  flex-shrink: 0;
  white-space: nowrap;
  min-width: max-content;
  background: var(--blue);
  color: white;
  font-weight: 650;
  border: 0;
  border-radius: 0.4rem;
  padding: 0.5rem 0.75rem;
}
.dq-notice {
  padding: 0 1rem 1rem;
  color: var(--sub);
  line-height: 1.4;
}
@media (max-width: 767px) {
  .dq-launch {
    width: 50px;
    height: 50px;
    right: calc(10px + env(safe-area-inset-right, 0px));
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .dq-launch img {
    width: 44px;
    height: 44px;
  }
  #tech-chat {
    inset: auto 0.5rem calc(0.5rem + env(safe-area-inset-bottom)) 0.5rem;
    width: auto;
    max-height: calc(100dvh - 1rem);
  }
  .dq-window {
    height: min(34rem, calc(100dvh - 1.5rem));
  }
}
#tech-chat [hidden] { display: none !important; }
.dq-human-link, #dq-return {
  align-self: flex-start; border: 0; background: transparent; color: var(--blue);
  text-decoration: underline; padding: .35rem 1rem; cursor: pointer; font: inherit;
}
.dq-bubble .dq-human-link { padding-left: 0; }
#dq-handoff { overflow-y: auto; padding: .85rem 1rem; }
#dq-handoff h2 { font-size: 1.2rem; margin: 0 0 .7rem; }
#dq-handoff-form { display: grid; gap: .65rem; }
#dq-handoff-form label { display: grid; gap: .2rem; font-weight: 600; }
#dq-handoff-form input, #dq-handoff-form textarea {
  box-sizing: border-box; width: 100%; padding: .5rem; border: 1px solid #858fa0; border-radius: .4rem; font: inherit;
}
#dq-handoff-form p { font-size: .85rem; margin: 0; }
#dq-handoff-form button { background: var(--blue); color: white; border: 0; border-radius: .4rem; font: inherit; }
#dq-receipt { overflow-wrap: anywhere; }
