/* ============================================================
   勾得CCD · 扫码落地页
   视觉沿用出片库的玫瑰黑：#170e13 底 + #f7b6c9 粉调强调，
   扫进来的人是从贴纸来的，颜色对得上才像同一家。
   手机竖屏优先，桌面端居中成一栏。
   ============================================================ */

:root {
  --bg: #170e13;
  --bg-2: #1f1319;
  --card: #21151b;
  --card-hi: #2b1a23;
  --line: rgba(255, 226, 236, 0.10);
  --line-hi: rgba(255, 226, 236, 0.20);
  --text: #f9eef2;
  --text-2: #bda5b0;
  --text-3: #a08a95;   /* 弱化灰。原来的 #836d78 对比度只有 3.5，小字看不清，见 tools\check_a11y.py */
  --accent: #f7b6c9;
  --accent-2: #f3a0b8;
  --on-accent: #2a121c;
  --radius: 18px;
  --pad: 20px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
    "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
}

#app {
  position: relative;
  width: min(100vw, 560px);
  margin: 0 auto;
  padding: 26px var(--pad) calc(96px + var(--safe-b));
  overflow-x: hidden;
}

/* 顶部光晕，让深色底不显得死板 */
.glow {
  position: absolute;
  top: -180px;
  left: 50%;
  width: 460px;
  height: 460px;
  margin-left: -230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(247, 182, 201, 0.20) 0%, rgba(247, 182, 201, 0) 68%);
  pointer-events: none;
  z-index: 0;
}

/* ---------------- 头部 ---------------- */
.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 8px 0 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(150deg, var(--accent) 0%, var(--accent-2) 100%);
  color: var(--on-accent);
  font-size: 21px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(247, 182, 201, 0.22);
}

.brand-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.25;
}

.brand-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.08em;
}

.hero-title {
  margin: 0 0 10px;
  font-size: 27px;
  line-height: 1.32;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
}

/* ---------------- 微信卡 ---------------- */
.card {
  position: relative;
  z-index: 1;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
}

.card-wx {
  background: linear-gradient(180deg, var(--card-hi) 0%, var(--card) 62%);
  border-color: var(--line-hi);
  text-align: center;
  padding: 24px 20px 20px;
}

.qr-wrap {
  display: inline-block;
  padding: 14px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  /* 长按识别要用到系统菜单，别拦 */
  -webkit-touch-callout: default;
  user-select: auto;
}

.qr {
  display: block;
  width: 208px;
  height: 208px;
  /* 微信长按识别对图片缩放敏感，用 object-fit 保证不被拉变形 */
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
}

.qr-tip {
  margin-top: 10px;
  font-size: 12px;
  color: #6b5560;
  letter-spacing: 0.04em;
}

/* 没有好友码时不留白框 */
.qr-wrap.qr-empty,
.qr-wrap.qr-fallback {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  padding: 26px 18px;
  background: rgba(255, 226, 236, 0.05);
  border: 1px dashed var(--line-hi);
  box-shadow: none;
}

.qr-empty-t {
  font-size: 13px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

/* 降级时显示的微信号：要能一眼看清、能手动选中复制 */
.qr-empty-id {
  font-size: 26px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  user-select: all;
  -webkit-user-select: all;
  word-break: break-all;
}

.qr-empty-d {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-2);
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.btn:active {
  transform: scale(0.985);
  opacity: 0.92;
}

.btn-primary {
  background: linear-gradient(150deg, var(--accent) 0%, var(--accent-2) 100%);
  color: var(--on-accent);
  box-shadow: 0 8px 22px rgba(247, 182, 201, 0.20);
}

.card-wx .btn-primary {
  margin-top: 20px;
}

.btn-id {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.72;
  padding-left: 8px;
  border-left: 1px solid rgba(42, 18, 28, 0.22);
}

.btn-ghost {
  background: rgba(255, 226, 236, 0.06);
  border: 1px solid var(--line-hi);
  color: var(--text);
  font-weight: 500;
  min-height: 46px;
  font-size: 15px;
  text-decoration: none;
}

.hero-hint {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-3);
}

/* ---------------- 售后流程 ---------------- */
.sec {
  position: relative;
  z-index: 1;
  padding: 14px 4px 6px;
}

.sec-t {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 700;
}

.sec-lead {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
}

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

.step {
  position: relative;
  display: flex;
  gap: 14px;
  padding-bottom: 20px;
}

/* 竖线连接，最后一条不画 */
.step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 30px;
  bottom: 2px;
  width: 1px;
  background: var(--line);
}

.step-n {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: rgba(247, 182, 201, 0.13);
  border: 1px solid rgba(247, 182, 201, 0.32);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.step-t {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  padding-top: 3px;
}

.step-d {
  font-size: 13.5px;
  line-height: 1.72;
  color: var(--text-2);
}

/* ---------------- 保修 ---------------- */
.card-t {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 700;
}

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

.warranty li {
  position: relative;
  padding-left: 17px;
  margin-bottom: 11px;
  font-size: 13.5px;
  line-height: 1.72;
  color: var(--text-2);
}

.warranty li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.75;
}

.warranty-note {
  margin: 14px 0 0;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-3);
}

/* ---------------- 出片库入口 ---------------- */
.card-lib {
  text-align: center;
  background: linear-gradient(180deg, var(--card) 0%, var(--bg-2) 100%);
}

.lib-t {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
  margin-bottom: 14px;
}

.foot {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  padding: 10px 0 4px;
}

/* ---------------- 底部悬浮 ---------------- */
.sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 10px var(--pad) calc(10px + var(--safe-b));
  background: linear-gradient(180deg, rgba(23, 14, 19, 0) 0%, rgba(23, 14, 19, 0.92) 42%, var(--bg) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
}

.btn-sticky {
  width: min(100%, 520px);
  justify-content: space-between;
  padding: 0 20px;
  font-size: 15px;
}

.btn-k {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.68;
}

/* ---------------- 提示 ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + var(--safe-b));
  transform: translate(-50%, 12px);
  z-index: 40;
  max-width: min(86vw, 420px);
  padding: 11px 18px;
  border-radius: 12px;
  background: rgba(38, 24, 31, 0.97);
  border: 1px solid var(--line-hi);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .toast {
    transition: none;
  }
}
