/* =========================================================
   万年历
   月历 / 干支 / 农历公历 / 宜忌 / 时辰吉凶
   ========================================================= */

.cal-top { display: flex; align-items: center; gap: 10px; padding: 22px 20px 8px; }
.cal-top .back-btn {
    font-size: 22px; color: var(--accent-gold); background: none; border: none;
    font-family: inherit; line-height: 1; padding: 0 4px 0 0; cursor: pointer;
}
.cal-top-title { flex: 1; font-size: 15px; font-weight: 700; letter-spacing: 2px; }
.cal-today {
    width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
    border: 1px solid var(--border-color); background: #FFFFFF;
    color: var(--accent-gold); font-family: inherit; font-size: 12px; font-weight: 600;
}

.cal-month-bar { display: flex; align-items: center; justify-content: space-between; padding: 4px 20px 14px; }
.cal-month-title { text-align: center; }
.cal-month-title h2 { font-size: 30px; font-weight: 700; letter-spacing: 4px; line-height: 1.1; }
.cal-month-title span { font-size: 11px; color: var(--text-light); letter-spacing: 1px; }
.cal-nav {
    width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
    border: 1px solid var(--border-color); background: #FFFFFF;
    color: var(--text-sub); font-family: inherit; font-size: 16px; line-height: 1;
}

.cal-grid {
    margin: 0 20px; background: #FFFFFF; border: 1px solid var(--border-color);
    border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm);
}
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--border-color); }
.cal-week span { text-align: center; font-size: 11px; color: var(--text-light); padding: 10px 0; }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell {
    height: 58px; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 2px; cursor: pointer;
    border-right: 1px solid #F3EFE7; border-bottom: 1px solid #F3EFE7;
}
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell:nth-last-child(-n+7) { border-bottom: none; }
.cal-cell .sol {
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 600; color: var(--text-main);
}
.cal-cell .lun { font-size: 9.5px; color: var(--text-light); line-height: 1; }
.cal-cell.other { opacity: 0.32; }
.cal-cell.today .sol { color: var(--accent-red); font-weight: 700; }
.cal-cell.sel .sol { background: var(--accent-red); color: #FFFFFF; }
.cal-cell.sel .lun { color: var(--accent-red); }
.cal-cell .lun.term { color: var(--accent-gold); }

.cal-info-card {
    margin: 16px 20px; padding: 18px; background: #FFFFFF;
    border: 1px solid var(--border-color); border-radius: 16px;
    box-shadow: var(--shadow-sm);
}
.cal-info-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cal-ganzhi { display: flex; gap: 18px; }
.cal-gz { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.cal-gz .gz-char {
    font-size: 20px; font-weight: 700; line-height: 1.15;
    font-family: 'STKaiti', 'KaiTi', 'Noto Serif SC', serif;
}
.cal-gz .gz-label { font-size: 9.5px; color: var(--text-light); }
.cal-time-big { text-align: right; font-size: 19px; color: var(--text-sub); line-height: 1.35; }
.cal-time-big small { display: block; font-size: 11px; color: var(--text-light); margin-top: 2px; }

.cal-info-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 14px; }
.cal-date-lines { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cal-date-lines div { font-size: 12px; color: var(--text-sub); line-height: 1.5; }
.cal-date-lines span { display: inline-block; width: 36px; color: var(--text-light); }
.cal-btn {
    flex-shrink: 0; border: 1px solid var(--accent-dark); background: #FFFFFF;
    color: var(--text-main); border-radius: 20px; padding: 9px 18px;
    font-family: inherit; font-size: 13px; cursor: pointer;
}

.cal-yiji {
    margin: 0 20px 12px; padding: 16px 18px; background: #FFFFFF;
    border: 1px solid var(--border-color); border-radius: 16px;
    box-shadow: var(--shadow-sm);
}
.yiji-row { display: flex; gap: 14px; padding: 8px 0; }
.yiji-row + .yiji-row { border-top: 1px solid #F7F4EE; }
.yiji-label { flex-shrink: 0; font-size: 13px; font-weight: 700; color: var(--text-main); }
.yiji-val { font-size: 12.5px; color: var(--text-sub); line-height: 1.85; }

.cal-link {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin: 0 20px 20px; padding: 14px; cursor: pointer;
    background: #FFFFFF; border: 1px solid var(--border-color); border-radius: 14px;
    font-size: 13px; color: var(--text-main);
}
.cal-link svg { width: 15px; height: 15px; color: var(--accent-gold); }

/* ---------- 月份选择 ---------- */
.month-year-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.month-year-row b { font-size: 16px; letter-spacing: 1px; }
.month-year-row button {
    width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
    border: 1px solid var(--border-color); background: #FFFFFF;
    font-family: inherit; font-size: 15px; color: var(--text-sub);
}
.month-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.month-btn {
    padding: 12px 0; border-radius: 12px; cursor: pointer;
    border: 1px solid var(--border-color); background: #FFFFFF;
    font-family: inherit; font-size: 13px; color: var(--text-sub);
}
.month-btn.active { border-color: var(--accent-gold); background: #FFFDF8; color: var(--text-main); font-weight: 700; }

/* ---------- 时辰吉凶 ---------- */
.shichen-list { max-height: 48vh; overflow-y: auto; margin-bottom: 14px; }
.sc-row {
    display: flex; align-items: center; gap: 8px;
    padding: 11px 10px; border-bottom: 1px solid #F5F2EC; font-size: 13px;
}
.sc-row:last-child { border-bottom: none; }
.sc-row.now { background: #FBF9F5; border-radius: 10px; }
.sc-name { width: 52px; font-weight: 600; color: var(--text-main); }
.sc-time { width: 82px; font-size: 11px; color: var(--text-light); }
.sc-god { flex: 1; font-size: 12px; color: var(--text-sub); }
.sc-row.huang .sc-god { color: var(--accent-green); }
.sc-row.hei .sc-god { color: var(--accent-red); }
.sc-tag {
    flex-shrink: 0; font-size: 10px; padding: 2px 7px; border-radius: 8px;
    border: 1px solid currentColor;
}
.sc-row.huang .sc-tag { color: var(--accent-green); }
.sc-row.hei .sc-tag { color: var(--accent-red); }
