#rmec-calendar {
  max-width: 920px;
  margin: 0 auto;
  color: #6d5a43;
  font-family: "Noto Sans JP", sans-serif;
}

.rmec-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.rmec-nav a {
  text-decoration: none;
  color: #7e6a52;
  border: 1px solid #d7ccbf;
  border-radius: 999px;
  padding: 8px 16px;
  background: #fff;
}

.rmec-nav__title {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 700;
  color: #7a6247;
}

.rmec-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
}

.rmec-table th,
.rmec-table td {
  border: 1px solid #e4ddd4;
  vertical-align: top;
}

.rmec-table th {
  background: #f6f1ea;
  padding: 12px 6px;
  text-align: center;
  font-weight: 700;
}

.rmec-day {
  height: 130px;
  padding: 8px;
  background: #fff;
}

.rmec-empty {
  background: #faf7f3;
}

.rmec-day__date {
  font-weight: 700;
  margin-bottom: 8px;
  color: #7f674d;
}

.rmec-day.is-today {
  background: #fdf8f2;
}

.rmec-event-trigger {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: #f3ede6;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
  cursor: pointer;
  color: #5d4935;
}

.rmec-event-trigger__time {
  display: block;
  font-size: 12px;
  color: #8a6f52;
  margin-bottom: 2px;
}

.rmec-event-trigger__title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.rmec-more-trigger {
  display: none;
  width: 100%;
  border: 0;
  background: transparent;
  color: #8a6f52;
  text-align: left;
  padding: 2px 4px;
  font-size: 12px;
  cursor: pointer;
}

#rmec-calendar.is-loading {
  opacity: .55;
  pointer-events: none;
  transition: opacity .2s ease;
}

.rmec-mobile-list {
  display: none;
}

.rmec-modal[hidden] {
  display: none;
}

.rmec-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
}

.rmec-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1;
}

.rmec-modal__dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 560px);
  max-height: min(80vh, 720px);
  overflow: auto;
  background: #fff;
  border-radius: 20px;
  padding: 28px 22px 24px;
  box-shadow: 0 22px 60px rgba(0,0,0,.2);
  z-index: 2;
}

.rmec-modal__close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #f3ede6;
  font-size: 22px;
  cursor: pointer;
  z-index: 3;
}

.rmec-modal__date {
  margin: 0 0 6px;
  color: #8a6f52;
  font-size: 14px;
}

.rmec-modal__title {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.4;
  color: #5d4935;
}

.rmec-modal__time {
  margin: 0 0 14px;
  font-weight: 700;
  color: #7b6247;
}

.rmec-modal__memo {
  line-height: 1.8;
  white-space: pre-wrap;
}

@media (max-width: 779px) {
  .rmec-nav {
    gap: 10px;
  }

  .rmec-nav a {
    padding: 7px 12px;
    font-size: 13px;
  }

  .rmec-nav__title {
    font-size: 20px;
  }

  .rmec-table--front {
    display: none;
  }

  .rmec-mobile-list {
    display: block;
  }

  .rmec-mobile-day {
    border: 1px solid #e4ddd4;
    background: #fff;
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 12px;
  }

  .rmec-mobile-day__date {
    margin: 0 0 10px;
    font-size: 15px;
    color: #7f674d;
  }

  .rmec-mobile-event {
    display: block;
    width: 100%;
    border: 0;
    text-align: left;
    background: #f3ede6;
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 8px;
    color: #5d4935;
  }

  .rmec-mobile-event:last-child {
    margin-bottom: 0;
  }

  .rmec-mobile-event__time {
    display: block;
    font-size: 12px;
    color: #8a6f52;
    margin-bottom: 3px;
  }

  .rmec-mobile-event__title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
  }

  .rmec-mobile-empty {
    padding: 16px 14px;
    border: 1px solid #e4ddd4;
    border-radius: 16px;
    background: #fff;
    color: #8a6f52;
    text-align: center;
  }

  .rmec-modal__dialog {
    width: min(92vw, 520px);
    max-height: 82vh;
    padding: 24px 18px 20px;
  }

  .rmec-modal__title {
    font-size: 20px;
  }
}
