/* ============================================================
 * TheOne陪伴 · theonepb.com —— 暖调信笺风（与常见深色 AI 站错开）
 * 米白纸面 + 墨色文字 + 珊瑚红/玫粉点缀 + 邮戳信封元素
 * ============================================================ */
:root {
  --bg: #faf5eb;            /* 米白纸面 */
  --bg-soft: #f4ecdd;       /* 旧信纸 */
  --card: #fffdf7;          /* 卡片纸 */
  --card-hover: #fff8ea;
  --border: #e7dcc6;
  --border-strong: #d8c9ab;
  --text: #40342a;          /* 暖墨色 */
  --text-dim: #8a7c69;
  --accent: #e2594b;        /* 珊瑚红（呼应爱心 logo） */
  --accent-deep: #c14b57;   /* 玫粉深红 */
  --stamp: #5a7ba6;         /* 邮戳蓝 */
  --grad: linear-gradient(135deg, #e2594b 0%, #d4707f 100%);
  --radius: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, sans-serif;
  background:
    repeating-linear-gradient(0deg, rgba(190,160,110,.035) 0 1px, transparent 1px 28px),
    var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: min(1120px, 92%); margin: 0 auto; }

/* ---------- 导航 ---------- */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(250,245,235,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 700; letter-spacing: .5px;
  cursor: pointer;
}
.logo .mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  object-fit: cover; display: block;
  border: 1px solid var(--border-strong);
}
.nav-links { display: flex; gap: 28px; font-size: 15px; align-items: center; }
.nav-links a { color: var(--text-dim); transition: color .2s; line-height: 1; }
.nav-links a:hover { color: var(--text); }
/* CTA 必须带 .nav-links 前缀：否则 .nav-links a 的 padding 会把胶囊压扁 */
.nav-links a.nav-cta {
  background: var(--grad); color: #fff !important;
  padding: 9px 22px; border-radius: 999px; font-weight: 600;
  box-shadow: 0 4px 14px rgba(226,89,75,.35);
}
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.hamburger span {
  width: 24px; height: 2px; background: var(--text);
  border-radius: 2px; transition: .3s;
}
.mobile-menu {
  display: none; flex-direction: column; gap: 4px;
  padding: 8px 4% 16px; background: rgba(250,245,235,.98);
  border-bottom: 1px solid var(--border);
}
.mobile-menu a { padding: 10px 0; color: var(--text-dim); border-bottom: 1px dashed var(--border); }
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a.menu-cta { color: var(--accent); font-weight: 600; }
.mobile-menu.open { display: flex; }

/* ---------- 首屏 ---------- */
.hero {
  padding: 140px 0 80px;
  background:
    radial-gradient(560px 300px at 12% 8%, rgba(226,89,75,.10), transparent 70%),
    radial-gradient(500px 320px at 88% 30%, rgba(212,112,127,.10), transparent 70%),
    var(--bg);
  position: relative; overflow: hidden;
}
/* 信封航空斜纹（红蓝杠），只作细条装饰 */
.hero::before {
  content: ""; position: absolute; top: 64px; left: 0; right: 0; height: 8px;
  background: repeating-linear-gradient(45deg,
    #e2594b 0 14px, #faf5eb 14px 24px,
    #5a7ba6 24px 38px, #faf5eb 38px 48px);
  opacity: .5;
}
.hero-inner {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 48px; align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,.7); color: var(--accent-deep);
  border: 1px dashed var(--accent);
  padding: 6px 16px; border-radius: 999px;
  font-size: 13px; margin-bottom: 22px;
}
.stamp-dot {
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px dashed var(--accent); display: inline-block;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.25; font-weight: 800; margin-bottom: 20px;
}
.hero h1 .hl {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.lead { color: var(--text-dim); font-size: 17px; margin-bottom: 34px; max-width: 520px; }
.btn-row { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 30px; border-radius: 999px;
  font-size: 16px; font-weight: 600; cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 8px 24px rgba(226,89,75,.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(226,89,75,.5); }
.btn-ghost {
  border: 1px solid var(--border-strong); color: var(--text);
  background: rgba(255,255,255,.6);
}
.btn-ghost:hover { background: #fff; transform: translateY(-2px); }
.btn-sm { padding: 10px 22px; font-size: 14px; }
/* 主视觉：贴了邮票的信封卡 */
.hero-img {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(112,84,50,.18);
  transform: rotate(1.2deg);
  max-width: 420px; margin: 0 auto;
}
.hero-img::before {
  content: ""; position: absolute; inset: 10px;
  border: 1px dashed var(--border-strong);
  border-radius: 16px; pointer-events: none;
}
/* 首屏主视觉：两张并排的小尺寸界面截图，避免单张长图把首屏撑高 */
.hero-phones {
  display: flex; gap: 10px; align-items: flex-start;
}
.hero-phones img {
  flex: 1 1 0; min-width: 0;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(112,84,50,.22);
}
.hero-phones img:last-child { margin-top: 18px; }
.letter-stamp {
  position: absolute; top: -22px; right: -18px; z-index: 2;
  width: 76px; height: 76px; border-radius: 50%;
  border: 2px dashed var(--stamp);
  color: var(--stamp);
  display: grid; place-items: center;
  font-size: 11px; letter-spacing: 2px; font-weight: 700;
  background: rgba(250,245,235,.9);
  transform: rotate(12deg);
  padding: 8px; text-align: center; line-height: 1.3;
}
.hero-meta { display: flex; gap: 32px; margin-top: 36px; flex-wrap: wrap; }
.hero-meta .item strong { font-size: 22px; display: block; }
.hero-meta .item span { color: var(--text-dim); font-size: 13px; }

/* ---------- 通用板块 ---------- */
section { padding: 90px 0; }
.sec-head { text-align: center; margin-bottom: 56px; }
.sec-tag {
  display: inline-block;
  color: var(--stamp); font-size: 13px; letter-spacing: 3px;
  text-transform: uppercase; margin-bottom: 14px;
  border: 1px dashed var(--stamp);
  border-radius: 999px; padding: 3px 14px;
  transform: rotate(-1deg);
}
.sec-head h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; }
.sec-head p { color: var(--text-dim); margin-top: 12px; }

/* 产品特色 */
.features { background: var(--bg-soft); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 34px 28px;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  box-shadow: 0 2px 10px rgba(112,84,50,.06);
}
.card:hover { transform: translateY(-6px); border-color: rgba(226,89,75,.45); box-shadow: 0 12px 26px rgba(112,84,50,.14); }
.card .icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: rgba(226,89,75,.12); border: 1px solid rgba(226,89,75,.3);
  display: grid; place-items: center; font-size: 24px; margin-bottom: 20px;
}
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--text-dim); font-size: 15px; }

/* 使用指南 */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 34px 28px; position: relative;
  transition: transform .25s, border-color .25s;
}
.step:hover { transform: translateY(-6px); border-color: rgba(226,89,75,.45); }
.step .num {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--grad); color: #fff;
  display: grid; place-items: center;
  font-size: 19px; font-weight: 800; margin-bottom: 18px;
  box-shadow: 0 6px 18px rgba(226,89,75,.35);
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--text-dim); font-size: 15px; }

/* 角色一览：一行四张拍立得式照片卡（名字/台词已烘焙在图里，不重复写字） */
.role-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px 16px;
}
.role-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 10px 14px;
  box-shadow: 0 6px 18px rgba(112,84,50,.12);
  transition: transform .25s, box-shadow .25s;
}
.role-card:nth-child(odd) { transform: rotate(-1deg); }
.role-card:nth-child(even) { transform: rotate(1deg); }
.role-card:hover { transform: rotate(0) translateY(-6px); box-shadow: 0 16px 32px rgba(112,84,50,.2); }
.role-card img { border-radius: 4px; }
/* 角色区下方的引导行（原「更多角色」卡改为一行文字 + 按钮，避免 4 列网格出现孤行） */
.role-cta {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; margin-top: 34px; text-align: center;
}
.role-cta p { color: var(--text-dim); font-size: 15px; max-width: 560px; }
.role-note { text-align: center; color: var(--text-dim); font-size: 14px; margin-top: 26px; }

/* 界面一览 */
/* 界面一览：一行四张，单张更小 */
.shot-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  align-items: start;
}
.shot {
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 10px;
  box-shadow: 0 10px 26px rgba(112,84,50,.14);
}
.shot img { border-radius: 12px; }
.shot figcaption {
  text-align: center; color: var(--text-dim);
  padding-top: 10px;
  font-family: "STKaiti", "KaiTi", "PingFang SC", serif;
  font-size: 14px;
}

/* 下载 */
.download {
  background:
    radial-gradient(700px 400px at 50% 0%, rgba(226,89,75,.12), transparent 70%),
    var(--bg-soft);
}
.dl-box {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  background: var(--card); border: 1px solid var(--border-strong);
  border-radius: 24px; padding: 56px;
  box-shadow: 0 18px 44px rgba(112,84,50,.14);
}
.dl-box h2 { font-size: clamp(24px, 3.5vw, 34px); margin-bottom: 14px; }
.dl-box .sub { color: var(--text-dim); margin-bottom: 30px; }
.dl-list { list-style: none; margin-bottom: 34px; }
.dl-list li {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-dim); font-size: 15px; padding: 6px 0;
}
.dl-list li::before { content: "✓"; color: var(--accent); font-weight: 700; }
.dl-side { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.qr {
  width: 170px; height: 170px; border-radius: 18px;
  background: #fff; display: grid; place-items: center;
  border: 1px dashed var(--border-strong);
  box-shadow: 0 0 0 8px rgba(255,255,255,.6);
  position: relative;
}
.qr::after {
  content: "安卓扫码下载"; position: absolute; bottom: -30px;
  color: var(--text-dim); font-size: 13px; white-space: nowrap;
}
.qr svg { width: 84%; height: 84%; }
.qr canvas, .qr img { width: 84% !important; height: 84% !important; }
/* 地址未配置时的占位块（不生成假二维码） */
.qr-pending, .dl-qr-pending {
  width: 84%; height: 84%;
  display: grid; place-items: center;
  color: var(--text-dim); font-size: 13px;
  border: 2px dashed var(--border-strong); border-radius: 10px;
  text-align: center; line-height: 1.5; padding: 8px;
  background: var(--bg-soft);
}
.dl-qr-pending { width: 100%; height: 100%; }
.store-note { font-size: 13px; color: var(--text-dim); text-align: center; margin-top: 12px; }

/* FAQ */
.faq-list { max-width: 780px; margin: 0 auto; }
details {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; margin-bottom: 14px; overflow: hidden;
  transition: border-color .2s;
}
details[open] { border-color: rgba(226,89,75,.45); }
summary {
  cursor: pointer; list-style: none;
  padding: 20px 24px; font-size: 16px; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; font-size: 22px; color: var(--accent);
  transition: transform .25s; flex-shrink: 0;
}
details[open] summary::after { transform: rotate(45deg); }
details .ans { padding: 0 24px 22px; color: var(--text-dim); font-size: 15px; }

/* 页脚 */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0; text-align: center;
  color: var(--text-dim); font-size: 14px;
  background: var(--bg);
}
footer .foot-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 14px; flex-wrap: wrap; }
footer a:hover { color: var(--text); }
.foot-desc { max-width: 640px; margin: 0 auto; font-size: 13px; line-height: 1.8; }

/* ---------- 友情链接（静态直出在 index.html，不用 JS；.pending 为待定占位样式） ---------- */
.friend-links {
  display: flex; justify-content: center; align-items: baseline; flex-wrap: wrap;
  gap: 8px 16px; max-width: 760px; margin: 0 auto 14px; padding-top: 14px;
  border-top: 1px dashed var(--border); font-size: 13px;
}
.fl-label { color: var(--text-dim); opacity: .85; }
.fl-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; }
.fl-list a { color: var(--text-dim); opacity: .85; transition: color .2s, opacity .2s; }
.fl-list a:hover { color: var(--text); opacity: 1; }
/* 待替换占位：仍是 <a> 标签（保留外链语义），仅视觉与交互降级 */
.fl-list a.pending {
  color: var(--text-dim); opacity: .5; cursor: default;
  border-bottom: 1px dashed var(--border);
}
.fl-list a.pending:hover { color: var(--text-dim); opacity: .5; }

/* ---------- 返回顶部 ---------- */
.back-top {
  position: fixed; right: 28px; bottom: 40px; z-index: 99;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--grad); color: #fff;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(226,89,75,.45);
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity .3s, transform .3s, visibility .3s, box-shadow .2s;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { box-shadow: 0 12px 28px rgba(226,89,75,.6); }
.back-top .arrow { font-size: 20px; font-weight: 700; line-height: 1; }
.back-top .txt { display: none; }

/* 手机端底部固定下载条 */
.mobile-dl {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 98;
  padding: 10px 4% calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(250,245,235,.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}
.mobile-dl .btn {
  width: 100%; justify-content: center; padding: 13px 0; font-size: 15px;
}

/* toast 轻提示（空下载地址兜底） */
.toast {
  position: fixed; left: 50%; bottom: 96px; z-index: 300;
  transform: translateX(-50%) translateY(10px);
  background: rgba(64,52,42,.92); color: #fff;
  font-size: 14px; padding: 10px 20px; border-radius: 999px;
  opacity: 0; visibility: hidden;
  transition: opacity .25s, transform .25s, visibility .25s;
  max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

@media (max-width: 900px) {
  .mobile-dl { display: block; }
  .back-top { right: 16px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  body { padding-bottom: 66px; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .hero { padding: 110px 0 60px; }
  .hero::before { top: 56px; }
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero p.lead { max-width: none; }
  .hero-img { max-width: 320px; }
  .letter-stamp { width: 62px; height: 62px; top: -16px; right: -10px; font-size: 10px; }
  .hero-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; }
  .hero-meta .item strong { font-size: 16px; }
  .hero-meta .item span { font-size: 11.5px; }
  /* 产品特色 6 个 → 两列网格（用户选定） */
  .features .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card { padding: 24px 18px; }
  .card .icon { width: 44px; height: 44px; font-size: 20px; margin-bottom: 14px; }
  .card h3 { font-size: 16.5px; }
  .card p { font-size: 13.5px; }
  /* 使用指南 3 个 → 两列网格，第 3 张跨两列，避免孤行 */
  .steps { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .step:last-child { grid-column: span 2; }
  .step { padding: 24px 18px; }
  .step .num { width: 38px; height: 38px; font-size: 16px; margin-bottom: 12px; }
  .step h3 { font-size: 16px; }
  .step p { font-size: 13.5px; }
  /* 角色一览 4 张 → 两列 2×2 网格（用户选定） */
  .role-grid { grid-template-columns: repeat(2, 1fr); gap: 14px 12px; }
  .role-card { padding: 6px 6px 8px; }
  .role-cta p { font-size: 13px; }
  .role-note { font-size: 12.5px; }
  /* 界面一览 4 张 → 两列 2×2，单张保持小尺寸 */
  .shot-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .shot { padding: 7px; border-radius: 16px; }
  .shot img { border-radius: 10px; }
  .shot figcaption { font-size: 12.5px; padding-top: 8px; }
  .dl-box { grid-template-columns: 1fr; padding: 36px 26px; text-align: center; }
  .dl-side { display: none; }   /* 手机端隐藏二维码，用底部固定下载条替代 */
  .dl-list { display: inline-block; text-align: left; }
  .btn-row { justify-content: center; }
  section { padding: 64px 0; }
}
@media (max-width: 360px) {
  .features .grid-3, .role-grid { grid-template-columns: 1fr; }
}

/* ---------- 扫码下载弹层（仅 PC） ---------- */
.dl-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .25s, visibility .25s;
}
.dl-modal.open { opacity: 1; visibility: visible; }
.dl-modal__mask {
  position: absolute; inset: 0;
  background: rgba(64,52,42,.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.dl-modal__card {
  position: relative; z-index: 1;
  width: min(400px, 92vw);
  background: var(--card); border: 1px solid var(--border-strong);
  border-radius: 20px; padding: 28px 24px 24px; text-align: center;
  box-shadow: 0 24px 60px rgba(80,58,34,.35);
  transform: translateY(14px) scale(.97);
  transition: transform .28s;
}
.dl-modal.open .dl-modal__card { transform: none; }
.dl-modal__close {
  position: absolute; top: 10px; right: 12px;
  width: 32px; height: 32px; border: none; border-radius: 50%;
  background: transparent; color: var(--text-dim);
  font-size: 22px; line-height: 1; cursor: pointer;
  transition: background .2s, color .2s;
}
.dl-modal__close:hover { background: rgba(112,84,50,.1); color: var(--text); }
.dl-modal h3 { font-size: 19px; margin-bottom: 6px; }
.dl-modal__sub { color: var(--text-dim); font-size: 13px; }
.dl-qrrow {
  display: flex; gap: 18px; justify-content: center;
  margin: 20px 0 12px;
}
.dl-qr-item { text-align: center; font-size: 13px; color: var(--text-dim); }
.dl-qr-item span { display: block; margin-top: 8px; }
.dl-qr-item[hidden] { display: none; }
.dl-modal__qr {
  width: 142px; height: 142px;
  background: #fff; border-radius: 12px; padding: 8px;
  display: grid; place-items: center; overflow: hidden;
  border: 1px dashed var(--border-strong);
}
.dl-modal__qr[hidden] { display: none; }
.dl-modal__qr img, .dl-modal__qr canvas { width: 100% !important; height: 100% !important; display: block; }
.dl-modal__hint { color: var(--text-dim); font-size: 12.5px; line-height: 1.6; }
.dl-modal__links {
  margin-top: 16px; padding-top: 14px;
  border-top: 1px dashed var(--border);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 13px;
}
.dl-modal__links a { color: var(--accent); }
.dl-modal__links a:hover { color: var(--accent-deep); }
.dl-modal__links span { color: var(--border); }
body.modal-open { overflow: hidden; }
