/* 时序 · 中华万年历 Web 版
   设计基准 750rpx / 375px 视口，与小程序端 1:1 对齐 */
:root {
  --bg: #F2EDE1;
  --card: #FBF8F0;
  --ink: #241E18;
  --ink-2: #6F6459;
  --ink-3: #8C8072;
  --line: #DED4C0;
  --line-2: #EDE6D6;
  --red: #A6362B;
  --red-deep: #8A342A;
  --red-bg: #F2E3DC;
  --gold: #8B6F47;
  --chip: #E9E1D0;
  --dark: #4E473E;
  --dim: #B5A992;
  --future: #F3F0E8;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --shadow: 0 2px 8px rgba(36, 30, 24, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  font-family: var(--serif);
  color: var(--ink);
  background: var(--bg);
  background-image: radial-gradient(circle at 20% 8%, rgba(255,255,255,.5), transparent 40%);
  font-size: 14px;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ===== 通用件 ===== */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.sans { font-family: var(--sans); }

.seal {
  background: var(--red);
  border-radius: 5px;
  color: #FBF8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  flex-shrink: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 7px;
  border-radius: 4px;
  background: var(--chip);
  font-size: 12px;
  color: var(--ink);
}
.tag-red { background: var(--red-bg); color: var(--red-deep); }
.tag-gray { background: #E7E2D8; color: var(--dark); }
.tag-gold { background: #EFE4D2; color: var(--gold); }

.btn-primary {
  background: var(--red);
  color: #FBF8F0;
  border: none;
  border-radius: 6px;
  height: 44px;
  line-height: 44px;
  text-align: center;
  font-size: 15px;
  font-family: var(--serif);
  cursor: pointer;
  display: block;
  width: 100%;
}
.btn-ghost {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 6px;
  height: 44px;
  line-height: 42px;
  text-align: center;
  font-size: 15px;
  font-family: var(--serif);
  cursor: pointer;
  display: block;
  width: 100%;
}
.btn-primary:active, .btn-ghost:active { opacity: .82; }

.divider { height: 1px; background: var(--line-2); }
.red { color: var(--red); }
.gold { color: var(--gold); }
.muted { color: var(--ink-3); }

.label-title {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 1px;
  display: block;
}

/* ===== 页面容器 ===== */
.page {
  flex: 1;
  padding: 16px 16px 130px;
  width: 100%;
}

/* 公告 */
.announce {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  margin-bottom: 12px;
  border-radius: 9px;
  background: var(--red-bg);
  border: 1px solid #E8CFC5;
}
.announce-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); flex-shrink: 0; }
.announce-text {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--red-deep);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 子页头部（web 端模拟小程序导航栏） */
.sub-head {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  margin-bottom: 12px;
}
.sub-back {
  width: 30px; height: 30px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--ink);
  cursor: pointer; flex-shrink: 0;
}
.sub-title { font-size: 17px; }

/* ===== 今日 ===== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.brand { display: flex; align-items: center; }
.brand-seal { width: 30px; height: 30px; font-size: 16px; margin-right: 9px; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-size: 17px; letter-spacing: 1px; }
.brand-sub { font-size: 11px; color: var(--ink-3); letter-spacing: 1.5px; font-family: var(--sans); }
.share-btn {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 15px;
  font-size: 12px;
  font-family: var(--sans);
  color: var(--ink);
  padding: 0 12px;
  height: 28px;
  cursor: pointer;
}

.hero {
  display: flex;
  align-items: center;
  padding: 5px 0 12px;
}
.hero-day {
  font-size: 100px;
  line-height: 100px;
  letter-spacing: -4px;
  margin-right: 12px;
}
.hero-meta { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.hero-lunar { display: flex; align-items: baseline; }
.lunar-month { font-size: 28px; color: var(--red); margin-right: 6px; }
.lunar-day { font-size: 15px; }
.hero-sub { font-size: 12px; color: var(--ink-3); font-family: var(--sans); margin-top: 4px; }

.checkin-entry {
  display: inline-flex;
  align-items: center;
  padding: 7px 9px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  cursor: pointer;
  flex-shrink: 0;
}
.checkin-entry.checked { background: var(--red-bg); border-color: #E3CFBE; }
.checkin-tick {
  width: 14px; height: 14px; line-height: 14px; text-align: center;
  font-size: 12px; color: var(--red); margin-right: 4px;
}
.checkin-text { font-size: 11px; color: var(--red-deep); font-family: var(--sans); white-space: nowrap; }

.ganzhi-row { display: flex; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.gz-pill {
  background: var(--chip);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 13px;
  margin-right: 6px;
  white-space: nowrap;
}
.gz-chong { font-size: 12px; color: var(--ink-3); font-family: var(--sans); margin-left: auto; }

.jieqi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.jieqi-left { display: flex; align-items: center; }
.jieqi-name { font-size: 22px; margin-right: 8px; }
.jieqi-next { font-size: 12px; color: var(--ink-3); font-family: var(--sans); }
.progress-track {
  height: 4px;
  background: #E7DEC9;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 9px;
}
.progress-fill { height: 4px; background: var(--red); border-radius: 2px; transition: width .4s; }
.jieqi-hou { font-size: 12px; color: var(--ink-2); line-height: 20px; }

.yiji-row { display: flex; margin-bottom: 12px; }
.yi-card, .ji-card { flex: 1; padding: 12px; }
.yi-card { margin-right: 10px; }
.yiji-head { display: flex; align-items: center; margin-bottom: 9px; }
.mark { width: 3px; height: 17px; border-radius: 1.5px; margin-right: 8px; }
.mark-yi { background: var(--red); }
.mark-ji { background: #3E3833; }
.yiji-title { font-size: 20px; color: var(--red); }
.ji-title { color: #3E3833; }
.word-wrap { display: flex; flex-wrap: wrap; }
.word { margin: 0 6px 6px 0; font-size: 13px; }

.poem-card { padding: 14px; }
.poem-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.poem-label { font-size: 11px; color: var(--gold); letter-spacing: 2px; font-family: var(--sans); }
.poem-ops { display: flex; }
.poem-op { font-size: 11px; color: var(--red-deep); margin-left: 12px; cursor: pointer; font-family: var(--sans); }
.poem-seal { width: 22px; height: 22px; font-size: 11px; line-height: 11px; text-align: center; }
.poem-line { font-size: 17px; line-height: 28px; }
.poem-from { font-size: 11px; color: var(--ink-3); font-family: var(--sans); text-align: right; margin-top: 6px; }
.poem-note {
  font-size: 12px; color: var(--ink-2); line-height: 20px;
  margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-2);
}

.poster-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--red);
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 4px;
  cursor: pointer;
}
.poster-entry-text { font-size: 15px; color: #FBF8F0; }
.poster-entry-arrow { font-size: 18px; color: #FBF8F0; }

/* ===== 黄历 ===== */
.date-card { display: flex; align-items: center; padding: 12px; }
.date-num { font-size: 48px; line-height: 50px; margin-right: 12px; }
.date-meta { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.date-line { font-size: 12px; color: var(--ink-3); line-height: 18px; font-family: var(--sans); }
.date-strong { font-size: 16px; line-height: 22px; margin: 2px 0; }
.luck-seal { width: 28px; height: 28px; font-size: 15px; }

.table-card { padding: 0; }
.table-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-2);
}
.table-row:last-child { border-bottom: none; }
.row-label { font-size: 12px; color: var(--ink-3); font-family: var(--sans); }
.row-value { font-size: 14px; text-align: right; }

.hour-card { padding: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card-title { font-size: 15px; }
.card-sub { font-size: 11px; color: var(--ink-3); font-family: var(--sans); }
.hour-row { display: flex; }
.hour-item {
  flex: 1;
  background: var(--red-bg);
  border-radius: 8px;
  padding: 8px 4px;
  margin-right: 8px;
  display: flex; flex-direction: column; align-items: center;
}
.hour-item:last-child { margin-right: 0; }
.hour-name { font-size: 15px; color: var(--red-deep); margin-bottom: 3px; }
.hour-range { font-size: 10px; color: var(--ink-3); font-family: var(--sans); }

.pengzu-card { padding: 12px; }
.pengzu-text { font-size: 14px; line-height: 22px; margin: 6px 0 10px; }
.shen-row { display: flex; align-items: center; margin-top: 8px; }
.shen-label { font-size: 12px; color: var(--ink-3); font-family: var(--sans); width: 70px; flex-shrink: 0; }
.shen-value { font-size: 13px; flex: 1; }
.shen-value.red { color: var(--red); }
.shen-value.dark { color: var(--dark); }

.action-row { display: flex; align-items: center; }
.action-row .btn-primary { flex: 1; width: auto; margin-right: 10px; }
.action-row .btn-ghost { flex: 1; width: auto; }
.action-row .btn-primary:last-child { margin-right: 0; }
.poster-btn { margin-right: 10px; }
.save-btn {
  width: 44px; height: 44px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
.save-text { font-size: 16px; }

/* ===== 诗历 ===== */
.hero-banner {
  position: relative;
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
  background: linear-gradient(160deg, #8C9A94 0%, #6F7C78 38%, #4E544F 72%, #3B403C 100%);
}
.hero-img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-mask {
  position: absolute; left: 0; right: 0; bottom: 0; height: 62%;
  background: linear-gradient(to bottom, rgba(36,30,24,0) 0%, rgba(36,30,24,.55) 60%, rgba(36,30,24,.82) 100%);
}
.hero-ink {
  position: absolute; left: -30px; top: -20px; width: 210px; height: 130px;
  background: radial-gradient(circle at 60% 40%, rgba(251,248,240,.35), rgba(251,248,240,0) 65%);
}
.hero-content {
  position: absolute; left: 18px; bottom: 18px; right: 60px;
  display: flex; flex-direction: column;
}
.hero-jieqi {
  font-size: 44px; line-height: 48px; color: #FBF8F0; letter-spacing: 3px;
  text-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.hero-sub2 { font-size: 11px; color: #EFE7D6; font-family: var(--sans); margin-top: 4px; }
.hero-seal { position: absolute; right: 16px; top: 16px; width: 32px; height: 32px; font-size: 15px; }

.custom-card { padding: 14px; }
.custom-item { display: flex; align-items: center; margin-top: 10px; }
.custom-mark { width: 3px; height: 30px; border-radius: 1.5px; background: var(--red); margin-right: 10px; flex-shrink: 0; }
.custom-text { flex: 1; }
.custom-title { font-size: 14px; margin-bottom: 2px; }
.custom-desc { font-size: 11px; color: var(--ink-3); line-height: 17px; font-family: var(--sans); }

.hou-card { padding: 14px; }
.hou-text { font-size: 13px; color: var(--ink-2); line-height: 22px; margin-top: 6px; }

/* ===== 我的 ===== */
.user-card { display: flex; align-items: center; padding: 13px; }
.avatar { width: 48px; height: 48px; border-radius: 24px; font-size: 20px; margin-right: 12px; }
.user-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.user-name { font-size: 16px; margin-bottom: 3px; }
.user-note { font-size: 11px; color: var(--ink-3); font-family: var(--sans); }
.edit-btn {
  font-size: 11px; color: var(--ink-3); font-family: var(--sans);
  border: 1px solid var(--line); border-radius: 12px; padding: 4px 10px;
  background: none; cursor: pointer;
}

.check-card { padding: 14px; }
.check-head { display: flex; align-items: center; justify-content: space-between; }
.check-title-wrap { display: flex; flex-direction: column; }
.check-title { font-size: 17px; }
.check-sub { font-size: 11px; color: var(--ink-3); font-family: var(--sans); margin-top: 2px; }
.status-tag { background: #E7E2D8; border-radius: 12px; padding: 5px 9px; }
.status-tag.status-on { background: var(--red-bg); }
.status-text { font-size: 11px; color: var(--dark); font-family: var(--sans); }
.status-on .status-text { color: var(--red-deep); }

.stat-row { display: flex; align-items: center; margin: 14px 0; }
.stat-item { flex: 1; display: flex; flex-direction: column; align-items: center; }
.stat-num { font-size: 24px; line-height: 28px; }
.stat-label { font-size: 11px; color: var(--ink-3); font-family: var(--sans); margin-top: 2px; }
.stat-line { width: 1px; height: 26px; background: #E7DFCD; }

.week-row { display: flex; }
.week-col { flex: 1; display: flex; flex-direction: column; align-items: center; }
.week-label { font-size: 11px; color: var(--ink-3); margin-bottom: 5px; }
.week-label-today { color: var(--red); }
.week-box {
  width: 34px; height: 34px; border-radius: 10px;
  background: #EDE6D6;
  display: flex; align-items: center; justify-content: center;
  cursor: default;
}
.box-done { background: var(--red); }
.box-today { background: var(--red-bg); border: 1px solid var(--red); }
.box-future { background: var(--future); }
.week-tick { color: var(--red); font-size: 16px; }
.box-done .week-tick { color: #FBF8F0; }

.check-foot { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 10px; }
.foot-hint { font-size: 11px; color: var(--ink-3); font-family: var(--sans); flex: 1; }
.foot-btn {
  font-size: 12px; color: var(--ink); font-family: var(--sans);
  border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px;
  background: var(--card); cursor: pointer;
}
.checkin-btn { margin-top: 2px; }
.checkin-done { background: #8C8072; }

.task-card { padding: 13px; }
.task-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.task-title { font-size: 15px; }
.task-progress { font-size: 11px; color: var(--red-deep); font-family: var(--sans); }
.task-item {
  display: flex; align-items: center;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px; margin-bottom: 8px; cursor: pointer;
}
.task-item:last-child { margin-bottom: 0; }
.task-done { background: #F3EEE2; border-color: #E4DBC8; }
.task-circle {
  width: 20px; height: 20px; border-radius: 10px;
  border: 1px solid #B5A992; background: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  margin-right: 10px; flex-shrink: 0;
}
.circle-done { background: var(--red); border-color: var(--red); }
.task-tick { color: #FBF8F0; font-size: 12px; }
.task-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.task-name { font-size: 14px; margin-bottom: 2px; }
.task-desc { font-size: 10px; color: var(--ink-3); font-family: var(--sans); }
.task-done .task-name { color: #A89B86; }
.task-done .task-desc { color: var(--dim); }

.seal-card { padding: 13px; }
.seal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.seal-count { font-size: 11px; color: var(--ink-3); font-family: var(--sans); }
.seal-grid { display: flex; flex-wrap: wrap; }
.seal-item {
  width: 42px; height: 42px; border-radius: 7px;
  margin: 0 7px 7px 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.seal-item:nth-child(6n) { margin-right: 0; }
.seal-on { background: var(--red); color: #FBF8F0; }
.seal-off { background: #EDE6D6; color: var(--dim); }

.poster-card { padding: 13px; }
.poster-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.poster-title { font-size: 14px; }
.poster-op { font-size: 11px; color: var(--red-deep); font-family: var(--sans); cursor: pointer; }
.poster-preview {
  display: flex; align-items: center;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px; margin-bottom: 10px;
}
.poster-left { margin-right: 12px; }
.poster-day { font-size: 20px; }
.poster-right { flex: 1; }
.poster-poem { font-size: 12px; line-height: 20px; }

.feature-card { padding: 0; }
.feature-item {
  display: flex; align-items: center; padding: 10px 12px; cursor: pointer;
}
.feature-item + .feature-item { border-top: 1px solid var(--line-2); }
.feature-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--bg); color: var(--ink-2);
  font-size: 15px; display: flex; align-items: center; justify-content: center;
  margin-right: 12px; flex-shrink: 0;
}
.icon-red { background: var(--red-bg); color: var(--red); }
.feature-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.feature-name { font-size: 14px; margin-bottom: 2px; }
.feature-desc { font-size: 10px; color: var(--ink-3); font-family: var(--sans); }
.feature-arrow { font-size: 17px; color: var(--dim); }

/* ===== 打卡日历（子页） ===== */
.calendar-card { padding: 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-title { font-size: 16px; }
.cal-nav {
  width: 30px; height: 30px; line-height: 28px; text-align: center;
  font-size: 18px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 15px; cursor: pointer;
}
.nav-off { color: var(--dim); }
.week-labels { display: flex; margin-bottom: 6px; }
.week-labels .week-label { flex: 1; text-align: center; font-size: 11px; color: var(--ink-3); }
.grid { display: flex; flex-wrap: wrap; }
.cell {
  width: 14.28%; height: 44px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer;
}
.cell-empty { cursor: default; }
.cell-day { font-size: 13px; }
.cell-tick { font-size: 9px; color: var(--red); margin-top: 1px; }
.cell-done { background: var(--red-bg); border-radius: 8px; }
.cal-tip { font-size: 11px; color: var(--ink-3); font-family: var(--sans); text-align: center; margin-top: 10px; }
.stat-card { display: flex; align-items: center; padding: 16px 12px; }

/* ===== 海报（子页） ===== */
.canvas-wrap { display: flex; justify-content: center; margin-bottom: 16px; }
.poster-canvas {
  width: 100%; max-width: 300px; height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(36, 30, 24, .12);
  display: block;
}
.tip { font-size: 12px; color: var(--ink-3); font-family: var(--sans); text-align: center; margin-bottom: 12px; }

/* ===== 底部导航 ===== */
.tabbar-wrap {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgba(242,237,225,0), rgba(242,237,225,.96) 40%);
  z-index: 99;
}
.tabbar-pill {
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 36px;
  padding: 4px;
  box-shadow: var(--shadow);
}
.tab {
  flex: 1;
  height: 54px;
  border-radius: 26px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer;
}
.tab-icon {
  width: 20px; height: 20px; line-height: 20px; text-align: center;
  border-radius: 5px; font-size: 13px; color: var(--ink-2);
  font-family: var(--serif);
}
.tab-label { margin-top: 2px; font-size: 11px; color: var(--ink-3); font-family: var(--sans); }
.tab-on { background: var(--red); }
.tab-icon-on { color: #FBF8F0; background: rgba(251,248,240,.16); }
.tab-on .tab-label { color: #FBF8F0; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 140px; transform: translateX(-50%) translateY(10px);
  background: rgba(36,30,24,.88); color: #FBF8F0;
  font-family: var(--sans); font-size: 13px;
  padding: 9px 18px; border-radius: 20px;
  opacity: 0; pointer-events: none;
  transition: all .25s; z-index: 999;
  max-width: 80%;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 页脚（后台配置：备案号 / 版权） */
.site-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 20px 36px;
  text-align: center;
  font-family: var(--sans);
  font-size: 11px;
  color: #8C8072;
  line-height: 18px;
}
