:root {
  --ink: #241b17;
  --ink-soft: #5f5149;
  --cream: #f7f1e8;
  --paper: #fffdf9;
  --gold: #b8873e;
  --gold-light: #e6c98f;
  --rose: #aa6f62;
  --line: rgba(36, 27, 23, 0.13);
  --shadow: 0 26px 80px rgba(60, 41, 28, 0.13);
  --radius: 24px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 12%, rgba(230, 201, 143, 0.23), transparent 27%),
    linear-gradient(145deg, #f4eee5 0%, #fbf8f2 48%, #f0e6da 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

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

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(2px);
  pointer-events: none;
  opacity: 0.55;
}

.ambient-one {
  width: 320px;
  height: 320px;
  right: -130px;
  top: 18%;
  border: 1px solid rgba(184, 135, 62, 0.35);
}

.ambient-two {
  width: 170px;
  height: 170px;
  left: -80px;
  bottom: 8%;
  background: rgba(170, 111, 98, 0.07);
  border: 1px solid rgba(170, 111, 98, 0.2);
}

.site-header,
footer {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header { padding: 28px 0; }

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--paper);
  background: var(--ink);
  font: 600 14px/1 Georgia, serif;
  letter-spacing: 0.08em;
}

.brand strong,
.brand small { display: block; }
.brand strong { font: 600 17px/1.15 Georgia, serif; letter-spacing: 0.02em; }
.brand small { margin-top: 3px; color: var(--ink-soft); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }

.privacy-badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255,255,255,0.48);
  font-size: 12px;
}

.privacy-badge span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5b8c66;
  box-shadow: 0 0 0 4px rgba(91, 140, 102, 0.12);
}

.app-shell {
  width: min(850px, calc(100% - 32px));
  min-height: 640px;
  margin: 42px auto 55px;
  outline: none;
}

.screen {
  position: relative;
  padding: clamp(34px, 7vw, 76px);
  border: 1px solid rgba(255,255,255,0.78);
  border-radius: var(--radius);
  background: rgba(255, 253, 249, 0.91);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  animation: rise 420ms cubic-bezier(.2,.75,.25,1) both;
}

[hidden] { display: none !important; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.intro-screen { text-align: center; padding-top: clamp(48px, 9vw, 94px); padding-bottom: clamp(48px, 9vw, 94px); }

.eyebrow,
.card-label,
.question-kicker {
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

h1, h2, h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; line-height: 1.08; font-weight: 500; }

h1 { max-width: 690px; margin: 20px auto 24px; font-size: clamp(38px, 6.2vw, 67px); letter-spacing: -0.045em; }
h1 em { color: var(--rose); font-weight: 400; }
h2 { font-size: clamp(30px, 4.4vw, 48px); letter-spacing: -0.035em; }
h3 { font-size: 24px; letter-spacing: -0.02em; }

.lead { max-width: 600px; margin: 0 auto; color: var(--ink-soft); font-size: clamp(16px, 2vw, 19px); }
.lead.compact { max-width: 640px; margin: 18px 0 34px; }

.intro-meta {
  margin: 34px auto;
  display: flex;
  justify-content: center;
  gap: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.intro-meta span { padding: 0 18px; border-right: 1px solid var(--line); }
.intro-meta span:last-child { border-right: 0; }

.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 14px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:focus-visible, input:focus-visible, .option:focus-visible, .restart-button:focus-visible { outline: 3px solid rgba(184, 135, 62, 0.28); outline-offset: 3px; }
.button-primary { color: white; background: var(--ink); box-shadow: 0 10px 25px rgba(36,27,23,0.16); }
.button-primary:hover:not(:disabled) { background: #3b2c25; }
.button-ghost { color: var(--ink); border-color: var(--line); background: transparent; box-shadow: none; }
.button:disabled { opacity: 0.38; cursor: not-allowed; }
.button-full { width: 100%; margin-top: 24px; }

.microcopy { margin: 16px 0 0; color: #8b7b71; font-size: 12px; }

.progress-wrap { margin-bottom: 58px; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--ink-soft); font-size: 12px; font-weight: 600; }
.progress-track { height: 4px; overflow: hidden; border-radius: 999px; background: #ebe1d5; }
.progress-fill { width: 14%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--rose), var(--gold)); transition: width 320ms ease; }

.question-wrap { min-height: 390px; }
.question-kicker { margin: 0 0 12px; }
.question-helper { margin: 12px 0 28px; color: var(--ink-soft); font-size: 15px; }
.options { display: grid; gap: 12px; }

.option {
  position: relative;
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255,255,255,0.64);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.option:hover { transform: translateX(2px); border-color: rgba(184,135,62,0.5); }
.option[aria-checked="true"] { border-color: var(--gold); background: rgba(230,201,143,0.17); }
.option-indicator { width: 20px; height: 20px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #bdafa4; border-radius: 50%; }
.option[aria-checked="true"] .option-indicator { border-color: var(--gold); background: var(--gold); box-shadow: inset 0 0 0 5px var(--paper); }
.option-text { font-size: 14px; line-height: 1.4; }

.quiz-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 35px; }

.result-ready { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 20px; border-radius: 50%; color: #fff; background: #66816a; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; color: var(--ink); font-size: 13px; font-weight: 700; }
.field-wide { grid-column: 1 / -1; }
.field input {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255,255,255,0.85);
}
.field input.invalid { border-color: #a04e45; }
.field-hint { color: #85756b; font-size: 11px; font-weight: 400; line-height: 1.45; }
.field-error { min-height: 0; color: #a04e45; font-size: 11px; font-weight: 600; }

.consent { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; margin-top: 22px; color: var(--ink-soft); font-size: 12px; }
.consent input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--ink); }
.privacy-note { display: flex; justify-content: center; gap: 7px; margin: 12px 0 0; color: #8b7b71; font-size: 11px; text-align: center; }

.result-screen { padding-top: clamp(38px, 6vw, 64px); }
.result-header { display: flex; gap: 24px; align-items: flex-start; justify-content: space-between; }
.result-stage { margin: 13px 0 6px; color: var(--rose); font-size: 14px; font-weight: 700; }
.result-symbol { width: 82px; height: 82px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(184,135,62,.35); border-radius: 50%; color: var(--gold); background: rgba(230,201,143,.13); font: 400 36px/1 Georgia, serif; }
.result-diagnosis { margin: 28px 0 34px; padding-left: 18px; border-left: 2px solid var(--gold); color: var(--ink-soft); font-size: 17px; line-height: 1.7; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.insight-card { min-height: 215px; padding: 24px; border: 1px solid var(--line); border-radius: 17px; background: #fbf6ef; }
.insight-card h3 { margin: 15px 0 10px; }
.insight-card p, .next-step-card p, .recommendation p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.65; }
.dark-card { color: white; border-color: transparent; background: var(--ink); }
.dark-card .card-label { color: var(--gold-light); }
.dark-card p { color: #d8cdc6; }

.next-step-card { display: grid; grid-template-columns: 72px 1fr; gap: 20px; margin-top: 16px; padding: 30px; border: 1px solid rgba(184,135,62,.28); border-radius: 17px; background: rgba(230,201,143,.11); }
.step-number { color: rgba(184,135,62,.45); font: 400 42px/1 Georgia, serif; }
.next-step-card h3 { margin: 12px 0 10px; }
.next-step-card ul { margin: 18px 0 0; padding: 0; list-style: none; }
.next-step-card li { position: relative; margin: 8px 0; padding-left: 20px; color: var(--ink-soft); font-size: 13px; }
.next-step-card li::before { content: "✦"; position: absolute; left: 0; top: 1px; color: var(--gold); font-size: 10px; }

.recommendation { display: grid; grid-template-columns: 36px 1fr; gap: 14px; margin: 22px 0 28px; padding: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.recommendation-icon { width: 32px; height: 32px; display: grid; place-items: center; color: var(--gold); }
.recommendation strong { display: block; margin-bottom: 5px; font: 600 16px/1.3 Georgia, serif; }
.result-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.restart-button { display: block; margin: 24px auto 0; border: 0; color: var(--ink-soft); background: none; font-size: 12px; text-decoration: underline; cursor: pointer; }
.disclaimer { margin: 30px auto 0; color: #94877f; font-size: 10px; text-align: center; }

footer { padding: 0 0 28px; color: rgba(36,27,23,.55); font-size: 11px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 999px;
  color: white;
  background: var(--ink);
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
  font-size: 12px;
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: 220ms ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 680px) {
  .site-header { padding: 20px 0; }
  .privacy-badge { font-size: 0; padding: 10px; }
  .privacy-badge span { margin: 0; }
  .app-shell { margin-top: 18px; min-height: auto; }
  .screen { padding: 30px 22px; border-radius: 19px; }
  .intro-screen { padding-top: 52px; padding-bottom: 52px; }
  .intro-meta { flex-wrap: wrap; row-gap: 8px; }
  .intro-meta span { padding: 0 10px; }
  .progress-wrap { margin-bottom: 42px; }
  .question-wrap { min-height: 420px; }
  .quiz-nav .button { min-width: 0; flex: 1; padding-inline: 14px; }
  .field-grid, .result-grid { grid-template-columns: 1fr; }
  .result-symbol { width: 62px; height: 62px; font-size: 28px; }
  .next-step-card { grid-template-columns: 1fr; gap: 8px; padding: 23px; }
  .step-number { font-size: 28px; }
  .result-actions .button { width: 100%; }
  footer { gap: 8px; flex-direction: column; text-align: center; }
}

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