/* 🏠 访客主页（templates/landing.html）。颜色跟随外观设置（--ap-*），字号跟随用户字号（--ap-scale）。 */
:root {
    --lp-bg: var(--ap-bg, #fafaf9);
    --lp-card: var(--ap-card, #ffffff);
    --lp-text: var(--ap-text, #111827);
    --lp-muted: var(--ap-muted, #6b7280);
    --lp-accent: var(--ap-accent, #16a34a);
    --lp-border: rgba(15, 23, 42, .08);
    --lp-soft: rgba(15, 23, 42, .035);
    --lp-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .05);
    --lp-radius: 18px;
}
html.dark {
    --lp-bg: var(--ap-bg, #0b0f17);
    --lp-card: var(--ap-card, #111827);
    --lp-text: var(--ap-text, #e5e7eb);
    --lp-muted: var(--ap-muted, #9ca3af);
    --lp-border: rgba(148, 163, 184, .16);
    --lp-soft: rgba(148, 163, 184, .06);
    --lp-shadow: none;
}
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
* { box-sizing: border-box; }
.lp-body {
    margin: 0; background: var(--lp-bg); color: var(--lp-text);
    font-size: calc(15px * var(--ap-scale, 1)); line-height: 1.7;
    -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
.lp-body a { color: inherit; text-decoration: none; }
.lp-wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .lp-wrap { padding: 0 24px; } }
.lp-narrow { max-width: 780px; }
.lp-center { text-align: center; margin-top: 28px; }

/* 预览条 */
.lp-preview {
    position: sticky; top: 0; z-index: 60; padding: 6px 16px; text-align: center;
    background: #fef3c7; color: #92400e; font-size: calc(12px * var(--ap-scale, 1));
}
.lp-preview a { text-decoration: underline !important; }
html.dark .lp-preview { background: #422006; color: #fcd34d; }

/* 顶栏 */
.lp-top {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--lp-bg) 86%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid transparent; transition: border-color .2s;
}
.lp-preview + .lp-top { top: 30px; }
.lp-top.lp-top-shadow { border-bottom-color: var(--lp-border); }
.lp-top-in { display: flex; align-items: center; gap: 16px; height: 60px; }
.lp-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: calc(16px * var(--ap-scale, 1)); min-width: 0; }
.lp-brand img { width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; }
.lp-brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-nav { display: flex; gap: 4px; margin-left: 12px; }
.lp-nav a { padding: 6px 12px; border-radius: 999px; color: var(--lp-muted); font-size: calc(14px * var(--ap-scale, 1)); transition: color .15s, background .15s; }
.lp-nav a:hover { color: var(--lp-text); background: var(--lp-soft); }
.lp-top-act { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lp-lang {
    appearance: none; -webkit-appearance: none; border: 1px solid var(--lp-border); background: transparent; color: var(--lp-muted);
    border-radius: 999px; padding: 5px 12px; font-size: calc(13px * var(--ap-scale, 1)); cursor: pointer; max-width: 110px;
}
.lp-lang option { color: #111827; }
.lp-menu { display: none; border: 0; background: transparent; color: var(--lp-text); padding: 6px; border-radius: 10px; cursor: pointer; font-size: calc(20px * var(--ap-scale, 1)); line-height: 0; }
.lp-menu:hover { background: var(--lp-soft); }
@media (max-width: 767px) {
    .lp-menu { display: inline-flex; }
    .lp-nav {
        display: none; position: absolute; left: 0; right: 0; top: 60px; margin: 0; padding: 8px 16px 14px;
        flex-direction: column; background: var(--lp-bg); border-bottom: 1px solid var(--lp-border);
    }
    .lp-nav a { padding: 10px 12px; font-size: calc(15px * var(--ap-scale, 1)); }
    .lp-top.lp-nav-open .lp-nav { display: flex; }
}
@media (max-width: 380px) { .lp-lang { max-width: 84px; padding: 5px 8px; } }

/* 按钮 */
.lp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 18px; border-radius: 999px; border: 1px solid var(--lp-border); background: var(--lp-card);
    color: var(--lp-text) !important; font-weight: 600; font-size: calc(14px * var(--ap-scale, 1)); line-height: 1.3;
    white-space: nowrap; transition: transform .15s, box-shadow .15s, background .15s; cursor: pointer;
}
.lp-btn:hover { transform: translateY(-1px); box-shadow: var(--lp-shadow); }
.lp-btn-primary { background: var(--lp-accent); border-color: var(--lp-accent); color: #fff !important; }
.lp-btn-primary:hover { filter: brightness(1.05); }
.lp-btn-lg { padding: 12px 24px; font-size: calc(15px * var(--ap-scale, 1)); }
.lp-btn-sm { padding: 6px 14px; font-size: calc(13px * var(--ap-scale, 1)); }

/* 首屏 */
.lp-hero { padding: 72px 0 40px; text-align: center; position: relative; }
.lp-hero::before {
    content: ""; position: absolute; inset: -60px 0 auto; height: 520px; z-index: -1; pointer-events: none;
    background: radial-gradient(60% 60% at 50% 0%, color-mix(in srgb, var(--lp-accent) 16%, transparent), transparent 70%);
}
.lp-eyebrow {
    display: inline-block; padding: 4px 12px; border-radius: 999px; margin-bottom: 18px;
    color: var(--lp-accent); background: color-mix(in srgb, var(--lp-accent) 10%, transparent);
    font-size: calc(13px * var(--ap-scale, 1)); font-weight: 600;
}
.lp-h1 {
    margin: 0 auto; max-width: 860px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2;
    font-size: calc(34px * var(--ap-scale, 1)); overflow-wrap: anywhere;
}
@media (min-width: 768px) { .lp-h1 { font-size: calc(50px * var(--ap-scale, 1)); } .lp-hero { padding: 104px 0 56px; } }
.lp-lead { margin: 20px auto 0; max-width: 660px; color: var(--lp-muted); font-size: calc(17px * var(--ap-scale, 1)); white-space: pre-line; }
.lp-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.lp-actions:empty { display: none; }
.lp-note { display: inline-block; margin-top: 16px; color: var(--lp-muted); font-size: calc(14px * var(--ap-scale, 1)); text-decoration: underline !important; text-underline-offset: 3px; }
.lp-note:hover { color: var(--lp-accent); }
.lp-shot { margin: 48px auto 0; max-width: 1000px; }
.lp-shot img {
    display: block; width: 100%; height: auto; border-radius: var(--lp-radius);
    border: 1px solid var(--lp-border); box-shadow: 0 20px 60px rgba(15, 23, 42, .12); background: var(--lp-card);
}
.lp-shot-pair .lp-shot-dark { display: none; }
html.dark .lp-shot-pair .lp-shot-light { display: none; }
html.dark .lp-shot-pair .lp-shot-dark { display: block; }

/* 区块 */
.lp-sec { padding: 64px 0; }
@media (min-width: 768px) { .lp-sec { padding: 88px 0; } }
.lp-sec-alt { background: var(--lp-soft); }
.lp-sec-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.lp-h2 { margin: 0; font-weight: 800; letter-spacing: -.01em; line-height: 1.3; font-size: calc(26px * var(--ap-scale, 1)); overflow-wrap: anywhere; }
@media (min-width: 768px) { .lp-h2 { font-size: calc(34px * var(--ap-scale, 1)); } }
.lp-sub { margin: 12px 0 0; color: var(--lp-muted); font-size: calc(16px * var(--ap-scale, 1)); white-space: pre-line; }
.lp-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .lp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
    .lp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lp-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.lp-card {
    display: flex; flex-direction: column; min-width: 0;
    background: var(--lp-card); border: 1px solid var(--lp-border); border-radius: var(--lp-radius);
    padding: 22px; box-shadow: var(--lp-shadow);
}
.lp-ico {
    display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; margin-bottom: 14px;
    color: var(--lp-accent); background: color-mix(in srgb, var(--lp-accent) 12%, transparent); font-size: calc(19px * var(--ap-scale, 1));
}
.lp-h3 { margin: 0; font-weight: 700; font-size: calc(16px * var(--ap-scale, 1)); line-height: 1.4; overflow-wrap: anywhere; }
.lp-text { margin: 8px 0 0; color: var(--lp-muted); font-size: calc(14px * var(--ap-scale, 1)); white-space: pre-line; overflow-wrap: anywhere; }
.lp-card-foot { margin-top: auto; padding-top: 16px; }

/* 套餐 */
.lp-plans { justify-content: center; }
@media (min-width: 1024px) { .lp-plans { grid-template-columns: repeat(auto-fit, minmax(240px, 300px)); } }
.lp-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; font-size: calc(14px * var(--ap-scale, 1)); }
.lp-list li { display: flex; gap: 8px; align-items: flex-start; }
.lp-list .li { color: var(--lp-accent); margin-top: .3em; }
.lp-tag {
    align-self: flex-start; margin-top: 16px; padding: 2px 10px; border-radius: 999px;
    color: var(--lp-accent); background: color-mix(in srgb, var(--lp-accent) 10%, transparent); font-size: calc(12px * var(--ap-scale, 1)); font-weight: 600;
}

/* 常见问题 */
.lp-faq { display: grid; gap: 10px; }
.lp-qa { background: var(--lp-card); border: 1px solid var(--lp-border); border-radius: 14px; padding: 0 18px; }
.lp-qa summary {
    list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 0; cursor: pointer; font-weight: 600; font-size: calc(15px * var(--ap-scale, 1));
}
.lp-qa summary::-webkit-details-marker { display: none; }
.lp-qa summary .li { color: var(--lp-muted); transition: transform .2s; }
.lp-qa[open] summary .li { transform: rotate(180deg); }
.lp-qa .lp-text { margin: 0 0 16px; }

/* 结尾 */
.lp-cta {
    text-align: center; padding: 48px 20px; border-radius: 28px;
    background: color-mix(in srgb, var(--lp-accent) 9%, var(--lp-card)); border: 1px solid color-mix(in srgb, var(--lp-accent) 20%, transparent);
}
.lp-cta .lp-actions { margin-top: 24px; }

/* 页脚（templates/partials/_landing_footer.html）：左边名称 + 简介，右边几列链接；底部一行版权与开发团队 */
.lp-foot {
    margin-top: 32px; padding: 56px 0 28px; color: var(--lp-muted); font-size: calc(14px * var(--ap-scale, 1));
    background: var(--lp-soft); border-top: 1px solid var(--lp-border);
}
.lp-foot-grid { display: grid; gap: 32px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lp-foot-brand { grid-column: 1 / -1; max-width: 360px; }
@media (min-width: 768px) {
    .lp-foot-grid { grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); }
    .lp-foot-brand { grid-column: auto; }
}
.lp-foot-brand .lp-brand { color: var(--lp-text); font-size: calc(17px * var(--ap-scale, 1)); }
.lp-foot-brand .lp-brand img { width: 32px; height: 32px; }
.lp-foot-about { margin: 14px 0 0; line-height: 1.7; white-space: pre-line; }
.lp-foot-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.lp-foot-col h3 {
    margin: 0 0 4px; color: var(--lp-text); font-size: calc(13px * var(--ap-scale, 1)); font-weight: 700; letter-spacing: .04em;
}
.lp-foot-col a { overflow-wrap: anywhere; transition: color .15s; }
.lp-foot-col a:hover, .lp-foot-bottom a:hover { color: var(--lp-accent); }
.lp-foot-bottom {
    display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: space-between; align-items: center;
    margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--lp-border); font-size: calc(13px * var(--ap-scale, 1));
}
.lp-copy-team { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.lp-copy-team a { color: var(--lp-text); font-weight: 600; }

/* 📱 App 主页（templates/app_landing.html）和访客主页里的 App 卡片 */
.lp-app-ico { width: 40px; height: 40px; border-radius: 10px; margin-bottom: 14px; }
.lp-app-icon { display: block; margin: 0 auto 20px; width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 10px 30px rgba(15, 23, 42, .15); }
.lp-store {
    display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 14px;
    background: #111827; color: #fff !important; font-weight: 700; font-size: calc(15px * var(--ap-scale, 1)); white-space: nowrap;
    transition: transform .15s, box-shadow .15s;
}
.lp-store:hover { transform: translateY(-1px); box-shadow: var(--lp-shadow); }
html.dark .lp-store { background: #f9fafb; color: #111827 !important; }
.lp-store-lg { padding: 14px 28px; font-size: calc(16px * var(--ap-scale, 1)); }
.lp-store-soon, html.dark .lp-store-soon { background: var(--lp-soft); color: var(--lp-muted) !important; border: 1px dashed var(--lp-border); cursor: default; }
.lp-store-soon:hover { transform: none; box-shadow: none; }
.lp-phones {
    display: flex; gap: 16px; margin: 48px auto 0; padding: 4px 4px 16px; max-width: 1000px;
    overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.lp-phones img {
    flex: 0 0 auto; width: 220px; height: auto; border-radius: 28px; scroll-snap-align: center;
    border: 1px solid var(--lp-border); box-shadow: 0 16px 40px rgba(15, 23, 42, .12); background: var(--lp-card);
}
@media (min-width: 768px) { .lp-phones { justify-content: safe center; } .lp-phones img { width: 250px; } }
.lp-phones-one { justify-content: center; }
.lp-price { margin-top: 6px; font-weight: 800; font-size: calc(20px * var(--ap-scale, 1)); color: var(--lp-accent); }
.lp-small { font-size: calc(13px * var(--ap-scale, 1)); margin-top: 24px; }
.lp-policy-link { margin-top: 28px; }
