.reveal-your-fate-page .reveal-fate-root {
  max-width: 52rem;
}

.reveal-fate-disclaimer {
  background: linear-gradient(180deg, rgba(255, 198, 106, 0.2), rgba(130, 70, 20, 0.22));
  border: 1px solid rgba(255, 214, 140, 0.65);
  border-radius: 0.65rem;
  padding: 0.85rem 1rem;
  margin-top: 1.35rem;
  font-size: 0.93rem;
  line-height: 1.55;
  color: #fff5e1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.reveal-fate-disclaimer strong {
  color: #ffe8ac;
}

.reveal-fate-disclaimer p {
  margin: 0;
  color: #fff8ea;
  font-weight: 600;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}

.reveal-fate-title {
  font-family: Cinzel, "Times New Roman", serif;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.reveal-fate-lead {
  margin-top: 0;
}

.reveal-fate-question {
  margin: 1.5rem 0 1.25rem;
}

.reveal-fate-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.reveal-fate-textarea {
  width: 100%;
  min-height: 5.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(200, 215, 255, 0.25);
  background: rgba(8, 14, 28, 0.65);
  color: #eaf0ff;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}

.reveal-fate-textarea:focus-visible {
  outline: 2px solid rgba(137, 207, 255, 0.55);
  outline-offset: 2px;
}

.reveal-fate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.reveal-fate-actions .primary-button,
.reveal-fate-actions .secondary-button {
  color: #fff8e8;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 219, 145, 0.55);
  background: linear-gradient(180deg, rgba(154, 98, 26, 0.95), rgba(88, 50, 10, 0.98));
}

.reveal-fate-actions .secondary-button {
  background: linear-gradient(180deg, rgba(112, 68, 18, 0.92), rgba(64, 36, 8, 0.98));
}

.reveal-fate-tally {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 209, 122, 0.25);
  background: rgba(42, 28, 12, 0.35);
}

.reveal-fate-tally-title {
  font-size: 0.92rem;
  margin: 0 0 0.5rem;
  color: #ffe6b3;
}

.reveal-fate-tally-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.35rem 0.65rem;
  font-size: 0.86rem;
}

.reveal-fate-tally-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  border-bottom: 1px dashed rgba(255, 220, 160, 0.12);
  padding: 0.2rem 0;
  align-items: center;
}

.reveal-fate-tally-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.reveal-fate-tally-meaning {
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: #f6ead0;
}

.reveal-fate-tally-icon {
  width: 2rem;
  height: 2rem;
  object-fit: cover;
  border-radius: 0.35rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 214, 130, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.reveal-fate-tally-icon--fafafa_man {
  object-position: 50% 8%;
  transform: scale(1.16);
  transform-origin: center;
}

.reveal-fate-tally-count {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #ffd46a;
}

.reveal-fate-coins-section {
  margin: 1.5rem 0;
}

/* 6 rows × 2 columns — two wide columns so each coin reads larger */
.reveal-fate-coins-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(6, auto);
  gap: 0.85rem;
  width: 100%;
  max-width: min(100%, 20rem);
  margin-inline: auto;
}

@media (min-width: 400px) {
  .reveal-fate-coins-grid {
    max-width: min(100%, 24rem);
    gap: 0.95rem;
  }
}

@media (min-width: 520px) {
  .reveal-fate-coins-grid {
    max-width: min(100%, 28rem);
    gap: 1.05rem;
  }
}

.reveal-fate-coin {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border: none;
  cursor: pointer;
  background: transparent;
  perspective: 900px;
  perspective-origin: center center;
}

/* Face-down: 3-D sideways spin on the coin (rotateY), not flat spin on the button */
.reveal-fate-coin:not(.is-revealed) .reveal-fate-coin__inner {
  animation: rfCoinIdleSpin3d 3.6s linear infinite;
}

.reveal-fate-coin:focus-visible {
  outline: 3px solid rgba(255, 216, 122, 0.75);
  outline-offset: 3px;
}

.reveal-fate-coin.is-disabled,
.reveal-fate-coin:disabled {
  cursor: default;
  opacity: 1;
}

.reveal-fate-coin__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: flat;
  transition: none;
  border-radius: 50%;
}

/* Thick coin rim — visible when the coin is rotated near edge-on (~90°). */
.reveal-fate-coin__inner::before,
.reveal-fate-coin__inner::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    #b8770a 0%,
    #ffeb88 18%,
    #ffd24a 36%,
    #b9810f 54%,
    #ffd24a 72%,
    #ffeb88 86%,
    #8c5a07 100%
  );
  box-shadow:
    inset 0 0 0 1px rgba(180, 120, 20, 0.85),
    inset 0 -3px 6px rgba(80, 50, 0, 0.55),
    inset 0 3px 6px rgba(255, 235, 170, 0.55);
}

/* Rim band oriented so it appears at the 90° / 270° edge-on moments. */
.reveal-fate-coin__inner::before {
  transform: rotateY(90deg);
}

.reveal-fate-coin__inner::after {
  transform: rotateY(270deg);
}

.reveal-fate-coin.is-revealed .reveal-fate-coin__inner {
  animation: none;
  transform: none;
}

.reveal-fate-coin__face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  backface-visibility: visible;
  -webkit-backface-visibility: visible;
  transform: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.12rem;
  box-shadow:
    inset 0 3px 10px rgba(255, 248, 220, 0.35),
    inset 0 -4px 12px rgba(40, 24, 0, 0.45),
    0 4px 10px rgba(0, 0, 0, 0.4);
}

.reveal-fate-coin__face--back {
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.92) 0%, rgba(255, 248, 200, 0.45) 18%, transparent 48%),
    radial-gradient(circle at 72% 78%, rgba(255, 200, 60, 0.55) 0%, transparent 42%),
    conic-gradient(
      from 210deg at 50% 50%,
      #fff6c8 0deg,
      #ffe566 55deg,
      #ffd700 120deg,
      #ffb300 200deg,
      #ffe566 280deg,
      #fff9dc 360deg
    ),
    linear-gradient(155deg, #fff4a8 0%, #ffd700 28%, #ffb300 55%, #e6a800 78%, #cc8800 100%);
  transform: none;
  border: 2px solid rgba(255, 248, 200, 0.75);
  box-shadow:
    inset 0 4px 14px rgba(255, 255, 255, 0.55),
    inset 0 -5px 14px rgba(140, 90, 0, 0.35),
    0 0 18px rgba(255, 215, 80, 0.55),
    0 5px 14px rgba(0, 0, 0, 0.35);
}

.reveal-fate-coin__face--back::after {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  pointer-events: none;
  background: linear-gradient(
    125deg,
    transparent 35%,
    rgba(255, 255, 255, 0.75) 48%,
    transparent 62%
  );
  animation: rfCoinShimmer 2.4s ease-in-out infinite;
  opacity: 0.85;
}

.reveal-fate-coin.is-revealed .reveal-fate-coin__face--back::after {
  animation: none;
  opacity: 0;
}

/* On tap, hold the cover for a beat while still spinning, then reveal. */
.reveal-fate-coin.is-covering .reveal-fate-coin__face--back::after {
  animation: none;
  opacity: 1;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.08) 0%,
    rgba(0, 0, 0, 0.32) 50%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

.reveal-fate-coin__stack {
  display: none;
}

.reveal-fate-coin__hole {
  position: relative;
  z-index: 3;
  width: 26%;
  height: 28%;
  border-radius: 18%;
  background: radial-gradient(circle at 50% 50%, #1a1208 58%, rgba(60, 42, 12, 0.95));
  box-shadow:
    inset 0 3px 5px rgba(0, 0, 0, 0.65),
    0 1px 0 rgba(255, 252, 220, 0.45);
}

.reveal-fate-coin__face--front {
  transform: none;
  background:
    radial-gradient(circle at 40% 30%, rgba(255, 255, 235, 0.25), transparent 50%),
    linear-gradient(155deg, #f0d78c 0%, #c6932e 42%, #7a5610 100%);
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
}

/* CRITICAL: while the coin is face-down (idle spinning), the symbol must not be visible
   when the coin rotates past 90° and the front face is presented to the viewer.
   Render the front face as a gold "cover" identical to the back, and hide the symbol contents. */
.reveal-fate-coin:not(.is-revealed) .reveal-fate-coin__face--front {
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.92) 0%, rgba(255, 248, 200, 0.45) 18%, transparent 48%),
    radial-gradient(circle at 72% 78%, rgba(255, 200, 60, 0.55) 0%, transparent 42%),
    conic-gradient(
      from 210deg at 50% 50%,
      #fff6c8 0deg,
      #ffe566 55deg,
      #ffd700 120deg,
      #ffb300 200deg,
      #ffe566 280deg,
      #fff9dc 360deg
    ),
    linear-gradient(155deg, #fff4a8 0%, #ffd700 28%, #ffb300 55%, #e6a800 78%, #cc8800 100%);
  border: 2px solid rgba(255, 248, 200, 0.75);
  box-shadow:
    inset 0 4px 14px rgba(255, 255, 255, 0.55),
    inset 0 -5px 14px rgba(140, 90, 0, 0.35),
    0 0 18px rgba(255, 215, 80, 0.55),
    0 5px 14px rgba(0, 0, 0, 0.35);
}

.reveal-fate-coin.is-revealed .reveal-fate-coin__face--back {
  display: none;
}

.reveal-fate-coin.is-revealed .reveal-fate-coin__face--front {
  display: flex;
}

.reveal-fate-coin__symbol-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reveal-fate-coin:not(.is-revealed) .reveal-fate-coin__symbol-wrap {
  visibility: hidden;
}

.reveal-fate-coin.is-revealed .reveal-fate-coin__stack {
  display: none;
}

.reveal-fate-coin__face--front .reveal-fate-coin__hole {
  display: none;
}

.reveal-fate-coin:not(.is-revealed) .reveal-fate-coin__img,
.reveal-fate-coin:not(.is-revealed) .reveal-fate-coin__glyph,
.reveal-fate-coin:not(.is-revealed) .reveal-fate-coin__sub {
  visibility: hidden;
}

.reveal-fate-coin__img {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  display: block;
}

/* FAFAFA Man portrait: anchor the face/torso near the top of the source image; hide feet/ingot pile. */
.reveal-fate-coin__img--fafafa_man {
  object-fit: cover;
  object-position: 50% 5%;
  transform: scale(1.55);
  transform-origin: 50% 18%;
}

.reveal-fate-coin__glyph {
  font-family: "Noto Serif SC", "PingFang SC", "Microsoft YaHei", serif;
  font-weight: 700;
  font-size: clamp(0.75rem, 4.2vw, 1rem);
  line-height: 1;
  color: #1a1408;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 250, 220, 0.35);
}

.reveal-fate-coin__sub {
  font-size: clamp(0.58rem, 2.9vw, 0.72rem);
  font-weight: 600;
  color: #2c1e0a;
  text-align: center;
  letter-spacing: 0.03em;
  max-width: 95%;
}

.reveal-fate-coins-hint {
  margin-top: 1rem;
  max-width: 32rem;
}

.reveal-your-fate-page .reveal-fate-credits {
  margin-top: 0.65rem;
}

.reveal-fate-verdict {
  margin-top: 1.75rem;
  padding: 1rem 1.15rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(127, 200, 255, 0.35);
  background: rgba(10, 24, 48, 0.55);
}

.reveal-fate-verdict-heading {
  font-family: Cinzel, serif;
  font-size: 1.1rem;
  margin: 0 0 0.35rem;
  color: #c8e4ff;
}

.reveal-fate-verdict-symbol {
  font-family: "Noto Serif SC", serif;
  font-size: clamp(1.15rem, 4vw, 1.55rem);
  font-weight: 700;
  margin: 0.25rem 0;
  color: #fff2c2;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.reveal-fate-verdict__icon {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
  border-radius: 0.35rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.15rem;
}

.reveal-fate-verdict__caption {
  flex: 1;
  min-width: 12rem;
}

.reveal-fate-verdict-text {
  font-size: 1.05rem;
  margin: 0.25rem 0 0;
  font-weight: 700;
}

.reveal-fate-verdict-question {
  margin-top: 0.75rem;
  font-style: italic;
}

@keyframes rfCoinIdleSpin3d {
  0% {
    transform: rotateX(16deg) rotateY(0deg);
  }
  100% {
    transform: rotateX(16deg) rotateY(360deg);
  }
}

@keyframes rfCoinShimmer {
  0%,
  100% {
    opacity: 0.45;
    transform: translateX(-18%) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: translateX(18%) rotate(8deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-fate-coin:not(.is-revealed) .reveal-fate-coin__inner {
    animation: none;
    transform: none;
  }

  .reveal-fate-coin__face--back::after {
    animation: none;
    opacity: 0.55;
  }
}
