:root {
  --bg: #fff9f5;
  --bg-soft: #fdf1ec;
  --surface: #fffdfb;
  --surface-pink: #fff2f0;
  --ink: #312624;
  --muted: #806c67;
  --line: #eeded7;
  --rose: #d98287;
  --rose-dark: #b85c67;
  --blush: #f2c4bf;
  --sage: #6f8b83;
  --shadow: 0 18px 48px rgba(84, 52, 43, .07);
  --radius: 26px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
p { color: var(--muted); line-height: 1.75; }
h1, h2, h3, p { margin-top: 0; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 21px;
  font-weight: 800;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: white;
  font-weight: 800;
  background: linear-gradient(140deg, #cc767d, #e9a59e);
}
.marketing-header, .simple-header, .console-topbar {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.marketing-header {
  height: 82px;
}
.marketing-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: var(--muted);
  font-weight: 600;
}
.marketing-nav a:hover, .text-link:hover { color: var(--rose-dark); }
.header-login {
  padding: 12px 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink) !important;
  background: var(--surface);
}
.marketing-main {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
}
.pill-label {
  margin-bottom: 18px;
  color: var(--rose-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .18em;
}
.landing-hero {
  min-height: 646px;
  display: grid;
  grid-template-columns: 1fr 460px;
  align-items: center;
  gap: 54px;
  padding: 32px 0 60px;
}
.hero-copy h1 {
  margin-bottom: 22px;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(48px, 5.2vw, 66px);
  font-weight: 700;
  line-height: 1.23;
  letter-spacing: 0;
}
.hero-lead {
  max-width: 590px;
  font-size: 19px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 36px;
}
.btn {
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
}
.btn.primary {
  color: white;
  background: var(--rose-dark);
  box-shadow: 0 12px 25px rgba(184, 92, 103, .22);
}
.btn.outline, .btn.ghost {
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--surface);
}
.btn.disabled {
  color: #ab9690;
  background: #f5ece8;
  cursor: not-allowed;
}
.btn.full { width: 100%; }

.companion-visual { position: relative; padding: 24px; }
.visual-glow {
  position: absolute;
  inset: 90px 20px 30px;
  border-radius: 50%;
  background: #f2d8d1;
  filter: blur(52px);
}
.phone {
  position: relative;
  width: 348px;
  min-height: 560px;
  margin: auto;
  padding: 16px 15px;
  border: 8px solid #332b2a;
  border-radius: 46px;
  background: #f8f4f2;
  box-shadow: 0 32px 65px rgba(71, 44, 37, .18);
}
.phone::before {
  content: "";
  display: block;
  width: 90px;
  height: 23px;
  margin: -16px auto 18px;
  border-radius: 0 0 14px 14px;
  background: #332b2a;
}
.phone-header, .demo-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px 16px;
  border-bottom: 1px solid var(--line);
}
.phone-header div { display: grid; gap: 2px; }
.phone-header small, .demo-title small { color: var(--muted); }
.avatar {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #7d4d50;
  background: #f2d4d1;
  font-weight: 700;
}
.phone-dialog { padding: 25px 0; display: grid; gap: 14px; }
.message, .demo-row {
  max-width: 88%;
  padding: 11px 13px;
  border-radius: 15px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.62;
}
.message.ai, .demo-row.ai { border-bottom-left-radius: 5px; background: white; }
.message.user, .demo-row.me {
  justify-self: end;
  border-bottom-right-radius: 5px;
  color: #fff;
  background: var(--rose);
}
.phone-input {
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 18px;
  height: 48px;
  padding: 0 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ae9a94;
  background: white;
}
.phone-input span { color: var(--rose-dark); }

.benefits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding-bottom: 76px;
}
.benefits article, .story-grid article, .price-card, .panel, .login-card, .document-card, .chat-demo {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.benefits article { padding: 24px; }
.benefit-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 14px;
  color: var(--rose-dark);
  background: var(--surface-pink);
  font-weight: 700;
}
.benefits h3 { margin-bottom: 9px; font-size: 20px; }
.benefits p { margin-bottom: 0; font-size: 14px; }

.product-story, .pricing, .faq-section { padding: 72px 0; }
.section-intro h2 {
  margin-bottom: 14px;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(34px, 4vw, 45px);
  line-height: 1.3;
}
.section-intro.centered { max-width: 740px; margin: 0 auto 42px; text-align: center; }
.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}
.story-grid article { position: relative; padding: 30px; min-height: 210px; }
.story-grid article > span { color: var(--rose); font-weight: 700; }
.story-grid h3 { margin: 27px 0 12px; font-size: 23px; }
.story-grid em, .coming {
  display: inline-flex;
  margin-top: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #96726a;
  font-style: normal;
  font-size: 13px;
  background: var(--bg-soft);
}
.showcase {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  align-items: center;
  gap: 70px;
  padding: 76px 66px;
  border-radius: 38px;
  background: #f8ebe5;
}
.showcase-text h2 { font-family: "Noto Serif SC", "Songti SC", serif; font-size: 40px; line-height: 1.38; }
.text-link { color: var(--rose-dark); font-weight: 700; }
.chat-demo {
  padding: 22px;
  display: grid;
  gap: 13px;
  background: rgba(255,253,251,.86);
}
.chat-demo .demo-title { margin-bottom: 8px; }

.price-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.price-card { position: relative; padding: 25px 22px; }
.price-card h3 { margin-bottom: 20px; }
.price-card strong { display: block; font-size: 34px; margin-bottom: 7px; }
.price-card strong small { font-size: 15px; font-weight: 500; color: var(--muted); }
.price-card ul { min-height: 114px; padding-left: 20px; margin: 22px 0; color: var(--muted); line-height: 2; }
.price-card .btn { width: 100%; }
.price-card.featured { border-color: #e8b3b0; background: #fff7f4; }
.recommend {
  position: absolute;
  right: 18px;
  top: 18px;
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--rose-dark);
  background: #fce3df;
  font-size: 12px;
  font-weight: 700;
}
.faq-grid { display: grid; gap: 12px; margin-top: 38px; }
details {
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
summary { cursor: pointer; list-style: none; font-size: 17px; font-weight: 700; }
details p { margin: 14px 0 0; }
.faq-more { display: block; margin-top: 22px; }
.closing-cta {
  padding: 70px 22px;
  border-radius: 36px;
  text-align: center;
  background: #f6e4de;
}
.closing-cta h2 {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(34px, 4vw, 46px);
}
.closing-cta p:not(.pill-label) { margin-bottom: 28px; font-size: 17px; }
.marketing-footer {
  width: min(1240px, calc(100% - 40px));
  margin: 62px auto 0;
  padding: 34px 0 42px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
}
.footer-brand p { margin: 8px 0 0; }
.marketing-footer nav { display: flex; flex-wrap: wrap; gap: 24px; color: var(--muted); }
.copyright { grid-column: 1 / -1; margin: 20px 0 0; font-size: 13px; }

/* Auth and public documents */
.auth-page, .document-page, .console-page { background: linear-gradient(135deg, #fff9f5, #faefeb); }
.simple-header, .console-topbar { min-height: 76px; }
.back-link { color: var(--muted); }
.auth-layout {
  width: min(1060px, calc(100% - 40px));
  min-height: calc(100vh - 108px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 410px;
  gap: 80px;
  align-items: center;
}
.login-message h1 {
  margin-bottom: 20px;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 53px;
  line-height: 1.3;
}
.login-message > p:last-child { max-width: 470px; font-size: 17px; }
.login-card { padding: 32px; }
.login-card h2 { font-size: 27px; margin-bottom: 8px; }
.form-hint { margin-bottom: 24px; font-size: 14px; }
.login-form { display: grid; gap: 16px; }
label { display: grid; gap: 9px; color: #5d4b47; font-weight: 600; font-size: 14px; }
input:not([type=checkbox]), textarea {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  color: var(--ink);
  background: white;
}
textarea { min-height: 100px; padding: 14px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(217,130,135,.15); }
.code-row { display: grid; grid-template-columns: 1fr 112px; gap: 9px; }
.code-row button {
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--rose-dark);
  background: var(--surface-pink);
  font-size: 14px;
  font-weight: 600;
}
.code-row button:disabled { opacity: .55; }
.consent {
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 8px;
  margin: 3px 0 7px;
  color: var(--muted);
  font-weight: 400;
}
.consent input { margin: 3px 0 0; accent-color: var(--rose-dark); }
.consent a { color: var(--rose-dark); }
.form-msg { min-height: 22px; margin: 0; color: var(--rose-dark); font-size: 14px; text-align: center; }
.form-msg[data-type="success"] { color: #5a7b68; }
.form-msg[data-type="error"] { color: #a6434a; }
.form-msg[data-type="loading"] { color: var(--muted); }
.btn:disabled, .code-row button:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.document-card {
  width: min(840px, calc(100% - 32px));
  margin: 30px auto 72px;
  padding: clamp(26px, 6vw, 54px);
}
.document-card h1 { margin-bottom: 38px; font-size: 42px; font-family: "Noto Serif SC", "Songti SC", serif; }
.document-card h2 { margin-top: 30px; font-size: 21px; }
.document-card a { color: var(--rose-dark); }
.document-card details { margin-bottom: 12px; }

/* Console */
.console-topbar nav { display: flex; align-items: center; gap: 22px; color: var(--muted); }
.dashboard, .chat-shell {
  width: min(1150px, calc(100% - 32px));
  margin: 20px auto 48px;
}
.panel { padding: 25px; }
.notice {
  margin-bottom: 14px;
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 14px;
}
.notice.success { color: #506e65; background: #eaf3ee; }
.notice.error { color: #a6434a; background: #ffeceb; }
.notice strong { float: right; }
.dashboard-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 15px;
}
.dashboard-hero h1 { margin-bottom: 7px; font-size: 30px; }
.quota { display: flex; align-items: center; gap: 15px; }
.quota div { min-width: 115px; padding: 13px; border-radius: 16px; background: var(--bg-soft); }
.quota strong { display: block; font-size: 23px; }
.quota small { color: var(--muted); }
.console-overview-grid, .dashboard-grid, .console-lower-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; }
.active-agent-card h2, .wechat-card h2 { margin-bottom: 7px; font-size: 28px; }
.wechat-status-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wechat-status-line span {
  flex: 0 0 auto;
  padding: 6px 11px;
  border-radius: 999px;
  color: var(--rose-dark);
  background: var(--surface-pink);
  font-size: 12px;
  font-weight: 800;
}
.console-qr-box {
  display: grid;
  grid-template-columns: 148px 1fr;
  align-items: center;
  gap: 14px;
  margin-top: 15px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffaf7;
}
.console-qr-box[hidden] { display: none; }
.console-qr-box img { width: 148px; height: 148px; object-fit: contain; border-radius: 12px; background: white; }
.inline-error { min-height: 20px; margin-top: 12px; color: #a34348; font-size: 13px; }
.wechat-actions .btn[hidden] { display: none; }
.overview-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.panel-title h2, .create-panel h2 { margin-bottom: 5px; font-size: 25px; }
.panel-title p { margin-bottom: 20px; font-size: 14px; }
.agent-list { display: grid; gap: 10px; }
.empty-card { padding: 30px 16px; text-align: center; color: var(--muted); background: var(--bg); border-radius: 15px; }
.agent-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 17px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
}
.agent-card.active { border-color: #dda4a3; background: #fff7f4; }
.agent-card h3 { margin-bottom: 3px; font-size: 18px; }
.agent-card p { margin: 0; font-size: 13px; }
.agent-state { padding: 5px 10px; border-radius: 999px; color: var(--rose-dark); background: var(--surface-pink); font-size: 12px; }
.persona-preview { grid-column: 1 / -1; }
.agent-actions { grid-column: 1 / -1; display: flex; gap: 14px; align-items: center; margin-top: 6px; }
.agent-actions form { margin: 0; }
.agent-actions a, .agent-actions button { border: 0; padding: 0; color: var(--rose-dark); background: transparent; cursor: pointer; font-weight: 600; }
.agent-actions .danger { color: #a34348; }
.agent-form { display: grid; gap: 12px; margin-top: 18px; }
.record-list, .mini-plan-list { display: grid; gap: 10px; margin-top: 14px; }
.record-item, .mini-plan-list div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  display: grid;
  gap: 4px;
  background: #fffaf7;
}
.record-item span, .mini-plan-list span, .record-item time { color: var(--muted); font-size: 13px; }
.mini-plan-list div { grid-template-columns: 1fr auto; align-items: center; }
.mini-plan-list span { grid-column: 1; }
.mini-plan-list em, .mini-plan-list button {
  grid-row: 1 / span 2;
  grid-column: 2;
  border: 0;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--rose-dark);
  background: var(--surface-pink);
  font-style: normal;
  font-size: 12px;
}
.chat-shell { display: grid; gap: 12px; }
.chat-head h1 { margin-bottom: 5px; font-size: 28px; }
.paywall { background: var(--surface-pink); }
.messages { min-height: 47vh; max-height: 62vh; overflow-y: auto; }
.empty { padding: 70px 0; color: var(--muted); text-align: center; }
.msg {
  width: fit-content;
  max-width: 78%;
  margin: 11px 0;
  padding: 12px 15px;
  border-radius: 16px;
  line-height: 1.65;
}
.msg.ai { background: var(--bg-soft); }
.msg.me { margin-left: auto; color: white; background: var(--rose); }
.composer { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 10px; }

@media (max-width: 920px) {
  .marketing-header, .simple-header, .console-topbar, .marketing-main { width: calc(100% - 30px); }
  .marketing-header { height: 66px; }
  .brand { font-size: 18px; }
  .brand-mark { width: 38px; height: 38px; }
  .marketing-nav { gap: 15px; font-size: 14px; }
  .marketing-nav a:not(.header-login):nth-child(1) { display: none; }
  .header-login { padding: 9px 15px; }
  .landing-hero { grid-template-columns: 1fr; gap: 28px; padding: 42px 0 50px; }
  .hero-copy h1 { font-size: clamp(39px, 11vw, 50px); line-height: 1.3; }
  .hero-lead { font-size: 16px; }
  .hero-actions .btn { flex: 1; padding: 0 18px; }
  .companion-visual { padding: 0; }
  .phone { width: min(320px, 100%); min-height: 500px; }
  .benefits, .story-grid, .price-grid, .console-capabilities { grid-template-columns: 1fr; }
  .benefits { padding-bottom: 32px; }
  .product-story, .pricing, .faq-section { padding: 46px 0; }
  .section-intro h2 { font-size: 33px; }
  .showcase { grid-template-columns: 1fr; gap: 30px; padding: 36px 20px; border-radius: 25px; }
  .showcase-text h2 { font-size: 32px; }
  .closing-cta { padding: 48px 20px; }
  .marketing-footer { width: calc(100% - 30px); grid-template-columns: 1fr; margin-top: 44px; }
  .auth-layout { width: calc(100% - 30px); min-height: auto; display: block; margin-top: 32px; }
  .login-message { margin-bottom: 26px; }
  .login-message h1 { font-size: 37px; }
  .login-card { padding: 23px; border-radius: 22px; margin-bottom: 30px; }
  .dashboard-hero, .quota { flex-direction: column; align-items: stretch; }
  .quota div { min-width: 0; }
  .console-overview-grid, .dashboard-grid, .console-lower-grid { grid-template-columns: 1fr; }
  .console-topbar nav { gap: 13px; font-size: 14px; }
  .console-qr-box { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .panel { padding: 19px; border-radius: 20px; }
  .composer { grid-template-columns: 1fr; }
  .msg { max-width: 90%; }
}
