/* --- 共通設定（ルート・ベース） --- */
:root {
  --common-bg: #f4f1ea;
  --common-text: #4c3c2a;
  --common-gold: #c68e4e;
  --calendar-red: #ef4444;
  --calendar-blue: #3b82f6;
  --calendar-green: #22c55e;
}

body {
  font-family: "Hiragino Mincho ProN", "MS Mincho", serif;
  background-color: var(--common-bg);
  color: var(--common-text);
  margin: 0;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 20px;
}

/* --- カレンダーセクション --- */
.calendar-section.staff-paper {
  background-color: #ffffff;
  padding: 50px 40px;
  border-top: 5px solid var(--common-gold);
  border-bottom: 5px solid var(--common-gold);
  margin-bottom: 50px;
  background-image: repeating-linear-gradient(transparent, transparent 34px, #f0f0f0 34px, #f0f0f0 35px);
  background-size: 100% 35px;
  box-sizing: border-box;
}

/* ヘッダー部分 */
.calendar-header-custom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end; /* 下揃えに変更してバランスを調整 */
  border-bottom: 4px solid var(--common-gold);
  margin-bottom: 25px;
  padding-bottom: 10px;
}

.calendar-header-left {
  font-size: 36px;
  font-weight: bold;
}

.calendar-date-display {
  text-align: right;
  line-height: 1.1;
}

.year-num {
  font-size: 28px;
  font-weight: bold;
  display: block;
}

.month-num {
  font-size: 64px;
  font-weight: 900;
}

/* テーブル部分 */
.calendar-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* 各列の幅を均等に固定 */
}

.calendar-table th {
  padding: 12px 5px;
  font-weight: 900;
  font-size: 20px;
  color: #333;
}

.calendar-table td {
  height: 100px;
  text-align: center;
  vertical-align: top;
  padding-top: 10px;
  font-size: 24px;
  font-weight: bold;
  position: relative;
}

/* イベントドット（●） */
.event::after {
  content: "●";
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 42px;
}

.event.red::after { color: var(--calendar-red); }
.event.blue::after { color: var(--calendar-blue); }
.event.green::after { color: var(--calendar-green); }

/* 凡例（Legend） */
.calendar-legend-custom {
  display: flex;
  justify-content: center;
  flex-wrap: wrap; /* スマホで折り返せるように */
  gap: 30px;
  margin-top: 50px;
  font-weight: 900;
  font-size: 22px;
}

.calendar-legend-unit {
  display: flex;
  align-items: center;
  gap: 12px;
}

.calendar-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-block;
}

.calendar-dot.red { background: var(--calendar-red); }
.calendar-dot.blue { background: var(--calendar-blue); }
.calendar-dot.green { background: var(--calendar-green); }

/* --- レスポンシブ対応 (スマホ・タブレット) --- */
@media screen and (max-width: 768px) {
  .calendar-section.staff-paper {
    padding: 30px 15px; /* 外側の余白を削る */
  }

  .calendar-header-left {
    font-size: 24px; /* 「営業カレンダー」などの文字を小さく */
  }

  .year-num {
    font-size: 18px;
  }

  .month-num {
    font-size: 48px; /* 月の数字を少し小さく */
  }

  .calendar-table th {
    font-size: 16px; /* 曜日のサイズ調整 */
    padding: 8px 0;
  }

  .calendar-table td {
    height: 70px;    /* セルの高さを抑える */
    font-size: 18px; /* 日付のサイズ調整 */
    padding-top: 5px;
  }

  .event::after {
    font-size: 28px; /* ドットを小さく */
    bottom: 8px;
  }

  .calendar-legend-custom {
    gap: 15px 20px; /* 縦横の間隔を調整 */
    font-size: 16px; /* 文字を小さく */
  }

  .calendar-dot {
    width: 16px;
    height: 16px;
  }
}

/* 小さなスマホ向け(400px以下) */
@media screen and (max-width: 400px) {
  .calendar-header-custom {
    flex-direction: column; /* ヘッダーを縦並びに */
    align-items: flex-start;
  }
  .calendar-date-display {
    text-align: left;
    margin-top: 10px;
  }
}