:root {
  color-scheme: dark;
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  color: #f3f4fa;
  background: #08090d;
  --muted: #acafbd;
  --line: #ffffff19;
  --blue: #2d7ee8;
  --green: #45d984;
  --panel: #141620;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, p { margin: 0; }
body { min-height: 100vh; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid #80baff;
  outline-offset: 3px;
}
.visitor-page {
  background:
    radial-gradient(ellipse at 17% 23%, #123153 0%, transparent 37%),
    radial-gradient(ellipse at 86% 22%, #261736 0%, transparent 34%),
    radial-gradient(ellipse at 62% 91%, #101e2f 0%, transparent 37%),
    linear-gradient(180deg, #0b0b10, #050507);
}
.landing {
  min-height: 100dvh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 24px;
  padding: 32px 18px 54px;
}
.landing-card {
  width: min(100%, 480px);
  text-align: center;
  border: 1px solid #ffffff21;
  border-radius: 30px;
  padding: 40px 34px 30px;
  background: linear-gradient(155deg, #ffffff12, #ffffff07 62%, #ffffff0b);
  box-shadow: 0 30px 80px #0008, inset 0 1px #ffffff13;
}
.logo-tile {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 24px;
  margin: 0 auto 18px;
  background: linear-gradient(135deg, #0071e3, #8e4cff);
  box-shadow: 0 12px 34px #3665fe47;
}
.logo-tile svg { width: 36px; height: 36px; }
.landing h1 { font-size: 26px; font-weight: 650; letter-spacing: -.4px; }
.subtitle { color: var(--muted); font-size: 15px; line-height: 1.55; margin-top: 8px; }
.signal {
  position: relative;
  display: grid;
  place-items: center;
  width: 176px;
  aspect-ratio: 1;
  margin: 26px auto 30px;
  color: #eef3ff;
  border-radius: 50%;
  border: 1px solid #5b89ec40;
  background: radial-gradient(circle, #3a62c155, #2c40752e 65%, transparent 73%);
}
.signal svg { width: 76px; filter: drop-shadow(0 0 16px #5b9cff); }
.signal-ring {
  position: absolute;
  inset: 8%;
  border: 1px solid #78a6ff87;
  border-radius: 50%;
  animation: ripple 3.2s ease-out infinite;
}
.signal-ring:nth-child(2) { animation-delay: -1.6s; }
@keyframes ripple { from { opacity: .8; transform: scale(.74); } to { opacity: 0; transform: scale(1.22); } }
.notice {
  display: flex;
  align-items: flex-start;
  text-align: left;
  gap: 10px;
  padding: 15px;
  border: 1px solid #ff9f0a37;
  border-radius: 15px;
  background: #ff9f0a0d;
  font-size: 14px;
  line-height: 1.65;
}
.notice svg { color: #ff9f0a; flex: 0 0 19px; margin-top: 2px; }
.contact {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  color: #e1e7f3;
  border: 1px solid #55c8a32a;
  border-radius: 15px;
  background: #1d8f7713;
  text-align: left;
  font-size: 14px;
}
.contact:hover { background: #1d8f772c; }
.presence-dot { width: 8px; height: 8px; border-radius: 50%; background: #a1a7b5; }
.contact.online .presence-dot { background: var(--green); box-shadow: 0 0 12px #45d98488; }
.contact-arrow { margin-left: auto; color: #8edbc5; }
.landing-tip, .landing footer { color: #999dad; font-size: 13px; }
.landing-tip { margin-top: 18px; line-height: 1.65; }
.splash {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 50% 44%, #142040, #050507 51%);
}
.splash-inner { width: min(54vw, 220px); text-align: center; }
.splash-icon { width: 82px; margin-bottom: 22px; color: #f4f7ff; }
.splash p { margin-top: 12px; font-size: 12px; color: var(--muted); }
.progress-track { height: 5px; border-radius: 8px; overflow: hidden; background: #ffffff25; }
.progress-track span { display: block; width: 100%; height: 100%; background: #73a8ff; animation: boot .65s ease-out both; }
@keyframes boot { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.chat-toggle {
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: white;
  background: #1668d7;
  box-shadow: 0 12px 35px #0008, 0 0 20px #2466d535;
}
.chat-toggle:hover, .primary:hover { background: #255db8; }
.chat-toggle svg { width: 28px; height: 28px; }
.chat-panel {
  position: fixed;
  z-index: 2;
  right: max(22px, env(safe-area-inset-right));
  bottom: calc(max(22px, env(safe-area-inset-bottom)) + 72px);
  display: flex;
  flex-direction: column;
  width: min(370px, calc(100vw - 44px));
  height: min(475px, calc(100dvh - 112px));
  color: #172134;
  background: #f7f9fd;
  border-radius: 19px;
  overflow: hidden;
  color-scheme: light;
  box-shadow: 0 20px 55px #0008;
}
.chat-head, .conversation-head, .workbench-head, .inbox-head, .pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.chat-head { color: white; background: #185fc2; padding: 15px 17px; }
.chat-head h2, .conversation-head h2 { font-size: 17px; }
.chat-head p { font-size: 12px; margin-top: 5px; color: #e5efff; }
.icon-button { color: inherit; background: none; border: 0; font-size: 28px; line-height: 1; min-width: 40px; min-height: 40px; }
.messages { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 16px; }
.welcome, .message-body { padding: 10px 12px; border-radius: 12px; line-height: 1.55; font-size: 14px; }
.welcome { background: #e8eef8; margin-bottom: 16px; }
.message { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 12px; }
.message.mine { align-items: flex-end; }
.message-body { max-width: 88%; white-space: pre-wrap; overflow-wrap: anywhere; background: #e9eef7; }
.visitor-messages .mine .message-body { color: white; background: #185fc2; }
.message time { margin-top: 4px; font-size: 11px; color: #59647a; }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid #9daecf38; }
.composer textarea, .login-card input {
  width: 100%;
  min-width: 0;
  resize: none;
  border: 1px solid #9daecf62;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  padding: 8px 9px;
  line-height: 1.35;
  font-size: 14px;
}
.primary, .secondary {
  min-height: 37px;
  border-radius: 9px;
  padding: 8px 12px;
  border: 1px solid transparent;
  white-space: nowrap;
  font-size: 14px;
  color: white;
}
.primary { background: #185fc2; }
.secondary { border-color: #ffffff29; background: #ffffff08; }
.secondary:hover:not(:disabled) { background: #ffffff16; }
.form-feedback { color: #b52726; font-size: 12px; padding: 3px 12px 8px; }
.admin-page .form-feedback { color: #ffadad; }
.admin-page { background: #101117; }
.login-view { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login-card {
  width: min(100%, 390px);
  display: grid;
  gap: 14px;
  padding: 29px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 19px;
}
.login-card h1, .workbench h1 { font-size: 23px; }
.login-card p, .login-card label, .workbench-head p, .conversation-head p { color: var(--muted); font-size: 13px; }
.login-card .form-feedback { padding: 0; }
.login-card input { min-height: 43px; }
.workbench { padding: 20px; width: min(100%, 1200px); margin: auto; }
.workbench-head { margin-bottom: 16px; }
.workbench-head p, .conversation-head p { margin-top: 4px; }
.desk {
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 14px;
  overflow: hidden;
}
.inbox, .desk-detail { min-height: min(640px, calc(100dvh - 108px)); min-width: 0; }
.inbox { display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.inbox-head, .conversation-head, .pagination { padding: 13px; border-bottom: 1px solid var(--line); }
.inbox-head h2 { font-size: 16px; }
.inbox-head span, .empty-list { font-size: 13px; color: var(--muted); }
.empty-list { padding: 14px; }
.conversation-list { max-height: min(535px, calc(100dvh - 208px)); overflow: auto; flex: 1; }
.conversation-item {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  background: transparent;
  color: inherit;
  text-align: left;
}
.conversation-item:hover { background: #ffffff0a; }
.conversation-item[aria-pressed="true"] { background: #276bd63a; }
.conversation-item span { display: block; font-size: 13px; }
.conversation-item .summary { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; }
.pagination { border-bottom: 0; border-top: 1px solid var(--line); }
.desk-detail { display: flex; }
.empty-detail { align-self: center; margin: auto; color: var(--muted); font-size: 14px; padding: 20px; }
.active-detail { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.agent-messages { height: min(480px, calc(100dvh - 270px)); }
.agent-messages .message-body { background: #242a38; }
.agent-messages .mine .message-body { background: #2057a2; }
.agent-messages time { color: var(--muted); }
@media (max-width: 600px) {
  .landing-card { padding: 30px 22px 25px; border-radius: 24px; }
  .landing h1 { font-size: 22px; }
  .logo-tile { width: 66px; height: 66px; }
  .signal { width: 146px; margin: 22px auto 25px; }
  .signal svg { width: 60px; }
  .chat-toggle, .chat-panel { right: max(13px, env(safe-area-inset-right)); }
  .chat-panel { width: min(370px, calc(100vw - 26px)); }
  .workbench { padding: 12px; }
  .desk { grid-template-columns: 1fr; }
  .inbox, .desk-detail { min-height: 0; }
  .inbox { border-right: 0; border-bottom: 1px solid var(--line); }
  .conversation-list { max-height: 158px; }
  .agent-messages { height: 270px; }
}
@media (prefers-reduced-motion: reduce) {
  .signal-ring, .progress-track span { animation: none; }
}

.visitor-page {
  color: var(--site-text, #f3f4fa);
  background:
    radial-gradient(ellipse at 17% 23%, var(--site-glow-blue, #123153), transparent 37%),
    radial-gradient(ellipse at 86% 22%, var(--site-glow-purple, #261736), transparent 34%),
    linear-gradient(180deg, var(--site-bg-top, #0b0b10), var(--site-bg-bottom, #050507));
}
.landing-card {
  width: min(100%, var(--site-card-width, 480px));
  padding: calc(var(--site-card-padding, 34px) + 6px) var(--site-card-padding, 34px) var(--site-card-padding, 34px);
  border-radius: var(--site-card-radius, 30px);
  border-color: var(--site-card-border, #363740);
  background: linear-gradient(155deg, var(--site-card-top, #23242d), var(--site-card-bottom, #111218));
}
.landing h1 { font-size: var(--site-title-size, 26px); overflow-wrap: anywhere; }
.subtitle { color: var(--site-muted, #acafbd); font-size: var(--site-body-size, 15px); white-space: pre-wrap; }
.landing-tip, .landing footer { color: var(--site-muted, #acafbd); white-space: pre-wrap; overflow-wrap: anywhere; }
.logo-tile {
  width: var(--site-brand-size, 76px);
  height: var(--site-brand-size, 76px);
  color: var(--site-icon, #eef3ff);
  border-radius: var(--site-brand-radius, 24px);
  background: linear-gradient(135deg, var(--site-brand-start, #0071e3), var(--site-brand-end, #8e4cff));
}
[data-icon] { display: inline-grid; place-items: center; line-height: 1; }
[data-icon] svg, [data-icon] img { display: block; width: 100%; height: 100%; object-fit: contain; }
.logo-tile [data-icon] {
  width: var(--site-brand-icon-scale, 48%);
  height: var(--site-brand-icon-scale, 48%);
  font-size: calc(var(--site-brand-size, 76px) * .45);
}
.logo-tile img { object-fit: var(--site-brand-image-fit, contain); }
.logo-tile { overflow: hidden; }
[data-brand-frame="solid"] .logo-tile { background: var(--site-brand-background, #276be3); }
[data-brand-frame="none"] .logo-tile { background: transparent; box-shadow: none; }
.no-brand-shadow .logo-tile { box-shadow: none; }
.signal {
  width: var(--site-signal-size, 176px);
  color: var(--site-icon, #eef3ff);
  border-color: var(--site-ring, #78a6ff);
  border-width: var(--site-ring-width, 1px);
}
.signal [data-icon] {
  width: var(--site-signal-icon-scale, 44%);
  height: var(--site-signal-icon-scale, 44%);
  font-size: calc(var(--site-signal-size, 176px) * .35);
}
.signal img { object-fit: var(--site-signal-image-fit, contain); }
.signal-ring {
  border-color: var(--site-ring, #78a6ff);
  border-width: var(--site-ring-width, 1px);
  animation-duration: var(--site-ring-duration, 3.2s);
  pointer-events: none;
}
.signal-ring:nth-child(2) { animation-delay: calc(var(--site-ring-duration, 3.2s) * -.5); }
.still-ring .signal-ring { animation: none; opacity: .35; }
[data-signal-fill="solid"] .signal { background: var(--site-signal-background, #17233f); }
[data-signal-fill="none"] .signal { background: transparent; }
.no-signal-shadow .signal svg { filter: none; }
[data-ring-style="none"] .signal { border-color: transparent; }
[data-ring-style="none"] .signal-ring { display: none; }
[data-ring-style="rainbow"] .signal { border: 0; }
[data-ring-style="rainbow"] .signal::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: var(--site-ring-width, 1px);
  border-radius: 50%;
  background: conic-gradient(#ff9f0a, #ff375f, #8e4cff, #0071e3, #64d2ff, #30d158, #ff9f0a);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: rainbow-turn var(--site-ring-duration, 3.2s) linear infinite;
  pointer-events: none;
  z-index: 1;
}
.still-ring .signal::before { animation: none; }
@keyframes rainbow-turn { to { transform: rotate(360deg); } }
.notice { background: var(--site-notice-bg, #242017); font-size: calc(var(--site-body-size, 15px) - .5px); }
.notice p { white-space: pre-wrap; overflow-wrap: anywhere; }
.notice > [data-icon] { color: var(--site-notice, #ff9f0a); flex: 0 0 19px; width: 19px; height: 19px; margin-top: 2px; font-size: 19px; }
.notice > [data-icon]:empty { display: none; }
.contact { background: var(--site-contact-bg, #12221f); color: var(--site-text, #f3f4fa); font-size: calc(var(--site-body-size, 15px) - 1px); }
.contact.online .presence-dot { background: var(--site-online, #45d984); }
.contact-icon { width: 19px; height: 19px; flex: 0 0 19px; font-size: 19px; }
.contact-icon:empty { display: none; }
.splash { background: radial-gradient(ellipse at 50% 44%, var(--site-glow-blue, #123153), var(--site-bg-bottom, #050507) 60%); }
.splash-icon { height: 82px; color: var(--site-icon, #eef3ff); font-size: 72px; }
.splash p { color: var(--site-muted, #acafbd); }
.progress-track span { animation-duration: var(--site-splash-duration, 690ms); background: var(--site-brand-start, #0071e3); }
.chat-toggle {
  right: max(var(--site-chat-offset, 22px), env(safe-area-inset-right));
  bottom: max(var(--site-chat-offset, 22px), env(safe-area-inset-bottom));
  width: var(--site-toggle-size, 60px);
  height: var(--site-toggle-size, 60px);
  background: var(--site-toggle, #1668d7);
  color: var(--site-toggle-icon-color, #ffffff);
  border-radius: var(--site-toggle-radius, 50%);
  overflow: hidden;
}
.chat-toggle [data-icon] {
  width: var(--site-toggle-icon-scale, 47%);
  height: var(--site-toggle-icon-scale, 47%);
  font-size: calc(var(--site-toggle-size, 60px) * .45);
}
.chat-toggle img { object-fit: var(--site-toggle-image-fit, contain); }
[data-toggle-frame="none"] .chat-toggle { background: transparent; box-shadow: none; }
.no-toggle-shadow .chat-toggle { box-shadow: none; }
[data-icon][data-image-shape="rounded"] > img { border-radius: 22%; }
[data-icon][data-image-shape="circle"] > img { border-radius: 50%; }
.chat-panel {
  right: max(var(--site-chat-offset, 22px), env(safe-area-inset-right));
  bottom: calc(max(var(--site-chat-offset, 22px), env(safe-area-inset-bottom)) + var(--site-toggle-size, 60px) + 12px);
  width: min(var(--site-chat-width, 370px), calc(100vw - var(--site-chat-offset, 22px) * 2));
  height: min(var(--site-chat-height, 475px), calc(100dvh - var(--site-chat-offset, 22px) * 2 - var(--site-toggle-size, 60px) - 12px));
  color: var(--site-chat-text, #172134);
  background: var(--site-chat-bg, #f7f9fd);
  border-radius: var(--site-chat-radius, 19px);
}
[data-chat-side="left"] .chat-toggle, [data-chat-side="left"] .chat-panel {
  left: max(var(--site-chat-offset, 22px), env(safe-area-inset-left));
  right: auto;
}
.chat-head { color: var(--site-chat-head-text, #fff); background: var(--site-chat-accent, #185fc2); }
.chat-head > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.chat-head p { color: inherit; }
.chat-avatar {
  flex: 0 0 var(--site-avatar-size, 38px);
  width: var(--site-avatar-size, 38px);
  height: var(--site-avatar-size, 38px);
  font-size: calc(var(--site-avatar-size, 38px) * .8);
}
.chat-avatar img { object-fit: var(--site-avatar-image-fit, cover); }
.visitor-messages .welcome { white-space: pre-wrap; overflow-wrap: anywhere; }
[data-welcome-position="bottom"] .visitor-messages { display: flex; flex-direction: column; }
[data-welcome-position="bottom"] .visitor-messages > * { flex-shrink: 0; }
[data-welcome-position="bottom"] .visitor-messages:not(:has(.message)) .welcome { margin-top: auto; }
.visitor-page .primary { background: var(--site-chat-accent, #185fc2); }
.visitor-messages .message-body, .visitor-messages .welcome { background: var(--site-agent-bubble, #e9eef7); }
.visitor-messages .mine .message-body { color: var(--site-visitor-bubble-text, #fff); background: var(--site-visitor-bubble, #185fc2); }
.landing { gap: var(--site-footer-gap, 24px); }
.landing .site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(100%, var(--site-card-width, 480px));
  color: var(--site-footer-color, #acafbd);
  font-size: var(--site-footer-size, 13px);
  text-align: center;
  line-height: 1.7;
  white-space: normal;
}
.footer-copy p { white-space: pre-wrap; }
.footer-icon { flex-shrink: 0; width: var(--site-footer-logo-size, 24px); height: var(--site-footer-logo-size, 24px); }
.footer-icon:empty { display: none; }
.footer-copy { min-width: 0; overflow-wrap: anywhere; }
.footer-copy a { color: inherit; text-underline-offset: 3px; }
[data-footer-align="left"] .site-footer { justify-content: flex-start; text-align: left; }
[data-footer-align="right"] .site-footer { justify-content: flex-end; text-align: right; }
[data-footer-surface="panel"] .site-footer { padding: 12px 18px; background: var(--site-footer-background, #141620); border-radius: 12px; }
[data-background-style="plain"] { background: linear-gradient(180deg, var(--site-bg-top), var(--site-bg-bottom)); }
[data-background-style="grid"] {
  background-image:
    linear-gradient(color-mix(in srgb, var(--site-text) 7%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--site-text) 7%, transparent) 1px, transparent 1px),
    linear-gradient(180deg, var(--site-bg-top), var(--site-bg-bottom));
  background-size: 44px 44px, 44px 44px, 100% 100%;
}
[data-card-style="solid"] .landing-card,
[data-card-style="flat"] .landing-card,
[data-card-style="shadow"] .landing-card { background: var(--site-card-top); }
[data-card-style="flat"] .landing-card { box-shadow: none; }
[data-card-style="shadow"] .landing-card { box-shadow: 0 20px 60px #223f6b16; }
[data-card-style="glass"] .landing-card {
  background: linear-gradient(155deg, color-mix(in srgb, var(--site-card-top) 86%, transparent), color-mix(in srgb, var(--site-card-bottom) 90%, transparent));
  backdrop-filter: blur(18px);
}
[data-card-style="outline"] .landing-card { background: var(--site-card-bottom); box-shadow: 0 0 0 5px #d2ad6308; }
.handoff-bar { display: flex; align-items: center; gap: 9px; padding: 6px 12px; font-size: 12px; color: #5c6880; }
.handoff-bar button { border: 1px solid #a5b5ce; border-radius: 20px; padding: 5px 10px; color: var(--site-chat-accent); background: transparent; font-size: 12px; }
.message[data-kind="auto_reply"] time,
.message[data-kind="handoff"] time { font-style: italic; }
@media (max-width: 600px) {
  .landing-card { padding: min(30px, var(--site-card-padding, 34px)) min(22px, var(--site-card-padding, 34px)); }
  .landing h1 { font-size: min(30px, var(--site-title-size, 26px)); }
  .signal { width: min(var(--site-signal-size, 176px), 60vw); }
}
@media (prefers-reduced-motion: reduce) {
  [data-ring-style="rainbow"] .signal::before { animation: none; }
}

.site-booting .landing,
.site-booting .chat-toggle,
.site-booting .chat-prompt,
.site-booting .unread-badge { visibility: hidden; }
.toggle-breathing .chat-toggle {
  animation: support-breathe var(--site-breathing-duration, 2.6s) ease-in-out infinite;
  transform-origin: center;
}
.avatar-breathing .chat-avatar { animation: support-breathe var(--site-breathing-duration, 2.6s) ease-in-out infinite; }
@keyframes support-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}
.chat-prompt {
  position: fixed;
  z-index: 3;
  right: calc(max(var(--site-chat-offset, 22px), env(safe-area-inset-right)) + var(--site-toggle-size, 60px) + 14px);
  bottom: calc(max(var(--site-chat-offset, 22px), env(safe-area-inset-bottom)) + var(--site-toggle-size, 60px) / 2 - 22px);
  max-width: min(300px, calc(100vw - var(--site-chat-offset, 22px) * 2 - var(--site-toggle-size, 60px) - 18px));
  display: flex;
  align-items: center;
  color: var(--site-prompt-color, #172134);
  background: var(--site-prompt-background, #ffffff);
  border-radius: 12px;
  box-shadow: 0 5px 25px #0003;
}
.chat-prompt::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: 16px;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  background: inherit;
}
.chat-prompt button { border: 0; background: transparent; color: inherit; padding: 12px; font-size: 14px; line-height: 1.4; }
#prompt-open { text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; }
#prompt-close { padding: 8px; align-self: flex-start; font-size: 17px; }
[data-chat-side="left"] .chat-prompt {
  left: calc(max(var(--site-chat-offset, 22px), env(safe-area-inset-left)) + var(--site-toggle-size, 60px) + 14px);
  right: auto;
}
[data-chat-side="left"] .chat-prompt::after { left: -5px; right: auto; }
[data-prompt-animation="float"] .chat-prompt { animation: invitation-float 3s ease-in-out infinite; }
[data-prompt-animation="breathe"] .chat-prompt { animation: support-breathe var(--site-breathing-duration, 2.6s) ease-in-out infinite; }
@keyframes invitation-float { 50% { transform: translateY(-4px); } }
.unread-badge {
  position: fixed;
  z-index: 4;
  right: calc(max(var(--site-chat-offset, 22px), env(safe-area-inset-right)) - 3px);
  bottom: calc(max(var(--site-chat-offset, 22px), env(safe-area-inset-bottom)) + var(--site-toggle-size, 60px) - 15px);
  min-width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid white;
  border-radius: 20px;
  color: white;
  background: var(--site-badge-color, #ef4444);
  font: 600 11px system-ui, sans-serif;
  pointer-events: none;
}
[data-chat-side="left"] .unread-badge {
  left: calc(max(var(--site-chat-offset, 22px), env(safe-area-inset-left)) + var(--site-toggle-size, 60px) - 18px);
  right: auto;
}
.sound-enable { border: 0; border-top: 1px solid #9daecf38; padding: 7px 12px; background: transparent; color: var(--site-chat-accent, #185fc2); font-size: 12px; text-align: left; }
.conversation-head > div { min-width: 0; }
#visitor-ip { overflow-wrap: anywhere; }
.chat-input-wrap { position: relative; flex: 1; min-width: 0; }
.chat-input-wrap textarea { display: block; }
.chat-placeholder {
  position: absolute;
  z-index: 1;
  inset: 9px 10px;
  overflow: hidden;
  color: #7a879f;
  font-size: 14px;
  line-height: 1.35;
  pointer-events: none;
}
.splash { background: radial-gradient(ellipse at 50% 44%, var(--site-splash-glow, #142040), var(--site-splash-background, #050507) 60%); }
.splash-icon {
  width: var(--site-splash-icon-size, 82px);
  height: var(--site-splash-icon-size, 82px);
  font-size: calc(var(--site-splash-icon-size, 82px) * .86);
}
.splash-icon:empty { display: none; }
.splash p { color: var(--site-splash-text, #acafbd); font-size: var(--site-splash-text-size, 12px); white-space: pre-wrap; overflow-wrap: anywhere; }
.splash .progress-track span { width: var(--splash-progress, 0%); background: var(--site-splash-progress, #73a8ff); animation: none; transform: none; }
.splash-spinner, .splash-dots, .splash-ring, .splash .progress-track { display: none; }
[data-splash-style="progress"] .splash .progress-track { display: block; }
[data-splash-style="spinner"] .splash-spinner { display: block; }
[data-splash-style="dots"] .splash-dots { display: flex; }
[data-splash-style="ring"] .splash-ring { display: block; }
.splash-spinner { width: 45px; height: 45px; margin: 0 auto; border: 3px solid #ffffff29; border-top-color: var(--site-splash-progress, #73a8ff); border-radius: 50%; animation: loading-turn 1s linear infinite; }
.splash-dots { justify-content: center; gap: 9px; height: 24px; align-items: center; }
.splash-dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--site-splash-progress, #73a8ff); animation: loading-dot 1s ease-in-out infinite; }
.splash-dots span:nth-child(2) { animation-delay: .15s; }
.splash-dots span:nth-child(3) { animation-delay: .3s; }
.splash-ring {
  width: 58px;
  height: 58px;
  margin: 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--site-splash-progress, #73a8ff) var(--splash-angle, 0deg), #ffffff29 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
}
.splash-running .splash-icon { animation: none; }
[data-splash-icon-animation="breathe"] .splash-running .splash-icon { animation: support-breathe 1.8s ease-in-out infinite; }
[data-splash-icon-animation="spin"] .splash-running .splash-icon { animation: loading-turn 2.4s linear infinite; }
@keyframes loading-turn { to { transform: rotate(360deg); } }
@keyframes loading-dot { 50% { transform: translateY(-6px); opacity: .45; } }
@media (prefers-reduced-motion: reduce) {
  .toggle-breathing .chat-toggle,
  .avatar-breathing .chat-avatar,
  [data-prompt-animation] .chat-prompt,
  .splash-running .splash-icon,
  .splash-spinner,
  .splash-dots span { animation: none !important; }
}
