.rfa {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 18px 14px 40px;
  color: #1d2327;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Noto Sans JP", sans-serif;
  letter-spacing: 0;
}

.rfa * {
  box-sizing: border-box;
}

.rfa-login,
.rfa-admin {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.08);
}

.rfa-login {
  max-width: 420px;
  margin: 12vh auto 0;
  padding: 24px 18px;
}

.rfa-login__title,
.rfa-admin__title {
  margin: 0;
  color: #1d2327;
  font-size: 22px;
  line-height: 1.4;
  font-weight: 700;
}

.rfa-login__field,
.rfa-modal__field {
  display: grid;
  gap: 7px;
  margin: 18px 0 14px;
  font-size: 13px;
  font-weight: 700;
}

.rfa-login input,
.rfa-modal select,
.rfa-modal textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #c3c4c7;
  border-radius: 6px;
  background: #fff;
  color: #1d2327;
  font-size: 16px;
  line-height: 1.4;
  padding: 10px 12px;
}

.rfa-modal textarea {
  min-height: 92px;
  resize: vertical;
}

.rfa-login__message,
.rfa-modal__message {
  min-height: 1.5em;
  margin: 12px 0 0;
  color: #646970;
  font-size: 13px;
  line-height: 1.6;
}

.rfa-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid #c3c4c7;
  border-radius: 6px;
  background: #fff;
  color: #1d2327;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  padding: 0 14px;
  cursor: pointer;
}

.rfa-button--primary {
  width: 100%;
  border-color: #2271b1;
  background: #2271b1;
  color: #fff;
}

.rfa-button--ghost {
  min-height: 36px;
  color: #50575e;
  font-size: 12px;
}

.rfa-admin {
  padding: 14px;
}

.rfa-admin__header,
.rfa-admin__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rfa-admin__header {
  margin-bottom: 16px;
}

.rfa-admin__header form {
  margin: 0;
}

.rfa-admin__toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
  border-bottom: 1px solid #f0f0f1;
  padding: 0 0 12px;
}

.rfa-admin__month {
  min-width: 112px;
  color: #1d2327;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

.rfa-admin__legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.rfa-admin__legend-item {
  border: 1px solid #dcdcde;
  border-radius: 6px;
  background: #f6f7f7;
  color: #1d2327;
  font-size: 12px;
  line-height: 1;
  padding: 9px 10px;
  text-align: center;
}

.rfa-calendar {
  border: 1px solid #dcdcde;
  border-radius: 8px;
  overflow: hidden;
}

.rfa-calendar__weekdays,
.rfa-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.rfa-calendar__weekday {
  background: #f0f0f1;
  border-right: 1px solid #dcdcde;
  border-bottom: 1px solid #dcdcde;
  color: #50575e;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 9px 2px;
  text-align: center;
}

.rfa-calendar__weekday:last-child {
  border-right: 0;
}

.rfa-calendar__day {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 3px;
  min-width: 0;
  min-height: 86px;
  border: 0;
  border-right: 1px solid #dcdcde;
  border-bottom: 1px solid #dcdcde;
  background: #fff;
  color: #1d2327;
  padding: 7px 4px;
  text-align: center;
  cursor: pointer;
}

.rfa-calendar__day:nth-child(7n) {
  border-right: 0;
}

.rfa-calendar__day:focus,
.rfa-calendar__day:hover {
  outline: 2px solid #2271b1;
  outline-offset: -2px;
}

.rfa-calendar__day.is-outside-month {
  background: #f6f7f7;
  color: #8c8f94;
}

.rfa-calendar__day.is-today {
  box-shadow: inset 0 0 0 2px #2271b1;
}

.rfa-calendar__date {
  justify-self: start;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.rfa-calendar__symbol {
  color: #008a20;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.rfa-calendar__label {
  color: #50575e;
  font-size: 10px;
  line-height: 1.25;
}

.rfa-calendar__memo {
  display: block;
  color: #646970;
  font-size: 10px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.rfa-calendar__day--inquiry .rfa-calendar__symbol {
  color: #996800;
}

.rfa-calendar__day--full .rfa-calendar__symbol,
.rfa-calendar__day--closed .rfa-calendar__symbol {
  color: #646970;
}

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

.rfa-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.rfa-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
}

.rfa-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 22px 16px 18px;
  box-shadow: 0 -18px 54px rgba(0, 0, 0, 0.24);
}

.rfa-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  color: #50575e;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.rfa-modal__title {
  margin: 0 44px 12px 0;
  color: #1d2327;
  font-size: 20px;
  line-height: 1.4;
}

.rfa-modal__date {
  margin: 0 0 14px;
  color: #50575e;
  font-size: 14px;
  font-weight: 700;
}

.rfa-modal__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

@media (min-width: 720px) {
  .rfa {
    padding-top: 32px;
  }

  .rfa-admin {
    padding: 22px;
  }

  .rfa-admin__legend {
    display: flex;
    flex-wrap: wrap;
  }

  .rfa-calendar__day {
    min-height: 112px;
    padding: 10px 8px;
  }

  .rfa-calendar__symbol {
    font-size: 28px;
  }

  .rfa-calendar__label,
  .rfa-calendar__memo {
    font-size: 12px;
  }

  .rfa-modal {
    align-items: center;
    padding: 20px;
  }

  .rfa-modal__dialog {
    border-radius: 10px;
    padding: 26px;
  }
}
