:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --brand-red: #ef3f32;
  --deep-red: #bd1d20;
  --text: #272321;
  --muted: #96908d;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
}

body {
  background: var(--deep-red);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button,
a,
label {
  touch-action: manipulation;
}

.register-page {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 28px);
  background:
    radial-gradient(circle at 50% 23%, rgba(255, 226, 168, 0.88) 0%, rgba(255, 173, 103, 0.56) 19%, rgba(255, 113, 69, 0.22) 41%, transparent 63%),
    radial-gradient(circle at 4% 48%, rgba(255, 184, 111, 0.22) 0%, transparent 40%),
    radial-gradient(circle at 96% 51%, rgba(255, 192, 119, 0.2) 0%, transparent 42%),
    linear-gradient(180deg, #f87649 0%, #ed4932 31%, #da3028 62%, #bd1d20 100%);
}

.register-page::before,
.register-page::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.register-page::before {
  top: 164px;
  left: 50%;
  width: 390px;
  height: 270px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 231, 184, 0.34), transparent 66%);
  filter: blur(8px);
}

.register-page::after {
  right: -110px;
  bottom: 90px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 36px rgba(255, 255, 255, 0.025), 0 0 0 76px rgba(255, 255, 255, 0.018);
}

.ambient {
  position: absolute;
  z-index: 0;
  width: 120px;
  height: 230px;
  opacity: 0.18;
  filter: blur(16px);
  pointer-events: none;
}

.ambient-left {
  top: 250px;
  left: -72px;
  transform: rotate(24deg);
  background: linear-gradient(90deg, transparent, #ffdba3, transparent);
}

.ambient-right {
  top: 280px;
  right: -82px;
  transform: rotate(-29deg);
  background: linear-gradient(90deg, transparent, #fff0c7, transparent);
}

.store-awning {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 120px;
  filter: drop-shadow(0 10px 10px rgba(103, 16, 15, 0.2));
}

.awning-roof {
  position: absolute;
  inset: 0 0 29px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.23), transparent 22%, transparent 74%, rgba(112, 14, 18, 0.12)),
    repeating-linear-gradient(104deg, #f7f3ed 0 46px, #f7f3ed 46px 48px, #ed332f 48px 94px, #d9282b 94px 98px);
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 -7px 11px rgba(88, 20, 17, 0.08);
}

.awning-roof::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 2px 5px rgba(105, 16, 17, 0.16);
}

.awning-valance {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  height: 34px;
}

.awning-valance i {
  display: block;
  height: 32px;
  border-radius: 0 0 15px 15px;
  background: linear-gradient(180deg, #f7f4ef 0%, #ebe9e5 100%);
  box-shadow: inset 0 -3px 4px rgba(88, 31, 26, 0.08), 1px 5px 5px rgba(91, 17, 16, 0.12);
}

.awning-valance i:nth-child(even) {
  height: 34px;
  background: linear-gradient(180deg, #ef3732 0%, #d9272b 100%);
  box-shadow: inset 0 -4px 4px rgba(111, 15, 17, 0.17), 1px 5px 5px rgba(91, 17, 16, 0.14);
}

.register-content {
  position: relative;
  z-index: 2;
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 28px 18px 34px;
}

.welcome-copy {
  min-height: 115px;
  color: white;
  text-align: center;
  text-shadow: 0 3px 12px rgba(120, 29, 18, 0.18);
}

.welcome-kicker {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 13px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
}

.welcome-copy h1 {
  margin: 0;
  font-size: clamp(27px, 8vw, 33px);
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1.25;
}

.welcome-copy p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  letter-spacing: 1.5px;
}

.register-card {
  width: 100%;
  padding: 24px 21px 19px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 20px 42px rgba(116, 23, 18, 0.22), 0 3px 10px rgba(110, 23, 17, 0.09);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.card-heading {
  margin-bottom: 20px;
}

.card-heading h2 {
  margin: 0 0 5px;
  font-size: 21px;
  font-weight: 750;
  letter-spacing: 0.5px;
}

.card-heading p {
  margin: 0;
  color: #aaa3a0;
  font-size: 12px;
}

.field-group {
  margin-bottom: 14px;
}

.field-label {
  display: block;
  margin: 0 0 7px 2px;
  color: #625b58;
  font-size: 12px;
  font-weight: 600;
}

.field-control {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  border: 1px solid #eee9e6;
  border-radius: 15px;
  background: #f8f6f4;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.field-control:focus-within {
  border-color: rgba(239, 63, 50, 0.55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(239, 63, 50, 0.08);
}

.field-group.has-error .field-control {
  border-color: #ed5b50;
  background: #fff9f8;
}

.field-icon {
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  color: #baafaa;
}

.field-icon svg,
.password-toggle svg,
.trust-note svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.field-control input {
  width: 100%;
  min-width: 0;
  height: 50px;
  padding: 0 13px 0 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #302b29;
  font-size: 15px;
}

.field-control input::placeholder {
  color: #b9b3b0;
}

.password-toggle {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 0;
  outline: none;
  background: transparent;
  color: #aaa3a0;
  cursor: pointer;
}

.password-toggle .eye-open,
.password-toggle.is-visible .eye-closed {
  display: none;
}

.password-toggle.is-visible .eye-open {
  display: block;
}

.auto-filled {
  flex: 0 0 auto;
  margin-right: 11px;
  padding: 3px 7px;
  border-radius: 6px;
  background: #fff0e9;
  color: #e15039;
  font-size: 10px;
  white-space: nowrap;
}

.field-error,
.agreement-error {
  min-height: 0;
  margin: 0;
  color: #dd3d35;
  font-size: 11px;
  line-height: 1.5;
}

.field-error:not(:empty) {
  padding: 5px 2px 0;
}

.agreement-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  margin-top: 3px;
  cursor: pointer;
}

.agreement-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.checkmark {
  display: grid;
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  margin-top: 1px;
  place-items: center;
  border: 1.5px solid #cbc4c0;
  border-radius: 50%;
  background: #fff;
  transition: 0.2s;
}

.checkmark svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: white;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  opacity: 0;
  transform: scale(0.6);
  transition: 0.2s;
}

.agreement-row input:checked + .checkmark {
  border-color: var(--brand-red);
  background: var(--brand-red);
  box-shadow: 0 3px 8px rgba(239, 63, 50, 0.25);
}

.agreement-row input:checked + .checkmark svg {
  opacity: 1;
  transform: scale(1);
}

.agreement-row input:focus-visible + .checkmark {
  outline: 3px solid rgba(239, 63, 50, 0.18);
}

.agreement-copy {
  margin-left: 8px;
  color: #77706c;
  font-size: 11.5px;
  line-height: 21px;
}

.agreement-copy a {
  color: #e94b3f;
  text-decoration: none;
}

.agreement-error:not(:empty) {
  padding: 4px 0 0 27px;
}

.submit-button {
  position: relative;
  width: 100%;
  height: 52px;
  margin-top: 17px;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  outline: none;
  background: linear-gradient(100deg, #ff6250 0%, #f33e34 47%, #e72e2d 100%);
  box-shadow: 0 10px 22px rgba(225, 45, 38, 0.26), inset 0 1px rgba(255, 255, 255, 0.24);
  color: white;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.2s;
}

.submit-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -55%;
  width: 42%;
  height: 100%;
  transform: skewX(-22deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
}

.submit-button:active {
  transform: translateY(1px);
  box-shadow: 0 6px 14px rgba(225, 45, 38, 0.22);
}

.submit-button:disabled {
  cursor: default;
  opacity: 0.72;
}

.button-loading {
  display: none;
  align-items: center;
  justify-content: center;
  letter-spacing: 1px;
}

.button-loading i {
  width: 17px;
  height: 17px;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.submit-button.is-loading .button-label {
  display: none;
}

.submit-button.is-loading .button-loading {
  display: flex;
}

.form-message {
  display: none;
  margin: 11px 0 0;
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.form-message.is-error,
.form-message.is-success {
  display: block;
}

.form-message.is-error {
  background: #fff0ef;
  color: #d33a33;
}

.form-message.is-success {
  background: #eef9f1;
  color: #318a4e;
}

.trust-note {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 17px;
  color: #aea7a3;
  font-size: 10.5px;
}

.trust-note svg {
  width: 15px;
  height: 15px;
  margin-right: 5px;
  stroke-width: 1.5;
}

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

@media (max-width: 359px) {
  .register-content { padding-right: 14px; padding-left: 14px; }
  .register-card { padding-right: 17px; padding-left: 17px; }
  .agreement-copy { font-size: 11px; }
}

@media (min-width: 414px) {
  .register-content { padding-right: 24px; padding-left: 24px; }
  .register-card { padding-right: 25px; padding-left: 25px; }
}

@media (max-height: 720px) {
  .register-content { padding-top: 19px; }
  .welcome-copy { min-height: 100px; }
  .register-card { padding-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
