/* ============================================================
   万年历 UI — 参考传统黄历设计 (红黄绿对比色)
   ============================================================ */
.wannianli-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}
.wnl-main {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  overflow: hidden;
  color: #2d1b0e;
  font-family: 'Noto Sans SC', sans-serif;
}

/* ---------- 顶部三栏: 宜 / 日期 / 忌 ---------- */
.wnl-top-row {
  display: grid;
  grid-template-columns: 200px 1fr 200px;
  border-bottom: 1px solid #e8d5b7;
  min-height: 240px;
}
.wnl-box { position: relative; padding: 16px 14px; }
.wnl-yi-box {
  background: #f5f2ec;
  border-right: 1px solid #e8d5b7;
}
.wnl-ji-box {
  background: #f5f2ec;
  border-left: 1px solid #e8d5b7;
}
.wnl-date-box {
  background: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 12px;
}
.wnl-box-head {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}
.wnl-head-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  font-family: 'Noto Serif SC', serif;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}
.wnl-head-yi .wnl-head-circle {
  background: linear-gradient(135deg, #43b05c 0%, #2d8a4e 100%);
}
.wnl-head-ji .wnl-head-circle {
  background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
}
.wnl-box-body {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  justify-content: center;
  padding: 0 4px;
  font-size: 14px;
  color: #5b4330;
}
.wnl-yiji-item {
  display: inline-block;
  padding: 2px 4px;
  font-weight: 500;
  color: #5b4330;
}
.wnl-yiji-item.wnl-yiji-ji { color: #8b0000; }
.wnl-yiji-empty { color: #9ca3af; font-size: 13px; }

/* ---------- 中心日期 ---------- */
.wnl-date-top {
  font-size: 15px;
  color: #6b4c3b;
  margin-bottom: 8px;
  font-weight: 500;
}
.wnl-date-big-row {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 4px 0 10px;
}
.wnl-nav-btn {
  width: 40px;
  height: 40px;
  border: 1px solid #d4a017;
  background: #fff;
  color: #8b0000;
  font-size: 26px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.wnl-nav-btn:hover {
  background: #fff6d5;
  transform: scale(1.05);
}
.wnl-date-big {
  font-size: 82px;
  font-weight: 800;
  color: #8b0000;
  font-family: 'Noto Serif SC', serif;
  line-height: 1;
}
.wnl-date-lunar {
  font-size: 17px;
  color: #2d1b0e;
  margin-bottom: 12px;
  font-weight: 500;
}
.wnl-date-gz {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 12px;
}
.wnl-gz-pill {
  background: #fbf6ea;
  border: 1px solid #e8d5b7;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: #6b4c3b;
  font-weight: 600;
}
/* 彭祖百忌: 推到卡片底部, 字体稍放大 */
.wnl-pengzu {
  font-size: 13px;
  color: #5b4330;
  background: #faf7f0;
  padding: 8px 14px;
  border-radius: 6px;
  margin: auto 12px 0;   /* margin-top: auto 把它推到底部 */
  border-left: 3px solid #d4a017;
  align-self: stretch;
}

/* ---------- 时辰栏 ---------- */
.wnl-shichen-block {
  width: 100%;
  padding: 6px 0 0;
  border-top: 1px dashed #e8d5b7;
  margin-top: 6px;
}
.wnl-sc-label {
  font-size: 11px;
  color: #8b0000;
  font-weight: 600;
  margin-bottom: 4px;
}
.wnl-sc-row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2px;
}
.wnl-sc-cell {
  padding: 4px 2px;
  border-radius: 4px;
  text-align: center;
  font-size: 10px;
  line-height: 1.2;
}
.wnl-sc-gz { font-weight: 700; color: #2d1b0e; }
.wnl-sc-tag { font-size: 9px; font-weight: 600; margin-top: 1px; }
.wnl-sc-ji { background: #e7f5ec; color: #2d8a4e; }
.wnl-sc-ji .wnl-sc-tag { color: #2d8a4e; }
.wnl-sc-xiong { background: #fbe7eb; color: #c41e3a; }
.wnl-sc-xiong .wnl-sc-tag { color: #c41e3a; }
.wnl-sc-neutral { background: #f5f2ec; color: #6b4c3b; }

/* ---------- 第二行: 胎神 + 五行 ---------- */
.wnl-second-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: #fbf6ea;
  border-bottom: 1px solid #e8d5b7;
}
.wnl-info-box {
  padding: 12px 18px;
  font-size: 15px;
  line-height: 1.7;
  color: #5b4330;
}
.wnl-info-box:first-child { border-right: 1px solid #e8d5b7; }
.wnl-info-label {
  color: #8b0000;
  font-weight: 700;
}

/* ---------- 第三行: 吉神/财神位/凶煞/冲煞 ---------- */
.wnl-third-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid #e8d5b7;
}
.wnl-info-card {
  padding: 14px 16px;
  border-right: 1px solid #e8d5b7;
}
.wnl-info-card:last-child { border-right: none; }
.wnl-info-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #8b0000;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e8d5b7;
}
.wnl-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
/* chip 保持紧凑, 略放大但仍小巧 */
.wnl-chip {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
}
.wnl-chip-good { background: #d1fae5; color: #065f46; border: 1px solid #4ade80; }
.wnl-chip-bad { background: #fee2e2; color: #991b1b; border: 1px solid #f87171; }
.wnl-chip-neutral { background: #f3f4f6; color: #6b7280; }
.wnl-pos-list, .wnl-chong-wrap {
  font-size: 14px;
  line-height: 1.95;
  color: #5b4330;
}
.wnl-pos-label {
  font-weight: 600;
  color: #6b4c3b;
  display: inline-block;
  min-width: 64px;
}

/* ---------- 月历 ---------- */
.wnl-cal-wrap {
  padding: 16px 14px;
  background: #faf7f0;
}
.wnl-cal-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
  padding: 6px 4px;
}
.wnl-cal-select {
  padding: 6px 10px;
  border: 1px solid #d4a017;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  color: #2d1b0e;
}
.wnl-cal-today {
  padding: 6px 16px;
  border: 1px solid #8b0000;
  background: #fff;
  color: #8b0000;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
}
.wnl-cal-today:hover { background: #8b0000; color: #fff; }

.wnl-cal-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
.wnl-cal-table th {
  background: #8b0000;
  color: #fff;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  border: none;
}
.wnl-cal-table th.wnl-cal-weekend {
  background: #6b0000;
}
.wnl-cal-cell {
  position: relative;
  height: 68px;
  vertical-align: top;
  padding: 6px 4px 4px;
  border: 1px solid #f0e6d6;
  cursor: pointer;
  transition: background 0.15s;
  text-align: center;
}
.wnl-cal-cell:hover {
  background: #fbf6ea;
}
.wnl-cal-cell.wnl-cal-outside {
  color: #c4b5a0;
}
.wnl-cal-cell.wnl-cal-outside .wnl-cal-day { color: #c4b5a0; }
.wnl-cal-cell.wnl-cal-today-cell {
  background: #fff4dc;
}
.wnl-cal-cell.wnl-cal-selected {
  box-shadow: inset 0 0 0 2px #c41e3a;
  background: #fff;
}
.wnl-cal-day {
  font-size: 22px;
  font-weight: 700;
  color: #2d1b0e;
  line-height: 1.1;
}
.wnl-cal-lunar {
  font-size: 11px;
  color: #8b7250;
  margin-top: 2px;
}
.wnl-cal-lunar.wnl-cell-jieqi {
  color: #2d8a4e;
  font-weight: 600;
}
.wnl-cal-lunar.wnl-cell-fest {
  color: #c41e3a;
  font-weight: 600;
}
.wnl-cal-lunar.wnl-cell-lfest {
  color: #d4a017;
  font-weight: 600;
}
.wnl-cal-lunar.wnl-cell-month1 {
  color: #8b0000;
  font-weight: 700;
}
.wnl-cal-today-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  background: #d4a017;
  color: #fff;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
}

/* ---------- 手机端 ---------- */
@media (max-width: 768px) {
  .wnl-top-row {
    grid-template-columns: 1fr;
  }
  .wnl-yi-box, .wnl-ji-box {
    border: none;
    border-top: 1px solid #e8d5b7;
  }
  .wnl-date-box { padding: 12px 8px; }
  .wnl-date-big { font-size: 54px; }
  .wnl-second-row, .wnl-third-row {
    grid-template-columns: 1fr;
  }
  .wnl-info-box:first-child, .wnl-info-card {
    border-right: none;
    border-bottom: 1px solid #e8d5b7;
  }
  .wnl-cal-cell { height: 58px; padding: 4px 2px; }
  .wnl-cal-day { font-size: 18px; }
  .wnl-cal-lunar { font-size: 10px; }
  .wnl-sc-row { grid-template-columns: repeat(6, 1fr); }
}
