.staff-referral-row th,
.staff-referral-row td {
  vertical-align: top;
}

.staff-referral-copy {
  margin: 0 0 .75rem;
}

.content .desc-box .desc-data .staff-referral-row td .staff-referral-link {
  background: var(--c-ama);
}

.staff-referral-note {
  margin: .65rem 0 0;
  color: var(--c-kokihi);
  font-size: .9rem;
  line-height: 1.55;
}

.staff-referral-dialog {
  width: min(48rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 2px solid #dcc7e2;
  border-radius: .9rem;
  background: #fffbff;
  box-shadow: 0 1rem 3rem rgba(77, 45, 87, .25);
  overflow: hidden;
}

.staff-referral-dialog::backdrop {
  background: rgba(0, 0, 0, .55);
}

.staff-referral-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #dcc7e2;
  background: linear-gradient(135deg, #fcf3ff, #fffaff);
}

.staff-referral-dialog__header h2 {
  margin: 0;
  color: #172b3a;
  font-size: 1.125rem;
}

.staff-referral-dialog__close {
  flex: 0 0 auto;
  padding: .5rem .75rem;
  border: 1px solid #75537f;
  border-radius: 999px;
  background: #fffaff;
  color: #51385a;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.staff-referral-dialog__close:hover,
.staff-referral-dialog__close:focus-visible {
  background: #f1dff5;
}

.staff-referral-dialog__body {
  padding: 1rem;
  background: #fffaff;
}

.staff-referral-dialog__selected-job {
  margin: 0 0 .75rem;
  padding: .6rem .75rem;
  border-left: 4px solid #9a63a5;
  background: #fcf3ff;
  color: #42234a;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
}

.staff-referral-dialog__frame {
  position: relative;
  min-height: 18rem;
}

.staff-referral-dialog__frame iframe {
  display: block;
  width: 100%;
  height: min(33.3125rem, calc(100dvh - 9rem));
  border: 1px solid #ccc;
  background: transparent;
}

.staff-referral-loading {
  display: grid;
  position: absolute;
  z-index: 1;
  inset: 0;
  min-height: 18rem;
  place-content: center;
  gap: .85rem;
  background: #fffaff;
  color: #172b3a;
  font-weight: 700;
  text-align: center;
}

.staff-referral-loading::before {
  width: 2rem;
  height: 2rem;
  margin: 0 auto;
  border: .25rem solid #ead9ee;
  border-top-color: #9a63a5;
  border-radius: 50%;
  content: "";
  animation: staff-referral-spin .8s linear infinite;
}

@keyframes staff-referral-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .staff-referral-loading::before { animation-duration: 1.6s; }
}

@media (max-width: 700px) {
  .staff-referral-dialog {
    width: 100vw;
    max-height: 100dvh;
    border-radius: 0;
  }

  .staff-referral-dialog__body {
    padding: .75rem;
  }

  .staff-referral-dialog__body iframe {
    height: calc(100dvh - 7.5rem);
  }

  .staff-referral-dialog__selected-job {
    font-size: .9rem;
  }

  .staff-referral-loading {
    min-height: calc(100dvh - 7.5rem);
  }
}
