:root {
  --ink: #f3ebdc;
  --muted: #aeb9b6;
  --gold: #d6b780;
  --bg: #161f24;
  --line: #3a4549;
  --serif: "Cormorant Garamond", Georgia, serif;
  font-family: Manrope, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(ellipse at 50% 30%, #28383b55, transparent 65%);
  min-height: 100vh;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 5px;
}
h1:focus {
  outline: none;
}
button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  touch-action: manipulation;
}
header {
  max-width: 1100px;
  margin: auto;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  border: 0;
  background: none;
  letter-spacing: 5px;
  font-size: 16px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.wordmark .mark {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 10px #d6b78040);
}
h1,
h2,
p,
figure {
  margin: 0;
}
h1,
h2 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.02;
}
h1 {
  font-size: clamp(46px, 6vw, 76px);
}
h2 {
  font-size: 40px;
}
em {
  font-weight: 500;
  color: var(--gold);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2.2px;
  line-height: 1.5;
  color: var(--gold);
  font-weight: 600;
}
.hero {
  text-align: center;
  max-width: 740px;
  margin: 32px auto 0;
  padding: 0 24px;
}
.hero h1 {
  margin: 19px 0;
}
.lede {
  font-size: 15px;
  line-height: 1.8;
  color: #c2cbca;
}
.fan {
  height: 315px;
  position: relative;
  margin: 26px auto 18px;
  width: 360px;
  max-width: 100%;
}
.tarot-card {
  background: #243338;
  border: 1px solid #b79965;
  border-radius: 10px;
  padding: 7px;
  width: 184px;
  box-shadow: 0 16px 35px #0004;
  overflow: hidden;
}
.tarot-card img {
  width: 100%;
  display: block;
  aspect-ratio: 180/224;
  object-fit: contain;
  border: 1px solid #8d795444;
  border-radius: 5px 5px 0 0;
}
.tarot-card figcaption {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 1px 5px;
  text-align: center;
}
.tarot-card figcaption span {
  font-size: 9px;
  color: var(--gold);
  letter-spacing: 2px;
}
.tarot-card b {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}
.fan .tarot-card {
  position: absolute;
  left: calc(50% - 92px);
  top: 3px;
}
.fan .left {
  transform: translate(-98px, 23px) rotate(-14deg);
  background: #34303d;
}
.fan .right {
  transform: translate(98px, 23px) rotate(14deg);
  background: #3d3429;
}
.fan .center {
  z-index: 2;
  transform: rotate(-2deg);
}
.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 35px;
  min-height: 56px;
  background: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 6px;
  color: #192328;
  font-size: 14px;
  font-weight: 700;
  padding: 14px 24px;
  width: 100%;
  transition:
    background 0.2s,
    transform 0.2s;
}
@media (hover: hover) {
  .primary:hover {
    background: #e4c998;
    transform: translateY(-1px);
  }
  .options:not(.rest) .option:hover {
    background: #d6b78015;
    border-color: var(--gold);
  }
}
.hero > .primary,
.reveal > .primary {
  max-width: 360px;
  margin: auto;
}
.micro {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 13px;
}
.text-link {
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 5px;
  font-size: 12px;
  padding: 14px;
  color: var(--muted);
}
.footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 32px auto 20px;
  padding: 0 16px;
}
.footer button {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 10px;
  padding: 10px;
}
.quiz-top {
  display: flex;
  gap: 22px;
  align-items: center;
  max-width: 660px;
  margin: 28px auto 0;
  padding: 0 24px;
}
.back,
.close {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 10px;
  font-size: 20px;
}
.meter {
  height: 3px;
  flex: 1;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.meter i {
  display: block;
  height: 100%;
  background: var(--gold);
}
.question {
  max-width: 600px;
  min-height: 490px;
  padding: 0 24px;
  margin: 54px auto 0;
}
.question h1 {
  font-size: clamp(38px, 5vw, 52px);
  line-height: 1.1;
  margin: 18px 0 12px;
}
.options {
  display: grid;
  gap: 12px;
}
.option {
  background: #ffffff03;
  border: 1px solid #536064;
  border-radius: 7px;
  text-align: left;
  padding: 20px;
  min-height: 65px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition:
    background 0.2s,
    border 0.2s;
  font-size: 14px;
}
.option i {
  display: block;
  border: 1px solid #718082;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 100%;
}
.option.selected {
  background: #d6b78015;
  border-color: var(--gold);
}
.option.selected i {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: inset 0 0 0 3px #273136;
}
.reveal {
  text-align: center;
  margin: 45px auto;
  padding: 0 24px;
}
.reveal h1 {
  margin: 20px 0 30px;
}
.card-back {
  width: 184px;
  height: 270px;
  border: 1px solid var(--gold);
  outline: 1px solid #d6b78055;
  outline-offset: -10px;
  border-radius: 10px;
  background: repeating-radial-gradient(
    ellipse at center,
    #283a3c 0 1px,
    #1d2a30 2px 16px
  );
  margin: 0 auto 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  color: var(--gold);
  box-shadow: 0 20px 45px #0005;
}
.card-back span {
  font-size: 48px;
}
.card-back b {
  font-size: 11px;
  letter-spacing: 4px;
}
.preview-note {
  max-width: 980px;
  margin: 10px auto;
  text-align: center;
  font-size: 10px;
  color: var(--muted);
}
.preview-note button {
  border: 0;
  background: none;
  text-decoration: underline;
  color: var(--gold);
  padding: 10px;
  font-size: 11px;
}
.result-intro {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 64px;
  max-width: 900px;
  margin: 45px auto 55px;
  padding: 0 30px;
  align-items: center;
}
.result-art .tarot-card {
  width: 250px;
  transform: rotate(-3deg);
}
.result-art .tarot-card b {
  font-size: 28px;
}
.result-summary h1 {
  margin: 14px 0;
  font-size: 60px;
}
.subtitle {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--gold);
  margin-bottom: 22px;
}
.intro {
  font-size: 15px;
  line-height: 1.9;
  color: #d1d8d4;
}
.free-insight {
  border-left: 1px solid var(--gold);
  padding-left: 20px;
  margin: 25px 0;
}
.free-insight p {
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.4;
  margin-top: 8px;
}
.offer {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  background: #eee6d5;
  color: #252e30;
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 36px;
  border-radius: 10px;
}
.offer .eyebrow {
  color: #6c5737;
}
.offer h2 {
  margin: 16px 0;
  text-wrap: balance;
}
.offer em {
  color: #716044;
}
.offer-copy {
  font-size: 13px;
  line-height: 1.8;
  color: #566061;
}
.offer ul {
  padding: 0;
  list-style: none;
  margin: 22px 0 0;
  font-size: 12px;
  line-height: 2.2;
}
.offer li:before {
  content: "✦";
  color: #8b6f3c;
  margin-right: 12px;
}
.purchase {
  align-self: center;
  border-left: 1px solid #c9c3b6;
  padding-left: 28px;
}
.price {
  font-family: var(--serif);
  font-size: 58px;
}
.price span {
  font:
    10px Manrope,
    Arial,
    sans-serif;
}
.offer .micro {
  color: #566061;
}
.purchase .primary {
  margin-top: 24px;
  gap: 14px;
  background: #26373b;
  color: #fff2dd;
  border-color: #26373b;
}
.purchase #payment-status {
  font-size: 12px;
  line-height: 1.6;
  margin-top: 12px;
}
.faq {
  max-width: 700px;
  margin: 28px auto;
  padding: 0 24px;
}
details {
  border-bottom: 1px solid var(--line);
}
summary {
  padding: 21px 0;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.5;
}
details p {
  font-size: 13px;
  color: #c2cbca;
  line-height: 1.9;
  padding: 0 0 22px;
}
.end-actions {
  text-align: center;
  margin: 30px auto;
}
.profile {
  max-width: 780px;
  margin: auto;
  padding: 0 30px;
}
.profile-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}
.small-button {
  background: transparent;
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: 4px;
  font-size: 11px;
  margin: 4px;
}
.chapter {
  display: flex;
  gap: 30px;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}
.chapter > span {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--gold);
}
.chapter h2 {
  font-size: 32px;
  margin-bottom: 16px;
}
.chapter p,
.policy {
  max-width: 650px;
  margin: 40px auto;
  min-height: 65vh;
  padding: 0 24px;
}
.policy h1 {
  font-size: 50px;
  margin: 30px 0;
}
.policy p {
  font-size: 15px;
  line-height: 1.9;
  margin: 24px 0;
  color: #c2cbca;
}
.deck {
  max-width: 1000px;
  margin: 25px auto;
  padding: 0 24px;
}
.deck h1 {
  margin: 18px 0;
}
.deck-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 24px;
  margin-top: 35px;
}
.deck .tarot-card {
  width: 100%;
}
.deck-grid p {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 12px;
}
@media (max-width: 650px) {
  header {
    padding: 23px 22px;
  }
  .wordmark {
    font-size: 13px;
    letter-spacing: 3px;
    gap: 10px;
  }
  .wordmark .mark {
    width: 34px;
    height: 34px;
  }
  .hero {
    margin-top: 28px;
  }
  .hero h1 {
    font-size: 49px;
  }
  .hero .eyebrow {
    font-size: 9px;
    letter-spacing: 1.6px;
  }
  .lede {
    font-size: 13px;
  }
  .fan {
    transform: scale(0.9);
    margin: 12px auto 0;
    height: 300px;
  }
  .footer {
    margin-top: 22px;
    gap: 0;
  }
  .quiz-top {
    margin-top: 18px;
    gap: 14px;
    padding: 0 16px;
  }
  .question {
    margin-top: 36px;
    min-height: 440px;
  }
  .question h1 {
    font-size: 40px;
  }
  .option {
    padding: 18px 16px;
    font-size: 13px;
  }
  .result-intro {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin: 25px auto 34px;
    padding: 0 24px;
  }
  .result-art .tarot-card {
    width: 196px;
  }
  .result-art .tarot-card b {
    font-size: 23px;
  }
  .result-summary {
    text-align: center;
  }
  .result-summary h1 {
    font-size: 49px;
  }
  .subtitle {
    font-size: 25px;
    margin-bottom: 16px;
  }
  .intro {
    font-size: 14px;
  }
  .free-insight {
    text-align: left;
  }
  .offer {
    display: block;
    margin: 0 16px;
    padding: 28px 24px;
  }
  .offer h2 {
    font-size: 38px;
  }
  .purchase {
    border-left: 0;
    border-top: 1px solid #c9c3b6;
    padding: 20px 0 0;
    margin-top: 24px;
  }
  .purchase .primary {
    margin-top: 18px;
  }
  .profile {
    padding: 0 24px;
  }
  .profile-heading {
    align-items: start;
    flex-direction: column;
  }
  .chapter {
    gap: 18px;
  }
  .chapter h2 {
    font-size: 30px;
  }
  .deck-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px 16px;
  }
  .deck .tarot-card b {
    font-size: 18px;
  }
  .deck .tarot-card {
    padding: 5px;
  }
  .deck-grid p {
    font-size: 10px;
  }
  .reveal h1 {
    font-size: 48px;
  }
  .preview-note {
    font-size: 9px;
  }
  .policy h1 {
    font-size: 42px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  body {
    background: white;
    color: black;
  }
  header,
  .footer,
  .preview-note,
  .end-actions,
  .small-button {
    display: none;
  }
  * {
    color: black !important;
  }
  .result-intro {
    margin: 20px auto;
    break-inside: avoid;
  }
  .profile {
    max-width: none;
  }
  details {
    display: block;
  }
  details::details-content {
    content-visibility: visible !important;
    height: auto !important;
  }
  details p {
    display: block;
  }
  .chapter {
    break-inside: avoid;
  }
  .tarot-card {
    box-shadow: none;
  }
}

/* Generated art keeps layout dimensions stable while images load. */
.tarot-card img {
  aspect-ratio: 2/3;
  object-fit: cover;
}
.fan {
  height: 390px;
}
.fan .tarot-card {
  width: 174px;
  left: calc(50% - 87px);
}
.fan .left {
  transform: translate(-96px, 23px) rotate(-14deg);
}
.fan .right {
  transform: translate(96px, 23px) rotate(14deg);
}
.sticker {
  object-fit: contain;
  display: block;
  pointer-events: none;
}
.question {
  position: relative;
  margin-top: 24px;
}
.question-sticker {
  width: 76px;
  height: 76px;
  margin: 0 0 20px auto;
  transform: rotate(7deg);
}
.reveal-sticker {
  width: 150px;
  height: 150px;
  margin: 0 auto;
}
.card-back {
  gap: 12px;
}
.offer-sticker {
  position: absolute;
  top: -22px;
  right: 22px;
  width: 64px;
  height: 64px;
  transform: rotate(12deg);
  filter: drop-shadow(0 6px 8px #0003);
}
.chapter-symbol .sticker {
  width: 48px;
  height: 48px;
}
.chapter-symbol small {
  display: block;
  text-align: center;
  font:
    11px Manrope,
    Arial,
    sans-serif;
  margin-top: 7px;
  color: var(--gold);
}
.result-art {
  perspective: 1000px;
}
.result-art .tarot-card {
  animation: card-arrive 0.75s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes card-arrive {
  from {
    opacity: 0;
    transform: rotateY(65deg) rotate(-3deg) translateY(12px);
  }
  to {
    opacity: 1;
    transform: rotateY(0) rotate(-3deg) translateY(0);
  }
}
@media (max-width: 650px) {
  .fan {
    height: 355px;
    margin-top: 10px;
    transform: scale(0.84);
  }
  .question {
    margin-top: 20px;
  }
  .question-sticker {
    width: 64px;
    height: 64px;
    margin-bottom: 15px;
  }
  .question h1 {
    font-size: 37px;
  }
  .result-art .tarot-card {
    width: 184px;
  }
  .chapter-symbol .sticker {
    width: 37px;
    height: 37px;
  }
  .chapter {
    gap: 14px;
  }
  .hero h1 {
    font-size: 46px;
  }
}

@media (max-width: 380px) {
  .fan {
    transform: scale(0.78);
    height: 330px;
  }
  .fan .left {
    transform: translate(-70px, 23px) rotate(-12deg);
  }
  .fan .right {
    transform: translate(70px, 23px) rotate(12deg);
  }
  .hero h1 {
    font-size: 42px;
  }
}

/* Loading: five steps fill in turn while stickers orbit a crystal ball. */
.loading {
  max-width: 520px;
  margin: 10px auto 40px;
  padding: 0 24px;
  text-align: center;
}
.loading h1 {
  font-size: clamp(38px, 9vw, 52px);
  margin: 6px 0 26px;
}
.orbit {
  position: relative;
  width: 220px;
  height: 180px;
  margin: 0 auto;
}
.orbit .orb {
  position: absolute;
  inset: 22px 50px;
  width: 120px;
  height: 120px;
  animation: orb-glow 2.4s ease-in-out infinite;
}
.orbiter {
  position: absolute;
  width: 46px;
  height: 46px;
  left: calc(50% - 23px);
  top: calc(50% - 23px);
  animation: orbit 7s linear infinite;
}
.o1 { animation-delay: -1.17s; width: 52px; height: 52px; }
.o2 { animation-delay: -2.33s; }
.o3 { animation-delay: -3.5s; width: 36px; height: 36px; }
.o4 { animation-delay: -4.67s; }
.o5 { animation-delay: -5.83s; width: 40px; height: 40px; }
@keyframes orbit {
  from { transform: rotate(0) translateX(96px) rotate(0) scale(0.9); }
  50% { transform: rotate(180deg) translateX(96px) rotate(-180deg) scale(1.1); }
  to { transform: rotate(360deg) translateX(96px) rotate(-360deg) scale(0.9); }
}
@keyframes orb-glow {
  50% { filter: drop-shadow(0 0 22px #d6b78088); transform: scale(1.04); }
}
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 18px;
  text-align: left;
}
.steps li {
  opacity: 0.35;
  transition: opacity 0.4s;
}
.steps li.active {
  opacity: 1;
}
.step-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
}
.step-head b {
  color: var(--gold);
  opacity: 0;
  transform: scale(0.4);
  transition: 0.3s;
}
.steps li.done .step-head b {
  opacity: 1;
  transform: none;
}
.bar {
  height: 6px;
  border-radius: 6px;
  background: var(--line);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, #a5823f, var(--gold), #f1dcae);
}
.steps li.active .bar i {
  width: 100%;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reveal: stickers float round the card; a tap charges, bursts and flips it. */
.reveal .stage {
  position: relative;
  width: min(100%, 360px);
  height: 360px;
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
}
.rays {
  position: absolute;
  inset: -10%;
  background: repeating-conic-gradient(#d6b78022 0 6deg, transparent 6deg 18deg);
  mask: radial-gradient(circle, #000 25%, transparent 65%);
  animation: spin 40s linear infinite;
  transition: opacity 0.6s;
  opacity: 0.6;
}
.stage.open .rays {
  opacity: 1;
  animation-duration: 12s;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.float {
  position: absolute;
  width: 54px;
  height: 54px;
  animation: bob 4s ease-in-out infinite;
  transition:
    transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.9s;
  z-index: 1;
}
.f0 { left: 4%; top: 6%; }
.f1 { right: 2%; top: 2%; width: 62px; height: 62px; animation-delay: -1s; }
.f2 { left: -2%; top: 44%; width: 48px; height: 48px; animation-delay: -2s; }
.f3 { right: 4%; top: 40%; width: 44px; height: 44px; animation-delay: -0.5s; }
.f4 { left: 6%; bottom: 4%; width: 58px; height: 58px; animation-delay: -1.5s; }
.f5 { right: 6%; bottom: 8%; animation-delay: -2.5s; }
.f6 { left: 40%; top: -6%; width: 40px; height: 40px; animation-delay: -3s; }
.f7 { left: 42%; bottom: -6%; width: 44px; height: 44px; animation-delay: -3.5s; }
@keyframes bob {
  50% { translate: 0 -9px; rotate: 6deg; }
}
.stage.open .float {
  opacity: 0;
  transform: scale(1.6) translate(var(--fx, 0), var(--fy, 0));
}
.f0, .f2, .f4 { --fx: -40px; }
.f1, .f3, .f5 { --fx: 40px; }
.f0, .f1, .f6 { --fy: -40px; }
.f4, .f5, .f7 { --fy: 40px; }
.flip {
  position: relative;
  z-index: 2;
  width: 184px;
  perspective: 1200px;
  cursor: pointer;
}
.flip-inner {
  display: grid;
  transform-style: preserve-3d;
  transition: transform 1.1s cubic-bezier(0.45, 0, 0.2, 1);
}
.flip .face {
  grid-area: 1 / 1;
  backface-visibility: hidden;
}
.flip .card-back {
  height: auto;
  margin: 0;
  animation: pulse 2.2s ease-in-out infinite;
}
.flip .front {
  transform: rotateY(180deg);
}
@keyframes pulse {
  50% { box-shadow: 0 0 0 1px #d6b78088, 0 0 44px #d6b78044, 0 20px 45px #0005; }
}
.stage.charging .flip {
  animation: shake 0.65s ease-in-out;
}
@keyframes shake {
  20% { transform: rotate(-3deg) scale(1.02); }
  40% { transform: rotate(3deg) scale(1.04); }
  60% { transform: rotate(-2deg) scale(1.06); }
  80% { transform: rotate(1deg) scale(1.07); }
}
.stage.open .flip-inner {
  transform: rotateY(180deg) scale(1.08);
}
.stage.open .front .tarot-card {
  box-shadow:
    0 0 0 1px #d6b780,
    0 0 70px #d6b78066,
    0 20px 45px #0005;
}
.reveal-name {
  min-height: 74px;
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1.05;
  opacity: 0;
  transform: translateY(10px);
  transition: 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal-name.show {
  opacity: 1;
  transform: none;
}
.reveal-name span {
  display: block;
  font: 600 10px/2 Manrope, Arial, sans-serif;
  letter-spacing: 3px;
  color: var(--gold);
}
.reveal-name em {
  display: block;
  font-size: 22px;
}
.result-art .tarot-card.revealed {
  animation: card-settle 0.6s ease-out both;
}
@keyframes card-settle {
  from {
    opacity: 0;
    transform: rotate(0) scale(1.04);
  }
  to {
    opacity: 1;
    transform: rotate(-3deg);
  }
}

/* Keep the landing call to action above the fold on short screens. */
@media (min-width: 651px) and (max-height: 820px) {
  .hero {
    margin-top: 8px;
  }
  .hero h1 {
    margin: 12px 0;
  }
  .fan {
    height: 300px;
    margin: 14px auto 10px;
    transform: scale(0.78);
    transform-origin: 50% 0;
  }
}
@media (max-height: 700px) {
  .fan {
    height: 232px;
    margin: 10px auto 6px;
    transform: scale(0.6);
    transform-origin: 50% 0;
  }
}

/* Gallery: tappable cards with a detail dialog. */
.deck .back,
.policy .back {
  font-size: 13px;
  padding: 10px 0;
}
.deck-card {
  background: none;
  border: 0;
  padding: 0;
  text-align: inherit;
  transition: transform 0.2s;
}
@media (hover: hover) {
  .deck-card:hover {
    transform: translateY(-4px);
  }
}
.card-dialog {
  width: min(760px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  display: none;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: center;
}
.card-dialog[open] {
  display: grid;
}
.card-dialog::backdrop {
  background: #0b1013cc;
}
.card-dialog form {
  position: absolute;
  top: 8px;
  right: 8px;
}
.card-dialog .tarot-card {
  width: 100%;
}
.card-dialog h2 {
  font-size: 48px;
  margin: 12px 0 8px;
}
@media (max-width: 650px) {
  .card-dialog {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 32px 24px 24px;
    text-align: center;
  }
  .card-dialog .tarot-card {
    width: 170px;
    margin: auto;
  }
  .card-dialog h2 {
    font-size: 40px;
  }
  .offer-sticker {
    width: 54px;
    height: 54px;
    top: -18px;
    right: 18px;
  }
}
.retake-box:has(#retake-yes) {
  display: block;
}

/* Result links: read-more jumps to the offer or profile; gallery sits beside it. */
.result-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
  margin-top: 26px;
}
.read-more {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 6px;
  padding: 12px 0;
}
.result-links .text-link {
  padding: 12px 0;
}
@media (max-width: 650px) {
  .result-links {
    justify-content: center;
    flex-direction: column;
    gap: 0;
  }
}

/* Full profile. Chart series tokens validated for both dark screen and light print. */
:root {
  --series-a: #bd8a2e;
  --series-b: #4a95d0;
  --panel: #1c272c;
}
.profile {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px;
}
.profile-heading {
  flex-wrap: wrap;
  border: 0;
  padding: 10px 0 0;
}
.profile-heading h2 {
  margin-top: 8px;
}
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.profile-actions .small-button {
  margin: 0;
}
.toc {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 18px -20px 8px;
  padding: 12px 20px;
  background: #161f24ee;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.toc::-webkit-scrollbar {
  display: none;
}
.toc a {
  flex: none;
  color: var(--ink);
  font-size: 12px;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 8px 13px;
}
.doc-section {
  padding: 40px 0 6px;
  scroll-margin-top: 64px;
}
.doc-head {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}
.doc-sticker {
  width: 58px;
  height: 58px;
  flex: none;
}
.doc-section h2 {
  font-size: clamp(30px, 7vw, 40px);
  margin-top: 6px;
}
.doc-section > p,
.lead p {
  font-size: 15px;
  line-height: 1.85;
  color: #ccd4d1;
  margin: 0 0 16px;
}
.lead p:first-child {
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.45;
  color: var(--ink);
}
.col-title {
  font: 600 11px/1.5 Manrope, Arial, sans-serif;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--gold);
  margin: 26px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.two-col,
.sb-chart,
.poster-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 28px;
}

/* Likes / dislikes. */
.pill-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.pill-list li {
  background: var(--panel);
  border-left: 2px solid var(--series-a);
  border-radius: 0 8px 8px 0;
  padding: 13px 15px;
}
.pill-list.dislike li {
  border-left-color: var(--series-b);
}
.pill-list b {
  font-size: 14px;
}
.pill-list p,
.detail p,
.match p {
  font-size: 13px;
  line-height: 1.7;
  color: #c2cbca;
  margin-top: 5px;
}

/* Strengths vs blind spots: paired horizontal bars, 0-10. */
.swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}
.swatch.a,
.bar.a {
  background: var(--series-a);
}
.swatch.b,
.bar.b {
  background: var(--series-b);
}
.sb-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 12px;
}
.bar-track {
  height: 10px;
  background: #2a363b;
  border-radius: 0 4px 4px 0;
}
.bar-track .bar {
  display: block;
  height: 100%;
  border-radius: 0 4px 4px 0;
}
.sb-row b {
  text-align: right;
  font-weight: 600;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}
.detail {
  background: var(--panel);
  border-radius: 10px;
  padding: 16px;
  border-top: 3px solid var(--series-a);
}
.detail.b {
  border-top-color: var(--series-b);
}
.detail h4,
.match h4 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.detail h4 span {
  font: 600 11px Manrope, Arial, sans-serif;
  color: var(--muted);
  align-self: center;
}
.try {
  border-top: 1px solid #2c383d;
  padding-top: 9px;
}
.try b {
  color: var(--gold);
}

/* Compatibility. */
.match-grid {
  display: grid;
  gap: 12px;
}
.match {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  background: var(--panel);
  border-radius: 10px;
  padding: 14px;
}
.match img {
  width: 64px;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid #b7996566;
}
.match-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px !important;
  color: var(--muted) !important;
}
.dots {
  display: inline-flex;
  gap: 3px;
}
.dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid #56646a;
}
.dots.a i.on {
  background: var(--series-a);
  border-color: var(--series-a);
}
.dots.b i.on {
  background: var(--series-b);
  border-color: var(--series-b);
}

/* Closing lines. */
.lines {
  display: grid;
  gap: 14px;
  margin: 40px 0 0;
}
blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.35;
  border-left: 2px solid var(--gold);
  padding: 4px 0 4px 18px;
}

@media (max-width: 650px) {
  .two-col,
  .sb-chart,
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .doc-sticker {
    width: 46px;
    height: 46px;
  }
  .lead p:first-child {
    font-size: 21px;
  }
  .reveal .stage {
    height: 330px;
  }
  .reveal h1 {
    font-size: 40px;
    margin: 14px 0 6px;
  }
}

@media print {
  .toc,
  .profile-actions,
  .poster-button,
  .result-links,
  .offer,
  .faq,
  .doc-sticker {
    display: none !important;
  }
  .doc-section,
  .detail,
  .match,
  .pill-list li {
    break-inside: avoid;
    background: none;
  }
  :root {
    --series-a: #9a6a1a;
    --series-b: #2a74b8;
  }
  .bar-track,
  .bar,
  .mark,
  .dots i,
  .swatch {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  body.print-poster #app > *:not(.profile),
  body.print-poster .profile > *:not(#poster),
  body.print-poster #poster > .doc-head {
    display: none !important;
  }
  body.print-poster .poster-sheet {
    padding: 0;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  body.print-poster .profile {
    padding: 0;
  }
}

/* Phone landing: with the extra copy gone, center the hero and let the fan breathe. */
@media (max-width: 650px) {
  .hero {
    min-height: calc(100svh - 170px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 0;
  }
  .hero h1 {
    font-size: 42px;
    margin: 0 0 8px;
  }
  .fan {
    height: 345px;
    transform: scale(0.95);
    transform-origin: 50% 0;
    margin: 18px auto 8px;
  }
  .hero > .primary {
    width: 100%;
    margin: 0 auto;
  }
}
@media (max-width: 650px) and (max-height: 720px) {
  .fan {
    height: 292px;
    transform: scale(0.8);
  }
}

[hidden] {
  display: none !important;
}
.reveal {
  overflow-x: clip;
  margin-top: 24px;
}
.reveal-name {
  min-height: 62px;
  font-size: 34px;
}
@media (max-width: 650px) {
  .reveal .flip {
    width: 158px;
  }
  .reveal .stage {
    height: 300px;
  }
  .reveal-name {
    font-size: 30px;
  }
}
.flip .card-back,
.flip .tarot-card {
  width: 100%;
}
.reveal .stage {
  height: auto;
  padding: 34px 0;
}
@media (max-width: 650px) {
  .reveal .stage {
    height: auto;
    padding: 30px 0;
  }
}
#more {
  scroll-margin-top: 30px;
}
@media screen and (max-width: 650px) {
  .poster-cols.bars {
    grid-template-columns: 1fr;
  }
}

/* Restore my purchase. */
.restore-link {
  display: block;
  padding: 14px 0 0;
  color: #566061;
}
.restore-form {
  margin-top: 12px;
}
.restore-form label {
  display: block;
  font-size: 11px;
  color: #566061;
  margin-bottom: 6px;
}
.restore-form div {
  display: flex;
  gap: 8px;
}
.restore-form input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid #c9c3b6;
  border-radius: 6px;
  background: #fffaf0;
  color: #252e30;
}
.restore-form .small-button {
  border-color: #26373b;
  background: #26373b;
  color: #fff2dd;
}
#restore-status {
  font-size: 12px;
  line-height: 1.6;
  margin-top: 10px;
}
.loading .lede {
  margin: -10px 0 24px;
}

/* Trait chart: one tinted tile per trait. Gold orb = you; card thumbnail = the card's typical spot. */
.t0 { --hue: #e09a83; }
.t1 { --hue: #d6b780; }
.t2 { --hue: #d48aa6; }
.t3 { --hue: #a89be0; }
.t4 { --hue: #78c1b2; }
.t5 { --hue: #7fb0e0; }
.trait-chart {
  display: grid;
  gap: 16px;
}
.trait-summary .col-title {
  margin: 0 0 10px;
}
.pulls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pull {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: color-mix(in srgb, var(--hue) 22%, #1c272c);
  border: 1px solid color-mix(in srgb, var(--hue) 55%, transparent);
}
.pull-sticker {
  width: 30px;
  height: 30px;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 12px;
  color: var(--muted);
}
.legend span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.you-key {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f3d9a2, var(--series-a) 70%);
  box-shadow: 0 0 0 2px #fff6;
}
.card-key {
  width: 14px;
  height: 21px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid var(--series-b);
}
.traits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.trait {
  border-radius: 12px;
  padding: 14px 16px 10px;
  background: linear-gradient(150deg, color-mix(in srgb, var(--hue) 20%, #1c272c), #1a2429 70%);
  border: 1px solid color-mix(in srgb, var(--hue) 40%, transparent);
  min-width: 0;
}
.trait-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 2px 10px;
}
.trait-head b {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--hue);
}
.trait-head span {
  font-size: 12px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.poles {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--muted);
}
.poles span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pole-sticker {
  width: 32px;
  height: 32px;
}
.spectrum {
  position: relative;
  height: 64px;
  margin: 4px 12px 0;
}
.spectrum:before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 24px;
  height: 10px;
  border-radius: 10px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--hue) 75%, transparent), color-mix(in srgb, var(--hue) 14%, transparent) 50%, color-mix(in srgb, var(--hue) 75%, transparent));
}
.spectrum .mid {
  position: absolute;
  left: 50%;
  top: 20px;
  width: 1px;
  height: 18px;
  background: color-mix(in srgb, var(--ink) 40%, transparent);
}
.you-pin {
  position: absolute;
  top: 18px;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f6e1b3, var(--series-a) 70%);
  box-shadow:
    0 0 0 2px #fff8,
    0 0 16px color-mix(in srgb, var(--series-a) 70%, transparent);
}
.you-pin span {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--series-a);
}
.card-pin {
  position: absolute;
  top: 38px;
  width: 17px;
  height: 25px;
  margin-left: -8.5px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid var(--series-b);
  box-shadow: 0 2px 6px #0006;
}
.trait-chart.compact .traits {
  gap: 8px;
}
.trait-chart.compact .trait {
  padding: 10px 12px 6px;
}
.trait-chart.compact .trait-head b {
  font-size: 18px;
}
.trait-chart.compact .pole-sticker {
  width: 24px;
  height: 24px;
}

/* Poster: a dark, gold-framed one-page print. */
.poster-sheet {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  padding: 14px;
  color: #f3ebdc;
  background:
    radial-gradient(circle at 50% -10%, #34494c 0, transparent 55%),
    radial-gradient(circle at 100% 100%, #2a2236 0, transparent 45%),
    #121a1e;
  --ink: #f3ebdc;
  --muted: #b9c2bf;
  --panel: #1c272c;
  --series-a: #bd8a2e;
  --series-b: #4a95d0;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
.poster-frame {
  position: relative;
  border: 1px solid #d6b780aa;
  outline: 1px solid #d6b78040;
  outline-offset: -7px;
  border-radius: 10px;
  padding: 30px 24px 22px;
  display: grid;
  gap: 16px;
}
.corner {
  position: absolute;
  z-index: 1;
  width: 54px;
  height: 54px;
}
.c0 { top: 2px; left: 2px; transform: rotate(-12deg); }
.c1 { top: 2px; right: 2px; transform: rotate(10deg); }
.c2 { bottom: 2px; left: 2px; transform: rotate(-8deg); }
.c3 { bottom: 2px; right: 2px; transform: rotate(14deg); }
.poster-brand {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 6px;
  color: #d6b780;
}
.poster-hero {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 24px;
  align-items: center;
}
.poster-card {
  position: relative;
}
.poster-card .tarot-card {
  width: 170px;
  transform: rotate(-3deg);
  box-shadow:
    0 0 0 1px #d6b780,
    0 0 50px #d6b78055,
    0 18px 40px #0008;
}
.poster-sparkle {
  position: absolute;
  z-index: 2;
  top: -16px;
  right: -18px;
  width: 52px;
  height: 52px;
}
.poster-title h2 {
  font-size: 58px;
  line-height: 0.95;
  margin: 8px 0 6px;
  background: linear-gradient(180deg, #fff3da, #d6b780);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.poster-title .subtitle {
  font-size: 24px;
  font-style: italic;
  margin-bottom: 10px;
}
.poster-title .intro {
  font-size: 13px;
  line-height: 1.6;
  color: #d1d8d4;
}
.poster-band {
  border: 1px solid #d6b78033;
  border-radius: 10px;
  padding: 12px 14px;
  background: #ffffff08;
  min-width: 0;
}
.poster-band h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font: 700 10.5px/1.4 Manrope, Arial, sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #d6b780;
}
.band-sticker {
  width: 28px;
  height: 28px;
}
.poster-sheet .poster-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.poster-sheet .sb-row {
  font-size: 11px;
}
.poster-sheet .bar-track {
  background: #ffffff14;
}
.thumbs {
  display: flex;
  gap: 10px;
}
.thumbs figure {
  margin: 0;
  width: 58px;
  text-align: center;
}
.thumbs img {
  width: 58px;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #d6b78088;
}
.thumbs figcaption {
  font-size: 9.5px;
  line-height: 1.3;
  color: #d1d8d4;
  margin-top: 4px;
}
.poster-sheet blockquote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  border-top: 1px solid #d6b78055;
  border-bottom: 1px solid #d6b78055;
  padding: 14px 6px;
  font-size: 23px;
  text-align: center;
  color: #fff3da;
}
.quote-sticker {
  width: 40px;
  height: 40px;
  flex: none;
}
.poster-foot {
  text-align: center;
  font-size: 9.5px;
  letter-spacing: 1px;
  color: #9aa6a4;
}
.poster-button {
  max-width: 320px;
  margin: 18px auto 0;
}

@media (max-width: 650px) {
  .traits {
    grid-template-columns: 1fr;
  }
  .poster-frame {
    padding: 34px 14px 20px;
  }
  .poster-hero {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .poster-card .tarot-card {
    width: 150px;
  }
  .poster-title h2 {
    font-size: 46px;
  }
  .poster-sheet .poster-cols {
    grid-template-columns: 1fr;
  }
  .corner {
    width: 42px;
    height: 42px;
  }
}
@media print {
  .trait,
  .pull,
  .you-pin,
  .card-pin,
  .spectrum:before {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  body.print-poster .poster-sheet .traits {
    grid-template-columns: 1fr 1fr;
  }
  body.print-poster .poster-sheet .poster-cols {
    grid-template-columns: 1fr 1fr;
  }
}
@media print {
  @page {
    margin: 8mm;
  }
  /* The poster measures ~1,460px tall at print width; scale it onto one A4/Letter page. */
  body.print-poster .poster-sheet {
    zoom: 0.72;
    break-inside: avoid;
  }
}

/* ---------- Rarity tiers ---------- */
.tier-legendary { --tc: #f0b45a; --tc2: #ff8a5c; }
.tier-mythic { --tc: #b49cf0; --tc2: #8f7ae0; }
.tier-rare { --tc: #5fc9a2; --tc2: #3fa585; }
.tier-uncommon { --tc: #6fa6ee; --tc2: #4f86d6; }
.tier-common { --tc: #c98e5a; --tc2: #a8703f; }
.emblem {
  display: block;
  object-fit: contain;
}

/* ---------- Cosmic backdrop and canvas effects (loading, reveal) ---------- */
body.cosmic {
  background:
    radial-gradient(ellipse at 50% 40%, #16232800, #0d1417cc 75%),
    url("assets/art/cosmos.webp") center / cover fixed,
    #10181c;
}
.fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.fx-stars {
  z-index: 0;
}
.fx-burst {
  z-index: 40;
}
#app {
  position: relative;
  z-index: 1;
}

/* ---------- Loading polish ---------- */
.bar i {
  position: relative;
  overflow: hidden;
}
.bar i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, #fff8 50%, transparent 80%);
  transform: translateX(-100%);
  animation: sweep 1.1s ease-in-out infinite;
}
@keyframes sweep {
  to { transform: translateX(100%); }
}
.steps li.done .step-head b {
  animation: pop 0.45s cubic-bezier(0.2, 1.6, 0.4, 1);
}
@keyframes pop {
  from { transform: scale(0.2); }
  to { transform: scale(1); }
}
.steps li.active .step-head span {
  text-shadow: 0 0 18px #d6b78066;
}
.loading .orb {
  filter: drop-shadow(0 0 26px #d6b78066);
}
.loading.drawn .orbit {
  animation: draw-out 0.65s ease-in forwards;
}
.loading.drawn .steps,
.loading.drawn h1 {
  transition: opacity 0.5s;
  opacity: 0;
}
@keyframes draw-out {
  40% { transform: scale(1.15); filter: brightness(1.6); }
  to { transform: scale(0.2); opacity: 0; filter: brightness(3); }
}

/* ---------- Reveal ---------- */
.light {
  position: absolute;
  z-index: -1;
  width: 520px;
  max-width: none;
  left: 50%;
  top: 50%;
  margin: -260px 0 0 -260px;
  opacity: 0.25;
  transform: scale(0.55);
  transition: opacity 0.6s, transform 0.6s;
  animation: spin 30s linear infinite;
  pointer-events: none;
}
.flip .card-back {
  padding: 0;
  background: none;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid #d6b780;
}
.flip .card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.flip:not(.static) {
  animation: hover-card 3.2s ease-in-out infinite;
}
@keyframes hover-card {
  50% { translate: 0 -8px; rotate: 1.5deg; }
}
/* 1. Stickers pull into the card. */
.f0 { --gx: 110px; --gy: 120px; }
.f1 { --gx: -110px; --gy: 120px; }
.f2 { --gx: 140px; --gy: 10px; }
.f3 { --gx: -140px; --gy: 10px; }
.f4 { --gx: 110px; --gy: -110px; }
.f5 { --gx: -110px; --gy: -110px; }
.f6 { --gx: 10px; --gy: 150px; }
.f7 { --gx: 0px; --gy: -150px; }
.stage.gather .float {
  transition: transform 0.45s cubic-bezier(0.6, 0, 0.9, 0.4), opacity 0.45s;
  transform: translate(var(--gx), var(--gy)) scale(0.1) rotate(180deg);
  opacity: 0;
}
/* 2. Charge: shake and glow builds. */
.stage.charging .flip {
  animation: charge 0.8s ease-in forwards;
}
@keyframes charge {
  0% { transform: none; }
  20% { transform: rotate(-2deg) scale(1.02); }
  40% { transform: rotate(2.5deg) scale(1.04); }
  60% { transform: rotate(-3deg) scale(1.06); }
  80% { transform: rotate(3deg) scale(1.08); }
  100% { transform: rotate(0) scale(1.1); }
}
.stage.charging .card-back {
  box-shadow: 0 0 0 1px #ffe2a3, 0 0 60px #f0c878aa, 0 0 120px #d6b78066;
  transition: box-shadow 0.8s;
}
.stage.charging .light {
  opacity: 0.6;
  transform: scale(0.8);
}
/* 3. Spin: three and a half turns, landing face up. */
.stage.spin .flip-inner {
  animation: turns 1.25s cubic-bezier(0.55, 0, 0.25, 1) forwards;
}
@keyframes turns {
  0% { transform: rotateY(0) scale(1.1); }
  55% { transform: rotateY(900deg) scale(1.28); }
  100% { transform: rotateY(1260deg) scale(1.08); }
}
.stage.spin .light {
  opacity: 1;
  transform: scale(1.5);
  transition: opacity 1.2s, transform 1.25s cubic-bezier(0.55, 0, 0.25, 1);
}
.stage.spin .rays {
  opacity: 1;
  animation-duration: 4s;
}
/* 4. Flash. */
.flash {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  background: radial-gradient(circle at 50% 45%, #fff, #fff4d6 35%, #fff0 70%);
  opacity: 0;
}
.flash.go {
  animation: flash 0.6s ease-out;
}
@keyframes flash {
  15% { opacity: 0.95; }
  to { opacity: 0; }
}
/* 5. Landed: glow settles, light sweeps across the card. */
.flip .front {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}
.shine {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, #fff9 48%, #fff0 62%);
  transform: translateX(-130%);
}
.stage.landed .shine {
  animation: shine 1.1s 0.1s ease-out forwards;
}
@keyframes shine {
  to { transform: translateX(130%); }
}
.stage.landed .flip {
  animation: land 0.7s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes land {
  from { transform: scale(1.12); }
  to { transform: scale(1); }
}
.stage.landed .front .tarot-card {
  box-shadow: 0 0 0 1px #ffe2a3, 0 0 80px #f0c87888, 0 24px 50px #0009;
}
.stage.landed .light {
  opacity: 0.7;
  transform: scale(1.25);
}
.reveal-name i {
  display: inline-block;
  font-style: normal;
  opacity: 0;
  transform: translateY(14px) scale(0.9);
}
.reveal-name.show i {
  animation: letter 0.5s calc(var(--i) * 35ms) cubic-bezier(0.2, 1.3, 0.4, 1) forwards;
}
@keyframes letter {
  to { opacity: 1; transform: none; }
}
#continue:not([hidden]) {
  animation: rise 0.5s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
}

/* ---------- Landing motion ---------- */
.fan .tarot-card {
  animation: fan-float 4.5s ease-in-out infinite;
}
@keyframes fan-float {
  50% { translate: 0 -10px; }
}
.fan .center { animation-delay: -1.5s; }
.fan .right { animation-delay: -3s; }
.hero > .primary,
.ladder > .primary {
  position: relative;
  overflow: hidden;
}
.hero > .primary::after,
.ladder > .primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, #fff7 50%, transparent 70%);
  transform: translateX(-120%);
  animation: cta-shine 3.2s 1s ease-in-out infinite;
}
@keyframes cta-shine {
  35%, 100% { transform: translateX(120%); }
}

/* ---------- Landing rarity ladder ---------- */
.ladder {
  max-width: 640px;
  margin: 46px auto 10px;
  padding: 0 20px;
  text-align: center;
}
.ladder h2 {
  font-size: clamp(36px, 8vw, 48px);
  margin: 10px 0 6px;
}
.tiers {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  gap: 10px;
  text-align: left;
}
.tier {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--tc) 50%, transparent);
  background: linear-gradient(100deg, color-mix(in srgb, var(--tc) 26%, #18232a), #172127 70%);
}
.tier-legendary {
  box-shadow: 0 0 34px color-mix(in srgb, var(--tc) 30%, transparent);
}
.tier-emblem {
  width: 62px;
  height: 62px;
}
.tier-legendary .tier-emblem {
  animation: glow 2.6s ease-in-out infinite;
}
@keyframes glow {
  50% { filter: drop-shadow(0 0 14px #f0b45aaa) brightness(1.12); }
}
.tier-text b {
  display: block;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--tc);
}
.tier-text span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.tier-cards {
  display: flex;
  align-items: center;
  margin-top: 8px;
}
.tier-cards img {
  width: 30px;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid color-mix(in srgb, var(--tc) 70%, transparent);
  box-shadow: 0 2px 6px #0007;
}
.tier-cards img + img {
  margin-left: -12px;
}
.tier-legendary .tier-cards img {
  width: 40px;
}
.tier-legendary .tier-cards img + img {
  margin-left: 6px;
}
.tier-cards small {
  font-size: 11px;
  color: var(--muted);
  margin-left: 10px;
}
.tier-pct {
  text-align: right;
}
.tier-pct b {
  display: block;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.ladder > .primary {
  max-width: 360px;
  margin: 18px auto 0;
}

/* ---------- Locked rarity teaser on the offer ---------- */
.rarity-lock {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  align-items: center;
  margin: 18px 0 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #26373b;
  color: #f3ebdc;
}
.rarity-lock img {
  width: 40px;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid #d6b780;
}
.rarity-lock b {
  display: block;
  font-size: 14px;
}
.rarity-lock span {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  color: #c2cbca;
}
.lock-pill {
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #192328 !important;
  background: #d6b780;
  border-radius: 99px;
  padding: 4px 9px;
}

/* ---------- Paid rarity reveal ---------- */
.rarity-reveal {
  position: relative;
  text-align: center;
  margin: 26px 0 0;
  padding: 30px 18px 22px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--tc) 55%, transparent);
  background:
    radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--tc) 35%, transparent), transparent 55%),
    #141d22;
  scroll-margin-top: 64px;
  overflow: hidden;
}
.rr-emblem {
  width: 150px;
  height: 150px;
  margin: 0 auto 6px;
  perspective: 600px;
}
.rr-emblem .emblem {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 22px color-mix(in srgb, var(--tc) 70%, transparent));
}
.rarity-reveal.play .rr-emblem .emblem {
  animation: emblem-in 1.1s cubic-bezier(0.2, 1.1, 0.3, 1) both, glow-tier 2.6s 1.1s ease-in-out infinite;
}
@keyframes emblem-in {
  from { opacity: 0; transform: translateY(-50px) rotateY(540deg) scale(0.3); }
}
@keyframes glow-tier {
  50% { filter: drop-shadow(0 0 36px var(--tc)) brightness(1.15); }
}
.rr-tier {
  font-size: clamp(48px, 13vw, 76px);
  line-height: 1;
  margin: 6px 0 10px;
  color: var(--tc);
}
.rr-tier i {
  display: inline-block;
  font-style: normal;
}
.rarity-reveal.play .rr-tier i {
  animation: letter-in 0.6s calc(0.5s + var(--i) * 60ms) cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
@keyframes letter-in {
  from { opacity: 0; transform: translateY(24px) scale(0.6); }
}
.rr-stat {
  font-size: 15px;
  color: var(--ink);
}
.rr-stat b {
  font-family: var(--serif);
  font-size: 34px;
  color: var(--tc);
  font-variant-numeric: tabular-nums;
}
.rr-line {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}
.rr-scale {
  list-style: none;
  display: flex;
  gap: 4px;
  padding: 0;
  margin: 18px auto 8px;
  max-width: 520px;
}
.rr-scale li {
  flex: 1;
  border-radius: 6px;
  padding: 7px 2px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  background: color-mix(in srgb, var(--tc) 14%, #1c272c);
  border: 1px solid color-mix(in srgb, var(--tc) 30%, transparent);
}
.rr-scale li.on {
  color: #192328;
  background: var(--tc);
  box-shadow: 0 0 18px color-mix(in srgb, var(--tc) 70%, transparent);
  transform: translateY(-3px);
}

/* ---------- Poster rarity badge ---------- */
.poster-rarity {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 12px;
  padding: 6px 14px 6px 6px;
  border-radius: 99px;
  border: 1px solid color-mix(in srgb, var(--tc) 60%, transparent);
  background: color-mix(in srgb, var(--tc) 18%, #121a1e);
}
.poster-rarity .emblem {
  width: 40px;
  height: 40px;
}
.poster-rarity span {
  font-size: 12px;
  color: #d1d8d4;
  text-align: left;
}
.poster-rarity b {
  display: block;
  font-family: var(--serif);
  font-size: 20px;
  color: var(--tc);
  line-height: 1;
}

@media (max-width: 650px) {
  .tier {
    grid-template-columns: 50px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 12px;
  }
  .tier-emblem {
    width: 50px;
    height: 50px;
  }
  .tier-text b {
    font-size: 20px;
  }
  .tier-pct b {
    font-size: 24px;
  }
  .light {
    width: 420px;
    margin: -210px 0 0 -210px;
  }
  .poster-rarity {
    margin-inline: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fx-canvas {
    display: none;
  }
}

/* Rarity teaser under the free result: a big blurred number pointing at the offer. */
.rarity-tease {
  position: relative;
  display: grid;
  grid-template-areas: "eye" "num" "pill" "copy";
  justify-items: center;
  max-width: 360px;
  margin: 4px 0 26px;
  padding: 18px 22px 18px;
  border: 1px solid #d6b78099;
  border-radius: 18px;
  background: radial-gradient(ellipse at 50% 45%, #d6b78033, transparent 70%), #1d2a2e;
  box-shadow: 0 0 0 4px #d6b78014, 0 14px 40px #00000059;
  color: var(--ink);
  text-decoration: none;
  text-align: center;
  overflow: hidden;
  animation: tease-glow 2.8s ease-in-out infinite;
}
.rarity-tease::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, #f1dcae2e 50%, transparent 65%);
  transform: translateX(-100%);
  animation: tease-sweep 3.4s ease-in-out 0.8s infinite;
  pointer-events: none;
}
.rarity-tease .eyebrow {
  grid-area: eye;
  margin: 0;
}
.rt-num {
  grid-area: num;
  font-family: var(--serif);
  font-size: 96px;
  font-weight: 600;
  line-height: 1;
  margin: 2px 0 6px;
  color: #f1dcae;
  text-shadow: 0 0 24px #d6b780aa;
}
.rt-num b {
  font-weight: inherit;
}
.rarity-tease:not(.open) .rt-num b {
  display: inline-block;
  filter: blur(9px);
  user-select: none;
}
.rarity-tease .lock-pill {
  grid-area: pill;
  margin: 2px 0 12px;
  padding: 7px 14px;
  font-size: 11px !important;
  box-shadow: 0 6px 18px #0000008c;
}
.rarity-tease .lock-pill::before {
  content: "🔒 ";
}
.rt-copy {
  grid-area: copy;
  max-width: 290px;
  font-size: 13px;
  line-height: 1.55;
  color: #c9d1cf;
}
.rarity-tease:not(.open) .rt-copy::after {
  content: " ↓";
  color: var(--gold);
}
.rt-sparkle {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 40px;
  height: 40px;
  animation: tease-twinkle 2.4s ease-in-out infinite;
}
@keyframes tease-glow {
  50% {
    box-shadow: 0 0 0 6px #d6b78026, 0 14px 44px #d6b78033;
  }
}
@keyframes tease-sweep {
  60%,
  100% {
    transform: translateX(100%);
  }
}
@keyframes tease-twinkle {
  50% {
    transform: scale(1.15) rotate(12deg);
    opacity: 0.75;
  }
}
@media (max-width: 650px) {
  .rarity-tease {
    margin: 2px auto 24px;
  }
  .rt-num {
    font-size: 88px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rarity-tease,
  .rarity-tease::after,
  .rt-sparkle {
    animation: none;
  }
}
