/* build: 20261026-enterprise */
:root {
  /* 大厂支付风：主色蚂蚁蓝 #1677FF + 中性 Slate + 深色 Hero */
  --brand-primary: #1677ff;
  --brand-primary-hover: #0958d9;
  --brand-primary-active: #003eb3;
  --brand-primary-light: #e6f4ff;
  --brand-primary-muted: #69b1ff;

  --blue-600: var(--brand-primary);
  --blue-700: var(--brand-primary-hover);
  --accent-gold: var(--brand-primary-muted);

  --neutral-950: #0b1220;
  --neutral-900: #111827;
  --neutral-800: #1e293b;
  --gray-900: #0f172a;
  --gray-700: #334155;
  --gray-600: #64748b;
  --gray-300: #cbd5e1;

  --hero-text-muted: rgb(226 232 240 / 0.86);
  --hero-stat-value: #91caff;
  --hero-stat-label: rgb(186 224 255 / 0.72);
  --shadow-brand: 0 8px 24px rgb(22 119 255 / 0.28);
  --success: #16a34a;
  --border: #e2e8f0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #111827;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

/* Nav */
.site-nav {
  background: #fff;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav .inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  min-height: 4rem;
  height: auto;
  padding: 0.625rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
  line-height: 1;
}

.brand-logo {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  flex-shrink: 0;
  object-fit: contain;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.02em;
  line-height: 1.2;
  flex-shrink: 0;
}

.nav-cta {
  display: none;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: var(--brand-primary);
  border-radius: 9999px;
  box-shadow: var(--shadow-brand);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.nav-cta:hover {
  transform: translateY(-1px);
  background: var(--brand-primary-hover);
  box-shadow: 0 10px 28px rgb(22 119 255 / 0.32);
}

@media (min-width: 768px) {
  .nav-links .nav-cta {
    display: inline-flex;
  }
}

.brand-sub {
  font-size: 0.8125rem;
  color: var(--gray-600);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateY(1px);
}

.nav-links {
  display: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--gray-700);
  font-size: 0.9375rem;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--blue-600);
}

/* Language picker (Coinepay-style) */
.lang-picker-root {
  position: relative;
  flex-shrink: 0;
}

.lang-picker-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0.375rem 0.75rem;
  border: none;
  border-radius: 0.625rem;
  background: #f3f4f6;
  color: #111827;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.lang-picker-trigger:hover {
  background: #e5e7eb;
}

.lang-picker-flag {
  font-size: 1.125rem;
  line-height: 1;
}

.lang-picker-chevron {
  color: #6b7280;
  flex-shrink: 0;
}

.lang-picker-menu {
  position: absolute;
  top: calc(100% + 0.375rem);
  right: 0;
  min-width: 11.5rem;
  max-height: 16.5rem;
  overflow-y: auto;
  padding: 0.375rem;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.12), 0 2px 6px rgb(0 0 0 / 0.06);
  z-index: 200;
}

.lang-picker-option {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: #111827;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
}

.lang-picker-option:hover {
  background: #f9fafb;
}

.lang-picker-option.active {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  font-weight: 600;
}

#safari-gate .lang-picker--gate {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top, 0px));
  left: max(0.75rem, env(safe-area-inset-left, 0px));
  z-index: 100002;
  margin: 0;
}

#safari-gate .lang-picker--gate .lang-picker-trigger {
  background: rgb(255 255 255 / 0.14);
  color: #f8fafc;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#safari-gate .lang-picker--gate .lang-picker-trigger:hover {
  background: rgb(255 255 255 / 0.22);
}

#safari-gate .lang-picker--gate .lang-picker-chevron {
  color: rgb(255 255 255 / 0.75);
}

#safari-gate .lang-picker--gate .lang-picker-menu {
  top: calc(100% + 0.375rem);
  left: 0;
  right: auto;
  z-index: 100003;
}

@media (max-width: 767px) {
  .lang-picker--nav-mobile {
    margin-left: auto;
    margin-right: 0.125rem;
  }
}

.menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  min-width: 3rem;
  min-height: 3rem;
  padding: 0;
  margin: -0.375rem -0.5rem -0.375rem 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 0.5rem;
  color: var(--gray-700);
  position: relative;
  z-index: 110;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.menu-btn:hover {
  background: #f3f4f6;
}

.menu-btn:active {
  background: #e5e7eb;
}

.menu-btn .icon-close {
  display: none;
}

.site-nav.is-menu-open .menu-btn .icon-menu {
  display: none;
}

.site-nav.is-menu-open .menu-btn .icon-close {
  display: block;
}

.lang-picker--nav-mobile {
  display: block;
}

.nav-links .lang-picker-root {
  display: none;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
    align-items: center;
  }
  .nav-links .lang-picker-root {
    display: block;
    margin-left: 0.5rem;
  }
  .lang-picker--nav-mobile {
    display: none;
  }
  .menu-btn {
    display: none;
  }
}

.mobile-nav-panel {
  display: none;
  width: 100%;
  background: #fff;
  border-top: 1px solid #e5e7eb;
}

.mobile-nav-panel.open {
  display: block;
  box-shadow: 0 12px 24px -12px rgb(0 0 0 / 0.18);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  padding: 0.375rem 0 1rem;
}

.mobile-nav-links a {
  display: block;
  padding: 0.9375rem 1rem;
  color: var(--gray-700);
  font-size: 1rem;
  line-height: 1.25;
  border-bottom: 1px solid #f3f4f6;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-links a:last-child {
  border-bottom: none;
  padding-bottom: 1.125rem;
}

.mobile-nav-links a.active {
  color: var(--blue-600);
  font-weight: 600;
}

@media (max-width: 767px) {
  .brand {
    max-width: calc(100% - 3.25rem);
  }
}

body.is-mobile-menu-open {
  overflow: hidden;
}

main {
  flex: 1;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    165deg,
    var(--neutral-950) 0%,
    #0f172a 45%,
    var(--neutral-800) 100%
  );
  padding: 5rem 0;
  text-align: center;
  color: #fff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231677ff' fill-opacity='0.4'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 88% 52% at 50% -12%,
    rgb(22 119 255 / 0.22),
    transparent 58%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: rgb(22 119 255 / 0.14);
  border: 1px solid rgb(22 119 255 / 0.32);
  color: #bae0ff;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 700;
  margin: 0 0 1.5rem;
  line-height: 1.15;
}

.hero h1 .gradient {
  background: linear-gradient(to right, #e6f4ff, #69b1ff, var(--brand-primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--hero-text-muted);
  max-width: 56rem;
  margin: 0 auto 2rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 56rem;
  margin: 0 auto 2rem;
}

@media (min-width: 768px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-card {
  background: rgb(255 255 255 / 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: 0.5rem;
  padding: 1rem;
}

.hero .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--hero-stat-value);
}

.hero .stat-label {
  font-size: 0.875rem;
  color: var(--hero-stat-label);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-primary);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.hero .btn-primary {
  background: var(--brand-primary);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow-brand);
}

.hero .btn-primary:hover {
  background: var(--brand-primary-hover);
}

.hero .btn-outline {
  border-color: rgb(105 177 255 / 0.5);
  color: #dbeafe;
}

.hero .btn-outline:hover {
  background: rgb(22 119 255 / 0.14);
  color: #fff;
}

.btn-primary {
  background: var(--brand-primary);
  color: #fff;
  box-shadow: var(--shadow-brand);
}

.btn-primary:hover {
  background: var(--brand-primary-hover);
}

.btn-outline {
  background: rgb(0 0 0 / 0.2);
  border: 1px solid rgb(105 177 255 / 0.45);
  color: #bfdbfe;
}

.btn-outline:hover {
  background: rgb(22 119 255 / 0.16);
  color: #fff;
}

.btn-secondary {
  background: #f3f4f6;
  color: #111827;
}

.btn-secondary:hover {
  background: #e5e7eb;
}

.btn-white {
  background: #fff;
  color: var(--blue-600);
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-white {
  background: #fff;
}

.section-gray {
  background: #f9fafb;
}

.section-blue {
  background: var(--blue-600);
  color: #fff;
  text-align: center;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  text-align: center;
  margin: 0 0 3rem;
}

.section-title .accent {
  color: var(--blue-600);
}

.section-blue .section-title {
  color: #fff;
}

.prose {
  max-width: 56rem;
  margin: 0 auto;
  color: var(--gray-700);
}

.prose p {
  margin: 0 0 1rem;
}

.grid-2 {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.grid-3 {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.05);
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  color: var(--blue-600);
}

.card-center {
  text-align: center;
}

.icon-circle {
  width: 4rem;
  height: 4rem;
  max-width: 100%;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  padding: 0.25rem;
  font-weight: 700;
  font-size: clamp(0.6875rem, 2.8vw, 0.9375rem);
  line-height: 1.15;
  text-align: center;
  color: #fff;
  overflow: hidden;
  word-break: keep-all;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.check-list li {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--gray-700);
}

.check-list li::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}

.panel-blue {
  background: linear-gradient(135deg, var(--brand-primary-light), #f0f5ff);
  padding: 2rem;
  border-radius: 1rem;
}

.page-hero {
  background: linear-gradient(165deg, var(--neutral-950) 0%, #0f172a 50%, #1e3a5f 100%);
  color: #fff;
  padding: 3.5rem 0;
  text-align: center;
}

.page-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.page-hero p {
  margin: 0 auto;
  max-width: 40rem;
  color: #bfdbfe;
  font-size: 1.0625rem;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

table.data-table th,
table.data-table td {
  border: 1px solid #e5e7eb;
  padding: 0.75rem 1rem;
  text-align: left;
}

table.data-table th {
  background: #f3f4f6;
  font-weight: 600;
}

.contact-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.contact-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.contact-card .label {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 0.5rem;
}

.contact-card .value {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--blue-600);
}

.contact-card a.value:hover {
  text-decoration: underline;
}

.faq details {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}

.faq summary {
  font-weight: 600;
  cursor: pointer;
}

.faq p {
  margin: 0.75rem 0 0;
  color: var(--gray-600);
  font-size: 0.9375rem;
}

/* Footer */
.site-footer {
  background: var(--gray-900);
  color: #fff;
  padding: 2rem 0;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.site-footer h3,
.site-footer h4 {
  margin: 0 0 1rem;
}

.site-footer h3 {
  color: #60a5fa;
  font-size: 1.25rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #d1d5db;
  font-size: 0.9375rem;
}

.footer-links a:hover {
  color: #fff;
}

.footer-meta {
  color: #d1d5db;
  font-size: 0.9375rem;
}

.footer-meta a {
  color: #d1d5db;
}

.footer-meta a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #374151;
  margin-top: 2rem;
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
  color: #9ca3af;
  font-size: 0.875rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* Safari gate */
#safari-gate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(ellipse 120% 80% at 50% -20%, rgb(22 119 255 / 0.32), transparent 55%),
    linear-gradient(165deg, var(--neutral-950) 0%, #0f172a 48%, #1e3a5f 100%);
  color: #fff;
  padding: max(1.5rem, env(safe-area-inset-top)) 1.25rem max(1.5rem, env(safe-area-inset-bottom));
  text-align: center;
  overflow-y: auto;
}

#safari-gate.is-visible {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#safari-gate .gate-inner {
  width: 100%;
  max-width: 22rem;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 1.5rem;
  border-radius: 1.25rem;
  background: rgb(255 255 255 / 0.06);
  border: 1px solid rgb(255 255 255 / 0.12);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#safari-gate .gate-icon {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.25rem;
  border-radius: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 8px 24px rgb(22 119 255 / 0.35);
}

#safari-gate .gate-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

#safari-gate h1 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.875rem;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

#safari-gate .gate-body p {
  max-width: none;
  margin: 0 0 0.625rem;
  color: #bfdbfe;
  font-size: 0.875rem;
  line-height: 1.65;
}

#safari-gate .gate-msg p:last-child {
  margin-bottom: 0;
}

#safari-gate .gate-steps {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  text-align: left;
  width: 100%;
}

#safari-gate .gate-steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.625rem 0;
  color: #e0e7ff;
  font-size: 0.875rem;
  line-height: 1.5;
  border-bottom: none;
}

#safari-gate .gate-steps li + li {
  border-top: 1px solid rgb(255 255 255 / 0.08);
}

#safari-gate .gate-steps li.gate-step-copy[data-gate-copy-url] {
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  -webkit-tap-highlight-color: rgb(56 189 248 / 0.25);
  border-radius: 0;
  background: transparent;
  background-color: transparent;
  box-shadow: none;
  outline: none;
}

#safari-gate .gate-steps li.gate-step-copy.gate-step-copy--pressed,
#safari-gate .gate-steps li.gate-step-copy:active {
  background: rgb(255 255 255 / 0.06);
  background-color: rgb(255 255 255 / 0.06);
}

#safari-gate .gate-steps li.gate-step-copy:focus-visible {
  outline: 2px solid rgb(56 189 248 / 0.55);
  outline-offset: 2px;
}

#safari-gate .gate-steps li:last-child {
  padding-bottom: 0;
}

#safari-gate .gate-step-index {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  background: rgb(22 119 255 / 0.35);
  border: 1px solid rgb(105 177 255 / 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

#safari-gate .gate-step-text {
  flex: 1;
  min-width: 0;
  padding-top: 0.125rem;
  text-decoration: none;
  border: none;
  box-shadow: none;
}

#safari-gate .gate-step-text--copy {
  cursor: pointer;
  text-decoration: none !important;
  border: none;
  border-bottom: none;
  box-shadow: none;
  outline: none;
  -webkit-text-decoration: none;
}

#safari-gate .gate-step-text--copy:hover,
#safari-gate .gate-step-text--copy:focus-visible {
  color: #fff;
}

#safari-gate .gate-brand {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgb(255 255 255 / 0.1);
  font-size: 0.75rem;
  color: rgb(191 219 254 / 0.75);
  letter-spacing: 0.02em;
}

body.gate-active main,
body.gate-active .site-nav,
body.gate-active .site-footer {
  visibility: hidden;
}

/* ===== CS floating chat widget ===== */
.cs-widget {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1200;
  font-family: inherit;
  pointer-events: none;
}

.cs-widget > * {
  pointer-events: auto;
}

.cs-launcher {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: none;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-primary, #1677ff), #0958d9);
  box-shadow: 0 10px 28px rgb(22 119 255 / 0.35);
  border-radius: 9999px;
  padding: 0.85rem 1.1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cs-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgb(22 119 255 / 0.42);
}

.cs-launcher-badge {
  position: absolute;
  top: -0.2rem;
  right: -0.15rem;
  min-width: 1.15rem;
  height: 1.15rem;
  border-radius: 9999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.cs-open .cs-launcher-badge {
  display: none;
}

.cs-launcher--pulse {
  animation: cs-pulse 1.8s ease-in-out infinite;
}

@keyframes cs-pulse {
  0%, 100% { box-shadow: 0 10px 28px rgb(22 119 255 / 0.35); }
  50% { box-shadow: 0 10px 28px rgb(22 119 255 / 0.35), 0 0 0 10px rgb(22 119 255 / 0.12); }
}

.cs-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.75rem);
  width: min(24rem, calc(100vw - 1.5rem));
  height: min(72vh, 42rem);
  max-height: min(72vh, 42rem);
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 20px 50px rgb(15 23 42 / 0.22);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.cs-open .cs-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.cs-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  color: #fff;
}

.cs-head-main {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.cs-head strong {
  display: block;
  font-size: 0.975rem;
}

.cs-head p {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: rgb(226 232 240 / 0.82);
}

.cs-online-dot {
  width: 0.65rem;
  height: 0.65rem;
  margin-top: 0.35rem;
  border-radius: 9999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgb(34 197 94 / 0.25);
  flex-shrink: 0;
}

.cs-close {
  border: none;
  background: rgb(255 255 255 / 0.12);
  color: #fff;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
}

.cs-body {
  padding: 0.9rem;
  overflow-y: auto;
  background: #f8fafc;
  flex: 1;
}

.cs-bubbles {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.cs-bubble {
  align-self: flex-start;
  max-width: 92%;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem 0.85rem 0.85rem 0.25rem;
  padding: 0.65rem 0.8rem;
  font-size: 0.875rem;
  color: #0f172a;
  line-height: 1.45;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.cs-bubble--in {
  animation: cs-bubble-in 0.28s ease;
}

@keyframes cs-bubble-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.cs-bubble--typing {
  display: inline-flex;
  gap: 0.28rem;
  align-items: center;
  padding: 0.75rem 0.9rem;
}

.cs-bubble--typing span {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 9999px;
  background: #94a3b8;
  animation: cs-dot 1.1s infinite ease-in-out;
}

.cs-bubble--typing span:nth-child(2) { animation-delay: 0.15s; }
.cs-bubble--typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes cs-dot {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

.cs-channels {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.5rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.cs-channels--show {
  opacity: 1;
  transform: translateY(0);
}

.cs-channel {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.75rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cs-channel:hover {
  border-color: #91caff;
  box-shadow: 0 4px 14px rgb(22 119 255 / 0.12);
}

.cs-channel strong {
  font-size: 0.875rem;
}

.cs-channel span {
  font-size: 0.75rem;
  color: #64748b;
}

.cs-ch--tg { border-left: 3px solid #229ed9; }
.cs-ch--wa { border-left: 3px solid #25d366; }
.cs-ch--qq { border-left: 3px solid #12b7f5; }
.cs-ch--phone { border-left: 3px solid #1677ff; }
.cs-ch--mail { border-left: 3px solid #64748b; }

body.gate-active .cs-widget {
  display: none !important;
}

@media (max-width: 480px) {
  .cs-widget {
    right: 0.75rem;
    bottom: 0.75rem;
  }
  .cs-launcher-label {
    display: none;
  }
  .cs-launcher {
    width: 3.25rem;
    height: 3.25rem;
    padding: 0;
    justify-content: center;
  }
}


.cs-bubble--user {
  align-self: flex-end;
  background: linear-gradient(135deg, #1677ff, #0958d9);
  color: #fff;
  border-color: transparent;
  border-radius: 0.85rem 0.85rem 0.25rem 0.85rem;
}

.cs-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.cs-quick--show {
  opacity: 1;
  transform: translateY(0);
}

.cs-quick-btn {
  border: 1px solid #91caff;
  background: #fff;
  color: #0958d9;
  border-radius: 9999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  cursor: pointer;
  line-height: 1.3;
}

.cs-quick-btn:hover {
  background: #e6f4ff;
}

.cs-composer {
  border-top: 1px solid #e2e8f0;
  background: #fff;
  padding: 0.65rem 0.75rem;
}

.cs-composer-form {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.cs-input {
  flex: 1;
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  padding: 0.55rem 0.85rem;
  font-size: 0.875rem;
  outline: none;
  background: #f8fafc;
}

.cs-input:focus {
  border-color: #69b1ff;
  background: #fff;
  box-shadow: 0 0 0 3px rgb(22 119 255 / 0.12);
}

.cs-input:disabled {
  opacity: 0.6;
}

.cs-send {
  flex-shrink: 0;
  border: none;
  border-radius: 9999px;
  padding: 0.55rem 0.95rem;
  background: linear-gradient(135deg, #1677ff, #0958d9);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.cs-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cs-panel {
  height: min(72vh, 42rem);
  max-height: min(72vh, 42rem);
}

.cs-body {
  min-height: 0;
}



/* cs layout fix: body scrolls, quick/composer stay put */
.cs-panel {
  display: flex;
  flex-direction: column;
  height: min(72vh, 42rem);
  max-height: min(72vh, 42rem);
}

.cs-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.cs-quick {
  flex-shrink: 0;
  margin: 0;
  padding: 0.55rem 0.75rem 0.15rem;
  background: #fff;
  border-top: 1px solid #eef2f7;
}

.cs-composer {
  flex-shrink: 0;
}




/* 隐藏时彻底不占位；展示时跟在聊天气泡流里 */
.cs-channels[hidden],
.cs-channels:not(.cs-channels--show) {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
}

.cs-channels.cs-channels--show {
  display: grid !important;
  margin-top: 0.55rem;
  padding: 0;
  border: none;
  background: transparent;
  max-height: none;
  overflow: visible;
  gap: 0.4rem;
  width: 100%;
}

.cs-channels.cs-channels--show .cs-channel {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.1rem;
  padding: 0.65rem 0.75rem;
}


/* cs panel taller viewport */
.cs-panel {
  width: min(24rem, calc(100vw - 1.5rem));
  height: min(72vh, 42rem);
  max-height: min(72vh, 42rem);
}

.cs-body {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
}

@media (max-width: 480px) {
  .cs-panel {
    width: calc(100vw - 1.25rem);
    height: min(78vh, 40rem);
    max-height: min(78vh, 40rem);
  }
}


/* 联系方式 = 聊天气泡内嵌内容 */
.cs-bubble--contacts {
  max-width: 100%;
  width: 100%;
  align-self: stretch;
  padding: 0.75rem 0.85rem;
}

.cs-contacts-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.55rem;
}

.cs-bubble--contacts .cs-channels,
.cs-bubble--contacts .cs-channels.cs-channels--show {
  display: grid !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  opacity: 1 !important;
  transform: none !important;
  gap: 0.4rem;
  width: 100%;
}

.cs-bubble--contacts .cs-channel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.65rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  color: inherit;
}

.cs-bubble--contacts .cs-channel:hover {
  border-color: #91caff;
  background: #e6f4ff;
}
