/* 朝夕相伴 官网公共样式 */

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

:root {
  --brand:       #E8824A;
  --brand-light: #FAE8D8;
  --brand-dark:  #C4622E;
  --bg:          #FFFAF7;
  --surface:     #FFFFFF;
  --border:      #F0E4D7;
  --text:        #1A1A1A;
  --text-sub:    #666666;
  --text-hint:   #999999;
  --success:     #3DA05A;
  --error:       #D94F4F;
  --radius:      12px;
  --shadow:      0 2px 16px rgba(0,0,0,.07);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── 品牌 logo ─────────────────────────────── */
.brand-logo {
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: .02em;
  text-decoration: none;
  color: var(--text);
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}
.brand-cx   { font-weight: 800; color: var(--brand); }
.brand-xb   { font-weight: 300; color: var(--text-sub); letter-spacing: .08em; }
.brand-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.beta-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 3px 8px;
  border: 1px solid #DDE7F3;
  border-radius: 999px;
  background: #F7FAFD;
  color: #3B658A;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

/* ── 顶栏 ────────────────────────────────────── */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-nav .nav-actions { display: flex; gap: 12px; align-items: center; }

/* ── 按钮 ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: .93rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary   { background: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); }

.btn-secondary { background: var(--brand-light); color: var(--brand-dark); }
.btn-secondary:hover:not(:disabled) { background: #F5D8C0; }

.btn-ghost  { background: transparent; color: var(--text-sub); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); }

.btn-sm { padding: 7px 14px; font-size: .85rem; }
.btn-full { width: 100%; }

/* ── 卡片 ─────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

/* ── 表单 ─────────────────────────────────────── */
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: .85rem; color: var(--text-sub); margin-bottom: 6px; }

.input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .95rem;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color .15s;
}
.input:focus { border-color: var(--brand); }
.input::placeholder { color: var(--text-hint); }

.phone-row { display: flex; gap: 8px; }
.phone-prefix {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-sub);
  font-size: .95rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.otp-row { display: flex; gap: 8px; }
.otp-row .input { flex: 1; letter-spacing: .2em; font-size: 1.1rem; }

/* ── 状态提示 ─────────────────────────────────── */
.msg {
  font-size: .85rem;
  padding: 8px 12px;
  border-radius: 6px;
  margin-top: 10px;
  display: none;
}
.msg.show   { display: block; }
.msg.ok     { background: #EBF8EE; color: var(--success); }
.msg.err    { background: #FDEAEA; color: var(--error); }
.msg.info   { background: var(--brand-light); color: var(--brand-dark); }

/* ── 步骤指示 ─────────────────────────────────── */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
}
.step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 600;
  background: var(--border); color: var(--text-hint);
  flex-shrink: 0;
}
.step-dot.active { background: var(--brand); color: #fff; }
.step-dot.done   { background: var(--success); color: #fff; }
.step-line { flex: 1; height: 2px; background: var(--border); }
.step-line.done { background: var(--success); }

/* ── 二维码区 ─────────────────────────────────── */
.qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 0 8px;
}
.qr-wrap img {
  width: 200px; height: 200px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
}
.qr-caption { font-size: .85rem; color: var(--text-sub); text-align: center; }
.qr-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .85rem; padding: 5px 12px;
  border-radius: 20px; background: var(--brand-light); color: var(--brand-dark);
}
.qr-status.done { background: #EBF8EE; color: var(--success); }
.qr-status.fail { background: #FDEAEA; color: var(--error); }

/* ── Hero ─────────────────────────────────────── */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 32px 48px;
}
.hero-text { flex: 1; }
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--text-sub);
  font-size: .88rem;
}
.hero-beta {
  font-size: .78rem;
}
.hero-title {
  font-size: 2.6rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 16px;
}
.hero-title .cx { font-weight: 800; color: var(--brand); }
.hero-title .xb { font-weight: 300; color: var(--text-sub); }
.hero-tagline { font-size: 1.1rem; color: var(--text-sub); margin-bottom: 12px; line-height: 1.6; }
.hero-sub { font-size: .9rem; color: var(--text-hint); line-height: 1.7; }

.hero-visual {
  flex-shrink: 0;
  width: 280px; height: 280px;
  border-radius: 20px;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

/* ── 注册区 ─────────────────────────────────────── */
.register-section {
  max-width: 460px;
  margin: 0 auto;
  padding: 0 20px 60px;
}
.register-section .card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.beta-note {
  margin-bottom: 22px;
  color: var(--text-hint);
  font-size: .84rem;
  line-height: 1.6;
}
.invite-hint {
  margin: -12px 0 20px;
  padding: 9px 12px;
  border: 1px solid #CFEAD7;
  border-radius: 8px;
  background: #EBF8EE;
  color: var(--success);
  font-size: .84rem;
  line-height: 1.5;
  word-break: break-all;
}

/* ── Dashboard ──────────────────────────────────── */
.dashboard-wrap {
  max-width: 760px;
  margin: 32px auto;
  padding: 0 20px;
}

/* ── 文本页 ───────────────────────────────────── */
.text-page {
  max-width: 760px;
  margin: 32px auto 56px;
  padding: 0 20px;
}
.text-panel {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}
.text-panel h1 {
  font-size: 1.6rem;
  line-height: 1.3;
  margin-bottom: 20px;
}
.faq-body {
  color: var(--text-sub);
  font-size: .96rem;
  line-height: 1.8;
}

/* ── FAQ ─────────────────────────────────────── */
.faq-page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 34px 24px 64px;
}
.faq-hero {
  margin-bottom: 28px;
}
.faq-hero h1 {
  font-size: 2rem;
  line-height: 1.25;
  margin-bottom: 8px;
}
.faq-hero p {
  color: var(--text-sub);
  font-size: .98rem;
  line-height: 1.7;
}
.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.faq-list {
  display: grid;
  gap: 18px;
}
.faq-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.faq-group h2 {
  font-size: 1rem;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:last-child {
  border-bottom: 0;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 18px;
  font-weight: 600;
  color: var(--text);
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--brand);
  font-weight: 700;
}
.faq-item[open] summary::after {
  content: "-";
}
.faq-item p {
  color: var(--text-sub);
  font-size: .94rem;
  line-height: 1.8;
  padding: 0 18px 18px;
}
.faq-side {
  position: sticky;
  top: 88px;
}
.faq-contact {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
}
.faq-contact-title {
  font-weight: 700;
  margin-bottom: 8px;
}
.faq-contact-text {
  color: var(--text-sub);
  font-size: .9rem;
  line-height: 1.7;
  margin-bottom: 16px;
}
.faq-messages {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
}
.faq-section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.faq-section-head h2 {
  font-size: 1.25rem;
  margin-bottom: 6px;
}
.faq-section-head p {
  color: var(--text-sub);
  font-size: .9rem;
  line-height: 1.7;
}
.faq-message-form {
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
  margin-bottom: 18px;
}
.faq-textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.7;
}
.faq-textarea.small {
  min-height: 78px;
}
.faq-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-form-note,
.faq-reply-status {
  color: var(--text-hint);
  font-size: .82rem;
}
.faq-message-list {
  display: grid;
  gap: 14px;
}
.faq-message,
.faq-empty {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  background: #FFFDFC;
}
.faq-empty {
  color: var(--text-hint);
  text-align: center;
}
.faq-message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.faq-message-meta strong {
  font-size: .94rem;
}
.faq-message-meta span {
  color: var(--text-hint);
  font-size: .8rem;
  white-space: nowrap;
}
.faq-message p,
.faq-reply p {
  color: var(--text-sub);
  font-size: .94rem;
  line-height: 1.75;
  word-break: break-word;
}
.faq-message-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}
.faq-link-btn {
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  cursor: pointer;
  font-size: .86rem;
  padding: 0;
}
.faq-link-btn:hover {
  text-decoration: underline;
}
.faq-reply-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.faq-replies {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-left: 14px;
  border-left: 2px solid var(--border);
}
.faq-reply {
  padding: 12px 0 0;
}
.faq-more {
  margin: 16px auto 0;
  display: flex;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.card-label { font-size: .8rem; color: var(--text-hint); margin-bottom: 4px; }
.card-value { font-size: .95rem; color: var(--text); word-break: break-all; }
.card-value.mono { font-family: "SF Mono", "Fira Code", monospace; font-size: .82rem; }
.card-row { margin-bottom: 14px; }
.card-row:last-child { margin-bottom: 0; }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.card-header h3 { font-size: 1rem; font-weight: 600; }

.referral-card .card-header {
  gap: 12px;
}
.invite-count {
  flex-shrink: 0;
  font-size: .82rem;
  color: var(--text-hint);
}
.invite-copy {
  color: var(--text-sub);
  font-size: .9rem;
  line-height: 1.7;
  margin-top: -6px;
}
.invite-field {
  margin-top: 16px;
}
.invite-value-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.invite-code-value,
.invite-link-value {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: .9rem;
  line-height: 1.45;
  word-break: break-all;
}
.invite-code-value.mono {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: .92rem;
}
.invite-share-text {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #DDE7F3;
  border-radius: 8px;
  background: #F7FAFD;
  color: var(--text-sub);
  font-size: .88rem;
  line-height: 1.7;
  word-break: break-word;
}
.invite-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}
.copy-status {
  display: none;
  margin-top: 10px;
  font-size: .82rem;
}
.copy-status.show {
  display: block;
}
.copy-status.ok {
  color: var(--success);
}
.copy-status.err {
  color: var(--error);
}

.wallet-amount { font-size: 2rem; font-weight: 700; color: var(--brand); }
.wallet-unit   { font-size: 1rem; color: var(--text-sub); margin-left: 4px; }
.wallet-note   { font-size: .82rem; color: var(--text-hint); margin-top: 6px; }

.binding-status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .82rem; padding: 3px 10px;
  border-radius: 12px;
}
.binding-status-badge.bound   { background: #EBF8EE; color: var(--success); }
.binding-status-badge.unbound { background: #FDF3ED; color: var(--brand-dark); }

/* ── 页脚 ─────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 24px;
  font-size: .82rem;
  color: var(--text-hint);
  border-top: 1px solid var(--border);
}

/* ── 响应式 ──────────────────────────────────── */
@media (max-width: 680px) {
  .hero { flex-direction: column; padding: 36px 20px 32px; gap: 28px; }
  .hero-visual { width: 100%; height: 160px; }
  .hero-title { font-size: 2rem; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .site-nav { padding: 14px 20px; }
  .site-nav .nav-actions { gap: 8px; }
  .faq-page { padding: 24px 16px 48px; }
  .faq-layout { grid-template-columns: 1fr; }
  .faq-side { position: static; }
  .faq-messages { padding: 18px; }
  .faq-form-actions { align-items: stretch; flex-direction: column; }
  .faq-form-actions .btn { width: 100%; }
  .faq-message-meta { align-items: flex-start; flex-direction: column; gap: 4px; }
  .referral-card .card-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .invite-value-row {
    flex-direction: column;
  }
  .invite-value-row .btn,
  .invite-actions .btn {
    width: 100%;
  }
  .invite-actions {
    justify-content: stretch;
  }
}
