:root {
  --bg: #070707;
  --bg-soft: #111111;
  --surface: rgba(30, 30, 30, 0.88);
  --surface-strong: rgba(22, 22, 22, 0.96);
  --surface-line: rgba(255, 255, 255, 0.14);
  --text: #f5f5f7;
  --text-soft: rgba(255, 255, 255, 0.72);
  --text-faint: rgba(255, 255, 255, 0.48);
  --accent: #7a4dff;
  --accent-strong: #8f65ff;
  --accent-soft: rgba(122, 77, 255, 0.24);
  --danger: #ff6d7f;
  --success: #6be6b2;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #000;
}

body {
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 68%, rgba(122, 77, 255, 0.22), transparent 24rem),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.06), transparent 18rem),
    linear-gradient(180deg, #161616 0%, #0b0b0b 38%, #000000 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: black;
  pointer-events: none;
}

.page-shell {
  display: none;
}

.page {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 20px calc(28px + env(safe-area-inset-bottom));
}

.card,
.step-card,
.survey-card,
.survey-start-card,
.survey-finish-card,
.waiting-card,
.rejected-card,
.auth-card,
.age-card,
.call-screen {
  min-height: calc(100vh - 28px);
  display: flex;
  flex-direction: column;
}

.mobile-header,
.mobile-header.center-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.mobile-header-side {
  position: static !important;
}

.mobile-header-title,
.header-chip {
  color: var(--text);
}

.back-link,
.circle-btn,
.profile-trigger,
.header-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  box-shadow: none;
  text-decoration: none;
  font-size: 26px;
}

.header-chip {
  width: auto;
  padding: 0 8px;
  font-size: 14px;
  opacity: 0.7;
}

.screen-panel {
  background: var(--surface-strong);
  border: 1px solid var(--surface-line);
  border-radius: 24px;
  padding: 22px 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.screen-panel.flat {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

body[data-screen="phone"] .page,
body[data-step="name"] .page,
body[data-step="birth_year"] .page,
body[data-step="age"] .page,
body[data-step="residence_year"] .page {
  background:
    radial-gradient(circle at 70% 78%, rgba(255, 255, 255, 0.035), transparent 16rem),
    linear-gradient(180deg, #262626 0%, #232323 44%, #202020 100%);
}

body[data-screen="phone"] .screen-panel.flat,
body[data-step="name"] .screen-panel.flat,
body[data-step="birth_year"] .screen-panel.flat,
body[data-step="age"] .screen-panel.flat,
body[data-step="residence_year"] .screen-panel.flat {
  padding-top: 6px;
}

body[data-screen="phone"] .auth-card,
body[data-step="name"] .auth-card,
body[data-step="birth_year"] .auth-card,
body[data-step="age"] .age-card,
body[data-step="residence_year"] .auth-card {
  justify-content: flex-start;
  padding-top: 4px;
}

body[data-screen="phone"] .auth-header,
body[data-step="name"] .auth-header,
body[data-step="birth_year"] .auth-header,
body[data-step="residence_year"] .auth-header {
  margin-bottom: 22px;
}

body[data-screen="phone"] .input-mobile-header,
body[data-step="name"] .input-mobile-header,
body[data-step="birth_year"] .input-mobile-header,
body[data-step="age"] .input-mobile-header,
body[data-step="residence_year"] .input-mobile-header {
  justify-content: flex-start;
  margin: 6px 0 28px;
}

body[data-screen="phone"] .input-back-link,
body[data-step="name"] .input-back-link,
body[data-step="birth_year"] .input-back-link,
body[data-step="age"] .input-back-link,
body[data-step="residence_year"] .input-back-link {
  width: auto;
  height: auto;
  padding: 0;
  border-radius: 0;
  font-size: 42px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.9);
}

body[data-screen="phone"] .input-screen-panel,
body[data-step="name"] .input-screen-panel,
body[data-step="birth_year"] .input-screen-panel,
body[data-step="age"] .input-screen-panel,
body[data-step="residence_year"] .input-screen-panel {
  padding-top: 0;
}

body[data-screen="phone"] .input-auth-header,
body[data-step="name"] .input-auth-header,
body[data-step="birth_year"] .input-auth-header,
body[data-step="age"] .input-auth-header,
body[data-step="residence_year"] .input-auth-header {
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

body[data-screen="phone"] .phone-auth-title,
body[data-step="name"] .auth-title,
body[data-step="birth_year"] .auth-title,
body[data-step="residence_year"] .auth-title,
body[data-step="age"] .age-title {
  /* font-size: clamp(24px, 5vw, 34px); */
  text-align: left;
  /* line-height: 1.15; */
  letter-spacing: -0.03em;
}

body[data-screen="phone"] .phone-form.auth-form,
body[data-step="name"] .auth-form,
body[data-step="birth_year"] .auth-form,
body[data-step="residence_year"] .auth-form,
body[data-step="age"] .age-form {
  gap: 16px;
}

body[data-screen="phone"] .field-label,
body[data-step="name"] .field-label,
body[data-step="birth_year"] .field-label,
body[data-step="residence_year"] .field-label,
body[data-step="age"] .field-label,
body[data-step="age"] .age-copy {
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  font-weight: 500;
}

body[data-screen="phone"] .phone-field,
body[data-step="name"] .phone-field,
body[data-step="residence_year"] .phone-field,
body[data-step="age"] .age-code-shell,
body[data-step="birth_year"] .birth-year-code-shell {
  min-height: 70px;
  padding: 0 18px;
  border: 1.4px solid rgba(255, 255, 255, 0.58);
  border-radius: 16px;
  background: rgba(22, 22, 22, 0.96);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

body[data-step="birth_year"] .birth-year-code-shell,
body[data-step="age"] .age-code-shell {
  display: flex;
  align-items: center;
}

body[data-step="birth_year"] .birth-year-code,
body[data-step="age"] .age-code {
  width: 100%;
  margin-top: 0;
}

body[data-screen="phone"] .phone-field input,
body[data-step="name"] .phone-field input,
body[data-step="residence_year"] .phone-field input,
body[data-step="birth_year"] .birth-year-native-input,
body[data-step="age"] .age-native-input {
  font-size: 22px;
  font-weight: 500;
  color: #ffffff;
}

body[data-screen="phone"] .phone-field input,
body[data-step="name"] .phone-field input,
body[data-step="residence_year"] .phone-field input,
body[data-step="birth_year"] .birth-year-native-input,
body[data-step="age"] .age-native-input {
  letter-spacing: 0;
}

body[data-screen="phone"] .field-action,
body[data-step="name"] .field-action {
  color: rgba(255, 255, 255, 0.9);
}

body[data-screen="phone"] .auth-submit,
body[data-step="name"] .auth-submit,
body[data-step="birth_year"] .auth-submit,
body[data-step="residence_year"] .auth-submit,
body[data-step="age"] .auth-submit {
  min-height: 72px;
  margin-top: 20px;
  border-radius: 16px;
  background: linear-gradient(180deg, #8c63ff 0%, #7548f2 100%);
  box-shadow: 0 16px 32px rgba(122, 77, 255, 0.22);
  font-size: 18px;
}

body[data-screen="phone"] .status,
body[data-step="name"] .status,
body[data-step="birth_year"] .status,
body[data-step="residence_year"] .status,
body[data-step="age"] .status {
  margin-top: 2px;
}

body[data-screen="phone"] .phone-auth-card .status,
body[data-screen="phone"] .phone-auth-card .field-error {
  text-align: left;
}

body[data-screen="phone"] .phone-auth-card .auth-submit + .status,
body[data-step="name"] .auth-submit + .status {
  margin-top: 6px;
}

body[data-screen="phone"] .input-screen-card .field-error,
body[data-step="name"] .input-screen-card .field-error,
body[data-step="birth_year"] .input-screen-card .field-error,
body[data-step="age"] .input-screen-card .field-error,
body[data-step="residence_year"] .input-screen-card .field-error {
  min-height: 18px;
  margin-top: -6px;
  text-align: left;
}

body[data-screen="phone"] .phone-inline-waiting,
body[data-step="birth_year"] .flow-inline-waiting,
body[data-step="age"] .flow-inline-waiting {
  backdrop-filter: blur(6px);
}

body[data-step="waiting"] .page {
  background:
    radial-gradient(circle at 70% 78%, rgba(255, 255, 255, 0.035), transparent 16rem),
    linear-gradient(180deg, #262626 0%, #232323 44%, #202020 100%);
}

body[data-step="waiting"] .waiting-card {
  justify-content: center;
  align-items: stretch;
  min-height: calc(100vh - 28px);
}

body[data-step="waiting"] .waiting-card .screen-panel {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  padding: 26px 22px 24px;
  border-radius: 22px;
  background: rgba(24, 24, 24, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.3);
}

body[data-step="waiting"] .waiting-copy h1 {
  margin-bottom: 8px;
  font-size: clamp(28px, 5vw, 38px);
}

body[data-step="waiting"] .waiting-copy .subtitle {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
}

body[data-step="waiting"] .waiting-loading-box {
  gap: 12px;
}

body[data-step="waiting"] .waiting-status {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  line-height: 1.45;
}

body[data-step="approved"] .rejected-card,
body[data-step="unavailable"] .rejected-card {
  justify-content: center;
}

body[data-step="approved"] .rejected-card .screen-panel,
body[data-step="unavailable"] .rejected-card .screen-panel {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 230px;
}

.survey-finish-card {
  justify-content: center;
}

.survey-finish-card .screen-panel {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  min-height: 230px;
}

.hero-stage {
  position: relative;
  min-height: 360px;
  margin: 0 0 24px;
  padding: 8px 0 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.hero-stage::before {
  content: "WELCOME TO";
  position: absolute;
  top: 74px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 16px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.9);
}

.hero-stage-visual {
  position: relative;
  height: 340px;
  margin-top: 20px;
  background: center top / contain no-repeat url("./img/header.jpg");
}

.hero-ring,
.hero-pedestal,
.hero-phone::after {
  display: none;
}

.hero-phone,
.hero-float-card,
.hero-float-icon {
  display: none;
}

.hero-ball {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0%, rgba(165, 122, 255, 0.98) 46%, rgba(55, 18, 130, 0.9) 100%);
  box-shadow: 0 0 30px rgba(122, 77, 255, 0.3);
}

.hero-ball.left {
  left: 44px;
  bottom: 42px;
  width: 22px;
  height: 22px;
}

.hero-ball.right {
  right: 58px;
  bottom: 18px;
  width: 34px;
  height: 34px;
}

.hero-ball.small {
  right: 26px;
  bottom: 100px;
  width: 14px;
  height: 14px;
}

.welcome-actions,
.welcome-secondary,
.bottom-nav {
  margin-top: auto;
}

.submit-btn,
.primary-cta {
  width: 100%;
  min-height: 58px;
  padding: 14px 18px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--accent-strong) 0%, var(--accent) 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(122, 77, 255, 0.28);
}

.secondary-btn,
.ghost-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.ghost-btn {
  min-height: 50px;
}

.submit-btn:disabled,
.submit-btn.is-inactive {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.48);
  box-shadow: none;
}

.field-label,
.auth-label,
.evoca-label {
  display: block;
  margin: 0 0 10px;
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 600;
}

.phone-form,
.step-form,
.survey-form,
.auth-form,
.evoca-form,
.survey-stack {
  display: grid;
  gap: 14px;
}

.phone-form-fields {
  display: grid;
  gap: 10px;
}

.phone-field,
.single-field,
.input-with-icon {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 14px;
  background: rgba(22, 22, 22, 0.9);
}

.phone-field input,
.evoca-input,
.otp-input,
.age-native-input,
.birth-year-native-input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 18px;
  font-weight: 600;
}

.phone-field input::placeholder,
.evoca-input::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.field-action,
.input-icon {
  color: rgba(255, 255, 255, 0.76);
}

.auth-title,
.auth-title-left,
.hero-copy h1,
.step-copy h1,
.call-title,
.pin-title {
  margin: 0;
  color: var(--text);
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.subtitle,
.help-text,
.call-note,
.auth-note,
.loading-text,
.panel-copy,
.evoca-hint {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.55;
}

.status,
.field-error {
  margin: 0;
  min-height: 20px;
  font-size: 14px;
  font-weight: 700;
}

.status.is-error,
.field-error,
.error-card {
  color: var(--danger);
}

.error-card {
  display: block;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.survey-progress,
.survey-progress-dark {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.survey-progress span,
.survey-dot {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.survey-progress .survey-progress-active,
.survey-dot.active {
  background: linear-gradient(90deg, var(--accent-strong) 0%, var(--accent) 100%);
}

.survey-option,
.survey-card-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.survey-option input,
.survey-card-option input {
  accent-color: var(--accent);
}

.loading-box,
.flow-inline-waiting,
.phone-inline-waiting {
  display: grid;
  justify-items: center;
  gap: 16px;
}

.loading-ring,
.phone-waiting-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}

.waiting-status,
.call-copy,
.step-copy,
.hero-copy {
  text-align: center;
}

.call-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.call-brand img {
  filter: brightness(1.4) grayscale(1);
}

.call-phone {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
}

.call-timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px auto 0;
}

.call-timer-box {
  min-width: 54px;
  padding: 12px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 22px;
  font-weight: 800;
}

.call-timer-sep {
  font-size: 22px;
  color: rgba(255, 255, 255, 0.72);
}

.birth-year-page,
.age-page {
  width: min(100%, 430px);
  padding: max(14px, env(safe-area-inset-top)) 20px calc(28px + env(safe-area-inset-bottom));
}

.birth-year-sheet,
.age-sheet {
  min-height: auto;
  background: transparent;
}

.birth-year-header,
.age-header {
  padding: 0 0 18px;
  border: 0;
  background: transparent;
}

.birth-year-title,
.age-title {
  color: var(--text);
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 800;
}

.birth-year-form,
.age-form {
  min-height: auto;
  padding: 0;
  display: grid;
  gap: 16px;
}

.birth-year-copy,
.age-copy {
  color: var(--text-soft);
  text-align: left;
}

.birth-year-open-btn {
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.birth-year-code,
.age-code {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.age-code {
  grid-template-columns: repeat(4, 1fr);
}

.birth-year-slot,
.age-slot {
  min-height: 48px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.24);
  color: #fff;
}

.birth-year-slot.is-active,
.birth-year-slot.is-filled,
.age-slot.is-active,
.age-slot.is-filled {
  border-bottom-color: var(--accent);
}

.age-timer {
  text-align: center;
  color: var(--text-soft);
  margin: 4px 0;
}

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding-top: 24px;
}

.bottom-nav-item {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  text-align: center;
}

.bottom-nav-icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
}

.panel-card,
.form-card {
  background: rgba(28, 28, 28, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 20px 16px;
}

.panel-screen,
.state-screen,
.auth-screen,
.survey-screen,
.finish-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - 90px);
}

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

@media (max-width: 420px) {
  .page,
  .birth-year-page,
  .age-page {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-stage {
    min-height: 320px;
  }

  .hero-stage-visual {
    height: 308px;
  }
}

.landing-page {
  display: flex;
  align-items: stretch;
}

.landing-card {
  width: 100%;
  min-height: calc(100vh - 28px);
  display: flex;
  flex-direction: column;
  padding: 18px 4px 12px;
}

.landing-globe {
  align-self: flex-end;
  margin: 10px 6px 22px 0;
  color: #fff;
  font-size: 38px;
  line-height: 1;
}

.landing-brand {
  text-align: center;
}

.landing-overline {
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.landing-wordmark {
  color: #ffffff;
  text-align: center;
  font-size: clamp(34px, 8vw, 62px);
  line-height: 0.98;
  letter-spacing: -0.08em;
  margin: 0 auto;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0;
  text-transform: none;
}

.landing-wordmark-strong {
  font-weight: 800;
  letter-spacing: -0.09em;
}

.landing-wordmark-light {
  font-weight: 300;
  letter-spacing: -0.06em;
}


.landing-hero {
  flex: 0;
  min-height: 420px;
  margin: 12px 0 22px;
  background: center top / contain no-repeat url("./img/logos.jpg");
}

.landing-actions {
  padding: 0 2px 12px;
}

.landing-btn {
  min-height: 60px;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f1f1f1 100%);
  color: #6b30ff;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}
