/* ===================================
   イベントカレンダー（Googleカレンダー風）
   =================================== */
.event-calendar {
  background: rgba(20, 10, 30, 0.6);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 16px 8px;
  width: 100%;
  box-sizing: border-box;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ヘッダー */
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}
.cal-month {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  margin: 0;
}
.cal-nav {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
}
.cal-nav:active {
  background: rgba(173,65,149,0.4);
  transform: scale(0.92);
}

/* 曜日ヘッダー */
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 2px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cal-wd {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
  font-weight: 700;
}
.cal-wd.sun { color: #ff7b7b; }
.cal-wd.sat { color: #7bb3ff; }

/* グリッド */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  /* 行の高さはコンテンツに合わせて伸縮 */
}

/* 日付セル - Google風：固定なし、コンテンツで伸びる */
.cal-cell {
  min-height: 48px;
  padding: 2px 1px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.cal-cell.empty {
  min-height: 0;
  border: none;
}
.cal-cell.today .cal-day {
  background: var(--neon-pink, #ad4195);
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

/* 日付番号 - 左上に小さく配置 */
.cal-day {
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  line-height: 1;
  margin-bottom: 2px;
  padding-left: 2px;
}
.cal-cell.sun .cal-day { color: #ff8a8a; }
.cal-cell.sat .cal-day { color: #8ab8ff; }

/* ドット非表示（不要） */
.cal-dots { display: none; }

/* イベントバー - Google風フル幅カラーバー */
.cal-event {
  display: block;
  font-size: 0.58rem;
  line-height: 1.15;
  padding: 2px 3px;
  border-radius: 3px;
  background: #8e3a7d;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 1px;
  cursor: pointer;
  font-weight: 600;
  width: 100%;
  box-sizing: border-box;
}
.cal-event:active {
  opacity: 0.7;
}
.cal-event.ongoing {
  background: #c0392b;
}
.cal-event.ended {
  background: #555;
  color: rgba(255,255,255,0.5);
}


.cal-list-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  margin-bottom: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.cal-list-item:active {
  background: rgba(173,65,149,0.15);
}
.cal-list-item.ended {
  opacity: 0.4;
}
.cal-list-date {
  min-width: 42px;
  text-align: center;
  padding: 4px 0;
  border-radius: 8px;
  background: rgba(173,65,149,0.15);
}
.cal-list-date-day {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.cal-list-date-wd {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}
.cal-list-info {
  flex: 1;
  min-width: 0;
}
.cal-list-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-list-status {
  font-size: 0.6rem;
  margin-top: 3px;
  color: rgba(255,255,255,0.4);
}
.cal-list-status.ongoing {
  color: #ff7777;
}

/* ====== タブレット ====== */
@media (min-width: 480px) {
  .event-calendar { padding: 20px 12px; }
  .cal-cell { min-height: 56px; padding: 3px 2px; }
  .cal-day { font-size: 0.76rem; }
  .cal-event { font-size: 0.62rem; padding: 2px 4px; }
  .cal-month { font-size: 1.15rem; }
}

/* PC */
@media (min-width: 600px) {
  .event-calendar { padding: 24px 16px; }
  .cal-cell { min-height: 72px; padding: 4px 3px; }
  .cal-day { font-size: 0.82rem; }
  .cal-cell.today .cal-day { width: 26px; height: 26px; }
  .cal-event { font-size: 0.65rem; padding: 3px 5px; border-radius: 4px; }
  .cal-month { font-size: 1.25rem; }
  .cal-wd { font-size: 0.78rem; }
}

@media (min-width: 768px) {
  .event-calendar { padding: 28px 20px; border-radius: 24px; }
  .cal-cell { min-height: 84px; padding: 5px 4px; }
  .cal-day { font-size: 0.88rem; }
  .cal-cell.today .cal-day { width: 28px; height: 28px; font-size: 0.88rem; }
  .cal-event { font-size: 0.7rem; padding: 3px 6px; }
  .cal-month { font-size: 1.3rem; }
  .cal-wd { font-size: 0.82rem; }
}

/* ===================================
   日別イベント一覧モーダル
   =================================== */
.day-events-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.day-events-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}
.day-events-modal-content {
  background: rgba(20,10,30,0.95);
  border: 1px solid rgba(173,65,149,0.3);
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  transform: translateY(20px);
  transition: all 0.3s ease;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}
.day-events-modal-overlay.show .day-events-modal-content {
  transform: translateY(0);
}
.day-events-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.day-events-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px 0;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 12px;
}
