:root {
  --bg: #fdfaf5;
  --bg-soft: #f6f1e8;
  --card: #ffffff;
  --card-hover: #fff7ef;
  --border: rgba(93, 66, 40, .12);
  --text: #40342a;
  --text-dim: #8a7c6b;
  --accent: #f2764e;
  --accent2: #e8638a;
  --grad: linear-gradient(135deg, #f2834e 0%, #ec6f92 100%);
  --ink: #ffffff;
  --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: 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; }

/* ---------- Nav ---------- */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(253, 250, 245, .82);
  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;
}
.logo-txt { letter-spacing: .2px; }
/* 字标里的 AI 用品牌渐变强调，避免被读成 AL */
.logo-ai {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: .5px;
}
.logo .mark {
  width: 34px; height: 34px;
  border-radius: 9px;
  object-fit: cover; display: block;
  box-shadow: 0 0 14px rgba(242, 118, 78, .35);
}
.nav-links { display: flex; gap: 26px; 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); }
.nav-links a.active { color: var(--accent); font-weight: 600; }
/* CTA 必须带 .nav-links 前缀：否则 .nav-links a 的 padding 会把胶囊压扁 */
.nav-links a.nav-cta {
  background: var(--grad); color: var(--ink) !important;
  padding: 9px 22px; border-radius: 999px; font-weight: 600;
  box-shadow: 0 4px 14px rgba(236, 111, 146, .3);
}
.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(253, 250, 245, .97);
  border-bottom: 1px solid var(--border);
}
.mobile-menu a { padding: 10px 0; color: var(--text-dim); border-bottom: 1px solid var(--border); }
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a.active { color: var(--accent); font-weight: 600; }
.mobile-menu.open { display: flex; }

/* ---------- Hero ---------- */
.hero {
  padding: 140px 0 80px;
  background:
    radial-gradient(600px 320px at 12% 8%, rgba(242, 131, 78, .12), transparent 70%),
    radial-gradient(520px 300px at 88% 22%, rgba(236, 111, 146, .10), transparent 70%),
    var(--bg);
  position: relative; overflow: hidden;
}
.hero-inner {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 48px; align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(242, 118, 78, .10); color: #d9603a;
  border: 1px solid rgba(242, 118, 78, .32);
  padding: 6px 16px; border-radius: 999px;
  font-size: 13px; margin-bottom: 22px;
}
.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: 500px; }
.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: var(--ink);
  box-shadow: 0 8px 24px rgba(236, 111, 146, .35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(236, 111, 146, .5); }
.btn-ghost {
  border: 1px solid var(--border); color: var(--text);
  background: #ffffff;
}
.btn-ghost:hover { background: var(--card-hover); transform: translateY(-2px); }

/* 首屏手机截图展示 */
.hero-shots { position: relative; height: 460px; }
.shot {
  position: absolute; width: 240px; border-radius: 22px; overflow: hidden;
  border: 1px solid rgba(242, 118, 78, .22);
  box-shadow: 0 24px 60px rgba(120, 84, 50, .22);
}
.shot img { width: 100%; display: block; }
.shot-a { left: 6%; top: 30px; transform: rotate(-4deg); z-index: 1; }
.shot-b { right: 4%; top: 0; transform: rotate(4deg); z-index: 2; }
.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; }

/* ---------- Sections ---------- */
section { padding: 90px 0; }
.sec-head { text-align: center; margin-bottom: 56px; }
.sec-tag {
  color: #d9603a; font-size: 13px; letter-spacing: 3px;
  text-transform: uppercase; margin-bottom: 10px;
}
.sec-head h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; }
.sec-head p { color: var(--text-dim); margin-top: 12px; }

/* Features */
.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, background .25s, border-color .25s;
}
.card:hover { transform: translateY(-6px); background: var(--card-hover); border-color: rgba(242, 118, 78, .45); }
.card .icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: rgba(242, 118, 78, .12); border: 1px solid rgba(242, 118, 78, .28);
  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 */
.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(242, 118, 78, .45); }
.step .num {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--grad); color: var(--ink);
  display: grid; place-items: center;
  font-size: 19px; font-weight: 800; margin-bottom: 18px;
  box-shadow: 0 6px 18px rgba(236, 111, 146, .35);
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--text-dim); font-size: 15px; }

/* Roles（角色卡：名字与台词在图内，HTML 不重复写） */
.role-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .25s, border-color .25s;
}
.role-card:hover { transform: translateY(-6px); border-color: rgba(242, 118, 78, .5); }
.role-card .avatar { aspect-ratio: 408 / 572; overflow: hidden; }
.role-card .avatar img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.role-card:hover .avatar img { transform: scale(1.04); }
.role-note { text-align: center; color: var(--text-dim); font-size: 14px; margin-top: 28px; }

/* 角色卡网格：手机端两列，奇数张最后一张跨两列 */
.roles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.roles-grid-2 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

/* 立绘展示（功能页） */
.art-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.art-card {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--card);
}
.art-card img { width: 100%; display: block; }

/* 界面截图展示 */
.shots-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 860px; margin: 0 auto; }
.shots-row figure {
  border-radius: 20px; overflow: hidden;
  border: 1px solid rgba(242, 118, 78, .22);
  box-shadow: 0 18px 44px rgba(120, 84, 50, .18);
  background: var(--card);
}
.shots-row figcaption {
  text-align: center; font-size: 13.5px; color: var(--text-dim);
  padding: 12px 10px 16px; background: var(--card);
}

/* Download */
.download {
  background:
    radial-gradient(700px 400px at 50% 0%, rgba(242, 131, 78, .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);
  border-radius: 24px; padding: 56px;
  box-shadow: 0 18px 50px rgba(120, 84, 50, .12);
}
.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;
  box-shadow: 0 0 0 8px rgba(242, 118, 78, .10);
  position: relative;
  border: 1px solid var(--border);
}
.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 .qr-pending {
  font-size: 12.5px; color: #a3927f; text-align: center; line-height: 1.5; padding: 0 10px;
}
.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(242, 118, 78, .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; }

/* ---------- 资讯列表 / 文章 ---------- */
.news-list { max-width: 820px; margin: 0 auto; }
.news-item {
  display: block; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 30px; margin-bottom: 18px;
  transition: transform .25s, border-color .25s;
}
.news-item:hover { transform: translateY(-4px); border-color: rgba(242, 118, 78, .45); }
.news-item time { font-size: 13px; color: #d9603a; }
.news-item h3 { font-size: 19px; margin: 8px 0 10px; }
.news-item p { color: var(--text-dim); font-size: 14.5px; }
.news-item .more { color: #d9603a; font-size: 14px; margin-top: 10px; display: inline-block; }

.article { max-width: 780px; margin: 0 auto; }
.article h1 { font-size: clamp(24px, 3.6vw, 34px); line-height: 1.35; margin: 18px 0 10px; }
.article .article-meta { color: var(--text-dim); font-size: 14px; margin-bottom: 34px; }
.article h2 { font-size: 21px; margin: 34px 0 14px; }
.article p { color: #5d5142; margin-bottom: 16px; font-size: 16px; }
.article ul { color: #5d5142; margin: 0 0 16px 22px; font-size: 16px; }
.article .back-link {
  display: inline-block; margin-top: 30px; color: #d9603a; font-size: 14.5px;
}

/* ---------- Footer ---------- */
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: 760px; margin: 0 auto 14px; font-size: 13px; color: var(--text-dim); opacity: .85; }

/* ---------- 友情链接（静态直出在 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 to top ---------- */
.back-top {
  position: fixed; right: 28px; bottom: 40px; z-index: 99;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--grad); color: var(--ink);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(236, 111, 146, .4);
  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(236, 111, 146, .55); }
.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(253, 250, 245, .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(8px);
  background: #ffffff; color: var(--text);
  border: 1px solid rgba(242, 118, 78, .35);
  padding: 11px 20px; border-radius: 999px;
  font-size: 14px; pointer-events: none;
  opacity: 0; visibility: hidden;
  transition: opacity .25s, transform .25s, visibility .25s;
  max-width: 86vw; text-align: center;
  box-shadow: 0 10px 30px rgba(120, 84, 50, .18);
}
.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; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .hero { padding: 110px 0 60px; }
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero p.lead { max-width: none; }
  .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; }
  .hero-shots { height: auto; display: flex; gap: 14px; justify-content: center; }
  .shot { position: static; width: 46%; transform: none; }
  .shot-a { order: 2; } .shot-b { order: 1; }
  /* 功能卡 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 个 → 整卡左右滑动；角色卡按用户选择走两列网格 */
  .steps {
    display: flex; overflow-x: auto;
    gap: 14px; padding-bottom: 6px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .steps::-webkit-scrollbar { display: none; }
  .steps .step { flex: 0 0 74%; scroll-snap-align: start; }
  .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; }
  /* 角色卡两列网格，奇数张最后一张跨两列 */
  .roles-grid, .roles-grid-2 { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .roles-grid .role-card:last-child:nth-child(odd),
  .roles-grid-2 .role-card:last-child:nth-child(odd) { grid-column: span 2; }
  .role-card .info { padding: 14px 12px 18px; }
  .art-row { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .art-row .art-card:last-child:nth-child(odd) { grid-column: span 2; }
  .shots-row { grid-template-columns: repeat(2, 1fr); }
  .shots-row figure:last-child:nth-child(odd) { grid-column: span 2; }
  .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; }
  .news-item { padding: 22px 20px; }
}
@media (max-width: 360px) {
  .features .grid-3 { grid-template-columns: 1fr; }
  .roles-grid, .roles-grid-2 { grid-template-columns: 1fr; }
  .roles-grid .role-card:last-child:nth-child(odd),
  .roles-grid-2 .role-card:last-child:nth-child(odd) { grid-column: auto; }
}

/* ---------- 扫码下载弹层（仅 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, .45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.dl-modal__card {
  position: relative; z-index: 1;
  width: min(420px, 92vw);
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 28px 24px 24px; text-align: center;
  box-shadow: 0 24px 60px rgba(120, 84, 50, .3);
  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(93, 66, 40, .08); 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 solid var(--border);
}
.dl-modal__qr[hidden] { display: none; }
.dl-modal__qr img, .dl-modal__qr canvas { width: 100% !important; height: 100% !important; display: block; }
.dl-modal__qr .qr-pending { font-size: 11.5px; color: #a3927f; line-height: 1.5; padding: 0 6px; }
.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 solid var(--border);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 13px;
}
.dl-modal__links a { color: #d9603a; }
.dl-modal__links a:hover { color: var(--text); }
.dl-modal__links span { color: var(--border); }
body.modal-open { overflow: hidden; }
