* {
  box-sizing: border-box;
}

:root {
  --bg: #f4f4f1;
  --card: rgba(255, 255, 255, 0.78);
  --card-strong: #ffffff;
  --text: #111111;
  --muted: #5e636b;
  --line: rgba(17, 17, 17, 0.10);
  --accent: #1d4ed8;
  --accent-dark: #0f2f7a;
  --button: #111111;
  --button-hover: #2a2a2a;
  --soft-blue: rgba(29, 78, 216, 0.10);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(29, 78, 216, 0.12), transparent 36%),
    radial-gradient(circle at bottom right, rgba(216, 164, 61, 0.12), transparent 30%),
    var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  width: 100%;
}

.screen {
  display: none;
  min-height: 100vh;
  padding: 34px 7vw;
}

.screen.active {
  display: block;
}

.site-header,
.quiz-header {
  max-width: 1100px;
  margin: 0 auto 30px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand-logo {
  width: 230px;
  height: auto;
  object-fit: contain;
  display: block;
}

.site-header div,
.quiz-header div:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-header strong,
.quiz-header strong {
  font-size: 17px;
  letter-spacing: -0.02em;
}

.site-header span,
.quiz-header span {
  color: var(--muted);
  font-size: 14px;
}

.hero-card,
.result-card,
.loading-card {
  max-width: 900px;
  margin: 0 auto;
  background: var(--card);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 34px;
  padding: 58px 64px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.08);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.20em;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero-card h1 {
  font-size: clamp(46px, 7vw, 76px);
  line-height: 0.94;
  letter-spacing: -0.07em;
  max-width: 760px;
  margin-bottom: 26px;
}

.hero-text {
  max-width: 760px;
  font-size: 20px;
  line-height: 1.6;
  color: #2c3037;
  margin-bottom: 28px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0 28px;
}

.info-grid div {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px 22px;
  background: rgba(255, 255, 255, 0.45);
}

.info-grid strong {
  display: block;
  font-size: 28px;
  margin-bottom: 4px;
}

.info-grid span {
  color: var(--muted);
}

.important-note {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.60);
  color: #2f333a;
  margin-bottom: 22px;
}

.email-label {
  display: block;
  margin: 18px 0 8px;
  font-weight: 800;
  color: #111111;
  font-size: 19px;
}

input {
  width: 100%;
  min-height: 62px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  padding: 17px 18px;
  outline: none;
  font-size: 18px;
  font-weight: 650;
  color: var(--text);
  transition: border 0.2s, box-shadow 0.2s;
}

input:focus {
  border-color: rgba(29, 78, 216, 0.5);
  box-shadow: 0 0 0 5px rgba(29, 78, 216, 0.10);
}

.age-section {
  margin-top: 22px;
}

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

.age-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  padding: 18px 16px;
  font-weight: 850;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.16s, border 0.16s, background 0.16s;
}

.age-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(17, 17, 17, 0.25);
}

.age-btn.selected {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
}

.primary-btn {
  margin-top: 22px;
  border: none;
  border-radius: 18px;
  background: var(--button);
  color: #fff;
  padding: 17px 26px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s, background 0.18s, opacity 0.18s;
}

.primary-btn:hover {
  background: var(--button-hover);
  transform: translateY(-1px);
}

.primary-btn.disabled,
.primary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.40;
  transform: none;
}

.small-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.quiz-header {
  justify-content: space-between;
  margin-bottom: 22px;
}

.timer-box {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.70);
  border-radius: 20px;
  padding: 11px 17px;
  min-width: 96px;
  text-align: center;
}

.timer-box span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.timer-box strong {
  display: block;
  font-size: 22px;
}

.progress-wrap {
  max-width: 1100px;
  margin: 0 auto 26px;
}

.progress-info {
  display: flex;
  justify-content: flex-end;
  color: #29303a;
  font-weight: 700;
  margin-bottom: 10px;
}

.progress-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.08);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #1d4ed8, #111111);
  transition: width 0.3s ease;
}

.question-card {
  max-width: 1100px;
  min-height: 430px;
  margin: 0 auto;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 34px;
  padding: 50px 56px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.06);
}

.question-card h2 {
  font-size: clamp(42px, 5vw, 62px);
  line-height: 1;
  letter-spacing: -0.06em;
  margin-bottom: 22px;
}

.question-card p:not(.eyebrow) {
  font-size: 22px;
  line-height: 1.5;
  color: #22262d;
}

.visual-area {
  margin-top: 30px;
}

.hidden {
  display: none;
}

.memory-display,
.visual-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  min-width: min(100%, 480px);
  padding: 20px 28px;
  border-radius: 24px;
  background: var(--soft-blue);
  border: 1px solid rgba(29, 78, 216, 0.18);
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.memory-display.muted {
  color: var(--muted);
  font-size: 22px;
  letter-spacing: 0;
}

.options-area {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.option-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 22px;
  padding: 20px 22px;
  text-align: left;
  cursor: pointer;
  font-size: 19px;
  font-weight: 750;
  transition: transform 0.16s, border 0.16s, background 0.16s;
}

.option-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(17, 17, 17, 0.25);
}

.option-btn.selected {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
}

.quiz-footer {
  max-width: 1100px;
  margin: 24px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lock-note {
  color: #252a31;
  font-weight: 700;
}

.result-card {
  text-align: center;
}

.result-logo {
  width: 260px;
  height: auto;
  margin-bottom: 24px;
}

.result-card h1 {
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1;
  letter-spacing: -0.05em;
  margin-bottom: 28px;
}

.score-circle {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 10px auto 24px;
  display: grid;
  place-items: center;
}

.score-circle svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

.score-bg {
  fill: none;
  stroke: rgba(17, 17, 17, 0.08);
  stroke-width: 13;
}

.score-ring {
  fill: none;
  stroke: #1d4ed8;
  stroke-width: 13;
  stroke-linecap: round;
  stroke-dasharray: 427;
  stroke-dashoffset: 427;
  transition: stroke-dashoffset 0.8s ease;
}

.score-circle div {
  position: relative;
  z-index: 1;
}

.score-circle span {
  display: block;
  font-size: 52px;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.score-circle small {
  color: var(--muted);
  font-weight: 800;
}

.result-text {
  max-width: 660px;
  margin: 0 auto 28px;
  color: #31353c;
  font-size: 18px;
  line-height: 1.65;
}

.teaser-box {
  max-width: 720px;
  margin: 26px auto 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  padding: 20px 24px;
  color: #2d3138;
  font-size: 17px;
  line-height: 1.6;
  font-weight: 650;
}

.cta-box {
  border-radius: 26px;
  padding: 30px;
  background: #111111;
  color: #ffffff;
  margin-top: 26px;
}

.cta-box h3 {
  font-size: 28px;
  letter-spacing: -0.03em;
}

.cta-box p {
  color: rgba(255, 255, 255, 0.75);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.6;
}

.cta-box .primary-btn {
  background: #ffffff;
  color: #111111;
}

.loading-card {
  min-height: 420px;
  display: grid;
  place-items: center;
  text-align: center;
}

.spinner {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 6px solid rgba(17, 17, 17, 0.10);
  border-top-color: #111111;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

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

@media (max-width: 760px) {
  .screen {
    padding: 22px 18px;
  }

  .hero-card,
  .result-card,
  .loading-card,
  .question-card {
    padding: 32px 24px;
    border-radius: 26px;
  }

  .hero-card h1 {
    font-size: 44px;
  }

  .info-grid,
  .options-area,
  .age-grid {
    grid-template-columns: 1fr;
  }

  .quiz-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .brand-logo {
    width: 190px;
  }

  .result-logo {
    width: 220px;
  }
}

@media (max-width: 600px) {
  .screen {
    padding: 12px 12px;
  }

  .quiz-header {
    margin-bottom: 10px;
  }

  .timer-box {
    padding: 8px 12px;
    min-width: 78px;
  }

  .timer-box strong {
    font-size: 20px;
  }

  .progress-wrap {
    margin-bottom: 12px;
  }

  .question-card {
    min-height: auto;
    padding: 22px 18px;
    border-radius: 24px;
  }

  .question-card h2 {
    font-size: 30px;
    line-height: 1.05;
    margin-bottom: 12px;
  }

  .question-card p:not(.eyebrow) {
    font-size: 18px;
    line-height: 1.35;
  }

  .visual-area {
    margin-top: 14px;
  }

  .memory-display,
  .visual-text {
    min-height: 62px;
    padding: 12px 16px;
    font-size: 30px;
    border-radius: 18px;
  }

  .options-area {
    margin-top: 16px;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .option-btn {
    padding: 12px 14px;
    font-size: 16px;
    border-radius: 16px;
  }

  .quiz-footer {
    margin-top: 12px;
    gap: 8px;
  }

  .lock-note {
    font-size: 13px;
    margin-bottom: 0;
  }

  #nextBtn {
    margin-top: 4px;
    padding: 13px 18px;
  }
}

@media (max-width: 600px) {
  .age-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  .age-btn {
    min-height: 48px !important;
    padding: 10px 12px !important;
    font-size: 15px !important;
    border-radius: 14px !important;
  }

  #startBtn {
    width: 100% !important;
    margin-top: 14px !important;
  }
}

@media (max-width: 600px) {
  .info-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 8px !important;
  }

  .info-grid > div {
    padding: 12px 6px !important;
    min-height: 74px !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .info-grid strong {
    font-size: 24px !important;
    line-height: 1 !important;
  }

  .info-grid span {
    font-size: 13px !important;
    line-height: 1.2 !important;
  }
}

.info-grid > div {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.quiz-legal-links {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
}

.quiz-legal-links a {
  color: #64748b;
  text-decoration: none;
  font-weight: 700;
}

.quiz-legal-links a:hover {
  color: #1d4ed8;
}

#startBtn {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 18px auto 0;
}

.small-note {
  text-align: center;
}

.quiz-legal-links {
  text-align: center;
}