:root {
  --text: #272a35;
  --placeholder: #c2c7d2;
  --danger: #ff263f;
  --page-width: min(100vw, 512px);
  --page-height: calc(var(--page-width) * 2);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: #f9e7f0;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.page {
  position: relative;
  width: var(--page-width);
  min-height: max(100vh, var(--page-height));
  margin: 0 auto;
  background: url("./assets/invite-bg.png") center top / 100% auto no-repeat, linear-gradient(180deg, #ffe2ec 0%, #f8f0ff 100%);
}

.page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  min-height: var(--page-height);
  pointer-events: none;
  background:
    radial-gradient(circle at 45% 6%, rgba(255, 255, 255, 0.55), transparent 22%),
    radial-gradient(circle at 82% 28%, rgba(255, 155, 185, 0.58), transparent 22%),
    radial-gradient(circle at 20% 55%, rgba(139, 212, 255, 0.45), transparent 24%);
}

.poster-button {
  position: absolute;
  left: 0;
  right: 0;
  top: 62%;
  bottom: 0;
  z-index: 1;
  min-height: 240px;
  border-radius: 0;
  background: transparent;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0 16px 16px;
  background: rgba(0, 8, 29, 0.68);
}

.modal-mask.show {
  display: flex;
}

.modal-panel {
  width: min(100%, 480px);
  padding: 27px 30px 23px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 -16px 40px rgba(0, 10, 35, 0.24);
}

.modal-panel h2 {
  margin: 0 0 22px;
  color: #272a35;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
}

.modal-step {
  display: none;
}

.modal-step.show {
  display: block;
}

.form-field {
  display: flex;
  align-items: center;
  min-height: 43px;
  margin: 0;
  border-bottom: 1px solid #eef0f6;
}

.form-field input {
  width: 100%;
  height: 42px;
  padding: 0;
  border: 0;
  outline: none;
  color: #20233a;
  background: transparent;
  font-size: 14px;
}

.form-field input::placeholder {
  color: var(--placeholder);
}

.readonly-field input {
  color: #8b92a2;
}

.code-field {
  gap: 12px;
}

.code-field input {
  min-width: 0;
}

.code-field button {
  flex: 0 0 84px;
  color: var(--danger);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.code-field button:disabled,
.submit-button:disabled {
  opacity: 0.58;
}

.form-tip {
  min-height: 20px;
  margin-top: 7px;
  color: var(--danger);
  text-align: center;
  font-size: 12px;
  line-height: 20px;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 4px;
}

.cancel-button,
.submit-button {
  height: 43px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
}

.cancel-button {
  color: #30333d;
  background: #ededed;
}

.submit-button {
  color: #fff;
  background: linear-gradient(100deg, #5b66ff 0%, #7d2fff 100%);
  box-shadow: 0 8px 15px rgba(102, 71, 255, 0.18);
}

@media (max-height: 700px) and (min-width: 513px) {
  :root {
    --page-width: min(100vw, calc(100vh / 2));
  }
}

@media (min-width: 513px) {
  .modal-panel {
    width: 480px;
  }
}
