/* ============================================================
   ScoopItLoud — Voice Games for Ice Cream
   Professional, responsive design system
   ============================================================ */

:root {
  /* Brand palette */
  --c-pink: #FF4D8D;
  --c-pink-deep: #E63976;
  --c-mint: #6FE5C5;
  --c-mint-deep: #3FBFA0;
  --c-yellow: #FFD93D;
  --c-cocoa: #2D1B36;
  --c-cocoa-soft: #463056;
  --c-cream: #FFF8F0;
  --c-cream-2: #FFEFE0;
  --c-white: #ffffff;
  --c-grey: #8a7c92;
  --c-grey-soft: #d8d0dc;

  /* Gradients */
  --g-hero: linear-gradient(135deg, #FF4D8D 0%, #FF8A5C 50%, #FFD93D 100%);
  --g-card: linear-gradient(135deg, #6FE5C5 0%, #5BC7E8 100%);
  --g-warm: linear-gradient(135deg, #FFB8D1 0%, #FFE5C9 100%);
  --g-dark: linear-gradient(135deg, #2D1B36 0%, #463056 100%);

  /* Type */
  --f-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --f-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* Radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* Shadow */
  --sh-sm: 0 2px 8px rgba(45, 27, 54, 0.06);
  --sh-md: 0 8px 24px rgba(45, 27, 54, 0.08);
  --sh-lg: 0 24px 60px rgba(45, 27, 54, 0.12);
  --sh-pink: 0 12px 32px rgba(255, 77, 141, 0.32);

  /* Layout */
  --maxw: 1200px;
  --nav-h: 76px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-cocoa);
  background: var(--c-cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }

h1, h2, h3, h4, h5 { font-family: var(--f-display); font-weight: 800; line-height: 1.15; color: var(--c-cocoa); }
h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); letter-spacing: -0.01em; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--s-5);
}

section { padding: var(--s-9) 0; }
@media (max-width: 768px) { section { padding: var(--s-7) 0; } }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255, 248, 240, 0.85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  z-index: 100;
  border-bottom: 1px solid rgba(45, 27, 54, 0.06);
}
.nav-inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s-5);
}
.brand {
  display: flex; align-items: center; gap: var(--s-3);
  font-family: var(--f-display); font-weight: 800; font-size: 1.25rem;
  color: var(--c-cocoa);
}
.brand-logo {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--g-hero);
  display: grid; place-items: center;
  color: #fff; font-size: 1.2rem;
  box-shadow: var(--sh-pink);
}
.brand-logo-img {
  height: 44px; width: auto; max-width: 190px;
  object-fit: contain; display: block;
}
@media (max-width: 600px) { .brand-logo-img { height: 38px; max-width: 150px; } }
footer .brand-logo-img { height: 40px; }
.nav-links { display: flex; align-items: center; gap: var(--s-6); }
.nav-links a {
  font-weight: 500; font-size: 0.95rem; color: var(--c-cocoa-soft);
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover { color: var(--c-pink); }
.nav-links a.active { color: var(--c-pink); }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  width: 18px; height: 3px; border-radius: 2px; background: var(--c-pink);
}
.nav-cta {
  background: var(--c-cocoa); color: #fff !important;
  padding: 10px 20px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 0.9rem !important;
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: var(--sh-md); color: #fff !important; }
.nav-cta::after { display: none !important; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--c-white);
  box-shadow: var(--sh-sm);
  position: relative;
}
.nav-toggle span {
  position: absolute; left: 11px; right: 11px; height: 2px;
  background: var(--c-cocoa); border-radius: 2px;
  transition: all 0.3s;
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 26px; }
.nav-toggle.open span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: var(--s-2);
    padding: var(--s-5);
    background: var(--c-cream);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transform: translateY(-120%);
    transition: transform 0.3s ease;
    box-shadow: var(--sh-md);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { width: 100%; padding: var(--s-3); border-radius: var(--r-md); }
  .nav-links a:hover { background: var(--c-white); }
  .nav-cta { text-align: center; }
}

main { padding-top: var(--nav-h); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  padding: 14px 28px;
  border-radius: var(--r-pill);
  font-family: var(--f-display);
  font-weight: 700; font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  border: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--c-pink); color: #fff;
  box-shadow: var(--sh-pink);
}
.btn-primary:hover { transform: translateY(-3px); background: var(--c-pink-deep); box-shadow: 0 18px 40px rgba(255,77,141,0.4); }
.btn-dark { background: var(--c-cocoa); color: #fff; }
.btn-dark:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); }
.btn-ghost {
  background: rgba(255,255,255,0.6);
  color: var(--c-cocoa);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(45,27,54,0.12);
}
.btn-ghost:hover { background: #fff; transform: translateY(-2px); }
.btn-lg { padding: 18px 36px; font-size: 1.1rem; }
.btn-sm { padding: 10px 18px; font-size: 0.9rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: var(--s-9) 0 var(--s-8);
  background: radial-gradient(ellipse at top right, #FFE5C9 0%, transparent 50%),
              radial-gradient(ellipse at bottom left, #FFD8E8 0%, transparent 50%),
              var(--c-cream);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--s-8); align-items: center;
}
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-7); text-align: center; }
}
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 8px 16px; border-radius: var(--r-pill);
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  font-weight: 600; font-size: 0.85rem;
  color: var(--c-pink-deep);
  border: 1px solid rgba(255,77,141,0.2);
  margin-bottom: var(--s-5);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-pink); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}
.hero h1 { margin-bottom: var(--s-4); }
.hero h1 .accent { background: var(--g-hero); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: var(--c-cocoa-soft);
  max-width: 540px; margin-bottom: var(--s-6);
}
@media (max-width: 920px) { .hero p.lead { margin: 0 auto var(--s-6); } }
.hero-actions { display: flex; gap: var(--s-3); flex-wrap: wrap; }
@media (max-width: 920px) { .hero-actions { justify-content: center; } }

.hero-stats {
  display: flex; gap: var(--s-6); margin-top: var(--s-7);
  flex-wrap: wrap;
}
@media (max-width: 920px) { .hero-stats { justify-content: center; } }
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  color: var(--c-cocoa);
}
.stat-label { font-size: 0.85rem; color: var(--c-grey); }

/* Hero illustration */
.hero-art {
  position: relative;
  aspect-ratio: 1;
  max-width: 520px;
  margin: 0 auto;
}
.hero-art .blob {
  position: absolute; inset: 0;
  background: var(--g-hero);
  border-radius: 64% 36% 60% 40% / 50% 60% 40% 50%;
  filter: blur(2px);
  animation: morph 8s ease-in-out infinite;
  box-shadow: var(--sh-lg);
}
@keyframes morph {
  0%, 100% { border-radius: 64% 36% 60% 40% / 50% 60% 40% 50%; }
  50% { border-radius: 40% 60% 36% 64% / 60% 40% 60% 40%; }
}
.hero-art .cone {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: clamp(8rem, 18vw, 14rem);
  filter: drop-shadow(0 16px 32px rgba(45,27,54,0.18));
  animation: float 5s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}
.hero-art .badge {
  position: absolute;
  background: #fff; border-radius: var(--r-lg);
  padding: var(--s-3) var(--s-4);
  box-shadow: var(--sh-md);
  display: flex; align-items: center; gap: var(--s-2);
  font-weight: 700; font-size: 0.9rem;
  animation: float 5s ease-in-out infinite;
}
.hero-art .badge.b1 { top: 8%; left: -8%; animation-delay: -1s; }
.hero-art .badge.b2 { bottom: 14%; right: -6%; animation-delay: -2.5s; }
.hero-art .badge .ic { font-size: 1.4rem; }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-head { text-align: center; max-width: 720px; margin: 0 auto var(--s-7); }
.section-head .eyebrow { margin: 0 0 var(--s-4); }
.section-head p { color: var(--c-cocoa-soft); font-size: 1.05rem; margin-top: var(--s-3); }

/* ============================================================
   GAME CARDS
   ============================================================ */
.games-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5);
}
@media (max-width: 920px) { .games-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .games-grid { grid-template-columns: 1fr; } }

.game-card {
  position: relative;
  background: #fff;
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: var(--sh-sm);
  transition: transform 0.3s, box-shadow 0.3s;
  overflow: hidden;
  border: 1px solid rgba(45,27,54,0.04);
  display: flex; flex-direction: column;
  min-height: 320px;
}
.game-card:hover { transform: translateY(-6px); box-shadow: var(--sh-lg); }
.game-card .gc-visual {
  height: 130px;
  border-radius: var(--r-md);
  display: grid; place-items: center;
  font-size: 4rem;
  margin-bottom: var(--s-4);
}
.game-card .gc-tag {
  display: inline-block;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--c-cream-2); color: var(--c-cocoa-soft);
  margin-bottom: var(--s-3);
  align-self: flex-start;
}
.game-card h3 { margin-bottom: var(--s-2); }
.game-card .gc-desc { font-size: 0.92rem; color: var(--c-cocoa-soft); margin-bottom: var(--s-4); flex: 1; }
.game-card .gc-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: var(--s-3); border-top: 1px solid rgba(0,0,0,0.06);
}
.game-card .gc-meta { font-size: 0.85rem; color: var(--c-grey); display: flex; gap: var(--s-3); }
.game-card .gc-play {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--c-cocoa); color: #fff;
  display: grid; place-items: center;
  font-size: 1.1rem;
  transition: background 0.2s, transform 0.2s;
}
.game-card:hover .gc-play { background: var(--c-pink); transform: rotate(-12deg) scale(1.08); }
.game-card.coming-soon { opacity: 0.6; pointer-events: none; }
.game-card.coming-soon .gc-tag { background: #f0e6d6; }

/* Visual variants */
.gv-pink { background: linear-gradient(135deg, #FFB8D1, #FF8AB0); }
.gv-mint { background: linear-gradient(135deg, #A6F0DC, #6FE5C5); }
.gv-yellow { background: linear-gradient(135deg, #FFE89D, #FFD93D); }
.gv-orange { background: linear-gradient(135deg, #FFC8A0, #FF9A5C); }
.gv-purple { background: linear-gradient(135deg, #D0B8F0, #A07AE0); }
.gv-blue { background: linear-gradient(135deg, #B8DEFF, #7AB8F0); }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how {
  background: linear-gradient(180deg, var(--c-cream) 0%, #fff 100%);
}
.steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-5);
  position: relative;
}
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: #fff; padding: var(--s-5);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  text-align: center;
  position: relative;
}
.step-n {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--g-hero); color: #fff;
  display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 800; font-size: 1.2rem;
  margin: 0 auto var(--s-3);
  box-shadow: var(--sh-pink);
}
.step h4 { font-size: 1.05rem; margin-bottom: var(--s-2); }
.step p { font-size: 0.9rem; color: var(--c-cocoa-soft); }

/* ============================================================
   FEATURES
   ============================================================ */
.feat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5);
}
@media (max-width: 900px) { .feat-grid { grid-template-columns: 1fr; } }
.feat {
  padding: var(--s-5);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--sh-sm);
  transition: transform 0.3s;
}
.feat:hover { transform: translateY(-4px); }
.feat-icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--c-cream-2);
  display: grid; place-items: center;
  font-size: 1.6rem;
  margin-bottom: var(--s-4);
}
.feat h3 { font-size: 1.15rem; margin-bottom: var(--s-2); }
.feat p { color: var(--c-cocoa-soft); font-size: 0.95rem; }

/* ============================================================
   REWARDS BANNER
   ============================================================ */
.reward-band {
  margin: 0 var(--s-5);
  background: var(--g-dark);
  border-radius: var(--r-xl);
  padding: var(--s-8) var(--s-7);
  color: #fff;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s-7); align-items: center;
  position: relative; overflow: hidden;
  max-width: var(--maxw);
  margin: var(--s-9) auto;
}
@media (max-width: 900px) { .reward-band { grid-template-columns: 1fr; text-align: center; padding: var(--s-6); } }
.reward-band::before {
  content: ''; position: absolute;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, var(--c-pink) 0%, transparent 70%);
  top: -100px; right: -100px; opacity: 0.5;
}
.reward-band h2 { color: #fff; margin-bottom: var(--s-4); position: relative; }
.reward-band h2 .accent { color: var(--c-yellow); }
.reward-band p { color: rgba(255,255,255,0.8); position: relative; max-width: 480px; margin-bottom: var(--s-5); }
@media (max-width: 900px) { .reward-band p { margin-left: auto; margin-right: auto; } }
.reward-band .visual {
  position: relative; aspect-ratio: 1; max-width: 320px; margin: 0 auto;
  display: grid; place-items: center;
  font-size: 9rem;
  filter: drop-shadow(0 12px 28px rgba(0,0,0,0.3));
  animation: float 5s ease-in-out infinite;
}

/* ============================================================
   LEADERBOARD
   ============================================================ */
.lb-wrap {
  background: #fff;
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: var(--sh-md);
  max-width: 720px; margin: 0 auto;
}
.lb-tabs { display: flex; gap: var(--s-2); margin-bottom: var(--s-4); flex-wrap: wrap; }
.lb-tab {
  padding: 8px 16px; border-radius: var(--r-pill);
  background: var(--c-cream); color: var(--c-cocoa-soft);
  font-weight: 600; font-size: 0.9rem;
}
.lb-tab.active { background: var(--c-cocoa); color: #fff; }
.lb-row {
  display: grid; grid-template-columns: 50px 1fr auto; gap: var(--s-3); align-items: center;
  padding: var(--s-3);
  border-radius: var(--r-md);
  transition: background 0.2s;
}
.lb-row:hover { background: var(--c-cream); }
.lb-row + .lb-row { border-top: 1px solid rgba(0,0,0,0.05); }
.lb-rank {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--c-cream-2);
  display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 700;
  color: var(--c-cocoa);
}
.lb-row.gold .lb-rank { background: linear-gradient(135deg, #FFD700, #FFA500); color: #fff; }
.lb-row.silver .lb-rank { background: linear-gradient(135deg, #C0C0C0, #888); color: #fff; }
.lb-row.bronze .lb-rank { background: linear-gradient(135deg, #CD7F32, #8b4513); color: #fff; }
.lb-name { font-weight: 600; }
.lb-meta { font-size: 0.82rem; color: var(--c-grey); }
.lb-score {
  font-family: var(--f-display); font-weight: 800; color: var(--c-pink);
  font-size: 1.1rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--c-cocoa); color: #fff;
  padding: var(--s-8) 0 var(--s-5); margin-top: var(--s-9);
}
.foot-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--s-6);
  margin-bottom: var(--s-6);
}
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-brand .brand { color: #fff; margin-bottom: var(--s-3); }
.foot-brand p { color: rgba(255,255,255,0.6); max-width: 340px; }
.foot-col h5 { font-size: 0.9rem; margin-bottom: var(--s-3); color: var(--c-yellow); letter-spacing: 0.06em; text-transform: uppercase; }
.foot-col a { display: block; padding: 6px 0; color: rgba(255,255,255,0.7); font-size: 0.92rem; transition: color 0.2s; }
.foot-col a:hover { color: var(--c-pink); }
.foot-base {
  padding-top: var(--s-5); border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s-3);
  color: rgba(255,255,255,0.5); font-size: 0.85rem;
}
.socials { display: flex; gap: var(--s-2); }
.socials a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: grid; place-items: center;
  transition: background 0.2s, transform 0.2s;
}
.socials a:hover { background: var(--c-pink); transform: translateY(-2px); }

/* ============================================================
   GAME PLAY PAGE STYLES
   ============================================================ */
.play-shell {
  max-width: 760px; margin: 0 auto;
  padding: 0 var(--s-5);
}
.play-head { text-align: center; margin-bottom: var(--s-6); }
.play-head h1 { margin-bottom: var(--s-3); }
.play-head .lead { color: var(--c-cocoa-soft); font-size: 1.05rem; }
.play-card {
  background: #fff; border-radius: var(--r-xl);
  padding: var(--s-7) var(--s-6);
  box-shadow: var(--sh-lg);
  text-align: center;
}

/* Decibel meter */
.dB-stage {
  display: flex; flex-direction: column; align-items: center; gap: var(--s-5);
  padding: var(--s-5) 0;
}
.dB-ring {
  position: relative;
  width: clamp(220px, 50vw, 320px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 180deg, #6FE5C5 0deg, #FFD93D 120deg, #FF4D8D 280deg, #FF4D8D 360deg);
  padding: 18px;
  display: grid; place-items: center;
}
.dB-ring::before {
  content: ''; position: absolute; inset: 18px; border-radius: 50%;
  background: var(--c-cream);
}
.dB-inner {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--c-cocoa);
  display: grid; place-items: center;
  color: #fff;
  transition: transform 0.1s ease-out;
}
.dB-value {
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(3rem, 8vw, 4.8rem);
  line-height: 1;
}
.dB-unit { font-size: 0.9rem; color: rgba(255,255,255,0.6); letter-spacing: 0.1em; margin-top: 4px; }
.dB-status {
  font-size: 1rem; color: var(--c-cocoa-soft);
  min-height: 30px;
}
.dB-status.live { color: var(--c-pink); font-weight: 700; }
.timer-bar {
  width: 100%; height: 8px; background: var(--c-grey-soft);
  border-radius: 4px; overflow: hidden;
}
.timer-bar-fill {
  height: 100%; background: var(--g-hero);
  width: 100%; transition: width 0.1s linear;
}

.score-card {
  background: var(--g-hero); color: #fff;
  border-radius: var(--r-lg);
  padding: var(--s-5);
  margin-top: var(--s-5);
}
.score-card .big {
  font-family: var(--f-display); font-weight: 800;
  font-size: 3rem; line-height: 1;
}
.score-card .lbl { opacity: 0.85; }

.actions-row {
  display: flex; gap: var(--s-3); justify-content: center; margin-top: var(--s-5);
  flex-wrap: wrap;
}

/* Guess Sound game */
.gs-stage { padding: var(--s-5) 0; }
.gs-play-btn {
  width: clamp(140px, 30vw, 180px);
  aspect-ratio: 1; border-radius: 50%;
  background: var(--g-hero); color: #fff;
  display: grid; place-items: center;
  font-size: 4rem;
  margin: 0 auto var(--s-5);
  box-shadow: var(--sh-pink);
  transition: transform 0.2s;
}
.gs-play-btn:hover { transform: scale(1.06); }
.gs-play-btn:active { transform: scale(0.96); }
.gs-options {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3);
  margin-top: var(--s-5);
}
.gs-option {
  padding: var(--s-4);
  background: var(--c-cream);
  border-radius: var(--r-md);
  font-weight: 600;
  border: 2px solid transparent;
  transition: all 0.2s;
}
.gs-option:hover { background: var(--c-cream-2); border-color: var(--c-pink); transform: translateY(-2px); }
.gs-option.correct { background: var(--c-mint); color: var(--c-cocoa); border-color: var(--c-mint-deep); }
.gs-option.wrong { background: #FFD2D8; color: var(--c-cocoa); border-color: var(--c-pink-deep); }
.gs-streak {
  display: inline-flex; gap: var(--s-2); align-items: center;
  padding: 8px 16px; border-radius: var(--r-pill);
  background: var(--c-cream-2);
  font-weight: 600; font-size: 0.9rem;
  margin-bottom: var(--s-4);
}

/* Hold Note */
.hn-stage { padding: var(--s-5) 0; }
.hn-bar {
  position: relative;
  height: 220px;
  background: linear-gradient(180deg, #FF4D8D 0%, #FFD93D 50%, #6FE5C5 100%);
  border-radius: var(--r-lg);
  margin: var(--s-4) auto;
  max-width: 80px;
  overflow: hidden;
}
.hn-target {
  position: absolute;
  left: -10px; right: -10px;
  height: 32px;
  border: 3px dashed #fff;
  border-radius: 8px;
  top: 50%; transform: translateY(-50%);
}
.hn-marker {
  position: absolute;
  left: -16px; right: -16px;
  height: 12px;
  background: var(--c-cocoa);
  border-radius: 6px;
  bottom: 0;
  transition: bottom 0.1s linear;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.hn-freq {
  font-family: var(--f-display); font-weight: 800; font-size: 2rem;
  color: var(--c-cocoa);
}

/* Scratch card */
.scratch-card {
  position: relative;
  width: 100%; max-width: 360px; aspect-ratio: 1.4;
  margin: var(--s-5) auto;
  border-radius: var(--r-lg);
  background: var(--g-hero);
  color: #fff;
  display: grid; place-items: center;
  text-align: center;
  padding: var(--s-5);
  box-shadow: var(--sh-lg);
  overflow: hidden;
}
.scratch-card .label { text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.85rem; opacity: 0.8; }
.scratch-card .code {
  font-family: var(--f-display); font-weight: 800; font-size: 2rem;
  letter-spacing: 0.2em; padding: var(--s-3) var(--s-4); margin: var(--s-3) 0;
  background: rgba(255,255,255,0.2); border-radius: var(--r-md);
}
.scratch-card .prize { font-size: 1.1rem; font-weight: 600; }
.scratch-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #cdcdcd, #888);
  display: grid; place-items: center;
  color: #fff; font-weight: 700;
  cursor: pointer;
  transition: opacity 0.4s;
}
.scratch-overlay.gone { opacity: 0; pointer-events: none; }

/* Coupon cards on rewards page */
.coupon-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-4);
  max-width: 800px; margin: var(--s-5) auto 0;
}
@media (max-width: 700px) { .coupon-grid { grid-template-columns: 1fr; } }
.coupon {
  background: #fff; border-radius: var(--r-lg);
  padding: var(--s-4);
  box-shadow: var(--sh-sm);
  display: grid; grid-template-columns: 80px 1fr; gap: var(--s-4); align-items: center;
  border-left: 4px solid var(--c-pink);
}
.coupon-ic {
  width: 80px; height: 80px; border-radius: var(--r-md);
  display: grid; place-items: center;
  font-size: 2.4rem;
}
.coupon h4 { margin-bottom: 2px; font-size: 1.05rem; }
.coupon .desc { font-size: 0.85rem; color: var(--c-cocoa-soft); margin-bottom: var(--s-2); }
.coupon .code-row { display: flex; align-items: center; gap: var(--s-2); }
.coupon code {
  background: var(--c-cream); padding: 4px 10px; border-radius: 6px;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.85rem; font-weight: 700;
}

/* Generic small UI bits */
.tag {
  display: inline-block;
  padding: 4px 10px; border-radius: var(--r-pill);
  font-size: 0.75rem; font-weight: 700;
  background: var(--c-cream-2); color: var(--c-cocoa-soft);
}
.tag.live { background: var(--c-pink); color: #fff; }
.notice {
  background: rgba(255,217,61,0.18);
  border-left: 4px solid var(--c-yellow);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  font-size: 0.9rem; color: var(--c-cocoa);
  margin: var(--s-4) 0;
  text-align: left;
}
.notice strong { color: var(--c-cocoa); }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 100px);
  background: var(--c-cocoa); color: #fff;
  padding: 12px 24px; border-radius: var(--r-pill);
  box-shadow: var(--sh-lg);
  font-weight: 600; font-size: 0.92rem;
  z-index: 200;
  transition: transform 0.3s;
}
.toast.show { transform: translate(-50%, 0); }

/* Page hero (smaller, for inner pages) */
.page-hero {
  padding: var(--s-8) 0 var(--s-6);
  text-align: center;
  background: var(--c-cream);
}
.page-hero h1 { margin-bottom: var(--s-3); }
.page-hero p { color: var(--c-cocoa-soft); max-width: 560px; margin: 0 auto; }

/* Tabs (for about etc) */
.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-7); align-items: center;
}
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.split .art {
  aspect-ratio: 1; max-width: 420px; margin: 0 auto;
  background: var(--g-warm); border-radius: var(--r-xl);
  display: grid; place-items: center;
  font-size: 8rem;
}

/* Utility */
.text-center { text-align: center; }
.mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }
.mb-3 { margin-bottom: var(--s-3); }
.mb-4 { margin-bottom: var(--s-4); }
.hide-mob { display: initial; }
@media (max-width: 600px) { .hide-mob { display: none; } }

/* Reveal animation */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============================================================
   NEW GAME COMPONENTS
   ============================================================ */

/* Big readable text input on game pages */
.game-input {
  padding: 14px 18px;
  border: 2px solid var(--c-grey-soft);
  border-radius: var(--r-md);
  font-size: 1.4rem;
  font-family: var(--f-display); font-weight: 700;
  text-align: center;
  width: 200px;
  outline: none;
  transition: border-color 0.2s;
}
.game-input:focus { border-color: var(--c-pink); }

/* Guess Number / Math Sprint */
.big-display {
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(2.5rem, 7vw, 4rem);
  line-height: 1;
  color: var(--c-cocoa);
  margin: var(--s-4) 0;
}
.hint-pill {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--r-pill);
  background: var(--c-cream);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--c-cocoa-soft);
}
.hint-pill.up { background: #FFD8E8; color: var(--c-pink-deep); }
.hint-pill.down { background: #B8F0DE; color: var(--c-mint-deep); }
.hint-pill.win { background: var(--g-hero); color: #fff; }

.math-q {
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(2.5rem, 7vw, 4rem);
  color: var(--c-cocoa);
  background: var(--c-cream);
  padding: var(--s-5);
  border-radius: var(--r-lg);
  margin: var(--s-4) 0;
}
.math-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3);
  max-width: 360px; margin: 0 auto;
}
.math-opt {
  padding: var(--s-4);
  border-radius: var(--r-md);
  background: #fff;
  border: 2px solid var(--c-grey-soft);
  font-family: var(--f-display); font-weight: 800;
  font-size: 1.6rem;
  color: var(--c-cocoa);
  transition: all 0.15s;
}
.math-opt:hover { border-color: var(--c-pink); transform: translateY(-2px); }
.math-opt.correct { background: var(--c-mint); border-color: var(--c-mint-deep); color: var(--c-cocoa); }
.math-opt.wrong { background: #FFD2D8; border-color: var(--c-pink-deep); color: var(--c-cocoa); }
.math-meta {
  display: flex; justify-content: center; gap: var(--s-5);
  margin-bottom: var(--s-4);
  flex-wrap: wrap;
}
.math-meta .chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--r-pill);
  background: var(--c-cream-2);
  font-weight: 700;
}

/* Reaction Race traffic light */
.rr-stage {
  width: 100%; aspect-ratio: 16 / 10;
  border-radius: var(--r-lg);
  display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 800;
  color: #fff;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  cursor: pointer;
  user-select: none;
  transition: background 0.05s;
}
.rr-stage.idle { background: var(--c-cocoa); }
.rr-stage.red { background: #E63946; }
.rr-stage.yellow { background: #FFB627; color: var(--c-cocoa); }
.rr-stage.green { background: #06A77D; }
.rr-stage.fail { background: #B5179E; }
.rr-stage .sub { font-family: var(--f-body); font-size: 0.9rem; opacity: 0.85; margin-top: var(--s-2); font-weight: 500; }
.rr-best { text-align: center; margin-top: var(--s-3); color: var(--c-cocoa-soft); }

/* Stop the Clock */
.sc-display {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 800;
  background: var(--c-cocoa);
  color: var(--c-yellow);
  border-radius: var(--r-lg);
  letter-spacing: 0.04em;
  margin: var(--s-4) auto;
  max-width: 380px;
  /* fixed box so swapping number <-> dots never changes its height */
  height: 150px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 4px 16px rgba(0,0,0,0.3);
}
.sc-dots { display: inline-flex; gap: 18px; }
.sc-dots i {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--c-yellow); display: inline-block;
  animation: scpulse 1.1s ease-in-out infinite;
}
.sc-dots i:nth-child(2) { animation-delay: 0.18s; }
.sc-dots i:nth-child(3) { animation-delay: 0.36s; }
@keyframes scpulse {
  0%, 100% { opacity: 0.25; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.15); }
}
.sc-target {
  font-family: var(--f-display); font-weight: 700;
  color: var(--c-cocoa-soft);
  font-size: 1.1rem;
  margin-bottom: var(--s-2);
}
.sc-target-set {
  display: flex; gap: var(--s-2); justify-content: center; flex-wrap: wrap;
  margin-bottom: var(--s-4);
}
.sc-preset {
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--c-cream);
  font-weight: 600; color: var(--c-cocoa-soft);
  border: 2px solid transparent;
  transition: all 0.15s;
}
.sc-preset:hover { background: var(--c-cream-2); }
.sc-preset.active { background: var(--c-cocoa); color: #fff; border-color: var(--c-cocoa); }

/* Sudoku 4x4 */
.sudoku {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: var(--c-cocoa);
  padding: 6px;
  border-radius: var(--r-md);
  max-width: 340px;
  margin: var(--s-4) auto;
  aspect-ratio: 1;
}
.sk-cell {
  background: #fff;
  display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(1.4rem, 4.5vw, 2rem);
  color: var(--c-cocoa);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  aspect-ratio: 1;
}
.sk-cell.given { background: var(--c-cream); color: var(--c-cocoa-soft); cursor: default; }
.sk-cell.selected { background: var(--c-yellow); }
.sk-cell.error { background: #FFD2D8 !important; color: var(--c-pink-deep); }
.sk-cell:hover:not(.given) { background: var(--c-cream-2); }
/* 2x2 box separators */
.sk-cell[data-r="0"], .sk-cell[data-r="1"] { border-bottom: 0; }
.sk-cell[data-r="1"] { box-shadow: inset 0 -3px 0 var(--c-cocoa); }
.sk-cell[data-c="1"] { box-shadow: inset -3px 0 0 var(--c-cocoa); }
.sk-cell[data-r="1"][data-c="1"] { box-shadow: inset -3px 0 0 var(--c-cocoa), inset 0 -3px 0 var(--c-cocoa); }

.sk-numpad {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-2);
  max-width: 280px; margin: var(--s-4) auto 0;
}
.sk-num {
  padding: var(--s-3);
  background: var(--c-pink); color: #fff;
  font-family: var(--f-display); font-weight: 800;
  font-size: 1.4rem;
  border-radius: var(--r-md);
  transition: transform 0.1s, background 0.15s;
}
.sk-num:hover { transform: translateY(-2px); background: var(--c-pink-deep); }
.sk-num.erase { background: var(--c-grey); }

/* Box Memory (Simon-style) */
.bm-pad {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
  max-width: 320px; margin: var(--s-4) auto;
  aspect-ratio: 1;
}
.bm-tile {
  border-radius: var(--r-md);
  cursor: pointer;
  transition: filter 0.1s, transform 0.1s;
  position: relative;
  overflow: hidden;
}
.bm-tile:active { transform: scale(0.97); }
.bm-tile.lit { filter: brightness(1.6); box-shadow: 0 0 32px rgba(255,255,255,0.6) inset; }
.bm-tile.t0 { background: linear-gradient(135deg, #FF4D8D, #FF8AB0); }
.bm-tile.t1 { background: linear-gradient(135deg, #6FE5C5, #3FBFA0); }
.bm-tile.t2 { background: linear-gradient(135deg, #FFD93D, #FFB627); }
.bm-tile.t3 { background: linear-gradient(135deg, #7AB8F0, #5B7DD8); }

.bm-meta {
  display: flex; gap: var(--s-4); justify-content: center; margin-bottom: var(--s-4);
  flex-wrap: wrap;
}
.bm-meta .stat-mini {
  background: var(--c-cream);
  padding: 8px 16px;
  border-radius: var(--r-pill);
  font-weight: 700;
}

/* Image prompts page */
.prompt-card {
  background: #fff;
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: var(--sh-sm);
  margin-bottom: var(--s-4);
  transition: box-shadow 0.2s;
}
.prompt-card:hover { box-shadow: var(--sh-md); }
.prompt-head {
  display: flex; gap: var(--s-3); align-items: center;
  margin-bottom: var(--s-3);
}
.prompt-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  display: grid; place-items: center;
  font-size: 1.5rem;
}
.prompt-title { flex: 1; }
.prompt-title h3 { font-size: 1.1rem; margin-bottom: 2px; }
.prompt-title .meta { font-size: 0.85rem; color: var(--c-grey); }
.prompt-body {
  background: var(--c-cream);
  border-radius: var(--r-md);
  padding: var(--s-4);
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.88rem;
  color: var(--c-cocoa);
  white-space: pre-wrap;
  line-height: 1.5;
  position: relative;
  border-left: 3px solid var(--c-pink);
}
.prompt-copy {
  position: absolute; top: 8px; right: 8px;
  padding: 6px 12px;
  background: #fff;
  border-radius: var(--r-pill);
  font-size: 0.75rem; font-weight: 700;
  color: var(--c-cocoa);
  box-shadow: var(--sh-sm);
  transition: all 0.15s;
}
.prompt-copy:hover { background: var(--c-pink); color: #fff; }
.prompt-copy.copied { background: var(--c-mint-deep); color: #fff; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--s-4);
  margin-top: var(--s-5);
}
.tool {
  background: #fff;
  border-radius: var(--r-md);
  padding: var(--s-4);
  box-shadow: var(--sh-sm);
  display: flex; gap: var(--s-3);
  align-items: flex-start;
  transition: transform 0.2s, box-shadow 0.2s;
}
.tool:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.tool-ic {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.tool h4 { font-size: 0.98rem; margin-bottom: 2px; }
.tool p { font-size: 0.82rem; color: var(--c-cocoa-soft); margin-bottom: var(--s-2); }
.tool .badge-mini {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 0.7rem; font-weight: 700;
  background: var(--c-cream-2);
  color: var(--c-cocoa-soft);
}
.tool .badge-mini.free { background: #B8F0DE; color: var(--c-mint-deep); }
.tool .badge-mini.paid { background: #FFD8E8; color: var(--c-pink-deep); }

/* Tabs for image prompts page */
.prompt-tabs {
  display: flex; gap: var(--s-2); margin-bottom: var(--s-4);
  flex-wrap: wrap;
  justify-content: center;
}
.prompt-tab {
  padding: 10px 18px; border-radius: var(--r-pill);
  background: #fff; color: var(--c-cocoa-soft);
  font-weight: 600; font-size: 0.9rem;
  box-shadow: var(--sh-sm);
  transition: all 0.15s;
}
.prompt-tab.active { background: var(--c-cocoa); color: #fff; }

/* Mimic Star mic */
.mimic-phrase {
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  color: var(--c-cocoa);
  padding: var(--s-5);
  border-radius: var(--r-lg);
  background: var(--g-warm);
  margin: var(--s-4) 0;
  min-height: 100px;
  display: grid; place-items: center;
}

/* ============================================================
   AUTH PAGES (login / register)
   ============================================================ */
.auth-wrap {
  min-height: calc(100vh - var(--nav-h));
  display: grid; place-items: center;
  padding: var(--s-7) var(--s-5);
  background: radial-gradient(ellipse at top right, #FFE5C9 0%, transparent 55%),
              radial-gradient(ellipse at bottom left, #FFD8E8 0%, transparent 55%),
              var(--c-cream);
}
.auth-card {
  display: grid; grid-template-columns: 1fr 1fr;
  max-width: 940px; width: 100%;
  background: #fff;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-lg);
}
@media (max-width: 820px) { .auth-card { grid-template-columns: 1fr; } .auth-art { display: none; } }
.auth-art {
  background: var(--g-dark);
  color: #fff;
  padding: var(--s-7);
  display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.auth-art::before {
  content:''; position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, var(--c-pink) 0%, transparent 70%);
  top: -80px; right: -80px; opacity: 0.45;
}
.auth-art-inner { position: relative; z-index: 1; text-align: center; }
.auth-art h2 { color: #fff; margin: var(--s-5) 0 var(--s-2); }
.auth-art p { color: rgba(255,255,255,0.75); }
.auth-form { padding: clamp(24px, 5vw, 48px); }
.auth-form h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 4px; }
.auth-sub { color: var(--c-cocoa-soft); margin-bottom: var(--s-5); }
.auth-sub a { color: var(--c-pink); font-weight: 700; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--s-4); }
.field span { font-size: 0.85rem; font-weight: 600; color: var(--c-cocoa); }
.field span small { color: var(--c-grey); font-weight: 400; }
.field input {
  padding: 13px 16px;
  border: 1.5px solid var(--c-grey-soft);
  border-radius: var(--r-md);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.field input:focus { border-color: var(--c-pink); box-shadow: 0 0 0 3px rgba(255,77,141,0.12); }
.auth-or-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--s-3); align-items: end; }
.auth-or-row .field { margin-bottom: var(--s-4); }
.auth-or { padding-bottom: 26px; color: var(--c-grey); font-size: 0.85rem; font-weight: 600; }
@media (max-width: 480px) {
  .auth-or-row { grid-template-columns: 1fr; }
  .auth-or { display: none; }
}
.auth-error {
  background: #FFE0E6;
  border-left: 4px solid var(--c-pink-deep);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  margin-bottom: var(--s-4);
  font-size: 0.9rem; color: var(--c-pink-deep);
}
.auth-fine { text-align: center; color: var(--c-grey); font-size: 0.82rem; margin-top: var(--s-4); }

/* Nav user chip */
.nav-user { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.92rem; color: var(--c-cocoa); }
.nav-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--g-hero); color: #fff;
  display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 800; font-size: 0.95rem;
}
.nav-cta-ghost { background: transparent !important; color: var(--c-cocoa) !important; border: 1.5px solid var(--c-grey-soft); }
.nav-cta-ghost:hover { background: var(--c-cocoa) !important; color: #fff !important; }

/* ============================================================
   3D ANIMATED SCENE (auth art + hero)
   ============================================================ */
.scene {
  position: relative;
  width: 180px; height: 180px;
  margin: 0 auto;
  perspective: 800px;
  transform-style: preserve-3d;
}
.cone-3d {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 6rem;
  animation: spin3d 6s ease-in-out infinite, float 4s ease-in-out infinite;
  filter: drop-shadow(0 16px 30px rgba(0,0,0,0.35));
}
@keyframes spin3d {
  0%, 100% { transform: rotateY(-12deg) rotateX(6deg); }
  50% { transform: rotateY(12deg) rotateX(-6deg); }
}
.orbit {
  position: absolute; top: 50%; left: 50%;
  font-size: 1.8rem;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.3));
}
.orbit-1 { animation: orbit1 5s linear infinite; }
.orbit-2 { animation: orbit2 7s linear infinite; }
.orbit-3 { animation: orbit3 6s linear infinite; }
@keyframes orbit1 { from { transform: rotate(0deg) translateX(110px) rotate(0deg); } to { transform: rotate(360deg) translateX(110px) rotate(-360deg); } }
@keyframes orbit2 { from { transform: rotate(120deg) translateX(120px) rotate(-120deg); } to { transform: rotate(480deg) translateX(120px) rotate(-480deg); } }
@keyframes orbit3 { from { transform: rotate(240deg) translateX(100px) rotate(-240deg); } to { transform: rotate(600deg) translateX(100px) rotate(-600deg); } }

/* ============================================================
   REAL IMAGES on cards & hero
   ============================================================ */
.gc-visual { position: relative; overflow: hidden; }
.gc-visual img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.5s ease;
}
.gc-visual img.loaded { opacity: 1; }
.gc-visual .gc-emoji {
  position: relative; z-index: 1;
  transition: transform 0.3s, opacity 0.3s;
}
.game-card:hover .gc-visual img.loaded { transform: scale(1.06); transition: transform 0.6s ease, opacity 0.5s; }
.game-card:hover .gc-visual img.loaded + .gc-emoji,
.gc-visual img.loaded ~ .gc-emoji { opacity: 0; }

/* 3D tilt cards */
.tilt { transform-style: preserve-3d; transition: transform 0.15s ease-out; will-change: transform; }
.tilt .gc-visual, .tilt h3, .tilt .gc-foot { transform: translateZ(20px); }

/* Hero real image / glass */
.hero-photo {
  position: absolute; inset: 8%;
  border-radius: var(--r-xl);
  object-fit: cover; width: 84%; height: 84%;
  box-shadow: var(--sh-lg);
  opacity: 0; transition: opacity 0.6s;
}
.hero-photo.loaded { opacity: 1; }

/* Section photo banner */
.photo-band {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  min-height: 320px;
  display: grid; place-items: center;
  color: #fff; text-align: center;
  margin: var(--s-5) 0;
}
.photo-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-band .ov { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(45,27,54,0.7), rgba(255,77,141,0.5)); }
.photo-band .photo-content { position: relative; z-index: 1; padding: var(--s-6); max-width: 640px; }
.photo-band h2 { color: #fff; }
.photo-band p { color: rgba(255,255,255,0.9); margin: var(--s-3) 0 var(--s-5); }

/* Login prompt banner on game pages */
.login-band {
  background: var(--g-warm);
  border-radius: var(--r-md);
  padding: var(--s-4);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  flex-wrap: wrap;
  margin-bottom: var(--s-5);
}
.login-band p { font-weight: 600; color: var(--c-cocoa); margin: 0; }
.login-band .btn { white-space: nowrap; }

/* ============================================================
   SEO / AEO COMPONENTS (FAQ, breadcrumbs, answer block)
   ============================================================ */
.answer-block {
  background: #fff;
  border-left: 4px solid var(--c-mint-deep);
  border-radius: var(--r-md);
  padding: var(--s-5);
  box-shadow: var(--sh-sm);
  font-size: 1.05rem;
  color: var(--c-cocoa);
  max-width: 920px; margin: 0 auto;
}
.answer-block a { color: var(--c-pink-deep); font-weight: 600; }

.breadcrumbs { padding: var(--s-4) 0 0; font-size: 0.85rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.breadcrumbs li { color: var(--c-grey); display: flex; align-items: center; gap: 6px; }
.breadcrumbs li:not(:last-child)::after { content: '›'; color: var(--c-grey-soft); margin-left: 6px; }
.breadcrumbs a { color: var(--c-cocoa-soft); font-weight: 600; }
.breadcrumbs a:hover { color: var(--c-pink); }
.breadcrumbs [aria-current="page"] { color: var(--c-cocoa); font-weight: 600; }

.faq-section { background: linear-gradient(180deg, #fff 0%, var(--c-cream) 100%); }
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  background: #fff;
  border-radius: var(--r-md);
  margin-bottom: var(--s-3);
  box-shadow: var(--sh-sm);
  overflow: hidden;
  border: 1px solid rgba(45,27,54,0.05);
}
.faq-item summary {
  cursor: pointer;
  padding: var(--s-4) var(--s-5);
  font-family: var(--f-display); font-weight: 700; font-size: 1.02rem;
  color: var(--c-cocoa);
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-3);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.5rem; color: var(--c-pink); transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-a {
  padding: 0 var(--s-5) var(--s-5);
  color: var(--c-cocoa-soft); font-size: 0.98rem; line-height: 1.65;
}
.faq-item .faq-a a { color: var(--c-pink-deep); font-weight: 600; }

/* ============================================================
   ADSENSE SLOTS
   ============================================================ */
.ad-slot { margin: var(--s-6) auto; max-width: 970px; text-align: center; }
.ad-slot .ad-label {
  display: block; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--c-grey); margin-bottom: 6px;
}
.ad-placeholder .ad-ph-box {
  border: 2px dashed var(--c-grey-soft);
  border-radius: var(--r-md);
  padding: var(--s-6) var(--s-4);
  color: var(--c-grey);
  background: repeating-linear-gradient(45deg, #fff, #fff 12px, var(--c-cream) 12px, var(--c-cream) 24px);
  font-size: 0.85rem;
}
.ad-sticky-bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  box-shadow: 0 -4px 16px rgba(45,27,54,0.08);
  margin: 0; padding: 6px 0;
}
.ad-sticky-bottom .ad-close {
  position: absolute; top: -28px; right: 12px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--c-cocoa); color: #fff; font-size: 0.8rem;
}

/* ============================================================
   BLOG
   ============================================================ */
.blog-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--s-5);
}
.blog-card {
  background: #fff; border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--sh-sm); transition: transform 0.3s, box-shadow 0.3s;
  display: flex; flex-direction: column;
}
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--sh-lg); }
.blog-cover { position: relative; aspect-ratio: 16/10; overflow: hidden; display: grid; place-items: center; }
.blog-cover .gc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }
.blog-tag {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  background: var(--c-pink); color: #fff;
  font-size: 0.72rem; font-weight: 700; padding: 5px 12px; border-radius: var(--r-pill);
}
.blog-body { padding: var(--s-5); flex: 1; display: flex; flex-direction: column; }
.blog-body h3 { font-size: 1.12rem; margin-bottom: var(--s-2); line-height: 1.3; }
.blog-body p { color: var(--c-cocoa-soft); font-size: 0.92rem; flex: 1; margin-bottom: var(--s-3); }
.blog-meta { font-size: 0.8rem; color: var(--c-grey); }

/* Article page */
.article { padding: var(--s-6) 0 var(--s-8); }
.article-narrow { max-width: 760px; }
.article-tag {
  display: inline-block; background: var(--c-cream-2); color: var(--c-pink-deep);
  font-size: 0.75rem; font-weight: 700; padding: 5px 14px; border-radius: var(--r-pill);
  margin: var(--s-4) 0 var(--s-3);
}
.article h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); margin-bottom: var(--s-3); }
.article-meta { color: var(--c-grey); font-size: 0.9rem; margin-bottom: var(--s-5); }
.article-cover { width: 100%; border-radius: var(--r-lg); box-shadow: var(--sh-md); margin-bottom: var(--s-6); }
.article-content { font-size: 1.06rem; line-height: 1.8; color: var(--c-cocoa); }
.article-content h2 { font-size: 1.5rem; margin: var(--s-6) 0 var(--s-3); }
.article-content h3 { font-size: 1.2rem; margin: var(--s-5) 0 var(--s-2); }
.article-content p { margin-bottom: var(--s-4); }
.article-content ul, .article-content ol { margin: 0 0 var(--s-4) var(--s-5); }
.article-content li { margin-bottom: var(--s-2); }
.article-content a { color: var(--c-pink-deep); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(255,77,141,0.3); }
.article-content a:hover { text-decoration-color: var(--c-pink); }
.article-cta {
  background: var(--g-dark); color: #fff; border-radius: var(--r-lg);
  padding: var(--s-6); text-align: center; margin-top: var(--s-7);
}
.article-cta h3 { color: #fff; margin-bottom: var(--s-2); }
.article-cta p { color: rgba(255,255,255,0.8); margin-bottom: var(--s-4); }

/* ============================================================
   ACHIEVEMENT BADGES
   ============================================================ */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: var(--s-3); }
.ach-badge {
  background: #fff; border-radius: var(--r-md); padding: var(--s-4);
  text-align: center; box-shadow: var(--sh-sm);
  border: 2px solid transparent; transition: all 0.2s;
}
.ach-badge.locked { opacity: 0.45; filter: grayscale(1); }
.ach-badge.unlocked { border-color: var(--c-yellow); }
.ach-badge .ach-ic { font-size: 2rem; }
.ach-badge .ach-lbl { font-size: 0.82rem; font-weight: 600; margin-top: 6px; color: var(--c-cocoa); }

/* ============================================================
   PROFESSIONAL ICONS (Iconify / Lucide)
   ============================================================ */
iconify-icon { display: inline-block; vertical-align: middle; line-height: 1; }
.gc-icon { color: #fff; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.18)); transition: transform 0.3s ease; position: relative; z-index: 1; }
.game-card:hover .gc-icon { transform: scale(1.12) rotate(-6deg); }
.gc-visual { position: relative; overflow: hidden; }
/* relevant illustration loads on top of the gradient+icon base */
.gc-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 2;
  transition: transform 0.6s ease;
  background: transparent;
}
.game-card:hover .gc-img { transform: scale(1.06); }
.gc-shine {
  position: absolute; top: -60%; left: -30%;
  width: 60%; height: 220%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: rotate(18deg) translateX(-120%);
  transition: transform 0.6s ease; z-index: 3;
}
.game-card:hover .gc-shine { transform: rotate(18deg) translateX(320%); }
.gc-meta iconify-icon { color: var(--c-grey); margin-right: 2px; }
.feat-icon iconify-icon { color: var(--c-pink); }
.gc-play iconify-icon { color: #fff; }
.badge iconify-icon { color: var(--c-pink); }
.socials iconify-icon { color: #fff; }

/* Gradient band (replaces photo band) */
.gradient-band { background: var(--g-dark); }
.gradient-band::after {
  content: ''; position: absolute; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, var(--c-pink) 0%, transparent 70%);
  top: -120px; right: -120px; opacity: 0.5;
}

/* Article cover banner (gradient + icon) */
.article-cover-banner {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg); margin-bottom: var(--s-6);
  min-height: 240px; display: grid; place-items: center;
  color: #fff; box-shadow: var(--sh-md);
}
.article-cover-banner iconify-icon { color: #fff; filter: drop-shadow(0 8px 16px rgba(0,0,0,0.25)); position: relative; z-index: 1; }
.article-cover-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }
.blog-cover-icon { color: #fff; filter: drop-shadow(0 6px 12px rgba(0,0,0,0.2)); position: relative; z-index: 1; }

/* ============================================================
   NEW GAME UIs (word, memory match, color match)
   ============================================================ */
.scramble-tiles {
  display: flex; flex-wrap: wrap; gap: var(--s-2); justify-content: center;
  margin: var(--s-4) 0;
}
.sc-tile {
  width: 52px; height: 60px;
  display: grid; place-items: center;
  background: var(--c-cocoa); color: #fff;
  font-family: var(--f-display); font-weight: 800; font-size: 1.8rem;
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
  text-transform: uppercase;
}
.sc-tile.blank { background: var(--c-cream-2); color: var(--c-pink); border: 2px dashed var(--c-pink); }
@media (max-width: 480px) { .sc-tile { width: 40px; height: 48px; font-size: 1.4rem; } }

/* Memory Match grid */
.mm-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3);
  max-width: 380px; margin: var(--s-4) auto;
}
.mm-card {
  aspect-ratio: 1; border-radius: var(--r-md);
  position: relative; cursor: pointer;
  background: transparent; perspective: 600px;
  border: none; padding: 0;
}
.mm-card .mm-back, .mm-card .mm-front {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  backface-visibility: hidden;
  transition: transform 0.35s;
  font-size: 2rem;
}
.mm-card .mm-back {
  background: var(--g-card); color: #fff;
  font-family: var(--f-display); font-weight: 800; font-size: 1.6rem;
  transform: rotateY(0deg);
}
.mm-card .mm-front {
  background: #fff; box-shadow: var(--sh-sm) inset, 0 0 0 2px var(--c-cream-2);
  transform: rotateY(180deg);
}
.mm-card.flipped .mm-back { transform: rotateY(180deg); }
.mm-card.flipped .mm-front { transform: rotateY(360deg); }
.mm-card.done .mm-front { box-shadow: 0 0 0 3px var(--c-mint-deep); animation: pop 0.3s; }
@keyframes pop { 50% { transform: rotateY(360deg) scale(1.08); } }
@media (max-width: 420px) { .mm-grid { gap: var(--s-2); } .mm-card .mm-front, .mm-card .mm-back { font-size: 1.5rem; } }

/* Color Match (Stroop) */
.cm-stage {
  background: var(--c-cream); border-radius: var(--r-lg);
  padding: var(--s-7) var(--s-4); margin: var(--s-4) 0;
}
.cm-word {
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(2.5rem, 9vw, 4.5rem);
  letter-spacing: 0.04em;
  transition: transform 0.12s ease;
}
.cm-prompt { color: var(--c-grey); font-size: 0.9rem; margin-top: var(--s-2); }
.cm-buttons { display: flex; gap: var(--s-3); justify-content: center; margin-top: var(--s-4); }
.cm-buttons .btn { min-width: 150px; }

/* Contact cards */
.contact-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--s-4); }
@media (max-width: 700px) { .contact-cards { grid-template-columns: 1fr; } }

/* Category quick-link chips (games hub) */
.cat-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.cat-chip {
  padding: 8px 16px; border-radius: var(--r-pill);
  background: #fff; box-shadow: var(--sh-sm);
  font-weight: 600; font-size: 0.88rem; color: var(--c-cocoa-soft);
  transition: all 0.15s;
}
.cat-chip:hover { background: var(--c-cocoa); color: #fff; transform: translateY(-2px); }

/* Internal link cloud (homepage SEO) */
.link-cloud {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s-5); max-width: var(--maxw); margin: 0 auto;
}
.link-col h4 { font-size: 1rem; margin-bottom: var(--s-2); }
.link-col h4 a { color: var(--c-cocoa); }
.link-col h4 a:hover { color: var(--c-pink); }
.link-col a { display: block; padding: 4px 0; color: var(--c-cocoa-soft); font-size: 0.92rem; transition: color 0.15s; }
.link-col a:hover { color: var(--c-pink); }

/* ============================================================
   COOKIE CONSENT BANNER
   ============================================================ */
.cookie-bar {
  position: fixed; left: 16px; right: 16px; bottom: 16px;
  max-width: 720px; margin: 0 auto;
  background: var(--c-cocoa); color: #fff;
  border-radius: var(--r-lg);
  padding: var(--s-4) var(--s-5);
  box-shadow: var(--sh-lg);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  z-index: 200;
  transform: translateY(140%); transition: transform 0.35s ease;
  flex-wrap: wrap;
}
.cookie-bar.show { transform: translateY(0); }
.cookie-bar p { margin: 0; font-size: 0.88rem; color: rgba(255,255,255,0.85); flex: 1; min-width: 240px; }
.cookie-bar a { color: var(--c-yellow); font-weight: 600; }
.cookie-btns { display: flex; gap: var(--s-2); flex-shrink: 0; }

/* ============================================================
   FOOTER LEGAL ROW
   ============================================================ */
.foot-legal {
  display: flex; flex-wrap: wrap; gap: var(--s-4);
  padding: var(--s-4) 0; margin-top: var(--s-4);
  border-top: 1px solid rgba(255,255,255,0.08);
  justify-content: center;
}
.foot-legal a { color: rgba(255,255,255,0.7); font-size: 0.85rem; }
.foot-legal a:hover { color: var(--c-pink); }

/* ============================================================
   NAV AVATAR IMAGE + PROFILE
   ============================================================ */
/* nav avatar: letter base with image overlaid (image hides gracefully if it 404s) */
.nav-avatar { position: relative; overflow: hidden; }
.nav-avatar-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%;
}
.nav-user { cursor: pointer; text-decoration: none; }
.nav-user:hover { color: var(--c-pink); }

/* ---- Profile cover banner + overlapping avatar ---- */
.profile-cover {
  background: var(--g-dark);
  padding: var(--s-8) 0 calc(var(--s-8) + 28px);
  position: relative; overflow: hidden;
}
.profile-cover::before {
  content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, var(--c-pink) 0%, transparent 70%);
  top: -160px; right: -120px; opacity: 0.45;
}
.profile-cover-inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: var(--s-5);
}
@media (max-width: 600px) { .profile-cover-inner { flex-direction: column; text-align: center; } }
.profile-avatar-lg {
  width: 124px; height: 124px; border-radius: 50%;
  position: relative; overflow: hidden; flex: 0 0 auto;
  background: var(--g-hero); color: #fff;
  display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 800; font-size: 3rem;
  border: 5px solid #fff; box-shadow: var(--sh-lg);
}
.profile-avatar-lg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.profile-id h1 { color: #fff; margin: 0; font-size: clamp(1.7rem, 4vw, 2.4rem); }
.profile-id p { color: rgba(255,255,255,0.82); margin: 6px 0 14px; font-size: 0.95rem; }
.profile-stats { display: flex; gap: var(--s-2); flex-wrap: wrap; }
@media (max-width: 600px) { .profile-stats { justify-content: center; } }
.pstat {
  background: rgba(255,255,255,0.15); color: #fff;
  padding: 7px 16px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 0.85rem;
  backdrop-filter: blur(6px);
}

.profile-body { margin-top: -28px; position: relative; z-index: 2; padding-bottom: var(--s-8); }
.profile-grid { display: grid; grid-template-columns: 300px 1fr; gap: var(--s-5); align-items: start; }
@media (max-width: 820px) { .profile-grid { grid-template-columns: 1fr; } }

.profile-ok {
  background: #D9F7E6; border-left: 4px solid var(--c-mint-deep);
  color: var(--c-mint-deep); font-weight: 600;
  padding: var(--s-3) var(--s-4); border-radius: var(--r-md); margin-bottom: var(--s-4);
}
.best-list { display: flex; flex-direction: column; gap: 2px; }
.best-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid rgba(0,0,0,0.05); font-size: 0.92rem;
}
.best-row:last-child { border-bottom: 0; }
.best-row strong { color: var(--c-pink); font-family: var(--f-display); }

.profile-links { display: flex; flex-direction: column; }
.profile-links a {
  padding: 11px 0; border-bottom: 1px solid rgba(0,0,0,0.05);
  color: var(--c-cocoa); font-weight: 600; font-size: 0.95rem; transition: color 0.15s, padding-left 0.15s;
}
.profile-links a:last-child { border-bottom: 0; }
.profile-links a:hover { color: var(--c-pink); padding-left: 6px; }

/* ===== Related posts (blog interlinking) ===== */
.related-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
@media (max-width: 700px) { .related-posts { grid-template-columns: 1fr; } }
.related-post {
  display: flex; align-items: center; gap: var(--s-3);
  background: #fff; border-radius: var(--r-md); padding: var(--s-4);
  box-shadow: var(--sh-sm); color: var(--c-cocoa); font-weight: 600; font-size: 0.92rem;
  transition: transform 0.2s, box-shadow 0.2s; line-height: 1.3;
}
.related-post:hover { transform: translateY(-3px); box-shadow: var(--sh-md); color: var(--c-pink); }
.related-post iconify-icon { color: var(--c-pink); flex-shrink: 0; }

/* ============================================================
   COMMUNITY popup + badge (all pages)
   ============================================================ */
.comm-badge {
  position: fixed; left: 16px; bottom: 16px; z-index: 95;
  background: var(--c-cocoa); color: #fff;
  border-radius: var(--r-pill); padding: 10px 16px;
  font-family: var(--f-display); font-weight: 800; font-size: 0.9rem;
  box-shadow: var(--sh-md); cursor: pointer;
}
.comm-badge:hover { background: var(--c-pink); transform: translateY(-2px); }
.comm-pop {
  position: fixed; left: 16px; bottom: 70px; z-index: 96;
  width: min(92vw, 320px);
  background: #fff; border-radius: var(--r-lg);
  box-shadow: var(--sh-lg); padding: var(--s-5);
  transform: translateY(20px) scale(0.96); opacity: 0; pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  border: 1px solid rgba(45,27,54,0.06);
}
.comm-pop.show { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
.comm-x { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 50%; background: var(--c-cream); color: var(--c-cocoa-soft); font-size: 0.8rem; }
.comm-x:hover { background: var(--c-pink); color: #fff; }
.comm-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.82rem; color: var(--c-cocoa-soft); text-transform: uppercase; letter-spacing: 0.04em; }
.comm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-mint-deep); animation: pulse 1.6s infinite; }
.comm-big { font-family: var(--f-display); font-weight: 800; font-size: 1.9rem; color: var(--c-cocoa); margin: 6px 0 2px; }
.comm-big span { font-size: 0.85rem; font-weight: 500; color: var(--c-grey); display: block; }
.comm-online { font-size: 0.85rem; color: var(--c-mint-deep); font-weight: 600; margin-bottom: var(--s-3); }
.comm-bar { height: 10px; background: var(--c-cream-2); border-radius: 6px; overflow: hidden; }
.comm-bar-fill { height: 100%; background: var(--g-hero); border-radius: 6px; transition: width 0.6s; }
.comm-goal { font-size: 0.85rem; color: var(--c-cocoa-soft); margin: var(--s-2) 0; }
.comm-names { font-size: 0.78rem; color: var(--c-grey); line-height: 1.5; margin-bottom: var(--s-3); }
.comm-names span { color: var(--c-cocoa); font-weight: 600; }
.comm-emoji { font-size: 2.6rem; text-align: center; }
.comm-pop h4 { font-size: 1.1rem; margin: var(--s-2) 0; text-align: center; }
.comm-pop p { font-size: 0.88rem; color: var(--c-cocoa-soft); text-align: center; margin-bottom: var(--s-3); }
.comm-cta { display: block; text-align: center; background: var(--c-pink); color: #fff; font-weight: 700; padding: 10px; border-radius: var(--r-pill); margin-top: var(--s-3); }
.comm-cta:hover { background: var(--c-pink-deep); color: #fff; }
.comm-link { display: block; text-align: center; font-size: 0.82rem; color: var(--c-cocoa-soft); margin-top: 8px; }
@media (max-width: 600px) { .comm-badge { left: 10px; bottom: 10px; padding: 8px 13px; } .comm-pop { bottom: 60px; left: 10px; } }

/* ===== Refer & Earn badge + popup (bottom-right) ===== */
.ref-badge {
  position: fixed; right: 16px; bottom: 16px; z-index: 95;
  background: var(--g-hero); color: #fff;
  border-radius: var(--r-pill); padding: 10px 16px;
  font-family: var(--f-display); font-weight: 800; font-size: 0.85rem;
  box-shadow: var(--sh-pink); cursor: pointer; border: none;
}
.ref-badge:hover { transform: translateY(-2px); }
.ref-pop {
  position: fixed; right: 16px; bottom: 70px; z-index: 96;
  width: min(92vw, 320px);
  background: #fff; border-radius: var(--r-lg);
  box-shadow: var(--sh-lg); padding: var(--s-5);
  transform: translateY(20px) scale(0.96); opacity: 0; pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  border: 1px solid rgba(45,27,54,0.06);
}
.ref-pop.show { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
.ref-pop h4 { text-align: center; font-size: 1.1rem; margin: var(--s-2) 0; }
.ref-pop p { font-size: 0.88rem; color: var(--c-cocoa-soft); }
.ref-linkrow { display: flex; gap: 6px; margin: var(--s-3) 0; }
.ref-linkrow input { flex: 1; min-width: 0; padding: 9px 11px; border: 1.5px solid var(--c-grey-soft); border-radius: var(--r-md); font-size: 0.8rem; background: var(--c-cream); }
.ref-copy { background: var(--c-cocoa); color: #fff; border-radius: var(--r-md); padding: 0 14px; font-weight: 700; font-size: 0.8rem; }
.ref-copy:hover { background: var(--c-pink); }
@media (max-width: 600px) { .ref-badge { right: 10px; bottom: 10px; } .ref-pop { right: 10px; bottom: 58px; } }

/* Refer & Earn card (profile) */
.refer-card { background: var(--g-dark); color: #fff; border-radius: var(--r-lg); padding: var(--s-5); }
.refer-card h3 { color: #fff; }
.refer-card p { color: rgba(255,255,255,0.82); font-size: 0.9rem; }
.refer-card .ref-linkrow input { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.2); }
.refer-card .comm-bar { background: rgba(255,255,255,0.15); }

/* ===== Community page ===== */
.stat-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--s-4); }
@media (max-width: 600px) { .stat-cards { grid-template-columns: 1fr; } }
.stat-card { background: #fff; border-radius: var(--r-lg); padding: var(--s-5); text-align: center; box-shadow: var(--sh-sm); }
.sc-num { font-family: var(--f-display); font-weight: 800; font-size: clamp(2rem,6vw,3rem); color: var(--c-pink); }
.sc-lbl { color: var(--c-cocoa-soft); font-weight: 600; font-size: 0.9rem; }
.goal-bar { height: 28px; background: var(--c-cream-2); border-radius: var(--r-pill); overflow: hidden; margin-top: var(--s-4); }
.goal-bar-fill { height: 100%; background: var(--g-hero); border-radius: var(--r-pill); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 0.85rem; min-width: 36px; transition: width 0.6s; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: var(--s-3); }
.member { display: flex; align-items: center; gap: var(--s-3); background: #fff; border-radius: var(--r-md); padding: var(--s-3); box-shadow: var(--sh-sm); }
.member-av { width: 40px; height: 40px; border-radius: 50%; background: var(--g-hero); color: #fff; display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; position: relative; overflow: hidden; flex-shrink: 0; }
.member-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.member-name { font-weight: 600; font-size: 0.92rem; }
.member-city { font-size: 0.78rem; color: var(--c-grey); }

/* ===== About-this-game (SEO content) ===== */
.about-game {
  background: #fff; border-radius: var(--r-lg); padding: var(--s-5) var(--s-6);
  box-shadow: var(--sh-sm); max-width: 760px; margin: 0 auto;
  border: 1px solid rgba(45,27,54,0.05);
}
.about-game h2 { font-size: 1.3rem; margin-bottom: var(--s-3); }
.about-game p { color: var(--c-cocoa-soft); line-height: 1.75; }

/* ===== Prize events ===== */
.nav-win { color: var(--c-pink-deep) !important; font-weight: 700 !important; }
.event-card {
  background: var(--g-dark); color: #fff; border-radius: var(--r-xl);
  padding: var(--s-6); text-align: center; position: relative; overflow: hidden;
}
.event-card::before { content:''; position:absolute; width:320px;height:320px;border-radius:50%;
  background:radial-gradient(circle,var(--c-pink) 0%,transparent 70%); top:-120px; right:-100px; opacity:.45; }
.event-card h2 { color:#fff; position:relative; margin-bottom: var(--s-3); }
.event-card .event-meta { position:relative; display:flex; flex-direction:column; gap:6px; align-items:center; color:rgba(255,255,255,.85); margin-bottom: var(--s-4); font-size:0.95rem; }
.event-card .event-meta a { color: var(--c-yellow); }
.event-badge { display:inline-block; background:var(--c-pink); color:#fff; font-weight:700; font-size:0.78rem; padding:5px 14px; border-radius:var(--r-pill); margin-bottom:var(--s-3); position:relative; }
.event-badge.soon { background: var(--c-mint-deep); }
.event-countdown { position:relative; font-family:var(--f-display); font-weight:800; font-size:clamp(1.3rem,5vw,2rem); color:var(--c-yellow); margin-bottom: var(--s-4); }
.event-countdown span { font-variant-numeric: tabular-nums; }
.lb-row.me { outline: 2px solid var(--c-pink); }

/* ===== On-screen D-pad (2048, Snake) ===== */
.dpad {
  display: grid;
  grid-template-columns: repeat(3, 56px);
  grid-template-rows: repeat(2, 56px);
  justify-content: center; gap: 8px;
  margin: var(--s-4) auto 0;
}
.dpad-btn {
  background: var(--c-cocoa); color: #fff;
  border-radius: var(--r-md); font-size: 1.3rem;
  display: grid; place-items: center; cursor: pointer;
  transition: transform 0.1s, background 0.15s; user-select: none;
}
.dpad-btn:active { transform: scale(0.92); background: var(--c-pink); }
.dpad-up    { grid-column: 2; grid-row: 1; }
.dpad-left  { grid-column: 1; grid-row: 2; }
.dpad-down  { grid-column: 2; grid-row: 2; }
.dpad-right { grid-column: 3; grid-row: 2; }

/* ===== Typing test ===== */
.type-target {
  background: var(--c-cream); border-radius: var(--r-md);
  padding: var(--s-4); font-size: 1.15rem; line-height: 1.7;
  color: var(--c-cocoa); margin: var(--s-4) 0; text-align: left;
  border-left: 4px solid var(--c-mint-deep);
}
.type-input {
  width: 100%; padding: var(--s-4); border: 2px solid var(--c-grey-soft);
  border-radius: var(--r-md); font-size: 1.05rem; font-family: inherit;
  resize: none; outline: none; transition: border-color 0.2s;
}
.type-input:focus { border-color: var(--c-pink); }

/* ===== Tic-Tac-Toe ===== */
.ttt-board {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  width: min(86vw, 300px); aspect-ratio: 1; margin: var(--s-4) auto;
}
.ttt-cell {
  background: var(--c-cream); border: none; border-radius: var(--r-md);
  font-size: clamp(2rem, 12vw, 3.4rem); cursor: pointer;
  display: grid; place-items: center; transition: background 0.15s, transform 0.1s;
}
.ttt-cell:hover:not(.filled) { background: var(--c-cream-2); }
.ttt-cell.filled { cursor: default; }

/* ===== Rock Paper Scissors ===== */
.rps-scoreboard { display: flex; align-items: center; justify-content: center; gap: var(--s-5); margin: var(--s-4) 0; }
.rps-side { display: flex; flex-direction: column; align-items: center; }
.rps-hand { font-size: 3rem; }
.rps-label { font-size: 0.85rem; color: var(--c-cocoa-soft); }
.rps-num { font-family: var(--f-display); font-weight: 800; font-size: 2rem; color: var(--c-pink); }
.rps-vs { font-family: var(--f-display); font-weight: 800; color: var(--c-grey); }
.rps-buttons { display: flex; gap: var(--s-3); justify-content: center; }
.rps-btn {
  width: 84px; height: 84px; border-radius: 50%;
  background: #fff; box-shadow: var(--sh-sm); border: 2px solid transparent;
  font-size: 2.2rem; cursor: pointer; transition: transform 0.12s, border-color 0.15s;
}
.rps-btn:hover { transform: translateY(-4px); border-color: var(--c-pink); }
.rps-btn:active { transform: scale(0.92); }

/* ===== Snake ===== */
.snake-canvas {
  width: min(90vw, 340px); height: auto; aspect-ratio: 1;
  border-radius: var(--r-md); margin: var(--s-3) auto; display: block;
  touch-action: none; background: var(--c-cocoa);
}

/* ===== Higher or Lower ===== */
.hl-row { display: flex; align-items: center; justify-content: center; gap: var(--s-4); margin: var(--s-4) 0; }
.hl-cap { font-size: 0.8rem; color: var(--c-grey); }
.hl-num {
  width: 96px; height: 96px; border-radius: var(--r-lg);
  display: grid; place-items: center; margin-top: 6px;
  font-family: var(--f-display); font-weight: 800; font-size: 2.4rem;
  background: var(--c-cream); color: var(--c-cocoa);
}
.hl-num.ok { background: var(--c-mint); }
.hl-num.bad { background: #FFD2D8; color: var(--c-pink-deep); }
.hl-arrow { font-size: 1.6rem; color: var(--c-grey); }
.hl-buttons { display: flex; gap: var(--s-3); justify-content: center; }

/* ===== Click Speed ===== */
.click-pad {
  width: 100%; min-height: 180px; border-radius: var(--r-lg);
  background: var(--g-card); color: #fff; cursor: pointer; user-select: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  margin: var(--s-4) 0; font-weight: 600; transition: transform 0.05s;
  -webkit-tap-highlight-color: transparent;
}
.click-pad.active { background: var(--g-hero); }
.click-pad:active { transform: scale(0.99); }
.click-pad .cp-big { font-family: var(--f-display); font-weight: 800; font-size: 3.4rem; }

/* ===== 2048 ===== */
.g2048-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  background: var(--c-cocoa); padding: 10px; border-radius: var(--r-md);
  width: min(92vw, 380px); aspect-ratio: 1; margin: var(--s-4) auto;
  touch-action: none; user-select: none;
}
.tile {
  display: grid; place-items: center; border-radius: 8px;
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(1.1rem, 5vw, 1.9rem); color: var(--c-cocoa);
  background: rgba(255,255,255,0.06);
  transition: transform 0.08s;
}
.tile-2{background:#FFF1E0}.tile-4{background:#FFE6C7}.tile-8{background:#FFC59E;color:#fff}
.tile-16{background:#FF9F6E;color:#fff}.tile-32{background:#FF7A4D;color:#fff}.tile-64{background:#FF4D8D;color:#fff}
.tile-128{background:#E63976;color:#fff;font-size:clamp(1rem,4.4vw,1.7rem)}.tile-256{background:#C72E86;color:#fff}
.tile-512{background:#9B59B6;color:#fff}.tile-1024{background:#6FE5C5;color:#073;font-size:clamp(.9rem,4vw,1.5rem)}
.tile-2048{background:linear-gradient(135deg,#FFD93D,#FF9F1C);color:#fff;box-shadow:0 0 18px rgba(255,200,40,.7)}
.tile-super{background:linear-gradient(135deg,#2D1B36,#FF4D8D);color:#fff}

/* ===== Whack-a-Mole ===== */
.wm-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  width: min(92vw, 360px); margin: var(--s-4) auto;
}
.wm-hole {
  aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 75%, #6b4a2b 0%, #3a2716 70%);
  position: relative; overflow: hidden; border: none; cursor: pointer;
  box-shadow: inset 0 -8px 14px rgba(0,0,0,0.4);
}
.wm-mole {
  position: absolute; left: 0; right: 0; bottom: -100%;
  font-size: clamp(2rem, 9vw, 3rem);
  transition: bottom 0.12s ease;
  display: block;
}
.wm-hole.up .wm-mole { bottom: 8%; }
.wm-hole.hit { background: radial-gradient(circle at 50% 75%, #FF8A5C 0%, #3a2716 70%); }
.wm-hole::after {
  content:''; position:absolute; left:8%; right:8%; bottom:0; height:26%;
  background:#241608; border-radius:50%;
}

/* admin inbox */
.msg-card { background:#fff; border-radius:var(--r-lg); padding:var(--s-5); box-shadow:var(--sh-sm); margin-bottom:var(--s-4); border-left:4px solid var(--c-grey-soft); }
.msg-card.msg-unread { border-left-color: var(--c-pink); background: #fff; }
.msg-head { display:flex; justify-content:space-between; gap:var(--s-3); flex-wrap:wrap; align-items:baseline; }
.msg-email { color:var(--c-pink-deep); font-size:0.88rem; margin-left:8px; }
.msg-src { display:inline-block; font-size:0.7rem; text-transform:uppercase; letter-spacing:0.05em; background:var(--c-cream-2); color:var(--c-cocoa-soft); padding:2px 8px; border-radius:var(--r-pill); margin-left:8px; }
.msg-date { font-size:0.82rem; color:var(--c-grey); }
.msg-subject { font-family:var(--f-display); font-weight:700; margin:var(--s-3) 0 var(--s-2); }
.msg-body { color:var(--c-cocoa-soft); font-size:0.95rem; line-height:1.6; white-space:pre-wrap; }
.msg-actions { display:flex; gap:var(--s-2); margin-top:var(--s-3); flex-wrap:wrap; }

/* avatar uploader (form) */
.avatar-upload { display: flex; align-items: center; gap: var(--s-4); }
.avatar-preview {
  width: 76px; height: 76px; border-radius: 50%;
  position: relative; overflow: hidden; flex: 0 0 auto;
  background: var(--g-hero); color: #fff;
  display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 800; font-size: 1.8rem;
  box-shadow: var(--sh-sm);
}
.avatar-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar-upload input[type="file"] { font-size: 0.9rem; }

/* leaderboard: scrollable tabs + avatar */
.lb-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
.lb-tabs .lb-tab { white-space: nowrap; flex: 0 0 auto; }
.lb-av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--c-pink); }
.lb-row { grid-template-columns: 40px 1fr auto; }

/* ============================================================
   HOW TO PLAY — rules card on game pages
   ============================================================ */
.rules-card {
  background: #fff; border-radius: var(--r-lg);
  padding: var(--s-5) var(--s-6); box-shadow: var(--sh-sm);
  max-width: 760px; margin: 0 auto;
  border: 1px solid rgba(45,27,54,0.05);
}
.rules-card h2 { font-size: 1.3rem; margin-bottom: var(--s-4); }
.rules-list { list-style: none; counter-reset: r; padding: 0; margin: 0; }
.rules-list li {
  counter-increment: r; position: relative;
  padding: 12px 0 12px 50px; line-height: 1.55; color: var(--c-cocoa);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.rules-list li:last-child { border-bottom: 0; }
.rules-list li::before {
  content: counter(r); position: absolute; left: 0; top: 9px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--g-hero); color: #fff;
  display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 800; font-size: 0.95rem;
  box-shadow: var(--sh-pink);
}

/* ============================================================
   MOBILE ALIGNMENT FIXES (game pages & general)
   ============================================================ */
@media (max-width: 600px) {
  .play-shell { padding: 0 14px; }
  .play-card { padding: var(--s-5) var(--s-4); }
  .play-head h1 { font-size: 1.85rem; }
  .play-head .lead { font-size: 0.98rem; }

  /* stat chips: center & wrap neatly, no overflow */
  .bm-meta, .math-meta { gap: 8px; }
  .bm-meta .stat-mini, .math-meta .chip { font-size: 0.8rem; padding: 6px 12px; }

  /* action buttons: full-width stacked = clean alignment + easy tapping */
  .actions-row { flex-direction: column; align-items: stretch; }
  .actions-row .btn { width: 100%; }
  .cm-buttons { flex-direction: column; }
  .cm-buttons .btn { width: 100%; min-width: 0; }

  /* inputs full width */
  .game-input { width: 100%; max-width: 100%; }

  /* option grids */
  .gs-options, .math-grid { grid-template-columns: 1fr 1fr; }

  /* timer presets */
  .sc-target-set { gap: 6px; }
  .sc-preset { padding: 8px 13px; font-size: 0.85rem; }

  /* rules card padding */
  .rules-card { padding: var(--s-4); }
  .rules-card h2 { font-size: 1.15rem; }

  /* memory grid fits small screens */
  .mm-grid { gap: 8px; }

  /* hold-note two columns -> stack */
  .hn-stage > div { flex-direction: column; gap: var(--s-4) !important; }

  /* login band stacks */
  .login-band { flex-direction: column; align-items: stretch; text-align: center; }
  .login-band .btn { width: 100%; }
}

@media (max-width: 380px) {
  .gs-options, .math-grid { grid-template-columns: 1fr; }
  .sc-display { font-size: 2.6rem; height: 120px; }
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
