/* ---------- 启动屏 ---------- */
#splash {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: linear-gradient(160deg, #101a3f 0%, #1c2c66 48%, #2b46a0 100%);
  color: #fff;
  transition: opacity 0.38s ease;
}
#splash.hide {
  opacity: 0;
  pointer-events: none;
}
.splash-logo img {
  display: block;
  width: 168px;
  height: auto;
}
.splash-sub {
  font-size: 12.5px;
  opacity: 0.68;
  letter-spacing: 0.6px;
  margin-top: -8px;
}
.splash-dots {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.splash-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  animation: blink 1.2s ease-in-out infinite;
}
.splash-dots i:nth-child(2) {
  animation-delay: 0.18s;
}
.splash-dots i:nth-child(3) {
  animation-delay: 0.36s;
}

/* ---------- 会话内引导卡片（msg_type=card，浏览器端工位用） ---------- */
.bubble.card-bubble {
  min-width: 218px;
  max-width: 258px;
  padding: 13px 14px 11px;
  background: linear-gradient(160deg, #eef4ff 0%, #f7faff 100%);
  border: 0.5px solid rgba(23, 95, 165, 0.22);
}
.card-bubble .gcard-title {
  font-size: 14.5px;
  font-weight: 500;
  color: #12325c;
  display: flex;
  align-items: center;
  gap: 6px;
}
.card-bubble .gcard-title::before {
  content: "";
  width: 5px;
  height: 16px;
  border-radius: 3px;
  background: #185fa5;
  flex: none;
}
.card-bubble .gcard-sub {
  font-size: 12.5px;
  line-height: 1.65;
  color: #40536e;
  margin-top: 7px;
}
.card-bubble .gcard-btn {
  width: 100%;
  margin-top: 10px;
  border: none;
  background: #185fa5;
  color: #fff;
  font-size: 13.5px;
  padding: 9px 0;
  border-radius: 10px;
}
.card-bubble .gcard-btn:active {
  opacity: 0.85;
}
.card-bubble .gcard-note {
  font-size: 11px;
  color: #7d8ba1;
  line-height: 1.6;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 0.5px dashed rgba(23, 95, 165, 0.25);
}
.card-bubble.app-card {
  min-width: 236px;
  padding: 12px;
}
.card-bubble.ios-card {
  max-width: 100%;
  white-space: normal;
}
.gcard-steps {
  margin-top: 4px;
}
.gcard-step {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #243652;
}
.gcard-num {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: #185fa5;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  line-height: 18px;
  text-align: center;
}
.gcard-step .a2hs-ico {
  display: inline-flex;
  vertical-align: -3px;
  color: #185fa5;
}
.gcard-app {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.gcard-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  flex: none;
  object-fit: cover;
  background: #fff;
}
.gcard-app-main {
  min-width: 0;
}
.gcard-name {
  font-size: 15px;
  font-weight: 600;
  color: #12325c;
}
.gcard-intro {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #40536e;
}

.chat-demo-bubble { padding: 0; background: transparent; border: 0; box-shadow: none; }
.chat-demo-gif { display: block; width: min(280px, calc(100vw - 104px)); height: auto; border-radius: 16px; }
#browser-demo-overlay { position: fixed; inset: 0; z-index: 65; display: grid; place-items: center; overflow: hidden; background: #edf2f8; }
#browser-demo-overlay img { display: block; width: 100%; height: 100%; object-fit: fill; }
html.mode-browser .composer { display: none !important; }

/* ---------- 浏览器中转页（强制引导添加主屏幕） ---------- */
#hsgate {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #101a3f 0%, #1c2c66 48%, #2b46a0 100%);
  color: #fff;
}
#hsgate[hidden] {
  display: none;
}
.hsgate-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 16px 14px;
}
.hsgate-box {
  max-width: 360px;
  width: 100%;
  margin: 0 auto;
}
.hsgate-box > img {
  width: 78px;
  border-radius: 19px;
  display: block;
  margin: 0 auto 12px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}
.hsgate-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  padding: 14px 15px;
  text-align: left;
}
.hsgate-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13.5px;
  line-height: 1.6;
  margin: 9px 0;
}
.hsgate-num {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 7px;
  background: var(--gold);
  color: #101a3f;
  font-weight: 600;
  font-size: 12px;
  font-style: normal;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hsgate-step svg {
  vertical-align: -3px;
}
.hsgate-act {
  margin-top: 16px;
  width: 100%;
  border: none;
  cursor: pointer;
  background: var(--gold);
  color: #101a3f;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 0;
  border-radius: 22px;
}
.hsgate-note {
  font-size: 12px;
  opacity: 0.62;
  margin-top: 12px;
  line-height: 1.7;
  text-align: center;
}
/* 中转页：会话卡片（把对话框包进一张玻璃卡里） */
.hsgate-chatcard {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  padding: 10px 12px 4px;
  margin-bottom: 12px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}
.hsgate-chathead {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.6);
  padding: 2px 0 8px;
  margin-bottom: 2px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.16);
}
/* 中转页：对话框（客服气泡左 / 客户气泡右 / 底部输入条） */
.hsgate-chat {
  margin: 2px 0 4px;
}
.gc-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0;
  animation: gcIn 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.gc-row.me {
  flex-direction: row-reverse;
}
.gc-av {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(160deg, #3c7bff, #2452c8);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.gc-bubble {
  max-width: 76%;
  background: #fff;
  color: #2c3550;
  border-radius: 4px 14px 14px 14px;
  padding: 9px 12px;
  font-size: 13px;
  line-height: 1.65;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  word-break: break-word;
}
.gc-row.me .gc-bubble {
  background: #95ec69;
  color: #123018;
  border-radius: 14px 4px 14px 14px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}
.gc-typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  background: #fff;
  border-radius: 4px 14px 14px 14px;
  padding: 11px 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
.gc-typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #98a2b8;
  animation: gcBlink 1s ease-in-out infinite;
}
.gc-typing i:nth-child(2) {
  animation-delay: 0.15s;
}
.gc-typing i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes gcIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes gcBlink {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}
/* 中转页额度卡片（毛玻璃质感，与深蓝底区分） */
.hsgate-loan {
  width: 100%;
  margin-bottom: 13px;
  padding: 13px 15px 12px;
  border-radius: 16px;
  text-align: left;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(243, 195, 91, 0.38);
}
.hsgate-loan .hl-label {
  font-size: 11.5px;
  letter-spacing: 0.4px;
  color: rgba(255, 255, 255, 0.78);
  display: flex;
  align-items: center;
}
.hsgate-loan .hl-badge {
  margin-left: 7px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(243, 195, 91, 0.92);
  color: #4a3305;
  font-weight: 600;
  letter-spacing: 0;
  flex: none;
}
.hsgate-loan .hl-amount {
  font-size: 30px;
  font-weight: 700;
  margin-top: 3px;
  letter-spacing: 0.5px;
  color: var(--gold);
  line-height: 1.15;
}
.hsgate-loan .hl-amount small {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.85;
  margin-left: 4px;
}
.hsgate-loan .hl-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.62);
  margin-top: 5px;
}
.hsgate-loan .hl-coin {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 64px;
  height: 64px;
  color: var(--gold);
  opacity: 0.16;
  pointer-events: none;
}
/* 额度卡右上角：随心钱包反白 logo */
.hsgate-loan .hl-logo {
  position: absolute;
  right: 12px;
  top: 10px;
  width: 76px;
  height: auto;
  opacity: 0.96;
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}
/* 额度卡内三条卖点 */
.hsgate-perks {
  margin-top: 11px;
  position: relative;
}
.hsgate-perk {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.92);
  margin: 6px 0;
  line-height: 1.4;
}
.hsgate-perk .pk {
  flex: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: rgba(243, 195, 91, 0.16);
  border: 1px solid rgba(243, 195, 91, 0.6);
  color: var(--gold);
  font-size: 10.5px;
  font-style: normal;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 品牌 logo + 引导文案 白色卡片 */
.hsgate-brand {
  display: block;
  background: #fff;
  border-radius: 18px;
  padding: 16px 18px 15px;
  margin: 0 0 12px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}
.hsgate-brand img {
  display: block;
  width: 134px;
  height: auto;
  margin: 0 auto 11px;
}
.hsgate-brand .bdesc {
  font-size: 12.5px;
  line-height: 1.75;
  color: #3a4358;
  text-align: center;
}
/* 步骤里的按钮图标放大凸显 */
.hsgate-step svg {
  width: 22px !important;
  height: 22px !important;
  vertical-align: -6px;
}
.hsgate-step .a2hs-ico {
  color: var(--gold);
  margin-right: 2px;
}
.hsgate-step .a2hs-ico svg {
  vertical-align: -5px;
}

/* ---------- 欢迎语弹窗（从桌面图标进入后引导会话） ---------- */
#welmodal-mask {
  position: fixed;
  inset: 0;
  z-index: 92;
  background: rgba(10, 14, 22, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
#welmodal-mask.show {
  opacity: 1;
  pointer-events: auto;
}
#welmodal {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 93;
  padding: 8px 12px calc(12px + var(--safe-b));
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.3, 0.85, 0.3, 1);
}
#welmodal.show {
  transform: none;
}
.wel-card {
  background: #fff;
  border-radius: 20px;
  max-width: 440px;
  margin: 0 auto;
  overflow: hidden;
  box-shadow: 0 -4px 30px rgba(16, 24, 40, 0.18);
}
.wel-grab {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: #e3e7ee;
  margin: 9px auto 4px;
}
.wel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 0;
}
.wel-ava {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: none;
  background: var(--blue-2);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.wel-ava img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wel-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.wel-role {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 1px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.wel-role .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34c759;
}
.wel-body {
  margin: 12px 18px 0;
  padding: 12px 14px;
  background: #f4f6fa;
  border-radius: 4px 14px 14px 14px;
  font-size: 14px;
  line-height: 1.8;
  color: #2a3346;
  white-space: pre-wrap;
  word-break: break-word;
}
.wel-body .qlink {
  display: inline-block;
  margin: 3px 2px;
  padding: 3px 10px;
  border: 1px solid rgba(43, 108, 240, 0.35);
  border-radius: 15px;
  background: #eef3fe;
  white-space: nowrap;
}
.wel-foot {
  display: flex;
  gap: 10px;
  padding: 14px 18px 16px;
}
.wel-btn {
  flex: 1;
  border: none;
  border-radius: 21px;
  padding: 11px 0;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}
.wel-btn.primary {
  background: var(--blue);
  color: #fff;
}
.wel-btn.primary:active {
  opacity: 0.85;
}
.wel-btn.ghost {
  background: #f1f3f8;
  color: #5c667a;
}

/* App 内新用户欢迎语：顶部卡片，层级高于聊天页 */
#wel-top {
  position: fixed;
  left: 12px;
  right: 12px;
  top: calc(var(--safe-t) + 10px);
  z-index: 96;
  max-width: 440px;
  margin: 0 auto;
  padding: 14px 36px 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.985);
  box-shadow:
    0 12px 32px rgba(16, 24, 40, 0.18),
    0 0 0 1px rgba(16, 24, 40, 0.045);
  transform: translateY(-160%);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.32s cubic-bezier(0.3, 0.9, 0.3, 1),
    opacity 0.22s ease;
}
html.sxq-in-app #wel-top {
  top: calc(var(--android-status, 24px) + 8px);
}
#wel-top.show {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}
#wel-top-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: #f1f3f8;
  color: #5c667a;
  font-size: 14px;
  line-height: 28px;
  cursor: pointer;
}
.wel-top-hd {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wel-top-ava {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: none;
  background: var(--blue-2);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.wel-top-ava img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wel-top-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.wel-top-role {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 1px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.wel-top-role .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34c759;
}
#wel-top-text {
  margin-top: 10px;
  max-height: 34vh;
  overflow: auto;
  padding: 10px 12px;
  background: #f4f6fa;
  border-radius: 4px 14px 14px 14px;
  font-size: 14px;
  line-height: 1.7;
  color: #2a3346;
  white-space: pre-wrap;
  word-break: break-word;
}
#wel-top-text .qlink {
  display: inline-block;
  margin: 3px 2px;
  padding: 3px 10px;
  border: 1px solid rgba(43, 108, 240, 0.35);
  border-radius: 15px;
  background: #eef3fe;
  color: var(--blue);
  font-size: 13px;
  white-space: nowrap;
}

/* ---------- 通知权限引导弹窗（装到桌面 / App 登录后主动问一次） ---------- */
#pushmodal-mask {
  position: fixed;
  inset: 0;
  z-index: 94;
  background: rgba(10, 14, 22, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
#pushmodal-mask.show {
  opacity: 1;
  pointer-events: auto;
}
#pushmodal {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 95;
  padding: 8px 12px calc(12px + var(--safe-b));
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.3, 0.85, 0.3, 1);
}
#pushmodal.show {
  transform: none;
}
.push-card {
  background: #fff;
  border-radius: 20px;
  max-width: 440px;
  margin: 0 auto;
  padding: 20px 20px 15px;
  text-align: center;
  box-shadow: 0 -4px 30px rgba(16, 24, 40, 0.18);
}
.push-bell {
  width: 54px;
  height: 54px;
  margin: 0 auto;
  border-radius: 50%;
  background: #eef3fe;
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
}
.push-title {
  margin-top: 13px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.push-desc {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.72;
  color: #6b7686;
}
.push-desc b {
  color: #2a3346;
  font-weight: 600;
}
.push-foot {
  display: flex;
  gap: 10px;
  margin-top: 17px;
}
.push-tip {
  margin-top: 10px;
  font-size: 11.5px;
  color: #9aa4b5;
}
