:root {
  --green: #10b981;
  --green-dark: #059669;
  --green-deep: #047857;
  --teal: #0d9488;
  --bg: #f6f9f8;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --red: #dc2626;
  --amber: #d97706;
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 4px 12px rgba(5, 150, 105, .10), 0 16px 40px rgba(5, 150, 105, .12);
  --radius: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--text); min-height: 100vh;
  line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: var(--green-dark); text-decoration: none; }
img { max-width: 100%; }
.container { max-width: 960px; margin: 0 auto; padding: 16px; }

/* ===== 顶栏 ===== */
.topbar {
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50;
}
.topbar-inner {
  max-width: 960px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.brand { font-size: 18px; font-weight: 800; color: var(--green-deep); letter-spacing: .5px; }
.brand small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.nav a {
  padding: 7px 14px; border-radius: 10px; font-size: 14px; color: var(--text);
  transition: background .15s, color .15s;
}
.nav a.active, .nav a:hover { background: #d9f2e5; color: var(--green-deep); font-weight: 600; }
.nav .user-chip { color: var(--muted); font-size: 13px; padding: 0 6px; }

/* ===== 文本提示条（无弹窗） ===== */
.notice {
  display: none; margin: 12px 0; padding: 12px 16px; border-radius: 12px;
  font-size: 14px; line-height: 1.7; border: 1px solid var(--line); background: var(--card);
  box-shadow: var(--shadow);
}
.notice.show { display: block; animation: slideDown .25s ease; }
.notice.ok { border-color: #a7e3c8; background: #edfaf3; color: var(--green-deep); }
.notice.err { border-color: #f5c6c2; background: #fef2f1; color: var(--red); }
.notice.info { color: var(--text); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ===== 卡片与表单 ===== */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.card h2 { font-size: 18px; margin-bottom: 12px; font-weight: 800; }
.card h3 { font-size: 15px; margin-bottom: 10px; font-weight: 700; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.form-row input, .form-row select {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 15px; background: #fbfdfc; color: var(--text); transition: border-color .15s;
}
.form-row input:focus, .form-row select:focus { outline: none; border-color: var(--green); background: #fff; }
.btn {
  display: inline-block; padding: 11px 22px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, var(--green) 0%, var(--teal) 100%); color: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 14px rgba(16, 185, 129, .30);
  transition: transform .12s, box-shadow .12s, opacity .12s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(16, 185, 129, .38); }
.btn:active { transform: none; }
.btn:disabled { background: #b7c9c0; box-shadow: none; cursor: not-allowed; transform: none; }
.btn.ghost { background: #fff; color: var(--green-deep); border: 1.5px solid var(--green); box-shadow: none; }
.btn.ghost:hover { background: #edfaf3; }
.btn.small { padding: 7px 16px; font-size: 13px; }
.btn.block { width: 100%; }
.link-row { margin-top: 14px; font-size: 13px; color: var(--muted); }
.link-row a { margin: 0 4px; font-weight: 600; }

/* ===== 落地页 ===== */
.landing-hero {
  background:
    radial-gradient(1000px 420px at 85% -10%, rgba(13, 148, 136, .35), transparent 60%),
    radial-gradient(800px 400px at 10% 110%, rgba(16, 185, 129, .28), transparent 60%),
    linear-gradient(135deg, #065f46 0%, #059669 55%, #0d9488 100%);
  color: #fff; text-align: center; padding: 72px 16px 64px;
}
.landing-hero h1 { font-size: 40px; font-weight: 900; letter-spacing: 1px; margin-bottom: 14px; }
.landing-hero .sub {
  color: rgba(255, 255, 255, .88); font-size: 16px; line-height: 1.9;
  max-width: 620px; margin: 0 auto 22px;
}
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 30px; }
.chip {
  padding: 7px 16px; border-radius: 999px; font-size: 14px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25);
}
.chip b { font-weight: 700; }
.hero-cta .btn { font-size: 16px; padding: 13px 34px; }
.hero-cta .btn.plain {
  background: rgba(255, 255, 255, .14); border: 1.5px solid rgba(255, 255, 255, .55);
  box-shadow: none; margin-left: 10px;
}
.hero-cta .btn.plain:hover { background: rgba(255, 255, 255, .24); }
.chip.hl { background: rgba(255, 255, 255, .92); color: var(--brand-dark, #047857); border-color: transparent; }
.hero-highlight {
  display: flex; align-items: flex-start; gap: 14px; max-width: 560px;
  margin: 34px auto 0; padding: 16px 20px; text-align: left;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 14px; backdrop-filter: blur(4px);
}
.hero-highlight .hl-icon { font-size: 28px; line-height: 1.2; }
.hero-highlight .hl-text b { display: block; font-size: 15px; margin-bottom: 4px; }
.hero-highlight .hl-text p { margin: 0; font-size: 13px; line-height: 1.7; color: rgba(255, 255, 255, .85); }

.section { padding: 56px 0 8px; }
.section-title { text-align: center; font-size: 26px; font-weight: 900; margin-bottom: 6px; }
.section-sub { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 32px; }

.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.step-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 20px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.step-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px; font-weight: 900; font-size: 15px;
  background: linear-gradient(135deg, var(--green), var(--teal)); color: #fff; margin-bottom: 12px;
}
.step-card b { display: block; font-size: 16px; margin-bottom: 6px; }
.step-card p { font-size: 13px; color: var(--muted); line-height: 1.7; }

.cta-band {
  margin: 64px 0 0; padding: 56px 16px; text-align: center;
  background: linear-gradient(135deg, #065f46, #0d9488); color: #fff;
}
.cta-band h2 { font-size: 26px; font-weight: 900; margin-bottom: 10px; }
.cta-band p { color: rgba(255, 255, 255, .85); margin-bottom: 24px; }
.cta-band .btn { background: #fff; color: var(--green-deep); box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }

.site-footer {
  border-top: 1px solid var(--line); padding: 24px 16px; text-align: center;
  color: var(--muted); font-size: 13px; background: var(--card);
}

/* ===== 打卡项目卡片 ===== */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.p-card { display: flex; flex-direction: column; gap: 10px; margin-bottom: 0; }
.p-card .p-head { display: flex; align-items: center; gap: 12px; }
.p-card .p-icon { font-size: 32px; }
.p-card .p-name { font-weight: 800; font-size: 16px; }
.p-card .p-sub { font-size: 12px; color: var(--muted); }
.p-card .p-streak { font-size: 14px; color: var(--text); }
.p-card .p-streak b { color: var(--green-deep); font-size: 22px; }
.badge {
  display: inline-block; font-size: 11px; padding: 2px 9px; border-radius: 999px;
  background: #d9f2e5; color: var(--green-deep); margin-left: 6px; font-weight: 600;
}
.badge.gray { background: #eef1f0; color: var(--muted); }

/* ===== 选择列表 ===== */
.pick-row {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1.5px solid var(--line);
  border-radius: 12px; margin-bottom: 8px; cursor: pointer; background: #fbfdfc; transition: border-color .15s;
}
.pick-row:hover { border-color: var(--green); }
.pick-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--green); }
.pick-row .p-icon { font-size: 24px; }
.pick-row .p-name { font-weight: 700; }
.pick-row .p-target { font-size: 12px; color: var(--muted); }

/* ===== 图标选择 ===== */
.icon-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.icon-pick span {
  font-size: 22px; padding: 9px 11px; border: 1.5px solid var(--line); border-radius: 10px;
  cursor: pointer; background: #fbfdfc; transition: border-color .15s, background .15s;
}
.icon-pick span.sel { border-color: var(--green); background: #d9f2e5; }

/* ===== 日历 ===== */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-title { font-weight: 800; font-size: 16px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-grid .dow { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0; font-weight: 600; }
.cal-cell {
  aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 10px; font-size: 14px; background: #fbfdfc; border: 1px solid var(--line); position: relative;
}
.cal-cell.dim { opacity: .35; }
.cal-cell.done {
  background: linear-gradient(135deg, var(--green), var(--teal)); border-color: transparent;
  color: #fff; font-weight: 800;
}
.cal-cell.today { outline: 2px solid var(--amber); outline-offset: 1px; }

/* ===== 统计 ===== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.stat-item { display: flex; justify-content: space-between; font-size: 14px; padding: 7px 0; }
.stat-item b { color: var(--green-deep); }
.bar { height: 10px; background: #e3ece7; border-radius: 999px; overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--teal)); border-radius: 999px; transition: width .4s; }

/* ===== 记录列表 ===== */
.rec-dates { font-size: 13px; color: var(--muted); line-height: 1.8; margin-top: 6px; }
.empty { text-align: center; color: var(--muted); padding: 32px 0; font-size: 14px; }

/* ===== 海报 ===== */
#posterCanvas { max-width: 100%; border-radius: var(--radius); border: 1px solid var(--line); display: none; margin: 14px auto; box-shadow: var(--shadow-lg); }
#posterCanvas.show { display: block; }
.poster-wrap { text-align: center; }

.muted { color: var(--muted); font-size: 13px; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; }

@media (max-width: 640px) {
  .landing-hero h1 { font-size: 30px; }
  .landing-hero { padding: 52px 16px 48px; }
  .hero-highlight { flex-direction: column; gap: 8px; }
  .hero-cta .btn { display: block; width: 100%; margin-bottom: 10px; }
  .hero-cta .btn.plain { margin-left: 0; }
  .section { padding: 40px 0 4px; }
}
