/* ========== Calendar v2 — 卡片式 · 无角标 ========== */
.calendar-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    font-family: var(--font-sans);
    color: #3D3530;
    user-select: none;
}

/* ---------- 标题区 ---------- */
.cal2-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 2px 14px;
    border-bottom: 1px solid #EBE5DD;
    margin-bottom: 12px;
}
.cal2-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.cal2-title-month {
    font-size: 22px;
    font-weight: 700;
    color: #2D2926;
    letter-spacing: 0.04em;
    line-height: 1;
}
.cal2-title-year {
    font-size: 13px;
    color: #A39888;
    font-weight: 500;
    letter-spacing: 0.06em;
    line-height: 1;
}
.cal2-nav {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #6E645A;
    font-size: 22px;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 180ms, color 180ms;
    line-height: 1;
}
.cal2-nav:hover {
    background: rgba(224, 122, 60, 0.08);
    color: #E07A3C;
}
.cal2-nav:active { transform: scale(0.92); }

/* ---------- 星期行 ---------- */
.cal2-weekrow {
    display: grid;
    /* minmax(0,1fr)：1fr 的最小值是 auto，会被单元格内的"国庆节"等
       不换行文字撑宽，导致第 7 列溢出被裁切。必须显式给 0 下限。 */
    grid-template-columns: repeat(7, minmax(0, 1fr));
    text-align: center;
    margin-bottom: 8px;
    padding-bottom: 4px;
    min-width: 0;
}
.cal2-weekrow span {
    font-size: 11px;
    color: #8F8478;
    font-weight: 600;
    padding: 4px 0;
    letter-spacing: 0.04em;
}
.cal2-weekrow .cal2-wk-weekend {
    color: #C4726E;
}

/* ---------- 日期网格 ---------- */
.cal2-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    flex: 1;
    align-content: start;
    min-width: 0;
}

/* ---------- 日期单元 ---------- */
.cal2-cell {
    aspect-ratio: 1 / 1.15;
    min-width: 0;
    border-radius: 10px;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 180ms ease, transform 180ms ease;
    position: relative;
    padding: 6px 0 8px;
}
.cal2-cell:hover {
    background: rgba(224, 122, 60, 0.07);
}
.cal2-cell:active { transform: scale(0.96); }

/* 上月/下月日期 */
.cal2-cell.is-other-month {
    opacity: 0.28;
    pointer-events: none;
}
.cal2-cell.is-other-month .cal2-day { color: #B0A599; font-weight: 400; }
.cal2-cell.is-other-month .cal2-info { display: none; }

/* ---------- 数字行 ---------- */
.cal2-day {
    font-size: 16px;
    font-weight: 500;
    color: #3D3530;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    transition: color 180ms ease;
}
.cal2-cell.is-weekend:not(.is-today):not(.is-selected):not(.is-festive) .cal2-day {
    color: #A66E47;
}

/* ---------- 信息行 ---------- */
.cal2-info {
    font-size: 10px;
    color: #9C8E80;
    line-height: 1.2;
    margin-top: 5px;
    letter-spacing: 0.02em;
    max-width: 92%;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 180ms ease;
}

/* 调休「班」徽章 */
.cal2-info-workday {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(124, 138, 168, 0.14);
    color: #5C6B7A;
    font-weight: 600;
    font-size: 10px;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

/* 节日 */
.cal2-cell.is-festive .cal2-day,
.cal2-cell.is-festive .cal2-info {
    color: #C84A3A;
    font-weight: 600;
}

/* ---------- 今天 ---------- */
.cal2-cell.is-today .cal2-day {
    color: #E07A3C;
    font-weight: 700;
}
.cal2-cell.is-today {
    box-shadow: inset 0 0 0 1.5px #E07A3C;
    background: rgba(224, 122, 60, 0.05);
}
.cal2-cell.is-today .cal2-info { color: #C8845C; }

/* ---------- 选中 ---------- */
.cal2-cell.is-selected {
    background: #E07A3C;
}
.cal2-cell.is-selected .cal2-day {
    color: #FFFFFF;
    font-weight: 700;
}
.cal2-cell.is-selected .cal2-info {
    color: rgba(255, 255, 255, 0.92);
}
.cal2-cell.is-selected.is-festive .cal2-day,
.cal2-cell.is-selected.is-festive .cal2-info {
    color: #FFFFFF;
}
.cal2-cell.is-selected.is-today {
    box-shadow: none;
    background: #E07A3C;
}
.cal2-cell.is-selected .cal2-info-workday {
    background: rgba(255, 255, 255, 0.22);
    color: #FFFFFF;
}

/* ---------- 写过日记的标记（右下角小点） ---------- */
.cal2-cell.has-journal::after {
    content: '';
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #7A5C3E;
    transition: background 180ms ease;
}
.cal2-cell.has-journal.is-today:not(.is-selected)::after {
    background: #E07A3C;
}
.cal2-cell.has-journal.is-selected::after {
    background: #FFFFFF;
}

/* ---------- 当月节日 chips ---------- */
.cal2-chips {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #EBE5DD;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.cal2-chip {
    font-size: 11px;
    color: #C84A3A;
    background: rgba(200, 74, 58, 0.07);
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 500;
    letter-spacing: 0.02em;
}