/* カレンダーグリッド */
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  flex-grow: 1;
  border-left: 1px solid var(--border-color);
  border-top: 1px solid var(--border-color);
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(2px);
}

/* 曜日ヘッダー */
.day-header {
  background: #f8f9fa;
  padding: 12px;
  text-align: center;
  font-weight: 700;
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  color: var(--secondary-color);
  font-size: 1.1rem;
}

.day-header.sun { color: var(--weekend-sun); }
.day-header.sat { color: var(--weekend-sat); }

/* 日付セル */
.day-cell {
  min-height: 120px;
  padding: 45px 10px 10px 12px;
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  background: white;
  cursor: pointer;
  transition: box-shadow 0.15s;
}

.day-cell:hover {
  box-shadow: inset 0 0 0 2px var(--accent-color);
}

.day-cell.selected {
  box-shadow: inset 0 0 0 3px var(--primary-color);
}

.day-cell.empty {
  background: #fafafa;
  cursor: default;
}

.day-cell.empty:hover {
  box-shadow: none;
}

/* 日付番号 */
.day-number {
  font-weight: 700;
  font-size: 1.2rem;
  position: absolute;
  top: 10px;
  left: 12px;
  display: block;
}

.sun .day-number,
.holiday .day-number {
  color: var(--weekend-sun);
}

.sat .day-number {
  color: var(--weekend-sat);
}

/* メニューリスト */
.menu-items {
  list-style: none;
  font-size: 0.85rem;
}

.menu-items li {
  margin-bottom: 3px;
  padding-left: 14px;
  position: relative;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-items li::before {
  content: "\2022";
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
}

/* ノート（祝日・イベントラベル） */
.note {
  position: absolute;
  top: 5px;
  right: 5px;
  background: var(--note-bg);
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  z-index: 10;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
  max-width: calc(100% - 40px);
  text-align: right;
  line-height: 1.2;
}

.icon {
  font-size: 1.1rem;
  margin-right: 4px;
  vertical-align: middle;
}

/* ポップアップメッセージ */
.popup-message {
  background: #e74c3c;
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  position: relative;
  font-weight: bold;
  font-size: 0.9rem;
  text-align: center;
  margin-top: 10px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  display: inline-block;
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popup-message::after {
  content: '';
  position: absolute;
  top: -8px;
  right: 20px;
  border-width: 0 8px 8px;
  border-style: solid;
  border-color: transparent transparent #e74c3c;
  display: block;
  width: 0;
}

@keyframes popIn {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* 特別メニュータイトル */
.special-menu-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--primary-color);
  font-weight: bold;
  text-align: center;
  margin-top: 25px;
  border-bottom: 2px wavy var(--accent-color);
  padding-bottom: 5px;
}

/* 画像付きメニュー */
.menu-image-container {
  text-align: center;
  margin-top: 5px;
}

.menu-title {
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 5px;
  font-size: 1rem;
}

.menu-img {
  max-width: 100%;
  height: auto;
  max-height: 70px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transform: rotate(-3deg);
  transition: transform 0.3s;
}

.menu-img:hover {
  transform: rotate(0) scale(1.05);
}

/* 6週の月用の調整 */
.calendar.weeks-6 .day-cell {
  min-height: 90px;
  padding-top: 35px;
}

.calendar.weeks-6 .menu-items {
  font-size: 0.75rem;
}

.calendar.weeks-6 .day-number {
  font-size: 1rem;
}
