/* ==========================================
   Reset (影響範囲限定)
   ========================================== */

.gcal-week-list *,
.gcal-month *,
.gcal-detail * {
  box-sizing: border-box;
}

/* ==========================================
   Common
   ========================================== */

.gcal-empty,
.gcal-error {
  padding: 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.95rem;
}

/* ==========================================
   Week List - PC横長カード
   ========================================== */

@media (min-width: 769px) {
  .gcal-event-card {
    grid-template-columns: minmax(220px, 320px) 1fr;
    grid-template-areas:
      "image date"
      "image body";
    align-items: start;
    column-gap: 24px;
    row-gap: 12px;
  }

  .gcal-event-card__image-link {
    grid-area: image;
    display: block;
    align-self: start;
  }

  .gcal-event-card__image {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .gcal-event-card__date {
    grid-area: date;
    align-self: end;
  }

  .gcal-event-card__body {
    grid-area: body;
  }
}

/* ==========================================
   Week List
   ========================================== */

.gcal-week-list {
  display: grid;
  gap: 32px;
}

/* ---- Card ---- */

.gcal-event-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 10px solid #007c00;
  background: #333;
}

/* ---- Image ---- */

.gcal-event-card__image-link {
  display: block;
}

.gcal-event-card__image {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.gcal-event-card__image::before {
  content: "";
  display: block;
  padding-top: 100%; /* ← 1:1 */
}

.gcal-event-card__image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Date ---- */

.gcal-event-card__date {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  padding: 0px 6px;
}

.gcal-event-card__monthday {
  font-size: 1.8rem;
  font-weight: 700;
  padding: 0px 6px;
}

.gcal-event-card__weekday {
  opacity: 0.8;
}

.gcal-badge--today {
  padding: 2px 8px;
  font-size: 0.75rem;
  border-radius: 999px;
  background: yellow;
  color: #000;
}

/* ---- Body ---- */

.gcal-event-card__body {
  display: grid;
  gap: 12px;
}

.gcal-event-card__title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.4;
  background: #000;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
}
.gcal-event-card__title a {
  color: inherit;
  text-decoration: none;
}

/* ---- Meta ---- */

.gcal-event-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
  padding: 0px 6px;
}

.gcal-event-card__time {
  font-weight: 600;
}

.gcal-event-card__location {
  opacity: 0.8;
}

/* ---- Description ---- */

.gcal-event-card__desc {
  font-size: 0.95rem;
  line-height: 1.8;
  word-break: break-word;
  padding: 0px 6px;
}

.gcal-event-card__desc a {
  text-decoration: underline;
}

/* ---- Button ---- */

.gcal-event-card__actions {
  margin-top: 8px;
  padding: 0px 6px;
}

.gcal-event-card__detail-link {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 0.7rem;
  color: #fff;
  text-decoration: none;
}

/* ==========================================
   Month Calendar
   ========================================== */

.gcal-month {
  margin-top: 40px;
  width: 100%;
}

.gcal-month__header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
  background-image: linear-gradient(rgba(50, 0, 0, 0.5), rgba(200, 0, 0, 0.5)),url(https://dolce.officehey.jp/wp-content/uploads/2026/06/Art-Deco-Pattern.png);
}

.gcal-month__title {
  margin: 0;
  text-align: center;
  font-size: 1.5rem;
  min-width: 0;
}

.gcal-month__nav {
  color: #ccc;
  text-decoration: none;
  font-size: 0.95rem;
  white-space: nowrap;
}

.gcal-month__weekdays,
.gcal-month__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.gcal-month__weekday {
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
  padding: 4px 0;
  min-width: 0;
}

.gcal-day {
  min-height: 110px;
  min-width: 0;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid #888;
  background: rgba(255,255,255,0.03);
  overflow: hidden;
}

.gcal-day--empty {
  opacity: 0.2;
}

.gcal-day.is-today {
  border-color: #D1B86C;
}

.gcal-day__date {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 6px;
  min-width: 0;
}

.gcal-day__events {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.gcal-day__event {
  display: grid;
  gap: 2px;
  font-size: 0.75rem;
  line-height: 1.3;
  min-width: 0;
}

.gcal-day__event-time {
  display: block;
  font-size: 0.68rem;
  opacity: 0.75;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.gcal-day__event-title {
  color: inherit;
  text-decoration: none;
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gcal-day__more {
  font-size: 0.7rem;
  opacity: 0.6;
  min-width: 0;
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 768px) {
  .gcal-month {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .gcal-month__weekdays,
  .gcal-month__grid {
    min-width: 700px;
  }
}

  .gcal-month__header {
    grid-template-columns: 1fr;
    gap: 8px;
    justify-items: center;
  }

  .gcal-month__title {
    font-size: 1.2rem;
  }

  .gcal-month__nav {
    font-size: 0.9rem;
  }

  .gcal-month__weekdays,
  .gcal-month__grid {
    gap: 4px;
  }

  .gcal-day {
    min-height: 84px;
    padding: 5px;
    border-radius: 10px;
  }

  .gcal-day__date {
    margin-bottom: 4px;
    font-size: 0.78rem;
  }

  .gcal-day__event {
    font-size: 0.62rem;
  }

  .gcal-day__event-time {
    font-size: 0.58rem;
  }

  .gcal-day__event-title {
    font-size: 0.62rem;
  }

  .gcal-day__more {
    font-size: 0.58rem;
  }
}

/* ==========================================
   Detail Page
   ========================================== */

.gcal-detail {
  margin: 32px 0 48px;
}

.gcal-detail__card {
  display: grid;
  gap: 24px;
}

/* ---- Image ---- */

.gcal-detail__image {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 20px;
}

.gcal-detail__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Title ---- */

.gcal-detail__title {
  margin: 0;
  font-size: 2rem;
  line-height: 1.3;
}

/* ---- Meta ---- */

.gcal-detail__meta {
  display: grid;
  gap: 6px;
}

.gcal-detail__meta-item {
  font-size: 0.95rem;
}

/* ---- Description ---- */

.gcal-detail__desc {
  line-height: 1.9;
  word-break: break-word;
}

.gcal-detail__desc a {
  text-decoration: underline;
}

/* ---- Button ---- */

.gcal-detail__actions {
  margin-top: 20px;
}

.gcal-detail__external-link {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid currentColor;
  text-decoration: none;
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 768px) {

  .gcal-event-card {
    padding: 16px;
  }

  .gcal-event-card__title {
    font-size: 1.2rem;
  }

  .gcal-day {
    min-height: 90px;
    padding: 6px;
  }

  .gcal-day__date {
    font-size: 0.8rem;
  }

  .gcal-day__event {
    font-size: 0.65rem;
  }

  .gcal-month__header {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .gcal-month__title {
    font-size: 1.2rem;
  }

  .gcal-detail__title {
    font-size: 1.5rem;
  }

  .gcal-detail__image {
    max-width: 100%;
  }
}