/* Friendship Games design system — "Playful + warm" friendship-day vibe. Mobile-first, theme-driven
   via CSS vars set per game. Scoped under .fg-root so it never leaks into site styles.
   See docs/friendship-games/ARCHITECTURE.md §7 + the "WOW redesign" change-log entry. */

.fg-root {
  --fg-grad: linear-gradient(160deg, #ffe3ec 0%, #ffb3c6 45%, #ff5d8f 100%);
  --fg-primary: #ff4d6d;
  --fg-accent: #ffd166;
  --fg-ink: #3a0d1c;
  --fg-soft: #fff0f3;
  --fg-card: #ffffff;
  --fg-muted: #9b8791;
  --fg-radius: 26px;
  --fg-shadow: 0 22px 60px rgba(120, 20, 50, .20);
  --fg-display: 'Fredoka One', 'Poppins', system-ui, sans-serif;
  --fg-glow: color-mix(in srgb, var(--fg-primary) 38%, transparent);
  --fg-tintw: color-mix(in srgb, var(--fg-primary) 16%, #fff);
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
  min-height: calc(100vh - 56px);
  min-height: calc(100dvh - 56px); /* dvh = dynamic viewport: no gap under mobile address bar */
  padding: 18px 0 36px;
  background: var(--fg-grad);
  font-family: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--fg-ink);
  -webkit-tap-highlight-color: transparent;
  /* The game UI is a deliberately light, colourful design. `only light` locks form controls to the
     light scheme AND opts the whole subtree out of OS/Chrome "auto dark" force-inversion on phones
     set to dark mode — so it always looks exactly as designed. (FG's own dark bits, e.g. the DNA
     match card, set their own explicit colours and are unaffected.) */
  color-scheme: only light;
}
.fg-root *, .fg-root *::before, .fg-root *::after { box-sizing: border-box; }
/* every anchor in the game UI: never inherit the site's global a:hover underline */
.fg-root a, .fg-root a:hover, .fg-root a:focus, .fg-root a:active, .fg-root a:visited { text-decoration: none; }

/* soft glow blobs behind everything for depth */
.fg-root::before, .fg-root::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(46px); opacity: .5; z-index: 0; pointer-events: none;
  background: radial-gradient(circle, #fff 0%, transparent 70%);
}
.fg-root::before { width: 260px; height: 260px; top: -60px; left: -70px; }
.fg-root::after  { width: 300px; height: 300px; bottom: -90px; right: -90px; opacity: .35; }

.fg-shell { position: relative; z-index: 1; max-width: 520px; margin: 0 auto; padding: 0 16px; }
.fg-main { padding: 8px 0 12px; }

/* floating hearts backdrop */
.fg-hearts { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.fg-hearts span { position: absolute; bottom: -8%; font-size: 24px; opacity: 0; animation: fgfloat 9s linear infinite; }
.fg-hearts span:nth-child(1){ left: 6%;  font-size: 20px; animation-delay: 0s; }
.fg-hearts span:nth-child(2){ left: 18%; font-size: 32px; animation-delay: 1.4s; }
.fg-hearts span:nth-child(3){ left: 31%; font-size: 16px; animation-delay: 3.1s; }
.fg-hearts span:nth-child(4){ left: 45%; font-size: 28px; animation-delay: 2.2s; }
.fg-hearts span:nth-child(5){ left: 58%; font-size: 18px; animation-delay: 4.3s; }
.fg-hearts span:nth-child(6){ left: 70%; font-size: 30px; animation-delay: 0.8s; }
.fg-hearts span:nth-child(7){ left: 82%; font-size: 20px; animation-delay: 3.7s; }
.fg-hearts span:nth-child(8){ left: 92%; font-size: 26px; animation-delay: 5.2s; }
@keyframes fgfloat { 0%{ transform: translateY(0) rotate(0); opacity: 0; } 12%{ opacity: .5; } 88%{ opacity: .45; } 100%{ transform: translateY(-120vh) rotate(40deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce){ .fg-hearts { display: none; } }

/* card — chunky, glossy, bouncy entrance */
.fg-card { position: relative; background: var(--fg-card); border-radius: var(--fg-radius); box-shadow: var(--fg-shadow);
  padding: 28px 22px; overflow: hidden; }
.fg-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 7px;
  background: linear-gradient(90deg, var(--fg-primary), var(--fg-accent)); }
.fg-card.glass { background: rgba(255,255,255,.96); }

/* hero / headings */
.fg-emoji { position: relative; display: inline-block; font-size: 62px; line-height: 1; animation: fgbob 3.2s ease-in-out infinite; }
.fg-emoji::after { content: ''; position: absolute; inset: -14px; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, var(--fg-glow) 0%, transparent 68%); }
@keyframes fgbob { 0%,100%{ transform: translateY(0) rotate(-4deg); } 50%{ transform: translateY(-7px) rotate(4deg); } }
.fg-title { font-family: var(--fg-display); font-weight: 400; font-size: 28px; margin: 14px 0 6px; line-height: 1.15; color: var(--fg-primary); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .fg-title { background: linear-gradient(120deg, var(--fg-ink), var(--fg-primary)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
}
/* Hub heading: a BOXLESS page title (no card/banner) so it reads as a header, never a tappable game card. */
.fg-hub-head { text-align: center; margin: 6px 0 18px; padding: 0 8px; }
.fg-hub-title { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 0;
  font-family: var(--fg-display); font-weight: 400; font-size: 30px; line-height: 1.1; }
.fg-hub-emoji { font-size: 28px; filter: drop-shadow(0 2px 6px rgba(201,24,74,.22)); }
.fg-hub-grad { color: #c9184a; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .fg-hub-grad { background: linear-gradient(120deg, #ff4d6d, #b3144a); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
}
.fg-hub-sub { margin: 6px 0 0; font-size: 13px; font-weight: 600; color: #b23a5e; }
.fg-tagline { color: var(--fg-muted); font-size: 15px; font-weight: 600; margin: 0 0 14px; }
.fg-intro { font-size: 15.5px; line-height: 1.6; color: #5a4a52; }
.fg-center { text-align: center; }

/* inputs */
.fg-input { width: 100%; border: 2.5px solid #f0e3e8; border-radius: 16px; padding: 15px 16px; font-size: 16px; color: var(--fg-ink);
  outline: none; transition: border-color .15s, box-shadow .15s; background: #fff; font-family: inherit; }
.fg-input:focus { border-color: var(--fg-primary); box-shadow: 0 0 0 4px var(--fg-soft); }
textarea.fg-input { resize: none; min-height: 92px; }
.fg-input::placeholder { color: #9aa3af; opacity: 1; }   /* explicit so it stays readable on dark-mode devices */
.fg-label { display: block; font-weight: 700; font-size: 14px; margin: 0 0 8px; }

/* buttons — gradient + glossy sheen + sticker shadow */
.fg-btn { position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 0; cursor: pointer;
  background: var(--fg-primary); color: #fff; text-decoration: none; font-weight: 800; font-size: 16.5px; padding: 16px 18px; border-radius: 18px; font-family: inherit;
  letter-spacing: .2px; box-shadow: 0 12px 26px var(--fg-glow); overflow: hidden;
  transition: transform .14s cubic-bezier(.2,.9,.3,1.3), box-shadow .14s; }
.fg-btn::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0) 55%); }
.fg-btn:hover { transform: translateY(-2px) scale(1.015); box-shadow: 0 18px 34px var(--fg-glow); }
.fg-btn:active { transform: translateY(1px) scale(.99); }
/* anchor-buttons must not pick up the site's global a:hover underline / colour shift */
.fg-btn:hover, .fg-btn:focus, .fg-btn:active, .fg-btn:visited { text-decoration: none; color: #fff; }
.fg-btn.soft:hover, .fg-btn.soft:focus, .fg-btn.soft:visited,
.fg-btn.ghost:hover, .fg-btn.ghost:focus, .fg-btn.ghost:visited { color: var(--fg-primary); }
.fg-btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.fg-btn.ghost { background: #fff; color: var(--fg-primary); border: 2.5px solid currentColor; box-shadow: none; }
.fg-btn.ghost::before { display: none; }
.fg-btn.soft { background: var(--fg-soft); color: var(--fg-primary); box-shadow: none; }
.fg-btn.soft::before { display: none; }
.fg-btn.wa { background: #25d366; box-shadow: 0 12px 26px rgba(37,211,102,.4); }
.fg-btn-row { display: flex; gap: 10px; margin-top: 12px; }

/* full social share card (same platform classes/order as the dare games) on the FG share screen */
.fg-root .btn.long { display: block; width: 100%; margin-top: 12px; }
.fg-root .facebookbtn { margin-top: 10px; }
.fg-root .facebookbtn .btn { width: 100%; }
.fg-root .column-social { margin-top: 12px; }
.fg-root .fg-sb { display: block; cursor: pointer; }

/* concise, mobile-first icon share row (leaderboard / results page) */
.fg-share-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }
.fg-share-row .fg-rsb { display: inline-flex; text-decoration: none; }
.fg-share-row .btn.icon-social {
  width: 46px; height: 46px; min-width: 46px; padding: 0; margin: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 14px; box-shadow: 0 6px 14px rgba(0, 0, 0, .12); cursor: pointer;
}
.fg-share-row .btn.icon-social i { font-size: 21px; line-height: 0; }
.fg-share-row .btn.icon-social img { display: block; width: 22px; height: 22px; }
.fg-root .fg-btn.wa i { margin-right: 4px; }

/* creator language picker */
.fg-langbar { display: inline-flex; align-items: center; gap: 8px; margin: 0 auto 4px; padding: 8px 12px;
  background: #fff; box-shadow: 0 6px 16px var(--fg-glow); border-radius: 99px; }
.fg-langbar-i { font-size: 17px; line-height: 1; }
.fg-langsel { border: 0; background: transparent; font-family: inherit; font-size: 14px; font-weight: 800; color: var(--fg-primary);
  cursor: pointer; outline: none; padding-right: 4px; max-width: 200px; }
.fg-langhint { font-size: 12px; color: var(--fg-muted); margin: 6px 0 2px; font-weight: 600; }

/* dice / shuffle suggestion */
.fg-dice { display: inline-flex; align-items: center; gap: 8px; margin: 4px auto 0; background: var(--fg-soft); color: var(--fg-primary);
  border: 2px dashed var(--fg-primary); border-radius: 14px; padding: 10px 16px; font-weight: 800; font-size: 14px; cursor: pointer; font-family: inherit; }
.fg-dice:active { transform: scale(.96); }
/* only the 🎲 tumbles (like a rolled die) — not the whole pill */
.fg-dice-ico { display: inline-block; will-change: transform; }
.fg-dice-ico.roll { animation: fgroll .6s cubic-bezier(.2, .7, .3, 1); }
@keyframes fgroll {
  0%   { transform: translateX(0) rotate(0) scale(1); }
  20%  { transform: translateX(-2px) rotate(150deg) scale(1.22); }
  45%  { transform: translateX(2px) rotate(290deg) scale(.9); }
  70%  { transform: translateX(-1px) rotate(430deg) scale(1.14); }
  100% { transform: translateX(0) rotate(540deg) scale(1); }
}

/* progress — gradient bar + step label */
.fg-progress { height: 10px; background: var(--fg-soft); border-radius: 99px; overflow: hidden; margin-bottom: 18px; box-shadow: inset 0 1px 3px rgba(0,0,0,.06); }
.fg-progress > span { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .4s cubic-bezier(.3,.9,.3,1.2);
  background: linear-gradient(90deg, var(--fg-primary), var(--fg-accent)); }
.fg-step-count { font-size: 13px; font-weight: 800; color: var(--fg-primary); margin-bottom: 8px; letter-spacing: .3px; }

/* question + options — candy chips with sticker emoji */
.fg-q { font-family: var(--fg-display); font-weight: 400; font-size: 22px; line-height: 1.3; margin: 0 0 18px; color: var(--fg-ink); }
.fg-options { display: grid; gap: 11px; }
.fg-opt { display: flex; align-items: center; gap: 13px; padding: 13px 15px; border: 2.5px solid #f1ebf0; border-radius: 18px; background: #fff;
  cursor: pointer; font-size: 16px; font-weight: 600; text-align: left; color: var(--fg-ink);
  transition: transform .12s cubic-bezier(.2,.9,.3,1.3), border-color .14s, background .14s, box-shadow .14s; }
.fg-opt:hover { border-color: var(--fg-primary); box-shadow: 0 8px 18px var(--fg-glow); }
.fg-opt:active { transform: scale(.97); }
.fg-opt .e { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--fg-soft); display: flex; align-items: center; justify-content: center; font-size: 22px; line-height: 1; }
.fg-opt .e:empty { display: none; }   /* DNA quiz options carry no emoji — don't leave an empty circle */
.fg-opt > span:not(.e) { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }   /* label takes the row + wraps, so the emoji + tick/cross circles never get squeezed on mobile */
.fg-opt.sel { border-color: var(--fg-primary); background: var(--fg-tintw); box-shadow: 0 10px 22px var(--fg-glow); transform: scale(1.01); }
.fg-opt.sel .e { background: var(--fg-primary); }
.fg-opt.sel::after { content: '✓'; margin-left: auto; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--fg-primary); color: #fff; font-weight: 900; display: flex; align-items: center; justify-content: center; font-size: 14px; animation: pop .35s cubic-bezier(.2,.9,.3,1.4) both; }
/* per-question right/wrong feedback (guess steps) */
.fg-opt.correct { border-color: #28b463; background: #e9f9ef; color: var(--fg-ink); }
.fg-opt.correct .e { background: #28b463; }
.fg-opt.correct::after { content: '✓'; margin-left: auto; flex: none; width: 26px; height: 26px; border-radius: 50%; background: #28b463; color: #fff; font-weight: 900; display: flex; align-items: center; justify-content: center; font-size: 14px; animation: pop .35s cubic-bezier(.2,.9,.3,1.4) both; }
.fg-opt.wrong { border-color: #e74c3c; background: #fdeceb; color: var(--fg-ink); }
.fg-opt.wrong .e { background: #e74c3c; }
.fg-opt.wrong::after { content: '✗'; margin-left: auto; flex: none; width: 26px; height: 26px; border-radius: 50%; background: #e74c3c; color: #fff; font-weight: 900; display: flex; align-items: center; justify-content: center; font-size: 14px; animation: pop .35s cubic-bezier(.2,.9,.3,1.4) both; }

/* share / link */
.fg-linkbox { display: flex; align-items: center; gap: 8px; background: var(--fg-soft); border: 2px dashed var(--fg-primary); border-radius: 16px; padding: 12px 14px; margin: 14px 0; }
.fg-linkbox input { flex: 1; border: 0; background: transparent; font-size: 14px; color: var(--fg-ink); outline: none; min-width: 0; }
.fg-copy { background: var(--fg-primary); color: #fff; border: 0; border-radius: 12px; padding: 11px 16px; min-height: 42px; font-weight: 800; cursor: pointer; font-size: 13px; }

/* reveal meter */
.fg-meter-wrap { text-align: center; padding: 6px 0; }
.fg-meter { position: relative; width: 210px; height: 210px; margin: 4px auto 8px; }
.fg-meter svg { transform: rotate(-90deg); filter: drop-shadow(0 6px 14px var(--fg-glow)); }
.fg-meter .pct { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.fg-meter .pct b { font-family: var(--fg-display); font-weight: 400; font-size: 48px; color: var(--fg-primary); line-height: 1; }
.fg-meter .pct span { font-size: 13px; color: var(--fg-muted); font-weight: 700; }
.fg-tier-emoji { font-size: 64px; line-height: 1; }
.fg-tier-name { font-family: var(--fg-display); font-weight: 400; font-size: 26px; margin: 8px 0 4px; color: var(--fg-primary); }
.fg-tier-msg { color: #5a4a52; font-size: 15.5px; line-height: 1.55; }
/* 👑 Where Do You Rank? — tier-badge reveal */
/* 👑 cinematic result: dark "spotlight stage" hero band + white content below */
.fg-rank-card { padding: 0 !important; overflow: hidden; }
.fg-rank-card::before { display: none; }   /* drop the default 7px top bar — the hero band is the top */
.fg-rank-hero { position: relative; overflow: hidden; text-align: center; padding: 34px 20px 28px;
  background: radial-gradient(128% 105% at 50% -12%, color-mix(in srgb, var(--fg-primary) 86%, #fff) 0%, var(--fg-ink) 104%); }
/* rotating light-ray starburst */
.fg-rank-hero::before { content: ''; position: absolute; top: 44%; left: 50%; transform: translate(-50%, -50%); width: 380px; height: 380px; z-index: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.42) 0deg 5deg, transparent 5deg 16deg);
  -webkit-mask: radial-gradient(circle, #000 6%, transparent 56%); mask: radial-gradient(circle, #000 6%, transparent 56%);
  opacity: .5; animation: fgspin 22s linear infinite; }
/* warm glow pool behind the badge */
.fg-rank-hero::after { content: ''; position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%); width: 220px; height: 180px; border-radius: 50%; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--fg-accent) 60%, transparent) 0%, transparent 66%); filter: blur(13px); animation: fgflow 3.8s ease-in-out infinite; }
.fg-rank-hero .fg-tierbadge-lg { position: relative; z-index: 1; }
/* cinematic game-HUD score chip — its own line below the badge */
.fg-rank-hero .fg-rank-score { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; margin-top: 20px;
  background: rgba(0,0,0,.26); color: #fff; padding: 7px 21px; border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.26), 0 5px 16px rgba(0,0,0,.2);
  font-family: var(--fg-display); font-weight: 400; font-size: 21px; line-height: 1; }
.fg-rank-hero .fg-rank-score b { font-size: 27px; }
.fg-rank-hero .fg-rank-score .fg-rank-lbl { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; opacity: .82; }
.fg-rank-body { padding: 22px 20px 26px; text-align: center; }

/* ── If I Was A… — aura "vibe card" reveal ─────────────────────────────────── */
.fg-vibe-card { padding: 20px 15px 24px; }
.fg-vibe-head { text-align: center; margin-bottom: 14px; }
.fg-vibe-orb { font-size: 34px; display: block; line-height: 1; animation: fgbob 3.4s ease-in-out infinite; }
.fg-vibe-title { font-family: var(--fg-display); font-weight: 400; font-size: 24px; color: var(--fg-primary); margin-top: 5px; }
.fg-vibe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.fg-vibe-cell { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; padding: 12px 8px; border-radius: 16px;
  background: var(--fg-soft); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--fg-primary) 13%, transparent), 0 3px 10px color-mix(in srgb, var(--fg-primary) 8%, transparent); }
.fg-vibe-cat { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 9px; letter-spacing: .09em; text-transform: uppercase; color: var(--fg-primary); opacity: .68; }
.fg-vibe-e { font-size: 29px; line-height: 1.15; }
.fg-vibe-val { font-family: var(--fg-display); font-weight: 400; font-size: 13px; color: var(--fg-ink); line-height: 1.2; }

/* ── Secret Message (mechanic: secret) ─────────────────────────────────────── */
/* creator compose: vibe picker + message suggestions */
.fg-vibe-label { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-primary); opacity: .7; margin: 14px 0 8px; }
.fg-vibe-picks { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.fg-vibe-pick { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; cursor: pointer; transition: all .15s;
  border: 2px solid color-mix(in srgb, var(--fg-primary) 22%, transparent); background: #fff; color: var(--fg-ink);
  font-family: var(--fg-display); font-weight: 400; font-size: 14px; }
.fg-vibe-pick .fg-vibe-pe { font-size: 17px; }
.fg-vibe-pick.on { background: var(--fg-grad); color: #fff; border-color: transparent; box-shadow: 0 6px 16px var(--fg-glow); }
.fg-bomb-ta { margin-top: 4px; resize: none; text-align: left; }
.fg-sugs { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.fg-sug { text-align: left; padding: 9px 12px; border-radius: 12px; cursor: pointer; transition: all .15s;
  border: 1.5px dashed color-mix(in srgb, var(--fg-primary) 30%, transparent); background: var(--fg-soft); color: var(--fg-ink); font-size: 13px; line-height: 1.35; }
.fg-sug:hover { border-style: solid; transform: translateY(-1px); }
/* friend: the "find the master key" drag puzzle */
.fg-crack-hud, .fg-kh-hud { display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: 300px; margin: 4px auto 6px; gap: 8px; }
.fg-crack-timer { font-family: var(--fg-display); font-weight: 400; font-size: 28px; color: var(--fg-accent); font-variant-numeric: tabular-nums; }
.fg-kh-hint { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 12.5px; color: var(--fg-primary); text-align: right; }
.fg-kh-scene { position: relative; width: 100%; height: 320px; border-radius: 18px; overflow: hidden; touch-action: none;
  background: radial-gradient(120% 90% at 50% 12%, #fff7e6 0%, color-mix(in srgb, var(--fg-primary) 14%, #f3e2c2) 100%);
  box-shadow: inset 0 0 0 2px rgba(180,130,60,.18), inset 0 8px 22px rgba(150,100,50,.12); }
.fg-kh-lock { position: absolute; transform: translate(-50%, 0); width: 92px; height: 92px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 40% 32%, #fff 0%, var(--fg-soft) 75%); box-shadow: 0 8px 20px var(--fg-glow), inset 0 0 0 3px rgba(255,255,255,.6); z-index: 2; }
.fg-kh-lock.await { box-shadow: 0 8px 22px var(--fg-glow), inset 0 0 0 3px rgba(255,255,255,.6), 0 0 0 4px color-mix(in srgb, var(--fg-accent) 50%, transparent); animation: fgpulse 1.1s ease-in-out infinite; }
.fg-kh-lockemoji { font-size: 52px; line-height: 1; }
.fg-kh-lock.unlocking { animation: fgmiss .5s ease 2; }
.fg-kh-lock.open { background: radial-gradient(circle at 40% 32%, #fff 0%, color-mix(in srgb, #37c26a 30%, var(--fg-soft)) 100%); box-shadow: 0 10px 26px rgba(55,194,106,.5), inset 0 0 0 3px rgba(255,255,255,.7); transition: all .4s; }
@keyframes fgpulse { 0%,100% { transform: translate(-50%, 0) scale(1); } 50% { transform: translate(-50%, 0) scale(1.05); } }
.fg-kh-obj { position: absolute; transform: translate(-50%, -50%); font-size: 56px; line-height: 1; cursor: grab; z-index: 3; user-select: none; -webkit-user-select: none;
  filter: drop-shadow(0 6px 8px rgba(120,80,40,.28)); transition: filter .15s; animation: fgobjin .5s ease both; }
@keyframes fgobjin { 0% { opacity: 0; transform: translate(-50%, -130px) scale(.5); } 70% { opacity: 1; } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.fg-kh-obj.grab { cursor: grabbing; z-index: 9; filter: drop-shadow(0 12px 16px rgba(120,80,40,.4)); }
.fg-kh-key { position: absolute; transform: translate(-50%, -50%) rotate(-20deg); font-size: 44px; line-height: 1; z-index: 1; opacity: .0; pointer-events: none; transition: opacity .25s; }
.fg-kh-key.show { opacity: 1; z-index: 8; pointer-events: auto; cursor: grab; animation: fgkeypop .4s ease; filter: drop-shadow(0 0 10px var(--fg-glow)); }
.fg-kh-key.grab { cursor: grabbing; z-index: 10; }
.fg-kh-key.inserted { transition: all .35s cubic-bezier(.4,1.3,.5,1); }
@keyframes fgkeypop { 0% { transform: translate(-50%, -50%) rotate(-20deg) scale(0); } 60% { transform: translate(-50%, -50%) rotate(-20deg) scale(1.3); } 100% { transform: translate(-50%, -50%) rotate(-20deg) scale(1); } }
.fg-kh-key.master { font-size: 48px; }
.fg-kh-key.master.show { filter: drop-shadow(0 0 12px #f5b50a) drop-shadow(0 2px 4px rgba(0,0,0,.25)); }
.fg-kh-key.reject { animation: fgkeyreject .45s ease; }
@keyframes fgkeyreject { 0%,100% { transform: translate(-50%,-50%) rotate(-20deg); } 25% { transform: translate(-62%,-50%) rotate(-30deg); } 75% { transform: translate(-38%,-50%) rotate(-10deg); } }
.fg-kh-lock.nope { animation: fglocknope .42s ease; }
@keyframes fglocknope { 0%,100% { transform: translate(-50%,0); } 25% { transform: translate(-58%,0); } 75% { transform: translate(-42%,0); } }
.fg-kh-lock.shake { animation: fglockshake .42s ease; }
@keyframes fglockshake { 0%,100% { transform: translate(-50%,0) rotate(0); } 20% { transform: translate(-50%,0) rotate(-7deg); } 60% { transform: translate(-50%,0) rotate(7deg); } }
.fg-kh-lock.zoom { animation: fglockzoom .9s cubic-bezier(.3,1.3,.5,1) both; z-index: 12; }
@keyframes fglockzoom { 0% { transform: translate(-50%,0) scale(1); } 45% { transform: translate(-50%,34px) scale(1.75); } 100% { transform: translate(-50%,34px) scale(1.5); } }
.fg-spark { position: absolute; transform: translate(-50%,-50%); z-index: 11; font-size: 18px; pointer-events: none; animation: fgsparkle .65s ease-out forwards; }
@keyframes fgsparkle { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.3); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.1); } }
.fg-flash { position: fixed; inset: 0; z-index: 99999; background: #fff; pointer-events: none; animation: fgflash .5s ease both; }
@keyframes fgflash { 0% { opacity: 0; } 16% { opacity: .85; } 100% { opacity: 0; } }
.fg-kh-hintbtn { max-width: 180px; font-size: 14px; margin-top: 6px; opacity: .9; }
.fg-crack-win { font-family: var(--fg-display); font-weight: 400; font-size: 30px; color: var(--fg-primary); margin-top: 4px; }
.fg-crack-time { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 15px; color: var(--fg-accent); margin: 2px 0 10px; }
/* friend: a wax-sealed envelope opens into a handwritten letter (nostalgic + cinematic) */
.fg-env-scene { position: relative; height: 282px; display: flex; align-items: center; justify-content: center; margin: 8px 0 4px; overflow: hidden; perspective: 900px; }
.fg-scene-static { height: auto; overflow: visible; padding: 8px 0; }
.fg-env { position: absolute; z-index: 5; width: 240px; height: 158px; border: none; background: transparent; cursor: pointer; padding: 0; outline: none !important; -webkit-tap-highlight-color: transparent; transition: transform .6s ease, opacity .6s ease; }
.fg-env-body { position: absolute; inset: 0; border-radius: 9px; background: linear-gradient(160deg, #fbe7cf, #f0d3ab); box-shadow: 0 18px 38px rgba(150,90,50,.3), inset 0 -10px 18px rgba(180,130,80,.18); }
.fg-env-body::after { content: ''; position: absolute; inset: 0; border-radius: 9px; background: linear-gradient(150deg, transparent 49%, rgba(180,130,80,.16) 50%); }
.fg-env-flap { position: absolute; top: 0; left: 0; width: 240px; height: 84px; transform-origin: top center; transition: transform .7s cubic-bezier(.5,0,.3,1); z-index: 3;
  background: linear-gradient(160deg, #f7ddbb, #ecc99e); clip-path: polygon(0 0, 100% 0, 50% 100%); filter: drop-shadow(0 3px 4px rgba(150,100,60,.2)); }
.fg-env-seal { position: absolute; top: 52px; left: 50%; transform: translateX(-50%); z-index: 4; width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff; background: radial-gradient(circle at 38% 30%, color-mix(in srgb, var(--seal) 72%, #fff) 0%, var(--seal) 74%);
  box-shadow: 0 4px 9px rgba(110,30,40,.4), inset 0 -3px 6px rgba(0,0,0,.22), inset 0 2px 4px rgba(255,255,255,.4); }
.fg-env.open .fg-env-flap { transform: rotateX(178deg); z-index: 0; }
.fg-env.open .fg-env-seal { animation: fgsealcrack .5s ease forwards; }
@keyframes fgsealcrack { 0% { transform: translateX(-50%) scale(1); } 35% { transform: translateX(-50%) scale(1.28) rotate(-10deg); } 100% { transform: translateX(-52%) scale(0) rotate(24deg); opacity: 0; } }
.fg-env.gone { transform: translateY(44px) scale(.76); opacity: 0; }
.fg-letter { position: absolute; z-index: 2; width: 300px; max-width: 86vw; opacity: 0; transform: translateY(38px) scale(.86); pointer-events: none;
  transition: opacity .6s ease, transform .65s cubic-bezier(.3,1.25,.5,1); }
.fg-letter.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.fg-letter-static { position: relative; }
.fg-letter-paper { position: relative; text-align: left; border-radius: 10px; padding: 24px 22px 20px; border: 1px solid #e9d6b3; box-shadow: 0 18px 44px rgba(150,90,50,.26);
  background: repeating-linear-gradient(#fdf6e6, #fdf6e6 30px, #f1e4cb 31px, #fdf6e6 32px); }
.fg-letter-head { text-align: center; font-size: 30px; margin-bottom: 4px; }
.fg-letter-msg { font-family: 'Caveat', cursive; font-weight: 600; font-size: 27px; line-height: 1.45; color: #5a3825; white-space: pre-wrap; word-break: break-word; min-height: 30px; }
.fg-letter-sign { font-family: 'Caveat', cursive; font-weight: 700; font-size: 25px; color: var(--seal); text-align: right; margin-top: 10px; min-height: 26px; }
.fg-petal { position: absolute; top: -24px; z-index: 1; font-size: 22px; opacity: 0; pointer-events: none; animation: fgpetal linear infinite; }
@keyframes fgpetal { 0% { transform: translateY(-24px) rotate(0); opacity: 0; } 12% { opacity: .85; } 88% { opacity: .65; } 100% { transform: translateY(300px) rotate(190deg); opacity: 0; } }

/* ───────── cinematic upgrades: key-hunt unlock + envelope reveal ───────── */
/* search-scene atmosphere: vignette + drifting dust */
.fg-kh-scene::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: 18px; box-shadow: inset 0 0 54px 14px rgba(120,80,40,.22); }
.fg-dust { position: absolute; z-index: 0; pointer-events: none; opacity: 0; transform: translate(-50%,-50%); animation: fgdust ease-in-out infinite; }
@keyframes fgdust { 0% { opacity: 0; transform: translate(-50%,4px) scale(.6); } 50% { opacity: .7; } 100% { opacity: 0; transform: translate(-50%,-18px) scale(1); } }
/* master key nears the lock → it leans in + glows brighter */
.fg-kh-lock.near { animation: fgpulse .5s ease-in-out infinite; box-shadow: 0 8px 26px var(--fg-glow), inset 0 0 0 3px rgba(255,255,255,.7), 0 0 0 6px color-mix(in srgb, var(--fg-accent) 65%, transparent), 0 0 32px 5px color-mix(in srgb, var(--fg-accent) 55%, transparent); }
/* the gold master key, the moment it's uncovered */
.fg-kh-key.master.found { animation: fgfound 1s ease 2; }
@keyframes fgfound { 0%,100% { filter: drop-shadow(0 0 12px #f5b50a); } 50% { filter: drop-shadow(0 0 22px #ffd24a) drop-shadow(0 0 9px #fff3c0); transform: translate(-50%,-50%) rotate(-20deg) scale(1.18); } }
/* the key glides in and turns the bolt */
.fg-kh-key.turn { transition: left .32s ease, top .32s ease; animation: fgkeyturn .55s ease .28s both; }
@keyframes fgkeyturn { 0% { transform: translate(-50%,-50%) rotate(-20deg); } 100% { transform: translate(-50%,-50%) rotate(72deg); } }
/* the lock pops open */
.fg-kh-lock.burst { animation: fglockburst .85s cubic-bezier(.3,1.5,.5,1) both; z-index: 12; }
@keyframes fglockburst { 0% { transform: translate(-50%,0) scale(1); } 28% { transform: translate(-50%,0) scale(.82); } 60% { transform: translate(-50%,0) scale(1.55); } 100% { transform: translate(-50%,0) scale(1.4); } }
/* radiating light rays */
.fg-rays { position: absolute; transform: translate(-50%,-50%); width: 24px; height: 24px; z-index: 11; pointer-events: none; border-radius: 50%;
  background: conic-gradient(rgba(255,255,255,.9) 0 4deg, transparent 4deg 26deg, rgba(255,238,170,.85) 26deg 30deg, transparent 30deg 56deg, rgba(255,255,255,.9) 56deg 60deg, transparent 60deg 86deg, rgba(255,238,170,.85) 86deg 90deg, transparent 90deg 116deg, rgba(255,255,255,.9) 116deg 120deg, transparent 120deg 176deg, rgba(255,238,170,.85) 176deg 180deg, transparent 180deg 236deg, rgba(255,255,255,.9) 236deg 240deg, transparent 240deg 296deg, rgba(255,238,170,.85) 296deg 300deg, transparent 300deg 360deg);
  animation: fgrays .9s ease-out forwards; }
.fg-rays.gold { filter: drop-shadow(0 0 6px #f5b50a); }
@keyframes fgrays { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.2) rotate(0); } 22% { opacity: .95; } 100% { opacity: 0; transform: translate(-50%,-50%) scale(12) rotate(40deg); } }
/* expanding shockwave ring */
.fg-shock { position: absolute; transform: translate(-50%,-50%); width: 40px; height: 40px; border-radius: 50%; z-index: 11; pointer-events: none; border: 3px solid color-mix(in srgb, var(--fg-accent) 70%, #fff); animation: fgshock .65s ease-out forwards; }
@keyframes fgshock { 0% { opacity: .9; transform: translate(-50%,-50%) scale(.3); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(3.8); } }
/* the whole scene dissolves into the letter reveal */
.fg-dissolve { animation: fgdissolve .45s ease forwards; }
@keyframes fgdissolve { to { opacity: 0; transform: scale(1.05); filter: blur(3px); } }

/* envelope: float in, idle bob, glow halo, pulsing "tap me" ring */
.fg-env { animation: fgenvin .7s cubic-bezier(.3,1.2,.5,1) both, fgenvbob 3s ease-in-out 1s infinite; }
@keyframes fgenvin { 0% { opacity: 0; transform: translateY(40px) scale(.8); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes fgenvbob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.fg-env::before { content: ''; position: absolute; inset: -24px; z-index: -1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--seal) 30%, transparent) 0%, transparent 68%); }
.fg-env.open { animation: none; }
.fg-env-seal::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--seal); opacity: .6; animation: fgsealring 1.6s ease-out infinite; }
@keyframes fgsealring { 0% { opacity: .6; transform: scale(.8); } 100% { opacity: 0; transform: scale(1.9); } }
.fg-env.open .fg-env-seal::after { display: none; }
/* wax shards off the broken seal */
.fg-wax-shard { position: absolute; width: 9px; height: 9px; border-radius: 2px; background: var(--seal); z-index: 6; pointer-events: none; box-shadow: inset 0 -2px 3px rgba(0,0,0,.3); animation: fgshard .65s ease-out forwards; }
@keyframes fgshard { 0% { opacity: 1; transform: translate(-50%,-50%) rotate(0) scale(1); } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scale(.4); } }
/* hearts rising as the letter lifts out */
.fg-rise-heart { position: absolute; bottom: 16px; z-index: 6; pointer-events: none; opacity: 0; animation: fgriseheart 2.4s ease-out forwards; }
@keyframes fgriseheart { 0% { opacity: 0; transform: translateY(0) scale(.6); } 15% { opacity: .9; } 100% { opacity: 0; transform: translateY(-170px) scale(1.1); } }
/* letter: 3D unfold as it rises + warm spotlight behind it */
.fg-letter { transform: translateY(38px) scale(.86) rotateX(-26deg); transform-origin: center bottom; }
.fg-letter.show { transform: translateY(0) scale(1) rotateX(0); }
.fg-letter.show::before { content: ''; position: absolute; inset: -30px -16px; z-index: -1; border-radius: 50%; background: radial-gradient(60% 60% at 50% 45%, color-mix(in srgb, var(--seal) 22%, #fff8ec) 0%, transparent 72%); animation: fgspotin .8s ease both; }
@keyframes fgspotin { from { opacity: 0; } to { opacity: 1; } }
/* ink caret while the handwriting types itself */
.fg-letter-msg.fg-typing::after { content: '|'; color: var(--seal); font-weight: 400; margin-left: 1px; animation: fgcaret .7s step-end infinite; }
@keyframes fgcaret { 50% { opacity: 0; } }
/* one-time sheen sweep across the finished letter */
.fg-letter-paper.shimmer { overflow: hidden; }
.fg-letter-paper.shimmer::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 32%, rgba(255,255,255,.5) 50%, transparent 68%); transform: translateX(-120%); animation: fgshimmer 1.1s ease .1s 1 forwards; }
@keyframes fgshimmer { to { transform: translateX(120%); } }

/* unified "tier badge": emoji in a white medallion + name in a premium gradient pill. Reused in reveal (lg) + leaderboard. */
.fg-tierbadge { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px 5px 5px; border-radius: 999px;
  background: var(--fg-grad); color: #fff; font-family: var(--fg-display); font-weight: 400; font-size: 13.5px; line-height: 1.1; white-space: nowrap;
  border: 2px solid rgba(255,255,255,.5); box-shadow: 0 6px 15px var(--fg-glow), inset 0 1.5px 0 rgba(255,255,255,.4); text-shadow: 0 1px 4px rgba(0,0,0,.22); }
.fg-tierbadge-e { display: inline-flex; align-items: center; justify-content: center; width: 23px; height: 23px; border-radius: 50%; flex: none;
  background: rgba(255,255,255,.95); font-size: 14px; line-height: 1; box-shadow: 0 2px 5px rgba(0,0,0,.16); }
/* big hero version on the reveal */
.fg-tierbadge-lg { gap: 13px; padding: 11px 28px 11px 11px; font-size: 32px; border-width: 3px; overflow: hidden;
  box-shadow: 0 16px 38px var(--fg-glow), inset 0 2px 0 rgba(255,255,255,.45); }
.fg-tierbadge-lg .fg-tierbadge-e { width: 58px; height: 58px; font-size: 36px; box-shadow: 0 3px 11px rgba(0,0,0,.2); animation: fgbob 3.2s ease-in-out infinite; }
/* one-time shimmer on reveal (not looping — a constant sweep looked off on the right edge) */
.fg-tierbadge-lg::after { content: ''; position: absolute; top: 0; left: -45%; width: 28%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent); transform: skewX(-18deg); animation: fgshine 1.2s ease-out .35s 1 both; }
/* small version inside leaderboard rows */
.fg-lb-tb { align-self: flex-start; margin-top: 5px; font-size: 12px; box-shadow: 0 4px 11px var(--fg-glow), inset 0 1px 0 rgba(255,255,255,.35); }
.fg-lb-tb .fg-tierbadge-e { width: 20px; height: 20px; font-size: 12.5px; }
.fg-rank-score { display: inline-block; font-weight: 800; font-size: 13px; letter-spacing: .02em; color: var(--fg-primary);
  background: var(--fg-soft); padding: 8px 18px; border-radius: 999px; margin: 18px 0 2px; box-shadow: inset 0 0 0 1.5px var(--fg-tintw); }
.fg-rank-score b { font-family: var(--fg-display); font-weight: 400; font-size: 17px; }
.fg-ladder { margin: 20px 0 2px; }
.fg-ladder-head { font-weight: 800; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-muted); text-align: center; margin-bottom: 11px; }
.fg-ladder-rows { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
/* compact "real badge" pills — wrap to ~2 rows on mobile instead of 4 full-width rows */
.fg-badge-pill { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px 6px 7px; border-radius: 999px;
  background: #f1edf9; font-weight: 700; font-size: 12.5px; color: var(--fg-ink); opacity: .5;
  box-shadow: inset 0 0 0 1.5px rgba(60,20,80,.06); transition: opacity .25s, transform .25s; }
.fg-badge-pill.me { opacity: 1; color: #fff; background: var(--fg-grad); transform: scale(1.08);
  box-shadow: 0 8px 20px var(--fg-glow), inset 0 1.5px 0 rgba(255,255,255,.4); }
.fg-badge-pill.me { font-family: var(--fg-display); font-weight: 400; }
.fg-badge-pill-e { font-size: 15px; line-height: 1; }
/* bond-ladder teaser on the play-welcome screen */
.fg-bondq { font-weight: 800; font-size: 13.5px; color: var(--fg-ink); margin: 18px 0 11px; }
.fg-bondprev .fg-badge-pill { opacity: .92; }
.fg-bondprev .fg-badge-pill.top { opacity: 1; color: #fff; background: var(--fg-grad); font-family: var(--fg-display); font-weight: 400; box-shadow: 0 6px 16px var(--fg-glow); }
.fg-note { margin-top: 18px; background: var(--fg-soft); border-radius: 18px; padding: 17px; text-align: left; border: 1.5px solid var(--fg-tintw); }
.fg-note .lk { font-weight: 800; font-size: 13px; color: var(--fg-primary); display: flex; gap: 6px; align-items: center; }
.fg-note p { margin: 8px 0 0; font-style: italic; color: #3a3450; line-height: 1.5; }

/* recipe-card reveal (Recipe; reused by Playlist) — kraft-paper aesthetic */
.fg-recipe { text-align: left; padding: 18px 16px; border-radius: 16px;
  background: #fbf3e4; background-image: radial-gradient(rgba(160,120,70,.06) 1px, transparent 1px); background-size: 14px 14px;
  border: 2px dashed #c79a6a; box-shadow: inset 0 0 0 2px #fff7ec, 0 6px 18px rgba(120,80,30,.12); }
.fg-rc-head { text-align: center; border-bottom: 2px dashed #d8b890; padding-bottom: 10px; margin-bottom: 14px; }
.fg-rc-emoji { font-size: 42px; line-height: 1; }
.fg-rc-title { font-family: 'Pacifico', cursive; font-size: 23px; color: var(--fg-primary); margin-top: 6px; line-height: 1.25; }
.fg-rc-rows { display: grid; gap: 10px; }
.fg-rc-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px;
  border-bottom: 1px dotted #dcc3a2; padding-bottom: 8px; }
.fg-rc-row:last-child { border-bottom: 0; padding-bottom: 0; }
.fg-rc-key { font-weight: 800; color: #9a6f44; white-space: nowrap; }
.fg-rc-val { font-weight: 600; color: var(--fg-ink); text-align: right; overflow-wrap: anywhere; min-width: 0; }
.fg-rc-warn { margin: 12px 0; padding: 11px 13px; background: #fff4d6; border: 1.5px solid #e8b84b; border-radius: 12px; }
.fg-rc-wtag { display: block; font-weight: 800; color: #b25a16; font-size: 12px; letter-spacing: .4px; text-transform: uppercase; }
.fg-rc-wval { display: block; font-family: 'Patrick Hand', cursive; font-size: 19px; color: var(--fg-ink); margin-top: 3px; }
.fg-rc-foot { margin-top: 14px; padding-top: 11px; border-top: 2px dashed #d8b890; text-align: center; font-weight: 700; color: #9a6f44; font-size: 13px; }
.fg-rc-scoreline { font-size: 15px; color: var(--fg-ink); }
.fg-rc-scoreline b { color: var(--fg-primary); }

/* cassette / album playlist card (Playlist) — same markup, dark "sleeve" skin with numbered tracks */
.fg-recipe.fg-cassette { background: #1b1031 linear-gradient(165deg, #2c1a52 0%, #1b1031 100%); background-size: auto;
  border: 2px solid var(--fg-primary); box-shadow: inset 0 0 0 2px rgba(124,58,237,.22), 0 14px 32px rgba(35,10,75,.45); color: #efeaff; }
.fg-cassette .fg-rc-head { border-bottom: 2px dashed rgba(255,255,255,.20); }
.fg-cassette .fg-rc-title { font-family: var(--fg-display); color: #fff; }
.fg-cassette .fg-rc-rows { counter-reset: trk; gap: 13px; }
/* two-line tracklist: [##] CATEGORY / vibe — wraps safely, never overflows */
.fg-cassette .fg-rc-row { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 2px; align-items: start;
  border-bottom: 1px solid rgba(255,255,255,.12); padding-bottom: 10px; }
.fg-cassette .fg-rc-row::before { counter-increment: trk; content: counter(trk, decimal-leading-zero);
  grid-column: 1; grid-row: 1 / span 2; align-self: center; font-family: var(--fg-display); font-size: 14px; color: var(--fg-accent); opacity: .95; }
.fg-cassette .fg-rc-key { grid-column: 2; grid-row: 1; color: #b9a6e8; font-weight: 700; font-size: 11px; letter-spacing: .5px; text-transform: uppercase; white-space: normal; }
.fg-cassette .fg-rc-val { grid-column: 2; grid-row: 2; color: #fff; font-weight: 700; font-size: 15px; text-align: left; min-width: 0; overflow-wrap: anywhere; }
.fg-cassette .fg-rc-foot { border-top: 2px dashed rgba(255,255,255,.20); color: var(--fg-accent); }

/* Best Friend Bingo card — mobile-first, language-safe (cells grow to fit text, never clip) */
.fg-bg-head { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-bottom: 8px; }
.fg-bg-head span { width: clamp(28px, 9vw, 40px); aspect-ratio: 1; margin: 0 auto; display: flex; align-items: center; justify-content: center;
  font-family: var(--fg-display); font-size: clamp(14px, 4.6vw, 20px); color: #fff; border-radius: 50%;
  background: var(--fg-primary); box-shadow: 0 5px 12px var(--fg-glow); }
.fg-bingo { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; padding: 7px; border-radius: 18px;
  background: linear-gradient(160deg, var(--fg-soft), #fff); box-shadow: inset 0 0 0 2px #fff, 0 10px 24px var(--fg-glow); }
.fg-bg-cell { position: relative; min-height: clamp(56px, 17.5vw, 78px); display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 6px 4px; border: 2px solid #f3dbe8; border-radius: 12px; background: #fff; color: var(--fg-ink);
  font-size: clamp(8.5px, 2.5vw, 11.5px); line-height: 1.17; font-weight: 600; font-family: inherit;
  overflow: hidden; cursor: default; overflow-wrap: anywhere; word-break: break-word; hyphens: auto; }
.fg-bg-cell .fg-bg-txt { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.fg-bg-cell.tappable { cursor: pointer; transition: transform .1s, border-color .12s, box-shadow .12s; }
.fg-bg-cell.tappable:hover { border-color: var(--fg-primary); box-shadow: 0 5px 13px var(--fg-glow); }
.fg-bg-cell.tappable:active { transform: scale(.94); }
.fg-bg-cell.custom { border-color: var(--fg-accent); border-style: dashed; }
.fg-bg-cell.inline { box-shadow: inset 0 0 0 3px var(--fg-accent); }
.fg-bg-cell.lit { animation: fglit .5s cubic-bezier(.2,.9,.3,1.4); z-index: 1; }
@keyframes fglit { 0%{ transform: scale(1); } 45%{ transform: scale(1.12); box-shadow: inset 0 0 0 3px var(--fg-accent), 0 0 16px var(--fg-accent); } 100%{ transform: scale(1); } }
.fg-bg-cell.marked { background: linear-gradient(155deg, var(--fg-primary), #c01f63); border-color: var(--fg-primary); color: #fff; }
.fg-bg-cell.marked .fg-bg-txt { opacity: .96; }              /* keep the statement readable when marked */
.fg-bg-stamp { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
  font-size: 11px; display: none; align-items: center; justify-content: center; box-shadow: 0 2px 5px rgba(0,0,0,.22); }
.fg-bg-cell.marked .fg-bg-stamp { display: flex; animation: pop .4s cubic-bezier(.2,.9,.3,1.4) both; }
.fg-bg-cell.free { flex-direction: column; gap: 3px; border-color: transparent; color: #6b4a00;
  background: linear-gradient(150deg, var(--fg-accent), #ffb84d); }
.fg-bg-free { font-size: 18px; line-height: 1; }
.fg-bg-cell.free .fg-bg-txt { -webkit-line-clamp: 4; font-size: clamp(7.5px, 2.2vw, 10px); font-weight: 800; color: #6b4a00; }
.fg-bg-lines { text-align: center; margin-top: 16px; font-weight: 800; color: var(--fg-primary); font-size: 14px; }
.fg-bg-lines b { font-size: 20px; }
.fg-bg-edit { margin-top: 14px; padding: 14px; background: var(--fg-soft); border-radius: 16px; }

/* Love Language Match — badges, the match pairing, the verdict (tag_tally) */
.fg-step-title { width: fit-content; max-width: 100%; margin: 0 auto 10px; padding: 6px 15px; border-radius: 99px; background: var(--fg-soft);
  font-family: var(--fg-display); font-size: 14px; color: var(--fg-primary); overflow-wrap: anywhere; }
.fg-badge { text-align: center; background: linear-gradient(160deg, var(--fg-soft), #fff); border: 2px solid var(--fg-tintw, var(--fg-soft)); border-radius: 20px; padding: 18px 16px; margin: 14px 0; }
.fg-badge-emoji { font-size: 48px; line-height: 1; }
.fg-badge-label { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--fg-muted); margin-top: 8px; }
.fg-badge-name { font-family: var(--fg-display); font-size: 22px; color: var(--fg-primary); margin-top: 2px; line-height: 1.15; }
.fg-badge-desc { font-size: 14px; color: #5a4a52; margin: 8px 0 0; line-height: 1.5; }
.fg-match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 8px; margin: 6px 0 14px; }
.fg-match-badge { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; background: var(--fg-soft); border-radius: 16px; padding: 14px 8px; }
.fg-match-badge .fg-badge-emoji { font-size: 38px; }
.fg-match-who { font-size: 12px; font-weight: 800; color: var(--fg-muted); margin-top: 5px; overflow-wrap: anywhere; }
.fg-match-badge .fg-badge-name { font-size: 14.5px; margin-top: 3px; line-height: 1.2; }
.fg-match-plus { align-self: center; font-family: var(--fg-display); font-size: 22px; color: var(--fg-primary); }
.fg-combo { background: linear-gradient(150deg, var(--fg-soft), #fff); border: 2px dashed var(--fg-primary); border-radius: 16px; padding: 16px; text-align: center; }
.fg-combo p { margin: 0; font-size: 15px; font-weight: 600; color: var(--fg-ink); line-height: 1.5; }

/* Guess What I Love — self-check chips, value chips, animated superpower card (tag_match) */
.fg-chips { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-top: 16px; }
.fg-chip { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; border: 2px solid #f0dbe8; border-radius: 99px;
  background: #fff; color: var(--fg-ink); font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  min-height: 44px; max-width: 100%; text-align: left; overflow-wrap: anywhere;
  transition: transform .12s cubic-bezier(.2,.9,.3,1.4), border-color .14s, background .14s, box-shadow .14s; }
.fg-chip .fg-chip-e { font-size: 18px; line-height: 1; flex: none; }
.fg-chip:hover { border-color: var(--fg-primary); }
.fg-chip:active { transform: scale(.95); }
.fg-chip.on { background: var(--fg-primary); border-color: var(--fg-primary); color: #fff; transform: scale(1.04); box-shadow: 0 8px 18px var(--fg-glow); }
.fg-chip.on::after { content: '✓'; font-weight: 900; margin-left: 1px; }
.fg-chips.shake { animation: fgshake .4s; }
@keyframes fgshake { 0%,100%{transform:translateX(0)} 20%,60%{transform:translateX(-7px)} 40%,80%{transform:translateX(7px)} }
.fg-shake { animation: fgshake .4s; }
/* self-check live count + ready-state CTA */
.fg-sc-count { margin-top: 12px; font-size: 13.5px; font-weight: 700; color: var(--fg-muted); min-height: 18px; transition: color .2s; }
.fg-btn.ready { animation: fgpulse 1.5s ease-in-out 2; }
@keyframes fgpulse { 0%,100%{ transform: scale(1); } 50%{ transform: scale(1.035); } }
.fg-vchips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.fg-vchip { display: inline-flex; align-items: center; gap: 5px; padding: 8px 13px; border-radius: 99px; background: var(--fg-primary); color: #fff; font-weight: 800; font-size: 14px; }

.fg-super { position: relative; overflow: hidden; text-align: center; margin: 12px 0; padding: 24px 18px; border-radius: 22px;
  background: linear-gradient(160deg, var(--fg-soft), #fff); border: 2px solid var(--fg-tintw, var(--fg-soft));
  box-shadow: 0 14px 34px var(--fg-glow); animation: fgIn .5s cubic-bezier(.2,.9,.3,1.15) both; }
.fg-super::before { content: ''; position: absolute; top: -40%; left: -30%; width: 70%; height: 180%; transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); animation: fgshine 2.6s ease-in-out .5s infinite; }
@keyframes fgshine { 0%{ left: -40%; } 55%,100%{ left: 130%; } }
.fg-super-lead { font-family: var(--fg-display); font-size: 18px; color: var(--fg-ink); margin-bottom: 4px; line-height: 1.25; }
.fg-super-label { position: relative; font-size: 12.5px; font-weight: 800; color: var(--fg-primary); line-height: 1.3; }
.fg-super-emoji { position: relative; font-size: 64px; line-height: 1; margin: 8px 0 2px; }
.fg-super-name { position: relative; font-family: var(--fg-display); font-size: 26px; color: var(--fg-primary); line-height: 1.15; overflow-wrap: anywhere; }
.fg-super-line { position: relative; font-size: 15.5px; color: #4b3640; line-height: 1.55; margin: 10px 0 0; font-weight: 500; }
.fg-super.fallback .fg-super-line { font-style: italic; }

/* Leaderboard card heading (player-side reveal) */
.fg-lb-head { font-family: var(--fg-display); font-size: 19px; color: var(--fg-primary); text-align: center; margin-bottom: 8px; line-height: 1.25; }
.fg-lb-dots { text-align: center; color: var(--fg-muted); font-weight: 900; letter-spacing: 2px; padding: 2px 0; }

/* Leaderboard (results page) */
.fg-lb-banner { margin: 12px 0 4px; padding: 11px 16px; border-radius: 99px; font-weight: 800; font-size: 14.5px;
  color: #fff; background: var(--fg-primary); background: linear-gradient(120deg, var(--fg-primary), color-mix(in srgb, var(--fg-primary) 55%, var(--fg-accent)));
  box-shadow: 0 8px 20px var(--fg-glow); }
.fg-lb-champ { position: relative; overflow: hidden; text-align: center; margin: 16px 0 12px; padding: 22px 18px 20px; border-radius: 22px;
  background: linear-gradient(160deg, #fff6d8, #ffe9a8); border: 2px solid #f4c94e; box-shadow: 0 16px 36px rgba(190,140,20,.28); }
.fg-lb-champ::before { content: ''; position: absolute; top: -40%; left: -30%; width: 60%; height: 180%; transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent); animation: fgshine 3s ease-in-out .4s infinite; }
.fg-lb-crown { position: relative; font-size: 40px; line-height: 1; animation: fgbob 3s ease-in-out infinite; }
.fg-lb-champ-name { position: relative; font-family: var(--fg-display); font-size: 22px; color: #7a5600; margin-top: 4px; overflow-wrap: anywhere; }
.fg-lb-champ-result { position: relative; font-weight: 800; font-size: 14.5px; color: #936a0a; margin-top: 5px; overflow-wrap: anywhere; }
.fg-lb-champ-metric { position: relative; display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; padding: 7px 16px; border-radius: 99px;
  background: #fff; color: #7a5600; font-weight: 900; font-size: 18px; box-shadow: 0 4px 12px rgba(190,140,20,.25); }
.fg-lb-champ-sub { position: relative; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: #936a0a; margin-top: 8px; }
.fg-lb-champ.fg-lb-tint .fg-lb-champ-metric { color: var(--rowc); }
.fg-lb-list { display: grid; gap: 10px; }
.fg-lb-row { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; background: #fff; border-radius: 16px;
  padding: 11px 14px; box-shadow: 0 6px 16px rgba(120,20,50,.08); border: 2px solid transparent; }
.fg-lb-rank { font-weight: 900; font-size: 17px; color: var(--fg-muted); text-align: center; }
.fg-lb-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fg-lb-name { font-weight: 800; overflow-wrap: anywhere; display: flex; align-items: center; gap: 7px; line-height: 1.2; }
.fg-lb-result { font-size: 12px; font-weight: 700; color: var(--fg-muted); display: flex; align-items: center; gap: 5px; overflow-wrap: anywhere; line-height: 1.25; }
.fg-lb-metricwrap { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.fg-lb-metric { flex: none; display: inline-flex; align-items: center; gap: 5px; font-weight: 800; color: var(--fg-primary); font-size: 15px;
  background: var(--fg-soft); padding: 6px 11px; border-radius: 99px; white-space: nowrap; }
.fg-lb-sub { font-size: 10px; font-weight: 800; letter-spacing: .2px; color: var(--fg-muted); white-space: nowrap; text-transform: uppercase; }
/* DNA matches: tint each friend's % badge + result by their friendship-DNA type colour */
.fg-lb-tint .fg-lb-metric { background: var(--fg-soft); color: var(--rowc); }
.fg-lb-tint .fg-lb-metric { background: color-mix(in srgb, var(--rowc) 15%, #fff); }
.fg-lb-tint .fg-lb-result, .fg-lb-tint .fg-lb-sub { color: var(--rowc); }
.fg-lb-champ.me, .fg-lb-row.me { border-color: var(--fg-primary); box-shadow: 0 0 0 3px var(--fg-glow), 0 8px 20px var(--fg-glow); }
.fg-lb-youtag { display: inline-block; background: var(--fg-primary); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; vertical-align: middle; }
.fg-lb-champ-name .fg-lb-youtag { background: #7a5600; }

/* ── DNA match leaderboard: a "creator ⟷ friend" pairing card per row ──
   Text is always dark ink on white/light tints (AA-safe); the friend's DNA-type
   colour is used only as accent fills (avatar ring, %, level chip) where we control
   the background, so light type colours (lime, cyan) never become unreadable text. */
.fg-lb-pairs { display: grid; gap: 12px; margin-top: 6px; }
.fg-lb-prow { position: relative; overflow: hidden; --rowd: color-mix(in srgb, var(--rowc, #7c6af7) 45%, #1b1024);
  background: #fff; border-radius: 18px; padding: 12px 14px 14px; border: 2px solid transparent;
  box-shadow: 0 8px 20px rgba(120,20,50,.09); }
.fg-lb-prow::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 5px; background: var(--rowc, #7c6af7); }
.fg-lb-prow.me { border-color: var(--fg-primary); box-shadow: 0 0 0 3px var(--fg-glow), 0 10px 22px var(--fg-glow); }
.fg-lb-prow.top { background: linear-gradient(160deg, #fff8e6, #fff0cb); border-color: #f4c94e; box-shadow: 0 14px 32px rgba(190,140,20,.22); }
.fg-lb-prow.top::before { background: linear-gradient(#f6cf5a, #efb228); }
.fg-lb-ptop { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 11px 4px; }
.fg-lb-prank { font-weight: 900; font-size: 13px; color: var(--fg-muted); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.fg-lb-prow.top .fg-lb-prank { color: #9a6a00; }
.fg-lb-level { font-size: 11px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; white-space: nowrap;
  color: var(--rowd); background: color-mix(in srgb, var(--rowc, #7c6af7) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--rowc, #7c6af7) 30%, #fff); padding: 4px 10px; border-radius: 99px; }
.fg-lb-people { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 6px; }
.fg-lb-person { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; text-align: center; }
.fg-lb-av { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--fg-display); font-size: 21px; font-weight: 400; line-height: 1; flex: none; }
.fg-lb-av.creator { background: var(--fg-soft); color: var(--fg-primary); border: 2px solid color-mix(in srgb, var(--fg-primary) 34%, #fff); }
.fg-lb-av.friend { background: color-mix(in srgb, var(--rowc, #7c6af7) 18%, #fff); color: var(--rowd); border: 2px solid var(--rowc, #7c6af7); }
.fg-lb-pn { font-weight: 800; font-size: 13.5px; color: var(--fg-ink); line-height: 1.18; overflow-wrap: anywhere; }
.fg-lb-prole { font-size: 10px; font-weight: 700; color: var(--fg-muted); line-height: 1.2; overflow-wrap: anywhere; }
.fg-lb-person.b .fg-lb-prole { color: var(--rowd); }
.fg-lb-link { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 2px 0; }
.fg-lb-strand { font-size: 16px; line-height: 1; }
.fg-lb-pct { font-family: var(--fg-display); font-weight: 400; font-size: 24px; line-height: 1; color: var(--rowd); }
.fg-lb-prow.top .fg-lb-pct { color: #b67a00; }
.fg-lb-pdot { display: none; } /* the vertical ··· hint is replaced by the horizontal "link juice" connector */
/* "link juice": energy flowing creator → 🧬/score → friend, crossing the match % */
.fg-lb-people { position: relative; }
.fg-lb-person, .fg-lb-link { position: relative; z-index: 1; }
.fg-lb-link { padding-top: 0; justify-content: center; }
.fg-lb-pct { position: relative; z-index: 1; animation: fglbscore 1.8s ease-in-out infinite; }
/* uses the row's DARK derived colour (--rowd, per-row) so it stays visible on the white leaderboard
   cards. Two sparks fly INWARD from both friends and LAND beside the score, which sits in a gap in the
   line (digits never look struck-through) and pulses on impact. Compositor-only; clipped by .fg-lb-prow. */
.fg-lb-juice { position: absolute; top: 28px; left: 22%; right: 22%; height: 2.5px; transform: translateY(-50%);
  z-index: 0; border-radius: 99px; pointer-events: none;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--rowd, #5b4bd0) 82%, transparent) 0, color-mix(in srgb, var(--rowd, #5b4bd0) 30%, transparent) 28%,
    transparent 34%, transparent 66%,
    color-mix(in srgb, var(--rowd, #5b4bd0) 30%, transparent) 72%, color-mix(in srgb, var(--rowd, #5b4bd0) 82%, transparent) 100%);
  opacity: .9; }
/* a continuous STREAM of glowing chevrons flows inward from both friends (►►► … ◄◄◄), each dissolving
   as it reaches the match %, which breathes/glows while it keeps receiving energy. 3 staggered per side. */
.fg-lb-juice i { position: absolute; top: 50%; width: 0; height: 0; transform: translateY(-50%); color: var(--rowd, #5b4bd0);
  border-top: 4px solid transparent; border-bottom: 4px solid transparent; filter: drop-shadow(0 0 3px currentColor); }
.fg-lb-juice i:nth-child(-n+3) { border-left: 8px solid var(--rowd, #5b4bd0); animation: fglbstreamL 1.8s linear infinite; }   /* left ► */
.fg-lb-juice i:nth-child(n+4)  { border-right: 8px solid var(--rowd, #5b4bd0); animation: fglbstreamR 1.8s linear infinite; }  /* right ◄ */
.fg-lb-juice i:nth-child(2), .fg-lb-juice i:nth-child(5) { animation-delay: -0.6s; }  /* evenly stagger the 3 per side */
.fg-lb-juice i:nth-child(3), .fg-lb-juice i:nth-child(6) { animation-delay: -1.2s; }
/* soft halo behind the score, breathing as the stream feeds it */
.fg-lb-juice::after { content: ''; position: absolute; top: 50%; left: 50%; width: 46px; height: 22px; transform: translate(-50%, -50%);
  border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--rowd, #5b4bd0) 50%, transparent) 0, transparent 72%);
  animation: fglbglow 1.8s ease-in-out infinite; }
/* stay bright until ~90% so the chevrons reach RIGHT up to the score before dissolving (no dim gap) */
@keyframes fglbstreamL { 0% { left: 1%; opacity: 0; } 15% { opacity: 1; } 90% { opacity: 1; } 100% { left: 33%; opacity: 0; } }
@keyframes fglbstreamR { 0% { left: 97%; opacity: 0; } 15% { opacity: 1; } 90% { opacity: 1; } 100% { left: 63%; opacity: 0; } }
@keyframes fglbscore { 0%, 100% { transform: scale(1); text-shadow: 0 0 5px color-mix(in srgb, var(--rowd, #5b4bd0) 30%, transparent); } 50% { transform: scale(1.07); text-shadow: 0 0 13px color-mix(in srgb, var(--rowd, #5b4bd0) 55%, transparent); } }
@keyframes fglbglow { 0%, 100% { opacity: .3; transform: translate(-50%, -50%) scale(.8); } 50% { opacity: .62; transform: translate(-50%, -50%) scale(1.08); } }

/* hub / results list */
.fg-list { display: grid; gap: 15px; }
/* Cinematic game cards — each in its own colour, app-icon emoji badge, depth + glow + watermark. */
.fg-tile { position: relative; display: flex; align-items: center; gap: 15px; border-radius: 22px; padding: 18px; text-decoration: none; overflow: hidden; isolation: isolate;
  background: linear-gradient(140deg, color-mix(in srgb, var(--tile, var(--fg-primary)) 86%, #fff) 0%, var(--tile, var(--fg-primary)) 52%, color-mix(in srgb, var(--tile, var(--fg-primary)) 66%, #1a0820) 100%);
  color: #fff; box-shadow: 0 14px 30px color-mix(in srgb, var(--tile, var(--fg-primary)) 40%, transparent), inset 0 1px 0 rgba(255,255,255,.28);
  transition: transform .16s cubic-bezier(.2,.9,.3,1.2), box-shadow .16s; }
/* glossy top sheen */
.fg-tile::before { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 44%); }
/* big faded emoji watermark in the corner — game-card flair */
.fg-tile-bg { position: absolute; z-index: 0; right: -16px; bottom: -28px; font-size: 108px; line-height: 1; opacity: .16; transform: rotate(-12deg); pointer-events: none; filter: drop-shadow(0 2px 6px rgba(0,0,0,.18)); }
.fg-tile, .fg-tile:hover, .fg-tile:focus { color: #fff; }
.fg-tile:hover { transform: translateY(-4px) scale(1.013); box-shadow: 0 24px 46px color-mix(in srgb, var(--tile, var(--fg-primary)) 50%, transparent), inset 0 1px 0 rgba(255,255,255,.28); }
.fg-tile:active { transform: translateY(-1px) scale(.997); }
/* app-icon style rounded-square emoji badge */
.fg-tile .e { position: relative; z-index: 1; flex: none; width: 60px; height: 60px; border-radius: 18px;
  background: rgba(255,255,255,.22); border: 1.5px solid rgba(255,255,255,.45);
  display: grid; place-items: center; font-size: 33px; box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 6px 15px rgba(0,0,0,.16); }
/* multi-emoji icons (e.g. 💌🔒) — shrink + tuck together so the pair sits centred in the badge */
.fg-tile-multi .e { font-size: 25px; letter-spacing: -3px; line-height: 1; white-space: nowrap; }
.fg-tile-multi .e { text-indent: -2px; }                 /* offset the negative letter-spacing for true centring */
.fg-tile-multi .fg-tile-bg { font-size: 80px; letter-spacing: -16px; }
.fg-tile > div { position: relative; z-index: 1; flex: 1; min-width: 0; }
.fg-tile h3 { margin: 0 0 3px; font-family: var(--fg-display); font-weight: 400; font-size: 19.5px; line-height: 1.14; color: #fff !important; text-shadow: 0 1px 6px rgba(0,0,0,.30); }
.fg-tile p { margin: 0; font-size: 12.5px; color: rgba(255,255,255,.94) !important; line-height: 1.34; text-shadow: 0 1px 3px rgba(0,0,0,.18);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fg-tile-go { position: relative; z-index: 1; flex: none; width: 36px; height: 36px; display: grid; place-items: center; margin-left: 4px;
  font-size: 21px; font-weight: 800; color: #fff; background: rgba(255,255,255,.2); border: 1.5px solid rgba(255,255,255,.4); border-radius: 50%; box-shadow: 0 4px 10px rgba(0,0,0,.14); }
/* banner tile (theme.banner, e.g. the Delulu Test): the game's own share image fills the card at its 1200×630 shape — it
   already carries the logo, art and headline, so no badge/text overlay; name + tagline are the image's alt text */
.fg-tile-banner { display: block; padding: 0; aspect-ratio: 1200 / 630; background: var(--tilesoft, var(--fg-soft)); }
.fg-tile-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fg-hub-foot { text-align: center; color: var(--fg-muted); font-weight: 700; font-size: 13px; margin: 18px 0 4px; }

/* stepper: top bar with back + progress hearts */
.fg-qbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.fg-back { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 2px solid #f1ebf0; background: #fff; color: var(--fg-primary);
  font-size: 20px; font-weight: 900; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .12s, border-color .12s; }
.fg-back:hover { border-color: var(--fg-primary); }
.fg-back:active { transform: scale(.9); }
.fg-back[hidden] { visibility: hidden; }
.fg-hearts-row { flex: 1; display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; }
.fg-hdot { font-size: 13px; line-height: 1; opacity: .28; transition: opacity .2s, transform .2s; filter: grayscale(1); }
.fg-hdot.on { opacity: 1; filter: none; transform: scale(1.12); }
.fg-hdot.cur { opacity: 1; filter: none; animation: fgbeat 1s ease-in-out infinite; }
@keyframes fgbeat { 0%,100%{ transform: scale(1); } 50%{ transform: scale(1.3); } }

/* slide transitions between steps */
@keyframes fgSlideR { from { opacity: 0; transform: translateX(34px); } to { opacity: 1; transform: none; } }
@keyframes fgSlideL { from { opacity: 0; transform: translateX(-34px); } to { opacity: 1; transform: none; } }
.fg-slide-r { animation: fgSlideR .32s cubic-bezier(.2,.9,.3,1.1) both; }
.fg-slide-l { animation: fgSlideL .32s cubic-bezier(.2,.9,.3,1.1) both; }

/* reveal build-up ("measuring your friendship…") */
.fg-build { text-align: center; padding: 26px 8px; }
.fg-build-emoji { font-size: 60px; animation: fgbeat 1s ease-in-out infinite; }
.fg-build-txt { margin-top: 14px; font-family: var(--fg-display); font-weight: 400; font-size: 20px; color: var(--fg-primary); }
.fg-build-dots span { display: inline-block; width: 9px; height: 9px; margin: 12px 3px 0; border-radius: 50%; background: var(--fg-primary); opacity: .3; animation: fgdot 1.2s infinite; }
.fg-build-dots span:nth-child(2){ animation-delay: .2s; } .fg-build-dots span:nth-child(3){ animation-delay: .4s; }
@keyframes fgdot { 0%,100%{ opacity: .3; transform: translateY(0); } 50%{ opacity: 1; transform: translateY(-5px); } }

/* anim */
@keyframes fgIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.fg-anim { animation: fgIn .4s cubic-bezier(.2,.9,.3,1.15) both; }
@keyframes pop { 0%{transform:scale(.5);opacity:0} 60%{transform:scale(1.12)} 100%{transform:scale(1);opacity:1} }
.fg-pop { animation: pop .55s cubic-bezier(.2,.9,.3,1.3) both; }
.fg-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; }

@media (max-width: 380px) {
  .fg-title { font-size: 24px; } .fg-q { font-size: 19px; } .fg-meter { width: 180px; height: 180px; } .fg-emoji { font-size: 54px; }
  .fg-shell { padding: 0 12px; } .fg-card { padding: 24px 18px; }
  .fg-bingo { gap: 4px; padding: 5px; } .fg-bg-head { gap: 4px; } .fg-bg-cell { padding: 5px 3px; border-radius: 10px; }
}

/* ── Friendship DNA Test — Lab Report card (mechanic: self_score) ─────────────
   Dark "official document" look. Monospace (system stack — script-safe) is used ONLY for codes/IDs/
   numbers, which are always Latin; names + type + descriptions inherit the normal Unicode body font so
   every language renders. */
.fg-dna-mono, .fg-dna-id, .fg-dna-date, .fg-dna-bp, .fg-dna-code, .fg-dna-cl, .fg-dna-lab {
  font-family: ui-monospace, 'SFMono-Regular', 'Roboto Mono', 'Cascadia Code', Menlo, Consolas, monospace;
}
.fg-dna-card { position: relative; overflow: hidden; text-align: left; background: #15122a; color: #e9e7f7;
  border: 1px solid rgba(255,255,255,.10); border-radius: 20px; padding: 26px 20px 18px;
  box-shadow: 0 26px 60px rgba(10,6,30,.5); }
.fg-dna-stripe { position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, #b8f550, #50d8f5, #7c6af7, #f550a0, #f5a623); }
.fg-dna-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.fg-dna-lab { font-size: 9.5px; letter-spacing: 1.2px; color: #8e88b8; line-height: 1.5; }
.fg-dna-id { font-size: 13px; font-weight: 700; color: var(--acc); margin-top: 3px; }
.fg-dna-date { font-size: 11px; color: #8e88b8; white-space: nowrap; }
.fg-dna-nl { font-size: 10px; letter-spacing: 2px; color: #8e88b8; margin: 16px 0 2px; }
.fg-dna-name { font-family: var(--fg-display); font-weight: 400; font-size: 30px; line-height: 1.1; color: #fff; overflow-wrap: anywhere; }
.fg-dna-pill { display: inline-block; margin: 12px 0 8px; padding: 5px 12px; border-radius: 99px;
  font-size: 11px; font-weight: 800; letter-spacing: .5px; color: #15122a; }
.fg-dna-tn { font-family: var(--fg-display); font-weight: 400; font-size: 21px; color: #fff; line-height: 1.15; }
.fg-dna-desc { font-size: 13.5px; line-height: 1.6; color: #cfc9ec; margin: 8px 0 4px; }
.fg-dna-sec { font-size: 10px; letter-spacing: 2px; color: #8e88b8; margin: 18px 0 8px; }
.fg-dna-bars { display: flex; flex-direction: column; gap: 7px; }
.fg-dna-bar { display: grid; grid-template-columns: 88px 1fr 40px; align-items: center; gap: 8px; }
.fg-dna-bn { font-size: 12px; color: #d7d2f0; }
.fg-dna-bt { height: 9px; border-radius: 6px; background: rgba(255,255,255,.09); overflow: hidden; }
.fg-dna-bf { display: block; height: 100%; width: 0; border-radius: 6px; transition: width .7s cubic-bezier(.2,.9,.3,1); }
.fg-dna-bp { font-size: 12px; text-align: right; font-weight: 700; }
.fg-dna-cw { margin: 18px 0 6px; padding: 13px 0; text-align: center;
  border-top: 1px dashed rgba(255,255,255,.14); border-bottom: 1px dashed rgba(255,255,255,.14); }
.fg-dna-cl { font-size: 9.5px; letter-spacing: 2px; color: #8e88b8; margin-bottom: 7px; }
.fg-dna-code { font-size: 26px; font-weight: 700; letter-spacing: 2px; }
.fg-dna-dot { color: #6c6790; margin: 0 7px; }
.fg-dna-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.fg-dna-stamp { display: inline-flex; align-items: center; padding: 7px 12px; border: 1.5px solid var(--acc);
  color: var(--acc); border-radius: 99px; font-size: 10px; font-weight: 800; letter-spacing: 1px; transform: rotate(-5deg); }
.fg-dna-brand { font-size: 11px; color: #8e88b8; }
/* the share section sits in its own white card below the dark report → readable, and visually
   separates "your result" from "now go compare with friends". */
.fg-dna-screen { text-align: center; }
.fg-dna-share { margin-top: 14px; }
.fg-dna-share-h { font-family: var(--fg-display); font-weight: 400; font-size: 22px; color: var(--fg-primary); margin: 6px 0; line-height: 1.15; }
.fg-dna-share-sub { font-size: 14.5px; line-height: 1.55; color: #5a4a52; margin: 0 0 16px; }
/* loading lab screen */
.fg-dna-sub { font-size: 13.5px; color: var(--fg-muted); margin-top: 4px; }
.fg-dna-lines { margin-top: 16px; text-align: left; display: inline-block; }
.fg-dna-line { font-size: 13px; color: var(--fg-ink); opacity: 0; transform: translateX(-6px);
  transition: opacity .35s, transform .35s; margin: 5px 0; font-weight: 600; }
.fg-dna-line.on { opacity: 1; transform: none; }
/* ── Player-side DNA MATCH hero card — built to be screenshotted to WA / IG Stories.
   Dark gradient + bright ring; the two friends' type colours feed the match ring and
   their avatars, so the card feels personalised. All text is light-on-dark (AA-safe). */
@property --fgp { syntax: '<number>'; inherits: false; initial-value: 0; }
.fg-dna-mx { position: relative; overflow: hidden; text-align: center; color: #fff; margin-top: 14px;
  background: radial-gradient(125% 95% at 50% -8%, #3c2774 0%, #241b4c 52%, #181233 100%);
  border: 1px solid rgba(255,255,255,.12); border-radius: 22px; padding: 22px 20px 18px;
  box-shadow: 0 26px 60px rgba(10,6,30,.5); }
.fg-dna-mx::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(58% 38% at 50% 16%, color-mix(in srgb, var(--acc, #7c6af7) 42%, transparent), transparent 72%); }
.fg-dna-mx > * { position: relative; }
.fg-dna-mx-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: 1.6px;
  color: #ece6ff; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18); padding: 6px 13px; border-radius: 99px; }
.fg-dna-mx-ring { position: relative; width: 152px; height: 152px; margin: 16px auto 2px; border-radius: 50%;
  background: conic-gradient(from -90deg, var(--c1, #7c6af7) 0, var(--c2, #f550a0) calc(var(--fgp, 0) * 1%), rgba(255,255,255,.10) 0);
  display: flex; align-items: center; justify-content: center; transition: --fgp 1s cubic-bezier(.2,.9,.3,1);
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--acc, #7c6af7) 50%, transparent)); }
.fg-dna-mx-ring::after { content: ''; position: absolute; inset: 12px; border-radius: 50%; background: #1c1540; box-shadow: inset 0 2px 12px rgba(0,0,0,.45); }
.fg-dna-mx-pct { position: relative; z-index: 1; font-family: var(--fg-display); font-weight: 400; font-size: 52px; line-height: 1; color: #fff; }
.fg-dna-mx-pct small { font-size: 22px; opacity: .82; }
.fg-dna-mx-level { font-family: var(--fg-display); font-weight: 400; font-size: 26px; color: #fff; margin-top: 8px; line-height: 1.1; }
.fg-dna-mx-people { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 8px; margin: 16px 0 2px; }
.fg-dna-mx-person { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.fg-dna-mx-av { width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--fg-display); font-weight: 400; font-size: 24px; color: #fff; border: 2px solid; line-height: 1; }
.fg-dna-mx-person.a .fg-dna-mx-av { background: color-mix(in srgb, var(--c1, #7c6af7) 34%, #1a1230); border-color: var(--c1, #7c6af7); }
.fg-dna-mx-person.b .fg-dna-mx-av { background: color-mix(in srgb, var(--c2, #f550a0) 34%, #1a1230); border-color: var(--c2, #f550a0); }
.fg-dna-mx-nm { font-weight: 800; font-size: 14px; color: #fff; line-height: 1.15; overflow-wrap: anywhere; }
.fg-dna-mx-ty { font-size: 10.5px; color: #c8c0ec; line-height: 1.3; overflow-wrap: anywhere; }
.fg-dna-mx-heart { align-self: start; font-size: 25px; margin-top: 8px; padding-top: 0; animation: fgmxbeat 1.4s ease-in-out infinite; }
/* "link juice": a continuous STREAM of chevrons (each themed to its own person — c1 ►►► … ◄◄◄ c2) flows
   inward from both avatars and dissolves on the 💞, which beats + glows as it keeps receiving the love.
   3 staggered per side. The line has a transparent centre so nothing reads as crossing the heart. */
.fg-dna-mx-people { position: relative; }
.fg-dna-mx-person, .fg-dna-mx-heart { position: relative; z-index: 1; }
.fg-dna-mx-juice { position: absolute; top: 27px; left: 25%; right: 25%; height: 3px; transform: translateY(-50%);
  z-index: 0; border-radius: 99px; pointer-events: none;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--c1, #7c6af7) 70%, transparent) 0, color-mix(in srgb, var(--c1, #7c6af7) 24%, transparent) 40%,
    transparent 46%, transparent 54%,
    color-mix(in srgb, var(--c2, #f550a0) 24%, transparent) 60%, color-mix(in srgb, var(--c2, #f550a0) 70%, transparent) 100%);
  opacity: .4; }
.fg-dna-mx-juice i { position: absolute; top: 50%; width: 0; height: 0; transform: translateY(-50%);
  border-top: 6px solid transparent; border-bottom: 6px solid transparent; filter: drop-shadow(0 0 5px currentColor); }
.fg-dna-mx-juice i:nth-child(-n+3) { color: var(--c1, #7c6af7); border-left: 11px solid var(--c1, #7c6af7);   /* ► creator side */
  animation: fgmxstreamL 1.8s linear infinite; }
.fg-dna-mx-juice i:nth-child(n+4)  { color: var(--c2, #f550a0); border-right: 11px solid var(--c2, #f550a0);  /* ◄ friend side */
  animation: fgmxstreamR 1.8s linear infinite; }
.fg-dna-mx-juice i:nth-child(2), .fg-dna-mx-juice i:nth-child(5) { animation-delay: -0.6s; }  /* evenly stagger 3 per side */
.fg-dna-mx-juice i:nth-child(3), .fg-dna-mx-juice i:nth-child(6) { animation-delay: -1.2s; }
.fg-dna-mx-juice::after { content: ''; position: absolute; top: 50%; left: 50%; width: 30px; height: 30px; transform: translate(-50%, -50%);
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--acc, #f550a0) 70%, #fff) 0, color-mix(in srgb, var(--acc, #f550a0) 55%, transparent) 45%, transparent 72%);
  animation: fgmxglow 1.4s ease-in-out infinite; }
@keyframes fgmxstreamL { 0% { left: 1%; opacity: 0; } 18% { opacity: 1; } 74% { opacity: 1; } 100% { left: 43%; opacity: 0; } }
@keyframes fgmxstreamR { 0% { left: 97%; opacity: 0; } 18% { opacity: 1; } 74% { opacity: 1; } 100% { left: 55%; opacity: 0; } }
@keyframes fgmxglow { 0%, 100% { opacity: .25; transform: translate(-50%, -50%) scale(.8); } 50% { opacity: .55; transform: translate(-50%, -50%) scale(1.15); } }
@keyframes fgmxbeat { 0%, 32%, 100% { transform: scale(1); } 12% { transform: scale(1.18); } 22% { transform: scale(1.05); } }
.fg-dna-mx-line { font-size: 14.5px; line-height: 1.6; color: #ddd7f6; margin: 13px 6px 0; font-style: italic; }
.fg-dna-mx-brand { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.10);
  font-size: 11px; font-weight: 800; letter-spacing: .6px; color: #a79edb; }
/* ── Welcome hero: "DNA → friendship" — 🧬 sends a colour-flowing strand into 💞 ── */
.fg-dna-hero { display: flex; align-items: center; justify-content: center; gap: 11px; margin: 6px 0 4px; }
.fg-dna-hero-e { font-size: 50px; line-height: 1; }
.fg-dna-hero-e.dna { animation: fgsway 3.6s ease-in-out infinite; }
.fg-dna-hero-e.heart { animation: fgbeat 1.5s ease-in-out infinite; }
.fg-dna-hero-link { display: inline-flex; align-items: center; gap: 7px; }
.fg-dna-hero-link i { width: 9px; height: 9px; border-radius: 50%; display: block; opacity: .28; animation: fgflow 1.5s ease-in-out infinite; }
.fg-dna-hero-link i:nth-child(1) { background: #b8f550; }                          /* DNA lime */
.fg-dna-hero-link i:nth-child(2) { background: #7c6af7; animation-delay: .25s; }   /* → bond purple */
.fg-dna-hero-link i:nth-child(3) { background: #f550a0; animation-delay: .5s; }    /* → friendship pink */
@keyframes fgflow { 0%, 100% { opacity: .28; transform: scale(.78); } 50% { opacity: 1; transform: scale(1.3); } }
@keyframes fgspin { to { transform: rotate(360deg); } }
@keyframes fgbeat { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.2); } 28% { transform: scale(1); } 42% { transform: scale(1.12); } 56% { transform: scale(1); } }
@keyframes fgsway { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }
@media (prefers-reduced-motion: reduce) { .fg-dna-hero-e, .fg-dna-hero-link i { animation: none; } .fg-dna-hero-link i { opacity: .85; } }

/* player's "Do I match {name}?" mission pill — the hook */
.fg-dna-hook { display: inline-block; margin: 12px auto 2px; padding: 10px 20px; border-radius: 99px;
  font-family: var(--fg-display); font-weight: 400; font-size: 21px; line-height: 1.2; color: #fff;
  background: linear-gradient(120deg, var(--fg-primary), #f550a0); box-shadow: 0 12px 26px var(--fg-glow); }

/* heading above the player's own report (it sits BELOW the match card, directly on the page
   gradient — so it's a translucent pill, readable on both the light-top and deep-purple-bottom). */
.fg-dna-yours-wrap { text-align: center; }
.fg-dna-yours-h { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
  color: var(--fg-primary); background: rgba(255,255,255,.92); padding: 7px 15px; border-radius: 99px;
  margin: 0 auto 10px; box-shadow: 0 6px 16px rgba(60,10,40,.16); }

/* Accessibility: honor reduced-motion — kill looping/decorative motion, keep transitions near-instant */
@media (prefers-reduced-motion: reduce) {
  .fg-emoji, .fg-build-emoji, .fg-hdot.cur, .fg-build-dots span, .fg-tile, .fg-super::before, .fg-lb-champ::before, .fg-lb-crown,
  .fg-rank-hero::before, .fg-rank-hero::after, .fg-tierbadge-lg .fg-tierbadge-e, .fg-tierbadge-lg::after, .fg-vibe-orb,
  .fg-petal { animation: none !important; display: none; }
  .fg-kh-obj, .fg-spark { animation: none !important; }
  /* cinematic FX — drop decorative motion, keep the lock/letter readable */
  .fg-dust, .fg-rays, .fg-shock, .fg-wax-shard, .fg-rise-heart, .fg-env-seal::after { animation: none !important; display: none; }
  .fg-env { animation: none !important; }
  .fg-kh-lock.near, .fg-kh-key.master.found, .fg-letter-paper.shimmer::after { animation: none !important; }
  .fg-letter, .fg-letter.show { transform: none !important; }
  .fg-anim, .fg-slide-r, .fg-slide-l, .fg-pop, .fg-opt.sel::after, .fg-super, .fg-chips.shake, .fg-shake, .fg-btn.ready, .fg-bg-cell.lit { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .fg-chip, .fg-opt, .fg-btn, .fg-tile { transition: none !important; }
  .fg-dna-mx-ring { transition: none !important; }
  /* link juice: keep the static connector line, drop the moving sparks + beat */
  .fg-dna-mx-heart, .fg-lb-pct { animation: none !important; }
  .fg-dna-mx-juice i, .fg-lb-juice i, .fg-dna-mx-juice::after, .fg-lb-juice::after { display: none !important; }
}

/* ── Secret-message reply thread (shared: play reveal + results page) ──────────────────────── */
.fg-replies-wrap { width: 100%; }
.fg-replies { background: rgba(255,255,255,.92); border-radius: 18px; padding: 14px 14px 12px;
  box-shadow: 0 10px 26px rgba(60,10,40,.12); text-align: left; }
.fg-replies-head { font-family: var(--fg-display); font-weight: 700; font-size: 19px;
  color: var(--fg-ink, #3a1422); margin-bottom: 10px; }
.fg-rc-count { font-family: inherit; font-size: 14px; color: var(--fg-primary); opacity: .8; }
.fg-reply-compose { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.fg-reply-input { width: 100%; border: 1.5px solid rgba(0,0,0,.10); border-radius: 12px; padding: 10px 12px;
  font: inherit; font-size: 15px; resize: vertical; min-height: 46px; background: var(--fg-soft, #fff2f6); color: #2a2030; }
.fg-reply-input:focus { outline: none; border-color: var(--fg-primary); }
.fg-reply-send { margin: 0; align-self: flex-end; width: auto; padding: 9px 18px; font-size: 15px; }
.fg-reply-err { color: #d12b5e; font-size: 13px; }
.fg-reply-err:not(:empty) { margin-top: 2px; }
.fg-reply-done { background: var(--fg-soft, #fff2f6); color: var(--fg-primary); font-weight: 600; font-size: 14px;
  border-radius: 12px; padding: 10px 12px; margin-top: 12px; text-align: center; }
.fg-replies-list { display: flex; flex-direction: column; gap: 9px; }
.fg-replies-empty { color: #8a7d86; font-size: 14px; padding: 6px 2px; }
.fg-reply { display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; border-radius: 13px;
  background: var(--fg-soft, #fff2f6); }
.fg-reply.mine { background: rgba(255,255,255,.6); box-shadow: inset 0 0 0 1.5px var(--fg-accent, #ff8fab); }
.fg-reply-av { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 14px; color: #fff;
  background: linear-gradient(135deg, var(--fg-primary), var(--fg-accent, #ff8fab)); }
.fg-reply-body { flex: 1 1 auto; min-width: 0; }
.fg-reply-name { font-weight: 700; font-size: 13.5px; color: var(--fg-ink, #3a1422); }
.fg-reply-you { font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: .6px;
  color: var(--fg-primary); background: rgba(255,255,255,.7); padding: 1px 6px; border-radius: 99px; margin-left: 4px; }
.fg-reply-msg { font-size: 14.5px; color: #3a3340; line-height: 1.4; margin-top: 1px;
  overflow-wrap: anywhere; white-space: pre-wrap; }
.fg-reply-del { flex: 0 0 auto; background: none; border: none; cursor: pointer; color: #b9a9b3; font-size: 15px;
  line-height: 1; padding: 2px 4px; border-radius: 6px; }
.fg-reply-del:hover { color: #d12b5e; background: rgba(209,43,94,.08); }
.fg-replies-more { margin: 12px 0 2px; width: 100%; }

/* Reply thread CONNECTED inside the letter card (play reveal) — blends in, divided from the letter above */
.fg-replies-inline { width: 100%; }
.fg-replies-inline .fg-replies { background: transparent; box-shadow: none; border-radius: 0;
  margin-top: 16px; padding: 14px 2px 0; border-top: 1.5px solid rgba(0,0,0,.08); }

/* slim "Write a reply…" bar that expands to the textarea + Send on tap */
.fg-reply-bar { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--fg-soft, #fff2f6); border: 1.5px solid rgba(0,0,0,.10); border-radius: 99px;
  padding: 11px 8px 11px 16px; font: inherit; font-size: 14.5px; color: #8a7d86; cursor: text; text-align: left; }
.fg-reply-bar:hover { border-color: var(--fg-primary); color: var(--fg-ink, #3a1422); }
.fg-reply-bar-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fg-reply-bar-go { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; color: #fff; font-weight: 700; line-height: 1;
  background: linear-gradient(135deg, var(--fg-primary), var(--fg-accent, #ff8fab)); }

/* ── Friendship in 2035 (predict) — mystic "future scroll" card ──────────────────────────────────── */
.fg-pred-orb { font-size: 56px; line-height: 1; filter: drop-shadow(0 6px 16px rgba(255,150,190,.5)); }
.fg-pred-loading .fg-build-txt { color: var(--fg-primary); }

/* The future card: warm "golden-hour twilight" night sky — deep violet → plum with gold + pink starlight
   (friendship-warm, not cold sci-fi). Self-contained dark card so it pops as the share asset. */
.fg-future { position: relative; overflow: hidden; border-radius: 22px; padding: 22px 18px 18px;
  background: radial-gradient(125% 85% at 50% -12%, #7a368f 0%, #3a1c63 52%, #20103f 100%);
  border: 1px solid rgba(255,184,210,.30); box-shadow: 0 18px 50px rgba(26,13,51,.55), inset 0 0 70px rgba(255,150,190,.14); color: #f4ecff; }
.fg-fc-stars { position: absolute; inset: 0; pointer-events: none; opacity: .9;
  background-image:
    radial-gradient(1.7px 1.7px at 12% 18%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 78% 12%, #ffe3b0, transparent),
    radial-gradient(1.5px 1.5px at 32% 70%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 64% 52%, #ffd0e6, transparent),
    radial-gradient(1.8px 1.8px at 88% 76%, #fff, transparent),
    radial-gradient(1.3px 1.3px at 22% 92%, #ffe3b0, transparent),
    radial-gradient(1.5px 1.5px at 52% 30%, #fff, transparent);
  animation: fg-twinkle 3.6s ease-in-out infinite; }
@keyframes fg-twinkle { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
.fg-fc-head { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.fg-fc-orb { font-size: 40px; line-height: 1; filter: drop-shadow(0 4px 14px rgba(255,180,120,.55)); animation: fg-orbfloat 4s ease-in-out infinite; }
@keyframes fg-orbfloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.fg-fc-title { position: relative; font-family: var(--fg-display, inherit); font-size: 22px; font-weight: 700; line-height: 1.2;
  background: linear-gradient(100deg, #fff, #ffe0a3 55%, #ffc2dd); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.fg-fc-status { position: relative; text-align: center; margin: 14px 0 4px; font-size: 11px; font-weight: 800; letter-spacing: 1.6px;
  text-transform: uppercase; color: #ffcf8f; opacity: .95; }
.fg-fc-headline { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  margin: 2px auto 16px; opacity: 0; transform: translateY(8px) scale(.96); transition: opacity .5s ease, transform .5s ease; }
.fg-fc-headline.on { opacity: 1; transform: none; }
.fg-fc-he { display: inline-block; font-size: 40px; line-height: 1; filter: drop-shadow(0 4px 14px rgba(255,150,190,.6)); }
.fg-fc-headline.on .fg-fc-he { animation: fg-he-pulse 2.6s ease-in-out .5s infinite; }
@keyframes fg-he-pulse { 0%,100% { transform: scale(1); filter: drop-shadow(0 4px 14px rgba(255,150,190,.5)); } 50% { transform: scale(1.1); filter: drop-shadow(0 0 22px rgba(255,200,130,.75)); } }
.fg-fc-ht { font-size: 20px; font-weight: 800; line-height: 1.25; color: #fff; max-width: 16em; }
.fg-fc-rows { position: relative; display: flex; flex-direction: column; gap: 1px; border-radius: 14px; overflow: hidden;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); }
.fg-fc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px;
  background: rgba(255,255,255,.02); opacity: 0; transform: translateX(-8px); transition: opacity .45s ease, transform .45s ease; }
.fg-fc-row.on { opacity: 1; transform: none; }
.fg-fc-row + .fg-fc-row { border-top: 1px solid rgba(255,255,255,.08); }
.fg-fc-key { flex: 0 0 auto; font-size: 12.5px; font-weight: 700; letter-spacing: .3px; color: #e2b8d8; text-transform: uppercase; }
.fg-fc-val { flex: 1 1 auto; text-align: right; font-size: 14px; font-weight: 600; color: #fff; line-height: 1.3; }
.fg-fc-foot { position: relative; text-align: center; margin-top: 14px; font-size: 13px; font-weight: 700; color: #ffd9a0; }
.fg-pred-share { margin-top: 14px; }
@media (prefers-reduced-motion: reduce) { .fg-fc-stars, .fg-fc-orb, .fg-fc-headline.on .fg-fc-he { animation: none !important; } }

/* 2035 results page: a tappable gallery of the creator's future with each friend (creator-only expand) */
.fg-pred-gallery { display: grid; gap: 10px; margin-top: 4px; }
.fg-pred-entry { background: #fff; border-radius: 16px; box-shadow: 0 6px 16px rgba(60,30,120,.10); overflow: hidden; border: 2px solid transparent; }
.fg-pred-entry.me { border-color: var(--fg-primary); }
.fg-pred-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 15px; background: none; border: 0; font: inherit; text-align: left; cursor: pointer; }
.fg-pred-head.static { cursor: default; }
.fg-pred-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fg-pred-name { font-weight: 800; color: var(--fg-ink, #160d33); overflow-wrap: anywhere; line-height: 1.2; }
.fg-pred-verdict { font-size: 13px; font-weight: 700; color: var(--fg-primary); display: flex; align-items: center; gap: 5px; overflow-wrap: anywhere; line-height: 1.25; }
.fg-pred-caret { flex: 0 0 auto; color: var(--fg-primary); font-size: 15px; transition: transform .25s ease; }
.fg-pred-entry.open .fg-pred-caret { transform: rotate(180deg); }
.fg-pred-body { padding: 0 12px 12px; }
.fg-pred-body .fg-future { margin-top: 2px; }
.fg-pred-hint { text-align: center; font-size: 13px; color: var(--fg-muted, #8a7d96); margin-top: 12px; font-weight: 600; }
