/* Scoped redesign for the registration wizard only. Keeps all form markup and behavior intact. */
.auth {
  --paper: #f5f8f6;
  --ink: #1d342e;
  --deep: #0b6b55;
  --muted: #6d8079;
  --line: #dce7e2;
  --mint: #eff8f3;
  --icon: #7b918a;
  --telegram: #1597c8;
  background: radial-gradient(ellipse at 90% 8%, rgba(216, 239, 224, .72), transparent 33%), #f5f8f6;
  color: var(--ink);
}

.auth-shell {
  min-height: 100vh;
  min-height: 100svh;
  padding: 32px 0 28px;
  overflow: hidden;
}

.auth-content {
  width: min(760px, calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 36px 24px;
  border: 1px solid #e2ebe6;
  border-radius: 26px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 54px rgba(28, 67, 54, .08);
}

.back {
  top: 48px;
  left: calc(50% - 340px);
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: #f7faf8;
  color: var(--deep);
  font-size: 23px;
  box-shadow: 0 4px 14px rgba(28, 67, 54, .06);
  transition: background .18s, transform .18s;
}
.back:hover { background: #eaf4ee; transform: translateX(-2px); }

.brand {
  justify-content: center;
  gap: 10px;
  margin: 0 auto;
}
.brand-mark,
.brand-mark svg { width: 36px; height: 42px; }
.brand-mark svg { stroke-width: 2.2; }
.brand-copy { gap: 3px; }
.brand-copy strong { color: var(--deep); font-size: 19px; letter-spacing: -.04em; }
.brand-copy small { color: #83988f; font-size: 11px; }

.architecture {
  top: 20px;
  right: max(16px, calc(50% - 560px));
  width: 300px;
  height: 300px;
  opacity: .12;
}
.leaf,
.home-indicator { display: none; }

.progress {
  max-width: 430px;
  margin: 24px auto 0;
}
.progress-item { height: 38px; }
.progress-item:before {
  width: 34px;
  height: 34px;
  border-width: 1.5px;
  font-size: 13px;
  font-weight: 700;
}
.progress-item:not(:last-child):after {
  left: calc(50% + 19px);
  right: calc(-50% + 19px);
  height: 1.5px;
}
.progress-item.is-current:before { box-shadow: 0 4px 11px rgba(7, 87, 71, .15); }
.progress-count { margin-top: 8px; color: #70847c; font-size: 12px; font-weight: 700; }

.hero { margin-top: 22px; }
.hero h1 {
  max-width: 580px;
  color: var(--deep);
  font-family: Manrope, Inter, Arial, sans-serif;
  font-size: 34px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -.045em;
}
.hero p {
  max-width: 580px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0;
}

.telegram-block { margin-top: 20px; }
.telegram {
  position: relative;
  gap: 13px;
  min-height: 66px;
  padding: 11px 48px 11px 14px;
  border: 1px solid #d3e8de;
  border-radius: 15px;
  background: linear-gradient(110deg, #f2faf5, #eaf6ef);
  font-size: 15px;
  line-height: 1.28;
  font-weight: 700;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.telegram:hover { border-color: #acd3c2; box-shadow: 0 7px 20px rgba(15, 114, 93, .08); transform: translateY(-1px); }
.telegram-icon { width: 42px; height: 42px; font-size: 21px; }
.telegram-arrow { top: 50%; right: 15px; font-size: 22px; transform: translateY(-50%); }
.divider { gap: 12px; margin: 19px 0 22px; color: #84958f; font-size: 12px; }

.error {
  margin-bottom: 16px;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13px;
}
.pane { animation-duration: .18s; }
.fields { grid-template-columns: 1fr; gap: 14px 14px; }
.field {
  gap: 7px;
  color: #536f66;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
}
.field-control > input,
.field-control > select,
.field-control > textarea {
  height: 52px;
  padding: 0 42px 0 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfc;
  color: var(--ink);
  font: 500 14px/1.4 Manrope, Inter, Arial, sans-serif;
}
.field-control > input::placeholder,
.field-control > textarea::placeholder { color: #98aaa3; }
.field-control > input:focus,
.field-control > select:focus,
.field-control > textarea:focus {
  border-color: #72ad98;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15, 114, 93, .09);
}
.field-control > select {
  padding-right: 38px;
  background-position: calc(100% - 19px) 22px, calc(100% - 13px) 22px;
  background-size: 5px 5px, 5px 5px;
}
.field-control > textarea {
  min-height: 118px;
  padding: 15px 16px 15px 48px;
  line-height: 1.5;
}
.field-icon { top: 15px; left: 15px; width: 22px; height: 22px; color: var(--icon); }
.field-icon svg { width: 18px; height: 18px; stroke-width: 1.8; }
.password-control input { padding-right: 54px; }
.password-toggle { right: 5px; width: 42px; height: 52px; }
.password-toggle svg { width: 21px; height: 21px; }
.gender-options { gap: 8px; }
.gender-options button {
  height: 48px;
  border-radius: 12px;
  font: 700 14px Manrope, Inter, Arial, sans-serif;
}
.field-help { padding: 11px 13px; border-radius: 12px; font-size: 12px; line-height: 1.5; }

.photo-title {
  margin-bottom: 8px;
  font-family: Manrope, Inter, Arial, sans-serif;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.04em;
}
.photo-description { margin-bottom: 16px; font-size: 14px; line-height: 1.5; }
.photo-upload {
  min-height: 122px;
  gap: 7px;
  padding: 18px;
  border-width: 1.5px;
  border-radius: 16px;
}
.photo-upload strong { font-size: 15px; }
.photo-upload small { font-size: 12px; }
.photo-upload-icon {
  width: 42px;
  height: 42px;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(15, 114, 93, .08);
}
.photo-preview { min-height: 120px; margin-bottom: 12px; border-radius: 15px; }
.photo-preview img { height: 220px; }
.photo-preview.is-closed:after { padding: 18px; font-size: 14px; }
.photo-status { min-height: 18px; margin-top: 8px; font-size: 12px; }
.photo-modes { gap: 9px; margin-top: 18px; }
.mode {
  min-height: 94px;
  gap: 5px;
  padding: 12px;
  border-radius: 14px;
  font-size: 13px;
}
.mode small { font-size: 11px; line-height: 1.4; }
.mode-icon {
  width: 27px;
  height: 27px;
  margin-bottom: 1px;
  border-radius: 8px;
  font-size: 15px;
}

.terms { gap: 9px; margin-top: 18px; font-size: 12px; line-height: 1.5; }
.terms input { width: 18px; height: 18px; }
.actions {
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 10px;
  margin-top: 22px;
}
.actions button {
  min-height: 50px;
  padding: 0 16px;
  border-radius: 13px;
  font: 700 14px/1.25 Manrope, Inter, Arial, sans-serif;
}
.actions .next,
.actions .submit { box-shadow: 0 5px 14px rgba(15, 114, 93, .12); }
.trust { gap: 8px; margin-top: 18px; }
.trust-icon { width: 26px; height: 30px; }
.trust-icon svg { width: 23px; height: 26px; }
.trust strong { font-size: 13px; }
.trust small { margin-top: 1px; font-size: 11px; }

.auth button:focus-visible,
.auth a:focus-visible,
.auth input:focus-visible,
.auth select:focus-visible,
.auth textarea:focus-visible,
.auth .photo-upload:focus-visible {
  outline: 3px solid rgba(17, 130, 101, .23);
  outline-offset: 2px;
}

@media (min-width: 700px) {
  .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .auth-shell { padding: 12px 0 18px; }
  .auth-content {
    width: calc(100% - 20px);
    padding: 20px 16px 18px;
    border-radius: 20px;
  }
  .back { top: 22px; left: 20px; width: 36px; height: 36px; font-size: 20px; }
  .brand { gap: 8px; margin: 0 auto; }
  .brand-mark,
  .brand-mark svg { width: 30px; height: 35px; }
  .brand-copy strong { font-size: 16px; }
  .brand-copy small { font-size: 10px; }
  .architecture { display: none; }
  .progress { max-width: 360px; margin-top: 20px; }
  .progress-item { height: 36px; }
  .progress-item:before { width: 32px; height: 32px; font-size: 12px; }
  .progress-item:not(:last-child):after { left: calc(50% + 18px); right: calc(-50% + 18px); }
  .progress-count { margin-top: 7px; }
  .hero { margin-top: 18px; }
  .hero h1 { max-width: 100%; font-size: 29px; line-height: 1.12; }
  .hero p { margin-top: 7px; font-size: 14px; line-height: 1.45; }
  .telegram-block { margin-top: 16px; }
  .telegram { min-height: 58px; gap: 10px; padding: 9px 40px 9px 11px; border-radius: 13px; font-size: 13px; }
  .telegram-icon { width: 36px; height: 36px; font-size: 18px; }
  .telegram-arrow { right: 12px; font-size: 18px; }
  .divider { gap: 9px; margin: 16px 0 18px; font-size: 11px; }
  .fields { grid-template-columns: 1fr; gap: 13px; }
  .field { font-size: 12px; }
  .field-control > input,
  .field-control > select { height: 48px; font-size: 13px; }
  .field-control > select { background-position: calc(100% - 17px) 20px, calc(100% - 11px) 20px; }
  .field-control > textarea { min-height: 106px; padding-top: 13px; font-size: 13px; }
  .field-icon { top: 13px; left: 13px; width: 20px; height: 20px; }
  .field-icon svg { width: 17px; height: 17px; }
  .password-toggle { height: 48px; }
  .gender-options button { height: 44px; font-size: 13px; }
  .photo-title { font-size: 23px; }
  .photo-description { font-size: 13px; }
  .photo-upload { min-height: 112px; }
  .photo-preview img { height: 190px; }
  .photo-modes { grid-template-columns: 1fr; gap: 8px; margin-top: 14px; }
  .mode { min-height: 0; grid-template-columns: 27px 1fr; align-items: center; column-gap: 9px; }
  .mode-icon { grid-row: span 2; margin: 0; }
  .mode small { grid-column: 2; }
  .terms { margin-top: 15px; font-size: 11px; }
  .actions { margin-top: 18px; }
  .actions button { min-height: 46px; padding: 0 11px; font-size: 13px; }
  .trust { margin-top: 15px; }
}

@media (max-width: 380px) {
  .auth-content { padding-right: 13px; padding-left: 13px; }
  .brand-copy strong { font-size: 15px; }
  .brand-copy small { font-size: 9px; }
  .hero h1 { font-size: 27px; }
  .telegram { font-size: 12px; }
  .actions { gap: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth *, .auth *::before, .auth *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Location/nationality inputs are wrapped by the existing autocomplete script. */
.autocomplete-wrap {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}
.autocomplete-wrap > input {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 42px 0 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: #fbfdfc;
  color: var(--ink);
  font: 500 14px/1.4 Manrope, Inter, Arial, sans-serif;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.autocomplete-wrap > input::placeholder { color: #98aaa3; opacity: 1; }
.autocomplete-wrap > input:focus {
  border-color: #72ad98;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15, 114, 93, .09);
}
.autocomplete-list {
  position: absolute;
  z-index: 8;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  max-height: 220px;
  overflow: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(28, 67, 54, .14);
}
.autocomplete-list[hidden] { display: none !important; }
.autocomplete-item {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font: 500 13px/1.4 Manrope, Inter, Arial, sans-serif;
  cursor: pointer;
}
.autocomplete-item:hover,
.autocomplete-item:focus-visible { background: var(--mint); color: var(--deep); }

@media (max-width: 700px) {
  .autocomplete-wrap > input { height: 48px; font-size: 13px; }
}
