/* ===================================================================
   BdayFacts.com — Every Birthday Tells a Story
   Standalone CSS. No external dependencies.
   Friendly, rounded display font (system) for both kids and adults.
   =================================================================== */

:root {
  /* Soft Pinterest-birthday palette */
  --cream:    #fffaf6;
  --blush:    #ffe7ee;
  --peach:    #ffd5c0;
  --rose:     #ffb1cc;
  --pink:     #ff8db5;
  --coral:    #ff7a8a;
  --plum:     #d28bff;
  --lilac:    #b48bff;
  --indigo:   #7a5cff;
  --lavender: #e9d8ff;
  --mint:     #c2f0d8;
  --sky:      #c9e8ff;
  --teal:     #1dd1a1;
  --azure:    #2db8ff;
  --gold:     #ffd24a;

  --ink:      #2b1f3e;
  --ink-soft: #5e537a;
  --muted:    #8a83a0;
  --line:     rgba(43, 31, 62, 0.08);

  --shadow-sm: 0 4px 14px rgba(43, 31, 62, 0.06);
  --shadow-md: 0 18px 40px rgba(43, 31, 62, 0.10);
  --shadow-lg: 0 30px 70px rgba(43, 31, 62, 0.14);

  --radius-sm: 16px;
  --radius:    24px;
  --radius-lg: 36px;

  --grad-bg:     linear-gradient(180deg, #fff7fa 0%, #fff1f7 30%, #f6ecff 70%, #eef4ff 100%);
  --grad-button: linear-gradient(135deg, #ff7ab6 0%, #d28bff 60%, #b48bff 100%);
  /* Pronounced 5-stop gradient: pink → magenta → indigo → blue → green */
  --grad-rainbow: linear-gradient(120deg, #ff3b8a 0%, #d633e6 25%, #7a5cff 50%, #2db8ff 75%, #1dd1a1 100%);

  /* Display font — Baloo 2 (rounded display) for headlines + hero text */
  --font-display:
    "Baloo 2",
    "Avenir Next Rounded Bold",
    "SF Pro Rounded",
    "Avenir Next Rounded",
    "Quicksand",
    "Comfortaa",
    "Nunito",
    "Trebuchet MS",
    -apple-system,
    system-ui,
    "Segoe UI",
    "Helvetica Neue",
    sans-serif;

  /* Body font — Poppins for all UI text (cards, forms, paragraphs) */
  --font-body:
    "Poppins",
    "Avenir Next",
    "Avenir",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
}

/* ===== Reset / Base ===== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--grad-bg);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a    { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* When an Explore modal is open we lock the page behind it.
   position:fixed (plus the captured scroll top set inline by JS) is
   what actually prevents background scroll on iOS Safari — plain
   overflow:hidden isn't enough on touch devices. */
body.modal-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: none;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.005em;
  line-height: 1.15;
  margin: 0;
}

/* ===================================================================
   Magical background — floating balloons, confetti, sparkles
   =================================================================== */
.bg-balloons,
.bg-confetti,
.bg-sparkles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

/* Helium balloons — one-shot rise that ends with the balloon visibly
   at the top edge, then JS triggers a pop (confetti + sound + respawn). */
.bg-balloons .balloon {
  position: absolute;
  bottom: -100px;
  width: 56px; height: 72px;
  border-radius: 50% 50% 48% 48%;
  box-shadow: inset -8px -12px 18px rgba(0, 0, 0, 0.16),
              0 18px 32px rgba(43, 31, 62, 0.10);
  opacity: 0;
  animation-name: balloon-rise-once;
  animation-timing-function: linear;
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
}
.bg-balloons .balloon::after {
  content: "";
  position: absolute; top: 100%; left: 50%;
  width: 1px; height: 110px;
  background: linear-gradient(to bottom, rgba(43, 31, 62, 0.4), rgba(43, 31, 62, 0));
  transform: translateX(-50%);
}
.bg-balloons .balloon::before {
  content: "";
  position: absolute; top: 16%; left: 24%;
  width: 26%; height: 24%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  filter: blur(1px);
}
@keyframes balloon-rise-once {
  0%   { transform: translate3d(0, 0, 0) rotate(-3deg); opacity: 0; }
  6%   { opacity: 0.88; }
  100% { transform: translate3d(18px, calc(-100vh - 80px), 0) rotate(3deg); opacity: 0.92; }
}

/* "Pop" animation overlaid when the balloon reaches the top */
.bg-balloons .balloon.popping {
  animation: balloon-pop 0.32s cubic-bezier(.2,.7,.3,1.2) forwards;
}
@keyframes balloon-pop {
  0%   { transform: scale(1); opacity: 0.92; }
  40%  { transform: scale(1.45); opacity: 1; }
  100% { transform: scale(0.4); opacity: 0; }
}

/* Subtle continuous confetti shower */
.bg-confetti i {
  position: absolute;
  top: -20px;
  width: 8px; height: 14px;
  border-radius: 2px;
  opacity: 0.55;
  animation: confetti-fall linear infinite;
}
.bg-confetti i.round  { width: 9px; height: 9px; border-radius: 50%; }
.bg-confetti i.ribbon { width: 5px; height: 18px; }
@keyframes confetti-fall {
  0%   { transform: translate3d(0, -20px, 0) rotate(0); }
  100% { transform: translate3d(var(--drift, 0), 110vh, 0) rotate(720deg); }
}

/* Mini burst that appears wherever a balloon pops */
.mini-confetti {
  position: fixed;
  width: 8px; height: 12px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 4;
  transform: translate(-50%, -50%);
  animation: mini-burst 1.3s cubic-bezier(.15,.7,.2,1) forwards;
}
.mini-confetti.round { width: 9px; height: 9px; border-radius: 50%; }
@keyframes mini-burst {
  0%   { transform: translate(-50%, -50%) scale(0.5) rotate(0); opacity: 1; }
  60%  { opacity: 1; }
  100% {
    transform:
      translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px)))
      scale(1) rotate(540deg);
    opacity: 0;
  }
}

/* Twinkling sparkles */
.bg-sparkles span {
  position: absolute;
  color: rgba(255, 200, 230, 0.65);
  animation: sparkle-twinkle 4s ease-in-out infinite;
  user-select: none;
}
@keyframes sparkle-twinkle {
  0%, 100% { opacity: 0;   transform: scale(0.4); }
  50%      { opacity: 1;   transform: scale(1); }
}

/* ===================================================================
   Site header
   =================================================================== */
.site-header {
  position: relative;
  z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 20px 28px;
  max-width: 1200px;
  margin: 0 auto;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ink);
}
.brand-mark {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(43, 31, 62, 0.12));
}
.brand-dot {
  background: var(--grad-rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav { display: flex; gap: 24px; }
.site-nav a {
  color: var(--ink-soft);
  font-weight: 600;
  padding: 6px 4px;
  position: relative;
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--grad-button);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.site-nav a:hover::after { transform: scaleX(1); }

.sound-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  padding: 9px 16px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.sound-toggle:hover { background: #fff; color: var(--ink); }
.sound-toggle[aria-pressed="true"] {
  background: var(--grad-button);
  color: #fff;
  border-color: transparent;
}
.sound-toggle:active { transform: scale(0.95); }

@media (max-width: 720px) {
  .site-nav { display: none; }
  .site-header { padding: 16px 18px; }
  .brand { font-size: 1.25rem; }
  .brand-mark { width: 36px; height: 36px; }
  .sound-toggle .sound-label { display: none; }
  .sound-toggle { padding: 9px 12px; }
}

/* ===================================================================
   Hero
   =================================================================== */
.hero {
  position: relative;
  z-index: 2;
  padding: 12px 24px 56px;
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
  text-align: left;
}
.hero-text { max-width: 540px; }
/* Stack vertically on tablet and below so the form stays usable */
@media (max-width: 880px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    /* No gap on mobile — form sits flush against the subheading */
    gap: 0;
  }
  .hero-text { max-width: none; margin: 0 auto; }
  /* Tighten line-to-line spacing inside the hero on mobile */
  .hero-title   { margin: 0 0 10px; line-height: 1.05; }
  .hero-lead-badge { padding: 10px 18px; border-radius: 18px; }
  .hero-title em { margin-top: 0; }
  .hero-lead    { margin: 0; }
  /* Smaller form padding so "Your Birthdate" sits close to the top edge */
  .bday-form    { padding: 18px; }
  /* Less hero padding overall on mobile */
  .hero         { padding: 8px 18px 24px; }
}
/* Translucent badge wrapper for the hero subheading.
   - Soft 3-colour pastel gradient that slowly shifts position
   - Sparkle decoration on the left that pulses
   - Lilac-tinted border + colored drop shadow for a "magical" feel
   - Backdrop blur so the page gradient still shows through */
.hero-lead-badge {
  display: inline-block;
  position: relative;
  background: linear-gradient(120deg,
    rgba(255, 240, 250, 0.85) 0%,
    rgba(245, 235, 255, 0.85) 50%,
    rgba(232, 244, 255, 0.85) 100%);
  background-size: 220% 220%;
  border: 1.5px solid rgba(180, 139, 255, 0.30);
  padding: 11px 28px;
  border-radius: 999px;
  box-shadow:
    0 10px 28px rgba(180, 139, 255, 0.22),
    0 2px 6px  rgba(255, 122, 182, 0.10),
    inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
          backdrop-filter: blur(10px) saturate(1.15);
  animation: badge-shimmer 6s ease-in-out infinite;
}
@keyframes badge-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  line-height: 1.08;
}
.hero-title em {
  /* "Tells a Story" — Baloo 2 in its heaviest weight (800) for that
     friendly rounded display look that reads well to kids and adults. */
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 800;
  letter-spacing: -0.005em;
  display: block;
  margin-top: 6px;
  font-size: 1.06em;
  background: var(--grad-rainbow);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rainbow-shift 8s ease-in-out infinite;
}
@keyframes rainbow-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.hero-lead {
  /* Sized to fit the new "…about when you were born." on a single
     line across desktop, tablet, and most phones. */
  font-size: clamp(0.78rem, 1.55vw, 0.98rem);
  color: var(--ink-soft);
  max-width: 580px;
  margin: 0 auto 36px;
}

/* ===== Birthdate form card ===== */
.bday-form {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 560px;
  width: 100%;
  /* Sit flush against the right edge of the hero on desktop; the media
     query below recenters it when the layout stacks on mobile/tablet. */
  margin: 0 0 0 auto;
  box-shadow: var(--shadow-md);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
}
@media (max-width: 880px) {
  .bday-form { margin: 0 auto; }
}

/* Visible heading above the picker */
.picker-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--ink);
  margin: 0 0 14px;
  letter-spacing: 0.01em;
}
.picker-heading-mark {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 2px 4px rgba(43, 31, 62, 0.12));
  animation: heading-bob 4s ease-in-out infinite;
}
@keyframes heading-bob {
  0%, 100% { transform: translateY(0)    rotate(-2deg); }
  50%      { transform: translateY(-2px) rotate(2deg);  }
}

/* ===== 3-wheel rolling picker ===== */
.picker {
  border: 0;
  padding: 0;
  margin: 0 0 22px;
  display: flex;
  gap: 12px;
}
.pick-box {
  flex: 1;
  background: #fffafd;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  padding: 8px 4px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.pick-box:hover {
  border-color: rgba(180, 139, 255, 0.4);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.pick-btn {
  background: transparent;
  border: 0;
  width: 36px; height: 28px;
  display: grid; place-items: center;
  color: var(--lilac);
  font-size: 0.85rem;
  border-radius: 10px;
  transition: background 0.15s, transform 0.1s;
}
.pick-btn:hover  { background: rgba(180, 139, 255, 0.14); }
.pick-btn:active { transform: scale(0.9); }

.pick-window {
  position: relative;
  height: 120px;
  width: 100%;
  overflow: hidden;
  cursor: grab;
  /* Critical for mobile: block the browser's default touch-pan so the
     page doesn't scroll when the user drags the picker wheel. */
  touch-action: none;
  -webkit-user-select: none;
          user-select: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 28%, #000 72%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 28%, #000 72%, transparent 100%);
}
.pick-window:active { cursor: grabbing; }
.pick-window::before,
.pick-window::after {
  content: "";
  position: absolute; left: 12%; right: 12%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(180, 139, 255, 0.5), transparent);
  pointer-events: none;
}
.pick-window::before { top: 40px; }
.pick-window::after  { top: 80px; }

.pick-list {
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.2, 0.85, 0.3, 1.15);
  will-change: transform;
}
.pick-list.dragging { transition: none; }

.pick-item {
  height: 40px;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--ink);
  opacity: 0.25;
  transition: opacity 0.25s, font-size 0.25s;
}
.pick-item.n1 { opacity: 0.55; font-size: 1.1rem; }
.pick-item.active {
  opacity: 1;
  font-size: 1.7rem;
  background: var(--grad-rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* Brief celebratory flash when a value changes — visual side effect */
.pick-item.flash {
  animation: pick-flash 0.55s ease;
}
@keyframes pick-flash {
  0%   { transform: scale(1);    filter: brightness(1) saturate(1); }
  35%  { transform: scale(1.18); filter: brightness(1.15) saturate(1.4); }
  70%  { transform: scale(0.96); filter: brightness(1.05) saturate(1.15); }
  100% { transform: scale(1);    filter: brightness(1) saturate(1); }
}

.pick-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 700;
  margin-top: 6px;
}
/* Month picker shows full names by default, 3-letter abbreviations
   on mobile. Both forms are present in the DOM — CSS toggles which
   is visible based on viewport width. */
.month-full { display: inline; }
.month-abbr { display: none; }
@media (max-width: 600px) {
  .month-full { display: none; }
  .month-abbr { display: inline; }
}
@media (max-width: 420px) {
  .pick-item { font-size: 1.1rem; }
  .pick-item.active { font-size: 1.4rem; }
}

/* ===== Reveal button ===== */
.reveal-btn {
  position: relative;
  width: 100%;
  padding: 18px 24px;
  border: 0;
  border-radius: 20px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 2.4vw, 1.65rem);
  color: #fff;
  background: var(--grad-rainbow);
  background-size: 220% 220%;
  box-shadow:
    0 16px 32px rgba(180, 139, 255, 0.42),
    inset 0 -3px 0 rgba(0, 0, 0, 0.10);
  display: inline-flex; align-items: center; justify-content: center;
  gap: 14px;
  animation:
    reveal-gradient 4s ease-in-out infinite,
    reveal-pulse 2.4s ease-in-out infinite;
  transition: transform 0.12s ease;
}
.reveal-btn:hover  { transform: translateY(-2px); }
.reveal-btn:active { transform: translateY(0); }
@keyframes reveal-gradient {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes reveal-pulse {
  0%, 100% {
    box-shadow:
      0 16px 32px rgba(180, 139, 255, 0.42),
      inset 0 -3px 0 rgba(0, 0, 0, 0.10);
  }
  50% {
    box-shadow:
      0 22px 46px rgba(180, 139, 255, 0.60),
      inset 0 -3px 0 rgba(0, 0, 0, 0.10);
  }
}
.reveal-sparkle {
  display: inline-block;
  animation: reveal-sparkle-spin 3s linear infinite;
}
.reveal-sparkle:last-child { animation-delay: -1.5s; }
@keyframes reveal-sparkle-spin {
  0%   { transform: rotate(0)      scale(1); }
  50%  { transform: rotate(180deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1); }
}

.hero-foot {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 14px 0 0;
}

/* ===================================================================
   Results section
   =================================================================== */
.results {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 24px 60px;
  animation: results-in 0.55s ease both;
}
@keyframes results-in {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.results-header {
  text-align: center;
  margin-bottom: 36px;
}
.results-eyebrow {
  display: inline-block;
  background: var(--blush);
  color: var(--coral);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  margin: 0 0 12px;
}
.results-date {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin: 0 0 8px;
}
.results-sub {
  color: var(--ink-soft);
  margin: 0;
  font-size: 1.05rem;
}

/* ===== Card grid ===== */
.cards {
  display: grid;
  /* Auto-fit grid: as many equal columns as fit at >=280px each.
     Eliminates the "two small cards leave a gap" problem the old
     12-col span-4/span-6 mix produced. Wide cards explicitly take
     the whole row via .card--wide / .card--nostalgia / .card--memories. */
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.card {
  /* One slot of the auto-fit grid by default. */
  grid-column: span 1;
  background: #fff;
  /* Slightly stronger 1.5px border + a tighter inner shadow so cards
     stand out against the pastel background without losing softness. */
  border: 1.5px solid rgba(43, 31, 62, 0.11);
  border-radius: var(--radius);
  padding: 26px 24px 52px;   /* extra bottom padding for the Explore CTA */
  box-shadow:
    0 6px 16px rgba(43, 31, 62, 0.08),
    0 1px 3px rgba(43, 31, 62, 0.05);
  position: relative;
  overflow: hidden;
  animation: card-in 0.5s ease both;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.3, 1.1),
              box-shadow 0.25s,
              border-color 0.25s;
}
/* Hover state — lift + soft rainbow-tinted glow */
.card[data-detail]:hover,
.card[data-detail]:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(180, 139, 255, 0.45);
  box-shadow:
    0 18px 40px rgba(180, 139, 255, 0.18),
    0 4px 12px rgba(255, 122, 182, 0.10);
  cursor: pointer;
  outline: none;
}
.card[data-detail]:focus-visible {
  outline: 3px solid rgba(180, 139, 255, 0.6);
  outline-offset: 3px;
}

/* "Explore →" CTA at the bottom of every clickable card */
.card-cta {
  position: absolute;
  bottom: 18px;
  left: 24px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--grad-rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.7;
  transition: transform 0.2s, opacity 0.2s;
  pointer-events: none;  /* the whole card is the click target */
}
.card[data-detail]:hover .card-cta,
.card[data-detail]:focus-visible .card-cta {
  opacity: 1;
  transform: translateX(3px);
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cards .card:nth-child(1)  { animation-delay: 0.00s; }
.cards .card:nth-child(2)  { animation-delay: 0.04s; }
.cards .card:nth-child(3)  { animation-delay: 0.08s; }
.cards .card:nth-child(4)  { animation-delay: 0.12s; }
.cards .card:nth-child(5)  { animation-delay: 0.16s; }
.cards .card:nth-child(6)  { animation-delay: 0.20s; }
.cards .card:nth-child(7)  { animation-delay: 0.24s; }
.cards .card:nth-child(8)  { animation-delay: 0.28s; }
.cards .card:nth-child(9)  { animation-delay: 0.32s; }
.cards .card:nth-child(10) { animation-delay: 0.36s; }
.cards .card:nth-child(11) { animation-delay: 0.40s; }
.cards .card:nth-child(12) { animation-delay: 0.44s; }
.cards .card:nth-child(13) { animation-delay: 0.48s; }

.card-emoji {
  font-size: 1.6rem;
  margin-bottom: 8px;
  display: inline-flex;
  width: 48px; height: 48px;
  align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.card-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--muted);
  margin: 6px 0 8px;
}
.card-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.7rem;
  margin: 0 0 6px;
  color: var(--ink);
  line-height: 1.2;
}
.card-sub {
  color: var(--ink-soft);
  margin: 0;
  font-size: 0.96rem;
}
.card-year {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  margin: 0 0 8px;
  background: var(--grad-rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.card-sub.empty,
.card-list li.empty,
.bullet-list li.empty {
  color: var(--muted);
  font-style: italic;
}

/* Grid sizing per card.
   With the auto-fit grid (.cards), every standard card takes one
   slot automatically — no bespoke span overrides needed. The only
   exceptions are the cards that intentionally span the entire row
   (longer-form list cards: top songs, famous birthday twins, on
   this day in history, the nostalgia snapshot, and trend memories). */
.card--song,
.card--nostalgia,
.card--memories,
.card--wide      { grid-column: 1 / -1; }

/* Gradient accents (pastel Pinterest vibe) */
.card--age      { background: linear-gradient(135deg, #fff5fa 0%, #fde6ff 100%); }
.card--zodiac   { background: linear-gradient(135deg, #fffbe8 0%, #ffe7ee 100%); }
.card--gen      { background: linear-gradient(135deg, #e8f3ff 0%, #eee6ff 100%); }
.card--chinese  { background: linear-gradient(135deg, #fff0e3 0%, #ffe0e8 100%); }
.card--lifepath { background: linear-gradient(135deg, #f0e8ff 0%, #e0f0ff 100%); }
.card--countdown{ background: linear-gradient(135deg, #fff2f7 0%, #ffe4cc 100%); }
.card--roman    { background: linear-gradient(135deg, #f5efe3 0%, #ffe9d6 100%); }
.card--dow      { background: linear-gradient(135deg, #e8f1ff 0%, #fff0fa 100%); }
/* Roman numerals can run long; make the value slightly tighter so it fits. */
.card--roman .card-value {
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  background: var(--grad-rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.card--stone    { background: linear-gradient(135deg, #f4f0ff 0%, #fff1f7 100%); }
.card--flower   { background: linear-gradient(135deg, #fff5e3 0%, #ffe9f0 100%); }
.card--song     { background: linear-gradient(135deg, #e9fdf3 0%, #f1f0ff 100%); }
.card--movie    { background: linear-gradient(135deg, #fff7e3 0%, #ffeae3 100%); }
.card--nostalgia { background: linear-gradient(135deg, #fff7fa 0%, #f0eafc 50%, #e9f4ff 100%); }
.card--memories  { background: linear-gradient(135deg, #f3f0ff 0%, #fff0fa 50%, #fff7e3 100%); }
.card--prices   { background: linear-gradient(135deg, #fffbe2 0%, #ffe9d6 100%); }
.card--cartoons { background: linear-gradient(135deg, #eaf6ff 0%, #ffeefc 100%); }
.card--world    { background: linear-gradient(135deg, #e3f9ee 0%, #ddeeff 100%); }
.card--famous   { background: linear-gradient(135deg, #fff5fa 0%, #ffeaf2 100%); }
.card--history  { background: linear-gradient(135deg, #e9eeff 0%, #f4eaff 100%); }

/* Featured-value gradient on the countdown card so the days number pops */
.card--countdown .card-value,
.card--lifepath  .card-value {
  background: var(--grad-rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Big-value gradient on a few featured cards */
.card--age .card-value {
  background: var(--grad-rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== Birthstone gem ===== */
.stone-icon {
  background: transparent;
  border: 0;
  padding: 0;
}
.gem-shape {
  width: 48px; height: 48px;
  filter: drop-shadow(0 4px 8px rgba(43, 31, 62, 0.18));
  animation: gem-shimmer 4s ease-in-out infinite;
}
@keyframes gem-shimmer {
  0%, 100% { filter: drop-shadow(0 4px 8px rgba(43, 31, 62, 0.18))   brightness(1)    saturate(1);    }
  50%      { filter: drop-shadow(0 6px 18px rgba(255, 255, 255, 0.5)) brightness(1.16) saturate(1.12); }
}

/* Pearl + cabochon are hidden by default; the `.is-pearl` and
   `.is-cabochon` modifier classes swap them in and hide the faceted gem. */
.gem-pearl, .gem-cabochon { display: none; }

.stone-icon.is-pearl    .gem-faceted,
.stone-icon.is-pearl    .gem-cabochon { display: none; }
.stone-icon.is-pearl    .gem-pearl    { display: inline; }

.stone-icon.is-cabochon .gem-faceted,
.stone-icon.is-cabochon .gem-pearl    { display: none; }
.stone-icon.is-cabochon .gem-cabochon { display: inline; }

/* Pearl gets a warm-cream shimmer; cabochon stones (opal, turquoise)
   get a softer rainbow-tinted glow that reflects their iridescence. */
.stone-icon.is-pearl .gem-shape {
  animation: pearl-glow 3.6s ease-in-out infinite;
}
.stone-icon.is-cabochon .gem-shape {
  animation: cabochon-glow 4s ease-in-out infinite;
}
@keyframes pearl-glow {
  0%, 100% { filter: drop-shadow(0 4px 8px rgba(43, 31, 62, 0.18))    brightness(1);    }
  50%      { filter: drop-shadow(0 6px 22px rgba(255, 235, 215, 0.65)) brightness(1.10); }
}
@keyframes cabochon-glow {
  0%, 100% { filter: drop-shadow(0 4px 8px rgba(43, 31, 62, 0.18))    brightness(1);    }
  50%      { filter: drop-shadow(0 6px 22px rgba(255, 220, 240, 0.55)) brightness(1.10) saturate(1.1); }
}

/* Inner highlight pulses — give every gem and pearl an actual
   shimmer (the bright glint moves and brightens). The two glints
   pulse on offset timing so the shimmer feels alive. */
.gem-glint {
  animation: glint-pulse 2.4s ease-in-out infinite;
  transform-origin: 50% 50%;
}
.gem-glint-sub {
  animation: glint-pulse 2.4s ease-in-out -1.2s infinite;
}
.pearl-glint {
  animation: pearl-glint-pulse 2.8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: 50% 50%;
}
.pearl-glint-bright {
  animation: pearl-glint-pulse 2.8s ease-in-out -1.4s infinite;
  transform-box: fill-box;
  transform-origin: 50% 50%;
}
@keyframes glint-pulse {
  0%, 100% { opacity: 0.45; }
  50%      { opacity: 1; }
}
@keyframes pearl-glint-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.92); }
  50%      { opacity: 1;    transform: scale(1.08); }
}

/* ===== Numbered card list (famous + history) ===== */
.card-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.card-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-top: 1px dashed var(--line);
}
.card-list li:first-child  { border-top: 0; }
.card-list li.empty        { border: 0; padding: 8px 0; }
.card-list .bullet {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  border-radius: 10px;
  background: rgba(255, 138, 180, 0.18);
  color: var(--coral);
  font-weight: 800;
  display: grid; place-items: center;
  font-size: 0.85rem;
}
.card-list .txt strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 2px;
  font-size: 1.05rem;
}
.card-list .txt span {
  color: var(--ink-soft);
  font-size: 0.94rem;
}

/* ===== Plain bullet list (nostalgia, prices, cartoons, world) ===== */
.bullet-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.bullet-list li {
  padding: 11px 0 11px 24px;
  position: relative;
  border-top: 1px dashed var(--line);
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.5;
}
.bullet-list li:first-child { border-top: 0; }
.bullet-list li.empty { padding-left: 0; border: 0; }
.bullet-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 19px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--grad-rainbow);
  box-shadow: 0 1px 3px rgba(43, 31, 62, 0.18);
}
.bullet-list li.empty::before { display: none; }

/* Responsive card grid */
/* Mobile: the auto-fit minmax(280px, 1fr) already collapses to a
   single column below ~600px viewport width, so no extra overrides
   are needed. We do keep the wide cards full-width at every size. */
@media (max-width: 600px) {
  .card--song,
  .card--nostalgia,
  .card--memories,
  .card--wide { grid-column: 1 / -1; }
}

/* ===== Share row ===== */
.share-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}
.share-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.95rem;
  transition: transform 0.12s, box-shadow 0.15s, background 0.15s;
}
.share-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.share-btn--primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.share-btn--primary:hover { background: #000; }

/* ===================================================================
   How / FAQ sections
   =================================================================== */
.section-heading {
  text-align: center;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  margin: 0 0 32px;
}
.how, .faq {
  position: relative;
  z-index: 2;
  padding: 60px 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.how-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, 1fr);
}
.how-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: transform 0.2s, box-shadow 0.2s;
}
.how-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.how-num {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--grad-rainbow);
  color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  margin-bottom: 14px;
  font-size: 1.2rem;
}
.how-card h3 { font-size: 1.2rem; margin: 0 0 8px; }
.how-card p  { color: var(--ink-soft); margin: 0; }

@media (max-width: 760px) {
  .how-grid { grid-template-columns: 1fr; }
}

.faq-list { max-width: 760px; margin: 0 auto; }
.faq-list details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}
.faq-list details[open] { box-shadow: var(--shadow-md); }
.faq-list summary {
  cursor: pointer;
  font-weight: 800;
  font-family: var(--font-display);
  font-size: 1.1rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  font-family: var(--font-display);
  color: var(--lilac);
  font-size: 1.5rem;
  transition: transform 0.2s;
}
.faq-list details[open] summary::after { content: "–"; }
.faq-list p { margin: 12px 0 0; color: var(--ink-soft); }

/* ===================================================================
   Footer
   =================================================================== */
.site-footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 48px 24px 36px;
  color: var(--ink-soft);
}
.site-footer .copyright {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 6px;
}

/* ===================================================================
   Celebration burst (on Reveal)
   =================================================================== */
.burst {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
  display: none;
}
.burst.go { display: block; }
.burst i {
  position: absolute;
  top: 50%; left: 50%;
  width: 12px; height: 16px;
  border-radius: 3px;
  transform-origin: center;
  animation: burst-pop 1.6s cubic-bezier(0.15, 0.7, 0.2, 1) forwards;
}
.burst i.round { width: 12px; height: 12px; border-radius: 50%; }
@keyframes burst-pop {
  0%   { transform: translate(-50%, -50%) scale(0.4) rotate(0); opacity: 1; }
  60%  { opacity: 1; }
  100% {
    transform: translate(calc(-50% + var(--dx, 0)), calc(-50% + var(--dy, 0))) scale(1.2) rotate(540deg);
    opacity: 0;
  }
}

/* ===================================================================
   Card-detail modal (reusable for every card type)
   =================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: modal-fade-in 0.25s ease;
}
.modal[hidden] { display: none; }
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(43, 31, 62, 0.55);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}
.modal-content {
  position: relative;
  max-width: 640px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #fff7fa 0%, #fff1f7 35%, #f6ecff 75%, #eef4ff 100%);
  border: 1.5px solid rgba(43, 31, 62, 0.10);
  border-radius: var(--radius-lg);
  padding: 44px 32px 32px;
  box-shadow: var(--shadow-lg);
  animation: modal-pop-in 0.35s cubic-bezier(0.2, 0.7, 0.3, 1.1);
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  font-size: 1.5rem;
  line-height: 1;
  font-family: var(--font-body);
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.1s;
  z-index: 2;
}
.modal-close:hover  { background: #fff; color: var(--ink); }
.modal-close:active { transform: scale(0.92); }
.modal-emoji {
  font-size: 3rem;
  line-height: 1;
  margin: 0 0 12px;
}
.modal-eyebrow {
  display: inline-block;
  background: var(--blush);
  color: var(--coral);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.74rem;
  margin: 0 0 12px;
}
.modal-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 4.5vw, 2.5rem);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  background: var(--grad-rainbow);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rainbow-shift 8s ease-in-out infinite;
}
.modal-subtitle {
  color: var(--ink-soft);
  margin: 0 0 24px;
  font-size: 1.05rem;
}
.modal-body { margin: 0; }
.modal-section {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px dashed var(--line);
}
.modal-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.modal-section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0 0 10px;
  color: var(--ink);
}
.modal-section-body { color: var(--ink); line-height: 1.6; }
.modal-section-body p { margin: 0 0 10px; }

/* Birthstone color swatch row — circular chips of the stone's
   characteristic hues, shown above the symbolism section. */
.stone-swatch-row {
  display: flex;
  gap: 10px;
  margin: 4px 0 14px;
  flex-wrap: wrap;
}
.stone-swatch {
  display: inline-block;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(94, 83, 122, 0.18),
              inset 0 -4px 8px rgba(0, 0, 0, 0.12),
              inset 0 4px 8px rgba(255, 255, 255, 0.35);
}
.modal-section-body p:last-child { margin-bottom: 0; }
.modal-section-body em {
  color: var(--muted);
  font-style: italic;
}
.modal-section-body ul {
  margin: 8px 0 0;
  padding-left: 0;
  list-style: none;
}
.modal-section-body ul li {
  padding: 8px 0 8px 22px;
  position: relative;
  border-top: 1px dashed var(--line);
}
.modal-section-body ul li:first-child { border-top: 0; }
.modal-section-body ul li::before {
  content: "";
  position: absolute;
  left: 4px; top: 17px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--grad-rainbow);
}
.modal-section-body strong {
  font-family: var(--font-display);
  font-weight: 700;
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes modal-pop-in {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

@media (max-width: 600px) {
  .modal-content { padding: 36px 22px 26px; max-height: 92vh; }
  .modal-emoji { font-size: 2.4rem; }
}

/* ===================================================================
   Reduce motion preference
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .bg-balloons .balloon,
  .bg-confetti i,
  .bg-sparkles span,
  .mini-confetti { display: none; }
}

/* ============================================================
   Daily Trivia page
   Brand cards (same look as the homepage) arranged in a focused
   reading column.
   ============================================================ */
.trivia-section {
  /* Narrower column so the cards feel composed rather than stretched. */
  max-width: 720px;
  margin: 0 auto;
  padding: 28px clamp(20px, 5vw, 40px) 80px;
  display: grid;
  gap: 18px;
  position: relative;
  z-index: 1;     /* sit above the decorative confetti/sparkles layers */
}

/* Tab strip — toggle between "Today in History" and "Today in [Year]" */
.trivia-tabs {
  display: inline-flex;
  margin: 0 auto 4px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid rgba(43, 31, 62, 0.10);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(43, 31, 62, 0.06);
}
.trivia-tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 9px 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease;
}
.trivia-tab:hover { color: var(--ink); }
.trivia-tab.is-active {
  background: var(--grad-rainbow);
  color: #fff;
  box-shadow: 0 4px 12px rgba(155, 107, 255, 0.25);
}
.trivia-tabs-wrap {
  display: flex;
  justify-content: center;
}
.trivia-hero { text-align: center; margin: 6px 0 4px; }
.trivia-eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
.trivia-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 4.6vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 10px;
  color: var(--ink);
}
.trivia-title em {
  font-style: normal;
  background: var(--grad-rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.trivia-sub {
  font-size: 1.02rem;
  color: var(--muted);
  margin: 0;
}

/* Status / error chip */
.trivia-status {
  text-align: center;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255,255,255,0.85);
  color: var(--muted);
  border: 1px solid rgba(94,83,122,0.10);
}
.trivia-status.is-error { color: #c0334b; background: #fde7ec; border-color: #f7c5cf; }

/* All trivia cards share a stronger contrast treatment than the
   homepage cards because the trivia page background is more uniform
   pink and the cards need to "lift" visually. */
.card--trivia-prompt,
.card--trivia-choice,
.card--trivia-reveal,
.card--trivia-stat {
  border: 2px solid rgba(43, 31, 62, 0.16);
  box-shadow:
    0 10px 26px rgba(43, 31, 62, 0.12),
    0 2px 6px rgba(43, 31, 62, 0.06);
}

/* ---- Prompt card ---- */
.card--trivia-prompt {
  text-align: left;
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
}
/* Gradient accent stripe along the top edge */
.card--trivia-prompt::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: var(--grad-rainbow);
}
.card--trivia-prompt .card-value {
  font-size: clamp(1.25rem, 3.2vw, 1.55rem);
}

/* ---- Year capture card (appears when "Today in Your Year" needs a year) ---- */
.card--trivia-year-capture {
  border: 2px solid rgba(43, 31, 62, 0.16);
  box-shadow:
    0 10px 26px rgba(43, 31, 62, 0.12),
    0 2px 6px rgba(43, 31, 62, 0.06);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
  text-align: left;
}
.card--trivia-year-capture::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: var(--grad-rainbow);
}
.trivia-year-form {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.trivia-year-input {
  flex: 1 1 160px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(43, 31, 62, 0.18);
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
}
.trivia-year-input:focus {
  outline: 3px solid rgba(180, 139, 255, 0.45);
  outline-offset: 1px;
  border-color: rgba(180, 139, 255, 0.55);
}
.trivia-year-submit {
  padding: 12px 22px;
  border: 0;
  border-radius: 12px;
  background: var(--grad-rainbow);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(155, 107, 255, 0.22);
}
.trivia-year-submit:hover { transform: translateY(-1px); }

/* ---- Two-up answer cards ---- */
.trivia-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.card--trivia-choice {
  /* Override the homepage .card span (which assumes the 12-col grid) —
     here the parent .trivia-choices already controls the layout. */
  grid-column: auto;
  text-align: left;
  width: 100%;
  padding: 20px 22px 54px;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--ink);
  /* Subtle entry animation override so both answers feel synced */
  animation-delay: 0s;
  position: relative;
  overflow: hidden;
}
/* Gradient accent stripe — same treatment as the prompt card so the
   page reads as a single composed surface. */
.card--trivia-choice::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: var(--grad-rainbow);
  opacity: 0.75;
}
.card--trivia-choice:hover:not(:disabled),
.card--trivia-choice:focus-visible:not(:disabled) {
  transform: translateY(-6px);
  border-color: rgba(180, 139, 255, 0.45);
  box-shadow:
    0 18px 40px rgba(180, 139, 255, 0.18),
    0 4px 12px rgba(255, 122, 182, 0.10);
  outline: none;
}
.card--trivia-choice:focus-visible:not(:disabled) {
  outline: 3px solid rgba(180, 139, 255, 0.6);
  outline-offset: 3px;
}
.card--trivia-choice:disabled { cursor: default; }

/* A / B letter pill — reuses the .card-emoji shape with a gradient fill */
.trivia-letter {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: #fff;
  background: var(--grad-rainbow);
  border: 0;
  box-shadow: 0 4px 12px rgba(155, 107, 255, 0.25);
}

/* Year line acts like the .card-label */
.card--trivia-choice .card-label {
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 800;
}

/* Event text — bigger and more readable than the homepage card-sub */
.trivia-event-text {
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--ink);
  margin: 6px 0 4px;
}

/* CTA at the bottom of each answer card (mirrors the .card-cta pattern) */
.card--trivia-choice .card-cta {
  position: absolute;
  left: 22px; bottom: 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--grad-rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.7;
  transition: transform 0.2s, opacity 0.2s;
  pointer-events: none;
}
.card--trivia-choice:hover:not(:disabled) .card-cta {
  opacity: 1;
  transform: translateX(3px);
}

/* Result chip — hidden until reveal */
.trivia-result-chip {
  display: none;
  margin-top: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  width: fit-content;
}
.card--trivia-choice.is-correct .trivia-result-chip,
.card--trivia-choice.is-wrong   .trivia-result-chip { display: inline-flex; }
.card--trivia-choice.is-correct .card-cta,
.card--trivia-choice.is-wrong   .card-cta { display: none; }

.card--trivia-choice.is-correct {
  background: #e8fbef;
  border-color: #1dd1a1;
}
.card--trivia-choice.is-correct .trivia-result-chip {
  background: #1dd1a1;
  color: #fff;
}
.card--trivia-choice.is-wrong {
  background: #fdecef;
  border-color: #ff7eaa;
  opacity: 0.97;
}
.card--trivia-choice.is-wrong .trivia-result-chip {
  background: #ff7eaa;
  color: #fff;
}
.card--trivia-choice.is-selected::after {
  content: 'Your pick';
  position: absolute;
  top: 14px; right: 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(94, 83, 122, 0.08);
  color: var(--ink);
  padding: 4px 10px;
  border-radius: 999px;
}

/* ---- Reveal card ---- */
.card--trivia-reveal {
  text-align: left;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,1)) padding-box,
    var(--grad-rainbow) border-box;
  border: 2px solid transparent;
}
.card--trivia-reveal .card-value {
  font-size: clamp(1.35rem, 3.4vw, 1.7rem);
  background: var(--grad-rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.trivia-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 6px;
}
.trivia-share-btn {
  padding: 11px 18px;
  border: 0;
  border-radius: 14px;
  background: var(--grad-rainbow);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(155, 107, 255, 0.22);
  transition: transform 0.15s ease;
}
.trivia-share-btn:hover { transform: translateY(-1px); }
.trivia-home-btn {
  padding: 11px 18px;
  border-radius: 14px;
  border: 2px solid rgba(94, 83, 122, 0.18);
  background: #fff;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  display: inline-flex; align-items: center;
  transition: border-color 0.15s ease;
}
.trivia-home-btn:hover { border-color: #d28bff; }
.trivia-comeback {
  margin: 8px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---- Stats row of 3 mini cards ---- */
.trivia-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.card--trivia-stat {
  grid-column: auto;
  text-align: center;
  padding: 18px 14px;
}
.card--trivia-stat .card-emoji {
  margin: 0 auto 8px;
}
.card--trivia-stat .card-label {
  text-align: center;
}
.card--trivia-stat .card-value {
  font-size: 2rem;
  background: var(--grad-rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 2px 0 0;
}

@media (max-width: 640px) {
  .trivia-choices { grid-template-columns: 1fr; }
  .card--trivia-choice { padding: 20px 18px 50px; }
  .trivia-event-text { font-size: 1.0rem; }
  .card--trivia-stat .card-value { font-size: 1.6rem; }
}

/* ===================================================================
   Personalized birthday gift section
   =================================================================== */
.gift-shop {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 24px 70px;
}
.gift-shop-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  align-items: stretch;
  background: rgba(255, 255, 255, 0.84);
  border: 1.5px solid rgba(43, 31, 62, 0.10);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 28px;
  overflow: hidden;
}
.section-kicker {
  display: inline-block;
  margin: 0 0 10px;
  padding: 6px 13px;
  border-radius: 999px;
  color: #fff;
  background: var(--grad-rainbow);
  font-weight: 800;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.gift-heading {
  text-align: left;
  margin-bottom: 12px;
}
.gift-lead {
  color: var(--ink-soft);
  font-size: 1rem;
  margin: 0 0 20px;
}
.gift-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.gift-primary,
.gift-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}
.gift-primary {
  color: #fff;
  background: var(--grad-rainbow);
}
.gift-secondary {
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
}
.gift-examples {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.gift-card {
  border-radius: 26px;
  border: 1.5px solid rgba(43, 31, 62, 0.10);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  min-height: 100%;
}
.gift-card--newspaper {
  background: linear-gradient(135deg, #fff7e3 0%, #f5efe3 100%);
}
.gift-card--magazine {
  background: linear-gradient(135deg, #fff0fa 0%, #e9f4ff 100%);
}
.gift-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.gift-card h3 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}
.gift-card p,
.gift-card li {
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.gift-card ul {
  padding-left: 20px;
  margin: 14px 0 0;
}
@media (max-width: 880px) {
  .gift-shop-inner,
  .gift-examples {
    grid-template-columns: 1fr;
  }
  .gift-heading { text-align: center; }
  .gift-copy { text-align: center; }
  .gift-actions { justify-content: center; }
}
