.member-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(3, 9, 17, 0.82);
  backdrop-filter: blur(3px);
}

.member-modal.open {
  display: flex;
}

.member-modal-card {
  width: min(100%, 760px);
  max-height: calc(100vh - 36px);
  display: grid;
  grid-template-rows: auto auto auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(17, 35, 62, 0.98), rgba(9, 20, 36, 0.98));
  color: #eef4ff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.54);
}

.member-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.member-modal-head strong {
  font-size: 17px;
}

.member-modal-head button {
  min-height: 32px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: #eef4ff;
  padding: 0 12px;
  font-weight: 800;
  cursor: pointer;
}

.member-frame {
  width: 100%;
  height: calc(100vh - 84px);
  border: 0;
  background: #08111d;
}

.member-modal[data-member-modal-mode="register"] .member-modal-card {
  width: min(100%, 820px);
}

.member-modal[data-member-modal-mode="login"] .member-modal-card {
  width: min(100%, 760px);
}

.member-modal[data-member-modal-mode="login"] .member-frame,
.member-modal[data-member-modal-mode="find_login_id"] .member-frame,
.member-modal[data-member-modal-mode="reset_password"] .member-frame {
  height: min(680px, calc(100vh - 84px));
}

.member-modal-message {
  padding: 10px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(255, 122, 122, 0.12);
  color: #ffd7d7;
  font-size: 13px;
  line-height: 1.5;
}

.member-withdrawal-check {
  min-height: 420px;
  padding: 24px;
  overflow: auto;
  background: #08111d;
}

.withdrawal-warning {
  max-width: 680px;
  margin: 0 auto;
}

.withdrawal-warning h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.withdrawal-warning p {
  margin: 0 0 18px;
  color: #c8d6ea;
  line-height: 1.65;
}

.withdrawal-warning ul {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.withdrawal-warning li {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
}

.withdrawal-warning li strong {
  color: #ffffff;
}

.withdrawal-warning li span,
.withdrawal-loading {
  color: #aebfda;
  font-size: 13px;
  line-height: 1.55;
}

.withdrawal-confirm-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0;
  color: #eef4ff;
  font-weight: 800;
  line-height: 1.5;
}

.withdrawal-confirm-line input {
  margin-top: 4px;
}

.withdrawal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.withdrawal-actions button {
  min-height: 38px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 6px;
  background: rgba(255,255,255,.06);
  color: #eef4ff;
  padding: 0 14px;
  font-weight: 900;
  cursor: pointer;
}

.withdrawal-actions button[disabled] {
  cursor: not-allowed;
  opacity: .45;
}

.withdrawal-actions button[data-withdrawal-continue]:not([disabled]) {
  border-color: #f87171;
  background: #b91c1c;
}

.service-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.service-tabs a,
.service-tabs button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d8e2ec;
  border-radius: 6px;
  background: #ffffff;
  color: #17202a;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.service-tabs a.active {
  background: #176b87;
  border-color: #176b87;
  color: #ffffff;
}

.play-feedback-toast {
  position: fixed;
  z-index: 10000;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(420px, calc(100vw - 28px));
  border: 1px solid rgba(125, 186, 255, .45);
  border-radius: 10px;
  background: rgba(12, 28, 48, .96);
  color: #f4f8ff;
  padding: 10px 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .32);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.play-feedback-toast[hidden] {
  display: none;
}

@media (max-width: 720px) {
  .member-modal {
    padding: 8px;
  }

  .member-modal-card {
    width: 100%;
    max-height: calc(100vh - 16px);
  }

  .member-frame {
    height: calc(100vh - 76px);
  }

  .member-modal[data-member-modal-mode="login"] .member-frame,
  .member-modal[data-member-modal-mode="find_login_id"] .member-frame,
  .member-modal[data-member-modal-mode="reset_password"] .member-frame {
    height: min(680px, calc(100vh - 76px));
  }
}

@media (max-width: 720px) {
  .member-modal {
    align-items: flex-start;
    overflow: auto;
    padding: 8px;
  }

  .member-modal-card {
    width: 100%;
    max-height: calc(100dvh - 16px);
    grid-template-rows: auto auto minmax(0, 1fr);
    border-radius: 16px;
  }

  .member-modal-head {
    padding: 10px 12px;
  }

  .member-modal-head strong {
    font-size: 15px;
  }

  .member-modal-head button {
    min-height: 28px;
    padding: 0 10px;
  }

  .member-modal-message {
    padding: 8px 12px;
    font-size: 12px;
  }

  .member-frame,
  .member-modal[data-member-modal-mode="login"] .member-frame,
  .member-modal[data-member-modal-mode="find_login_id"] .member-frame,
  .member-modal[data-member-modal-mode="reset_password"] .member-frame {
    height: calc(100dvh - 72px);
    min-height: 0;
  }
}
