.wannianli-panel {
  padding: 24px;
}

.calendar-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(300px, 360px);
  gap: 20px;
}

.calendar-main,
.calendar-side {
  border: 1px solid #dce5f1;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  padding: 20px;
}

.calendar-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.calendar-selects {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #d8e4f2;
  border-radius: 16px;
  background: #f6fbff;
}

.calendar-selects select {
  min-width: 88px;
  padding: 8px 10px;
  border: 1px solid #c9d9ea;
  border-radius: 12px;
  background: #ffffff;
  color: #183252;
  font: inherit;
}

.calendar-nav,
.calendar-secondary,
.calendar-ghost {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.calendar-nav {
  background: linear-gradient(135deg, #8f2ab1 0%, #e03e6f 100%);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(176, 40, 144, 0.16);
}

.calendar-secondary {
  margin-left: auto;
  background: #eef5ff;
  color: #26466d;
}

.calendar-ghost {
  background: #fff4d7;
  color: #8a5700;
}

.calendar-nav:hover,
.calendar-secondary:hover,
.calendar-ghost:hover,
.calendar-day:hover {
  transform: translateY(-1px);
}

.calendar-tip {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #eef5ff;
  color: #31537d;
}

.calendar-tip.is-error {
  background: #fff1f2;
  color: #b42318;
}

.calendar-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  border: 1px solid #e3eaf5;
  border-radius: 22px;
  overflow: hidden;
  background: #ffffff;
}

.calendar-weekday,
.calendar-day {
  min-width: 0;
  border-right: 1px solid #e3eaf5;
  border-bottom: 1px solid #e3eaf5;
}

.calendar-weekday:nth-child(7n),
.calendar-day:nth-child(7n) {
  border-right: 0;
}

.calendar-weekday {
  min-height: 48px;
  display: grid;
  place-items: center;
  background: #faf6ff;
  color: #4b2f59;
  font-weight: 700;
}

.calendar-day {
  position: relative;
  min-height: 108px;
  padding: 12px 10px 10px;
  background: #ffffff;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.calendar-day.is-other {
  background: #f9fbff;
  color: #9ca8ba;
}

.calendar-day.is-selected {
  background: #fff7e8;
  box-shadow: inset 0 0 0 2px #f9b02e;
}

.calendar-day.is-today {
  background: #ffac13;
  color: #ffffff;
}

.calendar-day.is-today .lunar,
.calendar-day.is-today .mark {
  color: rgba(255, 255, 255, 0.88);
}

.calendar-day.is-rest::after,
.calendar-day.is-work::after {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
}

.calendar-day.is-rest::after {
  content: "休";
  background: #dff6df;
  color: #247a39;
}

.calendar-day.is-work::after {
  content: "班";
  background: #ffe7e0;
  color: #b03e23;
}

.calendar-day strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
}

.calendar-day .lunar {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: #5d6781;
}

.calendar-day .mark {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.4;
  color: #8a2c7b;
}

.calendar-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.calendar-side-head h2,
.calendar-note-panel h2 {
  margin: 0;
  font-size: 20px;
  color: #142e4c;
}

.calendar-day-card {
  margin-top: 16px;
  padding: 22px 20px;
  border-radius: 22px;
  text-align: center;
  background: linear-gradient(135deg, #ff5f82 0%, #ffa115 100%);
  color: #ffffff;
}

.calendar-day-card strong {
  display: block;
  margin: 12px 0;
  font-size: 64px;
  line-height: 1;
}

.solar-line,
.lunar-line {
  display: block;
  line-height: 1.7;
}

.detail-tags,
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-tags {
  margin-top: 14px;
}

.detail-tags span,
.pill-list span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2f527b;
  font-size: 12px;
}

.pill-list.danger span {
  background: #fff0f2;
  color: #c2415d;
}

.detail-list {
  margin: 16px 0 0;
  display: grid;
  gap: 10px;
}

.detail-list div {
  padding: 12px 14px;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px solid #e0e9f5;
}

.detail-list dt {
  color: #69809f;
  font-size: 12px;
}

.detail-list dd {
  margin: 6px 0 0;
  color: #183252;
  font-size: 14px;
  line-height: 1.7;
  word-break: break-word;
}

.yiji-block {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.yiji-block article {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid #e0e9f5;
  background: #ffffff;
}

.yiji-block h3 {
  margin: 0 0 10px;
  font-size: 16px;
  color: #183252;
}

.calendar-note-panel .tool-note-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: #1b6072;
  line-height: 1.85;
}

@media (max-width: 1180px) {
  .calendar-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .wannianli-panel {
    padding: 16px;
  }

  .calendar-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .calendar-secondary {
    margin-left: 0;
  }

  .calendar-grid {
    border-radius: 18px;
  }

  .calendar-day {
    min-height: 92px;
    padding: 10px 8px 8px;
  }

  .calendar-day strong {
    font-size: 20px;
  }
}
