#xg-registration {
  --xr-text: #f3f3ed;
  --xr-muted: #b6bdb0;
  --xr-accent: #ff7045;
  box-sizing: border-box;
  min-height: 100svh;
  padding: max(18px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) max(26px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  background: radial-gradient(ellipse at 75% -8%, #373d28 0%, #23291f 30%, #181d19 57%, #151a16 100%);
  color: var(--xr-text);
  color-scheme: dark;
  font: 400 14px/1.5 system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

#xg-registration[hidden],
#xg-registration [hidden] { display: none !important; }

#xg-registration *,
#xg-registration *::before,
#xg-registration *::after { box-sizing: border-box; }

#xg-registration :is(h1, p) { margin: 0; }
#xg-registration :is(button, input) { font: inherit; }
#xg-registration button { cursor: pointer; }

#xg-registration :is(button, input):focus-visible {
  outline: 2px solid #ffbd95;
  outline-offset: 3px;
}

#xg-registration .xr-header,
#xg-registration .xr-step { max-width: 386px; margin-inline: auto; }

#xg-registration .xr-header,
#xg-registration .xr-field-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

#xg-registration .xr-header img { display: block; width: 100px; height: auto; }

#xg-registration .xr-leave {
  background: #1a1d17;
  color: var(--xr-text);
  border: 1px solid #747a67;
  border-radius: 999px;
  min-height: 44px;
  padding: 6px 12px;
}

#xg-registration .xr-step { display: grid; gap: 18px; padding-top: 23px; }
#xg-registration .xr-intro { display: grid; gap: 6px; }

#xg-registration h1 {
  font-size: clamp(29px, 7.8vw, 36px);
  letter-spacing: -.042em;
  line-height: 1.17;
  font-weight: 720;
  text-wrap: balance;
}

#xg-registration :is(.xr-intro p, .xr-hint) { color: var(--xr-muted); overflow-wrap: anywhere; }
#xg-registration :is(.xr-preview-note, .xr-hint) { font-size: 13px; }

#xg-registration .xr-preview-note {
  border: 1px solid #635742;
  background: #30291f;
  color: #ffdfbc;
  border-radius: 10px;
  padding: 9px 11px;
}

#xg-registration .xr-fields { display: grid; gap: 13px; }
#xg-registration .xr-field { display: grid; gap: 5px; }
#xg-registration .xr-field label { font-weight: 550; }

#xg-registration .xr-text {
  border: 0;
  padding: 0;
  background: transparent;
  min-height: 44px;
  color: #ffd0b6;
}

#xg-registration .xr-back { justify-self: start; }

#xg-registration input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid #515c4e;
  border-radius: 10px;
  background: #222921;
  color: var(--xr-text);
  padding: 9px 12px;
  font-size: 16px;
}

#xg-registration input::placeholder { color: #a7afa0; opacity: 1; }
#xg-registration input[aria-invalid="true"] { border-color: #ff9a83; }
#xg-registration .xr-password { position: relative; }
#xg-registration .xr-password input { padding-inline-end: 54px; }

#xg-registration .xr-password-toggle {
  display: grid;
  place-items: center;
  position: absolute;
  inset: 1px 1px 1px auto;
  width: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--xr-text);
}

#xg-registration .xr-password-toggle svg { width: 20px; height: 20px; }
#xg-registration .xr-eye-slash { display: none; }
#xg-registration .xr-password-toggle[aria-pressed="true"] { background: #3a473a; }
#xg-registration .xr-password-toggle[aria-pressed="true"] .xr-eye-slash { display: initial; }
#xg-registration .xr-error { color: #ffb6a4; }

#xg-registration .xr-primary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  color: #171311;
  background: var(--xr-accent);
  border: 1px solid #ff986e;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
}

#xg-registration .xr-primary:hover { background: #ff8a60; }

@media (max-width: 360px) {
  #xg-registration {
    padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
  }
}
