#tf-helix-panel .hx-composer,
#tf-helix-desk .hx-composer {
  grid-template-columns: minmax(0, 1fr) auto;
}

.hx-tools {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 1.85rem;
}

.hx-attach {
  flex: 0 0 1.85rem;
  width: 1.85rem;
  height: 1.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(196, 181, 253, 0.28);
  border-radius: 0.7rem;
  background: rgba(15, 12, 32, 0.85);
  color: #c4b5fd;
  cursor: pointer;
}

.hx-attach:hover {
  border-color: rgba(167, 139, 250, 0.7);
  color: #f8fafc;
}

.hx-preview {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.hx-preview img {
  width: 1.85rem;
  height: 1.85rem;
  object-fit: cover;
  border-radius: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hx-attach-x {
  border: 0;
  background: transparent;
  color: #c4b5fd;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.hx-attach-err {
  font-style: normal;
  font-size: 0.72rem;
  color: #fda4af;
}

.hx-body .hx-link {
  color: #67e8f9;
  text-decoration: underline;
  word-break: break-all;
}

.hx-bubble.is-user .hx-body .hx-link {
  color: #fef9c3;
}

.hx-photo {
  display: block;
  max-width: min(16rem, 100%);
  max-height: 14rem;
  width: auto;
  height: auto;
  margin: 0.35rem 0 0.15rem;
  border-radius: 0.7rem;
  object-fit: cover;
}

.hx-orig-wrap {
  margin-top: 0.35rem;
}

.hx-orig {
  border: 0;
  background: transparent;
  color: #a5b4fc;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
}

.hx-orig.is-on,
.hx-orig:hover {
  color: #e0e7ff;
}

.hx-orig-body {
  margin-top: 0.35rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.7rem;
  border: 1px dashed rgba(165, 180, 252, 0.35);
  background: rgba(15, 12, 32, 0.45);
  color: #cbd5e1;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.hx-en-wrap {
  display: block;
  margin-top: 0.4rem;
}

.hx-en-wrap[hidden] {
  display: block;
}

.hx-en-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #67e8f9;
}

.hx-copy {
  display: inline-flex;
  align-items: center;
  margin-top: 0.35rem;
  border: 1px solid rgba(196, 181, 253, 0.35);
  background: rgba(15, 12, 32, 0.55);
  color: #e9d5ff;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.hx-copy:hover {
  border-color: rgba(167, 139, 250, 0.7);
  color: #f8fafc;
}

.hx-en-body {
  margin-top: 0.25rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(103, 232, 249, 0.28);
  background: rgba(8, 47, 73, 0.35);
  color: #e0f2fe;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (min-width: 801px) {
  #tf-helix-panel .hx-composer {
    grid-template-columns: auto minmax(0, 1fr) auto !important;
  }
  #tf-helix-panel .hx-tools {
    grid-column: 1 !important;
    grid-row: 1;
  }
  #tf-helix-panel .hx-composer textarea {
    grid-column: 2 !important;
    min-width: 0 !important;
    width: 100%;
  }
  #tf-helix-panel .hx-send {
    grid-column: 3 !important;
    grid-row: 1;
    flex-shrink: 0;
  }
  #tf-helix-desk .hx-composer {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }
  #tf-helix-desk .hx-composer textarea {
    grid-column: 1 !important;
    min-width: 0 !important;
    width: 100%;
  }
  #tf-helix-desk .hx-send {
    grid-column: 2 !important;
    grid-row: 1;
    flex-shrink: 0;
  }
}
