#calendar-wrap,
#calendar-wrap-2 {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  width: 100%;
  margin: 15px 0;
  justify-content: center;
}

.calendar-title {
  font-size: 1.1em;
  margin: 0 0 10px;
  text-align: center;
  font-weight: bold;
  color: #333;
}

.calendar-title i {
  color: #6b4c8a;
  margin-right: 6px;
}

.calendar {
  background: #fafafa;
  flex: 1 1 280px;
  max-width: 100%;
  border-collapse: separate;
  font-size: 13px;
  border-spacing: 2px;
  box-sizing: border-box;
  border: 1px solid #e0e0e0;
}

.calendar caption {
  background: #f5f5f5;
  color: #333;
  font-weight: bold;
  padding: 8px 0;
  font-size: 15px;
  text-align: center;
  border-radius: 4px 4px 0 0;
  border-bottom: 1px solid #e0e0e0;
}

.calendar th {
  padding: 6px 2px;
  background: #f5f5f5;
  color: #333;
  font-size: 12px;
}

.calendar td {
  text-align: center;
  padding: 8px 2px;
  background: #fff;
  height: 38px;
  box-sizing: border-box;
  vertical-align: middle;
  position: relative;
  transition: background 0.15s ease;
}

/* 定休日 */
.calendar td.closed {
  background: #d8d8d8;
  color: #666;
  font-weight: normal;
}

/* 曜日色（通常営業：土曜＝青文字、日曜・祝日＝赤文字） */
.calendar th:first-child,
.calendar td.sun,
.calendar td.holiday {
  color: #d60000; /* 日・祝 */
}

.calendar th:last-child,
.calendar td.sat {
  color: #0047bb; /* 土 */
}

/* 年中行事・イベント日（テーマカラー #6B4C8A の上品な淡紫背景） */
.calendar td.has-info {
  background: #c1f8bf;
  font-weight: bold;
  cursor: pointer;
}

.calendar td.has-info:hover {
  background: #d2ffd1;
}

/* 定休日の設定が重なった場合は定休日スタイルを優先 */
.calendar td.closed.has-info {
  background: #d8d8d8;
  font-weight: normal;
}

/* ツールチップ（白背景 ＋ box-shadow） */
.tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  color: #333333;
  font-size: 13px;
  line-height: 1.55;
  padding: 12px 16px;
  border-radius: 6px;
  min-width: 190px;
  max-width: 290px;
  white-space: normal;
  text-align: left;
  z-index: 100;
  border: 1px solid #e2dcee;
  box-shadow:
    0 6px 22px rgba(0, 0, 0, 0.14),
    0 2px 6px rgba(107, 76, 138, 0.08);
  pointer-events: none;
}

/* 吹き出しの矢印 */
.tooltip::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  border-width: 6px;
  border-style: solid;
  border-color: #e2dcee transparent transparent transparent;
}

.tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #ffffff transparent transparent transparent;
}

/* 行事アイテム */
.tooltip .tip-event-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* 行事のタイトル：#6B4C8A */
.tooltip .tip-event-title {
  color: #6b4c8a;
  font-size: 14.5px;
  font-weight: bold;
  line-height: 1.35;
}

/* 行事の日付と時間 */
.tooltip .tip-event-date {
  font-size: 12.5px;
  color: #555;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.tooltip .tip-label-date {
  font-weight: bold;
  color: #333;
}

.tooltip .tip-label-time {
  display: inline-block;
  background: #f3eef7;
  color: #6b4c8a;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11.5px;
  font-weight: 500;
}

/* 行事の詳細（説明文・改行対応） */
.tooltip .tip-event-desc {
  color: #444444;
  font-size: 12.5px;
  line-height: 1.5;
  margin-top: 3px;
  padding-top: 6px;
  border-top: 1px dotted #ede8f2;
}

/* 休日の文字色：#333 */
.tooltip .tip-closed-title {
  display: inline-block;
  color: #333333;
  font-size: 14.5px;
  font-weight: bold;
}

.tooltip .tip-closed-desc {
  color: #444444;
  font-size: 12.5px;
  line-height: 1.5;
  margin-top: 3px;
}

.tooltip .tip-divider {
  margin: 10px 0;
  border: 0;
  border-top: 1px dashed #e2dcee;
}

.has-info:hover .tooltip,
.has-info.open .tooltip {
  display: block;
}

/* カレンダー下の凡例・注意書き */
.calendar-notice {
  margin: 10px auto 40px;
  font-size: 12px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.calendar-notice .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.calendar-notice .legend-color {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 2px;
  vertical-align: middle;
}

.calendar-notice .legend-color.closed {
  background: #d8d8d8;
  border: 1px solid #c0c0c0;
}

.calendar-notice .legend-color.event {
  background: #c1f8bf;
  border: 1px solid #c1f8bf;
}
