/* ============================================================
   08 · 收尾 CTA 横幅 + 09 · 页脚 + Telegram 客服浮窗
   依赖 base.css token；类名统一 s8- 前缀
   ============================================================ */

/* ============================================================
   08 · 收尾横幅
   ============================================================ */
.s8-cta{padding:64px 0;background:var(--white)}
.s8-banner{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:48px;padding:56px;border-radius:var(--r-lg);background:var(--brand);color:#fff;overflow:hidden}
.s8-copy{min-width:0}
.s8-title{max-width:640px;font-family:var(--f-h);font-size:32px;line-height:40px;font-weight:700;letter-spacing:-.02em;color:#fff;text-wrap:balance}
.s8-sub{margin-top:16px;max-width:560px;font-size:14px;line-height:24px;color:rgba(255,255,255,.82)}
.s8-mono{margin-top:24px;font-size:11px;line-height:16px;font-weight:500;letter-spacing:.14em;text-transform:uppercase;color:rgba(255,255,255,.82)}
.s8-actions{display:flex;justify-content:flex-end}

.s8-btn{height:56px;padding:0 24px;border-radius:var(--r-btn);background:#fff;color:var(--brand);font-size:15px;font-weight:600}
.s8-btn .i{width:18px;height:18px}
.s8-btn:hover{background:var(--tint);box-shadow:0 0 0 2px rgba(255,255,255,.62)}

/* ============================================================
   09 · 页脚
   ============================================================ */
.s8-footer{padding:64px 0 32px;background:var(--white);border-top:1px solid var(--line)}
.s8-fgrid{display:grid;grid-template-columns:minmax(0,2.2fr) minmax(0,3fr);gap:64px;align-items:start}
.s8-brand-col{min-width:0}
.s8-word{display:inline-flex;align-items:center;gap:9px}
.s8-word .logo-mark{width:30px;height:30px}
.s8-tagline{margin-top:16px;font-size:14px;line-height:24px;color:var(--ink-3)}
.s8-support{display:inline-flex;align-items:center;gap:8px;margin-top:16px;font-size:14px;line-height:24px;color:var(--ink-2);transition:color .14s ease}
.s8-support .i{color:var(--brand)}
.s8-support:hover{color:var(--ink);text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px;text-decoration-color:var(--ink)}

.s8-cols{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:32px}
.s8-col{min-width:0}
.s8-col-t{font-family:var(--f-mono);font-size:12px;line-height:16px;font-weight:500;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-3)}
.s8-col ul{margin-top:16px}
.s8-col a{display:inline-block;font-size:14px;line-height:32px;color:var(--ink-2);transition:color .14s ease}
.s8-col a:hover{color:var(--ink);text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px;text-decoration-color:var(--ink)}

/* 底部条：padding-bottom 为右下角客服浮窗预留避让空间，避免遮挡正文 */
.s8-fbot{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 24px;margin-top:56px;padding:24px 0 72px;border-top:1px solid var(--line);font-size:14px;line-height:24px;color:var(--ink-3)}
.s8-fbot p{margin:0}
.s8-small{font-size:12px;line-height:20px;color:var(--ink-4)}

/* ============================================================
   Telegram 客服浮窗
   ============================================================ */
.s8-fab{position:fixed;right:24px;bottom:24px;z-index:90;display:flex;align-items:center;gap:12px;max-width:56px;overflow:hidden;padding:8px;background:#fff;border:1px solid var(--line);border-radius:var(--r-pill);box-shadow:var(--shadow);transition:max-width .26s cubic-bezier(.2,.6,.2,1),box-shadow .18s ease,border-color .18s ease,transform .18s ease}
.s8-fab:hover,.s8-fab:focus-visible{max-width:calc(100vw - 48px);padding-right:20px;border-color:var(--line-3);box-shadow:var(--shadow-lg);transform:translateY(-2px)}
.s8-fab:hover .s8-fab-txt,.s8-fab:focus-visible .s8-fab-txt{max-width:260px;opacity:1}
.s8-fab-ic{position:relative;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;flex:none;border-radius:50%;background:var(--tint);color:var(--brand)}
.s8-fab-ic .i{width:20px;height:20px}
.s8-fab-dot{position:absolute;top:1px;right:1px;width:9px;height:9px;border-radius:50%;background:var(--brand);box-shadow:0 0 0 2px #fff}
.s8-fab-txt{display:flex;flex-direction:column;gap:2px;min-width:0;max-width:0;overflow:hidden;opacity:0;transition:max-width .24s cubic-bezier(.2,.6,.2,1),opacity .16s ease}
.s8-fab-txt b{font-size:13px;line-height:18px;font-weight:600;color:var(--ink);white-space:nowrap}
.s8-fab-txt small{font-size:11px;line-height:16px;color:var(--ink-3);white-space:nowrap}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width:1024px){
  .s8-banner{grid-template-columns:1fr;gap:32px;padding:48px}
  .s8-actions{justify-content:flex-start}
  .s8-fgrid{gap:40px}
  .s8-cols{gap:24px}
}

@media (max-width:760px){
  .s8-cta{padding:48px 0}
  .s8-banner{padding:32px;border-radius:var(--r-lg)}
  .s8-title{font-size:28px;line-height:38px}
  .s8-sub{margin-top:12px}
  .s8-mono{margin-top:20px;font-size:10px;letter-spacing:.1em}
  .s8-btn{width:100%;height:auto;min-height:52px;padding:14px 16px;font-size:14px;white-space:normal;line-height:1.4;text-align:center}
  .s8-btn .i{width:16px;height:16px}

  .s8-footer{padding:48px 0 24px}
  /* 768 仍保持「品牌 + 3 栏」四列视觉；375 再换行 */
  .s8-fgrid{gap:32px}

  .s8-fbot{margin-top:40px;padding-bottom:80px;flex-direction:column;align-items:flex-start;gap:4px}
}

@media (max-width:700px){
  .s8-fgrid{grid-template-columns:1fr}
  .s8-cols{gap:16px}
}

@media (max-width:600px){
  .s8-fab,.s8-fab:hover,.s8-fab:focus-visible{right:16px;bottom:16px;width:48px;height:48px;max-width:48px;padding:0;justify-content:center;border-radius:50%;border-color:var(--line-2);box-shadow:var(--shadow-lg);transform:none}
  .s8-fab-ic{width:46px;height:46px}
  .s8-fab-ic .i{width:22px;height:22px}
  .s8-fab-dot{display:none}
  .s8-fab-txt{display:none}
}

@media (max-width:420px){
  .s8-banner{padding:32px 24px}
  .s8-title{font-size:24px;line-height:34px}
  .s8-mono{font-size:9px;letter-spacing:.06em}
  /* 375 下 CTA 保持一行，避免「验」字落单 */
  .s8-btn{font-size:13px;padding:12px;gap:6px}
}

.s8-fab.s8-fab-chat{cursor:pointer}
a.s8-fab[href="https://t.me/WhereRelaySupport"]{display:none}

.s8-chat{
  position:fixed;
  right:24px;
  bottom:96px;
  z-index:95;
  display:flex;
  flex-direction:column;
  width:min(380px,calc(100vw - 48px));
  max-height:min(640px,calc(100vh - 120px));
  overflow:hidden;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  box-shadow:var(--shadow-lg);
  opacity:0;
  transform:translateY(8px);
  pointer-events:none;
  transition:opacity .18s ease,transform .18s ease;
}
.s8-chat.is-open{opacity:1;transform:none;pointer-events:auto}
.s8-chat-head{
  display:flex;
  align-items:center;
  gap:12px;
  flex:none;
  padding:16px;
  border-bottom:1px solid var(--line);
  background:var(--soft);
}
.s8-chat-avatar{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  flex:none;
  border-radius:50%;
  background:var(--tint);
  color:var(--brand);
}
.s8-chat-avatar .i{width:20px;height:20px}
.s8-chat-dot{
  display:inline-block;
  width:6px;
  height:6px;
  flex:none;
  border-radius:50%;
  background:var(--brand);
}
.s8-chat-avatar .s8-chat-dot{
  position:absolute;
  right:1px;
  bottom:2px;
  width:9px;
  height:9px;
  box-shadow:0 0 0 2px var(--soft);
}
.s8-chat-id{min-width:0;flex:1}
.s8-chat-id h2{font-family:var(--f-h);font-size:15px;line-height:22px;font-weight:700;color:var(--ink)}
.s8-chat-id p{display:flex;align-items:center;gap:6px;margin-top:2px;color:var(--ink-3);font-size:11px;line-height:16px}
.s8-chat-close{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  flex:none;
  border:1px solid transparent;
  border-radius:var(--r-btn);
  color:var(--ink-3);
  transition:background-color .16s ease,border-color .16s ease,color .16s ease;
}
.s8-chat-close:hover{background:var(--white);border-color:var(--line-2);color:var(--ink)}
.s8-chat-close .i{width:18px;height:18px}
.s8-chat-body{
  min-height:0;
  padding:16px;
  overflow-y:auto;
  overscroll-behavior:contain;
}
.s8-chat-lead{margin:0 0 16px;color:var(--ink-2);font-size:13px;line-height:21px}
.s8-chat-label{
  margin:0 0 8px;
  color:var(--ink-3);
  font-family:var(--f-mono);
  font-size:10px;
  line-height:16px;
  font-weight:500;
  letter-spacing:.08em;
}
.s8-chat-topics{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.s8-chat-topic{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:2px;
  min-height:52px;
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:var(--r-sm);
  background:var(--white);
  text-align:left;
  transition:background-color .16s ease,border-color .16s ease;
}
.s8-chat-topic:hover{background:var(--tint);border-color:var(--brand-line)}
.s8-chat-topic b{color:var(--ink);font-size:12px;line-height:18px;font-weight:600}
.s8-chat-topic small{color:var(--ink-3);font-size:10px;line-height:15px}
.s8-chat-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.s8-chat-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:40px;
  padding:0 10px;
  border:1px solid var(--line);
  border-radius:6px;
  color:var(--ink-2);
  font-size:11px;
  line-height:16px;
  transition:background-color .16s ease,border-color .16s ease,color .16s ease;
}
.s8-chat-link:hover{background:var(--tint);border-color:var(--brand-line);color:var(--ink)}
.s8-chat-link .i{width:14px;height:14px;color:var(--brand)}
.s8-chat-tg{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:56px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:var(--r-sm);
  background:var(--soft);
  transition:background-color .16s ease,border-color .16s ease;
}
.s8-chat-tg:hover{background:var(--tint);border-color:var(--brand-line)}
.s8-chat-tg-ic{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:32px;
  height:32px;
  flex:none;
  border-radius:50%;
  background:var(--white);
  color:var(--brand);
}
.s8-chat-tg-ic .i{width:17px;height:17px}
.s8-chat-tg-copy{min-width:0;flex:1}
.s8-chat-tg-copy b{display:block;color:var(--ink);font-size:12px;line-height:18px;font-weight:600}
.s8-chat-tg-copy small{display:block;overflow:hidden;color:var(--ink-3);font-family:var(--f-mono);font-size:10px;line-height:15px;text-overflow:ellipsis;white-space:nowrap}
.s8-chat-tg-arrow{width:16px;height:16px;flex:none;color:var(--ink-4)}
.s8-chat-foot{
  flex:none;
  padding:12px 16px 14px;
  border-top:1px solid var(--line);
  background:var(--white);
}
.s8-chat-note{margin:0 0 8px;color:var(--ink-4);font-size:10px;line-height:15px}
.s8-chat-start{width:100%;height:44px;gap:8px}
.s8-chat-start .i{width:17px;height:17px}
.s8-chat-credit{margin:8px 0 0;color:var(--ink-4);font-size:9px;line-height:14px;text-align:center}

/* ============================================================
   客服浮窗（Chatwoot 在线客服）
   ============================================================ */
.s8-fabs{position:fixed;right:24px;bottom:24px;z-index:90;display:flex;flex-direction:column;align-items:flex-end;gap:12px}
.s8-fabs .s8-fab{position:relative;display:flex;align-items:center;gap:12px;max-width:56px;overflow:hidden;padding:8px;background:var(--white);border:1px solid var(--line);border-radius:var(--r-pill);box-shadow:var(--shadow);transition:max-width .26s cubic-bezier(.2,.6,.2,1),box-shadow .18s ease,border-color .18s ease,transform .18s ease}
.s8-fabs .s8-fab:hover,.s8-fabs .s8-fab:focus-visible{max-width:calc(100vw - 48px);padding-right:20px;border-color:var(--line-3);box-shadow:var(--shadow-lg);transform:translateY(-2px)}
.s8-fabs .s8-fab:hover .s8-fab-txt,.s8-fabs .s8-fab:focus-visible .s8-fab-txt{max-width:260px;opacity:1}
.s8-fabs .s8-fab[aria-busy="true"]{opacity:.72;cursor:progress}
.s8-fabs .s8-fab-ic{position:relative;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;flex:none;border-radius:50%;background:var(--tint);color:var(--brand)}
.s8-fabs .s8-fab-ic .i{width:20px;height:20px}
.s8-fabs .s8-fab-dot{position:absolute;top:1px;right:1px;width:9px;height:9px;border-radius:50%;background:var(--brand);box-shadow:0 0 0 2px var(--white)}
.s8-fabs .s8-fab-txt{display:flex;flex-direction:column;gap:2px;min-width:0;max-width:0;overflow:hidden;opacity:0;transition:max-width .24s cubic-bezier(.2,.6,.2,1),opacity .16s ease}
.s8-fabs .s8-fab-txt b{font-size:14px;line-height:18px;font-weight:600;color:var(--ink);white-space:nowrap}
.s8-fabs .s8-fab-txt small{font-size:12px;line-height:16px;color:var(--ink-3);white-space:nowrap}

@media (max-width:600px){
  .s8-chat{right:16px;left:16px;bottom:80px;width:auto;max-height:calc(100vh - 112px);max-height:calc(100dvh - 112px);border-radius:var(--r)}
  .s8-fabs{right:16px;bottom:16px;gap:10px}
  .s8-fabs .s8-fab,.s8-fabs .s8-fab:hover,.s8-fabs .s8-fab:focus-visible{width:48px;height:48px;max-width:48px;padding:0;justify-content:center;border-radius:50%;border-color:var(--line-2);box-shadow:var(--shadow-lg);transform:none}
  .s8-fabs .s8-fab-ic{width:46px;height:46px}
  .s8-fabs .s8-fab-ic .i{width:22px;height:22px}
  .s8-fabs .s8-fab-dot{display:none}
  .s8-fabs .s8-fab-txt{display:none}
}

@media (prefers-reduced-motion:reduce){
  .s8-chat{transition:none;opacity:1;transform:none}
}

@media print{
  .s8-chat,.s8-fabs{display:none}
}

.s8-chat[hidden]{display:none}
.s8-chat-topic:disabled,.s8-chat-start:disabled{opacity:.6;cursor:wait}
