.calendar {
    max-width: 100%;
    margin: 0 auto;
    background: transparent;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px 10px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

.month-header {
    text-align: center;
    color: #333;
    font-size: 24px;
    margin-bottom: 20px;
    padding: 10px;
    border-bottom: 2px solid #eee;
}

.days-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
}

.day-cell {
    aspect-ratio: 1;
    padding: 10px;
    border-radius: 8px;
    background: #f8f9fa;
    position: relative;
    transition: all 0.2s;
}

/* 非本月日期 */
.other-month {
    background: #f1f3f5;
    color: #999;
}

/* 已跑步样式 */
.ran {
    background: #d4edda;
    border: 2px solid #c3e6cb;
}
.ran::after {
    content: "✓";
    color: #28a745;
    font-size: 20px;
    position: absolute;
    bottom: 5px;
    right: 5px;
}

/* 未跑步样式 */
.not-ran {
    background: #fff3cd;
    border: 2px solid #ffeeba;
}
.not-ran::after {
    content: "✕";
    color: #dc3545;
    font-size: 18px;
    position: absolute;
    bottom: 5px;
    right: 5px;
}

.date-number {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

/* 里程数显示 */
.distance {
    font-size: 12px;
    color: #666;
    margin-top: 20px;
}

/* 周标题 */
.week-day {
    text-align: center;
    color: #666;
    padding: 10px;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .date-number {
        font-size: 12px;
    }
    .distance {
        display: none;
    }
    .week-day {
        padding: 5px;
        font-size: 12px;
    }
    /* 减少 day-cell 的内边距 */
    .day-cell {
        padding: 5px;
        width: 100%;
        height: 100%;
    }
    /* 调整网格布局，让列更灵活 */
    .days-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        grid-auto-rows: minmax(40px, auto);
    }
}