html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

/* ▼ 月ナビ（横並び） */
.month-nav {
  height: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  background: #fff;
}

/* ▼ タイトル（1段目） */
#calendar-title {
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  padding: 8px 0;
  margin: 0 0 4px 0;   /* ← 間隔を詰める */
}

/* ▼ 月ナビ（2段目・横並び） */
.month-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px; /* ボタンと月の間隔 */
  margin-bottom: 10px;
}

#month-title {
  font-size: 24px;
}

.month-btn {
  font-size: 24px;
  background: none;
  border: none;
}

/* 土曜（青） */
#calendar td:nth-child(6) .date-area {
  color: #1e90ff;
}

/* 日曜（赤） */
#calendar td:nth-child(7) .date-area {
  color: #ff4d4d;
}

/* 曜日ヘッダーも色付け */
#calendar th:nth-child(6) {
  color: #1e90ff;
}

#calendar th:nth-child(7) {
  color: #ff4d4d;
}


/* ▼ カレンダー左右に余白 */
#calendar-wrapper {
  padding: 0 8px;
  overflow: hidden;
}

#calendar {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

/* ▼ 曜日ヘッダー（管理用と同じデザインに統一） */
#calendar th {
  padding: 6px 0;
  background: #e9f2ff;        /* 薄い青の塗りつぶし */
  border: 1px solid #1e90ff;  /* 青い枠線 */
  font-weight: bold;
  font-size: 16px;
}

/* ▼ マス */
#calendar td {
  border: 1px solid #1e90ff;
  padding: 0;
  overflow: hidden;
}

/* ▼ 中身を縦分割（高さ固定） */
.cell-inner {
  height: 85px;
}

/* ▼ 日付（上詰めセンター） */
.date-area {
  font-size: 18px;
  text-align: center;
  padding-top: 2px;
  flex: 0 0 24px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.today {
  background: #ffeb3b;
}

/* ▼ イベント（3件固定） */
.events-area {
  flex: 1;
  padding: 0 4px;
  font-size: 13px;
  line-height: 1.05;
  overflow: hidden;
}

.event {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ▼ スワイプアニメーション */
.slide-left {
  animation: slideLeft 0.25s ease forwards;
}

.slide-right {
  animation: slideRight 0.25s ease forwards;
}


@keyframes slideLeft {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes slideRight {
  from { transform: translateX(-100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
