#lc-widget,
#lc-widget * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

#lc-widget {
  --lc-brand: #2563eb;
  --lc-brand-dark: #1d4ed8;
  --lc-text: #1f2937;
  --lc-muted: #8b95a5;
  --lc-line: #e8ebf0;
  --lc-bg: #f6f7f9;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--lc-text);
}

#lc-widget .lc-bubble {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: var(--lc-brand);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(37, 99, 235, .35);
  transition: transform .18s ease, box-shadow .18s ease;
  animation: lc-bubble-in .34s cubic-bezier(.22, 1, .36, 1) backwards;
}

/* 默认不显示，由脚本确认「页面上没有自定义入口」后才显示，避免先闪一下再消失 */
#lc-widget:not(.lc-bubble-on) .lc-bubble {
  display: none;
}

@keyframes lc-bubble-in {
  from { opacity: 0; transform: scale(.55); }
  to   { opacity: 1; transform: scale(1); }
}

#lc-widget .lc-bubble:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, .42);
}

#lc-widget .lc-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #f5222d;
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
  font-style: normal;
}

#lc-widget .lc-badge.lc-badge-pop {
  animation: lc-badge-pop .45s cubic-bezier(.22, 1, .36, 1);
}

@keyframes lc-badge-pop {
  0%   { transform: scale(.4); }
  60%  { transform: scale(1.22); }
  100% { transform: scale(1); }
}

#lc-widget .lc-tip {
  position: absolute;
  right: 68px;
  bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: min(260px, 62vw);
  padding: 9px 10px 9px 12px;
  border: 1px solid var(--lc-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
  animation: lc-tip-in .3s cubic-bezier(.22, 1, .36, 1) backwards;
}

#lc-widget .lc-tip[hidden] {
  display: none;
}

#lc-widget .lc-tip::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: 16px;
  width: 10px;
  height: 10px;
  background: #fff;
  border-top: 1px solid var(--lc-line);
  border-right: 1px solid var(--lc-line);
  transform: rotate(45deg);
}

#lc-widget .lc-tip-body {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--lc-text);
  font: inherit;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
}

#lc-widget .lc-tip-x {
  flex: none;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #eef1f5;
  color: #98a2b3;
  font-size: 13px;
  line-height: 18px;
  cursor: pointer;
}

#lc-widget .lc-tip-x:hover {
  background: #e3e8ef;
  color: #667085;
}

@keyframes lc-tip-in {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: none; }
}

#lc-widget .lc-entry {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

#lc-widget:not(.lc-bubble-on) .lc-entry,
#lc-widget.lc-open .lc-entry {
  display: none;
}

#lc-widget .lc-bubble-face,
#lc-widget .lc-bubble-ico,
#lc-widget .lc-bubble-txt {
  display: none;
}

#lc-widget .lc-bubble-ico svg {
  width: 26px;
  height: 26px;
}

#lc-widget .lc-bubble-face {
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

#lc-widget .lc-bubble-face svg {
  width: 28px;
  height: 28px;
}

#lc-widget .lc-bubble-txt {
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

#lc-widget.lc-style-dot .lc-bubble-ico {
  display: flex;
}

#lc-widget.lc-style-pill .lc-bubble {
  width: auto;
  height: 52px;
  padding: 0 22px 0 18px;
  border-radius: 999px;
  gap: 9px;
}

#lc-widget.lc-style-pill .lc-bubble-ico,
#lc-widget.lc-style-pill .lc-bubble-txt {
  display: flex;
}

#lc-widget.lc-style-photo .lc-bubble {
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .18);
}

#lc-widget.lc-style-photo .lc-bubble-face {
  display: flex;
  color: var(--lc-brand);
}

#lc-widget.lc-style-photo .lc-bubble::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #cbd2dc;
  border: 2px solid #fff;
}

#lc-widget.lc-style-photo.lc-online .lc-bubble::after {
  background: #22c55e;
}

#lc-widget.lc-style-card .lc-bubble {
  width: auto;
  height: 54px;
  padding: 0 26px 0 8px;
  border-radius: 16px;
  gap: 10px;
  box-shadow: 0 10px 26px rgba(37, 99, 235, .32);
}

#lc-widget.lc-style-card .lc-bubble-face {
  display: flex;
  width: 38px;
  height: 38px;
  flex: none;
}

#lc-widget.lc-style-card .lc-bubble-txt {
  display: flex;
}

#lc-widget.lc-style-live .lc-bubble {
  width: auto;
  height: 56px;
  padding: 0;
  border-radius: 12px;
  gap: 0;
  background: transparent;
  box-shadow: none;
}

#lc-widget.lc-style-live .lc-bubble-img {
  display: block;
  flex: none;
  width: auto;
  height: 100%;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(37, 99, 235, .32);
}

#lc-widget.lc-style-live .lc-bubble.no-img {
  padding: 0 24px 0 16px;
  gap: 10px;
  background: var(--lc-brand);
  box-shadow: 0 10px 26px rgba(37, 99, 235, .32);
}

#lc-widget.lc-style-live .lc-bubble.no-img .lc-bubble-ico,
#lc-widget.lc-style-live .lc-bubble.no-img .lc-bubble-txt {
  display: flex;
}

#lc-widget.lc-style-live .lc-entry-msg {
  background: rgba(72, 69, 64, .78);
  color: #fff;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .22);
}

#lc-widget.lc-style-live .lc-entry-msg:hover {
  background: rgba(60, 58, 54, .88);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .28);
}

#lc-widget .lc-entry-msgs {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

#lc-widget .lc-entry-msg {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 250px;
  padding: 8px 16px 8px 9px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .13);
  color: var(--lc-text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  animation: lc-msg-in .3s cubic-bezier(.22, 1, .36, 1);
}

#lc-widget .lc-entry-msg[hidden] {
  display: none;
}

#lc-widget .lc-entry-msg:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, .2);
}

#lc-widget .lc-entry-msg-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f8a11c;
  color: #fff;
  flex: none;
}

#lc-widget .lc-entry-msg-ico svg {
  width: 15px;
  height: 15px;
}

#lc-widget .lc-entry-msg-txt {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

@keyframes lc-msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

#lc-widget .lc-mask {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  background: rgba(15, 23, 42, .45);
  animation: lc-fade .18s ease;
}
#lc-widget .lc-mask[hidden] {
  display: none;
}

#lc-widget.lc-open .lc-bubble {
  display: none;
}

#lc-widget .lc-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: min(640px, 92vw);
  height: min(720px, 90vh);
  overflow: hidden;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .3);
  transform: translate(-50%, -50%);
  animation: lc-in .22s cubic-bezier(.22, 1, .36, 1);
}

#lc-widget .lc-panel[hidden] {
  display: none;
}

@keyframes lc-in {
  from { opacity: 0; transform: translate(-50%, -48%) scale(.98); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes lc-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#lc-widget .lc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--lc-brand);
  color: #fff;
}

#lc-widget .lc-head-avatar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  color: var(--lc-brand);
  flex: none;
}

#lc-widget .lc-head-avatar::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #cbd2dc;
  border: 2px solid var(--lc-brand);
}

#lc-widget.lc-online .lc-head-avatar::after {
  background: #22c55e;
}

#lc-widget .lc-head-info {
  flex: 1;
  min-width: 0;
}

#lc-widget .lc-head-info strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}

#lc-widget .lc-head-avatar img,
#lc-widget .lc-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

#lc-widget .lc-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-style: normal;
  color: rgba(255, 255, 255, .85);
  font-size: 12px;
}

#lc-widget .lc-status i {
  display: none;
}

#lc-widget .lc-status em {
  font-style: normal;
}

#lc-widget.lc-online .lc-status em,
#lc-widget.lc-offline .lc-status em {
  color: rgba(255, 255, 255, .85);
}

#lc-widget .lc-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, .85);
  cursor: pointer;
  flex: none;
}

#lc-widget .lc-close:hover {
  background: rgba(255, 255, 255, .16);
  color: #fff;
}

#lc-widget .lc-notice {
  padding: 8px 22px;
  background: #fff8ec;
  border-bottom: 1px solid #fbe6c4;
  color: #b0790f;
  font-size: 12.5px;
  line-height: 1.6;
}

#lc-widget .lc-notice[hidden] {
  display: none;
}

#lc-widget .lc-ended {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--lc-line);
}

#lc-widget .lc-rate[hidden] + .lc-ended {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}

#lc-widget .lc-ended[hidden] {
  display: none;
}

#lc-widget .lc-ended span {
  color: var(--lc-muted);
  font-size: 13.5px;
}

#lc-widget .lc-restart {
  flex: none;
  padding: 8px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--lc-brand);
  color: #fff;
  font-family: inherit;
  font-size: 13.5px;
  cursor: pointer;
}

#lc-widget .lc-restart:hover {
  opacity: .9;
}

#lc-widget .lc-end {
  flex: none;
  padding: 4px 10px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}

#lc-widget .lc-end[hidden] {
  display: none;
}

#lc-widget .lc-end:hover {
  background: rgba(15, 23, 42, .1);
  color: var(--lc-text);
}

#lc-widget .lc-head-info + .lc-end {
  margin-left: auto;
}

#lc-widget .lc-input[hidden],
#lc-widget .lc-bar[hidden] {
  display: none;
}

#lc-widget .lc-body {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--lc-bg);
}

#lc-widget .lc-msgs {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 26px;
}

/* 最后一个元素的 margin-bottom 会算进 scrollHeight，内容没超出也会撑出滚动条 */
#lc-widget .lc-msgs > *:last-child {
  margin-bottom: 0;
}

#lc-widget .lc-note {
  width: fit-content;
  max-width: 86%;
  margin: 0 auto 18px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .055);
  color: var(--lc-muted);
  font-size: 12.5px;
  line-height: 1.7;
  text-align: center;
}

#lc-widget .lc-day {
  margin: 18px 0;
  color: var(--lc-muted);
  font-size: 12px;
  text-align: center;
}

#lc-widget .lc-welcome {
  max-width: 440px;
  margin-bottom: 22px;
  padding: 14px;
  border: 1px solid #e6ebf5;
  border-radius: 14px;
  background: #fbfcfe;
}

#lc-widget .lc-welcome-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

#lc-widget .lc-welcome-text {
  flex: 1;
  min-width: 0;
  color: #2c3338;
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-line;
}

#lc-widget .lc-quick {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

#lc-widget .lc-quick button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 9px;
  background: #eef1f7;
  color: #1f2937;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease;
}

#lc-widget .lc-quick button:hover {
  background: #e2e8f3;
}

#lc-widget .lc-quick-label {
  flex: 1;
  min-width: 0;
}

#lc-widget .lc-quick-arrow {
  display: flex;
  flex: none;
  opacity: .45;
}

#lc-widget .lc-handoff {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 11px 14px;
  border: 1px solid #d7dde7;
  border-radius: 999px;
  background: #fff;
  color: #2c3338;
  font: inherit;
  font-size: 13.5px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}

#lc-widget .lc-handoff:hover {
  border-color: var(--lc-brand);
  color: var(--lc-brand);
}

#lc-widget .lc-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

#lc-widget .lc-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
}

#lc-widget .lc-contact svg {
  width: 20px;
  height: 20px;
}

#lc-widget .lc-contact:hover {
  transform: translateY(-1px);
  opacity: .92;
}

#lc-widget .lc-contact-qr {
  margin-top: 10px;
}

#lc-widget .lc-contact-qr img {
  display: block;
  width: 150px;
  height: 150px;
  border: 1px solid var(--lc-line);
  border-radius: 10px;
  object-fit: cover;
}

#lc-widget .lc-row {
  display: block;
  margin-bottom: 16px;
  animation: lc-row-in .24s cubic-bezier(.22, 1, .36, 1) backwards;
}

#lc-widget .lc-head-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

#lc-widget .lc-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  overflow: hidden;
  border-radius: 50%;
  background: rgba(37, 99, 235, .1);
  color: var(--lc-brand);
  font-size: 14px;
  font-weight: 600;
}

#lc-widget .lc-name {
  color: #6b7484;
  font-size: 12.5px;
  font-weight: 500;
}

#lc-widget .lc-time {
  color: var(--lc-muted);
  font-size: 11.5px;
  white-space: nowrap;
}

#lc-widget .lc-read {
  color: #b0b7c3;
  font-size: 11.5px;
  white-space: nowrap;
}

#lc-widget .lc-read.is-read {
  color: #1a9e6a;
}

#lc-widget .lc-read.is-fail {
  color: #e5484d;
}

#lc-widget .lc-row.lc-group {
  margin-top: -8px;
}

#lc-widget .lc-row.is-fail {
  cursor: pointer;
}

#lc-widget .lc-row.is-fail .lc-msg {
  box-shadow: 0 0 0 1px #f3b4b6;
}

#lc-widget .lc-row.lc-cardrow .lc-msg {
  padding: 0;
  background: transparent;
  box-shadow: none;
}

#lc-widget .lc-newline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: #9aa4b2;
  font-size: 12px;
}

#lc-widget .lc-newline::before,
#lc-widget .lc-newline::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e4e8ef;
}

#lc-widget .lc-sys {
  width: fit-content;
  max-width: 86%;
  margin: 14px auto;
  padding: 6px 14px;
  border-radius: 999px;
  background: #eceff4;
  color: #6b7785;
  font-size: 12.5px;
  line-height: 1.6;
  text-align: center;
  animation: lc-sys-in .3s cubic-bezier(.22, 1, .36, 1) backwards;
}

@keyframes lc-sys-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

#lc-widget .lc-msg {
  width: fit-content;
  max-width: 74%;
  margin-left: 42px;
  padding: 11px 15px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
  font-size: 14.5px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}

#lc-widget .lc-row.lc-me .lc-head-row {
  justify-content: flex-end;
}

#lc-widget .lc-row.lc-me .lc-msg {
  margin-left: auto;
  background: var(--lc-brand);
  color: #fff;
}

#lc-widget .lc-jump {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border: 1px solid #e2e6ec;
  border-radius: 999px;
  background: #fff;
  color: #56617a;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .1);
  transform: translateX(-50%);
  animation: lc-fade .18s ease backwards;
}

#lc-widget .lc-jump[hidden] {
  display: none;
}

#lc-widget .lc-jump:hover {
  border-color: var(--lc-brand);
  color: var(--lc-brand);
}

#lc-widget .lc-typing .lc-msg {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 15px 16px;
}

#lc-widget .lc-typing .lc-msg i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b6bdc9;
  animation: lc-dot 1.1s infinite ease-in-out;
}

#lc-widget .lc-typing .lc-msg i:nth-child(2) {
  animation-delay: .16s;
}

#lc-widget .lc-typing .lc-msg i:nth-child(3) {
  animation-delay: .32s;
}

#lc-widget .lc-foot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 20px 12px;
  border-top: 1px solid var(--lc-line);
  background: #fff;
}

#lc-widget .lc-pending {
  padding: 12px 20px 0;
}

#lc-widget .lc-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}

#lc-widget .lc-bar-sp {
  flex: 1;
}

#lc-widget .lc-tool {
  width: 32px;
  height: 32px;
  margin-bottom: 0;
  align-self: center;
}

#lc-widget .lc-hint {
  margin-right: 10px;
  color: #b3bac6;
  font-size: 12px;
  white-space: nowrap;
}

#lc-widget .lc-promo {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

#lc-widget .lc-promo[hidden] {
  display: none;
}

#lc-widget .lc-promo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

#lc-widget .lc-promo-x {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #9aa4b2;
  cursor: pointer;
}

#lc-widget .lc-promo-x:hover {
  background: #eef1f5;
  color: #667085;
}

#lc-widget .lc-promo-item {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border: 1px solid #d9e2f2;
  border-radius: 999px;
  background: #f4f7fd;
  color: var(--lc-brand);
  font-size: 12.5px;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease;
}

#lc-widget .lc-promo-item:hover {
  background: #e8f0fd;
  border-color: var(--lc-brand);
}

#lc-widget button.lc-promo-item {
  font: inherit;
  font-size: 12.5px;
  line-height: 1.3;
  cursor: pointer;
}

#lc-widget .lc-copy {
  color: #b3bac6;
  font-size: 11.5px;
  line-height: 1.4;
  text-align: center;
}

#lc-widget .lc-pop {
  bottom: 168px;
}

#lc-widget .lc-input {
  width: 100%;
  min-height: 44px;
  max-height: 180px;
  padding: 11px 14px;
  border: 1px solid var(--lc-line);
  border-radius: 12px;
  background: #fff;
  color: var(--lc-text);
  font: inherit;
  font-size: 14.5px;
  line-height: 1.7;
  resize: none;
  outline: none;
  transition: border-color .15s ease;
}

#lc-widget .lc-input:focus {
  border-color: var(--lc-brand);
}

#lc-widget .lc-send {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  height: 34px;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  background: var(--lc-brand);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  flex: none;
  transition: background .15s ease, opacity .15s ease;
}

#lc-widget .lc-send:hover:not(:disabled) {
  background: var(--lc-brand-dark);
}

#lc-widget .lc-send:disabled {
  opacity: .45;
  cursor: default;
}

@media (max-width: 640px) {
  #lc-widget {
    right: 16px;
    bottom: 16px;
  }
  #lc-widget .lc-mask {
    display: none;
  }
  #lc-widget .lc-panel {
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    transform: none;
    animation: none;
  }
  #lc-widget .lc-head {
    padding: 14px 16px;
  }
  #lc-widget .lc-msgs {
    padding: 16px;
  }
  #lc-widget .lc-foot {
    padding: 12px 14px calc(14px + env(safe-area-inset-bottom));
  }
  #lc-widget .lc-pending {
    padding: 10px 14px 0;
  }
  #lc-widget .lc-entry-msg {
    max-width: 64vw;
  }
  #lc-widget .lc-input {
    min-height: 44px;
  }
  #lc-widget .lc-hint {
    display: none;
  }
  #lc-widget .lc-msg {
    max-width: 72%;
  }
  #lc-widget .lc-welcome-text {
    font-size: 13.5px;
  }
  #lc-widget.lc-left {
    right: auto;
    left: 16px;
  }
}

/* 入口靠左：整体贴左侧，气泡与按钮左对齐，引导气泡箭头镜像 */
#lc-widget.lc-left {
  right: auto;
  left: 24px;
}

#lc-widget.lc-left .lc-entry,
#lc-widget.lc-left .lc-entry-msgs {
  align-items: flex-start;
}

#lc-widget.lc-left .lc-tip {
  right: auto;
  left: 68px;
}

#lc-widget.lc-left .lc-tip::after {
  right: auto;
  left: -5px;
  border-top: 0;
  border-right: 0;
  border-bottom: 1px solid var(--lc-line);
  border-left: 1px solid var(--lc-line);
}

#lc-widget .lc-done {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  border: 1px solid var(--lc-line);
  border-radius: 12px;
  background: #f9fafc;
}

#lc-widget .lc-done[hidden] {
  display: none;
}

#lc-widget .lc-rate {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#lc-widget .lc-rate[hidden] {
  display: none;
}

#lc-widget .lc-rate-tip {
  color: var(--lc-text);
  font-size: 13.5px;
}

#lc-widget .lc-rate-stars {
  display: flex;
  gap: 4px;
}

#lc-widget .lc-rate-stars button {
  padding: 0 2px;
  border: 0;
  background: none;
  color: #d6dae2;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: color .12s ease, transform .12s ease;
}

#lc-widget .lc-rate-stars button:hover {
  transform: scale(1.08);
}

#lc-widget .lc-rate-stars button.is-on {
  color: #f5a623;
}

#lc-widget .lc-rate-text {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--lc-line);
  border-radius: 8px;
  background: #fff;
  color: var(--lc-text);
  font: inherit;
  font-size: 13px;
  resize: none;
  outline: none;
}

#lc-widget .lc-rate-text:focus {
  border-color: var(--lc-brand);
}

#lc-widget .lc-rate-submit {
  align-self: flex-start;
  height: 32px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--lc-brand);
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}

#lc-widget .lc-rate-submit:disabled {
  opacity: .45;
  cursor: default;
}

#lc-widget .lc-rate-thanks {
  display: none;
  color: #1a7f5a;
  font-size: 13.5px;
}

#lc-widget .lc-rate.is-done .lc-rate-tip,
#lc-widget .lc-rate.is-done .lc-rate-stars,
#lc-widget .lc-rate.is-done .lc-rate-text,
#lc-widget .lc-rate.is-done .lc-rate-submit {
  display: none;
}

#lc-widget .lc-rate.is-done .lc-rate-thanks {
  display: block;
}

#lc-widget .lc-confirm {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, .28);
  border-radius: inherit;
}

#lc-widget .lc-confirm[hidden] {
  display: none;
}

#lc-widget .lc-confirm-box {
  width: 82%;
  max-width: 320px;
  padding: 18px 18px 14px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .22);
  text-align: center;
}

#lc-widget .lc-confirm-box p {
  margin: 0 0 14px;
  color: var(--lc-text);
  font-size: 14px;
  line-height: 1.6;
}

#lc-widget .lc-confirm-act {
  display: flex;
  gap: 8px;
  justify-content: center;
}

#lc-widget .lc-confirm-act button {
  min-width: 88px;
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
}

#lc-widget .lc-confirm-cancel {
  border: 1px solid var(--lc-line);
  background: #fff;
  color: var(--lc-text);
}

#lc-widget .lc-confirm-ok {
  border: 0;
  background: var(--lc-brand);
  color: #fff;
}

#lc-widget .lc-confirm-ok:hover {
  background: var(--lc-brand-dark);
}

#lc-widget .lc-inquiry[hidden] {
  display: none;
}

#lc-widget .lc-inquiry-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#lc-widget .lc-inquiry-form[hidden] {
  display: none;
}

#lc-widget .lc-inquiry-tip {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: var(--lc-muted);
  font-size: 13px;
  line-height: 1.6;
}

#lc-widget .lc-inquiry-tip::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 7px;
  border-radius: 50%;
  background: #cbd2dc;
}

#lc-widget .lc-inquiry-done {
  padding: 12px 14px;
  border: 1px solid #b7e2c8;
  border-radius: 10px;
  background: #eaf7f0;
  color: #1a7f5a;
  font-size: 13.5px;
  line-height: 1.6;
}

#lc-widget .lc-inquiry-done[hidden] {
  display: none;
}

#lc-widget .lc-inquiry-name,
#lc-widget .lc-inquiry-contact,
#lc-widget .lc-inquiry-msg {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--lc-line);
  border-radius: 10px;
  background: #fbfcfd;
  color: var(--lc-text);
  font: inherit;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s ease, background .15s ease;
}

#lc-widget .lc-inquiry-msg {
  resize: none;
  line-height: 1.6;
}

#lc-widget .lc-inquiry-name:focus,
#lc-widget .lc-inquiry-contact:focus,
#lc-widget .lc-inquiry-msg:focus {
  border-color: var(--lc-brand);
  background: #fff;
}

#lc-widget .lc-inquiry-contact.is-error {
  border-color: #ef4444;
  background: #fff;
}

#lc-widget .lc-inquiry-submit {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: var(--lc-brand);
  color: #fff;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: background .15s ease;
}

#lc-widget .lc-inquiry-submit:hover:not(:disabled) {
  background: var(--lc-brand-dark);
}

#lc-widget .lc-inquiry-submit:disabled {
  opacity: .5;
  cursor: default;
}

#lc-widget .lc-inquiry-attach {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px dashed #d5dbe4;
  border-radius: 8px;
  background: #fff;
  color: #5b6472;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}

#lc-widget .lc-inquiry-attach:hover {
  border-color: var(--lc-brand);
  color: var(--lc-brand);
}

#lc-widget .lc-inquiry-form .lc-pending {
  padding: 0;
}
