:root {
  --bg: #f4f1ea;
  --bg2: #ece7dc;
  --paper: #fffdf8;
  --ink: #2f2a24;
  --muted: #8a8175;
  --line: #e3dccd;
  --accent: #5f8d6b;       /* 鼠尾草绿 */
  --accent-soft: #e8f0ea;
  --clay: #c97b5a;         /* 陶土橙 - 方案B */
  --clay-soft: #f6e7df;
  --indigo: #5b6b9e;       /* 靛蓝 - 方案C */
  --indigo-soft: #e7eaf4;
  --warn: #b3543f;
  --shadow: 0 10px 30px rgba(60, 50, 35, .10);
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 80% -10%, #fbf7ee 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 10%, #eef3ee 0%, transparent 55%),
    var(--bg);
  line-height: 1.65;
  min-height: 100vh;
}

/* 顶部 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px;
  max-width: 960px; margin: 0 auto;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo { font-size: 28px; flex-shrink: 0; }
.brand h1 { margin: 0; font-size: 21px; letter-spacing: 2px; font-family: "Songti SC", "STSong", serif; }
.brand .sub { margin: 0; font-size: 12px; color: var(--muted); letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 容器 */
.wrap { max-width: 960px; margin: 0 auto; padding: 8px 18px 60px; }

.intro {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow);
  font-size: 14.5px;
}
.intro b { color: var(--accent); }
.intro .hint { margin-bottom: 0; }
.req { color: var(--warn); font-weight: 700; }

/* 步骤指示 */
.stepper {
  display: flex; gap: 6px; list-style: none; padding: 20px 2px; margin: 0;
  justify-content: center; flex-wrap: wrap;
}
.stepper li {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--muted);
}
.stepper li span {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; flex-shrink: 0;
  background: var(--bg2); color: var(--muted); border: 1px solid var(--line);
}
.stepper li.active { color: var(--ink); font-weight: 600; }
.stepper li.active span { background: var(--accent); color: #fff; border-color: var(--accent); }

/* 卡片表单 */
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
}
.step { border: 0; margin: 0; padding: 0; display: none; }
.step.active { display: block; animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.step h2 { margin: 0 0 4px; font-size: 18px; font-family: "Songti SC", "STSong", serif; line-height: 1.4; }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 16px; }

label { display: block; margin-bottom: 16px; font-size: 14px; font-weight: 600; }
textarea, input[type="text"], input[type="number"], input[type="password"] {
  width: 100%; margin-top: 7px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fffefb; color: var(--ink); font: inherit; font-weight: 400;
  resize: vertical; transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 46px; }
textarea:focus, input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* 两列网格（窄屏自动单列） */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

/* 单选/复选 药丸组 */
.radio-group { border: 0; margin: 0 0 16px; padding: 0; }
.radio-group legend { font-size: 14px; font-weight: 600; padding: 0; margin-bottom: 8px; }
.radio-group.inline { margin-bottom: 0; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0 8px 8px 0; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: #fffefb; font-size: 13.5px; font-weight: 500; cursor: pointer;
  transition: all .15s; user-select: none;
}
.pill:hover { border-color: var(--muted); }
.pill input { width: auto; margin: 0; accent-color: var(--accent); }
.pill:has(input:checked) {
  background: var(--accent-soft); border-color: var(--accent); color: #3f6349; font-weight: 600;
}

/* 条件展开块 */
.cond {
  border-left: 3px solid var(--accent);
  background: #faf8f1; border-radius: 0 10px 10px 0;
  padding: 14px 14px 2px; margin: 0 0 16px;
}
.cond[hidden] { display: none; }

/* 按钮 */
.nav { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }
.primary-btn {
  background: var(--accent); color: #fff; border: 0; cursor: pointer;
  padding: 12px 20px; border-radius: 12px; font-size: 15px; font-weight: 600;
  transition: transform .12s, background .2s;
}
.primary-btn:hover { background: #4f7a5b; transform: translateY(-1px); }
.ghost-btn {
  background: transparent; color: var(--ink); border: 1px solid var(--line);
  cursor: pointer; padding: 12px 16px; border-radius: 12px; font-size: 14px;
  transition: background .2s, border-color .2s;
}
.ghost-btn:hover { background: var(--bg2); border-color: var(--muted); }
.ghost-btn:disabled { opacity: .4; cursor: not-allowed; }

.form-error {
  color: var(--warn); background: var(--clay-soft); border: 1px solid var(--clay);
  padding: 10px 14px; border-radius: 10px; font-size: 13.5px; margin: 4px 0 14px;
}

/* 加载 */
.loading { text-align: center; padding: 56px 24px; color: var(--muted); max-width: 520px; margin: 0 auto; }
.spinner {
  width: 42px; height: 42px; margin: 0 auto 22px;
  border: 4px solid var(--accent-soft); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-quote {
  font-size: 18px; line-height: 1.95; color: var(--ink);
  font-style: italic; font-family: "Songti SC", "STSong", serif;
  min-height: 84px; display: flex; align-items: center; justify-content: center;
  padding: 0 6px; transition: opacity .6s ease, transform .6s ease;
}
.loading-quote.q-in { opacity: 1; transform: translateY(0); }
.loading-quote.q-out { opacity: 0; transform: translateY(-8px); }
.loading-phase { font-size: 13px; color: var(--muted); margin-top: 14px; min-height: 20px; letter-spacing: .5px; }
@media (max-width: 640px) {
  .loading-quote { font-size: 16px; min-height: 78px; }
}

/* 结果 */
.result { margin-top: 22px; }
.block {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.block h2 { margin: 0 0 14px; font-size: 20px; font-family: "Songti SC", "STSong", serif; }
.block h3 { margin: 18px 0 8px; font-size: 16px; }
.diagnosis { font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tag {
  background: var(--accent-soft); color: #3f6349; border-radius: 999px;
  padding: 5px 12px; font-size: 13px;
}
.mindset {
  background: var(--accent-soft); border-left: 4px solid var(--accent);
  padding: 12px 16px; border-radius: 8px; font-style: italic; color: #3f6349;
  margin: 6px 0 18px;
}

/* 30天 周卡 */
.weeks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.week {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  background: #fffefb;
}
.week .wk { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.week .wtheme { font-weight: 700; margin: 2px 0 6px; }
.week .wfocus { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.week ul { margin: 0; padding-left: 18px; font-size: 14px; }
.week .wcheck { margin-top: 10px; font-size: 12.5px; color: var(--accent); }

/* 奥德赛方案 */
.odyssey {
  border-radius: var(--radius); padding: 0; overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow); margin-bottom: 20px;
}
.odyssey.a { border-top: 5px solid var(--accent); }
.odyssey.b { border-top: 5px solid var(--clay); }
.odyssey.c { border-top: 5px solid var(--indigo); }
.od-head { padding: 18px 22px; }
.odyssey.a .od-head { background: var(--accent-soft); }
.odyssey.b .od-head { background: var(--clay-soft); }
.odyssey.c .od-head { background: var(--indigo-soft); }
.od-scenario { font-size: 12px; letter-spacing: 1px; opacity: .7; }
.od-title { font-size: 19px; font-weight: 700; margin: 4px 0 0; font-family: "Songti SC", "STSong", serif; }
.od-body { padding: 8px 22px 22px; }
.od-sec { margin-top: 16px; }
.od-sec h4 { margin: 0 0 6px; font-size: 14px; color: var(--ink); }
.od-sec ul { margin: 0; padding-left: 18px; font-size: 14px; }
.od-sec ul li { margin-bottom: 4px; }
.dash { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.dash .d {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  background: #fffefb; font-size: 13px;
}
.dash .d b { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; font-weight: 600; }

/* 结果操作：悬浮在窗口底部居中，滚动时常驻可见；自动换行/网格，确保按钮完整可见 */
.result-actions {
  position: fixed;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 100%; max-width: 960px;
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 253, 248, .92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(60, 50, 35, .10);
  z-index: 40;                 /* 低于弹窗/遮罩(50/60)，弹窗打开时被盖住 */
}
.result-actions button { flex: 0 1 auto; white-space: nowrap; min-width: 0; }

/* 图片 / 海报 导出遮罩（手机长按保存、电脑下载） */
.img-overlay { position: fixed; inset: 0; background: rgba(30, 26, 20, .82); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; }
.img-overlay.hidden { display: none !important; }
.img-overlay-inner { width: 100%; max-width: 460px; max-height: 94vh; background: var(--paper); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow); }
.img-overlay-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 15px; }
.img-overlay-scroll { overflow: auto; background: #2f2a24; padding: 10px; display: flex; justify-content: center; }
.img-overlay-scroll img { max-width: 100%; height: auto; display: block; border-radius: 6px; -webkit-user-select: auto; user-select: auto; }
.img-overlay-hint { font-size: 12.5px; color: var(--muted); text-align: center; margin: 10px 14px 0; line-height: 1.6; }
.img-overlay-actions { padding: 10px 16px 16px; display: flex; justify-content: center; }
.img-overlay-actions .primary-btn { width: 100%; }

/* 弹窗 */
.modal {
  position: fixed; inset: 0; background: rgba(40, 34, 26, .45);
  display: grid; place-items: center; padding: 20px; z-index: 50;
}
.modal.hidden, .hidden { display: none !important; }
.modal-box {
  background: var(--paper); border-radius: var(--radius); padding: 24px;
  width: 100%; max-width: 440px; box-shadow: var(--shadow); max-height: 90vh; overflow: auto;
}
.modal-box h3 { margin: 0 0 6px; }
.modal-box code { background: var(--bg2); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.msg { font-size: 13px; min-height: 18px; margin: 10px 0 0; }
.msg.ok { color: var(--accent); }
.msg.err { color: var(--warn); }

/* 隐私授权弹窗 */
.privacy-box { max-width: 460px; }
.privacy-points { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 6px 14px; margin: 10px 0 4px; }
.privacy-points p { font-size: 13.5px; line-height: 1.7; margin: 8px 0; color: var(--ink); }
.privacy-more { margin: 8px 0 0; text-align: right; }
.privacy-more a { color: var(--accent); text-decoration: none; font-size: 13.5px; }
.privacy-more a:hover { text-decoration: underline; }

.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 20px 20px calc(82px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 640px) { .foot { padding-bottom: calc(132px + env(safe-area-inset-bottom, 0px)); } }

/* ---------- 响应式：手机优先 ---------- */
@media (max-width: 640px) {
  .topbar { padding: 14px 14px; }
  .brand h1 { font-size: 19px; }
  .brand .sub { display: none; }
  .wrap { padding: 6px 12px 48px; }
  .card { padding: 16px 14px; border-radius: 14px; }
  .grid2 { grid-template-columns: 1fr; gap: 0; }
  .weeks { grid-template-columns: 1fr; }
  .dash { grid-template-columns: 1fr; }
  .stepper li { font-size: 11.5px; gap: 5px; }
  .nav { flex-direction: column-reverse; }
  .nav button { width: 100%; }
  /* 手机端：操作按钮改为 2 列网格，4 个按钮完整可见（不再需要横滑） */
  .result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; justify-content: stretch; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .result-actions button { width: 100%; flex: 1 1 auto; font-size: 13.5px; padding: 12px 10px; }
  .pill { padding: 9px 12px; font-size: 13px; }
}

/* 打印 */
@media print {
  body { background: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .topbar, .stepper, .intro, .result-actions, .foot, .drawer { display: none !important; }
  .block, .odyssey, .week, .day { box-shadow: none; break-inside: avoid; }
  .wrap { max-width: 100%; }
}

/* 进度条 */
.plan-progress {
  background: var(--accent-soft); border-radius: 999px; padding: 9px 16px;
  font-size: 13.5px; color: #3f6349; margin: 6px 0 18px; text-align: center;
}

/* 30天 按周分组 + 每日打卡 */
.wk-group { margin-bottom: 18px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.wk-head {
  background: var(--bg2); padding: 9px 16px; font-weight: 700; font-size: 14px;
  letter-spacing: .5px; color: var(--ink);
}
.day { padding: 14px 16px; border-top: 1px solid var(--line); transition: background .2s; }
.day.today { background: #fff8e9; }
.day.day-done { background: var(--accent-soft); }
.day-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.day-no { font-weight: 700; font-size: 15px; }
.today-badge { background: #e8b04b; color: #5a3e0c; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.done-badge { background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-left: auto; }
.todos { list-style: none; margin: 0; padding: 0; }
.todos li { margin-bottom: 6px; }
.todos li label { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; margin: 0; cursor: pointer; font-size: 14.5px; }
.todos li input { width: auto; margin: 4px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.todos li.done span { text-decoration: line-through; color: var(--muted); }
.todos li.done::before { content: '✓ '; color: var(--accent); font-weight: 700; }
.reflection { margin-top: 8px; font-size: 13px; color: var(--muted); font-style: italic; border-left: 3px solid var(--accent); padding-left: 10px; }

/* 我的计划（历史抽屉） */
.drawer { position: fixed; inset: 0; background: rgba(40,34,26,.45); display: flex; justify-content: flex-end; z-index: 50; }
.drawer.hidden { display: none !important; }
.drawer-box { background: var(--paper); width: 100%; max-width: 460px; height: 100%; overflow: auto; padding: 20px; box-shadow: var(--shadow); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.drawer-head h3 { margin: 0; font-size: 19px; font-family: "Songti SC", "STSong", serif; }
.history-list { margin-top: 14px; }
.hitem { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; background: #fffefb; }
.hmeta { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.hmeta b { color: var(--ink); }
.hsum { font-size: 14px; margin-bottom: 10px; }
.hactions { display: flex; gap: 8px; }
.ghost-btn.small { padding: 7px 12px; font-size: 13px; }
.ghost-btn.danger { color: var(--warn); border-color: var(--clay); }

/* ---------- 首页（入口屏） ---------- */
.screen { min-height: 100vh; }
.home {
  display: flex; align-items: center; justify-content: center;
  padding: 28px 18px; min-height: 100vh;
}
.home-inner { width: 100%; max-width: 440px; text-align: center; }
.hero-illo { max-width: 280px; margin: 0 auto 4px; }
.hero-illo svg { width: 100%; height: auto; display: block; }
.home-title {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-weight: 700; font-size: clamp(40px, 12vw, 58px);
  letter-spacing: .35em; padding-left: .35em; margin: .08em 0 .12em;
  background: linear-gradient(120deg, #5f8d6b 0%, #c97b5a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.home-sub { color: var(--muted); letter-spacing: 3px; font-size: 13px; margin: 0 0 18px; }
.home-desc { color: var(--ink); font-size: 14.5px; line-height: 1.85; margin: 0 0 28px; }
.home-btns { display: flex; flex-direction: column; gap: 14px; max-width: 300px; margin: 0 auto; }
.home-btn {
  padding: 15px 20px; border-radius: 14px; font-size: 16px; font-weight: 600;
  cursor: pointer; border: 0; transition: transform .12s, box-shadow .2s, background .2s, color .2s;
}
.home-btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(95, 141, 107, .35); }
.home-btn-primary:hover { background: #4f7a5b; transform: translateY(-1px); }
.home-btn-ghost { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.home-btn-ghost:hover { border-color: var(--accent); color: #3f6349; transform: translateY(-1px); }
.home-foot { margin-top: 26px; color: var(--muted); font-size: 11.5px; }

/* 顶栏右侧按钮组 */
.top-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* 自定义当日任务 */
.custom-hint { margin-top: 2px; }
.custom-box { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 10px; }
.custom-list { list-style: none; margin: 0 0 8px; padding: 0; }
.custom-list li { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; font-size: 14px; }
.custom-list li label { display: flex; align-items: flex-start; gap: 8px; flex: 1; font-weight: 400; margin: 0; cursor: pointer; }
.custom-list li input[type=checkbox] { width: auto; margin: 4px 0 0; accent-color: var(--clay); flex-shrink: 0; }
.custom-list li.done span { text-decoration: line-through; color: var(--muted); }
.custom-del {
  background: none; border: 0; color: var(--muted); cursor: pointer;
  font-size: 18px; line-height: 1; padding: 0 4px; flex-shrink: 0;
}
.custom-del:hover { color: var(--warn); }
.custom-add { display: flex; gap: 8px; }
.custom-add input { margin-top: 0; flex: 1; padding: 9px 12px; font-size: 13.5px; }
.custom-add-btn {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  padding: 0 14px; cursor: pointer; font-size: 13.5px; font-weight: 600; color: #3f6349;
}
.custom-add-btn:hover { background: var(--accent-soft); border-color: var(--accent); }

@media print {
  .modal, .img-overlay, .drawer, .cal-overlay { display: none !important; }
}

/* 首页屏在手机上的微调 */
@media (max-width: 640px) {
  .top-actions .ghost-btn { padding: 8px 9px; font-size: 12.5px; }
  .home-title { font-size: clamp(36px, 13vw, 46px); }
  .home-btns { max-width: 100%; }
}

/* ============ 我的回答（可折叠摘要） ============ */
.my-answers { padding-bottom: 6px; }
.ma-toggle {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 16px; cursor: pointer; font-size: 14.5px; font-weight: 600; color: var(--ink);
  user-select: none;
}
.ma-toggle:hover { border-color: var(--accent); }
.ma-arrow { transition: transform .2s; color: var(--muted); }
.ma-toggle[aria-expanded="true"] .ma-arrow { transform: rotate(180deg); }
.ma-body { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 6px 16px 12px; background: var(--paper); }
.ma-sec { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.ma-sec:last-child { border-bottom: 0; }
.ma-sec h4 { margin: 6px 0 8px; font-size: 14px; color: var(--clay); }
.ma-row { display: flex; gap: 10px; padding: 3px 0; font-size: 13.5px; line-height: 1.5; }
.ma-k { flex: 0 0 130px; color: var(--muted); }
.ma-v { flex: 1; color: var(--ink); word-break: break-word; }

/* ============ 侧重方向 ============ */
.focus-group { display: flex; flex-wrap: wrap; gap: 10px; }
.focus-pill { min-width: 130px; }

/* ============ 30天区块头部 ============ */
.thirty-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.thirty-head h2 { margin: 0; }
.cal-open-btn { flex-shrink: 0; }

/* ============ 30天日历视图（独立遮罩） ============ */
.cal-overlay {
  position: fixed; inset: 0; z-index: 60; background: rgba(40, 36, 30, .5);
  display: flex; align-items: stretch; justify-content: center; padding: 24px;
}
.cal-inner {
  background: var(--paper); border-radius: 18px; width: 100%; max-width: 860px;
  max-height: 100%; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}
.cal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 18px 22px; border-bottom: 1px solid var(--line); background: var(--bg1);
}
.cal-head h3 { margin: 0 0 4px; font-size: 18px; }
.cal-sub { margin: 0; color: var(--muted); font-size: 13px; }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px;
  padding: 18px 22px; overflow-y: auto;
}
.cal-cell {
  position: relative; aspect-ratio: 1 / 1; border: 1px solid var(--line); border-radius: 12px;
  background: var(--paper); cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; padding: 4px;
  font-size: 12.5px; color: var(--ink); transition: transform .1s, border-color .15s, box-shadow .15s;
}
.cal-cell:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 6px 16px rgba(95, 141, 107, .18); }
.cal-cell.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(95, 141, 107, .35); }
.cal-cell.today { border-color: var(--clay); }
.cal-cell.done { background: var(--accent-soft); border-color: var(--accent); }
.cal-day { font-weight: 700; font-size: 12px; }
.cal-dot { width: 9px; height: 9px; border-radius: 50%; }
.cal-cell.a-fin .cal-dot { background: #c97b5a; }
.cal-cell.a-rel .cal-dot { background: #d98aa8; }
.cal-cell.a-time .cal-dot { background: #5f8d6b; }
.cal-check { position: absolute; top: 5px; right: 7px; color: var(--accent); font-weight: 700; font-size: 12px; }
.cal-detail {
  border-top: 1px solid var(--line); padding: 16px 22px 22px; overflow-y: auto;
  background: var(--paper);
}
.cd-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.cd-no { font-size: 17px; font-weight: 700; }
.cd-week { color: var(--muted); font-size: 13.5px; }
.cd-todos { margin: 0 0 10px; }
.cd-custom-title { font-size: 13px; color: var(--clay); font-weight: 600; margin: 10px 0 6px; }
.cd-custom-title + .custom-list { margin-bottom: 6px; }

@media (max-width: 640px) {
  .cal-overlay { padding: 0; }
  .cal-inner { border-radius: 0; max-width: 100%; }
  .cal-grid { grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 14px; }
  .ma-k { flex-basis: 96px; }
  .ma-row { font-size: 13px; }
  .focus-pill { min-width: calc(50% - 5px); }
  .thirty-head { gap: 8px; }
  .cal-open-btn { font-size: 13px; padding: 9px 12px; }
}

/* ---------- 兑换码 / 解锁 ---------- */
.home-license { font-size: 13px; margin: 16px 0 0; padding: 8px 12px; border-radius: 10px; }
.home-license.free { color: #3f6349; background: var(--accent-soft); }
.home-license.ok { color: #3f6349; background: var(--accent-soft); }
.home-license.locked { color: #b3543f; background: var(--clay-soft); }
#codeInput {
  text-transform: uppercase; letter-spacing: 1px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
.unlock-status { font-size: 13px; color: var(--muted); margin: 10px 0 0; min-height: 16px; }
.unlock-buy { margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 12.5px; }

/* 获取兑换码引导（导流公众号） */
.unlock-buy-box {
  margin: 16px 0 0; padding: 14px 16px; border-radius: 12px;
  background: linear-gradient(135deg, #eef6f0, #f6efe6);
  border: 1px solid var(--line);
}
.unlock-buy-title { margin: 0 0 6px; font-size: 14px; font-weight: 800; color: var(--ink); }
.unlock-buy-main { margin: 0; font-size: 15px; line-height: 1.7; color: #3f6349; }
.unlock-buy-main b { color: var(--warn); }
.unlock-buy-sub { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }

/* 分享海报版本选择 */
.poster-choice { display: flex; gap: 12px; margin-top: 14px; }
.poster-opt {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 18px 12px; border-radius: 14px; cursor: pointer;
  background: var(--paper); border: 1.5px solid var(--line); text-align: center;
  transition: border-color .15s, transform .1s, box-shadow .15s;
}
.poster-opt:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.poster-opt-emoji { font-size: 30px; }
.poster-opt-t { font-size: 15px; font-weight: 800; color: var(--ink); }
.poster-opt-d { font-size: 12px; color: var(--muted); line-height: 1.5; }
@media (max-width: 520px) { .poster-choice { flex-direction: column; } }

/* 暖心文案 / 奥德赛锚点 / 结尾收束 */
.intro-quote { margin: 14px 0 0; padding: 12px 16px; background: var(--accent-soft); border-radius: 12px; font-size: 15px; color: #3f6349; line-height: 1.7; }
.od-caption { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: 1px; color: #fff; background: rgba(0,0,0,.18); padding: 4px 12px; border-radius: 999px; margin-bottom: 8px; }
.od-intro { margin: 4px 0 8px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.odyssey.a .od-caption { background: var(--accent); }
.odyssey.b .od-caption { background: #c97b5a; }
.odyssey.c .od-caption { background: #b06ab3; }
.od-closing { text-align: center; padding: 26px 22px; background: var(--paper); border-radius: 16px; }
.od-closing-text { font-size: 16px; line-height: 1.85; color: var(--ink); margin: 0 0 10px; }
.od-closing-text b { color: var(--accent); }
.od-closing-sub { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.7; }

/* ============ 版本选择 / 微调界面 ============ */
.primary-btn.small { padding: 9px 14px; font-size: 13.5px; }
.od-edit { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.od-edit .sel-pick { flex: 1 1 auto; }
.od-edit-box { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 10px; }
.od-edit-ta { width: 100%; min-height: 54px; font-size: 13.5px; }
.od-edit-box .sel-pick-edit { margin-top: 8px; width: 100%; }
.od-skip { text-align: center; }
.od-skip .ghost-btn { width: 100%; }
/* 已选定版本高亮 */
.odyssey.chosen { box-shadow: 0 0 0 3px var(--accent), var(--shadow); border-color: var(--accent); }
.odyssey.chosen .od-chosen-badge {
  display: inline-block; background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-bottom: 8px;
}
@media (max-width: 640px) {
  .od-edit .sel-pick { width: 100%; }
}
