:root {
  --night: #120816;
  --night-soft: #1d0f24;
  --plum: #3b183d;
  --paper: #f8f1e8;
  --paper-muted: #d9cdd9;
  --rose: #ed9c86;
  --rose-bright: #ffb49c;
  --gold: #f0ca83;
  --ink: #241326;
  --line: rgba(255, 255, 255, 0.15);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --page-background:
    radial-gradient(circle at 8% 18%, rgba(203, 78, 122, 0.18), transparent 28%),
    radial-gradient(circle at 88% 82%, rgba(113, 68, 163, 0.22), transparent 32%),
    linear-gradient(135deg, #0d0712 0%, #170b1c 52%, #21102a 100%);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  min-width: 320px;
  background: var(--page-background);
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior-y: none;
}

body {
  min-height: 100svh;
  margin: 0;
  background: var(--page-background);
  color: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior-y: none;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(240, 202, 131, 0.8);
  outline-offset: 3px;
}

.site-shell {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  padding: 28px;
  background: var(--page-background);
}

.site-shell::before,
.site-shell::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
}

.site-shell::before {
  opacity: 0.45;
  background-image:
    radial-gradient(circle at 12% 23%, white 0 1px, transparent 1.5px),
    radial-gradient(circle at 74% 16%, white 0 1px, transparent 1.5px),
    radial-gradient(circle at 42% 82%, white 0 1px, transparent 1.5px),
    radial-gradient(circle at 88% 61%, white 0 1px, transparent 1.5px),
    radial-gradient(circle at 28% 58%, white 0 0.8px, transparent 1.4px);
  background-size: 250px 250px, 340px 340px, 300px 300px, 420px 420px, 220px 220px;
}

.site-shell::after {
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(90deg, transparent 49.9%, rgba(255, 255, 255, 0.025) 50%, transparent 50.1%);
}

.ambient {
  position: absolute;
  z-index: 0;
  width: 34vw;
  height: 34vw;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  pointer-events: none;
}

.ambient-one {
  top: -18vw;
  left: -8vw;
}

.ambient-two {
  right: -15vw;
  bottom: -20vw;
  width: 42vw;
  height: 42vw;
}

.intro-panel,
.quiz-panel,
.result-panel {
  position: relative;
  z-index: 1;
  width: min(1160px, 100%);
  min-height: min(760px, calc(100svh - 56px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(24, 12, 31, 0.78);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(22px);
}

.intro-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.brand-row,
.quiz-header,
.result-topline {
  display: flex;
  align-items: center;
  min-height: 82px;
  padding: 0 42px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  margin-right: 13px;
  place-items: center;
  border: 1px solid rgba(240, 202, 131, 0.45);
  border-radius: 50%;
  color: var(--gold);
  background: rgba(240, 202, 131, 0.08);
}

.brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-copy strong {
  font-size: 13px;
  letter-spacing: 0.18em;
}

.brand-copy span {
  color: var(--paper-muted);
  font-size: 11px;
}

.time-pill {
  margin-left: auto;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--paper-muted);
  font-size: 12px;
}

.intro-main {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  align-items: center;
  gap: 48px;
  padding: 46px 64px 38px;
}

.intro-copy {
  max-width: 640px;
}

.eyebrow,
.question-kicker {
  margin: 0 0 16px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.intro-copy h1,
.question-stage h1,
.result-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.045em;
}

.intro-copy h1 {
  max-width: 660px;
  font-size: clamp(56px, 6.7vw, 96px);
  line-height: 0.88;
}

.intro-copy h1 em,
.result-copy h1 em {
  display: block;
  color: var(--rose-bright);
  font-weight: 400;
}

.intro-copy h1 em {
  margin-left: 0;
}

.intro-lead {
  max-width: 570px;
  margin: 26px 0 28px;
  color: var(--paper-muted);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.55;
}

.primary-button,
.telegram-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  min-height: 58px;
  padding: 0 24px;
  border: 0;
  border-radius: 14px;
  color: var(--ink);
  background: linear-gradient(135deg, var(--rose-bright), #f2c58a);
  box-shadow: 0 15px 40px rgba(233, 133, 112, 0.2);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.primary-button:hover,
.telegram-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 18px 50px rgba(233, 133, 112, 0.32);
}

.primary-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.7);
  opacity: 0.42;
  transform: none;
}

.privacy-note {
  max-width: 470px;
  margin: 14px 0 0;
  color: rgba(217, 205, 217, 0.58);
  font-size: 11px;
  line-height: 1.45;
}

.zodiac-visual {
  position: relative;
  display: grid;
  width: min(390px, 30vw);
  aspect-ratio: 1;
  place-items: center;
  justify-self: center;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(240, 202, 131, 0.25);
  border-radius: 50%;
}

.orbit-large {
  inset: 5%;
  animation: slow-spin 36s linear infinite;
}

.orbit-large::before,
.orbit-small::before {
  position: absolute;
  top: 50%;
  left: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 20px var(--gold);
  content: "";
}

.orbit-small {
  inset: 21%;
  border-style: dashed;
  animation: slow-spin 24s linear infinite reverse;
}

.zodiac-core {
  display: grid;
  width: 42%;
  aspect-ratio: 1;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(237, 156, 134, 0.3), rgba(59, 24, 61, 0.88));
  box-shadow: 0 0 70px rgba(237, 156, 134, 0.18);
}

.zodiac-core span {
  font-family: var(--serif);
  font-size: clamp(48px, 5vw, 72px);
  line-height: 0.8;
}

.zodiac-core small {
  margin-top: 10px;
  color: var(--paper-muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.zodiac-glyph {
  position: absolute;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold);
  background: rgba(18, 8, 22, 0.8);
  font-size: 23px;
}

.glyph-one { top: 0; left: 44%; }
.glyph-two { top: 46%; right: 0; }
.glyph-three { right: 17%; bottom: 4%; }
.glyph-four { bottom: 18%; left: 3%; }

.legal-strip {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr 1fr 1.35fr auto;
  align-items: center;
  gap: 22px;
  min-height: 94px;
  padding: 16px 42px;
  border-top: 1px solid var(--line);
  background: rgba(5, 2, 8, 0.24);
}

.legal-strip > div {
  display: grid;
  gap: 5px;
}

.legal-strip strong {
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
}

.legal-label {
  color: rgba(217, 205, 217, 0.55);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-link,
.quiz-footer a,
.result-footer a {
  color: var(--paper);
  font-size: 11px;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 4px;
}

.legal-link {
  max-width: 150px;
  color: var(--gold);
  line-height: 1.35;
}

.quiz-panel {
  display: grid;
  grid-template-rows: auto 3px 1fr auto;
  width: min(980px, 100%);
}

.quiz-header {
  justify-content: space-between;
}

.mini-brand {
  border: 0;
  color: var(--paper);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  cursor: pointer;
}

.mini-brand span {
  margin-right: 8px;
  color: var(--gold);
}

.progress-copy {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--paper-muted);
  font-size: 12px;
}

.progress-track {
  background: rgba(255, 255, 255, 0.05);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rose), var(--gold));
  transition: width 420ms ease;
}

.question-stage {
  display: grid;
  place-items: center;
  padding: 42px 70px;
}

.question-stage > * {
  width: 100%;
  animation: question-in 420ms ease both;
}

.question-stage.is-moving > * {
  pointer-events: none;
}

.question-content,
.birth-content,
.name-form {
  max-width: 800px;
  margin: auto;
}

.question-stage h1 {
  max-width: 760px;
  font-size: clamp(38px, 5vw, 61px);
  line-height: 1.02;
}

.question-subtitle {
  margin: 14px 0 28px;
  color: var(--paper-muted);
  font-size: 15px;
  line-height: 1.5;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.option-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 15px;
  min-height: 112px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--paper);
  text-align: left;
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
  transition: border-color 170ms ease, background 170ms ease, transform 170ms ease;
}

.option-card:hover {
  transform: translateY(-2px);
  border-color: rgba(240, 202, 131, 0.5);
  background: rgba(255, 255, 255, 0.075);
}

.option-card.is-selected {
  border-color: var(--rose-bright);
  background: rgba(237, 156, 134, 0.17);
  transform: scale(0.985);
}

.option-number {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 13px;
}

.option-text {
  color: var(--paper-muted);
  font-size: 13px;
  line-height: 1.45;
}

.option-text strong {
  color: var(--paper);
  font-weight: 700;
}

.option-arrow {
  color: rgba(255, 255, 255, 0.35);
}

.selection-hint,
.birth-privacy {
  margin: 14px 0 0;
  color: rgba(217, 205, 217, 0.52);
  font-size: 11px;
}

.field-label {
  display: block;
  margin-bottom: 9px;
  color: var(--paper-muted);
  font-size: 12px;
}

.text-field {
  width: 100%;
  height: 70px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  color: var(--paper);
  background: rgba(255, 255, 255, 0.055);
  font-size: 20px;
}

.text-field::placeholder {
  color: rgba(217, 205, 217, 0.38);
}

.form-button {
  margin-top: 14px;
}

.date-card {
  display: grid;
  gap: 10px;
  max-width: 520px;
  padding: 26px;
  border: 1px solid rgba(240, 202, 131, 0.28);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
}

.date-card label {
  color: var(--paper-muted);
  font-size: 12px;
}

.date-card input {
  width: 100%;
  min-height: 64px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: var(--paper);
  color-scheme: dark;
  background: rgba(6, 3, 9, 0.35);
  font-size: 18px;
  direction: ltr;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.date-card input::placeholder {
  color: rgba(217, 205, 217, 0.42);
}

.date-card input[aria-invalid="true"] {
  border-color: rgba(255, 180, 156, 0.78);
}

.date-error {
  color: var(--rose-bright);
  font-size: 12px;
  line-height: 1.4;
}

.date-result-button {
  width: 100%;
  margin-top: 2px;
}

.quiz-footer,
.result-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 42px;
  border-top: 1px solid var(--line);
  color: rgba(217, 205, 217, 0.55);
  font-size: 11px;
}

.result-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.result-topline {
  justify-content: space-between;
  color: var(--paper-muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-topline i {
  margin-right: 8px;
  color: var(--gold);
  font-style: normal;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
  align-items: center;
  gap: 68px;
  padding: 44px 72px;
}

.result-glyph {
  display: grid;
  width: min(330px, 100%);
  aspect-ratio: 1;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(240, 202, 131, 0.32);
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 30%, rgba(255, 180, 156, 0.32), transparent 28%),
    radial-gradient(circle, rgba(76, 32, 75, 0.9), rgba(20, 9, 26, 0.96));
  box-shadow: 0 0 0 24px rgba(255, 255, 255, 0.018), 0 0 90px rgba(237, 156, 134, 0.2);
}

.result-glyph span {
  color: var(--gold);
  font-family: var(--serif);
  font-size: clamp(100px, 13vw, 160px);
  line-height: 0.8;
}

.result-glyph small {
  margin-top: 24px;
  color: var(--paper-muted);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.result-copy h1 {
  font-size: clamp(39px, 5vw, 66px);
  line-height: 0.98;
}

.result-copy h1 em {
  margin-top: 8px;
}

.result-copy > p:not(.eyebrow) {
  max-width: 600px;
  margin: 24px 0;
  color: var(--paper-muted);
  font-size: 15px;
  line-height: 1.65;
}

.telegram-button {
  width: min(390px, 100%);
}

.telegram-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: #289bd4;
  font-size: 13px;
}

.restart-button {
  display: block;
  margin: 14px 0 0;
  padding: 8px 0;
  border: 0;
  color: var(--paper-muted);
  background: transparent;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.privacy-page {
  min-height: 100svh;
  padding: 52px 24px;
  background:
    radial-gradient(circle at 15% 5%, rgba(237, 156, 134, 0.18), transparent 28%),
    linear-gradient(145deg, #100713, #211029);
}

.privacy-document {
  width: min(900px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.35);
}

.privacy-header {
  padding: 52px 58px 34px;
  border-bottom: 1px solid rgba(36, 19, 38, 0.12);
}

.privacy-back {
  color: #6e3d65;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.privacy-header h1 {
  max-width: 700px;
  margin: 30px 0 10px;
  font-family: var(--serif);
  font-size: clamp(42px, 7vw, 72px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.privacy-header p {
  margin: 0;
  color: #765f73;
}

.privacy-body {
  padding: 42px 58px 54px;
}

.privacy-body p {
  margin: 0 0 22px;
  color: #483b47;
  font-size: 15px;
  line-height: 1.72;
}

.privacy-body strong {
  color: var(--ink);
}

.privacy-contacts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid rgba(36, 19, 38, 0.12);
}

.privacy-contacts div {
  display: grid;
  gap: 5px;
  padding: 18px;
  border-radius: 12px;
  background: rgba(59, 24, 61, 0.06);
}

.privacy-contacts span {
  color: #846c80;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.privacy-contacts strong,
.privacy-contacts a {
  color: var(--ink);
  font-size: 13px;
}

.metrika-noscript {
  position: absolute;
  left: -9999px;
}

.metrika-noscript img {
  position: absolute;
}

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

@keyframes question-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 920px) {
  .intro-main {
    grid-template-columns: minmax(0, 1fr) 260px;
    padding-inline: 42px;
  }

  .zodiac-visual {
    width: 260px;
  }

  .legal-strip {
    grid-template-columns: 1.3fr 0.8fr 1fr auto;
  }

  .legal-address {
    display: none !important;
  }

  .result-layout {
    gap: 42px;
    padding-inline: 48px;
  }
}

@media (max-width: 720px) {
  .site-shell {
    display: block;
    min-height: 100svh;
    max-width: 100%;
    padding: 0;
    overflow-x: hidden;
    overflow-x: clip;
    overflow-y: hidden;
  }

  .intro-panel,
  .quiz-panel,
  .result-panel {
    width: 100%;
    min-height: 100svh;
    border: 0;
    border-radius: 0;
    background: rgba(20, 9, 26, 0.76);
  }

  .brand-row,
  .quiz-header,
  .result-topline {
    min-height: 72px;
    padding-inline: 20px;
  }

  .intro-main {
    display: block;
    padding: 42px 22px 34px;
  }

  .intro-copy h1 {
    font-size: clamp(54px, 17vw, 76px);
  }

  .intro-lead {
    margin-top: 22px;
  }

  .primary-button {
    width: 100%;
  }

  .zodiac-visual {
    width: min(260px, 72vw);
    margin: 34px auto 0;
  }

  .legal-strip {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    padding: 24px 22px 30px;
  }

  .legal-strip > div:first-child,
  .legal-link {
    grid-column: 1 / -1;
  }

  .legal-address {
    display: grid !important;
    grid-column: 1 / -1;
  }

  .legal-link {
    max-width: none;
  }

  .question-stage {
    align-items: start;
    padding: 38px 20px;
  }

  .question-stage h1 {
    font-size: clamp(36px, 11vw, 50px);
  }

  .options-grid {
    grid-template-columns: 1fr;
  }

  .option-card {
    min-height: 98px;
  }

  .quiz-footer,
  .result-footer {
    min-height: 72px;
    gap: 20px;
    padding: 14px 20px;
  }

  .result-layout {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 38px 22px;
  }

  .result-glyph {
    width: min(270px, 72vw);
    margin: 0 auto;
  }

  .result-copy h1 {
    font-size: clamp(42px, 12vw, 60px);
  }

  .telegram-button {
    width: 100%;
    gap: 14px;
  }

  .privacy-page {
    padding: 0;
  }

  .privacy-document {
    border: 0;
    border-radius: 0;
  }

  .privacy-header,
  .privacy-body {
    padding-inline: 22px;
  }

  .privacy-contacts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .time-pill {
    display: none;
  }

  .brand-copy strong {
    font-size: 11px;
    letter-spacing: 0.12em;
  }
}

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