:root {
    --primary-color: #f05252;
    --secondary-color: #c9343d;
    --grad: linear-gradient(135deg, #f05252, #c9343d);
    --mint: #2bb5a8;
    --blue: #3266d6;
    --highlight: #73e2d7;
    --success-color: #2bb5a8;
    --warning-color: #FF9500;
    --text-primary: #172033;
    --text-secondary: #5f6b7a;
    --bg-primary: #ffffff;
    --bg-secondary: #f7f4ef;
    --card: #ffffff;
    --border-color: #eadfda;
    --shadow: 0 2px 15px rgba(23, 32, 51, 0.06);
    --shadow-lg: 0 18px 50px rgba(23, 32, 51, 0.14);
    --nav-bg: rgba(255, 255, 255, 0.74);
    --chip-bg: rgba(240, 82, 82, 0.09);
    --radius: 22px;
}

:root[data-theme="dark"] {
    --text-primary: #eef1f7;
    --text-secondary: #97a2b3;
    --bg-primary: #111827;
    --bg-secondary: #182033;
    --card: #1b2438;
    --border-color: #2a3550;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.55);
    --nav-bg: rgba(17, 24, 39, 0.74);
    --chip-bg: rgba(240, 82, 82, 0.18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Roboto, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color .4s ease, color .4s ease;
}

html { scroll-behavior: smooth; scroll-padding-top: 90px; overflow-x: clip; }
body { overflow-x: clip; }
img { display: block; max-width: 100%; }

a:focus-visible, button:focus-visible, summary:focus-visible {
    outline: 3px solid rgba(240, 82, 82, 0.5);
    outline-offset: 3px;
    border-radius: 6px;
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 22px; }

.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 2000;
    background: var(--primary-color); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

.section-title { font-size: clamp(28px, 4vw, 38px); font-weight: 800; text-align: center; letter-spacing: -0.02em; }
.section-sub { text-align: center; color: var(--text-secondary); font-size: 17px; margin-top: 12px; margin-bottom: 52px; }

/* App Store badge (inline, self-contained) */
.appstore-badge { display: inline-flex; transition: transform .2s; }
.appstore-badge:hover { transform: translateY(-2px) scale(1.02); }
.appstore-badge svg { height: 56px; width: auto; display: block; border-radius: 9px; box-shadow: 0 8px 20px rgba(0,0,0,.18); }
html[lang="en"] .badge-zh { display: none; }
html:not([lang="en"]) .badge-en { display: none; }

/* ---------- Navbar ---------- */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid transparent;
    padding: 12px 0;
    transition: border-color .3s, box-shadow .3s, background .4s;
}
.navbar.scrolled { border-bottom-color: var(--border-color); box-shadow: 0 6px 24px rgba(23,32,51,.06); }
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.nav-brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; text-decoration: none; color: var(--text-primary); }
.brand-icon { display: inline-flex; filter: drop-shadow(0 4px 10px rgba(240,82,82,.35)); }
.brand-icon svg { display: block; border-radius: 9px; }
.nav-menu { display: flex; align-items: center; gap: 22px; }
.nav-link { text-decoration: none; color: var(--text-secondary); font-weight: 500; font-size: 15px; transition: color .25s; }
.nav-link:hover { color: var(--primary-color); }
.icon-btn, .lang-switch {
    background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border-color);
    border-radius: 999px; cursor: pointer; font-weight: 600; transition: all .25s; display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn { width: 38px; height: 38px; }
.lang-switch { padding: 8px 15px; font-size: 14px; }
.icon-btn:hover, .lang-switch:hover { border-color: var(--primary-color); color: var(--primary-color); }
.icon-btn .i-moon { display: none; }
:root[data-theme="dark"] .icon-btn .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn .i-moon { display: block; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 26px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 16px; transition: transform .2s, box-shadow .2s, background .25s; white-space: nowrap; cursor: pointer; border: none; }
.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(240,82,82,.32); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(240,82,82,.42); }
.btn-secondary { background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-secondary:hover { transform: translateY(-2px); border-color: var(--primary-color); color: var(--primary-color); }
.nav-cta { box-shadow: 0 6px 16px rgba(240,82,82,.3); }
.apple-icon { margin-right: 2px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 140px 0 90px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; background:
    radial-gradient(60% 55% at 82% 8%, rgba(240,82,82,.16), transparent 60%),
    radial-gradient(55% 50% at 8% 30%, rgba(43,181,168,.14), transparent 60%); }
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--primary-color); background: var(--chip-bg); padding: 7px 14px; border-radius: 999px; margin-bottom: 20px; }
.hero-title { font-size: clamp(38px, 5.4vw, 58px); font-weight: 800; line-height: 1.08; letter-spacing: -0.03em; margin-bottom: 18px; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; text-wrap: balance; }
.hero-subtitle { font-size: 19px; color: var(--text-secondary); margin-bottom: 34px; max-width: 36ch; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.hero-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 30px; }
.hero-trust li { font-size: 14px; color: var(--text-secondary); font-weight: 500; }

/* Hero device widget */
.hero-visual { position: relative; display: flex; justify-content: center; }
.device { position: relative; width: 300px; max-width: 78vw; aspect-ratio: 9 / 19.5; display: flex; flex-direction: column; overflow: hidden; background: var(--card); border: 1px solid var(--border-color); border-radius: 40px; padding: 16px 14px 18px; box-shadow: var(--shadow-lg); }
.device-notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 90px; height: 22px; background: var(--text-primary); opacity: .9; border-radius: 999px; z-index: 3; }
:root[data-theme="dark"] .device-notch { background: #000; opacity: 1; }

.focus { margin-top: 30px; padding: 0 4px; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.focus-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 10px; }
.focus-title { font-weight: 800; font-size: 17px; }
.focus-ai { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--mint); }
.focus-ai .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(43,181,168,.5); animation: pulse 2s infinite; }
.timer-wrap { display: flex; justify-content: center; align-items: center; flex: 1 1 auto; min-height: 0; padding: 10px 0 16px; }
.timer-ring { position: relative; width: 150px; height: 150px; }
.timer-ring svg { width: 150px; height: 150px; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--border-color); stroke-width: 12; }
.ring-prog { fill: none; stroke: url(#ringgrad); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 434; stroke-dashoffset: 174; animation: ringfill 1.4s ease-out .2s backwards; }
.timer-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.timer-time { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.timer-label { font-size: 11px; color: var(--text-secondary); font-weight: 600; margin-top: 4px; }
.queue { display: flex; flex-direction: column; gap: 8px; }
.qtask { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 12px; background: var(--bg-secondary); border: 1px solid var(--border-color); font-size: 12.5px; font-weight: 600; animation: qin .6s cubic-bezier(.2,.8,.25,1) backwards; }
.qtask .qi { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: var(--text-secondary); }
.qtask.now { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 18px rgba(240,82,82,.3); }
.qtask.now .qi { background: #fff; }
.qtag { margin-left: auto; font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 999px; letter-spacing: .02em; }
.qtag.now { background: rgba(255,255,255,.25); color: #fff; }
.qtag.high { background: rgba(240,82,82,.12); color: var(--primary-color); }
.qtag.mid { background: rgba(50,102,214,.12); color: var(--blue); }
.qtask.q1 { animation-delay: .35s; }
.qtask.q2 { animation-delay: .55s; }
.qtask.q3 { animation-delay: .75s; }
.focus-foot { margin-top: 12px; text-align: center; font-size: 11px; font-weight: 700; color: var(--mint); background: rgba(43,181,168,.12); padding: 8px; border-radius: 10px; }

.timer-orbit { position: absolute; top: 9%; right: -6%; width: 66px; height: 66px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; text-align: center; box-shadow: 0 12px 26px rgba(240,82,82,.4); animation: float 5s ease-in-out infinite; z-index: 4; }
.timer-orbit span { font-size: 22px; font-weight: 800; line-height: 1; }
.timer-orbit small { font-size: 10px; font-weight: 700; opacity: .92; letter-spacing: .06em; }
.hero-chip { position: absolute; background: var(--card); border: 1px solid var(--border-color); box-shadow: var(--shadow-lg); border-radius: 14px; padding: 10px 14px; font-size: 13px; font-weight: 700; z-index: 4; }
.chip-a { top: 16%; left: -6%; animation: float 5s ease-in-out infinite; }
.chip-b { bottom: 12%; right: -4%; animation: float 5s ease-in-out infinite .8s; }

@keyframes ringfill { from { stroke-dashoffset: 434; } }
@keyframes qin { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(43,181,168,.5);} 70%{ box-shadow: 0 0 0 8px rgba(43,181,168,0);} 100%{ box-shadow:0 0 0 0 rgba(43,181,168,0);} }

/* ---------- Proof band ---------- */
.proof { padding: 22px 0; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); background: var(--bg-secondary); }
.proof-row { display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap; }
.proof-rating { display: flex; align-items: center; gap: 12px; }
.proof-badge { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; color: var(--text-primary); }
.proof-badge svg { display: block; }
.proof-sub { display: flex; flex-direction: column; line-height: 1.25; font-size: 13px; color: var(--text-secondary); }
.proof-sub strong { color: var(--text-primary); font-size: 15px; }
.proof-stats { display: flex; gap: 34px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 20px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat span { font-size: 12.5px; color: var(--text-secondary); }

/* ---------- Sections base ---------- */
.how, .features, .screenshots, .privacy, .faq { padding: 88px 0; }
.features { background: var(--bg-secondary); }
.faq { background: var(--bg-secondary); }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.step { position: relative; background: var(--card); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 34px 26px; text-align: left; box-shadow: var(--shadow); }
.step-badge { position: absolute; top: -16px; left: 26px; width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(240,82,82,.35); }
.step-ic { width: 52px; height: 52px; border-radius: 15px; background: var(--chip-bg); color: var(--primary-color); display: grid; place-items: center; margin: 8px 0 16px; }
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: var(--text-secondary); font-size: 15px; }
.steps .step:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: -18px; width: 20px; height: 2px; background: var(--border-color); }

/* Features */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.feature-card { background: var(--card); border: 1px solid var(--border-color); padding: 32px; border-radius: var(--radius); transition: transform .3s, box-shadow .3s, border-color .3s; }
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.feature-icon { width: 54px; height: 54px; border-radius: 15px; background: var(--chip-bg); color: var(--primary-color); display: grid; place-items: center; margin-bottom: 20px; }
.feature-card:hover .feature-icon { background: var(--grad); color: #fff; }
.feature-card h3 { font-size: 20px; margin-bottom: 10px; }
.feature-card p { color: var(--text-secondary); font-size: 15px; }

/* ---------- Screenshots gallery ---------- */
.gallery { position: relative; }
.gal-track { display: flex; gap: 30px; overflow-x: auto; padding: 10px 4px 24px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gal-track::-webkit-scrollbar { display: none; }
.shot { flex: 0 0 auto; scroll-snap-align: center; text-align: center; }
.phone { width: 260px; max-width: 70vw; border-radius: 34px; padding: 10px; background: linear-gradient(160deg, #2a2a33, #0e0e12); box-shadow: var(--shadow-lg); cursor: zoom-in; }
.phone img { width: 100%; height: auto; border-radius: 26px; display: block; }
.shot figcaption { margin-top: 16px; font-weight: 600; color: var(--text-secondary); font-size: 15px; }
.gal-arrow { position: absolute; top: 42%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border-color); background: var(--card); color: var(--text-primary); font-size: 24px; line-height: 1; cursor: pointer; box-shadow: var(--shadow); z-index: 2; transition: all .2s; }
.gal-arrow:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.gal-arrow.prev { left: -8px; } .gal-arrow.next { right: -8px; }
.gal-dots { display: flex; justify-content: center; gap: 8px; margin-top: 6px; }
.gal-dots button { width: 8px; height: 8px; border-radius: 999px; border: none; background: var(--border-color); cursor: pointer; padding: 0; transition: all .25s; }
.gal-dots button.active { width: 24px; background: var(--primary-color); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,.86); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .25s; padding: 24px; }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lightbox-close { position: absolute; top: 20px; right: 24px; width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(255,255,255,.14); color: #fff; font-size: 24px; cursor: pointer; }

/* ---------- Privacy ---------- */
.privacy-card { background: var(--grad); color: #fff; border-radius: 28px; padding: 48px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center; box-shadow: 0 24px 60px rgba(240,82,82,.3); }
.privacy-lead h2 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; margin-bottom: 12px; }
.privacy-lead p { opacity: .92; font-size: 16px; }
.privacy-points { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.privacy-points li { display: flex; align-items: center; gap: 10px; font-weight: 600; background: rgba(255,255,255,.14); padding: 12px 14px; border-radius: 14px; font-size: 15px; }
.privacy-points svg { flex: 0 0 auto; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--card); border: 1px solid var(--border-color); border-radius: 16px; padding: 4px 20px; }
.faq-item summary { list-style: none; cursor: pointer; font-weight: 600; font-size: 17px; padding: 16px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 24px; font-weight: 400; color: var(--primary-color); transition: transform .25s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--text-secondary); padding: 0 0 18px; font-size: 15px; }

/* ---------- Download ---------- */
.download { padding: 96px 0; background: var(--grad); color: #fff; text-align: center; }
.download-content h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; margin-bottom: 14px; }
.download-content p { font-size: 19px; margin-bottom: 32px; opacity: .92; }
.download-buttons { display: flex; justify-content: center; }
.download .appstore-badge svg { box-shadow: 0 12px 30px rgba(0,0,0,.28); }
.download-note { font-size: 14px; opacity: .82; margin-top: 18px; }

/* ---------- Footer ---------- */
.footer { padding: 44px 0; background: var(--bg-secondary); border-top: 1px solid var(--border-color); color: var(--text-secondary); text-align: center; }
.footer-content p { margin: 5px 0; font-size: 14px; }
.footer a { color: var(--primary-color); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 20px; margin: 10px 0; }

/* ---------- Sticky mobile CTA ---------- */
.sticky-cta { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 900; display: none; align-items: center; justify-content: space-between; gap: 12px; background: var(--nav-bg); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--border-color); border-radius: 18px; padding: 10px 12px; box-shadow: var(--shadow-lg); transform: translateY(140%); transition: transform .35s; }
.sticky-cta.show { transform: translateY(0); }
.sticky-app { display: flex; align-items: center; gap: 10px; }
.sticky-txt { display: flex; flex-direction: column; line-height: 1.2; }
.sticky-txt strong { font-size: 15px; }
.sticky-txt span { font-size: 12px; color: var(--text-secondary); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s ease-out, transform .6s ease-out; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .steps { grid-template-columns: 1fr; gap: 30px; }
    .steps .step:not(:last-child)::after { display: none; }
    .privacy-card { grid-template-columns: 1fr; padding: 36px; }
}
@media (max-width: 820px) {
    .nav-menu .nav-link { display: none; }
    .hero .container { grid-template-columns: 1fr; gap: 44px; text-align: center; }
    .hero-content { display: flex; flex-direction: column; align-items: center; }
    .hero-subtitle { max-width: 42ch; }
    .hero-buttons, .hero-trust { justify-content: center; }
    .hero-visual { order: -1; }
    .chip-a { left: 2%; } .chip-b { right: 2%; }
    .proof-row { justify-content: center; text-align: center; }
    .sticky-cta { display: flex; }
}
@media (max-width: 560px) {
    .hero-chip, .timer-orbit { display: none; }
}
@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero { padding: 120px 0 60px; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .hero-buttons .btn, .hero-buttons .appstore-badge { width: 100%; }
    .hero-buttons .appstore-badge svg { width: 100%; height: auto; }
    .proof-stats { gap: 18px 24px; }
    .feature-card { padding: 26px; }
    .privacy-points { grid-template-columns: 1fr; }
    .gal-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
    .reveal { opacity: 1; transform: none; }
}

/* ---------- Scroll progress bar ---------- */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1200; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; background: var(--grad); transform: scaleX(0); transform-origin: left; }

/* ---------- Section eyebrows ---------- */
.section-eyebrow { display: table; margin: 0 auto 16px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- AI sorting demo ---------- */
.demo { padding: 88px 0; }
.demo-card { max-width: 620px; margin: 0 auto; background: var(--card); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 30px 28px; box-shadow: var(--shadow); }
.demo-list { display: flex; flex-direction: column; gap: 10px; }
.demo-task { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 13px; background: var(--bg-secondary); border: 1px solid var(--border-color); font-size: 14.5px; font-weight: 600; }
.demo-task .qi { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: var(--text-secondary); }
.demo-min { margin-left: auto; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: rgba(43,181,168,.12); color: var(--mint); opacity: 0; transform: scale(.7); transition: opacity .35s .25s, transform .35s .25s; }
.demo-task .qtag { margin-left: 0; opacity: 0; transform: scale(.7); transition: opacity .35s .4s, transform .35s .4s; }
.qtag.low { background: rgba(95,107,122,.16); color: var(--text-secondary); }
.demo-card.sorted .demo-min, .demo-card.sorted .qtag { opacity: 1; transform: none; }
.demo-card.sorted .demo-task[data-order="1"] { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 18px rgba(240,82,82,.3); }
.demo-card.sorted .demo-task[data-order="1"] .qi { background: #fff; }
.demo-card.sorted .demo-task[data-order="1"] .demo-min { background: rgba(255,255,255,.22); color: #fff; }
.demo-foot { display: none; margin-top: 14px; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--mint); background: rgba(43,181,168,.12); padding: 10px; border-radius: 10px; }
.demo-card.sorted .demo-foot { display: block; animation: qin .5s ease .15s backwards; }
.demo-actions { display: flex; justify-content: center; margin-top: 22px; }
.demo-reset { display: none; }
.demo-card.sorted .demo-sort { display: none; }
.demo-card.sorted .demo-reset { display: inline-flex; }

/* ---------- Method / rhythm ---------- */
.method { padding: 88px 0; }
.method-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 44px; align-items: center; }
.method-points { display: flex; flex-direction: column; gap: 26px; }
.method-point { display: flex; gap: 16px; align-items: flex-start; }
.method-ic { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 13px; background: var(--chip-bg); color: var(--primary-color); display: grid; place-items: center; }
.method-point h3 { font-size: 18px; margin-bottom: 5px; }
.method-point p { color: var(--text-secondary); font-size: 15px; }
.rhythm { background: var(--card); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 24px 22px 28px; box-shadow: var(--shadow); }
.rhythm-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.rhythm-title { font-size: 14px; font-weight: 700; }
.rhythm-legend { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-secondary); }
.rhythm-legend em { font-style: normal; font-weight: 600; margin-right: 8px; }
.rhythm-legend .lg { width: 12px; height: 12px; border-radius: 4px; }
.rhythm-legend .lg-focus { background: var(--grad); }
.rhythm-legend .lg-break { background: var(--mint); }
.rhythm-bar { position: relative; display: flex; align-items: center; gap: 4px; padding: 6px 0; }
.rhythm-bar .blk { flex: 0 1 auto; min-width: 0; border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.rhythm-bar .blk.focus { height: 38px; background: var(--grad); }
.rhythm-bar .blk.break { height: 24px; background: var(--mint); }
.rhythm-bar .blk i { font-style: normal; font-size: 10.5px; font-weight: 800; color: #fff; letter-spacing: .02em; }
.rhythm-now { position: absolute; top: 50%; left: 58%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--card); border: 3px solid var(--primary-color); box-shadow: 0 2px 8px rgba(0,0,0,.3); animation: nowslide 16s linear 1.6s infinite; z-index: 2; }
@keyframes nowslide { from { left: 2%; } to { left: 98%; } }

/* ---------- Personas ---------- */
.personas { padding: 88px 0; background: var(--bg-secondary); }
.personas-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.persona-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 26px 22px; transition: transform .3s, box-shadow .3s, border-color .3s; }
.persona-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.persona-icon { width: 46px; height: 46px; border-radius: 13px; background: var(--chip-bg); color: var(--primary-color); display: grid; place-items: center; margin-bottom: 16px; }
.persona-card:hover .persona-icon { background: var(--grad); color: #fff; }
.persona-card h3 { font-size: 18px; margin-bottom: 7px; }
.persona-card p { color: var(--text-secondary); font-size: 14px; flex: 1 1 auto; }
.persona-chip { margin-top: 16px; align-self: flex-start; font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--bg-secondary); border: 1px solid var(--border-color); color: var(--text-primary); }

/* ---------- Compare ---------- */
.compare { padding: 88px 0; }
.table-scroll { overflow-x: auto; max-width: 860px; margin: 0 auto; border: 1px solid var(--border-color); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.compare-table { width: 100%; min-width: 540px; border-collapse: collapse; font-size: 15px; }
.compare-table th, .compare-table td { padding: 15px 20px; text-align: left; border-top: 1px solid var(--border-color); }
.compare-table thead th { border-top: none; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-secondary); }
.compare-table thead th.cmp-app { color: var(--primary-color); text-transform: none; letter-spacing: 0; font-size: 15px; }
.compare-table tbody th { font-weight: 600; color: var(--text-primary); width: 26%; }
.compare-table .cmp-app { background: var(--chip-bg); }
.compare-table td.cmp-app { font-weight: 600; }
.cmp-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; }
.cmp-brand svg { border-radius: 6px; flex: 0 0 auto; }
.cmp-check { display: inline-flex; vertical-align: -3px; margin-right: 9px; color: var(--primary-color); }
.compare-table .cmp-plain { color: var(--text-secondary); }

/* ---------- Footer grid ---------- */
.footer-grid { display: grid; grid-template-columns: 1.3fr .8fr .8fr; gap: 38px; text-align: left; padding-bottom: 30px; }
.footer .footer-brand-link { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; color: var(--text-primary); text-decoration: none; }
.footer .footer-brand-link:hover { text-decoration: none; }
.footer-tagline { color: var(--text-secondary); font-size: 14px; margin-top: 12px; max-width: 32ch; }
.footer-ctrl { display: flex; gap: 10px; margin-top: 18px; }
.footer-col h4 { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-primary); margin-bottom: 12px; }
.footer .footer-col a { display: block; color: var(--text-secondary); padding: 5px 0; font-size: 14px; }
.footer .footer-col a:hover { color: var(--primary-color); text-decoration: none; }
.footer-bottom { border-top: 1px solid var(--border-color); padding-top: 24px; text-align: center; }
.footer-bottom p { margin: 5px 0; font-size: 14px; }

/* ---------- New sections responsive ---------- */
@media (max-width: 960px) {
    .personas-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .method-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 640px) {
    .footer-grid { grid-template-columns: 1fr; gap: 30px; text-align: center; }
    .footer-brand { display: flex; flex-direction: column; align-items: center; }
    .footer-ctrl { justify-content: center; }
}
@media (max-width: 560px) {
    .personas-grid { grid-template-columns: 1fr; }
    .demo-card { padding: 24px 18px; }
    .demo-task { font-size: 13.5px; padding: 11px 12px; gap: 9px; }
}

/* AI-AVATAR: floating "AI分身" assistant widget */
#aiToggle {
    position: fixed; right: 18px; bottom: 18px; z-index: 1300;
    width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
    background: var(--grad); color: #fff; display: grid; place-items: center;
    box-shadow: 0 10px 26px rgba(240, 82, 82, .38), 0 3px 8px rgba(23, 32, 51, .18);
    transition: transform .2s, box-shadow .2s;
}
#aiToggle:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(240, 82, 82, .46), 0 5px 12px rgba(23, 32, 51, .2); }
#aiToggle svg { display: block; }

#aiPanel {
    position: fixed; right: 18px; bottom: 86px; z-index: 1300;
    width: min(370px, calc(100vw - 24px));
    max-height: min(540px, 75vh);
    display: flex; flex-direction: column;
    background: var(--card); border: 1px solid var(--border-color); border-radius: 16px;
    box-shadow: var(--shadow-lg), var(--shadow);
    overflow: hidden;
}
#aiPanel[hidden] { display: none; }

.ai-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border-color); flex-shrink: 0; }
.ai-avatar { position: relative; width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.ai-presence { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--success-color); border: 2px solid var(--card); }
.ai-title { font-size: 14px; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#aiClose { width: 30px; height: 30px; border-radius: 50%; border: none; background: transparent; color: var(--text-secondary); font-size: 20px; line-height: 1; cursor: pointer; flex-shrink: 0; transition: background .2s, color .2s; }
#aiClose:hover { background: var(--bg-secondary); color: var(--text-primary); }

.ai-msgs { flex: 1; min-height: 140px; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 9px; overscroll-behavior: contain; }
.ai-msg { max-width: 86%; padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; overflow-wrap: break-word; white-space: pre-wrap; }
.ai-msg.bot { align-self: flex-start; background: var(--bg-secondary); color: var(--text-primary); border-bottom-left-radius: 5px; }
.ai-msg.user { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 5px; }
.ai-typing { display: inline-flex; align-items: center; gap: 5px; padding: 13px; }
.ai-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-secondary); animation: aiBlink 1.2s infinite; }
.ai-typing span:nth-child(2) { animation-delay: .2s; }
.ai-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes aiBlink { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

.ai-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 14px 10px; flex-shrink: 0; }
.ai-chips[hidden] { display: none; }
.ai-chip { background: var(--chip-bg); color: var(--primary-color); border: none; border-radius: 999px; padding: 7px 12px; font-size: 12.5px; font-weight: 600; font-family: inherit; cursor: pointer; transition: background .2s, color .2s; }
.ai-chip:hover { background: var(--primary-color); color: #fff; }

.ai-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border-color); flex-shrink: 0; }
#aiInput { flex: 1; min-width: 0; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 999px; padding: 9px 15px; font: inherit; font-size: 14px; color: var(--text-primary); outline: none; transition: border-color .2s; }
#aiInput:focus { border-color: var(--primary-color); }
#aiInput::placeholder { color: var(--text-secondary); }
.ai-send { display: inline-flex; align-items: center; gap: 6px; background: var(--grad); color: #fff; border: none; border-radius: 999px; padding: 9px 16px; font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; box-shadow: 0 5px 14px rgba(240, 82, 82, .3); transition: transform .2s, box-shadow .2s; }
.ai-send:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(240, 82, 82, .38); }
.ai-send:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }
.ai-note { flex-shrink: 0; text-align: center; font-size: 11px; color: var(--text-secondary); padding: 0 12px 9px; margin: 0; }

@media (max-width: 820px) {
    /* keep clear of the sticky download bar */
    #aiToggle { bottom: 84px; }
    #aiPanel { bottom: 152px; max-height: min(480px, 62vh); }
}
@media (max-width: 560px) {
    #aiPanel { right: 10px; width: calc(100vw - 20px); }
}
@media (prefers-reduced-motion: reduce) {
    #aiToggle, .ai-send { transition: none; }
    .ai-typing span { animation: none; }
}
/* /AI-AVATAR */
