:root {
  --ink: #232126;
  --muted: #6f6e70;
  --paper: #f7f1e8;
  --card: #fffcf7;
  --red: #d8352f;
  --line: #efeae2;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}

a { color: inherit; }

img { max-width: 100%; }

button, input { font: inherit; }

.shell {
  width: min(760px, calc(100% - 28px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(251, 246, 238, 0.94);
  border-bottom: 1px solid rgba(105, 76, 43, 0.08);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: var(--red);
  color: #fff;
  font-family: "Songti SC", serif;
  font-weight: 700;
}

.brand strong, .brand small { display: block; }
.brand small { color: #8a847c; font-size: 12px; }

.nav { display: flex; gap: 18px; }
.nav a { color: #4d4946; text-decoration: none; }
.nav a[aria-current="page"] { color: var(--red); font-weight: 700; }

.banner {
  height: 92px;
  margin-top: 18px;
  border-radius: 22px;
  background: #efe4d4 url("img/header-ink.jpg") center / cover no-repeat;
}

h1 {
  margin: 18px 0 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: 32px;
}

.lead { margin: 8px 0 0; color: var(--muted); }

.paper {
  background: var(--card);
  border: 1px solid #fff;
  border-radius: 22px;
  box-shadow: 0 8px 28px rgba(105, 76, 43, 0.08);
}

.calendar, .daily, .zodiac-brief, .entry, .year-bar, .month-card, .sign-panel, .sheet {
  margin-top: 14px;
}

.calendar { padding: 12px 12px 16px; }

.month-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 52px;
}

.month-controls input {
  border: 0;
  background: transparent;
  font-family: "Songti SC", serif;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
}

.month-end, .year-controls { display: flex; align-items: center; gap: 8px; }

.round, .today-btn {
  border: 0;
  cursor: pointer;
}

.round {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f6f2eb;
  font-size: 22px;
}

.today-btn {
  padding: 6px 12px;
  border-radius: 12px;
  background: #fbe8df;
  color: #b73830;
}

.week, .days { display: flex; flex-wrap: wrap; }
.week { border-bottom: 1px solid #efede7; }
.weekday, .day { width: 14.285%; text-align: center; }
.weekday { height: 36px; line-height: 36px; color: #666; }
.weekday.weekend, .day.weekend .day-num { color: #c92f2f; }

.day {
  height: 68px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
  color: inherit;
}

.day-num { display: block; font-family: "Songti SC", serif; font-size: 20px; font-weight: 700; }
.day-note { display: block; font-size: 12px; color: #8c8b88; white-space: nowrap; }
.day-note.solar { color: #298f64; }
.day-note.fest { color: #ce3830; }
.day.outside { opacity: 0.35; }
.day.selected { background: #d9362e; }
.day.selected .day-num,
.day.selected .day-note,
.day.selected.weekend .day-num { color: #fff; }

.daily, .sheet, .sign-panel, .month-card, .year-bar { padding: 18px 18px 20px; }
.date-title { display: flex; align-items: center; gap: 10px; }
.tag-now { padding: 2px 6px; border-radius: 6px; background: #c9332d; color: #fff; font-size: 12px; }
.date-number { font-family: "Songti SC", serif; font-size: 32px; color: #972521; font-weight: 700; }
.weekday-title { font-family: "Songti SC", serif; font-size: 18px; font-weight: 700; }
.minor { margin: 6px 0 12px; color: var(--muted); }
.daily-row { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; }
.type { flex: 0 0 44px; border-radius: 8px; text-align: center; font-size: 13px; line-height: 26px; }
.type.green { background: #e5f3e0; color: #368655; }
.type.fest { background: #fde8e4; color: #ce3830; }
.type.orange { background: #fff0d7; color: #c67b28; }

.zodiac-brief, .entry {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  text-decoration: none;
}

.zodiac-brief img, .sign-hero {
  width: 92px;
  height: 72px;
  object-fit: cover;
  border-radius: 14px;
}

.zodiac-brief p, .entry p { margin: 0; color: var(--muted); font-size: 14px; }
.zodiac-brief a, .entry b { margin-left: auto; color: var(--red); text-decoration: none; white-space: nowrap; }
.entry-icon { font-size: 28px; }

.star-banner {
  display: block;
  width: 100%;
  height: 140px;
  margin-top: 16px;
  object-fit: cover;
  border-radius: 18px;
}

.date-pick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 16px;
}

.date-pick input { border: 0; background: transparent; color: var(--red); }

.sign-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.zodiac-card {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: center;
  color: inherit;
}
.zodiac-card img { display: block; width: 100%; height: 92px; object-fit: cover; border-radius: 16px; }
.zodiac-card span { display: block; margin-top: 4px; font-size: 14px; }
.zodiac-card.picked img { box-shadow: 0 0 0 3px var(--red); }

.sign-panel h2, .month-card h2, .sheet h2 { margin: 12px 0 0; font-family: "Songti SC", serif; }
.sign-range { margin: 6px 0 0; font-size: 20px; font-weight: 700; }
.sign-element, .sheet p, .line { color: #3a3836; }
.line { display: flex; gap: 10px; }
.line span { flex: 0 0 42px; color: var(--red); }

.year-controls { justify-content: center; }
.year-controls strong { min-width: 120px; text-align: center; font-family: "Songti SC", serif; font-size: 28px; }

.event {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.badge { flex: 0 0 42px; border-radius: 8px; text-align: center; font-size: 12px; line-height: 24px; }
.badge.term { background: #e5f3e0; color: #368655; }
.badge.fest { background: #fde8e4; color: #ce3830; }
.event-main { display: grid; min-width: 0; }
.event-main small, .event-side small { color: var(--muted); }
.event-side { margin-left: auto; text-align: right; }
.event-side b { display: block; font-weight: 600; }
.event-side .today { color: var(--red); }
.event-side .future { color: #368655; }
.tip { margin: 14px 0 0; color: #8a847c; font-size: 13px; }

.note { margin-top: 10px; color: #8a847c; font-size: 13px; }

.site-footer {
  margin-top: 28px;
  padding: 28px 0 40px;
  border-top: 1px solid rgba(105, 76, 43, 0.12);
  color: #6f6256;
  text-align: center;
  font-size: 14px;
}
.site-footer p { margin: 0; }
.site-footer a { color: #8c4b24; }
.footer-links { display: flex; justify-content: center; gap: 16px; margin-top: 8px; }
.footer-links a { text-decoration: none; }

@media (max-width: 680px) {
  .header-inner { align-items: flex-start; flex-direction: column; padding: 12px 0; }
  .nav { flex-wrap: wrap; gap: 12px 16px; }
  h1 { font-size: 28px; }
  .day { height: 58px; }
  .day-num { font-size: 16px; }
}
