/* 玄机AI MVP — 移动端优先样式（东方意象 · 极简） */
:root {
  --paper: #f7f3ec;
  --paper-2: #efe8db;
  --ink: #2b2620;
  --ink-2: #6b6358;
  --line: rgba(43, 38, 32, 0.10);
  --brand-from: #2C5F4F;
  --brand-to: #3a4a6b;
  --radius: 22px;
  --shadow: 0 10px 40px rgba(43, 38, 32, 0.12);
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(120% 80% at 50% -10%, #fffdf8 0%, var(--paper) 55%, var(--paper-2) 100%) fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  display: flex;
  flex-direction: column;
}

.screen {
  flex: 1;
  padding: 28px 22px 36px;
  display: flex;
  flex-direction: column;
  animation: fade .35s ease;
}
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 首页 ---------- */
.home { justify-content: center; text-align: center; }
.home-hero { margin: auto 0; }
.brand {
  display: inline-block; letter-spacing: .35em; font-size: 14px; color: var(--ink-2);
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; margin-bottom: 30px;
}
.home-title {
  font-family: var(--serif); font-weight: 700; font-size: 40px; line-height: 1.25;
  margin: 0 0 18px; letter-spacing: .04em;
}
.home-sub { color: var(--ink-2); font-size: 16px; line-height: 1.7; margin: 0 0 36px; }
.home-notes { margin-top: 28px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.home-notes span { font-size: 12.5px; color: var(--ink-2); background: rgba(43,38,32,.05); padding: 6px 12px; border-radius: 999px; }
.home-foot { margin-top: auto; padding-top: 24px; font-size: 13px; color: var(--ink-2); }
.home-foot .dot { margin: 0 8px; opacity: .5; }
.link { color: var(--brand-from); text-decoration: none; }
.link.small { font-size: 13px; display: inline-block; margin-top: 14px; }

/* ---------- 按钮 ---------- */
.btn-primary {
  appearance: none; border: none; cursor: pointer; width: 100%;
  padding: 16px 20px; border-radius: 16px; font-size: 17px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--brand-from), var(--brand-to));
  box-shadow: 0 8px 22px rgba(44, 95, 79, .28); transition: transform .12s ease, opacity .2s;
}
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .4; box-shadow: none; }
.btn-primary.ready { opacity: 1; }
.btn-ghost {
  appearance: none; border: 1px solid var(--line); background: transparent; cursor: pointer;
  width: 100%; padding: 14px 20px; border-radius: 16px; font-size: 16px; color: var(--ink-2);
  margin-top: 12px;
}
.btn-danger {
  appearance: none; border: 1px solid rgba(192,50,33,.4); background: rgba(192,50,33,.06); cursor: pointer;
  width: 100%; padding: 14px 20px; border-radius: 16px; font-size: 16px; color: #c03221; font-weight: 600;
}
.btn-back {
  appearance: none; border: none; background: transparent; cursor: pointer; color: var(--ink-2);
  font-size: 15px; margin-top: 22px; align-self: center; padding: 8px 16px;
}

/* ---------- 卡片 / 通用 ---------- */
.card {
  background: #fff; border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow);
  margin: auto 0;
}
.card h2 { font-family: var(--serif); font-size: 26px; margin: 0 0 14px; }
.consent-lead { color: var(--ink-2); line-height: 1.7; font-size: 15px; margin: 0 0 18px; }
.consent-points { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.cp { background: rgba(43,38,32,.04); border-radius: 14px; padding: 14px 16px; }
.cp b { display: block; font-size: 14.5px; margin-bottom: 4px; }
.cp span { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }

/* ---------- 测试步骤 ---------- */
.step { justify-content: flex-start; }
.progress { height: 6px; background: rgba(43,38,32,.08); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--brand-from), var(--brand-to)); transition: width .3s ease; }
.progress-label { font-size: 12.5px; color: var(--ink-2); margin: 8px 0 24px; }
.q-index { font-size: 13px; color: var(--brand-from); letter-spacing: .1em; margin-bottom: 8px; font-weight: 600; }
.step h2 { font-family: var(--serif); font-size: 24px; line-height: 1.45; margin: 0 0 6px; }
.step-tip { color: var(--ink-2); font-size: 14px; margin: 0 0 22px; }
.date-input {
  width: 100%; padding: 16px; font-size: 18px; border: 1px solid var(--line); border-radius: 14px;
  background: #fff; color: var(--ink); font-family: var(--sans);
}
.opts { display: flex; flex-direction: column; gap: 12px; margin: 18px 0 8px; }
.opt {
  appearance: none; cursor: pointer; text-align: left; width: 100%; padding: 18px 18px;
  border: 1.5px solid var(--line); border-radius: 16px; background: #fff; font-size: 16.5px; color: var(--ink);
  transition: all .15s ease;
}
.opt:active { transform: scale(.99); }
.opt.sel { border-color: var(--brand-from); background: rgba(44,95,79,.07); color: var(--brand-from); font-weight: 600; }
.step-actions { margin-top: auto; padding-top: 24px; }

/* ---------- 生成中 ---------- */
.generating { justify-content: center; align-items: center; text-align: center; color: var(--ink-2); }
.spinner {
  width: 46px; height: 46px; border-radius: 50%; margin-bottom: 18px;
  border: 4px solid rgba(43,38,32,.12); border-top-color: var(--brand-from); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 结果 / 分享卡 ---------- */
.result, .share-land {
  background: linear-gradient(160deg, var(--xj-from), var(--xj-to));
  color: #fff;
}
.result-card, .share-card {
  background: rgba(255,255,255,.14); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius);
  padding: 30px 24px; text-align: center; margin: auto 0; box-shadow: var(--shadow);
}
.rc-symbol { font-family: var(--serif); font-size: 92px; line-height: 1; margin-bottom: 10px; text-shadow: 0 4px 20px rgba(0,0,0,.2); }
.rc-name { font-family: var(--serif); font-size: 30px; font-weight: 700; letter-spacing: .06em; }
.rc-kw { display: flex; gap: 10px; justify-content: center; margin: 14px 0 18px; flex-wrap: wrap; }
.rc-kw span { font-size: 14px; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.35); }
.rc-summary { font-size: 16px; line-height: 1.75; margin: 0 0 14px; }
.rc-why { font-size: 13px; line-height: 1.6; color: rgba(255,255,255,.82); background: rgba(0,0,0,.12); border-radius: 12px; padding: 12px 14px; margin-bottom: 18px; }
.rc-dims { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; text-align: left; }
.dim-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; color: rgba(255,255,255,.9); }
.dim-bar { height: 7px; background: rgba(0,0,0,.18); border-radius: 999px; overflow: hidden; }
.dim-bar > div { height: 100%; background: #fff; border-radius: 999px; }
.rc-toggle { appearance: none; border: 1px solid rgba(255,255,255,.4); background: transparent; color: #fff; cursor: pointer; font-size: 14px; padding: 9px 16px; border-radius: 999px; margin-bottom: 14px; }
.rc-detail { text-align: left; }
.rc-detail h3 { font-family: var(--serif); font-size: 16px; margin: 16px 0 8px; font-weight: 700; }
.rc-detail ul { margin: 0; padding-left: 18px; }
.rc-detail li { font-size: 14px; line-height: 1.65; margin-bottom: 6px; color: rgba(255,255,255,.92); }
.rc-detail .action, .rc-detail .cnote { font-size: 14px; line-height: 1.7; color: rgba(255,255,255,.92); margin: 0; }
.disclaimer { font-size: 11.5px; line-height: 1.6; color: rgba(255,255,255,.7); margin: 18px 0 0; border-top: 1px solid rgba(255,255,255,.2); padding-top: 12px; }
.result-actions { margin-top: 18px; }

/* ---------- 分享落地 ---------- */
.share-lead { text-align: center; color: rgba(255,255,255,.85); font-size: 15px; margin: 6px 0 0; }

/* ---------- 海报页 ---------- */
.poster { text-align: center; }
.poster h2 { font-family: var(--serif); font-size: 24px; margin: 0 0 6px; }
.poster-tip { color: var(--ink-2); font-size: 13.5px; line-height: 1.6; margin: 0 0 18px; }
.poster-img { width: 100%; max-width: 320px; border-radius: 16px; box-shadow: var(--shadow); margin: 0 auto; display: block; }
.poster-actions { display: flex; gap: 12px; margin: 20px 0 4px; }
.poster-actions .btn-primary, .poster-actions .btn-ghost { margin-top: 0; }

/* ---------- 隐私页 ---------- */
.privacy .card { margin: auto 0; }
.privacy-actions { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 14px; }
.tiny { font-size: 12px; color: var(--ink-2); line-height: 1.6; margin: 10px 0 0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%) translateY(20px);
  background: rgba(43,38,32,.92); color: #fff; padding: 12px 20px; border-radius: 12px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 50; max-width: 80%;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
