:root {
    --card-border: #e9e9e9;
    --line: #e5e5e5;
    --muted: #b9b9b9;
    --text: #222;
    --sun: #e74c3c;
    --sat: #2d6cff;
    --price: #2d6cff;
    --empty: #bdbdbd;
}

* {
    box-sizing: border-box;
}

.cal-card {
    width: min(760px, 100%);
    margin: 0 auto;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 8px 8px 8px;
    background: #fff;
}

/* header */
.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 2px 14px;
}

.cal-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
}
.cal-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.cal-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* weekday row */
.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    padding: 0 6px 6px;
    font-weight: 700;
    font-size: 16px;
}
.cal-weekdays div {
    text-align: center;
    padding: 10px 0 8px;
}
.cal-weekdays .sun {
    color: var(--sun);
}
.cal-weekdays .sat {
    color: var(--sat);
}

/* month grid */
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    border-top: 1px solid transparent;
}

.cal-cell {
    height: 96px;
    padding: 10px 8px 8px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* horizontal week separators */
.cal-row-sep {
    grid-column: 1 / -1;
    height: 1px;
    background: var(--line);
}

.cal-day {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.cal-day.sun {
    color: var(--sun);
}
.cal-day.sat {
    color: var(--sat);
}

.cal-day.is-outside {
    color: var(--muted);
    font-weight: 600;
}

.cal-meta {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.2;
    min-height: 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
}

.cal-meta .price {
    color: var(--price);
    font-weight: 700;
    word-break: keep-all;
}

.cal-meta .empty {
    color: var(--empty);
    font-weight: 700;
}

.cal-meta .dash {
    color: var(--muted);
    font-weight: 700;
}

/* clickable day */
.cal-cell.is-clickable {
    cursor: pointer;
    border-radius: 10px;
}
.cal-cell.is-clickable:hover {
    background: #f7f8ff;
}

/* mobile tweaks */
@media (max-width: 480px) {
    .cal-title {
        font-size: 18px;
    }
    .cal-weekdays {
        font-size: 14px;
    }
    .cal-day {
        font-size: 16px;
    }
    .cal-cell {
        height: 86px;
        padding: 10px 4px 6px;
    }
    .cal-meta {
        font-size: 12px;
    }
    .cal-nav-btn {
        width: 40px;
        height: 40px;
    }
}

/* PCでもだいたい400pxにしたい */
.cal-card {
    width: min(400px, 100%);
    margin: 0 auto;
}

/* 曜日と日付グリッドを同じ横幅・同じ左右余白にする */
.cal-table {
    padding: 0 6px;
}

/* ここはもう padding 要らない（cal-table に移した） */
.cal-weekdays {
    padding: 0 0 6px;
}

/* gridも同じ箱の中なので列幅が一致する */
.cal-grid {
    /* paddingは付けない（cal-table側で揃える） */
}

/* 週区切り線：左右余白ぶん短く見えないように cal-table 内で全幅 */
.cal-row-sep {
    grid-column: 1 / -1;
    height: 1px;
    background: var(--line);
}

/* スマホで価格が折り返してレイアウトが崩れるのを防ぐ（任意だけど効く） */
.cal-meta .price,
.cal-meta .empty {
    white-space: normal; /* 折り返しOK */
    overflow: visible; /* 切らない */
    text-overflow: clip; /* 省略しない */
    word-break: break-word; /* 日本語・記号混在でも折る */
    overflow-wrap: anywhere; /* iOS Safari対策で強めに折る */
    line-height: 1.1;
}

.detail .btn3 > span,
.detail .btn3 a {
    display: block;
    border-radius: 8px;
    border: 1px solid;
    padding: 8px 12px;
    max-width: 150px;
    color: #212121;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.5;
    margin-top: 6px;
    margin-bottom: 6px;
    margin-left: auto;
}
@media (max-width: 767px) {
    .detail .btn3 > span,
    .detail .btn3 a {
        max-width: none;
        font-size: 1.2rem;
    }
}
