.dsc-root {
  position: fixed;
  inset-block-end: 20px;
  inset-inline-end: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  font-family: inherit;
}
.dsc-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: #1f7da1;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, background 0.15s ease;
}
.dsc-fab:hover {
  background: #186481;
  transform: scale(1.05);
}
.dsc-panel {
  width: min(360px, calc(100vw - 32px));
  height: min(500px, calc(100vh - 110px));
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.dsc-panel[hidden],
.dsc-error[hidden],
.dsc-root [hidden] {
  display: none !important;
}
.dsc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #1f7da1;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
}
.dsc-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}
.dsc-close:hover {
  opacity: 1;
}
.dsc-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.dsc-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dsc-intro {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  flex: 1;
  overflow-y: auto;
}
.dsc-intro input,
.dsc-intro textarea,
.dsc-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #d5dde1;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  outline: none;
}
.dsc-intro input:focus,
.dsc-intro textarea:focus,
.dsc-input:focus {
  border-color: #1f7da1;
  box-shadow: 0 0 0 2px rgba(31, 125, 161, 0.15);
}
.dsc-submit {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: #1f7da1;
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.dsc-submit:hover:not([disabled]) {
  background: #186481;
}
.dsc-submit[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}
.dsc-msg {
  max-width: 82%;
  padding: 8px 12px;
  border-radius: 12px;
  background: #f1f4f6;
  align-self: flex-start;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
}
.dsc-msg.dsc-mine {
  align-self: flex-end;
  background: #d9edf5;
  color: #0c3645;
}
.dsc-msg.dsc-system {
  background: #fff5e0;
  color: #5c4300;
  font-style: italic;
}
.dsc-who {
  display: block;
  font-size: 11px;
  color: #666;
  margin-block-end: 2px;
}
.dsc-shot {
  max-width: 100%;
  border-radius: 8px;
  margin-block-start: 6px;
  display: block;
}
.dsc-composer {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 12px;
  border-block-start: 1px solid #e3e8ea;
  background: #fafbfc;
}
.dsc-attach {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  opacity: 0.7;
}
.dsc-attach:hover {
  opacity: 1;
}
.dsc-error {
  margin: 0;
  padding: 0 16px 8px;
  color: #b3261e;
  font-size: 12px;
}
.dsc-legal {
  padding: 0 16px 10px;
  margin: 0;
  font-size: 11px;
  color: #888;
}

@media (max-width: 480px) {
  .dsc-root {
    inset-block-end: 16px;
    inset-inline-end: 16px;
  }
  .dsc-panel {
    width: calc(100vw - 32px);
    height: min(460px, calc(100vh - 100px));
  }
}
