:root {
  color-scheme: dark;
  --bg: #0c0a12;
  --panel: rgba(26, 21, 38, 0.76);
  --panel-strong: #171220;
  --line: rgba(216, 202, 255, 0.14);
  --text: #f5f1ff;
  --muted: #aaa1bc;
  --violet: #b991ff;
  --violet-strong: #d2b9ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 5%, rgba(132, 84, 214, 0.18), transparent 34rem),
    radial-gradient(circle at 88% 52%, rgba(104, 68, 168, 0.10), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button { font: inherit; }

.shell {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 36px;
}

.topbar {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  text-decoration: none;
}

.byline {
  color: var(--muted);
  font-size: 0.78rem;
}

.hero {
  padding: clamp(48px, 9vw, 86px) 0 32px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--violet-strong);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.17em;
}

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

h1 {
  max-width: 640px;
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 10vw, 5.8rem);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.045em;
}

.intro {
  max-width: 570px;
  margin-bottom: 0;
  color: #c8c1d4;
  font-size: clamp(1rem, 3vw, 1.15rem);
  line-height: 1.6;
}

.picker {
  padding: clamp(24px, 5vw, 38px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(27, 22, 39, 0.88), rgba(17, 14, 25, 0.82));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.progress {
  height: 3px;
  margin-bottom: 36px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.progress span {
  display: block;
  width: 33.333%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8b5fd7, var(--violet));
  transition: width 220ms ease;
}

.step-count {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.step h2,
.results > h2 {
  margin-bottom: 26px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 5vw, 2.5rem);
  font-weight: 400;
  line-height: 1.08;
}

.choices {
  display: grid;
  gap: 10px;
}

.choices-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choices button {
  min-height: 78px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.choices button:hover,
.choices button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(185, 145, 255, 0.58);
  background: rgba(185, 145, 255, 0.08);
  outline: none;
}

.choices strong,
.choices span {
  display: block;
}

.choices strong {
  margin-bottom: 5px;
  font-size: 0.98rem;
}

.choices span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.result-list {
  display: grid;
  gap: 12px;
}

.result-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.result-card:first-child {
  border-color: rgba(185, 145, 255, 0.46);
  background: linear-gradient(135deg, rgba(78, 53, 111, 0.35), var(--panel));
}

.result-rank {
  margin-bottom: 9px;
  color: var(--violet-strong);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.result-card h3 {
  margin-bottom: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 400;
}

.result-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.feedback,
.upgrade {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.feedback h3,
.upgrade h3 {
  margin-bottom: 14px;
  font-size: 1rem;
}

.feedback-actions,
.reason-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.feedback button,
.share-button,
.restart {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.feedback button:hover,
.share-button:hover,
.restart:hover {
  border-color: rgba(185, 145, 255, 0.6);
  background: rgba(185, 145, 255, 0.08);
}

.feedback-reasons {
  margin-top: 18px;
}

.feedback-reasons p,
.feedback-thanks {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

.upgrade p:not(.eyebrow) {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.55;
}

.primary-cta {
  display: inline-flex;
  margin-top: 8px;
  padding: 14px 18px;
  border-radius: 999px;
  background: var(--text);
  color: #15101f;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.share-button {
  margin-left: 7px;
}

.restart {
  margin-top: 24px;
  color: var(--muted);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 2px 0;
  color: #7f778c;
  font-size: 0.74rem;
}

footer a {
  color: #aaa1bc;
  text-decoration: none;
}

[hidden] { display: none !important; }

@media (max-width: 620px) {
  .shell { width: min(100% - 22px, 760px); }
  .byline { display: none; }
  .hero { padding-top: 42px; }
  .picker { padding: 22px 16px; border-radius: 20px; }
  .choices-grid { grid-template-columns: 1fr; }
  .share-button { margin: 10px 0 0; display: block; }
  footer { flex-direction: column; }
}
