/* 6 天饭后轻动体验营 · 设计系统（依据 design.md） */

:root {
  --bg: #FDFBF7;
  --surface: #FFFFFF;
  --ink: #3D2C29;
  --ink-soft: #8A7A72;
  --primary: #E86FA4;
  --primary-deep: #D9538E;
  --accent: #F08C5A;
  --violet: #8B5FBF;
  --violet-soft: #EDE4F7;
  --leaf: #8BA84E;
  --sky: #7EC8E3;
  --flame: #E05A4E;
  --line: #EFE9E2;
  --grad-main: linear-gradient(135deg, #F08C5A 0%, #E86FA4 100%);
  --grad-badge: linear-gradient(160deg, #A98BE0, #E86FA4);
  --r-card: 24px;
  --r-photo: 20px;
  --shadow: 0 2px 12px rgba(61,44,41,.06);
  --shadow-lift: 0 8px 28px rgba(61,44,41,.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: 'PingFang SC', 'Noto Sans SC', -apple-system, sans-serif;
  background: #EFE9E2; color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 15px; line-height: 1.7;
}
button { font-family: inherit; border: none; cursor: pointer; background: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ── Mockup（与姐妹仓同尺寸） ── */
.stage {
  --phone-w: 406px; --phone-h: 860px;
  --fit: min(1, (100vw - 32px) / 406px, (100dvh - 110px) / 860px);
  height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  overflow: hidden; padding: 8px 16px;
}
.phone-fit { width: calc(var(--phone-w) * var(--fit)); height: calc(var(--phone-h) * var(--fit)); overflow: hidden; }
.phone {
  width: var(--phone-w); height: var(--phone-h);
  background: var(--ink); border-radius: 55px; padding: 8px;
  box-shadow: 0 24px 64px rgba(61,44,41,.28), inset 0 0 0 2px #5a4642;
  position: relative; transform: scale(var(--fit)); transform-origin: top left;
}
.phone-island {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 34px; background: #1a1210; border-radius: 20px; z-index: 100; pointer-events: none;
}
.phone-screen {
  width: 390px; height: 844px; background: var(--bg);
  border-radius: 47px; overflow: hidden; position: relative;
  display: flex; flex-direction: column;
}
.stage-hint { flex-shrink: 0; font-size: 12px; color: #B8AC9F; letter-spacing: .1em; }
.demo-bar { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: 900px; }
.demo-bar button {
  font-size: 12px; padding: 6px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); color: var(--ink-soft);
}
.demo-bar button:hover { border-color: var(--violet); color: var(--violet); }
@media (max-width: 500px) {
  html, body { overflow: hidden; }
  .stage { --fit: 1; padding: 0; gap: 0; }
  .phone-fit { width: 100vw; height: 100dvh; }
  .phone { width: 100vw; height: 100dvh; border-radius: 0; padding: 0; box-shadow: none; transform: none; }
  .phone-island, .stage-hint, .demo-bar { display: none; }
  .phone-screen { width: 100%; height: 100%; border-radius: 0; }
}

/* ── 通用 ── */
.screen { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.screen[hidden] { display: none; }
.page { padding: 56px 20px 24px; animation: rise .4s ease-out; }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.serif-title { font-family: 'Noto Serif SC', 'Songti SC', 'STSong', serif; font-weight: 700; font-size: 24px; line-height: 1.35; margin: 6px 0 10px; }
.day-serif { font-family: 'Noto Serif SC', 'Songti SC', serif; font-weight: 700; font-size: 14px; color: var(--violet); }
.lede { font-size: 15px; margin: 4px 0 14px; }
.block-label { font-weight: 600; font-size: 14px; margin: 18px 0 8px; }
.nav-back { font-size: 28px; color: var(--ink-soft); line-height: 1; cursor: pointer; margin-bottom: 8px; }

.btn-primary {
  display: block; width: 100%; height: 48px; border-radius: 24px;
  background: var(--grad-main); color: #fff; font-size: 15px; font-weight: 500;
  margin-top: 18px;
}
.btn-primary:disabled { background: var(--line); color: var(--ink-soft); cursor: not-allowed; }
.btn-ghost {
  display: block; width: 100%; min-height: 44px; border-radius: 22px; margin-top: 10px;
  background: #fff; border: 1px solid var(--line); font-size: 14px; padding: 10px;
}

.opt-list { display: flex; flex-direction: column; gap: 8px; }
.opt {
  text-align: left; background: #fff; border: 1.5px solid var(--line);
  border-radius: 16px; padding: 12px 16px; font-size: 14px; line-height: 1.6;
}
.opt.sel { background: var(--violet-soft); border-color: var(--violet); }
.opt .opt-sub { display: block; font-size: 12px; color: var(--ink-soft); }

/* 欢迎 */
.screen-welcome { padding: 0; }
.welcome-hero img { width: 100%; height: 250px; object-fit: cover; object-position: center 62%; border-radius: 0 0 28px 28px; }
.welcome-body { padding: 20px 22px 30px; }
.welcome-body .serif-title { font-size: 30px; }
.welcome-sub { font-size: 15px; margin: 8px 0 6px; }
.welcome-desc { font-size: 14px; color: var(--ink-soft); }
.welcome-note { font-size: 12px; color: var(--ink-soft); margin-top: 12px; text-align: center; }

/* D0 */
.guide-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.guide-list .g {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 14px; font-size: 13px; color: var(--ink-soft);
}
.letter { background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow); padding: 20px; margin-top: 14px; }
.letter-thumb { width: 100%; height: 110px; object-fit: cover; object-position: center 25%; border-radius: 14px; margin-bottom: 12px; }
.letter-copy { font-family: 'Noto Serif SC', 'Songti SC', serif; font-size: 17px; line-height: 1.7; }
.q-block { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 18px 16px; margin-bottom: 10px; }
.q-block .q { font-size: 16px; font-weight: 600; margin-bottom: 12px; line-height: 1.65; }
.safety-dots { display: flex; gap: 6px; align-items: center; margin: 4px 0 16px; }
.safety-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); display: block; }
.safety-dots i.on { background: var(--violet); transform: scale(1.25); }
.safety-dots i.done { background: var(--leaf); }
.consent-thumb { width: 100%; height: 130px; object-fit: cover; object-position: center 25%; border-radius: var(--r-photo); margin: 12px 0; }
.consent-brief { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 12px; }
.consent-brief .g { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; font-size: 14px; }
.consent-fold { margin: 8px 0 4px; font-size: 13px; color: var(--ink-soft); }
.consent-fold summary { cursor: pointer; padding: 8px 0; color: var(--violet); }
.consent-body { background: #fff; border-radius: 18px; padding: 16px; font-size: 13.5px; white-space: pre-line; box-shadow: var(--shadow); margin-top: 8px; }
.consent-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 14px; background: #fff; border-radius: 14px; padding: 12px 14px; border: 1px solid var(--line); }
.consent-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--violet); }

/* 今日 */
.count-row { margin: 10px 0 2px; }
.dots { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--line); background: transparent; }
.dot.done { background: var(--leaf); border-color: var(--leaf); }
.dot.missed { border-color: var(--ink-soft); }
.count-label { font-size: 12px; color: var(--ink-soft); }
.streak-line { font-size: 13px; color: var(--ink-soft); margin: 2px 0 8px; }
.today-hero { width: 100%; height: 150px; object-fit: cover; border-radius: var(--r-photo); margin: 10px 0 14px; }
.lock-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; font-size: 14px; margin-bottom: 12px; }
.action-card { background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow); padding: 18px; position: relative; overflow: hidden; margin-bottom: 12px; }
.action-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.action-card h3 { font-family: 'Noto Serif SC', 'Songti SC', serif; font-size: 17px; margin-bottom: 8px; }
.action-card p { font-size: 14px; margin-bottom: 6px; }
.action-card .stop { font-size: 13px; color: var(--ink-soft); }
.ver-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 4px 0 12px; }
.ver-grid .opt { padding: 10px 8px; text-align: center; font-size: 13px; }
.rec-block { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 10px; }
.rec-block .rq { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.rec-block .rtag { font-size: 12px; color: var(--violet); }
.rec-block .ropts { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.rec-text { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-top: 8px; font-family: inherit; }
.kp { background: var(--violet-soft); border-radius: 16px; padding: 12px 14px; font-size: 14px; margin-bottom: 8px; }
.kp.first { display: block; }
.kp-fold-btn { width: 100%; font-size: 13px; color: var(--violet); padding: 8px; }
.preview-line { font-size: 13px; color: var(--ink-soft); margin: 10px 0; }
.footer-note { font-size: 12px; color: var(--ink-soft); margin: 12px 0; }

/* 目录 */
.list-thumb { width: 100%; height: 80px; object-fit: cover; border-radius: 16px; margin: 10px 0 14px; }
.day-row { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 12px; margin-bottom: 10px; width: 100%; text-align: left; }
.day-row img { width: 56px; height: 56px; object-fit: cover; border-radius: 14px; flex-shrink: 0; }
.day-row .t1 { font-family: 'Noto Serif SC', 'Songti SC', serif; font-size: 13px; color: var(--violet); font-weight: 700; }
.day-row .t2 { font-size: 14px; font-weight: 600; line-height: 1.5; }
.day-row .st { font-size: 12px; color: var(--ink-soft); }
.day-row.today { border: 1.5px solid var(--violet); }

/* 我的 */
.bean-card { background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow); padding: 18px; margin: 12px 0; }
.bean-num { font-family: 'Noto Serif SC', 'Songti SC', serif; font-size: 28px; font-weight: 700; color: var(--accent); }
.bean-sub { font-size: 12px; color: var(--ink-soft); }
.badge-row { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 18px; padding: 14px; box-shadow: var(--shadow); margin-bottom: 10px; }
.badge-circle {
  width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
  background: var(--grad-badge); display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.badge-circle.locked { filter: grayscale(.7); opacity: .5; }
.traj { background: #fff; border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow); margin-bottom: 10px; font-size: 13px; }
.traj .dots { margin: 8px 0; }
.demo-fold { margin-top: 14px; font-size: 13px; color: var(--ink-soft); }
.demo-fold summary { cursor: pointer; padding: 8px 0; }
.demo-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.demo-btns button { font-size: 12px; padding: 8px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }

/* 报告 */
.report-sec { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 16px; margin-bottom: 10px; font-size: 14px; }
.report-sec h4 { font-family: 'Noto Serif SC', 'Songti SC', serif; font-size: 16px; margin-bottom: 6px; }
.dest-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }

/* Tab */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar[hidden] { display: none; }
.tab { flex: 1; padding: 10px 0 12px; font-size: 12px; color: var(--ink-soft); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tab span { font-size: 18px; }
.tab.active { color: var(--violet); box-shadow: inset 0 2px 0 var(--violet); }

/* Overlay */
.overlay { position: absolute; inset: 0; z-index: 50; background: rgba(61,44,41,.4); display: flex; align-items: flex-end; justify-content: center; }
.overlay[hidden] { display: none; }
.fb-modal { background: var(--bg); border-radius: 24px 24px 0 0; width: 100%; max-height: 88%; overflow-y: auto; animation: rise .3s ease-out; }
.fb-band { width: 100%; height: 80px; object-fit: cover; }
.fb-body { padding: 16px 20px 28px; }
.fb-user { background: var(--violet-soft); border-radius: 14px; padding: 10px 14px; font-size: 14px; margin-bottom: 10px; }
.fb-ai { background: #fff; border: 1px solid var(--violet); border-radius: 14px; padding: 12px 14px; font-size: 14px; min-height: 60px; white-space: pre-line; }
.badge-pop { text-align: center; margin: 16px 0; }
.badge-pop .badge-circle { width: 100px; height: 100px; font-size: 46px; margin: 0 auto 8px; animation: flip .8s cubic-bezier(.2,.7,.3,1); }
@keyframes flip { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }
.badge-name { font-family: 'Noto Serif SC', 'Songti SC', serif; font-size: 18px; font-weight: 700; }
.badge-copy { font-size: 13px; color: var(--ink-soft); }
.flag-modal { background: var(--ink); color: #fff; border-radius: 24px; margin: 0 20px 120px; padding: 0 0 20px; overflow: hidden; border-top: 4px solid var(--flame); }
.flag-text { padding: 22px 20px 6px; font-size: 15px; line-height: 1.8; white-space: pre-line; }
.btn-flag { margin: 14px 20px 0; width: calc(100% - 40px); }

.toast {
  position: absolute; left: 20px; right: 20px; bottom: 90px; z-index: 80;
  background: var(--ink); color: #fff; font-size: 13px; text-align: center;
  border-radius: 16px; padding: 12px 16px; animation: rise .22s ease-out;
}
.toast[hidden] { display: none; }
