:root {
  --bg: #fbf7f1;
  --paper: #ffffff;
  --ink: #2a1f16;
  --ink2: #5c4c3e;
  --muted: #8a7867;
  --line: #eadfd2;
  --orange: #ee7f22;
  --orange-deep: #c9631a;
  --orange-soft: #fff1e3;
  --green: #3f8f4c;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(60, 35, 10, .05), 0 8px 28px rgba(60, 35, 10, .07);
  --wrap: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.75 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
img { max-width: 100%; display: block; }
a { color: var(--orange-deep); }
.wrap { width: min(var(--wrap), 100% - 40px); margin: 0 auto; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(251, 247, 241, .9);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
}
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; color: var(--ink); text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--ink2); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--orange-deep); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 16px; cursor: pointer; text-decoration: none;
  transition: transform .15s ease, background .15s ease;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--orange); color: #fff; }
.btn.primary:hover { background: var(--orange-deep); }
.btn.ghost { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--orange); }
.top .btn { padding: 8px 18px; font-size: 15px; }

/* ---------- hero ---------- */
.hero { padding: 84px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.25fr .75fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--orange-soft); color: var(--orange-deep); font-size: 14px; font-weight: 600; }
.hero h1 { font-size: clamp(36px, 5.6vw, 60px); line-height: 1.15; margin: 18px 0 18px; letter-spacing: -.5px; }
.hero h1 em { font-style: normal; color: var(--orange); }
.hero p.lead { font-size: clamp(17px, 2vw, 20px); color: var(--ink2); margin: 0 0 30px; max-width: 34em; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.tools span { padding: 5px 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; font-size: 14px; color: var(--ink2); }
.hero-art { position: relative; justify-self: center; width: min(320px, 80vw); aspect-ratio: 1; }
.hero-art .disc { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffd3a1, #f39a45 55%, #e2771f); box-shadow: 0 30px 60px rgba(226, 119, 31, .28); }
.hero-art img { position: absolute; inset: 18%; width: 64%; filter: drop-shadow(0 6px 10px rgba(0,0,0,.12)); }
.bubble { position: absolute; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 8px 14px; font-size: 14px; box-shadow: var(--shadow); white-space: nowrap; }
.bubble.b1 { top: 6%; left: -18%; }
.bubble.b2 { bottom: 14%; right: -16%; }
.bubble.b3 { bottom: -2%; left: -6%; }
.bubble b { color: var(--green); }

/* ---------- sections ---------- */
section { padding: 72px 0; }
section.alt { background: var(--paper); border-block: 1px solid var(--line); }
.head { max-width: 720px; margin-bottom: 40px; }
.head h2 { font-size: clamp(28px, 3.6vw, 38px); line-height: 1.25; margin: 0 0 12px; }
.head p { color: var(--ink2); margin: 0; }

.pains { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.pain { display: flex; gap: 14px; align-items: flex-start; padding: 20px 22px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.pain .q { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--orange-soft); color: var(--orange-deep); display: grid; place-items: center; font-weight: 700; }
.pain p { margin: 0; }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card { padding: 28px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); }
.card .ic { width: 46px; height: 46px; border-radius: 14px; background: var(--orange); color: #fff; display: grid; place-items: center; font-size: 22px; margin-bottom: 16px; }
.card h3 { margin: 0 0 8px; font-size: 21px; }
.card p { margin: 0 0 12px; color: var(--ink2); }
.card ul { margin: 0; padding-left: 20px; color: var(--ink2); }
.card li { margin: 4px 0; }

.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: step; padding: 0; margin: 0; }
.flow li { list-style: none; position: relative; padding: 22px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.flow li::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--orange); color: #fff; font-weight: 700; margin-bottom: 10px; }
.flow h3 { margin: 0 0 6px; font-size: 17px; }
.flow p { margin: 0; font-size: 15px; color: var(--ink2); line-height: 1.6; }
.flow-note { margin-top: 22px; padding: 16px 20px; border-radius: 14px; background: var(--orange-soft); color: var(--ink); }

.guides { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.guide { display: block; padding: 22px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .15s; }
.guide:hover { border-color: var(--orange); }
.guide small { color: var(--orange-deep); font-weight: 600; }
.guide h3 { margin: 6px 0 6px; font-size: 18px; }
.guide p { margin: 0; color: var(--ink2); font-size: 15px; }
.guide.soon { opacity: .6; pointer-events: none; }

.faq { max-width: 820px; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 0 22px; margin-bottom: 12px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--orange); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; color: var(--ink2); }

/* ---------- contact ---------- */
.contact { text-align: left; }
.btn.big { padding: 16px 34px; font-size: 18px; }
.privacy { margin-top: 26px; max-width: 760px; color: var(--muted); font-size: 14px; }

footer { padding: 36px 0 48px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 15px; transition: .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- article (tutorials) ---------- */
.article { max-width: 760px; padding: 48px 0 72px; }
.article h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.25; margin: 10px 0 10px; }
.article .meta { color: var(--muted); font-size: 14px; margin-bottom: 30px; }
.article h2 { font-size: 23px; margin: 40px 0 10px; }
.article pre { background: #2a1f16; color: #fbe9d6; padding: 16px 18px; border-radius: 12px; overflow-x: auto; font-size: 15px; line-height: 1.6; }
.article code { font-family: ui-monospace, Menlo, Consolas, monospace; }
.article p code, .article li code { background: var(--orange-soft); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.article .tip { padding: 14px 18px; border-radius: 12px; background: var(--orange-soft); }
.article .cta-box { margin-top: 44px; padding: 26px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap, .contact .wrap { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
  .hero-art { width: 220px; order: -1; }
  .bubble { display: none; }
  .flow { grid-template-columns: 1fr 1fr; }
  .guides { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { display: none; }
  .top .btn { margin-left: auto; }
  .pains, .cards, .flow { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .toast { transition: none; }
}

.head.tight { margin-bottom: 16px; }
.article h2.first { margin-top: 0; }
.notfound { text-align: center; }
.notfound img { width: 96px; margin: 40px auto 10px; }

/* ---------- real demos ---------- */
.demos { display: grid; grid-template-columns: auto 1fr; gap: 56px; align-items: center; }
.demo { margin: 0; display: grid; justify-items: center; gap: 18px; }
.phone { width: 300px; padding: 12px; border-radius: 44px; background: #1f1712; box-shadow: 0 30px 60px rgba(40, 20, 5, .25), inset 0 0 0 2px #3a2a1f; }
.phone video { display: block; width: 100%; aspect-ratio: 620 / 1274; border-radius: 32px; background: #f8f7f5; object-fit: cover; }
.demo figcaption { max-width: 320px; text-align: center; color: var(--ink2); font-size: 15px; }
.demo figcaption b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.demo-more h3 { font-size: 22px; margin: 0 0 12px; }
.demo-more ul { margin: 0 0 26px; padding-left: 20px; color: var(--ink2); }
.demo-more li { margin: 6px 0; }
@media (max-width: 900px) {
  .demos { grid-template-columns: 1fr; gap: 36px; }
  .phone { width: min(280px, 78vw); }
}

/* ---------- chat widget ---------- */
.chat-fab { position: fixed; right: 22px; bottom: 22px; z-index: 30; display: flex; align-items: center; gap: 8px; padding: 10px 18px 10px 10px; border: 0; border-radius: 999px; background: var(--orange); color: #fff; font: inherit; font-weight: 700; box-shadow: 0 10px 30px rgba(200, 90, 20, .35); cursor: pointer; }
.chat-fab img { width: 32px; height: 32px; background: #fff; border-radius: 50%; padding: 2px; }
.chat-open .chat-fab { display: none; }
.chat-panel { position: fixed; right: 22px; bottom: 22px; z-index: 31; width: min(390px, calc(100vw - 24px)); height: min(620px, calc(100vh - 44px)); display: none; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 24px 70px rgba(40, 20, 5, .25); overflow: hidden; }
.chat.open .chat-panel { display: flex; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--orange-soft); border-bottom: 1px solid var(--line); }
.chat-head img { width: 34px; height: 34px; }
.chat-head div { flex: 1; line-height: 1.3; }
.chat-head small { display: block; color: var(--muted); font-size: 12px; }
.chat-close { border: 0; background: none; font-size: 26px; line-height: 1; color: var(--ink2); cursor: pointer; padding: 4px 8px; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { max-width: 86%; padding: 9px 13px; border-radius: 14px; font-size: 15px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.msg.assistant { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.user { align-self: flex-end; background: var(--orange); color: #fff; border-bottom-right-radius: 4px; }
.msg.pending:empty::after { content: "…"; color: var(--muted); }
.msg.error { border-color: #f0b4a8; color: #a5401f; }
.chat-lead { padding: 12px 14px; border-top: 1px solid var(--line); background: var(--orange-soft); }
.chat-lead form { display: grid; gap: 8px; font-size: 14px; }
.chat-lead .kinds { display: flex; gap: 16px; }
.chat-lead input, .chat-lead textarea, .chat-input textarea { width: 100%; font: inherit; font-size: 15px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); resize: none; }
.chat-lead .kinds input { width: auto; }
.chat-lead .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.lead-actions { display: flex; gap: 8px; }
.lead-actions .btn { padding: 8px 18px; font-size: 15px; }
.lead-msg { color: var(--ink2); }
.chat-input { padding: 10px 12px 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.chat-lead-btn { justify-self: start; border: 1px dashed var(--orange); background: var(--orange-soft); color: var(--orange-deep); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.chat-input .row { display: flex; gap: 8px; align-items: flex-end; }
.chat-send { flex: none; white-space: nowrap; padding: 9px 16px; font-size: 15px; }
.chat-send:disabled { opacity: .5; cursor: default; }
@media (max-width: 640px) {
  .chat-panel { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; }
  .chat-fab { right: 14px; bottom: 14px; }
}
