/* 分享页引导页：宣纸墨色，变量名与 style.css 一致，主题用 localStorage.theme */
:root {
    --primary: #8B6B45; --primary-dark: #6B4F30; --secondary: #6F6152;
    --bg: #F6F1E8; --card: #FEFCF8; --text-main: #1C1814; --text-body: #3C3028;
    --border: #DDD5C5; --badge-bg: #EDE7DA;
    --seal: #A33B2A; --seal-text: #FFF8F0; --glow: rgba(163, 59, 42, .10);
    --shadow: 0 1px 2px rgba(60, 48, 40, .06), 0 12px 32px -12px rgba(60, 48, 40, .18);
}
[data-theme="dark"] {
    --primary: #C9A87C; --primary-dark: #DFC09A; --secondary: #A89888;
    --bg: #100E0B; --card: #1A1714; --text-main: #EAE4D8; --text-body: #C5BAA8;
    --border: #2C2620; --badge-bg: #221E18;
    --seal: #C0503C; --seal-text: #FFF8F0; --glow: rgba(201, 168, 124, .08);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 36px -14px rgba(0, 0, 0, .7);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
    margin: 0; background: var(--bg); color: var(--text-body); line-height: 1.75;
    font-family: 'Noto Serif SC', 'Songti SC', 'STSong', Georgia, serif;
    -webkit-font-smoothing: antialiased; transition: background-color .4s, color .4s;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--seal); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; overflow-x: clip; /* 旋转中的背景圆环外接框会超出视口 */ }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 顶栏 */
.top { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; }
.brand { font-size: 13px; letter-spacing: .32em; color: var(--primary); font-weight: 600; }
.brand b { display: inline-block; width: 22px; height: 22px; line-height: 22px; margin-right: 10px; text-align: center; letter-spacing: 0; font-size: 13px; background: var(--seal); color: var(--seal-text); border-radius: 3px; }
.theme-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); color: var(--text-main); cursor: pointer; font-size: 16px; line-height: 1; }
.theme-btn:hover { background: var(--badge-bg); }

/* Hero */
.hero { position: relative; text-align: center; padding: 56px 0 64px; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: -40px -20px auto; height: 420px; z-index: -1;
    background: radial-gradient(ellipse 60% 70% at 50% 30%, var(--glow), transparent 70%); }
.hero-ring { position: absolute; left: 50%; top: 8px; width: 440px; max-width: 100vw; transform: translateX(-50%); color: var(--primary); opacity: .16; z-index: -1; animation: spin 120s linear infinite; }
@keyframes spin { to { transform: translateX(-50%) rotate(360deg); } }
.eyebrow { font-size: 12px; letter-spacing: .36em; color: var(--primary); margin: 0 0 20px; }
.hero h1 { margin: 0; font-weight: 400; font-size: clamp(28px, 6.4vw, 48px); letter-spacing: .12em; line-height: 1.4; color: var(--text-main); }
.hero h1 em { font-style: normal; color: var(--seal); }
.hero-rule { width: 36px; height: 1px; background: var(--primary); margin: 26px auto 22px; }
.hero p.lead { max-width: 520px; margin: 0 auto; font-size: 16px; color: var(--text-body); }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 28px; border-radius: 3px; font: inherit; font-size: 15px; letter-spacing: .1em; cursor: pointer; border: 1px solid transparent; transition: transform .2s, background .2s, border-color .2s; }
.btn-primary { background: var(--seal); color: var(--seal-text); box-shadow: 0 6px 16px -6px var(--seal); }
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-ghost { border-color: var(--border); background: var(--card); color: var(--text-main); }
.btn-ghost:hover { border-color: var(--primary); }
.hero-note { margin-top: 18px; font-size: 13px; color: var(--secondary); }

/* 区块标题 */
.sec { padding: 8px 0 56px; }
.sec-h { text-align: center; margin-bottom: 30px; }
.sec-h h2 { margin: 0; font-weight: 400; font-size: 22px; letter-spacing: .2em; color: var(--text-main); }
.sec-h p { margin: 8px 0 0; font-size: 14px; color: var(--secondary); }

/* 模块卡 */
.cards { display: grid; gap: 18px; grid-template-columns: 1fr; }
.mcard { position: relative; display: flex; flex-direction: column; padding: 28px 24px 24px; background: var(--card); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow); transition: transform .25s, border-color .25s; overflow: hidden; }
.mcard::after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 3px; background: var(--seal); transform: scaleX(0); transform-origin: left; transition: transform .35s; }
.mcard:hover, .mcard:focus-within { transform: translateY(-3px); border-color: var(--primary); }
.mcard:hover::after, .mcard:focus-within::after { transform: scaleX(1); }
.mcard-head { display: flex; align-items: center; gap: 16px; }
.mcard-icon { flex: none; width: 56px; height: 56px; color: var(--primary); }
.mcard-tag { font-size: 12px; letter-spacing: .22em; color: var(--secondary); }
.mcard h3 { margin: 2px 0 0; font-weight: 500; font-size: 22px; letter-spacing: .1em; color: var(--text-main); }
.badge { display: inline-block; margin: 18px 0 8px; align-self: flex-start; padding: 1px 10px; font-size: 12px; letter-spacing: .06em; color: var(--seal); border: 1px solid var(--seal); border-radius: 2px; }
.pitch { margin: 0 0 14px; font-size: 16px; color: var(--text-main); }
.mcard ul { list-style: none; margin: 0 0 24px; padding: 0; font-size: 14px; }
.mcard li { position: relative; padding-left: 18px; margin-bottom: 8px; }
.mcard li::before { content: ""; position: absolute; left: 2px; top: .8em; width: 6px; height: 6px; background: var(--primary); transform: rotate(45deg); }
.mcard .btn { margin-top: auto; width: 100%; }
.mcard .stretch::before { content: ""; position: absolute; inset: 0; z-index: 1; }

/* 流程 */
.steps { display: grid; gap: 14px; grid-template-columns: 1fr; counter-reset: s; }
.step { position: relative; padding: 18px 20px 18px 64px; background: var(--card); border: 1px solid var(--border); border-radius: 6px; }
.step::before { counter-increment: s; content: counter(s, cjk-ideographic); position: absolute; left: 18px; top: 16px; width: 32px; height: 32px; line-height: 32px; text-align: center; font-size: 15px; color: var(--seal); border: 1px solid var(--seal); border-radius: 50%; }
.step b { display: block; font-weight: 500; font-size: 16px; color: var(--text-main); letter-spacing: .1em; }
.step span { font-size: 14px; color: var(--secondary); }

/* 信任条 */
.trust { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.trust div { padding: 16px; background: var(--badge-bg); border-radius: 6px; font-size: 14px; }
.trust b { display: block; font-weight: 500; color: var(--text-main); letter-spacing: .08em; margin-bottom: 4px; }

/* 示例 */
.sample { position: relative; padding: 24px 22px 0; background: var(--card); border: 1px solid var(--border); border-radius: 6px; max-height: 250px; overflow: hidden; box-shadow: var(--shadow); }
.sample .q { font-size: 13px; color: var(--secondary); margin: 0 0 12px; }
.sample .q b { font-weight: 500; color: var(--seal); margin-right: 8px; letter-spacing: .1em; }
.sample h4 { margin: 0 0 8px; font-size: 16px; font-weight: 500; color: var(--text-main); }
.sample p { margin: 0 0 10px; font-size: 15px; }
.sample::after { content: ""; position: absolute; inset: auto 0 0 0; height: 110px; background: linear-gradient(to bottom, transparent, var(--card) 85%); }
.sample-more { text-align: center; margin-top: 18px; }

/* 底部 */
.final { text-align: center; padding: 48px 20px; margin-bottom: 32px; background: var(--card); border: 1px solid var(--border); border-radius: 6px; }
.final h2 { margin: 0 0 8px; font-weight: 400; font-size: 22px; letter-spacing: .16em; color: var(--text-main); }
.final p { margin: 0 0 22px; font-size: 14px; color: var(--secondary); }
.final .hero-cta { margin-top: 0; }
.foot { padding: 0 0 100px; text-align: center; font-size: 12px; color: var(--secondary); line-height: 1.8; }
.foot a { text-decoration: underline; text-underline-offset: 3px; }

/* 手机吸底按钮 */
.sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--border); transform: translateY(110%); transition: transform .3s; }
.sticky.show { transform: none; }
.sticky .btn { width: 100%; }

@media (min-width: 720px) {
    .steps { grid-template-columns: repeat(3, 1fr); }
    .trust { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 900px) {
    .cards { grid-template-columns: repeat(3, 1fr); }
    .sticky { display: none; }
    .foot { padding-bottom: 48px; }
    .hero { padding: 72px 0 80px; }
}
@media (max-width: 380px) { .trust { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero-ring { animation: none; }
    *, *::before, *::after { transition: none !important; }
}

/* 失效链接页（index.php 的 404）复用 */
.gone { max-width: 420px; margin: 0 auto 40px; padding: 28px 22px; text-align: center; background: var(--card); border: 1px solid var(--border); border-radius: 6px; }
.gone h2 { margin: 0 0 6px; font-weight: 500; font-size: 20px; color: var(--text-main); letter-spacing: .1em; }
.gone p { margin: 0; font-size: 14px; color: var(--secondary); }

/* 定义段与关键事实（GEO：可被直接引用的短段落） */
.about-def { max-width: 720px; margin: 0 auto 22px; font-size: 16px; line-height: 1.9; color: var(--text-body); }
.facts { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 0 auto; max-width: 720px; }
.facts div { padding: 14px 18px; background: var(--card); border: 1px solid var(--border); border-radius: 6px; }
.facts dt { font-weight: 500; letter-spacing: .08em; color: var(--text-main); }
.facts dd { margin: 2px 0 0; font-size: 14px; color: var(--secondary); }
@media (min-width: 720px) { .facts { grid-template-columns: 1fr 1fr; } }

/* 常见问题 */
.faq { max-width: 720px; margin: 0 auto; }
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: 6px; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 14px 18px; font-size: 15px; color: var(--text-main); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary); font-size: 18px; line-height: 1.4; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 18px 16px; font-size: 14px; color: var(--text-body); }
