#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.signup-page,
.result-screen {
  position: relative;
  z-index: 1;
}

.signup-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 48px);
}

.signup-shell {
  width: min(100%, 1120px);
  min-height: min(760px, calc(100svh - 36px));
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1fr);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.064), rgba(255, 255, 255, 0.022)),
    rgba(7, 10, 25, 0.56);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 30px 90px rgba(0, 0, 0, 0.48),
    0 0 72px rgba(0, 229, 255, 0.08);
  overflow: hidden;
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
}

.brand-panel {
  position: relative;
  min-height: 100%;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 28px;
  padding: clamp(28px, 5vw, 56px);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 35%, rgba(0, 229, 255, 0.18), transparent 32%),
    radial-gradient(circle at 64% 64%, rgba(57, 255, 20, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(4, 4, 14, 0.08), rgba(4, 4, 14, 0.72));
}

.brand-orbit {
  position: relative;
  width: min(80%, 340px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(0, 229, 255, 0.18), transparent 48%),
    radial-gradient(circle at center, rgba(57, 255, 20, 0.08), transparent 68%);
  border: 1px solid rgba(0, 229, 255, 0.2);
  box-shadow: 0 0 72px rgba(0, 229, 255, 0.18);
  animation: orbitGlow 4.8s var(--ease-out) infinite;
}

.brand-orbit::before,
.brand-orbit::after {
  content: "";
  position: absolute;
  inset: 11%;
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 50%;
  box-shadow: inset 0 0 28px rgba(0, 229, 255, 0.07);
}

.brand-orbit::after {
  inset: 20%;
  border-color: rgba(245, 158, 11, 0.2);
  box-shadow: inset 0 0 24px rgba(57, 255, 20, 0.07);
  animation: innerOrbitPulse 4.8s var(--ease-out) infinite;
}

.brand-mark {
  position: relative;
  z-index: 1;
  width: 48%;
  height: 48%;
  object-fit: contain;
  filter:
    drop-shadow(0 0 20px rgba(0, 229, 255, 0.62))
    drop-shadow(0 0 45px rgba(57, 255, 20, 0.18));
  animation: brandPulse 4.8s var(--ease-out) infinite;
}

.brand-copy {
  position: relative;
  text-align: center;
}

.brand-kicker,
.stage-kicker,
.progress-label,
.question-index,
.field-hint {
  letter-spacing: 0;
}

.brand-kicker,
.stage-kicker {
  margin: 0 0 8px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.brand-copy .brand-kicker {
  margin-bottom: 6px;
  font-family: var(--font-heading);
  font-size: 1.42rem;
  font-weight: 800;
  line-height: 1;
}

.brand-copy p:last-child {
  margin: 0;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
}

.form-stage {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 6vw, 64px);
}

.stage-header {
  min-width: 0;
  max-width: 660px;
  margin-bottom: clamp(22px, 4vh, 34px);
  animation: fadeInUp 0.7s var(--ease-out) both;
}

.stage-header h1,
.result-screen h2 {
  margin: 0;
  max-width: 100%;
  font-family: var(--font-heading);
  font-size: 4rem;
  line-height: 1;
  font-weight: 800;
  overflow-wrap: break-word;
  background: linear-gradient(135deg, #fff 0%, var(--cyan) 42%, #8fabff 74%, var(--violet-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 34px rgba(0, 229, 255, 0.2));
}

.stage-header h1 span {
  display: block;
}

.stage-header p:last-child,
.result-screen p {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--text-secondary);
  font-size: 1.12rem;
}

.progress-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(24px, 4vh, 34px);
}

.progress-track {
  position: relative;
  flex: 1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 16.66%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.34);
  transition: width var(--dur-base) var(--ease-out);
}

.progress-label {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.question-form {
  min-width: 0;
}

.question {
  min-height: 220px;
  animation: stepIn 0.38s var(--ease-out) both;
}

.question-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 38px;
  margin-bottom: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--cyan-border);
  background: rgba(0, 229, 255, 0.08);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
}

.question > label,
.question legend {
  display: block;
  margin: 0 0 18px;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 2.65rem;
  font-weight: 800;
  line-height: 1.08;
}

.question input[type="text"],
.question input[type="email"] {
  width: 100%;
  min-height: 66px;
  padding: 0 18px;
  border: 0;
  border-bottom: 1px solid rgba(0, 229, 255, 0.32);
  border-radius: 0;
  outline: none;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-primary);
  font-size: 1.55rem;
  transition: border-color var(--dur-base), background var(--dur-base), box-shadow var(--dur-base);
}

.question input[type="text"]:focus,
.question input[type="email"]:focus {
  border-color: var(--green);
  background: rgba(57, 255, 20, 0.035);
  box-shadow: 0 18px 56px rgba(0, 229, 255, 0.08);
}

.question input::placeholder {
  color: rgba(166, 166, 200, 0.45);
}

.field-hint {
  margin: 10px 0 18px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.field-error {
  min-height: 24px;
  margin: 12px 0 0;
  color: #ff8a8a;
  font-size: 0.94rem;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.choice-stack {
  display: grid;
  gap: 10px;
}

.choice-chip,
.moment-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.024)),
    rgba(7, 10, 25, 0.5);
  color: var(--text-secondary);
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast), background var(--dur-fast), color var(--dur-fast);
}

.choice-chip input,
.moment-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-chip span,
.moment-chip span {
  min-width: 0;
  overflow-wrap: normal;
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.18;
}

.choice-chip::before,
.moment-chip::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border-radius: 6px;
  border: 1px solid rgba(0, 229, 255, 0.38);
  background: rgba(0, 229, 255, 0.06);
}

.moment-chip::before {
  border-radius: 50%;
}

.choice-chip:has(input:checked),
.moment-chip:has(input:checked) {
  color: var(--text-primary);
  border-color: rgba(57, 255, 20, 0.48);
  background:
    linear-gradient(135deg, rgba(57, 255, 20, 0.13), rgba(0, 229, 255, 0.08)),
    rgba(255, 255, 255, 0.055);
  transform: translateY(-1px);
}

.choice-chip:has(input:checked)::before,
.moment-chip:has(input:checked)::before {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 18px rgba(57, 255, 20, 0.28);
}

.terms-box {
  display: block;
  padding: 20px;
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(0, 229, 255, 0.08), rgba(124, 58, 237, 0.07)),
    rgba(255, 255, 255, 0.036);
}

.terms-box p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65;
}

.terms-box p + p {
  margin-top: 12px;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  margin-top: clamp(18px, 4vh, 34px);
}

.back-button,
.next-button,
.agree-button,
.refuse-button,
.restart-button,
.telegram-button {
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-weight: 800;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base), background var(--dur-base);
}

.back-button {
  width: 52px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-primary);
}

.next-button,
.agree-button,
.telegram-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: min(100%, 210px);
  padding: 0 24px;
  background: var(--green);
  color: var(--green-dark);
  box-shadow: 0 0 32px rgba(57, 255, 20, 0.2);
}

.refuse-button,
.restart-button {
  padding: 0 20px;
  border: 1px solid rgba(255, 138, 138, 0.25);
  background: rgba(255, 138, 138, 0.08);
  color: #ffd1d1;
}

.terms-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  gap: 12px;
}

.turnstile-slot {
  height: 0;
  overflow: hidden;
}

.agree-button {
  min-width: 0;
  padding: 0 24px;
  background: var(--green);
  color: var(--green-dark);
  box-shadow: 0 0 32px rgba(57, 255, 20, 0.2);
}

.restart-button {
  margin-top: 28px;
}

.back-button:hover,
.next-button:hover,
.agree-button:hover,
.refuse-button:hover,
.restart-button:hover,
.telegram-button:hover {
  transform: translateY(-2px);
}

.next-button:disabled {
  opacity: 0.7;
  transform: none;
}

.agree-button:disabled,
.refuse-button:disabled {
  opacity: 0.7;
  transform: none;
}

.result-screen {
  width: min(100%, 660px);
  margin: auto;
  padding: clamp(36px, 7vw, 64px);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.024)),
    rgba(7, 10, 25, 0.58);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  animation: stepIn 0.46s var(--ease-out) both;
}

.result-screen p {
  margin-left: auto;
  margin-right: auto;
}

.result-screen p > span {
  display: block;
}

.mobile-line {
  display: inline;
}

.result-screen h2 span {
  display: inline;
}

.nowrap {
  white-space: nowrap;
}

.result-mark {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: 0 auto 22px;
  border-radius: 50%;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
}

.result-mark.is-success {
  background: rgba(57, 255, 20, 0.12);
  color: var(--green);
  border: 1px solid rgba(57, 255, 20, 0.32);
}

.result-mark.is-refused {
  background: rgba(255, 138, 138, 0.1);
  color: #ffb1b1;
  border: 1px solid rgba(255, 138, 138, 0.32);
}

.telegram-button {
  margin-top: 28px;
}

@media (max-width: 900px) {
  .stage-header h1,
  .result-screen h2 {
    font-size: 3.3rem;
  }

  .question > label,
  .question legend {
    font-size: 2.15rem;
  }

  .signup-shell {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    min-height: 210px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .brand-orbit {
    width: 210px;
  }
}

@media (max-width: 640px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .signup-page {
    display: grid;
    place-items: center;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    padding: 12px;
  }

  .signup-shell {
    width: 100%;
    max-width: calc(100vw - 24px);
    min-height: auto;
    border-radius: var(--radius-lg);
  }

  .brand-panel {
    min-height: 178px;
    display: grid;
    gap: 10px;
    padding: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .brand-orbit {
    width: 112px;
  }

  .brand-copy p:last-child {
    font-size: 0.86rem;
  }

  .brand-kicker {
    margin-bottom: 4px;
  }

  .brand-copy .brand-kicker {
    font-size: 1.08rem;
  }

  .form-stage {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    min-height: auto;
    justify-content: flex-start;
    padding: 20px 18px;
  }

  .stage-header {
    width: 100%;
    max-width: 100%;
    margin-bottom: 18px;
  }

  .stage-header h1,
  .result-screen h2 {
    font-size: 1.9rem;
  }

  .stage-header p:last-child,
  .result-screen p {
    max-width: 28ch;
    margin-top: 12px;
    font-size: 0.95rem;
    overflow-wrap: break-word;
  }

  .progress-wrap {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 16px;
  }

  .progress-track {
    width: 100%;
  }

  .question {
    min-height: auto;
  }

  .question > label,
  .question legend {
    margin-bottom: 12px;
    font-size: 1.46rem;
  }

  .question input[type="text"],
  .question input[type="email"] {
    min-height: 54px;
    font-size: 1.25rem;
  }

  .question-index {
    width: 44px;
    height: 36px;
    margin-bottom: 14px;
  }

  .action-row {
    margin-top: 14px;
  }

  .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .choice-chip {
    min-height: 38px;
    padding: 8px 9px;
  }

  .choice-chip span {
    font-size: 0.78rem;
  }

  .terms-box {
    padding: 16px;
  }

  .terms-box p {
    font-size: 0.94rem;
    line-height: 1.5;
  }

  .action-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 260px);
    justify-content: start;
    align-items: stretch;
    width: 100%;
  }

  .next-button,
  .agree-button,
  .refuse-button {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .next-button {
    grid-column: 2;
  }

  .terms-actions {
    grid-column: 2;
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .result-screen {
    width: min(100%, calc(100vw - 24px));
    padding: 32px 22px;
  }

  .result-screen h2 span {
    display: block;
  }

  .result-screen p {
    max-width: 30ch;
  }

  .result-screen[data-result="refused"] p {
    max-width: 28ch;
  }

  .mobile-line {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-orbit,
  .brand-orbit::after,
  .brand-mark {
    animation: none;
  }
}

@keyframes orbitGlow {
  0%,
  100% {
    box-shadow: 0 0 62px rgba(0, 229, 255, 0.14);
    border-color: rgba(0, 229, 255, 0.18);
  }

  50% {
    box-shadow: 0 0 88px rgba(0, 229, 255, 0.25);
    border-color: rgba(0, 229, 255, 0.3);
  }
}

@keyframes innerOrbitPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.78;
  }

  50% {
    transform: scale(1.045);
    opacity: 1;
  }
}

@keyframes brandPulse {
  0%,
  100% {
    transform: scale(1);
    filter:
      drop-shadow(0 0 18px rgba(0, 229, 255, 0.58))
      drop-shadow(0 0 38px rgba(57, 255, 20, 0.16));
  }

  50% {
    transform: scale(1.035);
    filter:
      drop-shadow(0 0 25px rgba(0, 229, 255, 0.78))
      drop-shadow(0 0 56px rgba(57, 255, 20, 0.22));
  }
}
