/*
 * Visual system follows the "landing-page-design" skill
 * (github.com/elayadesign/ai-design-skills):
 * one typeface (Manrope), Tailwind type scale, fixed spacing and radius
 * tokens, flat backgrounds, weighted motion on transform and opacity only.
 * Manrope: SIL Open Font License, self-hosted (assets/fonts/).
 */
@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Theme (each quiz overrides --bg, --accent, --ink) */
  --bg: #efeafd;
  --accent: #5b3fd6;
  --ink: #1d1636;
  --page: #ffffff;
  --text: #18181b;
  --muted: #52525b;
  --line: #e4e4e7;
  --soft: #f4f4f5;

  /* Spacing tokens (B2) */
  --s-25: 2px; --s-50: 4px; --s-75: 8px; --s-100: 12px; --s-200: 16px;
  --s-300: 24px; --s-400: 32px; --s-500: 40px; --s-600: 48px;
  --s-700: 64px; --s-800: 80px; --s-900: 96px;

  /* Radius (Tailwind values) */
  --r-md: 6px; --r-lg: 8px; --r-xl: 12px; --r-2xl: 16px; --r-3xl: 24px; --r-full: 9999px;

  /* Motion (B7) */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font: "Manrope", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
/* Keep the hidden attribute working even on elements with their own display style. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--s-800); }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px; line-height: 24px; font-weight: 400;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; transition: color 300ms var(--ease); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: var(--r-md); }
h1, h2, h3, p, ul, ol { margin: 0; }
h1, h2, h3 { color: var(--ink); text-wrap: balance; }
p, li { text-wrap: pretty; }
.icon { width: 1em; height: 1em; flex: none; fill: currentColor; }

/* ---------- Named text styles (B1) ---------- */
.heading-1 { font-size: 60px; line-height: 60px; font-weight: 600; letter-spacing: -0.02em; }
.heading-2 { font-size: 48px; line-height: 48px; font-weight: 600; letter-spacing: -0.02em; }
.heading-3 { font-size: 36px; line-height: 40px; font-weight: 600; letter-spacing: -0.01em; }
.heading-4 { font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -0.01em; }
.heading-5 { font-size: 24px; line-height: 32px; font-weight: 600; }
.heading-6 { font-size: 20px; line-height: 28px; font-weight: 600; }
.title-1 { font-size: 20px; line-height: 28px; font-weight: 500; }
.title-2 { font-size: 18px; line-height: 28px; font-weight: 500; }
.title-3 { font-size: 16px; line-height: 24px; font-weight: 500; }
.title-4 { font-size: 14px; line-height: 20px; font-weight: 500; }
.body-1 { font-size: 16px; line-height: 24px; font-weight: 600; }
.body-2 { font-size: 16px; line-height: 24px; font-weight: 500; }
.body-3 { font-size: 16px; line-height: 24px; font-weight: 400; }
.body-4 { font-size: 14px; line-height: 20px; font-weight: 600; }
.body-6 { font-size: 14px; line-height: 20px; font-weight: 400; }
.button-md { font-size: 16px; line-height: 24px; font-weight: 600; }
.button-sm { font-size: 14px; line-height: 20px; font-weight: 600; }
.caption-1 { font-size: 14px; line-height: 20px; font-weight: 500; }
.caption-2 { font-size: 14px; line-height: 20px; font-weight: 400; }
.caption-3 { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }

/* Mobile sizes for the big headings, stepping up at 700px */
.h-hero { font-size: 36px; line-height: 40px; font-weight: 600; letter-spacing: -0.02em; }
.h-section { font-size: 24px; line-height: 32px; font-weight: 600; }
@media (min-width: 700px) {
  .h-hero { font-size: 60px; line-height: 60px; }
  .h-hero.h-long { font-size: 48px; line-height: 48px; }
  .h-section { font-size: 30px; line-height: 36px; }
}

/* Hero heading: left to right text gradient, light theme (B5) */
.grad-text {
  background: linear-gradient(90deg, #000000, #666666);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  padding-bottom: var(--s-75); /* keeps descenders (g, y) inside the clipped area */
}
.br-lg { display: none; }
@media (min-width: 700px) { .br-lg { display: inline; } }

/* ---------- Layout ---------- */
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 var(--s-200); }
.narrow { max-width: 720px; }
.stack > * + * { margin-top: var(--s-200); }
.stack-lg > * + * { margin-top: var(--s-300); }
.section { padding-top: var(--s-700); padding-bottom: var(--s-700); }
.section-head { max-width: 680px; margin-bottom: var(--s-400); }
.section-head p { margin-top: var(--s-100); color: var(--muted); }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--s-75); top: var(--s-75); background: #fff; padding: var(--s-75) var(--s-100); z-index: 20; }

/* ---------- Floating navigation (B7) ---------- */
.site-header { position: sticky; top: var(--s-100); z-index: 10; display: flex; justify-content: center; padding: 0 var(--s-200); margin-top: var(--s-100); }
.nav {
  display: flex; align-items: center; gap: var(--s-100);
  padding: var(--s-50) var(--s-50) var(--s-50) var(--s-200);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--r-full);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
.logo { color: var(--text); text-decoration: none; margin-right: var(--s-75); white-space: nowrap; }
.nav-links { display: flex; gap: var(--s-50); }
.nav-links a {
  color: var(--muted); text-decoration: none; padding: var(--s-75) var(--s-100);
  border-radius: var(--r-full); white-space: nowrap;
  transition: background-color 300ms var(--ease), color 300ms var(--ease);
}
.nav-links a:hover { background: var(--soft); color: var(--text); }
.nav-links a[aria-current="page"] { background: var(--text); color: #fff; }

/* ---------- Breadcrumbs ---------- */
.crumbs ol { list-style: none; padding: 0; margin: var(--s-300) 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-50); color: var(--muted); }
.crumbs li { display: flex; align-items: center; gap: var(--s-50); }
.crumbs a { color: var(--muted); }

/* ---------- Hero ---------- */
.hero { padding: var(--s-400) 0 var(--s-600); }
.hero-panel { background: var(--bg); border-radius: var(--r-3xl); padding: var(--s-400) var(--s-300); display: grid; gap: var(--s-400); align-items: center; }
.hero-copy > * + * { margin-top: var(--s-200); }
.hero-copy h1, .hero-copy .lede { max-width: 680px; }
.lede { color: var(--ink); }
.hero-visual { margin: 0; }
.hero-visual img { border-radius: var(--r-2xl); border: 1px solid rgba(0, 0, 0, 0.06); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08); width: 100%; }
.hero-visual figcaption { margin-top: var(--s-75); color: var(--muted); }
@media (min-width: 900px) {
  .hero-panel { grid-template-columns: 1.2fr 1fr; padding: var(--s-600); }
}

.answer { background: rgba(255, 255, 255, 0.72); border: 1px solid rgba(0, 0, 0, 0.06); border-radius: var(--r-xl); padding: var(--s-100) var(--s-200); color: var(--text); }
.proof { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-75) var(--s-200); color: var(--ink); }
.proof li { display: flex; align-items: center; gap: var(--s-75); }
.proof .icon { color: var(--accent); width: 20px; height: 20px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-200); }
/* Result page: Save and Unlock stacked at the same width (the wider one sets it). */
.btn-pair { display: inline-grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-100); max-width: 100%; }
.btn-pair .btn { justify-content: center; text-align: center; }

/* ---------- Buttons (B2 padding, B9 states) ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-75);
  padding: var(--s-75) var(--s-100);
  border-radius: var(--r-lg); border: 1px solid var(--accent);
  background: var(--accent); color: #fff; text-decoration: none; cursor: pointer;
  font-family: inherit;
  transition: background-color 300ms var(--ease), color 300ms var(--ease), transform 500ms var(--ease), opacity 300ms var(--ease);
}
.btn:hover { background: var(--ink); border-color: var(--ink); }
.btn:active { transform: scale(0.98); }
.btn .icon { width: 20px; height: 20px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: rgba(0, 0, 0, 0.16); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.72); color: var(--ink); border-color: rgba(0, 0, 0, 0.24); }
.btn-link { display: inline-flex; align-items: center; gap: var(--s-75); background: none; border: 0; color: var(--ink); cursor: pointer; padding: var(--s-75) 0; font-family: inherit; text-decoration: underline; text-underline-offset: 3px; }
.btn-link:active { transform: translateY(1px); }
.text-link { display: inline-flex; align-items: center; gap: var(--s-75); color: var(--ink); }

/* ---------- Quiz ---------- */
.quiz-shell { max-width: 720px; margin: 0 auto; }
.progress { margin-bottom: var(--s-200); }
.progress .bar { height: 8px; background: var(--soft); border-radius: var(--r-full); overflow: hidden; }
.progress .bar span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left center; transform: scaleX(0); transition: transform 500ms var(--ease); }
.progress p { margin-top: var(--s-75); color: var(--muted); }
.questions { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-200); }
.question { border: 1px solid var(--line); border-radius: var(--r-3xl); padding: var(--s-200); background: #fff; }
.question h3 { margin-bottom: var(--s-200); }
.question h3:focus-visible { outline-offset: 4px; }
.qnum { display: block; color: var(--accent); margin-bottom: var(--s-50); }
.options { display: grid; gap: var(--s-75); }
.option {
  text-align: left; background: #fff; color: var(--text); cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-200); font-family: inherit;
  transition: background-color 300ms var(--ease), border-color 300ms var(--ease), transform 500ms var(--ease);
}
.option:hover { background: var(--soft); border-color: rgba(0, 0, 0, 0.16); }
.option:active { transform: scale(0.98); }
.option[aria-pressed="true"] { background: var(--bg); border-color: var(--accent); }
.js .question { display: none; }
.js .question.current { display: block; animation: rise 500ms var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.quiz-nav { margin-top: var(--s-200); }
@media (min-width: 700px) {
  .question { padding: var(--s-300); }
  .options { grid-template-columns: 1fr 1fr; }
}

/* ---------- Cards and lists ---------- */
.cards { list-style: none; padding: 0; display: grid; gap: var(--s-200); }
.card a {
  display: flex; flex-direction: column; gap: var(--s-75); height: 100%;
  background: var(--bg); color: var(--ink); text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.04); border-radius: var(--r-2xl); padding: var(--s-300);
  transition: transform 500ms var(--ease), border-color 300ms var(--ease);
}
.card a:hover { transform: translateY(-4px); border-color: rgba(0, 0, 0, 0.16); }
.card a:active { transform: scale(0.98); }
.card-group { color: var(--accent); }
.card-cta { margin-top: auto; padding-top: var(--s-100); display: inline-flex; align-items: center; gap: var(--s-75); }
@media (min-width: 700px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .cards.cards-3 { grid-template-columns: 1fr 1fr 1fr; } }

.result-list { list-style: none; padding: 0; display: grid; gap: var(--s-100); }
.result-list a {
  display: flex; align-items: center; gap: var(--s-200); justify-content: space-between;
  border: 1px solid var(--line); border-radius: var(--r-xl); padding: var(--s-200);
  color: var(--text); text-decoration: none;
  transition: background-color 300ms var(--ease), border-color 300ms var(--ease);
}
.result-list a:hover { background: var(--soft); border-color: rgba(0, 0, 0, 0.16); }
.result-list strong { display: block; color: var(--ink); }
.result-list span { display: block; color: var(--muted); }
.result-list .icon { width: 20px; height: 20px; color: var(--muted); }
@media (min-width: 700px) { .result-list { grid-template-columns: 1fr 1fr; } }

.features { list-style: none; padding: 0; display: grid; gap: var(--s-200); }
.features li { border: 1px solid var(--line); border-radius: var(--r-2xl); padding: var(--s-300); }
.features .icon { width: 24px; height: 24px; color: var(--accent); margin-bottom: var(--s-200); }
.features h3 { margin-bottom: var(--s-75); }
.steps { list-style: none; padding: 0; display: grid; gap: var(--s-200); counter-reset: step; }
.steps li { border: 1px solid var(--line); border-radius: var(--r-2xl); padding: var(--s-300); }
.steps li::before { counter-increment: step; content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--r-full); background: var(--bg); color: var(--ink); font-weight: 600; margin-bottom: var(--s-200); }
.steps h3 { margin-bottom: var(--s-75); }
@media (min-width: 800px) { .features, .steps { grid-template-columns: repeat(3, 1fr); } }

.two-col { display: grid; gap: var(--s-200); }
.is-box { border: 1px solid var(--line); border-radius: var(--r-2xl); padding: var(--s-300); }
.is-box h3 { display: flex; align-items: center; gap: var(--s-75); margin-bottom: var(--s-100); }
.is-box ul { padding-left: var(--s-300); }
.is-box li + li { margin-top: var(--s-50); }
.is-yes .icon { color: #15803d; width: 24px; height: 24px; }
.is-no .icon { color: #b91c1c; width: 24px; height: 24px; }
@media (min-width: 700px) { .two-col { grid-template-columns: 1fr 1fr; } }

.prose { max-width: 720px; margin-left: auto; margin-right: auto; }
.prose > * + * { margin-top: var(--s-200); }
.prose h2 { margin-top: var(--s-600); }
.prose h3 { margin-top: var(--s-400); }
.prose ul, .prose ol { padding-left: var(--s-300); }
.prose li + li { margin-top: var(--s-50); }
.note { border: 1px solid #fde68a; background: #fffbeb; border-radius: var(--r-xl); padding: var(--s-100) var(--s-200); color: #713f12; }

.faq-list { max-width: 720px; margin: 0 auto; display: grid; gap: var(--s-100); }
.faq-item { border: 1px solid var(--line); border-radius: var(--r-xl); padding: var(--s-200); }
.faq-item h3 { margin-bottom: var(--s-75); }
.faq-item p { color: var(--muted); }

/* ---------- Tagline reveal (B11) ---------- */
.tagline-reveal { padding-top: var(--s-800); padding-bottom: var(--s-800); }
.tagline-reveal p { max-width: 680px; color: var(--ink); }
.js-reveal .tagline-reveal .w { opacity: 0.3; transition: opacity 500ms var(--ease); }
.js-reveal .tagline-reveal .w.on { opacity: 1; }

/* ---------- Scroll reveals (B7) ---------- */
.js-reveal .reveal { opacity: 0; transform: translateY(32px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.js-reveal .reveal.in { opacity: 1; transform: none; }

/* ---------- Final CTA ---------- */
.final-cta { background: var(--bg); border-radius: var(--r-3xl); padding: var(--s-600) var(--s-300); text-align: center; }
.final-cta > * + * { margin-top: var(--s-200); }
.final-cta h2, .final-cta p { max-width: 680px; margin-left: auto; margin-right: auto; }
.final-cta .actions { justify-content: center; }

/* ---------- Result and report ---------- */
.you-got { display: inline-flex; align-items: center; gap: var(--s-50); background: var(--ink); color: #fff; border-radius: var(--r-full); padding: var(--s-50) var(--s-100); }
.tagline { color: var(--ink); }
.preview { margin-top: var(--s-200); }
.preview img { width: 270px; border-radius: var(--r-xl); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }
.preview p { margin-top: var(--s-75); }
.error { color: #b91c1c; }
.traits { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-75); }
.traits li { background: var(--bg); color: var(--ink); border-radius: var(--r-full); padding: var(--s-50) var(--s-100); }
.offer { border: 1px solid var(--line); border-radius: var(--r-3xl); padding: var(--s-300); display: grid; gap: var(--s-300); }
.offer ul { list-style: none; padding: 0; display: grid; gap: var(--s-75); }
.offer li { display: flex; gap: var(--s-75); align-items: flex-start; }
.offer li .icon { color: var(--accent); width: 20px; height: 20px; margin-top: var(--s-25); }
@media (min-width: 800px) { .offer { grid-template-columns: 1.4fr 1fr; align-items: center; padding: var(--s-500); } }

.report { border: 1px solid var(--line); border-radius: var(--r-3xl); padding: var(--s-300); margin-top: var(--s-300); }
.report > * + * { margin-top: var(--s-200); }
.report ul, .report ol { padding-left: var(--s-300); }
.report.mine { border: 2px solid var(--accent); }
.report-head { display: flex; align-items: center; gap: var(--s-300); }
.report-head > div > * + * { margin-top: var(--s-75); }
.report-pic { flex: none; width: auto; height: 140px; max-width: 120px; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.12)); }
.report.mine .report-pic { height: 180px; max-width: 150px; }
@media (max-width: 479px) { .report-head { flex-direction: column; align-items: flex-start; } }
.mix { list-style: none; padding: 0; display: grid; gap: var(--s-75); max-width: 720px; }
.mix li { display: grid; grid-template-columns: minmax(0, 10em) 1fr 2em; gap: var(--s-100); align-items: center; }
.mix .bar { height: 12px; background: var(--soft); border-radius: var(--r-full); overflow: hidden; }
.mix .bar span { display: block; height: 100%; background: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { margin-top: var(--s-700); border-top: 1px solid var(--line); padding: var(--s-400) 0 var(--s-600); color: var(--muted); }
.site-footer .wrap > * + * { margin-top: var(--s-100); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s-75) var(--s-200); }
.footer-links a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .js .question.current { animation: fade 300ms var(--ease); }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  .js-reveal .reveal { transform: none; }
  .js-reveal .tagline-reveal .w { opacity: 1; transition: none; }
  .card a:hover { transform: none; }
  .progress .bar span { transition: opacity 300ms var(--ease); }
}

/* ---------- Language menu ---------- */
.lang-menu { position: relative; }
.lang-menu summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: var(--s-50);
  padding: var(--s-75) var(--s-100); border-radius: var(--r-full); color: var(--muted);
  transition: background-color 300ms var(--ease), color 300ms var(--ease);
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { background: var(--soft); color: var(--text); }
.lang-menu summary .icon { width: 20px; height: 20px; }
.lang-menu ul {
  position: absolute; right: 0; top: calc(100% + var(--s-75)); list-style: none; margin: 0; padding: var(--s-75);
  background: rgba(255, 255, 255, 0.92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.08); border-radius: var(--r-2xl); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  min-width: 160px; animation: rise 500ms var(--ease);
}
.lang-menu li a { display: block; padding: var(--s-75) var(--s-100); border-radius: var(--r-lg); color: var(--text); text-decoration: none; transition: background-color 300ms var(--ease); }
.lang-menu li a:hover { background: var(--soft); }
.lang-menu li a[aria-current="true"] { font-weight: 600; color: var(--accent); }
.footer-links a[aria-current="true"] { color: var(--text); font-weight: 600; }

/* ---------- Free report panel ---------- */
.free { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: var(--r-2xl); padding: var(--s-300); background: var(--soft); }
.free > * + * { margin-top: var(--s-100); }
.free h3 { display: flex; align-items: center; gap: var(--s-75); }
.free h3 .icon { width: 24px; height: 24px; color: var(--accent); }
.free-share input { width: 100%; padding: var(--s-75) var(--s-100); border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; color: var(--text); font-family: inherit; }
.free-share .actions { margin-top: var(--s-100); }

/* ---------- Chinese: Manrope has no Chinese letters, so use the system's Chinese font ---------- */
:lang(zh-Hans) body, :lang(zh-Hans) button, :lang(zh-Hans) input { font-family: "Manrope", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif; }
:lang(zh-Hant) body, :lang(zh-Hant) button, :lang(zh-Hant) input { font-family: "Manrope", "PingFang TC", "Noto Sans CJK TC", "Source Han Sans TC", "Microsoft JhengHei", sans-serif; }
:lang(zh) .h-hero, :lang(zh) .h-section, :lang(zh) .heading-6 { letter-spacing: 0; }

/* ---------- Centered reading columns (FAQ, About, Privacy, Terms) ---------- */
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.page-title { text-align: center; }
.page .answer { text-align: left; }

/* ---------- Result card (HTML twin of the saved image) ---------- */
.fan { display: grid; justify-items: center; align-items: start; padding: var(--s-300) 0 var(--s-200); }
/* Rotated cards must never make the page scroll sideways on phones. */
@media (max-width: 699px) { .hero-panel { overflow: hidden; } }
.fan > .rcard { grid-area: 1 / 1; }
.rcard {
  width: 240px; background: var(--bg); padding: var(--s-100); border-radius: var(--r-3xl);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12); color: var(--ink);
  transition: transform 500ms var(--ease);
}
.rcard-in {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: var(--s-75);
  background: rgba(255, 255, 255, 0.92); border-radius: var(--r-xl); padding: var(--s-300) var(--s-200) var(--s-200); text-align: center;
}
.rcard-quiz { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); text-wrap: balance; }
.rcard-badge {
  position: relative; display: grid; place-items: center; width: 96px; height: 96px; margin: var(--s-200) 0 var(--s-75);
  border-radius: var(--r-full); background: var(--bg); outline: 2px dotted var(--accent); outline-offset: 8px;
}
.rcard-badge svg { width: 56px; height: 56px; fill: var(--accent); }
/* Character head crops fill the disc and are clipped to it. */
.rcard .rcard-badge img { width: 100%; height: 100%; border: 0; border-radius: var(--r-full); box-shadow: none; object-fit: cover; }
.rcard-label { font-size: 12px; line-height: 16px; font-weight: 500; opacity: 0.7; }
.rcard-name { font-size: 20px; line-height: 28px; font-weight: 700; text-wrap: balance; }
.rcard-tag { font-size: 14px; line-height: 20px; font-weight: 400; text-wrap: balance; }
.rcard-traits { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-50); margin-top: var(--s-50); }
.rcard-traits span { background: var(--bg); border-radius: var(--r-full); padding: var(--s-25) var(--s-75); font-size: 12px; line-height: 16px; font-weight: 600; }
.rcard-foot { margin-top: var(--s-75); font-size: 12px; line-height: 16px; font-weight: 700; color: var(--accent); }
/* Confetti around the badge */
.rcard-dots i { position: absolute; display: block; border-radius: var(--r-full); background: var(--accent); opacity: 0.35; }
.rcard-dots .d1 { width: 8px; height: 8px; left: 14%; top: 30%; }
.rcard-dots .d2 { width: 12px; height: 12px; right: 12%; top: 27%; background: transparent; border: 2px solid var(--accent); }
.rcard-dots .d3 { width: 6px; height: 6px; right: 18%; top: 44%; }
.rcard-dots .d4 { width: 10px; height: 10px; left: 12%; top: 45%; background: transparent; border: 2px solid var(--accent); }
.rcard-dots .d5 { width: 6px; height: 6px; left: 24%; top: 24%; }
.rcard-dots .d6 { width: 8px; height: 8px; right: 26%; top: 23%; opacity: 0.25; }
/* Single card on the result page */
.fan .front { transform: rotate(-2deg); z-index: 2; }
.fan:hover .front { transform: rotate(0deg) translateY(-6px); }
.hero-visual figcaption { text-align: center; }
@media (min-width: 700px) { .rcard { width: 260px; } }
@media (prefers-reduced-motion: reduce) { .fan:hover .front { transform: rotate(-2deg); } }

/* Stacked cards carousel (home and quiz page heroes). Cards behind the front
   one peek out to the right; positions come from data-pos, set in the HTML
   and moved by assets/quiz.js. Only transform and opacity animate. */
.cstack { display: grid; justify-items: center; gap: var(--s-200); padding: var(--s-300) 0 var(--s-100); }
.cstack-track { display: grid; justify-items: center; align-items: start; touch-action: pan-y; user-select: none; -webkit-user-select: none; margin-right: 12%; }
.cstack-track > .slide { grid-area: 1 / 1; transition: transform 600ms var(--ease), opacity 400ms var(--ease); will-change: transform; }
.cstack-track > .slide .rcard { transition: none; }
.slide[data-pos="0"] { z-index: 4; transform: rotate(-2deg); }
.slide[data-pos="1"] { z-index: 3; transform: translate(10%, 10px) rotate(3deg) scale(0.94); }
.slide[data-pos="2"] { z-index: 2; transform: translate(20%, 20px) rotate(8deg) scale(0.88); }
.slide[data-pos="3"] { z-index: 1; transform: translate(26%, 28px) rotate(10deg) scale(0.84); opacity: 0; }
.slide[data-pos="out"] { z-index: 5; transform: translate(-70%, 24px) rotate(-14deg); opacity: 0; }
.slide.no-anim { transition: none; }
.cstack.js .slide:not([data-pos="0"]) { cursor: pointer; }
.cstack.js .slide[data-pos="0"]:hover { transform: rotate(0deg) translateY(-6px); }
.cstack-controls { display: flex; align-items: center; gap: var(--s-75); }
.cbtn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-full);
  background: var(--page); border: 1px solid rgba(0, 0, 0, 0.12); color: var(--ink); cursor: pointer;
  transition: background-color 300ms var(--ease), transform 500ms var(--ease);
}
.cbtn:hover { background: rgba(255, 255, 255, 0.72); border-color: rgba(0, 0, 0, 0.24); }
.cbtn:active { transform: scale(0.94); }
.cbtn svg { width: 18px; height: 18px; fill: currentColor; }
.cbtn .i-play { display: none; }
.cstack.paused .cbtn .i-pause { display: none; }
.cstack.paused .cbtn .i-play { display: inline; }
.cdots { display: flex; align-items: center; }
/* Each dot is a 24px tap target with a small visible dot inside. */
.cdot { width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.cdot::before { content: ""; width: 8px; height: 8px; border-radius: var(--r-full); background: var(--ink); opacity: 0.2; transition: opacity 300ms var(--ease), transform 500ms var(--ease); }
.cdot[aria-current="true"]::before { opacity: 1; transform: scale(1.25); }
@media (min-width: 700px) {
  .slide[data-pos="1"] { transform: translate(14%, 10px) rotate(4deg) scale(0.94); }
  .slide[data-pos="2"] { transform: translate(27%, 20px) rotate(9deg) scale(0.88); }
  .slide[data-pos="3"] { transform: translate(34%, 28px) rotate(11deg) scale(0.84); }
}
@media (prefers-reduced-motion: reduce) {
  .cstack-track > .slide { transition: opacity 300ms linear; }
  .cstack.js .slide[data-pos="0"]:hover { transform: rotate(-2deg); }
}

/* Small phones: the logo already links to all quizzes, so drop the duplicate link to keep the bar on screen. */
@media (max-width: 479px) {
  .nav { gap: var(--s-50); padding-left: var(--s-100); max-width: 100%; }
  .logo { margin-right: 0; }
  .nav-links a[href$="/"]:first-child { display: none; }
  .nav-links a, .lang-menu summary { padding: var(--s-75); }
}
