/* 爪爪手记 Pawstalgia — 官网样式
   设计 token 与 App 一致(PetDiary/Utils/DesignSystem.swift):
   奶油底 #FFF6EC、暖可可文字 #4A3B33、蜜桃橙→蜜桃粉渐变、六色糖果点缀、大圆角卡片。
   不依赖任何外部字体/CDN,全部使用系统字体栈。 */

:root {
  --bg: #FFF6EC;
  --bg-deep: #FDEEDF;
  --card: #FFFFFF;
  --text: #4A3B33;
  --muted: #7D6A5E;
  --soft: #A8968A;
  --line: rgba(74, 59, 51, .09);
  --accent: #FF8FA3;
  --accent-2: #FFB077;
  --accent-ink: #C24A68;
  --grad: linear-gradient(135deg, #FFB077 0%, #FF8FA3 100%);
  --peach-fill: #FFE3EA; --peach-ink: #C94F6D;
  --butter-fill: #FFF1D6; --butter-ink: #9A6A16;
  --mint-fill: #DFF5EA; --mint-ink: #357A5A;
  --sky-fill: #E0F1FB; --sky-ink: #336E96;
  --taro-fill: #EDE5FA; --taro-ink: #6F51AA;
  --melon-fill: #FFE8DA; --melon-ink: #A9592D;
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow: 0 1px 2px rgba(74, 59, 51, .04), 0 12px 32px rgba(255, 143, 163, .10);
  --wrap: 1120px;
  --font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:lang(en) body, body:lang(en) { line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid rgba(255, 143, 163, .55); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.01em; margin: 0; font-weight: 700; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--card); padding: 8px 14px; border-radius: 12px; z-index: 10; }
.skip:focus { top: 12px; }

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(255, 246, 236, .86);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 18px; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 2px 8px rgba(255, 143, 163, .25); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; padding: 6px 10px; border-radius: 999px; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .7); }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.nav .lang { border: 1px solid rgba(255, 143, 163, .45); color: var(--accent-ink); margin-left: 4px; }
.brand, .nav a { white-space: nowrap; }
.brand { flex: none; }
.nav .opt { display: none; }
@media (max-width: 359px) { .brand span { display: none; } }
@media (max-width: 400px) { .site-header .wrap { gap: 8px; } .brand span { font-size: 17px; } .nav a { padding: 6px 7px; font-size: 14px; } }
@media (min-width: 720px) { .nav .opt { display: inline-block; } }

/* ---------- 通用 ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--accent-ink); letter-spacing: .02em; }
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--grad); }
.section { padding: 72px 0; }
.section[data-tight] { padding-top: 24px; }
.section-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.section-head h2 { font-size: clamp(28px, 6vw, 40px); margin-top: 10px; }
.section-head p { color: var(--muted); margin-top: 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 16px; text-decoration: none; }
.btn-store { background: #1F1A1C; color: #fff; }
.btn-store .sub { display: block; font-size: 11px; font-weight: 500; opacity: .72; line-height: 1.2; }
.btn-store .main { display: block; font-size: 17px; line-height: 1.25; }
.btn-store[aria-disabled="true"] { cursor: default; }
.btn-store svg { width: 22px; height: 22px; flex: none; }
.btn-ghost { color: var(--accent-ink); background: rgba(255, 255, 255, .7); border: 1px solid rgba(255, 143, 163, .45); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--butter-ink); background: var(--butter-fill); padding: 3px 10px; border-radius: 999px; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #E8A93A; }

/* ---------- 手机外框 ---------- */
.phone {
  position: relative;
  margin: 0;
  width: min(300px, 78vw);
  aspect-ratio: 1320 / 2868;
  padding: 3.2%;
  border-radius: 15% / 7%;
  background: linear-gradient(145deg, #2A2426, #151214);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .25), 0 30px 60px -18px rgba(150, 80, 70, .35), 0 12px 24px -12px rgba(74, 59, 51, .25);
  flex: none;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 12.4% / 5.8%; background: var(--bg); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 40px 0 64px; }
.hero::before {
  content: ""; position: absolute; inset: -20% -30% auto auto; width: 80vw; height: 80vw; max-width: 760px; max-height: 760px;
  background: radial-gradient(closest-side, rgba(255, 176, 119, .30), rgba(255, 143, 163, .14) 55%, transparent);
  pointer-events: none;
}
.hero .wrap { position: relative; display: grid; gap: 48px; align-items: center; }
.hero-copy { text-align: center; }
.app-id { display: inline-flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.app-id img { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 8px 22px rgba(255, 143, 163, .32); }
.app-id .names { text-align: left; line-height: 1.3; }
.app-id strong { display: block; font-size: 20px; }
.app-id span { font-size: 14px; color: var(--muted); }
.hero h1 { font-size: clamp(34px, 8.6vw, 58px); letter-spacing: -.02em; }
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { margin: 18px auto 0; max-width: 520px; color: var(--muted); font-size: 18px; }
.cta { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
.facts { margin: 22px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; font-size: 14px; color: var(--muted); }
.facts li { display: inline-flex; align-items: center; gap: 6px; }
.facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .8; }
.hero-visual { display: flex; justify-content: center; }
.hero-visual .phone { width: min(290px, 72vw); }

@media (min-width: 900px) {
  .hero { padding: 56px 0 88px; }
  .hero .wrap { grid-template-columns: 1.15fr .85fr; }
  .hero-copy { text-align: left; }
  .hero .lead { margin-left: 0; }
  .cta, .facts { justify-content: flex-start; }
  .hero-visual .phone { width: 320px; transform: rotate(2deg); }
}

/* ---------- 功能 ---------- */
.features { background: linear-gradient(180deg, var(--bg) 0%, #FFF1E4 50%, var(--bg) 100%); }
.feature { display: grid; gap: 36px; align-items: center; padding: 40px 0; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature-media { display: flex; justify-content: center; }
.feature-media .phone { width: min(270px, 68vw); }
.chip { display: inline-block; font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 999px; letter-spacing: .02em; }
.chip.peach { background: var(--peach-fill); color: var(--peach-ink); }
.chip.taro { background: var(--taro-fill); color: var(--taro-ink); }
.chip.mint { background: var(--mint-fill); color: var(--mint-ink); }
.chip.sky { background: var(--sky-fill); color: var(--sky-ink); }
.feature h3 { font-size: clamp(24px, 5.4vw, 32px); margin-top: 14px; }
.feature .desc { color: var(--muted); margin-top: 12px; }
.points { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.points li { position: relative; padding-left: 26px; }
.points li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 10px; height: 10px; border-radius: 4px; background: var(--grad); opacity: .75; }
@media (min-width: 900px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 64px; padding: 56px 0; }
  .feature-copy { max-width: 470px; }
  .feature:nth-of-type(even) .feature-media { order: -1; }
  .feature:nth-of-type(odd) .feature-copy { justify-self: end; }
  .feature-media .phone { width: 290px; }
}

/* ---------- 隐私承诺 ---------- */
.promise-card {
  position: relative; border-radius: var(--radius-xl); background: var(--card); padding: 40px 24px; box-shadow: var(--shadow); overflow: hidden;
}
.promise-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  background: linear-gradient(135deg, #FFB077, #FF8FA3 35%, #CBB6F0 65%, #A5D8F3);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.promise-card h2 { font-size: clamp(28px, 6.4vw, 42px); text-align: center; margin-top: 12px; }
.promise-card .intro { text-align: center; color: var(--muted); max-width: 600px; margin: 14px auto 0; }
.promise-top { text-align: center; }
.lock { width: 56px; height: 56px; margin: 0 auto; border-radius: 18px; display: grid; place-items: center; background: var(--grad); box-shadow: 0 10px 24px rgba(255, 143, 163, .35); }
.lock svg { width: 26px; height: 26px; }
.promise-grid { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 14px; }
.promise-grid li { background: var(--bg); border-radius: var(--radius-lg); padding: 18px 20px; }
.promise-grid strong { display: block; font-size: 17px; }
.promise-grid span { display: block; color: var(--muted); font-size: 15px; margin-top: 4px; }
.promise-note { margin-top: 24px; text-align: center; font-size: 15px; color: var(--muted); }
@media (min-width: 720px) {
  .promise-card { padding: 56px 48px; }
  .promise-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--card); border-radius: var(--radius-lg); box-shadow: 0 1px 2px rgba(74, 59, 51, .04); border: 1px solid rgba(255, 143, 163, .18); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 54px 18px 22px; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 24px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details > div { padding: 0 22px 20px; color: var(--muted); }
.faq details > div p + p { margin-top: 8px; }

/* ---------- 页脚 ---------- */
.site-footer { margin-top: 24px; padding: 40px 0 28px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer-top { display: grid; gap: 20px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.footer-brand img { width: 28px; height: 28px; border-radius: 8px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.footer-meta p { text-wrap: balance; }
.footer-meta { margin-top: 24px; display: grid; gap: 6px; text-align: center; font-size: 13px; color: var(--soft); }
.footer-meta a { color: var(--soft); text-decoration: none; }
.footer-meta a:hover { color: var(--muted); text-decoration: underline; }
@media (min-width: 720px) { .footer-top { grid-template-columns: auto 1fr; align-items: center; } .footer-links { justify-content: flex-end; } }

/* ---------- 法律文本页 ---------- */
.doc { padding: 40px 0 56px; }
.doc .wrap { max-width: 800px; }
.doc-head { padding: 8px 0 28px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.doc-head h1 { font-size: clamp(30px, 7vw, 44px); margin-top: 10px; }
.doc-head .meta { margin-top: 14px; color: var(--muted); font-size: 15px; }
.doc-summary { margin: 28px 0 8px; background: var(--card); border-radius: var(--radius-lg); padding: 22px 24px; box-shadow: var(--shadow); }
.doc-summary h2 { font-size: 18px; margin: 0 0 10px; }
.doc-summary ul { margin: 0; padding-left: 1.2em; color: var(--muted); }
.doc-summary li + li { margin-top: 6px; }
.toc { margin: 24px 0 8px; font-size: 15px; }
.toc summary { cursor: pointer; font-weight: 600; color: var(--accent-ink); }
.toc ol { margin: 10px 0 0; padding-left: 1.4em; color: var(--muted); columns: 2 220px; column-gap: 32px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--text); text-decoration: underline; }
.doc section { padding-top: 28px; scroll-margin-top: 80px; }
.doc section h2 { font-size: 22px; margin-bottom: 10px; }
.doc section h3 { font-size: 17px; margin: 18px 0 6px; }
.doc section p, .doc section li { color: #5C4B41; }
.doc section p + p { margin-top: 10px; }
.doc section ul { padding-left: 1.2em; margin: 10px 0 0; }
.doc section li + li { margin-top: 6px; }
.doc table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 15px; background: var(--card); border-radius: var(--radius-md); overflow: hidden; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.doc th { background: #FFF0E4; font-weight: 600; color: var(--text); }
.doc tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-md); }
.table-scroll table { min-width: 560px; }
.doc code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .9em; background: #FFF0E4; padding: 1px 6px; border-radius: 6px; }
.callout { margin-top: 14px; padding: 14px 18px; border-radius: var(--radius-md); background: var(--peach-fill); color: #7A3346; font-size: 15px; }
.doc-foot { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }

/* ---------- 404 ---------- */
.notfound { min-height: 64vh; display: grid; place-items: center; text-align: center; padding: 64px 0; }
.notfound .code { font-size: 15px; font-weight: 700; color: var(--accent-ink); letter-spacing: .1em; }
.notfound h1 { font-size: clamp(28px, 6vw, 40px); margin-top: 10px; }
.notfound p { color: var(--muted); margin-top: 12px; }
.notfound .cta { justify-content: center; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@media print {
  .site-header, .site-footer, .toc, .skip { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .doc-summary { box-shadow: none; border: 1px solid #ddd; }
}
