.gate-badge {
  animation: invite-button-shake 2.4s ease-in-out infinite;
}

@keyframes invite-button-shake {
  0%,
  84%,
  100% {
    transform: translateX(0) rotate(0);
  }

  87% {
    transform: translateX(-3px) rotate(-1.5deg);
  }

  90% {
    transform: translateX(3px) rotate(1.5deg);
  }

  93% {
    transform: translateX(-2px) rotate(-1deg);
  }

  96% {
    transform: translateX(2px) rotate(1deg);
  }
}

.invite-shake-window {
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: 590px;
  margin-top: 24px;
  padding: 14px 17px;
  border: 2px solid #fff2a8;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(135deg, #f3264f, #ff7a00 48%, #f9b800);
  box-shadow:
    0 12px 34px rgba(222, 30, 64, 0.34),
    0 0 0 6px rgba(255, 214, 10, 0.1);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.55;
  animation: invite-window-shake 2.8s ease-in-out infinite;
}

.invite-shake-window svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

@keyframes invite-window-shake {
  0%,
  88%,
  100% {
    transform: translateX(0);
  }

  91% {
    transform: translateX(-5px);
  }

  94% {
    transform: translateX(5px);
  }

  97% {
    transform: translateX(-3px);
  }
}

.progress-rail {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.progress-rail::before {
  left: 10%;
  right: 10%;
}

.account-guest {
  margin-bottom: 24px;
  padding-bottom: 23px;
  border-bottom: 1px solid var(--line);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 16px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(123, 44, 191, 0.08);
}

.auth-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 5px;
  color: #6b5a79;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.auth-tabs button.active {
  color: #fff;
  background: var(--rainbow);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.auth-field > span {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
}

.auth-field input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 11px;
  border: 1px solid #d9d6e3;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
}

.auth-message {
  min-height: 17px;
  margin: 0;
  color: var(--coral-dark);
  font-size: 11px;
  line-height: 1.5;
}

.auth-submit {
  width: 100%;
}

.avatar-choice,
.profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  background: var(--rainbow);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
}

.account-avatar.large {
  width: 68px;
  height: 68px;
  font-size: 26px;
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-picker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-soft);
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.avatar-picker svg {
  width: 15px;
  height: 15px;
}

.avatar-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.account-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 13px 14px;
  border-radius: 9px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.96)) padding-box,
    var(--rainbow) border-box;
  border: 1px solid transparent;
}

.account-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 11px;
}

.account-identity > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.account-identity strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.account-identity small {
  color: var(--muted);
  font-size: 10px;
}

.account-actions {
  display: flex;
  gap: 7px;
  flex: 0 0 auto;
}

.account-actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-soft);
  background: #fff;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.account-actions svg {
  width: 14px;
  height: 14px;
}

.member-chip {
  padding: 0;
  border: 0;
  cursor: pointer;
}

.member-chip img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.profile-dialog {
  width: min(430px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: transparent;
}

.profile-dialog::backdrop {
  background: rgba(10, 8, 18, 0.72);
  backdrop-filter: blur(8px);
}

.profile-shell {
  position: relative;
  display: grid;
  gap: 15px;
  padding: 31px;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(27, 13, 51, 0.32);
}

.profile-shell h2 {
  margin: -5px 0 2px;
  font-family: var(--display);
  font-size: 28px;
}

.profile-close {
  position: absolute;
  right: 13px;
  top: 13px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.profile-close svg {
  width: 16px;
  height: 16px;
}

.primary-button:disabled,
.secondary-button:disabled,
.icon-button:disabled {
  filter: grayscale(0.55);
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 600px) {
  .invite-shake-window {
    font-size: 14px;
  }

  .auth-field-grid {
    grid-template-columns: 1fr;
  }

  .account-profile {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-actions {
    width: 100%;
  }

  .account-actions button {
    flex: 1;
    justify-content: center;
  }

  .progress-rail {
    gap: 3px;
  }

  .progress-step > span {
    width: 34px;
    height: 34px;
    font-size: 11px;
  }

  .progress-rail::before {
    top: 17px;
  }

  .profile-shell {
    padding: 27px 20px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gate-badge,
  .invite-shake-window {
    animation: none;
  }
}
