#xuchen-precision-scale .xcps-live-support {
  position: fixed;
  right: clamp(1rem, 2.5vw, 2.25rem);
  bottom: max(15vh, calc(env(safe-area-inset-bottom) + 1rem));
  z-index: 2147483000;
  width: clamp(176px, 19vw, 300px);
}
#xuchen-precision-scale .xcps-live-support[hidden],
body:has(#xcps-dialog[open]) #xuchen-precision-scale .xcps-live-support { display: none !important; }
#xuchen-precision-scale .xcps-live-support-button {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(23, 105, 194, .28);
  border-radius: 18px;
  background: #1769c2;
  box-shadow: 0 14px 36px rgba(18, 56, 103, .28);
  cursor: pointer;
}
#xuchen-precision-scale .xcps-live-support-button:focus-visible,
#xuchen-precision-scale .xcps-live-support-panel button:focus-visible,
#xuchen-precision-scale .xcps-live-support-panel textarea:focus-visible,
#xuchen-precision-scale .xcps-live-support-panel input:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #1769c2;
}
#xuchen-precision-scale .xcps-live-support-button img { display: block; width: 100%; height: auto; }
#xuchen-precision-scale .xcps-live-support-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(380px, calc(100vw - 24px));
  max-height: min(640px, 75vh);
  overflow: auto;
  border: 1px solid #0f5aa9;
  border-radius: 18px;
  background: #fff;
  color: #14213d;
  box-shadow: 0 20px 55px rgb(0 0 0 / 30%);
  font: 500 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
#xuchen-precision-scale .xcps-live-support-panel[hidden] { display: none !important; }
.xcps-live-support-qa-evidence {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 2147483001;
  width: min(360px, calc(100vw - 2rem));
  display: none;
  margin-top: .5rem;
  padding: .75rem;
  border: 1px solid #1769c2;
  border-radius: 12px;
  background: #eef6ff;
  color: #14213d;
  font: 500 13px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
}
.xcps-live-support-qa-evidence[data-live-support-qa-evidence="true"] { display: block; }
.xcps-live-support-qa-evidence h2 { margin: 0 0 .35rem; font-size: 14px; }
.xcps-live-support-qa-evidence-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.xcps-live-support-qa-evidence label { display: grid; gap: .25rem; margin-top: .5rem; }
.xcps-live-support-qa-evidence textarea { width: 100%; box-sizing: border-box; font: 12px/1.35 ui-monospace, monospace; }
.xcps-live-support-qa-evidence button { min-height: 36px; padding: .3rem .65rem; border: 1px solid #1769c2; border-radius: 6px; color: #fff; background: #1769c2; font: inherit; cursor: pointer; }
.xcps-live-support-qa-evidence button:disabled { cursor: not-allowed; opacity: .5; }
#xuchen-precision-scale .xcps-live-support-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 8px 14px;
  color: #fff;
  background: #1769c2;
}
#xuchen-precision-scale .xcps-live-support-panel header button {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}
#xuchen-precision-scale .xcps-live-support-status,
#xuchen-precision-scale .xcps-live-support-panel form,
#xuchen-precision-scale .xcps-live-support-file { margin: 12px; }
#xuchen-precision-scale .xcps-live-support-messages {
  min-height: 180px;
  max-height: 280px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  list-style: none;
  background: #f5f8fc;
}
#xuchen-precision-scale .xcps-live-support-messages li {
  display: grid;
  gap: 3px;
  width: fit-content;
  max-width: 86%;
  margin: 8px 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: #fff;
  overflow-wrap: anywhere;
}
#xuchen-precision-scale .xcps-live-support-messages li[data-author="visitor"] { margin-left: auto; color: #fff; background: #1769c2; }
#xuchen-precision-scale .xcps-live-support-panel label { display: grid; gap: 6px; }
#xuchen-precision-scale .xcps-live-support-panel textarea,
#xuchen-precision-scale .xcps-live-support-panel input {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 10px;
  border: 1px solid #64748b;
  border-radius: 8px;
  font: inherit;
}
#xuchen-precision-scale .xcps-live-support-panel form button,
#xuchen-precision-scale .xcps-live-support-end {
  min-height: 48px;
  margin-top: 8px;
  padding: 8px 16px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #1769c2;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
#xuchen-precision-scale .xcps-live-support-end { margin: 0 12px 14px; background: #475569; }
@media (max-width: 560px) {
  #xuchen-precision-scale .xcps-live-support {
    right: .75rem;
    bottom: max(15vh, calc(env(safe-area-inset-bottom) + .75rem));
    width: clamp(140px, 42vw, 176px);
  }
  #xuchen-precision-scale .xcps-live-support-panel {
    position: fixed;
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
    max-height: calc(100dvh - 16px);
  }
}
@media (max-height: 620px) {
  #xuchen-precision-scale .xcps-live-support { bottom: max(8vh, calc(env(safe-area-inset-bottom) + .75rem)); }
}
@media (prefers-reduced-motion: reduce) {
  #xuchen-precision-scale .xcps-live-support * { scroll-behavior: auto !important; }
}
