body {
  margin: 0;
  padding: 0;
  font-family: Helvetica, Arial, sans-serif;
  background-color: #fff;
  color: #333;
}

.main-container {
  display: flex;
  justify-content: flex-start;
  gap: 20px;
  padding: 20px;
}

.calendar-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px;
  font-weight: 300;
}

#calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2em;
  margin-bottom: 10px;
  width: 28vmin;
  margin-left: 0;
  box-sizing: border-box;
}

#calendar-header button {
  background-color: transparent;
  border: none;
  font-size: 1em;
  cursor: pointer;
  margin: 0 15px;
}

#calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(7, 1fr);
  width: 28vmin;
  height: 28vmin;
  margin-left: 0;
  box-sizing: border-box;
}

.weekday,
.calendar-day {
  border: 0.5px solid black;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.9em;
  font-weight: 300;
}

.weekday {
  font-weight: 300;
}

.calendar-day.red {
  background-color: red;
  color: white;
  cursor: pointer;
}

.calendar-day.red:hover {
  background-color: black;
  color: white;
}

.event-container {
  display: flex;
  flex-direction: row;
  margin-top: 20px;
  align-items: flex-start; 
}

#event-image img {
  width: 80vmin;
  height: 80vmin;
  object-fit: scale-down;
}

#event-text {
  width: 48%;
  box-sizing: border-box;
  word-wrap: normal;
  font-size: 1em; 
}

#event-text pre {
  font-weight: 200;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  margin: 10px;
  white-space: pre-wrap;
}

/* ハンバーガーメニューのボタン（PCは非表示） */
.menu-toggle {
  display: none;
  font-size: 2.5em;
  color: #333;
  cursor: pointer;
  user-select: none;
  padding: 0 15px;
  align-self: center;
  z-index: 1100;
}

/* スマホ用スタイル */
@media (max-width: 768px) {
  .main-container {
    flex-direction: column;
    padding: 10px;
  }

  .calendar-container {
    width: 100%;
    padding: 10px 0;
  }

  #calendar-header {
    width: 100%;
    justify-content: space-between;
  }

  #calendar {
    width: 100%;
    height: auto;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: auto;
    margin-left: 0;
  }

  #event-text {
    width: 100%;
    margin-top: 15px;
  }

  .event-container {
    flex-direction: column;
    margin-top: 20px;
    align-items: center;
  }

  #event-image img {
    width: 100%;
    height: auto;
    max-width: 400px;
    object-fit: contain;
  }

  /* ハンバーガーメニュー表示 */
  .menu-toggle {
    display: block;
    color: white; /* 白色 */
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1100;
  }

  /* ナビリンクは初期非表示 */
  .navbar .right {
    display: none;
    position: absolute;
    top: 50px; /* ハンバーガーメニュー下 */
    right: 0;
    background: white;
    width: 200px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    flex-direction: column;
    padding: 10px 0;
    z-index: 1000;
  }

  /* メニューがアクティブな時に表示 */
  .navbar .right.active {
    display: flex;
  }

  .navbar .right a {
    color: #333;
    padding: 12px 20px;
    font-size: 1.2em;
    border-bottom: 1px solid #ddd;
  }

  .navbar .right a:last-child {
    border-bottom: none;
  }
}
