/* ===================== 恋爱小日子 样式 ===================== */
/* 兜底：保证 hidden 属性真正生效（防止 .overlay 等 display 规则覆盖） */
[hidden] { display: none !important; }

:root {
  --rose: #ff5f8f;
  --rose-deep: #e8447a;
  --rose-soft: #ffd7e3;
  --rose-bg: #fff5f8;
  --card: #ffffff;
  --ink: #463b42;
  --ink-soft: #6b5c63;
  --muted: #a08f97;
  --line: #ffe3ec;
  --fert: #cdeede;
  --fert-line: #a5dcc2;
  --pred: #ffe9ee;
  --shadow: 0 6px 20px rgba(255, 95, 143, .10);
  --radius: 18px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 100% -10%, #ffe4ee 0%, transparent 60%),
    radial-gradient(700px 400px at -10% 30%, #fff0e9 0%, transparent 55%),
    linear-gradient(180deg, #fff8fb 0%, #fff2f7 100%);
  min-height: 100vh;
}
.app { max-width: 560px; margin: 0 auto; padding: 0 16px calc(92px + env(safe-area-inset-bottom)); }

/* ---------- 顶栏 ---------- */
.topbar { padding: 22px 0 12px; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-icon {
  font-size: 26px; width: 52px; height: 52px; line-height: 52px; text-align: center;
  border-radius: 16px; background: linear-gradient(135deg, #ff8fb3, #ff5f8f);
  box-shadow: 0 8px 18px rgba(255, 95, 143, .32);
}
.brand-text h1 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: .5px; }
.dayline { margin: 4px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); border: 1px solid var(--line); margin-bottom: 14px;
}
.card h3 { margin: 0 0 10px; font-size: 15px; }
.card-list > .card:last-child { margin-bottom: 0; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.8; margin: 10px 2px; }
.hint.center { text-align: center; }
.muted { color: var(--muted); font-weight: 400; }

/* ---------- 首页横幅 ---------- */
.banner { border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; font-size: 14px; line-height: 1.7;
  display: flex; gap: 10px; align-items: flex-start; }
.banner .b-emoji { font-size: 22px; line-height: 1.2; }
.banner.urgent { background: linear-gradient(120deg, #ff8fb3, #ff5f8f); color: #fff; box-shadow: 0 10px 22px rgba(255, 95, 143, .35); }
.banner.urgent b { color: #fff; }
.banner.soft { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.banner.today-hero { background: linear-gradient(120deg, #ff9db8, #ff5f8f 60%, #ff8fb3); color: #fff; }
b, strong { font-weight: 700; }
.banner.urgent b, .banner.today-hero b { color: #fff; }

/* ---------- 大日子数字卡片 ---------- */
.since-card { display: flex; align-items: center; gap: 14px; }
.since-emoji { font-size: 30px; width: 58px; height: 58px; flex: 0 0 58px; text-align: center; line-height: 58px;
  background: var(--rose-bg); border-radius: 16px; border: 1px solid var(--line); }
.since-info { flex: 1; min-width: 0; }
.since-title { font-size: 15px; font-weight: 700; }
.since-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.since-num { text-align: right; flex: 0 0 auto; }
.since-num .n { font-size: 34px; font-weight: 800; color: var(--rose); line-height: 1.1;
  font-variant-numeric: tabular-nums; }
.since-num .u { font-size: 13px; color: var(--muted); }

/* ---------- 即将到来 ---------- */
.up-list { list-style: none; margin: 0; padding: 4px 2px; }
.up-list li { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px dashed var(--line); }
.up-list li:last-child { border-bottom: none; }
.up-days { flex: 0 0 84px; text-align: center; }
.up-days .d { font-size: 20px; font-weight: 800; color: var(--rose); }
.up-days .t { font-size: 11px; color: var(--muted); }
.up-main { flex: 1; min-width: 0; }
.up-main .t2 { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-main .d2 { font-size: 12px; color: var(--muted); margin-top: 2px; }
.up-urgent { background: linear-gradient(90deg, rgba(255,95,143,.10), transparent 70%); border-radius: 10px; }

/* ---------- 页头 / 按钮 ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; margin: 14px 2px 12px; }
.page-head h2 { margin: 0; font-size: 19px; }
.page-head.sub { margin-top: 20px; }
.page-head.sub h3 { margin: 0; font-size: 15px; color: var(--ink-soft); }
.btn-round { width: 38px; height: 38px; border: none; border-radius: 50%; font-size: 20px; color: #fff;
  background: linear-gradient(135deg, #ff8fb3, #ff5f8f); box-shadow: 0 6px 14px rgba(255,95,143,.35); cursor: pointer; }
.btn { border: none; border-radius: 14px; padding: 12px 18px; font-size: 15px; cursor: pointer; font-weight: 600; }
.btn.primary { color: #fff; background: linear-gradient(135deg, #ff8fb3, #ff5f8f); box-shadow: 0 8px 18px rgba(255,95,143,.3); }
.btn.ghost { color: var(--rose); background: var(--rose-bg); border: 1px solid var(--line); }
.btn.danger { color: #fff; background: #ef6a6a; }
.btn.small { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.btn.wide { width: 100%; margin-top: 10px; }
.btn:disabled { opacity: .5; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 560px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  display: flex; z-index: 40;
  padding-bottom: env(safe-area-inset-bottom);
}
.tab { flex: 1; border: none; background: none; padding: 10px 0 8px; display: flex; flex-direction: column;
  align-items: center; gap: 3px; font-size: 11.5px; color: var(--muted); cursor: pointer; }
.tab-ico { font-size: 21px; line-height: 1; }
.tab.active { color: var(--rose); font-weight: 700; }
.tab.active .tab-ico { transform: scale(1.12); }

/* ---------- 通用弹层 ---------- */
.overlay { position: fixed; inset: 0; background: rgba(70, 40, 55, .45); backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center; z-index: 400; }
.overlay.onboarding { align-items: center; padding: 18px; }
.sheet {
  background: #fff; width: 100%; max-width: 560px; max-height: 88vh; overflow: auto;
  border-radius: 22px 22px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  animation: rise .22s ease;
}
.overlay.onboarding .sheet { border-radius: 22px; }
@keyframes rise { from { transform: translateY(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet h2 { margin: 0 0 4px; font-size: 20px; }
.sheet h3 { font-size: 15px; margin: 0 0 12px; color: var(--ink-soft); font-weight: 600; }
.sheet form label { display: block; font-size: 13.5px; color: var(--ink-soft); margin: 12px 0 0; font-weight: 600; }
.sheet input[type=text], .sheet input[type=date], .sheet input[type=number], .sheet textarea, .sheet select {
  width: 100%; margin-top: 6px; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 12px;
  font-size: 15px; color: var(--ink); background: #fffafc; font-weight: 400; font-family: inherit; }
.sheet input:focus, .sheet textarea:focus, .sheet select:focus { outline: none; border-color: var(--rose); background: #fff; }
.sheet textarea { min-height: 60px; resize: vertical; }
.sheet .form-row { display: flex; gap: 10px; }
.sheet .form-row > * { flex: 1; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chips button { font-size: 19px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.chips button.on { border-color: var(--rose); background: var(--rose-bg); }
.sheet-actions { display: flex; gap: 10px; margin-top: 16px; }
.sheet-actions .btn { flex: 1; margin: 0; }
.form-err { color: #e04444; font-size: 13px; margin: 8px 0 0; font-weight: 400; }

/* ---------- 事件行 ---------- */
.ev-card { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.ev-emoji { font-size: 24px; width: 48px; height: 48px; flex: 0 0 48px; line-height: 48px; text-align: center;
  background: var(--rose-bg); border-radius: 14px; }
.ev-info { flex: 1; min-width: 0; }
.ev-title { font-weight: 700; font-size: 15.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ev-note { font-size: 12.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-right { text-align: right; flex: 0 0 auto; font-size: 12px; color: var(--muted); }
.ev-right .big { display: block; font-size: 15px; font-weight: 800; color: var(--rose); margin-bottom: 2px; }
.ev-actions { display: flex; gap: 4px; }
.icon-btn { border: none; background: none; font-size: 17px; padding: 4px 6px; cursor: pointer; opacity: .75; }
.icon-btn:active { opacity: 1; }
.tag-kind { font-size: 10.5px; padding: 2px 7px; border-radius: 99px; background: var(--rose-bg); color: var(--rose); border: 1px solid var(--line); font-weight: 500; }

/* ---------- 生理期 ---------- */
.stat-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 2px; }
.stat { background: var(--rose-bg); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; flex: 1; min-width: 104px; }
.stat .k { font-size: 11.5px; color: var(--muted); }
.stat .v { font-size: 16px; font-weight: 800; margin-top: 2px; color: var(--ink); }
.stat .v small { font-size: 11px; color: var(--muted); font-weight: 400; }
.cal-card { padding-top: 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 8px; }
.cal-title { font-weight: 800; font-size: 16px; }
.cal-nav { border: none; background: var(--rose-bg); width: 32px; height: 32px; border-radius: 10px;
  font-size: 20px; color: var(--rose); cursor: pointer; }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; color: var(--muted); font-size: 11.5px; padding: 6px 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 13px;
  border-radius: 10px; color: var(--ink); position: relative; cursor: pointer; user-select: none;
  border: 1.5px solid transparent; }
.cal-cell.out { color: #d9ccd1; }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--rose-deep); font-weight: 800; color: var(--rose-deep); }
/* 月经期（记录） */
.cal-cell.pd { background: linear-gradient(160deg, #ff6b9d, #e8447a); color: #fff; font-weight: 700; border-color: #e8447a; }
/* 预计经期 */
.cal-cell.pred { background: #ffc9dc; color: #b0235a; font-weight: 700; border-color: #ff9dbf; }
/* 卵泡期 */
.cal-cell.ph-foll { background: #d3e9ff; color: #1f5fa8; border-color: #a9cdf5; }
/* 易孕期 */
.cal-cell.fert { background: #ffdfb3; color: #9c4a00; border-color: #ffbe6b; }
/* 排卵日（预测，最醒目） */
.cal-cell.ovul { background: linear-gradient(160deg, #ffb347, #ff8c2e); color: #fff; font-weight: 800; border-color: #e5701a; }
/* 黄体期 */
.cal-cell.ph-lut { background: #ece0f8; color: #6d43a3; border-color: #d3bcf0; }
.legend { display: flex; gap: 10px 14px; flex-wrap: wrap; padding: 12px 2px 2px; font-size: 11.5px; color: var(--ink-soft); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg { display: inline-block; width: 13px; height: 13px; border-radius: 4px; border: 1px solid rgba(0,0,0,.05); }
.lg-pd { background: linear-gradient(160deg, #ff6b9d, #e8447a); }
.lg-pred { background: #ffc9dc; }
.lg-foll { background: #d3e9ff; }
.lg-fe { background: #ffdfb3; }
.lg-ov { background: linear-gradient(160deg, #ffb347, #ff8c2e); }
.lg-lut { background: #ece0f8; }
.lg-today { box-shadow: inset 0 0 0 2px var(--rose-deep); background: #fff; }

/* ---------- 当天所处时期徽标 ---------- */
.phase-hero { display: flex; align-items: center; gap: 12px; border-radius: var(--radius); padding: 14px 16px;
  margin-bottom: 12px; border: 1.5px solid transparent; }
.phase-hero .pe { font-size: 30px; }
.phase-hero .pt { font-weight: 800; font-size: 17px; }
.phase-hero .pd2 { font-size: 12.5px; margin-top: 2px; line-height: 1.6; opacity: .9; }
.phase-hero.menstrual { background: #ffe3ec; border-color: #ff9dbf; color: #b0235a; }
.phase-hero.follicular { background: #e4f1ff; border-color: #a9cdf5; color: #1f5fa8; }
.phase-hero.fertile, .phase-hero.ovulation { background: #fff1dd; border-color: #ffbe6b; color: #9c4a00; }
.phase-hero.ovulation { background: linear-gradient(120deg, #fff1dd, #ffe0b8); }
.phase-hero.luteal, .phase-hero.late { background: #f3ecfb; border-color: #d3bcf0; color: #6d43a3; }

/* ---------- 四阶段时间轴列表 ---------- */
.phase-list { list-style: none; margin: 4px 0 0; padding: 0; }
.phase-list li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 2px; border-bottom: 1px dashed var(--line); }
.phase-list li:last-child { border-bottom: none; }
.phase-list .dot { width: 14px; height: 14px; border-radius: 50%; margin-top: 3px; flex: 0 0 14px; }
.phase-list .pinfo { flex: 1; min-width: 0; }
.phase-list .pname { font-weight: 700; font-size: 14px; }
.phase-list .pdate { font-size: 12px; color: var(--muted); margin-top: 1px; }
.phase-list .pnote { font-size: 12px; color: var(--ink-soft); margin-top: 2px; line-height: 1.6; }
.dot.menstrual { background: #e8447a; }
.dot.follicular { background: #7db8ec; }
.dot.fertile { background: #f5a93c; }
.dot.luteal { background: #b98ae0; }
.dot.period_pred { background: #ff9dbf; }
.pd-row { display: flex; align-items: center; gap: 12px; }
.pd-days { font-size: 22px; font-weight: 800; color: var(--rose); flex: 0 0 60px; text-align: center; }
.pd-days small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.disclaimer { font-size: 11.5px; color: #c3aab4; }

/* ---------- 设置 ---------- */
.set-group { margin-bottom: 14px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.set-row:last-child { border-bottom: none; }
.set-row .k { font-size: 14px; font-weight: 600; }
.set-row .k small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.set-row input[type=text], .set-row input[type=number] { border: 1.5px solid var(--line); border-radius: 10px;
  padding: 8px 10px; font-size: 14px; width: 120px; text-align: right; background: #fffafc; }
.set-row input[type=number] { width: 74px; }
.data-btns { display: flex; flex-direction: column; gap: 10px; }

/* ---------- 空状态 / Toast ---------- */
.empty { text-align: center; padding: 30px 10px 26px; color: var(--muted); }
.empty .e { font-size: 44px; }
.empty .t { font-size: 16px; font-weight: 700; color: var(--ink); margin: 10px 0 4px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom));
  background: rgba(58, 40, 48, .92); color: #fff; padding: 10px 18px; border-radius: 99px; font-size: 13.5px;
  z-index: 460; max-width: 86vw; text-align: center; box-shadow: 0 8px 20px rgba(0,0,0,.18); animation: rise .2s ease; }
.avatar-row { display:flex; align-items:center; gap:10px; }
.avatar { width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(135deg,#ff8fb3,#ff5f8f);
  color: #fff; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:18px; }
.mt8 { margin-top: 8px; }

/* ===================== 情绪系统（模块A） ===================== */
/* 首页今日情绪卡 */
.mood-card .mood-head { display: flex; align-items: center; gap: 10px; }
.mood-card .mood-e { font-size: 26px; }
.mood-card .mood-txt { flex: 1; font-size: 15px; }
.mood-card .mood-txt b { margin-right: 4px; }
.mood-card .mood-line { margin: 8px 0 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.7;
  background: var(--rose-bg); border-radius: 12px; padding: 8px 12px; }
/* 阶段徽标里的铅笔 & 主内容 */
.phase-hero .ph-main { flex: 1; min-width: 0; }
.phase-hero .mood-pen { margin-left: auto; font-size: 20px; }
/* 周期时间轴：整行进度色带 */
.phasebar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; gap: 2px; margin: 10px 0 2px; }
.phasebar .seg { display: block; height: 100%; }
.phasebar .seg-menstrual { background: #e8447a; }
.phasebar .seg-follicular { background: #7db8ec; }
.phasebar .seg-fertile { background: #f5a93c; }
.phasebar .seg-luteal { background: #b98ae0; }
/* 黄体期情绪波动气泡 */
.warn-chip { display: inline-block; font-size: 10.5px; color: #a45500; background: #ffe9cf;
  border: 1px solid #ffcf8f; border-radius: 99px; padding: 1px 8px; margin-left: 6px; vertical-align: 1px; font-weight: 600; }
/* 心情选择弹层 */
.mood-opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px;
  margin-top: 8px; cursor: pointer; font-family: inherit; }
.mood-opt .moe { font-size: 26px; }
.mood-opt .mot { flex: 1; }
.mood-opt .mot b { font-size: 15px; }
.mood-opt .mot small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; font-weight: 400; }
.mood-opt .chk { font-style: normal; color: var(--rose); font-weight: 800; font-size: 16px; }
.mood-opt.on { border-color: var(--rose); background: var(--rose-bg); }
/* 日历详情弹层 */
.tip-row { display: flex; gap: 10px; background: #faf6f8; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; margin: 8px 0; }
.tip-row > span { font-size: 20px; }
.tip-row b { font-size: 13px; }
.tip-row p { margin: 3px 0 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.7; }
.phase-info { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px;
  margin: 4px 0; border-left: 5px solid #ddd; }
.phase-info .pe { font-size: 26px; }
.phase-info .pt { font-weight: 800; font-size: 16px; }
.phase-info.menstrual { border-color: #e8447a; background: #ffe3ec; color: #b0235a; }
.phase-info.follicular { border-color: #7db8ec; background: #e4f1ff; color: #1f5fa8; }
.phase-info.fertile, .phase-info.ovulation { border-color: #f5a93c; background: #fff1dd; color: #9c4a00; }
.phase-info.luteal { border-color: #b98ae0; background: #f3ecfb; color: #6d43a3; }
/* 设置：视角下拉 */
.set-row select { border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 10px;
  font-size: 14px; background: #fffafc; max-width: 190px; }

/* ===================== 症状日志（模块C） ===================== */
/* 日历角标 */
.cal-cell .cm { position: absolute; font-style: normal; line-height: 1; }
.cal-cell .cm-log { left: 3px; bottom: 2px; width: 5px; height: 5px; border-radius: 50%;
  background: #ff4d6d; box-shadow: 0 0 0 1.5px rgba(255,255,255,.85); }
.cal-cell .cm-pain { right: 1px; bottom: 0; font-size: 9px; }
.cal-cell .cm-his { left: 50%; transform: translateX(-50%); bottom: 2px;
  width: 4px; height: 4px; border-radius: 50%; background: #cfc3ca; }
/* 症状弹层 */
.sy-sec { margin: 12px 0 2px; }
.sy-sec > b { font-size: 13.5px; color: var(--ink-soft); }
.sy-pains, .sy-syms { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.sy-pain, .chip-sy { border: 1.5px solid var(--line); background: #fff; border-radius: 12px;
  padding: 8px 14px; font-size: 14px; color: var(--ink); cursor: pointer; }
.sy-pain.on { border-color: #ff5f8f; background: #ffe3ec; color: #b0235a; font-weight: 700; }
.sy-pain[data-val="heavy"].on { background: #ffd6dc; }
.chip-sy.on { border-color: #7db8ec; background: #e4f1ff; color: #1f5fa8; font-weight: 700; }
.wish-hot { color: var(--rose); }
.center-cta { padding: 6px; }
.tip-row .quote { font-size: 14px; color: var(--ink); font-style: italic; line-height: 1.8; }

/* ============ 时光胶囊排版 ============ */
.cap-head { display: flex; align-items: baseline; justify-content: space-between; }
.cap-head h3 { margin: 0; }
.cap-date { font-size: 12.5px; color: var(--muted); }
.cap-box { border-radius: 14px; padding: 10px 12px 6px; margin: 10px 0; border: 1px solid transparent; }
.cap-box.mine { background: #fff0f5; border-color: #ffd0de; }
.cap-box.hers { background: #f3f0fd; border-color: #ddd2f7; }
.cap-name { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.cap-name b { font-size: 14px; }
.cap-name span { font-size: 11.5px; color: var(--muted); }
.cap-ava { width: 26px; height: 26px; border-radius: 50%; color: #fff; font-style: normal;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.av-mine { background: linear-gradient(135deg, #ff8fb3, #ff5f8f); }
.av-hers { background: linear-gradient(135deg, #a78bfa, #7c5cff); }
.cap-box textarea { width: 100%; border: none; background: transparent; resize: vertical;
  font-size: 14px; color: var(--ink); padding: 2px 0; font-family: inherit; line-height: 1.7; }
.cap-box textarea:focus { outline: none; }

/* ===================== 年度恋爱报告（模块F） ===================== */
#reportViewer { position: fixed; inset: 0; background: #fffafc; overflow: auto; z-index: 300; }
#reportViewer .rp-inner { max-width: 640px; margin: 0 auto; padding: 18px 18px 60px; }
#reportViewer .rp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
#reportViewer .rp-head h2 { margin: 0; font-size: 22px; }
#reportViewer .rp-head .rp-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.rp-tools { margin-left: auto; display: flex; gap: 8px; white-space: nowrap; }
.rp-hero { text-align: center; padding: 26px 10px; border-radius: var(--radius);
  background: linear-gradient(135deg, #ffd7e3, #fff0f5); border: 1px solid var(--line); margin-bottom: 14px; }
.rp-hero .big { font-size: 30px; font-weight: 800; color: var(--rose-deep); }
.rp-hero .sub { margin-top: 6px; color: var(--ink-soft); font-size: 13.5px; }
.rp-sec { margin: 14px 0; }
.rp-sec h3 { margin: 0 0 8px; font-size: 15px; }
.rp-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.rp-stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.rp-stat .k { font-size: 12px; color: var(--muted); }
.rp-stat .v { font-size: 20px; font-weight: 800; margin-top: 3px; color: var(--ink); }
.rp-stat .v small { font-size: 12px; color: var(--muted); font-weight: 400; }
.chart-wrap { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 8px 4px; }
.chart-wrap canvas { width: 100%; height: auto; display: block; }
.rp-note { font-size: 11.5px; color: #c3aab4; margin: 10px 2px 0; line-height: 1.7; }

@media print {
  body { background: #fff !important; }
  .topbar, .main, #main, .tabbar, #toast, .overlay, #modalBody, .mood-card { display: none !important; }
  #reportViewer { position: static; overflow: visible; background: #fff; }
  #reportViewer .rp-inner { padding: 0; max-width: none; }
  #reportViewer .no-print { display: none !important; }
}

/* ===================== 作息与约会（模块G） ===================== */
#scheduleViewer { position: fixed; inset: 0; background: #fffafc; overflow: auto; z-index: 290; }

/* 每日小提醒与作息页共用外层结构 */
#reminderViewer { position: fixed; inset: 0; background: #fffafc; overflow: auto; z-index: 290; }
#scheduleViewer .sv-inner { max-width: 560px; margin: 0 auto; padding: 18px 16px 60px; }
#scheduleViewer .sv-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
#scheduleViewer .sv-head h2 { margin: 0; font-size: 20px; }
#reminderViewer .sv-inner { max-width: 560px; margin: 0 auto; padding: 18px 16px 60px; }
#reminderViewer .sv-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
#reminderViewer .sv-head h2 { margin: 0; font-size: 20px; }
.sv-head .sv-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.sv-head .cal-title { font-weight: 800; min-width: 80px; text-align: center; font-size: 15px; }
.sv-sec { margin: 14px 0; }
.sv-sec h3 { margin: 0 0 8px; font-size: 15px; }
.sv-week { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; color: var(--muted);
  font-size: 11.5px; padding: 6px 0; }
.sv-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.sv-cell { aspect-ratio: .95; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  position: relative; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.sv-cell.out { color: #d9ccd1; background: #fbf7f9; }
.sv-cell.today { box-shadow: inset 0 0 0 2px var(--rose); font-weight: 800; color: var(--rose-deep); }
.sv-cell.today.fill { box-shadow: inset 0 0 0 2px #fff; color: #fff; }
.sv-cell.fill { border-color: rgba(255,255,255,.35); }
.sv-cell.mt { border-color: var(--rose); border-width: 1.5px; }
.sd-d { position: absolute; bottom: 3px; width: 8px; height: 8px; border-radius: 50%; }
.sd-d.mine { left: 20%; }
.sd-d.hers { right: 20%; }
.sd-d.work { background: #4c8df6; }
.sd-d.night { background: #7c5cff; }
.sd-d.rest { background: #34b46f; }
.sd-d.trip { background: #f59e0b; }
/* 日期格内用图标代替小圆点，更清晰 */
.sv-cell .sd-ic { position: absolute; bottom: 0; font-style: normal; font-size: 12px; line-height: 1.3; }
.sv-cell .sd-ic.mine { left: 2px; }
.sv-cell .sd-ic.hers { right: 2px; }
.sv-cell.mt .sd-ic { bottom: -1px; }
.sv-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 11.5px; color: var(--ink-soft);
  padding: 10px 2px 2px; }
.sv-legend span { display: inline-flex; align-items: center; gap: 4px; }
.sv-legend i.sd-d { position: static; display: inline-block; }
.meet-row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px dashed var(--line); }
.meet-row:last-child { border-bottom: none; }
.meet-main { flex: 1; min-width: 0; }
.meet-main b { font-size: 14.5px; }
.meet-main .sub { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.6; }
.meet-overdue { background: #fff3f0; border-radius: 12px; padding: 2px 8px; }
.meet-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.meet-pick .sy-pain { text-align: center; }
.today-card { margin-bottom: 12px; }
