/* =====================================================================
 * Forgewright · 视觉系统
 * ===================================================================== */
:root {
  --primary: #0033cc;
  --primary-600: #0029a3;
  --primary-050: #eef2ff;
  --text: #0a0a0a;
  --text-2: #6b7280;
  --bg: #ffffff;
  --surface: #f7f8fa;
  --border: #e5e7eb;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(10, 10, 10, .05);
  --shadow-md: 0 8px 24px rgba(10, 10, 10, .08);
  --shadow-lg: 0 24px 60px rgba(10, 10, 10, .12);
  --maxw: 1120px;
  --font: "Inter", "Outfit", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: .18s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(0,51,204,.25); }
.btn-primary:hover { background: var(--primary-600); transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--text-2); }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ---------- 顶栏 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.8); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand .dot { width: 22px; height: 22px; border-radius: 7px; background: var(--primary); display: inline-block;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.35); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-2); font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-menu-btn { display: none; background: none; border: 0; font-size: 24px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { padding: 96px 0 72px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% 30% auto -10%; height: 520px;
  background: radial-gradient(closest-side, rgba(0,51,204,.14), transparent 70%);
  filter: blur(10px); z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  color: var(--primary); background: var(--primary-050); border: 1px solid #dfe6ff;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(34px, 6vw, 60px); line-height: 1.08; letter-spacing: -.03em;
  font-weight: 800; max-width: 15ch;
}
.hero p.sub { margin-top: 22px; font-size: clamp(16px, 2.2vw, 20px); color: var(--text-2); max-width: 54ch; }
.hero-actions { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Stats ---------- */
.stats { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.stat { padding: 34px 24px; text-align: center; border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; }
.stat .num { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.stat .label { color: var(--text-2); font-size: 14px; margin-top: 4px; }

/* ---------- 通用分区 ---------- */
.section { padding: 84px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(26px, 4vw, 40px); letter-spacing: -.02em; font-weight: 800; }
.section-head p { color: var(--text-2); margin-top: 12px; font-size: 17px; }

/* ---------- 作品卡片 ---------- */
.works-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  border: 1px solid var(--border); border-radius: var(--radius); background: #fff;
  overflow: hidden; display: flex; flex-direction: column; transition: .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #dfe6ff; }
.card-cover {
  aspect-ratio: 16/10; background: var(--surface); position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.card-cover .ph { font-size: 40px; color: #c7ccd6; }
.card-tag {
  position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.92);
  color: var(--primary); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.card-body p { color: var(--text-2); font-size: 14.5px; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.price { font-weight: 800; font-size: 20px; }
.price small { font-weight: 500; color: var(--text-2); font-size: 13px; }

/* ---------- About ---------- */
.about { background: var(--surface); }
.about-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow-md);
}
.about h2 { font-size: clamp(26px, 4vw, 38px); letter-spacing: -.02em; font-weight: 800; }
.about p { color: var(--text-2); margin-top: 16px; font-size: 17px; }
.about .who { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.avatar { width: 52px; height: 52px; border-radius: 14px; background: var(--primary);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 18px 20px; font-size: 16px; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.faq-q .chev { transition: .2s; color: var(--text-2); }
.faq-item.open .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; color: var(--text-2); }
.faq-a div { padding: 0 20px 18px; }
.faq-item.open .faq-a { max-height: 240px; }

/* ---------- CTA ---------- */
.cta-band { text-align: center; }
.cta-box {
  background: linear-gradient(135deg, var(--primary), #2a5cff); color: #fff;
  border-radius: 24px; padding: 56px 32px; box-shadow: var(--shadow-lg);
}
.cta-box h2 { font-size: clamp(24px, 4vw, 36px); font-weight: 800; letter-spacing: -.02em; }
.cta-box p { opacity: .9; margin-top: 12px; font-size: 17px; }
.cta-box .btn { margin-top: 26px; background: #fff; color: var(--primary); }
.cta-box .btn:hover { transform: translateY(-1px); }

/* ---------- CTA 多按钮 ---------- */
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }

/* ---------- 语言切换器 ---------- */
.lang-switch { display: flex; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.lang-btn { border: 0; background: none; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--text-2); cursor: pointer; }
.lang-btn.active { background: var(--primary); color: #fff; }

/* ---------- 支付 / 微信弹层 ---------- */
.qrcode-box { display: inline-flex; align-items: center; justify-content: center; margin: 16px auto 0; padding: 12px; background: #fff; border: 1px solid var(--border); border-radius: 14px; }
.qrcode-box img { width: 200px; height: 200px; border-radius: 8px; }
.pay-fallback { margin-top: 16px; color: var(--text-2); }
.modal-actions { display: flex; gap: 10px; }
.pay-modal .fm-modal, .wechat-modal .fm-modal { max-width: 400px; }

/* ---------- 意见反馈 ---------- */
.feedback-section { background: var(--surface); }
.feedback-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 36px; max-width: 680px; margin: 0 auto; box-shadow: var(--shadow-md); }
.feedback-card h2 { font-size: clamp(24px, 4vw, 32px); font-weight: 800; letter-spacing: -.02em; text-align: center; }
.feedback-card > p { color: var(--text-2); text-align: center; margin-top: 8px; }
.feedback-form { margin-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.feedback-form .field { margin: 0; }
.feedback-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.feedback-form input, .feedback-form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; font-size: 15px; font-family: inherit; }
.feedback-form input:focus, .feedback-form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,51,204,.1); }
.feedback-form textarea { min-height: 120px; resize: vertical; }

/* ---------- 页脚 ---------- */
footer { border-top: 1px solid var(--border); padding: 40px 0; color: var(--text-2); }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot-inner a { color: var(--text-2); }
.foot-inner a:hover { color: var(--text); }
.foot-left { display: flex; flex-direction: column; gap: 6px; }
.foot-disclaimer, .foot-privacy { font-size: 12px; color: var(--text-2); }
.foot-right { display: flex; align-items: center; }
.foot-share { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.foot-share-title { font-size: 12px; color: var(--text-2); margin: 0; }
.foot-share-link { display: flex; gap: 8px; align-items: center; }
.foot-share-link input { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 13px; color: var(--text); width: 190px; }
.foot-qr { width: 88px; height: 88px; border-radius: 8px; border: 1px solid var(--border); background: #fff; padding: 4px; object-fit: contain; }

/* =====================================================================
 * ForgeMotion 交互样式（原创，思路借鉴通用交互设计，无第三方代码）
 * ===================================================================== */

/* 1) 组件变体：按钮按下态 */
.btn:active { transform: translateY(1px) scale(.98); }
.btn-light { background: #fff; color: var(--primary); box-shadow: var(--shadow-md); }
.btn-light:hover { background: #f3f5ff; }

/* 5) 滚动进度条 */
#fmProgress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 70;
  background: linear-gradient(90deg, var(--primary), #2a5cff);
  transition: width .08s linear; pointer-events: none;
}

/* 5) 导航滚动收缩 + 抬升阴影 */
.nav { transition: box-shadow .3s ease, background .3s ease; }
.nav.scrolled { box-shadow: var(--shadow-md); background: rgba(255,255,255,.92); }
.nav.scrolled .nav-inner { height: 58px; }

/* 5) Hero 视差装饰 */
.hero-blob {
  position: absolute; top: 60px; right: 6%; font-size: 120px; opacity: .10;
  z-index: 0; pointer-events: none; user-select: none; line-height: 1;
}

/* 2) 作品筛选 chips（变体系统） */
.works-filter { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 34px; }
.chip {
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  padding: 8px 18px; border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 600;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip[data-fm-variant="active"] { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-1px); }

/* 3) 卡片详情遮罩（hover 出现，点击触发弹层） */
.card-cover .card-overlay {
  position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(10,10,10,0); opacity: 0; transition: opacity .25s ease, background .25s ease;
  padding-bottom: 18px;
}
.card:hover .card-overlay { opacity: 1; background: rgba(10,10,10,.30); }
.card-cover .card-overlay .btn { transform: translateY(12px); transition: transform .25s ease; }
.card:hover .card-cover .card-overlay .btn { transform: none; }

/* 4) 出现效果（reveal），仅 JS 就绪后初始隐藏（无 JS 仍可见） */
.fm-ready [data-fm-reveal] {
  opacity: 0; will-change: opacity, transform;
  transition: opacity .55s cubic-bezier(.22,.61,.36,1), transform .55s cubic-bezier(.22,.61,.36,1);
}
.fm-ready [data-fm-reveal="up"]    { transform: translateY(28px); }
.fm-ready [data-fm-reveal="down"]  { transform: translateY(-28px); }
.fm-ready [data-fm-reveal="left"]  { transform: translateX(36px); }
.fm-ready [data-fm-reveal="right"] { transform: translateX(-36px); }
.fm-ready [data-fm-reveal="scale"] { transform: scale(.94); }
.fm-ready [data-fm-reveal].fm-in   { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .fm-ready [data-fm-reveal] { opacity: 1 !important; transform: none !important; }
}

/* 3) 详情弹层 */
.fm-modal-mask {
  position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(10,10,10,.5); opacity: 0; pointer-events: none;
  transition: opacity .22s ease;
}
.fm-modal-mask.open { opacity: 1; pointer-events: auto; }
.fm-modal {
  background: #fff; border-radius: 20px; max-width: 520px; width: 100%; overflow: hidden;
  box-shadow: var(--shadow-lg); position: relative;
  transform: scale(.92); transition: transform .26s cubic-bezier(.2,1.2,.35,1);
}
.fm-modal-mask.open .fm-modal { transform: scale(1); }
.fm-modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px;
  border: 0; border-radius: 999px; background: rgba(255,255,255,.9); color: var(--text);
  cursor: pointer; font-size: 15px; box-shadow: var(--shadow-sm);
}
.fm-modal-close:hover { background: #fff; }
.fm-modal-cover { aspect-ratio: 16/9; background: var(--surface); display: flex; align-items: center; justify-content: center; }
.fm-modal-cover img { width: 100%; height: 100%; object-fit: cover; }
.fm-modal-cover .ph { font-size: 48px; color: #c7ccd6; }
.fm-modal-body { padding: 24px; }
.fm-modal-body h3 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; margin: 10px 0 8px; }
.fm-modal-body p { color: var(--text-2); font-size: 15px; }

/* 公开站轻量 toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(8px);
  background: var(--text); color: #fff; padding: 12px 22px; border-radius: 999px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: .25s; z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 响应式 ---------- */
/* 购买入口状态徽标（后台作品列表） */
.pl-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; line-height: 1.4; }
.pl-badge.ok { background: #e8f5ec; color: #16a34a; border: 1px solid #bfe6cb; }
.pl-badge.auto { background: #eaf0ff; color: #2563eb; border: 1px solid #c7d6ff; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-menu-btn { display: block; }
  .nav.open .nav-links {
    display: flex; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column;
    background: #fff; border-bottom: 1px solid var(--border); padding: 16px 24px; gap: 16px;
  }
  .works-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--border); }
  .stat:last-child { border-bottom: 0; }
  .about-inner { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 60px 0; }
  .hero { padding: 64px 0 48px; }
  .feedback-card { padding: 24px; }
}
@media (max-width: 560px) {
  .works-grid { grid-template-columns: 1fr; }
  .lang-switch { display: none; }
  .nav.open .lang-switch { display: flex; margin: 10px 24px; }
}

/* =====================================================================
 * v3 新增组件样式
 * ===================================================================== */

/* 隐私同意遮罩 */
.consent-mask { position: fixed; inset: 0; z-index: 400; background: rgba(10,10,10,.55);
  backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.consent-card { background: #fff; border-radius: 22px; max-width: 480px; width: 100%; padding: 32px; box-shadow: var(--shadow-lg); }
.consent-card h2 { font-size: 24px; font-weight: 800; }
.consent-sub { color: var(--text-2); margin: 8px 0 18px; }
.consent-doc { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; max-height: 200px; overflow: auto; font-size: 13.5px; }
.consent-doc strong { display: block; margin: 10px 0 4px; color: var(--text); }
.consent-doc strong:first-child { margin-top: 0; }
.consent-doc p { color: var(--text-2); line-height: 1.6; }
.consent-actions { display: flex; gap: 12px; margin-top: 22px; }
.consent-actions .btn { flex: 1; justify-content: center; }

/* 账户按钮 */
.account-btn { border: 1px solid var(--border); background: #fff; color: var(--text); border-radius: 999px;
  padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; }
.account-btn:hover { border-color: var(--primary); color: var(--primary); }

/* 登录 / 注册弹窗 */
.auth-modal { max-width: 420px; }
.auth-tabs { display: flex; gap: 6px; background: var(--surface); border-radius: 999px; padding: 4px; margin-bottom: 22px; }
.auth-tab { flex: 1; border: 0; background: none; padding: 9px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--text-2); cursor: pointer; }
.auth-tab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.auth-form .field { margin-bottom: 14px; }
.auth-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.auth-form input { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; font-size: 15px; font-family: inherit; }
.auth-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,51,204,.1); }
.auth-error { color: #ef4444; font-size: 13px; min-height: 18px; margin-bottom: 8px; }
.auth-third { display: flex; gap: 10px; margin-top: 16px; }
.auth-third .btn { flex: 1; justify-content: center; }
.auth-note { font-size: 12px; color: var(--text-2); margin-top: 14px; }

/* 个人中心 */
.profile-modal { max-width: 440px; }
.profile-modal h3 { font-size: 22px; font-weight: 800; margin-bottom: 18px; }
.profile-box { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.profile-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 14px; }
.profile-row span { color: var(--text-2); }
.profile-row strong { font-weight: 700; }
.profile-row input { flex: 1; max-width: 220px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; }
.profile-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* 营销落地页 */
.landing { background: var(--surface); }
.landing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.landing-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.landing-ico { font-size: 32px; margin-bottom: 12px; }
.landing-card h3 { font-size: 19px; font-weight: 800; }
.landing-card p { color: var(--text-2); font-size: 14.5px; margin-top: 8px; }
.cases { margin-top: 48px; max-width: 760px; margin-left: auto; margin-right: auto; }
.cases-title { font-size: 20px; font-weight: 800; text-align: center; margin-bottom: 20px; }
.case-row { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px 20px; margin-bottom: 12px; }
.case-row span { font-weight: 700; font-size: 15px; }
.case-row p { color: var(--text-2); font-size: 14px; margin-top: 4px; }

/* 定价模型 */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.price-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; text-align: center; position: relative; }
.price-card.featured { border-color: var(--primary); box-shadow: var(--shadow-md); }
.price-card-tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: var(--primary-050); color: var(--primary); margin-bottom: 14px; }
.price-card-tag.hot { background: #fff0e6; color: #ea580c; }
.price-card h3 { font-size: 20px; font-weight: 800; }
.price-card-desc { color: var(--text-2); font-size: 14px; margin: 10px 0 18px; }
.price-feats { list-style: none; text-align: left; display: flex; flex-direction: column; gap: 10px; color: var(--text-2); font-size: 14px; }
.price-feats li { padding-left: 22px; position: relative; }
.price-feats li::before { content: "✓"; position: absolute; left: 0; color: var(--primary); font-weight: 800; }

/* 筛选栏 */
.filter-bar { margin-bottom: 36px; }
.search-box { max-width: 520px; margin: 0 auto 18px; }
.search-box input { width: 100%; padding: 14px 18px; border: 1px solid var(--border); border-radius: 999px; font-size: 15px; font-family: inherit; }
.search-box input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,51,204,.1); }
.filter-selects { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.filter-selects select { padding: 9px 14px; border: 1px solid var(--border); border-radius: 999px; font-size: 14px; font-family: inherit; background: #fff; color: var(--text); cursor: pointer; }

/* 卡片类型/场景/评分 */
.card-cover .type-badge { position: absolute; top: 12px; right: 12px; color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.type-badge.t-buyout { background: #16a34a; }
.type-badge.t-subscription { background: #6d28d9; }
.type-badge.t-trial { background: #ea580c; }
.type-badge.t-freemium { background: #0891b2; }
.card-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.card-scenario { background: var(--primary-050); color: var(--primary); padding: 3px 10px; border-radius: 999px; }
.card-rating { color: #f59e0b; font-weight: 700; }

/* 详情弹窗补充 */
.wm-scenario { color: var(--text-2); font-size: 14px; margin: 8px 0; }
.wm-rating { margin-bottom: 8px; }
.reviews-title { font-weight: 700; margin-top: 18px; margin-bottom: 10px; }
.review { border-top: 1px solid var(--border); padding: 12px 0; }
.review-stars { color: #f59e0b; }
.review-user { color: var(--text-2); font-size: 13px; margin-left: 8px; }
.review p { color: var(--text); font-size: 14px; margin-top: 4px; }

/* 支付选项 */
.pay-options { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.pay-opt-btn { width: 100%; justify-content: center; }
.pay-opt-btn small { font-weight: 500; opacity: .85; }

/* 页脚站点地图 */
.foot-sitemap { font-size: 12px; margin-top: 4px; }

/* =====================================================================
 * 升级 v4：PWA 安装条 / API 密钥 / 用量账单 / 跨平台兼容
 * ===================================================================== */

/* 安装到本机提示条 */
.install-bar {
  display: none; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
  background: rgba(17, 19, 33, .92); color: #fff; border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px; padding: 12px 14px; align-items: center; gap: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.35); backdrop-filter: blur(8px);
}
.install-bar[aria-hidden="false"] { display: flex; }
.install-bar-ico { font-size: 26px; }
.install-bar-text { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.install-bar-text strong { font-size: 14px; }
.install-bar-text span { font-size: 12px; opacity: .8; }
.install-bar-x { background: none; border: 0; color: rgba(255,255,255,.7); font-size: 18px; cursor: pointer; padding: 4px 6px; }

/* 个人中心：API 密钥 */
.apikey-box { margin-top: 22px; border-top: 1px solid var(--border); padding-top: 18px; }
.apikey-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.apikey-hint { font-size: 12.5px; color: var(--text-2); margin: 8px 0 12px; }
.apikey-list { display: flex; flex-direction: column; gap: 10px; }
.apikey-empty { font-size: 13px; color: var(--text-2); }
.apikey-item { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; }
.apikey-item code { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: var(--primary); word-break: break-all; }

/* 个人中心：用量 / 账单 */
.billing-box { margin-top: 22px; border-top: 1px solid var(--border); padding-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.billing-box > strong { font-size: 14px; margin-bottom: 4px; }
.billing-row { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; }
.billing-row span { color: var(--text-2); }
.billing-row strong { font-weight: 700; }

/* 跨平台：刘海/灵动岛安全区 + 触摸目标 */
.nav, .install-bar { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.nav { padding-top: max(10px, env(safe-area-inset-top)); }
footer { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); padding-bottom: max(20px, env(safe-area-inset-bottom)); }
.account-btn, .lang-btn, .chip, .filter-selects select, .btn { min-height: 40px; }
@media (hover: none) and (pointer: coarse) {
  .card-overlay .btn, .works-grid .btn { min-height: 44px; min-width: 44px; }
  .nav-menu-btn { min-height: 44px; min-width: 44px; }
}

/* 桌面端 PWA 安装条靠右显示，避免遮挡内容 */
@media (min-width: 720px) {
  .install-bar { left: auto; right: 24px; bottom: 24px; max-width: 420px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

/* 账户头像（注册用户可上传照片） */
.account-btn { display: inline-flex; align-items: center; gap: 6px; }
.ac-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: var(--surface); flex: none; }
.profile-avatar-box { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.profile-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--surface); border: 1px solid var(--border); }
.profile-avatar-box:empty { display: none; }

/* 微信二维码照片展示 */
.wechat-modal .qrcode-box img { width: 220px; max-width: 100%; border-radius: 12px; }
#wcPhone { font-size: 15px; margin-top: 6px; min-height: 18px; }

