:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #222039;
  background: #f8f8fc;
  --muted: #5e6076;
  --line: #e6e5ef;
  --violet: #5133c7;
  --violet-dark: #3d239f;
  --soft: #f0edff;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid #785be8; outline-offset: 3px; }
.shell { max-width: 1056px; width: calc(100% - 64px); margin-inline: auto; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 66px; }
.header-row nav { display: flex; gap: clamp(10px, 3vw, 24px); }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-size: 21px; font-weight: 750; letter-spacing: -.04em; }
.brand-mark { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 11px; background: var(--violet); color: #fff; font-size: 19px; }
.header-link { color: var(--violet-dark); font-size: 14px; font-weight: 650; text-decoration: none; }
.header-link:hover, .share:hover { text-decoration: underline; }
.hero { text-align: center; padding: 57px 0 35px; }
.eyebrow, .section-kicker { color: var(--violet-dark); font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: #7454e4; }
h1 { margin: 14px 0; font-size: clamp(42px, 7vw, 77px); letter-spacing: -.07em; line-height: 1.08; }
h1 em { font-style: normal; color: var(--violet); }
.intro { margin: 0 auto 23px; max-width: 480px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.primary { border: 0; border-radius: 12px; padding: 11px 20px; background: var(--violet); color: #fff; font-weight: 700; box-shadow: 0 5px 12px #4225a725; }
.primary span, .send span { margin-left: 4px; }
.primary:hover:not(:disabled), .send:hover:not(:disabled) { background: var(--violet-dark); }
.primary:disabled { opacity: .6; }
.notice { margin: 0; color: #9a2336; font-size: 13px; }
.notice:not(:empty) { margin-top: 12px; }
.experience { scroll-margin-top: 20px; padding: 0 0 38px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.section-kicker { margin: 0 0 3px; }
h2 { font-size: clamp(21px, 4vw, 29px); margin: 0; letter-spacing: -.04em; }
.duration { flex-shrink: 0; margin: 0; padding: 6px 11px; border-radius: 100px; background: #efedf9; color: #514b72; font-size: 12px; font-variant-numeric: tabular-nums; }
.panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.panels.single { grid-template-columns: minmax(0, 1fr); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 4px 16px #28204c0b; overflow: hidden; }
.panel-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.role-icon { flex: 0 0 37px; height: 37px; display: grid; place-items: center; border-radius: 11px; background: var(--soft); color: var(--violet-dark); font-weight: 750; }
.panel[data-role="agent"] .role-icon { color: #13634c; background: #e5f6ef; }
.role-label { flex: 1; }
.role-label h3, .role-label p { margin: 0; }
.role-label h3 { font-size: 15px; }
.role-label p { margin-top: 2px; font-size: 12px; color: var(--muted); }
.status { border-radius: 99px; background: #efeff5; color: #515266; padding: 4px 8px; font-size: 11px; white-space: nowrap; }
.status[data-online="true"] { background: #e5f6ef; color: #146249; }
.messages { height: 214px; background: #fcfcff; overflow: auto; padding: 14px 16px; overscroll-behavior: contain; }
.empty { display: grid; min-height: 100%; place-items: center; color: var(--muted); text-align: center; font-size: 13px; }
.message { display: flex; flex-direction: column; align-items: start; gap: 2px; margin-bottom: 9px; }
.message.mine { align-items: end; }
.message span { color: var(--muted); font-size: 11px; }
.message p { margin: 0; padding: 7px 10px; max-width: 90%; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 14px; line-height: 1.5; border-radius: 4px 12px 12px 12px; background: #ededf5; }
.message.mine p { background: var(--soft); color: #372175; border-radius: 12px 4px 12px 12px; }
.preview .messages { height: 258px; }
@media (prefers-reduced-motion: no-preference) {
  .preview .message { animation: message-in 250ms ease-out both; }
  @keyframes message-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
form { display: flex; gap: 8px; align-items: center; border-top: 1px solid var(--line); padding: 10px 12px 5px; }
textarea { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; resize: vertical; max-height: 120px; font-size: 14px; color: inherit; }
textarea:disabled { background: #f8f8fb; }
.send { flex-shrink: 0; background: var(--violet); color: #fff; font-size: 13px; border: 0; border-radius: 9px; padding: 8px 11px; }
.send:disabled { background: #eae7f4; color: #5d5675; }
.panel-bottom { display: flex; gap: 8px; justify-content: space-between; min-height: 32px; align-items: center; padding: 2px 14px 8px; font-size: 11px; }
.panel-error { color: #9a2336; }
.share { color: var(--violet-dark); font-weight: 650; text-decoration: none; white-space: nowrap; }
.footnote { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.marketing { border-top: 1px solid var(--line); padding: 30px 0 38px; scroll-margin-top: 20px; }
.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.plan-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 19px 22px; }
.plan-card h3 { margin: 0; font-size: 16px; }
.plan-card p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.plan-card .plan-price { color: var(--violet-dark); }
.plan-price strong { font-size: 30px; }
.contact-intro { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.contact-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; max-width: 600px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.contact-form label { font-size: 14px; font-weight: 650; }
.contact-form input, .contact-form textarea { border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; color: inherit; width: 100%; }
.contact-form input { margin-bottom: 5px; }
.contact-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 5px; }
.contact-status { margin: 0; color: #146249; font-size: 13px; }
.contact-status[data-error="true"] { color: #9a2336; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.shared-view .hero, .shared-view .full-site { display: none; }
.shared-view .experience { max-width: 580px; margin: 38px auto 0; }
@media (max-width: 680px) {
  .shell { width: calc(100% - 28px); }
  .header-row { min-height: 54px; }
  .hero { padding: 42px 0 32px; }
  .intro { font-size: 14px; }
  .panels { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .plan-grid { grid-template-columns: minmax(0, 1fr); }
  .messages { height: 170px; }
  .section-heading { align-items: start; }
}

.account-page { padding-block: 42px; }
.account-card { max-width: 720px; margin-inline: auto; }
.account-card h1 { font-size: clamp(27px, 5vw, 39px); margin: 5px 0 10px; }
.account-card .contact-form { max-width: none; margin-top: 12px; }
.account-dialog { max-width: min(440px, calc(100% - 28px)); padding: 24px; border: 1px solid var(--line); border-radius: 16px; color: inherit; }
.account-dialog::backdrop { background: rgb(24 19 44 / 45%); }
.account-dialog h2 { margin: 0; }
.account-dialog .contact-status:not(:empty) { margin-top: 12px; }
.account-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.account-nav button, .account-secondary { border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; }
.account-nav button:not(.primary), .account-secondary { background: #fff; color: var(--violet-dark); }
.account-nav button[aria-pressed="true"] { background: var(--soft); border-color: #d7ccff; }
.account-alert { color: #684106; background: #fff2d9; padding: 10px 13px; border-radius: 9px; }
.account-heading { align-items: center; flex-wrap: wrap; }
.account-heading .footnote { margin: 0; overflow-wrap: anywhere; }
.account-section { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: clamp(18px, 4vw, 28px); margin-top: 16px; }
.account-service { background: #f1faf6; border-color: #d8ece4; }
.service-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.service-status, .payment-intro { margin: 7px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.account-service .contact-actions:not(:empty) { margin-top: 14px; }
.account-service .contact-actions:not(:has(:not([hidden]))) { display: none; }
.account-service .contact-status:not(:empty) { margin-top: 10px; }
.desk-cta { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 13px 19px; border-radius: 12px; background: #146249; color: #fff; font-weight: 750; text-decoration: none; }
.desk-cta:hover { background: #0d4d39; }
.payment-balance { margin: 0; font-size: 13px; color: var(--muted); }
.payment-balance strong { color: #222039; }
.payment-picker { display: grid; gap: 8px; }
.payment-picker label, .payment-fields label { font-size: 14px; font-weight: 650; }
.payment-picker .footnote, .payment-fields .footnote { margin: 0; line-height: 1.5; }
.payment-picker button { justify-self: start; }
.payment-order { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.payment-transfer { display: grid; grid-template-columns: 144px minmax(0, 1fr); align-items: start; gap: 20px; }
.payment-code { margin: 0; text-align: center; font-size: 12px; color: var(--muted); }
.payment-code img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; }
.payment-code figcaption { margin-top: 6px; }
.payment-fields { display: grid; gap: 6px; }
.payment-copy { display: flex; gap: 8px; margin-bottom: 4px; }
.payment-copy input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #f8f8fc; color: inherit; font: inherit; font-size: 13px; }
.payment-copy button { white-space: nowrap; font-size: 13px; }
.payment-copy .payment-amount { font-weight: 750; font-variant-numeric: tabular-nums; }
.payment-order .contact-actions { margin-top: 16px; }
.payment-note:not(:empty), .payment-details { margin-top: 14px; }
.payment-details summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.payment-details label { display: block; margin-top: 8px; font-size: 13px; }
.payment-details #orders { margin-top: 8px; }
.order-card { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; margin-bottom: 6px; overflow-wrap: anywhere; font-size: 13px; }
.account-card select { border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; font: inherit; color: inherit; background: #fff; width: 100%; }
.contact-form input[type="checkbox"] { width: auto; margin: 0 5px 0 0; }
@media (max-width: 520px) {
  .desk-cta { width: 100%; }
  .payment-transfer { grid-template-columns: minmax(0, 1fr); }
}

.desk-page { padding-block: 28px; }
.desk-page h1 { font-size: clamp(28px, 5vw, 44px); margin-block: 6px 15px; }
.desk-toolbar, .embed-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-block: 10px; }
.desk-toolbar select { font: inherit; max-width: 60%; padding: 6px 9px; border-radius: 7px; border: 1px solid var(--line); background: #fff; }
.desk-layout { display: grid; grid-template-columns: minmax(155px, 1fr) minmax(0, 2.8fr); gap: 12px; margin-bottom: 20px; }
.desk-inbox { padding: 13px; max-height: 415px; overflow: auto; color: var(--muted); }
.desk-inbox h2, .desk-chat h2 { font-size: 16px; color: #222039; margin-bottom: 7px; }
.chat-row { display: block; width: 100%; padding: 9px 7px; text-align: start; background: #fff; border: 0; border-bottom: 1px solid var(--line); color: inherit; }
.chat-row[aria-pressed="true"] { color: var(--violet-dark); background: var(--soft); }
.desk-chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px; }
.desk-chat-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.desk-chat .messages { height: 290px; }
.chat-compose { display: grid; padding: 10px 12px; }
.chat-compose-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chat-compose-actions .send { margin-inline-start: auto; }
.chat-compose kbd { margin-inline-start: 3px; font: inherit; font-size: .78em; }
.image-picker, .remove-image { position: relative; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--violet-dark); font-size: 12px; }
.image-picker { cursor: pointer; overflow: hidden; }
.image-picker:focus-within { outline: 2px solid var(--violet); outline-offset: 2px; }
.image-picker input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.chat-image { display: block; max-width: min(100%, 290px); max-height: 220px; object-fit: contain; border-radius: 8px; margin-top: 4px; }
.visitor-form-settings, .widget-contact { display: grid; gap: 7px; min-width: 0; margin: 4px 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; }
.visitor-form-settings legend, .widget-contact legend { font-weight: 700; }
.visitor-form-settings .footnote, .widget-contact .footnote { margin: 0; }
.widget-contact label { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 6px; font-size: 13px; }
.widget-contact span, .visitor-profile h3 span { color: var(--muted); font-size: 12px; font-weight: 500; }
.widget-contact input { grid-column: 1 / -1; min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; color: inherit; }
.widget-shell:has(#widget-contact:not([hidden])) .messages:empty { display: none; }
.visitor-profile { padding: 9px 14px; border-top: 1px solid var(--line); }
.visitor-profile h3 { margin: 0 0 5px; font-size: 14px; }
.visitor-profile dl { display: flex; gap: 6px 16px; flex-wrap: wrap; margin: 0; font-size: 13px; }
.visitor-profile dl div { display: flex; gap: 5px; min-width: 0; }
.visitor-profile dt { flex-shrink: 0; color: var(--muted); }
.visitor-profile dd { margin: 0; overflow-wrap: anywhere; }
#invite-dialog .contact-form { padding: 0; border: 0; margin-top: 14px; }
.integration-doc { max-width: 760px; }
.integration-doc section { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: clamp(16px, 4vw, 26px); margin-top: 16px; }
.integration-doc p { line-height: 1.65; margin-bottom: 0; }
.integration-doc code { overflow-wrap: anywhere; }
.integration-doc pre { max-width: 100%; overflow: auto; padding: 12px; border-radius: 8px; background: var(--soft); }
#identity-secret { flex: 1 1 260px; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.embed-controls textarea { max-width: 580px; flex: 1 1 300px; }
.widget-page { padding: 4px; }
.widget-page[data-theme="blue"] { --violet:#2357a7; --violet-dark:#163c76; --soft:#eaf2ff; }
.widget-page[data-theme="green"] { --violet:#176449; --violet-dark:#104934; --soft:#e5f7ee; }
.widget-shell h1 { margin: 0; font-size: 18px; letter-spacing: normal; }
.widget-shell .messages { height: clamp(155px, 48vh, 320px); }
.widget-shell .panel-top img { width: 36px; height: 36px; object-fit: contain; }
.widget-welcome { margin: 0; padding: 10px 14px; color: var(--muted); font-size: 13px; }
.widget-welcome:empty { display: none; }
@media (max-width: 620px) {
  .desk-layout { grid-template-columns: minmax(0,1fr); }
  .desk-inbox { max-height: 190px; }
}
