#site-header {
  position: relative !important;
}

.main-container {
  display: none; /* jsで表示させるので初期値は非表示 */
}

/* 部屋画像の共通スタイル */
.room-image {
  display: none;        /* 初期は非表示、JSで制御 */
  width: 90%;
  height: auto;         /* 縦横比を維持 */
  margin-left: auto;
  margin-right: auto;
}

.calendar-container{
width:85%;
margin: 0 auto;
user-select: none;
}

/* カレンダー上部：年月表示と月移動ボタンを左右に分けて横並び */
.calendar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 100%;
  aspect-ratio: 12 / 1;
  margin-block: 1.6rem;
}

.calendar-label {
  width:30%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.calendar-label .month {
  font-size: var(--font-xl);
  font-weight: bold;
  color: var(--color-main);
  text-align: left; 
  font-family: var(--font-calendar);
}

.month-navigation.new-layout {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

.nav-icon {
  font-size: var(--font-m);
  padding: 0.4em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.nav-icon.btn-disabled {
  opacity: 0.2;
  pointer-events: none;
  cursor: not-allowed;
  color:var(--color-main);
}

.month-year-label {
  width:60%;
  text-align: center;
  font-family: var(--font-calendar);
  font-size: var(--font-l);
  color:var(--color-main);
  font-weight: bold;
}

.month-navigation {
  display: flex;
  justify-content: center;
  gap: 1em;
}

#calendar-header {
  display: flex;
  flex-direction: column; /* ← row を column に変更 */
  justify-content: center;
  align-items: center;
  gap: 1em;
  width: 100%;
  box-sizing: border-box;
}

/* カレンダー系の幅指定 */
.calendar-header,
.calendar-weekdays,
.calendar,
.buttons,
#day-header {
  width:100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* 曜日ヘッダ */
.calendar-weekdays {
  position: relative;
  font-family: var(--font-calendar);
  font-size: var(--font-m);
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  color: var(--color-subtle);
  background-color: var(--color-base);
  padding: 0;
}

.calendar-weekdays div:nth-child(1) {
  color: var(--color-subtle);
}
.calendar-weekdays div:nth-child(7) {
  color: var(--color-subtle);
}

/* カレンダー本体 */
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(6, 1fr);
  background-color: var(--color-base);
  color: var(--color-main);
  width: 100%;
  margin: 0 auto;

  font-size: var(--font-m);
}

.calendar div,
.day {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-calendar);
  font-size: var(--font-m);
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s, transform 0.1s;
  height: 2.5em;
  min-height: 2.3em;
  box-sizing: border-box;
}

.day.past {
  color: var(--color-silent);
  pointer-events: none;
  cursor: default;
}

.calendar div:hover:not(.past):not(.selected) {
  filter: brightness(1.1);
}

.today {
  border: none;
  border-radius: 50%;
  background-color: var(--color-silent) ;

}

.selected {
  border: none;
  border-radius: 50%;
  background-color: var(--color-primary) !important;

}

/* 時間予約ボタンエリア */
.buttons-wrapper {
  position: relative;
  min-height: 8.12rem; /* 3段分の高さを確保 */
  margin-bottom: 1rem;
}

.buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  justify-items: stretch; /* ボタンを列幅いっぱいに伸ばす。好みで center に戻してもOK */
  align-items: start;     /* 上寄せ配置にする（中央寄せをやめる） */
  gap: 1rem;
  padding: 0;
  box-sizing: border-box;
}

.buttons-mess{
  margin-inline: auto;
  text-align: center;
  grid-column: 1 / -1; /* グリッド全体を横断 */
  justify-self: center; /* 子要素を中央に */
  min-height: 1.5em;
  line-height: 1.2em;
  font-size: var(--font-s);
  letter-spacing: 0.05em;
  padding: 0;
}

.available {
  width:100%;
  padding: 0.4em 2.4em; /* 詩的な余白を保ちつつ、整列しやすい比率 */
  font-size: var(--font-m); 
  background: var(--color-primary);
  font-family: var(--font-calendar);
  font-weight: bold;
  color: var(--color-main);
  border: none;
}
.unavailable {
  width:100%;
  padding: 0.4em 2.4em; /* 詩的な余白を保ちつつ、整列しやすい比率 */
  font-size: var(--font-m);
  background: var(--color-primary);
  font-family: var(--font-calendar);
  font-weight: bold;
  color: var(--color-main);
  border: none;
  opacity: 0.2;
  pointer-events: none;
  cursor: default;
}

/* 取得日表示 */
#last-updated {
  display: block;
  min-width: 16em;
  font-size: var(--font-xs);
  color: var(--color-silent);
  margin-right: 0;
}

/* 日付左右移動ボタン */
#day-header {
  margin-block: 2.4em;
  font-size: var(--font-m);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

#day-header .date-btn {
  font-size: var(--font-m);
  width: 10%;
  aspect-ratio: 1 / 1;
  padding: 0;
  margin: 0 0.2em;
  background: var(--color-base);
  color: var(--color-main);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

#day-header .date-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
  pointer-events: none;
}

#day-header strong {
  display: inline-block;
  text-align: center;
  font-weight: bold;
  font-family: var(--font-calendar);
  font-size: var(--font-l);
  letter-spacing: 0.05em;
  width:11rem;
}

